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 |
---|---|---|---|---|---|---|
Definicion de variables para ejecucion del procedimiento | function modificarAnalisisPorqueDet(){
$this->procedimiento='gem.ft_analisis_porque_det_ime';
$this->transaccion='GM_DET_MOD';
$this->tipo_procedimiento='IME';
//Define los parametros para la funcion
$this->setParametro('id_analisis_porque_det','id_analisis_porque_det','int4');
$this->setParametro('id_analisis_porque','id_analisis_porque','int4');
$this->setParametro('solucion','solucion','varchar');
$this->setParametro('estado_reg','estado_reg','varchar');
$this->setParametro('porque','porque','varchar');
$this->setParametro('respuesta','respuesta','varchar');
//Ejecuta la instruccion
$this->armarConsulta();
$this->ejecutarConsulta();
//Devuelve la respuesta
return $this->respuesta;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setVariablesEntrada()\r\n\t{\r\n\t\t$request = $this->requestStack->getCurrentRequest();\r\n\t\t\r\n\t\t$this->tipo = $request->get('tipo');\r\n\t\t$this->apoyoTapas = $request->get('apoyoTapas');\r\n\t\t$this->prof = $request->get('prof');\r\n\t\t$this->anchoPanel = $request->get('ancho');\r\n\t\t$this->pisosManual = $request->get('pisosManual');\r\n\t\t$this->perfilIntermedio = $request->get('perfilIntermedio');\r\n\t\t$this->pisosManual7 = $request->get('pisosManual7');\t\t\r\n\t\t$this->chapaPisoAdicional = $request->get('chapaPiso');\r\n\t\t$this->cantChapaPisoAdicional = $request->get('cantAdicional');\r\n\t\t$this->maxAlt = $request->get('maxAlt');\r\n\t\t$this->cantPaneles = $request->get('cantPaneles');\r\n\t\t$this->abiertoCerrado = $request->get('aletaTipo');\r\n\t\t$this->aletaVenA = $request->get('aletaVenA');\r\n\t\t$this->aletaFluA = $request->get('aletaFluA');\r\n\t\t\r\n\t\treturn $this;\r\n\t}",
"private function setQuantumVars() {\n \n if (!empty($_REQUEST['controller'])) {\n \n $this->controller = $_REQUEST['controller'];\n \n };\n \n if (!empty($_REQUEST['task'])) {\n \n $this->task = $_REQUEST['task'];\n \n }\n \n if (!empty($_REQUEST['object_id'])) {\n \n $this->object_id = $_REQUEST['object_id'];\n \n }\n \n \n }",
"function cl_parametroprogressaoparcial() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"parametroprogressaoparcial\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function setVariables()\n \t{\t\n \t\tif (isset($this->params->plugin)) {\n \t\t\t$this->setPlPath(App::pluginPath(Inflector::humanize($this->params->plugin)));\n \t\t}\n \t\t$this->setController($this->params->controller);\n \t\t$this->setAction($this->params->action);\n \t\t$this->setConstant(Configure::read('App'));\n \t\t\n \t}",
"public function main(){\n\t\t\n\t\tif (isset($_REQUEST[\"do\"])){\n\t\t\t$do = $_REQUEST[\"do\"];\n\t\t\tif(Seguridad::getId() == null && $do != \"processFormLogin\" && $do != \"insertUser\" && $do != \"processInsertUser\"){\n\t\t\t\t$do = \"formLogin\";\n\t\t\t}\n\t\t} else\n\t\t\t$do = \"formLogin\";\n\t\t$this->$do(); //Ejecuta el metodo con el nombre que contiene la variable en ese momento\n\t}",
"private function input(){\n $this->params['controller_name'] = $this->ask('Controller name');\n $this->params['crud_url'] = $this->ask('CRUD url');\n $this->params['model_name'] = $this->ask('Model name');\n $this->params['table_name'] = $this->ask('Table name');\n $this->params['author'] = env('PACKAGE_AUTHOR');\n }",
"private function load_variables() : void {\n\t\t$this->today = new \\DateTime( 'NOW' );\n\t\t$this->start_date = new \\DateTime( FTW_START_DATE );\n\t\t$this->completion_date = new \\DateTime( FTW_COMPLETION_DATE );\n\t}",
"protected function initVars() {\n\n\t\t}",
"protected function variablesAssign()\n {\n $app = $this->app;\n $this->request = $app['request'];\n $this->session = $app['session'];\n $this->template = $app['template'];\n $this->theme = $app['theme'];\n\n // Set Request Format\n switch ($this->request->getRequestFormat()) {\n case 'json':\n $this->format = 'json';\n break;\n\n case 'xml':\n $this->format = 'xml';\n break;\n\n case 'csv':\n $this->format = 'csv';\n break;\n\n case 'html':\n default:\n $this->format = 'html';\n break;\n }\n }",
"function getParams()\n {\n global $id;\n global $mode;\n global $data_source;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($data_source)) {\n $this->data_source = $data_source;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }",
"function asignar_valores(){\n\t\t$this->tabla=$_POST['tabla'];\n\t\t$this->pertenece=$_POST['pertenece'];\n\t\t$this->asunto=$_POST['asunto'];\n\t\t$this->descripcion=$_POST['contenido'];\n\t\t$this->fecha=$_POST['fecha'];\n\t\t$this->hora=$_POST['hora'];\n\t\t$this->fechamod=$_POST['fechamod'];\n\t}",
"public function run()\n {\n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"1\",\n 'variable_etiqueta' => \"Activo\",\n ]);\n\n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"2\",\n 'variable_etiqueta' => \"Inactivo\",\n ]);\n\n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"3\",\n 'variable_etiqueta' => \"Expirado\",\n ]);\n \n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"4\",\n 'variable_etiqueta' => \"Eliminado\",\n ]);\n\n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"5\",\n 'variable_etiqueta' => \"Bloqueado\",\n ]);\n }",
"protected function setAcoVariables() {\n\n $this->set('plugin',\n isset($this->params['named']['plugin']) ? $this->params['named']['plugin'] : '');\n $this->set('controller_name', $this->params['named']['controller']);\n $this->set('action', $this->params['named']['action']);\n }",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"public function setPrenom($prenom){\n if(empty($prenom)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n\n\n //on declare de la variable prenom puis on appelle la varibale prive prenom\n $this->_prenom = $prenom;\n }\n\n public function setMail($mail){\n //Si mail est vide on fait\n if(empty($mail)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n\n }\n //on declare de la variable mail puis on appelle la varibale prive mail\n $this->_mail = $mail;\n }\n\n public function setAdresse($adresse){\n //Si adresse est vide on fait\n if(empty($adresse)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n }\n //on declare de la variable adresse puis on appelle la varibale prive adresse\n $this->_adresse = $adresse;\n }\n\n public function setNumero($numero){\n //Si numero est vide on fait\n if(empty($numero)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n\n }\n //on declare de la variable numero puis on appelle la varibale prive numero\n $this->_numero = $numero;\n }\n\n public function setMot_de_passe($mdp){\n //Si mdp est vide on fait\n if(empty($mdp)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n }\n //on declare de la varaible mdp puis on appelle la varibale prive mdp\n $this->_mdp = $mdp;\n }\n\n public function getNom(){return $this->_nom;} // on retourne nom\n public function getPrenom(){return $this->_prenom;} // on retourne prenom\n public function getMail(){return $this->_mail;} // on retourne mail\n public function getAdresse(){return $this->_adresse;} // on retourne adresse\n public function getNumero(){return $this->_numero;} // on retourne numero\n public function getMot_de_passe(){return $this->_mdp;} // on retourne mdp\n\n}",
"public function __construct() { \n require __DIR__ . '/Config/parameters.php'; //⚠️️ DIR = cste magiq qui retourne chemin du doss ds lequel on est depuis la racine\n $this -> parameters = $parameters; // je mets ça ds ' protected $parameters; '\n /*⚠️️ Au moment où j'instancie cette classe, je récupère le fichier parameters.php, \n et je stocke tous les parameters de mon application dans la propriété $parameters */\n }",
"function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->etiqueta=$_POST['etiqueta'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t\t$this->claves=$_POST['claves'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->icono=$_POST['icono'];\n\t}",
"function asignar_valores(){\n\t\t//$this->ciudad=$_SESSION['ciudad_admin'];\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->cantidad=$_POST['cantidad'];\n\t\t$this->cedula=$_POST['cedula'];\n\t\t$this->correo=$_POST['correo'];\n\t}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n\n\n\n}",
"function getParams()\n {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }",
"function envios_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"envios\";\n\t\t$this->campoClave=\"IdEnvio\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"IdEnvio\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(2,$this->tabla,\"IdMail\",2);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Envio\",3);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Descripcion\",4);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"TablaDatosExtras\",5);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"CondicionDatosExtras\",6);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"FechaCreacion\",7);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"FechaModificacion\",8);\n$this->agregarVariable2($v);\n\n\t}",
"function 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}",
"function cl_procprocessodoc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"procprocessodoc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function __construct(){\n $this->pegaProjetos();\n }",
"function getParams() {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $data_source;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id=$id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode=$mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode=$view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode=$edit_mode;\r\n }\r\n if (isset($data_source)) {\r\n $this->data_source=$data_source;\r\n }\r\n if (isset($tab)) {\r\n $this->tab=$tab;\r\n }\r\n}",
"public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n\n $path = explode('\\\\', get_class($this->model));\n\n $this->vars['task_id'] = array_pop($path) . '-' . $this->model->{$this->taskKey};\n $this->vars['task_name'] = $this->model->{$this->taskName};\n\n $this->vars['app_name'] = HarvestSettings::get('app_name', 'Harvest');\n $this->vars['app_url'] = Request::url();\n }",
"function cl_iptuconstr() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"iptuconstr\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_itinerarioescolaproc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"itinerarioescolaproc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_sau_prochabilitacao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_prochabilitacao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $file;\n global $teg;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n\n\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n\n}",
"public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n }",
"public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName() . '[]';\n\n $this->vars['model'] = $this->model;\n $this->vars['subscribers'] = Subscriber::all()->lists('count', 'id');\n if (!empty($this->getLoadValue())) {\n $this->vars['value'] = $this->getLoadValue();\n } else {\n $this->vars['value'] = [];\n }\n\n }",
"function asignar_valores(){\n $this->nombre=$_POST['nombre'];\n $this->prioridad=$_POST['prioridad'];\n $this->etiqueta=$_POST['etiqueta'];\n $this->descripcion=$_POST['descripcion'];\n $this->claves=$_POST['claves'];\n $this->tipo=$_POST['tipo'];\n }",
"function cl_empreendimento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empreendimento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function __construct(){\n $this->signal= new Commentaire();\n $this->commsign= new Commentaire();\n $this->billet= new ControleurBillet();\n \n }",
"protected function init() {\n switch ($this->requestType) {\n case 'get':\n $this->getData();\n break;\n\t\t\t\t\n\t\t\tcase 'sendTesteEmail':\n $this->sendTesteEmail();\n break;\n\t\t\t\t\n\t\t\tcase 'sendCreatedIndicationEmail':\n $this->sendCreatedIndicationEmail();\n break;\n }\n }",
"function storeParameters()\n {\n }",
"function __construct()\r\n\t{\r\n\t\t$this->conexion=new Conect();\r\n\t\t$this->fun=new functions();\r\n\t}",
"private function setup_variables() {\n\t\t$this->file = __FILE__;\n\t\t$this->basename = plugin_basename( $this->file );\n\t\t$this->plugin_dir = plugin_dir_path( $this->file );\n\t\t$this->plugin_url = plugin_dir_url( $this->file );\n\t\t$this->cron_frequency = 'twicedaily';\n\t}",
"function __construct(){\n $this->informacion = new Info();\n $this->firebase = new FirebaseController();\n $this->storage = new StorageController();\n }",
"function asignar_valores2(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->telefono=$_POST['telefono'];\n\t\t$this->email=$_POST['email'];\n\t\t\n\t\t$this->marca=$_POST['marca'];\n\t\t$this->modelo=$_POST['modelo'];\n\t\t$this->ano=$_POST['ano'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t}",
"function __construct()\n {\n $this->view = new View();\n $this->model = new si_cf_parametroModel();\n }",
"public function __construct(){\n$this->acCodigo_area = \"\";\n$this->acCodificacion = \"\";\n$this->acUbicacion = \"\";\n}",
"public function __construct()\n {\n if(isset($_GET['correo'])){$this->Correo=$_GET['correo'];}\n if(isset($_GET['pregunta'])){$this->Pregunta=$_GET['pregunta'];}\n if(isset($_GET['respuesta'])){$this->Respuesta=$_GET['respuesta'];}\n }",
"public function __construct()\n {\n $this->view = new \\stdClass();\n $this->auth = new AuthUser();\n\n // Variável que recebe as configurações padrões da aplicação\n $this->config = self::findDataSettings();\n\n // Inicializando flash mensagem da aplicação\n\n // Mensagem padrão para operações de sucesso\n if (Session::getSession('success')) {\n $this->success = Session::getSession('success');\n Session::destroySession('success');\n }//end if\n // Mensagem padrão para operações de erros\n if (Session::getSession('errors')) {\n $this->errors = Session::getSession('errors');\n Session::destroySession('errors');\n }//end if\n // Mensagem padrão para operações de info\n if (Session::getSession('info')) {\n $this->info = Session::getSession('info');\n Session::destroySession('info');\n }//end if\n // Captura padrão de dados inseridos nos campos dos formulários\n if (Session::getSession('inputs')) {\n $this->inputs = Session::getSession('inputs');\n Session::destroySession('inputs');\n }//endif\n }",
"function getParams() {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id=$id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode=$mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode=$view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode=$edit_mode;\r\n }\r\n if (isset($tab)) {\r\n $this->tab=$tab;\r\n }\r\n}",
"function getParams() {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id=$id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode=$mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode=$view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode=$edit_mode;\r\n }\r\n if (isset($tab)) {\r\n $this->tab=$tab;\r\n }\r\n}",
"function cl_empage() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empage\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_disbancoprocesso() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"disbancoprocesso\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"private function mprofil() {\n\t\t\t$this->_ctrlAdmin = new ControleurAdmin();\n\t\t\t$this->_ctrlAdmin->userProfil();\n\t}",
"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}",
"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 }",
"public function pesquisarParteInteressadaAction()\n {\n }",
"public function AggiornaPrezzi(){\n\t}",
"public function asignarNombre($nombre){\n$this->nombre = self::mensaje().$nombre;\n}",
"function __construct()\n {\n //domain/controller/action/param\n $breakArr = $this->XuLyURL();\n //Array ( [0] => controller [1] => action [2] => param1 [3] => param2)\n\n \n //Xu ly controller, kiem tra form co ton tai hay khong moi require\n if(file_exists(\"./mvc/controllers/\".$breakArr[0].\".php\")){\n $this->controller = $breakArr[0];\n unset($breakArr[0]);//sau khi da lay dc controller thi huy mang di -> tao param\n }\n require_once \"./mvc/controllers/\".$this->controller.\".php\";\n //sau khi đã tạo connect controller và extends, khởi tạo đối tượng controller là controller hiện tại\n $this->controller = new $this->controller;\n \n //Xu ly action, kiem tra array[1]-action cua class controller\n if(isset($breakArr[1])){\n //kiem tra ham ton tai, tham so la object or class(controller) va function(action)\n //kiem tra tra ve boolean\n if(method_exists($this->controller, $breakArr[1])){\n $this->action = $breakArr[1];\n\n }\n //bo ra ngoai dieu kien kiem tra ton tai, neu truong hop action khong ton tai action khong duoc thay the nen khong unset dc\n unset($breakArr[1]);//sau khi da lay dc controller thi huy mang di -> tao param\n }\n\n\n //Xu ly param\n //goi param, (? = neu) mang ton tai thi param = array values(mang)\n // (: = nguoc lai thi) param rong~\n $this->param = $breakArr?array_values($breakArr):[];\n call_user_func_array([$this->controller,$this->action], $this->param);\n }",
"function __construct(&$vars) {\r\n }",
"public function __init(){}",
"public function __construct()\n {\n $this->model= new Estudiante;\n $this->curso= new Curso;\n $this->usuario= new Usuario;\n $this->centrointeres= new Centrointeres;\n $this->clase= new Clase;\n $this->grado = new Grado;\n $this->asistencia= new Asistencia;\n }",
"public function __construct(){\n\t\t\t$this->productoDetalleModelo = new productoDetalleModelo;\n\t\t\t$this->productoFavoritoControlador = new productoFavoritoControlador();\n\t\t\t$this->productoEstrellaControlador = new productoEstrellaControlador();\n\t\t\t$this->productoCarritoControlador = new productoCarritoControlador();\n\t\t}",
"function cl_moblevantamentoedi() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"moblevantamentoedi\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function __construct(){\n \n$this->messages = new Messages();\n$this->form = new CalcCredForm();\n$this->result = new CalcCredResult();\n}",
"public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n\n $this->vars['model'] = $this->model;\n $this->vars['category'] = Kategory::where(\"is_active\", \"1\")->lists('name', 'id');\n if (!empty($this->getLoadValue())) {\n $a= $this->vars['value'] = $this->getLoadValue();\n } else {\n $a= $this->vars['value'] = [];\n }\n }",
"public function finish_setting_parameters()\n {\n $this->set_variable( 'parameters', $this->parameters );\n }",
"function __construct() {\n $this->conx = Connexion::getconnexion();\n }",
"public function __construct()\n {\n // $this->invoice = $invoice;\n // $this->quiz = $quiz;\n }",
"public function __construct() {\n $this->miConexion = Conexion::singleton();\n $this->retorno = new stdClass();\n }",
"function __construct() {\n \n self::setQuantumVars();\n \n self::setAutoLoader();\n \n self::initActiveRecord();\n \n self::initSmarty();\n \n self::launcher();\n \n self::output();\n \n }",
"public function __construct(){\r\n \r\n$this->messages = new Messages();\r\n$this->form = new CalcCredForm();\r\n$this->result = new CalcCredResult();\r\n}",
"function main()\t{\n\t\t$obj_new_film= new film_service();\n\t\t$obj_new_film->save_film();\n\n\t\t$this->resultat= $obj_new_film->resultat;\n\t}",
"protected function __construct(){\n\t\t$this->inputs();\n\t}",
"public function obtener()\n {\n }",
"function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->telefono=$_POST['telefono'];\n\t\t$this->email=$_POST['email'];\n\t\t\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->ano=$_POST['ano'];\n\t\t$this->valor_vehiculo=$_POST['valor_vehiculo'];\n\t\t$this->saldo=$_POST['saldo'];\n\t\t$this->valor_inicial=$_POST['valor_inicial'];\n\t\t$this->comision=$_POST['comision'];\n\t\t$this->plazo=$_POST['plazo'];\n\t\t$this->cuotas=$_POST['cuotas'];\n\t\t$this->total=$_POST['total'];\n\t}",
"public function getSetVariables() {}",
"public function prepareVars()\n {\n $this->vars['defaultCurrency'] = $this->defaultCurrency;\n $this->vars['defaultValue'] = $this->getPriceValue($this->defaultCurrency->id);\n $this->vars['currencies'] = Currency::orderBy('sort_order', 'ASC')->get();\n $this->vars['field'] = $this->formField;\n }",
"public function __construct() {\n\n\t\t$this->contenuto=array();\n\t\t$this->quantita=array();\n }",
"public function __construct() {\r\n $this->template = new Template();\r\n $this->settingsModel = new settingsModel();\r\n $this->dbUtil = new DBUtil();\r\n $this->combovalue = $this->settingsModel->populatetypeValues();\r\n $this->logger = Logger::getLogger(\"========= Metadata Controller =========== \");\r\n }",
"function cl_db_projetoscliente() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"db_projetoscliente\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function recuperarDatos(){\r\n\t\t\t\t$this->objFunc=$this->create('MODEmpresa');\r\n\t\t\t\t$objetoFuncion = $this->create('MODEmpresa');\r\n\t\t\t\t$this->res=$this->objFunc->insertarEmpresa($this->objParam);\t//esta bien\t\t\t\r\n\t\t\t\t$this->res->imprimirRespuesta($this->res->generarJson());\r\n\t\t}",
"public function __construct(public string $nombre, public int $precio, public bool $disponible){}",
"function __construct() { \r\n\t\t\t\t$this->id;\r\n\t\t\t\t$this->cpf;\r\n\t\t\t\t$this->email;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}",
"public function setUpDefaultVars() {\n $this->response['numAttempts'] = new qti_variable('single', 'integer', array('value' => 0));\n $this->response['duration'] = new qti_variable('single', 'float', array('value' => 0));\n $this->outcome['completionStatus'] = new qti_variable('single', 'identifier', array('value' => 'not_attempted'));\n \n // TODO: We have this to get around mistakes (?) in the example QTI - should we?\n $this->outcome['completion_status'] = $this->outcome['completionStatus'];\n }",
"public function __construct() {\n $this->servidor = null;\n $this->dbname = null;\n $this->usuario = null;\n $this->senha = null;\n $this->porta = null;\n }",
"function init()\r\n\t{\r\n\t\t$projet = unserialize($_SESSION['session']->projet);\r\n\t\t$this->view->nom_complet = $projet->nom_complet;\r\n\t\t$this->view->desc_projet = $projet->description_projet;\r\n\t\t$this->view->employe = unserialize($_SESSION['session']->account)->account_lid;\r\n\t}",
"public function __construct($medicion, $nombreIOT, $nombreVariable, $resultado,$asunto,$medicion2)\n {\n $this->medicion = $medicion;\n $this->nombreIOT = $nombreIOT;\n $this->nombreVariable = $nombreVariable;\n $this->resultado = $resultado;\n $this->asunto = $asunto;\n $this->medicion2 = $medicion2; \n }",
"public function __construct() {\n \t\n\t \tinclude('../conexion/datos.php');\n \n\t $this->id_modulo = 14;\n\t $this->NameCookieApp = $NomCookiesApp;\n\t //$this->permisosInst = new permisosController();\n\t }",
"function cl_evolucaodividaativa() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"evolucaodividaativa\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"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}",
"public function _construct(){\n\t\t$this->marque = 'Peugeot';\n\t\t$this->couleur = 'blanc';\n\t\t$this->vitesse = 50;\n\t}",
"function __construct ($concesionario){\r\n $this->ciudad=$ciudad;\r\n $this->vehiculos=$vehiculos;\r\n }",
"function __construct()\n\t{\n\t\t// $this->cust_code = $cust_code;\n\t\t// $this->fecha_interaccion = $fecha_interaccion;\n\t\t// $this->tipo_interaccion = $tipo_interaccion;\n\t\t// $this->time_stamp = $time_stamp;\n }",
"public function saveParams()\r\n\t{\r\n\t\tforeach ($this->param_names as $param_name)\r\n\t\t{\r\n\t\t\t$funcname = 'get'.$param_name;\r\n\t\t\tif (_PS_VERSION_ < '1.5')\r\n\t\t\t\tConfiguration::updateValue('CERTISSIM_'.Tools::strtoupper($param_name), $this->$funcname());\r\n\t\t\telse\r\n\t\t\t\tConfiguration::updateValue('CERTISSIM_'.Tools::strtoupper($param_name), $this->$funcname(), false, null, $this->getIdshop());\r\n\t\t}\r\n\t}",
"public function getParameters()\n\t{\n\n\t}",
"public function getParameters()\n\t{\n\n\t}",
"function __construct(){\n $this->toko = new M_Toko();\n $this->produk = new M_Produk(); //variabel model merupakan objek baru yang dibuat dari class model\n }"
] | [
"0.63404673",
"0.62689656",
"0.6236188",
"0.61963254",
"0.61485535",
"0.60632485",
"0.60158503",
"0.60088146",
"0.6008106",
"0.5993651",
"0.59636974",
"0.59630775",
"0.59587324",
"0.59502906",
"0.59502906",
"0.59502906",
"0.59502906",
"0.59410065",
"0.593854",
"0.5930859",
"0.590138",
"0.58856785",
"0.5883177",
"0.58812994",
"0.5867934",
"0.5867877",
"0.58559716",
"0.583575",
"0.58244836",
"0.58231807",
"0.581699",
"0.5814115",
"0.5812596",
"0.5812596",
"0.5812596",
"0.5812179",
"0.5796412",
"0.5780083",
"0.5779499",
"0.57692444",
"0.57679725",
"0.5767003",
"0.57495755",
"0.57394254",
"0.57392806",
"0.5738882",
"0.57209826",
"0.5720265",
"0.5718427",
"0.5714825",
"0.57146865",
"0.5706718",
"0.5706718",
"0.5700463",
"0.5682073",
"0.56788486",
"0.5677987",
"0.56772095",
"0.56716603",
"0.5670653",
"0.5667173",
"0.5658329",
"0.56522983",
"0.56518555",
"0.5651842",
"0.56484693",
"0.56426424",
"0.5642384",
"0.56406534",
"0.56386024",
"0.5633378",
"0.5626826",
"0.5615835",
"0.5615255",
"0.5608968",
"0.5603878",
"0.55994713",
"0.55938125",
"0.55907637",
"0.5580783",
"0.55779076",
"0.5575298",
"0.5568217",
"0.5556989",
"0.55550486",
"0.55497617",
"0.55473894",
"0.554657",
"0.55455023",
"0.5543096",
"0.55424446",
"0.55402833",
"0.5539553",
"0.5536106",
"0.553254",
"0.552902",
"0.5523647",
"0.55228925",
"0.55212176",
"0.55212176",
"0.55171514"
] | 0.0 | -1 |
Definicion de variables para ejecucion del procedimiento | function eliminarAnalisisPorqueDet(){
$this->procedimiento='gem.ft_analisis_porque_det_ime';
$this->transaccion='GM_DET_ELI';
$this->tipo_procedimiento='IME';
//Define los parametros para la funcion
$this->setParametro('id_analisis_porque_det','id_analisis_porque_det','int4');
//Ejecuta la instruccion
$this->armarConsulta();
$this->ejecutarConsulta();
//Devuelve la respuesta
return $this->respuesta;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setVariablesEntrada()\r\n\t{\r\n\t\t$request = $this->requestStack->getCurrentRequest();\r\n\t\t\r\n\t\t$this->tipo = $request->get('tipo');\r\n\t\t$this->apoyoTapas = $request->get('apoyoTapas');\r\n\t\t$this->prof = $request->get('prof');\r\n\t\t$this->anchoPanel = $request->get('ancho');\r\n\t\t$this->pisosManual = $request->get('pisosManual');\r\n\t\t$this->perfilIntermedio = $request->get('perfilIntermedio');\r\n\t\t$this->pisosManual7 = $request->get('pisosManual7');\t\t\r\n\t\t$this->chapaPisoAdicional = $request->get('chapaPiso');\r\n\t\t$this->cantChapaPisoAdicional = $request->get('cantAdicional');\r\n\t\t$this->maxAlt = $request->get('maxAlt');\r\n\t\t$this->cantPaneles = $request->get('cantPaneles');\r\n\t\t$this->abiertoCerrado = $request->get('aletaTipo');\r\n\t\t$this->aletaVenA = $request->get('aletaVenA');\r\n\t\t$this->aletaFluA = $request->get('aletaFluA');\r\n\t\t\r\n\t\treturn $this;\r\n\t}",
"private function setQuantumVars() {\n \n if (!empty($_REQUEST['controller'])) {\n \n $this->controller = $_REQUEST['controller'];\n \n };\n \n if (!empty($_REQUEST['task'])) {\n \n $this->task = $_REQUEST['task'];\n \n }\n \n if (!empty($_REQUEST['object_id'])) {\n \n $this->object_id = $_REQUEST['object_id'];\n \n }\n \n \n }",
"function cl_parametroprogressaoparcial() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"parametroprogressaoparcial\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function setVariables()\n \t{\t\n \t\tif (isset($this->params->plugin)) {\n \t\t\t$this->setPlPath(App::pluginPath(Inflector::humanize($this->params->plugin)));\n \t\t}\n \t\t$this->setController($this->params->controller);\n \t\t$this->setAction($this->params->action);\n \t\t$this->setConstant(Configure::read('App'));\n \t\t\n \t}",
"public function main(){\n\t\t\n\t\tif (isset($_REQUEST[\"do\"])){\n\t\t\t$do = $_REQUEST[\"do\"];\n\t\t\tif(Seguridad::getId() == null && $do != \"processFormLogin\" && $do != \"insertUser\" && $do != \"processInsertUser\"){\n\t\t\t\t$do = \"formLogin\";\n\t\t\t}\n\t\t} else\n\t\t\t$do = \"formLogin\";\n\t\t$this->$do(); //Ejecuta el metodo con el nombre que contiene la variable en ese momento\n\t}",
"private function input(){\n $this->params['controller_name'] = $this->ask('Controller name');\n $this->params['crud_url'] = $this->ask('CRUD url');\n $this->params['model_name'] = $this->ask('Model name');\n $this->params['table_name'] = $this->ask('Table name');\n $this->params['author'] = env('PACKAGE_AUTHOR');\n }",
"private function load_variables() : void {\n\t\t$this->today = new \\DateTime( 'NOW' );\n\t\t$this->start_date = new \\DateTime( FTW_START_DATE );\n\t\t$this->completion_date = new \\DateTime( FTW_COMPLETION_DATE );\n\t}",
"protected function initVars() {\n\n\t\t}",
"protected function variablesAssign()\n {\n $app = $this->app;\n $this->request = $app['request'];\n $this->session = $app['session'];\n $this->template = $app['template'];\n $this->theme = $app['theme'];\n\n // Set Request Format\n switch ($this->request->getRequestFormat()) {\n case 'json':\n $this->format = 'json';\n break;\n\n case 'xml':\n $this->format = 'xml';\n break;\n\n case 'csv':\n $this->format = 'csv';\n break;\n\n case 'html':\n default:\n $this->format = 'html';\n break;\n }\n }",
"function getParams()\n {\n global $id;\n global $mode;\n global $data_source;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($data_source)) {\n $this->data_source = $data_source;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }",
"function asignar_valores(){\n\t\t$this->tabla=$_POST['tabla'];\n\t\t$this->pertenece=$_POST['pertenece'];\n\t\t$this->asunto=$_POST['asunto'];\n\t\t$this->descripcion=$_POST['contenido'];\n\t\t$this->fecha=$_POST['fecha'];\n\t\t$this->hora=$_POST['hora'];\n\t\t$this->fechamod=$_POST['fechamod'];\n\t}",
"public function run()\n {\n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"1\",\n 'variable_etiqueta' => \"Activo\",\n ]);\n\n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"2\",\n 'variable_etiqueta' => \"Inactivo\",\n ]);\n\n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"3\",\n 'variable_etiqueta' => \"Expirado\",\n ]);\n \n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"4\",\n 'variable_etiqueta' => \"Eliminado\",\n ]);\n\n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"5\",\n 'variable_etiqueta' => \"Bloqueado\",\n ]);\n }",
"protected function setAcoVariables() {\n\n $this->set('plugin',\n isset($this->params['named']['plugin']) ? $this->params['named']['plugin'] : '');\n $this->set('controller_name', $this->params['named']['controller']);\n $this->set('action', $this->params['named']['action']);\n }",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"public function setPrenom($prenom){\n if(empty($prenom)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n\n\n //on declare de la variable prenom puis on appelle la varibale prive prenom\n $this->_prenom = $prenom;\n }\n\n public function setMail($mail){\n //Si mail est vide on fait\n if(empty($mail)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n\n }\n //on declare de la variable mail puis on appelle la varibale prive mail\n $this->_mail = $mail;\n }\n\n public function setAdresse($adresse){\n //Si adresse est vide on fait\n if(empty($adresse)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n }\n //on declare de la variable adresse puis on appelle la varibale prive adresse\n $this->_adresse = $adresse;\n }\n\n public function setNumero($numero){\n //Si numero est vide on fait\n if(empty($numero)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n\n }\n //on declare de la variable numero puis on appelle la varibale prive numero\n $this->_numero = $numero;\n }\n\n public function setMot_de_passe($mdp){\n //Si mdp est vide on fait\n if(empty($mdp)){\n header(\"Location:../vu/formulaire_inscription.php\");\n return;\n }\n //on declare de la varaible mdp puis on appelle la varibale prive mdp\n $this->_mdp = $mdp;\n }\n\n public function getNom(){return $this->_nom;} // on retourne nom\n public function getPrenom(){return $this->_prenom;} // on retourne prenom\n public function getMail(){return $this->_mail;} // on retourne mail\n public function getAdresse(){return $this->_adresse;} // on retourne adresse\n public function getNumero(){return $this->_numero;} // on retourne numero\n public function getMot_de_passe(){return $this->_mdp;} // on retourne mdp\n\n}",
"public function __construct() { \n require __DIR__ . '/Config/parameters.php'; //⚠️️ DIR = cste magiq qui retourne chemin du doss ds lequel on est depuis la racine\n $this -> parameters = $parameters; // je mets ça ds ' protected $parameters; '\n /*⚠️️ Au moment où j'instancie cette classe, je récupère le fichier parameters.php, \n et je stocke tous les parameters de mon application dans la propriété $parameters */\n }",
"function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->etiqueta=$_POST['etiqueta'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t\t$this->claves=$_POST['claves'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->icono=$_POST['icono'];\n\t}",
"function asignar_valores(){\n\t\t//$this->ciudad=$_SESSION['ciudad_admin'];\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->cantidad=$_POST['cantidad'];\n\t\t$this->cedula=$_POST['cedula'];\n\t\t$this->correo=$_POST['correo'];\n\t}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n\n\n\n}",
"function getParams()\n {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }",
"function envios_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"envios\";\n\t\t$this->campoClave=\"IdEnvio\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"IdEnvio\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(2,$this->tabla,\"IdMail\",2);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Envio\",3);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Descripcion\",4);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"TablaDatosExtras\",5);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"CondicionDatosExtras\",6);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"FechaCreacion\",7);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"FechaModificacion\",8);\n$this->agregarVariable2($v);\n\n\t}",
"function 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}",
"function cl_procprocessodoc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"procprocessodoc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function __construct(){\n $this->pegaProjetos();\n }",
"function getParams() {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $data_source;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id=$id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode=$mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode=$view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode=$edit_mode;\r\n }\r\n if (isset($data_source)) {\r\n $this->data_source=$data_source;\r\n }\r\n if (isset($tab)) {\r\n $this->tab=$tab;\r\n }\r\n}",
"public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n\n $path = explode('\\\\', get_class($this->model));\n\n $this->vars['task_id'] = array_pop($path) . '-' . $this->model->{$this->taskKey};\n $this->vars['task_name'] = $this->model->{$this->taskName};\n\n $this->vars['app_name'] = HarvestSettings::get('app_name', 'Harvest');\n $this->vars['app_url'] = Request::url();\n }",
"function cl_iptuconstr() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"iptuconstr\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_itinerarioescolaproc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"itinerarioescolaproc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_sau_prochabilitacao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_prochabilitacao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $file;\n global $teg;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n\n\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n\n}",
"public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n }",
"public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName() . '[]';\n\n $this->vars['model'] = $this->model;\n $this->vars['subscribers'] = Subscriber::all()->lists('count', 'id');\n if (!empty($this->getLoadValue())) {\n $this->vars['value'] = $this->getLoadValue();\n } else {\n $this->vars['value'] = [];\n }\n\n }",
"function asignar_valores(){\n $this->nombre=$_POST['nombre'];\n $this->prioridad=$_POST['prioridad'];\n $this->etiqueta=$_POST['etiqueta'];\n $this->descripcion=$_POST['descripcion'];\n $this->claves=$_POST['claves'];\n $this->tipo=$_POST['tipo'];\n }",
"function cl_empreendimento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empreendimento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function __construct(){\n $this->signal= new Commentaire();\n $this->commsign= new Commentaire();\n $this->billet= new ControleurBillet();\n \n }",
"protected function init() {\n switch ($this->requestType) {\n case 'get':\n $this->getData();\n break;\n\t\t\t\t\n\t\t\tcase 'sendTesteEmail':\n $this->sendTesteEmail();\n break;\n\t\t\t\t\n\t\t\tcase 'sendCreatedIndicationEmail':\n $this->sendCreatedIndicationEmail();\n break;\n }\n }",
"function storeParameters()\n {\n }",
"function __construct()\r\n\t{\r\n\t\t$this->conexion=new Conect();\r\n\t\t$this->fun=new functions();\r\n\t}",
"private function setup_variables() {\n\t\t$this->file = __FILE__;\n\t\t$this->basename = plugin_basename( $this->file );\n\t\t$this->plugin_dir = plugin_dir_path( $this->file );\n\t\t$this->plugin_url = plugin_dir_url( $this->file );\n\t\t$this->cron_frequency = 'twicedaily';\n\t}",
"function __construct(){\n $this->informacion = new Info();\n $this->firebase = new FirebaseController();\n $this->storage = new StorageController();\n }",
"function asignar_valores2(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->telefono=$_POST['telefono'];\n\t\t$this->email=$_POST['email'];\n\t\t\n\t\t$this->marca=$_POST['marca'];\n\t\t$this->modelo=$_POST['modelo'];\n\t\t$this->ano=$_POST['ano'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t}",
"function __construct()\n {\n $this->view = new View();\n $this->model = new si_cf_parametroModel();\n }",
"public function __construct(){\n$this->acCodigo_area = \"\";\n$this->acCodificacion = \"\";\n$this->acUbicacion = \"\";\n}",
"public function __construct()\n {\n if(isset($_GET['correo'])){$this->Correo=$_GET['correo'];}\n if(isset($_GET['pregunta'])){$this->Pregunta=$_GET['pregunta'];}\n if(isset($_GET['respuesta'])){$this->Respuesta=$_GET['respuesta'];}\n }",
"public function __construct()\n {\n $this->view = new \\stdClass();\n $this->auth = new AuthUser();\n\n // Variável que recebe as configurações padrões da aplicação\n $this->config = self::findDataSettings();\n\n // Inicializando flash mensagem da aplicação\n\n // Mensagem padrão para operações de sucesso\n if (Session::getSession('success')) {\n $this->success = Session::getSession('success');\n Session::destroySession('success');\n }//end if\n // Mensagem padrão para operações de erros\n if (Session::getSession('errors')) {\n $this->errors = Session::getSession('errors');\n Session::destroySession('errors');\n }//end if\n // Mensagem padrão para operações de info\n if (Session::getSession('info')) {\n $this->info = Session::getSession('info');\n Session::destroySession('info');\n }//end if\n // Captura padrão de dados inseridos nos campos dos formulários\n if (Session::getSession('inputs')) {\n $this->inputs = Session::getSession('inputs');\n Session::destroySession('inputs');\n }//endif\n }",
"function getParams() {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id=$id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode=$mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode=$view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode=$edit_mode;\r\n }\r\n if (isset($tab)) {\r\n $this->tab=$tab;\r\n }\r\n}",
"function getParams() {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id=$id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode=$mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode=$view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode=$edit_mode;\r\n }\r\n if (isset($tab)) {\r\n $this->tab=$tab;\r\n }\r\n}",
"function cl_empage() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empage\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_disbancoprocesso() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"disbancoprocesso\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"private function mprofil() {\n\t\t\t$this->_ctrlAdmin = new ControleurAdmin();\n\t\t\t$this->_ctrlAdmin->userProfil();\n\t}",
"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}",
"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 }",
"public function pesquisarParteInteressadaAction()\n {\n }",
"public function AggiornaPrezzi(){\n\t}",
"public function asignarNombre($nombre){\n$this->nombre = self::mensaje().$nombre;\n}",
"function __construct()\n {\n //domain/controller/action/param\n $breakArr = $this->XuLyURL();\n //Array ( [0] => controller [1] => action [2] => param1 [3] => param2)\n\n \n //Xu ly controller, kiem tra form co ton tai hay khong moi require\n if(file_exists(\"./mvc/controllers/\".$breakArr[0].\".php\")){\n $this->controller = $breakArr[0];\n unset($breakArr[0]);//sau khi da lay dc controller thi huy mang di -> tao param\n }\n require_once \"./mvc/controllers/\".$this->controller.\".php\";\n //sau khi đã tạo connect controller và extends, khởi tạo đối tượng controller là controller hiện tại\n $this->controller = new $this->controller;\n \n //Xu ly action, kiem tra array[1]-action cua class controller\n if(isset($breakArr[1])){\n //kiem tra ham ton tai, tham so la object or class(controller) va function(action)\n //kiem tra tra ve boolean\n if(method_exists($this->controller, $breakArr[1])){\n $this->action = $breakArr[1];\n\n }\n //bo ra ngoai dieu kien kiem tra ton tai, neu truong hop action khong ton tai action khong duoc thay the nen khong unset dc\n unset($breakArr[1]);//sau khi da lay dc controller thi huy mang di -> tao param\n }\n\n\n //Xu ly param\n //goi param, (? = neu) mang ton tai thi param = array values(mang)\n // (: = nguoc lai thi) param rong~\n $this->param = $breakArr?array_values($breakArr):[];\n call_user_func_array([$this->controller,$this->action], $this->param);\n }",
"function __construct(&$vars) {\r\n }",
"public function __init(){}",
"public function __construct()\n {\n $this->model= new Estudiante;\n $this->curso= new Curso;\n $this->usuario= new Usuario;\n $this->centrointeres= new Centrointeres;\n $this->clase= new Clase;\n $this->grado = new Grado;\n $this->asistencia= new Asistencia;\n }",
"public function __construct(){\n\t\t\t$this->productoDetalleModelo = new productoDetalleModelo;\n\t\t\t$this->productoFavoritoControlador = new productoFavoritoControlador();\n\t\t\t$this->productoEstrellaControlador = new productoEstrellaControlador();\n\t\t\t$this->productoCarritoControlador = new productoCarritoControlador();\n\t\t}",
"function cl_moblevantamentoedi() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"moblevantamentoedi\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function __construct(){\n \n$this->messages = new Messages();\n$this->form = new CalcCredForm();\n$this->result = new CalcCredResult();\n}",
"public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n\n $this->vars['model'] = $this->model;\n $this->vars['category'] = Kategory::where(\"is_active\", \"1\")->lists('name', 'id');\n if (!empty($this->getLoadValue())) {\n $a= $this->vars['value'] = $this->getLoadValue();\n } else {\n $a= $this->vars['value'] = [];\n }\n }",
"public function finish_setting_parameters()\n {\n $this->set_variable( 'parameters', $this->parameters );\n }",
"function __construct() {\n $this->conx = Connexion::getconnexion();\n }",
"public function __construct()\n {\n // $this->invoice = $invoice;\n // $this->quiz = $quiz;\n }",
"public function __construct() {\n $this->miConexion = Conexion::singleton();\n $this->retorno = new stdClass();\n }",
"function __construct() {\n \n self::setQuantumVars();\n \n self::setAutoLoader();\n \n self::initActiveRecord();\n \n self::initSmarty();\n \n self::launcher();\n \n self::output();\n \n }",
"public function __construct(){\r\n \r\n$this->messages = new Messages();\r\n$this->form = new CalcCredForm();\r\n$this->result = new CalcCredResult();\r\n}",
"function main()\t{\n\t\t$obj_new_film= new film_service();\n\t\t$obj_new_film->save_film();\n\n\t\t$this->resultat= $obj_new_film->resultat;\n\t}",
"protected function __construct(){\n\t\t$this->inputs();\n\t}",
"public function obtener()\n {\n }",
"function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->telefono=$_POST['telefono'];\n\t\t$this->email=$_POST['email'];\n\t\t\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->ano=$_POST['ano'];\n\t\t$this->valor_vehiculo=$_POST['valor_vehiculo'];\n\t\t$this->saldo=$_POST['saldo'];\n\t\t$this->valor_inicial=$_POST['valor_inicial'];\n\t\t$this->comision=$_POST['comision'];\n\t\t$this->plazo=$_POST['plazo'];\n\t\t$this->cuotas=$_POST['cuotas'];\n\t\t$this->total=$_POST['total'];\n\t}",
"public function getSetVariables() {}",
"public function prepareVars()\n {\n $this->vars['defaultCurrency'] = $this->defaultCurrency;\n $this->vars['defaultValue'] = $this->getPriceValue($this->defaultCurrency->id);\n $this->vars['currencies'] = Currency::orderBy('sort_order', 'ASC')->get();\n $this->vars['field'] = $this->formField;\n }",
"public function __construct() {\n\n\t\t$this->contenuto=array();\n\t\t$this->quantita=array();\n }",
"public function __construct() {\r\n $this->template = new Template();\r\n $this->settingsModel = new settingsModel();\r\n $this->dbUtil = new DBUtil();\r\n $this->combovalue = $this->settingsModel->populatetypeValues();\r\n $this->logger = Logger::getLogger(\"========= Metadata Controller =========== \");\r\n }",
"function cl_db_projetoscliente() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"db_projetoscliente\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function recuperarDatos(){\r\n\t\t\t\t$this->objFunc=$this->create('MODEmpresa');\r\n\t\t\t\t$objetoFuncion = $this->create('MODEmpresa');\r\n\t\t\t\t$this->res=$this->objFunc->insertarEmpresa($this->objParam);\t//esta bien\t\t\t\r\n\t\t\t\t$this->res->imprimirRespuesta($this->res->generarJson());\r\n\t\t}",
"public function __construct(public string $nombre, public int $precio, public bool $disponible){}",
"function __construct() { \r\n\t\t\t\t$this->id;\r\n\t\t\t\t$this->cpf;\r\n\t\t\t\t$this->email;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}",
"public function setUpDefaultVars() {\n $this->response['numAttempts'] = new qti_variable('single', 'integer', array('value' => 0));\n $this->response['duration'] = new qti_variable('single', 'float', array('value' => 0));\n $this->outcome['completionStatus'] = new qti_variable('single', 'identifier', array('value' => 'not_attempted'));\n \n // TODO: We have this to get around mistakes (?) in the example QTI - should we?\n $this->outcome['completion_status'] = $this->outcome['completionStatus'];\n }",
"public function __construct() {\n $this->servidor = null;\n $this->dbname = null;\n $this->usuario = null;\n $this->senha = null;\n $this->porta = null;\n }",
"function init()\r\n\t{\r\n\t\t$projet = unserialize($_SESSION['session']->projet);\r\n\t\t$this->view->nom_complet = $projet->nom_complet;\r\n\t\t$this->view->desc_projet = $projet->description_projet;\r\n\t\t$this->view->employe = unserialize($_SESSION['session']->account)->account_lid;\r\n\t}",
"public function __construct($medicion, $nombreIOT, $nombreVariable, $resultado,$asunto,$medicion2)\n {\n $this->medicion = $medicion;\n $this->nombreIOT = $nombreIOT;\n $this->nombreVariable = $nombreVariable;\n $this->resultado = $resultado;\n $this->asunto = $asunto;\n $this->medicion2 = $medicion2; \n }",
"public function __construct() {\n \t\n\t \tinclude('../conexion/datos.php');\n \n\t $this->id_modulo = 14;\n\t $this->NameCookieApp = $NomCookiesApp;\n\t //$this->permisosInst = new permisosController();\n\t }",
"function cl_evolucaodividaativa() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"evolucaodividaativa\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"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}",
"public function _construct(){\n\t\t$this->marque = 'Peugeot';\n\t\t$this->couleur = 'blanc';\n\t\t$this->vitesse = 50;\n\t}",
"function __construct ($concesionario){\r\n $this->ciudad=$ciudad;\r\n $this->vehiculos=$vehiculos;\r\n }",
"function __construct()\n\t{\n\t\t// $this->cust_code = $cust_code;\n\t\t// $this->fecha_interaccion = $fecha_interaccion;\n\t\t// $this->tipo_interaccion = $tipo_interaccion;\n\t\t// $this->time_stamp = $time_stamp;\n }",
"public function saveParams()\r\n\t{\r\n\t\tforeach ($this->param_names as $param_name)\r\n\t\t{\r\n\t\t\t$funcname = 'get'.$param_name;\r\n\t\t\tif (_PS_VERSION_ < '1.5')\r\n\t\t\t\tConfiguration::updateValue('CERTISSIM_'.Tools::strtoupper($param_name), $this->$funcname());\r\n\t\t\telse\r\n\t\t\t\tConfiguration::updateValue('CERTISSIM_'.Tools::strtoupper($param_name), $this->$funcname(), false, null, $this->getIdshop());\r\n\t\t}\r\n\t}",
"public function getParameters()\n\t{\n\n\t}",
"public function getParameters()\n\t{\n\n\t}",
"function __construct(){\n $this->toko = new M_Toko();\n $this->produk = new M_Produk(); //variabel model merupakan objek baru yang dibuat dari class model\n }"
] | [
"0.63404673",
"0.62689656",
"0.6236188",
"0.61963254",
"0.61485535",
"0.60632485",
"0.60158503",
"0.60088146",
"0.6008106",
"0.5993651",
"0.59636974",
"0.59630775",
"0.59587324",
"0.59502906",
"0.59502906",
"0.59502906",
"0.59502906",
"0.59410065",
"0.593854",
"0.5930859",
"0.590138",
"0.58856785",
"0.5883177",
"0.58812994",
"0.5867934",
"0.5867877",
"0.58559716",
"0.583575",
"0.58244836",
"0.58231807",
"0.581699",
"0.5814115",
"0.5812596",
"0.5812596",
"0.5812596",
"0.5812179",
"0.5796412",
"0.5780083",
"0.5779499",
"0.57692444",
"0.57679725",
"0.5767003",
"0.57495755",
"0.57394254",
"0.57392806",
"0.5738882",
"0.57209826",
"0.5720265",
"0.5718427",
"0.5714825",
"0.57146865",
"0.5706718",
"0.5706718",
"0.5700463",
"0.5682073",
"0.56788486",
"0.5677987",
"0.56772095",
"0.56716603",
"0.5670653",
"0.5667173",
"0.5658329",
"0.56522983",
"0.56518555",
"0.5651842",
"0.56484693",
"0.56426424",
"0.5642384",
"0.56406534",
"0.56386024",
"0.5633378",
"0.5626826",
"0.5615835",
"0.5615255",
"0.5608968",
"0.5603878",
"0.55994713",
"0.55938125",
"0.55907637",
"0.5580783",
"0.55779076",
"0.5575298",
"0.5568217",
"0.5556989",
"0.55550486",
"0.55497617",
"0.55473894",
"0.554657",
"0.55455023",
"0.5543096",
"0.55424446",
"0.55402833",
"0.5539553",
"0.5536106",
"0.553254",
"0.552902",
"0.5523647",
"0.55228925",
"0.55212176",
"0.55212176",
"0.55171514"
] | 0.0 | -1 |
Create a new notification instance. | public function __construct()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function create($notification){\n }",
"public static function createNotification($type, $eventid){\n\t\t$notification = new Notification; \n\t\t$notification->type = $type;\n\t\t$notification->eventid = $eventid;\n\t\t$notification->time = date('Y-m-d H:i:s');\n\t\t$notification->save();\n\t\treturn $notification;\n\t}",
"public function create($payload)\n {\n return $this->notification->create($payload);\n }",
"public static function create( array $info ) {\n\t\t$obj = new Notification();\n\t\tstatic $validFields = [ 'event', 'user' ];\n\n\t\tforeach ( $validFields as $field ) {\n\t\t\tif ( isset( $info[$field] ) ) {\n\t\t\t\t$obj->$field = $info[$field];\n\t\t\t} else {\n\t\t\t\tthrow new InvalidArgumentException( \"Field $field is required\" );\n\t\t\t}\n\t\t}\n\n\t\tif ( !$obj->user instanceof User ) {\n\t\t\tthrow new InvalidArgumentException( 'Invalid user parameter, expected: User object' );\n\t\t}\n\n\t\tif ( !$obj->event instanceof Event ) {\n\t\t\tthrow new InvalidArgumentException( 'Invalid event parameter, expected: Event object' );\n\t\t}\n\n\t\t// Notification timestamp should be the same as event timestamp\n\t\t$obj->timestamp = $obj->event->getTimestamp();\n\t\t// Safe fallback\n\t\tif ( !$obj->timestamp ) {\n\t\t\t$obj->timestamp = wfTimestampNow();\n\t\t}\n\n\t\t// @Todo - Database insert logic should not be inside the model\n\t\t$obj->insert();\n\n\t\treturn $obj;\n\t}",
"private function createNotification($id, $request)\n {\n $count = Notification::max('count');\n\n $notification = Notification::create([\n 'model_id' => $id,\n 'count' => intval($count) + 1,\n 'type' => $request->get('ntype'),\n 'subject' => $request->get('subject'),\n 'message' => $request->get('message'),\n 'sent_at' => Carbon::now(),\n ]);\n }",
"public function maybe_create_notification() {\n\t\tif ( ! $this->should_show_notification() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! $this->notification_center->get_notification_by_id( self::NOTIFICATION_ID ) ) {\n\t\t\t$notification = $this->notification();\n\t\t\t$this->notification_helper->restore_notification( $notification );\n\t\t\t$this->notification_center->add_notification( $notification );\n\t\t}\n\t}",
"public function __construct(Notification $notification)\n {\n $this->notification = $notification;\n }",
"public function __construct(Notification $notification)\n {\n $this->notification = $notification;\n }",
"public function __construct(Notification $notification)\n {\n $this->notification = $notification;\n }",
"protected function createNotificationInstance($data)\n {\n if ($data === false) {\n return null;\n }\n\n /** @var Notification $model */\n $model = Instance::ensure($this->dataClass, Notification::class);\n\n if (!empty($data['id'])) {\n $model->setId($data['id']);\n }\n\n $model->setType($data['type']);\n $model->setData(is_string($data['data']) ? Json::decode($data['data']) : $data['data']);\n $model->setUserId($data['user_id']);\n $model->setTimestamp($data['created_at']);\n $model->setRead((bool)$data['is_read']);\n $model->setOwner($this->owner);\n\n return $model;\n }",
"public function create()\n\t{\n\t\tlog::info('inside create method of user-notifications controller');\n\t}",
"public function created(Notification $notification)\n {\n $this->sendBroadcast($notification);\n }",
"public function newNotification($event)\n {\n return new ExampleNotification($event);\n }",
"public function create()\n {\n $this->authorize('create', Notification::class);\n\n return view('rb28dett_notifications::create');\n }",
"public function actionCreate()\n {\n $model = new Notification();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->notification_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"private function createMessageObject(string $type, string $message): Notification\n {\n $msg = new Notification();\n\n $msg->setType($type);\n $msg->setMessage($message);\n\n $this->handler->add($msg);\n\n return $msg;\n }",
"public function create() {\n return View::make('notifications.create');\n }",
"protected function create_notification_email_object()\n\t{\n\t\t$category = $this->category();\n\n\t\t$email = new Charcoal_Email;\n\t\t$email->to = $this->get_notified_email_address();\n\t\t$email->reply_to = $this->get_lead_email_address();\n\n\t\tif ( $category ) {\n\t\t\t$email->subject = $category->p('confirmation_email_subject')->text();\n\t\t\t$email->from = $category->p('confirmation_email_from')->text();\n\t\t\t$email->cc = $category->v('confirmation_email_cc');\n\t\t\t$email->bcc = $category->v('confirmation_email_bcc');\n\t\t}\n\n\t\treturn $email;\n\t}",
"public function create()\n {\n return view ('notifications.create');\n }",
"protected function emitNotificationCreated(Notification $notification) {}",
"public function __construct($new_postNotification)\n {\n //\n $this->postNotification = $new_postNotification;\n\n }",
"public static function createFromArray($fields) \n\t{\n\t\t$notification = new Notification();\n\t\tself::populate($notification,$fields);\n\t\treturn $notification;\n\t}",
"public function create()\n {\n return view('admin.notifications.create');\n }",
"public function create()\n {\n return view('admin.notifications.create');\n }",
"function notify($user_id, $message)\n{\n return (new Notification([\n 'user_id' => $user_id,\n 'message' => $message\n ]))->save();\n}",
"public function actionCreate() {\n\t\t$model = new Notification();\n\t\t$model->created_by = Yii::$app->user->identity->id;\n\n\t\tif ($model->load(Yii::$app->request->post())) {\n\n\t\t\tif ($model->send_to != '') {\n\t\t\t\t$model->send_to = implode(',', $model['send_to']);\n\t\t\t}\n\t\t\t$model->sent_time = date('Y-m-d H:i:s');\n\t\t\t$model->save();\n\t\t\t/*if ($model->save()) {\n\t\t\t\t$send_to = explode(',', $model['send_to']);\n\t\t\t\tforeach ($send_to as $key => $value) {\n\t\t\t\t\tif ($value == 'all') {\n\t\t\t\t\t\t$userId = 'allUser';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$user = User::find()->where(['id' => $value])->one();\n\t\t\t\t\t\t$userId = $user['phone'];\n\t\t\t\t\t}\n\t\t\t\t\tYii::$app->Utility->pushNotification($userId, $model['notification_name'], $model['content']);\n\t\t\t\t}\n\t\t\t}*/\n\t\t\tYii::$app->getSession()->setFlash('successStatus', 'Data saved successfully!');\n\n\t\t\treturn $this->redirect(['view', 'id' => $model->id]);\n\t\t}\n\n\t\treturn $this->render('create', [\n\t\t\t'model' => $model,\n\t\t]);\n\t}",
"public function notification(Notification $notification, array $parameters = []);",
"public function create()\n {\n return view('notifications.create');\n }",
"public function __construct($notification)\n {\n parent::__construct($notification);\n }",
"public function notification();",
"public function notification();",
"public function notificationsAction()\n {\n $callback = function ($msg) {\n //check the db before running anything\n if (!$this->isDbConnected('db')) {\n return ;\n }\n\n if ($this->di->has('dblocal')) {\n if (!$this->isDbConnected('dblocal')) {\n return ;\n }\n }\n\n //we get the data from our event trigger and unserialize\n $notification = unserialize($msg->body);\n\n //overwrite the user who is running this process\n if ($notification['from'] instanceof Users) {\n $this->di->setShared('userData', $notification['from']);\n }\n\n if (!$notification['to'] instanceof Users) {\n echo 'Attribute TO has to be a User' . PHP_EOL;\n return;\n }\n\n if (!class_exists($notification['notification'])) {\n echo 'Attribute notification has to be a Notificatoin' . PHP_EOL;\n return;\n }\n $notificationClass = $notification['notification'];\n\n if (!$notification['entity'] instanceof Model) {\n echo 'Attribute entity has to be a Model' . PHP_EOL;\n return;\n }\n\n $user = $notification['to'];\n\n //instance notification and pass the entity\n $notification = new $notification['notification']($notification['entity']);\n //disable the queue so we process it now\n $notification->disableQueue();\n\n //run notify for the specifiy user\n $user->notify($notification);\n\n $this->log->info(\n \"Notification ({$notificationClass}) sent to {$user->email} - Process ID \" . $msg->delivery_info['consumer_tag']\n );\n };\n\n Queue::process(QUEUE::NOTIFICATIONS, $callback);\n }",
"public function create()\n {\n return view('Admin.Notification_Management.notifications');\n }",
"public static function fake()\n {\n static::swap($fake = new NotificationFake);\n\n return $fake;\n }",
"public function new_notification_is_created ($notification) {\n $user = $this->get_session_user();\n $eventdata = new \\core\\message\\message();\n $eventdata->courseid = 1;\n $eventdata->name = 'fake_notification';\n $eventdata->component = 'block_culactivity_stream';\n $eventdata->userfrom = $user;\n $eventdata->subject = $notification;\n $eventdata->fullmessage = $notification;\n $eventdata->fullmessageformat = FORMAT_PLAIN;\n $eventdata->fullmessagehtml = $notification;\n $eventdata->smallmessage = $notification;\n $eventdata->notification = 1;\n $eventdata->userto = $user;\n $messageid = message_send($eventdata);\n\n if (!$messageid) {\n throw new Exception(get_string('messageerror', 'block_culactivity_stream'));\n }\n }",
"public function push($notification, $notifiable);",
"public function __construct() {\r\n $this->setEntity('mst_notification');\r\n }",
"public function create($type, $data, $userId)\n {\n $data = [\n 'type' => $type,\n 'data' => Json::encode($data),\n 'user_id' => $userId,\n 'created_at' => time(),\n 'is_read' => 0\n ];\n\n $notification = $this->createNotificationInstance($data);\n $this->saveNotification($notification);\n return $notification;\n }",
"public function Create()\n {\n parent::Create();\n\n //Properties\n $this->RegisterPropertyInteger('InputTriggerID', 0);\n $this->RegisterPropertyString('NotificationLevels', '[]');\n $this->RegisterPropertyBoolean('TriggerOnChangeOnly', false);\n $this->RegisterPropertyBoolean('AdvancedResponse', false);\n $this->RegisterPropertyString('AdvancedResponseActions', '[]');\n\n //Profiles\n if (!IPS_VariableProfileExists('BN.Actions')) {\n IPS_CreateVariableProfile('BN.Actions', 1);\n IPS_SetVariableProfileIcon('BN.Actions', 'Information');\n IPS_SetVariableProfileValues('BN.Actions', 0, 0, 0);\n }\n\n //Variables\n $this->RegisterVariableInteger('NotificationLevel', $this->Translate('Notification Level'), '');\n $this->RegisterVariableBoolean('Active', $this->Translate('Notifications active'), '~Switch');\n $this->RegisterVariableInteger('ResponseAction', $this->Translate('Response Action'), 'BN.Actions');\n\n //Actions\n $this->EnableAction('ResponseAction');\n\n //Timer\n $this->RegisterTimer('IncreaseTimer', 0, 'BN_IncreaseLevel($_IPS[\\'TARGET\\']);');\n\n $this->EnableAction('Active');\n }",
"public function register_notifications();",
"public function create()\n {\n $notification = DB::table('notifications')\n ->get(); \n return view ('admin/assignBadgeToUser')->with('notification', $notification);\n }",
"public function __construct(protected NotificationRepository $notificationRepository)\n {\n }",
"protected function createNotification($responseData)\n {\n $socketMock = $this->getMock(\n 'RequestStream\\\\Stream\\\\Socket\\\\SocketClient',\n array('create', 'write', 'read', 'selectRead', 'setBlocking', 'is', 'close')\n );\n\n $socketMock->expects($this->once())\n ->method('selectRead')\n ->will($this->returnValue(true));\n\n $socketMock->expects($this->once())\n ->method('read')\n ->with(6)\n ->will($this->returnValue($responseData));\n\n $notification = new Notification;\n $payload = new PayloadFactory;\n $connection = new Connection(__FILE__);\n\n $notification->setConnection($connection);\n $notification->setPayloadFactory($payload);\n\n $ref = new \\ReflectionProperty($connection, 'socketConnection');\n $ref->setAccessible(true);\n $ref->setValue($connection, $socketMock);\n\n return $notification;\n }",
"protected function notification() {\n\t\t$reason = $this->indexing_helper->get_reason();\n\n\t\t$presenter = $this->get_presenter( $reason );\n\n\t\treturn new Yoast_Notification(\n\t\t\t$presenter,\n\t\t\t[\n\t\t\t\t'type' => Yoast_Notification::WARNING,\n\t\t\t\t'id' => self::NOTIFICATION_ID,\n\t\t\t\t'capabilities' => 'wpseo_manage_options',\n\t\t\t\t'priority' => 0.8,\n\t\t\t]\n\t\t);\n\t}",
"function custom_node_create_notification($uid, $title, $message) {\n $creator_uid = 1; // Admin user.\n $node = custom_new_node_create($creator_uid, 'notification', $title, 1);\n \n $node->set('field_user', $uid);\n $node->set('body', $message);\n $node->save();\n \n if (!$node->id()) {\n \\Drupal::logger('custom')->error(t('Notification FAILED to store.'));\n }\n \n return $node;\n}",
"public function store(Request $request)\n {\n return Notification::create($request->input());\n }",
"public static function createFromDiscriminatorValue(ParseNode $parseNode): TrainingReminderNotification {\n return new TrainingReminderNotification();\n }",
"public function __construct(NotificationTrigger $notification_trigger)\n {\n $this->notification_trigger = $notification_trigger;\n }",
"public function setResource($notification)\n {\n return new NotificationResource($notification);\n }",
"public function __construct($notification_id)\n {\n $this->notification_id = $notification_id;\n }",
"public function create()\n {\n return view('Notifications/create');\n }",
"public function getNotification(MessageInstanceInterface $message)\n {\n return new DefaultNotification($message, $this->formatterRegistry->get($message->getType()));\n }",
"public function sendPostCreateNewNotifications(ApiTester $I)\n {\n $data = [\n 'entityClass' => 'user',\n 'entityId' => 1,\n 'category' => 'info',\n 'message' => fake::create()->text(20),\n 'userId' => 1\n ];\n $I->saveNotifications([\n $data['entityClass'], ' ',\n $data['entityId'], ' ',\n $data['category'], ' ',\n $data['message'], ' ',\n $data['userId'], ' '\n ], 'notifications.txt');\n $I->sendPOST($this->route, $data);\n $this->userID = $I->grabDataFromResponseByJsonPath('$.id');\n $I->seeResponseCodeIs(201);\n }",
"public static function createFromArray($fields) \n\t{\n\t\t$notificationType = new NotificationType();\n\t\tself::populate($notificationType,$fields);\n\t\treturn $notificationType;\n\t}",
"public function create()\n\t{\n\t\t$searchTerm = Input::get('searchTerm');\n\n $createNotification = new CreateNotificationCommand($searchTerm);\n\n $result = $createNotification->execute();\n\n $result = $result ? \"You're Signed Up!\" : \"You're Already Signed Up for This Term!\";\n\n return $result;\n\t}",
"#[Route('/notification/create', name: 'create_notification')]\n public function create(NotifierInterface $notifier, EntityManagerInterface $entityManager, Request $request): Response\n {\n $notification = (new Notification('Notification from Duck Tales'))\n ->content('You got some contributions to review. Please look at the Quack #' . $request->get('warned_id'))\n ->importance(Notification::IMPORTANCE_HIGH);\n\n\n $admins = [];\n $admins = array_map(fn ($duck) => $duck->hasRoleAdmin() ? $duck->getEmail() : NULL, $entityManager->getRepository(Duck::class)->findAll());\n\n // foreach ($admins as $admin) {\n // $recipient = new Recipient(\n // $admin\n // );\n // $notifier->send($notification, $recipient);\n // }\n $recipient = new Recipient(\n '[email protected]'\n );\n $notifier->send($notification, $recipient);\n\n\n // Send the notification to the recipient\n\n\n return $this->redirectToRoute('quacks');\n }",
"function wd_notification() {\n return WeDevs_Notification::init();\n}",
"public function notificationsOnCreate(NotificationBuilder $builder)\n {\n $notification = new Notification();\n $notification\n ->setTitle('Nouvelle Reclamation')\n ->setDescription(' A été crée')\n ->setRoute('#')\n // ->setParameters(array('id' => $this->userToClaim))\n ;\n //$notification->setIcon($this->getUserr()->getUsername());\n $notification->setUser1($this->getUser()->getUsername());\n $notification->setUser2($this->getUserToClaim());\n $builder->addNotification($notification);\n\n return $builder;\n }",
"public function create()\n {\n\n $email_id = date('Y-m-d_H-i-s') . '.' . $this->template;\n $email_data = [\n 'title' => $this->template, \n 'data' => serialize($this->data), \n 'email' => $this->to,\n 'id' => $email_id,\n 'date' => date('Y-m-d H:i:s')\n ];\n\n Storage::putYAML('statamify/emails/' . $email_id, $email_data);\n\n }",
"public function create()\n {\n //\n $this->message->sendMessage();\n }",
"public function create()\n {}",
"public function create() {}",
"public function create() {\n\t\t\t//\n\t\t}",
"public static function invalidNotificationType()\n {\n return new static('Notification Type provided is invalid.');\n }",
"public function createNotification($type, $text, $destination)\r\n {\r\n \t$data = $this->call(array(\"notification\"=>array(\"type\"=>$type, \"text\"=>$text, \"destination\"=>$destination)), \"POST\", \"notifications.json\");\r\n \treturn $data;\r\n }",
"public function __construct($title, $sender, $notification)\n {\n $this->title = $title;\n $this->sender = $sender;\n $this->notification = $notification;\n }",
"public function createInstance()\n {\n $mock = $this->mock(static::TEST_SUBJECT_CLASSNAME)\n ->getMessage();\n\n return $mock->new();\n }",
"public function create(){}",
"static function get_notificationById($id) {\r\n global $db;\r\n \r\n $id = $db->escape_string($id);\r\n \r\n $query = \"SELECT * FROM `notification` WHERE Notification_id = ?\";\r\n \r\n $statement = $db->prepare($query);\r\n\t\t\r\n\t\tif ($statement == FALSE) {\r\n\t\t\tdisplay_db_error($db->error);\r\n\t\t}\r\n \r\n $statement->bind_param(\"i\", $id);\r\n \r\n $statement->execute();\r\n \r\n $statement->bind_result($id, $message, $objectReference, $objectId, $seen, $timeStamp);\r\n \r\n $statement->fetch();\r\n \r\n $notification = new notification($id, $message, $objectReference, $objectId, $seen, $timeStamp);\r\n \r\n $statement->close();\r\n \r\n return $notification;\r\n }",
"public function __construct(PushNotification $push)\n {\n $this->push = $push;\n }",
"public function addNotification($id, $message, $type = 'status');",
"public function create( $arrayNotifikasi )\n {\n // return $arrayNotifikasi;\n $notif = new Notifikasi;\n $notif->id_pembuat = $arrayNotifikasi[0];\n $notif->id_penerima = $arrayNotifikasi[1];\n $notif->jenis = $arrayNotifikasi[2];\n $notif->msg = $arrayNotifikasi[3];\n $notif->icon = $arrayNotifikasi[4];\n $notif->bg = $arrayNotifikasi[5];\n $notif->tgl_dibuat = $arrayNotifikasi[6];\n $notif->link = $arrayNotifikasi [7];\n $notif->save();\n }",
"public static function createInstance()\n {\n return new MailMessage('[email protected]');\n }",
"public function testPushNotification(){\n $noti=new Notification();\n $data=' {\n\t \"to\": \"/topics/important\",\n\t \"notification\": {\n\t \t\"title\": \"Hola Mundo\",\n\t\t \"body\": \"Mensaje de prueba\",\n\t\t \"icon\":\"http://www.alabamapublica.com/wp-content/uploads/sites/43/2017/06/cntx170619019-150x150.jpg\"\n\t\t \"click_action\": \"https://critica-xarkamx.c9users.io\"\n\t }\n }';\n $this->assertArrayHasKey(\"message_id\",$noti->sendPushNotification($data));\n }",
"public static function notify($member) {\n $notification = Model_Notification::factory('notification');\n\n if(is_numeric($member)) {\n $notification->to = $member;\n } else if(is_object($member) && $member instanceof Model_Member) {\n $notification->to = $member->id;\n } else if(is_object($member) && $member instanceof Model_Blab) {\n\t\t\t$notification->to = $member->getCommentees();\n\t\t}\n\n\t\t$notification->from = Session::instance()->get('user_id');\n \n $notification->unread = 1;\n\n\t\t$notification->created = date('Y-m-d h:i:s');\n\n return $notification;\n }",
"public function insert(int $toUserID, string $subject, string $message, int $typeId, array $data = [])\n {\n return Notification::create([\n 'user_id' => $toUserID,\n 'subject' => $subject,\n 'message' => $message,\n 'notification_type_id' => $typeId,\n 'data' => $data,\n ]);\n }",
"public function create()\n {\n //TODO\n }",
"public function __construct($notifiable)\n {\n $this->notifiable = $notifiable;\n }",
"public function create()\n {\n //\n return view('admin/notifacation/create');\n }",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function __construct(AppNotification $notification, User $user)\n {\n $this->notification = $notification;\n $this->user = $user;\n }",
"public function create() {\r\n }",
"public function __construct($data)\n {\n \n\n $usuario_reserva = User::find($data->id_user);\n $coordinador = User::find($usuario_reserva->departamento->coordinador->id);\n\n $mensaje = new \\stdClass();\n $mensaje->user = $usuario_reserva->name.' '.$usuario_reserva->last_name;\n $mensaje->userid = $usuario_reserva->id;\n $mensaje->recipient = $coordinador->name.' '.$coordinador->last_name;\n $mensaje->recipientid = $coordinador->id;\n $mensaje->reservaid = $data->id;\n $mensaje->datereserva = date('Y-m-d H:i:s');\n $mensaje->text = 'ah generado una reserva';\n $notificacion = new Notificaciontest($mensaje);\n \n $coordinador->notify($notificacion);\n $this->notif = $mensaje;\n }",
"public function createDefaultNotificationRule();",
"protected function getNotification_Type_PostService()\n {\n $instance = new \\phpbb\\notification\\type\\post(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && 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 ?: '_'}, './../', 'php', 'phpbb_user_notifications');\n\n $instance->set_user_loader(${($_ = isset($this->services['user_loader']) ? $this->services['user_loader'] : $this->getUserLoaderService()) && false ?: '_'});\n $instance->set_config(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'});\n\n return $instance;\n }",
"public function create()\n {\n }",
"public function create()\n {\n }",
"public static function create() {}",
"public static function create() {}",
"public static function create() {}"
] | [
"0.8276063",
"0.72309536",
"0.7192113",
"0.71250874",
"0.7123231",
"0.70414555",
"0.6982398",
"0.6982398",
"0.6982398",
"0.69165224",
"0.6844303",
"0.68205667",
"0.6801263",
"0.6776018",
"0.6589725",
"0.6531073",
"0.6507233",
"0.65047646",
"0.6503655",
"0.64437956",
"0.6413495",
"0.63943607",
"0.63801765",
"0.63801765",
"0.63660526",
"0.6356052",
"0.63232195",
"0.6300968",
"0.6284887",
"0.6273382",
"0.6273382",
"0.6221624",
"0.62077844",
"0.619149",
"0.61460197",
"0.6113097",
"0.6109519",
"0.61056155",
"0.6096373",
"0.6080448",
"0.6076801",
"0.6062714",
"0.6056816",
"0.60528165",
"0.6042198",
"0.6041384",
"0.6038984",
"0.5998163",
"0.5980277",
"0.5966818",
"0.5965131",
"0.59510165",
"0.5944954",
"0.5924184",
"0.59172565",
"0.5905665",
"0.5863749",
"0.5857545",
"0.5847215",
"0.58452827",
"0.5823396",
"0.5817765",
"0.5809837",
"0.5806915",
"0.58051187",
"0.57956886",
"0.5786479",
"0.5761696",
"0.5759299",
"0.57588416",
"0.57455844",
"0.5729732",
"0.57241285",
"0.5722245",
"0.571779",
"0.57008874",
"0.56909657",
"0.5688866",
"0.56850773",
"0.5680636",
"0.5680636",
"0.5680636",
"0.5680636",
"0.5680636",
"0.5680636",
"0.5680636",
"0.5680636",
"0.5680636",
"0.5680636",
"0.5680636",
"0.5680636",
"0.56795263",
"0.567875",
"0.5671056",
"0.56691873",
"0.56688094",
"0.5668",
"0.5668",
"0.5666241",
"0.5666241",
"0.5666241"
] | 0.0 | -1 |
Get the notification's delivery channels. | public function via($notifiable)
{
return ['mail'];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getNotificationChannels()\n {\n if (array_key_exists(\"notificationChannels\", $this->_propDict)) {\n return $this->_propDict[\"notificationChannels\"];\n } else {\n return null;\n }\n }",
"public function getDistributionChannels();",
"public function getDeliveryChannel() {\n return $this->params[\"original\"][\"delivery_channel\"];\n }",
"public function getChannels()\n {\n return $this->channels;\n }",
"public function getChannels();",
"public function getDistributionChannels()\n {\n return $this->distributionChannels;\n }",
"public function getChannels()\n {\n return $this->Channels;\n }",
"public function getAllChannels()\n {\n return $this->_channel;\n }",
"public function via($notifiable)\n {\n $channels = [];\n if ($notifiable->setting->is_bid_cancelled_notification_enabled) {\n $channels = ['database']; // note: no Messenger yet like the other one's. App is still not approved, and there's the business registration requirement so..\n \n if ($notifiable->fcm_token) {\n $channels[] = FcmChannel::class;\n }\n }\n return $channels;\n }",
"public function viaNotificationChannels()\n {\n return UserNotificationChannel::with('notification_channel')->get()->filter(function ($item) {\n return $item->muted_at == null;\n })->pluck('notification_channel.name');\n }",
"public function channels()\n {\n return $this->send('channels');\n }",
"public function getOrderChannels()\n\t{\n\t\t$request = $this->request('order_channels');\n\n\t\tif (!$request) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$decoded = $request->asArray();\n\t\treturn $decoded['data'];\n\t}",
"public function channels()\n {\n $payloads = [\n 'code' => $this->channelCode,\n ];\n\n return $this->request('get', 'merchant/payment-channel', $payloads);\n }",
"public function all(): array\n {\n return $this->channels;\n }",
"public function getActiveNotificationChannelsOptions()\n {\n \treturn $this->getChannelOptions();\n }",
"public function getAllChannels()\n {\n return Channel::all();\n }",
"public function getSupplyChannels();",
"public function getChannels()\n\t{\n\t\t$channels = App::make('ChannelRepository')->getChannels();\n\t\t\n\t\treturn App::make('Apiv1\\Transformers\\ChannelTransformer')->transformCollection($channels, $this->user);\n\t}",
"public function via($notifiable)\n {\n $channel = ($this->channel == 'sms') ? 'nexmo' : $this->channel;\n return [$channel];\n }",
"public function get_channels()\n {\n }",
"public function getDeliveryChannel($i = 0)\n {\n if (isset($this->destinationList[$i]['DeliveryChannel'])) {\n return $this->destinationList[$i]['DeliveryChannel'];\n } else {\n return false;\n }\n }",
"public function getDeliveries()\n {\n return $this->deliveries;\n }",
"public function channels(){\n return $this->channelCollection->map(function ($item, $key) {\n return ['channel' => $item['channel']];\n });\n }",
"public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }",
"public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }",
"public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }",
"public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }",
"public function via($notifiable)\n\t{\n\t\tif (!isset($this->notifitable)) {\n\t\t\t$this->notifitable = $notifiable;\n\t\t}\n\t\t$channels = ['db'];\n\t\tif (in_array('esms', $this->data['types'])) {\n\t\t\t$channels[] = 'esms';\n\t\t}\n\t\tif (in_array('email', $this->data['types'])) {\n\t\t\t$channels[] = 'mail';\n\t\t}\n\n\t\treturn $channels;\n\t}",
"public function getChannel()\n {\n return $this->getData(self::CHANNEL);\n }",
"public function broadcastOn()\n {\n return [\n $this->channel\n ];\n }",
"public function broadcastOn()\n {\n return [\n $this->channel\n ];\n }",
"public function via($notifiable)\n {\n return [FcmChannel::class];\n }",
"public function broadcastOn() {\n return [\n new Channel('messages.' . $this->userReceiver->id . '.' . $this->currentUser->email),\n new Channel('messages.' . $this->currentUser->id . '.' . $this->userReceiver->email),\n ];\n }",
"public function broadcastOn()\n {\n return [config('messenger.redis_channel', 'notification')];\n }",
"public function via($notifiable): array\n {\n return [DiscordChannel::class];\n }",
"public function via($notifiable)\n {\n return [WhatsappChannel::class, SmsChannel::class];\n }",
"public function getSupplyChannels()\n {\n return $this->supplyChannels;\n }",
"public function getChannel();",
"public function getAllChannels()\n {\n return Channel::with('subChannel.display')->active()->alive()->get()->toArray();\n }",
"public function setNotificationChannels($val)\n {\n $this->_propDict[\"notificationChannels\"] = $val;\n return $this;\n }",
"public function getIncludeChannels()\n {\n return $this->include_channels;\n }",
"public function getDelivery()\n {\n return $this->delivery;\n }",
"public static function getChannels($aspect)\n {\n return self::getMetaProperty($aspect, 'channel');\n }",
"public function broadcastOn()\n {\n return new Channel('notifications');\n }",
"public function getAll(){\n\t\t$Channels = \\Channel::all();\n\t\treturn $Channels;\n\t}",
"public function via( $notifiable )\n\t{\n\t\treturn [ OneSignalChannel::class ];\n\t}",
"public function via($notifiable)\n {\n return [PushNotificationChannel::class];\n }",
"public function channels(): ChannelsService;",
"public function getNotificationTypes()\n {\n return $this->notifications;\n }",
"public function getChannelList()\n {\n return Channel::with('subChannel.display')->get();\n }",
"public function list_channels($exclude_archived=true) {\n\n $method=\"channels.list\";\n $payload['exclude_archived'] = $exclude_archived;\n\n $result = $this->apicall($method, $payload);\n if (isset($result['channels'])) {\n return $result['channels'];\n } else {\n return false;\n }\n }",
"public function getChannel()\n {\n \treturn $this->_channel;\n }",
"public function getChannel()\n {\n return $this->channel;\n }",
"public function getChannel()\n {\n return $this->channel;\n }",
"function channelInfo()\n\t{\n\t\treturn $this->_channel;\n\t}",
"public function broadcastOn()\n {\n return ['my-channel'];\n }",
"public function via($notifiable)\n {\n return [SendGridChannel::class];\n }",
"public function getChannel()\n {\n return $this->Channel;\n }",
"public function getChannel()\n {\n return $this->Channel;\n }",
"public function getChannel()\n {\n if (! $this->channel) {\n $this->set();\n }\n\n return $this->channel;\n }",
"public function broadcastOn()\n {\n return ['channel-status'];\n }",
"public function broadcastOn()\n {\n return [\n new Channel('sanityDeployment.' . $this->sanityDeployment->id),\n new Channel('sanityMainRepo.' . $this->sanityDeployment->sanityMainRepo->id),\n ];\n }",
"public function via($notifiable)\n {\n return [DiscordChannel::class];\n }",
"public static function getChannels() {\n\t\t$channels = [];\n\t\ttry {\n\t\t\t$mapper = new ObjectMapper();\n\t\t\t$response = self::getResponse();\n\t\t\t$data = json_decode( $response, true );\n\t\t\tif ( count( $data['Channels'] ) > 0 ) {\n\t\t\t\tforeach ( $data['Channels'] as $dataProject ) {\n $channels[] = $mapper->mapJson( json_encode( $dataProject ), Channel::class );\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( \\Exception $e ) {\n\t\t\tthrow $e;\n\t\t}\n\n\t\treturn $channels;\n\t}",
"public function getListDeliveryStatus()\n {\n return $this->client->makeRequest('deliverystatus', 'GET');\n }",
"public function onChannels(): ?array\n {\n return null;\n }",
"public function getChannel()\n\t{\n\t\treturn $this->channel;\n\t}",
"public function via($notifiable): array\n {\n return [TelegramChannel::class];\n }",
"public function getChannel() {\n return $this->channel;\n }",
"public function getChannels()\n {\n return Channel::with('subChannel.category', 'subChannel.display')->whereNull('parent_channel')->active()->get()->toArray();\n }",
"public function getDestinationChannel();",
"public function getJoinDefaultChannels()\n {\n return $this->joinDefaultChannels;\n }",
"function hpm_channels( $mutations ) {\n $mutation = $mutations[0];\n $object = $mutation->action == 'create' ?\n $mutation->property_value :\n hpm_object( $mutation->object_type, $mutation->object_id );\n $channels = [];\n switch ($mutation->object_type) {\n case 'message':\n case 'resource':\n if ( $object->project_id === NULL ) {\n $channels = ['members'];\n } else {\n $channels[] = 'private-managers';\n $project = hpm_object( 'project', $object->project_id );\n if ( $project->contractor_id !== NULL ) {\n $channels[] = 'private-contractor-' . $project->contractor_id;\n }\n }\n break;\n case 'package':\n $channels = ['private-managers'];\n break;\n case 'person':\n case 'project':\n $channels = ['members'];\n break;\n case 'time':\n $channels = ['private-managers'];\n $worker = hpm_object( 'person', $object->worker_id );\n if ( $worker->role == 'contractor' ) {\n $channels[] = 'private-contractor-' . $object->worker_id;\n }\n break;\n default: break;\n }\n return $channels;\n}",
"public function getDistributionChannel()\n {\n return $this->distributionChannel instanceof ChannelReferenceBuilder ? $this->distributionChannel->build() : $this->distributionChannel;\n }",
"private function getChannels()\r\n {\r\n static $channels;\r\n\r\n if (empty($channels)) {\r\n // Store the cache forever.\r\n $cache_key = 'categoryFirst';\r\n $channels = \\SCache::sear($cache_key, function () {\r\n $categories = $this->all();\r\n $channels = [];\r\n foreach ($categories as $category) {\r\n if ($category['bclassid'] == 0) {\r\n $channels[] = $category;\r\n }\r\n }\r\n return $channels;\r\n });\r\n }\r\n\r\n return $channels;\r\n }",
"public function via($notifiable)\n {\n return [NetgsmChannel::class];\n }",
"public function getChannels()\n {\n $size = $this->getImageSize();\n\n return $size['channels'];\n }",
"public function get($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('get', [$params], NotificationChannel::class);\n }",
"public function notifications()\n {\n $notifications = $this->get(\"/api/v1/conversations?as_user_id=sis_user_id:mtm49\");\n return $notifications;\n }",
"public function via($notifiable)\n {\n return [WebPushChannel::class];\n }",
"public function via($notifiable)\n {\n return [WebPushChannel::class];\n }",
"public function getActiveChannels(string $format = 'xml'): array\n {\n $response = $this->prepareHttpClient('/mailer/channel/list', ['format' => $format])\n ->send();\n\n if ($format === 'csv') {\n return $this->parseResponse($response);\n }\n\n $xml = new SimpleXMLElement($this->parseResponse($response));\n\n $channels = [];\n foreach ($xml->children() as $channel) {\n $channels[] = [\n 'date' => new DateTime((string) $channel->attributes()->date),\n 'name' => (string) $channel->attributes()->name,\n 'info' => (string) $channel->attributes()->info,\n ];\n }\n\n return $channels;\n }",
"public function via($notifiable)\n {\n $array = ['database', 'fcm'];\n\n if (setting('twilio_disabled') != true &&\n !blank(setting('twilio_from')) &&\n !blank(setting('twilio_account_sid')) &&\n !blank(setting('twilio_account_sid'))\n ) {\n array_push($array, TwilioChannel::class);\n }\n\n if (setting('mail_disabled') != true &&\n !blank(setting('mail_host')) &&\n !blank(setting('mail_username')) &&\n !blank(setting('mail_password')) &&\n !blank(setting('mail_port')) &&\n !blank(setting('mail_from_name')) &&\n !blank(setting('mail_from_address'))\n ) {\n array_push($array, 'mail');\n }\n\n return $array;\n }",
"public function getChannel(): Channel\n {\n return $this->channel;\n }",
"public function via($notifiable) {\n return [OneSignalChannel::class];\n }",
"public function getChannelNames()\n {\n $array = [];\n\n foreach ($this->channels as $channel) {\n $array[$channel->name] = $channel->name;\n }\n\n return $array;\n }",
"public function getNotifications()\n {\n return $this->_notifications;\n }",
"public function getChannels(){\n\t\t//TODO: Change query\n\t\t$query = sprintf(\"SELECT idChannel FROM Channels limit 1\");\n\n\t\t$this->dbObj->Query($query);\n\n\t\tif ($this->dbObj->numErr) {\n\t\t\t$this->parent->SetError(5);\n\t\t}\n\n\t\t$out = NULL;\n\t\twhile (!$this->dbObj->EOF) {\n\t \t\t$out[] = $this->dbObj->GetValue(\"idChannel\");\n\t\t\t$this->dbObj->Next();\n\t\t}\n\n\t \treturn $out;\n\t}",
"public function via($notifiable)\n {\n $via = [];\n\n foreach ($this->sendibleTraits() as $trait) {\n $viaNameFromTrait = $this->getViaNameFromTrait($trait);\n\n if ($this->shouldBeSentVia($viaNameFromTrait, $notifiable)) {\n $via[] = $this->{$viaNameFromTrait . 'Channel'}();\n }\n }\n\n return $via;\n }",
"public function via($notifiable)\n {\n return [CustomDbChannel::class, 'mail'];\n }",
"public function via($notifiable)\n {\n return [FacebookChannel::class];\n }",
"public function getChannels()\n {\n $channels = $this->channels->getAll();\n $channelList = [];\n\n // Cycle through all of the channels and setup data for them\n foreach ($channels as $channel) {\n $message = $this->chat->getLatestByChannel($channel->id);\n\n $channelList[] = [\n 'name' => $channel->name_trim,\n 'messages' => $channel->messages,\n 'last_message' => strtotime($message['created_at']),\n ];\n }\n\n return json_encode(array_reverse($channelList));\n }",
"public function getChannel()\n {\n return $this->_access->getChannel();\n }",
"public function getChannel(): string {\n\t\t\treturn $this->channel;\n\t\t}",
"public function getChannel($storeId = null);",
"public function channels()\n {\n return $this->belongsToMany('App\\Channel');\n }",
"public function broadcastOn()\n {\n return ['whatcanido-channel'];\n }",
"public function getNotificationgroups()\n {\n return isset($this->notificationgroups) ? $this->notificationgroups : null;\n }",
"public function via($notifiable)\n {\n $now = Carbon::now();\n $createdAt = Carbon::parse($notifiable->created_at);\n $dayFive = $createdAt->copy()->addDays(5)->startOfDay();\n $daySix = $createdAt->copy()->addDays(6)->endOfDay();\n if ($now->between($dayFive, $daySix)) {\n $this->isDayFive = $now->between($dayFive, $dayFive->copy()->endOfDay()) ? true : false;\n return [LineBotNotificationChannel::class];\n }\n\n return [];\n }",
"public function broadcastOn()\n {\n return new Channel('doctor-notification');\n }",
"public function via($notifiable)\n {\n return [OneSignalChannel::class];\n }"
] | [
"0.78077316",
"0.7333707",
"0.7127785",
"0.7089724",
"0.7087921",
"0.70300424",
"0.69931364",
"0.6973003",
"0.6951073",
"0.6927183",
"0.68472975",
"0.67785895",
"0.6697527",
"0.6530563",
"0.65100604",
"0.6496754",
"0.6474866",
"0.6446399",
"0.643471",
"0.6423392",
"0.64229727",
"0.63781494",
"0.63726985",
"0.6277284",
"0.6276724",
"0.6276724",
"0.6276724",
"0.6234952",
"0.6203739",
"0.6179071",
"0.6179071",
"0.61232203",
"0.61158967",
"0.61088634",
"0.6020671",
"0.5995534",
"0.5985168",
"0.59301424",
"0.5916712",
"0.5912588",
"0.5911691",
"0.5896299",
"0.5893216",
"0.5889689",
"0.5887195",
"0.5878091",
"0.586549",
"0.58512723",
"0.5812232",
"0.5805207",
"0.5800807",
"0.57906127",
"0.5786768",
"0.5786768",
"0.57807684",
"0.5779888",
"0.57715005",
"0.57678837",
"0.57678837",
"0.5766476",
"0.5754385",
"0.57491064",
"0.5742647",
"0.5735341",
"0.5732727",
"0.57325697",
"0.5728877",
"0.57221526",
"0.57207775",
"0.57169145",
"0.5712525",
"0.5694798",
"0.5688528",
"0.5683845",
"0.5683054",
"0.5682042",
"0.567513",
"0.5663718",
"0.5659599",
"0.5652422",
"0.5652422",
"0.5630605",
"0.5630334",
"0.56298393",
"0.5625376",
"0.5625225",
"0.56192815",
"0.56115615",
"0.5607237",
"0.5602894",
"0.5584222",
"0.55823225",
"0.55728054",
"0.5566249",
"0.5554496",
"0.555214",
"0.5549145",
"0.55454457",
"0.5544404",
"0.55443466",
"0.5544159"
] | 0.0 | -1 |
Get the mail representation of the notification. | public function toMail($notifiable)
{
$url = secure_url('/home');
$subject = sprintf('%s: Your Subscription was Successful!', $notifiable->firstname);
$greeting = sprintf('Hello %s!', $notifiable->firstname);
return (new MailMessage)
->subject($subject)
->greeting($greeting)
->salutation('Best regards')
->line('Your subscription to Afribary Scholarships was successful. You can now access information on thousands of international scholarships available to Nigerians.')
->action('Get Started', $url)
->line('We are looking forward giving you the best service!');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getNotificationEmail() {}",
"public function toMail($notifiable)\n {\n $mailMessage = (new MailMessage())\n ->error()\n ->subject($this->getMessageText())\n ->line($this->getMessageText());\n\n foreach ($this->getMonitorProperties() as $name => $value) {\n $mailMessage->line($name.': '.$value);\n }\n\n return $mailMessage;\n }",
"public function getMail()\n {\n return $this->_transport->getMail();\n }",
"function get () {\n $this->_build_mail();\n\n $mail = 'To: '.$this->xheaders['To'].\"\\n\";\n $mail .= 'Subject: '.$this->xheaders['Subject'].\"\\n\";\n $mail .= $this->headers . \"\\n\";\n $mail .= $this->full_body;\n return $mail;\n }",
"public function toMail($notifiable)\n {\n $url = $this->getNotificationEndpoint($notifiable);\n return $this->buildMailMessage($url);\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('用户举报通知')\n ->line('用户举报了'.$this->report['type'])\n ->line($this->report['reason'].$this->report['other'])\n ->action('查看举报内容', $this->report['link']);\n }",
"public function getMail(): string\n {\n return $this->_mail;\n }",
"public function getPlainMail()\n {\n return $this->get(self::_PLAIN_MAIL);\n }",
"public function getMail()\n {\n return $this->mail;\n }",
"public function getMail()\n {\n return $this->mail;\n }",
"public function getMail()\n {\n return $this->mail;\n }",
"public function getMail()\n {\n return $this->mail;\n }",
"public function getFormatMail()\n {\n return $this->get(self::_FORMAT_MAIL);\n }",
"public function getMailBodyText(Notification $notification) : string;",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->greeting('Hey '. auth()->user()->username)\n ->line('You Just received a new comment.')\n ->from($this->comment->commenter->email)\n ->action('Notification Action', url('http://dejavu.atmkng.de/'))\n ->line('Check out the discussions on DejaVu')\n ;\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function getMail():string\n {\n return $this->mail;\n }",
"public function getMail()\n {\n return $this->_session->getMail();\n }",
"public function getMail()\n\t{\n\n\t\treturn $this->mail;\n\t}",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line($this->message)\n ->action('دیدن سفارش', url(asset('/OrderStatus')))\n ->line('گروه مترجمین صفا');\n }",
"public function getMailBodyHTML(Notification $notification) : string;",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->from('[email protected]', config('app.name'))\n ->subject('Vos billets sont disponibles')\n ->line('Vos billets sont disponibles !')\n ->action('Télécharger les billets ici ', route('show'))\n ->line('Il n\\'est désormais plus absolument nécessaire de les imprimer, vous pouvez soit télécharger votre place sur votre smartphone, soit l\\'imprimer pour présenter le QR code le jour de la représentation.')\n ->line('Nous vous rappelons qu\\'il est en revanche nécessaire d\\'être **présent 20 minutes avant le début du spectacle** et que **le placement est libre**.')\n ->line('Rendez vous le 14, 15 et 16 Décembre au Théâtre Impérial !');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('Bienvenid@!!')\n ->line('En base a la metodología de selección,')\n ->line('Te felicitamos por ser seleccionado');\n ->line('para presentar tu Pitch..s');\n }",
"public function toMail($notifiable)\n {\n $message = new MailMessage;\n $message->greeting('Print On Demand Apparel')->subject('Order: \"'. $this->order->id .'\" updated');\n\n foreach($this->order->getChanges() as $key => $value){\n $message->line($key . \": \" . $value);\n }\n\n $message->action('View', route('front.orders.show', $this->order->id));\n \n return $message;\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->greeting('Hello!')\n ->subject('Someone just got to the checkout page of your website.')\n ->line('To see the order and details, follow the link below:')\n ->action('Dashboard notification', route('notification'))\n ->line('Thank you for using our application!');\n }",
"public function routeNotificationForMail()\n {\n return $this->email;\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage())\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n $this->data = str_replace(\"\\n\", \"<br>\", $this->data ?? '');\n\n return (new MailMessage)\n ->subject(__('Custom Exception Notification'))\n ->view('notifications.email.system_report', ['data' => $this->data ?? '']);\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage())\n ->subject(trans('notifications.we_received_new_order'))\n ->line(trans('notifications.we_received_new_order_description'))\n ->line(trans('notifications.customer_name', ['name' => $this->order->user->username]))\n ->line(trans('notifications.total_price', ['price' => $this->order->formatted_total_price]))\n ->action(trans('notifications.show_order'), novaResourceAction('orders', $this->order->id));\n\n }",
"public function notificationEmailAddress()\n {\n $notification_email = $this->getNotificationChannel('mail')['settings']['email'] ?? null;\n\n return $notification_email ?? $this->email;\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->greeting(__('Hello, ').$this->order->owner->name)\n ->subject(__('You Have Some New Attachment About Your Order'))\n ->line(__('For order number #').$this->order->id.__(' some new attachments has been uploaded recently.'))\n ->line(__('You can check the link below to see your files'))\n ->action(__('See attachments'), route('users.orders.show', [app()->getLocale(),\n $this->order->owner, $this->order]));\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->greeting(\"Hello \".$this->userData->name.', ')\n ->line('You have a notification Title '.$this->reminderData->documentTitle)\n ->line('Expire date is '.$this->reminderData->reminderDate)\n ->action('visit website', url('/dvalidator'))\n ->line('Thank you for using Notification validator !');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('[BaabClub]Your Topic Has Been Replied!')\n ->greeting('Hello! '.$notifiable->name.', Your Topic <i>'.$this->reply->communityTopic->title.'</i> has been replied')\n ->line('Replier : '.$this->reply->user->name)\n ->line('Content : '.strip_tags($this->reply->content))\n ->action('VIEW & REPLY', route('showCommunityContent',$this->reply->communityTopic->id).'#reply-'.$this->reply->id)\n ->line('<br>Thank you for your participation in community!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line(\"Olá, {$notifiable->nome},\")\n ->line('')\n ->line([\n 'Você está recebendo este e-mail porque recebemos um pedido de redefinição de senha para a sua conta.',\n 'Clique no botão abaixo para redefinir sua senha:',\n ])\n ->line([\n 'Estes são os dados de onde partiu a solicitação:',\n ])\n ->line(\"Localização: {$this->geo['city']}, {$this->geo['state']}, {$this->geo['country']}.\")\n ->line(\"IP: {$this->geo['ip']}\")\n ->line(\"Dispositivo: {$this->getDevice()}\")\n ->line(\"Plataforma: {$this->agent->platform()} {$this->agent->version($this->agent->platform())}\")\n ->line(\"Navegador: {$this->agent->browser() } {$this->agent->version($this->agent->browser()) }\")\n ->action('Redefinir Senha', panel()->resetPasswordTokenUrl($this->token))\n ->line('Se você não solicitou uma nova senha, não é necessário nenhuma ação. Mas certifique-se de que suas credenciais estejam seguras e atualizadas.');\n }",
"public function toMail( $notifiable )\n\t{\n\t\treturn ( new MailMessage )\n\t\t\t->line( 'The introduction to the notification.' )\n\t\t\t->action( 'Notification Action', url( '/' ) )\n\t\t\t->line( 'Thank you for using our application!' );\n\t}",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('You have been added to ' . $this->entityName)\n ->line(sprintf(\n '%s added you to the %s: %s',\n $this->adder->name,\n $this->entityType,\n $this->entityName\n ));\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('Você foi atribuído a uma nova solicitação!')\n ->greeting('Olá,')\n ->line('Você foi atribuído a uma nova solicitação: '.$this->ticket->title)\n ->action('Visualizar Solicitação', route('admin.tickets.show', $this->ticket->id))\n ->line('Obrigado!')\n ->line(config('app.name') . ' da Prefeitura de Ibema/PR')\n ->salutation(' ');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n // ->subject(Lang::get('Din ordrestatus er ændret'))\n ->line('Vores konsulent har nu verificeret at alt dokumentation er i orden og underskrevet. Vi er derfor glade for at din ordre nu er aktiv. Order Id #' . $this->order->custom_order_id)\n ->line('Følg med i processen på danpanel.dk. Hvis du har spørgsmål kan vi altid træffes på mail, telefon eller i vores online chat, når du er logget ind på vores hjemmeside.')\n ->action('Gå til profil', url('/login'));\n // ->line('Thank you for using our application!');\n }",
"public function getMail()\n {\n return $this->Mail_user;\n }",
"public function toMail($notifiable) {\n var_dump('going to send mail');\n\n // return (new MailMessage)\n // ->line('The introduction to the notification.')\n // ->action('Notification Action', url('/'))\n // ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('Сообщение с сайта Lidz ' . '[' . date('d.m.Y H:i') . ']')\n ->greeting('Сообщение с сайта Lidz')\n ->line('Имя: ' . $this->name)\n ->line('E-mail: ' . $this->email)\n ->line('Телефон: ' . $this->phone)\n ->line('Сообщение: ' . $this->message)\n ->salutation(' ');\n }",
"public function toMail($notifiable)\n\t{\n\t\t$report = $this->notifitable->reports()->create([\n\t\t\t\"user_id\" => $notifiable->id,\n\t\t\t\"scope\" => $this->data['scope'],\n\t\t\t\"channel\" => 'email',\n\t\t\t\"notification_id\" => $this->id,\n\t\t\t\"send_at\" => Carbon::now()\n\t\t]);\n\t\t$mail_message = (new MailMessage)\n\t\t\t->subject($this->data[\"title\"]);\n\t\tif (isset($this->data[\"email_view\"])) {\n\t\t\t$mail_message = $mail_message->view($this->data[\"email_view\"], isset($this->data['custom']) ? $this->data['custom'] : []);\n\t\t} else {\n\t\t\t$mail_message = $mail_message->line($this->data[\"body\"]);\n\t\t}\n\n\t\treturn $mail_message;\n\t}",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('Spacheship has launched!')\n ->markdown('mail.spaceship', [\n 'spaceship' => 'foobar'\n ]);\n }",
"public function toMail($notifiable)\n {\n if(!$this->message->message) {\n \n $this->message->message = 'Após levar em consideração todos os requisitos da vaga e suas qualificações profissionais, decidimos não dar prosseguimento com a sua candidatura.';\n }\n\n return (new MailMessage)\n ->subject('Atualização sobre sua candidatura para vaga de ' . $this->application->job->position->label)\n ->greeting('Atualização sobre candidatura')\n ->line($this->message->message)\n ->line('Seu cadastro ficará no nosso banco de dados e será levado em consideração quando tivermos outras oportunidades que se encaixem no seu perfil.');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('A ticket assign to ' .$this->group_name. 'TT# '.$this->ticket_id)\n ->line('A ticket assign to ' .$this->group_name. 'TT# '.$this->ticket_id);\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->markdown('emails.post_was_updated', [\n 'user' => $notifiable,\n 'post' => $this->post\n ])\n ->subject(\"L'article {$this->post->name} viens d'être mise à ajour!\")\n ->from('[email protected]', 'Larasou')\n ->replyTo('[email protected]', 'Soulouf');\n }",
"public function toMail($notifiable)\n {\n $healthUpdate = $this->healthUpdate;\n \n $message = new MailMessage;\n $message->subject('[INFOMINA ELS] - Medical Leave Applied');\n $message->greeting('Hi '.$healthUpdate['name'].',');\n $message->line('It seems like you are unwell. Thus, we have submitted a medical leave on behalf of you.');\n $message->line('Date : '.$healthUpdate['date_from'].' to '.$healthUpdate['date_to']);\n $message->line('Total Day(s) : '.$healthUpdate['total_days']);\n $message->line('Please contact the HR for any changes in action.');\n $message->line('Take care!');\n\n return $message;\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->from(config('imap.accounts.default.username'), $this->clientMessage->getFromName())\n ->subject($this->clientMessage->getTitle())\n ->greeting($this->clientMessage->getTitle())\n ->line($this->clientMessage->getText());\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject(\"Invoice from \".$data->user.\" on lancers\")\n ->greeting(\"Hello \".$data->name)\n ->line($data->user.\" has sent you an invoice of the sum of NGN\".$data->amount.\" for the project \".$data->project)\n ->line(\"Use the button below to view the invoice and make payment\")\n ->action(\"View Invoice\", $this->data->invoice_url))\n ->line('Ignore this message if you think it is a mistake');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', 'https://laravel.com')\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('New contact us submit')\n ->line('Name: '.$this->data[\"name\"])\n ->line('Email: '.$this->data[\"email\"])\n ->line('Subject: '.$this->data[\"subject\"])\n ->line('Message: '.$this->data[\"message\"]);\n }",
"public function getMailSubject(Notification $notification) : string;",
"public function getmail() {\n\t\treturn $this->mail;\n\t}",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('Your request for ' . $this->ticket->form->template->name . ' (Ticket No. ' . $this->ticket->id . ') has been updated!')\n ->line('')\n ->line('Request has been updated:')\n ->line('Cancelled by ' . $this->update->employee->renderFullname())\n ->line('')\n ->line($this->update->description)\n ->line('')\n ->line('For more details you may also view the request by clicking the button below.')\n ->action('View', route('ticket.show', $this->ticket->id)); \n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->from(config('mail.from.address'), config('mail.from.name'))\n ->subject(__('Customer register'))\n ->markdown('mail.customer', ['customer' => $this->customer]);\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->from(env('MAIL_USERNAME'), env('APP_NAME'))\n ->greeting('เรียน '.'คุณ'.$this->name)\n ->subject('การแจ้งเตือนรีเซ็ตรหัสผ่าน')\n ->line('คุณได้รับอีเมลนี้เนื่องจากเราได้รับคำขอรีเซ็ตรหัสผ่านสำหรับบัญชีของคุณ.')\n ->action('รีเซ็ตรหัสผ่าน', url('password/reset', $this->token))\n ->line('หากคุณไม่ได้ร้องขอการรีเซ็ตรหัสผ่านไม่จำเป็นต้องดำเนินการใดๆอีก.');\n }",
"public function toMail($notifiable)\n {\n $order = $this->order;\n\n return (new MailMessage)\n ->subject('Orden de Quick Restaurant EXITOSA!')\n ->line(\"Orden codigo: $order->id\")\n ->line(\"Total pagado: $order->total COP\")\n ->line(\"Gracias por tu compra!\");\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('Nová požiadavka vo Vašej učebni - ' . $this->ticketObj->area->name . ' - PC' . $this->ticketObj->pc )\n ->greeting('Zdravím ' . $notifiable->name)\n ->line('V učebni ' . $this->ticketObj->area->name . ', ktorú spravujete vytvoril užívateľ ' . $this->ticketObj->user->name . ' novú požiadavku.')\n ->action('Detail požiadavky', action('Tickets\\TicketController@show',[$this->ticketObj->id]))\n ->line('O ďalších zmenách stavu požiadavky budete informovaní emailom.')\n ->line('Ďakujeme za používanie ReFa!')\n ->line('V prípade, že nie ste správcom tejto učebne kontaktujte správcu systému.');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('ثبت ملک')\n ->view('emails.sabt', ['estate' => $this->estate]);\n }",
"protected function create_notification_email_object()\n\t{\n\t\t$category = $this->category();\n\n\t\t$email = new Charcoal_Email;\n\t\t$email->to = $this->get_notified_email_address();\n\t\t$email->reply_to = $this->get_lead_email_address();\n\n\t\tif ( $category ) {\n\t\t\t$email->subject = $category->p('confirmation_email_subject')->text();\n\t\t\t$email->from = $category->p('confirmation_email_from')->text();\n\t\t\t$email->cc = $category->v('confirmation_email_cc');\n\t\t\t$email->bcc = $category->v('confirmation_email_bcc');\n\t\t}\n\n\t\treturn $email;\n\t}",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('Accept Resignation')\n ->line('Dear '.$this->employee_info->name.',')\n ->line('Your resignation submitted '.date('M. d, Y',strtotime($this->employee_info->upload_date)).' , effective '.date('M. d, Y',strtotime($this->employee_info->last_day)).' was approved by '.auth()->user()->name.'. A copy of this notice shall be given to Human Resources for clearance preparation.')\n // ->action('(click button)', $this->server->server_ip.'/uploaded-letter')\n ->line('An e-mail indicating the next steps shall be sent to you shortly. ')\n ->line('Please check the Offboarding System and your e-mail regularly for updates. ')\n ->line('This is an auto generated email please do not reply')\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->from('[email protected]')\n ->subject($this->subject)\n ->greeting(\"Olá {$this->user->name},\")\n ->line($this->text)\n ->line(new HtmlString(\"<div align='center' style='margin: auto 60px; background-color: #eee; padding: 30px 15px; font-weight: bold; letter-spacing: 5px; font-size: 1.2rem'>\n {$this->user->validation_code}\n </div>\"))\n ->line(new HtmlString(\"<br><br><br>Obrigado por usar nossa aplicação\"))\n ->salutation('Atenciosamente,');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('ยืนยันอีเมล์')\n ->line('โปรดคลิกปุ่มด้านล่างเพื่อยืนยันอีเมล์')\n ->action('ยืนยันอีเมล์',\n $this->verificationUrl($notifiable)\n )\n ->line('หากท่านไม่ได้สมัครสมาชิกต้องขอภัยมา ณ ที่นี้ด้วย');\n /*\n return (new MailMessage)\n ->subject('ยืนยันอีเมล์')\n ->view('emails.user.verify-email',['url' => $this->verificationUrl($notifiable)]);*/\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject(\"Invitación de participación en proyecto de {$this->project->projectType->type} - Ibis\")\n ->greeting(\"¡Hola {$this->user->name}!\")\n ->line(\"El semillero de investigación {$this->researchTeam->name} de la institución educativa {$this->researchTeam->researchGroup->educationalInstitutionFaculty->educationalInstitution->name} quiere invitarlo para que participe en el desarrollo del proyecto {$this->project->title}. Por favor revise el documento adjunto, si esta de acuerdo firme y posteriormente cargue el documento en pdf en la sección 'Enviar respuesta' haciendo clic en 'Más información del proyecto'.\")\n ->action('Más información del proyecto', route('nodes.explorer.searchProjects.showProject', [$this->node, $this->project]))\n ->line('Gracias y esperamos su pronta respuesta')\n ->attach($this->file);\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->greeting(' ')\n ->line('Новый комментарий пользователя ' . $this->data['commenter'] . ' к статье \"' . $this->data['title'] . '\" :')\n ->line(' …' . $this->data['body'] . '…')\n ->action('Перейти на страницу статьи', url('/posts/' . $this->data['slug'] ))\n ->salutation('С приветом, Я!');\n }",
"public function getNotifyMsg()\n {\n return $this->get(self::_NOTIFY_MSG);\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject(\"A new order #\".$this->order->id.\" has been created\")\n ->greeting('Hello '.$notifiable->name.',')\n ->line(\"A new order #\".$this->order->id.\" has been created By \".$this->order->user->name)\n ->line('Thank you for managing your shop in'.setting('site_name'));\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('News on Laramap.com 🗞️')\n ->greeting('Dear '.$this->user->username)\n ->line($this->data['body'])\n ->line('Please note that laramap is still in development. 👷')\n ->line('Thank you for using Laramap! 😻');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('Reward Checkpoint Reminder')\n ->line('Just a reminder – let us know how frequently you’ve been participating with your students! In exchange for your participation in the survey, you’ll have a chance to win awesome prizes including NBA apparel, tickets to games, and special event experiences. You must complete the form by end-of-day on Friday to qualify!')\n ->action('Share Data', url('/checkpoint'))\n ->line('Thank you!');\n }",
"public function toMail($notifiable)\n {\n if ($this->user->type() == 'cso') {\n $type = \"примател\";\n } else {\n $type = \"донатор\";\n }\n $message = (new MailMessage)->subject('[Сите Сити] Променет е профилот на ' . $type . 'от.')\n ->line('Направени се следниве измени:')\n ->line('Тип: ' . $type)\n ->line('Име: ' . $this->user->first_name)\n ->line('Презиме: ' . $this->user->last_name)\n ->line('Емаил: ' . $this->user->email)\n ->line('Организација: ' . $this->user->organization->name)\n ->line('Адреса: ' . $this->user->address)\n ->line('Телефон: ' . $this->user->phone)\n ->line('Локација: ' . $this->user->location->name);\n return $message;\n }",
"public function mail()\n\t{\n\t\treturn $this->_mail;\n\t}",
"public function toMail($notifiable)\n {\n $link = url(\"/week?id=\" . $this->weekID);\n\n return (new MailMessage)\n ->subject('HSH | Una subasta inscripta ha sido obtenida por un Premium')\n ->greeting('Hola, ' . $notifiable->nombre)\n ->line('Un usuario Premium se ha adjudicado una semana en la que estabas inscripto')\n ->line('Propiedad: ' .$this->propertyName)\n ->line('Semana: ' .$this->date)\n ->action('Ver Semana', $link)\n ->salutation('Home Switch Home - Cadena de Residencias');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line($this->title)\n ->action('View Achievement', $this->link)\n ->line($this->text);\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->greeting('Hola')\n ->subject('Consulta de Reserva')\n ->line('Tienes una nueva consulta de reserva')\n ->line('Nombre: '.$this->name)\n ->line('Email: '.$this->email)\n ->line('Telefono: '.$this->phone)\n ->line('fecha: '.$this->date)\n ->line('Tipo de evento : '.$this->type_event)\n ->line('Asistentes : '.$this->assistants)\n ->line('Detalles del evento : '.$this->comments);\n }",
"public function toMail($notifiable)\n {\n $url = url('/invoice/'.$this->invoice->id);\n\n return (new MailMessage)\n ->greeting('Olá usuário.')\n ->line('Esse email é referente a sua solicitação para refazer sua senha.')\n ->action('View Invoice', $url)\n ->line('Este email ira expirar em 1 hora.')\n ->line('Caso você não tenha feito a solicitação, desconsidere esse email.')\n ->line('Equipe CoguMais agradece.');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject(__('Request Received'))\n ->line(__(\n \"Thanks for getting in touch! This is an automatic email just to let you know that we've received your request and your ticket reference is :ticketId.\",\n ['ticketId' => $this->ticket->id]\n ))\n ->line(__('One of our support agents will get back to you shortly. Please do not submit multiple tickets for the same request, as this will not result in a faster response time.'))\n ->action('View Help Center', url('/help-center'));\n }",
"public function toMail($notifiable)\n {\n //$location = $this->vdvk->getProposedLocation;\n return (new MailMessage)\n ->subject('Funds has been released Successfully for VDY ')\n ->line('Dear Sir/Madam,')\n ->line('Greetings!!,')\n ->line($this->messgae)\n ->line('Thanks & Regards')\n ->line('VDY VDIS Admin');\n }",
"public function toMail($notifiable)\n {\n $mail = new MailMessage();\n\n $mail->greeting('Hello, '. $notifiable->username . '!');\n $mail->line('There has a new user registred on webiste.');\n $mail->line('Username: ' . $this->data->username);\n $mail->line('Email: ' . $this->data->email);\n $mail->line('Created At: ' . $this->data->created_at);\n $mail->action('Visit admin panel', admin_url());\n\n return $mail;\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('Votre topic a été supprimé.')\n ->markdown('mails.topic-deleted', [\n 'topic' => $this->topic,\n 'project' => $this->project,\n 'user' => $notifiable\n\n ]);\n }",
"public function getNotification()\n {\n return $this->notification;\n }",
"public function getNewMail()\n {\n return $this->get(self::_NEW_MAIL);\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('Event Closed')\n ->line(\"An Event titled: {$this->event->title} dated on {$this->event->event_date->format('M jS, Y')} has been closed\")\n ->line(\"For more information about your ticket sales, click on the link below\")\n ->action(\"Event Page\", route('backend.events.details', $this->event->id));\n }",
"public function getMail():string\n { \n return $this->mail;\n }",
"public function toMail($notifiable)\n { \n \n return (new MailMessage)\n ->subject('¡Te han agregado al equipo de un objetivo en Participes!')\n ->markdown('mail.objectives.join', ['user' => $notifiable, 'objective' => $this->objective, 'role' => ($this->role == 'manager' ? 'coordinardor/a' : 'reportero/a')]);\n \n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('Pemberitahuan Jadwal Pelaksanaan Ikrar')\n ->line('Jadwal ikrar ditetapkan pada tanggal')\n ->line(date('d-m-Y', strtotime($this->tanggal)) . ' Pukul ' . date('H:i', strtotime($this->tanggal)))\n ->line('Tempat: KUA Pulosari')\n ->line('Dimohon untuk wakif mempersiapkan dan membawa nadzir dan saksi saat akan melaksanakan ikrar wakaf')\n ->action('Lihat Status Pengajuan', route('wakif.pengajuan-wakaf.show', $this->berkasWakif->id))\n ->line('Terimakasih');\n }"
] | [
"0.7329682",
"0.73008144",
"0.7279281",
"0.72447264",
"0.7150932",
"0.713269",
"0.71279645",
"0.7124905",
"0.70436907",
"0.70436907",
"0.70436907",
"0.70436907",
"0.70169747",
"0.6981995",
"0.6965215",
"0.69630843",
"0.6962014",
"0.69318545",
"0.692679",
"0.6913696",
"0.6901655",
"0.6891927",
"0.6882121",
"0.6882121",
"0.6882121",
"0.6882121",
"0.6882121",
"0.6882121",
"0.6882121",
"0.6882121",
"0.6882121",
"0.6882121",
"0.6882121",
"0.6874644",
"0.6874644",
"0.6874644",
"0.6874644",
"0.6874644",
"0.6873094",
"0.68712616",
"0.6863366",
"0.6861968",
"0.68592066",
"0.6855583",
"0.6834309",
"0.68288237",
"0.6827025",
"0.6818496",
"0.6818069",
"0.68166715",
"0.681161",
"0.6810731",
"0.6802911",
"0.6799005",
"0.67923856",
"0.679201",
"0.67880183",
"0.6786402",
"0.6784462",
"0.67844015",
"0.678121",
"0.6771769",
"0.6767643",
"0.6746845",
"0.67418754",
"0.67416346",
"0.67398185",
"0.67343414",
"0.67270494",
"0.6722636",
"0.67166543",
"0.6715651",
"0.6713519",
"0.6710188",
"0.6708883",
"0.6704977",
"0.6704099",
"0.6702548",
"0.6692169",
"0.6691404",
"0.66834474",
"0.6674972",
"0.6672788",
"0.6670916",
"0.6653598",
"0.6645107",
"0.6644927",
"0.6637104",
"0.6635857",
"0.66354716",
"0.6632256",
"0.66166365",
"0.66161466",
"0.6615812",
"0.6606413",
"0.6602531",
"0.6601729",
"0.6601182",
"0.6600807",
"0.6598184",
"0.65979403"
] | 0.0 | -1 |
Get the array representation of the notification. | public function toArray($notifiable)
{
return [
//
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function toArray()\n {\n return [\n 'on' => $this->on,\n 'message' => $this->message,\n 'remaining' => $this->remaining\n ];\n }",
"public function toArray($notifiable)\n {\n return $this->message;\n }",
"public function getAsArray() {\n return $this->message;\n }",
"public function toArray()\n {\n $message = [\n 'from' => $this->from,\n 'message' => $this->message,\n ];\n\n return $message;\n }",
"public function toArray(): array\n {\n return [\n 'message' => $this->message,\n 'types' => $this->types,\n 'dismissible' => $this->dismissible,\n ];\n }",
"public function toArray($notifiable)\n {\n $notification = $this->notification;\n return [\n 'id' => $notification->id,\n 'title' => $notification->title,\n 'description' => $notification->description,\n 'button_text' => $notification->button_text,\n 'is_read' => $notification->is_read,\n 'created_at' => $notification->created_at,\n [\n 'notification_for' => $notification->notifiable\n ]\n ];\n }",
"public function toArray(NotifiableInterface $notifiable): array\n {\n return [\n 'message' => 'This is a database notification sent at ' . \\date(DATE_COOKIE),\n ];\n }",
"public function toArray()\n {\n return array_filter([\n 'sender' => $this->sender(),\n 'timestamp' => $this->timestamp()->timestamp,\n 'uuid' => $this->uuid(),\n ]);\n }",
"public function toArray() {\n\n\t\tif (! $this->isMessagePrepared()) {\n\t\t\t$this->prepareMessage();\n\t\t}\n\n\t\t$values = array(\n\t\t\t'sender' => $this->formatAddresses($this->getSender()),\n\t\t\t'recipient' => $this->formatAddresses($this->getTo()), // @todo change me! recipient has been deprecated in favor of \"to\".\n\t\t\t'to' => $this->formatAddresses($this->getTo()),\n\t\t\t'cc' => $this->formatAddresses($this->getCc()),\n\t\t\t'bcc' => $this->formatAddresses($this->getBcc()),\n\t\t\t'reply_to' => $this->formatAddresses($this->getReplyTo()),\n\t\t\t'subject' => $this->getMailMessage()->getSubject(),\n\t\t\t'body' => $this->getMailMessage()->getBody(),\n\t\t\t'attachment' => count($this->getMailMessage()->getChildren()),\n\t\t\t'context' => (string)GeneralUtility::getApplicationContext(),\n\t\t\t'was_opened' => 0,\n\t\t\t'message_template' => $this->messageTemplate->getUid(),\n\t\t\t'message_layout' => is_object($this->messageLayout) ? $this->messageLayout->getUid() : 0,\n\t\t\t'sent_time' => time(),\n\t\t\t'mailing' => is_object($this->mailing) ? $this->mailing->getUid() : 0,\n\t\t);\n\n\t\treturn $values;\n\t}",
"public function toArray($notifiable)\n {\n $this->sendFCMNotification($notifiable);\n \n return [\n 'notifyType' => $this->message['notifyType'],\n 'message' => $this->message['message'],\n 'url' => $this->message['url'],\n 'created_at' => Date('Y-m-d h:i:s')\n ];\n }",
"public function toArray($notifiable)\n {\n return $this->chat->toArray();\n }",
"public function get()\n {\n $data = array_reverse(array_map('unserialize', file('notification')));\n\n return [\"list\", $data];\n }",
"public function toArray()\n {\n $message = [\n 'url' => $this->url,\n 'title' => $this->subject,\n 'message' => $this->body,\n ];\n\n if ($this->icon) {\n $message['image_url'] = $this->icon;\n }\n\n return $message;\n }",
"public function toArray($request)\n {\n return self::notification($this);\n }",
"public function getMessageData()\n {\n return (array) array();\n }",
"public function toDbArray() {\n\t\treturn [\n\t\t\t'notification_event' => $this->event->getId(),\n\t\t\t'notification_user' => $this->user->getId(),\n\t\t\t'notification_timestamp' => $this->timestamp,\n\t\t\t'notification_read_timestamp' => $this->readTimestamp,\n\t\t\t'notification_bundle_hash' => $this->bundleHash,\n\t\t];\n\t}",
"public function toArray()\n {\n $data = array(\n 'id' => $this->getId(),\n 'status' => $this->getStatus(),\n 'title' => $this->field ? ($this->field->getAlertDescription() ? $this->field->getAlertDescription() : $this->field->getAlertTitle()) : '',\n 'alert_description' => $this->field ? ($this->field->getAlertDescription() ? $this->field->getAlertDescription() : $this->field->getAlertTitle()) : '',\n 'field' => $this->field ? $this->field->toArray() : null,\n 'vehicle' => $this->getVehicle()->toInfoArray(),\n 'user' => $this->check_list ? $this->check_list->getUser()->toInfoArray() : array(),\n 'description' => $this->getDescription(),\n 'images' => $this->getImages(),\n 'thumbnail' => $this->getThumbnail(),\n 'comments' => $this->getComments(),\n 'creation_date' => $this->getCreationDate()->getTimestamp(),\n 'update_date' => $this->getUpdateDate()->getTimestamp(),\n 'history' => $this->getHistory(),\n 'refreshed_times' => $this->getRefreshedTimes()\n );\n return $data;\n }",
"public function toArray($notifiable)\n {\n return [\n 'type_name' => 'message',\n 'message' => trans(\n 'notifications.new_message_notification',\n [\n 'user' => $this->message->user->display_name,\n ]\n ),\n 'message_id' => $this->message->id,\n 'user_id' => $this->message->user->id\n ];\n }",
"public function toArray() {\n return array(\n 'id' => $this->_id,\n 'queue' => $this->_queue,\n 'payload' => $this->_payload,\n 'attempts' => $this->_attempts,\n 'reserved_at' => $this->_reserved_at,\n 'available_at' => $this->_available_at,\n 'created_at' => $this->_created_at\n );\n }",
"public function toArray()\n {\n return [\n 'code' => ModelsNotification::SCHEDULE_CREATED,\n ];\n }",
"public function toArray()\n {\n return [\n 'title' => $this->title,\n 'body' => $this->body,\n 'sound' => $this->sound,\n 'badge' => $this->badge,\n 'ttl' => $this->ttl,\n 'channelId' => $this->channelId,\n 'data' => empty($this->jsonData) ? '{}' : json_encode($this->jsonData),\n ];\n }",
"public static function notifications(): array\n {\n return [];\n }",
"public function toMessage(): array;",
"public function toArray($notifiable)\n {\n $user = App\\User::find(1);\n\n foreach ($user->notifications as $notification) {\n echo $notification->type;\n }\n return [\n 'invoice_id' => $this->invoice->id,\n 'amount' => $this->invoice->amount,\n ];\n }",
"public function toArray($request)\n {\n return [\n 'id' => $this->id,\n 'title' => $this->target()->getNotificationTitle($this->resource),\n 'body' => $this->target()->getNotificationBody($this->resource),\n 'image' => $this->target()->getNotificationImage($this->resource),\n 'dashboard_url' => $this->target()->getNotificationDashboardUrl($this->resource),\n 'type' => $this->data['type'] ?? null,\n 'data' => $this->target()->getNotificationData($this->resource),\n 'read' => (bool) $this->read_at,\n 'created_at' => $this->created_at->diffForHumans(),\n ];\n }",
"public function toArray() {\n\t\treturn array(\n\t\t\tself::FIELD_ID_CHAT=>$this->getIdChat(),\n\t\t\tself::FIELD_ID_JOUEUR=>$this->getIdJoueur(),\n\t\t\tself::FIELD_PSEUDO=>$this->getPseudo(),\n\t\t\tself::FIELD_QUAND=>$this->getQuand(),\n\t\t\tself::FIELD_MESSAGE=>$this->getMessage());\n\t}",
"public function toArray($notifiable)\n {\n return [\n 'message' => $this->getMessage(),\n 'href' => $this->getHref(),\n ];\n }",
"public function toArray($notifiable)\n {\n return [\n 'notification_id' => $this->id,\n 'todo_id' => $this->todo->id,\n 'title' => $this->todo->title,\n 'text' => $this->todo->text,\n ];\n }",
"public function toArray()\n\t{\n\t\treturn array(\n\t\t\t'name' => $this->name,\n\t\t\t'title' => $this->title,\n\t\t\t'hasPermission' => $this->hasPermission,\n\t\t\t'messages' => $this->messages,\n\t\t\t'confirmation' => $this->confirmation,\n\t\t);\n\t}",
"public function jsonSerialize()\n {\n return [\n 'id' => $this->getId(),\n 'textNotification' => $this->getTextNotification(),\n 'createdAt' => $this->getCreatedAt()\n ];\n }",
"public function toArray()\n {\n return [\n 'timestamp' => $this->timestamp,\n 'type' => $this->type,\n 'content' => $this->content\n ];\n }",
"public function toArray() {\n\t\t$ret = array(\n\t\t\t\"contactDetails\" => array(\n\t\t\t\t\"contactName\" => Client::clean($this->name),\n\t\t\t\t\"telephone\" => Client::clean($this->phoneNumber),\n\t\t\t),\n\t\t\t\"address\" => $this->address->toArray(),\n\t\t);\n\t\tif ($this->emailAddress || $this->mobileNumber) {\n\t\t\t$ret['notificationDetails'] = array();\n\t\t}\n\t\tif ($this->emailAddress) {\n\t\t\t$ret['notificationDetails']['email'] = Client::clean($this->emailAddress);\n\t\t}\n\t\tif ($this->mobileNumber) {\n\t\t\t$ret['notificationDetails']['mobile'] = Client::clean($this->mobileNumber);\n\t\t}\n\t\treturn $ret;\n\t}",
"public function toArray()\n {\n $result = array(\n Epicom_MHub_Helper_Data::API_SHIPMENT_EVENT_CREATED => Mage::helper ('mhub')->__('Created'),\n Epicom_MHub_Helper_Data::API_SHIPMENT_EVENT_NF => Mage::helper ('mhub')->__('NF'),\n Epicom_MHub_Helper_Data::API_SHIPMENT_EVENT_SENT => Mage::helper ('mhub')->__('Sent'),\n Epicom_MHub_Helper_Data::API_SHIPMENT_EVENT_DELIVERED => Mage::helper ('mhub')->__('Delivered'),\n Epicom_MHub_Helper_Data::API_SHIPMENT_EVENT_FAILED => Mage::helper ('mhub')->__('Failed'),\n Epicom_MHub_Helper_Data::API_SHIPMENT_EVENT_PARCIAL => Mage::helper ('mhub')->__('Parcial'),\n Epicom_MHub_Helper_Data::API_SHIPMENT_EVENT_CANCELED => Mage::helper ('mhub')->__('Canceled'),\n );\n\n return $result;\n }",
"public function toArray(): array\n {\n return [\n 'currency' => $this->currency,\n 'amount' => $this->amount,\n 'message' => $this->message,\n ];\n }",
"public function toArray($notifiable)\n {\n return $this->data;\n }",
"public function toArray($notifiable)\n {\n return [\n 'model_id' => $this->conv->id,\n 'model_type' => get_class($this->conv),\n 'message' => 'Richiesta di approvazione per la convenzione '.$this->conv->descrizione_titolo.' (n. '.$this->conv->id.') è stata inviata! ',\n 'description' => $this->data['description'] ? $this->data['description'] : '',\n 'subject' => 'Richiesta approvazione'\n ];\n }",
"public function toArray($notifiable)\n {\n $this->data['id']=$this->id;\n $options = array(\n 'cluster' => 'ap1',\n 'encrypted' => true\n );\n $pusher = new \\Pusher\\Pusher(\n env('PUSHER_APP_KEY'),\n env('PUSHER_APP_SECRET'),\n env('PUSHER_APP_ID'),\n $options\n );\n $pusher->trigger('NotificationEvent', 'send-message/'.$notifiable->id, $this->data);\n return $this->data;\n }",
"public function toArray() {\n return $this->array;\n }",
"public function toArray($notifiable)\n {\n return [\n \"server_id\" => $this->server->id,\n \"time\" => time()\n //\n ];\n }",
"public function toArray()\n {\n return [\n 'subject' => $this->adder,\n 'action' => 'added you to',\n 'object_type' => $this->entityType,\n 'object_name' => $this->entityName,\n 'object_id' => $this->entityId,\n ];\n }",
"public function toArray()\n {\n return [\n 'success' => $this->success,\n 'error' => !$this->success,\n 'message' => $this->message,\n ] + $this->data;\n }",
"public function toArray() {\n\t\treturn $this->array;\n\t}",
"public function toArray($notifiable)\n\t{\n\t\treturn [\n\t\t\t//\n\t\t];\n\t}",
"public function toArray()\n {\n $packet = $this->getPacket();\n\n if(empty($packet['latest_line'])) {\n $packet['latest_line'] = '';\n }\n if(empty($packet['progress'])) {\n $packet['progress'] = 0;\n }\n\n return array(\n 'id' => (string)$this->id,\n 'queue' => (string)$this->queue,\n 'class' => (string)$this->class,\n 'data' => $this->data,\n 'worker' => (string)$packet['worker'],\n 'status' => (int)$packet['status'],\n 'created' => (float)$packet['created'],\n 'updated' => (float)$packet['updated'],\n 'delayed' => (float)$packet['delayed'],\n 'started' => (float)$packet['started'],\n 'finished' => (float)$packet['finished'],\n 'progress' => (float)$packet['progress'],\n 'progress_l' => (string)$packet['latest_line'],\n 'output' => $packet['output'],\n 'exception' => $packet['exception']\n );\n }",
"public function toArray()\n {\n return $this->info;\n }",
"public function toArray()\n {\n return [\n 'title' => MessengerUtils::checkStringLength($this->title, 80),\n 'item_url' => $this->item_url,\n 'image_url' => $this->image_url,\n 'subtitle' => MessengerUtils::checkStringLength($this->subtitle, 80),\n 'buttons' => MessengerUtils::checkArraySize($this->buttons, 3)\n ];\n }",
"public function toSlackObjectArray(): array;",
"public function toArray($notifiable) {\n\t\treturn [\n\t\t\t//\n\t\t];\n\t}",
"public function toArray(){\n $this->buildArray();\n return $this->array;\n }",
"public function toArray()\n {\n return array(\n 'id' => $this->id,\n 'description' => $this->description,\n 'involvementKindID' => $this->involvementKindID,\n 'reportKindID' => $this->reportKindID,\n 'locationID' => $this->locationID,\n 'personID' => $this->personID,\n 'departmentID' => $this->departmentID,\n 'dateTime' => $this->dateTime,\n 'statusID' => $this->statusID,\n 'actionTaken' => $this->actionTaken,\n 'photoPath' => $this->photoPath\n );\n }",
"public function toArray(): array\n {\n /**\n * @todo - fix this - see HER-3124\n */\n return [\n \"id\" => $this->id,\n 'connection' => $this->getAttribute('connection'),\n \"queue\" => $this->queue,\n \"payload\" => $this->payload,\n \"failed_at\" => $this->perhaps_format_date($this->failed_at),\n\n \"created_at\" => $this->perhaps_format_date($this->created_at),\n \"updated_at\" => $this->perhaps_format_date($this->updated_at),\n\n \"model_name\" => self::class,\n ];\n }",
"public function toArray()\n {\n return array_filter(array(\n 'VPSProtocol' => $this->vpsProtocol,\n 'TxType' => $this->txType,\n 'Vendor' => $this->vendor,\n 'VendorTxCode' => $this->vendorTxCode,\n 'Currency' => $this->currency,\n 'NotificationURL' => $this->notificationUrl,\n 'Profile' => $this->profile\n ));\n }",
"public function toArray($notifiable)\n {\n return [\n //\n ];\n }",
"public function toArray($notifiable)\n {\n return [\n //\n 'type'=>'community.topic.replied',\n 'topicId'=>$this->reply->communityTopic->id,\n 'topicTitle'=>$this->reply->communityTopic->title,\n 'replyId'=>$this->reply->id,\n 'replyContent'=>$this->reply->content,\n 'replierId'=>$this->reply->user->id,\n 'replierName'=>$this->reply->user->name,\n ];\n }",
"public function toArray($notifiable)\n {\n return [\n 'purchase_requisition_id' => $this->purchaseRequisition->id,\n 'number' => $this->purchaseRequisition->number,\n 'message' => 'A new purchase requisition was saved',\n ];\n }",
"public function toArray($notifiable)\n {\n return [\n 'response_id' => $this->response->id,\n 'ticket_id' => $this->ticket->id,\n ];\n }",
"public function toArray( $notifiable )\n\t{\n\t\treturn [\n\t\t\t//\n\t\t];\n\t}",
"public function toArray( $notifiable )\n\t{\n\t\treturn [\n\t\t\t//\n\t\t];\n\t}",
"public function toArray($notifiable)\n {\n return [\n 'type' => 'notification',\n 'title' => 'Pengajuan Baru',\n 'body' => 'Pengajuan baru dengan nomor registrasi '.$this->pengajuan.' Menunggu verifikasi dari anda'\n ];\n }",
"public function toArray()\n {\n return [\n 'message' => '<span class=\"text-gray-800 font-medium\">'.$this->reply->owner->full_name.'</span> vous a mentionné dans le sujet <span class=\"text-gray-800 font-medium\">'. $this->reply->thread->title.'</span>',\n 'link' => $this->reply->path(),\n 'user_profile' => $this->reply->owner->username,\n 'user_photo' => $this->reply->owner->picture,\n 'action' => 'mention'\n ];\n }",
"public function toArray($notifiable)\n {\n $timestamp = Carbon::now()->addSecond()->toDateTimeString();\n return [\n 'body' => $this->loan->staff->full_name . \" was request to loan salary amount: $\" . $this->loan->amount . \"<br/>Reason: {$this->loan->reason}\",\n 'notify_type' => 'loan_request',\n 'notify_id' => $this->loan->uuid,\n 'title' => 'Loan Request',\n 'created_at' => $timestamp,\n 'updated_at' => $timestamp\n ];\n }",
"public function toArray() : array\n {\n return $this->data;\n }",
"public function toArray(TreasurerNotifiable $notifiable): array\n {\n return [];\n }"
] | [
"0.76758885",
"0.76516277",
"0.75636953",
"0.74597746",
"0.7458128",
"0.734528",
"0.73423344",
"0.72810096",
"0.72445726",
"0.7225404",
"0.7216026",
"0.72065705",
"0.71766704",
"0.71498305",
"0.70820516",
"0.70820177",
"0.70782363",
"0.70270497",
"0.70252293",
"0.702143",
"0.7005507",
"0.69897133",
"0.69835114",
"0.69746983",
"0.69453293",
"0.69343853",
"0.6905672",
"0.6898733",
"0.6853946",
"0.6844214",
"0.6842489",
"0.68060786",
"0.6791964",
"0.67899585",
"0.67766184",
"0.67683345",
"0.67649716",
"0.6764599",
"0.6748395",
"0.6726294",
"0.6711944",
"0.6711614",
"0.670731",
"0.67052966",
"0.66935706",
"0.66897994",
"0.668776",
"0.66654325",
"0.6653741",
"0.663988",
"0.6629974",
"0.66294295",
"0.66288227",
"0.66218674",
"0.6619021",
"0.66135013",
"0.6587241",
"0.6587241",
"0.6583618",
"0.6583216",
"0.6583014",
"0.65681624",
"0.65670633"
] | 0.0 | -1 |
Returns the default options. | public static function get_default_options() {
return array(
'mailgun' => array(
'region' => 'us',
'api_key' => '',
'domain'=> '',
),
'double_opt_in' => '0',
'use_honeypot' => '1',
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDefaultOptions() {\n return static::defaultOptions();\n }",
"public static function getDefaultOptions()\n {\n return self::$defaults;\n }",
"public static function getDefaultOptions()\n {\n return self::$defaults;\n }",
"public function defaultOptions() {\n return $this->default_options;\n }",
"public function getDefaultOptions();",
"public function getDefaultOptions();",
"protected function getDefaultOptions()\n {\n return array();\n }",
"protected function getDefaultOptions()\n {\n return $this->defaultOptions;\n }",
"public static function getDefaultOptions(): array\n {\n return self::$defaults;\n }",
"public function getDefaultOptions() {\n if (!isset($this->defaultOptions)) {\n $this->defaultOptions = new Options;\n }\n return $this->defaultOptions;\n }",
"public function get_default_options()\n\t{\n\t\t$defaults = array();\n\t\t$defaults['title'] = '';\n\t\t$defaults['placeholder'] = 'Search Connections...';\n\t\t\n\t\treturn $defaults;\n\t}",
"protected function _getDefaultOptions()\n {\n }",
"public static function getDefaultOptions(){\n\n\t\t$options = array(\n\t\t\tWPC_OPTIONS => array(\n\t\t\t\tWPC_OPTIONS_LANGUAGE => 'en_US',\n\t\t\t\tWPC_OPTIONS_THEME => WPC_THEME_LIGHT\n\t\t\t),\n\t\t\tWPC_OPTIONS_COMMENTS => array(\n\t\t\t\tWPC_OPTIONS_COMMENTS_NUMBER => 6,\n\t\t\t\tWPC_OPTIONS_COMMENTS_WIDTH => 480,\n\t\t\t\tWPC_OPTIONS_COMMENTS_POSITION => WPC_CUSTOM_FIELD_VALUE_POSITION_BOTTOM,\n\t\t\t\tWPC_OPTIONS_COMMENTS_ENABLED => WPC_OPTION_ENABLED,\n\t\t\t\tWPC_OPTIONS_DISPLAY_EVERYWHERE => 'on',\n\t\t\t\tWPC_OPTIONS_DISPLAY_NOWHERE => ''\n\t\t\t),\n\t\t\tWPC_OPTIONS_LIKE_BUTTON => array(\n\t\t\t\tWPC_OPTIONS_LIKE_BUTTON_SEND => WPC_OPTION_ENABLED,\n\t\t\t\tWPC_OPTIONS_LIKE_BUTTON_LAYOUT => WPC_LAYOUT_STANDARD,\n\t\t\t\tWPC_OPTIONS_LIKE_BUTTON_WIDTH => 480,\n\t\t\t\tWPC_OPTIONS_LIKE_BUTTON_FACES => WPC_OPTION_ENABLED,\n\t\t\t\tWPC_OPTIONS_LIKE_BUTTON_VERB => WPC_ACTION_LIKE,\n\t\t\t\tWPC_OPTIONS_LIKE_BUTTON_FONT => WPC_FONT_DEFAULT,\n\t\t\t\tWPC_OPTIONS_LIKE_BUTTON_POSITION => WPC_CUSTOM_FIELD_VALUE_POSITION_TOP,\n\t\t\t\tWPC_OPTIONS_LIKE_BUTTON_ENABLED => WPC_OPTION_ENABLED,\n\t\t\t\tWPC_OPTIONS_DISPLAY_EVERYWHERE => 'on'\n\t\t\t)\n\t\t);\n\n\t\treturn $options;\n\n\t}",
"function initDefaultOptions(){\n\n\t\t\t$defaults = $this->defaultOptions();\n\t\t\treturn update_option( $this->optionsKey, $defaults );\n\t\t}",
"protected function _getDefaultOptions()\n {\n return array(\n self::OPTION_SET_IP_ADDRESS => true\n );\n }",
"protected function getDefaultOptions()\n {\n // Option to run command once\n $this->addOption(\n 'run-once',\n null,\n InputOption::VALUE_NONE,\n 'Run the command just once, do not go into an endless loop'\n );\n\n //Option to print memory usage\n $this->addOption(\n 'detect-leaks',\n null,\n InputOption::VALUE_NONE,\n 'Output information about memory usage'\n );\n\n //Option to create pid file\n $this->addOption(\n 'pidfile',\n null,\n InputOption::VALUE_REQUIRED,\n 'The location of the PID file that should be created for this process',\n null\n );\n\n //Option to set interval for command\n $this->addOption(\n 'interval',\n null,\n InputOption::VALUE_REQUIRED,\n 'Interval to run',\n null\n );\n }",
"protected function defaultOptions()\n {\n return [\n 'title_pattern' => '{{name}}',\n 'value_pattern' => '{{id}}',\n 'label_pattern' => '{{name}}',\n 'subtext_pattern' => 'Web ID: {{id}}',\n 'query_parameters' => []\n ];\n }",
"protected function getOptions() {\n\t\treturn array(\n\t\t);\n\t}",
"public function getDefaultOptions(): array|null\n {\n return [];\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}",
"protected function getDefaultOptions()\n {\n return array(\n 'cwd' => '', // Current working directory for this task.\n 'log_dir' => '', // from which location to copy the resulting artifacts to the build folder\n 'env' => array(), // environment in which to run.\n 'bin' => null, // the full path to the binary that needs to be run; use /usr/bin/env if unsure\n // where it is\n 'args' => array(), // a series of options and arguments (should include and prefixing hyphens).\n );\n }",
"protected function getOptions()\n\t{\n\t\treturn [\n\t\t];\n\t}",
"protected static function get_default_options($multirequest = false)\n {\n }",
"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}",
"protected function getOptions() {\n\t\treturn array();\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\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}",
"public static function getDefaultOptions()\n {\n return array(\n 'cap' => 1000000,\n 'maxAttempts' => 0\n );\n }",
"protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t\n\t\t];\n\t}",
"public function getDefaultOptions()\n {\n return [\n 'headers' => [ 'Content-Type' => 'application/x-www-form-urlencoded' ],\n 'parameters' => [],\n 'curl_options' => [],\n 'url' => $this->url,\n 'authentication' => false,\n 'token' => null,\n 'secret' => null,\n 'username' => null,\n 'password' => null,\n 'algorithm' => 'sha256',\n 'debug' => false,\n 'allow_self_signed' => false,\n 'validate' => true,\n 'response_as_array' => false,\n ];\n }",
"protected function _options() {\n\t\t\treturn array();\n\t\t}",
"function tc_get_default_options() {\r\n $def_options = get_option( \"tc_theme_defaults\");\r\n \r\n //Always update the default option when (OR) :\r\n // 1) they are not defined\r\n // 2) customzing => takes into account if user has set a filter or added a new customizer setting\r\n // 3) theme version not defined\r\n // 4) versions are different\r\n if ( ! $def_options || $this -> is_customizing || ! isset($def_options['ver']) || 0 != version_compare( $def_options['ver'] , CUSTOMIZR_VER ) ) {\r\n $def_options = $this -> tc_generate_default_options( $this -> tc_customizer_map( $get_default_option = 'true' ) , 'tc_theme_options' );\r\n //Adds the version\r\n $def_options['ver'] = CUSTOMIZR_VER;\r\n update_option( \"tc_theme_defaults\" , $def_options );\r\n }\r\n return apply_filters( 'tc_default_options', $def_options );\r\n }",
"private function getUrlDefaultOptions() : array\n {\n // Logger.\n $this->logger->debugInit();\n \n // Set cURL options.\n $defaultOptions = array(\n CURLOPT_BINARYTRANSFER => true,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_FOLLOWLOCATION => true\n );\n \n // Logger.\n $this->logger->debugEnd();\n \n return $defaultOptions;\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}",
"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 }",
"function build_default_core_options() {\n\n $core_options = array(\n 'key' => '',\n 'title' => '',\n 'menu_order' => 0,\n 'position' => 'normal',\n 'style' => 'default',\n 'label_placement' => 'top',\n 'instruction_placement' => 'label',\n 'hide_on_screen' => array()\n );\n\n return $core_options;\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 {\n return array();\n }",
"protected function getDefaults(){\n\t\treturn array();\n\t}",
"protected function getOptions()\n {\n return array(\n\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 }",
"protected function getOptions()\n {\n return [\n ];\n }",
"public function getDefaultOptions()\n {\n\n return array('validation_groups' => array('admEdit', 'Default'));\n\n }",
"public function options()\n\t{\n\t\treturn [];\n\t}",
"protected function getOptions()\r\n {\r\n return [\r\n\r\n ];\r\n }",
"public static function getDefaults()\n {\n return [];\n }",
"protected static function getDefaultSettings()\n {\n return array(\n 'prefix' => '',\n 'throw_exception' => false,\n 'connection' => null\n );\n }",
"public function settingsWithMissingOptionsWithDefault()\n {\n return array(\n array(\n array('-f', '--option2'),\n array('flag1' => true, 'option2' => 'some default value')\n ),\n array(\n array('--option2', '-f'),\n array('option2' => 'some default value', 'flag1' => true)\n )\n );\n }",
"public function getOptions()\n {\n return array();\n }",
"public function getDefaults();",
"public function getDefaultSettings();",
"protected function _initDefaultOptions()\n {\n $this->_options[self::OPT_STOP_PROMPTING_ON_DTMF] = self::STOP_PROMPTING_ON_DTMF_DEFAULT;\n $this->_options[self::OPT_NO_INPUT_PROMPT_PLAYLIST] = array();\n $this->_options[self::OPT_END_READING_KEY] = Streamwide_Engine_Dtmf_Handler::KEY_POUND;\n $this->_options[self::OPT_RETURN_ALL_INPUT] = self::RETURN_ALL_INPUT_DEFAULT;\n $this->_options[self::OPT_TRIES] = self::DEFAULT_NUMBER_OF_TRIES;\n }",
"protected function getUnsupportedDefaultOptions()\n {\n return [];\n }",
"public static function get_options() {\n\t\treturn get_option( 'omnimailer' ) ?: self::get_default_options();\n\t}",
"protected function getOptions() {\n return [];\n }",
"protected function getOptions() {\n return [];\n }",
"public function getDefaultOptions()\n\t{\n\t\tswitch ($this->type) {\n\t\t\tcase self::TYPE_CHECKBOX:\n\t\t\tcase self::TYPE_LINKED_SELECT:\n\t\t\tcase self::TYPE_MULTI_SELECT:\n\t\t\tcase self::TYPE_RADIO:\n\t\t\tcase self::TYPE_SELECT:\n\t\t\t\t/** @noinspection PhpUndefinedMethodInspection */\n\t\t\t\treturn $this->getOptions()->filterByIsSelected();\n\t\t\tdefault:\n\t\t\t\treturn new kyResultSet(array(), 'kyCustomFieldOption');\n\t\t}\n\t}",
"public function defaultOptions(): array\n {\n return [\n 'dataWrap' => 'data',\n 'value' => 'id',\n ];\n }",
"protected function getOptions()\n {\n return [];\n }",
"protected function getOptions()\n {\n return [];\n }",
"protected function getOptions()\n {\n return [];\n }"
] | [
"0.8984043",
"0.89472985",
"0.89472985",
"0.89255154",
"0.8815272",
"0.8815272",
"0.88134605",
"0.8715469",
"0.8533158",
"0.84160185",
"0.83681417",
"0.8311251",
"0.8020589",
"0.7977923",
"0.79202974",
"0.77666",
"0.77374285",
"0.77273804",
"0.7717638",
"0.7711843",
"0.7711843",
"0.7711843",
"0.7711843",
"0.7711843",
"0.7711843",
"0.7711843",
"0.7708141",
"0.7679748",
"0.7675498",
"0.76638407",
"0.76638407",
"0.76638407",
"0.76638407",
"0.76638407",
"0.76638407",
"0.76638407",
"0.76638407",
"0.76638407",
"0.76638407",
"0.76638407",
"0.76638407",
"0.76638407",
"0.7658222",
"0.76527596",
"0.76452404",
"0.76452404",
"0.76452404",
"0.76452404",
"0.75962204",
"0.7589671",
"0.75569314",
"0.7536333",
"0.75343657",
"0.75185716",
"0.7514826",
"0.7514826",
"0.7514826",
"0.7514826",
"0.7514826",
"0.7514826",
"0.7514826",
"0.7514826",
"0.7514826",
"0.7479281",
"0.7479281",
"0.7479281",
"0.74707925",
"0.74681854",
"0.74681854",
"0.74681854",
"0.74681854",
"0.74681854",
"0.74681854",
"0.74681854",
"0.7443877",
"0.7435502",
"0.74340385",
"0.74340385",
"0.74340385",
"0.74340385",
"0.74340385",
"0.7429358",
"0.74028295",
"0.738487",
"0.73795855",
"0.737854",
"0.7374884",
"0.73675",
"0.73588985",
"0.7357679",
"0.7322418",
"0.7319515",
"0.7291318",
"0.72912896",
"0.72912896",
"0.7278855",
"0.7278464",
"0.7263735",
"0.7263735",
"0.7263735"
] | 0.84350425 | 9 |
Returns the full set of options. | public static function get_options() {
return get_option( 'omnimailer' ) ?: self::get_default_options();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getOptions() {\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}",
"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}",
"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\treturn array();\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}",
"protected function getOptions()\n\t{\n\t\treturn [];\n\t}",
"protected function getOptions()\r\n\t{\r\n\t\treturn array();\r\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\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}",
"protected function getOptions()\n\t{\n\t\treturn [\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 [\n\t\t\t\n\t\t];\n\t}",
"public function all()\n\t{\n\t\treturn $this->options;\n\t}",
"protected function getOptions()\n {\n return array(\n\n );\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 {\n return array();\n }",
"public function getOptions()\n {\n return array_merge(parent::getOptions(), []);\n }",
"public function getOptions()\n {\n return array_merge(parent::getOptions(), []);\n }",
"protected function _options() {\n\t\t\treturn array();\n\t\t}",
"public final function getOptions()\n {\n return $this->_getOptions();\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 }",
"protected function getOptions()\n {\n return [\n ];\n }",
"public function getAll()\n {\n return $this->options;\n }",
"protected function getOptions()\r\n {\r\n return [\r\n\r\n ];\r\n }",
"public function getOptions()\n {\n return array();\n }",
"protected function getOptions()\n {\n return [];\n }",
"protected function getOptions()\n {\n return [];\n }",
"protected function getOptions()\n {\n return [];\n }",
"protected function getOptions()\n {\n return [];\n }",
"protected function getOptions()\n {\n return [];\n }",
"protected function getOptions()\n {\n return [];\n }",
"protected function getOptions()\n {\n return [];\n }",
"protected function getOptions()\n {\n return [];\n }",
"protected function getOptions()\n {\n return [];\n }",
"protected function getOptions() {\n return [];\n }",
"protected function getOptions() {\n return [];\n }",
"public function options()\n {\n return $this->options ?: [];\n }",
"public function option()\n\t{\n\t\treturn [];\n\t}",
"public function getOptions()\n {\n return $this->options ?: [];\n }",
"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();",
"public function options()\n\t{\n\t\treturn [];\n\t}",
"protected function getOptions()\r\n\t{\r\n\t\treturn isset($this->options) ? $this->options : array();\r\n\t}",
"public function get_options()\n\t\t{\n\t\t\treturn $this->_options;\n\t\t}",
"public function getOptions()\n {\n return $this->options->getOptions();\n }",
"public function getOptions()\n {\n return $this->get(self::OPTIONS);\n }",
"protected\n function getOptions() {\n return array();\n }",
"public function getOptions(): array\n {\n return $this->_options;\n }",
"public function getOptions(): array {\n return $this->options;\n }",
"public function getOptions(): array {\n return $this->options;\n }"
] | [
"0.82651615",
"0.8249841",
"0.8249841",
"0.8249841",
"0.8249841",
"0.8249841",
"0.8249841",
"0.8249841",
"0.82317203",
"0.82317203",
"0.82317203",
"0.82317203",
"0.82317203",
"0.82317203",
"0.82317203",
"0.82317203",
"0.82317203",
"0.82317203",
"0.82317203",
"0.82317203",
"0.82317203",
"0.8224862",
"0.821362",
"0.821362",
"0.821362",
"0.821362",
"0.821362",
"0.821362",
"0.821362",
"0.821362",
"0.821362",
"0.82042223",
"0.8204057",
"0.8204057",
"0.8204057",
"0.8204057",
"0.8167142",
"0.81649846",
"0.81649846",
"0.81649846",
"0.8138207",
"0.8121575",
"0.81034523",
"0.809965",
"0.809965",
"0.809965",
"0.809965",
"0.809965",
"0.809965",
"0.809965",
"0.80607355",
"0.80607355",
"0.8049373",
"0.8047988",
"0.80299693",
"0.80299693",
"0.80299693",
"0.80299693",
"0.80299693",
"0.7988469",
"0.7986088",
"0.7984941",
"0.798447",
"0.798447",
"0.798447",
"0.798447",
"0.798447",
"0.798447",
"0.798447",
"0.798447",
"0.798447",
"0.79558086",
"0.79558086",
"0.7911411",
"0.790569",
"0.78855914",
"0.7883108",
"0.7883108",
"0.7883108",
"0.7883108",
"0.7883108",
"0.7883108",
"0.7883108",
"0.7883108",
"0.7883108",
"0.7883108",
"0.7883108",
"0.7883108",
"0.7883108",
"0.7883108",
"0.7883108",
"0.7883108",
"0.7873923",
"0.78730994",
"0.78402424",
"0.78329045",
"0.7824702",
"0.7822379",
"0.77283466",
"0.771807",
"0.771807"
] | 0.0 | -1 |
Returns a single option or a default value. | public static function get_option( $option, $provider = null, $options = null, $default = false ) {
if( is_null( $options ) )
$options = self::get_options();
if( ! is_null( $provider ) )
return $options[$provider][$option] ?: $default;
return $options[$option] ?: $default;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getOption($option, $default = null);",
"public function getOption(string $name, mixed $default = null): mixed;",
"public function getOption($name, $default = NULL);",
"public function getOption($key, $default = NULL);",
"function get_option($option_name, $default_value = false)\n{\n if (!is_string($option_name)) {\n // Option name must be string\n return $default_value;\n }\n\n $opt = \\Controller::model(\"Option\", $option_name);\n if (!$opt->isAvailable()) {\n return $default_value;\n }\n\n // Return the value\n return $opt->get(\"option_value\");\n}",
"public function getOption($name, $default = null);",
"public function getOption($key, $default = NULL) {\n\n if (isset($this->options[$key])) {\n return $this->options[$key];\n }\n\n return $default;\n }",
"private function get_option() {\n\t\t$default = [\n\t\t\tself::STATUS => self::NOT_FETCHED,\n\t\t\tself::LAST_FETCH => 0,\n\t\t];\n\n\t\treturn get_option( self::OPTION_NAME, $default );\n\t}",
"public function getOption($name,$default_val = null){\n return isset($this->option_map[$name]) ? $this->option_map[$name] : $default_val;\n }",
"public function getOption($option, $default = NULL) {\n $options = $this->getOptions();\n return isset($options[$option]) ? $options[$option] : $default;\n }",
"function option($key = null, $default = null)\n {\n if (is_null($key)) {\n return app('option');\n }\n\n if (is_array($key)) {\n return app('option')->set($key);\n }\n\n return app('option')->get($key, $default);\n }",
"function ot_get_option( $option_id, $default = '' ) { \r\n\t\t$options = get_option( 'option_tree' );\r\n\t\t/* look for the saved value */\r\n\t\tif ( isset( $options[ $option_id ] ) && !empty( $options[ $option_id ] ) ) {\r\n\t\t\treturn $options[ $option_id ];\r\n\t\t}\r\n\t\treturn $default;\r\n\t}",
"public function getOption(string $key, mixed $default = null): mixed\n {\n return $this->options[$key] ?? $default;\n }",
"public function getOption ($key, $default = '') {\n $value = $default;\n\n # Search through sections and take the value from the first section\n foreach ($this->_sections as $section) {\n if (isset ($this->_values[$section.$key])) {\n $value = $this->_values[$section.$key];\n break;\n }\n }\n\n return $value;\n }",
"function getOption(&$options, $key = '', $default=null)\n {\n if (isset($options[$key])) return $options[$key];\n return $default;\n }",
"public final function getOption($option, $defaultValue = false)\n {\n if (isset($this->_options[$option]))\n return $this->_options[$option];\n return $defaultValue;\n }",
"public static function option($option=array(),$default=null){\n $array = get_option('mkui_options');\n if(!empty($array[\"{$option}\"]))\n return $array[\"{$option}\"];\n else\n return $default;\n }",
"function pegasus_get_option( $key = '', $default = false ) {\n\tif ( function_exists( 'cmb2_get_option' ) ) {\n\t\t// Use cmb2_get_option as it passes through some key filters.\n\t\treturn cmb2_get_option( pegasus_admin()->key, $key, $default );\n\t}\n\t// Fallback to get_option if CMB2 is not loaded yet.\n\t$opts = get_option( pegasus_admin()->key, $key, $default );\n\t$val = $default;\n\tif ( 'all' == $key ) {\n\t\t$val = $opts;\n\t} elseif ( is_array( $opts ) && array_key_exists( $key, $opts ) && false !== $opts[ $key ] ) {\n\t\t$val = $opts[ $key ];\n\t}\n\treturn $val;\n}",
"public function getValue($option, $altOption = false, $default = null) {\n\t\tif(isset($this->args[$option])) {\n\t\t\treturn $this->args[$option];\n\t\t}\n\t\tif($altOption && isset($this->args[$altOption])) {\n\t\t\treturn $this->args[$altOption];\n\t\t}\n\t\treturn $default;\n\t}",
"function elb_get_option( $key = '', $default = false ) {\n\tglobal $elb_options;\n\n\t$value = ! empty( $elb_options[ $key ] ) ? $elb_options[ $key ] : $default;\n\t$value = apply_filters( 'elb_get_option', $value, $key, $default );\n\n\treturn apply_filters( 'elb_get_option_' . $key, $value, $key, $default );\n}",
"public function getOption() {\n return $this->get(self::OPTION);\n }",
"function recurlywp_get_option( $option_name, $default_value = false ) {\n $current_value = get_option('recurlywp_options')[$option_name];\n\n // If no current value and has a default value\n if ( ! $current_value && $default_value ) {\n return $default_value;\n }\n return $current_value;\n}",
"protected function get_option($key = null, $default = false) {\n\t\tstatic $option = null;\n\t\tif (null === $option) {\n\t\t\t$option = get_option($this->option_name, false);\n\t\t\tif (false === $option)\n\t\t\t\t$option = array(\n\t\t\t\t\t'version' => 0,\n\t\t\t\t);\n\t\t}\n\n\t\tif (null === $key)\n\t\t\treturn $option;\n\n\t\tif (! isset($option[$key]))\n\t\t\treturn $default;\n\n\t\treturn $option[$key];\n\t}",
"public function getOption(string $key, $default = null, bool $throwEx = false)\n {\n if (true === array_key_exists($key, $this->options)) {\n return $this->options[$key];\n }\n if (true === $throwEx) {\n $this->error(\"Undefined option: $key.\");\n }\n return $default;\n }",
"public function get_option($option_key, $default = false) {\n\t\t$options = $this->get();\n\t\treturn isset($options[$option_key]) ? $options[$option_key] : $default;\n\t}",
"public function option($key, $default = null)\n {\n return array_get($this->options(true), $key, $default);\n }",
"public function getOption($name, $default = null){\n\t\t$return = $default;\n\t\tif( array_key_exists($name, $this->options) ){\n\t\t\t$return = $this->options[$name];\n\t\t}elseif( array_key_exists($name, $this->configFileOptions) ){\n\t\t\t$return = $this->configFileOptions[$name];\n\t\t}elseif( array_key_exists($name, $this->env) ){\n\t\t\t$return = $this->env[$name];\n\t\t}\n\t\treturn $return;\n\t}",
"public function getOption($key, $default = null)\n {\n if (array_key_exists($key, $this->options)) {\n return $this->options[$key];\n } else {\n return $default;\n }\n }",
"public function getOpt($option) {}",
"function &getOption($k = null, $default = null)\n {\n return option('get', $k, $default);\n }",
"function option($key = null, $default = null)\n {\n $option = app('\\Laranext\\Models\\Option');\n\n if (is_array($key)) {\n $option->set($key);\n } elseif (! is_null($key)) {\n return $option->get($key, $default);\n }\n\n return $option;\n }",
"public function get_option($option) {\n if (isset($this->options[$option])) return $this->options[$option];\n return null;\n }",
"function bdpp_get_option( $key = '', $default = false ) {\n\tglobal $bdpp_options;\n\t\n\t$value = !empty($bdpp_options[$key]) ? $bdpp_options[ $key ] : $default;\n\t$value = apply_filters( 'bdpp_get_option', $value, $key, $default );\n\t\n\treturn apply_filters( 'bdpp_option_' . $key, $value, $key, $default );\n}",
"public function option($option, $default) {\n return $this->worker()->option($option, $default);\n }",
"public function get( $name, $default = '' )\n\t\t{\n\t\t\tif ( isset( $this->_options[$name] ) )\n\t\t\t\treturn $this->_options[$name];\n\t\t\treturn $default;\n\t\t}",
"function dokan_get_option( $option, $section, $default = '' ) {\n\n $options = get_option( $section );\n\n if ( isset( $options[$option] ) ) {\n return $options[$option];\n }\n\n return $default;\n}",
"public function getOption($key = null, $default = null)\n {\n if (is_null($key)) {\n return $this->options;\n } elseif (array_key_exists($key, $this->options)) {\n return $this->options[$key];\n }\n\n return $default;\n }",
"public function getOption($name, $default = null)\n {\n return isset($this->options[$name]) ? $this->options[$name] : $default;\n }",
"public function getOption(string $option, $default = null) {\n return $this->options[$option] ?? $default;\n }",
"function acapi_get_option($name) {\n // Make sure $name is an acapi option.\n $options = acapi_common_options();\n if (!isset($options[$name])) {\n return drush_set_error('ACAPI_UNKNOWN_OPTION', dt('Unknown ac-api option @name.', array('@name' => $name)));\n }\n\n // If the user specified --$name=<value> on the command line, return <value>.\n $value = drush_get_option($name, NULL);\n if (isset($value)) {\n return $value;\n }\n\n // If the ac-config file sets $name, return the value.\n $values = acapi_load_options($name);\n if (isset($values[$name])) {\n return $values[$name];\n }\n\n // If $name has a default value, return it.\n if (!empty($options[$name]['default_value'])) {\n return $options[$name]['default_value'];\n }\n\n // No specified value, no default, return NULL.\n return;\n}",
"function get_value_or_default($value,$default='')\n{\n\treturn (!empty($value)) ? $default : $value;\n}",
"public function getOption($index = null, $default = null)\n {\n return $this->optionRequested->get($index, $default);\n }",
"public function get_option($option, $default) {\n\t\t\t$options = $this->loop_options;\n\n\t\t\tif(isset($options[$option])) {\n\t\t\t\treturn $options[$option];\n\t\t\t}\n\n\t\t\treturn $default;\n\t\t}",
"public function get($key, $default = null)\n\t{\n\t\tif ($option = self::where('key', $key)->first()) {\n\t\t\treturn $option->value;\n\t\t}\n\n\t\treturn $default;\n\t}",
"public function getOption($key, $default = null)\n {\n return array_get($this->options, $key, $default);\n }",
"public function getOption($key, $default = null)\n {\n return array_get($this->options, $key, $default);\n }",
"public function get() {\n\t\treturn $this->options->get( self::OPTION );\n\t}",
"public function get($key, $default = null)\n {\n return array_key_exists($key, $this->parsedOptions) ? $this->parsedOptions[$key] : $default;\n }",
"final protected function getOption($option) {\n return isset($this->valueOptions[$option]) ? $this->valueOptions[$option] : null;\n }",
"public function getDefaultOption(string $name);",
"public function get($key, $default = null)\n {\n return get_option($key, $default);\n }",
"public function getDefault()\n {\n return $this->getOption('default');\n }",
"function get_option($option, $section, $default = '')\n {\n }",
"public static function get_option( $option_name, $default = null, $value = array() ) {\n\t\t$options = get_theme_mods(); // get all theme options\n\t\t$option_value = null;\n\t\t$option_value_isset = false; // flag to check option value is set\n\t\t$type = ''; // option type\n\n\t\t/**\n\t\t * Get option value\n\t\t */\n\t\tif ( isset( $options[ $option_name ] ) ) {\n\t\t\t$option_value = $options[ $option_name ];\n\t\t\t$option_value_isset = true;\n\t\t}\n\t\t// return force default value\n\t\telseif ( $default ) {\n\t\t\t$option_value = $default;\n\t\t\t$option_value_isset = true;\n\t\t}\n\t\t// return default value from third argument if not empty\n\t\telseif ( isset( $value['default'] ) && \n\t\t\t isset( $value['id'] ) && \n\t\t\t $option_name === $value['id'] ) {\n\t\t\t$option_value = $value['default'];\n\t\t\t$option_value_isset = true;\n\t\t} \n\n\t\t// get option type\n\t\tif ( isset( $value['type'] ) ) {\n\t\t\t$type = $value['type'];\t\t\t\n\t\t}\n\n\t\t// fall back for backend and frontend get_option\n\t\tif ( empty( $type ) || ! $option_value_isset || empty( $value ) ) {\n\t\t\t$option = self::get_option_arguments( $option_name );\n\n\t\t\tif ( empty( $type ) && isset( $option['type'] ) ) {\n\t\t\t\t$type = $option['type']; // get option type\n\t\t\t}\n\n\t\t\tif ( ! $option_value_isset && isset( $option['default'] ) ) {\n\t\t\t\t$option_value = $option['default']; \n\t\t\t\t$option_value_isset = true;\n\t\t\t}\n\n\t\t\tif ( empty( $value ) ) {\n\t\t\t\t$value = $option;\n\t\t\t}\n\t\t}\n\n\t\t// sanitize the option value\n\t\t$type = sanitize_title( $type );\n\n\t\tif ( is_array( $option_value ) ) {\n\t\t\t$option_value = array_map( 'stripslashes_deep', $option_value );\n\t\t} elseif ( ! is_null( $option_value ) ) {\n\t\t\t$option_value = stripslashes( $option_value );\n\t\t}\n\n\t\t// return the filter value\n\t\treturn apply_filters( 'kopa_get_option_' . $type, $option_value, $value );\n\t}",
"public function getOpt(string $name, $default = null)\n {\n // is long-opt\n if (isset($name[1])) {\n return $this->lOpt($name, $default);\n }\n\n return $this->sOpt($name, $default);\n }",
"public function getDefaultProductOptionValue(): ?ProductOptionValue\n {\n $criteria = Criteria::create();\n $criteria->where(Criteria::expr()->eq('default_value', true))\n ->setMaxResults(1);\n\n $values = $this->product_option_values->matching($criteria);\n\n if ($value = $values->first()) {\n return $value;\n }\n\n return null;\n }",
"public function get_option( $key, $default = '' ) {\n\t\t$option = $this->hb_customize->transforms->unwrap( array_safe_get( $this->options, (string) $key, $default ) );\n\n\t\treturn $option;\n\t}",
"public function getValidOptionOrDefault($key, $defaultOption = '')\n {\n if (isset($this->options[$key])) {\n return $this->options[$key];\n }\n\n return $defaultOption;\n }",
"function option($key = null, $default = null, $raw = false)\n {\n $options = app('options');\n\n if (is_null($key)) {\n return $options;\n }\n\n if (is_array($key)) {\n foreach ($key as $innerKey => $innerValue) {\n $options->set($innerKey, $innerValue);\n }\n return;\n }\n //$optionsData = $options->get();\n //return $optionsData[$key]['option_value'];\n return $options->get($key, $default, $raw)['option_value'];\n }",
"function getOption($inOption, $inDefault = null) {\n\t\treturn $this->getOptionsSet()->getOptions($inOption, $inDefault);\n\t}",
"function get_site_option($option, $default_value = \\false, $deprecated = \\true)\n {\n }",
"function qa_opt($name, $value = null)\n{\n\tglobal $qa_options_cache;\n\n\tif (!isset($value) && isset($qa_options_cache[$name]))\n\t\treturn $qa_options_cache[$name]; // quick shortcut to reduce calls to qa_get_options()\n\n\trequire_once QA_INCLUDE_DIR . 'app/options.php';\n\n\tif (isset($value))\n\t\tqa_set_option($name, $value);\n\n\t$options = qa_get_options(array($name));\n\n\treturn $options[$name];\n}",
"public function first(): ?Option\n {\n $option = reset($this->options);\n\n return $option === false ? null : $option;\n }",
"public function getOption()\n {\n return $this->option;\n }",
"public function getOption()\n {\n return $this->option;\n }",
"public function getOption($key, $default = null)\n {\n if (!$this->hasOption($key)) {\n return $default;\n }\n\n return $this->options[$key];\n }",
"protected function getOption($option, $default = false)\n\t{\n\t\treturn Stringify::deepStripSlash(\n\t\t\tget_option($option,$default)\n\t\t);\n\t}",
"public function getOption($key, $default = null)\n {\n if (is_array($key)) {\n foreach ($key as $k) {\n if ($this->hasOption($k)) {\n return $this->getOption($k);\n }\n }\n return $default;\n }\n if (!$this->hasOption($key)) {\n return $default;\n }\n return $this->_options[$key];\n }",
"public static function option(string $key, $default = null)\n {\n return Arr::get(static::$options, $key, $default);\n }",
"public function option($option, $default = NULL) {\n if ($this->_moduleOptions === NULL) {\n $this->_moduleOptions = $this->papaya()->plugins->options[PapayaModuleElasticsearchSuggestionConnector::MODULE_GUID];\n }\n return $this->_moduleOptions->get($option, $default);\n }",
"public function getValue() {\n \n $_aParams = func_get_args(); \n return AdminPageFramework_WPUtility::getOption( \n $this->oProp->sOptionKey, \n $_aParams, \n null, // default\n $this->getSavedOptions() + $this->oProp->getDefaultOptions( $this->oForm->aFields ) // additional array to merge with the options\n );\n \n }",
"public function getOption($key=NULL) {\r\n return is_null($key) ? $this->options : (isset($this->options[$key]) ? $this->options[$key] : NULL);\r\n }",
"function getOption($name);",
"public static function option($name, $default = false)\n {\n return get_option($name, $default);\n }",
"public static function getOption($options, $key, $default = null) {\n return key_exists($key, $options) ? array_pull($options, $key) : $default;\n }",
"public function getOption($key, $options = null, $default = null)\n {\n if (is_array($options) && array_key_exists($key, $options)) {\n $value = $options[$key];\n } elseif (is_array($this->options) && array_key_exists($key, $this->options)) {\n $value = $this->options[$key];\n } else {\n $value = $default;\n }\n return $value;\n }",
"static public function get_option( $key, $default = false ) {\n\n\t\tif ( empty( $key ) ) {\n\t\t\treturn $default;\n\t\t}\n\n\t\t$plugin_options = get_option( 'plugin_name_settings', array() );\n\n\t\t$value = isset( $plugin_options[ $key ] ) ? $plugin_options[ $key ] : $default;\n\n\t\treturn $value;\n\t}",
"public function getOption() {\n\t\treturn $this->_option;\n\t}",
"public static function setting($option=array(),$default=null){\n $array = get_option('mobilekit_options');\n if(!empty($array[\"{$option}\"]))\n return $array[\"{$option}\"];\n else\n return $default;\n }",
"public function getOption($name, $default = null)\n\t{\n\t\tif (!isset($this->options[$name])) {\n\t\t\treturn $default;\n\t\t}\n\n\t\treturn $this->options[$name];\n\t}",
"function get_option($option_key) {\n if (!isset($result)) {\n $result = get_option($option_key);\n }\n\n return $result;\n }",
"function monsterinsights_get_option( $key = '', $default = false ) {\n\tglobal $monsterinsights_settings;\n\t$value = ! empty( $monsterinsights_settings[ $key ] ) ? $monsterinsights_settings[ $key ] : $default;\n\t$value = apply_filters( 'monsterinsights_get_option', $value, $key, $default );\n\treturn apply_filters( 'monsterinsights_get_option_' . $key, $value, $key, $default );\n}",
"function wpjsfsp_get_option( $key, $default = false ) {\n\treturn \\WPJSFSP\\wpjsfsp_get_option( $key, $default );\n}",
"function get_blog_option($id, $option, $default_value = \\false)\n {\n }",
"function cpo_get_option( $option_name = '', $option_array = 'ctct_settings' ) {\n\t//Determines whether to grab current language, or original language's option\n\t$option_list_name = $option_array;\n\t$option_list = get_option( $option_list_name, false );\n\tif ( $option_list && isset( $option_list[ $option_name ] ) ) {\n\t\t$option_value = $option_list[ $option_name ];\n\t} else {\n\t\t$option_value = false;\n\t}\n\n\treturn $option_value;\n}",
"public function getOption($name, $default = null)\n {\n if (array_key_exists($name, $this->options)) {\n return $this->options[$name];\n }\n\n return $default;\n }",
"public function getOption($name);",
"public function getOption($name);",
"public function getOption($name);",
"public function getSomeOption() {}",
"public function getOption(string $name);",
"public function getOption(string $name);",
"function harvest_option( $option, $default = false ) {\n\tif( class_exists( 'CTC_Extender' ) && ctcex_has_option( $option ) )\n\t\treturn ctcex_get_option( $option, $default );\n\t\n\t$theme_data = wp_get_theme();\n\t$theme_safename = sanitize_title( $theme_data );\n\t$options = get_option( $theme_safename . '-options' );\n\tif( isset( $options[ $option ] ) ) \n\t\treturn $options[ $option ];\n\telse\n\t\treturn $default;\n}",
"function get_option( $option ) {\n\t\tif ( isset ( $this->options[$option] ) )\n\t\t\treturn $this->options[$option];\n\t\telse\n\t\t\treturn false;\n\t}",
"public function get_option($key)\n {\n $options = $this->get_options();\n return is_array($options) && array_key_exists($key, $options) ?\n $options[$key] : $this->get_option_default($key);\n }",
"public function getOption(string $name, $default = null)\n {\n return $this->getOpt($name, $default);\n }",
"public function getOption($option)\n {\n return isset($this->options[$option]) ? $this->options[$option] : null;\n }",
"function contact_get_option( $key = '', $default = false ) {\n\tif ( function_exists( 'cmb2_get_option' ) ) {\n\t\t// Use cmb2_get_option as it passes through some key filters.\n\t\treturn cmb2_get_option( 'woody_contact_details', $key, $default );\n\t}\n\t// Fallback to get_option if CMB2 is not loaded yet.\n\t$opts = get_option( 'woody_contact_details', $default );\n\t$val = $default;\n\tif ( 'all' == $key ) {\n\t\t$val = $opts;\n\t} elseif ( is_array( $opts ) && array_key_exists( $key, $opts ) && false !== $opts[ $key ] ) {\n\t\t$val = $opts[ $key ];\n\t}\n\treturn $val;\n}",
"public function get_option( $key, $default = false ) {\n if ( !array_key_exists( $key, $this->options ) ) {\n $this->options[ $key ] = get_option( 'yith-wcbk-google-calendar-option-' . $key, $default );\n }\n\n return $this->options[ $key ];\n }",
"public function getOption($option)\n {\n return $this->options[$option] ?? false;\n }",
"function getOption($option)\n {\n return isset($this->_options[$option]) ? $this->_options[$option] : null;\n }"
] | [
"0.8090809",
"0.7992185",
"0.792235",
"0.7831958",
"0.7804693",
"0.775851",
"0.75745773",
"0.7558324",
"0.7472344",
"0.7433378",
"0.73978025",
"0.738285",
"0.73435485",
"0.72956705",
"0.72638816",
"0.726272",
"0.7249118",
"0.7226512",
"0.72240597",
"0.72008735",
"0.71685785",
"0.7166082",
"0.7164985",
"0.71599925",
"0.7127917",
"0.7115576",
"0.71029526",
"0.70974225",
"0.7092579",
"0.70884585",
"0.7080624",
"0.70638806",
"0.7030009",
"0.7022811",
"0.70072603",
"0.6998981",
"0.69830996",
"0.69740427",
"0.6962774",
"0.6960128",
"0.6951629",
"0.6951624",
"0.69515693",
"0.6946874",
"0.6937373",
"0.6937373",
"0.69156355",
"0.6913517",
"0.6898456",
"0.6898184",
"0.6891403",
"0.68904275",
"0.6888926",
"0.68869716",
"0.68869394",
"0.68780774",
"0.6873265",
"0.6864314",
"0.6863423",
"0.68540674",
"0.6838198",
"0.6831507",
"0.6824497",
"0.68178195",
"0.68178195",
"0.67940956",
"0.6790103",
"0.6789317",
"0.67564523",
"0.67485017",
"0.67459804",
"0.6724717",
"0.67150044",
"0.67124724",
"0.6708566",
"0.67049754",
"0.67005736",
"0.6700222",
"0.6695066",
"0.66580445",
"0.6652465",
"0.66396755",
"0.66381204",
"0.6627272",
"0.662562",
"0.6620435",
"0.66184956",
"0.66184956",
"0.66184956",
"0.66046715",
"0.65991974",
"0.65991974",
"0.65809184",
"0.6575045",
"0.6573599",
"0.6571002",
"0.65483856",
"0.653088",
"0.6529102",
"0.6525106",
"0.6518996"
] | 0.0 | -1 |
Registers available settings with WordPress. Note that get_called_class() must be used to call a static method. | public static function register_settings() {
register_setting( 'omnimailer', 'omnimailer', array( get_called_class(), 'validate_options' ) );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function register_settings(){\n\n\t\t// Register our option\n\t\tregister_setting( 'slack-post-types', 'slack-post-types', array( $this, 'sanitize' ) );\n\n\t\t// Add post post-type as default\n\t\tadd_option( 'slack-post-types', array( 'post' => 1 ) );\n\t}",
"public function register_settings()\n {\n }",
"public function register_settings()\n {\n }",
"public static function register_settings() {\n\t\t\tregister_setting( 'theme_options', 'theme_options', array( 'IODD_Theme_Options', 'sanitize' ) );\n\t\t}",
"public static function register_settings() {\n\t\t\tregister_setting( 'ELMT_theme_options', 'ELMT_theme_options', array( 'ELMT_theme_options', 'sanitize' ) );\n\t\t}",
"public static function register_settings() {\n\t\t// Settings\n\t\t$settings = array(\n\t\t\tself::EDIT_PATH_OPTION => array(\n\t\t\t\t'weight' => 124,\n\t\t\t\t'settings' => array(\n\t\t\t\t\tself::EDIT_PATH_OPTION => array(\n\t\t\t\t\t\t'label' => self::__( 'Merchant Edit Profile Path' ),\n\t\t\t\t\t\t'option' => array(\n\t\t\t\t\t\t\t'label' => trailingslashit( get_home_url() ),\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'default' => self::$edit_path\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\tdo_action( 'gb_settings', $settings, Group_Buying_UI::SETTINGS_PAGE );\n\t}",
"function wshop_settings_init(){\n register_setting('wshop_settings', 'wshop_api_key');\n register_setting('wshop_settings', 'wshop_domain', 'remove_protocol');\n // register_setting('wshop_settings', 'wshop_app_id');\n register_setting('wshop_settings', 'wshop_rewrite_slug');\n register_setting('wshop_settings', 'wshop_collections_slug');\n }",
"public function register_settings() {\n\n\t\tadd_settings_section(\n\t \t'thaim_utilities_section',\n\t \t__( 'Thaim Utilities Settings', 'thaim-utilities' ),\n\t \tarray( $this, 'settings_callback_section' ),\n\t \t'buddypress'\n\t );\n\n\t $settings = apply_filters( 'thaim_utilities_settings_fields', array( \n\t \tarray(\n\t \t\t'name' => 'thaim_link_wordpress_org',\n\t \t\t'title' => __( 'WordPress.org account', 'thaim-utilities' ),\n\t \t\t'display' => array( $this, 'link_wp_org_callback' ),\n\t \t\t'sanitize' => 'sanitize_text_field',\n\t \t),\n\t \tarray(\n\t \t\t'name' => 'thaim_perpage_wordpress_org',\n\t \t\t'title' => __( 'Number of WordPress plugins to display', 'thaim-utilities' ),\n\t \t\t'display' => array( $this, 'perpage_wp_org_callback' ),\n\t \t\t'sanitize' => 'absint',\n\t \t),\n\t \tarray(\n\t \t\t'name' => 'thaim_list_github_repos',\n\t \t\t'title' => __( 'List your github repos', 'thaim-utilities' ),\n\t \t\t'display' => array( $this, 'list_github_repos_callback' ),\n\t \t\t'sanitize' => 'sanitize_text_field',\n\t \t),\n\t ) );\n\n\t\tforeach( $settings as $setting ) {\n\t\t\tadd_settings_field(\n\t\t\t\t$setting['name'],\n\t\t\t\t$setting['title'],\n\t\t\t\t$setting['display'],\n\t\t\t\t'buddypress',\n\t\t\t\t'thaim_utilities_section'\n\t\t\t);\n\n\t\t\tregister_setting(\n\t\t\t\t'buddypress',\n\t\t\t\t$setting['name'],\n\t\t\t\t$setting['sanitize']\n\t\t\t);\n\t\t}\n\t}",
"public function register_settings() {\n\n\t\t// This include creates a variable called $settings.\n\t\t// TODO: Load this from a file instead ...\n\t\t$settings = array(\n\t\t\tarray(\n\t\t\t\t/*Sections*/\n\t\t\t\t'name'\t\t=> 'default',\n\t\t\t\t'title'\t\t=> __('General Settings','wpchaosclient'),\n\t\t\t\t'fields'\t=> array(\n\t\t\t\t\t/*Section fields*/\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'wpchaos-servicepath',\n\t\t\t\t\t\t'title' => __('Service Path','wpchaosclient'),\n\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'wpchaos-clientguid',\n\t\t\t\t\t\t'title' => __('Client GUID','wpchaosclient'),\n\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'wpchaos-accesspoint-guid',\n\t\t\t\t\t\t'title' => __('Access Point GUID','wpchaosclient'),\n\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'wpchaos-email',\n\t\t\t\t\t\t'title' => __('E-mail used for authentication','wpchaosclient'),\n\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'wpchaos-password',\n\t\t\t\t\t\t'title' => __('Password','wpchaosclient'),\n\t\t\t\t\t\t'type' => 'password'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t$this->settings = apply_filters('wpchaos-config', $settings);\n\n\t\tforeach($this->settings as $section) {\n\n\t\t\t//Validate\n\t\t\tif(!isset($section['name'],$section['title'],$section['fields']))\n\t\t\t\tcontinue;\n\n\t\t\t//Add section to WordPress\n\t\t\tadd_settings_section(\n\t\t\t\t$section['name'],\n\t\t\t\t$section['title'],\n\t\t\t\tnull,\n\t\t\t\t$this->menu_page\n\t\t\t);\n\n\t\t\tforeach($section['fields'] as $setting) {\n\t\t\t\t//Validate\n\t\t \t\tif(!isset($setting['title'],$setting['name'],$setting['type']))\n\t\t \t\t\tcontinue;\n\n\t\t \t\t//Are there any preconditions for this field to work properly?\n\t\t \t\tif(isset($setting['precond'])) {\n\t\t \t\t\tforeach($setting['precond'] as $precondition) {\n\t\t \t\t\t\tif(!$precondition['cond'])\n\t\t \t\t\t\t\tadd_action( 'admin_notices', function() use(&$precondition) { echo '<div class=\"error\"><p>'.$precondition['message'].'</p></div>'; },10);\n\t\t \t\t\t}\n\t\t \t\t}\n\n\t\t \t\t// Add field to section\n\t\t \t\tadd_settings_field($setting['name'],\n\t\t\t\t\t$setting['title'],\n\t\t\t\t\tarray(&$this,'create_setting_field'),\n\t\t\t\t\t$this->menu_page,\n\t\t\t\t\t$section['name'],\n\t\t\t\t\t$setting);\n\n\t\t \t\t// Register field to be manipulated with\n\t\t \t\tregister_setting($this->menu_page,$setting['name']);\n\t\t\t}\n\n\t\t}\n\n\t }",
"public static function register() {\n\t\t$plugin = new self();\n\n\t\t// Return data to AJAX.\n\t\tadd_action( 'wp_ajax_conf_sch_get_users', [ $plugin, 'ajax_get_users' ] );\n\t\tadd_action( 'wp_ajax_conf_sch_get_terms', [ $plugin, 'ajax_get_terms' ] );\n\t\tadd_action( 'wp_ajax_conf_sch_get_posts', [ $plugin, 'ajax_get_posts' ] );\n\t\tadd_action( 'wp_ajax_conf_sch_get_group_events', [ $plugin, 'ajax_get_group_events' ] );\n\t\tadd_action( 'wp_ajax_conf_sch_clear_proposal_cache', [ $plugin, 'ajax_clear_proposal_cache' ] );\n\n\t\t// Add styles and scripts for the tools page.\n\t\tadd_action( 'admin_enqueue_scripts', [ $plugin, 'enqueue_styles_scripts' ], 20 );\n\n\t\t// Add regular settings page.\n\t\tadd_action( 'admin_menu', [ $plugin, 'add_subpages' ] );\n\n\t\t// Register our settings.\n\t\tadd_action( 'admin_init', [ $plugin, 'register_settings' ], 1 );\n\n\t\t// Add our settings meta boxes.\n\t\tadd_action( 'admin_head-schedule_page_conf-schedule-settings', [ $plugin, 'add_settings_meta_boxes' ] );\n\n\t\t// Add admin notices.\n\t\tadd_action( 'admin_notices', [ $plugin, 'print_admin_notice' ] );\n\n\t\t// Add meta boxes.\n\t\tadd_action( 'add_meta_boxes', [ $plugin, 'add_meta_boxes' ], 1, 2 );\n\t\tadd_action( 'edit_form_after_title', [ $plugin, 'print_meta_boxes_after_title' ], 0 );\n\n\t\t// Save meta box data.\n\t\tadd_action( 'save_post', [ $plugin, 'save_meta_box_data_pre' ], 0, 3 );\n\t\tadd_action( 'save_post', [ $plugin, 'save_meta_box_data' ], 20, 3 );\n\n\t\t// Set it up so we can do file uploads.\n\t\tadd_action( 'post_edit_form_tag', [ $plugin, 'post_edit_form_tag' ] );\n\n\t\t// Add custom columns.\n\t\tadd_filter( 'manage_posts_columns', [ $plugin, 'add_posts_columns' ], 10, 2 );\n\n\t\t// Populate our custom admin columns.\n\t\tadd_action( 'manage_schedule_posts_custom_column', [ $plugin, 'populate_posts_columns' ], 10, 2 );\n\t\tadd_action( 'manage_speakers_posts_custom_column', [ $plugin, 'populate_posts_columns' ], 10, 2 );\n\n\t\t// Populate ACF field choices.\n\t\tadd_filter( 'acf/load_field/name=proposal', [ $plugin, 'load_proposal_field_choices' ] );\n\t\tadd_filter( 'acf/load_field/name=sponsor', [ $plugin, 'load_sponsor_field_choices' ] );\n\n\t\t// Process downloads.\n\t\tadd_action( 'admin_init', [ $plugin, 'process_dwnld_session_info' ] );\n\t\tadd_action( 'admin_init', [ $plugin, 'process_dwnld_hootsuite_template' ] );\n\n\t}",
"function sa_register_settings() {\n\t// Register settings and call sanitation functions\n\tregister_setting( 'tsc_theme_options', 'sa_options', 'sa_validate_options' );\n}",
"function wcusp_register_settings() {\n\tregister_setting('wcusp_settings_group', 'wcusp_settings');\n}",
"public function register_settings() {\n\n\t\tadd_settings_section(\n\t\t\t'schedule_a_visit_to_sherpa_settings_section',\n\t\t\t__( 'Schedule a Visit Leads to Sherpa', 'schedule-a-visit-to-sherpa' ),\n\t\t\t__return_false(),\n\t\t\t'schedule-a-visit-to-sherpa'\n\t\t);\n\n\t\t$fields = $this->get_settings_fields();\n\n\t\tforeach ( $fields as $field ) {\n\n\t\t\t$field = wp_parse_args( $field, array(\n\t\t\t\t'settings_label' => '',\n\t\t\t) );\n\n\t\t\t$callback = 'rbm_fh_do_field_' . $field['type'];\n\n\t\t\tadd_settings_field(\n\t\t\t\t$field['name'],\n\t\t\t\t$field['settings_label'],\n\t\t\t\t( is_callable( $callback ) ) ? 'rbm_fh_do_field_' . $field['type'] : 'rbm_fh_missing_callback',\n\t\t\t\t'schedule-a-visit-to-sherpa',\n\t\t\t\t'schedule_a_visit_to_sherpa_settings_section',\n\t\t\t\t$field\n\t\t\t);\n\n\t\t\tregister_setting( 'schedule_a_visit_to_sherpa_settings_section', $field['name'] );\n\n\t\t}\n\n\t}",
"function register_mysettings()\n{\nregister_setting( 'spreadshop-settings-shop', 'spreadshop_shop_id' );\nregister_setting( 'spreadshop-settings-shop', 'spreadshop_api_key' );\nregister_setting( 'spreadshop-settings-shop', 'spreadshop_api_secret' );\nregister_setting( 'spreadshop-settings-shop', 'spreadshop_product_detail_page' );\nregister_setting( 'spreadshop-settings-shop', 'spreadshop_product_list_page' );\nregister_setting( 'spreadshop-settings-shop', 'spreadshop_designer_page' );\nregister_setting( 'spreadshop-settings-shop', 'spreadshop_article_list_page' );\nregister_setting( 'spreadshop-settings-shop', 'spreadshop_article_detail_page' );\nregister_setting( 'spreadshop-settings-shop', 'spreadshop_items_per_page' );\nregister_setting( 'spreadshop-settings-shop', 'spreadshop_language' );\nregister_setting( 'spreadshop-settings-shop', 'spreadshop_locale' );\nregister_setting( 'spreadshop-settings-shop', 'spreadshop_domain' );\n}",
"public function page_init() { \n\n\t\t\tif (!get_option('dls_settings_site_id')) {\n\t\t\t\tadd_option('dls_settings_site_id');\n\t\t\t}\n\n\t\t\tif (!get_option('dls_settings_enabled_post_types')) {\n\t\t\t\tadd_option('dls_settings_enabled_post_types');\n\t\t\t}\n\n\t\t\tif (!get_option('dls_settings_replace_host_list')) {\n\t\t\t\tadd_option('dls_settings_replace_host_list');\n }\n\n\t\t\tif (!get_option('dls_settings_auto_redirect_to_admin_page')) {\n\t\t\t\tadd_option('dls_settings_auto_redirect_to_admin_page');\n }\n\n\t\t\tif (!get_option('dls_overwrite_viewable_permalink')) {\n\t\t\t\tadd_option('dls_overwrite_viewable_permalink');\n }\n\n \t\t\tif (!get_option('dls_overwrite_viewable_permalink_host')) {\n\t\t\t\tadd_option('dls_overwrite_viewable_permalink_host');\n\t\t\t}\n \n register_setting( 'my_option_group', 'dls_settings_site_id', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_settings_enabled_post_types', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_settings_replace_host_list', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_settings_auto_redirect_to_admin_page', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_overwrite_viewable_permalink', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_overwrite_viewable_permalink_host', array( $this, 'sanitize' ) );\n\n add_settings_section( 'settings_site_id', 'Site ID', array( $this, 'print_site_id' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Set the site id for this site', array( $this, 'site_id_callback'), 'my-setting-admin', 'settings_site_id' ); \n\n add_settings_section( 'setting_section_id', 'Post types settings', array( $this, 'print_post_types_info' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Select post types', array( $this, 'post_type_callback'), 'my-setting-admin', 'setting_section_id' ); \n\n add_settings_section( 'settings_replace_hosts', 'Hosts to replace', array( $this, 'print_replace_hosts_info' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'List of hosts', array( $this, 'replace_hosts_callback'), 'my-setting-admin', 'settings_replace_hosts' ); \n\n add_settings_section( 'settings_auto_redirect_to_admin', 'Auto redirect to admin page', array( $this, 'print_auto_redirect_to_admin' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Auto redirect to admin page', array( $this, 'auto_redirect_to_admin_callback'), 'my-setting-admin', 'settings_auto_redirect_to_admin' ); \n\n add_settings_section( 'settings_overwrite_viewable_permalink', 'Overwrite the viewable permalink', array( $this, 'print_overwrite_viewable_permalink' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Overwrite the viewable permalink', array( $this, 'overwrite_viewable_permalink_callback'), 'my-setting-admin', 'settings_overwrite_viewable_permalink' ); \n\t\t\tadd_settings_field( 'dls-settings-overwrite_viewable_permalink_host', 'Overwrite the viewable permalink host', array( $this, 'overwrite_viewable_permalink_host_callback'), 'my-setting-admin', 'settings_overwrite_viewable_permalink' ); \n\n\t\t}",
"public function register_settings_sections() {\n\t\tregister_setting( 'wsuwp-analytics', 'wsuwp_google_verify', array( $this, 'sanitize_google_verify' ) );\n\t\tregister_setting( 'wsuwp-analytics', 'wsuwp_bing_verify', array( $this, 'sanitize_bing_verify' ) );\n\t\tregister_setting( 'wsuwp-analytics', 'wsuwp_facebook_verify', array( $this, 'sanitize_facebook_verify' ) );\n\t\tregister_setting( 'wsuwp-analytics', 'wsuwp_ga_id', array( $this, 'sanitize_ga_id' ) );\n\t\tregister_setting( 'wsuwp-analytics', 'wsuwp_ga4_id', 'sanitize_text_field' );\n\t\tregister_setting( 'wsuwp-analytics', 'wsuwp_analytics_option_map', array( $this, 'sanitize_wsuwp_analytics_option_map' ) );\n\t}",
"function register_settings() {\n\t\t\tif( get_option( $this->func . '_settings' ) == false ) {\n\t\t\t\tadd_option( $this->func . '_settings' );\n\t\t\t}\n\n\t\t\tforeach( $this->get_registered_settings() as $tab => $sections ) {\n\t\t\t\tforeach( $sections as $section => $settings ) {\n\t\t\t\t\t// Check for backwards compatibility\n\t\t\t\t\t$section_tabs = $this->get_settings_tab_sections( $tab );\n\n\t\t\t\t\tif( ! is_array( $section_tabs ) || ! array_key_exists( $section, $section_tabs ) ) {\n\t\t\t\t\t\t$section = 'main';\n\t\t\t\t\t\t$settings = $sections;\n\t\t\t\t\t}\n\n\t\t\t\t\tadd_settings_section(\n\t\t\t\t\t\t$this->func . '_settings_' . $tab . '_' . $section,\n\t\t\t\t\t\t__return_null(),\n\t\t\t\t\t\t'__return_false',\n\t\t\t\t\t\t$this->func . '_settings_' . $tab . '_' . $section\n\t\t\t\t\t);\n\n\t\t\t\t\tforeach( $settings as $option ) {\n\t\t\t\t\t\t// For backwards compatibility\n\t\t\t\t\t\tif( empty( $option['id'] ) ) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$name = isset( $option['name'] ) ? $option['name'] : '';\n\n\t\t\t\t\t\tadd_settings_field(\n\t\t\t\t\t\t\t$this->func . '_settings[' . $option['id'] . ']',\n\t\t\t\t\t\t\t$name,\n\t\t\t\t\t\t\tfunction_exists( $this->func . '_' . $option['type'] . '_callback' ) ? $this->func . '_' . $option['type'] . '_callback' : ( method_exists( $this, $option['type'] . '_callback' ) ? array( $this, $option['type'] . '_callback' ) : array( $this, 'missing_callback' ) ),\n\t\t\t\t\t\t\t$this->func . '_settings_' . $tab . '_' . $section,\n\t\t\t\t\t\t\t$this->func . '_settings_' . $tab . '_' . $section,\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'section' => $section,\n\t\t\t\t\t\t\t\t'id' => isset( $option['id'] ) ? $option['id'] : null,\n\t\t\t\t\t\t\t\t'desc' => ! empty( $option['desc'] ) ? $option['desc'] : '',\n\t\t\t\t\t\t\t\t'name' => isset( $option['name'] ) ? $option['name'] : null,\n\t\t\t\t\t\t\t\t'size' => isset( $option['size'] ) ? $option['size'] : null,\n\t\t\t\t\t\t\t\t'options' => isset( $option['options'] ) ? $option['options'] : '',\n\t\t\t\t\t\t\t\t'std' => isset( $option['std'] ) ? $option['std'] : '',\n\t\t\t\t\t\t\t\t'min' => isset( $option['min'] ) ? $option['min'] : null,\n\t\t\t\t\t\t\t\t'max' => isset( $option['max'] ) ? $option['max'] : null,\n\t\t\t\t\t\t\t\t'step' => isset( $option['step'] ) ? $option['step'] : null,\n\t\t\t\t\t\t\t\t'select2' => isset( $option['select2'] ) ? $option['select2'] : null,\n\t\t\t\t\t\t\t\t'placeholder' => isset( $option['placeholder'] ) ? $option['placeholder'] : null,\n\t\t\t\t\t\t\t\t'multiple' => isset( $option['multiple'] ) ? $option['multiple'] : null,\n\t\t\t\t\t\t\t\t'allow_blank' => isset( $option['allow_blank'] ) ? $option['allow_blank'] : true,\n\t\t\t\t\t\t\t\t'readonly' => isset( $option['readonly'] ) ? $option['readonly'] : false,\n\t\t\t\t\t\t\t\t'buttons' => isset( $option['buttons'] ) ? $option['buttons'] : null,\n\t\t\t\t\t\t\t\t'wpautop' => isset( $option['wpautop'] ) ? $option['wpautop'] : null,\n\t\t\t\t\t\t\t\t'teeny' => isset( $option['teeny'] ) ? $option['teeny'] : null,\n\t\t\t\t\t\t\t\t'tab' => isset( $option['tab'] ) ? $option['tab'] : null,\n\t\t\t\t\t\t\t\t'tooltip_title' => isset( $option['tooltip_title'] ) ? $option['tooltip_title'] : false,\n\t\t\t\t\t\t\t\t'tooltip_desc' => isset( $option['tooltip_desc'] ) ? $option['tooltip_desc'] : false,\n\n\t\t\t\t\t\t\t\t'available_header'\t=> isset( $option['available_header'] ) ? $option['available_header'] : null,\n\t\t\t\t\t\t\t\t'selected_header'\t=> isset( $option['selected_header'] ) ? $option['selected_header'] : null,\n\n\t\t\t\t\t\t\t\t'class' => isset( $option['class'] ) ? $option['class'] : '',\n\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\tregister_setting( $this->func . '_settings', $this->func . '_settings', array( $this, 'settings_sanitize' ) );\n\t\t}",
"public function initSettings()\n {\n register_setting('flickr_group_gallery_settings', 'flickr_group_gallery_api_key');\n register_setting('flickr_group_gallery_settings', 'flickr_group_gallery_api_secret');\n register_setting('flickr_group_gallery_settings', 'flickr_group_gallery_cache_path');\n register_setting('flickr_group_gallery_settings', 'flickr_group_gallery_cache_expires');\n }",
"function register() {\n $this->settings = new SettingApi();\n\n $this->setPages();\n $this->setSubpages();\n\n $this->setCustomPostTypes();\n $this->setTaxonomies();\n $this->setMetaboxes();\n $this->setFrontEndPages();\n\n $this->settings->loadPages($this->pages)->withSubPage('Action control')->loadSubPages($this->subpages)->register();\n }",
"protected function addWPConfigs()\n {\n\n $this[\"databaseAdapter\"] = function () {\n return $GLOBALS['wpdb'];\n };\n\n $this[\"query\"] = $this->factory(\n function () {\n return new \\WP_Query();\n }\n );\n\n }",
"function tsuiseki_tracking_admin_init() {\n register_setting('tsuiseki-tracking-settings', 'tsuiseki_tracking_key');\n register_setting('tsuiseki-tracking-settings', 'tsuiseki_tracking_css_class');\n register_setting('tsuiseki-tracking-settings', 'tsuiseki_tracking_excluded_uris');\n}",
"public function settings_api_init() {\n\t\t// Register sections and settings.\n\t\tadd_settings_section(\n\t\t\t$this->menu_slug,\n\t\t\t__( 'Top Story', 'top-story' ),\n\t\t\tnull,\n\t\t\t$this->menu_slug\n\t\t);\n\n\t\t// Register settings and add fields.\n\t\tregister_setting( $this->menu_slug, 'current-top-story' );\n\n\t\t// Add field.\n\t\tadd_settings_field(\n\t\t\t$this->menu_slug,\n\t\t\t__( 'Search for post by title to replace current top story. (Leave blank to disable.)', 'top-story' ),\n\t\t\tarray( $this, 'option_display' ),\n\t\t\t$this->menu_slug,\n\t\t\t$this->menu_slug\n\t\t);\n\t}",
"function register_settings() {\n register_setting( 'athen_tweaks', 'athen_tweaks', array( $this, 'admin_sanitize' ) ); \n }",
"public function register_settings() {\n\t\tregister_setting('eaboot_options', 'eaboot_options', array(&$this, 'validate_settings'));\n\n\t\tforeach ($this->sections as $slug => $title) {\n\t\t\tif ($slug == 'about')\n\t\t\t\tadd_settings_section($slug, $title, array(&$this, 'display_about_section'), 'eaboot_options');\n\t\t\telse\n\t\t\t\tadd_settings_section($slug, $title, array(&$this, 'display_section'), 'eaboot_options');\n\t\t}\n\n\t\t$this->get_settings();\n\n\t\tforeach ($this->settings as $id => $setting) {\n\t\t\t$setting['id'] = $id;\n\t\t\t$this->create_setting($setting);\n\t\t}\n\t}",
"public function register_settings(){\n // Default API KEY Google Maps\n register_setting( 'cf7-google-map-settings-group', 'cf7_googleMap_api_key', array($this,'maps_api_validation') );\n register_setting( 'cf7-google-map-settings-group', 'cf7_googleMap_enable_geocode', array('type'=>'boolean') );\n register_setting( 'cf7-google-map-settings-group', 'cf7_googleMap_enable_places', array('type'=>'boolean') );\n }",
"public function register_settings()\n\t{\n\t\t$this->register_setting( NHS_SECTIONS );\n\t}",
"public function admin_init()\n\t{\n\t\tforeach( (array) $this->InstanceRegistred as $id => $args ) :\n\t\t\t\\register_setting( $this->page, $args['name'] );\n\t\tendforeach;\n\t}",
"function register_mysettings() {\n\tregister_setting( 'myoption-group', 'adsense_id' );\n\tregister_setting( 'myoption-group', 'site_url_one' );\n register_setting( 'myoption-group', 'site_url_two' );\n register_setting( 'myoption-group', 'site_url_three' );\n register_setting( 'myoption-group', 'site_url_four' );\n register_setting( 'myoption-group', 'site_url_five' );\n register_setting( 'myoption-group', 'site_font' );\n register_setting( 'myoption-group', 'site_total_posts' );\n register_setting( 'myoption-group', 'site_randomise_posts' );\n register_setting( 'myoption-group', 'site_show_curator_posts' );\n }",
"public function register_dynamic_settings()\n {\n }",
"function register_settings() {\n add_settings_section(\n 'main-settings-section',\n 'Main Settings',\n array($this, 'print_main_settings_section_info'),\n 'share-fb-sections-plugin'\n );\n \n // add_settings_field( $id, $title, $callback, $page, $section, $args )\n add_settings_field(\n 'app_id',\n 'App ID', \n array($this, 'create_input_app_id'), \n 'share-fb-sections-plugin', \n 'main-settings-section'\n );\n \n // register_setting( $option_group, $option_name, $sanitize_callback )\n register_setting( 'share-fb-sections-settings-group', 'share_fb_plugin_main_settings', array($this, 'plugin_main_settings_validate') );\n \n // add_settings_section( $id, $title, $callback, $page )\n add_settings_section(\n 'additional-settings-section',\n 'Additional Settings & Default Value',\n array($this, 'print_additional_settings_section_info'),\n 'share-fb-sections-plugin'\n );\n \n // add_settings_field( $id, $title, $callback, $page, $section, $args )\n add_settings_field(\n 'render_meta_tag',\n 'Render Meta Tag',\n array($this, 'create_input_render_meta_tag'), \n 'share-fb-sections-plugin', \n 'additional-settings-section'\n );\n\n add_settings_field(\n 'title', \n 'Default Title', \n array($this, 'create_input_title'), \n 'share-fb-sections-plugin', \n 'additional-settings-section'\n );\n\n add_settings_field(\n 'description', \n 'Default Description', \n array($this, 'create_input_description'), \n 'share-fb-sections-plugin', \n 'additional-settings-section'\n );\n\n add_settings_field(\n 'image_url', \n 'Default Image URL', \n array($this, 'create_input_image_url'), \n 'share-fb-sections-plugin', \n 'additional-settings-section'\n );\n \n // register_setting( $option_group, $option_name, $sanitize_callback )\n register_setting( 'share-fb-sections-settings-group', 'share_fb_plugin_additonal_settings', array($this, 'plugin_additional_settings_validate') );\n }",
"function register_my_settings() {\n\t// First say,\n\t// \"Here's a hunk of stuff that\n\t// will be saved in the database.\"\n\tregister_setting(\n\t\t'my-options',\n\t\t'my-options-data',\n\t\t'washing_machine'\n\t);\n\n\t// Next say,\n\t// \"Here are the sections I want\n\t// to present my settings in\n\t// on the page I told you about earlier.\"\n\tadd_settings_section(\n\t\t'section-1',\n\t\t'Header Stuff',\n\t\t'section_ringy_dingy',\n\t\t'my-page-id'\n\t);\n\tadd_settings_section(\n\t\t'section-2',\n\t\t'Footer Stuff',\n\t\t'section_ringy_dingy',\n\t\t'my-page-id'\n\t);\n\n\t// Third, gather the information\n\t// you'll need to display your fields\n\t// into HTML\n\t$extra_tagline_args = array(\n\t\t'id'\t\t=> 'extra_tagline',\n\t\t'desc'\t\t=> 'Enter Your Extra Tagline Here',\n\t\t'label_for'\t=> 'extra_tagline'\n\t);\n\n\t$footer_text_args = array(\n\t\t'id'\t\t=> 'footer_text',\n\t\t'desc'\t\t=> 'Enter Your Footer Text Here',\n\t\t'label_for'\t=> 'footer_text'\n\t);\n\n\t// Finally say,\n\t// \"These are the fields we want\n\t// users to fill in.\"\n\tadd_settings_field(\n\t\t'extra-tagline',\n\t\t'Text for Extra Tagline',\n\t\t'render_text_field',\n\t\t'my-page-id',\n\t\t'section-1',\n\t\t$extra_tagline_args\n\t);\n\tadd_settings_field(\n\t\t'footer-text',\n\t\t'Text for Footer',\n\t\t'render_text_field',\n\t\t'my-page-id',\n\t\t'section-2',\n\t\t$footer_text_args\n\t);\n\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}",
"public static function init() {\n static::registerSettings();\n }",
"function myprefix_init_settings() {\t\n\t\n\t// Settings section:\n\t// Multiple settings can go into this section after we set it up.\n\t// We are going to add three settings into this one section.\n\t\tadd_settings_section(settingsSectionOneSlug, settingsSectionOneTitle, \n\t\t\tsettingsSectionOneCallbackFunction, settingsPageID);\n\t\n\t// Settings field:\n\t// We add settings fields to our settings section:\n\t\tadd_settings_field(settingOneSlug, settingOneTitle, settingOneCallbackFunction, \n\t\t\tsettingsPageID, settingsSectionOneSlug, array( 'label_for' => settingOneSlug ));\n\t\tadd_settings_field(settingTwoSlug, settingTwoTitle, settingTwoCallbackFunction, \n\t\t\tsettingsPageID, settingsSectionOneSlug, array( 'label_for' => settingTwoSlug ));\n\t\tadd_settings_field(settingThreeSlug, settingThreeTitle, settingThreeCallbackFunction, \n\t\t\tsettingsPageID, settingsSectionOneSlug, array( 'label_for' => settingThreeSlug ));\n\t\n\t// Setting:\n\t// Now we register our settings:\n\t\tregister_setting(settingsPageID, settingOneSlug, settingOneValidationFunction);\n\t\tregister_setting(settingsPageID, settingTwoSlug, settingTwoValidationFunction);\n\t\tregister_setting(settingsPageID, settingThreeSlug, settingThreeValidationFunction);\n}",
"public function register_settings() {\n\t\t\tregister_setting( 'wpex_skins_options', 'theme_skin', array( $this, 'sanitize' ) );\n\t\t}",
"public function plugin_settings_init() {\n\t\tregister_setting( 'plugin-boilerplate', 'plugin_settings' );\n\n\t\t//create a settings section - there can be multiple settings sections, just make sure you attribute\n\t\t//the settings fields to the sections you want\n\t\tadd_settings_section( \n\t\t\t'settings-section-id', \n\t\t\t__( 'Plugin Settings Section Title', 'plugin-text-domain' ), \n\t\t\tarray( $this, 'settings_section_callback' ), \n\t\t\t'plugin-boilerplate' );\n\n\t\t//create the settings fields, associate them with the required settings sections\n\t\tadd_settings_field( \n\t\t\t'settings-fields-id', \n\t\t\t__('Settings Fields Title', 'plugin-text-domain' ), \n\t\t\tarray( $this, 'settings_field_callback' ), \n\t\t\t'plugin-boilerplate', \n\t\t\t'settings-section-id' );\n\t\t\n\t}",
"public function register() {\n\t\tregister_setting(\n\t\t\t$this->page,\n\t\t\t$this->setting_id,\n\t\t\tarray(\n\t\t\t\t'type' => 'string',\n\t\t\t\t'sanitize_callback' => array( $this, 'sanitize' ),\n\t\t\t\t'default' => $this->default_value,\n\t\t\t)\n\t\t);\n\t}",
"public function register() {\n\t\tregister_setting(\n\t\t\t$this->page,\n\t\t\t$this->setting_id,\n\t\t\tarray(\n\t\t\t\t'type' => 'string',\n\t\t\t\t'sanitize_callback' => array( $this, 'sanitize' ),\n\t\t\t\t'default' => $this->default_value,\n\t\t\t)\n\t\t);\n\t}",
"function wpdc_my_settings_init() {\r\n // register the settins for the plugin here (you might want to give it more unique names)\r\n\t\tregister_setting( 'wpdc_plugin_options_group', 'wpdc_options', 'wpdc_sanitize_wpdc_validate_options' );\r\n }",
"function jb_register_settings() {\n\tregister_setting( JB_SETTINGS_FIELD, JB_SETTINGS_FIELD );\n\tadd_option( JB_SETTINGS_FIELD , jb_option_defaults() );\n\tadd_settings_section('jb_main','Main Settings', 'jb_main_section_text', JB_SETTINGS_FIELD );\n\tadd_settings_field('jb_featured_cat', 'Featured Category', 'jb_featured_cat_slug_setting', JB_SETTINGS_FIELD , 'jb_main');\n\tadd_settings_field('jb_featured_content_limit', 'Homepage Featured Post Word Count Limit', 'jb_featured_content_limit_setting', JB_SETTINGS_FIELD , 'jb_main');\n\tadd_settings_field('jb_post_content_limit', 'Post Word Count Limit', 'jb_post_content_limit_setting', JB_SETTINGS_FIELD , 'jb_main');\n}",
"private function initSettings()\n {\n add_action('admin_menu', [__CLASS__, 'menus']);\n add_action('admin_init', [__CLASS__, 'sections']);\n add_action('admin_init', [__CLASS__, 'fields']);\n }",
"function register_settings() {\n\tregister_setting(\n\t\t'StandardsReader_settings_group', // Option group\n\t\t'endpoint'); // Sanitize\n\t\n\tregister_setting(\n\t\t'StandardsReader_settings_group', // Option group\n\t\t'check_interval'); // Sanitize\n\t\n\tregister_setting('StandardsReader_settings_group', 'mapPage');\n\tregister_setting('StandardsReader_settings_group', 'mapListing');\n\t\t \n}",
"function get_registered_settings()\n {\n }",
"public function register_settings()\r\n\t{\t\r\n\t\t//options group declaration\r\n\t register_setting('bookingSearch_settings', 'dbs_client_id');\r\n\t register_setting('bookingSearch_settings', 'dbs_client_secret');\r\n\t register_setting('bookingSearch_settings', 'dbs_authorization');\r\n\r\n\t //sections\r\n\t add_settings_section('bookingSearch_section', __('Customer parameter','Booking-search'), array($this, 'section_html'), 'bookingSearch_settings');\r\n\r\n\t //fields\r\n\t add_settings_field('dbs_client_id', __('Client ID','Booking-search'), array($this, 'dbs_client_id_html'), 'bookingSearch_settings', 'bookingSearch_section');\r\n\t add_settings_field('dbs_client_secret', __('Client secret','Booking-search'), array($this, 'dbs_client_secret_html'), 'bookingSearch_settings', 'bookingSearch_section');\r\n\t add_settings_field('dbs_authorization', __('Authorization','Booking-search'), array($this, 'dbs_authorization_html'), 'bookingSearch_settings', 'bookingSearch_section');\r\n\r\n\t}",
"function settingsCustomizeRegister($wp_customize)\n{\n\t$wp_customize->add_section(\n\t\t'settings_section',\n\t\tarray(\n\t\t\t'title' => 'Theme Settings',\n\t\t\t'description' => 'Edit the theme setings.',\n\t\t\t'priority' => 0,\n\t\t)\n\t);\n\t\n\t$wp_customize->add_setting(\n\t\t'google_maps_api_key',\n\t\tarray(\n\t\t\t'type' => 'option',\n\t\t)\n\t);\n\t\n\t$wp_customize->add_control(\n\t\t'google_maps_api_key',\n\t\tarray(\n\t\t\t'label' => 'Google Maps API Key',\n\t\t\t'section' => 'settings_section',\n\t\t\t'type' => 'text'\n\t\t)\n\t);\n\t\n\t$wp_customize->add_setting(\n\t\t'navbar_type',\n\t\tarray(\n\t\t\t'default' => 'Inline',\n\t\t\t'type' => 'option',\n\t\t)\n\t);\n\t\n\t$wp_customize->add_control(\n\t\t'navbar_type',\n\t\tarray(\n\t\t\t'label' => 'Navbar Type',\n\t\t\t'section' => 'settings_section',\n\t\t\t'type' => 'select',\n\t\t\t'choices' => array(\n\t\t\t\t'inline' => 'Inline',\n\t\t\t\t'layered' => 'Layered',\n\t\t\t\t'layered--centered' => 'Layered but Centered',\n\t\t\t\t'logo-center' => 'Layered with logo in center',\n\t\t\t)\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'facebook_url',\n\t\tarray(\n\t\t\t'type' => 'option',\n\t\t)\n\t);\n\t\n\t$wp_customize->add_control(\n\t\t'facebook_url',\n\t\tarray(\n\t\t\t'label' => 'Facebook Profile URL',\n\t\t\t'section' => 'settings_section',\n\t\t\t'type' => 'text'\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'twitter_url',\n\t\tarray(\n\t\t\t'type' => 'option',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'twitter_url',\n\t\tarray(\n\t\t\t'label' => 'Twitter Profile URL',\n\t\t\t'section' => 'settings_section',\n\t\t\t'type' => 'text'\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'instagram_url',\n\t\tarray(\n\t\t\t'type' => 'option',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'instagram_url',\n\t\tarray(\n\t\t\t'label' => 'Instagram Profile URL',\n\t\t\t'section' => 'settings_section',\n\t\t\t'type' => 'text'\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'github_url',\n\t\tarray(\n\t\t\t'type' => 'option',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'github_url',\n\t\tarray(\n\t\t\t'label' => 'Github Profile URL',\n\t\t\t'section' => 'settings_section',\n\t\t\t'type' => 'text'\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'linkedin_url',\n\t\tarray(\n\t\t\t'type' => 'option',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'linkedin_url',\n\t\tarray(\n\t\t\t'label' => 'LinkedIn Profile URL',\n\t\t\t'section' => 'settings_section',\n\t\t\t'type' => 'text'\n\t\t)\n\t);\n\n $wp_customize->add_setting(\n 'youtube_url',\n array(\n 'type' => 'option',\n )\n );\n\n $wp_customize->add_control(\n 'youtube_url',\n array(\n 'label' => 'Youtube Channel URL',\n 'section' => 'settings_section',\n 'type' => 'text'\n )\n );\n\n}",
"function settings() {\n // ADD SETTINGS SECTION\n // Args: name of section, subtitle of section (can be null), html content if needed e.g. description text, page slug to add section to\n add_settings_section('wcp_first_section', null, null, 'word-count-settings-page');\n\n // LOCATION SETTING\n // Args: name of setting to tie to, html label text i.e. name users will see, function to build html, page slug for settings page we're using, which section to add option in\n add_settings_field('wcp_location', 'Display Location', array($this, 'locationHTML'),'word-count-settings-page', 'wcp_first_section');\n // Args: group settings belong to, name of setting, array with sanitise callback and default value\n register_setting('wordcountplugin', 'wcp_location', array('sanitize_callback' => array($this, 'sanitizeLocation'), 'default' => '0'));\n\n // HEADLINE TEXT SETTING\n add_settings_field('wcp_headline', 'Headline Text', array($this, 'headlineHTML'),'word-count-settings-page', 'wcp_first_section');\n register_setting('wordcountplugin', 'wcp_headline', array('sanitize_callback' => 'sanitize_text_field', 'default' => 'Post Statistics'));\n\n // WORD COUNT DISPLAY SETTING\n // Extra param to pass name to HTML display function\n add_settings_field('wcp_wordcount', 'Word Count', array($this, 'checkboxHTML'),'word-count-settings-page', 'wcp_first_section', array('boxName' => 'wcp_wordcount'));\n register_setting('wordcountplugin', 'wcp_wordcount', array('sanitize_callback' => 'sanitize_text_field', 'default' => '1'));\n\n // CHARACTER COUNT DISPLAY SETTING\n add_settings_field('wcp_charcount', 'Character Count', array($this, 'checkboxHTML'),'word-count-settings-page', 'wcp_first_section', array('boxName' => 'wcp_charcount'));\n register_setting('wordcountplugin', 'wcp_charcount', array('sanitize_callback' => 'sanitize_text_field', 'default' => '1'));\n\n // READ TIME DISPLAY SETTING\n add_settings_field('wcp_readtime', 'Read Time', array($this, 'checkboxHTML'),'word-count-settings-page', 'wcp_first_section', array('boxName' => 'wcp_readtime'));\n register_setting('wordcountplugin', 'wcp_readtime', array('sanitize_callback' => 'sanitize_text_field', 'default' => '1'));\n }",
"function register_settings() {\n\n\t\tregister_setting('wa_wcc_settings', 'wa_wcc_settings', array(&$this, 'validate_options'));\n\t\t//general settings\n\t\tadd_settings_section('wa_wcc_settings', __('', 'wa_wcc_txt'), '', 'wa_wcc_settings');\n\n\t\tadd_settings_field('wa_wcc_posts_orderby', __('Category orderby', 'wa_wcc_txt'), array(&$this, 'wa_wcc_posts_orderby'), 'wa_wcc_settings', 'wa_wcc_settings');\n\t\tadd_settings_field('wa_wcc_posts_order', __('Category order', 'wa_wcc_txt'), array(&$this, 'wa_wcc_posts_order'), 'wa_wcc_settings', 'wa_wcc_settings');\n\t\tadd_settings_field('wa_wcc_posts_category', __('Exclude categories', 'wa_wcc_txt'), array(&$this, 'wa_wcc_posts_category'), 'wa_wcc_settings', 'wa_wcc_settings');\n\t\tadd_settings_field('wa_wcc_hide_if_empty', __('Hide if empty', 'wa_wcc_txt'), array(&$this, 'wa_wcc_hide_if_empty'), 'wa_wcc_settings', 'wa_wcc_settings');\n\t\tadd_settings_field('wa_wcc_show_count', __('Show post count', 'wa_wcc_txt'), array(&$this, 'wa_wcc_show_count'), 'wa_wcc_settings', 'wa_wcc_settings');\n\t\tadd_settings_field('wa_wcc_duration', __('Easing duration', 'wa_wcc_txt'), array(&$this, 'wa_wcc_duration'), 'wa_wcc_settings', 'wa_wcc_settings');\n\t\tadd_settings_field('wa_wcc_level', __('Level', 'wa_wcc_txt'), array(&$this, 'wa_wcc_level'), 'wa_wcc_settings', 'wa_wcc_settings');\n\t\tadd_settings_field('wa_wcc_custom_css', __('Custom styles', 'wa_wcc_txt'), array(&$this, 'wa_wcc_custom_css'), 'wa_wcc_settings', 'wa_wcc_settings');\n\t\n\t\t//advance settings\n\t\tregister_setting('wa_wcc_configuration', 'wa_wcc_configuration', array(&$this, 'validate_options'));\n\t\t\n\t\tadd_settings_section('wa_wcc_configuration', __('', 'wa_wcc_txt'), '', 'wa_wcc_configuration');\n\t\tadd_settings_field('wa_wcc_load_mtree', __('Load mTree', 'wa_wcc_txt'), array(&$this, 'wa_wcc_load_mtree'), 'wa_wcc_configuration', 'wa_wcc_configuration');\n\t\tadd_settings_field('wa_wcc_load_velocity', __('Load Velocity', 'wa_wcc_txt'), array(&$this, 'wa_wcc_load_velocity'), 'wa_wcc_configuration', 'wa_wcc_configuration');\n\t\tadd_settings_field('wa_wcc_loading_place', __('Loading place', 'wa_wcc_txt'), array(&$this, 'wa_wcc_loading_place'), 'wa_wcc_configuration', 'wa_wcc_configuration');\t\n\t\tadd_settings_field('wa_wcc_deactivation_delete', __('Deactivation', 'wa_wcc_txt'), array(&$this, 'wa_wcc_deactivation_delete'), 'wa_wcc_configuration', 'wa_wcc_configuration');\n\t\n\t}",
"public static function register()\n\t\t\t{\n\t\t\t\t\n\t\t\t\t//IMPORTANT\n\t\t\t\t//Register all of the options that will be used\n\t\t\t\n//\t\t\t\tregister_setting(HE_PLUGINOPTIONS_ID.'_options', 'he_po_quote');\n\n\t\t\t\tregister_setting(HE_PLUGINOPTIONS_ID.'_options', 'he_userid');\n\t\t\t\tregister_setting(HE_PLUGINOPTIONS_ID.'_options', 'he_popup_option');\n\t\t\t\tregister_setting(HE_PLUGINOPTIONS_ID.'_options', 'he_copypaste_option');\n\t\t\t\tregister_setting(HE_PLUGINOPTIONS_ID.'_options', 'he_freecode');\n\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"public function init() {\n register_setting( $this->key, $this->key );\n }",
"public function init()\n {\n register_setting($this->key, $this->key);\n }",
"protected function load_settings() {\n\t\t$this->settings = WP_United_Settings::Create();\n\t\t$this->init_style_keys();\n\t}",
"function register_initial_settings()\n {\n }",
"public function load_settings() {\n\t\tadd_action( 'admin_init', [ $this, 'register_option' ] );\n\t\tadd_action( 'admin_init', [ $this, 'license_action' ] );\n\t\tadd_action( 'admin_notices', [ $this, 'show_error' ] );\n\t\tadd_action( 'admin_init', [ $this, 'update_settings' ] );\n\t\tadd_filter( 'http_request_args', [ $this, 'disable_wporg_request' ], 5, 2 );\n\t\tadd_filter( 'edd_sl_updater_add_admin_page', [ $this, 'license_page' ] );\n\t}",
"function mpc_register_settings() {\n\tregister_setting('mpc_settings_group', 'mpc_settings');\n}",
"function jm_register_settings(){\n\tregister_setting('jm_social_group', 'jm_facebook');\n\tregister_setting('jm_social_group', 'jm_twitter');\n\tregister_setting('jm_social_group', 'jm_gplus');\n\tregister_setting('jm_social_group', 'jm_linkedin');\n\t\n\tregister_setting('jm_main_group', 'jm_logo');\n\tregister_setting('jm_main_group', 'jm_colorOne');\n\tregister_setting('jm_main_group', 'jm_colorTwo');\n\tregister_setting('jm_main_group', 'jm_analytics');\n}",
"function admin_init() {\r\n register_setting($this->optionsName, $this->optionsName);\r\n wp_register_style('custom-page-extensions-admin-css', $this->pluginURL . '/includes/custom-page-extensions-admin.css');\r\n wp_register_script('custom-page-extensions-js', $this->pluginURL . '/js/custom-page-extensions.js');\r\n }",
"function cxense_register_settings() {\n\n // Setup section on our options page\n add_settings_section('cxense-settings-section', 'cXense Settings', '__return_empty_string', 'cxense-settings');\n\n // Register our settings and create\n foreach(cxense_get_settings() as $setting) {\n\n // Register setting\n register_setting('cxense-settings', $setting['name']);\n\n // Add settings field if add_field isn't false\n if( !isset($setting['add_field']) || $setting['add_field'] !== false) {\n add_settings_field(\n $setting['name'],\n $setting['title'],\n function($args) {\n $value = cxense_get_opt($args['name']);\n if( !empty($args['select']) ) {\n echo '<select name=\"'.$args['name'].'\">';\n foreach($args['select'] as $opt_val => $opt_name) {\n echo '<option value=\"'.$opt_val.'\"'.($opt_val == $value ? ' selected=\"selected\"':'').'>'.$opt_name.'</option>';\n }\n echo '</select>';\n } else {\n echo '<input type=\"text\" name=\"'.$args['name'].'\" value=\"'.$value.'\" />';\n }\n },\n 'cxense-settings',\n 'cxense-settings-section',\n $setting\n );\n }\n }\n}",
"public function registerSettings()\n {\n // Register setting\n register_setting('wpae_crsch_settings', 'wpae_cron_scheduler_exports');\n\n // Settings section\n add_settings_section(\n 'wpae_crsch_section',\n __('Exports list', WPAE_CRSCH_TD),\n [$this, 'registerSettingsCallback'],\n 'wpae_crsch_settings'\n );\n }",
"public function admin_init() {\n\t\tregister_setting( $this->options_key, $this->options_key, array( $this, 'save_settings' ) );\n\t}",
"public function register_settings() {\n\t\t$section = 'janrain-capture';\n\n\t\tregister_setting( $this->option_group, 'pn_theme_janrain_enable', array( $this, 'sanitize_input_checkbox' ) );\n\t\tregister_setting( $this->option_group, 'pn_theme_janrain_debug', array( $this, 'sanitize_input_checkbox' ) );\n\n\t\tadd_settings_section( $section, 'Janrain Capture', '__return_false', $this->option_group );\n\t\tadd_settings_field( 'pn_theme_janrain_enable', 'Enable Janrain Capture', array( $this, 'render_input_checkbox' ), $this->option_group, $section, array( 'key' => 'pn_theme_janrain_enable', 'help' => 'Used by theme to register proper click events. eg. Janrain vs. Press+' ) );\n\t\tadd_settings_field( 'pn_theme_janrain_debug', 'Enable Janrain Debug', array( $this, 'render_input_checkbox' ), $this->option_group, $section, array( 'key' => 'pn_theme_janrain_debug', 'help' => 'Turns on Janrain event logging' ) );\n\t}",
"function hb_register_settings() {\r\n\tregister_setting('hb_settings_group', 'hb_settings');\r\n\r\n}",
"public function _register() {\n\t\t$settings = $this->get_settings();\n\t\t$empty = true;\n\n\t\tif ( is_array($settings) ) {\n\t\t\tforeach ( array_keys($settings) as $number ) {\n\t\t\t\tif ( is_numeric($number) ) {\n\t\t\t\t\t$this->_set($number);\n\t\t\t\t\t$this->_register_one($number);\n\t\t\t\t\t$empty = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( $empty ) {\n\t\t\t// If there are none, we register the widget's existence with a\n\t\t\t// generic template\n\t\t\t$this->_set(1);\n\t\t\t$this->_register_one();\n\t\t}\n\t}",
"function thirty_eight_custom_Settings(){\n register_setting( 'thirty-eight-settings-group', 'profile_picture' );\n register_setting( 'thirty-eight-settings-group', 'first_name' );\n register_setting( 'thirty-eight-settings-group', 'last_name' );\n register_setting( 'thirty-eight-settings-group', 'user_description' );\n register_setting( 'thirty-eight-settings-group', 'twitter_handler', 'thirty_eight_sanitize_twitter_handler' );\n register_setting( 'thirty-eight-settings-group', 'facebook_handler' );\n\n //Sidebar Options Section and Field\n add_settings_section( 'thirty-eight-sidebar-option', 'Sidebar Options', 'thirty_eight_sidebar_options', 'thirty_eight' );\n add_settings_field( 'sidebar-profile-picture', 'Profile Picture', 'thirty_eight_profile_picture', 'thirty_eight', 'thirty-eight-sidebar-option' );\n add_settings_field( 'sidebar-name', 'Full Name', 'thirty_sidebar_name', 'thirty_eight', 'thirty-eight-sidebar-option' );\n add_settings_field( 'sidebar-description', 'Description', 'thirty_eight_sidebar_description', 'thirty_eight', 'thirty-eight-sidebar-option' );\n add_settings_field( 'sidebar-twitter', 'Twitter Handler', 'thirty_eight_sidebar_twitter', 'thirty_eight', 'thirty-eight-sidebar-option' );\n add_settings_field( 'sidebar-facebook', 'Facebook Handler', 'thirty_eight_sidebar_facebook', 'thirty_eight', 'thirty-eight-sidebar-option' );\n\n //Theme Support Options Register Settings\n register_setting( 'thirty-eight-theme-support', 'post_formats' );\n register_setting( 'thirty-eight-theme-support', 'custom_logo' );\n register_setting( 'thirty-eight-theme-support', 'custom_header' );\n register_setting( 'thirty-eight-theme-support', 'custom_background' );\n\n //Theme Support Options Section and Field\n add_settings_section( 'thirty-eight-theme', 'Theme Support Options', 'thirty_eight_theme_support_options', 'thirty_eight_theme' );\n add_settings_field( 'post-formats', 'Post Formats', 'thirty_eight_post_formats', 'thirty_eight_theme', 'thirty-eight-theme' );\n add_settings_field( 'custom-logo', 'Custom Logo', 'thirty_eight_custom_logo', 'thirty_eight_theme', 'thirty-eight-theme' );\n add_settings_field( 'custom-header', 'Custom Header', 'thirty_eight_custom_header', 'thirty_eight_theme', 'thirty-eight-theme' );\n add_settings_field( 'custom-background', 'Custom Background', 'thirty_eight_cutom_background', 'thirty_eight_theme', 'thirty-eight-theme' );\n\n //Contact Form Register Settings\n register_setting( 'thirty-eight-contact-options', 'activate_contact' );\n\n //Contact Form Section and Field\n add_settings_section( 'thirty-eight-contact-section', 'Contact Form', 'thirty_eight_contact_section', 'thirty_eight_contact' );\n add_settings_field( 'activate-form', 'Activate Contact Form', 'thirty_eight_activate_contact', 'thirty_eight_contact', 'thirty-eight-contact-section' );\n\n}",
"public function init_settings()\n\t{\n\t\tregister_setting('jststm_testimonials_group', 'jststm_testimonials', function($input)\n\t\t{\n\t\t\tforeach($input as $i => $data)\n\t\t\t{\n\t\t\t\t$input[$i]['message'] = sanitize_text_field($data['message']);\n\t\t\t\t$input[$i]['author'] = sanitize_text_field($data['author']);\n\t\t\t}\n\n\t\t\treturn $input;\n\t\t});\n\t}",
"function rate_us_ratings_settings_init()\n{\n\t// Registering the setting 'rate_us_rating_types' for the page 'rate_us_rating_settings'\n\tregister_setting( 'rate_us_rating_settings', 'rate_us_rating_types' );\n \n\t// Registering the section 'rate_us_rating_section' for the page 'rate_us_rating_settings'\n\tadd_settings_section(\n\t\t'rate_us_rating_section',\n\t\t'',\n\t\t'',\n\t\t'rate_us_rating_settings'\n\t);\n\n\t// Registering the field for the setting 'rate_us_rating_types' on the page 'rate_us_rating_settings' under section 'rate_us_rating_section'.\n\tadd_settings_field(\n\t\t'rate_us_rating_types', // as of WP 4.6 this value is used only internally\n\t\t// use $args' label_for to populate the id inside the callback\n\t\t__( 'Show Rating on Content:', 'wporg' ),\n\t\t'rate_us_rating_types_html',\n\t\t'rate_us_rating_settings',\n\t\t'rate_us_rating_section',\n\t\t[\n\t\t\t'label_for' => 'rate_us_rating_pages',\n\t\t\t'class' => 'wporg_row',\n\t\t\t'wporg_custom_data' => 'custom',\n\t\t]\n\t);\n}",
"public function registerSettings()\n {\n register_setting(self::SETTING_GROUPNAME, self::SETTING_BASENAME);\n \n // Section: API Keys\n // -----------------------------------------------------------------\n\n add_settings_section(\n 'wistia_section-api_keys',\n __('API Settings'),\n [$this->renderer, 'renderAPISettingsSection'],\n self::ADMIN_PAGE_ID\n );\n\n add_settings_field(\n 'url_prefix',\n __('URL Prefix'),\n [$this->renderer, 'renderTextField'],\n self::ADMIN_PAGE_ID,\n 'wistia_section-api_keys',\n $this->getFieldArguments(\n 'url_prefix',\n null,\n [\n 'before' => '<code>http://</code>',\n 'after' => '<code>.wistia.com</code>',\n ]\n )\n );\n add_settings_field(\n 'project_key',\n __('Project Key'),\n [$this->renderer, 'renderTextField'],\n self::ADMIN_PAGE_ID,\n 'wistia_section-api_keys',\n $this->getFieldArguments(\n 'project_key',\n __('Enter the ID of the project that the Upload API should send videos to.'),\n [\n 'classes' => 'regular-text'\n ]\n )\n );\n add_settings_field(\n 'upload_key',\n __('Upload Key'),\n [$this->renderer, 'renderTextField'],\n self::ADMIN_PAGE_ID,\n 'wistia_section-api_keys',\n $this->getFieldArguments(\n 'upload_key',\n __('This API key should have <strong>upload permissions only</strong>. It will be '\n .'visible in the source of any front-end pages that use the JavaScript uploader.'),\n [\n 'classes' => 'regular-text',\n ]\n )\n );\n add_settings_field(\n 'data_key',\n __('Data API Key'),\n [$this->renderer, 'renderTextField'],\n self::ADMIN_PAGE_ID,\n 'wistia_section-api_keys',\n $this->getFieldArguments(\n 'data_key',\n __('This API key should have <strong>read and write</strong> permissions.'),\n [\n 'classes' => 'regular-text',\n ]\n )\n );\n }",
"function wcfm_settings_init() {\n\t\tglobal $WCFM;\n\t\t // register a new setting for \"wcfm\" page\n\t\t register_setting( 'wcfm', 'wcfm_page_options' );\n\t\t \n\t\t // register a new section in the \"wcfm\" page\n\t\t add_settings_section(\n\t\t\t 'wcfm_section_developers',\n\t\t\t __( 'WCFM Page Settings', $WCFM->text_domain ),\n\t\t\t array( &$this, 'wcfm_section_developers_cb'),\n\t\t\t 'wcfm'\n\t\t );\n\t\t \n\t\t // register a new field in the \"wcfm_section_developers\" section, inside the \"wcfm\" page\n\t\t add_settings_field(\n\t\t\t 'wcfm_field_page', \n\t\t\t __( 'WCFM Page', $WCFM->text_domain ),\n\t\t\t array( &$this, 'wcfm_field_page_cb' ),\n\t\t\t 'wcfm',\n\t\t\t 'wcfm_section_developers',\n\t\t\t [\n\t\t\t 'label_for' => 'wc_frontend_manager_page_id',\n\t\t\t 'class' => 'wcfm_row',\n\t\t\t 'wcfm_custom_data' => 'wc_frontend_manager_page',\n\t\t\t ]\n\t\t );\n\t\t \n\t}",
"function register() {\n\tadd_action( 'admin_menu', '\\\\Sgdd\\\\Admin\\\\AdminPage\\\\add_menu' );\n\tadd_action( 'admin_init', '\\\\Sgdd\\\\Admin\\\\AdminPage\\\\action_handler' );\n\tadd_action( 'admin_enqueue_scripts', '\\\\Sgdd\\\\Admin\\\\AdminPage\\\\register_style' );\n\n\t\\Sgdd\\Admin\\SettingsPages\\Basic\\register();\n\t\\Sgdd\\Admin\\SettingsPages\\Advanced\\register();\n\t\\Sgdd\\Admin\\Editor\\register();\n}",
"function setup_settings() {\n\t\t\t$page = is_network_admin() ? 'settings.php' : 'writing';\n\t\t\t$section = 'post_revision_workflow';\n\t\t\t\n\t\t\tif( is_network_admin() ) {\n\t\t\t\tadd_action( 'wpmu_options', array( &$this, 'ms_settings_section' ) );\n\t\t\t\tadd_action( 'update_wpmu_options', array( &$this, 'update_ms_settings' ) );\n\t\t\t} else {\n\t\t\t\tregister_setting( $page, 'dpn_reviewers', array( &$this, 'sanitize_settings' ) );\n\t\t\t\tadd_settings_section( $section, __( 'Post Revision Workflow', $this->text_domain ), array( &$this, 'settings_section' ), $page );\n\t\t\t\tadd_settings_field( 'dpn_reviewers', __( 'Default email address for post revision workflow notification:', $this->text_domain ), array( &$this, 'settings_field' ), $page, $section, array( 'label_for' => 'dpn_reviewers' ) );\n\t\t\t}\n\t\t}",
"function wpms_classifieds_init() {\n\tregister_activation_hook ( __FILE__, 'wpms_classifieds_build_permissions' );\n//\tif (isset($_GET['page']) && $_GET['page'] == 'settings_page_wp-multilingual-slider') {\n// \t add_action('admin_init', 'wpms_register');\n//\t}\n\tadd_action('admin_init', 'wpms_init');\n\tadd_action('admin_init', 'wpms_register_mysettings');\n\tadd_action('admin_menu', 'wpms_home_create_menu');\n//\tload_plugin_textdomain( 'wp-multilingual-slider', 'wp-content/plugins/wp-multilingual-slider/languages/');\n}",
"public function init() {\n register_setting( self::$key, self::$key );\n }",
"public static function init() {\n\t\tadd_action( 'admin_init', array( static::class, 'admin_init' ) );\n\n\t\t// Register Setting\n\t\tregister_setting(\n\t\t\t'micropub',\n\t\t\t'micropub_default_post_status', // Setting Name\n\t\t\tarray(\n\t\t\t\t'type' => 'string',\n\t\t\t\t'description' => 'Default Post Status for Micropub Server',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'show_in_rest' => false,\n\t\t\t)\n\t\t);\n\t}",
"public function page_init()\n { \n register_setting(\n 'my_option_group', // Option group\n 'my_option_name', // Option name\n array( $this, 'sanitize' ) // Sanitize\n );\n\n add_settings_section(\n 'setting_section_id', // ID\n 'CLAS DEPT Theme Settings', // Title\n array( $this, 'print_section_info' ), // Callback\n 'my-setting-admin' // Page\n ); \n\n add_settings_field(\n 'dept_address', // ID\n 'Department Address', // Title \n array( $this, 'dept_address_callback' ), // Callback\n 'my-setting-admin', // Page\n 'setting_section_id' // Section \n ); \n\n add_settings_field(\n 'title', \n 'Footer Title', \n array( $this, 'title_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n add_settings_field(\n 'fb', \n 'Facebook Link', \n array( $this, 'fb_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n add_settings_field(\n 'twitter', \n 'Twitter Link', \n array( $this, 'twitter_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n add_settings_field(\n 'instagram', \n 'Instagram Link', \n array( $this, 'instagram_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n add_settings_field(\n 'youtube', \n 'Youtube Link', \n array( $this, 'youtube_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n add_settings_field(\n 'rss', \n 'RSS Link', \n array( $this, 'rss_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n \n }",
"function tb_settings_init() {\n if ( get_option( \"tb_theme_options\" ) == false ) {\n add_option( \"tb_theme_options\", apply_filters( \"tb_default_options\", tb_default_options() ) );\n }\n\n // Add a section to our submenu\n add_settings_section (\n \"tb_settings_section\",\n \"Tickets Broadway Theme Options\",\n \"tb_section_callback\",\n \"tb_theme_options\"\n );\n\n // Add option for banner image on homepage\n add_settings_field (\n \"Banner Image\",\n \"Homepage Banner Image\",\n \"banner_callback\",\n \"tb_theme_options\",\n \"tb_settings_section\"\n );\n\n // Add option for banner image link on homepage\n add_settings_field (\n \"Banner Image Link\",\n \"Homepage Banner Link\",\n \"banner_link_callback\",\n \"tb_theme_options\",\n \"tb_settings_section\"\n );\n\n // Add option for selecting a city (for spinning out microsites)\n add_settings_field (\n \"City Selection\",\n \"Microsite City\",\n \"microsite_city_callback\",\n \"tb_theme_options\",\n \"tb_settings_section\"\n );\n\n // Lastly, register them settings\n register_setting (\n \"tb_theme_options\",\n \"tb_theme_options\"\n );\n}",
"public function wp_init() {\n\t\n\t\t// (re)load our settings\n\t\t$this->load_settings();\n\n\t\tload_plugin_textdomain('wp-united', false, 'wp-united/languages/');\n\t\t\n\t\trequire_once($this->get_plugin_path() . 'template-tags.php');\n\t\t\n\t\t// some login integration routines may be needed even when user integration is disabled.\t\n\t\trequire_once($this->get_plugin_path() . 'user-integrator.php'); \n\t\t\n\t\tif($this->get_setting('xposting')) {\t\t\n\t\t\trequire_once($this->get_plugin_path() . 'cross-posting.php');\n\t\t\t$this->xPoster = new WPU_Plugin_XPosting($this->settings);\n\t\t}\n\n\n\t\t// add new actions and filters\n\t\t$this->add_actions();\n\t\t$this->add_filters();\n\t\tunset($this->actions, $this->filters);\n\n\t}",
"private function hooks() {\n\n\t\tadd_filter( 'wpcd_settings_tabs', array( &$this, 'settings_tabs' ) ); // add a new tab to the settings page.\n\n\t\tadd_filter( 'wpcd_settings_metaboxes', array( &$this, 'settings_metaboxes' ) ); // add new metaboxes to our new tab on the settings pages.\n\n\t}",
"public function registerMenu()\n\t\t{\n\t\t\tadd_options_page( 'Thingdom Settings', 'Thingdom Settings', 'manage_options', $this->slug, array($this, 'loadSettings')); \n\t\t\tadd_action('admin_init', array($this, 'registerSettings'));\n\t\t}",
"function achilles_settings_init() {\n\t\n\t//create one option to store all of our values. \n register_setting( 'achilles-settings-group', 'achilles-settings' );\n add_settings_section( 'achilles-general-settings', 'General Settings', 'achilles_general_settings_callback', 'achilles' );\n add_settings_field('resident-portal', 'Resident Portal URL', 'resident_portal_url_callback', 'achilles', 'achilles-general-settings');\n add_settings_field('facebook-url', 'Facebook URL', 'facebook_url_callback', 'achilles', 'achilles-general-settings' );\n add_settings_field('google-analytics-id', 'Google Analytics ID', 'google_analytics_id_callback', 'achilles', 'achilles-general-settings');\n\t\n}",
"function theme_options_init(){\n\tregister_setting( 'htmlks4wp_options', 'htmlks4wp_theme_options', 'theme_options_validate' );\n}",
"function ywig_custom_settings() {\n\n\t/**\n\t * First Register the fields.\n\t */\n\t// Site Logos.\n\tregister_setting( 'ywig-settings-group', 'logo' );\n\tregister_setting( 'ywig-settings-group', 'footer_logo' );\n\n\t// Site Socials.\n\tregister_setting( 'ywig-settings-group', 'twitter_link', 'ywig_sanitize_url' );\n\tregister_setting( 'ywig-settings-group', 'facebook_link', 'ywig_sanitize_url' );\n\tregister_setting( 'ywig-settings-group', 'youtube_link', 'ywig_sanitize_url' );\n\n\t// Company Address.\n\tregister_setting( 'ywig-settings-group', 'company_address_1', 'sanitize_text_field' );\n\tregister_setting( 'ywig-settings-group', 'company_address_2', 'sanitize_text_field' );\n\tregister_setting( 'ywig-settings-group', 'company_address_3', 'sanitize_text_field' );\n\n\t// CHY, Charity & Company numbers.\n\tregister_setting( 'ywig-settings-group', 'chy_no', 'sanitize_text_field' );\n\tregister_setting( 'ywig-settings-group', 'charity_reg', 'sanitize_text_field' );\n\tregister_setting( 'ywig-settings-group', 'company_reg', 'sanitize_text_field' );\n\n\t/**\n\t * Add Section to put all these fields..\n\t */\n\tadd_settings_section(\n\t\t'ywig-header-footer-options', // id of section.\n\t\t'YWIG Site Options', // Section display name on the settings page.\n\t\t'ywig_header_footer_options_cb', // callback.\n\t\t'ywig_site_settings' // id (slug) of page that this section shows on.\n\t);\n\n\t/**\n\t * Settings section callback.\n\t */\n\tfunction ywig_header_footer_options_cb() {\n\t\techo '<span>Header and Footer settings.</span>';\n\t}\n\n\t\t// Header Logo.\n\t\tadd_settings_field(\n\t\t\t'header-logo', // id.\n\t\t\t'Logo', // title.\n\t\t\t'ywig_header_logo_callback', // cb to display.\n\t\t\t'ywig_site_settings', // id (slug) of page.\n\t\t\t'ywig-header-footer-options' // id of section.\n\t\t);\n\n\t\t// Footer Logo.\n\t\tadd_settings_field(\n\t\t\t'footer-logo',\n\t\t\t'Footer Logo',\n\t\t\t'ywig_footer_logo_callback',\n\t\t\t'ywig_site_settings',\n\t\t\t'ywig-header-footer-options'\n\t\t);\n\n\t\t// Social links.\n\t\tadd_settings_field(\n\t\t\t'twitter-links', // why is this one plural??\n\t\t\t'Twitter Link',\n\t\t\t'ywig_twitter_link_callback',\n\t\t\t'ywig_site_settings',\n\t\t\t'ywig-header-footer-options'\n\t\t);\n\t\tadd_settings_field(\n\t\t\t'facebook-link',\n\t\t\t'Facebook',\n\t\t\t'ywig_facebook_link_callback',\n\t\t\t'ywig_site_settings',\n\t\t\t'ywig-header-footer-options'\n\t\t);\n\t\tadd_settings_field(\n\t\t\t'youtube-link',\n\t\t\t'Youtube',\n\t\t\t'ywig_youtube_link_callback',\n\t\t\t'ywig_site_settings',\n\t\t\t'ywig-header-footer-options'\n\t\t);\n\n\t\t// Company Address.\n\t\tadd_settings_field(\n\t\t\t'company-address-1',\n\t\t\t'Company Address 1',\n\t\t\t'ywig_company_address_1_callback',\n\t\t\t'ywig_site_settings',\n\t\t\t'ywig-header-footer-options'\n\t\t);\n\t\tadd_settings_field(\n\t\t\t'company-address-2',\n\t\t\t'Company Address 2',\n\t\t\t'ywig_company_address_2_callback',\n\t\t\t'ywig_site_settings',\n\t\t\t'ywig-header-footer-options'\n\t\t);\n\t\tadd_settings_field(\n\t\t\t'company-address-3',\n\t\t\t'Company Address 3',\n\t\t\t'ywig_company_address_3_callback',\n\t\t\t'ywig_site_settings',\n\t\t\t'ywig-header-footer-options'\n\t\t);\n\n\t\t// CHY.\n\t\tadd_settings_field(\n\t\t\t'chy-no',\n\t\t\t'CHY No.',\n\t\t\t'ywig_chy_no_callback',\n\t\t\t'ywig_site_settings',\n\t\t\t'ywig-header-footer-options'\n\t\t);\n\n\t\t// Charity Reg.\n\t\tadd_settings_field(\n\t\t\t'charity_reg',\n\t\t\t'Charity Reg',\n\t\t\t'ywig_charity_reg_callback',\n\t\t\t'ywig_site_settings',\n\t\t\t'ywig-header-footer-options'\n\t\t);\n\n\t\t// Company No.\n\t\tadd_settings_field(\n\t\t\t'company_no',\n\t\t\t'Company No.',\n\t\t\t'ywig_company_no_callback',\n\t\t\t'ywig_site_settings',\n\t\t\t'ywig-header-footer-options'\n\t\t);\n}",
"public function register()\n {\n\n if( ! $this->activated( 'cf_manager' ) ) return;\n\n\n $this->settings = new SettingsApi();\n\n $this->callbacks = new AdminCallbacks();\n\n $this->cf_callbacks = new CfCallbacks();\n\n $this->setSubpages();\n\n $this->metaBoxes = array();\n\n\n $this->setSettings();\n $this->setSections();\n $this->setFields();\n\n\n $this->settings->addSubPages( $this->subpages )->register();\n\n\n $this->showPosts();\n\n if( ! empty( $this->metaBoxes ) ) {\n\n add_action( 'add_meta_boxes', array( $this, 'addMultipleMetaBoxes' ) );\n\n }\n\n }",
"public function init() {\r\n\t\tregister_setting( $this->key, $this->key );\r\n\t}",
"private function setup_hooks() {\n\t\tadd_action( 'bp_register_admin_settings', array( $this, 'register_settings' ) );\n\t}",
"function gather_ua_jobs_register_settings() {\n\tregister_setting( 'gather_ua_jobs_settings', 'gather_ua_jobs_settings', 'gather_ua_jobs_sanitize_settings' );\n\n}",
"public function register_settings()\n\t\t{\n\t\t\tregister_setting('mailgun', 'mailgun', array(&$this, 'validation'));\n\t\t}",
"public function register_settings() {\n\n /**\n * Convenience variable for storing field names to prevent run-time errors\n */\n $fields = array(\n \"image\" => $this->name . '_image'\n );\n \n /**\n * Retrieve the stored option set for this plugin from the db\n */\n $option_values = get_option( $this->name );\n\n /**\n * If the db doesn't return anything (ex: on first run), we will run \n * into null references below, so we define default values for our fields.\n * Note that we're making use of our $fields array from above\n */\n $default_values = array (\n $fields[\"image\"] => \"\"\n );\n\n // Parse option values into predefined keys defined in $data, throw the rest away.\n $data = shortcode_atts( $default_values, $option_values );\n\n /**\n * Register the setting category identified by $this->name\n * We use the same key everywhere since our plugin is simple enough\n * \n * @since 0.1.0\n */\n register_setting( \n $this->name, // Option group, used for settings_fields()\n $this->name, // Option name, key for DB for this option set\n array($this, \"validate_options\")); // validation callback\n\n\n /**\n * Create a section for our settings. For some reason 'default' did not work for me.\n */\n add_settings_section(\n $this->name, // Section ID\n \"Main Settings\", // Title\n array($this, \"render_section\"), // callback to render section\n $this->name // $menu_slug\n );\n\n /**\n * Create the field, which included a callback to render the field view\n * The array is an optional data set which defines arguments provided to\n * the render_image_field callback\n */\n add_settings_field(\n $fields[\"image\"], // Field ID\n \"Image\", // Title\n array( $this, 'render_image_field' ), // callback to render field\n $this->name, // $menu_slug\n $this->name, // Section ID\n array( // Args for callback to render field\n 'option_name' => $this->name,\n 'name' => $fields[\"image\"],\n 'value' => esc_attr($data[$fields[\"image\"]]) \n ) \n );\n }",
"function wpt_testimonials_init(){\n\tregister_setting('wpt_testimonial_options','wpt_effect');\n\tregister_setting('wpt_testimonial_options','wpt_speed');\n\tregister_setting('wpt_testimonial_options','wpt_sortby');\t\n\tregister_setting('wpt_testimonial_options','wpt_orderby');\n\tregister_setting('wpt_testimonial_options','wpt_viewall');\n\tregister_setting('wpt_testimonial_options','wpt_content_limit');\n\tregister_setting('wpt_testimonial_options','wpt_viewall_page');\n}",
"public function init() {\n\t\tregister_setting( $this->key, $this->key );\n\t}",
"public function init() {\n\t\tregister_setting( $this->key, $this->key );\n\t}",
"public function init() {\n\t\tregister_setting( $this->key, $this->key );\n\t}",
"function subway_settings_api_init() {\n\n\t// Add new 'Pages Visibility Settings'.\n\tadd_settings_section(\n\t\t'subway_setting_section',\n\t\t__( 'Pages Visibility Settings', 'subway' ),\n\t\t'subway_setting_section_callback_function',\n\t\t'reading'\n\t);\n\n\t// WP Options 'subway_public_post'.\n\tadd_settings_field(\n\t\t'subway_public_post',\n\t\t__( 'Public Posts IDs', 'subway' ),\n\t\t'subway_setting_callback_function',\n\t\t'reading',\n\t\t'subway_setting_section'\n\t);\n\n\t// WP Options 'subway_is_public'.\n\tadd_settings_field(\n\t\t'subway_is_public',\n\t\t__( 'Public Website', 'subway' ),\n\t\t'subway_is_public_form',\n\t\t'reading',\n\t\t'subway_setting_section'\n\t);\n\n\t// WP Options 'subway_login_page'.\n\tadd_settings_field(\n\t\t'subway_login_page',\n\t\t__( 'Login Page', 'subway' ),\n\t\t'subway_login_page_form',\n\t\t'reading',\n\t\t'subway_setting_section'\n\t);\n\n\t// WP Options 'subway_redirect_type'.\n\tadd_settings_field(\n\t\t'subway_redirect_type',\n\t\t__( 'Redirect Type', 'subway' ),\n\t\t'subway_redirect_option_form',\n\t\t'reading',\n\t\t'subway_setting_section'\n\t);\n\n\t// WP Options 'subway_bypassing_info'.\n\tadd_settings_field(\n\t\t'subway_bypassing_info',\n\t\t__( 'Bypassing Redirect', 'subway' ),\n\t\t'subway_bypassing_option_form',\n\t\t'reading',\n\t\t'subway_setting_section'\n\t);\n\n\t// Register all the callback settings id.\n\tregister_setting( 'reading', 'subway_public_post' );\n\tregister_setting( 'reading', 'subway_is_public' );\n\tregister_setting( 'reading', 'subway_login_page' );\n\tregister_setting( 'reading', 'subway_redirect_type' );\n\n\tregister_setting( 'reading', 'subway_redirect_page_id' );\n\tregister_setting( 'reading', 'subway_redirect_custom_url' );\n\n}",
"function wp_set_all_user_settings($user_settings)\n {\n }",
"function action_customize_register_for_dynamic_settings() {\n\t\tadd_filter( 'customize_dynamic_setting_args', array( $this, 'filter_customize_dynamic_setting_args_for_test_dynamic_settings' ), 10, 2 );\n\t\tadd_filter( 'customize_dynamic_setting_class', array( $this, 'filter_customize_dynamic_setting_class_for_test_dynamic_settings' ), 10, 3 );\n\t}",
"public function page_init()\n {\n register_setting(\n 'sepw_option_group', // Option group\n 'sepw_settings', // Option name\n array($this, 'sanitize') // Sanitize\n );\n\n add_settings_section(\n 'info_section_id',\n __('Guide', 'sepw'),\n array($this, 'print_info_section_info'),\n 'sepw-setting-admin'\n );\n\n add_settings_section(\n 'setting_section_id', // ID\n __('Settings', 'sepw'), // Title\n array($this, 'print_settings_section_info'), // Callback\n 'sepw-setting-admin' // Page\n );\n\n add_settings_section(\n 'generate_section_id',\n __('Create Pricelist', 'sepw'),\n array($this, 'print_generate_section_info'),\n 'sepw-setting-admin'\n );\n\n add_settings_field(\n 'product_fields',\n __('Filters', 'sepw'),\n array($this, 'product_fields_callback'),\n 'sepw-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'images_size',\n __('Thumbnail size', 'sepw'),\n array($this, 'images_size_callback'),\n 'sepw-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'cache_lifetime',\n __('Update Frequency', 'sepw'),\n array($this, 'cache_lifetime_callback'),\n 'sepw-setting-admin',\n 'setting_section_id'\n );\n }",
"public static function register_option() {\n\t\tWPSEO_Options::register_option( static::get_instance() );\n\t}",
"public function settings()\n\t\t{\n\t\t\t$section = 'reading';\n\t\t\tadd_settings_section(\n\t\t\t\t$this->tag . '_settings_section',\n\t\t\t\t$this->name . ' Settings',\n\t\t\t\tfunction () {\n\t\t\t\t\techo '<p>Configuration options for the ' . esc_html( $this->name ) .' plugin.</p>';\n\t\t\t\t},\n\t\t\t\t$section\n\t\t\t);\n\t\t\tforeach ( $this->settings AS $id => $options ) {\n\t\t\t\t$options['id'] = $id;\n\t\t\t\tadd_settings_field(\n\t\t\t\t\t$this->tag . '_' . $id . '_settings',\n\t\t\t\t\t$id,\n\t\t\t\t\tarray( &$this, 'settings_field' ),\n\t\t\t\t\t$section,\n\t\t\t\t\t$this->tag . '_settings_section',\n\t\t\t\t\t$options\n\t\t\t\t);\n\t\t\t}\n\t\t\tregister_setting(\n\t\t\t\t$section,\n\t\t\t\t$this->tag,\n\t\t\t\tarray( &$this, 'settings_validate' )\n\t\t\t);\n\t\t}",
"public function register_settings() {\n\t\tif ( ! empty( $_GET['page'] ) && self::SLUG == $_GET['page'] && 'upload' == $this->settings['watermark_type'] && ! wp_attachment_is_image( $this->settings['watermark_attachment_id'] ) ) {\n\t\t\t$this->settings['watermark_type'] = $this->default_settings['watermark_type'];\n\n\t\t\t$option = (array) get_option( self::OPTION_NAME, array() );\n\t\t\t$option['watermark_type'] = $this->settings['watermark_type'];\n\t\t\tupdate_option( self::OPTION_NAME, $option );\n\t\t}\n\n\t\tadd_settings_section( 'wpcom-watermark-image-uploads_base', null, array( $this, 'settings_section_base_description' ), self::SLUG );\n\t\tadd_settings_section( 'wpcom-watermark-image-uploads_watermark-selection', __( 'Watermark Selection', 'wpcom-watermark-image-uploads' ), array( $this, 'settings_section_watermark_selection' ), self::SLUG );\n\n\t\t// Don't show this next bit to Enterprise users\n\t\tif ( ! $this->is_enterprise() ) {\n\t\t\tadd_settings_field( 'wpcom-watermark-image-uploads_watermark-selection_field-theme', $this->make_watermark_selection_title( 'From Your Theme', 'theme', ! $this->theme_watermark_exists() ), array( $this, 'settings_field_image_selection_from_theme' ), self::SLUG, 'wpcom-watermark-image-uploads_watermark-selection' );\n\t\t}\n\n\t\tif ( current_user_can( 'upload_files' ) ) {\n\t\t\tadd_settings_field( 'wpcom-watermark-image-uploads_watermark-selection_field-upload', $this->make_watermark_selection_title( 'Uploaded', 'upload' ), array( $this, 'settings_field_image_selection_from_upload' ), self::SLUG, 'wpcom-watermark-image-uploads_watermark-selection' );\n\t\t}\n\n\t\tadd_settings_field( 'wpcom-watermark-image-uploads_watermark-selection_field-none', $this->make_watermark_selection_title( 'No Watermark', 'none' ), '__return_false', self::SLUG, 'wpcom-watermark-image-uploads_watermark-selection' );\n\n\t\tregister_setting( self::OPTION_NAME, self::OPTION_NAME, array( $this, 'setting_sanitization' ) );\n\t}",
"function htpmpro_settings_init() {\r\n\tregister_setting( 'options_group_general', 'htpm_options' );\r\n\r\n\tadd_settings_section(\r\n\t\t'section_1',\r\n\t\t'',\r\n\t\t'',\r\n\t\t'options_group_general'\r\n\t);\r\n\r\n\tadd_settings_field(\r\n\t\t'htpm_list_plugins', // field name\r\n\t\tesc_html__( 'WP Plugins Manager', 'htpmpro' ),\r\n\t\t'htpmpro_list_plugins_cb',\r\n\t\t'options_group_general',\r\n\t\t'section_1',\r\n\t\t[\r\n\t\t\t'label_for' => 'htpm_list_plugins',\r\n\t\t\t'class' => 'htpmpro_row',\r\n\t\t]\r\n\t);\r\n}",
"function theme_options_init(){\n\tregister_setting( 'sample_options', 'site_description', 'theme_options_validate' );\n\tregister_setting( 'ga_options', 'ga_account', 'ga_validate' );\n\tadd_filter('site_description', 'stripslashes');\n}",
"private static function setup() {\n if(!isset(self::$settings)) {\n require 'regain/global_settings.php';\n self::$settings = $settings;\n }\n }"
] | [
"0.7193437",
"0.6992135",
"0.6991059",
"0.69773716",
"0.6961627",
"0.6960646",
"0.6937324",
"0.6858746",
"0.681216",
"0.6698226",
"0.6681473",
"0.66112727",
"0.66100556",
"0.6602855",
"0.65282536",
"0.6524228",
"0.6515486",
"0.6492001",
"0.6427416",
"0.64028984",
"0.640276",
"0.64012337",
"0.6395806",
"0.63864255",
"0.638171",
"0.6380257",
"0.6375401",
"0.63586843",
"0.63579756",
"0.63563776",
"0.63548464",
"0.630733",
"0.6307056",
"0.6305831",
"0.62973475",
"0.6285926",
"0.62792856",
"0.62792856",
"0.626492",
"0.6254939",
"0.6236272",
"0.6226485",
"0.62214756",
"0.6219028",
"0.6188219",
"0.6178475",
"0.6176088",
"0.6174525",
"0.6162447",
"0.6141959",
"0.61309576",
"0.6112299",
"0.61048853",
"0.60993266",
"0.60966355",
"0.6089317",
"0.6084941",
"0.607934",
"0.60767186",
"0.6074435",
"0.60713017",
"0.60694164",
"0.6069173",
"0.6068264",
"0.6059366",
"0.60571384",
"0.6045222",
"0.60421324",
"0.6026962",
"0.60143715",
"0.60098684",
"0.600739",
"0.6001601",
"0.5988669",
"0.59822875",
"0.59821475",
"0.5970617",
"0.5966361",
"0.59644145",
"0.5960895",
"0.59605885",
"0.5953295",
"0.59448695",
"0.5941266",
"0.5939492",
"0.59270537",
"0.5916426",
"0.5905607",
"0.5905607",
"0.5905607",
"0.5902965",
"0.5898499",
"0.58950365",
"0.58821994",
"0.58741605",
"0.5869545",
"0.58676785",
"0.5863901",
"0.58603334",
"0.585211"
] | 0.5963782 | 79 |
Returns an enableFields SQL statement for the specified table | protected function enableFields($tableName) {
if (TYPO3_MODE === 'FE') {
// Use enableFields in frontend mode
$enableFields = $GLOBALS['TSFE']->sys_page->enableFields($tableName);
} else {
// Use enableFields in backend mode
$enableFields = \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($tableName);
$enableFields .= \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields($tableName);
}
return $enableFields;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function enableFields($table) {\n\t\t$ctrl = $GLOBALS['TCA'][$table]['ctrl'];\n\t\t$query = '';\n\t\tif (is_array($ctrl)) {\n\t\t\t\t// Delete field check:\n\t\t\tif ($ctrl['delete']) {\n\t\t\t\t$query .= ' AND ' . $table . '.' . $ctrl['delete'] . ' = 0';\n\t\t\t}\n\n\t\t\t\t// Filter out new place-holder records in case we are NOT in a versioning preview (that means we are online!)\n\t\t\tif ($ctrl['versioningWS']) {\n\t\t\t\t$query .=' AND ' . $table . '.t3ver_state <= 0'; // Shadow state for new items MUST be ignored!\n\t\t\t}\n\n\t\t\t\t// Enable fields:\n\t\t\tif (is_array($ctrl['enablecolumns']))\t{\n\t\t\t\tif ($ctrl['enablecolumns']['disabled']) {\n\t\t\t\t\t$field = $table . '.' . $ctrl['enablecolumns']['disabled'];\n\t\t\t\t\t$query .= ' AND ' . $field . ' = 0';\n\t\t\t\t}\n\t\t\t\tif ($ctrl['enablecolumns']['starttime']) {\n\t\t\t\t\t$field = $table.'.'.$ctrl['enablecolumns']['starttime'];\n\t\t\t\t\t$query .= ' AND (' . $field . ' <= ' . time() . ')';\n\t\t\t\t}\n\t\t\t\tif ($ctrl['enablecolumns']['endtime']) {\n\t\t\t\t\t$field = $table . '.' . $ctrl['enablecolumns']['endtime'];\n\t\t\t\t\t$query .= ' AND (' . $field . ' = 0 OR ' . $field . ' > ' . time() . ')';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $query;\n\t}",
"private function sql_whereAnd_enableFields()\n {\n // Get table and field\n list( $table ) = explode( '.', $this->curr_tableField );\n\n $andWhere = $this->pObj->cObj->enableFields( $table );\n\n // RETURN AND WHERE statement\n return $andWhere;\n }",
"protected function getWhereClauseForEnabledFields() {}",
"public function getEnabledFieldString($table, $alias = null) {\n\t\t$enabledFields = $GLOBALS['TSFE']->sys_page->enableFields($table);\n\n\t\tif($alias !== null) {\n\t\t\t$enabledFields = str_replace($table, $alias, $enabledFields);\n\t\t}\n\n\t\treturn $enabledFields;\n\t}",
"function enableFields($table,$show_hidden=-1,$ignore_array=array())\t{\n\t\tif ($show_hidden==-1 && $this->showHiddenPage)\t{\t\n\t\t\t$show_hidden = 1;\n\t\t}\n\t\tif ($show_hidden==-1)\t$show_hidden=0;\t// If show_hidden was not changed during the previous evaluation, do it here.\n\n\t\t$ctrl = $GLOBALS['TCA'][$table]['ctrl'];\n\t\t$query='';\n\t\tif (is_array($ctrl))\t{\n\t\t\tif ($ctrl['delete'])\t{\n\t\t\t\t$query.=' AND '.$table.'.'.$ctrl['delete'].'=0';\n\t\t\t}\n\t\t\tif (is_array($ctrl['enablecolumns']))\t{\n\t\t\t\tif ($ctrl['enablecolumns']['disabled'] && !$show_hidden && !$ignore_array['disabled'])\t{\n\t\t\t\t\t$field = $table.'.'.$ctrl['enablecolumns']['disabled'];\n\t\t\t\t\t$query.=' AND '.$field.'=0';\n\t\t\t\t}\n\t\t\t\tif ($ctrl['enablecolumns']['starttime'] && !$ignore_array['starttime'])\t{\n\t\t\t\t\t$field = $table.'.'.$ctrl['enablecolumns']['starttime'];\n\t\t\t\t\t$query.=' AND ('.$field.'<='.$GLOBALS['SIM_EXEC_TIME'].')';\n\t\t\t\t}\n\t\t\t\tif ($ctrl['enablecolumns']['endtime'] && !$ignore_array['endtime'])\t{\n\t\t\t\t\t$field = $table.'.'.$ctrl['enablecolumns']['endtime'];\n\t\t\t\t\t$query.=' AND ('.$field.'=0 OR '.$field.'>'.$GLOBALS['SIM_EXEC_TIME'].')';\n\t\t\t\t}\n\t\t\t\t/*if ($ctrl['enablecolumns']['fe_group'] && !$ignore_array['fe_group'])\t{\n\t\t\t\t\t$field = $table.'.'.$ctrl['enablecolumns']['fe_group'];\n\t\t\t\t\t$gr_list = $GLOBALS['TSFE']->gr_list;\n\t\t\t\t\tif (!strcmp($gr_list,''))\t$gr_list=0;\n\t\t\t\t\t$query.=' AND '.$field.' IN ('.$gr_list.')';\n\t\t\t\t}*/\n\t\t\t}\n\t\t} else {\n\t\t\t//No info found\n\t\t\t$query.='';\n\t\t}\n\n\t\treturn $query;\n\t}",
"protected function _field_data($table)\n {\n return 'SELECT TOP 1 * FROM ' . $this->protect_identifiers($table);\n }",
"public function getQueryFields ($table);",
"function prefixed_table_fields_string($table, $exclude = array())\n{\n return prefixed_table_fields_array($table,true,$exclude);\n}",
"function getTableFields($table) {\n return $this->select(\"show fields from $table\");\n }",
"public function getFields($table);",
"public function fields($table_alias, array $fields = []);",
"public function show_tablefields()\n {\n $table_name = JFactory::getApplication()->input->get('table_name');\n\n if( ! $table_name)\n {\n return;\n }\n\n $db = JFactory::getDBO();\n\n $table_name = $db->getPrefix().$table_name;\n $fields = $db->getTableColumns($table_name);\n\n if( ! count($fields) || ! count($fields[$table_name]))\n {\n JFactory::getApplication()->enqueueMessage(jgettext('No table fields found'), 'error');\n }\n\n ?>\n<table>\n <tr>\n <th colspan=\"2\"><?php echo jgettext('Include')?></th>\n <th><?php echo jgettext('Editable'); ?></th>\n <th><?php echo jgettext('Type'); ?></th>\n </tr>\n <?php\n foreach($fields[$table_name] as $key => $value)\n {\n switch($value)\n {\n case 'int':\n case 'tinyint':\n $def = '0';\n break;\n\n default:\n $def = 'NULL';\n break;\n }\n\n $javascript1 = \"$('tblfield_edit_\".$key.\"').disabled=(this.checked)?false:true;\";\n $javascript2 = \"$('tblfield_type_\".$key.\"').disabled=(this.checked && $('tblfield_edit_\"\n .$key.\"').checked)?false:true;\";\n\n $javascript = $javascript1.$javascript2;\n ?>\n <tr>\n <td><input type=\"checkbox\" onchange=\"<?php echo $javascript; ?>\"\n name=\"table_fields[]\" checked=\"checked\"\n id=\"tblfield_<?php echo $key; ?>\"\n value=\"<?php echo $key; ?>\">\n </td>\n <td><label for=\"tblfield_<?php echo $key; ?>\">\n <?php echo $key.'<br />('.$value.')'; ?>\n </label></td>\n <td><input type=\"checkbox\" onchange=\"<?php echo $javascript2; ?>\"\n name=\"table_fields_edits[]\" checked=\"checked\"\n id=\"tblfield_edit_<?php echo $key; ?>\"\n value=\"<?php echo $key; ?>\"></td>\n <td><select name=\"table_fields_types[<?php echo $key; ?>]\"\n id=\"tblfield_type_<?php echo $key; ?>\">\n <option>text</option>\n <option>text area</option>\n <option>radio bool</option>\n <option>html</option>\n </select></td>\n </tr>\n <?php\n }\n ?>\n</table>\n <?php\n }",
"function getFields($table,$fields=\"\",$condition=\"\",$limit=\"\",$calculateRows=false,$fastHint=false);",
"private function setFields(): string\n {\n $sql = '';\n\n foreach (array_keys($this->data) as $key) {\n $sql .= '`' . $key . '` = ? , ';\n }\n return rtrim($sql, ', ');\n }",
"public function getCreateTableQuery($table);",
"abstract public function table_sql($tableName);",
"protected function getWhereClauseForEnabledFields()\n {\n if (TYPO3_MODE === 'FE' && $GLOBALS['TSFE']->sys_page) {\n // frontend context\n $whereClause = $GLOBALS['TSFE']->sys_page->enableFields('sys_file_collection');\n $whereClause .= $GLOBALS['TSFE']->sys_page->deleteClause('sys_file_collection');\n } else {\n // backend context\n $whereClause = \\TYPO3\\CMS\\Backend\\Utility\\BackendUtility::BEenableFields('sys_file_collection');\n $whereClause .= \\TYPO3\\CMS\\Backend\\Utility\\BackendUtility::deleteClause('sys_file_collection');\n }\n return $whereClause;\n }",
"function queryTableFields($table)\n {\n trigger_error(E_DEPRECATED); // replace with queryTableColumnNames\n }",
"static function custom_get_sql() {\n # this is the default functionality\n $table = static::get_tablename();\n return \"select * from $table\";\n }",
"function columnsSql($table = '')\n\t{\n\t\t// Not supported\n\t\treturn FALSE;\n\t}",
"private function setFields()\n\t{\t\n\t\t$sql = '';\n\t\t\n\t\tforeach (array_keys($this->data) as $key)\n\t\t{\n\t\t\t$sql .= '`' . $key . '` = ? , ';\n\t\t}\n\t\t\n\t\t$sql = rtrim($sql, ', ');\n\t\t\n\t\treturn $sql;\n\t}",
"private function _sql_append($table) {\n\t\tif ($this->append) {\n\t\t\treturn \"OR $table.ID IN ({$this->append})\";\n\t\t}\n\t}",
"protected function toBaseSQL() {\r\n\t\t$sql=' FROM '.$this->resolveTable();\r\n\r\n\t\t$sql.=$this->buildJoinClause();\r\n\t\t$sql.=$this->buildWhereClause();\r\n\r\n\t\t$sql.=$this->buildGroupClause();\r\n\r\n\t\treturn $sql;\r\n\t}",
"private function setField()\n {\n $sql = '';\n $sql = rtrim($sql , ', ');\n\n foreach (array_keys($this->data) as $key){\n $sql .= '`' . $key . '` = ?, ';\n }\n\n $sql = rtrim($sql , ', ');\n return $sql;\n }",
"public function getCondition() { \n \t\treturn $this->condition . tx_newspaper::enableFields(tx_newspaper::getTable($this)); \n \t}",
"public function getTableSql()\n {\n $sql = '';\n $sql .= $this->driver->getQuoteTableName($this->table);\n return $sql;\n }",
"protected function createTableSql($name, $table) {\n $sql_fields = [];\n foreach ($table['fields'] as $field_name => $field) {\n $sql_fields[] = $this->createFieldSql($name, $field_name, $this->processField($field));\n }\n\n // Use already prefixed table name.\n $table_prefixed = $this->connection->prefixTables('{' . $name . '}');\n\n $sql = \"CREATE TABLE [{$table_prefixed}] (\" . PHP_EOL;\n $sql .= implode(\",\" . PHP_EOL, $sql_fields);\n $sql .= PHP_EOL . \")\";\n return $sql;\n }",
"function ctools_export_crud_enable($table, $object) {\r\n return ctools_export_crud_set_status($table, $object, FALSE);\r\n}",
"public static function getEnableFieldsCondition($table, $showHidden = FALSE, $ignoreArray = array()) {\n\t\t$enableCondition = '';\n\t\t// First check if table has a TCA ctrl section, otherwise t3lib_page::enableFields() will die() (stupid thing!)\n\t\t// NOTE: since TYPO3 4.5, an exception is thrown, so this method could eventually be adapted\n\t\tif (isset($GLOBALS['TCA'][$table]['ctrl'])) {\n\n\t\t\tif (TYPO3_MODE == 'FE') {\n\t\t\t\t$showHidden = $showHidden ? $showHidden : ($table == 'pages' ? $GLOBALS['TSFE']->showHiddenPage : $GLOBALS['TSFE']->showHiddenRecords);\n\t\t\t\t$enableCondition = $GLOBALS['TSFE']->sys_page->enableFields($table, $showHidden, $ignoreArray);\n\t\t\t} elseif (TYPO3_MODE == 'BE') {\n\t\t\t\t$enableCondition = \\TYPO3\\CMS\\Backend\\Utility\\BackendUtility::BEenableFields($table);\n\t\t\t\t// @fix: overlays patch for the need of Media, we don't want deleted file displayed in the BE.\n\t\t\t\t$enableCondition .= ' AND deleted = 0 ';\n\t\t\t}\n\t\t\t// If an enable clause was returned, strip the first ' AND '\n\t\t\tif (!empty($enableCondition)) {\n\t\t\t\t$enableCondition = substr($enableCondition, strlen(' AND '));\n\t\t\t}\n\t\t}\n\t\t// TODO: throw an exception if the given table has no TCA? (t3lib_page::enableFields() used a die)\n\t\treturn $enableCondition;\n\t}",
"protected function getCreateTableSQL($tablename) {\n\t\t$SQL='';\n\t\tforeach ($this->fieldNames as $fieldName) {\n\t\t\tif ($SQL!='') $SQL.=','.\"<br>\";\t\t\t\n\t\t\t$SQL.=$fieldName.' varchar(20)';\n\t\t}\n\t\t$SQL.=')';\n\t\t$SQL='create table '.$tablename.' ('.$SQL;\n\t\treturn $SQL;\n\n\t}",
"function select_sql($table='', $fields='*', ...$get_args) {\n\t\t$this->select_result = false;\n return $this->selecting($table, $fields, ...$get_args);\t \n }",
"static function sql_wp_list_table_profile_fields() {\n\t\tglobal $wpdb;\n\n\t\t$sql = $wpdb->get_results( \"SELECT * FROM {$wpdb->base_prefix}pp_profile_fields\", 'ARRAY_A' );\n\n\t\treturn $sql;\n\t}",
"public function select($table, array $fields = null);",
"public function tableOptions(string $table, string $schema = null) : string\n {\n $sql = 'SELECT TABLES.TABLE_TYPE AS table_type,TABLES.AUTO_INCREMENT AS auto_increment,TABLES.ENGINE AS engine,TABLES.TABLE_COLLATION AS table_collation FROM INFORMATION_SCHEMA.TABLES WHERE ';\n if ($schema) {\n $sql .= \"TABLES.TABLE_SCHEMA = '\".$schema.\"' AND TABLES.TABLE_NAME = '\".$table.\"'\";\n } else {\n $sql .= \"TABLES.TABLE_NAME = '\".$table.\"'\";\n }\n\n return $sql;\n }",
"public function getPrimaryKeyDDL(Table $table);",
"private function selectFormat(array $fields, string $tableName){\n $query = \"\";\n foreach ($fields as $field){\n $query .= $tableName . \".\" . $field . \" AS \" . $tableName . $field . \",\";\n }\n return $query;\n }",
"function getEnableFieldsToBeIgnored() ;",
"public static function selectVersioningFields($table, $selectFields) {\n\t\t$additionalFields = self::selectVersioningFieldsArray($table, $selectFields);\n\t\tif (count($additionalFields) > 0) {\n\t\t\tforeach ($additionalFields as $aField) {\n\t\t\t\t$selectFields .= ', ' . $table . '.' . $aField;\n\t\t\t}\n\t\t}\n\t\treturn $selectFields;\n\t}",
"public static function check_enabled_fields($conn) \n {\n Ossim_db::check_connection($conn);\n \n $exists = FALSE;\n $exists_flogin = FALSE;\n $exists_last = FALSE;\n $exists_last_logon = FALSE;\n $exists_uuid = FALSE;\n $exists_expires = FALSE;\n $exists_login_method = FALSE;\n \n $query = 'SHOW columns FROM users';\n \n $rs = $conn->Execute($query); \n \n if (!$rs) \n {\n Av_exception::write_log(Av_exception::DB_ERROR, $conn->ErrorMsg());\n } \n else \n {\n while (!$rs->EOF) \n {\n if ($rs->fields['Field'] == 'enabled')\n {\n $exists = TRUE;\n }\n \n if ($rs->fields['Field'] == 'first_login')\n { \n $exists_flogin = TRUE;\n }\n \n if ($rs->fields['Field'] == 'last_pass_change')\n { \n $exists_last = TRUE;\n }\n \n if ($rs->fields['Field'] == 'last_logon_try')\n { \n $exists_last_logon = TRUE;\n }\n \n if ($rs->fields['Field'] == 'uuid')\n { \n $exists_uuid = TRUE;\n }\n \n if ($rs->fields['Field'] == 'expires')\n { \n $exists_expires = TRUE;\n }\n \n if ($rs->fields['Field'] == 'login_method')\n { \n $exists_login_method = TRUE;\n }\n \n $rs->MoveNext();\n }\n \n if (!$exists)\n { \n $conn->Execute(\"ALTER TABLE `users` ADD `enabled` BOOL NOT NULL DEFAULT '1'\");\n }\n \n if (!$exists_flogin) \n {\n $conn->Execute(\"ALTER TABLE `users` ADD `first_login` BOOL NOT NULL DEFAULT '1' AFTER `enabled`\");\n $conn->Execute(\"UPDATE users SET first_login=0\");\n }\n \n if (!$exists_last) {\n $conn->Execute(\"ALTER TABLE `users` ADD `last_pass_change` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `first_login`\");\n $conn->Execute(\"UPDATE users SET last_pass_change=CURRENT_TIMESTAMP()\");\n }\n \n if (!$exists_last_logon) \n {\n $conn->Execute(\"ALTER TABLE `users` ADD `last_logon_try` DATETIME NOT NULL AFTER `last_pass_change`\");\n $conn->Execute(\"UPDATE users SET last_logon_try = NOW()\");\n } \n \n if (!$exists_uuid)\n {\n $conn->Execute(\"ALTER TABLE `users` ADD `uuid` VARCHAR(255) NOT NULL DEFAULT ''\");\n }\n \n if (!$exists_expires)\n {\n $conn->Execute(\"ALTER TABLE `users` ADD `expires` DATETIME NOT NULL DEFAULT '2200-01-01 00:00:00'\");\n }\n \n if (!$exists_login_method) \n {\n $conn->Execute(\"ALTER TABLE `users` ADD `login_method` VARCHAR(4) NOT NULL\");\n }\n \n //Set user UUID\n $conn->Execute(\"UPDATE users SET uuid=SHA1(CONCAT(login,'#',pass)) WHERE uuid=''\");\n }\n \n //Permission table\n $conn->Execute(\"CREATE TABLE IF NOT EXISTS user_host_perm (\n `login` varchar(64),\n `asset_id` binary(16),\n PRIMARY KEY (`login`, `asset_id`)\n ) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8;\");\n \n $conn->Execute(\"CREATE TABLE IF NOT EXISTS user_net_perm (\n `login` varchar(64),\n `asset_id` binary(16),\n PRIMARY KEY (`login`, `asset_id`)\n ) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8;\");\n \n /*\n $conn->Execute(\"CREATE TABLE IF NOT EXISTS user_nearnet_perm (\n `login` varchar(64),\n `asset_id` binary(16),\n PRIMARY KEY (`login`, `asset_id`)\n ) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8;\");\n \n */\n \n $rs = $conn->Execute(\"SELECT count(*) AS total FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'alienvault' \n AND TABLE_NAME = 'host_net_reference';\");\n \n if ($rs) \n { \n if($rs->fields['total'] == 0)\n {\n $conn->Execute(\"CREATE TABLE IF NOT EXISTS `host_net_reference` (\n `host_id` binary(16) NOT NULL,\n `net_id` binary(16) NOT NULL,\n PRIMARY KEY (`host_id`,`net_id`)\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8;\");\n \n $conn->Execute(\"REPLACE INTO host_net_reference SELECT host.id,net_id FROM host,host_ip,net_cidrs WHERE host.id = host_ip.host_id AND host_ip.ip> = net_cidrs.begin AND host_ip.ip <= net_cidrs.end\");\n }\n }\n \n return TRUE;\n }",
"public function toSQL()\n {\n $sql = '`' . $this->fieldName . '` ' . $this->getOperator() . ' ' . $this->getSearchValue();\n if (null != $this->tableName) {\n $sql = '`' . $this->tableName . '`.' . $sql;\n }\n \n return $sql;\n }",
"public abstract function getSelectSQL($fields, $from, $joins, $where, $having, $group, $order, $limit, $values, $forupdate);",
"public function select($table_name, $fields = array(), $where = array(), $order_by = '')\r\n {\r\n }",
"function get_editable_field($role_id,$table)\n {\n // LEFT JOIN TBM_EDITFIELD a ON a.fieldname = b.COLUMN_NAME AND a.role_id = '\".$role_id.\"'\n // WHERE b.TABLE_NAME ='\".$table.\"' \";\n $sql = \" SELECT DISTINCT UPPER(b.COLUMN_NAME) AS fieldname, a.editable FROM INFORMATION_SCHEMA.COLUMNS b\n LEFT JOIN TBM_EDITFIELD a ON a.fieldname = b.COLUMN_NAME AND a.role_id = '\".$role_id.\"'\n WHERE b.TABLE_NAME IN (\".$table.\") \";\n\n Debugbar::info($sql);\n $data = DB::SELECT($sql);\n\n if(!empty($data))\n {\n foreach($data as $k => $v)\n {\n //echo \"1<pre>\"; print_r($v);\n $result[$v->fieldname]= $v->editable;\n }\n }\n\n return $result;\n }",
"public function enableFields($table, $show_hidden = false, array $ignore_array = [])\n {\n $tsfe = $this->getTypoScriptFrontendController();\n $show_hidden = $show_hidden ?: ($table === 'pages' ? $tsfe->showHiddenPage : $tsfe->showHiddenRecords);\n return $tsfe->sys_page->enableFields($table, (bool)$show_hidden, $ignore_array);\n }",
"protected function buildFields(): string\n {\n $sql = '';\n\n // A set of fields isn't really required, even if it's a good\n // idea to have them. If nothing is there, leave it empty.\n if ( $this->fieldValueSet->isEmpty() )\n {\n return $sql;\n }\n\n $fieldNames = [];\n\n foreach ( $this->fieldValueSet->getFieldNames() as $fn )\n {\n $fieldNames[] = $this->quoter()->quoteField($fn);\n }\n\n $sql .= $this->indent() . '(';\n $sql .= implode(', ', $fieldNames);\n $sql .= ')' . PHP_EOL;\n\n return $sql;\n }",
"function adv_select($table, array $where = null, array $fields = null, $order = '', $limit = null, $offset = null);",
"public static function getTableFields($table_name, $exclude = array(), $wrap = false)\n {\n static $table_fields_cache = array();\n\n if (!isset($table_fields_cache[$table_name])) {\n $table_fields_cache[$table_name] = self::getColumn(\"SHOW COLUMNS FROM ?:$table_name\");\n }\n\n $fields = $table_fields_cache[$table_name];\n if (!$fields) {\n return false;\n }\n\n if ($exclude) {\n $fields = array_diff($fields, $exclude);\n }\n\n if ($wrap) {\n foreach ($fields as &$v) {\n $v = \"`$v`\";\n }\n }\n\n return $fields;\n }",
"public function getForUpdateSQL();",
"function getIgnoreEnableFields() ;",
"public static function getAllFieldsForTable($table) {\n\t\tif (!isset(self::$tableFields[$table])) {\n\t\t\tself::$tableFields[$table] = $GLOBALS['TYPO3_DB']->admin_get_fields($table);\n\t\t}\n\t\treturn self::$tableFields[$table];\n\t}",
"public function __toString(): string\n {\n return sprintf(\n 'SELECT %s FROM %s WHERE %s',\n implode(', ', $this->fields),\n implode(', ', $this->table),\n implode(', ', $this->condition)\n );\n }",
"public function tableOptions($table, $schema=null){ }",
"public static function get_table_queries_for_addons(){\n $sqls = [];\n $sqls = apply_filters('latepoint_addons_sqls', $sqls);\n return $sqls;\n }",
"function prefixed_table_fields_array($table, $string = false, $exclude = array())\n{\n $CI =& get_instance();\n $fields = $CI->db->list_fields($table);\n\n foreach($exclude as $field){\n if(in_array($field,$fields)){\n unset($fields[array_search($field, $fields)]);\n }\n }\n\n $fields = array_values($fields);\n\n $i = 0;\n foreach ($fields as $f) {\n $fields[$i] = $table . '.' . $f;\n $i++;\n }\n\n return $string == false ? $fields : implode(',',$fields);\n}",
"function getSelectSql()\n {\n $str = \"SELECT * FROM \";\n if (isset($this->schema))\n $str = $str . $this->schema . \".\";\n\n $str = $str . $this->tblName . \" WHERE \" . $this->getWhereCondition($this->tblIndex);\n return $str;\n }",
"public function getAudienceSQL(string $sqlAudienceTable): string\n {\n return $this->getFilterSQL($sqlAudienceTable, \"name\", $this->audience_filter);\n }",
"public function getDisabledFlagColumnName() {}",
"public function setTableFields($table)\n {\n $q = $this->_dbHandler->prepare(\"DESCRIBE \" . $table);\n $q->execute();\n $table_fields = $q->fetchAll(PDO::FETCH_COLUMN);\n $this->_tableFields = $table_fields;\n }",
"function generate_sql($tablealias, $value) {\n return '';\n }",
"protected function createFieldSql($table, $name, $spec, $skip_checks = FALSE) {\n // Use a prefixed table.\n $table_prefixed = $this->connection->prefixTables('{' . $table . '}');\n\n $sql = $this->connection->quoteIdentifier($name) . ' ' . $spec['sqlsrv_type'];\n $is_text = in_array($spec['sqlsrv_type'], [\n 'char',\n 'varchar',\n 'text',\n 'nchar',\n 'nvarchar',\n 'ntext',\n ]);\n if ($is_text === TRUE && !empty($spec['length'])) {\n $sql .= '(' . $spec['length'] . ')';\n }\n elseif (in_array($spec['sqlsrv_type'], [\n 'numeric',\n 'decimal',\n ]) && isset($spec['precision']) && isset($spec['scale'])\n ) {\n // Maximum precision for SQL Server 2008 orn greater is 38.\n // For previous versions it's 28.\n if ($spec['precision'] > 38) {\n // Logs an error\n \\Drupal::logger('dblib')\n ->warning(\"Field '@field' in table '@table' has had it's precision dropped from @precision to 38\",\n [\n '@field' => $name,\n '@table' => $table,\n '@precision' => $spec['precision'],\n ]\n );\n $spec['precision'] = 38;\n }\n $sql .= '(' . $spec['precision'] . ', ' . $spec['scale'] . ')';\n }\n\n // When binary is true, case sensitivity is requested.\n if ($is_text === TRUE && isset($spec['binary']) && $spec['binary'] === TRUE) {\n $sql .= ' COLLATE ' . self::DEFAULT_COLLATION_CS;\n }\n\n if (isset($spec['not null']) && $spec['not null']) {\n $sql .= ' NOT NULL';\n }\n\n if (!$skip_checks) {\n if (isset($spec['default'])) {\n $default = $this->defaultValueExpression($spec['sqlsrv_type'], $spec['default']);\n $sql .= \" CONSTRAINT {$table_prefixed}_{$name}_df DEFAULT $default\";\n }\n if (!empty($spec['identity'])) {\n $sql .= ' IDENTITY';\n }\n if (!empty($spec['unsigned'])) {\n $sql .= ' CHECK (' . $this->connection->quoteIdentifier($name) . ' >= 0)';\n }\n }\n return $sql;\n }",
"public function getEnableFieldsToBeIgnored() {}",
"function getFieldOptions($table, $keyField, $labelField) {\n $query = db_select($table, 'tbl');\n $query->addField('tbl', $keyField, 'key_field');\n $query->addField('tbl', $labelField, 'label');\n return $query->execute()->fetchAllKeyed();\n }",
"function fn_get_table_fields($table_name, $exclude = array(), $wrap = false, $dbc_name = '')\n{\t\n\tstatic $table_fields_cache = array();\n\t\n\tif (!isset($table_fields_cache[$table_name])) {\n\t\t$table_fields_cache[$table_name] = db_get_fields(\"SHOW COLUMNS FROM ?:$table_name\");\n\t}\n\t\n\t$fields = $table_fields_cache[$table_name];\n\tif (!$fields) {\n\t\treturn false;\n\t}\n\t\n\tif ($exclude) {\n\t\t$fields = array_diff($fields, $exclude);\t\n\t}\n\t\n\tif ($wrap) {\n\t\tforeach($fields as &$v) {\n\t\t\t$v = \"`$v`\";\n\t\t}\n\t}\n\t\n\treturn $fields;\n}",
"public function isSQLPrintEnabled(): bool{\n return(true); //protect the sql by default\n }",
"public function SQL_SelectFields($withPrimaryKey=true) {\n $sql = \"\";\n foreach ($this->fields as $f) {\n if ( ($f->isPrimary && $withPrimaryKey) || !$f->isPrimary ) {\n $sql .= (($sql == \"\")?\"\":\", \").$f->name;\n }\n }\n return $sql;\n }",
"function pdo_field_flags($stmt, $col) {\r\n $meta = pdo_stmt($stmt)->getColumnMeta($col);\r\n return implode(\" \", $meta[\"flags\"]);\r\n }",
"public function getIgnoreEnableFields() {}",
"protected function set__enabled( $enabled )\n\t{\n\t\tif ( $col = static::$databaseColumnEnabledDisabled )\n\t\t{\n\t\t\t$this->$col = $enabled;\n\t\t}\n\t}",
"public function getWhereClauseForEnabledFieldsIncludesDeletedCheckInBackend() {}",
"public function enabled()\n {\n return $this->andWhere(['>=', User::tableName() . '.status', User::STATUS_ENABLED]);\n }",
"function getTableSQLFields() {\n\n $SQLfields = array(\n 'id' => ' tinyint(1) unsigned NOT NULL AUTO_INCREMENT ',\n 'virtuemart_order_id' => ' int(11) UNSIGNED DEFAULT NULL',\n 'order_number' => ' char(32) DEFAULT NULL',\n 'virtuemart_paymentmethod_id' => ' mediumint(1) UNSIGNED DEFAULT NULL',\n 'payment_name' => ' char(255) NOT NULL DEFAULT \\'\\' ',\n 'payment_order_total' => 'decimal(15,5) NOT NULL DEFAULT \\'0.00000\\' ',\n 'payment_currency' => 'char(3) ',\n 'cost_per_transaction' => ' decimal(10,2) DEFAULT NULL ',\n 'cost_percent_total' => ' decimal(10,2) DEFAULT NULL ',\n 'tax_id' => ' smallint(1) DEFAULT NULL',\n 'commbank_custom' => ' varchar(255) ',\n 'commbank_response_amount' =>'decimal(10,2)',\n 'commbank_response_locale' =>'char(100)',\n 'commbank_response_batch_no' =>'char(32)',\n 'commbank_response_command'=> 'char(10)',\n 'commbank_response_version'=> 'char(13)',\n 'commbank_response_card_type'=> 'char(10)',\n 'commbank_response_order_info'=>'char(50)',\n 'commbank_response_receipnt_no'=>'char(50)',\n 'commbank_response_merchant_id'=>'char(50)',\n 'commbank_response_authorize_id'=>'char(50)',\n 'commbank_response_transaction_no'=>'char(64)',\n 'commbank_response_acq_code'=>'char(64)',\n 'commbank_response_txn_code'=>'char(64)',\n 'commbank_response_csc_result_code'=>'char(64)',\n 'commbank_response_csc_acq_code'=>'char(128)',\n 'commbank_response_residence_country' => ' char(2) DEFAULT NULL',\n 'commbankresponse_raw' => ' char DEFAULT NULL'\n );\n return $SQLfields;\n }",
"function SecuritySQL($strAction, $table=\"\", $strPerm=\"\")\n{\n\tglobal $cAdvSecurityMethod,$strTableName;\n\t\n\tif (!strlen($table))\t\n\t\t$table = $strTableName;\n\t\n\t$pSet = new ProjectSettings($table);\n\t\n\treturn \"\";\n}",
"private function createTechnicalPrimaryKeyIndexSql($table) {\n $result = [];\n $result[] = \"{$this->TECHNICAL_PK_COLUMN_NAME} UNIQUEIDENTIFIER DEFAULT NEWID() NOT NULL\";\n $result[] = \"CONSTRAINT {{$table}}_pkey_technical PRIMARY KEY CLUSTERED ({$this->TECHNICAL_PK_COLUMN_NAME})\";\n return implode(' ', $result);\n }",
"public function GetSQL()\n\t{\n\t\treturn db_get_select_sql($this->fields, $this->tables, $this->groupby, $this->filters, $this->sortfields, $this->limit);\n\t}",
"public function getAdditionalTableFields(): array\n\t{\n\t\treturn [];\n\t}",
"public function is_active_record_enabled();",
"public function conditionsToSql(string $fieldName, $value, $func = '', string $tablePrefix = ''): ?string\n {\n $ands = [];\n \n if (!is_array($value)) {\n $value = [$value];\n }\n\n $operator_str = is_array($func) && $func['operator'] == 'not in' ? 'IS NULL' : 'IS NOT NULL';\n \n foreach($value as $val) {\n $ors = [];\n \n if (!is_array($val)) {\n $val = [$val]; \n }\n \n foreach ($val as $v) {\n \t $ors[] = 'JSON_SEARCH(' . $tablePrefix . $fieldName . \", 'all', '\" . escape($v) . \"') \" . $operator_str;\n }\n \t\n \t$ands[] = '(\n \t' . implode(\" OR\\n\", $ors) . '\n )';\n }\n \n return '(\n \t' . implode(\" AND\\n\", $ands) . '\n )';\n }",
"function generateInsertSQL(&$Screen, $logTable, $format = 'var')\n {\n //some sanity checking for the format parameter\n switch($format){\n case 'var':\n case 'replace':\n break;\n default:\n die(\"ERROR: Parameter \\$format in function generateInsertSQL expects either 'var' or 'replace'.\\n\");\n }\n\n //array of fields in the SELECT statement (just to be able to use 'implode')\n $InsertFields = array();\n\n if ($logTable){\n $tableName = $this->ModuleID.\"_l\";\n\n $PKFieldName = end($this->PKFields);\n if('var' == $format){\n $InsertFields[$PKFieldName] = \"\\\"'\\\".\\$recordID.\\\"'\\\"\";\n } else {\n $InsertFields[$PKFieldName] = '/**RecordID**/';\n }\n\n } else {\n $tableName = $this->ModuleID;\n //inserts should include the PK field if it's not auto_increment\n foreach($this->PKFields as $PKFieldName){\n if(false === strpos($this->ModuleFields[$PKFieldName]->dbFlags, 'auto_increment')){\n if('var' == $format){\n $InsertFields[$PKFieldName] = \"\\\"'\\\".\\$recordID.\\\"'\\\"\";\n } else {\n $InsertFields[$PKFieldName] = '/**RecordID**/';\n }\n }\n }\n }\n\n \n if (in_array(strtolower(get_class($Screen)), array('editgrid', 'uploadgrid'))){\n //add grid specific fields \n if(!empty($Screen->localKey)){\n $InsertFields[$Screen->localKey] = '/**PR-ID**/';\n }\n \n if($Screen->listExtended){\n $extendingModule = GetModule($Screen->moduleID);\n $InsertFields[$extendingModule->extendsModuleKey] = '/**extendID**/';\n }\n\n if(count($Screen->conditions) > 0){\n $conditions = $Screen->conditions;\n } else {\n $conditions = $this->conditions;\n }\n\n if(count($conditions) > 0){\n foreach($conditions as $condField => $condValue){\n if(!in_array($condField, $InsertFields)){\n $InsertFields[$condField] = \"'{$condValue}'\";\n }\n }\n }\n \n \n //pick the right set of editable fields\n if($Screen->hasGridForm){\n $t_fields = $Screen->FormFields;\n } else {\n $t_fields = $Screen->Fields;\n }\n } else {\n if(is_array($Screen)){\n $t_fields = $Screen;\n } else {\n $t_fields = $Screen->Fields;\n }\n }\n//print_r($t_fields);\n //handle sub-fields - we \"flatten\" the subfield hierarchy\n $saveFields = array();\n foreach($t_fields as $sfName => $sf){\n //print \"screen field name $sfName\\n\";\n $saveFields = array_merge($saveFields, $sf->getRecursiveFields());\n }\n\n foreach($saveFields as $sfName => $sf){\n\n //only insert editable fields (no ViewFields etc)\n if ($sf->isEditable()){\n\n //look up corresponding ModuleField based on screen field name\n $mf = $this->ModuleFields[$sfName];\n\n switch (strtolower(get_class($mf))){\n case 'tablefield':\n $insert = false;\n //exclude any auto_increment field\n if ($logTable){\n if (\"_RecordID\" != $sfName){\n $insert = true;\n }\n } else {\n if (false === strpos($mf->dbFlags, \"auto_increment\")){\n $insert = true;\n }\n }\n if ($insert){\n if('var' == $format){\n $InsertFields[$sfName] = \"dbQuote(\\$data['{$sfName}'], '{$mf->dataType}')\";\n \n } elseif('replace' == $format){\n //using replace-style formatting, the dbQuote,\n //ChkFormat and and DateToISO must be called\n //outside this function.\n $InsertFields[$sfName] = \"'[*$sfName*]'\"; //this is a tag to be replaced before the prepared SQL is executed\n }\n }\n break;\n case 'remotefield';\n //this should save to the remote table - must generate separate SQL statement\n //(ignore RemoteFields here)\n\n break;\n case 'foreignfield':\n case 'codefield':\n case 'dynamicforeignfield':\n case 'calculatedfield':\n //die(\"Cannot use a foreign field in INSERT statement ($sfName)\\n\");\n print \"AA warning: (Screen {$Screen->name}, Field $sfName, Table $tableName)\\n\";\n print \" Non-saving field type used in form - INSERT statement will not save data for this field. \\n\";\n print \" This may be OK if this field is used for combo box filtering only.\\n\";\n break;\n\n default:\n print \"m. field type for INSERT statement: '\".get_class($mf).\"'\\n\";\n die(\"m. Unknown field type in INSERT statement (Screen {$Screen->name}, Field $sfName, Table $tableName)\\n\");\n break;\n }\n }\n }\n\n //add log data:\n if('var' == $format){\n $InsertFields['_ModDate'] = '\"NOW()\"';\n $InsertFields['_ModBy'] = '$User->PersonID';\n } elseif('replace' == $format){\n $InsertFields['_ModDate'] = 'NOW()';\n $InsertFields['_ModBy'] = '[**UserID**]';\n }\n//print \"generateInsertSQL {$this->ModuleID} InsertFields: \\n\";\n//print_r($InsertFields);\n\n if (count($InsertFields) > 0){\n //format SQL Statement\n if('var' == $format){\n $SQL = \"INSERT INTO `$tableName` (\\n \";\n $SQL .= implode(\",\\n \", array_keys($InsertFields));\n $SQL .= \"\\n) VALUES (\\n \\\".\";\n $SQL .= implode(\".\\\",\\n \\\".\", $InsertFields);\n $SQL .= \".\\\")\"; //NO ENDING NEWLINE - that will cause error messages...\n } elseif('replace' == $format){\n $SQL = \"INSERT INTO `$tableName` (\\n \";\n $SQL .= implode(\",\\n \", array_keys($InsertFields));\n $SQL .= \"\\n) VALUES (\\n \";\n $SQL .= implode(\",\\n \", $InsertFields);\n $SQL .= \")\"; //NO ENDING NEWLINE - that will cause error messages...\n }\n } else {\n $SQL = \"\";\n }\n return $SQL;\n }",
"public function getSQL();",
"protected function getTableStructure($table)\r\n\t{\r\n\t\treturn \"\\t<create><![CDATA[\".parent::getTableStructure($table).\"]]></create>\\n\";\r\n\t}",
"function GetFieldsList($table)\n\t{\n\t\t$tbl = $this->Table($table);\n\t\treturn $tbl->GetFieldsList();\n\t}",
"public function getFields($table) {\n\t\treturn $this->_list_fields($table);\n\t}",
"function getSQL(?GrammarInterface $grammar): string {\n if($grammar !== null) {\n $table = $grammar->quoteTable($this->table->getTable());\n \n $alias = $this->table->getAlias();\n if(!empty($alias)) {\n $table .= ' AS '.$alias;\n }\n } else {\n $table = $this->table;\n }\n \n $ons = (\n !empty($this->ons) ?\n ' ON '.\\implode(' AND ', $this->ons) :\n ''\n );\n \n return ($this->type ? $this->type.' ' : '').'JOIN '.$table.$ons;\n }",
"public function getTableFields()\n {\n return array(\n array(\"Field\" => \"uid_empresa\", \"Type\" => \"int(10)\", \"Null\" => \"NO\", \"Key\" => \"PRI\", \"Default\" => \"\", \"Extra\" => \"auto_increment\"),\n array(\"Field\" => \"endeve_id\", \"Type\" => \"varchar(60)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"pago_no_obligatorio\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"nombre\", \"Type\" => \"varchar(100)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"nombre_comercial\", \"Type\" => \"varchar(200)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"representante_legal\", \"Type\" => \"varchar(512)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"cif\", \"Type\" => \"varchar(20)\", \"Null\" => \"NO\", \"Key\" => \"UNI\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"pais\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_pais\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"direccion\", \"Type\" => \"varchar(255)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"localidad\", \"Type\" => \"varchar(255)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"provincia\", \"Type\" => \"varchar(255)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"cp\", \"Type\" => \"int(8)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"accion\", \"Type\" => \"timestamp\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"CURRENT_TIMESTAMP\", \"Extra\" => \"\"),\n array(\"Field\" => \"updated\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_provincia\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_municipio\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"convenio\", \"Type\" => \"varchar(255)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"created\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"aviso_caducidad_subcontratas\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"color\", \"Type\" => \"varchar(10)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"email\", \"Type\" => \"varchar(255)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_enterprise\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"logo\", \"Type\" => \"tinytext\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"skin\", \"Type\" => \"varchar(300)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"dokify\", \"Extra\" => \"\"),\n array(\"Field\" => \"lang\", \"Type\" => \"varchar(2)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"es\", \"Extra\" => \"\"),\n array(\"Field\" => \"activo_corporacion\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"pago_aplicacion\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"receive_summary\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"date_last_summary\", \"Type\" => \"int(16)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"license\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_validation_partner\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"partner_validation_price\", \"Type\" => \"float\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"partner_validation_price_urgent\", \"Type\" => \"float\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"validation_languages\", \"Type\" => \"varchar(250)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"cost\", \"Type\" => \"float\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"pay_for_contracts\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"invoice_periodicity\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"req_attached\", \"Type\" => \"int(9)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"req_validated\", \"Type\" => \"int(9)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"req_rejected\", \"Type\" => \"int(9)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"req_expired\", \"Type\" => \"int(9)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_transfer_pending\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"kind\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"min_app_version\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"2\", \"Extra\" => \"\"),\n array(\"Field\" => \"prevention_service\", \"Type\" => \"varchar(20)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_idle\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"corporation\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_referrer\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"MUL\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"requirement_count\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"invoice_count\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_referrer\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_manager\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"MUL\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_self_controlled\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"has_custom_login\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"header_img\", \"Type\" => \"tinytext\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"), array(\"Field\" => \"uid_manager\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"MUL\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_referrer\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"MUL\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"requirements_origin_company_cloneables\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n );\n }",
"public static function baseQuery() {\n $sql = 'SELECT*FROM '.static::getTable();\n return $sql;\n }",
"public static function selectOverlayFields($table, $selectFields) {\n\t\t$additionalFields = self::selectOverlayFieldsArray($table, $selectFields);\n\t\tif (count($additionalFields) > 0) {\n\t\t\tforeach ($additionalFields as $aField) {\n\t\t\t\t$selectFields .= ', ' . $table . '.' . $aField;\n\t\t\t}\n\t\t}\n\t\treturn $selectFields;\n\t}",
"private function GeneraSelectQuery($fields,$where)\r\n\t{\r\n\t\t$sql=\"select \r\n\t\t\t\".$fields.\" \r\n\t\t\tfrom Tabla\r\n\t\t\tinner join Tabla1 on Tabla1.id=Tabla.idTabla1\r\n\t\t\t\".(($where)?\" WHERE \".$where:\"\");\r\n\t\treturn $sql;\r\n\t}",
"public function compileAdminTables() {}",
"public function getAddFieldsDDL($fields)\n {\n $ret = '';\n $pattern = \"\nALTER TABLE %s ADD %s;\n\";\n foreach ($fields as $field) {\n $ret .= sprintf($pattern,\n $this->quoteIdentifier($field->getEntity()->getFQTableName()),\n $this->getFieldDDL($field)\n );\n }\n\n return $ret;\n }",
"function raw_db_list_table_fields_def($tablename, $type = false)\r\n{\r\n $result = db_query(\"SELECT sql FROM sqlite_master WHERE (tbl_name = '\" . $tablename . \"');\");\r\n if ($result === false) return false;\r\n\r\n $all = db_fetch_array($result);\r\n $origsql = trim(preg_replace(\"/[\\s]+/\", \" \", str_replace(\",\", \", \", preg_replace(\"/[\\(]/\", \"( \", $all[0], 1))));\r\n $origsql = substr($origsql, 0, strlen($origsql)-1);\r\n $oldcols = preg_split(\"/[,]+/\", substr(trim($origsql), strpos(trim($origsql), '(') + 1), -1, PREG_SPLIT_NO_EMPTY);\r\n\r\n $colnames = array();\r\n $coltype = array();\r\n for($i = 0;$i < sizeof($oldcols);$i++) {\r\n $colparts = preg_split(\"/[\\s]+/\", $oldcols[$i], -1, PREG_SPLIT_NO_EMPTY);\r\n $colnames[] = $colparts[0];\r\n $coltype[] = implode(\" \", array_slice($colparts, 1));\r\n }\r\n\r\n return ($type ? $coltype : $colnames);\r\n}",
"protected function _getTableOptions(){ }",
"public function getViaTableCondition();",
"function enableFormatting($format = true)\n {\n $this->formatFields = $format;\n }",
"protected function buildTable(): string\n {\n $sql = '';\n\n if ( empty($this->tableInto) )\n {\n return $sql;\n }\n\n $sql .= 'INTO' . PHP_EOL;\n $sql .= $this->indent();\n $sql .= $this->tableInto . PHP_EOL;\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 }",
"public function include_fields()\n {\n }",
"public static function getTableModifier(){\n $df = parent::resolveConfiguration();\n $schema = new Schema($df['db']);\n $tableModifier = $schema->alterTable( $df['table'] );\n return $tableModifier;\n }",
"public function to_sql($fields = null)\n {\n }",
"private function getAllFields($table) {\n\t\t$sqlFields = $GLOBALS['TYPO3_DB']->admin_get_fields($table);\n\t\tif (!is_array($GLOBALS['TCA'][$table])) {\n\t\t\treturn array();\n\t\t}\n\t\t$fields = array_keys($GLOBALS['TCA'][$table]['columns']);\n\t\t$fields[] = 'uid';\n\t\t$fields[] = 'pid';\n\t\t$fields[] = 'deleted';\n\t\t$fields[] = 'crdate';\n\t\t$fields[] = 'tstamp';\n\t\tif (strlen($GLOBALS['TCA'][$table]['ctrl']['sortby']) && !in_array($GLOBALS['TCA'][$table]['ctrl']['sortby'], $fields)) {\n\t\t\t$fields[] = $GLOBALS['TCA'][$table]['ctrl']['sortby'];\n\t\t}\n\t\t$sqlKeys = array_keys($sqlFields);\n\t\t$sqlKeys = array_diff($sqlKeys, $fields);\n\t\t$fields = array_merge($fields, $sqlKeys);\n\t\treturn $fields;\n\t}",
"protected function get__enabled()\n\t{\n\t\tif ( $col = static::$databaseColumnEnabledDisabled )\n\t\t{\n\t\t\treturn (bool) $this->$col;\n\t\t}\n\t\treturn NULL;\n\t}"
] | [
"0.7298381",
"0.6938929",
"0.5947395",
"0.59226626",
"0.5811514",
"0.5807966",
"0.56912017",
"0.561809",
"0.54972714",
"0.5475507",
"0.54003054",
"0.5349946",
"0.52991337",
"0.5286421",
"0.5284635",
"0.5275244",
"0.5268001",
"0.5255614",
"0.5161692",
"0.5155005",
"0.51269406",
"0.5121009",
"0.5108464",
"0.50920707",
"0.5083752",
"0.5076012",
"0.5071836",
"0.50592256",
"0.5057668",
"0.50362265",
"0.5033681",
"0.50320184",
"0.5018871",
"0.49796396",
"0.49733397",
"0.49550557",
"0.49546668",
"0.49471402",
"0.49364033",
"0.49146512",
"0.48997855",
"0.48800117",
"0.48783213",
"0.48636416",
"0.48370185",
"0.48351374",
"0.48302895",
"0.48198068",
"0.4819291",
"0.48125374",
"0.48110637",
"0.48088527",
"0.4798599",
"0.47975096",
"0.47967938",
"0.477923",
"0.47753316",
"0.47729665",
"0.4772341",
"0.47699818",
"0.47630286",
"0.47568336",
"0.47548378",
"0.47545436",
"0.47524515",
"0.47472972",
"0.47443646",
"0.47388622",
"0.47190672",
"0.47159892",
"0.4713429",
"0.47104046",
"0.47065783",
"0.46912637",
"0.4678503",
"0.46764803",
"0.4675964",
"0.46618956",
"0.46616134",
"0.4646027",
"0.4640301",
"0.46238053",
"0.4611181",
"0.46094778",
"0.4607849",
"0.4606966",
"0.46016234",
"0.4600905",
"0.45972022",
"0.45945445",
"0.45932135",
"0.4591515",
"0.4587217",
"0.45841438",
"0.45835778",
"0.45835108",
"0.45800996",
"0.45709452",
"0.45668155",
"0.45639127"
] | 0.6434263 | 2 |
Escapes a string for use in a database query Note that this function does not add single quotes around the string (see fullQuoteStr()) | protected function quoteStr($string, $tableName = '') {
return $GLOBALS['TYPO3_DB']->quoteStr($string, $tableName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function escapeString($stringToEscape);",
"public function escape($string) {\n\t\t\treturn str_replace(\"'\", \"''\", $string);\n\t\t}",
"public function escape($string);",
"public function escape($string);",
"function escape($str) {\n $str = get_magic_quotes_gpc()?stripslashes($str):$str;\n $str = $this->db->escape($str);\n return $str;\n }",
"public function escapeString($string);",
"function escape($inString) {\r\n\t\treturn str_replace('\"', '\\\"', $inString);\r\n\t}",
"function escapeSimple($string) {\n return $this->dbH->quote($string);\n }",
"public function escape_string($string) {\n $escaped_string = $this->connection->real_escape_string($string);\n return $escaped_string;\n }",
"public function escapeString($string)\r\n\t{\r\n\t\treturn str_replace(\"'\", \"''\", $string);\r\n\t}",
"public function escape_string($string) {\n $escaped_string = $this->connection->real_escape_string($string);\n return $escaped_string;\n }",
"public abstract function escape($string);",
"public function escape($string) {\r\n\tif (get_magic_quotes_runtime())\r\n\t $string = stripslashes($string);\r\n\treturn $this->oMySql->real_escape_string($string);\r\n }",
"public function esc($string)\n {\n return $this->mysqli->real_escape_string($string);\n }",
"abstract public function escapeString($string);",
"protected abstract function escape($string);",
"function wrapper_escape($string) {\n\t\treturn str_replace(\"'\", \"''\", $string);\n\t}",
"public static function esc($string)\n\t{\n\t\treturn mysqli_real_escape_string(self::$link, $string);\n\t}",
"public static function intoQuote($string){ return \"'\".$string.\"'\"; }",
"public function escape($string){\n\t\tif(false === is_string($string)){\n\t\t\treturn $string;\n\t\t}\n\t\treturn $this->connection->real_escape_string($string);\n\t}",
"function escaped_str($string)\n{\n $safe_string = Database::getInstance()->getConnection()->real_escape_string($string);\n return $safe_string;\n}",
"function qescape($str)\n{\n $str = str_replace('\\\\', '\\\\\\\\', $str);\n return str_replace('\"', '\\\\\"', $str);\n}",
"static public function real_escape_string($s) { return self::escape($s); }",
"public function quoteAndEscape(string $str): string;",
"function escape_string($string) {\r\n\t\tglobal $db;\r\n\t\t\r\n\t\t$escaped_string = mysqli_real_escape_string($db, $string);\r\n\t\treturn $escaped_string;\r\n\t}",
"abstract public function escape_string( $str );",
"function escape_sq($str)\n{\n $esc_str = str_replace(\"'\", \"''\", $str);\n return $esc_str;\n}",
"public function escapeSQL($string)\n {\n return $this->dbms->escapeSQL($string);\n }",
"public function escape_string($string){\n $result=$string;\n if(!get_magic_quotes_gpc())\n $result= stripslashes ($result);\n \n $result= addslashes($result);\n $result= $this->database->real_escape_string($result);\n return $result;\n }",
"function dbEscape($string) {\n\t$db = dbConn();\n\treturn(mysqli_real_escape_string($db,$string));\n}",
"function escape($string)\n\t{\n\t\tswitch($this->dbtype)\n\t\t{\n\t\t\tcase 'mysql':\n\t\t\t\treturn @mysql_escape_string($string);\n\t\t\t\tbreak;\n\n\t\t\tcase 'mysqli':\n\t\t\t\treturn @mysqli_escape_string($string);\n\t\t\t\tbreak;\n\t\t}\n\n\t}",
"public static function escaped_string($string){\r\n\t\t\t$escaped_string = mysqli_real_escape_string(self::$connection, $string);\r\n\t\t\t$escaped_string = trim($escaped_string);\r\n\t\t\t$escaped_string = htmlspecialchars($escaped_string);\r\n\t\t\treturn $escaped_string;\r\n\t\t}",
"function db_driver_escape($data)\n{\n global $_db;\n\n return '\\'' . str_replace('\\'', '\\'\\'', $data) . '\\'';\n}",
"public static function escape_string($string) {\n return is_null($string)\n ? 'NULL'\n : '\\'' . self::mysql()->escape_string($string) . '\\'';\n }",
"function escape($string)\n\t{\n\t\treturn pg_escape_string($string);\n\t}",
"function escape($string)\n {\n global $connection;\n return mysqli_real_escape_string($connection, trim($string));\n }",
"function escape_string($string)\n{\n\tglobal $connection;\n\t$string=htmlentities($string);\n\treturn $string;\n}",
"public function escape($string)\n {\n return $string;\n }",
"public function Escape($text) {\n if ($GLOBALS['app']['dbEncoding'] && !is_numeric($text)) {\n return base64_encode($text);\n }\n return addslashes($text);\n }",
"public function escape($stringValue);",
"public function escape_string($string){\n // procedural way\n // $escaped_string = mysqli_real_escape_string($this->connection, $string);\n\n // oriented way\n $escaped_string = $this->connection->real_escape_string($string);\n\n return $escaped_string;\n }",
"private function escapeString(string $value): string\n {\n return str_replace(\"'\", \"''\", $value);\n }",
"public function escapeSQL($string)\n {\n return $this->real_escape_string($string);\n }",
"public function EscapeString($string)\r\n\t{\r\n\r\n\t\tif ($this->_isConnected)\r\n\t\t{\r\n\t\t\treturn $this->_db->real_escape_string($string);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn $string;\r\n\t\t}\r\n\t}",
"static public function escape ( $str )\n\t{\n\t\treturn trim(self::instance(0)->quote($str), '\\'');\n\t}",
"function pg_connect_escape($string) {\n\treturn addcslashes($string, \"'\\\\\");\n}",
"protected function escape(string $str)\n {\n // If there is no existing database connection then try to connect\n if ( ! isset($this->dbh) || ! $this->dbh )\n {\n $this->connect($this->dbuser, $this->dbpassword, $this->dbhost, $this->dbport);\n $this->select($this->dbname, $this->encoding);\n }\n\n if ( get_magic_quotes_gpc() ) {\n $str = stripslashes($str);\n }\n\n return $this->dbh->escape_string($str);\n }",
"protected function escapeString($value)\n {\n return $this->entityManager->getConnection()->quote($value);\n }",
"public function escape($string) {\n return mysqli_escape_string($this->connection, $string);\n }",
"public static function escapeSql($str)\n {\n return StringUtils::replace($str, '\\'', '\\'\\'');\n }",
"public function escape(string $str): string;",
"function escape_string ($string) {\n \n \tglobal $CONF;\n \n \tif (get_magic_quotes_gpc() == 0) {\n \t\n \t\tif( is_array( $string) ) {\n \t\t\t\n \t\t\treturn $string;\n \t\t\t\n \t\t} else {\n\n \t\tif ($CONF['database_type'] == \"mysql\") { \t\n \t\t\t$escaped_string = mysql_real_escape_string ($string);\n \t\t}\n \t\tif ($CONF['database_type'] == \"mysqli\") { \t\n \t\t\t$escaped_string = mysqli_real_escape_string ($string);\n \t\t}\n \t\tif ($CONF['database_type'] == \"pgsql\") { \t\n \t\t\t$escaped_string = pg_escape_string ($string);\n \t\t\t}\n \t\t\n \t\t}\n \n \t} else {\n \n $escaped_string = $string;\n \n \t}\n \n \treturn $escaped_string;\n}",
"protected function escapeString(string $string): string\n {\n // sqlite_escape_string is not supported in php 5.4 anymore\n return SQLite3::escapeString($string);\n }",
"public function escape( &$string ) {\n\t\t$string = $this->real_escape_string( $string );\n\t}",
"public function escape($str)\n {\n if ($str == '') {\n return '';\n }\n\n if (function_exists('db2_escape_string')) {\n $str = db2_escape_string($str);\n } else {\n $str = addslashes($str);\n }\n\n return trim($str);\n }",
"function escape($string) {\n return mysql_escape_string($string);\n }",
"private function quote($string)\n {\n return \"'\" . addcslashes($string, \"'\") . \"'\";\n }",
"public static function esc($str){\n\t\t\n\t\tif(ini_get('magic_quotes_gpc'))\n\t\t\t$str = stripslashes($str);\n\t\t\n\t\treturn mysql_real_escape_string(strip_tags($str));\n\t}",
"function escape_string($string) {\n return mysql_escape_string($string);\n }",
"abstract public function escapeString($value);",
"public abstract function escapeString($value);",
"public function realEscapeString(string $string): string\n {\n return $this->mysqli->real_escape_string($string);\n }",
"function escape($_str) {\n\t\treturn str_replace('\"', '"', $_str);\n\t}",
"function escapeString($string) {\r\n\treturn \\wcf\\system\\WCF::getDB()->escapeString($string);\r\n}",
"public static function escape($string) {\n\treturn self::$instance->escape($string);\n }",
"public static function escape($s) {}",
"function esc(String $value){\n\t// bring the global db connect object into function\n\tglobal $connection;\n\t// remove empty space sorrounding string\n\t$val = trim($value); \n\t$val = mysqli_real_escape_string($connection, $value);\n\treturn $val;\n}",
"public function escape($value)\n {\n // SQL standard is to use single-quotes for all values\n return \"'$value'\";\n }",
"public function escape($unescaped_string) {\n\t\tif ($this->mysqli)\n\t\t\treturn $this->mysqli->real_escape_string($unescaped_string);\n\t\telse {\n\t\t\t// no db connection present. use static escaping instead.\n\t\t\t$search = array(\"\\x00\", \"\\n\", \"\\r\", \"\\\\\", \"'\", '\"', \"\\x1a\");\n\t\t\t$replace = array(\"\\\\\\x00\", \"\\\\\\n\", \"\\\\\\r\", \"\\\\\\\\\", \"\\'\", '\\\"', \"\\\\\\x1a\");\n\t\t\treturn str_replace($search, $replace, $unescaped_string);\n\t\t}\n\t}",
"function escape($str) {\n\treturn mysql_escape_string(stripslashes($str));\n}",
"public function escape(string $str): string\n {\n $escaped = \"\\\\\";\n if ($this->stringQuotingCharacter !== $escaped) {\n $escaped .= $this->stringQuotingCharacter;\n }\n return addcslashes($str, $escaped);\n }",
"function db_escape($input)\n{\n\tglobal $db;\n\treturn $db->real_escape_string($input);\n}",
"public function sql_escape_string($str) {\n return @mysql_escape_string($str);\n }",
"function escape($str)\n\t\t{\n\t\t\treturn $this->dbh->escapeString(stripslashes(preg_replace(\"/[\\r\\n]/\",'',$str)));\t\t\t\t\n\t\t}",
"public function escapeString($string){\n\t\t$mysqli = new mysqli($this->host,$this->user,$this->pass,$this->db);\n\t\t$string = $mysqli->real_escape_string($string);\n\t\t$mysqli->close();\n\t\treturn $string;\n\t}",
"public function escape($str)\n {\n if (function_exists('mysql_real_escape_string') && is_resource(ee()->db->conn_id)) {\n $str = mysql_real_escape_string($str, ee()->db->conn_id);\n } elseif (function_exists('mysql_escape_string')) {\n $str = mysql_escape_string($str);\n } else {\n $str = addslashes($str);\n }\n\n return $str;\n }",
"protected function db_escape($string)\n {\n return mysqli_real_escape_string($this->db, $string);\n }",
"function escs(String $value)\n{\n // bring the global db connect object into function\n global $conn;\n\n $val = trim($value); // remove empty space sorrounding string\n $data = stripslashes($val);\n $data = htmlspecialchars($data);\n $val = mysqli_real_escape_string($conn, $value);\n\n return $data;\n}",
"function _real_escape( $string ) {\n\t\t$escaped = parent::_real_escape( $string );\n\t\t\n\t\tif ( strlen( $escaped ) )\n\t\t\t$this->escaped[] = $escaped;\n\t\t\n\t\treturn $escaped;\n\t}",
"public function getEscapedString(string $str) {\n return $this->dbConnection->real_escape_string($str);\n }",
"function esc(String $value)\n{\n\t// bring the global db connect object into function\n\tglobal $conn;\n\n\t$val = trim($value); // remove empty space sorrounding string\n\t$data = stripslashes($val);\n\t$data = htmlspecialchars($data);\n\t$val = mysqli_real_escape_string($conn, $value);\n\n\treturn $data;\n}",
"function escape($string) {\r\n\t\treturn mysql_real_escape_string($string, $this->link);\r\n\t}",
"public function escapeString($s)\r\n {\r\n return @mysql_real_escape_string(str_replace('`', '\\`', stripslashes($s)));\r\n }",
"public static function escape($value) {\n return slDatabaseManager::getConnection()->escape($value);\n }",
"function escapeString($str) {\n\t\treturn $this->mysqli->real_escape_string ( $str );\n\t}",
"protected function quote_escaped()\n {\n }",
"public function EscapeString($argString, $argEscapeUnderscorePercentCharacters = false)\r\n {\r\n $this->checkDatabaseManager();\r\n $escapedString = $this->_DatabaseHandler->real_escape_string($argString);\r\n if($argEscapeUnderscorePercentCharacters)\r\n {\r\n $escapedString = addcslashes($escapedString, '%_');\r\n }\r\n return $escapedString;\r\n }",
"public static function escapeSql( $string )\n {\n return str_replace( self::$_SQL_UNESCAPED, self::$_SQL_ESCAPED, str_replace( self::$_SQL_ESCAPED, self::$_SQL_UNESCAPED, $string ) );\n }",
"function bfa_escape($string) {\r\n\t$string = str_replace('\"', '"', $string);\r\n\t$string = str_replace(\"'\", ''', $string);\r\n\treturn $string;\r\n}",
"function pdo_escape_string($str, $link=NULL) {\r\n return pdo_real_escape_string($str, $link);\r\n }",
"function esc(String $value){\n global $conn;\n $val = trim($value); // remove empty space sorrounding string\n $val = mysqli_real_escape_string($conn, $value);\n return $val;\n }",
"public function escape_string( $text ) {\n return mysql_real_escape_string( $text, $this->link ); }",
"public function escapeString($string)\n\t{\n\t\t$from = ['\\\\', '(', ')', '|', '-', '!', '@', '~', '\"', '&', '/', '^', '$', '=', ';', \"'\", \"\\x00\", \"\\n\", \"\\r\", \"\\x1a\"];\n\t\t$to = ['\\\\\\\\', '\\(', '\\)', '\\|', '\\-', '\\!', '\\@', '\\~', '\\\"', '\\&', '\\/', '\\^', '\\$', '\\=', '\\;', \"\\'\", \"\\\\x00\", \"\\\\n\", \"\\\\r\", \"\\\\x1a\"];\n\n\t\treturn addslashes(str_replace($from, $to, $string));\n\t}",
"public function escape($str)\n {\n if ($str == '') {\n return '';\n }\n\n if (function_exists('sqlite_escape_string')) {\n $str = sqlite_escape_string($str);\n } else {\n $str = addslashes($str);\n }\n\n return trim($str);\n }",
"public function escape($string)\n {\n \treturn mysqli_real_escape_string($this->conn, $string);\n }",
"private function escape($string)\n {\n return mysqli_real_escape_string($this->connection, $string);\n }",
"public function escapeString($string)\n\t{\n\t\t# code...\n\t\tif($this->config->connector == \"mysql\")\n\t\t{\n\t\t\treturn mysql_real_escape_string($string);\n\t\t}\n\t\telseif ($this->config->connector == \"mysqli\") \n\t\t{\n\t\t\t# code...\n\t\t\treturn mysql_real_escape_string($this->connection, $string);\n\t\t}\n\t}",
"public function escape($stringa){\n\t\treturn addslashes($stringa);\n\t}",
"public static function SqlEscString($str)\n {\n try {\n $ret = str_replace([ '%', '_' ], [ '\\%', '\\_' ], DB::getPdo()->quote($str));\n return $ret && strlen($ret) >= 2 ? substr($ret, 1, strlen($ret)-2) : $ret;\n } catch (Exception $e) {\n return $str;\n }\n }",
"function sqlite_escape_string($string)\n{\n $string = SQLite3::escapeString($string);\n $string = filter_var($string, FILTER_SANITIZE_STRING);\n return $string;\n}",
"function EscapeString($par_String)\n\t{\n\t\treturn $this->__connection->quote($par_String);\n\t}"
] | [
"0.81385463",
"0.8009989",
"0.7963388",
"0.7963388",
"0.79240566",
"0.7844677",
"0.7810136",
"0.7797099",
"0.7790993",
"0.7779611",
"0.7779245",
"0.7767277",
"0.7713929",
"0.77138746",
"0.7660083",
"0.7654411",
"0.7639411",
"0.7608654",
"0.7602519",
"0.759419",
"0.7577928",
"0.7560921",
"0.75564355",
"0.7546496",
"0.7538674",
"0.75173503",
"0.7501787",
"0.74922067",
"0.749191",
"0.74771655",
"0.74660164",
"0.743682",
"0.74162483",
"0.7411388",
"0.74105513",
"0.73800033",
"0.73797286",
"0.7379138",
"0.73555386",
"0.7353726",
"0.73531866",
"0.73472863",
"0.7342465",
"0.73379904",
"0.73374075",
"0.73332995",
"0.7325842",
"0.73252803",
"0.7321652",
"0.7320477",
"0.7316827",
"0.7305484",
"0.72991383",
"0.7299028",
"0.729869",
"0.72934425",
"0.7272735",
"0.7270879",
"0.7268841",
"0.7268532",
"0.725167",
"0.7230494",
"0.7229653",
"0.7223472",
"0.7210018",
"0.7206851",
"0.7203447",
"0.71954465",
"0.7195402",
"0.718746",
"0.7184502",
"0.7178067",
"0.71758795",
"0.71757776",
"0.71731806",
"0.7169769",
"0.71657467",
"0.7165077",
"0.716039",
"0.71581537",
"0.7156202",
"0.71526706",
"0.71403855",
"0.7140149",
"0.713981",
"0.7137793",
"0.7135004",
"0.7127674",
"0.71257037",
"0.7118198",
"0.7112189",
"0.71101725",
"0.71094716",
"0.71084654",
"0.7100779",
"0.7097677",
"0.70885026",
"0.70869845",
"0.70824254",
"0.7043436",
"0.70411783"
] | 0.0 | -1 |
Returns an SQL statement that checks for one or multiple storage PIDs | protected function storagePidStatement(\TYPO3\CMS\Extbase\Persistence\QueryInterface $query, $tableName = '') {
// Get allowed storage pids
$storagePids = $query->getQuerySettings()->getStoragePageIds();
// Sanitize them (just to be sure)
$storagePids = array_map('intval', $storagePids);
// Generate SQL
$tableField = ($tableName) ? $tableName . '.pid' : 'pid';
return " AND $tableField IN (" . implode(', ', $storagePids) . ') ';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function getStoragePids();",
"function db_checkCSID($csid) {\n $conn = OpenCon();\n \n //$stmt->bind_param( \"ss\", $table_name, $csid );\n $tables = array( 'admin', 'aio', 'professor', 'student' );\n foreach( $tables as $table_name ) {\n\n $st = \"SELECT * FROM `$table_name` WHERE csid='$csid'\";\n\n $result = $conn->query( $st );\n if( !$result ){\n echo \"Database Error. Please contact admin.\\nError details: \" . $conn->error;\n $result->close();\n break;\n }\n elseif( $result->num_rows > 0 ) {\n $result->close();\n return true;\n\n }\n }\n return false;\n }",
"public function getSystemIds()\r\n{\r\n $query_string = \"SELECT systemid FROM voting_system \";\r\n $query_string .= \"WHERE systemname = :systemname AND systemid != :systemid\";\r\n\r\n return $query_string;\r\n\r\n}",
"private function sql_whereAnd_pidList()\n {\n // Get table and field\n list( $table ) = explode( '.', $this->curr_tableField );\n\n if ( empty( $this->pObj->pidList ) )\n {\n // DRS\n if ( $this->pObj->b_drs_warn )\n {\n $prompt = 'There isn\\'t any pid list for the records of ' . $table . '. Maybe this is an error.';\n t3lib_div::devlog( '[WARN/FILTER+SQL] ' . $prompt, $this->pObj->extKey, 2 );\n }\n // DRS\n return;\n }\n\n $fieldsOfTable = $this->pObj->arr_realTables_arrFields[ $table ];\n if ( !in_array( 'pid', $fieldsOfTable ) )\n {\n // DRS\n if ( $this->pObj->b_drs_warn )\n {\n $prompt = $table . ' shouldn\\'t have any pid field. Maybe this is an error.';\n t3lib_div::devlog( '[WARN/FILTER+SQL] ' . $prompt, $this->pObj->extKey, 2 );\n }\n // DRS\n return;\n }\n\n $andWhere = \" AND \" . $table . \".pid IN (\" . $this->pObj->pidList . \")\";\n\n // RETURN AND WHERE statement\n return $andWhere;\n }",
"function checkIDList($table, $fixedQuery, &$IDList)\n{\n\tglobal $sitePosition;\n\n\t$IDs = array();\n\t$rs = query('Select `ID` from `' . $sitePosition . '.' . $table . '` where ' . ($fixedQuery != '' ? ('(' . $fixedQuery . ') and ') : '') . '`ID` in (' . $IDList . ')', false);\n\twhile(true)\n\t{\n\t\t$rsInfo = fetchRow($rs);\n\t\tif($rsInfo === null) break;\n\t\t$IDs[] = $rsInfo[0];\n\t}\n\tfreeResult($rs);\n\t$IDList = implode(',', $IDs);\n}",
"protected function prepareUniqueStatement() {\n $clauses = [];\n foreach ($this->uniqueColumns as $column) {\n $clauses[] = \"$column = :$column\";\n }\n\n $clauses = implode(' AND ', $clauses);\n\n // Prepare our statement.\n return $this->connection->prepare(\"SELECT 1 FROM {$this->table} WHERE $clauses LIMIT 1\");\n }",
"public function getSystemTypeIds()\r\n{\r\n $query_string = \"SELECT systemtypeid FROM system_type \";\r\n $query_string .= \"WHERE systemtypename = :systemtypename AND systemtypeid != :systemtypeid\";\r\n\r\n return $query_string;\r\n}",
"function radius_sql_exists($name)\n{\n $exists = false;\n global $environments;\n \n if(!array_key_exists($name, $environments)) return $exists;\n\n $id = $environments[$name]['_id'] . \"@miiicasa.com\";\n\n $dbconn = pg_connect(\"host=localhost port=5432 dbname=radius user=postgres\");\n $result = pg_query_params($dbconn, 'SELECT * FROM radcheck WHERE username = $1', array($id));\n if(pg_num_rows($result) > 0) $exists = true;\n \n pg_close($dbconn);\n\n return $exists;\n}",
"function s_m_put_get_condition($ref_id_db_arr, $ref_data){\r\n $where = \"\";\r\n for($i = 0; $i < count($ref_id_db_arr); $i++){\r\n $where .= $ref_id_db_arr[$i] . \"='\" . $ref_data[$i] . \"'' AND \";\r\n }\r\n return substr($where, 0, strlen($where) - 5);\r\n}",
"public function checkDatabase(&$response) {\n//\n//\t\t\tselect id from (select id,parent_id from fs_folders order by parent_id, id) sort, (select @pv := '36') initialisation where find_in_set(parent_id, @pv) > 0 and @pv := concat(@pv, ',', id)\n// \n// )\n// \n// \n// and\n// \n// id not in (\n// \n// select files_folder_id from pr2_projects\n// \n// )\n// \n// and readonly = 1;\";\n\n\t\t\n\t\treturn parent::checkDatabase($response);\n\t}",
"function getUuidArray($db, $tabledefuuid, $ids){\r\n\r\n\tif(!count($ids))\r\n\t\treturn false;\r\n\r\n\t$querystatement = \"\r\n\t\t\tSELECT\r\n\t\t\t\t\t`maintable`\r\n\t\t\tFROM\r\n\t\t\t\t\t`tabledefs`\r\n\t\t\tWHERE\r\n\t\t\t\t\t`uuid` = '\".$tabledefuuid.\"'\";\r\n\r\n\t$queryresult = $db->query($querystatement);\r\n\r\n\t$tablerecord = $db->fetchArray($queryresult);\r\n\r\n\t$whereclause = \"\";\r\n\tforeach($ids as $id)\r\n\t\t$whereclause .= \" OR `id` = '\".(int)$id.\"'\";\r\n\r\n\t$whereclause = substr($whereclause, 4);\r\n\r\n\t$querystatement = \"\r\n\t\t\tSELECT\r\n\t\t\t\t\t`uuid`\r\n\t\t\tFROM\r\n\t\t\t\t\t`\".$tablerecord[\"maintable\"].\"`\r\n\t\t\tWHERE\r\n\t\t\t\t\t\".$whereclause;\r\n\r\n\t$queryresult = $db->query($querystatement);\r\n\r\n\t$thereturn = array();\r\n\tif($db->numRows($queryresult))\r\n\t\twhile($therecord = $db->fetchArray($queryresult))\r\n\t\t\t$thereturn[] = $therecord[\"uuid\"];\r\n\r\n\treturn $thereturn;\r\n\r\n}",
"function limit_script_sql($what=\"all\")\n{\n\t$limit_script_sql = '';\n\tif ($what !== false && $what !== 'all')\n\t{\n\t\t$script_ids = array();\n\t\tforeach(scripts($what, true) as $name)\n\t\t{\n\t\t\t$script_ids[] = label2id($name);\n\t\t}\n\t\t$limit_script_sql = ' AND script IN ('.implode(',', $script_ids).')';\n\t}\n\treturn $limit_script_sql;\n}",
"protected function getStoragePids()\n {\n $query = $this->dayRepository->createQuery();\n return $query->getQuerySettings()->getStoragePageIds();\n }",
"function getStoragePageIds() ;",
"function readByIds($ids){\r\n\r\n\t$ids_arr = str_repeat('?,', count($ids) - 1) . '?';\r\n\r\n\t// query to select products\r\n\t$query = \"SELECT id, name, price FROM \" . $this->table_name . \" WHERE id IN ({$ids_arr}) ORDER BY name\";\r\n\r\n\t// prepare query statement\r\n\t$stmt = $this->conn->prepare($query);\r\n\r\n\t// execute query\r\n\t$stmt->execute($ids);\r\n\r\n\t// return values from database\r\n\treturn $stmt;\r\n}",
"private static function genPrimaryKeyWhereClause() {\n return \"WHERE \" . self::ID_KEY . \"=\" . self::transformForPreparedStatement(self::ID_KEY);\n }",
"function executeBoundSQL($cmdstr, $list) {\n \n global $db_conn, $success;\n $statement = OCIParse($db_conn, $cmdstr);\n \n if (!$statement) {\n echo \"<br>Cannot parse the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($db_conn);\n echo htmlentities($e['message']);\n $success = False;\n }\n \n foreach ($list as $tuple) {\n foreach ($tuple as $bind => $val) {\n //echo $val;\n //echo \"<br>\".$bind.\"<br>\";\n OCIBindByName($statement, $bind, $val);\n unset ($val); //make sure you do not remove this. Otherwise $val will remain in an array object wrapper which will not be recognized by Oracle as a proper datatype\n \n }\n $r = OCIExecute($statement, OCI_DEFAULT);\n if (!$r) {\n echo \"<br>Cannot execute the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($statement); // For OCIExecute errors pass the statement handle\n echo htmlentities($e['message']);\n echo \"<br>\";\n $success = False;\n }\n }\n \n }",
"function executeBoundSQL($cmdstr, $list) {\n \n global $db_conn, $success;\n $statement = OCIParse($db_conn, $cmdstr);\n \n if (!$statement) {\n echo \"<br>Cannot parse the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($db_conn);\n echo htmlentities($e['message']);\n $success = False;\n }\n \n foreach ($list as $tuple) {\n foreach ($tuple as $bind => $val) {\n //echo $val;\n //echo \"<br>\".$bind.\"<br>\";\n OCIBindByName($statement, $bind, $val);\n unset ($val); //make sure you do not remove this. Otherwise $val will remain in an array object wrapper which will not be recognized by Oracle as a proper datatype\n \n }\n $r = OCIExecute($statement, OCI_DEFAULT);\n if (!$r) {\n echo \"<br>Cannot execute the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($statement); // For OCIExecute errors pass the statement handle\n echo htmlentities($e['message']);\n echo \"<br>\";\n $success = False;\n }\n }\n \n }",
"protected function sqlKeyFilter()\n\t{\n\t\treturn \"`id` = @id@\";\n\t}",
"function exists($dsstr)\n{\n\t$args = func_get_args();\n\t$sql = $this->getSelectSql($dsstr, $args);\n\t$this->setLimit(1);\n\t$res = $this->query($sql);\n\treturn $this->drv->numRows($res);\n}",
"function executeBoundSQL($cmdstr, $list) {\n\n\t\t\tglobal $db_conn, $success;\n\t\t\t$statement = OCIParse($db_conn, $cmdstr);\n\n if (!$statement) {\n echo \"<br>Cannot parse the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($db_conn);\n echo htmlentities($e['message']);\n $success = False;\n }\n\n foreach ($list as $tuple) {\n foreach ($tuple as $bind => $val) {\n //echo $val;\n //echo \"<br>\".$bind.\"<br>\";\n OCIBindByName($statement, $bind, $val);\n unset ($val); //make sure you do not remove this. Otherwise $val will remain in an array object wrapper which will not be recognized by Oracle as a proper datatype\n\t\t\t\t}\n\n $r = OCIExecute($statement, OCI_DEFAULT);\n if (!$r) {\n echo \"<br>Cannot execute the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($statement); // For OCIExecute errors, pass the statementhandle\n echo htmlentities($e['message']);\n echo \"<br>\";\n $success = False;\n }\n }\n }",
"function executeBoundSQL($cmdstr, $list) {\r\n\r\n\t\t\tglobal $db_conn, $success;\r\n\t\t\t$statement = OCIParse($db_conn, $cmdstr);\r\n\r\n if (!$statement) {\r\n echo \"<br>Cannot parse the following command: \" . $cmdstr . \"<br>\";\r\n $e = OCI_Error($db_conn);\r\n echo htmlentities($e['message']);\r\n $success = False;\r\n }\r\n\r\n foreach ($list as $tuple) {\r\n foreach ($tuple as $bind => $val) {\r\n //echo $val;\r\n //echo \"<br>\".$bind.\"<br>\";\r\n OCIBindByName($statement, $bind, $val);\r\n unset ($val); //make sure you do not remove this. Otherwise $val will remain in an array object wrapper which will not be recognized by Oracle as a proper datatype\r\n\t\t\t\t}\r\n\r\n $r = OCIExecute($statement, OCI_DEFAULT);\r\n if (!$r) {\r\n echo \"<br>Cannot execute the following command: \" . $cmdstr . \"<br>\";\r\n $e = OCI_Error($statement); // For OCIExecute errors, pass the statementhandle\r\n echo htmlentities($e['message']);\r\n echo \"<br>\";\r\n $success = False;\r\n }\r\n }\r\n }",
"static function isIdGeneratedByStorage(): bool;",
"function executeBoundSQL($cmdstr, $list) {\n global $db_conn, $success;\n $statement = OCIParse($db_conn, $cmdstr);\n \n if (!$statement) {\n echo \"<br>Cannot parse the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($db_conn);\n echo htmlentities($e['message']);\n $success = False;\n }\n \n foreach ($list as $tuple) {\n foreach ($tuple as $bind => $val) {\n //echo $val;\n //echo \"<br>\".$bind.\"<br>\";\n OCIBindByName($statement, $bind, $val);\n unset ($val);\n //make sure you do not remove this. Otherwise $val will remain in an array object wrapper which will not be recognized by Oracle as a proper datatype\n }\n $r = OCIExecute($statement, OCI_DEFAULT);\n if (!$r) {\n echo \"<br>Cannot execute the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($statement); // For OCIExecute errors pass the statementhandle\n echo htmlentities($e['message']);\n echo \"<br>\";\n $success = False;\n }\n\n }\n }",
"protected function getSQLTestForFinalQuery()\r\n {\r\n return Db::fields()->post_id()->inTable(\"table1\")->isNotEqualToInt(EntityIdFromFileName::get($this->file_name));\r\n }",
"function executeBoundSQL($cmdstr, $list) {\n\n\tglobal $db_conn, $success;\n\t$statement = OCIParse($db_conn, $cmdstr);\n\n\tif (!$statement) {\n\t\techo \"<br>Cannot parse the following command: \" . $cmdstr . \"<br>\";\n\t\t$e = OCI_Error($db_conn);\n\t\techo htmlentities($e['message']);\n\t\t$success = False;\n\t}\n\n\tforeach ($list as $tuple) {\n\t\tforeach ($tuple as $bind => $val) {\n\t\t\t//echo $val;\n\t\t\t//echo \"<br>\".$bind.\"<br>\";\n\t\t\tOCIBindByName($statement, $bind, $val);\n\t\t\tunset ($val); //make sure you do not remove this. Otherwise $val will remain in an array object wrapper which will not be recognized by Oracle as a proper datatype\n\n\t\t}\n\t\t$r = OCIExecute($statement, OCI_DEFAULT);\n\t\tif (!$r) {\n\t\t\techo \"<br>Cannot execute the following command: \" . $cmdstr . \"<br>\";\n\t\t\t$e = OCI_Error($statement); // For OCIExecute errors pass the statement handle\n\t\t\techo htmlentities($e['message']);\n\t\t\techo \"<br>\";\n\t\t\t$success = False;\n\t\t}\n\t}\n return $statement;\n\n}",
"public function getStoragePrimaryKey();",
"function executeBoundSQL($cmdstr, $list) {\n\n global $db_conn, $success;\n $statement = OCIParse($db_conn, $cmdstr);\n\n if (!$statement) {\n echo \"<br>Cannot parse the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($db_conn);\n echo htmlentities($e['message']);\n $success = False;\n }\n\n foreach ($list as $tuple) {\n foreach ($tuple as $bind => $val) {\n //echo $val;\n //echo \"<br>\".$bind.\"<br>\";\n OCIBindByName($statement, $bind, $val);\n unset ($val); //make sure you do not remove this. Otherwise $val will remain in an array object wrapper which will not be recognized by Oracle as a proper datatype\n }\n\n $r = OCIExecute($statement, OCI_DEFAULT);\n if (!$r) {\n echo \"<br>Cannot execute the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($statement); // For OCIExecute errors, pass the statementhandle\n echo htmlentities($e['message']);\n echo \"<br>\";\n $success = False;\n }\n }\n }",
"public function getSql() {\n\t\t$this->getActiveValues();\n\t\tif ( !is_array( $this->aActiveValues ) || count( $this->aActiveValues ) <=0 ) {\n\t\t\treturn '1=1';\n\t\t}\n\n\t\t$aInClause = array();\n\n\t\tforeach ( $this->aActiveValues as $sValue ) {\n\t\t\t$aInClause[] = \"'\".$sValue.\"'\";\n\t\t}\n\n\t\t$sInClause = implode( ',', $aInClause );\n\n\t\t$sSql = $sInClause;\n\t\t$sSql = 'page_namespace IN ('.$sInClause.')';\n\t\treturn $sSql;\n\t}",
"public function getStoragePageIds() {}",
"function executeBoundSQL($cmdstr, $list) {\n\n\tglobal $db_conn, $success;\n\t$statement = OCIParse($db_conn, $cmdstr);\n\n\tif (!$statement) {\n\t\techo \"<br>Cannot parse the following command: \" . $cmdstr . \"<br>\";\n\t\t$e = OCI_Error($db_conn);\n\t\techo htmlentities($e['message']);\n\t\t$success = False;\n\t}\n\n\tforeach ($list as $tuple) {\n\t\tforeach ($tuple as $bind => $val) {\n\t\t\t//echo $val;\n\t\t\t//echo \"<br>\".$bind.\"<br>\";\n\t\t\tOCIBindByName($statement, $bind, $val);\n\t\t\tunset ($val); //make sure you do not remove this. Otherwise $val will remain in an array object wrapper which will not be recognized by Oracle as a proper datatype\n\n\t\t}\n\t\t$r = OCIExecute($statement, OCI_DEFAULT);\n\t\tif (!$r) {\n\t\t\techo \"<br>Cannot execute the following command: \" . $cmdstr . \"<br>\";\n\t\t\t$e = OCI_Error($statement); // For OCIExecute errors pass the statementhandle\n\t\t\techo htmlentities($e['message']);\n\t\t\techo \"<br>\";\n\t\t\t$success = False;\n\t\t}\n\t}\n}",
"private function get_sql_statement_blacklisted_ids( $blacklisted_ids, $is_only_exclude_ids = false ) {\n\n\t\tif ( empty( $blacklisted_ids ) ) {\n\n\t\t\t$result = $is_only_exclude_ids ? ' AND (1 = 2) ' : '';\n\n\t\t} else {\n\n\t\t\t$result = sprintf( $is_only_exclude_ids ? ' AND ID IN (%s) ' : ' AND ID NOT IN (%s) ', implode( ',', $blacklisted_ids ) );\n\t\t}\n\n\t\treturn $result;\n\t}",
"public static function getProductsListingSql() {\n $pArr = self::__getProductsListingData();\n \n return $pArr['Qlisting']; \n }",
"function executeBoundSQL($cmdstr, $list) {\n\n global $db_conn, $success;\n $statement = OCIParse($db_conn, $cmdstr);\n\n if (!$statement) {\n echo \"<br>Cannot parse the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($db_conn);\n echo htmlentities($e['message']);\n $success = False;\n }\n\n foreach ($list as $tuple) {\n foreach ($tuple as $bind => $val) {\n //echo $val;\n //echo \"<br>\".$bind.\"<br>\";\n OCIBindByName($statement, $bind, $val);\n unset ($val); //make sure you do not remove this. Otherwise $val will remain in an array object wrapper which will not be recognized by Oracle as a proper datatype\n }\n\n $r = OCIExecute($statement, OCI_DEFAULT);\n if (!$r) {\n echo \"<br>Cannot execute the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($statement); // For OCIExecute errors, pass the statementhandle\n echo htmlentities($e['message']);\n echo \"<br>\";\n $success = False;\n }\n }\n }",
"function SqlKeyFilter() {\n\t\treturn \"`gjd_id` = @gjd_id@\";\n\t}",
"public function getStorageSiterootPids() {}",
"function executeBoundSQL($cmdstr, $list) {\n\n\tglobal $db_conn, $success;\n\t$statement = OCIParse($db_conn, $cmdstr);\n\n\tif (!$statement) {\n\t\techo \"<br>Cannot parse the following command: \" . $cmdstr . \"<br>\";\n\t\t$e = OCI_Error($db_conn);\n\t\techo htmlentities($e['message']);\n\t\t$success = False;\n\t}\n\n\tforeach ($list as $tuple) {\n\t\tforeach ($tuple as $bind => $val) {\n\t\t\t//echo $val;\n\t\t\t//echo \"<br>\".$bind.\"<br>\";\n\t\t\tOCIBindByName($statement, $bind, $val);\n\t\t\tunset ($val); //make sure you do not remove this. Otherwise $val will remain in an array object wrapper which will not be recognized by Oracle as a proper datatype\n\n\t\t}\n\t\t$r = OCIExecute($statement, OCI_DEFAULT);\n\t\tif (!$r) {\n\t\t\techo \"<br>Cannot execute the following command: \" . $cmdstr . \"<br>\";\n\t\t\t$e = OCI_Error($statement); // For OCIExecute errors pass the statementhandle\n\t\t\techo htmlentities($e['message']);\n\t\t\techo \"<br>\";\n\t\t\t$success = False;\n\t\t}\n\t}\n\n}",
"public static function CHECK_FILE_UPLOAD_LIST(){\n\t $SQL_String = \"SELECT folder,_regist FROM task_upload WHERE hash=:hash AND _upload!='';\";\n\t return $SQL_String;\n\t}",
"function executeBoundSQL($cmdstr, $list) {\n\n\tglobal $db_conn, $success;\n\t$statement = OCIParse($db_conn, $cmdstr);\n\n\tif (!$statement) {\n\t\techo \"<br>Cannot parse this command: \" . $cmdstr . \"<br>\";\n\t\t$e = OCI_Error($db_conn);\n\t\techo htmlentities($e['message']);\n\t\t$success = False;\n\t}\n\n\tforeach ($list as $tuple) {\n\t\tforeach ($tuple as $bind => $val) {\n\t\t\t//echo $val;\n\t\t\t//echo \"<br>\".$bind.\"<br>\";\n\t\t\tOCIBindByName($statement, $bind, $val);\n\t\t\tunset ($val); // Make sure you do not remove this.\n // Otherwise, $val will remain in an \n // array object wrapper which will not \n // be recognized by Oracle as a proper\n // datatype.\n\t\t}\n\t\t$r = OCIExecute($statement, OCI_DEFAULT);\n\t\tif (!$r) {\n\t\t\techo \"<br>Cannot execute this command: \" . $cmdstr . \"<br>\";\n\t\t\t$e = OCI_Error($statement);\n // For OCIExecute errors pass the statement handle\n\t\t\techo htmlentities($e['message']);\n\t\t\techo \"<br>\";\n\t\t\t$success = False;\n\t\t}\n\t}\n\n}",
"private static function _getSoeidsFromSqlTable($db, $tableName)\r\n {\r\n $soeids = $db->fetchCol\r\n (\r\n // NOTE: The presence of a `deleted` column as well as an `soeid` column is assumed.\r\n 'SELECT soeid\r\n FROM ' . $db->quoteIdentifier($tableName) . '\r\n WHERE deleted=\"0\"'\r\n );\r\n\r\n return $soeids;\r\n }",
"function sql_select_statement(int $count, array $keys)\n {\n $sql = \"\";\n for($i = 0; $i < $count; $i++ ) { $sql .= ($i != $count - 1) ? $keys[$i] . \", \" : $keys[$i] . \" \"; }\n return $sql;\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}",
"function query_statements($q) {\r\n\t\textract($q);\r\n\t\tlist($resource_ids, $rule_values) = query_result($q);\r\n\t\tfor($i=0;$i<count($resource_ids);$i++) {\r\n\t\t\t$items[] = array('item_id'=>$resource_ids[$i], 'notes'=>get_notes($resource_ids[$i],$db));\r\n\t\t}\r\n\t\treturn $items;\r\n\t}",
"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 }",
"function listProducts($pids) {\r\n\t\t$arrCnt = count($pids);\r\n\t\t$cntr = 1;\r\n\t\t$pidesc = array();\r\n\t\t$query = \"SELECT * FROM \".TBL_PRODUCTS.\" WHERE product_id IN(\";\r\n\t\tforeach($pids as $pid) {\r\n\t\t\t$pidesc[$cntr] = $pid;\r\n\t\t\t$query .= \"'%s'\";\r\n\t\t\tif($arrCnt != $cntr) {\r\n\t\t\t\t$query .= \",\"; // output commas if its not the last element\r\n\t\t\t}\r\n\t\t\t$cntr+=1;\r\n\t\t}\r\n\t\t$query .= \")\";\r\n\t\t$q = vsprintf($query,$pidesc);\r\n\t\t$dbarray = $this->connection->query($q);\r\n\t\t$rows = $dbarray->fetchAll(PDO::FETCH_ASSOC);\r\n\t\tif(!$dbarray || $dbarray->rowCount() < 1){\r\n\t\t\treturn 1; // failure\r\n\t\t} else {\r\n\t\t\treturn $rows; // success\r\n\t\t}\r\n\t}",
"function checkStateSQL($getPara) {\r\n if ($getPara == '') {\r\n return false;\r\n } else\r\n if ($getPara == null) {\r\n return false;\r\n } else\r\n if ($getPara == '0') {\r\n return false;\r\n }\r\n if (EMPTY($getPara)) {\r\n return false;\r\n }\r\n return true;\r\n}",
"public static function getIdsInUse() {\n global $wpdb;\n $products = Cart66Common::getTableName('products');\n $sql = \"SELECT gravity_form_id as gfid from $products where gravity_form_id > 0\";\n $ids = $wpdb->get_col($sql);\n return $ids;\n }",
"function executeBoundSQL($cmdstr, $list) {\n\n\tglobal $oraconn, $success;\n\t$statement = OCIParse($oraconn, $cmdstr);\n\n\tif (!$statement) {\n\t\techo \"<br>Cannot parse the following command: \" . $cmdstr . \"<br>\";\n\t\t$e = OCI_Error($oraconn);\n\t\techo htmlentities($e['message']);\n\t\t$success = False;\n\t}\n\n\tforeach ($list as $tuple) {\n\t\tforeach ($tuple as $bind => $val) {\n\t\t\t//echo $val;\n\t\t\t//echo \"<br>\".$bind.\"<br>\";\n\t\t\tOCIBindByName($statement, $bind, $val);\n\t\t\tunset ($val); //make sure you do not remove this. Otherwise $val will remain in an array object wrapper which will not be recognized by Oracle as a proper datatype\n\n\t\t}\n\n\t\t$r = OCIExecute($statement, OCI_DEFAULT);\n\t\tif (!$r) {\n\t\t\techo \"<br>Cannot execute the following command: \" . $cmdstr . \"<br>\";\n\t\t\t$e = OCI_Error($statement); // For OCIExecute errors pass the statementhandle\n\t\t\techo htmlentities($e['message']);\n\t\t\techo \"<br>\";\n\t\t\t$success = False;\n\t\t}\n\t}\n\n}",
"public function compileTableExists()\n {\n return \"select * from sqlite_master where type = 'table' and name = ?\";\n }",
"protected function where_clause_SWSquad_SquadID()\n\t{\n\t\tif(!method_exists($this->incoming_record, 'get_SWSquad_SquadID'))\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\t$SWSquad_SquadID = $this->incoming_record->get_SWSquad_SquadID();\n\t\t$where_fragment = '';\n\t\tif(!empty($SWSquad_SquadID))\n\t\t{\n\t\t\t$SWSquad_SquadID = (array)$SWSquad_SquadID;\n\t\t\tforeach($SWSquad_SquadID as $key => $id)\n\t\t\t{\n\t\t\t\t$SWSquad_SquadID[$key] = $this->db->quote($id);\n\t\t\t}\n\t\t\t$where_fragment = \" and SWSquad_SquadID in (\".implode(',',$SWSquad_SquadID).\")\";\n\t\t}\n\t\treturn $where_fragment;\n\t}",
"function accesrestreint_rubriques_accessibles_where($primary,$not='NOT', $_publique=''){\r\n\tif (!$_publique) $_publique = \"!test_espace_prive()\";\r\n\treturn \"sql_in('$primary', accesrestreint_liste_rubriques_exclues($_publique), '$not')\";\r\n}",
"public function sqlStateIn($state, $list) {\n\t\t$sqlState = \"0\";\n\t\tif ($state == \"HY000\") $sqlState = RedBean_QueryWriter::C_SQLSTATE_NO_SUCH_TABLE;\n\t\tif ($state == \"23000\") $sqlState = RedBean_QueryWriter::C_SQLSTATE_INTEGRITY_CONSTRAINT_VIOLATION;\n\t\treturn in_array($sqlState, $list);\n\t}",
"private function getSQLForDelete()\n {\n $table = $this->_sqlParts['from']['table'] . ($this->_sqlParts['from']['alias'] ? ' ' . $this->_sqlParts['from']['alias'] : '');\n $query = 'DELETE FROM ' . $table . ($this->_sqlParts['where'] !== null ? ' WHERE ' . ((string) $this->_sqlParts['where']) : '');\n\n $query = ($this->_maxResults === null && $this->_firstResult == null)\n ? $query\n : $this->_connection->getAdapter()->applyLimit($query, $this->_firstResult, $this->_maxResults);\n\n return $query;\n }",
"public function getStoragePid(): array;",
"public function pquery_sql($query, array $phs = null);",
"public function isstudentsExisting ($student_number){\n $sqlQuery = \"SELECT count (*) as isExisting \";\n $sqlQuery .= \"FROM students \";\n $sqlQuery .= \"WHERE student_number= $student_number\";\n $result = $this -> getDbManager() -> executeSelectQuery ( $sqlQuery );\n if ( $result [0][ \" isExisting \"] == 1) return ( true );\n else return ( false );\n }",
"function check_invoice($invtype,$ppr){\n $db = $GLOBALS['db'];\n $db_table = $invtype.\"_invoice\";\n\n $stmt = $db->prepare(\"SELECT * FROM $db_table WHERE ppr = :ppr\");\n $stmt->execute(array(':ppr' => $ppr,));\n if($stmt->rowCount()>0){\n //matching record found\n return true;\n }\n else{\n return false;\n }\n}",
"public function queryAllShared()\n {\n $statement = sprintf(\"SELECT %s, %s, %s, %s FROM %s WHERE %s = 1 AND deleted = 0\",\n static::FIELDS[0], static::FIELDS[1], static::FIELDS[2], static::FIELDS[4], static::TABLE, static::FIELDS[3]);\n $req = $this->db->query($statement);\n $response = $req->fetchAll(PDO::FETCH_ASSOC);\n\n return json_encode($response);\n }",
"private function craftSql($tagIds, $metaIds)\n {\n $tagChunks = array();\n foreach ($tagIds as $tag) {\n $tagChunks[] = $this->makeTagSql($tag);\n }\n $metaChunks = array();\n foreach ($metaIds as $meta) {\n $metaChunks = array_merge($metaChunks, $this->makeMetaSql($meta));\n }\n $chunks = array_merge($tagChunks, $metaChunks);\n return \"select file_id from (\" . implode(\" union all \", $chunks) . \") as search_table group by file_id\";\n }",
"public function buildWherePermission( array $ids, $field='', $incStarCheck=true );",
"protected function checkInvalidSqlModes() {}",
"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}",
"function get_id_db($injured_table, $conn, $band_id, $mode) {\n valid_init($injured_table, $conn, $band_id, $mode);\n\n // Get ID from database\n $result = exec_query($conn, \"select id from $injured_table where opaska_id = $band_id and w_akcji = true\", TRUE);\n $id = $result['id'];\n return $id;\n}",
"public function exists($persistenceIdentifier);",
"public function toSQL(){\n if ($this->type === 'RANGE') {\n return \"PARTITION {$this->name} VALUES LESS THAN ({$this->value})\";\n }\n\n if($this->type === 'LIST') {\n return \"PARTITION {$this->name} VALUES IN (\". implode(',', $this->value) . \")\";\n }\n return '';\n }",
"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\tcase lu_gm:\n\t\t\tcase lu_owner:\n\t\t\t\t$sql = ' WHERE l.company_id = '.$this->page->company['company_id'];\n\t\t}\n\t\treturn $sql;\n\t}",
"public function istasksExisting ($task_id){\n $sqlQuery = \"SELECT count (*) as isExisting \";\n $sqlQuery .= \"FROM tasks \";\n $sqlQuery .= \"WHERE task_id= $task_id\";\n $result = $this -> getDbManager() -> executeSelectQuery ( $sqlQuery );\n if ( $result [0][ \" isExisting \"] == 1) return ( true );\n else return ( false );\n }",
"function doCheck($db_request){\n $database = new mysqli(\"localhost\", \"root\", \"password\", \"website\");\n $pass = array();\n \n $result = $database->query(\"SELECT * FROM music WHERE artist_id LIKE '%$db_request%' OR \n name LIKE '%$db_request%' OR album_id LIKE '%$db_request%'\n OR album_title LIKE '%$db_request%' OR track_id LIKE '%$db_request%' OR\n track_title LIKE '%$db_request%' OR track_duration LIKE '%$db_request%'\");\n \n while ($db_row = $result->fetch_assoc()){\n array_push($pass, $db_row);\n }\n return $pass;\n}",
"public function checkPID($pid){\n\n\t\t$sql = \"SELECT partner_id FROM partner WHERE partner_id = ?\";\n\t\t$req = $GLOBALS[\"conn\"]->prepare($sql);\n\t\t$req->execute([$pid]);\n\n\t\t$res[] = $req->fetch();\n\n\t\techo count($res);\n\t}",
"function getSeqSQL()\n{\n global $User;\n\n //need the record ID column here\n\t$recordIDSelect = explode(' AS ', $this->recordIDSelect );\n $SQL = 'SELECT ' .$recordIDSelect[1]. ' FROM ( '.$this->getListSQL().' ) AS list_seq ';\n return $SQL;\n}",
"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 SqlKeyFilter() {\n\t\treturn \"`rid` = @rid@\";\n\t}",
"function get_all_ids() {\n\t\t$cloudprofile_list = array();\n\t\t$query = \"select pr_id from \".$this->_db_table;\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute($query);\n\t\tif (!$rs)\n\t\t\t$this->_event->log(\"get_all_ids\", $_SERVER['REQUEST_TIME'], 2, \"cloudprofile.class.php\", $db->ErrorMsg(), \"\", \"\", 0, 0, 0);\n\t\telse\n\t\twhile (!$rs->EOF) {\n\t\t\t$cloudprofile_list[] = $rs->fields;\n\t\t\t$rs->MoveNext();\n\t\t}\n\t\treturn $cloudprofile_list;\n\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 static function CHECK_ACCESS_PERMISSION(){\n\t $SQL_String = \"SELECT uid,gid FROM permission_matrix WHERE uid=:uid AND master=1;\";\n\t return $SQL_String;\n\t}",
"function get_companies_where($connection, $params=array())\n{\n try {\n $params_imploded = implode(\"','\",$params);\n $sql = \"SELECT symbol,name FROM companies WHERE symbol IN ('$params_imploded')\";\n $result = runQuery($connection, $sql, null);\n return $result;\n }\n catch (PDOException $e) {\n die( $e->getMessage() );\n }\n}",
"public function getStorageId(): string\n {\n return sprintf('$%s', $this->getData());\n }",
"function kval_sqlite_query($sql)\n{\n return kval_sqlite_queryexec(func_get_args())[1];\n}",
"static function custom_get_one_sql($id) {\n # this is the default functionality\n $primary_key = static::get_primary_key();\n return static::get_sql() . \" WHERE o.`$primary_key`='$id'\";\n }",
"private function createSingleResultQuery(array &$queryParameters): string\n {\n // Get the base query\n $query = $this->createBaseQuery();\n\n // Add the ID to the query\n $query .= 'AND entries.id = :entry_id ';\n\n $queryParameters[] = new Parameter('entry_id', $this->propertyFilters['id']['='], Types::STRING);\n\n return $query;\n }",
"private function getDatasets($datasets) {\n $datasets_id = collect($datasets)->implode('id', ', ');\n $sql = \" AND t1.datasets_id\";\n\n return $sql .= ((count($datasets) === 1)) ? \" = $datasets_id\" : \" IN ($datasets_id)\";\n }",
"public function qin($sql, $values = array())\n {\n $statement = oci_parse($this->connection, $sql);\n\n foreach ($values as $key => $val) {\n oci_bind_by_name($statement, $key, $values[$key], 512);\n }\n\n if (@!oci_execute($statement)) {\n $errors = oci_error($statement);\n return array('success' => false, 'data' => 'Error : ' . $errors['code'] . ' => ' . $errors['message']);\n }\n\n $result = array();\n oci_fetch_all($statement, $result, null, null, OCI_FETCHSTATEMENT_BY_ROW);\n\n return array('success' => true, 'data' => $result);\n }",
"private function checkSqlArg($values){\n \n foreach ($values as $word){\n if(!$this->checkWord($word)){\n eHandle(403, $loc = \"api/sql/sqlInteract.php\", $desc = \"word '$word' is not a valid word for sqlDict '$this->dbName\");\n return false;\n }\n }\n return true;\n }",
"function PKG_executeOnClientJobs($sql,$packageIDList)\n{\n\tif (count($packageIDList) == 0)\n\t\treturn;\n\tfor ($i=0; $i < count($packageIDList); $i++)\n\t{\n\t\tCHECK_FW(CC_packageid, $packageIDList[$i]);\n\t\tif ($i < count($packageIDList)-1)\n\t\t\t$sql.=\"id=\".$packageIDList[$i].\" || \";\n\t\t\telse\n\t\t\t$sql.=\"id=\".$packageIDList[$i];\n\t}\n\n\tdb_query($sql); //FW ok\n}",
"private function _sql_append($table) {\n\t\tif ($this->append) {\n\t\t\treturn \"OR $table.ID IN ({$this->append})\";\n\t\t}\n\t}",
"function IfExists($EquipmentId) {\r\n $conn = conn();\r\n $stmt = $conn->prepare(\"SELECT * FROM account WHERE AccountId = '$AccountId' ;\");\r\n $stmt->execute();\r\n $result = $stmt->fetchAll();\r\n if (($result)) {\r\n return 1;\r\n }\r\n return 0;\r\n $conn = NULL;\r\n }",
"public function hasSql(){\n return $this->_has(1);\n }",
"public function getPrimaryKey()\n {\n $pks = array();\n $pks[0] = $this->getShnttype();\n $pks[1] = $this->getShntseq();\n $pks[2] = $this->getShntkey2();\n $pks[3] = $this->getShntform();\n\n return $pks;\n }",
"private function inClause($list)\n {\n\n $list = array_map(function ($i) {\n\n return \"?\";\n\n }, $list);\n\n $list = implode(\",\", $list);\n\n return \"($list)\";\n }",
"public function readByKeyQuery(): string\n {\n return 'SELECT * FROM products WHERE id = :id';\n }",
"public function run_multiple_statements($statement, $periodo = null) {\n\t\t// split the statements, so DB::statement can execute them.\n\t\t//$statements = array_filter(array_map('trim', explode(';', $statement)));\n\n\t\t//foreach ($statement as $stmt) {\n\t\ttry {\n\t\t\tDB::connection('datawarehouse')->getPdo()->exec($statement);\n\t\t} catch (Exception $e) {\n\t\t\treturn json_encode($e->errorInfo());\n\t\t}\n\t\t//}\n\t}",
"protected function getStatusSQL()\n\t{\n\t\t$ids = $this->getInactiveStatuses();\n\t\t$placeholders = substr(str_repeat('?,', count($ids)), 0, -1);\n\t\treturn array('inactive' => \"AND a.application_status_id in ({$placeholders})\",\n\t\t\t\t\t 'active' => \"AND a.application_status_id not in ({$placeholders})\");\n\t}",
"function executeBoundSQL($cmdstr, $list) {\n\n global $db_conn, $success;\n $statement = OCIParse($db_conn, $cmdstr);\n\n if (!$statement) {\n echo \"<br>Cannot parse the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($db_conn);\n echo htmlentities($e['message']);\n $success = False;\n }\n\n foreach ($list as $tuple) {\n foreach ($tuple as $bind => $val) {\n //echo $val;\n //echo \"<br>\".$bind.\"<br>\";\n OCIBindByName($statement, $bind, $val);\n unset ($val); //make sure you do not remove this. Otherwise $val will remain in an array object wrapper which will not be recognized by Oracle as a proper datatype\n }\n\n $r = OCIExecute($statement, OCI_DEFAULT);\n if (!$r) {\n echo \"<br>Cannot execute the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($statement); // For OCIExecute errors, pass the statementhandle\n echo htmlentities($e['message']);\n echo \"<br>\";\n $success = False;\n }\n }\n}",
"function getSqlArrayForStats()\r\n\t{\r\n\t\tglobal $langs;\r\n\t\t$langs->load(\"users\");\r\n\r\n\t\t$statssql=array();\r\n\t\treturn $statssql;\r\n\t}",
"abstract function getSQL();",
"function drush_policy_sql_sync_validate($source = NULL, $destination = NULL) {\n $result = true;\n $destination = _drush_policy_parse_alias($destination);\n\n if ($destination == '@prod') {\n $result = _drush_policy_override_validate($destination, 'database');\n }\n\n return $result;\n}",
"function _getItemSearchFromStmt() {\n $sql = 'FROM plugin_docman_item AS i'.\n ' LEFT JOIN plugin_docman_version AS v'.\n ' ON (i.item_id = v.item_id)'.\n ' LEFT JOIN plugin_docman_version AS v2'.\n ' ON (v2.item_id = v.item_id AND v.number < v2.number) ';\n return $sql;\n }",
"function econsole_scale_used_anywhere($scaleid) {\r\n if ($scaleid and record_exists('console', 'grade', -$scaleid)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}",
"public function executeList(array $ids): bool\n {\n return true;\n }"
] | [
"0.52852386",
"0.50307095",
"0.4760972",
"0.47188503",
"0.468266",
"0.46733648",
"0.46633515",
"0.46529123",
"0.46493667",
"0.4648606",
"0.46412587",
"0.4600992",
"0.4567939",
"0.45642945",
"0.4555683",
"0.45416847",
"0.45220962",
"0.45220962",
"0.45021865",
"0.44996247",
"0.4495337",
"0.44894654",
"0.44887725",
"0.44862905",
"0.44834292",
"0.44799614",
"0.44747025",
"0.44638819",
"0.44609866",
"0.44595242",
"0.44546723",
"0.4454158",
"0.4450342",
"0.44420037",
"0.4439618",
"0.44369757",
"0.4422627",
"0.44140282",
"0.44121996",
"0.4410228",
"0.43960816",
"0.4392508",
"0.4392508",
"0.43736038",
"0.43722776",
"0.4354616",
"0.43508172",
"0.43461686",
"0.43452236",
"0.43450454",
"0.4339884",
"0.43287396",
"0.43187162",
"0.4318433",
"0.4317492",
"0.43172154",
"0.4311395",
"0.43085676",
"0.43032366",
"0.43002033",
"0.42955485",
"0.4288152",
"0.42845377",
"0.42743254",
"0.42683727",
"0.42632723",
"0.42616567",
"0.42586228",
"0.425626",
"0.42549506",
"0.42537817",
"0.42510328",
"0.42403412",
"0.42370114",
"0.42290553",
"0.4227742",
"0.42258248",
"0.42198694",
"0.4216977",
"0.42150992",
"0.4215017",
"0.42025664",
"0.4202535",
"0.42015123",
"0.41996637",
"0.41996035",
"0.4185522",
"0.41761065",
"0.41750643",
"0.41693947",
"0.4166385",
"0.41643885",
"0.41641802",
"0.41641542",
"0.41536608",
"0.41494375",
"0.41442686",
"0.41428706",
"0.41362426",
"0.41282105"
] | 0.578123 | 0 |
Debug an extbase query result. Before debugging the query you must execute it. ($query>execute()) | public function debugQuery(\TYPO3\CMS\Extbase\Persistence\Generic\QueryResult $queryResult) {
$GLOBALS['TYPO3_DB']->debugOuput = 2;
$GLOBALS['TYPO3_DB']->store_lastBuiltQuery = true;
$queryResult->toArray();
\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($GLOBALS['TYPO3_DB']->debug_lastBuiltQuery);
$GLOBALS['TYPO3_DB']->store_lastBuiltQuery = false;
$GLOBALS['TYPO3_DB']->explainOutput = false;
$GLOBALS['TYPO3_DB']->debugOuput = false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function queryDebug($resultVar){\n\tif (!$resultVar) {\n\t\t$message = 'Invalid query: ' . mysql_error() . \"\\n\";\n\t\t$message .= 'Whole query: ' . $query;\n\t\tdie($message);\n\t}\n}",
"public function debug(){\r\n $this->db->debugMode(function($args){\r\n echo ($args[\"query\"]);\r\n });\r\n return $this;\r\n }",
"public function debug($row = null)\n\t{\n\t\tif($row) {\n\t\t\t// Dump debugging info for current row\n\t\t}\n\t\t\n\t\techo \"<p>Executed \" . $this->getQueryCount() . \" queries:</p>\";\n\t\techo \"<pre>\\n\";\n\t\tprint_r(self::$queryLog);\n\t\techo \"</pre>\\n\";\n\t}",
"function get_debug_info($query)\n\t{\n\t\t$data = array();\n\t\tif (substr(trim(strtoupper($query)), 0, 6) == 'SELECT') {\n\t\t\tif (!pg_send_query($this->connection, \"EXPLAIN $query\"))\n\t\t\t{\n\t\t\t\t$err = pg_get_result($this->connection);\n\t\t\t\terror(PDNSADMIN_QUERY_ERROR, pg_result_error($err), $query, 0);\n\t\t\t} else {\n\t\t\t\t$result = pg_get_result($this->connection);\n\t\n\t\t\t\tif (false === $this->last)\n\t\t\t\t{\n\t\t\t\t\terror(PDNSADMIN_QUERY_ERROR, pg_result_error($err), $query, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data = pg_fetch_array($result);\n\t\t}\n\t\treturn $data;\n\t}",
"public function query($query)\n\t\t{\n\t\t\n\t\t\t$result = $this->connection->query($query) or die(\"<b style='color:red;'>Error en la consulta.</b><br /><br />\".$this->connection->error.\"<be>Error:<br>\".$query);\n\t\t\treturn $result;\n\t\t}",
"public function printquery(){\n\t\techo $this->query.\";\";\n\t}",
"function executeQuery($query);",
"function customQuery($query) \t{\n $res = $this->execute($query);\n\t\t return $res;\n\t}",
"function db_log_query($description, $sql, $params, $result = null) {\n\tif (! option('debug')) {\n\t\treturn;\n\t}\n\tif (! isset($GLOBALS['SQL_QUERIES'])) {\n\t\t$GLOBALS['SQL_QUERIES'] = array ();\n\t}\n\t$GLOBALS['SQL_QUERIES'][] = array (\n\t\t\"description\" => $description,\n\t\t\"query\" => $sql,\n\t\t// Ineffective and ugly way for a deep copy\n\t\t\"result\" => unserialize(serialize($result)),\n\t\t\"params\" => $params \n\t);\n}",
"function query($query){\r\n if($this->query = $this->connection->prepare($query)){\r\n $this->query->execute();\r\n //cek kalo error\r\n if ($this->query->errno){\r\n die(\"otak anda error: \". $this->query->error);\r\n }\r\n }else{\r\n die(\"Error execution: \". $this->query->error);\r\n }\r\n }",
"public final function getQueryDebug()\n {\n $sql = $this->buildSqlString();\n\n $out = '\n\t\t<div class=\"debug\">\n\t\t\t<h3>SQL</h3>\n\t\t\t<p>' . $sql . '</p>\n\t\t\t<h3>Params</h3>\n\t\t\t' . $this->debug($this->param) . '\n\t\t\t<h3>Full query</h3>\n\t\t\t' . $this->db->quote($sql, $this->param) . '\n\t\t</div>';\n\n return $out;\n }",
"protected function debug($sql){\n\t\tif($this->debug){\n\t\t\tFlash::notice($sql);\n\t\t}\t\n\t}",
"function query(\\database $dbase){\n //\n //Get the sql string \n $sql=$this->to_str();\n //\n // Execute the $sql on columns to get the $result\n $dbase->query($sql);\n \n }",
"public function query($query)\n {\n // TODO: psr Logger\n $this->_log[] = $query;\n\n if ($this->_debug_mode) {\n return false;\n }\n\n $ret = parent::query($query);\n return $ret;\n }",
"public function query($query = \"NONEE\"){\n\t\t\n\t\tif($update = $query === \"NONEE\")\n\t\t\t$query = $this->query; \t\t\t\t\t\n\t\t\n\t\t$this->query_total++;\n\t\t\n\t\t$query_check = trim($query);\n\t\t\n\t\tif($this->debug){\n\t\t\techo \"<br/><strong style=\\\"color:#E4C100\\\"><DEBUG></strong><br/>\";\n\t\t\techo $this->comment != \"\" ? \"<span style=\\\"color:#D3C26E;font-style:italic\\\">#\".$this->comment.\"</span><br/>\" : \"\";\n\t\t\techo \"<span style=\\\"color:#E4C100\\\">\".$query.\"</span><br/><strong style=\\\"color:#E4C100\\\"></DEBUG></strong><br/>\";\n\t\t}\n\t\t\n\t\t$resultset = $this->showErrors ? mysqli_query($this->connection,$query) : @mysqli_query($this->connection,$query);\n\t\t\n\t\t$proceed_log = $this->log && ( \n\t\t(stripos($query_check,\"INSERT\") === 0 && $this->log_options{0} === '1')\n\t\t||\n\t\t(stripos($query_check,\"DELETE\") === 0 && $this->log_options{1} === '1')\n\t\t||\n\t\t(stripos($query_check,\"UPDATE\") === 0 && $this->log_options{2} === '1')\n\t\t||\n\t\t(stripos($query_check,\"SELECT\") === 0 && $this->log_options{3} === '1'));\n\t\t\n\t\tif(stripos($query_check,\"INSERT\") === 0 || stripos($query_check,\"DELETE\") === 0 || stripos($query_check,\"UPDATE\") === 0)\n\t\t\tif(!$resultset)\n\t\t\t\t$this->transaction = false;\n\t\t\n\t\tif($proceed_log){\n\t\t\t$log_fields = \"query,date,user\";\n\t\t\t$log_values=\"'\".$this->secure($query).\"',NOW(),\".$this->log_user;\n\t\t}\n\t\t\n\t\tif(!$resultset){\n\t\t\tif($this->showErrors){ \n\t\t\t\techo \"<br/><strong style=\\\"color:red\\\"><QERROR></strong><br/>\";\n\t\t\t\techo $this->comment != \"\" ? \"<span style=\\\"color:#E88888;font-style:italic\\\">#\".$this->comment.\"</span><br/>\" : $this->comment.\"nada\";\n\t\t\t\techo \"<span style=\\\"color:red\\\">\".mysqli_error($this->connection).\" at \".$query_check.\"</span><br/><strong style=\\\"color:red\\\"></QERROR></strong><br/>\";\n\t\t\t}\n\t\t\tif($proceed_log){\n\t\t\t\t$log_fields .= \",error\";\n\t\t\t\t$log_values .= \",'\".mysqli_error($this->connection).\"'\";\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif($proceed_log){\t\t\t\n\t\t\t@mysqli_query($this->connection,\"INSERT INTO \".$this->log_table.\"($log_fields) VALUES($log_values)\");\n\t\t}\n\t\t\n\t\tif(!$resultset && $this->closeOnError) \n\t\t\texit;\n\t\t\n\t\tif($update)\n\t\t\t$this->resultset = $resultset;\n\t\t\n\t\treturn $resultset; \n\t}",
"public function execute($query)\n {\n }",
"public function execute($query);",
"public function execute()\n {\n if (!$this->sessionSet && $this->platform instanceof MySqlPlatform) {\n $this->connection->exec(\"SET @@SESSION.sql_mode = '';\");\n $this->sessionSet = true;\n }\n\n // Take a local copy so that we don't modify the original query and cause issues later\n $query = $this->replacePrefix((string) $this->sql);\n\n if (!($this->sql instanceof \\JDatabaseQuery) && ($this->limit > 0 || $this->offset > 0)) {\n // @TODO\n if ($this->offset > 0) {\n $query .= ' LIMIT ' . $this->offset . ', ' . $this->limit;\n } else {\n $query .= ' LIMIT ' . $this->limit;\n }\n }\n\n $this->prepared = $this->connection->prepare($query);\n\n // Increment the query counter.\n $this->count++;\n\n // Reset the error values.\n $this->errorNum = 0;\n $this->errorMsg = '';\n $memoryBefore = null;\n\n // If debugging is enabled then let's log the query.\n if ($this->debug) {\n // Add the query to the object queue.\n $this->log[] = $query;\n\n \\JLog::add($query, \\JLog::DEBUG, 'databasequery');\n\n $this->timings[] = microtime(true);\n }\n\n // Execute the query.\n $this->executed = false;\n $previous = null;\n\n if ($this->prepared instanceof Statement) {\n // Bind the variables:\n if ($this->sql instanceof JDatabaseQueryPreparable) {\n $bounded = $this->sql->getBounded();\n\n foreach ($bounded as $key => $obj) {\n $this->prepared->bindParam($key, $obj->value, $obj->dataType, $obj->length, $obj->driverOptions);\n }\n }\n\n try {\n $this->executed = $this->prepared->execute();\n } catch (\\Exception $previous) {\n }\n }\n\n if ($this->debug) {\n $this->timings[] = microtime(true);\n\n if (defined('DEBUG_BACKTRACE_IGNORE_ARGS')) {\n $this->callStacks[] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);\n } else {\n $this->callStacks[] = debug_backtrace();\n }\n }\n\n // If an error occurred handle it.\n if (!$this->executed) {\n // Get the error number and message before we execute any more queries.\n $errorNum = (int) $this->connection->errorCode();\n $errorMsg = (string) 'SQL: ' . implode(\", \", $this->connection->errorInfo());\n\n // Get the error number and message from before we tried to reconnect.\n $this->errorNum = $errorNum;\n $this->errorMsg = $errorMsg;\n\n // Throw the normal query exception.\n \\JLog::add(\n \\JText::sprintf('JLIB_DATABASE_QUERY_FAILED', $this->errorNum, $this->errorMsg),\n \\JLog::ERROR,\n 'databasequery'\n );\n throw new RuntimeException($this->errorMsg, $this->errorNum, $previous);\n }\n\n return $this->prepared;\n }",
"protected abstract function executeQuery(Result $result);",
"function show_query($query) {\r\n global $debug;\r\n\r\n if($debug)\r\n echo \"<p>Query = $query</p>\" ;\r\n}",
"private function query_debugger($Query) {\n\t\t// Debug queries\n\t\tif($this->debug) {\n\t\t\tstatic $query_cnt = 0;\n\t\t\tstatic $query_dup = 0;\n\t\t\tglobal $queries_debug, $queries_debug_arr;\n\t\t\t\n\t\t\t$queryTime = \"<span class='badge pull-right'>\".$this->Connection->queryTime.\" sec</span>\";\n\t\t\t\t\t\t\n\t\t\t$q = $Query;\n\t\t\t$paterns = '/(SELECT|FROM|ORDER BY|ASC|ASC\\,|DESC|WHERE|AND|\\sOR|JOIN|LEFT JOIN|IN| ON|GROUP BY|GROUP_CONCAT\\(|CONCAT\\(|CONVERT\\(|COUNT\\(|AS|LIMIT|OFFSET)\\s/i';\n\t\t\t$q = preg_replace($paterns, '<span>'.\"$1 \".'</span>', $q);\n\t\t\t$q = str_replace(\"\\r\", \"\", str_replace(\"\\n\", \"<br/>\", $q));\n\t\t\t$q = str_replace(\"<span>\", \"<span style='color:#990099; font-weight:bold;'>\", $q);\n\t\t\t\n\t\t\t$duplicate = '';\n\t\t\tif(in_array($Query, $queries_debug_arr)) {\n\t\t\t\t$query_dup++;\n\t\t\t\t$dup_key = array_search($Query, $queries_debug_arr)+1;\n\t\t\t\t//$q = \"Duplicate ($dup_key) : $q\";\n\t\t\t\t$duplicate = \" <code title='Duplicate'><i class='fa fa-copy'></i> \".$dup_key.\"</code>\";\n\t\t\t} else {\n\t\t\t\t$queries_debug_arr[] = $Query;\n\t\t\t}\n\t\t\t\n\t\t\t$q = \"<div class='trace' style='cursor:pointer;'><b>\".++$query_cnt . $duplicate . \"</b>. \". $q . $queryTime . \"</div>\";\n\t\t\t$q .= \"<div style='display:none;margin:15px 15px 0 15px;border-left: 2px solid #000000;'>\";\n\t\t\t$trace = debug_backtrace(false);\n\t\t\tfor($i=count($trace)-1;$i>=0;$i--) {\n\t\t\t\t$q .= str_repeat(\" \",(count($trace)-$i)*3);\n\t\t\t\t$q .= \"↳\";\n\t\t\t\t$q .= preg_replace(\"/^\\S+public_html\\//\",\"\",$trace[$i]['file']);\n\t\t\t\t$q .= \" : \".$trace[$i]['line'].\" -> \";\n\t\t\t\t$q .= isset($trace[$i]['class'])?$trace[$i]['class'].\"::\":\"\";\n\t\t\t\t$q .= $trace[$i]['function'];\n\t\t\t\tif($trace[$i]['function']=='render' && $trace[$i]['class']=='Twig_Environment') {\n\t\t\t\t\tif($trace[$i]['args']['0']=='mainpage.tpl' && !isset($queries_debug['-1'])) $queries_debug['-1'] = '*******************************Render TPL Start*********************************<br/>';\n\t\t\t\t\t$q .= ' (<b>'.$trace[$i]['args']['0'].'</b>)';\n\t\t\t\t}\n\t\t\t\t$q .= \"<br/>\";\n\t\t\t}\n\t\t\t$q .= \"</div>\";\n\t\t\t$GLOBALS['query_cnt'] = $query_cnt;\n\t\t\t$GLOBALS['query_dup'] = $query_dup;\n\t\t\t$queries_debug[] = $q;\n\t\t}\n\t}",
"function show_query($query) {\n global $debug;\n if($debug)\n echo \"<p>Records have been changed.</p>\" ;\n}",
"private function RunBasicQuery() {\n // Prepare the Query\n $this->stmt = $this->db->prepare($this->sql);\n \n // Run the Query in the Database\n $this->stmt->execute();\n \n // Store the Number Of Rows Returned\n $this->num_rows = $this->stmt->rowCount();\n \n // Work with the results (as an array of objects)\n $this->rs = $this->stmt->fetchAll();\n \n // Free the statement\n $this->stmt->closeCursor(); \n }",
"function print_query($db) {\n\t\techo \"<pre>\";print_r($db->get_compiled_select());echo \"</pre>\";\n\t}",
"public function query()\n\t{\n\t\t\n\t}",
"function show_query($query) {\n global $debug;\n\n if($debug)\n echo \"<p>Query = $query</p>\" ;\n}",
"function set_debug_item($stmt, $result) { }",
"function debugging() {\n\t\t$result = $this->connection->prepare(\"SELECT * FROM admins\");\n\t\t$result->execute();\n\t\treturn $result->fetchAll();\n\t}",
"public function executeQuery() {\r\n\t\t$query = $this->query;\r\n\t\t$query->matching($query->logicalAnd($this->queryConstraints));\r\n//$parser = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Extbase\\\\Persistence\\\\Generic\\\\Storage\\\\Typo3DbQueryParser'); \r\n//$queryParts = $parser->parseQuery($query); \r\n//\\TYPO3\\CMS\\Core\\Utility\\DebugUtility::debug($queryParts, 'Query Content');\r\n\t\t$queryResult = $query->execute()->toArray();\r\n\t\t$this->setSelectedPageUids($queryResult);\r\n\t\t$this->resetQuery(); \r\n\t\treturn $queryResult;\r\n\t}",
"public function actionDatabaseQueries() {\n echo \"Database Debug Log:\";\n $this->showLog('dbDebug.log');\n }",
"public function _query()\n {\n }",
"public function displayQuery($result)\n\t{\n\n\t\tif(!$result){\n\n\t\t\t$output = 'Database Is Faild :'.mysqli_error($this->connection).'<br>';\n\t\t\t$output .= 'Last Query Is : '.$this->lastQuery;\n\t\t\tdie($output);\n\t\t}else{\n\n\t\t\t$this->affectedRows = mysqli_affected_rows($this->connection);\n\t\t}\n\t}",
"public static function q($sql) {\n /** store query for debug * */\n self::$__querys[] = $sql;\n\n /** run * */\n $data = array();\n $free_result = false;\n $result = mysqli_query(self::$__connection, $sql);\n if (gettype($result) != 'boolean') {\n $free_result = true;\n while ($r = $result->fetch_assoc()) {\n $data[] = $r;\n }\n } else {\n if ($result) {\n $data = $result;\n } else {\n $error = mysqli_error(self::$__connection);\n if ($error) {\n CMS::log('DB', 'SQL ERROR (next two lines)', 2);\n CMS::log('DB', $sql, 2);\n CMS::log('DB', $error, 2);\n }\n $data = false;\n }\n }\n\n self::$_lastid = mysqli_insert_id(self::$__connection);\n self::$_lasterror = mysqli_error(self::$__connection);\n \n if(ALLOW_DB_DEBUG){\n if(self::$_lasterror){\n echo '<br><h2>SQL DEBUG</h2><p>'.$sql.'</p><p>'.self::$_lasterror.'</p>';\n $trace = debug_backtrace();\n echo '<p><strong>Line:</strong> '.$trace[0]['line'].' <strong>File:</strong> '.$trace[0]['file'].'</p>';\n if(isset($trace[1]['line'])){\n echo '<p><strong>Line:</strong> '.$trace[1]['line'].' <strong>File:</strong> '.$trace[1]['file'].'</p>';\n }\n if(isset($trace[2]['line'])){\n echo '<p><strong>Line:</strong> '.$trace[2]['line'].' <strong>File:</strong> '.$trace[2]['file'].'</p>';\n }\n echo '</p><br><br>';\n }\n }else{\n if(self::$_lasterror){\n try{\n //\\SiteDebug::log( 'SQL DEBUG: '.$sql.' :: Last Error: '.self::$_lasterror);\n }catch (Exception $e) {\n //ignore, not loaded yet\n }\n }\n }\n \n if ($free_result) {\n mysqli_free_result($result);\n }\n return $data;\n }",
"public function executeGenericDQLQuery($query){\n try{\n if(!$this->db)\n {\n $this->db = mysql_connect(self::DB_SERVER,self::DB_USER,self::DB_PASSWORD);\n }\n $result = mysql_query($query, $this->db);\n /* if(mysqli_errno($con) != 0){\n throw new Exception(\"Error :\".mysqli_errno($con).\" : \".mysqli_error($con));\n } */\n $rows = array();\n while($row = mysql_fetch_array($result)){\n array_push($rows,$row);\n }\n //mysqli_close($con);\n return $rows;\n \n }\n catch(Exception $e){\n $response = array();\n $response['status'] = false;\n $response['message'] = $e->getMessage();\n $this->response($this->json($response), 200);\n }\n \n }",
"function run($query){\n $q = $this->handle->prepare($query);\n if($q === false)\n return $this->handle->errorInfo();\n $r = $q->execute();\n if($r === false)\n return [$q->errorCode(), 'Erro ao executar query: '.$q->errorInfo()[2].\"<br/>\\r\\n Query: \".$query];\n return $r;\n }",
"function db_execute($query)\n {\n /*\n * Execute the Query\n */\n $this->varifysql($query[\"SQL\"]);\n return $this->get_conn()->query($query[\"SQL\"], PDO::FETCH_ASSOC);\n }",
"function query($sql)\n\t{\n\t\t$ret = $this->db->query($sql);\n\t\tlog_message('info','SQL Query: ' . $this->db->last_query());\n\t\treturn $ret;\n\t}",
"public function query( $query )\n {\n $this->free( );\n $this->db_query_result = @ mysql_query( $query );\n $this->fields_of_current_query = array();\n if ( $this->db_query_result )\n {\n $l_fnum = @mysql_num_fields($this->db_query_result);\n if($l_fnum > 0)\n {\n for($i = 0; $i < $l_fnum; $i++)\n $this->fields_of_current_query[] = mysql_field_name($this->db_query_result,$i);\n //var_dump($this->fields_of_current_query);\n }\n return true;\n }\n\n return false;\n }",
"function debug($message, $query = \"\") {\n global $logger;\n\t $logger->debug(\"$message \" . \"[ $query ]\" . \"\\n\");\n }",
"public function update($query) {\r\n //Se imprime la consulta a ejecutar (SOLO EN PRUEBAS)\r\n echo '<script type=\"text/javascript\"> console.log(\"' . $query . '\");</script>';\r\n\r\n $sentencia = $this->con->prepare($query);\r\n\r\n //Dependiendo de la inserccion se retorna true o false\r\n return $sentencia->execute();\r\n }",
"public function query($query) {\n\n\t\t$this->statement = $this->connectionDriver->prepare($query);\n\n\t\tif (collect($this->builder->bindings)->count() > 0){\n\t\t\t$this->bindValues();\n\t\t}\n\n\t\ttry {\n\t\t\t$this->statement->execute();\n\t\t}\n\t\tcatch (\\PDOException $e) {\n\n\t\t\tif (config('app.debug') == TRUE){\n\t\t\t\techo \"<pre>PDO::errorInfo():<br>\";\n\t\t\t\tprint_r($this->statement->errorInfo());\n\t\t\t\tvar_dump($e);\n\t\t\t\techo '<br> ' . $query . '</pre><br><br>';\n\t\t\t}\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$type = trim(strtoupper(substr($query, 0, strpos($query, \" \"))));\n\t\tswitch ($type) {\n\t\t\tcase \"SELECT\":\n\t\t\t\t$return = \"fetchAll\";\n\t\t\t\tbreak;\n\t\t\tcase \"INSERT\":\n\t\t\t\t$return = \"insert\";\n\t\t\t\tbreak;\n\t\t\tcase \"UPDATE\":\n\t\t\t\t$return = \"update\";\n\t\t\t\tbreak;\n\t\t\tcase \"DELETE\":\n\t\t\t\t$return = \"delete\";\n\t\t\t\tbreak;\n\t\t\tcase \"SHOW\":\n\t\t\t\t$return = \"fetchAll\";\n\t\t\t\tbreak;\n\t\t\tcase \"DESCRIBE\":\n\t\t\t\t$return = \"fetchAll\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$return = \"none\";\n\t\t\t\tbreak;\n\t\t}\n\t\t$datas = $this->getReturn($return);\n\t\t$this->statement->closeCursor();\n\t\treturn $datas;\n\t}",
"function show_query($query) {\n global $debug;\n\n if(false && $debug)\n echo \"<p>Query = $query</p>\" ;\n}",
"public function sql_query($query)\n {\n $res = $this->query($query);\n if ($this->debugOutput) {\n $this->debug('sql_query', $query);\n }\n return $res;\n }",
"public function query($query) {\n $this->result = $this->dbHandler->prepare($query);\n }",
"public function executeQuery($query) {\n\t\t$result = $this->connection->query($query);\n\t\t$this->rowsAffected = $this->connection->affected_rows;\n\t\t\t\n\t\tif(!$result) {\n\t\t\tthrow new DBException(\"Unable to execute query: \" . $query);\n\t\t}\n\t\treturn $result;\n\t}",
"function sql_query($query) {\n\t\t// Added to log select queries\n\t\tforeach($this->preProcessHookObjects as $preProcessHookObject) { /* @var $preProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPreProcessHookInterface */\n\t\t\t$preProcessHookObject->sql_query_preProcessAction($query);\n\t\t}\n\n\t\t$pointer = parent::sql_query($query);\n\n\t\t// Added to log select queries\n\t\tforeach($this->postProcessHookObjects as $postProcessHookObject) { /* @var $postProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPostProcessHookInterface */\n\t\t\t$postProcessHookObject->sql_query_postProcessAction($query);\n\t\t}\n\n\t\treturn $pointer;\n\t}",
"function sql_query($query) {\n\t\t// Added to log select queries\n\t\tforeach($this->preProcessHookObjects as $preProcessHookObject) { /* @var $preProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPreProcessHookInterface */\n\t\t\t$preProcessHookObject->sql_query_preProcessAction($query);\n\t\t}\n\n\t\t$pointer = parent::sql_query($query);\n\n\t\t// Added to log select queries\n\t\tforeach($this->postProcessHookObjects as $postProcessHookObject) { /* @var $postProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPostProcessHookInterface */\n\t\t\t$postProcessHookObject->sql_query_postProcessAction($query);\n\t\t}\n\n\t\treturn $pointer;\n\t}",
"function queryExecute($query) {\r\n\t\t\r\n\t\tif (strlen(trim($query)) < 0 ) {\r\n\t\t\ttrigger_error(\"Database encountered empty query string in queryExecute function\",E_ERROR);\r\n\t\t}\r\n\t\tif( !$this->connected ) \r\n\t\t\t$this->connect();\r\n\t\t\r\n\t\tif($this->socket->query($query) === true) {\r\n\t\t\t$this->recordsUpdated = $this->socket->affected_rows;\r\n\t\t}\r\n\t}",
"public function exec($query)\n {\n // TODO: psr Logger\n $this->_log[] = $query;\n\n if ($this->_debug_mode) {\n return false;\n }\n\n $ret = parent::exec($query);\n return $ret;\n }",
"public function query($query){\n\t\t$this->lastQuery = $query;\n\t\treturn $this->connection->query($query);\n\t}",
"public function runQuery(){\n \n $query = $this->getQuery();\n $pager = $this->getPager();\n $modify_result = $this->getModifyResult();\n\n // set default number of results so that we don't output NULL as \n // total_results if there are errors\n $pager->setTotalResults( 0 );\n $results = array();\n \n if( !$this->getResponse()->hasErrors() ){\n \t\n \t $count_query = clone $query;\n\t $pager->setTotalResults( $count_query->count() );\n \t $pager->decorateQuery( $query );\n \n\t if( $pager->getPageSize() > 0 ){\n\t $db_results = $query->find();\n\t foreach( $db_results as $model ){\n\t $result_object = array();\n\t $modify_result( $model, $result_object );\n\t $results[] = $result_object;\n\t }\n\t }\n\t \n }\n \n $api_response_body = $this->getResponse()->getResponseBody();\n $api_response_body->setBody($results);\n \n }",
"public function ExecuteQuery($query){\n\t\treturn $this->db_con->query($query);\n\t}",
"function ExecuteQuery($query)\n\t{\n\t\tif($this->result = $this->dblink->query($query)){\n\t\t\tif (isset($this->result->num_rows)) $this->records = $this->result->num_rows;\n\t\t\t\tif (isset($this->dblink->affected_rows)) $this->affected = $this->dblink->affected_rows;\n\t\t\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function executeQuery($query){\n\t\n $resultQuery = mysqli_query($this->link, $query) or die (\"Requete => PROBLEME\");\n return $resultQuery;\n }",
"public function query($query) {\n\t\t$result = parent::query($query);\n\t\tif ($this->error) throw new \\DatabaseException(\"[$this->errno] $this->error\");\n\t\treturn $result;\n\t}",
"public function executeQuery($query) {\r\n\t\t\r\n\t\t$this->mdb2->connect();\r\n\t\t\t\t\r\n\t\t$ResultSet = $this->mdb2->query($query);\r\n\t\t\r\n\t\t$this->mdb2->disconnect();\r\n\t\t\r\n\t\tif (PEAR::isError($ResultSet)) {\r\n\t\t\tdie($ResultSet->getMessage() . \": \" . $query);\r\n\t\t}\r\n\t\t\r\n\t\treturn $ResultSet;\r\n\t\t\r\n\t}",
"private function sendQuery ($query) {\n\t\t$res = $this->_db->query($query);\n\t\tif (!$res) {\n\t\t\t//echo $this->_db->error.\"\\n\";\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn $res;\n\t\t}\n\t}",
"public function execute(QueryObject $query);",
"public function executeSQL($query){\n\t\t$this->lastQuery = $query;\t\t\n\t\tif($this->result = mysqli_query( $this->databaseLink,$query)){\n\t\t\tif (gettype($this->result) === 'object') {\n\t\t\t\t$this->records = @mysqli_num_rows($this->result);\n\t\t\t\t$this->affected = @mysqli_affected_rows($this->databaseLink);\n\t\t\t} else {\n\t\t\t\t$this->records = 0;\n\t\t\t\t$this->affected = 0;\n\t\t\t}\n\n\t\t\tif($this->records > 0){\n\t\t\t\t$this->arrayResults();\n\t\t\t\treturn $this->arrayedResult;\n\t\t\t}else{\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t}else{\n\t\t\t$this->lastError = mysql_error($this->databaseLink);\n\t\t\techo $this->lastError;\n\t\t\treturn false;\n\t\t}\n\t}",
"protected function & query($sql, $verbose=TRUE) {\n if ( !$mysqliResult = $this->mysqli->query($sql) )\n if ( $verbose ) \n \ttrigger_error ('Query fallita: ' . $this->mysqli->error . ' SQL: ' . $sql);\n $result = new MySQLResult($this,$mysqliResult);\n\t\treturn $result;\n }",
"public function query();",
"public function query();",
"public function query();",
"public static function execute($sql) {\n if (static ::$show_sql) {\n echo $sql . \"\\n\\n\";\n }\n $query = NimbleRecord::execute($sql, true);\n return $query;\n }",
"public function dump()\n {\n $this->composeQuery();\n $result = $this->connection->client()->search($this->queryBody);\n\n dd($result);\n }",
"public function query($query){\n return $this->connection->query($query);\n }",
"public function query($query) {\n\t\t\t$this->sqlError = false;\n\t\t\t$this->sqlErrorNumber = false;\n\t\t\t$this->foundRows = false;\n\t\t\t$this->rowCount = false;\n\t\t\t$this->insertID = false;\n\t\t\tif (substr($query, -1, 1) != ';') $query .= ';';\n\t\t\t$result = mysql_query($query);\n\t\t\tif (mysql_error()) {\n\t\t\t\t$this->sqlError = mysql_error();\n\t\t\t\t$this->sqlErrorNumber = mysql_errno();\n\t\t\t\ttrigger_error('Query Failed: '.$this->sqlError.' <===> Query: '.htmlentities($query), E_USER_ERROR);\n\t\t\t\t$resultObj = new result(false, $this->rowCount, $this->foundRows, $this->insertID, $this->sqlError, $this->sqlErrorNumber);\n\t\t\t\treturn $resultObj;\n\t\t\t} else {\n\t\t\t\t$this->rowCount = strpos($query, 'SELECT') === 0 ? mysql_num_rows($result) : mysql_affected_rows();\n\t\t\t\tif (strpos($query, 'INSERT') === 0) $this->insertID = mysql_insert_id();\n\t\t\t\tif (strpos($query, 'SQL_CALC_FOUND_ROWS') !== false) {\n\t\t\t\t\t$this->foundRows = mysql_result(mysql_query(\"SELECT FOUND_ROWS()\"), 0);\n\t\t\t\t} else {\n\t\t\t\t\t$this->foundRows = $this->rowCount;\n\t\t\t\t}\n\t\t\t\tdebug(htmlentities($query).'<br>Found Rows: '.$this->foundRows.' | Row Count: '.$this->rowCount.' | Insert ID: '.$this->insertID, 'Query Executed', 'echo', 'sql');\n\t\t\t\t$resultObj = new result($result, $this->rowCount, $this->foundRows, $this->insertID, $this->sqlError, $this->sqlErrorNumber);\n\t\t\t\treturn $resultObj;\n\t\t\t}\n\t\t}",
"private function execute () {\n if($this->_query->execute()) {\n\n // It has been succesful so add the output to $this->results and set it as an object\n $this->_results = $this->_query->fetchAll(PDO::FETCH_OBJ);\n\n // Set the affected row count to $this->_count\n $this->_count = $this->_query->rowCount();\n\n } else {\n\n // The query failed so set $this->_error to true. MORE WORK NEEDED HERE\n $this->_error = true;\n\n }\n }",
"function fvls_db_ExecuteQuery($sql){\n\t\tglobal $FLVS_db_link;\n\t\tif( !$FLVS_db_link instanceof MySQLi )\n\t\t\treturn false;\n\n\t\tif ( !($response = $FLVS_db_link->query( $sql ) ) ){\n\t\t\tif( defined('FVLS_DEVELOPER_MODE') && FVLS_DEVELOPER_MODE )\n\t\t\t echo \"FV Link Shortener Error: mySQL Query Error - $FLVS_db_link->error | $sql\\n\";\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $response;\n\t}",
"public function testRunASqlQuery(){\r\n $sql = \"Select * from orders;\";\r\n $db = new database;\r\n $db->connectToDatabase();\r\n $success = $db->runASqlQuery($sql);\r\n $this->assertEquals(true,$success);\r\n }",
"public function get_query_log()\n {\n }",
"function tep_db_query($query){\n\t\tglobal $db;\n\t\treturn($db->Execute($query));\n\t}",
"protected abstract function executeQuery($query);",
"public function hook_query(&$query)\n {\n \n }",
"public function hook_query(&$query)\n {\n \n }",
"function query( $query ) {\n //return false;\n\n\n $return_val = 0;\n $this->flush();\n\n // Log how the function was called\n $this->func_call = \"\\$db->query(\\\"$query\\\")\";\n\n // Keep track of the last query for debug..\n $this->last_query = $query;\n\n if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES )\n $this->timer_start();\n\n $this->result = $this->ezSQL->query($query);\n $this->num_queries++;\n\n if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES )\n $this->queries[] = array( $query, $this->timer_stop() );\n\n /* If there is an error then take note of it..\n if ( $this->last_error = mysql_error( $this->dbh ) ) {\n $this->print_error();\n return false;\n }\n */\n\n if ( preg_match( '/^\\s*(create|alter|truncate|drop) /i', $query ) ) {\n $return_val = $this->result;\n } elseif ( preg_match( '/^\\s*(insert|delete|update|replace) /i', $query ) ) {\n $this->rows_affected = $this->ezSQL->rows_affected;\n // Take note of the insert_id\n if ( preg_match( '/^\\s*(insert|replace) /i', $query ) ) {\n $this->insert_id = $this->ezSQL->insert_id;\n }\n // Return number of rows affected\n $return_val = $this->rows_affected;\n } else {\n $return_val = $this->rows_affected;\n }\n\n return $return_val;\n }",
"abstract public function execute($query);",
"public function executeQuery() \r\n\t{\r\n\t\t$Result = $this->objStatement->execute();\r\n\t\t\r\n\t\tif($Result)\r\n\t\t{\r\n\t\t\t$Result = new DatabaseStatement($this->objStatement);\r\n\t\t}\r\n\t\t\r\n\t\treturn $Result;\r\n\t}",
"public static function query();",
"function query( $query ){\r\n\t\t\r\n\t\tif( ( $query || $query=$this->query ) && !isset( $this->result[$query] ) ){\r\n\t\t\tif( $this->result[$query] = mysql_query( $query, $this->link ) ){\t\r\n\t\t\t\tmysql::$nquery++;\r\n\t\t\t\treturn $this->result[ $this->query = $query ];\r\n\t\t\t}\r\n\t\t\telse{\r\n \t\ttrigger_error( mysql_error($this->link) . \"<br/><font color=\\\"red\\\">$query</font><br/>\", E_USER_ERROR );\r\n \t\t// if debug mode on query error stop the execution\r\n\t \tif( isset($GLOBALS['debug']) && $GLOBALS['debug'] == true )\r\n\t\t \texit;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn $this->result[ $query ];\r\n\t}",
"function execute_query($q)\n{\n\tglobal $spebs_db;\n\t$res = $spebs_db -> query($q);\n\tif($spebs_db->errno != 0)\n\t{\n\t\terror_log(\"QUERY EXECUTE error \".$spebs_db->errno.\": \".$spebs_db->error.\" (Q = \\\"$q\\\")\");\n\t\treturn false;\n\t}\n\treturn $res;\n}",
"function sql_query($query,$dbh=NULL) {\n global $CONF, $SQLCount,$SQL_DBH;\n $SQLCount++;\n//echo '<hr />SQL_DBH: ';\n//print_r($SQL_DBH);\n//echo '<hr />DBH: ';\n//print_r($dbh);\n//echo '<hr />';\n//echo $query.'<hr />';\n $db = (!is_null($dbh) ? $dbh : $SQL_DBH);\n if (is_object($db))\n $res = $db->query($query);\n else\n $res = false;\n if (!$CONF['debug'])\n return $res;\n\n if ($res === false) {\n print(\"SQL error with query $query: \" . '<p />');\n } else if ($res->errorCode() != '00000') {\n $errors = $res->errorInfo();\n print(\"SQL error with query $query: \" . $errors[0].'-'.$errors[1].' '.$errors[2] . '<p />');\n }\n \n return $res;\n }",
"public function query($query){ \n\t\tif($r = $this->mysqli->query($query)){\n\t\t\t$rows = array();\n\t\t\twhile(is_object($r) && $row = $r->fetch_assoc()){\n\t\t\t\t$rows[]= $row;\n\t\t\t}\n\t\t\t$result = new DB_result($rows, $query);\n\t\t\treturn $result;\n\t\t}\n\t\techo $this->mysqli->error . \"<br><br>\";\n\t\tdie(\"{$query}\");\n\n\t}",
"function q($sql,$conn) {\n\t$dev = FALSE;\n\n\t$res =& $conn->query($sql);\n\tif(PEAR::isError($res)) {\n\t\tif($dev) {\n\t\t\techo $res->getMessage().'<br />';\n\t\t\techo '<pre>';\n\t\t\tprint_r($conn->dsn);\n\t\t\techo '</pre>';\n\t\t}\n\t\treturn FALSE;\n\t} else {\n\t\treturn $res;\n\t}\n}",
"public function enableQueryLog()\n {\n $this->loggingQueries = true;\n }",
"function query($query) {\n\t\treturn $this->dbcr_query( $query, true );\n\t}",
"public static function enableQueryLog()\n {\n }",
"public function set_simple_query($query) {\n $this->query = \"\";\n $this->query = $query;\n //print $this->query;\n $this->execute_single_query();\n if(empty($this->err)):\n $this->err = 6;\n $this->msj = \"La transaccion se registro correctamente. \";\n endif; \n \n }",
"public static function query()\n {\n }",
"function execQuery($query){\n\t\ttry {\n\t\t\t\n\t\t\t$pdo = db_init();\n\n\t\t\t$pdo->exec($query);\n\n\t\t} catch (PDOException $e) {\n\t\t\tlogging($_SERVER['PHP_SELF'] . \", 22, Error Executing Query:\". $e->getMessage() .\" ,\" . date(\"Y-m-d\") . \" \" . date(\"h:i:sa\"));\n\t\t}\n\t}",
"private function query($query) {\n $result = $this->connection->query($query);\n if (!$result) {\n throw new DatabaseException(\"Error occurred processing SQL statement '$query': \"\n . $this->connection->error,\n $this->connection->errno);\n }\n\n return $result;\n }",
"public function query($query) {\n\t\t// lazy connect\n\t\t$this->connect();\n\n\t\t$return_val = 0;\n\t\t$this->flush();\n\n\t\t// Keep track of the last query for debug..\n\t\t$this->last_query = $query;\n\n\t\t$mysqli = $this->mysqli;\n\n\t\t$this->result = $mysqli->query($query);\n\t\t$this->num_queries++;\n\n\t\t// If there is an error then throw an exception\n\t\tif ($mysqli->error)\n\t\t\tthrow new HeliumException(HeliumException::db_error, $mysqli->error);\n\n\t\tif ( preg_match( \"/^\\\\s*(insert|delete|update|replace|alter|truncate) /i\", $query ) ) {\n\t\t\t$this->rows_affected = $mysqli->affected_rows;\n\n\t\t\t// Take note of the insert_id\n\t\t\tif ( preg_match( \"/^\\\\s*(insert|replace) /i\", $query ) ) {\n\t\t\t\t$this->insert_id = $mysqli->insert_id;\n\t\t\t}\n\t\t\t// Return number of rows affected\n\t\t\t$return_val = $this->rows_affected;\n\n\t\t}\n\t\telse { // it was a SELECT query\n\t\t\t$i = 0;\n\t\t\twhile ($col_info = $this->result->fetch_field()) {\n\t\t\t\t$this->col_info[$i] = $col_info;\n\t\t\t\t$i++;\n\t\t\t}\n\n\t\t\t$num_rows = 0;\n\t\t\twhile ( $row = $this->result->fetch_object() ) {\n\t\t\t\t$this->last_result[$num_rows] = $row;\n\t\t\t\t$num_rows++;\n\t\t\t}\n\n\t\t\t$this->result->free();\n\n\t\t\t// Log number of rows the query returned\n\t\t\t// and return number of rows selected\n\t\t\t$this->num_rows = $num_rows;\n\t\t\t$return_val = $num_rows;\n\t\t}\n\n\t\treturn $return_val;\n\t}",
"function query() {\n }",
"public function query()\n {\n }",
"public function query()\n {\n }",
"function run_query($sql,$op, $debug){\r\n\t\t\t\tinclude_once 'data_db.php';\r\n\t\t\t\t$db = new PDO('mysql:host='.$servidor.';dbname='.$bd, $usuario_db, $password_db\r\n\t\t\t\t\t\t\t\t, array(\r\n\t\t\t\t\t\t\t\t\t\t// PDO::ATTR_ERRMODE=>PDO::ERRMODE_EXCEPTION\r\n\t\t\t\t\t\t\t\t\t\t PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \\'UTF8\\''\r\n\t\t\t\t\t\t\t\t\t\t, PDO::ATTR_PERSISTENT => false //PDO::ATTR_PERSISTENT => true //al estar persistente genera daño\r\n\t\t\t\t\t\t\t\t\t\t//, PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\"\r\n\t\t\t\t\t\t\t\t\t\t//, PDO::MYSQL_ATTR_INIT_COMMAND => \"SET SESSION collation_connection = 'utf8_unicode_ci'\"\r\n\t\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t );\r\n\t\t\t\t\r\n\t\t\t\tif($debug == 1){\r\n\t\t\t\t\techo \"<pre>\";\r\n\t\t\t\t\t\tprint_r($sql);\r\n\t\t\t\t\techo \"<pre>\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tswitch($op){\r\n\t\t\t\t\tcase 1: /*devuelve un JSON con datos o un JSON con error*/\r\n\t\t\t\t\t\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t$statement = $db->prepare($sql);\r\n\t\t\t\t\t\t\t$statement->execute();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif($debug == 1){\r\n\t\t\t\t\t\t\t\t$statement->debugDumpParams();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$result = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif($debug == 1){\r\n\t\t\t\t\t\t\t\techo \"<pre>\";\r\n\t\t\t\t\t\t\t\t\tprint_r($result);\r\n\t\t\t\t\t\t\t\techo \"<pre>\";\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\tif(count($result) >= 1){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\techo '{\"data\":'. json_encode($result) .'}' ;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t$rw_error['error'] = 'error';\r\n\t\t\t\t\t\t\t\t$myArray[] = $rw_error;\r\n\t\t\t\t\t\t\t\techo '{\"data\":['. implode(',',$myArray) .']}' ;\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\r\n\t\t\t\t\t\t\t$statement = null;\r\n\t\t\t\t\t\t\t$db = null;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}catch(PDOException $e ){\r\n\t\t\t\t\t\t\techo \"Error: \".$e->getMessage();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase 2: /*devuelve el array con datos o devuelve un error*/\r\n\t\t\t\t\t\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t$statement = $db->prepare($sql);\r\n\t\t\t\t\t\t\t$statement->execute();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif($debug == 1){\r\n\t\t\t\t\t\t\t\t$statement->debugDumpParams();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$result = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif($debug == 1){\r\n\t\t\t\t\t\t\t\techo \"<pre>\";\r\n\t\t\t\t\t\t\t\t\tprint_r($result);\r\n\t\t\t\t\t\t\t\techo \"<pre>\";\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\tif(count($result) >= 1){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$result_s = $result;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t$rw_error['error'] = 'error';\r\n\t\t\t\t\t\t\t\t$myArray[] = $rw_error;\r\n\t\t\t\t\t\t\t\t$result_s = $myArray;\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\r\n\t\t\t\t\t\t\t$statement = null;\r\n\t\t\t\t\t\t\t$db = null;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}catch(PDOException $e ){\r\n\t\t\t\t\t\t\techo \"Error: \".$e->getMessage();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\treturn $result_s;\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase 3: /*devuelve la informacion y sin mensaje de error*/\r\n\t\t\t\t\t\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t$statement = $db->prepare($sql);\r\n\t\t\t\t\t\t\t$statement->execute();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif($debug == 1){\r\n\t\t\t\t\t\t\t\t$statement->debugDumpParams();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$result = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif($debug == 1){\r\n\t\t\t\t\t\t\t\techo \"<pre>\";\r\n\t\t\t\t\t\t\t\t\tprint_r($result);\r\n\t\t\t\t\t\t\t\techo \"<pre>\";\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\tif(count($result) >= 1){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$result_s = $result;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$result_s = array();\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\r\n\t\t\t\t\t\t\t$statement = null;\r\n\t\t\t\t\t\t\t$db = null;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}catch(PDOException $e ){\r\n\t\t\t\t\t\t\techo \"Error: \".$e->getMessage();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\treturn $result_s;\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}",
"public function ejecutar_una_consulta($query){\n $response=self::ConnectDB()->prepare($query);\n $response->execute();\n return $response;\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 }"
] | [
"0.67332107",
"0.67195904",
"0.66700304",
"0.64472026",
"0.6435239",
"0.6428209",
"0.63536006",
"0.6341092",
"0.63402104",
"0.63164425",
"0.6301908",
"0.63003266",
"0.62771124",
"0.6272097",
"0.6268642",
"0.62641454",
"0.62490714",
"0.62346864",
"0.6230715",
"0.6230699",
"0.62205213",
"0.6205605",
"0.61894596",
"0.6177627",
"0.61590785",
"0.6156448",
"0.6152474",
"0.6132868",
"0.61267906",
"0.6122988",
"0.61200726",
"0.61181897",
"0.61141133",
"0.611202",
"0.609919",
"0.60983634",
"0.6083347",
"0.60735804",
"0.6073491",
"0.60668224",
"0.6065163",
"0.6055579",
"0.6048714",
"0.60430527",
"0.6038402",
"0.60358024",
"0.60358024",
"0.6025171",
"0.60204613",
"0.6014188",
"0.6008298",
"0.59957856",
"0.59935594",
"0.5982182",
"0.5977102",
"0.59746546",
"0.59701204",
"0.5970111",
"0.59667283",
"0.5954253",
"0.5930993",
"0.5930993",
"0.5930993",
"0.5918536",
"0.5911842",
"0.5910838",
"0.5900796",
"0.5897657",
"0.5882404",
"0.588172",
"0.58790284",
"0.5878775",
"0.5877576",
"0.5874928",
"0.5874928",
"0.58733183",
"0.5872182",
"0.58664334",
"0.58652717",
"0.58586943",
"0.585776",
"0.58573526",
"0.5855767",
"0.5854161",
"0.5853878",
"0.58500147",
"0.5845921",
"0.5841127",
"0.5834609",
"0.583084",
"0.5829131",
"0.5828779",
"0.58267754",
"0.5822525",
"0.5822525",
"0.58181673",
"0.58174187",
"0.5809748",
"0.5809748",
"0.5809748"
] | 0.7498202 | 0 |
Find all foreign UIDs from a mm relation. The direction in extbase is not bidirectional. You can configure a bidirectional relation about tca configuration | protected function findUidByForeign($foreign, $table) {
$in = [];
$uid = [];
// we working only with a Traversable items
if($foreign instanceof \TYPO3\CMS\Extbase\DomainObject\AbstractEntity) {
$entity = clone $foreign;
$foreign = [$entity];
}
foreach($foreign as $key) {
if($key instanceof \TYPO3\CMS\Extbase\DomainObject\AbstractEntity) {
$in[] = (int) $key->getUid();
} else {
$in[] = (int) $key;
}
}
foreach($GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
$table . '.uid_foreign AS uid',
$table,
$table . '.uid_local IN (' . implode(',', $in) . ')'
) as $row) {
$uid[] = (int) $row['uid'];
}
return $uid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getResolveForeignIdFields();",
"public function getForeignReferList()\n\t{\n\t\treturn Yii::app()->db->createCommand()->select('code as key, printable_name as title')->from(self::tableName())->queryAll();\n\t}",
"public function findForeignIDs($model) \r\n {\r\n foreach($model->hasAndBelongsToMany as $assocKey => $assocData) {\r\n $assocModel = $model->{$assocData['className']};\r\n $field = Inflector::underscore($model->name) . '_count';\r\n if ($assocModel->hasField($field)) {\r\n $joinModel = $model->{$assocData['with']};\r\n $joinIDs = $joinModel->find('all', array(\r\n 'fields' => array(\r\n $assocData['associationForeignKey']\r\n ) ,\r\n 'conditions' => array(\r\n $assocData['foreignKey'] => $model->id\r\n ) ,\r\n 'group' => $assocData['associationForeignKey']\r\n ));\r\n $this->foreignTableIDs[$assocData['className']] = array_keys(Set::combine($joinIDs, '{n}.' . $assocData['with'] . '.' . $assocData['associationForeignKey']));\r\n }\r\n }\r\n }",
"function taminoGetIds() {\n $rval = $this->tamino->xquery($this->xquery);\n if ($rval) { // tamino Error\n print \"<p>LinkCollection Error: failed to retrieve linkRecord id list.<br>\";\n print \"(Tamino error code $rval)</p>\";\n } else { \n // convert xml ids into a php array \n $this->ids = array();\n $this->xml_result = $this->tamino->xml->getBranches(\"ino:response/xq:result\");\n if ($this->xml_result) {\n\t// Cycle through all of the branches \n\tforeach ($this->xml_result as $branch) {\n\t if ($att = $branch->getTagAttribute(\"id\", \"xq:attribute\")) {\n\t array_push($this->ids, $att);\n\t }\n\t} /* end foreach */\n } \n }\n\n }",
"public function getRelationList();",
"public function getRelatedIds()\n {\n $related = $this->getRelated ();\n $fullKey = $related->getQualifiedKeyName ();\n return $this->getQuery ()->select ( $fullKey )->lists ( $related->getKeyName () );\n }",
"public function getRelations();",
"public function getRelations();",
"public function getRelationChildRealId();",
"public function Fetch_References_For_Ext_Coll($application_id)\n\t{\n\t\t$query = \"\n\t\t\tSELECT\n\t\t\t\tpr.name_full AS referencename,\n\t\t\t\tpr.relationship AS referencerelationship,\n\t\t\t\tpr.phone_home AS referencephone\n\t\t\tFROM personal_reference AS pr\n\t\t\tWHERE pr.application_id = ?\n\t\t\tLIMIT 2\n\t\t\";\n\t\t$st = $this->db->queryPrepared($query, array($application_id));\n\t\treturn $st->fetchAll(PDO::FETCH_ASSOC);\n\t}",
"private function getForeignKeysInformations(UniqueObject $database) {\n\t\tswitch ($database->getValue('DBMS')) {\n\t\t\tcase 'mysql': \n\t\t\t\treturn $this->getMySqlForeignKeys($database);\n\t\t\tcase 'pgsql':\n\t\t\t\treturn $this->getPostgresForeignKeys($database);\n\t\t\tdefault:\n\t\t\t\tthrow new \\Exception(\"DBMS '{$database->getValue('DBMS')}' not managed\");\n\t\t}\n\t}",
"public function getForeignKeys(){\n \n }",
"public function findrelation(){\n\t\t$famid = \\Input::get('fid'); \n\t\t$memid1 = \\Input::get('rfid1');\n\t\t$memid2 = \\Input::get('rfid2');\n\t\tMisc::isfam_valid($famid,\"Show\");\n\n\t\tif($memid1 == $memid2) return \\Response::make(\"SELF\");\n\t\t$famgraph = new FamilyGraph($famid);\n \t \t\n \t \t$relation = $famgraph->FindRelationsBetween($memid1,$memid2) ;\n \t \treturn \\Response::make(Misc::get_relation_in_mylang($relation) );\n\t}",
"protected static function _relations() {\n\n\t}",
"public function getReverseEngineeringRelicIDs()\n {\n return $this->reverseEngineeredFromRelicIDs;\n }",
"public function getForeignKeys()\n {\n $return = [];\n $table = $this->getName();\n\n /** @var Base $call */\n foreach ($this->getGenericCalls() as $call) {\n if (isset($call->on) && $call->on !== $table) {\n $return[(string)$call->on] = $call;\n } // if\n } // foreach\n\n return $return;\n }",
"public function getUids()\n {\n return $this->map(\n function (RecordInterface $model) {\n return $model->getUid();\n }\n )->toArray();\n }",
"function get_foreigners($entity, $joins){\n //\n //let $foreigns be the array of foreigners to be returned \n $foreigns=[];\n //\n //Get the already existing join entities and store them in an array \n //$join_entities\n $join_entities=[];\n //\n //Test if there are joins already formulated if none push this entity \n if(empty($joins)){\n array_push($join_entities, $this->entity);\n }\n //\n //There are joins already existing \n foreach ($joins as $join){\n //\n //Push all the entities to the join entities\n array_push($join_entities, $this->entity);\n array_push($join_entities, $join->entity);\n }\n //\n //Get the columns that reference the given entity\n foreach ($join_entities as $entity1){\n //\n //Get the first index\n $index1= array_values($entity1->indices)[0];\n //\n //loop through indices to retrieve the column foreigns\n foreach ($index1 as $cname){\n $column= $entity1->columns[$cname];\n //\n //Test if is an instance of column foreign\n if($column instanceof \\column_foreign){\n //\n //Get the referenced entity \n $entity2=$this->entity->dbase->entities[$column->ref_table_name];\n //\n //Test if entity2 is similar to the given entity\n if ($entity2===$entity){\n //\n //push the column to the foreigns\n array_push($foreigns, $column);\n }\n }\n } \n //\n //Get the entities being refereced by the given entity\n $index= array_values($entity->indices)[0];\n //\n //loop through indices to retrieve the column foreigns\n foreach ($index as $cname){\n $column= $entity->columns[$cname];\n //\n //Test if is an instance of column foreign\n if($column instanceof column_foreign){\n //\n //Get the referenced entity \n $entity2=$this->dbase->entities[$column->ref_table_name];\n //\n //Test if entity2 is similar any entity referenced\n if ($entity2===$entity1){\n //\n //push the column to the foreigns\n array_push($foreigns, $column);\n }\n }\n }\n }\n return $foreigns;\n }",
"public function getReferenceIdsList(){\n return $this->_get(2);\n }",
"public abstract function getCustomizedRelationList();",
"function userconnection_frnd_relationship($path_array) {\r\n\tglobal $setting, $database;\r\n\t$temp =-1;\r\n\tforeach ($path_array as $key) {\r\n\t\t$query = $database->database_query(\"SELECT friend_type FROM se_friends WHERE friend_user_id1 = $temp AND friend_user_id2 = $key \");\r\n\t\t $temp = $key;\r\n\t\t while($ee = $database->database_fetch_assoc($query)) {\r\n\t\t \t$relation[] = $ee['friend_type'];\r\n\t\t }\r\n\t}\r\n return $relation;\r\n}",
"public function relationNames()\n {\n return [\n 'immobilien',\n 'kunde'\n ];\n }",
"public static function getRelationHandlerResolvedItems(\n array $fieldTcaConfiguration,\n int $mmUid,\n string $currentTable = ProductRepository::TABLE_NAME\n ): array {\n $foreignTable = $fieldTcaConfiguration['foreign_table'];\n\n /** @var RelationHandler $relationHandler */\n $relationHandler = GeneralUtility::makeInstance(RelationHandler::class);\n $relationHandler->start(\n '',\n $foreignTable,\n '',\n $mmUid,\n $currentTable,\n $fieldTcaConfiguration\n );\n $relationHandler->getFromDB();\n\n return $relationHandler->getResolvedItemArray();\n }",
"public function relations($setId){\n $attributes = Mage :: getModel('catalog/product')->getResource()->loadAllAttributes()->getSortedAttributes($setId);\n $result = array ();\n foreach ($attributes as $attribute){\n $result[] = Array(\n 'attribute_id' => $attribute->getId()\n );\n }\n return $result;\n\n }",
"abstract function relations();",
"public function relationNames()\n {\n return [];\n }",
"public abstract function get_ids();",
"public function relationNames()\n {\n return [\n 'detailbeasiswas'\n ];\n }",
"private function get_rel_id($to_big) {\n\n\t\t$stm = $this->db()->prepare(\n\t\t\t'select \"id\"\n\t\t\tfrom \"member_rels\"\n\t\t\twhere (\"member1_big\" = :from_big and \"member2_big\" = :to_big)\n\t\t\t\tor (\"member2_big\" = :from_big and \"member1_big\" = :to_big)\n\t\t\tlimit 1'\n\t\t);\n\t\t$stm->execute(array(\n\t\t\t':from_big'\t=> $this->member_big,\n\t\t\t':to_big'\t=> $to_big,\n\t\t));\n\t\t$rel_id = $stm->fetch(PDO::FETCH_ASSOC);\n\t\treturn $rel_id['id'];\n\n\t}",
"function getForeignKeysToModel($model)\n {\n $keys = array();\n foreach ($this->_cols as $col=>$val) {\n $field = new $val['type']();\n if ($field->type == 'foreignkey' and $val['model'] == $model) {\n $keys[$col] = $val;\n }\n }\n return $keys;\n }",
"public function getForeignKeys()\n {\n return $this->parentTable->getColumnForeignKeys($this->name);\n }",
"public function getForeignId()\r\n {\r\n return null;\r\n }",
"function get_following_ids()\n {\n $user = $this->ion_auth->get_user();\n\n $query_string = \"SELECT follow_id FROM friend_relationships WHERE user_id = ?\";\n $query = $this->db->query($query_string, array($user->id));\n\n $return_array = array();\n foreach ($query->result() as $row)\n {\n $return_array[] = $row->follow_id;\n }\n\n return $return_array;\n }",
"public function listForeignKeys($table) {\r\n\t\tswitch ($this->getDbtype()) {\r\n\t\t\tcase 'mysql':\r\n\t\t\t\t$meta = array();\r\n\t\t\t\tforeach ($this->loadKeys() as $info) {\r\n\t\t\t\t\tif ($info['table_name'] === $table) {\r\n\t\t\t\t\t\t$meta[] = array(\r\n\t\t\t\t\t\t\t'table' => $info['table_name'],\r\n\t\t\t\t\t\t\t'column' => $info['column_name'],\r\n\t\t\t\t\t\t\t'referenced_table' => $info['referenced_table_name'],\r\n\t\t\t\t\t\t\t'referenced_column' => $info['referenced_column_name'],\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\treturn $meta;\r\n\t\t\tcase 'pgsql':\r\n\t\t\t\tlist($schema, $table) = stristr($table, '.') ? explode(\".\", $table) : array('public', $table);\r\n\t\t\t\t$result = $this->query(\r\n\t\t\t\t\t\t\"SELECT kcu.column_name AS column_name, ccu.table_name AS referenced_table_name, ccu.column_name AS referenced_column_name \r\n FROM information_schema.table_constraints AS tc JOIN information_schema.key_column_usage AS kcu ON tc.constraint_name = kcu.constraint_name\r\n JOIN information_schema.constraint_column_usage AS ccu ON ccu.constraint_name = tc.constraint_name WHERE constraint_type = 'FOREIGN KEY' \r\n AND tc.table_name='\" . $table . \"' AND tc.table_schema = '\" . $schema . \"'\");\r\n\t\t\t\t$result->setFetchMode(PDO::FETCH_ASSOC);\r\n\t\t\t\t$meta = array();\r\n\t\t\t\tforeach ($result as $row) {\r\n\t\t\t\t\t$meta[] = array(\r\n\t\t\t\t\t\t'table' => $table,\r\n\t\t\t\t\t\t'column' => $row['column_name'],\r\n\t\t\t\t\t\t'referenced_table' => $row['referenced_table_name'],\r\n\t\t\t\t\t\t'referenced_column' => $row['referenced_column_name'],\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t\treturn $meta;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'sqlite':\r\n\t\t\t\t$sql = \"PRAGMA foreign_key_list(\" . $this->quote($table) . \")\";\r\n\t\t\t\t$result = $this->query($sql);\r\n\t\t\t\t$result->setFetchMode(PDO::FETCH_ASSOC);\r\n\t\t\t\t$meta = array();\r\n\t\t\t\tforeach ($result as $row) {\r\n\t\t\t\t\t$meta[] = array(\r\n\t\t\t\t\t\t'table' => $table,\r\n\t\t\t\t\t\t'column' => $row['from'],\r\n\t\t\t\t\t\t'referenced_table' => $row['table'],\r\n\t\t\t\t\t\t'referenced_column' => $row['to'],\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t\treturn $meta;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tthrow new Exception('Unsupported database : ' . $this->getDbtype());\r\n\t\t}\r\n\t}",
"public function getICRelations($icid) {\n $result = $this->connector->run(\"MATCH (:Identity {id: '{$icid}'})-[:ICRELATION]-(i:Identity) return i.id, i.entity_type, i.name;\");\n $relations = [];\n foreach ($result->getRecords() as $record) {\n $relations[] = [ \"id\" => $record->get(\"i.id\"),\n \"entity_type\" => $record->get(\"i.entity_type\"),\n \"name\" => $record->get(\"i.name\")\n ];\n }\n return $relations;\n }",
"public function getForeignReferList($isNullable = false, $is4Filter = false)\r\n \t{\r\n \t\t$language = Yii::app()->language;\r\n\r\n \t\tif ($is4Filter) {\r\n \t\t\t$isNullable = false;\r\n \t\t}\r\n \t\tif ($isNullable) {\r\n \t\t\t$result[] = array('key' => '', 'title' => '');\r\n \t\t}\r\n \t\t$result = Yii::app()->db->createCommand()->select('id as key, title as title')->from(self::tableName())->queryAll();\r\n \t\tif ($is4Filter) {\r\n \t\t\t$newResult = array();\r\n \t\t\tforeach ($result as $r) {\r\n \t\t\t\t$newResult[$r['key']] = $r['title'];\r\n \t\t\t}\r\n\r\n \t\t\treturn $newResult;\r\n \t\t}\r\n\r\n \t\treturn $result;\r\n \t}",
"public function getFriendIds(){\r\n\t\treturn $this->callGraph(array(\r\n\t\t\t'method' => 'friends_get'\r\n\t\t), 'get_friend_ids');\r\n\t}",
"public function getRelAll ()\n {\n \treturn ($this->db_object->getRowsAll (\"Select * from \".$this->table_prefix.$this->quiz_tables['rel']));\n }",
"public function getDisplay_relations()\r\n {\r\n return $this->m_display_relations;\r\n }",
"public function getAllIds();",
"public function getRelations($tableName)\n {\n $sqlStm = \"SELECT REFERENCED_TABLE_NAME as tableName, REFERENCED_COLUMN_NAME as foreignColumnName,\n COLUMN_NAME as localColumnName\n FROM information_schema.key_column_usage \n WHERE TABLE_NAME = ? AND CONSTRAINT_NAME != 'PRIMARY'\";\n \n $query = new DataQuery($sqlStm);\n $params = array();\n $params[] = new DataParameter('tableName', DataParameter::TYPE_VARCHAR , $tableName);\n return $this->query($query, $params);\n }",
"function database_relations_to_array($fingerPrints)\n{\n\n\t$allRelations = array();\n\n\n\tforeach ($fingerPrints as $value) {\n\t\t$relations = array();\n\t\tforeach ($value as $value_2) {\n\t\t\tforeach ($value as $value_3) {\n\t\t\t\tif (($value_2 != $value_3) and \n\t\t\t\t\t(array_key_exists($value_2->get_mac().\"-\".$value_3->get_mac(), \n\t\t\t\t\t$relations)==FALSE) and\n\t\t\t\t\t(array_key_exists($value_3->get_mac().\"-\".$value_2->get_mac(),\n\t\t\t\t\t$relations) == FALSE)) {\n\n\t\t\t\t\t$abso_value_2 = abs($value_2->get_average());\n\t\t\t\t\t$abso_value_3 = abs($value_3->get_average());\n\t\t\t\t\n\t\t\t\t\tif ($abso_value_2 < 54) {\n\n\t\t\t\t\t\t$x = 5.0* (pow(10, (($abso_value_2 - 54.0)/20.0)));\n\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\n\t\t\t\t\t\t$x = 5.0* (pow(10, (($abso_value_2 - 54.0)/35.0)));\n\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($abso_value_3 < 54) {\n\n\t\t\t\t\t\t$y = 5.0* (pow(10, (($abso_value_3 - 54.0)/20.0)));\n\n\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\n\t\t\t\t\t\t$y = 5.0* (pow(10, (($abso_value_3 - 54.0)/35.0)));\n\n\t\t\t\t\t}\n\n\n\n\n\t\t\t\t\t$relations[$value_2->get_mac() . \"-\" . $value_3->get_mac()] = $x - $y;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t$fprintRelations = new FprintRelations($value_2->get_room(), $value_2->get_position(), $relations);\n\t\tarray_push($allRelations, $fprintRelations);\n\t}\n\n\n\treturn $allRelations;\n\n\n}",
"abstract public static function relations() : ? array;",
"function exportForeignMints($silent=false) {\n $hasSeen = [];\n \n $mints = getForeignMints();\n $ids = array();\n \n\n foreach($mints as $mint) {\n $overwrite = true;\n if (array_key_exists($mint['abbreviation'], $hasSeen)) {\n $overwrite = false;\n }\n $output = exportForeignMint($mint['id'], $overwrite);\n $hasSeen[$mint['abbreviation']] = 1;\n \n if (!$silent) {\n print_r($output);\n echo \"<br /><br />\";\n }\n }\n}",
"public function relations()\n\t{\n\t\tYii::import('application.modules.profile.models.*');\n\n\t\t//$relations = Yii::app()->cache->get('yum_user_relations');\n $relations=false;\n\t\tif($relations === false) {\n\t\t\t$relations = array();\n\n\t\t\t\t\t\n\n\t\t\tif (Yum::hasModule('profile')) {\n\t\t\t\t$relations['visits'] = array(\n\t\t\t\t\t\tself::HAS_MANY, 'YumProfileVisit', 'visited_id');\n\t\t\t\t$relations['visited'] = array(\n\t\t\t\t\t\tself::HAS_MANY, 'YumProfileVisit', 'visitor_id');\n\t\t\t\t$relations['profile'] = array(\n\t\t\t\t\t\tself::HAS_ONE, 'YumProfile', 'user_id');\n\t\t\t\t$relations['privacy'] = array(\n\t\t\t\t\t\tself::HAS_ONE, 'YumPrivacySetting', 'user_id');\n\t\t\t}\n \n $relations['role'] = array(\n\t\t\t\t\t\tself::MANY_MANY, 'Role',\n\t\t\t\t\t\t UserRole::model()->tableName().'(user_id, role_id)');\n \n\t\t\tYii::app()->cache->set('yum_user_relations', $relations, 3600);\n\t\t}\n\n\t\treturn $relations;\n\t}",
"function getUserIds() {\n\t\t$charIds = $this->getCharIds();\n\t\t$idsToReturn = array();\n\t\tforeach ($charIds as $id) {\n\t\t\n\t\t\t$idsToReturn[] = getOneThing(\"playedby\", \"gamestate_characters\", \"id=$id and gameid=$this->gameId\");\n\t\t\n\t\t}\n\t\tdbug(\"getUserIds is about to return \".implode(\", \", $idsToReturn));\n\t\treturn $idsToReturn;\n\t}",
"static public function setRelationCoef() {\n $link_db = Piwidict::getDatabaseConnection();\n \n $rk = array();\n $query = \"SELECT id, name FROM relation_type\";\n $res = $link_db -> query_e($query,\"Query failed in file <b>\".__FILE__.\"</b>, string <b>\".__LINE__.\"</b>\");\n\n while ($row = $res->fetch_object()){\n// if ($row->name == 'synonyms') \n if ($row->name != 'synonyms') \n\t $rk[$row->id] = 1;\n\t else \t\n\t $rk[$row->id] = 0.5;\n } \n return $rk;\n }",
"public function relationNames()\n {\n return [\n 'educador',\n 'user',\n 'planoEducadorLicencas'\n ];\n }",
"public function getRelationChildId();",
"public function activityForeignId();",
"public function getForeignReferList($isNullable = false, $is4Filter = false)\n \t{\n \t\t$language = Yii::app()->language;\n\n \t\tif ($is4Filter) {\n \t\t\t$isNullable = false;\n \t\t}\n \t\tif ($isNullable) {\n \t\t\t$result[] = array('key' => '', 'title' => '');\n \t\t}\n \t\t$result = Yii::app()->db->createCommand()->select('id as key, title as title')->from(self::tableName())->queryAll();\n \t\tif ($is4Filter) {\n \t\t\t$newResult = array();\n \t\t\tforeach ($result as $r) {\n \t\t\t\t$newResult[$r['key']] = $r['title'];\n \t\t\t}\n\n \t\t\treturn $newResult;\n \t\t}\n\n \t\treturn $result;\n \t}",
"public function relationNames()\n {\n return [\n 'akumulasiPoint',\n 'sanksi',\n 'siswa'\n ];\n }",
"public function listReferences()\n {\n $schema = $this->fetchDatabase();\n\n $references = $this->fetchAll(\"SELECT\n kcu.referenced_table_name, \n kcu.referenced_column_name,\n kcu.table_name AS foreign_table_name, \n kcu.column_name AS foreign_column_name, \n kcu.constraint_name\n FROM\n information_schema.key_column_usage kcu\n WHERE\n kcu.referenced_table_name IS NOT NULL\n AND kcu.table_schema = '{$schema}'\n ORDER BY kcu.referenced_table_name, kcu.referenced_column_name\n \");\n\n $grouped = [];\n foreach ($references as $reference) {\n $grouped[$reference['referenced_table_name']][] = $reference;\n }\n\n return $grouped;\n }",
"function GetFids($uid)\n{\n\t$result = mysql_query(\"SELECT id FROM files WHERE uid='$uid' AND deleted=false ORDER BY `id` ASC\") or die('cant get fids');\n\t$rows = array();\n\twhile($row = mysql_fetch_row($result)) {\n\t\t$rows[] = $row[0];\n\t}\n\treturn $rows;\n}",
"public function relationNames()\r\n {\r\n return [\n 'vendas'\n ];\r\n }",
"protected function getRelationsAlias()\n\t{\n\t\t$method = 'get' . ucfirst($this->actionName === 'index' ? 'list' : $this->actionName) . 'Display';\n\t\tif(!method_exists($this->configuration, $method))\n\t\t{\n\t\t\t$method = 'getFormDisplay';\n\t\t}\n\t\t$fieldsets = $this->configuration->$method();\n\t\tswitch($this->actionName)\n\t\t{\n\t\t\tcase 'filter':\n\t\t\t\t$fieldsets = $this->configuration->getFilterDisplay();\n\t\t\t\tbreak;\n\t\t\tcase 'index':\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$fieldsets = array_merge($fieldsets, $this->configuration->getFormDisplay());\n\t\t\t\tbreak;\n\t\t}\n\t\t$relations = array();\n\n\t\tswitch($this->actionName)\n\t\t{\n\t\t\tcase 'filter':\n\t\t\t\treturn $this->doGetRelations($fieldsets);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tforeach($fieldsets as $fieldset=>$fields)\n\t\t\t\t{\n\t\t\t\t\tif(!is_array($fields)){\n\t\t\t\t\t\treturn $this->doGetRelations($fieldsets);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$relations = array_merge($relations, $this->doGetRelations($fields));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\treturn array_unique(array_diff($relations, array_keys($this->getDmModule()->getTable()->getRelationHolder()->getLocals())));\n\t}",
"protected function getRelations()\n {\n return array();\n }",
"function d4os_io_db_070_os_user_get_all_uid() {\n $list = array();\n $result = db_query(\"SELECT * FROM {d4os_ui_users}\");\n while ($user = db_fetch_object($result)) {\n $list[] = $user;\n }\n return $list;\n}",
"public function getRelations()\n {\n $out = array();\n foreach($this->_map as $bind => $field)\n {\n if(is_array($field) && isset($field[self::MAP_TYPE]) && in_array($field[self::MAP_TYPE],\n self::$_relationTypes))\n {\n $out[$bind] = $field;\n }\n }\n return $out;\n }",
"private static function relations()\n {\n $files = ['OneToOne', 'OneToMany', 'ManyToMany', 'BelongsTo'];\n $folder = static::$root.'MVC/Relations'.'/';\n\n self::call($files, $folder);\n\n $files = ['ManyRelationException', 'ModelNotFindedException'];\n $folder = static::$root.'MVC/Relations/Exceptions'.'/';\n\n self::call($files, $folder);\n }",
"public function &getForeignKeyMap($name)\n\t{\n\t\tif (!isset($this->relations[$name]))\n\t\t{\n\t\t\tthrow new DataModel\\Relation\\Exception\\RelationNotFound(\"Relation '$name' not found\");\n\t\t}\n\n\t\treturn $this->relations[$name]->getForeignKeyMap();\n\t}",
"public function relations()\n {\n return array(\n 'business' => array(self::BELONGS_TO, 'User', 'businessId'),\n );\n }",
"public function getFkImobiliarioUnidadeAutonoma()\n {\n return $this->fkImobiliarioUnidadeAutonoma;\n }",
"public function getLesIdFrais()\n {\n $requetePrepare = PdoGsb::$monPdo->prepare(//Cette requête classe les idFrais par id\n 'SELECT fraisforfait.id as idfrais '\n . 'FROM fraisforfait ORDER BY fraisforfait.id'\n );\n $requetePrepare->execute();\n return $requetePrepare->fetchAll();\n }",
"public function buildRelations()\n\t{\n\t\t$this->addRelation('AmistadRelatedById_usuario', 'Amistad', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'AmistadsRelatedById_usuario');\n\t\t$this->addRelation('AmistadRelatedByid_usuarioamigo', 'Amistad', RelationMap::ONE_TO_MANY, array('id' => 'id_usuarioamigo', ), null, null, 'AmistadsRelatedByid_usuarioamigo');\n\t\t$this->addRelation('Calificacion', 'Calificacion', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'Calificacions');\n\t\t$this->addRelation('Comentario', 'Comentario', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'Comentarios');\n\t\t$this->addRelation('LibroRelatedByUsuario_ult_acc', 'Libro', RelationMap::ONE_TO_MANY, array('id' => 'usuario_ult_acc', ), null, null, 'LibrosRelatedByUsuario_ult_acc');\n\t\t$this->addRelation('LibroRelatedById_usuario', 'Libro', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'LibrosRelatedById_usuario');\n\t\t$this->addRelation('Usuario_intereses', 'Usuario_intereses', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'Usuario_interesess');\n\t\t$this->addRelation('Lista', 'Lista', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'Listas');\n\t\t$this->addRelation('Libro_colaborador', 'Libro_colaborador', RelationMap::ONE_TO_MANY, array('id' => 'idusuario', ), null, null, 'Libro_colaboradors');\n\t\t$this->addRelation('Libro_version', 'Libro_version', RelationMap::ONE_TO_MANY, array('id' => 'idusuario', ), null, null, 'Libro_versions');\n\t\t$this->addRelation('MensajeRelatedById_usuario_destinatario', 'Mensaje', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario_destinatario', ), null, null, 'MensajesRelatedById_usuario_destinatario');\n\t\t$this->addRelation('MensajeRelatedById_usuario_remitente', 'Mensaje', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario_remitente', ), null, null, 'MensajesRelatedById_usuario_remitente');\n\t\t$this->addRelation('NotificacionRelatedById_emisor', 'Notificacion', RelationMap::ONE_TO_MANY, array('id' => 'id_emisor', ), null, null, 'NotificacionsRelatedById_emisor');\n\t\t$this->addRelation('NotificacionRelatedById_receptor', 'Notificacion', RelationMap::ONE_TO_MANY, array('id' => 'id_receptor', ), null, null, 'NotificacionsRelatedById_receptor');\n\t\t$this->addRelation('Solicitud_amistadRelatedById_usuario_solicitado', 'Solicitud_amistad', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario_solicitado', ), null, null, 'Solicitud_amistadsRelatedById_usuario_solicitado');\n\t\t$this->addRelation('Solicitud_amistadRelatedById_usuario_solicitante', 'Solicitud_amistad', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario_solicitante', ), null, null, 'Solicitud_amistadsRelatedById_usuario_solicitante');\n\t\t$this->addRelation('Solicitud', 'Solicitud', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario_solicitante', ), null, null, 'Solicituds');\n\t\t$this->addRelation('Postulantes', 'Postulantes', RelationMap::ONE_TO_MANY, array('id' => 'id_postulante', ), null, null, 'Postulantess');\n\t}",
"private function set_relation_joins() {\n if(!$this->use_relations) return;\n $relations = [];\n foreach ($this->colmodel as $i => $col) {\n if (!isset($col['relation']))\n continue;\n foreach (explode('>', $col['relation']) as $relation) {\n if (!str_contains($relation, '.'))\n continue;\n list($model_name, $relation_name) = explode('.', $relation);\n if ($relation_name != '' && !in_array($relation, $relations)) {\n $this->set_relation_join($model_name, $relation_name);\n $relations[] = $relation;\n }\n }\n }\n }",
"public function getForeignKeys()\n {\n if ($this->foreign_keys_cache === null) {\n $query = $this->db_instance->query('SELECT table_name, column_name, referenced_table_name, referenced_column_name from information_schema.key_column_usage where referenced_table_name is not null');\n $foreign_keys_a = $query->result_array();\n $this->foreign_keys_cache = array();\n\n foreach ($foreign_keys_a as $key) {\n foreach ($key as $key_key => $key_value){\n $key[strtolower($key_key)] = $key_value;\n }\n $this->foreign_keys_cache[$key['table_name']][$key['column_name']] = array($key['referenced_table_name'], $key['referenced_column_name']);\n }\n }\n\n return $this->foreign_keys_cache;\n }",
"private function collectNLAIdentifiers()\n {\n // find all records that has an nla identifier\n $this->log(\"Fetching all records which are related to NLA identifiers or have an NLA party identifier...\");\n\n $prefix = $this->config['party']['prefix'];\n\n $this->nlaIdentifiers = [];\n\n // has nla identifier\n $identifiers = Identifier::where('identifier', 'like', \"%{$prefix}%\")->pluck('identifier')->unique()->values()->toArray();\n $this->nlaIdentifiers = array_merge($this->nlaIdentifiers, $identifiers);\n $count = count($identifiers);\n $this->log(\"NLA identifier(s): {$count}\");\n\n // directly relates to nla identifier\n $identifiers = Relationship::where('related_object_key', 'like', \"%{$prefix}%\")->pluck('related_object_key')->unique()->values()->toArray();\n $this->nlaIdentifiers = array_merge($this->nlaIdentifiers, $identifiers);\n $count = count($identifiers);\n $this->log(\"Related Object NLA Identifier(s): {$count}\");\n\n // has related info parties\n $identifiers = IdentifierRelationship::where('related_object_identifier', 'like', \"%{$prefix}%\")->pluck('related_object_identifier')->unique()->values()->toArray();\n $this->nlaIdentifiers = array_merge($this->nlaIdentifiers, $identifiers);\n $count = count($identifiers);\n $this->log(\"Related Info NLA Identifier(s): {$count}\");\n\n $this->nlaIdentifiers = array_values(array_unique($this->nlaIdentifiers));\n }",
"public function getRelationsFromConfig()\n {\n $conf = $this->getConf();\n $rel = $conf->getVal('issue_relations', IDF_Form_IssueTrackingConf::init_relations);\n $relations = array();\n foreach (preg_split(\"/\\015\\012|\\015|\\012/\", $rel, -1, PREG_SPLIT_NO_EMPTY) as $s) {\n $verbs = preg_split(\"/\\s*,\\s*/\", $s, 2);\n if (count($verbs) == 1)\n $relations += array($verbs[0] => $verbs[0]);\n else\n $relations += array($verbs[0] => $verbs[1], $verbs[1] => $verbs[0]);\n }\n return $relations;\n }",
"public function getMutualFriends($uid_them){\r\n\t\treturn $this->callGraph('/me/mutualfriends/'.$uid_them);\r\n\t}",
"public function relationNames()\n {\n return [\n 'siswa'\n ];\n }",
"public function relationNames()\r\n {\r\n return [\r\n 'kelas',\r\n 'siswa'\r\n ];\r\n }",
"public function relationNames()\n {\n return [\n 'pegawais'\n ];\n }",
"function get_unidades_medida($id_unidade_medida)\n {\n return $this->db->get_where('unidades_medida',array('id_unidade_medida'=>$id_unidade_medida))->row_array();\n }",
"public function relations() {\n\t\t return array(\n\t\t\t\t 'account' => array('type' => self::BELONGS_TO, 'model' => 'GO\\Email\\Model\\Account', 'field' => 'account_id')\n\t\t );\n\t }",
"function get_user_relationships() {\n\t$policy = new Config;\n\treturn $policy->getUserRelationships();\n}",
"public function getAllIds(): array;",
"public function getForeignEntityNames()\n {\n return $this->foreignEntityNames;\n }",
"function get_tables_fk()\n\t{\n\t\t$tables_fk\t=\tarray();\n\t\t$fields\t\t=\t$this->_get_fields();\n\t\tforeach ( $fields as $field )\n\t\t{\n\t\t\t$column_name\t= $field->name;\n\t\t\tif ( strpos( $column_name, '_id_' ) != 0 )\n\t\t\t{\n\t\t\t\t$words\t\t\t\t\t\t=\texplode( \"_id_\", $column_name );\n\t\t\t\t$table_name\t\t\t\t\t=\t$words[0];\n\t\t\t\t$key\t\t\t\t\t\t=\t$words[0].'_'.$words[1];\n\t\t\t\t$tables_fk[ $key ]->column_name\t\t\t=\t$column_name;\n\t\t\t\t$tables_fk[ $key ]->table_name\t\t\t=\t$table_name;\n\t\t\t}\n\t\t\telseif ( strpos( $column_name, '_id' ) != 0 )\n\t\t\t{\n\t\t\t\t$table_name\t\t\t\t\t=\tstr_replace( \"_id\", \"\", $column_name );\n\t\t\t\t$key\t\t\t\t\t\t=\t$table_name;\n\t\t\t\t$tables_fk[ $key ]->column_name\t\t\t=\t$column_name;\n\t\t\t\t$tables_fk[ $key ]->table_name\t\t\t=\t$table_name;\n\t\t\t}\n\t\t}\n\t\treturn $tables_fk;\n\t}",
"public function getIds();",
"public function getIds();",
"public function getDiseaseMedicineRefs () {\n return DiseaseMedicineRefDao::getListByMedicine($this);\n }",
"public function adjustingMmRelationWithTablesnameAndFieldnameFieldDoNotTouchOtherRelations() {}",
"public function relationNames()\r\n {\r\n return [\n 'especie',\n 'lance'\n ];\r\n }",
"public function getIds() {\n $sources = array();\n \n $sources[] = $this->id;\n \n foreach ($this->points as &$g) {\n $sources[] = $g->id;\n }\n foreach ($this->lines as &$g) {\n $sources[] = $g->id;\n }\n foreach ($this->polygons as &$g) {\n $sources[] = $g->id;\n }\n if ( !empty($this->address) ) {\n $sources[] = $this->address->id;\n }\n foreach ($this->relationships as &$r) {\n $sources[] = $r->id;\n }\n \n return array_filter($sources);\n }",
"public function getRelations()\n {\n return $this->discoverRelations();\n }",
"function get_user_group_relationships() {\n\t$policy = new Config;\n\treturn $policy->getUserGroupRelationships();\n}",
"public function getRecipients()\n\t{\n\t\t$me\t\t\t= $this->getService('com://admin/ninjaboard.model.people')->getMe();\n\t\t$table\t\t= $this->getTable();\n\t\t$params\t\t= $this->getService('com://admin/ninjaboard.model.settings')->getParams();\n\t\t$topic\t\t= $this->getService('com://site/ninjaboard.model.topics')->id($this->_state->topic)->getItem();\n\t\t$forum\t\t= $this->getService('com://site/ninjaboard.model.forums')->id($topic->forum_id)->getItem();\n\t\t$ids\t\t= array();\n\t\t\n\t\tif($params->email_notification_settings->auto_notify_admins == 'yes') {\n\t\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select('id')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('users')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('sendEmail', '=', 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('id', '!=', $me->id);\n\t\t\tforeach($table->getDatabase()->select($query, KDatabase::FETCH_FIELD_LIST) as $id)\n\t\t\t{\n\t\t\t\t$ids[$id] = $id;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//Recipients subscribed to this topic\n\t\tif($this->_state->topic)\n\t\t{\n\t\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select('created_by')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type', '=', $table->getTypeIdFromName('topic'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type_id', '=', $this->_state->topic)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('created_by', '!=', $me->id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('ninjaboard_subscriptions');\n\t\t\tforeach($table->getDatabase()->select($query, KDatabase::FETCH_FIELD_LIST) as $id)\n\t\t\t{\n\t\t\t\t$ids[$id] = $id;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//Recipients subscribed to this forum and/or parent forum(s)\n\t\tif($forum->id)\n\t\t{\n\t\t\t$forums = array_filter(explode('/', $forum->path));\n\t\t\t$forums[] = $forum->id;\n\t\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select('created_by')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type', '=', $table->getTypeIdFromName('forum'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type_id', 'in', $forums)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('created_by', '!=', $me->id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('ninjaboard_subscriptions');\n\t\t\tforeach($table->getDatabase()->select($query, KDatabase::FETCH_FIELD_LIST) as $id)\n\t\t\t{\n\t\t\t\t$ids[$id] = $id;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Recipients subscribed to me\n\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select('created_by')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type', '=', $table->getTypeIdFromName('person'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('subscription_type_id', 'in', $me->id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('created_by', '!=', $me->id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('ninjaboard_subscriptions');\n\t\tforeach($table->getDatabase()->select($query, KDatabase::FETCH_FIELD_LIST) as $id)\n\t\t{\n\t\t\t// we most have access to this forum to get notifications\n\t\t\t$person = $this->getService('com://admin/ninjaboard.model.people')->id($id)->getItem();\n\n\t\t\t// check we have permission for this forum\n\t\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t->select('tbl.level AS level')\n\t\t\t\t\t\t\t->from('ninjaboard_assets AS tbl')\n\t\t\t\t\t\t\t->order('tbl.level', 'DESC')\n\t\t\t\t\t\t\t->limit(1)\n\t\t\t\t\t\t\t->where('tbl.name', '=', 'com_ninjaboard.forum.'.$forum->id.'.'.$person->ninjaboard_usergroup_id.'.forum');\n\n\t\t\t$result = $table->getDatabase()->select($query, KDatabase::FETCH_FIELD);\n\t\t\t$result = isset($result) ? $result : $person->forum_permissions;\n\n\t\t\tif (!$result) continue;\n\n\t\t\t$ids[$id] = $id;\n\n\t\t}\n\t\t\n\t\tif(!$ids) return array();\n\t\t\n\t\t$query = $this->getService('koowa:database.adapter.mysqli')->getQuery()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->select(array('name', 'email'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->from('users')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where('id', 'in', $ids);\n\t\treturn $table->getDatabase()->select($query, KDatabase::FETCH_OBJECT_LIST);\n\t}",
"public function selectUnversionedConstellationIDsForRelationTarget($icid) {\n $qq = 'selectrelatedicids';\n $this->sdb->prepare($qq,\n 'select distinct aa.ic_id, aa.id\n from related_identity as aa\n where not aa.is_deleted and\n aa.related_id = $1');\n\n $result = $this->sdb->execute($qq,\n array($icid));\n $all = array();\n while ($row = $this->sdb->fetchrow($result))\n {\n array_push($all, $row);\n }\n $this->sdb->deallocate($qq);\n return $all;\n\n }",
"function getUuidArray($db, $tabledefuuid, $ids){\r\n\r\n\tif(!count($ids))\r\n\t\treturn false;\r\n\r\n\t$querystatement = \"\r\n\t\t\tSELECT\r\n\t\t\t\t\t`maintable`\r\n\t\t\tFROM\r\n\t\t\t\t\t`tabledefs`\r\n\t\t\tWHERE\r\n\t\t\t\t\t`uuid` = '\".$tabledefuuid.\"'\";\r\n\r\n\t$queryresult = $db->query($querystatement);\r\n\r\n\t$tablerecord = $db->fetchArray($queryresult);\r\n\r\n\t$whereclause = \"\";\r\n\tforeach($ids as $id)\r\n\t\t$whereclause .= \" OR `id` = '\".(int)$id.\"'\";\r\n\r\n\t$whereclause = substr($whereclause, 4);\r\n\r\n\t$querystatement = \"\r\n\t\t\tSELECT\r\n\t\t\t\t\t`uuid`\r\n\t\t\tFROM\r\n\t\t\t\t\t`\".$tablerecord[\"maintable\"].\"`\r\n\t\t\tWHERE\r\n\t\t\t\t\t\".$whereclause;\r\n\r\n\t$queryresult = $db->query($querystatement);\r\n\r\n\t$thereturn = array();\r\n\tif($db->numRows($queryresult))\r\n\t\twhile($therecord = $db->fetchArray($queryresult))\r\n\t\t\t$thereturn[] = $therecord[\"uuid\"];\r\n\r\n\treturn $thereturn;\r\n\r\n}",
"function get_all_unidades_medida()\n {\n $this->db->order_by('id_unidade_medida', 'desc');\n return $this->db->get('unidades_medida')->result_array();\n }",
"public function getReferringMachines()\n {\n $query = 'SELECT machine_id FROM '. \\rex::getTablePrefix() .'d2u_machinery_machines '\n .'WHERE agitator_type_id = '. $this->agitator_type_id;\n $result = \\rex_sql::factory();\n $result->setQuery($query);\n\n $machines = [];\n for ($i = 0; $i < $result->getRows(); ++$i) {\n $machines[] = new Machine((int) $result->getValue('machine_id'), $this->clang_id);\n $result->next();\n }\n return $machines;\n }",
"public function relations()\n\t{\n\t\t$relations = $this->defineRelations();\n\n\t\tforeach ($relations as $name => &$config)\n\t\t{\n\t\t\t$this->_normalizeRelation($name, $config);\n\n\t\t\t// Unset any keys that CActiveRecord isn't expecting\n\t\t\tunset($config['required'], $config['unique'], $config['onDelete']);\n\t\t}\n\n\t\treturn $relations;\n\t}",
"public function findAllMedicByUserId($userId)\n\t{\n\t\tglobal $bdd;\n\n\t\t$q = $bdd->prepare(\"SELECT *\n\t\t\t\t\t\t\tFROM relation \n\t\t\t\t\t\t\tWHERE user_id = :user_id\n\t\t\t\t\t\t\t\");\n\t\t$q->execute(array(\n\t\t\t'user_id' => $userId\n\t\t\t));\n\n\t\t$data = $q->fetchAll(PDO::FETCH_OBJ);\n\n\t\treturn $data;\n\t}",
"public function getFullAccountList() {\n\t\t$result = $this->db->queryFetch(\"SELECT \"._CLMN_MEMBID_.\", \"._CLMN_USERNM_.\", \"._CLMN_EMAIL_.\" FROM \"._TBL_MI_.\" ORDER BY \"._CLMN_MEMBID_.\" ASC\");\n\t\tif(!is_array($result)) return;\n\t\treturn $result;\n\t}",
"public function listJoinedClassIds($uid)\n {\n $sql = \"SELECT cid FROM school_class_member WHERE uid=:uid\";\n return $this->_rdb->fetchAll($sql, array('uid' => $uid));\n }",
"public function getLesIdFrais()\n {\n $requetePrepare = PdoGsb::$monPdo->prepare(\n 'SELECT fraisforfait.id as idfrais '\n . 'FROM fraisforfait ORDER BY fraisforfait.id'\n );\n $requetePrepare->execute();\n return $requetePrepare->fetchAll();\n }",
"public function getLesIdFrais()\n {\n $requetePrepare = PdoGsb::$monPdo->prepare(\n 'SELECT fraisforfait.id as idfrais '\n . 'FROM fraisforfait ORDER BY fraisforfait.id'\n );\n $requetePrepare->execute();\n return $requetePrepare->fetchAll();\n }",
"function get_all_ids_per_user($cu_id) {\n\t\t$cloudprofile_list = array();\n\t\t$query = \"select pr_id from \".$this->_db_table.\" where pr_cu_id=$cu_id\";\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute($query);\n\t\tif (!$rs)\n\t\t\t$this->_event->log(\"get_all_ids_per_user\", $_SERVER['REQUEST_TIME'], 2, \"cloudprofile.class.php\", $db->ErrorMsg(), \"\", \"\", 0, 0, 0);\n\t\telse\n\t\twhile (!$rs->EOF) {\n\t\t\t$cloudprofile_list[] = $rs->fields;\n\t\t\t$rs->MoveNext();\n\t\t}\n\t\treturn $cloudprofile_list;\n\n\t}",
"public function relations() {\n\t\t$module = Yii::app()->getModule(\"users\");\n\t\t$memberClassName = $module->userGroupMemberModelClass;\n\t\t$tableName = $memberClassName::model()->tableName();\n\t\treturn array(\n\t\t\t\"users\" => array(self::MANY_MANY,$module->userModelClass,$tableName.\"(groupId,userId)\"),\n\t\t\t\"admins\" => array(self::MANY_MANY,$module->userModelClass,$tableName.\"(groupId,userId)\",\"condition\" => \"isAdmin = 1\"),\n\t\t\t\"totalUsers\" => array(self::STAT,$module->userModelClass,$tableName.\"(groupId,userId)\"),\n\t\t);\n\t}"
] | [
"0.64714414",
"0.5852523",
"0.54760313",
"0.52834326",
"0.51122665",
"0.5063405",
"0.5060649",
"0.5060649",
"0.5057215",
"0.5013246",
"0.49999055",
"0.49841198",
"0.4979048",
"0.496881",
"0.4931447",
"0.49160773",
"0.48714277",
"0.485828",
"0.4851337",
"0.48500666",
"0.48452643",
"0.4840058",
"0.48399433",
"0.48159012",
"0.48117164",
"0.48032698",
"0.4782173",
"0.4772788",
"0.47685835",
"0.476603",
"0.47561154",
"0.47490904",
"0.4739882",
"0.47394484",
"0.47381866",
"0.47308692",
"0.471399",
"0.47088125",
"0.47082716",
"0.46964803",
"0.46860477",
"0.46816814",
"0.46776",
"0.4674881",
"0.46668473",
"0.46655425",
"0.46562964",
"0.46544293",
"0.46541998",
"0.46514112",
"0.46494085",
"0.46457413",
"0.46444073",
"0.46434617",
"0.4641169",
"0.46408394",
"0.4636501",
"0.46306083",
"0.4629855",
"0.46183994",
"0.46175948",
"0.46137336",
"0.46117285",
"0.4611328",
"0.46104565",
"0.46077645",
"0.46039286",
"0.46013352",
"0.45891306",
"0.4577499",
"0.45728868",
"0.45693195",
"0.456582",
"0.45610997",
"0.4556298",
"0.45508522",
"0.45457834",
"0.45366907",
"0.45339307",
"0.4532134",
"0.4532134",
"0.4530948",
"0.45266747",
"0.4521726",
"0.45119786",
"0.45106047",
"0.45093706",
"0.45087382",
"0.4499088",
"0.4494939",
"0.4493923",
"0.44908953",
"0.44908798",
"0.44880185",
"0.4484887",
"0.44838554",
"0.4474911",
"0.4466876",
"0.44635183",
"0.44604757"
] | 0.5653487 | 2 |
Create a in uid query part. $query>in(uid, $uid) not working | public function inUid(\TYPO3\CMS\Extbase\Persistence\QueryInterface $query, $uid) {
$or = [];
foreach($uid as $single) {
$or[] = $query->equals('uid', $single);
}
return $query->logicalAnd($query->logicalOr($or));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function get_users_in($itemids) {}",
"public function in($column,$val);",
"public function where_emp_in($emp) {\n\t\t$this->db->where_in('ID', $emp);\n\t}",
"public function setUidListConstraint(Tx_Extbase_Persistence_QueryInterface $query) {\n\t\t$idList = (empty($this->uidList)) ? array('0') : $this->uidList;\n\n\t\t$constraint = $query->in('uid', $idList);\n\t\treturn $constraint;\n\t}",
"public function testSelectWithInCondition(): void\n {\n $this->_insert();\n $result = $this->connection->selectQuery('id', 'ordered_uuid_items')\n ->where(\n ['id' => ['48298a29-81c0-4c26-a7fb-413140cf8569', '482b7756-8da0-419a-b21f-27da40cf8569']],\n ['id' => 'ordered_uuid[]']\n )\n ->orderBy('id')\n ->execute()\n ->fetchAll('assoc');\n\n $this->assertCount(2, $result);\n $this->assertSame('419a8da0482b7756b21f27da40cf8569', $result[0]['id']);\n $this->assertSame('419a8da0482b7756b21f27da40cf8569', $result[0]['id']);\n }",
"function _uid_filter ($dn) { return('(uid='.dn2uid($dn).')'); }",
"public function whereIn()\n {\n list($field, $value) = $this->extractQueryToFieldAndValue(func_get_args());\n $this->_conditions[self::WHEREIN][$field] = [self::OPERATORS['in'] => $value];\n return $this;\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 orIn($column,$val);",
"function &getUsers($uids)\n {\n $criteria = new CriteriaCompo();\n $criteria->add(new Criteria('uid', '(' . implode(',', $uids) . ')', 'IN'));\n $criteria->setSort('uid');\n\n $member_handler =& xoops_gethandler('member');\n $users =& $member_handler->getUsers($criteria, true);\n return $users;\n }",
"function get_ids_for_in($sql,$col_name='id') {\n\t$rows = fetchAll($sql);\n\t$ids = array();\n\tforeach($rows AS $row) {\n\t\t$ids[] = $row[$col_name];\n\t}\n\tif (count($ids) == 0) $ids[] = '0';\n\treturn join(',',$ids);\n}",
"function getUserInterests($u)\n{\n $ids = $u['interests'];\n $ids = explode(',', $ids);\n //var_dump($ids);\n $u['interests'] = $ids;\n $_SESSION['usr'] = $u;\n //$sql = \"SELECT name FROM interests WHERE ID IN ($ids)\";\n //$result = mysql_query($sql, $c);\n //var_dump($result);\n}",
"public function findByUid($uid);",
"public function orWhereIn()\n {\n list($field, $value) = $this->extractQueryToFieldAndValue(func_get_args());\n if (!is_array($value)) {\n $value = [$value];\n }\n return $this->addOrWhereStack([$field => [self::OPERATORS['in'] => $value]]); \n }",
"function in($x, $y, $and=null, ...$args)\n {\n $expression = array();\n array_push($expression, $x, _IN, $y, $and, ...$args);\n return $expression;\n }",
"function in($x, $y, $and=null, ...$args)\n {\n $expression = array();\n array_push($expression, $x, _IN, $y, $and, ...$args);\n return $expression;\n }",
"public function whereIn($values);",
"private function addValueInListQuery($key,$value){\n /// \\param[in] $key The key (fieldname)\n /// \\param[in] $value The value(s) of the fieldname\n /// \\return a part of the query or nothing\n global $ORIONDB_DB;\n \n if(($key != \"\") && ($value != \"\")){\n if($this->_queryUnchanged[$this->_numberOfRecursions]){\n $returnQuery = \" WHERE \";\n $this->_queryUnchanged[$this->_numberOfRecursions] = false;\n }\n else {\n $returnQuery = \" AND \"; \n }\n $returnQuery .= $ORIONDB_DB->cleansql($key) . \" in (\" . $ORIONDB_DB->cleansql($value) . \")\";\n return $returnQuery;\n }\n}",
"function query_select_followed_by_user($userId) {\n global $connection;\n\n //escape input\n $userId = mysqli_real_escape_string($connection, $userId);\n\n //prepare queries\n $subquery_select_from_follower = \"SELECT auction_id FROM follower \";\n $subquery_select_from_follower .= \"WHERE user_id='{$userId}'\";\n\n $query = \"SELECT auctionId, title, imageName, description, startingPrice, \";\n $query .= \"expirationDate \";\n $query .= \"FROM auction \";\n $query .= \"WHERE auctionId IN ($subquery_select_from_follower)\";\n\n //forward query to database\n $result = mysqli_query($connection, $query);\n\n //If set is not empty, return a number-indexed array, return 0 otherwise\n if($result)\n $result = mysqli_fetch_all($result, MYSQLI_ASSOC);\n\n return $result;\n}",
"public function whereIn($column, $value)\n {\n }",
"function findOneMatchUid($uid);",
"protected function parse_id() {\n\n\t\tif ( ! empty( $this->args['id'] ) ) {\n\t\t\t$this->args['id__in'] = array( $this->args['id'] );\n\t\t}\n\n\t\treturn $this->parse_in_or_not_in_query( 'id', $this->args['id__in'], $this->args['id__not_in'] );\n\t}",
"static function _IN($field, Array $values){\n $var = \"\";\n /* busca si existe el campo en el modelo en cuestion */\n if(aModels::findFieldModel($field) == 'STRING'){\n foreach ($values as $val){\n # le coloca las comillas simples al valor\n $var .= \"'\".(strip_tags($val)) .\"', \";\n }\n $var = trim($var,', ');\n }else{\n $var = implode(\", \", $values);\n }\n return $field . \" {in} ($var) \";\n }",
"public function in( $collection ) {\n\t\t\t$this->_action = 'IN';\n\t\t\t$this->_value = $collection;\n\t\t\t\n\t\t\treturn $this;\n\t\t}",
"public function users_to_query()\n\t{\n\t\treturn array($this->get_data('from_user_id'));\n\t}",
"public function whereIn(string $field, array $values, array $options = []);",
"public function in(array $values);",
"public function in($question = '');",
"public function __in ( $sField, $mValues )\n {\n /*\n Prepare from parameters.\n */\n if (is_array($mValues))\n {\n /*\n Convert array into string.\n */\n $mValues = implode(', ', $mValues);\n }\n elseif (func_num_args() > 2)\n {\n /*\n Use passed paramaters from the 2nd to last to build the string.\n */\n $aParams = func_get_args();\n array_shift($aParams);\n $mValues = implode(', ', $aParams);\n }\n return \"$sField IN ($mValues)\";\n }",
"function getAllUserIds($filter) {\n\t//SELECT id FROM students\n\t$sql = \"SELECT id FROM users WHERE $filter = 1\";\n\t$userIds = queryColumn($sql);\n\n\treturn $userIds;\n}",
"function room_in($what, $in)\r\n{\r\n\t$rooms = (is_array($in) ? $in : explode(\",\",$in));\r\n\tfor (reset($rooms); $room_name=current($rooms); next($rooms))\r\n\t{\r\n\t\tif (strcasecmp($what, $room_name) == 0) return true;\r\n\t};\r\n\treturn false;\r\n}",
"function paperselPredicate($papersel) {\n return \"ContactInfo.contactId\" . sql_in_numeric_set($papersel);\n}",
"public function testInList()\n {\n $query = \\SortableEntity12Query::create()->inList(1);\n $expectedQuery = \\SortableEntity12Query::create()->add(\\Map\\SortableEntity12EntityMap::FIELD_MY_SCOPE_FIELD, 1, Criteria::EQUAL);\n $this->assertEquals($expectedQuery, $query, 'inList() filters the query by scope');\n $this->assertEquals(4, $query->count(), 'inList() filters the query by scope');\n $query = \\SortableEntity12Query::create()->inList(2);\n $expectedQuery = \\SortableEntity12Query::create()->add(\\Map\\SortableEntity12EntityMap::FIELD_MY_SCOPE_FIELD, 2, Criteria::EQUAL);\n $this->assertEquals($expectedQuery, $query, 'inList() filters the query by scope');\n $this->assertEquals(2, $query->count(), 'inList() filters the query by scope');\n }",
"public function in($expression, $arrayExpression): static;",
"public function get_exists_users($post_data){\n $userId = $post_data['userId'];\n $searchId = $post_data['searchId'];\n //print_r($post_data);exit();\n $invitees = array_key_exists(\"invitees\",$post_data);\n if($invitees){ \n $invitees = $post_data['invitees']; \n $emails = array();\n for($i=0;$i<sizeof($invitees);$i++){\n $emails[$i]['inviteEmail'] = strtolower($invitees[$i]['inviteEmail']);\n }\n // print_r($emails);exit();\n $str_email = implode(',', array_map(function($el){ return $el['inviteEmail']; }, $emails));\n $str = \"'\".$str_email.\"'\";\n $email = str_replace(\",\",\"','\",$str);\n\t\t\t//print_r($email);exit();\n $userId = $post_data['userId'];\n // echo $email;exit();\n\n /* $sql = \"SELECT userId,firstName,deviceToken,email FROM users \n WHERE email IN ($email)\";\n */\n $sql = \"SELECT u.userId,u.firstName,u.deviceToken,u.email,t.deleteFlag,t.status \n FROM users u \n LEFT JOIN tribe t ON t.inviteEmail = u.email \n WHERE u.email IN ($email) AND t.status != 'accept' AND t.searchId = $searchId AND t.fromuserId = $userId GROUP BY u.userId\"; \n\t\t\t//echo $sql;exit();\n $record = $this->db->query($sql);\n if($record->num_rows()>0){\n //print_r($record->result_array());exit();\n $users = $record->result_array();\n $ids = array();\n foreach ($users as $key) {\n $users_id = array('touserId' =>$key['userId']);\n $email = strtolower($key['email']);\n // print_r($users_id);exit();\n $this->db->where('fromuserId',$userId);\n $this->db->where('searchId',$searchId);\n $this->db->where('inviteEmail',$email);\n $this->db->update('tribe',$users_id);\n\n // $query = $this->db->get_where('tribe', array('touserId' => $key['userId']));\n // $row = $query->row();\n // $name = $row->name;\n // $firstName = array('firstName' =>$name);\n // $this->db->where('userId',$key['userId']);\n // $this->db->update('users',$firstName);\n\n }\n\n \n return $record->result_array();\n // print_r($record->result_array());exit();\n }\n }\n }",
"private function userQueryOrders($inList) {\n $this->userQueryResult = $this->find('all', array(\n 'conditions' => array(\n 'Order.id' => $inList\n ),\n 'contain' => array(\n 'User',\n 'UserCustomer' => array(\n 'Customer' => array(\n 'fields' => array('id', 'allow_backorder')\n )\n ),\n 'Budget',\n 'OrderItem' => array(\n 'Item',\n 'Catalog' => array(\n 'ParentCatalog' => array(\n 'Item'\n )\n )\n ),\n 'Shipment',\n )\n ));\n }",
"public function findAllWhereIn( array $value, $field, array $columns = ['*'] );",
"final public function in(...$values):bool\n {\n return Base\\Arrs::ins($this->prepareValues(...$values),$this->arr(),$this->isSensitive());\n }",
"public static function in(PdoMysqlSession $sqlSess, $colName, array $values) {\r\n\t\tif (!$values) return '1 = 0';\r\n\t\t\r\n\t\t$valuesQ = [];\r\n\t\t\r\n\t\tforeach ($values as $value) {\r\n\t\t\t$valuesQ[] = $sqlSess->encodeValue($value);\r\n\t\t}\r\n\t\t\r\n\t\treturn $sqlSess->encodeName($colName) . ' IN (' . implode(', ', $valuesQ) . ')';\r\n\t}",
"public function whereIn($column, $values);",
"function is_in(...$args)\n{\n\t$needle = array_shift($args);\n\treturn in_array($needle,$args);\n}",
"function get_author_user_ids()\n {\n }",
"private function process_in($value, $param = null)\n {\n return in_array($value, explode(',', $param));\n }",
"private function setIntCondition($uid) {\n\t\t$this->setUid($uid); // just read the record (probably for backend)\n\t\t$this->condition = 'uid = ' . $this->getUid();\n\t}",
"public function findUserByIDs($ids)\n {\n \treturn $this->createQueryBuilder('u')\n \t->where('u.id IN (:ids)')\n \t->setParameter('ids', $ids)\n \t->getQuery()\n \t->getOneOrNullResult()\n \t;\n }",
"public function userIn($userId)\n {\n $rs = \\Illuminate\\Support\\Facades\\DB::connection('tenant')\n ->table('role_staff')\n ->select('role_staff.id', 'shift_role_id', 'selected')\n ->join('shift_roles', 'role_staff.shift_role_id', '=', 'shift_roles.id')\n ->join('staff_statuses', 'role_staff.staff_status_id', '=', 'staff_statuses.id')\n ->where([['user_id', $userId], ['shift_id', $this->id]])\n ->get()\n ->keyBy('shift_role_id')\n ->all();\n\n return $rs;\n }",
"public function check_if_user_exist($data = array(), $is_total_rows = false, $is_single = false,$where_in = false) {\n \n $this->db->where($data);\n\n if(!empty($where_in)){\n $this->db->where_in('role_id',$where_in);\n }\n // $this->db->where('(is_blocked != 1 AND is_deleted != 1)');\n $this->db->where('(is_deleted != 1)');\n if ($is_total_rows == true) {\n $res_data = $this->db->get('users')->num_rows();\n } else {\n if ($is_single == true) {\n $res_data = $this->db->get('users')->row_array();\n } else {\n $res_data = $this->db->get('users')->result_array();\n }\n }\n return $res_data;\n }",
"function contained_in_ids($collection, $item)\n {\n foreach($collection as $look)\n {\n if($look->id == $item->id) return true;\n }\n return false;\n }",
"function wherein(){\n\n $emails = ['[email protected]','[email protected]','[email protected]'];\n\n return $this->db->table('posts')\n ->groupStart()\n ->where(['post_id >'=> '25', 'post_created_at <' => '1990-01-01 00:00:00'])\n ->groupEnd()\n ->orWhereIn('email', $emails)\n ->join('users', 'posts.post_author=users.user_id')\n ->limit(5,4)\n ->get()\n ->getResult();\n }",
"public function hook_query_index(&$query) {\n/*\t //Your code here\n $userId = CRUDBooster::myId();\n//\t echo $userId;\n\t $isAdmin = CRUDBooster::isSuperadmin();\n\t $storeAssignedtoUser = DB::table('srv_centers')\n ->where('cms_user_id', '=', $userId)\n ->first();\n\t if ($isAdmin) {\n\n\t }else {\n\t $query->where('cms_users.id',$storeAssignedtoUser->cms_user_id);\n\t }\n*/\n\t }",
"function only_uid($args) {\n\t\t$uid = $args['uid'];\n\t\tunset($args);\n\t\t$args['uid'] = $uid;\n\t\t\n\t\treturn $args;\n\t}",
"function um_add_user_tags_to_query( $query_args, $args ) {\r\n if ( ! isset( $args['user_tags_on'] ) || ! $args['user_tags_on'] )\r\n return $query_args;\r\n\r\n $tags = get_option( 'um_user_tags_filters' );\r\n\r\n if ( empty( $tags ) )\r\n return $query_args;\r\n\r\n $meta_query = array();\r\n\r\n foreach ( $tags as $tag => $term ) {\r\n if ( empty( $args[ 'user_tags_' . $tag ] ) )\r\n continue;\r\n\r\n foreach ( $args[ 'user_tags_' . $tag ] as $term_id ) {\r\n $meta_query[] = array(\r\n array(\r\n 'key' => $tag,\r\n 'value' => $term_id,\r\n 'compare' => '=',\r\n ),\r\n array(\r\n 'key' => $tag,\r\n 'value' => $term_id,\r\n 'compare' => 'LIKE',\r\n ),\r\n array(\r\n 'key' => $tag,\r\n 'value' => trim( serialize( strval( $term_id ) ) ),\r\n 'compare' => 'LIKE',\r\n ),\r\n 'relation' => 'OR',\r\n );\r\n }\r\n }\r\n\r\n if ( empty( $meta_query ) )\r\n return $query_args;\r\n\r\n if ( count( $meta_query ) > 1 )\r\n $meta_query['relation'] = 'AND';\r\n\r\n $query_args['meta_query'][] = $meta_query;\r\n\r\n return $query_args;\r\n}",
"public function withUid($uid);",
"private function inClause($list)\n {\n\n $list = array_map(function ($i) {\n\n return \"?\";\n\n }, $list);\n\n $list = implode(\",\", $list);\n\n return \"($list)\";\n }",
"public static function IN($filename, $dir, $id) {\n\t\treturn (object)Array(\n\t\t\t'filename'\t=> $filename,\n\t\t\t'dir'\t\t=> $dir,\n\t\t\t'id'\t\t=> $id,\n\t\t\t'is_in'\t\t=> true\n\t\t);\n\t}",
"function get_smsstudents_by_ids($inputarray = array()) {\n $sql = \"select * from student_records where id in(\" . implode(',', $inputarray) . \")\";\n //log_message('error', 'get_smsstudents_by_ids '.$sql);\t\t\n $res = $this->db->query($sql);\n return $res->result();\n }",
"public function in($property, Array $values)\n {\n $this->search[] =$this->dbFieldName($property) . ' IN (' . implode(',', $this->prepareInValues($values)) .')';\n }",
"function employee_selected($employee_uid) {\n\t\t$selected_uid = explode('|',(string)t3lib_div::_GP('selected_uid'));\n\t\tforeach($selected_uid AS $key => $val) {\n\t\t\tif ($val==$employee_uid) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"function facebook_get_uid($uid){\n\t\t$queryText = 'SELECT facebook_uid FROM facebook_accounts WHERE uid = :uid';\n\t\t\n\t\t$query = $this->connection->prepare($queryText);\n\t\t$query->execute(array(':uid'=>$uid));\n\t\t\n\t\treturn $query;\n\t}",
"final public static function in($conditionField)\n {\n self::$where = false;\n //add the condition\n self::$query .= $conditionField . ' IN(';\n return (new static);\n }",
"public function filterByUid($uid = null, $comparison = null)\n\t{\n\t\tif (is_array($uid) && null === $comparison) {\n\t\t\t$comparison = Criteria::IN;\n\t\t}\n\t\treturn $this->addUsingAlias(UserPeer::UID, $uid, $comparison);\n\t}",
"public function buildWherePermission( array $ids, $field='', $incStarCheck=true );",
"public function filterByUid($uid = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($uid)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliHoldheadTableMap::COL_UID, $uid, $comparison);\n }",
"public function rest_query_filter( $query_args, $request ) {\n\t\t\t$query_args = parent::rest_query_filter( $query_args, $request );\n\n\t\t\t$route_url = $request->get_route();\n\t\t\t$ld_route_url = '/' . $this->namespace . '/' . $this->rest_base . '/' . absint( $request['id'] ) . '/' . $this->rest_sub_base;\n\t\t\tif ( ( ! empty( $route_url ) ) && ( $ld_route_url === $route_url ) ) {\n\n\t\t\t\t$user_id = $request['id'];\n\t\t\t\tif ( empty( $user_id ) ) {\n\t\t\t\t\treturn new WP_Error( 'rest_user_invalid_id', esc_html__( 'Invalid User ID.', 'learndash' ), array( 'status' => 404 ) );\n\t\t\t\t}\n\n\t\t\t\tif ( is_user_logged_in() ) {\n\t\t\t\t\t$current_user_id = get_current_user_id();\n\t\t\t\t} else {\n\t\t\t\t\t$current_user_id = 0;\n\t\t\t\t}\n\n\t\t\t\t$query_args['post__in'] = array( 0 );\n\t\t\t\tif ( ! empty( $current_user_id ) ) {\n\t\t\t\t\t$group_ids = learndash_get_users_group_ids( $user_id );\n\t\t\t\t\tif ( ! empty( $group_ids ) ) {\n\t\t\t\t\t\t$query_args['post__in'] = $group_ids;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $query_args;\n\t\t}",
"function get_custom_ids($fieldID, $fieldValue) {\n\tglobal $wpdb;\n\n\t// collection based on an xprofile field\n\t//$custom_ids = $wpdb->get_col(\"SELECT user_id FROM {$wpdb->prefix}bp_xprofile_data A JOIN {$wpdb->prefix}users B ON A.user_id=B.ID WHERE A.field_id = $fieldID AND A.value = '$fieldValue'\");\n\t$custom_ids = $wpdb->get_col(\"SELECT B.user_id FROM {$wpdb->prefix}bp_xprofile_data A JOIN {$wpdb->prefix}usermeta B ON A.user_id=B.user_id WHERE (B.meta_key = 'pw_user_status' AND B.meta_value = 'approved') AND (A.field_id = $fieldID AND A.value = '$fieldValue')\");\n\t\n\treturn $custom_ids;\n}",
"function get_table_where_in_Q( $select_data, $where_data, $table){\n \n\t\t$this->db->select($select_data);\n\t\t$this->db->where_in('Q_id',$where_data);\n\t\t$query = $this->db->get($table); //--- Table name = User\n\t\t$result = $query->result_array(); \n\t\treturn $result;\t\n }",
"public static function buildInPredicate($column, array $values)\n{\n\t// Form IN predicate\n\t$clause = $column . ' IN (?'\n\t . str_repeat(', ?', count($values) - 1) . ')';\n\n\t// Return clause\n\treturn $clause;\n}",
"function get_uids($arr){\r\n$ids=array();\r\n\r\nif(count($arr)){\r\n\r\nforeach($arr as $row)\r\n$ids[]=$row['uid'];\r\n\r\n}\r\n\r\nreturn $ids;\r\n}",
"function checkIDList($table, $fixedQuery, &$IDList)\n{\n\tglobal $sitePosition;\n\n\t$IDs = array();\n\t$rs = query('Select `ID` from `' . $sitePosition . '.' . $table . '` where ' . ($fixedQuery != '' ? ('(' . $fixedQuery . ') and ') : '') . '`ID` in (' . $IDList . ')', false);\n\twhile(true)\n\t{\n\t\t$rsInfo = fetchRow($rs);\n\t\tif($rsInfo === null) break;\n\t\t$IDs[] = $rsInfo[0];\n\t}\n\tfreeResult($rs);\n\t$IDList = implode(',', $IDs);\n}",
"function search($user_id,$term,$limit=1000){\r\n\t\t$idRange=array();\r\n\t\tif($term){\r\n\t\t\t$users=iterator_to_array(\\app\\models\\User::model()->find(array('username'=>new \\MongoRegex(\"/^$term/\")))->sort(array('username'=>1))->limit($limit));\r\n\t\t\t$mongoIds=array();\r\n\t\t\tforeach($users as $_id=>$user)\r\n\t\t\t\t$mongoIds[]=new \\MongoId($_id);\r\n\t\t\t$idRange=array('toId'=>array('$in'=>$mongoIds));\r\n\t\t\t\r\n\t\t\t$following=self::model()->find(array_merge(array('fromId'=>$user_id),$idRange));\r\n\t\t\t\r\n\t\t\t$followedUsers=array();\r\n\t\t\tforeach($following as $_id=>$follower){\r\n\t\t\t\tif($user=$users[strval($follower->toId)])\r\n\t\t\t\t\t$followedUsers[strval($user->_id)]=$user;\r\n\t\t\t}\r\n\t\t\treturn $followedUsers;\t\t\t\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\t$following=self::model()->find(array('fromId'=>$user_id))->limit(20);\r\n\t\t\tforeach($following as $_id=>$follower)\r\n\t\t\t\t$mongoIds[]=new \\MongoId($follower->toId);\t\t\t\r\n\t\t\t$users=\\app\\models\\User::model()->find(array('_id'=>array('$in'=>$mongoIds)))->sort(array('username'=>1));\r\n\t\t\treturn $users;\r\n\t\t}\r\n\t}",
"private function ldapQueryEligibleUser($uid, $serverId, $persistentUidProperty, $persistentUid) {\n\n $user['uid'] = $uid;\n $user['exists'] = FALSE;\n // Query LDAP and update the prepared users with the actual state.\n if (!isset($this->enabledServers[$serverId])) {\n if (!isset($this->missingServerSemaphore[$serverId])) {\n $this->logger->error('Server %id not enabled, but needed to remove orphaned LDAP users', ['%id' => $serverId]);\n $this->missingServerSemaphore[$serverId] = TRUE;\n }\n }\n else {\n if ($this->enabledServers[$serverId]->get('unique_persistent_attr_binary')) {\n $filter = \"($persistentUidProperty=\" . $this->binaryFilter($persistentUid) . \")\";\n }\n else {\n $filter = \"($persistentUidProperty=$persistentUid)\";\n }\n\n $ldapEntries = $this->enabledServers[$serverId]->searchAllBaseDns($filter, [$persistentUidProperty]);\n if ($ldapEntries === FALSE) {\n $this->logger->error('LDAP server %id had error while querying to deal with orphaned LDAP user entries. Please check that the LDAP server is configured correctly',\n ['%id' => $serverId]\n );\n return [];\n }\n else {\n unset($ldapEntries['count']);\n if (!empty($ldapEntries)) {\n $user['exists'] = TRUE;\n }\n }\n }\n return $user;\n }",
"static function author_query() {\n\t\tif (BlogExtensions::$author_groups) {\n\t\t\t$query = singleton('Member')->extendedSQL('', '', null,\n\t\t\t\t'INNER JOIN \"Group_Members\" ON \"Group_Members\".\"MemberID\" = \"Member\".\"ID\" '\n\t\t\t\t\t. ' AND \"Group_Members\".\"GroupID\" in (' . implode(',', BlogExtensions::$author_groups) .')');\n\t\t} else {\n\t\t\t$query = singleton('Member')->extendedSQL('', '', null,'');\n\t\t}\n\t\t\n\t\treturn $query;\n\t}",
"public static function whereIn($column, array $values);",
"function where_in($key = NULL, $values = NULL)\r\n\t{\r\n\t \treturn $this->_where_in($key, $values);\r\n\t}",
"function assoc_in($coll, $in, $value) {\n if (empty($in)) {\n return $coll;\n }\n\n $array = f\\to_array($coll);\n\n $current =& $array;\n foreach ($in as $k) {\n if (f\\not(f\\get_or($current, $k, null))) {\n $current = f\\assoc($current, $k, array());\n }\n\n $current =& $current[$k];\n }\n\n $current = $value;\n\n return $array;\n}",
"protected function _in($model, $as_array = FALSE)\n\t{\n\t\t$result = Jelly::select($this->through['model'])\n\t\t\t\t->select($this->through['columns'][1])\n\t\t\t\t->where($this->through['columns'][0], '=', $model->id());\n\n\t\tif ($as_array)\n\t\t{\n\t\t\t$result = $result\n\t\t\t\t\t\t->execute(Jelly::meta($model)->db())\n\t\t\t\t\t\t->as_array(NULL, $this->through['columns'][1]);\n\t\t}\n\n\t\treturn $result;\n\t}",
"public function whereIn($field, $data = array()){\n return $this->model->whereIn($field, $data);\n }",
"function mid_imatch($mid, $usercntr='')\r\n{\r\n $usercntr = strtolower(trim($usercntr));\r\n\r\n if (function_exists('Mid_Util')) { // mobile id functions available\r\n $midinfo = mid_match($mid, $usercntr);\r\n if (!empty($midinfo)) // isFound, but may be unknown\r\n return $midinfo;\r\n else // invalid mid\r\n return NULL;\r\n }\r\n\r\n // intellgent mobile id functions offline - use generic one\r\n if ($mid = getValidMid($mid)) {\r\n $midinfo = array(\r\n 'mid' => $mid,\r\n 'cntr' => $usercntr,\r\n );\r\n return $midinfo;\r\n }\r\n}",
"function friends_using()\n{\n $me = fb::me();\n $uid = ! empty($me['id']) ? $me['id'] : -1;\n\n $args = func_get_args();\n $what = $args ? join(',', $args) : 'name';\n\n return fb::query(\"SELECT $what FROM user WHERE has_added_app=1 and uid IN (SELECT uid2 FROM friend WHERE uid1=$uid)\");\n}",
"function getPostIdArray($userIdarray)\n{\n global $conn;\n $postIds = array();\n\n $sql = \"SELECT post.postId FROM user JOIN post ON user.userId=post.userId WHERE \";\n\n $length = sizeof($userIdarray);\n $counter = 0;\n\n foreach ($userIdarray as $user) {\n $counter++;\n $sql .= \"user.userId='\" . $user . \"' \";\n if ($counter != $length) {\n $sql .= \"OR \";\n } else {\n $sql .= \"AND post.deleted=0 ORDER BY post.creationTime DESC;\";\n\n }\n }\n\n $result = mysqli_query($conn, $sql);\n\n if ($result == false) {\n return $postIds;\n } else {\n while ($row = mysqli_fetch_assoc($result)) {\n\n $postIds[] = $row['postId'];\n\n }\n\n return $postIds;\n }\n\n}",
"public function fetchIn( array $in, $condition = array(), $params = null )\n {\n\n if( !$params )\n $params = new TFlowFlag();\n\n $this->sourceSize = null;\n $db = $this->getDb();\n\n $criteria = $db->orm->newCriteria();\n\n $this->setCols( $criteria );\n $this->setTables( $criteria );\n\n\n $criteria->whereIn($in);\n $this->appendConditions( $criteria, $condition, $params );\n $this->checkLimitAndOrder( $criteria, $params );\n\n // Run Query und save the result\n $this->result = $db->orm->select( $criteria );\n $this->calcQuery = $criteria->count('count(project_task.'.Db::PK.') as '.Db::Q_SIZE);\n\n }",
"function get_nonauthor_user_ids()\n {\n }",
"private function searchMembers() {\n $searchStr = $this->postVars['memberSearch'];\n $searchStrArr = array();\n if(preg_match('/\\s/',$searchStr)) {\n $searchStrArr = explode(\" \", $searchStr);\n }\n \n if(empty($searchStrArr)) {\n $query = \"SELECT u.id\n FROM {$this->db->prefix}users AS u\n WHERE u.user_email = '$searchStr'\n UNION\n SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id AND n.nhc_pin = '$searchStr'\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name'\n UNION\n SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name' AND um1.meta_value like '%$searchStr%'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name'\n UNION\n SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name' AND um2.meta_value like '%$searchStr%'\";\n //JOIN {$this->db->prefix}usermeta um4 ON um4.user_id = u.id AND um4.meta_key = 'expiration_date' AND um4.meta_value = '$expireDate'\";\n }\n else { // looking specifically for a full name\n $query = \"SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name' AND um1.meta_value like '%{$searchStrArr[0]}%'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name' AND um2.meta_value like '%{$searchStrArr[1]}%'\";\n \n }\n \n $membersArr = $this->db->get_results($query, ARRAY_A);\n \n // filter through to weed out any duplicates\n $showArr = array();\n foreach($membersArr as $member) {\n if(!in_array($member['id'], $showArr)) {\n $showArr[] = $member['id'];\n }\n }\n $idStr = implode(\",\", $showArr);\n \n $query = \"SELECT DISTINCT u.id, n.nhc_pin, um1.meta_value AS first_name, um2.meta_value AS last_name, u.user_email, um3.meta_value AS level\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name'\n JOIN {$this->db->prefix}usermeta um3 ON um3.user_id = u.id AND um3.meta_key = 'member_level'\n WHERE u.id IN ($idStr)\n ORDER BY n.nhc_pin\";\n \n $this->showResults($query, 'search', true);\n }",
"private function getUserIds($filter_name, $filter_values)\n {\n switch ($filter_name) {\n case 'common':\n $list = user_auth_peer::instance()->get_list(['del' => 0], [], ['id ASC']);\n break;\n\n case 'group':\n\n $list = db::get_cols(\n 'SELECT user_id FROM '.groups_members_peer::instance()->get_table_name(\n ).' WHERE group_id IN ('.implode(',', $filter_values).')'\n );\n break;\n\n case 'ppo':\n\n\n $ppo = ppo_peer::instance()->get_item($filter_values[0]);\n $list = ppo_members_peer::instance()->get_members($ppo['id'], false, $ppo);\n break;\n\n case 'status':\n $list = db::get_cols(\n 'SELECT id as user_id FROM '.user_auth_peer::instance()->get_table_name(\n ).' WHERE status IN ('.implode(',', $filter_values).')'\n );\n break;\n\n case 'func':\n\n foreach ($filter_values as $id => $a) {\n $where[] = \"functions && '{\".$a.\"}'\";\n }\n $list = db::get_cols(\n 'SELECT user_id FROM '.user_desktop_peer::instance()->get_table_name().' WHERE '.implode(\n ' OR ',\n $where\n )\n );\n break;\n\n case 'region':\n $list = db::get_cols(\n 'SELECT user_id FROM '.user_data_peer::instance()->get_table_name().' WHERE region_id IN ('.implode(\n ',',\n $filter_values\n ).')'\n );\n break;\n\n case 'lists':\n\n $list = db::get_cols(\n 'SELECT user_id FROM '.lists_users_peer::instance()->get_table_name().' WHERE list_id IN ('.implode(\n ',',\n $filter_values\n ).') AND type = 0'\n );\n break;\n\n case 'district':\n $list = db::get_cols(\n 'SELECT user_id FROM '.user_data_peer::instance()->get_table_name().' WHERE city_id IN ('.implode(\n ',',\n $filter_values\n ).')'\n );\n break;\n\n case 'sferas':\n $list = db::get_cols(\n 'SELECT user_id FROM '.user_data_peer::instance()->get_table_name().' WHERE segment IN ('.implode(\n ',',\n $filter_values\n ).')'\n );\n break;\n\n case 'political_views':\n\n $list = db::get_cols(\n 'SELECT user_id FROM '.user_data_peer::instance()->get_table_name(\n ).' WHERE political_views = '.$filter_values\n );\n break;\n\n case 'targets':\n $i = 0;\n foreach ($filter_values as $fv) {\n $sqladd .= 'admin_target && \\'{'.$fv.'}\\' ';\n if ($i < count($filter_values) - 1) {\n $sqladd .= ' OR ';\n }\n $i++;\n }\n $list = db::get_cols(\n 'SELECT user_id\n FROM user_data WHERE '.$sqladd\n );\n break;\n\n case 'visit':\n $name = 'visit_ts';\n $value = $filter_values;\n $time = time() - abs($value * 24 * 60 * 60);\n if ($value > 0) {\n $where = \"user_id in (SELECT user_id FROM user_sessions WHERE $name > $time)\";\n } elseif ($value < 0) {\n $where = \"user_id in (SELECT user_id FROM user_sessions WHERE $name < $time)\";\n }\n $list = db::get_cols(\n 'SELECT user_id FROM '.user_sessions_peer::instance()->get_table_name().' WHERE '.$where\n );\n break;\n }\n\n\n foreach ($list as $key => $value) {\n $usr = user_auth_peer::instance()->get_item($value);\n if (1 === $usr['del'] || 0 === (int)$usr['active'] || 1 === (int)$usr['offline']) {\n unset($list[$key]);\n }\n }\n\n internal_mailing_peer::instance()->update(\n [\n 'id' => $this->mailing_id,\n 'count' => count($list),\n ]\n );\n\n return $list;\n }",
"function filtering_instructor_custom($qs=false,$object=false){\n \tif($object!='members')//hide for members only\n\t return $qs;\n\t \n\t $args=array('role' => 'Instructor','fields' => 'ID');\n\t $users = new WP_User_Query($args);\n\n\t $included_user = implode(',',$users->results);\n\t //$included_user='1,2,3';//comma separated ids of users whom you want to exclude\n\t \n\t $args=wp_parse_args($qs);\n\t if(!isset($args['scope']) || $args['scope'] != 'instructors')\n\t \treturn $qs;\n\t //check if we are searching or we are listing friends?, do not exclude in this case\n\t if(!empty($args['user_id'])||!empty($args['search_terms']))\n\t return $qs;\n\t \n\t if(!empty($args['include']))\n\t $args['include']=$args['include'].','.$included_user;\n\t else\n\t $args['include']=$included_user;\n\n\n\t $qs=build_query($args);\n\t \n\t return $qs;\n \n}",
"public function in(array $list): array\n\t{\n\t\t$result = [];\n\n\t\tif (isset($list) && !empty($list))\n\t\t{\n\t\t\t$result = ['$in' => $list];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->error('One required non empty array argument should be passed to method', __METHOD__);\n\t\t}\n\t\t\n\t\treturn $result;\n\t}",
"public function checkin( $oid=null );",
"function dbQueryStudentIdList($ids)\n {\n $where = \" WHERE id IN (\" . arrayToDBString($ids) . \")\";\n $rs = $this->_getFullList($where);\n return $rs;\n }",
"function idbIn( $var, &$myConn )\n{\n if ( isset( $var ) && $var != '' )\n { return mysqli_real_escape_string( $myConn, $var ) ; }\n else\n { return '' ; }\n}",
"function master_sidebar_author_quick_search( $request = array() ) {\n\n\n\tif ( ! empty( $request ) && isset( $request['q'] ) ) {\n\n\t\t// Define query args for author query \n\t\t$roles = array( 'Administrator', 'Editor', 'Author' ); \n\t\t$db_id = -9999;\n\n\t\t// Get all users that have author priviledges\n\t\tforeach ( $roles as $role ) {\n\n\t\t\t$search_query = $request['q'];\n\n\t\t\t$args = array(\n\t\t\t\t'search_columns' => array( 'ID', 'user_login', 'user_nicename', 'user_email' ),\n\t\t\t\t'role' => $role,\n\t\t\t);\n\t\n\t\t\t// The Query\n\t\t\t$user_query = new WP_User_Query( $args );\n\n\t\t\t// Output search results\n\t\t\tif ( ! empty( $user_query->results ) ) {\n\t\t\t\tforeach ( $user_query->results as $user ) {\n\t\t\t\t\tif ( false !== stripos( $user->data->display_name, $search_query ) ) {\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<label class=\"menu-item-title\">\n\t\t\t\t\t\t\t\t<input type=\"checkbox\" value =\"1\" name=\"menu-item[<?php echo $db_id; ?>][menu-item-object-id]\" class=\"menu-item-checkbox\"> <?php echo $user->data->display_name; ?>\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t<input class=\"menu-item-db-id\" type=\"hidden\" value=\"0\" name=\"menu-item[<?php echo $db_id; ?>][menu-item-db-id]\">\n\t\t\t\t\t\t\t<input class=\"menu-item-object\" type=\"hidden\" value=\"<?php echo $user->data->ID; ?>\" name=\"menu-item[<?php echo $db_id; ?>][menu-item-object]\">\n\t\t\t\t\t\t\t<input class=\"menu-item-parent-id\" type=\"hidden\" value=\"0\" name=\"menu-item[<?php echo $db_id; ?>][menu-item-parent-id]\">\n\t\t\t\t\t\t\t<input class=\"menu-item-type\" type=\"hidden\" value=\"author_archive\" name=\"menu-item[<?php echo $db_id; ?>][menu-item-type]\">\n\t\t\t\t\t\t\t<input class=\"menu-item-title\" type=\"hidden\" value=\"<?php echo $user->data->display_name; ?>\" name=\"menu-item[<?php echo $db_id; ?>][menu-item-title]\">\n\t\t\t\t\t\t\t<input class=\"menu-item-url\" type=\"hidden\" value=\"<?php echo $user->data->user_url; ?>\" name=\"menu-item[<?php echo $db_id; ?>][menu-item-url]\">\n\t\t\t\t\t\t</li>\t\t\t\t\t\t\n\t\t\t\t\t\t<?php\n\t\t\t\t\t}\n\n\t\t\t\t\t$db_id++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} // endif\n}",
"function get_invested_accounts($tid)\n\t{\n\t return $this->db->select()\n\t\t ->from('pamm_accounts') \n\t\t ->where(\"login IN (select pamm_invested_accounts_login FROM pamm_invested_accounts WHERE pamm_invested_accounts_tid=$tid)\")\n\t\t ->where(\"pamm_accounts.active !='4'\")\t\n\t\t ->get()->result();\n\t}",
"function simplenews_build_subscription_filter_query(SelectQueryInterface $query) {\n if (isset($_SESSION['simplenews_subscriptions_filter'])) {\n foreach ($_SESSION['simplenews_subscriptions_filter'] as $key => $value) {\n switch ($key) {\n case 'list':\n if ($value != 'all') {\n list($key, $value) = explode('-', $value, 2);\n $query->condition('su.' . $key, $value);\n }\n break;\n case 'email':\n if (!empty($value)) {\n $query->condition('sn.mail', '%' . $value . '%', 'LIKE');\n }\n break;\n }\n }\n }\n}",
"public function evaluateFieldValue($value, $is_in, &$set)\n {\n \n //Initialize query to get Orcid data from tx_orcid table\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tx_orcid');\n\n //Initialize query to get Orcid data from tx_orcid table\n $qurBuildwork = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tx_orcid_workdata');\n\n\n //Get all data from tx_orcid_workdata table\n $cond_orcid_data = $queryBuilder->select('orcid_id')->from('tx_orcid')->execute();\n $cond_orcid_data = $cond_orcid_data->fetchAll();\n \n if (array_search($value , array_column($cond_orcid_data, 'orcid_id')) != true){\n\t\t\t\n $apiurl = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['orcid']);\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_URL, $apiurl['inputApiurl'].'/'.$value);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n $rst = curl_exec($ch);\n $urlRes = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n if($urlRes != 200){\n if($value != null){\n $this->flashMessage('Invalid field value', 'Please enter orcid id in correct format: 0000-0000-0000-0000', FlashMessage::ERROR);\n $set = false; //do not save value\n }\n }else{\n $this->msQuery($value, $rst);\n \n //Convert XML to JSON function\n $quer = $this->convertJSon($rst);\n \n //Work Curl API Function\n $this->workDataApi($qurBuildwork, $apiurl['inputApiurl'], $quer);\n if($value != null){\n $this->succFlashMessage('Input value is correct', 'Your Orcid id is: '.$value, FlashMessage::OK);\n }\n \n }\n }else{\n if($value != null){\n $this->succFlashMessage('Input value is correct', 'Your Orcid id is: '.$value, FlashMessage::OK);\n }\n \n }\n \n \n return $value; \n }",
"protected function parse_membership() {\n\n\t\tif ( ! empty( $this->args['membership'] ) ) {\n\t\t\t$this->args['membership__in'] = array( $this->args['membership'] );\n\t\t}\n\n\t\treturn $this->parse_in_or_not_in_query( 'membership', $this->args['membership__in'], $this->args['membership__not_in'] );\n\t}",
"public function andWhereIn($expr, $params = array(), $not = false)\n {\n return parent::andWhereIn($expr, $params === array() ? array(0) : $params, $not);\n }",
"function suid_PageAccess($getID){\r\n\t\r\n\tif(\r\n\t!is_array($_SESSION['suid']) && $_SESSION['suid']==$getID\r\n\t|| is_array($_SESSION['suid']) && in_array($getID,$_SESSION['suid'])\r\n\t){\r\n\t\treturn true;\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n}",
"public function findByUids(array $uids)\n {\n $query = $this->createQuery();\n $query->matching($query->in('uid', $uids));\n return $query->execute();\n }",
"function account_user($uid)\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('account');\n\t\t$this->db->where('pack_status','Y');\n\t\t$this->db->where('paystatus','TRUE');\n\t\t$this->db->where('approved','Y');\n\t\t$this->db->where('status','Y');\n\t\t$this->db->where('deleted','N');\n\t\t$this->db->where('user_id',$uid);\n\t\t$query = $this->db->get();\n\t\treturn $query;\t\n\t}",
"function jp_search_filter( $query ) {\n if ( $query->is_search && $query->is_main_query() ) {\n $query->set( 'post__not_in', array( 22,23,24,25 ) );\n }\n}",
"public function test_get_users_in_context() {\n $component = 'core_tag';\n\n $user1 = $this->set_up_tags()[0];\n $systemcontext = context_system::instance();\n\n $userlist1 = new \\core_privacy\\local\\request\\userlist($systemcontext, $component);\n provider::get_users_in_context($userlist1);\n $this->assertCount(1, $userlist1);\n $expected = [$user1->id];\n $actual = $userlist1->get_userids();\n $this->assertEquals($expected, $actual);\n\n // The list of users within the a context other than system context should be empty.\n $usercontext1 = context_user::instance($user1->id);\n $userlist2 = new \\core_privacy\\local\\request\\userlist($usercontext1, $component);\n provider::get_users_in_context($userlist2);\n $this->assertCount(0, $userlist2);\n }"
] | [
"0.6495714",
"0.5879846",
"0.5753212",
"0.5721153",
"0.56351167",
"0.5502334",
"0.5445983",
"0.5370739",
"0.5366118",
"0.5342043",
"0.52690643",
"0.526707",
"0.52370226",
"0.52168655",
"0.5216827",
"0.5216827",
"0.5216826",
"0.5212076",
"0.5195517",
"0.5193435",
"0.51743174",
"0.5170235",
"0.51607287",
"0.51602787",
"0.5159858",
"0.51561",
"0.5123574",
"0.5108626",
"0.50908047",
"0.5066438",
"0.506338",
"0.5044366",
"0.5033584",
"0.50300896",
"0.5021864",
"0.5011946",
"0.50112075",
"0.5003074",
"0.49985406",
"0.4977603",
"0.495936",
"0.49480724",
"0.49216238",
"0.49019086",
"0.48832777",
"0.4878091",
"0.48690784",
"0.4867032",
"0.48639134",
"0.4852032",
"0.48517293",
"0.4850469",
"0.4849627",
"0.48468325",
"0.48397517",
"0.48382238",
"0.48374125",
"0.48351344",
"0.48309377",
"0.48306438",
"0.48235986",
"0.4823331",
"0.48014757",
"0.4794839",
"0.47941434",
"0.47827667",
"0.47802967",
"0.4778563",
"0.47751728",
"0.47592527",
"0.47503465",
"0.47493166",
"0.47465402",
"0.47410318",
"0.47391102",
"0.4731542",
"0.47268045",
"0.4722971",
"0.47158208",
"0.47117898",
"0.470832",
"0.47074446",
"0.4706689",
"0.46914345",
"0.4689601",
"0.46891847",
"0.4685204",
"0.4685167",
"0.46844602",
"0.46769714",
"0.4669313",
"0.46639004",
"0.46598268",
"0.46557418",
"0.46552965",
"0.46439126",
"0.46392524",
"0.4634094",
"0.46339047",
"0.46277803"
] | 0.7238444 | 0 |
Get auth role id | public function can($permission_slug, $auth_id){
$role_id = $this->hasRole($auth_id);
if($role_id == 1){
return true;
}
$roles = $this->has_permission($role_id, $permission_slug);
if(count($roles) > 0) {
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getRoleID()\n {\n return self::getInstance()->_getRoleID();\n }",
"public function _getRoleID()\n {\n $this->selftest();\n return $this->objectUser->RoleID;\n }",
"function get_role_id(){\n return $this->role_id;\n }",
"public function getRoleID(string $role):string;",
"public function getRoleId()\n {\n return $this->__get(\"role_id\");\n }",
"public function getRoleId()\n {\n return $this->role_id;\n }",
"public function getRoleId()\n {\n return $this->role_id;\n }",
"function get_role_id()\n\t{\n\t\treturn $this->ci->session->userdata('DX_role_id');\n\t}",
"function get_user_role_id(){\n return $this->user_role_id;\n }",
"public function getRoleId()\n {\n return $this->roleId;\n }",
"public function getRoleId()\n {\n return $this->roleId;\n }",
"public function getRoleId()\n {\n return $this->roleId;\n }",
"public function getRoleId() {\n if (Yii::app()->getSession()->get('roleId'))\n return Yii::app()->getSession()->get('roleId');\n return null;\n }",
"public static function getEntityRoleID()\n\t{\n\n\t\t/**\n\t\t * retrieve role from Zend_Auth instance\n\t\t */\n\t\tif (Zend_Auth::getInstance()->hasIdentity()) {\n\t\t\t$entityModel = Zend_Auth::getInstance()->getIdentity();\n\t\t} else {\n\t\t\t$entityModel = NULL;\n\t\t}\n\n\t\tif ($entityModel instanceof Default_Model_Entity) {\n\t\t\t$roleID = $entityModel->Role->id;\n\t\t} else {\n\t\t\t$roleID = self::getRoleIdByShort('guest');\n\t\t}\n\n\t\treturn $roleID;\n\t}",
"public function getRole(): int\n {\n return $this->role;\n }",
"public function getRoleId() {\n return $this->roleId;\n }",
"public function getAuthenticatedRole();",
"public function getRoleId()\n {\n if (array_key_exists(\"roleId\", $this->_propDict)) {\n return $this->_propDict[\"roleId\"];\n } else {\n return null;\n }\n }",
"public function getRoleId()\n {\n // return the first parent role\n foreach ($this->getUserRoles() as $role) {\n return $role->getRoleId();\n }\n }",
"public function getRoleId()\n\t{\n\t\treturn $this->_roleId;\n\t}",
"public function getRoleCode(){\n\t\t/* return user code */\n\t\treturn $this->_intRoleCode;\n\t}",
"public function getRole()\n {\n return $this->_getVar('user_role');\n }",
"public function getRole();",
"public function getRole();",
"public static function getRole(){\n $role = Auth::user()->role_id ;\n switch($role){\n case 1 :\n return \"admin\";\n break;\n case 2 :\n return \"khateeb\";\n break ;\n case 3 :\n return \"ad\";\n break;\n default:\n return \"false\";\n }\n }",
"public function getUsers_role_id()\n {\n return $this->users_role_id;\n }",
"public static function getAdminRoleID()\n {\n $AdminRoleID = self::getInstance()->getConfig()->Admin->RoleID;\n if (!$AdminRoleID) {\n $tableUserRole = new User_Role_Table();\n $objectUserRole = $tableUserRole->fetchRow( $tableUserRole->select()->where('Name = ?', 'Admin') );\n $AdminRoleID = is_object($objectUserRole) ? $objectUserRole->ID : 1;\n }\n return $AdminRoleID;\n }",
"protected function _getUserRoleId()\n {\n $cuser = $this->_getUser();\n $role_id = (empty($cuser)) ? ROLE_GUEST : $cuser['role_id'];\n\n return $role_id;\n }",
"public function getRoleId() {\n return($this->{Foomy_Model_Role_Peer::F_ROLE_ID});\n }",
"public function getRole() {}",
"function getRole()\n\t{\n\t\tif (($role = $this->getState('__role')) !== null)\n\t\t\treturn $this->role;\n\t\telse\n\t\t\treturn 0;\n\t}",
"public function getRole() {\n\n return session('role');\n\n }",
"function getRole() {\n\t\treturn 1;\n\t}",
"private function _getRole()\n {\n //return role\n if(false/*logged_in*/){\n\n }else{\n $this->load->Model('user_roles/Mdl_roles');\n return $this->Mdl_roles->getRolesName();\n }\n }",
"public function getRole() : string;",
"function get_role_id($role_id)\r\n {\r\n $role = $this->db->get_where('staff',array('staff_id'=>$role_id))->result_array();\r\n return $role;\r\n }",
"public function getRole() \n {\n return $this->_fields['Role']['FieldValue'];\n }",
"public function get_role($id){\n $this->db->select('role_id');\n $this->db->from('event_admin');\n $this->db->where('event_id', $id);\n $this->db->where('admin_id', $this->session->admin_id);\n $query = $this->db->get();\n $row = $query->row_array();\n return $row['role_id'];\n }",
"public function getRole() {\n $user = new Pas_User_Details();\n $person = $user->getPerson();\n if ($person) {\n $this->_role = $person->role;\n } \n return $this->_role;\n }",
"static public function getRole() {\n\t\tif(!Yii::$app->user->isGuest) {\n\t\t\tif($role = AuthAssignment::findOne(['user_id' => Yii::$app->user->identity->id]))\n\t\t\t\tif($key = array_search($role->item_name, Yii::$app->params['league_roles']))\n\t\t\t\t\treturn $key;\n\t\t\treturn self::DEFAULT_ROLE;\n\t\t}\n\t\treturn null;\n\t}",
"public function getRole()\n {\n return $this->sessionStorage->user['role'];\n }",
"function get_role($role_id) {\n\t\treturn $this->db->get_where('system_security.security_role', array('role_id' => $role_id));\n\t\t\n\t}",
"public function getRole() {\n return($this->role);\n }",
"public function getRole()\n {\n return $this->role;\n }",
"public function getRole()\n {\n return $this->role;\n }",
"public function getRole()\n {\n return $this->role;\n }",
"public function getRole()\n {\n return $this->role;\n }",
"public function getRole()\n {\n return $this->role;\n }",
"public function getRole()\n {\n return $this->role;\n }",
"public function getRole()\n {\n return $this->role;\n }",
"public function getRole()\n {\n return $this->role;\n }",
"public function getRole()\n {\n return $this->role;\n }",
"public function getRole()\n {\n return $this->role;\n }",
"public function getId() : string\n {\n return $this->get('id', 'roles');\n }",
"public function get_role()\n {\n }",
"public function getIdAccessRole()\n {\n return $this->idAccessRole;\n }",
"public function getRoleId()\n {\n return $this->RoleId;\n }",
"public function getRole() : string\n {\n return $this->role;\n }",
"public function getRole() {\n return $this->role;\n }",
"protected function getAdminRoleId()\n {\n try {\n /** @var \\Magento\\Authorization\\Model\\ResourceModel\\Role\\Collection $roleCollection */\n $roleCollection = $this->roleCollectionFactory->create();\n $roleCollection\n ->setRolesFilter()\n ->setUserFilter(null, UserContextInterface::USER_TYPE_ADMIN);\n $roleCollection->load();\n if ($roleCollection->getSize() > 0) {\n /** @var \\Magento\\Authorization\\Model\\Role $adminRole */\n $adminRole = $roleCollection->getFirstItem();\n\n return $adminRole->getId();\n }\n\n } catch (\\Exception $e) {\n $this->logger->error($e->getMessage());\n }\n\n return false;\n }",
"public function getRole(): string\n {\n $roles = RoleEnum::getConstants();\n\n return $roles[$this->role][1];\n }",
"public function getRole(){\r\n\t\t\treturn $this->role;\r\n\t\t}",
"function getRole()\n {\n return $this->role;\n }",
"protected function _getRole(){\n\t$user = new Pas_User_Details();\n $person = $user->getPerson();\n if($person){\n \treturn $person->role;\n } else {\n \treturn false;\n }\n }",
"public function getRole() \n {\n return $this->role;\n }",
"public function getId() {\n return($this->{Foomy_Model_Role_Peer::F_ID});\n }",
"public function getRole(): ?int\n {\n return $this->role ?? null;\n }",
"public function getRole()\n {\n $userIdentity = $this->getIdentity();\n if ($userIdentity === false) {\n return false;\n }\n return $userIdentity->role;\n }",
"function role() {\n isset($this->_role) || $this->_load_from_session();\n return $this->_role;\n }",
"public static function getRole($id_or_email=false){\n self::init();\n\n if(self::isLoggedIn() && $id_or_email === false){\n return $_SESSION['logged_user_role'];\n } else {\n $role = self::$db->get(CONFIG['AUTH_USERS_TABLE'], self::$role_field, [\n 'OR' => [\n self::$email_field => $id_or_email,\n self::$id_field => $id_or_email,\n ]\n ]);\n\n return !is_null($role) ? $role : false;\n }\n }",
"function IdRole($name)\n {\n $role = Catalogo::select('id')->table('ROLES')->where('codigo',$name)->first();\n return $role->id;\n }",
"function getRoleId($roleString) {\n $statement = 'SELECT id FROM role_lov where role = (?)';\n $query = $this->prepare($statement);\n $query->execute([$roleString]);\n return $query->fetch()['id'];\n }",
"public function getRole(){\n return $this->role; \n }",
"public function getROLE()\n {\n return $this->hasOne(Role::className(), ['id' => 'ROLE']);\n }",
"public function getRole()\n {\n $res = $this->getEntity()->getRole();\n\t\tif($res === null)\n\t\t{\n\t\t\tSDIS62_Model_DAO_Abstract::getInstance($this::$type_objet)->create($this);\n\t\t\treturn $this->getEntity()->getRole();\n\t\t}\n return $res;\n }",
"public function getUserRole()\r\n {\r\n $admin_user_session = Mage::getSingleton('admin/session');\r\n $adminUserId = $admin_user_session->getUser()->getUserId();\r\n return Mage::getModel('admin/user')->load($adminUserId)->getRole()->role_name;\r\n }",
"public function getRole()\n\t{\n\t\t$column = self::COL_ROLE;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}",
"public function getRoleId()\n {\n return $this->db->get('role_id')->result_array();\n }",
"function wv_get_loggedin_user_role() {\n global $current_user;\n\n $user_roles = $current_user->roles;\n $user_role = array_shift($user_roles);\n\n return $user_role;\n }",
"public function getRol_id()\n {\n return $this->rol_id;\n }",
"public function getRole()\n {\n return $this->access_level;\n }",
"public static function getGuestRoleID()\n {\n $GuestRoleID = self::getInstance()->getConfig()->Guest->RoleID;\n if (!$GuestRoleID) {\n $tableUserRole = new User_Role_Table();\n $objectUserRole = $tableUserRole->fetchRow( $tableUserRole->select()->where('Name = ?', 'Guest') );\n $GuestRoleID = is_object($objectUserRole) ? $objectUserRole->ID : 4;\n }\n return $GuestRoleID;\n }",
"function cs_get_user_role() {\n\tglobal $current_user;\n\t$user_roles = $current_user->roles;\n\t$user_role = array_shift($user_roles);\n\treturn $user_role;\n}",
"public function getRole(): ?string\n { \n return $this->role;\n }",
"public function getRoleid($rolename)\n {\n $pack = pack(\"N\", -1).$this->gamed->packString($rolename).pack(\"C\", 1);\n $data = $this->gamed->deleteHeader($this->gamed->SendToGamedBD($this->gamed->createHeader($this->data['code']['getRoleid'], $pack)));\n $var = unpack(\"l\", $data);\n if($var[1] !== -1)\n {\n $var = unpack(\"N\", $data);\n }\n return $var[1];\n }",
"public function getRoleDefinitionId()\n {\n if (array_key_exists(\"roleDefinitionId\", $this->_propDict)) {\n return $this->_propDict[\"roleDefinitionId\"];\n } else {\n return null;\n }\n }",
"public function get_role($role)\n {\n }",
"public static function getUserRole()\n {\n return self::getInstance()->_getUserRole();\n }",
"public function getRole()\n\t{\n\t\tif ($this->roles->count())\n\t\t\treturn $this->roles[0]->name;\n\n\t\treturn null;\n\t}",
"public function get_role_id($role_slug) {\n return intval($this->db->get_where('ea_roles', array('slug' => $role_slug))->row()->id);\n }",
"function getRole($roleId) {\n $statement = 'SELECT role FROM ROLE_LOV where id = (?)';\n $query = $this->prepare($statement);\n $query->execute([$roleId]);\n return $query->fetch();\n }",
"public function getRole()\n {\n return $this->getPredisClient()->role();\n }",
"private function getUserRole($id) { \n $dv_role = Yii::$app->db->createCommand(\"SELECT meta_value FROM assist_user_meta WHERE uid = '$id' AND meta_key = 'role'\")->queryAll();\n return $dv_role;\n }",
"public function getRole(){\n\t\tif (current_user_can('editor')) {\n\t\t\t$this->role_object = get_role('editor');\n\t\t}\n\t}",
"public function get_teachers_role_id()\n\t{\n\t\t$this->db->select('roles_id');\n\t\t$this->db->from('cms_roles');\n\t\t$this->db->where('roles_name','Teachers');\n\t\t$query = $this->db->get();\n\t\treturn $query->row();\n\t}",
"function get_role() {\n if(is_valid_user()) {\n return $_SESSION['role'];\n } else {\n return null;\n }\n}",
"public function GetUserRole()\n {\n return $this->role;\n }",
"function getUserRoleName()\n{\n return array_flip(getConfig('role'))[Auth::user()->role_id];\n}",
"public function getRole()\n {\n return $this->getName();\n }",
"public function getPermissionRoleByRoleID($id);",
"public function getUserRole()\n {\n return $this->userRole;\n }"
] | [
"0.82005644",
"0.80408925",
"0.8031758",
"0.7941389",
"0.7857301",
"0.78206444",
"0.78206444",
"0.780773",
"0.7767318",
"0.76720816",
"0.76720816",
"0.76720816",
"0.76661974",
"0.7645287",
"0.76444864",
"0.7622688",
"0.75823206",
"0.7536513",
"0.751394",
"0.7466578",
"0.746188",
"0.7421057",
"0.7404266",
"0.7404266",
"0.739608",
"0.7392601",
"0.7372469",
"0.73549783",
"0.7331322",
"0.73269016",
"0.73080504",
"0.73040426",
"0.7302139",
"0.7297515",
"0.72650725",
"0.7227827",
"0.7224216",
"0.7194021",
"0.7185066",
"0.7182671",
"0.7143648",
"0.7137669",
"0.7132432",
"0.7130734",
"0.7130734",
"0.7130734",
"0.7130734",
"0.7130734",
"0.7130734",
"0.7130734",
"0.7130734",
"0.7130734",
"0.7130734",
"0.712006",
"0.71132416",
"0.70849955",
"0.70737076",
"0.7071803",
"0.7067789",
"0.7061771",
"0.70531815",
"0.7052247",
"0.7051028",
"0.7038506",
"0.7018002",
"0.7006899",
"0.6995212",
"0.69879407",
"0.6961284",
"0.6958103",
"0.6957246",
"0.6942431",
"0.6922125",
"0.689261",
"0.68859553",
"0.686958",
"0.6862588",
"0.6861866",
"0.68572754",
"0.6846634",
"0.682547",
"0.68222773",
"0.681642",
"0.6786658",
"0.67835766",
"0.6778629",
"0.67767626",
"0.67758155",
"0.6748096",
"0.673474",
"0.6714147",
"0.67046505",
"0.6692272",
"0.6679781",
"0.66716623",
"0.66664433",
"0.66659987",
"0.6659848",
"0.6640874",
"0.663201",
"0.6621121"
] | 0.0 | -1 |
Run the database seeds. | public function run()
{
// $this->call(UsersTableSeeder::class);
DB::table('users')->insert([
'name' => 'Lumina',
'email' => '[email protected]',
'password' => Hash::make('Moon2202')
]);
} | {
"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 |
try to connect to Oracle student database | function display_existing_report_info_user($login, $password, $report)
{
$conn = hsu_conn_sess($login, $password);
$report_query = 'SELECT REPORT_ID, START_TIME, END_TIME, REPORT_DATE, BEACH_NAME, SURVEY_SUMMARY '.
'FROM REPORTS, BEACHES '.
'WHERE REPORTS.BEACH_ABBR = BEACHES.BEACH_ABBR '.
'AND REPORT_ID = :REPORT';
$query_stmt = oci_parse($conn, $report_query);
oci_bind_by_name($query_stmt, ":report", $report);
oci_execute($query_stmt, OCI_DEFAULT);
oci_fetch($query_stmt);
?>
<form class="form-inline" action="<?= htmlentities($_SERVER['PHP_SELF'],ENT_QUOTES) ?>" method="post">
<div class="form-group">
<fieldset>
<legend> Report Details </legend>
<p name="report_details">
Report ID : <?= oci_result($query_stmt, "REPORT_ID"); ?> <br>
Beach : <?= oci_result($query_stmt, "BEACH_NAME"); ?> <br>
Date : <?= oci_result($query_stmt, "REPORT_DATE"); ?> <br>
Start Time: <?= oci_result($query_stmt, "START_TIME"); ?> <br>
End Time: <?= oci_result($query_stmt, "END_TIME"); ?> <br>
Survey Summary: <?= oci_result($query_stmt, "SURVEY_SUMMARY"); ?> <br>
</p>
<?php
oci_free_statement($query_stmt);
$entries_query = 'SELECT PRN, HSU_USERNAME, SPEC_NAME, POST_SURVEY_TAG, '.
'EXISTING_TAGS, PHOTOS, COMMENTS '.
'FROM REPORT_ENTRIES, SPECIES '.
'WHERE REPORT_ENTRIES.SPECIES_ABBR = SPECIES.SPEC_ABBR '.
'AND REPORT_ID = :REPORT';
/* $entries_query = 'SELECT PRN, HSU_USERNAME, SPECIES_ABBR, COMMENTS '.
'FROM REPORT_ENTRIES '.
'WHERE REPORT_ID = :REPORT '; */
$entries_stmt = oci_parse($conn, $entries_query);
oci_bind_by_name($entries_stmt, ":report", $report);
oci_execute($entries_stmt, OCI_DEFAULT);
?>
<fieldset>
<legend> Entries </legend>
<?php
$entry_count = 0;
while(oci_fetch($entries_stmt))
{
$entry_count = $entry_count + 1;
$curr_prn = oci_result($entries_stmt, "PRN");
$curr_user = oci_result($entries_stmt, "HSU_USERNAME");
$curr_species = oci_result($entries_stmt, "SPEC_NAME");
//$curr_species = oci_result($entries_stmt, "SPEC_ABBR");
$curr_surv_tag = oci_result($entries_stmt, "POST_SURVEY_TAG");
$curr_exist_tag = oci_result($entries_stmt, "EXISTING_TAGS");
$curr_photos = oci_result($entries_stmt, "PHOTOS");
$curr_comments = oci_result($entries_stmt, "COMMENTS");
?>
<label for="entries"> Entry #<?=$entry_count?> </label>
<p name="entry_details">
PRN : <?= $curr_prn ?> <br>
Surveyor : <?= $curr_user ?> <br>
Species : <?= $curr_species ?> <br>
Existing Tags? : <?= $curr_exist_tag ?> <br>
Post Survey Tag? : <?= $curr_surv_tag ?> <br>
Photos? : <?= $curr_photos ?> <br>
Comments : <?= $curr_comments ?> <br>
</p>
<?php
}
oci_free_statement($entries_stmt);
?>
</fieldset>
<input type="submit" name="report_view_by_user" value="Go Back" />
<input type="submit" name="main_menu" value="Main Menu" />
</fieldset>
</div>
</form>
<?php
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function connect() {\n\t \t\tif (!extension_loaded('oci8')) {\n\t throw new SQLException('OCI8 extension not loaded');\n\t }\t\t\n\t\t\t$dsn = $this->dsn;\n\n\t\t\t$user = $dsn['username'];\n\t\t\t$pass = $dsn['password'];\n\t\t\t$hostspec = $dsn['hostspec'];\n\t\t\t$db\t= $dsn['database'];\n\t\t\t\n\t\t\tif ($db && $hostspec && $user && $pass) {\n\t\t\t\t$resource = oci_connect($user, $pass, \"//$hostspec/$db\", $this->charset);\n\t\t\t}\n\t\t\telseif ($hostspec && $user && $pass) {\n\t\t\t\t$resource = oci_connect($user, $pass, $hostspec, $this->charset);\n\t\t\t}\n\t\t\telseif ($user || $pass) {\n\t\t\t\t$resource = oci_connect($user, $pass, null, $this->charset);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$resource = false;\n\t\t\t}\n\t\t\t\n\t\t\tif (!$resource) {\n\t\t\t\tthrow new SqlConnectionError($this);\n\t\t\t}\n\t\t\t$this->resource = $resource;\n\t\t\t$this->query(\"ALTER SESSION SET NLS_DATE_FORMAT='\" . $this->timestamp . \"'\");\n\t\t\treturn true;\t \t\n\t\t}",
"public function connect(){\n $this->con = oci_connect($this->user, $this->pass, $this->db, 'AL32UTF8');\n if( !$this->con){\n $e = oci_error();\n throw new Exception(\"Error al conectar db; \"\n . \"User: {$this->user}, Database: {$this->db}, Error: \"\n . $e);\n\n }\n\n }",
"function connect(){\n\n\t//Connects to my Oracle username\n\t$connection = oci_connect('dekinder', 'qwertyuiop1');\n\tif (!$connection) {\n\n\t\t//Gets last error array\n\t\t$e = oci_error();\n\n\t\t//Triggers error with HTML safe error message. \n\t\ttrigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);\n\t}\n\n\treturn $connection;\n}",
"function __construct() {\n\n $conection['server']=\"localhost\"; //host\n $conection['user']=\"dario\"; // usuario\n $conection['pass']=\"dario\"; //password\n $conection['base']=\"INNSADB\"; //base de datos\n\n $conect = oci_connect($conection['user'], $conection['pass'], $conection['server'],'AL32UTF8');\n //el parametro 'AL32UTF8' soluciona todo el tema de los acentos\n if (!$conect) {\n $m = oci_error();\n echo $m['message'], \"\\n\";\n exit;\n } else {\n //echo \"Conexión con éxito a Oracle!\";\n $this->con=$conect;\n }\n\n }",
"private function oracle()\n\t{\n\t\tif (isset($this->_conf['dbname']) AND $this->_conf['dbname'] != '')\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$this->_con = new PDO('OCI:dbname='.$this->_conf['dbname'].';charset=UTF-8', $this->_conf['username'], $this->_conf['password']);\n\t\t\t\t\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\tcatch(PDOException $ex)\n\t\t\t{\n\t\t\t\tif (isset($this->_conf['debug']) AND $this->_conf['debug'] == TRUE)\n\t\t\t\t{\n\t\t\t\t\terror('PDOCON->Oracle', $ex->getMessage(), 500, TRUE);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\twriteLog('Error', $ex->getMessage());\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\twriteLog('Error', \"PDOCON->Oracle: Invalid 'database name' or 'host name'\");\n\t\t\t\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"function connect_to_db(){\n\t\t//Fun Fact: @ suppresses errors of the expression it prepends\n\t\t\n\t\t//Connect to the database and select the database\t\t\t\n\t\ttry{\n\t\t\t$this->connection = new PDO(\"mysql:host=$DATABASE_HOST;dbname=DATABASE_NAME\", DATABASE_USER, DATABASE_PASS);\n\t\t\t$this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t}catch(PDOException $err){\n\t\t\tdie('Could not connect to database' . $err->getMessage());\n\t\t}\t\t\n\t}",
"private static function _connect()\n {\n try {\n self::$_dbh = new PDO(DB_DSN, DB_USERNAME, DB_PASSWORD);\n }\n catch (PDOException $e) {\n echo \"Failure to connect to database. \".$e->getMessage();\n }\n }",
"function connect() {\r\n\t\t\tif ( $this->_conn == null ) {\r\n\t\t\t\t$conn = @OCILogon( $this->_user, $this->_pass, $this->_db );\r\n\t\t\t\tif ( ! $conn ) { \r\n\t\t\t\t\t$error = ocierror( $conn );\r\n\t\t\t\t\ttrigger_error( $error['message'], YD_ERROR );\r\n\t\t\t\t}\r\n\t\t\t\t$this->_conn = $conn;\r\n\t\t\t\t$stmt = OCIParse(\r\n\t\t\t\t\t$this->_conn, 'ALTER SESSION SET NLS_DATE_FORMAT=\\'' . $this->_NLS_DATE_FORMAT . '\\''\r\n\t\t\t\t);\r\n\t\t\t\t@OCIExecute( $stmt );\r\n\t\t\t}\r\n\t\t}",
"private function connectDatabase() {\r\r\n\t\t$this->dbHandle = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Database\\\\DatabaseConnection');\r\r\n\t\t$this->dbHandle->setDatabaseHost($this->dbHost);\r\r\n\t\t$this->dbHandle->setDatabaseUsername($this->dbUsername);\r\r\n\t\t$this->dbHandle->setDatabasePassword($this->dbPassword);\r\r\n\t\t$this->dbHandle->setDatabaseName($this->db);\r\r\n\t\t$this->dbHandle->sql_pconnect();\r\r\n\t\t$this->dbHandle->sql_select_db();\r\r\n\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}",
"private function connectToDb()\n {\n //home connect\n $link =pg_connect(\"host=localhost dbname=user1 user=postgres\");\n if(!$link)\n {\n die('Connect Error');\n }\n $this->dbConnect = $link;\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 }",
"function connect()\r\n {\r\n $conn = oci_connect('ptr', 'ptr', 'ptrmanagement.online:1521/xe');\r\n\r\n if (!$conn) \r\n {\r\n $e = oci_error();\r\n trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);\r\n }\r\n else\r\n return $conn;\r\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 connect(){\n \n $conn = oci_connect('pulse','CamLine4gdl','mestq'); \n if (!$conn) {\n $e = oci_error();\n trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);\n //trigger_error(htmlentities($e['message']), E_USER_ERROR);\n }\n return $conn;\n }",
"private function connect() {\n $host = $this->dbConfig[$this->selected]['host'];\n $login = $this->dbConfig[$this->selected]['login'];\n $password = $this->dbConfig[$this->selected]['password'];\n $database = $this->dbConfig[$this->selected]['database'];\n try {\n $this->db = new PDO('mysql:host=' . $host . ';dbname=' . $database . ';charset=utf8', $login, $password);\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n//\t\t\t$this->db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n } catch (PDOException $e) {\n die('Could not connect to DB:' . $e);\n }\n }",
"function conectar() {\n $conn = oci_connect(\"ADMIN\", \"1234\", \"localhost/XE\");\n if (!$conn) {\n $e = oci_error(); \n echo $e['message'].\"<br>\";\n }else{ \n return $conn;\n }\n }",
"public function __construct()\n\t{\n // $this->connbmp = oci_connect('MEN_PHORS', 'PhDbsmart$#12345', '10.12.36.133:1536/ora12c');\n $this->conninhouse = oci_connect('CRM_INHOUSE', 'Crmsupport@20210224', '10.12.5.191:1526/suseora');\n \n if(!$this->conninhouse){\n $e = oci_error();\n //var_dump($e);\n die('Connection failed; DbConn.php; '. $e['code'] . '; ' . $e['message']);\n }\n // if (!$this->conn) {\n // $e = oci_error();\n // //var_dump($e);\n // die('Connection failed; DbConn.php; '. $e['code'] . '; ' . $e['message']);\n // }\n\n // if(!$this->connbmp){\n // $e = oci_error();\n // //var_dump($e);\n // die('Connection failed; DbConn.php; '. $e['code'] . '; ' . $e['message']);\n // }\n \n\t}",
"protected function connectDB () {\n $host=$this->Parameters['db_host'];\n $username=$this->Parameters['db_username'];\n\t\t$password=$this->Parameters['db_userpassword'];\n\t\t$dbname=$this->Parameters['db_name'];\n\t\t\n $this->Conn = new mysqli ($host,$username,$password,$dbname);\n if($this->Conn->connect_errno > 0){\n throw new Exception('Unable to connect to database [' . $this->Conn->connect_error . ']');\n }\n }",
"private function openConnection()\n\t{\n if (!($this->link = mysql_connect($this->host, $this->user, $this->pass))){\n throw new DatabaseExceptions(302);\n }\n\n $db_selected = mysql_select_db($this->db, $this->link);\n if (!$db_selected) {\n throw new DatabaseExceptions(303);\n }\n\n\t}",
"public function connect($username, $password, $isSysdba = false, $schema = null)\n {\n if ($this->host == \"localhost/XE\") {\n $connectionStr = \"localhost/XE:\" . $this->port;\n } else {\n $connectionStr = \"( DESCRIPTION= ( ADDRESS_LIST = ( ADDRESS = (PROTOCOL = TCP)(HOST = $this->host )(PORT = $this->port) ) ) ) )\";\n }\n\n if (empty($username)) {\n throw new DBCException(\"No username has been specified\", 10101);\n }\n if ($isSysdba) {\n $conn = oci_connect($username, $password, $connectionStr, $this->charset, OCI_SYSDBA);\n } else {\n $conn = oci_connect($username, $password, $connectionStr, $this->charset);\n }\n\n if ($conn == false) {\n throw new DBCException(\"Can't connect to database. Error returned \" . oci_error()[\"message\"], 10102);\n }\n\n $this->connection = $conn;\n\n if (!empty($schema)) {\n try{\n $this->switchSchema($schema);\n }catch(DBCException $e){\n $this->connection = null;\n $msg = \"connection established succefully but couldn't switch schema.\n Original error : \" . $e->getMessage();\n throw new DBCException($msg, 10105);\n }\n }\n\n return true;\n }",
"function conectarBD($usuario, $password) {\n $conn = oci_connect($usuario, $password, \"localhost/XE\");\n if (!$conn) {\n $e = oci_error(); \n echo $e['message'].\"<br>\";\n }else{ \n return $conn;\n }\n }",
"public function conectar()\n{\n// $host = 'localhost:c:\\Embebed21\\SOCIOS.FDB';\n$host='localhost:socioss';\n // $host = '192.168.10.201:base';\n $nombre_usuario='SYSDBA';\n $contrasenya='masterkey';\n $this->conexion = ibase_connect($host, $nombre_usuario, $contrasenya,'UTF-8') or die( ibase_errmsg() );\n}",
"public function connect() {\n if ($this->link = mysql_connect($this->host, $this->user, $this->pass)) {\n if (!empty($this->name)) {\n if (!mysql_select_db($this->name)) {\n $this->exception(\"Could not connect to the database!\");\n }\n }\n } else {\n $this->exception(\"Could not create database connection!\");\n }\n }",
"function connect($server, $username, $password, $databseName, $showerror=true)\t\t\t\r\n\t{\t\r\n\t\t$this->link = new Database(DATABASE_NAME);\t\t\t\r\n\t}",
"private function connect()\n {\n //variable con el nombre del server\n $server = \"localhost\";\n //variable con el nombre de la base\n $database = \"candidatossv\";\n //variable con el usuario de la base\n $username = \"root\";\n //variable con la contra de la base\n $password = \"\";\n try {\n //realizando conexion\n @self::$connection = new PDO(\"mysql:host=$server; dbname=$database; charset=utf8\", $username, $password);\n } catch (PDOException $exception) {\n //mostrando el tipo de excepcion al realizar la conexion\n throw new Exception($exception->getCode());\n }\n }",
"public function connect()\n {\n $driver = 'DB'; // default driver\n $dsn = $this->getParameter('dsn');\n\n $do = $this->getParameter('dataobject');\n if ($do && isset($do['db_driver'])) {\n $driver = $do['db_driver'];\n }\n\n if ('DB' == $driver) {\n\n if (!class_exists('DB')) {\n include('DB.php');\n }\n\n $options = PEAR::getStaticProperty('DB', 'options');\n if ($options) {\n $this->connection = DB::connect($dsn, $options);\n } else {\n $this->connection = DB::connect($dsn);\n }\n \n } else {\n\n if (!class_exists('MDB2')) {\n include('MDB2.php');\n }\n \n $options = PEAR::getStaticProperty('MDB2', 'options');\n $this->connection = MDB2::connect($dsn, $options);\n }\n\n if (PEAR::isError($this->connection)) {\n\n throw new AgaviDatabaseException($this->connection->getMessage());\n $this->connection = Null;\n }\n }",
"public function SetupOracle($host, $port, $dbName, $user, $pass)\n {\n die($this->Prints(\"Sorry, this option not yet supported.\"));\n }",
"private function func_connect() {\n $this -> lnk = mysql_connect($this -> host, $this -> user, $this -> password, true) OR die('Could not connect to the database - Why: '.mysql_error());\n mysql_select_db($this -> database) OR die('Could not find database: '.mysql_error());\n }",
"public function conect_ssql(){\n\n $conn = mssql_connect($this->servidor, $this->usuario, $this->senha);\n if($conn == FALSE) die(\"Couldn't connect\");\n\n if(mssql_select_db($this->dbname, $conn))\n $result = \"Selected {$this->dbname} ok<br />\";\n else\n die('Failed to select DB');\n }",
"function connect($tns = TNS, $usr = DB_SERVER_USERNAME, $pwd = DB_SERVER_PASSWORD,$dbName = DB_NAME) \n { \n \n\t\t\t$this->setTns($tns);\n\t\t\t$this->setUser($usr);\n\t\t\t$this->setPass($pwd);\n $this->setDb($dbName);\n \n\t\t\tif($this->conn = mysql_connect($this->tnsName ,$this->user, $this->pass)) \n {\n if(!mysql_select_db($this->dbName))\n {\n $this->connectionStatus = false;\n return;\n }\n\t\t\t\t$this->connectionStatus = true;\n\t\t\t}\n\t\t}",
"abstract public function OpenConnection( $user, $pass, $ip, $port, $db, $options );",
"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}",
"function connect()\n {\n $this->db = new PDO($this->dns,$this->user,$this->pass,$this->option);\n $this->db->setAttribute(PDO::ATTR_ERRMODE , PDO::ERRMODE_EXCEPTION);\n\n }",
"public function connect_db($dsn, $login, $password)\n {\n try {\n $this->db = new PDO($dsn, $login, $password);\n } catch (PDOException $e) {\n $this->debug($e->getMessage());\n $this->file_not_found(); //program terminates in function file_not_found()\n }\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $this->db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);\n\n $driver = $this->db->getAttribute(PDO::ATTR_DRIVER_NAME);\n $this->debug(\"our driver is $driver\");\n\n switch ($driver) {\n case 'mysql':\n $quoter = '`';\n break;\n case 'pgsql':\n if (DEFAULT_DSN_SCHEMA) {\n $this->db->exec('SET SEARCH_PATH=' . DEFAULT_DSN_SCHEMA);\n }\n $quoter = '\"';\n break;\n default:\n $quoter = '';\n break;\n }\n define('DB_FIELD_QUOTE', $quoter);\n }",
"function function2($user,$password,$dbase)\n{\n\tvar_dump($c = oci_pconnect($user,$password,$dbase));\n\tdrcp_select_value($c);\n}",
"public function connectToDB() {}",
"public function connect_db() {\n }",
"public function open_conn(){\n \n \n $this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS);\n \n if(!$this->connection){\n die(\"Database Connection Failed because: \" . mysql_error());\n }else{\n $db_select = mysql_select_db(DB_NAME,$this->connection);\n if(!$db_select){\n die(\"Database Connection Failed because: \" .mysql_error());\n }\n }\n }",
"private function openDatabaseConnection()\n {\n\n // set the (optional) options of the PDO connection. in this case, we set the fetch mode to\n // \"objects\", which means all results will be objects, like this: $result->user_name !\n // For example, fetch mode FETCH_ASSOC would return results like this: $result[\"user_name] !\n // @see http://www.php.net/manual/en/pdostatement.fetch.php\n $options = array(\\PDO::ATTR_DEFAULT_FETCH_MODE => \\PDO::FETCH_OBJ, \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_WARNING);\n\n // generate a database connection, using the PDO connector\n // @see http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/\n $this->db = new \\PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=' . DB_CHARSET, DB_USER, DB_PASS, $options);\n }",
"function __construct($login, $pwd) {\r\n $stringConnect = \" \r\n (DESCRIPTION =\r\n (ADDRESS_LIST =\r\n (ADDRESS = (PROTOCOL = TCP)(HOST = \".self::$host.\")(PORT = \".self::$port.\"))\r\n )\r\n (CONNECT_DATA =\r\n (SERVICE_NAME = \".self::$name.\")\r\n )\r\n )\";\r\n try{\r\n // connexion\r\n parent::__construct('oci:dbname='.$stringConnect, $login, $pwd, array(PDO::ERRMODE_EXCEPTION => true)) ; \r\n // enregistrement des informations dans les variables de session\r\n $_SESSION[\"login\"] = $login ;\r\n $_SESSION[\"pwd\"] = $pwd ;\r\n } catch (PDOException $ex) {\r\n // erreur de connexion, on supprime les variables de session si elles existent\r\n if (isset($_SESSION[\"login\"])){\r\n unset($_SESSION[\"login\"]) ;\r\n unset($_SESSION[\"pwd\"]) ;\r\n }\r\n }\r\n }",
"function db_connect($role) {\n // restrict access so that only users listed in the access.txt file can view data\n if ($role !== \"safety_manager_or_dean\" && $role !== \"facility_manager\") { // && $role !== \"lab_pi\") {\n return NULL;\n }\n \n\ttry {\n\t\t$conn = new PDO(\"mysql:host=fsdatabase.web.engr.illinois.edu;dbname=fsdataba_fsdatabase;charset=latin1\", \"\", \"\");\n\t\t$conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);\n\t} catch (PDOException $e) {\n\t\techo \"<div>Could not connect to database</div>\";\n\t\t$conn = NULL;\n\t}\n\treturn $conn;\n}",
"public static function tryconnect()\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$host = 'localhost';\n\t\t\t\t$dbname = 'inproject';\n\t\t\t\t$userdb = 'root';\n\t\t\t\t$pass = '';\n\t\t\t\t$connection = new PDO(\"mysql:host=$host;dbname=$dbname;charset=utf8\",\"$userdb\",\"$pass\");\n\t\t\t\t$connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t\t\tself::$connector = $connection;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcatch(PDOException $error)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}",
"function db_connect()\n\t{\t\n\t\tini_set('display_errors', 'On');\n\t\t$hostname = 'oniddb.cws.oregonstate.edu'; \n\t\t$dbname = 'gonsalvj-db';\n\t\t$username = 'gonsalvj-db';\n\t\t$password = 'PAKum3uAIPOc0WJY';\n\t\n\t\t$mysqli = new mysqli($hostname,$dbname ,$password,$username);\n\t\tif($mysqli->connect_errno){\n\t\t\techo \"Connection error \" . $mysqli->connect_errno . \" \" . $mysqli->connect_error;\n\t\t}\t\n\t\treturn $mysqli;\n\t}",
"private function connect()\n {\n try {\n self::$connection = new PDO($this->buildDSN(), $this->user, $this->pass, $this->options);\n } catch (PDOException $e) {\n die('Connection failed: ' . $e->getMessage());\n }\n\n }",
"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 createConnection($host,$userName,$userPass){\n //Try to go and create a new PDO based connection...\n $conn = oci_connect($userName,$userPass,$host);\n\n //Set the variable to the conn.\n $this->setCONN($conn);\n\n //if there is any errors\n if(!$conn){\n //Set error\n #error variable is $error\n $error = oci_error();\n\n //Display an error on connection errors.\n trigger_error(htmlentities($error['message'],ENT_QUOTES),E_USER_ERROR);\n }\n\n\n\n }",
"public function oracle($host, $dbname, $username = null, $password = null)\n {\n return $this->connect(\"oci:dbname=//{$host}/{$dbname}\", $username, $password);\n }",
"private function connect() {\r\n\t\tunset($this->dbLink);\r\n\t\t/* create connection to database host */\r\n\t\t// $dbLink = mysql_connect(\"mysql.localhost\", \"de88623\", \"proberaum1\");\r\n\t\t$dbLink = mysql_connect(\"localhost\", \"robert\", \"YMbHFY+On2\");\r\n\t\t/* select database */\r\n\t\tmysql_select_db(\"robert_www_parkdrei_de\");\r\n\t\t/* set link to database as a object attribute */\r\n\t\t$this->dbLink = $dbLink;\r\n\t}",
"function db_connect(){\n\t\tif(SQ_DEBUG){\n\t\t\t$this->dbh = mysql_connect($this->dbhost, $this->dbuser, $this->dbpassword, true);\n\t\t}else{\n\t\t\t$this->dbh = @mysql_connect($this->dbhost, $this->dbuser, $this->dbpassword, true);\n\t\t}\n\t\t\n\t\tif (!$this->dbh){\n\t\t\t$error_message = sprintf(SQ_DB_CONN_ERROR_MESSAGE, $this->dbhost, $this->dbuser);\n\t\t\tthrow new SQ_Exception($error_message, SQ_DB_CONN_ERROR_CODE);\n\t\t}\n\t\t$this->ready = true;\n\t\t\n\t\ttry{\n\t\t\t$this->select($this->dbname, $this->dbh);\n\t\t}catch(SQ_Exception $e){\n\t\t\tthrow $e;\n\t\t}\n\t}",
"public function connectDB()\n {\n // Early return if connected already\n if ($this->isConnected) {\n return;\n }\n\n if (! $this->databaseName) {\n throw new \\RuntimeException('TYPO3 Fatal Error: No database selected!', 1270853882);\n }\n\n if ($this->sql_pconnect()) {\n if (! $this->sql_select_db()) {\n throw new \\RuntimeException('TYPO3 Fatal Error: Cannot connect to the current database, \"' . $this->databaseName . '\"!', 1270853883);\n }\n } else {\n throw new \\RuntimeException('TYPO3 Fatal Error: The current username, password or host was not accepted when the connection to the database was attempted to be established!', 1270853884);\n }\n }",
"public function _db_connect(){\r\n\t\tswitch($this->dbType){\r\n\t\t\tcase \"access\":\r\n\t\t\t\t$this->db = ADONewConnection($this->dbType);\r\n\t\t\t\t$dsn = \"Driver={Microsoft Access Driver (*.mdb)};Dbq=\".$this->databaseName.\";Uid=\".$this->userName.\";Pwd=\".$this->password.\";\";\r\n\t\t\t\t$this->db->Connect($dsn);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"odbc_mssql_native\":\r\n\t\t\t\t$this->db = ADONewConnection('odbc_mssql');\r\n // DSN connectivity through SQL Native Client 10.0 ODBC Driver\r\n\t\t\t\t$dsn = \"Driver={SQL Server};Server=\".$this->hostName.\";Database=\".$this->databaseName.\";\";\r\n $this->db->Connect($dsn, $this->userName, $this->password);\r\n break;\r\n case \"odbc_mssql\":\r\n $this->db = ADONewConnection($this->dbType);\r\n // DSN connectivity through unixODBC\r\n $this->db->Connect($this->hostName, $this->userName, $this->password);\r\n break;\r\n\t\t\tcase \"postgres\":\r\n\t\t\t\t$this->db = ADONewConnection($this->dbType);\r\n\t\t\t\t$this->db->Connect($this->hostName, $this->userName, $this->password, $this->databaseName) or die(\"Error: Could not connect to the database\");\r\n\t\t\t\tif(!empty($this->charset)) {\r\n $this->db->Execute(\"SET NAMES '$this->charset'\");\r\n }\r\n break;\r\n\t\t\tcase \"db2\":\r\n\t\t\t\t$this->db = ADONewConnection($this->dbType);\r\n\t\t\t\t$dsn = \"driver={IBM db2 odbc DRIVER};Database=\".$this->databaseName.\";hostname=\".$this->hostName.\";port=50000;protocol=TCPIP;uid=\".$this->userName.\"; pwd=\".$this->password;\r\n\t\t\t\t$this->db->Connect($dsn);\r\n\t\t\t\tbreak;\r\n case 'db2-dsnless':\r\n $this->db = ADONewConnection('db2');\r\n $this->db->Connect($this->hostName,$this->userName,$this->password, $this->databaseName);\r\n break;\r\n\t\t\tcase \"ibase\":\r\n\t\t\t\t$this->db = ADONewConnection($this->dbType); \r\n\t\t\t\t$this->db->Connect($this->hostName . $this->databaseName, $this->userName, $this->password);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"oci805\":\r\n // Host name and SID\r\n\t\t\t\t$this->db = ADONewConnection($this->dbType);\t\t// Christopher: It�s missing the code to initialize the db object for oci8 db type:\r\n\t\t\t\t$ret = $this->db->Connect($this->hostName, $this->userName, $this->password, $this->databaseName); \r\n\t if(!$ret){\r\n // Host Address and Service Name\r\n // <servicename> is passed in databaseName\r\n $this->db->Connect($this->hostName, $this->userName, $this->password, $this->databaseName); \r\n } \r\n\t\t\t\t\r\n\t\t\t\t// TNS Name defined in tnsnames.ora (or ONAMES or HOSTNAMES), eg. 'myTNS'\r\n\t\t\t\t// $this->db->Connect(false, $this->userName, $this->password, 'myTNS');\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"sqlite\":\r\n\t\t\t\t$this->db = ADONewConnection('sqlite');\r\n\t\t\t\t$this->db->Connect($this->hostName); // e.g. c:\\sqllite.db - sqlite will create if does not exist\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"informix\":\r\n\t\t\t\t$this->db = ADONewConnection('informix');\t\t\r\n\t\t\t\t$this->db->Connect($this->hostName, $this->userName, $this->password, $this->databaseName) or die(\"Error: Could not connect to the database\");\r\n\t\t\t break;\r\n case \"informix72\":\r\n\t\t\t\t$this->db = ADONewConnection('informix72');\t\t\r\n\t\t\t\t$this->db->Connect($this->hostName, $this->userName, $this->password, $this->databaseName) or die(\"Error: Could not connect to the database\");\r\n\t\t\t break;\r\n // the generic odbc presumes a correctly configured odbc.ini in /etc/\r\n case \"odbc\":\r\n $this->db = ADONewConnection($this->dbType);\r\n $dsn = \"DSN=\".$this->hostName.\";uid=\".$this->userName.\"; pwd=\".$this->password;\r\n $this->db->Connect($dsn);\r\n break;\r\n case 'mysql_dsn':\r\n $dsn = 'mysqli://'. $this->userName .':'. $this->password .'@'. $this->hostName .'/'. $this->databaseName;\r\n $this->db = ADONewConnection($dsn);\r\n if(!empty($this->charset)) {\r\n $this->db->Execute(\"SET NAMES '$this->charset'\");\r\n }\r\n break;\r\n // default should be mysql and all other databases using the following form of connection\r\n\t\t\tdefault:\t\r\n\t\t\t\t$this->db = ADONewConnection('mysqli'); // PHP 5.5 deprecates mysql extension. Switching to mysqli\r\n\t\t\t\t$this->db->Connect($this->hostName, $this->userName, $this->password, $this->databaseName) or die(\"Error: Could not connect to the database\");\r\n\t\t\t\tif(!empty($this->charset)) {\r\n\t\t\t\t\t$this->db->Execute(\"SET NAMES '$this->charset'\");\r\n\t\t\t\t}\r\n\t\t}\t\t\t\r\n\t}",
"public function open_connection(){\n $srv=self::$db_host;\n $opc=array(\"Database\"=>$this->db_name, \"CharacterSet\"=>\"UTF-8\", \"UID\"=>self::$db_user, \"PWD\"=>self::$db_pass);\n $this->conn = sqlsrv_connect($srv,$opc) or die (print_r('Error al conectar con la Base de Datos SQLSRV !!! Favor de Informar a Sistemas!!!'));\n #(print_r(sqlsrv_errors(), true));\n }",
"private function connect()\n {\n $connx = @mysql_connect($this->dbHost, $this->dbUser, $this->dbPwd);\n if($connx != FALSE)\n {\n $this->connx = $connx;\n $db = mysql_select_db($this->database, $this->connx);\n if($db == FALSE)\n {\n $this->error = \"Unable to select DB: \" . mysql_error();\n user_error($this->error, E_USER_WARNING);\n return(FALSE);\n }\n return(TRUE);\n }\n $this->error = \"Unable to connect to DBMS: \" . mysql_error();\n user_error($this->error, E_USER_WARNING);\n return(FALSE);\n }",
"public function connect()\n { try{\n\n //$this->conn = pg_connect(\"host=localhost dbname=postgres user=postgres password=siem\");\n $this->conn = pg_connect(\"host=db dbname=siem2013 user=siem2013 password=fabiofernando\");\n\n }catch(Exception $e){\n return false;\n } \n if (!$this->conn) {\n return false;\n }\n $query = \"set schema 'explicafeup';\";\n pg_exec($this->conn, $query);\n return true;\n }",
"function connect()\n\t{\n\t\t$this->link = mysql_connect( $this->hostname, $this->username, $this->password );\n\t\t\n\t\tif( $this->link === FALSE )\n\t\t\tthrow new Exception('MySQLDatabase: Failed to connect to database.');\t\n\t\t\t\n\t\t$db_selected = mysql_select_db( $this->database, $this->link );\n\t\t\n\t\tif( $db_selected === FALSE )\n\t\t\tthrow new Exception('MySQLDatabase: Failed to select database: '.$this->database );\t\n\t}",
"private function connect()\n {\n $connection_string = 'mysql:host=' . DB_HOST . ';dbname=' . DB_NAME . ';';\n $this->connection = new PDO($connection_string, DB_USER, DB_PASS);\n }",
"private function openconnection(){\r\n $options = array(\r\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\r\n PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING\r\n\r\n // PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\r\n // PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\r\n // PDO::ATTR_EMULATE_PREPARES => false,\r\n );\r\n try{\r\n $this->db = new PDO('mysql' . ':host=' . DBHOST . DBPORT . ';dbname=' . DBNAME.';charset='.CHARSET, DBUSER, DBPASS, $options);\r\n } catch (Exception $e) {\r\n throw new Exception($e->getMessage(), (int)$e->getCode());\r\n }\r\n }",
"public function connectOpen()\n\t{\n\t try {\n\t $this->pdo = new PDO(\"mysql:host=127.0.0.1;port=8889;dbname=kiva\", DBUSER, DBPASS, array(PDO::ATTR_EMULATE_PREPARES => false));\n\t echo \"\\n\\nConnected to database....\\n\\n\";\n\t } catch (Exception $e) {\n\t //error_log(json_encode(array('ERROR' => 'pdo_connect', 'errno: ' => 'initial_connect_issue', 'errmsg: ' => $e->getMessage(), 'FAIL' => true)));\n\t $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t error_log(json_encode(array('ERROR' => 'pdo_connect', 'errno: ' => $this->pdo->errorCode(), 'errmsg: ' => $this->pdo->errorInfo(), 'FAIL' => true)));\n\t return false;\n\t }\n\t}",
"function connect(){\n if (!mysql_connect($this->host, $this->user, $this->password)) {\n throw new Exception(\"Error : not connected to the server. \");\n }\n\n \n //selected databse\n if (!mysql_select_db($this->database)) {\n throw new Exception(\"Error :not database selected. \");\n }\n \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 connectDB() {}",
"private function connect()\n {\n if (! is_null(self::$db)) {\n return;\n }\n\n // $this->host \t= $Database->host;\n // $this->user \t= $Database->user;\n // $this->pass \t= $Database->pass;\n // $this->database\t= $Database->database;\n\n $conn = 'mysql:dbname=' . $this->dbInfo->database . ';host=' . $this->dbInfo->host.';charset=utf8';\n try {\n self::$db = new PDO($conn, $this->dbInfo->user, $this->dbInfo->pass);\n } catch (PDOException $e) {\n die('Could not connect to database (' . $conn . ')');\n }\n }",
"function connect_to_database() {\n\n $this->conn = mysqli_connect($this->dbhost, $this->dbuser, $this->dbpass);\n\n if(! $this->conn ) {\n // CODE HERE TO LOAD ERROR PAGE\n }\n\n else {\n $this->get_id_info();\n }\n }",
"private function openDatabaseConnection()\n {\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n $this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS, $options);\n\n //UTF-8 encoding queries\n $this->db->exec(\"SET NAMES 'utf8'\");\n $this->db->exec(\"SET CHARACTER SET utf8\");\n $this->db->exec(\"SET COLLATION_CONNECTION='utf8_unicode_ci'\");\n }",
"function __construct(){\n\t $host = \"localhost\";\n\t $user = \"cs130\";\n\t\t $pw = \"test\";\n\t\t $db = \"CS130\";\n $this->db_connection = mysql_connect($host, $user,$pw);\n mysql_select_db($db, $this->db_connection);\n if(!$this->db_connection)\n {\n $errmsg = mysql_error($this->db_connection);\n print \"Connection failed: $errmsg <br />\";\n exit(1);\n }\n }",
"public function connectDB()\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$this->connectlink = mysql_connect(DB_HOST_NAME,DB_USERNAME,DB_PASSWORD);\t\n\t\t\t\tif($this->connectlink)\n\t\t\t\t{\n\t\t\t\t\tmysql_select_db(DB_NAME); \n\t\t\t\t\treturn 1;\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\t\t\t\t\t\t\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\techo $e->getMessage();\n\t\t\t\texit();\n\t\t\t}\n\t\t}",
"private function connect($dsn, $user, $pass) {\n try {\n parent::__construct($dsn, $user, $pass);\n $this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (PDOException $e) {\n ApplicationError(\"database\", $e->getMessage());\n }\n }",
"public function connectdb()\n {\n $this->db = mysql_connect($this->host,$this->port, $this->user, $this->pass)\n if (!$db)\n {\n die('Could not connect: ' . mysql_error());\n }\n\n mysql_select_db($this->database, $this->db);\n }",
"protected function CeateDatabaseConnection()\r\n\t{\r\n\t\t// Create an instance of the database for use in the system\r\n\t\tif($this->InProduction($_SERVER['SERVER_NAME']))\r\n\t\t\t//$this->Database\t= new Database('gstour.db.4628821.hostedresource.com','gstour','Golf1215','gstour');\r\n\t\t\t$this->Database\t= new Database('97.74.149.114','gstour','Golf1215','gstour');\r\n\t\telse\r\n\t\t\t$this->Database\t= new Database('localhost','root','','test');\r\n\t}",
"function connect_to_server_and_db()\r\n{\r\n\r\n\t// connect and select the db.\r\n\t$sybaseSrv = 'SYBLEOPARD';//\r\n\t$sybaseDb = 'lpr_pentech';\r\n\t$sybaseAcct = 'sa';\t//'sa';\t\t//'report'; //'sa'; \t\t//'sa'; \t//'report';\r\n\t$sybasePass = 'hcdtc0';\t\t//'hcdtc0';\t//'bitut2'; //'lady632!b'; \t//'hcdtc0'; //'bitut2';\r\n\t\r\n\t// this will suppress the stupid message: \"Warning: Sybase: Server message: Changed database context to 'master'.\r\n\t//(severity 10, procedure N/A) in /var/www/html/DBAdmins/phpSybaseAdmin/test.php on line 4\"\r\n\tsybase_min_client_severity(100);\r\n\tsybase_min_server_severity(100);\r\n\t\t\r\n\t// connect to the server..\r\n\t$lspkdb = sybase_connect($sybaseSrv, $sybaseAcct, $sybasePass);\r\n\tif ($lspkdb == FALSE)\r\n\t\tdie(\"problem: \" . $sybaseSrv . \" connection has failed! for acct: \" . $sybaseAcct . \" and pass: \" . $sybasePass);\r\n\telse\r\n\t{\t\r\n\t\t\r\n\t\techo \"Successfully connected to the \" . $sybaseSrv . \" server...<br>\";\r\n\t\t// select the db...\r\n\t\tif (sybase_select_db($sybaseDb, $lspkdb) == FALSE)\r\n\t\t\t die(\"problem: \" . $sybaseSrv . \" connection has failed! for acct: \" . $sybaseAcct . \" and pass: \" . $sybasePass);\r\n\t\telse\r\n\t\t\techo \"Successfully selected the \" . $sybaseDb . \" database...<br>\";\r\n\t}\r\n\t\r\n\techo \"<br>\";\r\n\t\r\n\t// return the db handle\r\n\treturn $lspkdb;\r\n\r\n}",
"public function __construct() {\n\t\t$this->con = pg_connect(\"host=mcsdb.utm.utoronto.ca port=5432 dbname=jaggisi1_309 user=jaggisi1 password=74162\");\n\t\tif(!$this->con){\n\t\t\t\techo(\"Can't connect to the database\");\n\t\t\t\texit;\n\t\t\t}\t\t\n\t\t}",
"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 }",
"public function connect() {\n $this->database = new mysqli(\n $this->dbinfo['host'],\n $this->dbinfo['user'],\n $this->dbinfo['pass'],\n $this->dbinfo['name']\n );\n if ($this->database->connect_errno > 0)\n return $this->fail(\"Could not connect to database: [{$this->database->connect_error}]\");\n }",
"private function connect()\n {\n if ($this->configuration->get('db.connector') == 'PDO') {\n $dsn = \"mysql:host=\" . $this->configuration->get('db.host') . \";dbname=\" . $this->configuration->get('db.name');\n $options = array();\n $this->db = new PDO(\n $dsn, $this->configuration->get('db.username'), $this->configuration->get('db.password'), $options\n );\n } elseif ($this->configuration->get('db.connector') == 'mysqli') {\n $this->db = mysqli_connect(\n $this->configuration->get('db.host'), $this->configuration->get('db.username'), $this->configuration->get('db.password'), $this->configuration->get('db.name')\n );\n }\n }",
"private static function get_connect(){\n static::$db = pg_connect(static::$host . \" \" . static::$port . \" \" . static::$database . \" \" . static::$user . \" \" . static::$pass);\n }",
"private function _connect() {\r\n\t\t$this->sql = mysql_connect(\r\n\t\t\t$this->dataSource->config['host'],\r\n\t\t\t$this->dataSource->config['login'],\r\n\t\t\t$this->dataSource->config['password']\r\n\t\t);\r\n\t\t$this->sql2 = mysql_connect(\r\n\t\t\t$this->dataSource->config['host'],\r\n\t\t\t$this->dataSource->config['login'],\r\n\t\t\t$this->dataSource->config['password']\r\n\t\t);\r\n\t}",
"public function open_connection() {\n try{\n \t\t$conn_string = \"mysql:host=\" . DB_SERVER . \";dbname=\" . DB_NAME . \";charset=utf8\";\n \t\t$this->connection = new PDO($conn_string, DB_USER, DB_PASS);\n \t\t$this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);\n \t} catch (PDOException $e) {\n \t\techo \"Connection failed: \" . $e->getMessage();\n \t}\n }",
"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 connect() {\n if (!$this->connected()) {\n tenant_connect(\n $this->db_name\n );\n }\n }",
"private function connect(){\n\t\trequire (__DIR__ . '/../../config.php');\n\t\t$mysqlCFG =$database['mysql'];\n\t\t\n\t\tif(!self::$db){\n\t\t\t$connectionString = \"mysql:host=$mysqlCFG[host];dbname=$mysqlCFG[dbname]\";\n\t\t\ttry{\n\t\t\t\tself::$db = new \\PDO($connectionString, $mysqlCFG['user'], $mysqlCFG['password']);\n\t\t\t\tself::$db->setAttribute( \\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n\t\t\t}catch(\\PDOException $e){\n\t\t\t\tdie(\"Ocurrio un error al conectar con la base de datos: $e->getMessage()\");\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"function openDatabaseConnection() {\n\t\t# open connection to MySQL database\n\t\t$link = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD)\n\t\t\tor die(\"Could not connect to the SQL database server help\");\n\t\tmysql_select_db(MYSQL_DATABASE) or die(\"Could not connect to the SQL database server\");\n\t}",
"function db_connect($db_hostname, $db_username, $db_password, $db_name)\n\t{ global $db_port;\n\t\t$this->db_connection = pg_connect(\"host=\".$db_hostname.\" port=\".$db_port.\" dbname=\".$db_name.\" user=\".$db_username.\" password=\".$db_password) \n\t\t\tOR die (\"Connection Error to PostgreSQL Server\");\n\t\treturn $this->db_connection;\n\t}",
"function db_connect()\n\t{\n\t\t// Requiring the configuration file that holds the config data for connection\n\t\trequire 'config.php';\n\t\ttry \n\t\t{\n\t\t\t$conn = new PDO(\"mysql:host=localhost;dbname=packsave\", $config['DB_USER'], $config['DB_PASS']);\n\t\t\t$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\t\t\t\n\t\t}\n\n\t\tcatch(PDOException $e)\n\t\t{\n\t\t\techo 'ERROR: '. $e->getMessage();\n\t\t}\n\t\t\n\t}",
"function databaseConnect() {\n if(!$this->db->Connect($this->PMDR->getConfig('login_module_db_host'), $this->PMDR->getConfig('login_module_db_user'), $this->PMDR->getConfig('login_module_db_password'), $this->PMDR->getConfig('login_module_db_name'))) {\n $this->databaseReset();\n return false;\n }\n return true;\n }",
"public function connect() {\n $this->debugBacktrace();\n $this->connection = mysqli_connect($this->server, $this->user, $this->password, $this->database); \n\n if (!$this->connection) {\n $mysqlError = mysqli_error($this->connection);\n die('ERROR CODE: ARPOASRUWWER412547');\n } \n }",
"function testDBconnect() {\n print \"\\nTEST: database connection:\";\n global $dbhost;\n global $dbuser;\n global $dbpass;\n //global $dbname; // TODO rem\n\n if (empty($dbhost) || empty($dbuser) || empty($dbpass)) {\n print \"\\nWARN: either db host,user or pass info missing.\\n\";\n }\n else {\n // TODO rem $dbname at submission\n\n $sqlConn = new mysqli($dbhost, $dbuser, $dbpass);//, $dbname);\n if ($sqlConn->connect_error) {\n print \"\\nSQL Connection failed: \".$sqlConn->connect_error.\"\\n\";\n } \n else {\n print \"\\nSQL connection successful, closing...\\n\";\n $sqlConn->close();\n }\n }\n interceptExit();\n }",
"function _connectDB( $dsn )\n {\n // only include the db if one really wants to connect\n require_once('DB.php');\n\n if (is_string($dsn) || is_array($dsn) )\n {\n // put the dsn parameters in an array\n // DB would be confused with an additional URL-queries, like ?table=...\n // so we do it before connecting to the DB\n if( is_string($dsn) )\n $dsn = DB::parseDSN( $dsn );\n\n $this->dbh = DB::Connect($dsn);\n }\n else\n {\n if(get_parent_class($dsn) == \"db_common\")\n {\n $this->dbh = $dsn;\n }\n else\n {\n if (is_object($dsn) && DB::isError($dsn))\n {\n return new DB_Error($dsn->code, PEAR_ERROR_DIE);\n }\n else\n {\n return new PEAR_Error(\"The given dsn was not valid in file \" . __FILE__ . \" at line \" . __LINE__,\n 41,\n PEAR_ERROR_RETURN,\n null,\n null\n );\n\n }\n }\n }\n\n if (DB::isError($this->dbh))\n return new DB_Error($this->dbh->code, PEAR_ERROR_DIE);\n\n return true;\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 }",
"private function init()\n {\n // connessione al mysql server\n if (!$this->link = mysql_connect( $this->hostname\n , $this->user_name\n , $this->user_pswd))\n {\n $this->set_error( 'Could not connect to mysql' );\n return;\n }\n\n // seleziona il database\n if (!mysql_select_db($this->user_db, $this->link))\n {\n $this->set_error( 'Could not select database' );\n return;\n }\n }",
"private function dbconnect()\n {\n $this->db = new mysqli(Config::$dbhost, Config::$dbuser, Config::$dbpass, Config::$database);\n if (mysqli_connect_errno()) {\n Log::info(sprintf(\"Connect failed: %s\\n\", mysqli_connect_error()));\n exit();\n }\n }",
"public function connect () {\r\n\t\t//We should try to check if the resource is already allocated.\r\n\t\tif (($this->con = mysql_connect ($this->host, $this->login, $this->password)) != -1) return true;\r\n\t\telse return $this->_error (2, \"db: Cannot connect to the database.\");\r\n\t}",
"private function connection(){\n\t\t\ttry{\n\n\t\t\t\t$this->connection = new PDO(\n\t\t\t\t\t$this->dsn,\n\t\t\t\t\t$this->username,\n\t\t\t\t\t$this->password\t\n\t\t\t\t);\n\t\t\t\t$this->connection->setAttribute(\n\t\t\t\t\tPDO::ATTR_ERRMODE,\n\t\t\t\t\tPDO::ERRMODE_EXCEPTION\n\t\t\t\t);\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo \"ERROR: \".$e->getmessage();\n\t\t\t\tdie();\n\t\t\t}\n\t\t}",
"public function connect($db_properties);",
"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 YDDatabaseDriver_oracle( $db, $user='', $pass='', $host='', $options=array() ) {\r\n\t\t\t$this->YDDatabaseDriver( $db, $user, $pass, $host, $options );\r\n\t\t\t$this->_NLS_DATE_FORMAT = 'RRRR-MM-DD HH24:MI:SS';\r\n\t\t\t$this->_fmtDate = 'Y-m-d';\r\n\t\t\t$this->_fmtTimeStamp = 'Y-m-d, h:i:s A';\r\n\t\t}",
"function connect() // this function connects to mysql database\n\t{\n \t\t// this step can verify host, users, and password are correct before the connection; otherwise, \n \t\t//connection will be failed if one of them is incorrect \n\t\tmysql_connect(DB_HOST,DB_USER,DB_PASS) or die('could not connect to database'. mysql_error());\n\n\t\tmysql_select_db(DB_NAME);\n\t}",
"public static function connect() {\n $databaseConfig = Config::getDatabase();\n $databaseClass = $databaseConfig['class'];\n $databaseFile = SRC.'lib/db/databases/'.$databaseClass.'.php';\n if (!file_exists($databaseFile)) {\n throw new SynopsyException(\"Database class file '$databaseFile' doesn't exist!\");\n }\n require_once($databaseFile);\n $c = \"\\Synopsy\\Db\\Databases\\\\$databaseClass\";\n self::$instance = new $c();\n if (!self::$instance instanceof DatabaseInterface) {\n throw new SynopsyException(\"Database class '$databaseClass' doesn't implement DatabaseInterface interface!\");\n }\t\n self::$instance->connect($databaseConfig);\n }",
"protected function initConnection()\n {\n parent::initConnection();\n $this->enableSlaves = false;\n\n if($this->isISeries === null){\n try {\n $stmt = $this->pdo->query('SELECT * FROM QSYS2.SYSTABLES FETCH FIRST 1 ROW ONLY');\n $this->isISeries = boolval($stmt);\n } catch (\\Exception $ex) {\n $this->isISeries = false;\n }\n }\n if($this->defaultSchema && !$this->isISeries){\n $this->pdo->exec('SET CURRENT SCHEMA ' . $this->defaultSchema);\n }\n\n }",
"protected function openConn() {\n $database = new Database();\n $this->conn = $database->getConnection();\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 }"
] | [
"0.6856202",
"0.67402124",
"0.6715765",
"0.63425374",
"0.6245188",
"0.6209207",
"0.61815095",
"0.61412513",
"0.6093673",
"0.6087111",
"0.6046567",
"0.60428005",
"0.6042266",
"0.601571",
"0.59979504",
"0.59731007",
"0.5924299",
"0.5902829",
"0.5896106",
"0.58872205",
"0.5877069",
"0.58712566",
"0.5867392",
"0.58557254",
"0.58378136",
"0.5837148",
"0.5835938",
"0.5830761",
"0.58280843",
"0.58226687",
"0.58206356",
"0.57984865",
"0.5784589",
"0.5780516",
"0.5751498",
"0.5749427",
"0.57376176",
"0.57287085",
"0.57189494",
"0.5705157",
"0.5702284",
"0.57021266",
"0.5696959",
"0.5692276",
"0.56920457",
"0.5691719",
"0.56863946",
"0.5683522",
"0.568275",
"0.5659102",
"0.56540066",
"0.5639517",
"0.5632413",
"0.56217426",
"0.56202674",
"0.56159663",
"0.56136405",
"0.5607716",
"0.5605583",
"0.55998415",
"0.55946153",
"0.55890787",
"0.5579839",
"0.5578769",
"0.55774826",
"0.557021",
"0.5563902",
"0.556266",
"0.5561919",
"0.5559006",
"0.5558639",
"0.55569184",
"0.55532193",
"0.5550304",
"0.5549034",
"0.5548404",
"0.5541644",
"0.5538356",
"0.5536987",
"0.55249786",
"0.5523217",
"0.55222523",
"0.55220234",
"0.5518608",
"0.5511995",
"0.5509746",
"0.5508435",
"0.55042875",
"0.5501989",
"0.5496396",
"0.54950696",
"0.549459",
"0.54896307",
"0.5487981",
"0.5487216",
"0.54859793",
"0.5481902",
"0.5475812",
"0.5472361",
"0.5471568",
"0.54689795"
] | 0.0 | -1 |
/CLEAN UP A VAR BEFORE SENDING IT TO OUTPUT OR DATABASE | function IsValid_Variable($MyVar2Test,$DefaultValue='')
{
$MyVar = (trim(strip_tags(stripslashes($MyVar2Test)))!='') ? trim(strip_tags(stripslashes(($MyVar2Test)))) : $DefaultValue ;
return $MyVar;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _clearAndOutput() {}",
"public function cleanUp()\n {\n $this->_value = null;\n }",
"public function cleanUp();",
"public function cleanUp();",
"public function cleanUp();",
"public function clean()\n\t{\n\t\t$this->buffer = '';\t\t\n\t}",
"protected function _flushVars() {\n if (isset($this->LdapObject->id)) {\n $this->LdapObject->id = null;\n }\n if (isset($this->LdapObject->primaryKey)) {\n $this->LdapObject->primaryKey = 'uid';\n }\n \n $this->sforceData = array();\n $this->stagingData = array();\n $this->ldapData = array();\n $this->syncOperation = 'nothing';\n \n }",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function clean()\n {\n $this->file = '';\n $this->vars = array();\n $this->headers = array();\n $this->metas = array();\n $this->jses = array();\n $this->javascript = array();\n $this->attachments = array();\n $this->csses = array();\n }",
"public function endOutputBufferingAndCleanPreviousOutput() {}",
"protected function _purgeValue($value) {}",
"public function cleanup(){\n\t\n\t\t$this->_p->user->setSessionVal($this->_session_var_name);\n\t\n\t}",
"function truncateData(){\n\t\t$userid=$GLOBALS['username'];\n mysql_query(\"SET FOREIGN_KEY_CHECKS=0;\");\n\t\t$truncateSource = mysql_query(\"TRUNCATE TABLE \".$userid.\"nertag\") or die(mysql_error());\n\t\t$truncateTarget = mysql_query(\"TRUNCATE TABLE \".$userid.\"sentences\") or die(mysql_error());\n mysql_query(\"SET FOREIGN_KEY_CHECKS=1;\");\n}",
"protected function _clean()\r\n\t{\r\n\t\t$this->taintValue = null;\r\n\t\t$this->normalizedValue = null;\r\n\t\r\n\t\t$this->parameterInfo = null;\r\n\t\t$this->bFetched = false;\r\n\t\t\r\n\t\t$this->validationInfo = null;\r\n\t\t$this->isValid = false;\r\n\t}",
"abstract function clean ();",
"public function clean() {\n $this->data = \"\";\n $this->currentRow = 1;\n $this->curPosition = 0;\n }",
"public function cleanup()\n\t{\n\t\t\n\t}",
"public function cleanup() {\n\t\t//TODO\n\t}",
"function Clean() // libera la consulta\n {oci_free_statement($this->consulta);}",
"public function cleanup()\n\t{\n\t}",
"abstract public function clean();",
"public function clear()\n\t{\n\t\t$this->stmt = null;\n\t\t$this->str = null;\n\t}",
"function Clean()\n \t{\n\n\t\t\n\t\treturn TRUE;\n \t}",
"public function __destruct()\n {\n if (null != $this->dbBinStr) {\n $this->dbBinStr = null;\n }\n }",
"public static function additionalCleaning() {\n \n }",
"private function eraseObject() {\n $this->tripId = \"\";\n $this->journalId = \"\";\n $this->created = null;\n $this->updated = null;\n $this->latestUpdated = null;\n $this->userId = \"\";\n $this->journalDate = \"\";\n $this->journalTitle = \"\";\n $this->journalText = \"\";\n $this->deleted = \"N\";\n $this->hash = \"\";\n $this->latestHash = \"\";\n }",
"private function clear_variable()\n\t\t{\n\t\t\t$this->count_item_found = 'none';\t\t\t\t\t\t\t\t\t// No item found\n\t\t\t$this->fulllistexpand = Array();\t\t\t\t\t\t\t\t\t// No item list to expand\n\t\t\t$this->sqllistinvolved = '';\t\t\t\t\t\t\t\t\t\t// ??? TODO\n\t\t\t$this->listinvolved = Array();\n\t\t\t$this->html_result = '';\n\t\t}",
"protected function clean_saved_value() {\n\t\tif ( $this->saved_value !== '' ) {\n\t\t\tif ( ! is_array( $this->saved_value ) && ! is_object( $this->saved_value ) ) {\n\t\t\t\tFrmAppHelper::unserialize_or_decode( $this->saved_value );\n\t\t\t}\n\n\t\t\tif ( is_array( $this->saved_value ) && empty( $this->saved_value ) ) {\n\t\t\t\t$this->saved_value = '';\n\t\t\t}\n\t\t}\n\t}",
"public abstract function clean();",
"public function __destruct(){\n if( $this->_autosave ){\n $this->save( array('secure' => false) );\n }\n }",
"protected function cleanup() {\n $this->clearLocalSessionValues();\n }",
"public function cleanup()\n {\n }",
"public static function cleanOutputBuffers() {}",
"function flush() {\n\n\t\t\t// Get rid of these\n\t\t\t$this->last_result = null;\n\t\t\t$this->col_info = null;\n\n\t\t}",
"private function _destruct()\r\n {\r\n $this->table = null;\r\n $this->select = null;\r\n $this->fields = null;\r\n $this->where = null;\r\n $this->ar_where = null;\r\n }",
"public function Cleanup()\r\n\t{\r\n\t}",
"public function clean() {\r\n $this->loadUnminifiedData();\r\n \r\n $javascript_minifier = $this->framework->getConfiguration()->javascript_minifier;\r\n \r\n if($javascript_minifier != 'simple') {\r\n $unminified_temp_file = tempnam('flow_scratch', 'js_unminified');\r\n $minified_temp_file = tempnam('flow_scratch', 'js_minified');\r\n \r\n //Write the unminified data to a temp file\r\n file_put_contents($unminified_temp_file, $this->unminified_data);\r\n \r\n switch($javascript_minifier) {\r\n case 'closure':\r\n $compiler_path = escapeshellcmd($this->framework->getConfiguration()->closure_compiler_path);\r\n\r\n if(!empty($compiler_path)) {\r\n exec(\"java -jar {$compiler_path} --js {$unminified_temp_file} --js_output_file {$minified_temp_file}\");\r\n }\r\n break;\r\n case 'uglify-js':\r\n exec(\"uglifyjs -nc -o {$minified_temp_file} {$unminified_temp_file}\");\r\n break;\r\n }\r\n \r\n if(is_file($minified_temp_file)) {\r\n $this->minified_data = file_get_contents($minified_temp_file);\r\n \r\n unlink($minified_temp_file);\r\n }\r\n \r\n unlink($unminified_temp_file);\r\n }\r\n \r\n if(empty($this->minified_data)) {\r\n $this->minified_data = $this->unminified_data;\r\n }\r\n }",
"public function clean()\n {\n // Set to default values\n $this->sSql = '';\n $this->aValues = [];\n }",
"protected function cleanup()\n {\n $this->currentRule = '';\n $this->currentUserAgent = self::USER_AGENT;\n }",
"public function _finalize() {\n $this->calls = substr($this->calls, 1, -1);\n }",
"public function cleanRepair() {}",
"public function __destruct() {\n $this->save(null);\n }",
"private function resetVars()\n {\n $this->response = $this->calls = array();\n $this->hasCalls = $this->isBatchCall = false;\n }",
"protected function clearLastStatementData($clearStrValues = null) {\r\n $this->sql = null;\r\n $this->sqlConditions = array();\r\n $this->sqlFields = array();\r\n $this->sqlTables = array();\r\n $this->sqlSetValues = array();\r\n $this->sqlInsertValues = array();\r\n $this->sqlLimit = null;\r\n $this->sqlTmpField = null;\r\n $this->order = null;\r\n if( $clearStrValues ) {\r\n $this->sqlStrConditions = null;\r\n $this->sqlStrFields = null;\r\n $this->sqlStrTables = null;\r\n }\r\n }",
"public function clearVars() {\n\t\t$this->_engine->clearAllAssign();\n\t}",
"public function __destruct()\n\t{\n\t\t$this->db = null;\n\t\t$this->cat_data = false;\n\t\t$this->settings = null;\n\t}",
"function clearSQL() {}",
"function flush()\n\t\t{\n\t\t\t// Get rid of these\n\t\t\t$this->last_result = null;\n\t\t\t$this->col_info = null;\n\t\t\t$this->last_query = null;\n\t\t\t$this->from_disk_cache = false;\n $this->setParamaters();\n\t\t}",
"function cleanup()\n {\n $db = eZDB::instance();\n $db->begin();\n $db->query( \"DELETE FROM ezsphinx\" );\n $db->query( \"DELETE FROM ezsphinx_pathnodes\" );\n $db->commit();\n }",
"protected function cleanBuffer()\n {\n if (ob_get_level() !== 0) {\n ob_clean();\n }\n }",
"public function clean(): void\n {\n $this->truncateJournalTable();\n $this->output(\"<success>Table {$this->internalTable} truncated</success>\");\n }",
"protected static function _cleanUp(): void {\n\t\tCoreLog::drop('custom');\n\n\t\tCoreLog::setConfig('debug', static::$_debugConfig);\n\t}",
"function clean_variable($variable) {\n\t$variable = base64_decode($variable);\n\t$packing_length = 5;\n\n\t$variable = substr($variable, $packing_length);\n\t$variable = substr($variable, 0, -1 * $packing_length);\n\n\treturn mysql_escape_mimic(trim($variable));\n}",
"public function __destruct()\n {\n unset($this->vars);\n }",
"function truncate()\n\t{\n\t\t$this->data = array();\n\t\t;\n\t}",
"function flush()\n\t\t{\n\t\t\t// Get rid of these\n\t\t\t$this->last_result = null;\n\t\t\t$this->col_info = null;\n\t\t\t$this->last_query = null;\n\t\t\t$this->from_disk_cache = false;\n\t\t}"
] | [
"0.6310301",
"0.62213916",
"0.61734754",
"0.61734754",
"0.61734754",
"0.60790753",
"0.59778893",
"0.5945205",
"0.5945205",
"0.5945205",
"0.5945205",
"0.5945205",
"0.5945205",
"0.5945205",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.5944071",
"0.59429216",
"0.59429216",
"0.59429216",
"0.59429216",
"0.59429216",
"0.59429216",
"0.5837995",
"0.5766845",
"0.5761827",
"0.57427174",
"0.5734575",
"0.5729692",
"0.57126856",
"0.57112604",
"0.56987035",
"0.5668769",
"0.564086",
"0.5626976",
"0.5594749",
"0.5566696",
"0.5537449",
"0.5528757",
"0.55177253",
"0.55130357",
"0.5506301",
"0.5496012",
"0.547396",
"0.5462112",
"0.5458672",
"0.5443558",
"0.54290897",
"0.54190075",
"0.54042304",
"0.540017",
"0.53650105",
"0.53638977",
"0.5358214",
"0.53578687",
"0.5346074",
"0.5341778",
"0.53372467",
"0.53331",
"0.53285533",
"0.5320588",
"0.5312925",
"0.5301551",
"0.5298184",
"0.52979153",
"0.5287885",
"0.5283653",
"0.52794105",
"0.5272451",
"0.5263916",
"0.5257135"
] | 0.0 | -1 |
Display a listing of the resource. | public function index(SponsorFilters $filters)
{
$sponsors = Sponsor::filter($filters);
return SponsorResource::collection($sponsors);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(SponsorResourceRequest $request)
{
return new SponsorResource($request->persist());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437"
] | 0.0 | -1 |
Display the specified resource. | public function show(Sponsor $sponsor)
{
return new SponsorResource($sponsor);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(SponsorResourceRequest $request, Sponsor $sponsor)
{
return new SponsorResource($request->persist($sponsor));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
//
$cc=ColoniaCaserio::BarCan();
return view('ColoniaCaserio.index',compact('cc'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
//
return view('ColoniaCaserio.create');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
//
$file = Input::file('nombre_img');
//Creamos una instancia de la libreria instalada
$image = \Image::make(\Input::file('nombre_img'));
//Ruta donde queremos guardar las imagenes
$path = public_path().'/imagenesColoniasCaserios/';
// Guardar Original
$image->save($path.$file->getClientOriginalName());
ColoniaCaserio::create([
'nombre'=>$request['nombre'],
'idCC'=>$request['id'],
'nombre_img'=>$file->getClientOriginalName(),
]);
\Kairos\Bitacora::bitacora("Se registro : ".$request['nombre']);
return redirect('/coloniaCaserio')->with('message','create');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
$cc=ColoniaCaserio::find($id);
return view('ColoniaCaserio.edit',compact('cc'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
] | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6768301",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
$aux=$request['hi2'];
$cc = ColoniaCaserio::find($id);
if($aux=='4'){
$file = Input::file('nombre_img');
//Creamos una instancia de la libreria instalada
$image = \Image::make(\Input::file('nombre_img'));
//Ruta donde queremos guardar las imagenes
$path = public_path().'/imagenesColoniasCaserios/';
// Guardar Original
$image->save($path.$file->getClientOriginalName());
$cc->nombre_img=$file->getClientOriginalName();
}
else{
$cc->nombre=$request['nombre'];
}
$cc->save();
\Kairos\Bitacora::bitacora("Se modifico : ".$request['nombre']);
Session::flash('mensaje','¡Registro Actualizado!');
return redirect::to('/coloniaCaserio')->with('message','update');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
default function (wrong parameters) | function def($param)
{
//a. a default function incase anything was called unexpectedly
return "\033[91m" .print_r($param). "InputError: \033[0m ".
"\033[31mI require atleast a single paramater. \033[0m ".
"add the correct parameter --action=help \n";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function func_default() {}",
"public function _default()\n {\n $_func_name = $this->_default_func;\n $this->$_func_name();\n }",
"function define_default($param, $value) {\n\t\t//\n\t}",
"public function getDefault();",
"public function applyDefaultValues()\n\t{\n\t}",
"public function applyDefaultValues()\n\t{\n\t}",
"public function applyDefaultValues()\n\t{\n\t}",
"public function __default()\n\t{\n\n\t}",
"protected abstract function applyNoArg();",
"public function getDefaultCallback();",
"function dataDefatult($data, $defaultD) {\r\n if ($data)\r\n return $data;\r\n return $defaultD;\r\n}",
"public function defaultCallback()\n {\n return func_get_arg(0);\n }",
"public function getDefaultParams();",
"public function getDefaultParameters();",
"public function getDefaultParameters();",
"public static function dummy() {}",
"function sayHello($name = 'world'){ // we set a default value to the param\n echo \"Hello $name<br>\";\n }",
"private function set_default_behaviour()\n {\n if (isset($this->_config['behaviour']['default'])) {\n $_func_name = $this->_config['behaviour']['default'];\n if ($_func_name && is_string($_func_name) && function_exists($this->_default_func)) {\n $this->_default_func = $_func_name;\n } else {\n $this->_default_func = self::DEFAULT_FUNC;\n }\n } else {\n $this->_default_func = self::DEFAULT_FUNC;\n }\n }",
"public function testDefaultValues() {\n\t\t$this->assertSame(null, $this->Field->mapToName());\n\t\tlist($callback, $mapToName) = $this->Field->map();\n\t\t$this->assertSame(1, $callback(1));\n\t\t$this->assertSame(null, $mapToName);\n\t}",
"public function getDefaultMethodNotMain()\n {\n return 2;\n }",
"abstract protected function defaults(): array;",
"function sommeOptionnelle (int $a = 1 , int $b = 2 )\n{\n return $a + $b;\n}",
"public function getDefault($var);",
"function c($param1 = null) {\n echo 'Función c';\n if($param1) echo \" con $param1\";\n}",
"function overload() { }",
"function overload() { }",
"function factoryDefault();",
"function zzd($default, &...$params)\n{\n return ($tmp = zz(...$params)) ? $tmp : $default;\n}",
"public function default() {\n return \"No param given...\";\n }",
"public function isDefault();",
"public function get_default_args(){ return $this->default_args; }",
"function METHOD_default()\n {\n $this->sendTerminal(\"Available methods (use {$this->params[0]}/{method}):\");\n $this->sendTerminal(\" - {$this->params[0]}/hello\");\n }",
"public function overload(): void;",
"public function findDefault();",
"public function getDefaultValue();",
"public function getDefaultValue();",
"public function get_default_params()\n {\n }",
"public function defaultMethod($args = array()) {\n\n\t\tcall_user_func_array ( array (\n\t\t\t\t$this,\n\t\t\t\t$this->defaultMethod \n\t\t), $args );\n\t\n\t}",
"public function get_default()\n\t{\n\t\t$return = $this->default;\n\n\t\tif (count($args = func_get_args()) >= 1) \n\t\t{\n\t\t\tisset($args[0]) && is_array($args[0]) && $args = $args[0];\n\t\t\t$_return = array();\n\t\t\tforeach ($args as $arg)\n\t\t\t{\n\t\t\t\tif (isset($return[$arg]))\n\t\t\t\t{\n\t\t\t\t\t$_return[$arg] = $return[$arg];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tempty($_return) OR $return = $_return;\n\t\t\tunset($_return);\n\t\t}\n\t\treturn $return;\n\t}",
"function alt() {\r\n\tforeach (func_get_args() as $arg) {\r\n\t\tif (!is_null($arg)) {\r\n\t\t\treturn $arg;\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn null;\r\n}",
"protected function get_default() {\n\t\treturn false;\n\t}",
"public function test ($param = null) {\n }",
"function acf_with_default($value, $default_value)\n{\n}",
"function limpieza_uno($value=''){\n\treturn \"Hola\";\n}",
"function defaultAction($args) {\n\t}",
"function noop() {\n}",
"function f(array $a = null, $b = \"hi\") {}",
"public function setDefaultValues()\n\t{\t\t\n\t\t\t \n\t}",
"public function getDefaultAction();",
"public function getDefaultAction();",
"public function getDefaultAction();",
"function rfcset($a, $b) \r\n { #una manera de asignar defaults. \r\n if(!$a) \r\n return $b; \r\n else \r\n return $a; \r\n }",
"function noop()\n {\n }",
"function optional_param($parname, $default=NULL, $type=PARAM_CLEAN,$errMsg=\"err_sql_injection\") {\n\n // detect_unchecked_vars addition\n global $CFG;\n if (!empty($CFG->detect_unchecked_vars)) {\n global $UNCHECKED_VARS;\n unset ($UNCHECKED_VARS->vars[$parname]);\n }\n\n if (isset($_POST[$parname])) { // POST has precedence\n $param = $_POST[$parname];\n } else if (isset($_GET[$parname])) {\n $param = $_GET[$parname];\n } else {\n return $default;\n }\n //pose un pb avec les parametres vide au d�part\n $tmpStr= clean_param($param, $type); //PP test final\n // rev 971 cas des parametres booleens (0 existe !)\n if ($tmpStr || $tmpStr===0)return $tmpStr;\n else return $default;\n}",
"public function f01()\n {\n }",
"public function __default()\r\n \t{\r\n \t if( self::isArg( 'notifwindow') )\r\n \t {\r\n $this->view = \"common_notifwindow\";\r\n \t $this->viewArgs['table'] = self::getArg( \"table\", AT_posint, true );\r\n \t }\r\n \t else\r\n \t {\r\n $this->view = \"dummygame_dummygame\";\r\n self::trace( \"Complete reinitialization of board game\" );\r\n }\r\n \t}",
"public function __construct()\r\n\t{\r\n\t\techo \"Implements Function overloading\";\r\n\t}",
"function a($a = array(), $b = \"hi\") {}",
"function _setDefaults() {}",
"function wpv_default($value, $default) {\n\tif (empty($value))\n\t\treturn $default;\n\treturn $value;\n}",
"static function base1($show,$a=''){ \r\n echo \"<br>base1::\";\r\n }",
"function setting_defaults( $defaults ) {\n\n }",
"function zend_reflection_function2($one, $two = 'two') {\n \n return 'blah';\n}",
"function defval (&$val,$default_val) {\r\n\t\tif (!isset($val) || ''==$val) {\r\n\t\t\t$val=$default_val;\r\n\t\t} elseif ('NULL' == $val) {\r\n\t\t\t$val='';\r\n\t\t}\r\n\r\n\t\tif (ereg(\"^%([^\\[]+)\\[(.+)\\]%$\",$val,$regs) ) {\r\n\t\t\t$val=$this->{$regs[1]}[$regs[2]];\r\n\t\t}\r\n\t}",
"public function applyDefaultValues()\n {\n $this->is_not = false;\n $this->rank = 0;\n }",
"public function dummyMethod($arg)\n {\n }",
"function setDefaultValues() {}",
"public function defaultData();",
"public function getDefaultValue(): mixed;",
"function greet(string $name, int $age, string $language = 'malay') // default value\n{\n if ($language == 'english') {\n echo 'Hello, Welcome ' . $name . '!<br />';\n echo 'Your age is ' . $age . '<br />';\n } elseif ($language == 'malay') {\n echo 'Hello, Selamat Datang ' . $name . '!<br />';\n echo 'Umur anda adalah ' . $age . '<br />';\n }\n}",
"public function custom()\n\t{\n\t}",
"function default_value(&$var, $def = null) {\n return isset($var)?$var:$def;\n}",
"public function edit_default()\n {\n return method_exists($this, 'matrix') ? app()->call([$this, 'matrix']) : app()->call([$this, 'matrix_default']);\n }",
"function case_default()\n{\n return new CaseDefault();\n}",
"function fungsiku($namaDepan, $namaBelakang = \"Smith\")\r\n{\r\n // Kode program fungsi \r\n echo \"Halo Fungsi\";\r\n echo \"<br> Nama Saya \" . $namaDepan . \" \" . $namaBelakang;\r\n}",
"function specialop() {\n\n\n\t}",
"protected function defaultParams()\r\n\t{\r\n\t\treturn array();\r\n\t}",
"public function actionDefault()\n {\n\n }",
"function &getDefault($default)\n {\n if (is_callable($default)) {\n $default = call_user_func($default);\n }\n\n return $default;\n }",
"function d(array $a = [], $b = \"hi\") {}",
"function myFunction($a, $lot, $of, $params)\n : array {\n return null;\n}",
"public function create_default()\n {\n return method_exists($this, 'matrix') ? app()->call([$this, 'matrix']) : app()->call([$this, 'matrix_default']);\n }",
"public function getDefaultValue() {}",
"public function getDefaultValue() {}",
"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 }",
"public function applyDefaultValues()\n {\n $this->setregis = 0;\n }",
"function __construct($arg0 = null) {\n\t}",
"function get_value_or_default($value,$default='')\n{\n\treturn (!empty($value)) ? $default : $value;\n}",
"public function f02()\n {\n }",
"function b($a = [], $b = \"hi\") {}",
"public function none(){\n return call_user_func_array($this->fetchStaticClassName() . '::' . __FUNCTION__, func_get_args());\n }",
"function beaver_extender_custom_functions_options_defaults() {\n\t\n\t$defaults = array(\n\t\t'custom_functions_effect_admin' => 0,\n\t\t'custom_functions' => '<?php' . \"\\n\" . '/* Do not remove this line. Add your functions below. */' . \"\\n\"\n\t);\n\t\n\treturn apply_filters( 'beaver_extender_custom_functions_options_defaults', $defaults );\n\t\n}",
"public function __default()\r\n {\r\n if( self::isArg( 'notifwindow') ) {\r\n $this->view = \"common_notifwindow\";\r\n $this->viewArgs['table'] = self::getArg( \"table\", AT_posint, true );\r\n } else {\r\n $this->view = \"thecrew_thecrew\";\r\n self::trace( \"Complete reinitialization of board game\" );\r\n }\r\n }",
"public function setDefaultArgs($args);",
"function get_default_argument($raw = FALSE) {\r\n if (!$raw && $this->options['default_argument_type'] == 'date') {\r\n return date($this->format(), time());\r\n }\r\n else {\r\n return parent::get_default_argument($raw);\r\n }\r\n }",
"function b(Array $y = array()) {}",
"function overloadingExample2(){\r\n\r\n // Getting the arguments passed\r\n $myArgs = func_get_args(); \r\n\r\n // check no: of argument and do task respectively\r\n switch(func_num_args()){\r\n case 0:\r\n echo \"\\nDo task with zero argument\";\r\n break;\r\n\r\n case 1:\r\n echo (\"\\n\".$myArgs[0].\" is the only argument\");\r\n break;\r\n\r\n case 2:\r\n echo (\"\\nTwo args are: \".$myArgs[0].\" & \".$myArgs[1]);\r\n break;\r\n\r\n default:\r\n echo(\"\\Default.\");\r\n }\r\n }",
"function doSomething($nim, $nama=\"nilai default\"){\r\necho \" seseorang yang perutnya buncit dan tukang makan yaitu $nama yang $nim <br>\";\r\n}",
"protected function setDefaultParams()\n {\n foreach ($this->allowedParams as $param => $options) {\n $this->params[$param] = null;\n if (! empty($options['arguments'])) {\n $this->params[$param] = array();\n foreach ($options['arguments'] as $arg => $opts) {\n if (! empty($opts['default'])) {\n $cast = ! empty($opts['cast']) ? $opts['cast'] : 'string';\n $this->params[$param][$arg] = $this->castValue($cast, $opts['default']);\n }\n }\n } elseif (! empty($options['default'])) {\n $cast = ! empty($options['cast']) ? $options['cast'] : 'string';\n $this->params[$param] = $this->castValue($cast, $options['default']);\n }\n }\n }",
"public function setDefaultCallback(string $cb, ?string $arg = null): void {}"
] | [
"0.85506386",
"0.72398055",
"0.6918609",
"0.6867501",
"0.6800385",
"0.6800385",
"0.6800385",
"0.67468464",
"0.66977906",
"0.6640529",
"0.6619597",
"0.6611857",
"0.65598464",
"0.64451367",
"0.64451367",
"0.6417924",
"0.63643",
"0.63271976",
"0.6274695",
"0.62465084",
"0.6239502",
"0.6235965",
"0.61744416",
"0.6129989",
"0.60924554",
"0.60924554",
"0.60743773",
"0.6057298",
"0.6046024",
"0.603333",
"0.5991209",
"0.59905463",
"0.59738976",
"0.59599096",
"0.5954683",
"0.5954683",
"0.5948432",
"0.59447724",
"0.59252137",
"0.5899077",
"0.5888194",
"0.58863413",
"0.5855839",
"0.5852991",
"0.5845308",
"0.5834245",
"0.58277756",
"0.579276",
"0.57866764",
"0.57866764",
"0.57866764",
"0.57778454",
"0.5761896",
"0.5758712",
"0.57579225",
"0.57425445",
"0.57374984",
"0.5732404",
"0.57284784",
"0.5728114",
"0.57271415",
"0.5724068",
"0.5723807",
"0.57123256",
"0.5702894",
"0.57025796",
"0.56988233",
"0.5670018",
"0.56623214",
"0.56583124",
"0.5658305",
"0.56560606",
"0.5652386",
"0.5650338",
"0.56454897",
"0.5644148",
"0.56217265",
"0.56149226",
"0.5608894",
"0.5606301",
"0.5603592",
"0.56030893",
"0.5601771",
"0.56016445",
"0.5599875",
"0.55963385",
"0.5592353",
"0.559075",
"0.5590242",
"0.55847126",
"0.5583404",
"0.5581222",
"0.5580349",
"0.5577337",
"0.55769235",
"0.55741614",
"0.5572762",
"0.5572525",
"0.5567236",
"0.5566154"
] | 0.5809888 | 47 |
Remove a student record from the file | function help()
{
return
"\n -------------------------------------------------------------------------\n".
" ---- ~ BidVest Data : Assessment Commands ~ -------\n".
" -------------------------------------------------------------------------\n\n".
" All comamnds begin with '\e[1m\033[92mphp run.php\033[0m'\e[0m\n".
" Then append of the folling options: \n".
" -------------------------------------------------------------------------\n".
"\n\n".
" 1. \e[1m --action=\033[34madd \033[0m \e[0m : \e[3mThis allows you to add a record.\e[0m \n\n".
" 2. \e[1m --action=\033[33medit \033[0m \e[1m--id=<vaild_id>\e[0m \e[0m : \e[3mEdit a student record.\e[0m \n\n".
" (leave filed blank to keep previous value)\n\n".
" 3. \e[1m --action=\033[91mdelete\033[0m \e[1m--id=<vaild_id>\e[0m \e[0m : \e[3mDelete a student record (remove file only).\e[0m \n\n".
" 4. \e[1m --action=\033[36msearch \033[0m \e[0m : \e[3mSearch for a student record. \e[0m \n\n".
" -------------------------------------------------------------------------\n\n".
" Where \e[1m<valid_id>\e[0m must be an 8-digit number.\n\n".
" -------------------------------------------------------------------------\n";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function deleteFileRecord($fileName) {\n /** @var URLRequest $record */\n $record = URLRequest::where('fileName', $fileName)->first();\n shell_exec('cd /Stream && sudo rm ' . $record->fileName);//Remove the file from the /Stream directory.\n $record->delete(); //Delete $record from the database.\n }",
"function remove_passwords($term) {\n\tglobal $samba_share;\n\t$file=$samba_share.$term.'_users_stu.csv';\n\tif (file_exists($file)) {\n\n\t\t$stu_file=file_get_contents($file);\n\t\t$student_users=explode(\"\\n\",$stu_file);\n\t\t$writeit=\"\";\n\t\tforeach ($student_users as $line) {\n\t\t\t$line=preg_replace('/\"1845(\\d{4})\"/', '\"\"', $line);\n\t\t\t$line=preg_replace('/\"status\"(.*)$/','\"status\"',$line);\n\t\t\t$line=preg_replace('/\"active\"(.*)$/','\"active\"',$line);\n\t\t\t$line=preg_replace('/\"deleted\"(.*)$/','\"deleted\"',$line);\n\t\t\tif (strlen($line)>10) { $writeit .= $line.\"\\n\"; }\n\t\t}\n\t\tfile_put_contents($samba_share.$term.'_users_students.csv', $writeit);\n\t\n\t}\n}",
"function removeStudentFromAlerts($student){\r\n\t\t$user = $_SESSION['userid'];\r\n\t\t$query = \"delete from studentalert where userid='$user' and studentid='$student'\";\r\n\t\tmysql_query($query);\r\n\t}",
"function removestudent(){\n $classid = $_GET['classid'];\n $studid = $_GET['studid'];\n include('../../config.php'); \n $q = \"delete from studentsubject where studid=$studid and classid=$classid\";\n mysql_query($q);\n \n $tmp = mysql_query(\"select * from class where id=$classid\");\n $tmp_row = mysql_fetch_array($tmp);\n $tmp_subject = $tmp_row['subject'];\n $tmp_class = $tmp_row['course'].' '.$tmp_row['year'].'-'.$tmp_row['section'];\n \n $tmp = mysql_query(\"select * from student where id=$studid\");\n $tmp_row = mysql_fetch_array($tmp);\n $tmp_student = $tmp_row['fname'].' '.$tmp_row['lname'];\n \n $act = \"remove student $tmp_student from class $tmp_class with the subject of $tmp_subject\";\n $this->logs($act);\n \n header('location:../classstudent.php?r=success&classid='.$classid.'');\n }",
"function deleteFile($db, $strDetailID = \"\")\n{\n global $words;\n $bolNewData = true;\n if ($strDetailID != \"\") {\n $strSQL = \"SELECT * FROM hrd_training_request \";\n $strSQL .= \"WHERE id = '$strDetailID' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strFile = $rowDb['doc'];\n if ($strFile != \"\") {\n if (file_exists(\"trainingdoc/\" . $strFile)) {\n unlink(\"trainingdoc/\" . $strFile);\n }\n $strSQL = \"UPDATE hrd_training_request SET doc = '' WHERE id = '$strDetailID' \";\n $resExec = $db->execute($strSQL);\n //writeLog(ACTIVITY_DELETE, MODULE_PAYROLL,\"file $strDetailID\",0);\n }\n }\n }\n return true;\n}",
"public function remove(&$simbio, $str_args) {\n if (!User::isUserLogin()) {\n return false;\n }\n if (isset($_POST['record'])) {\n // master file type\n $this->dbTable = $str_args?$str_args:self::$tables[0];\n // auto generate fields from database\n $this->autoGenerateFields($simbio);\n // get primary key\n $_primary_key = 'id';\n foreach ($this->dbFields as $_fld => $_fld_info) {\n if (isset($_fld_info['isPrimary'])) {\n $_primary_key = $_fld;\n break;\n }\n }\n // convert scalar var to array var\n if (!is_array($_POST['record'])) {\n $_POST['record'][0] = $_POST['record'];\n }\n foreach ($_POST['record'] as $_rec_ID) {\n $_rec_ID = (integer)$_rec_ID;\n $simbio->dbDelete(\"`$_primary_key`='$_rec_ID'\", $this->dbTable);\n }\n }\n $this->index($simbio, $str_args);\n }",
"public static function remove_row( $name, $file ) {;\n $content = file_get_contents( $file );\n $content = str_replace( $name.'.php', '' , $content );\n\n file_put_contents( $file, $content );\n self::skip_empty_lines( $file);\n }",
"function remove($rowindex) {\r\n assert($this->ds->_rowid[$rowindex] != '');\r\n # before deleting row, check if there's a file field, and its value is exist, then delete the assocaiated file first\r\n $um = NULL;\r\n $row = NULL;\r\n foreach ($this->properties as $colvar=>$col) {\r\n if ($col->inputtype == 'file' and $col->datatype == 'int') {\r\n # populate this row first (just once, in case there is more than 1 file field)\r\n if (!$row)\r\n $row = $this->get_row(array('rowid'=>$this->ds->_rowid[$rowindex]));\r\n if (!$row) continue;\r\n $file_id = $row[$col->colname];\r\n if (!$um)\r\n $um = instantiate_module('upload_manager');\r\n $um->del_file($file_id); # del the file\r\n }\r\n }\r\n\r\n $sql = 'delete from `'.$this->db_table.'` where rowid='.$this->ds->_rowid[$rowindex].' limit 1'; # with safeguard\r\n #~ echo '<br>'.$sql;\r\n $res = mysql_query($sql) or die('<br>'.$sql.'<br>'.mysql_error()); #do to database\r\n }",
"function delete($id)\n {\n // a. first find the file in question.\n $search_val = find_by_val(\"student_id\",$id);\n $dir = \"students/\".substr($id,0,2);\n $delete_location = $_SERVER['DOCUMENT_ROOT'] . $dir .\"/\". $id. \".json\";\n\n // b. remove the file not the folder\n\n if (!unlink($delete_location)) {\n err(\"$delete_location \\00[0m cannot be deleted due to an error\");\n }\n else {\n err(\"$delete_location \\33[0m has been deleted\");\n }\n\n // c. if a folder is empty then it must be removed\n if (is_dir_empty($dir)) {\n rmdir($_SERVER['DOCUMENT_ROOT'] . $dir .\"/\");\n }\n\n if(!empty($search_val))\n echo \"\\33[34m Your Student \\33[34m has been deleted \\33[34m succesfully. \\33[0m\";\n else\n err(\"Value non-existent \\33[34m Are you sure these are the correct search values? Please try again. \");\n }",
"public function actionRemove() {\n if (!isset($_POST['id']))\n die(\"what?\");\n $id = (int) $_POST['id'];\n if ($id < 1)\n die(\"unknown file\");\n CUserfiles::model()->RemoveFile($this->user_id, $id);\n\n echo \"OK\";\n }",
"function remove_file_from_db( $fn ) {\n // Prepare DELETE statement for selected file\n $delete = \"DELETE FROM files WHERE filename = :filename\";\n $stmt = $this->pdo->prepare($delete);\n\n //Bind parameters\n $stmt->bindParam(':filename', $fn);\n\n //Execute statement\n $stmt->execute();\n\n return;\n }",
"function delete_student($studentID) {\n global $db;\n $query = 'DELETE FROM students \n WHERE studentID = :studentID';\n $statement = $db->prepare($query);\n $statement->bindValue(':studentID', $studentID);\n $statement->execute();\n $statement->closeCursor();\n }",
"function\tdel_student($login)\n{\n $c = new MongoClient();\n $db = $c->mydb;\n $collection = $c->mydb->selectCollection('student');\n $user = $collection->findOne(array(\"login\" => $login));\n if (!isset($user))\n {\n echo \"\\nL'utilisateur \".$login.\" n'existe pas dans la base de donnees !\\n\\n\";\n return (0);\n }\n else\n {\n echo \"\\nEtes-vous sur de vouloir supprimer l'utilisateur \".$login.\" ?\\n\";\n $cmdline = fopen(\"php://stdin\", \"r\");\n echo \"> \";\n $ent = fgets($cmdline);\n preg_match(\"/^.*$/\", $ent, $rep);\n if ($rep[0] == \"oui\")\n\t{\n\t $collection->remove(array(\"login\" => $login));\n\t echo \"L'utilisateur \".$login.\" a ete supprime !\\n\\n\";\n\t return (0);\n\t}\n else if ($rep[0] == \"non\")\n\t{\n\t echo \"L'utilisateur \".$login.\" n'as pas ete supprime !\\n\\n\";\n\t return (0);\n\t}\n else if ($rep[0] == \"exit\" || $rep[0] == \"quit\")\n\t{\n\t echo \"Bye !\\n\\n\";\n\t return (0);\n\t}\n else\n\t{\n\t echo \"'oui' ou 'non' ?\\n\";\n\t del_student($login);\n\t}\n }\n}",
"public function remove($params)\n {\n $this->load->model(\"import_model\");\n $id = $params[0];\n ///XÓA DATA TRƯỚC KHI XÓA FILE\n $this->truncate($id, false);\n //XÓA FILE\n $status = $this->import_model->update(array(\"deleted\" => 1), $id);\n\n /// Log audit trail\n $text = \"USER '\" . $this->session->userdata('username') . \"' removed record($id) to the table 'pmp_import'\";\n $this->import_model->trail($status, \"delete\", null, null, $id, $text);\n header('Location: ' . $_SERVER['HTTP_REFERER']);\n exit;\n }",
"function deleteLine(string $address, int $line) {\n $csvarr = fileFetcher($address); // gets file at $address, as an array.\n for ($i = 0; $i < count($csvarr); $i++) {\n $csvarr[$i] = explode(\"|\", $csvarr[$i]);\n }\n if (count($csvarr) < $line || $line < 0) { // if line doesn't exist, kills program\n echo \"This line does not exist,\" . $line . \",please try again.\";\n die(\"<a href='../index.php'>Return Home</a>\");\n }\n\n $csvarr[$line][0] = \"Anonymous\";\n $csvarr[$line][1] = \"Author\";\n $csvarr[$line][2] = \"https://pbs.twimg.com/profile_images/1268660533127008256/UNoc474t_400x400.jpg\";\n saveMan($csvarr, $address); // puts array into $id.\n return $csvarr[$line]; // returns line removed to display later.\n}",
"public function rm($section){\n\t\t$body = $this->toArray();\n\t\tunset($body[$section]);\n\t\t$this->updateFile($body);\n\t}",
"public function removeStudentFromList(){\n\n\t\t$viewDataController = new ViewDataController();\n\t\t$data = $viewDataController->buildData();\n\n\t\t$input = Request::all();\t\n\n\t\tif (!isset($input['user_id']) || empty($input['user_id'])) {\n\t\t\treturn 'failed';\n\t\t}\n\n\t\t$cache = Cache::get(env('ENVIRONMENT').'_'.$data['user_id'].'_studentList');\n\n\t\t$cnt = 0;\n\t\tforeach ($cache as $key) {\n\t\t\tif ($key['user_id'] == $input['user_id']) {\n\t\t\t\tunset($cache[$cnt]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$cnt++;\n\t\t}\n\n\t\tCache::put(env('ENVIRONMENT').'_'.$data['user_id'].'_studentList', $cache, 60);\n\n\t\treturn 'success';\n\t}",
"function delLineFromFile($fileName, $lineNum){\n\t\t if(!is_writable($fileName))\n\t\t\t{\n\t\t\t// print an error\n\t\t\tprint \"The file $fileName is not writable\";\n\t\t\t// exit the function\n\t\t\texit;\n\t\t\t}\n\t\t else\n\t\t\t {\n\t\t\t// read the file into an array \n\t\t\t$arr = file($fileName);\n\t\t\t}\n\n\t\t // the line to delete is the line number minus 1, because arrays begin at zero\n\t\t $lineToDelete = $lineNum-1;\n\n\t\t // check if the line to delete is greater than the length of the file\n\t\t if($lineToDelete > sizeof($arr))\n\t\t\t{\n\t\t\t // print an error\n\t\t\tprint \"You have chosen a line number, <b>[$lineNum]</b>, higher than the length of the file.\";\n\t\t\t// exit the function\n\t\t\texit;\n\t\t\t}\n\n\t\t //remove the line\n\t\t unset($arr[\"$lineToDelete\"]);\n\n\t\t // open the file for reading\n\t\t if (!$fp = fopen($fileName, 'w+'))\n\t\t\t{\n\t\t\t// print an error\n\t\t\t\tprint \"Cannot open file ($fileName)\";\n\t\t\t // exit the function\n\t\t\t\texit;\n\t\t\t\t}\n\n\t\t // if $fp is valid\n\t\t if($fp)\n\t\t\t{\n\t\t\t\t// write the array to the file\n\t\t\t\tforeach($arr as $line) { fwrite($fp,$line); }\n\n\t\t\t\t// close the file\n\t\t\t\tfclose($fp);\n\t\t\t\t}\n\n\t\t\n\t\t}",
"public function deleteFrom($record = null, $index = null) {\n $array = $this->readFile();\n if (is_null($record)) {\n $array = [];\n }\n else if (!is_null($record) && is_null($index)) {\n $array[$record] = null;\n for ($i = $record; $i < count($array); $i++) {\n if ($i == count($array) - 1) {\n $array[$i] = null;\n break;\n }\n $array[$i] = $array[$i + 1];\n }\n }\n else {\n $array[$record][$index] = null;\n for ($i = $index; $i < count($array[$record]); $i++) {\n if ($i == count($array[$record]) - 1) {\n $record[$i] = null;\n break;\n }\n $array[$record][$i] = $array[$record][$i + 1];\n }\n }\n $this->writeFile($array);\n }",
"function deleteDocument() {\n \tglobal $synAbsolutePath;\n global ${$this->name}, ${$this->name.\"_name\"}, ${$this->name.\"_old\"}; // ${$this->name} = ${\"surname\"} = $surname\n include_once(\"../../includes/php/utility.php\");\n $ext=$this->translate($this->getValue());\n $mat=$this->translatePath($this->mat);\n $filename=$this->createFilename(false);\n $documentRoot=$synAbsolutePath.\"/\";\n $fileToBeRemoved=$documentRoot.$mat.$filename.\"*\";\n foreach (glob($fileToBeRemoved) as $filename)\n unlink($filename);\n }",
"public function delete($filename);",
"public function deleteLine($line) {\r\n\t\tif ($this->exists && $line !== null) {\r\n\t\t\t$lineData = $this->readByLine ();\r\n\t\t\t\r\n\t\t\t$inodes = new iArrayList ();\r\n\t\t\tfor($y = 0; $y < sizeof ( $lineData ); $y ++) {\r\n\t\t\t\t$inodes->add_iNode ( new iNode ( $lineData [$y], null, null, null ) );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$inodes->removeNode ( $line );\r\n\t\t\t\r\n\t\t\t$this->clearFile ();\r\n\t\t\t\r\n\t\t\tfor($y = 0; $y < $inodes->count; $y ++) {\r\n\t\t\t\t$this->writeToFile ( $inodes->getNode ( $y )->Data1 );\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$inodes->__destruct ();\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public function remove($index)\n {\n $this->lines = \\array_diff_key($this->lines, array($index => ''));\n\n $this->write();\n }",
"function removeHard()\r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\r\n\t\t$userid = ($this->user) ? $this->user->id : $this->owner_id;\r\n\r\n\t\tUserFilesRemoveFile($dbh, $this->id, $userid, false, true);\r\n\t}",
"public function clearRecord($rid){\n $oldRecord = $this->domDocument->getElementById($rid); //get Root\n $this->domDocument->documentElement->removeChild($oldRecord); // remove root\n // save back to disk \n $this->domDocument->save($this->xmlPath);\n }",
"function deleteFilesFromRecord($uid)\t{\n\t\t$table = $this->theTable;\n\t\t$rec = $GLOBALS['TSFE']->sys_page->getRawRecord($table,$uid);\n\n\t\t//$GLOBALS['TSFE']->includeTCA();\n\t\tt3lib_div::loadTCA($table);\n\t\treset($GLOBALS['TCA'][$table]['columns']);\n\t\t$iFields=array();\n\t\twhile(list($field,$conf)=each($GLOBALS['TCA'][$table]['columns']))\t{\n\t\t\tif ($conf['config']['type']=='group' && $conf['config']['internal_type']=='file')\t{\n\n\t\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery($table, $this->conf['uidField'].'='.intval($uid), array($field => ''));\n\n\t\t\t\t$delFileArr = explode(',',$rec[$field]);\n\t\t\t\treset($delFileArr);\n\t\t\t\twhile(list(,$n)=each($delFileArr))\t{\n\t\t\t\t\tif ($n)\t{\n\t\t\t\t\t\t$fpath = $conf['config']['uploadfolder'].'/'.$n;\n\t\t\t\t\t\tunlink($fpath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function removeSeatMember() {\n $id = $this->input->get('id');\n $tdata = array(\n 'student_id' => '',\n 'student_name' => '',\n 'class' => '',\n 'roll_number' => ''\n );\n $this->db->where('id', $id);\n if ($this->db->update('dormitory_bed', $tdata)) {\n redirect('dormitory/dormitoryReport', 'refresh');\n }\n }",
"private function removeFile($fid) {\n // Load and delete old file.\n $file = File::load($fid);\n \\Drupal::service('file.usage')->delete($file, 'itkore_admin', 'user', '1', '1');\n }",
"function delete() {\n try {\n $delete = \"Name: \" . $_POST[\"username\"] . \" , Email: \" . $_POST[\"email\"] . \" , Phone: \" . $_POST[\"phone\"];\n $data = file($this->directory);\n $out = array();\n \n foreach ($data as $line) {\n if (trim($line) != $delete) {\n $out[] = $line;\n }\n }\n\n $file = fopen($this->directory, \"w+\");\n flock($file, LOCK_EX);\n foreach ($out as $line) {\n fwrite($file, $line);\n }\n flock($file, LOCK_UN);\n fclose($file);\n return true;\n }\n catch(Exception $e) {\n echo \"Delete not successful: \" . $e;\n return false;\n }\n }",
"function deleteSurveyRecord()\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$affectedRows = $ilDB->manipulateF(\"DELETE FROM svy_svy WHERE survey_id = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\n\t\t$result = $ilDB->queryF(\"SELECT questionblock_fi FROM svy_qblk_qst WHERE survey_fi = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\t\t$questionblocks = array();\n\t\twhile ($row = $ilDB->fetchAssoc($result))\n\t\t{\n\t\t\tarray_push($questionblocks, $row[\"questionblock_fi\"]);\n\t\t}\n\t\tif (count($questionblocks))\n\t\t{\n\t\t\t$affectedRows = $ilDB->manipulate(\"DELETE FROM svy_qblk WHERE \" . $ilDB->in('questionblock_id', $questionblocks, false, 'integer'));\n\t\t}\n\t\t$affectedRows = $ilDB->manipulateF(\"DELETE FROM svy_qblk_qst WHERE survey_fi = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\t\t$this->deleteAllUserData();\n\n\t\t$affectedRows = $ilDB->manipulateF(\"DELETE FROM svy_anonymous WHERE survey_fi = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\t\t\n\t\t// delete export files\n\t\tinclude_once \"./Services/Utilities/classes/class.ilUtil.php\";\n\t\t$svy_data_dir = ilUtil::getDataDir().\"/svy_data\";\n\t\t$directory = $svy_data_dir.\"/svy_\".$this->getId();\n\t\tif (is_dir($directory))\n\t\t{\n\t\t\tinclude_once \"./Services/Utilities/classes/class.ilUtil.php\";\n\t\t\tilUtil::delDir($directory);\n\t\t}\n\n\t\tinclude_once(\"./Services/MediaObjects/classes/class.ilObjMediaObject.php\");\n\t\t$mobs = ilObjMediaObject::_getMobsOfObject(\"svy:html\", $this->getId());\n\t\t// remaining usages are not in text anymore -> delete them\n\t\t// and media objects (note: delete method of ilObjMediaObject\n\t\t// checks whether object is used in another context; if yes,\n\t\t// the object is not deleted!)\n\t\tforeach($mobs as $mob)\n\t\t{\n\t\t\tilObjMediaObject::_removeUsage($mob, \"svy:html\", $this->getId());\n\t\t\t$mob_obj =& new ilObjMediaObject($mob);\n\t\t\t$mob_obj->delete();\n\t\t}\n\t}",
"public function rm($filename)\n {\n $nodes = $this->idx_tree->nodes();\n unset($nodes[$filename]);\n $this->idx_tree->nodes($nodes);\n }",
"function remove($student,$year,$month)\n {\n $value = array($month => null);\n $this->ci->db->where('student_id', $student);\n $this->ci->db->where('financial_year', $year);\n $this->ci->db->update($this->table, $value);\n }",
"private function deleteLangFileContent() \n {\n $this->read();\n unset($this->arrayLang[$this->key]);\n $this->save();\n }",
"public function remove($s_name)\n {\n // Get full student details\n $this->readSingle($s_name);\n\n // Delete student from p_s_junction\n $query = '\n DELETE FROM p_s_junction\n WHERE p_id = :p_id \n AND s_id = :s_id\n ';\n\n // Prepare statement\n $stmt = $this->conn->prepare($query);\n\n // Bind data\n $stmt->bindParam(':p_id', $this->p_id);\n $stmt->bindParam(':s_id', $this->s_id);\n\n // Execute query, return false if query doesn't execute\n if (!$stmt->execute()) return false; // Query executing with 0 rows affected won't return false, therefore we need to check for that separately\n\n // Check rows affected, if none, show error\n if ($stmt->rowCount() == 0) {\n $_SESSION['message'] = \"Could not delete student because the specified student was not found.\";\n return false;\n }\n\n // Print error if something goes wrong\n // printf(\"ERROR: \", $stmt->error);\n\n // Set session message if successful\n $_SESSION['message'] = \"Student removed from the project!\";\n\n // If student is no longer participating in any projects, delete from database\n if (!$this->readSingle($this->s_name, \"any\")) {\n $this->delete($this->s_id);\n\n // Change message\n $_SESSION['message'] = \"Student deleted!\";\n }\n\n return true;\n }",
"public function unshare($user, $filename) {\n $stmt = $this->pdo->prepare('delete from share where owner_id = :id and file_id = (select id from file where user_id = :id and filename = :filename)');\n $stmt->bindValue(':id', $this->id);\n $stmt->bindValue(':filename', $filename);\n return $stmt->execute();\n }",
"protected function removeSysFileReferenceRecordsFromImportDataWithRelationToMissingFile() {}",
"function delete_student_meta( $student_id, $meta_key, $meta_value = '' ) {\n return delete_metadata( 'student', $student_id, $meta_key, $meta_value );\n }",
"private function removeEntrada($filePath){\n \\Storage::delete($filePath);\n }",
"function DelRecord($pkvalue)\n {\n $databasename = $this->databasename;\n $tablename = $this->tablename;\n $path = $this->path;\n $this->numrecords = -1;\n $this->numrecordscache = array();\n $oldfile = $this->GetFileRecord($this->primarykey,$pkvalue);\n $dirold = dirname($oldfile) . \"/\" . basename($oldfile,\".php\");\n if ( !file_exists($oldfile) )\n return false;\n\n if ( preg_match(\"/\\\\/$/si\",$this->datafile) )\n if ( !strpos($pkvalue,\"..\") !== false && file_exists(\"{$this->datafile}$pkvalue/\") && is_dir(\"{$this->datafile}$pkvalue/\") )\n remove_dir_rec(\"{$this->datafile}$pkvalue\");\n\n $this->ClearCachefile();\n $n = readDatabase($oldfile,$this->xmlfieldname,false,false);\n\n if ( count($n) == 1 ) // se è l' ultimo record\n {\n if ( preg_match(\"/\\\\/$/si\",$this->datafile) )\n {\n @ unlink($oldfile);\n if ( file_exists($oldfile) && is_dir($oldfile) )\n {\n remove_dir_rec($oldfile);\n }\n }\n readDatabase($oldfile,$this->xmlfieldname,false,false);\n return true;\n }\n\n $pkey = $this->primarykey;\n $pvalue = $pkvalue;\n $readok = false;\n for ( $i = 0;$i < _MAXTENTATIVIDIACCESSO;$i++ )\n {\n if ( !file_exists($oldfile) ) //errore\n break;\n $oldfilestring = file_get_contents(\"$oldfile\");\n if ( strpos($oldfilestring,\"</{$this->xmltagroot}>\") !== false )\n {\n $readok = true;\n break;\n }\n }\n if ( !$readok )\n {\n return false;\n }\n\n $oldfilestring = removexmlcomments($oldfilestring);\n $strnew = \"\";\n $newfilestring = preg_replace('/<' . $this->xmlfieldname . '>([^(' . $this->xmlfieldname . ')]*)<' . $pkey . '>' . $pvalue . '<\\/' . $pkey . '>(.*?)<\\/' . $this->xmlfieldname . '>/s',$strnew,$oldfilestring);\n $newfilestring = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<?php exit(0);?>\\n\" . trim($newfilestring,\"\\n \");\n //dprint_xml($oldfilestring);\n //dprint_xml($newfilestring);\n //die();\n $file = fopen($oldfile,\"w\");\n fwrite($file,$newfilestring);\n fclose($file);\n $this->ClearCachefile();\n readDatabase($oldfile,$this->xmlfieldname,false,false);\n return true;\n }",
"public function deleteStudent($id){\n\t \t\n\t\t//get Student by Id\n\t\t$classes = CaStudent::find($id);\n\t\t\n\t\t//delete student\n\t\t$classes->delete();\n\t\t\n\t }",
"protected function removeFilename($filename){@unlink($filename);}",
"function deleteWine() {\n\t\tif (isset($_GET['wine'])) {\n\t\t\t//get the index of the wine\n\t\t\t$wineIdx = getWineRecIndex(\n\t\t\t\t\t\tbase64_decode($_GET['wine'])\n\t\t\t\t\t);\n\t\t\t//get the existing wines\n\t\t\t$wines = getWines();\n\n\t\t\t//get the contents of the wine file\n\t\t\t$writeFile = fopen('data/wines.json', \"w\");\n\t\t\t//delete the record from the array using the index\n\t\t\tarray_splice($wines, $wineIdx, 1);\n\t\t\t//convert userRecord to JSON\n\t\t\t$winesJson = json_encode($wines,JSON_PRETTY_PRINT);\n\t\t\t//write JSON string to file\n\t\t\tfwrite($writeFile, $winesJson);\n\t\t\t//close file\n\t\t\tfclose($writeFile);\n\t\t}\n\t}",
"private function removeUploadedFile()\n {\n if(!isset($_REQUEST['file']))\n {\n exit; \n }\n \n list($file, $src, $size) = explode(':', $_REQUEST['file']);\n \n if(file_exists($src))\n {\n @unlink($src);\n }\n exit;\n }",
"function fileRemove($fileId){\n\tinclude '../../database.php';\n\n\t$stmt = $conn->prepare(\"SELECT * FROM file WHERE file_id=?\");\n\t$stmt->execute(array($fileId));\n\t$filelocation = $stmt->fetch(PDO::FETCH_ASSOC);\n\t$filelocation = $_SERVER[\"DOCUMENT_ROOT\"] . $filelocation;\n\n\tunlink($filelocation);\n\n\t$stmt = $conn->prepare(\"DELETE FROM file WHERE file_id=?\");\n\t$stmt->execute(array($fileId));\n}",
"public function file_delete($filename);",
"public function unlink($file);",
"public function removeDocRecord($id){\n //get document by ID\n $file = File::find($id)->delete();\n\n //load form view or\n //redirect back to the main page\n return view('document_control.document_control_review', [\n 'file' => $file\n ]);\n }",
"private function delete_file($file){\n\t\t$fileLink = fopen($file,'w');\n\t\tfclose($fileLink);\n\t\tunlink($file);\n\t}",
"function unlinkFile() {\n\tif (isset($_REQUEST['ulink']) && $_REQUEST['ulink']!=\"\" && isset($_REQUEST['docid']) && $_REQUEST['docid']>0) {\n\t\tunlink('document/'. $_REQUEST['docid'].'/'.$_REQUEST['ulink']);\n\t}\n\theader(\"Location: index.php?view=\".$_REQUEST['controller'].\"&file=\".$_REQUEST['file'].\"&task=lendMoneyViewC\".\"&pid=\".$_REQUEST['docid'].\"\");\t\n}",
"function deleteFile() {\r\n\t\tif (file_exists($this->data[$this->alias]['path'])) {\r\n\t\t\tunlink($this->data[$this->alias]['path']);\r\n\t\t}\r\n\t}",
"private function deleteRecords(){\r\n\t\r\n\t\t$fileNames = explode(',', $this->collection['images']);\r\n\t\t// remove imagerecords which are not used anymore\r\n\t\tforeach($this->images as $filename => $image){\r\n\t\t\tif(array_search($filename, $fileNames) === false){\r\n\t\t\r\n\t\t\t\t$this->db->exec_DELETEquery('tx_gorillary_images', \"image='$filename' AND collection='\".$this->collection['uid'].\"'\");\r\n\t\t\t\t//unset ($this->images[$filename]);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"function _webform_delete_file($data, $component) {\r\n // Delete an individual submission file.\r\n $filedata = unserialize($data['value']['0']);\r\n if (isset($filedata['filepath']) && is_file($filedata['filepath'])) {\r\n unlink($filedata['filepath']);\r\n db_query(\"DELETE FROM {files} WHERE filepath = '%s'\", $filedata['filepath']);\r\n }\r\n}",
"public function delete($file) {\n\t}",
"public function removeStudent($studentId = FALSE){\n\n if ($studentId) {\n $this->db->where('usr_id', $studentId);\n $this->db->update('user', array('usr_assigned_lecturer_id' => 'DEFAULT'));\n }\n }",
"function deleteAssignFile($id,$conn){\r\n\r\n //get file path\r\n\r\n $sql3 = \"SELECT * FROM assignmentFiles\r\n WHERE assignmentID = '\".$id.\"'\";\r\n\r\n $result3 = mysqli_query($conn, $sql3);\r\n\r\n if (mysqli_num_rows($result3) > 0) {\r\n // output data of each row\r\n while($row = mysqli_fetch_assoc($result3)){\r\n\r\n\r\n $Path = \"../assignment/\".$row3['file'];\r\n if (file_exists($Path)){\r\n unlink($Path); \r\n } \r\n\r\n }\r\n }\r\n\r\n //end of unlinking \r\n\r\n\r\n\r\n $sql = \"DELETE FROM assignmentFiles\r\n WHERE assignmentID = '\".$id.\"'\";\r\n\r\n mysqli_query($conn, $sql);\r\n\r\n\r\n}",
"public function deleteData()\n {\t\t\n \t$arrayId = $this->getAllUserId($this->readFromLocalFile());\n \tforeach($arrayId as $id)\n \t{\n \t\t$user = User::find()->where(['id' => $id])->one();\n \t\tif($user)\n \t\t{\n \t\t\t$user->delete();\n \t\t}\n \t}\n \t$this->deleteSelectedLocalItems('user');\n }",
"function delete_first_line() {\n\t\tarray_shift($this->record);\n\t\treturn true;\n\t}",
"function del( $sy_id,$student_id,$date,$orno ) {\n\t\tif( $this->begin_transaction()==false ) return false;\n\t\tif( $orno > 0 ) {\n\t\t\t$cmd = \"DELETE FROM tblpayment_extrainfo WHERE orno='$orno'\";\n\t\t\tif( $this->query( $cmd )==false ) return $this->rollback();\n\t\t}\n\t\t$cmd = \"DELETE FROM $this->tblname\"\n\t\t\t. \" WHERE sy_id='$sy_id'\"\n\t\t\t. \" AND student_id='$student_id'\"\n\t\t\t. ($orno > 0 ? \" AND orno='$orno'\" : \"\")\n\t\t\t. \" AND date='$date'\";\n\t\tif( $this->query( $cmd )==false ) return $this->rollback();\n\t\treturn $this->end_transaction();\n\t}",
"public function deletestudents ($student_number) {\n $sqlQuery = \" DELETE FROM students \";\n $sqlQuery .= \" WHERE student_number= $student_number\";\n $result = $this -> getDbManager () -> executeQuery ( $sqlQuery );\n return $result ;\n }",
"private function removeOldParts()\n {\n $filename = $this->substream->getFilename();\n for ($i = $this->index + 1; true; ++$i) {\n $indexed_filename = $this->getIndexPartFilename($filename, $i);\n $target = dirname($this->filename).'/'.$indexed_filename;\n if (file_exists($target)) {\n unlink($target);\n } else {\n break;\n }\n }\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function deleteRecords($lintidreg) {\r\n $db = Zend_Db_Table::getDefaultAdapter();\r\n $where_delete_records = \" IdStudent = '\".$lintidreg.\"' \" ;\r\n $db->delete('tbl_academicprogress_subjects', $where_delete_records); \r\n $db->delete('tbl_academic_progress', $where_delete_records); \r\n \r\n }",
"function delete()\n\t{\n\t\t$kReport = $this->input->post(\"kReport\");\n\t\t$kStudent = $this->input->post(\"kStudent\");\n\t\t$this->report->delete($kReport);\n\t\tredirect(\"report/get_list/student/$kStudent\");\n\t}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"public function markForDeletion(): void\n {\n $this->oldFileName = $this->fileName;\n $this->fileName = null;\n }",
"public function deleteFile(){\n\t\t$db = $this->db;\n\t\t$id = $_GET[\"id\"];\n\t\t\n\t\t$file = $db->fetchRow($db->select()->from(array(\"tbf\"=>\"tb_applicant_files\"))->where(\"id = ?\", $id));\n\t\tif ($file){\n\t\t\tif ($file[\"userid\"]!=$_SESSION[\"userid\"]){\n\t\t\t\treturn array(\"success\"=>false);\n\t\t\t}\n\t\t\t//$db->delete(\"tb_applicant_files\", $db->quoteInto(\"id = ?\", $id));\n\t\t\t$db->update(\"tb_applicant_files\", array(\"is_deleted\" => 1), $db->quoteInto(\"id = ?\", $id));\n $db->delete(\"solr_candidates\", $db -> quoteInto(\"userid=?\",$_SESSION[\"userid\"]));\n\t\t\t\n\t\t\tglobal $base_api_url;\n\t\t\t\n\t\t\tfile_get_contents($base_api_url . \"/solr-index/sync-candidates/\");\n\t\t\t\n\t\t\tif (file_exists(getcwd().\"/../applicants_files/\".$file[\"name\"])){\n\t\t\t\tunlink(getcwd().\"/../applicants_files/\".$file[\"name\"]);\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfile_get_contents($base_api_url . \"/mongo-index/sync-candidates-files/?userid=\" . $_SESSION[\"userid\"]);\n\t\t\t\n\t\t\t\n\t\t\treturn array(\"success\"=>true);\n\t\t}else{\n\t\t\treturn array(\"success\"=>false);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}",
"public function deleted(Student $student)\n {\n //\n }",
"public function delete_file(){\n if($this->file_name != 'sample.jpg'){\n unlink($this->dir_location . $this->file_name);\n }\n }",
"function clearStudentFW ( $sessionID, $studentID, $Reason ) {\r\n\t\tif($this->getAccessLevel() > 7) {\r\n\r\n // add a contact indicating that the student was removed\r\n $description = \"Student removed from First Watch List [\".$Reason.\"].\";\r\n $this->updateSpecialHistory($studentID,$description,0); \r\n\r\n // update db\r\n\t\t\t$query = \"DELETE FROM `students-FW` WHERE StudentID = '\".$studentID.\"' AND Reason= '\".$Reason.\"'\";\r\n\t\t\tmysql_query($query);\t\t\r\n\t\t\t$query = \"SELECT * FROM `students-FW` WHERE StudentID = '\".$studentID.\"'\";\r\n\t\t\t$result = mysql_query($query);\r\n\t\t\t\r\n\t\t\tif(mysql_num_rows($result) == 0)\r\n\t\t\t{\r\n\t\t\t\t$query = \"UPDATE students SET FirstWatch = 0 WHERE StudentID = '\".$studentID.\"'\";\r\n\t\t\t\tmysql_query($query);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function deleteDocument() {\n $file = $this->getDocumentFile().$this->getAttribute('evidencias')[2];\n\n// check if file exists on server\n if (empty($file) || !file_exists($file)) {\n return false;\n }\n\n// check if uploaded file can be deleted on server\n if (!unlink($file)) {\n return false;\n }\n\n// if deletion successful, reset your file attributes\n $this->evidencias = null;\n\n return true;\n }",
"public function removeMutira(){\n $this->validaAutenticacao();\n\n $tweet = Conteiner::getModel('Mutira');\n $tweet->__set('mutira', $_POST['mutira']);\n $tweet->__set('id_usuario', $_SESSION['id']);\n \n\n $tweet->removeMutira();\n\n //header('Location: /timeline');\n\n }",
"public function delete($file){\n\t\t\n\t\t//If the users file exists try to delete it\n\t\tif(file_exists($file))\n\t\t{\n\t\t\tunlink($file) or die($this->openFile(\"core/fragments/errors/error34.phtml\"));\n\t\t}\n\t}",
"public function delete($filepath);",
"function deleteEventFromFile($idEvent, $idUser, $eventsArray, $file)\n\t{\n\t\t$i = search_2d_array($eventsArray, \"Event ID\", $idEvent);\n\t\t$p = $eventsArray[$i][\"User ID\"];\n\t\tif ($p == $idUser)\n\t\t{\n\t\t\t// Make string array of file and remove line at index\n\t\t\t$eventStringArray = file($file);\n\t\t\tunset($eventStringArray[$i]);\n\t\t\t// Reset array to string and rewrite file\n\t\t\t$fileContent = implode(\"\", $eventStringArray);\n\t\t\t$eventFile = fopen($file, \"wb\");\n\t\t\t// if the file doesn't open\n\t\t\tif ($eventFile === FALSE)\n\t\t\t\t$errorMessage = \"There was an error deleting the event.\";\n\t\t\t// otherwise write the string and close the file\n\t\t\telse \n\t\t\t{\n\t\t\t\tfwrite($eventFile, $fileContent);\n\t\t\t\tfclose($eventFile);\n\t\t\t\t// Reread the file to the web page's eventsArray\n\t\t\t\t$eventsArray = get2DAssocArray($file, $keys);\n\t\t\t}\n\t\t}\n\t}",
"function stopWatchingStudent( $sessionID, $studentID ) {\r\n\t\t$user = $_SESSION['userid'];\r\n\t\t$query=\"delete from studentwatch where userid='$user' and studentid='$studentID'\";\r\n\t\tmysql_query($query);\r\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"function deleteRecord()\t{\n\t\tif ($this->conf['delete'])\t{\t// If deleting is enabled\n\t\n\t\t\t$origArr = $GLOBALS['TSFE']->sys_page->getRawRecord($this->theTable, $this->recUid);\n\t\t\tif (($GLOBALS['TSFE']->loginUser && $this->conf['requireLogin']) || ( $this->aCAuth($origArr)&& $this->conf['requireLogin'])||!$this->conf['requireLogin'])\t{\t// Must be logged in OR be authenticated by the aC code in order to delete\n\t\t\t\t\t// If the recUid selects a record.... (no check here)\n\t\t\t\tif (is_array($origArr))\t{\n\t\t\t\t\tif ($this->aCAuth($origArr) || $this->metafeeditlib->DBmayFEUserEdit($this->theTable,$origArr, $GLOBALS['TSFE']->fe_user->user,$this->conf['allowedGroups'],$this->conf['fe_userEditSelf'],$this->conf))\t{\t// Display the form, if access granted.\n\t\t\t\t\t\tif (!$GLOBALS['TCA'][$this->theTable]['ctrl']['delete'])\t{\t// If the record is fully deleted... then remove the image (or any file) attached.\n\t\t\t\t\t\t\t$this->deleteFilesFromRecord($this->recUid);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->cObj->DBgetDelete($this->theTable, $this->recUid, TRUE);\n\t\t\t\t\t\t$this->currentArr = $origArr;\n\t\t\t\t\t\t$this->saved = 1;\n\t\t\t\t\t\t$this->userProcess_alt($conf['edit.']['userFunc_afterDelete'],$conf['edit.']['userFunc_afterDelete.'],array('rec'=>$this->currentArr, 'origRec'=>$origArr));\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->error = '###TEMPLATE_NO_PERMISSIONS###';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\t\t$this->error = '###TEMPLATE_NO_PERMISSIONS###';\n\t\t }\n\t\t}\n\t}",
"public function destroy($id)\n {\n $student = Student::findOrFail($id);\n if($student->photo_id == null) {\n $user = User::where('user_id', '=', $student->student_id);\n $user->delete();\n $student->delete();\n } else {\n $user = User::where('user_id', '=', $student->student_id);\n $user->delete();\n unlink(public_path() . $student->photo->file);\n $student->delete();\n }\n \n return redirect()->back()->with('delete_student','The student has been deleted successfully !');\n }",
"public function purgeAllClone($stri_extra_id='')\n {\n $stri_file_name=serialisable::constructFileName($stri_extra_id);\n $stri_user_temp_path=serialisable::constructUserTempPath();\n $stri_file=$stri_user_temp_path.\"/\".$stri_file_name;\n $lenght = strlen($stri_file)-4;//calcule la taille de la chaine -4 (qui correspond a l'extension .slz)\n \n $obj_dir_reader=new file_reader_writer($stri_user_temp_path);\n $arra_file=$obj_dir_reader->readDirectory();\n \n foreach($arra_file as $stri_file2)//parcours le repertoire\n {\n $va=substr_compare($stri_file,$stri_file2,'0',$lenght);\n \n if($va==0)\n { unlink($stri_file2);\n //echo $stri_file.\" \".$stri_file2.\" \".$va.\"<br />\";\n }\n }\n \n return false; \n }",
"function cvs_delete_user($cvs_user, $cvs_project) {\r\n $all_cvs_users = cvs_read_passwd($cvs_project);\r\n $cvs_fields=$all_cvs_users[$cvs_user];\r\n if (!is_null($cvs_fields)) {\r\n\tunset($all_cvs_users[$cvs_user]);\r\n\tcvs_write_file($all_cvs_users, $cvs_project);\r\n\tcvs_log(1, \"Deleted user $cvs_user\");\r\n } else {\r\n\tcvs_log(3, \"User $cvs_user does not exist\");\r\n } \r\n}",
"function RemoveSingleFile($file_id, $file_location){\n\t$file_location = $_SERVER[\"DOCUMENT_ROOT\"] . $file_location;\n\n\tif (unlink($file_location)){\t\t\t\n\t\t$stringBuilder = \"DELETE FROM `file` WHERE file_id=? \";\n\t\t//preparing the query\n\t\t$query = GetDatabaseConnection()->prepare($stringBuilder);\n\t\tif($query->execute(array($file_id))){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n}",
"function unlink_file($bean_id,$file_name) {\n\t\tglobal $log, $root_directory, $upload_dir;\n\t\t$log->debug(\"Entering unlink_file(\".$bean_id.\",\".$file_name.\") method ...\");\n\t\t$log->debug(\"Exiting unlink_file method ...\");\n\t\treturn unlink($root_directory.\"/\".$upload_dir.$bean_id.$file_name);\n\t}",
"function deleteFile($hash);",
"function delete_s2sfu_file( $post_id ) {\n\n\t$filename = get_post_meta( $post_id, '_wp_attached_file', true );\n\t@unlink( ABSPATH . 'wp-content/plugins/s2member-files/' . $filename );\n\t\n}",
"private function removeKey( $file, $key, $value ) {\n // Validate data\n if( !is_scalar( $value ) )\n throw new \\InvalidArgumentException( 'Argument 3 passed to ' . __METHOD__ . ' must be an integer or a string, ' . gettype( $value ) . ' given' );\n\n $match = 0;\n $key = $this->normalizeKey( $key );\n $temp = new \\SplTempFileObject( $this->swap );\n $pointer = $this->openFile( $file . '.key', self::FILE_READ );\n\n // Itereate through lines\n foreach( $pointer as $line ) {\n $data = $this->getDataFromLine( $line, $key, '=' );\n\n // We have a match\n if( FALSE !== $data ) {\n $data = $this->formatter->decode( $data );\n\n // Remove the index\n if( $pos = array_search( $value, $data ) ) {\n unset( $data[$pos] );\n\n // Write the new line if not empty\n if( !empty( $data ) )\n $temp->fwrite( $key . '=' . $this->formatter->encode( $data ) . PHP_EOL );\n\n $match++;\n }\n else {\n $temp->fwrite( $line . PHP_EOL );\n }\n }\n else {\n $temp->fwrite( $line . PHP_EOL );\n }\n }\n\n $this->closeFile( $pointer );\n\n if( $match ) {\n $temp->rewind();\n\n $pointer = $this->openFile( $file, self::FILE_WRITE );\n\n foreach( $temp as $line ) {\n $pointer->fwrite( $line );\n }\n\n $this->closeFile( $pointer );\n }\n\n $this->closeFile( $temp );\n\n return $match;\n }",
"public function deleteGraceMarks($studentId,$classId,$subjectId){\n $query=\"DELETE from \".TEST_GRACE_MARKS_TABLE.\" WHERE studentId='\".$studentId.\"' AND classId='\".$classId.\"' AND subjectId='\".$subjectId.\"'\";\n return SystemDatabaseManager::getInstance()->executeUpdateInTransaction($query);\n }",
"function delete_student($id){\n\t\t\tprint_r($this->input->post());\n\t\t}",
"public function delete_case_study($case_study_id){\n\t\t$success = $this->clear_flagged_case_study($case_study_id);\n\t\tif(!$success){\n\t\t\treturn false;\n\t\t}\n\t\t//get the case study file\n\t\t$q = \"select filename from \".TP.\"transaction_case_studies where case_study_id='\".$case_study_id.\"'\";\n\t\t$res = mysql_query($q);\n\t\tif(!$res){\n\t\t\treturn false;\n\t\t}\n\t\t$cnt = mysql_num_rows($res);\n\t\tif(0 == $cnt){\n\t\t\t//no such case study, this should not happen\n\t\t\treturn false;\n\t\t}\n\t\t$row = mysql_fetch_assoc($res);\n\t\t$filename = $row['filename'];\n\t\tunlink(CASE_STUDY_PATH.\"/\".$filename);\n\t\t//now delete the record\n\t\t$q = \"delete from \".TP.\"transaction_case_studies where case_study_id='\".$case_study_id.\"'\";\n\t\t$result = mysql_query($q);\n\t\tif(!$result){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"function wLogErase($path,$param) {\n \n $fp = unlink($path.\"/\".$param.\".log\");\n //fclose ($fp);\n \n}",
"public function remove_row($mark) {\n\n\t\t$this->db->where('oznaka', $mark); // email must be unique !\n\t\t$this->db->delete('sale');\n\t}",
"function striplinesfromcsv($numberoflines,$filename) {\r\n\t\t\r\n\t\t$fileName = 'nightlies/'.$filename;\r\n\t\t$a = preg_replace(\"/^(.*?\\n){0,$numberoflines}/\",'', file_get_contents($fileName));\r\n\t\t$b = fopen($fileName, 'w');\r\n\t\tfwrite($b, $a);\r\n\t\tfclose($b);\r\n\t\t\r\n\t\t//$filename = 'nightlies/'.$filename;\t\t\r\n\t\t//$file = file($filename);\r\n\t\t//file_put_contents($filename, implode(\"\\n\", array_slice($file, $numberoflines)));\r\n\t\t\r\n\t\techo \" > > > Stripping \".$numberoflines.\" lines from '\".$filename.\"' <br>\";\r\n\t}",
"protected function removeFile()\n {\n if (@is_file($this->getFilePath())) {\n @unlink($this->getFilePath());\n }\n }",
"function DeleteFile($id, $CheminU) {\r\n if (is_file($CheminU.\"/\".$id)) unlink($CheminU.\"/\".$id);\r\n}",
"public function deleteSource()\n {\n return Yii::$app->storage->fileSystemDeleteFile($this->filter_id . '_' . $this->file->name_new_compound);\n }",
"public function destroy(Student $student)\n {\n // return $student;\n $img_perfil = $student->avatar;\n\n if ($img_perfil != 'img-default.png') \n {\n $file_path = public_path().'/images/students/'.$img_perfil;\n \\File::delete($file_path);\n $student->delete($student);\n return redirect('students');\n } \n else \n {\n $student->delete($student);\n return redirect('students');\n }\n\n // return $file_path;\n // return $img_perfil;\n }",
"private function DeleteFirstLine() {\r\n\t\t$handle = fopen($this->results_file, \"r\");\r\n\t\t$first = fgets($handle,2048); \r\n\t\t$outfile=\"temp.txt\";\r\n\t\t$o = fopen($outfile,\"w\");\r\n\t\twhile (!feof($handle)) {\r\n\t\t\t$buffer = fgets($handle,2048);\r\n\t\t\tfwrite($o,$buffer);\r\n\t\t}\r\n\t\tfclose($handle);\r\n\t\tfclose($o);\r\n\t}",
"public function deleteIndexedFile(File $file)\n {\n $query = $this->pdo->prepare(\"DELETE FROM rt_files WHERE id = :id_bind\");\n $query->bindValue(\":id_bind\", $file->getId(), \\PDO::PARAM_INT);\n $query->execute();\n }",
"public static function deleteFile($fileName, $userId);"
] | [
"0.64361817",
"0.60772014",
"0.6060365",
"0.60162276",
"0.60119575",
"0.6002251",
"0.5964741",
"0.5884228",
"0.5871385",
"0.5852393",
"0.58314866",
"0.5815117",
"0.5789033",
"0.57733095",
"0.57686245",
"0.5760568",
"0.57599443",
"0.5746159",
"0.5715588",
"0.57068044",
"0.5688397",
"0.56877697",
"0.56726485",
"0.5626491",
"0.56259084",
"0.5623993",
"0.561178",
"0.5611463",
"0.5604102",
"0.5552188",
"0.5551935",
"0.55476147",
"0.55393434",
"0.5529225",
"0.5525676",
"0.5519541",
"0.54884076",
"0.5486585",
"0.54775035",
"0.5458344",
"0.54464185",
"0.54443884",
"0.544341",
"0.5438669",
"0.54350734",
"0.54242676",
"0.5413684",
"0.5412242",
"0.5405383",
"0.5400775",
"0.5389521",
"0.538206",
"0.53767806",
"0.5376394",
"0.53675663",
"0.53632754",
"0.5360539",
"0.53530127",
"0.5350097",
"0.53453374",
"0.53447783",
"0.53426415",
"0.5339018",
"0.5335292",
"0.5335292",
"0.5335292",
"0.5335292",
"0.5321664",
"0.5314199",
"0.53117067",
"0.53097296",
"0.53051186",
"0.5301367",
"0.5300775",
"0.5297955",
"0.52965224",
"0.529623",
"0.52842164",
"0.52679926",
"0.52651435",
"0.5259675",
"0.52538896",
"0.5248578",
"0.5248022",
"0.52479565",
"0.5247363",
"0.52181894",
"0.52181196",
"0.52158064",
"0.52148926",
"0.5213141",
"0.52050847",
"0.5197217",
"0.51899105",
"0.51815265",
"0.5178731",
"0.5173785",
"0.51712143",
"0.5165671",
"0.5150707",
"0.51499766"
] | 0.0 | -1 |
Remove a student record from the file | function add()
{
//-- 1. create a student record.(Number must be seven chars)
$student = new stdClass();
echo "\n Enter id:";
$student->student_id = trim(fgets(STDIN));
$exists = 0;
foreach ($students as $Student => $id) {
if($student->student_id == $id)
{
$exists = 1;
}
};
if( $exists == 0 && is_numeric($student->student_id) && strlen((string)$student->student_id)>7)
{
echo " Enter name:";
$student->name = trim(fgets(STDIN));
echo " Enter surname:";
$student->surname = trim(fgets(STDIN));
echo " Enter age:";
$student->age = trim(fgets(STDIN));
echo " Enter curriculum:";
$student->curriculum = trim(fgets(STDIN));
$content = json_encode($student);
$dir = "students/".substr($student->student_id,0,2);
mkdir($dir,0777,true);
$record = fopen($_SERVER['DOCUMENT_ROOT'] . $dir ."/". $student->student_id. ".json","wb");
if (!$record) {
err("file already exists");
}
fwrite($record,$content);
fclose($record);
echo "\n \033[32m A student(".$student->student_id.") was just created succesfully in!!\033[0m";
} else {
if($exists == 1)
err("A Student Id number\033[0m already exists.");
elseif (!is_numeric($student->student_id))
err("This Student Id number\033[0m isn't a number.");
else
err("A Student Id number\033[0m must have more than 7 numeric characters");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function deleteFileRecord($fileName) {\n /** @var URLRequest $record */\n $record = URLRequest::where('fileName', $fileName)->first();\n shell_exec('cd /Stream && sudo rm ' . $record->fileName);//Remove the file from the /Stream directory.\n $record->delete(); //Delete $record from the database.\n }",
"function remove_passwords($term) {\n\tglobal $samba_share;\n\t$file=$samba_share.$term.'_users_stu.csv';\n\tif (file_exists($file)) {\n\n\t\t$stu_file=file_get_contents($file);\n\t\t$student_users=explode(\"\\n\",$stu_file);\n\t\t$writeit=\"\";\n\t\tforeach ($student_users as $line) {\n\t\t\t$line=preg_replace('/\"1845(\\d{4})\"/', '\"\"', $line);\n\t\t\t$line=preg_replace('/\"status\"(.*)$/','\"status\"',$line);\n\t\t\t$line=preg_replace('/\"active\"(.*)$/','\"active\"',$line);\n\t\t\t$line=preg_replace('/\"deleted\"(.*)$/','\"deleted\"',$line);\n\t\t\tif (strlen($line)>10) { $writeit .= $line.\"\\n\"; }\n\t\t}\n\t\tfile_put_contents($samba_share.$term.'_users_students.csv', $writeit);\n\t\n\t}\n}",
"function removeStudentFromAlerts($student){\r\n\t\t$user = $_SESSION['userid'];\r\n\t\t$query = \"delete from studentalert where userid='$user' and studentid='$student'\";\r\n\t\tmysql_query($query);\r\n\t}",
"function removestudent(){\n $classid = $_GET['classid'];\n $studid = $_GET['studid'];\n include('../../config.php'); \n $q = \"delete from studentsubject where studid=$studid and classid=$classid\";\n mysql_query($q);\n \n $tmp = mysql_query(\"select * from class where id=$classid\");\n $tmp_row = mysql_fetch_array($tmp);\n $tmp_subject = $tmp_row['subject'];\n $tmp_class = $tmp_row['course'].' '.$tmp_row['year'].'-'.$tmp_row['section'];\n \n $tmp = mysql_query(\"select * from student where id=$studid\");\n $tmp_row = mysql_fetch_array($tmp);\n $tmp_student = $tmp_row['fname'].' '.$tmp_row['lname'];\n \n $act = \"remove student $tmp_student from class $tmp_class with the subject of $tmp_subject\";\n $this->logs($act);\n \n header('location:../classstudent.php?r=success&classid='.$classid.'');\n }",
"function deleteFile($db, $strDetailID = \"\")\n{\n global $words;\n $bolNewData = true;\n if ($strDetailID != \"\") {\n $strSQL = \"SELECT * FROM hrd_training_request \";\n $strSQL .= \"WHERE id = '$strDetailID' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strFile = $rowDb['doc'];\n if ($strFile != \"\") {\n if (file_exists(\"trainingdoc/\" . $strFile)) {\n unlink(\"trainingdoc/\" . $strFile);\n }\n $strSQL = \"UPDATE hrd_training_request SET doc = '' WHERE id = '$strDetailID' \";\n $resExec = $db->execute($strSQL);\n //writeLog(ACTIVITY_DELETE, MODULE_PAYROLL,\"file $strDetailID\",0);\n }\n }\n }\n return true;\n}",
"public function remove(&$simbio, $str_args) {\n if (!User::isUserLogin()) {\n return false;\n }\n if (isset($_POST['record'])) {\n // master file type\n $this->dbTable = $str_args?$str_args:self::$tables[0];\n // auto generate fields from database\n $this->autoGenerateFields($simbio);\n // get primary key\n $_primary_key = 'id';\n foreach ($this->dbFields as $_fld => $_fld_info) {\n if (isset($_fld_info['isPrimary'])) {\n $_primary_key = $_fld;\n break;\n }\n }\n // convert scalar var to array var\n if (!is_array($_POST['record'])) {\n $_POST['record'][0] = $_POST['record'];\n }\n foreach ($_POST['record'] as $_rec_ID) {\n $_rec_ID = (integer)$_rec_ID;\n $simbio->dbDelete(\"`$_primary_key`='$_rec_ID'\", $this->dbTable);\n }\n }\n $this->index($simbio, $str_args);\n }",
"public static function remove_row( $name, $file ) {;\n $content = file_get_contents( $file );\n $content = str_replace( $name.'.php', '' , $content );\n\n file_put_contents( $file, $content );\n self::skip_empty_lines( $file);\n }",
"function remove($rowindex) {\r\n assert($this->ds->_rowid[$rowindex] != '');\r\n # before deleting row, check if there's a file field, and its value is exist, then delete the assocaiated file first\r\n $um = NULL;\r\n $row = NULL;\r\n foreach ($this->properties as $colvar=>$col) {\r\n if ($col->inputtype == 'file' and $col->datatype == 'int') {\r\n # populate this row first (just once, in case there is more than 1 file field)\r\n if (!$row)\r\n $row = $this->get_row(array('rowid'=>$this->ds->_rowid[$rowindex]));\r\n if (!$row) continue;\r\n $file_id = $row[$col->colname];\r\n if (!$um)\r\n $um = instantiate_module('upload_manager');\r\n $um->del_file($file_id); # del the file\r\n }\r\n }\r\n\r\n $sql = 'delete from `'.$this->db_table.'` where rowid='.$this->ds->_rowid[$rowindex].' limit 1'; # with safeguard\r\n #~ echo '<br>'.$sql;\r\n $res = mysql_query($sql) or die('<br>'.$sql.'<br>'.mysql_error()); #do to database\r\n }",
"function delete($id)\n {\n // a. first find the file in question.\n $search_val = find_by_val(\"student_id\",$id);\n $dir = \"students/\".substr($id,0,2);\n $delete_location = $_SERVER['DOCUMENT_ROOT'] . $dir .\"/\". $id. \".json\";\n\n // b. remove the file not the folder\n\n if (!unlink($delete_location)) {\n err(\"$delete_location \\00[0m cannot be deleted due to an error\");\n }\n else {\n err(\"$delete_location \\33[0m has been deleted\");\n }\n\n // c. if a folder is empty then it must be removed\n if (is_dir_empty($dir)) {\n rmdir($_SERVER['DOCUMENT_ROOT'] . $dir .\"/\");\n }\n\n if(!empty($search_val))\n echo \"\\33[34m Your Student \\33[34m has been deleted \\33[34m succesfully. \\33[0m\";\n else\n err(\"Value non-existent \\33[34m Are you sure these are the correct search values? Please try again. \");\n }",
"public function actionRemove() {\n if (!isset($_POST['id']))\n die(\"what?\");\n $id = (int) $_POST['id'];\n if ($id < 1)\n die(\"unknown file\");\n CUserfiles::model()->RemoveFile($this->user_id, $id);\n\n echo \"OK\";\n }",
"function remove_file_from_db( $fn ) {\n // Prepare DELETE statement for selected file\n $delete = \"DELETE FROM files WHERE filename = :filename\";\n $stmt = $this->pdo->prepare($delete);\n\n //Bind parameters\n $stmt->bindParam(':filename', $fn);\n\n //Execute statement\n $stmt->execute();\n\n return;\n }",
"function delete_student($studentID) {\n global $db;\n $query = 'DELETE FROM students \n WHERE studentID = :studentID';\n $statement = $db->prepare($query);\n $statement->bindValue(':studentID', $studentID);\n $statement->execute();\n $statement->closeCursor();\n }",
"function\tdel_student($login)\n{\n $c = new MongoClient();\n $db = $c->mydb;\n $collection = $c->mydb->selectCollection('student');\n $user = $collection->findOne(array(\"login\" => $login));\n if (!isset($user))\n {\n echo \"\\nL'utilisateur \".$login.\" n'existe pas dans la base de donnees !\\n\\n\";\n return (0);\n }\n else\n {\n echo \"\\nEtes-vous sur de vouloir supprimer l'utilisateur \".$login.\" ?\\n\";\n $cmdline = fopen(\"php://stdin\", \"r\");\n echo \"> \";\n $ent = fgets($cmdline);\n preg_match(\"/^.*$/\", $ent, $rep);\n if ($rep[0] == \"oui\")\n\t{\n\t $collection->remove(array(\"login\" => $login));\n\t echo \"L'utilisateur \".$login.\" a ete supprime !\\n\\n\";\n\t return (0);\n\t}\n else if ($rep[0] == \"non\")\n\t{\n\t echo \"L'utilisateur \".$login.\" n'as pas ete supprime !\\n\\n\";\n\t return (0);\n\t}\n else if ($rep[0] == \"exit\" || $rep[0] == \"quit\")\n\t{\n\t echo \"Bye !\\n\\n\";\n\t return (0);\n\t}\n else\n\t{\n\t echo \"'oui' ou 'non' ?\\n\";\n\t del_student($login);\n\t}\n }\n}",
"public function remove($params)\n {\n $this->load->model(\"import_model\");\n $id = $params[0];\n ///XÓA DATA TRƯỚC KHI XÓA FILE\n $this->truncate($id, false);\n //XÓA FILE\n $status = $this->import_model->update(array(\"deleted\" => 1), $id);\n\n /// Log audit trail\n $text = \"USER '\" . $this->session->userdata('username') . \"' removed record($id) to the table 'pmp_import'\";\n $this->import_model->trail($status, \"delete\", null, null, $id, $text);\n header('Location: ' . $_SERVER['HTTP_REFERER']);\n exit;\n }",
"function deleteLine(string $address, int $line) {\n $csvarr = fileFetcher($address); // gets file at $address, as an array.\n for ($i = 0; $i < count($csvarr); $i++) {\n $csvarr[$i] = explode(\"|\", $csvarr[$i]);\n }\n if (count($csvarr) < $line || $line < 0) { // if line doesn't exist, kills program\n echo \"This line does not exist,\" . $line . \",please try again.\";\n die(\"<a href='../index.php'>Return Home</a>\");\n }\n\n $csvarr[$line][0] = \"Anonymous\";\n $csvarr[$line][1] = \"Author\";\n $csvarr[$line][2] = \"https://pbs.twimg.com/profile_images/1268660533127008256/UNoc474t_400x400.jpg\";\n saveMan($csvarr, $address); // puts array into $id.\n return $csvarr[$line]; // returns line removed to display later.\n}",
"public function rm($section){\n\t\t$body = $this->toArray();\n\t\tunset($body[$section]);\n\t\t$this->updateFile($body);\n\t}",
"public function removeStudentFromList(){\n\n\t\t$viewDataController = new ViewDataController();\n\t\t$data = $viewDataController->buildData();\n\n\t\t$input = Request::all();\t\n\n\t\tif (!isset($input['user_id']) || empty($input['user_id'])) {\n\t\t\treturn 'failed';\n\t\t}\n\n\t\t$cache = Cache::get(env('ENVIRONMENT').'_'.$data['user_id'].'_studentList');\n\n\t\t$cnt = 0;\n\t\tforeach ($cache as $key) {\n\t\t\tif ($key['user_id'] == $input['user_id']) {\n\t\t\t\tunset($cache[$cnt]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$cnt++;\n\t\t}\n\n\t\tCache::put(env('ENVIRONMENT').'_'.$data['user_id'].'_studentList', $cache, 60);\n\n\t\treturn 'success';\n\t}",
"function delLineFromFile($fileName, $lineNum){\n\t\t if(!is_writable($fileName))\n\t\t\t{\n\t\t\t// print an error\n\t\t\tprint \"The file $fileName is not writable\";\n\t\t\t// exit the function\n\t\t\texit;\n\t\t\t}\n\t\t else\n\t\t\t {\n\t\t\t// read the file into an array \n\t\t\t$arr = file($fileName);\n\t\t\t}\n\n\t\t // the line to delete is the line number minus 1, because arrays begin at zero\n\t\t $lineToDelete = $lineNum-1;\n\n\t\t // check if the line to delete is greater than the length of the file\n\t\t if($lineToDelete > sizeof($arr))\n\t\t\t{\n\t\t\t // print an error\n\t\t\tprint \"You have chosen a line number, <b>[$lineNum]</b>, higher than the length of the file.\";\n\t\t\t// exit the function\n\t\t\texit;\n\t\t\t}\n\n\t\t //remove the line\n\t\t unset($arr[\"$lineToDelete\"]);\n\n\t\t // open the file for reading\n\t\t if (!$fp = fopen($fileName, 'w+'))\n\t\t\t{\n\t\t\t// print an error\n\t\t\t\tprint \"Cannot open file ($fileName)\";\n\t\t\t // exit the function\n\t\t\t\texit;\n\t\t\t\t}\n\n\t\t // if $fp is valid\n\t\t if($fp)\n\t\t\t{\n\t\t\t\t// write the array to the file\n\t\t\t\tforeach($arr as $line) { fwrite($fp,$line); }\n\n\t\t\t\t// close the file\n\t\t\t\tfclose($fp);\n\t\t\t\t}\n\n\t\t\n\t\t}",
"public function deleteFrom($record = null, $index = null) {\n $array = $this->readFile();\n if (is_null($record)) {\n $array = [];\n }\n else if (!is_null($record) && is_null($index)) {\n $array[$record] = null;\n for ($i = $record; $i < count($array); $i++) {\n if ($i == count($array) - 1) {\n $array[$i] = null;\n break;\n }\n $array[$i] = $array[$i + 1];\n }\n }\n else {\n $array[$record][$index] = null;\n for ($i = $index; $i < count($array[$record]); $i++) {\n if ($i == count($array[$record]) - 1) {\n $record[$i] = null;\n break;\n }\n $array[$record][$i] = $array[$record][$i + 1];\n }\n }\n $this->writeFile($array);\n }",
"function deleteDocument() {\n \tglobal $synAbsolutePath;\n global ${$this->name}, ${$this->name.\"_name\"}, ${$this->name.\"_old\"}; // ${$this->name} = ${\"surname\"} = $surname\n include_once(\"../../includes/php/utility.php\");\n $ext=$this->translate($this->getValue());\n $mat=$this->translatePath($this->mat);\n $filename=$this->createFilename(false);\n $documentRoot=$synAbsolutePath.\"/\";\n $fileToBeRemoved=$documentRoot.$mat.$filename.\"*\";\n foreach (glob($fileToBeRemoved) as $filename)\n unlink($filename);\n }",
"public function delete($filename);",
"public function deleteLine($line) {\r\n\t\tif ($this->exists && $line !== null) {\r\n\t\t\t$lineData = $this->readByLine ();\r\n\t\t\t\r\n\t\t\t$inodes = new iArrayList ();\r\n\t\t\tfor($y = 0; $y < sizeof ( $lineData ); $y ++) {\r\n\t\t\t\t$inodes->add_iNode ( new iNode ( $lineData [$y], null, null, null ) );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$inodes->removeNode ( $line );\r\n\t\t\t\r\n\t\t\t$this->clearFile ();\r\n\t\t\t\r\n\t\t\tfor($y = 0; $y < $inodes->count; $y ++) {\r\n\t\t\t\t$this->writeToFile ( $inodes->getNode ( $y )->Data1 );\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$inodes->__destruct ();\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public function remove($index)\n {\n $this->lines = \\array_diff_key($this->lines, array($index => ''));\n\n $this->write();\n }",
"function removeHard()\r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\r\n\t\t$userid = ($this->user) ? $this->user->id : $this->owner_id;\r\n\r\n\t\tUserFilesRemoveFile($dbh, $this->id, $userid, false, true);\r\n\t}",
"public function clearRecord($rid){\n $oldRecord = $this->domDocument->getElementById($rid); //get Root\n $this->domDocument->documentElement->removeChild($oldRecord); // remove root\n // save back to disk \n $this->domDocument->save($this->xmlPath);\n }",
"function deleteFilesFromRecord($uid)\t{\n\t\t$table = $this->theTable;\n\t\t$rec = $GLOBALS['TSFE']->sys_page->getRawRecord($table,$uid);\n\n\t\t//$GLOBALS['TSFE']->includeTCA();\n\t\tt3lib_div::loadTCA($table);\n\t\treset($GLOBALS['TCA'][$table]['columns']);\n\t\t$iFields=array();\n\t\twhile(list($field,$conf)=each($GLOBALS['TCA'][$table]['columns']))\t{\n\t\t\tif ($conf['config']['type']=='group' && $conf['config']['internal_type']=='file')\t{\n\n\t\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery($table, $this->conf['uidField'].'='.intval($uid), array($field => ''));\n\n\t\t\t\t$delFileArr = explode(',',$rec[$field]);\n\t\t\t\treset($delFileArr);\n\t\t\t\twhile(list(,$n)=each($delFileArr))\t{\n\t\t\t\t\tif ($n)\t{\n\t\t\t\t\t\t$fpath = $conf['config']['uploadfolder'].'/'.$n;\n\t\t\t\t\t\tunlink($fpath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function removeSeatMember() {\n $id = $this->input->get('id');\n $tdata = array(\n 'student_id' => '',\n 'student_name' => '',\n 'class' => '',\n 'roll_number' => ''\n );\n $this->db->where('id', $id);\n if ($this->db->update('dormitory_bed', $tdata)) {\n redirect('dormitory/dormitoryReport', 'refresh');\n }\n }",
"private function removeFile($fid) {\n // Load and delete old file.\n $file = File::load($fid);\n \\Drupal::service('file.usage')->delete($file, 'itkore_admin', 'user', '1', '1');\n }",
"function delete() {\n try {\n $delete = \"Name: \" . $_POST[\"username\"] . \" , Email: \" . $_POST[\"email\"] . \" , Phone: \" . $_POST[\"phone\"];\n $data = file($this->directory);\n $out = array();\n \n foreach ($data as $line) {\n if (trim($line) != $delete) {\n $out[] = $line;\n }\n }\n\n $file = fopen($this->directory, \"w+\");\n flock($file, LOCK_EX);\n foreach ($out as $line) {\n fwrite($file, $line);\n }\n flock($file, LOCK_UN);\n fclose($file);\n return true;\n }\n catch(Exception $e) {\n echo \"Delete not successful: \" . $e;\n return false;\n }\n }",
"function deleteSurveyRecord()\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$affectedRows = $ilDB->manipulateF(\"DELETE FROM svy_svy WHERE survey_id = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\n\t\t$result = $ilDB->queryF(\"SELECT questionblock_fi FROM svy_qblk_qst WHERE survey_fi = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\t\t$questionblocks = array();\n\t\twhile ($row = $ilDB->fetchAssoc($result))\n\t\t{\n\t\t\tarray_push($questionblocks, $row[\"questionblock_fi\"]);\n\t\t}\n\t\tif (count($questionblocks))\n\t\t{\n\t\t\t$affectedRows = $ilDB->manipulate(\"DELETE FROM svy_qblk WHERE \" . $ilDB->in('questionblock_id', $questionblocks, false, 'integer'));\n\t\t}\n\t\t$affectedRows = $ilDB->manipulateF(\"DELETE FROM svy_qblk_qst WHERE survey_fi = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\t\t$this->deleteAllUserData();\n\n\t\t$affectedRows = $ilDB->manipulateF(\"DELETE FROM svy_anonymous WHERE survey_fi = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\t\t\n\t\t// delete export files\n\t\tinclude_once \"./Services/Utilities/classes/class.ilUtil.php\";\n\t\t$svy_data_dir = ilUtil::getDataDir().\"/svy_data\";\n\t\t$directory = $svy_data_dir.\"/svy_\".$this->getId();\n\t\tif (is_dir($directory))\n\t\t{\n\t\t\tinclude_once \"./Services/Utilities/classes/class.ilUtil.php\";\n\t\t\tilUtil::delDir($directory);\n\t\t}\n\n\t\tinclude_once(\"./Services/MediaObjects/classes/class.ilObjMediaObject.php\");\n\t\t$mobs = ilObjMediaObject::_getMobsOfObject(\"svy:html\", $this->getId());\n\t\t// remaining usages are not in text anymore -> delete them\n\t\t// and media objects (note: delete method of ilObjMediaObject\n\t\t// checks whether object is used in another context; if yes,\n\t\t// the object is not deleted!)\n\t\tforeach($mobs as $mob)\n\t\t{\n\t\t\tilObjMediaObject::_removeUsage($mob, \"svy:html\", $this->getId());\n\t\t\t$mob_obj =& new ilObjMediaObject($mob);\n\t\t\t$mob_obj->delete();\n\t\t}\n\t}",
"public function rm($filename)\n {\n $nodes = $this->idx_tree->nodes();\n unset($nodes[$filename]);\n $this->idx_tree->nodes($nodes);\n }",
"function remove($student,$year,$month)\n {\n $value = array($month => null);\n $this->ci->db->where('student_id', $student);\n $this->ci->db->where('financial_year', $year);\n $this->ci->db->update($this->table, $value);\n }",
"private function deleteLangFileContent() \n {\n $this->read();\n unset($this->arrayLang[$this->key]);\n $this->save();\n }",
"public function remove($s_name)\n {\n // Get full student details\n $this->readSingle($s_name);\n\n // Delete student from p_s_junction\n $query = '\n DELETE FROM p_s_junction\n WHERE p_id = :p_id \n AND s_id = :s_id\n ';\n\n // Prepare statement\n $stmt = $this->conn->prepare($query);\n\n // Bind data\n $stmt->bindParam(':p_id', $this->p_id);\n $stmt->bindParam(':s_id', $this->s_id);\n\n // Execute query, return false if query doesn't execute\n if (!$stmt->execute()) return false; // Query executing with 0 rows affected won't return false, therefore we need to check for that separately\n\n // Check rows affected, if none, show error\n if ($stmt->rowCount() == 0) {\n $_SESSION['message'] = \"Could not delete student because the specified student was not found.\";\n return false;\n }\n\n // Print error if something goes wrong\n // printf(\"ERROR: \", $stmt->error);\n\n // Set session message if successful\n $_SESSION['message'] = \"Student removed from the project!\";\n\n // If student is no longer participating in any projects, delete from database\n if (!$this->readSingle($this->s_name, \"any\")) {\n $this->delete($this->s_id);\n\n // Change message\n $_SESSION['message'] = \"Student deleted!\";\n }\n\n return true;\n }",
"public function unshare($user, $filename) {\n $stmt = $this->pdo->prepare('delete from share where owner_id = :id and file_id = (select id from file where user_id = :id and filename = :filename)');\n $stmt->bindValue(':id', $this->id);\n $stmt->bindValue(':filename', $filename);\n return $stmt->execute();\n }",
"protected function removeSysFileReferenceRecordsFromImportDataWithRelationToMissingFile() {}",
"function delete_student_meta( $student_id, $meta_key, $meta_value = '' ) {\n return delete_metadata( 'student', $student_id, $meta_key, $meta_value );\n }",
"private function removeEntrada($filePath){\n \\Storage::delete($filePath);\n }",
"function DelRecord($pkvalue)\n {\n $databasename = $this->databasename;\n $tablename = $this->tablename;\n $path = $this->path;\n $this->numrecords = -1;\n $this->numrecordscache = array();\n $oldfile = $this->GetFileRecord($this->primarykey,$pkvalue);\n $dirold = dirname($oldfile) . \"/\" . basename($oldfile,\".php\");\n if ( !file_exists($oldfile) )\n return false;\n\n if ( preg_match(\"/\\\\/$/si\",$this->datafile) )\n if ( !strpos($pkvalue,\"..\") !== false && file_exists(\"{$this->datafile}$pkvalue/\") && is_dir(\"{$this->datafile}$pkvalue/\") )\n remove_dir_rec(\"{$this->datafile}$pkvalue\");\n\n $this->ClearCachefile();\n $n = readDatabase($oldfile,$this->xmlfieldname,false,false);\n\n if ( count($n) == 1 ) // se è l' ultimo record\n {\n if ( preg_match(\"/\\\\/$/si\",$this->datafile) )\n {\n @ unlink($oldfile);\n if ( file_exists($oldfile) && is_dir($oldfile) )\n {\n remove_dir_rec($oldfile);\n }\n }\n readDatabase($oldfile,$this->xmlfieldname,false,false);\n return true;\n }\n\n $pkey = $this->primarykey;\n $pvalue = $pkvalue;\n $readok = false;\n for ( $i = 0;$i < _MAXTENTATIVIDIACCESSO;$i++ )\n {\n if ( !file_exists($oldfile) ) //errore\n break;\n $oldfilestring = file_get_contents(\"$oldfile\");\n if ( strpos($oldfilestring,\"</{$this->xmltagroot}>\") !== false )\n {\n $readok = true;\n break;\n }\n }\n if ( !$readok )\n {\n return false;\n }\n\n $oldfilestring = removexmlcomments($oldfilestring);\n $strnew = \"\";\n $newfilestring = preg_replace('/<' . $this->xmlfieldname . '>([^(' . $this->xmlfieldname . ')]*)<' . $pkey . '>' . $pvalue . '<\\/' . $pkey . '>(.*?)<\\/' . $this->xmlfieldname . '>/s',$strnew,$oldfilestring);\n $newfilestring = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<?php exit(0);?>\\n\" . trim($newfilestring,\"\\n \");\n //dprint_xml($oldfilestring);\n //dprint_xml($newfilestring);\n //die();\n $file = fopen($oldfile,\"w\");\n fwrite($file,$newfilestring);\n fclose($file);\n $this->ClearCachefile();\n readDatabase($oldfile,$this->xmlfieldname,false,false);\n return true;\n }",
"public function deleteStudent($id){\n\t \t\n\t\t//get Student by Id\n\t\t$classes = CaStudent::find($id);\n\t\t\n\t\t//delete student\n\t\t$classes->delete();\n\t\t\n\t }",
"protected function removeFilename($filename){@unlink($filename);}",
"function deleteWine() {\n\t\tif (isset($_GET['wine'])) {\n\t\t\t//get the index of the wine\n\t\t\t$wineIdx = getWineRecIndex(\n\t\t\t\t\t\tbase64_decode($_GET['wine'])\n\t\t\t\t\t);\n\t\t\t//get the existing wines\n\t\t\t$wines = getWines();\n\n\t\t\t//get the contents of the wine file\n\t\t\t$writeFile = fopen('data/wines.json', \"w\");\n\t\t\t//delete the record from the array using the index\n\t\t\tarray_splice($wines, $wineIdx, 1);\n\t\t\t//convert userRecord to JSON\n\t\t\t$winesJson = json_encode($wines,JSON_PRETTY_PRINT);\n\t\t\t//write JSON string to file\n\t\t\tfwrite($writeFile, $winesJson);\n\t\t\t//close file\n\t\t\tfclose($writeFile);\n\t\t}\n\t}",
"private function removeUploadedFile()\n {\n if(!isset($_REQUEST['file']))\n {\n exit; \n }\n \n list($file, $src, $size) = explode(':', $_REQUEST['file']);\n \n if(file_exists($src))\n {\n @unlink($src);\n }\n exit;\n }",
"function fileRemove($fileId){\n\tinclude '../../database.php';\n\n\t$stmt = $conn->prepare(\"SELECT * FROM file WHERE file_id=?\");\n\t$stmt->execute(array($fileId));\n\t$filelocation = $stmt->fetch(PDO::FETCH_ASSOC);\n\t$filelocation = $_SERVER[\"DOCUMENT_ROOT\"] . $filelocation;\n\n\tunlink($filelocation);\n\n\t$stmt = $conn->prepare(\"DELETE FROM file WHERE file_id=?\");\n\t$stmt->execute(array($fileId));\n}",
"public function file_delete($filename);",
"public function unlink($file);",
"public function removeDocRecord($id){\n //get document by ID\n $file = File::find($id)->delete();\n\n //load form view or\n //redirect back to the main page\n return view('document_control.document_control_review', [\n 'file' => $file\n ]);\n }",
"private function delete_file($file){\n\t\t$fileLink = fopen($file,'w');\n\t\tfclose($fileLink);\n\t\tunlink($file);\n\t}",
"function unlinkFile() {\n\tif (isset($_REQUEST['ulink']) && $_REQUEST['ulink']!=\"\" && isset($_REQUEST['docid']) && $_REQUEST['docid']>0) {\n\t\tunlink('document/'. $_REQUEST['docid'].'/'.$_REQUEST['ulink']);\n\t}\n\theader(\"Location: index.php?view=\".$_REQUEST['controller'].\"&file=\".$_REQUEST['file'].\"&task=lendMoneyViewC\".\"&pid=\".$_REQUEST['docid'].\"\");\t\n}",
"function deleteFile() {\r\n\t\tif (file_exists($this->data[$this->alias]['path'])) {\r\n\t\t\tunlink($this->data[$this->alias]['path']);\r\n\t\t}\r\n\t}",
"private function deleteRecords(){\r\n\t\r\n\t\t$fileNames = explode(',', $this->collection['images']);\r\n\t\t// remove imagerecords which are not used anymore\r\n\t\tforeach($this->images as $filename => $image){\r\n\t\t\tif(array_search($filename, $fileNames) === false){\r\n\t\t\r\n\t\t\t\t$this->db->exec_DELETEquery('tx_gorillary_images', \"image='$filename' AND collection='\".$this->collection['uid'].\"'\");\r\n\t\t\t\t//unset ($this->images[$filename]);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"function _webform_delete_file($data, $component) {\r\n // Delete an individual submission file.\r\n $filedata = unserialize($data['value']['0']);\r\n if (isset($filedata['filepath']) && is_file($filedata['filepath'])) {\r\n unlink($filedata['filepath']);\r\n db_query(\"DELETE FROM {files} WHERE filepath = '%s'\", $filedata['filepath']);\r\n }\r\n}",
"public function delete($file) {\n\t}",
"public function removeStudent($studentId = FALSE){\n\n if ($studentId) {\n $this->db->where('usr_id', $studentId);\n $this->db->update('user', array('usr_assigned_lecturer_id' => 'DEFAULT'));\n }\n }",
"function deleteAssignFile($id,$conn){\r\n\r\n //get file path\r\n\r\n $sql3 = \"SELECT * FROM assignmentFiles\r\n WHERE assignmentID = '\".$id.\"'\";\r\n\r\n $result3 = mysqli_query($conn, $sql3);\r\n\r\n if (mysqli_num_rows($result3) > 0) {\r\n // output data of each row\r\n while($row = mysqli_fetch_assoc($result3)){\r\n\r\n\r\n $Path = \"../assignment/\".$row3['file'];\r\n if (file_exists($Path)){\r\n unlink($Path); \r\n } \r\n\r\n }\r\n }\r\n\r\n //end of unlinking \r\n\r\n\r\n\r\n $sql = \"DELETE FROM assignmentFiles\r\n WHERE assignmentID = '\".$id.\"'\";\r\n\r\n mysqli_query($conn, $sql);\r\n\r\n\r\n}",
"public function deleteData()\n {\t\t\n \t$arrayId = $this->getAllUserId($this->readFromLocalFile());\n \tforeach($arrayId as $id)\n \t{\n \t\t$user = User::find()->where(['id' => $id])->one();\n \t\tif($user)\n \t\t{\n \t\t\t$user->delete();\n \t\t}\n \t}\n \t$this->deleteSelectedLocalItems('user');\n }",
"function delete_first_line() {\n\t\tarray_shift($this->record);\n\t\treturn true;\n\t}",
"function del( $sy_id,$student_id,$date,$orno ) {\n\t\tif( $this->begin_transaction()==false ) return false;\n\t\tif( $orno > 0 ) {\n\t\t\t$cmd = \"DELETE FROM tblpayment_extrainfo WHERE orno='$orno'\";\n\t\t\tif( $this->query( $cmd )==false ) return $this->rollback();\n\t\t}\n\t\t$cmd = \"DELETE FROM $this->tblname\"\n\t\t\t. \" WHERE sy_id='$sy_id'\"\n\t\t\t. \" AND student_id='$student_id'\"\n\t\t\t. ($orno > 0 ? \" AND orno='$orno'\" : \"\")\n\t\t\t. \" AND date='$date'\";\n\t\tif( $this->query( $cmd )==false ) return $this->rollback();\n\t\treturn $this->end_transaction();\n\t}",
"public function deletestudents ($student_number) {\n $sqlQuery = \" DELETE FROM students \";\n $sqlQuery .= \" WHERE student_number= $student_number\";\n $result = $this -> getDbManager () -> executeQuery ( $sqlQuery );\n return $result ;\n }",
"private function removeOldParts()\n {\n $filename = $this->substream->getFilename();\n for ($i = $this->index + 1; true; ++$i) {\n $indexed_filename = $this->getIndexPartFilename($filename, $i);\n $target = dirname($this->filename).'/'.$indexed_filename;\n if (file_exists($target)) {\n unlink($target);\n } else {\n break;\n }\n }\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function deleteRecords($lintidreg) {\r\n $db = Zend_Db_Table::getDefaultAdapter();\r\n $where_delete_records = \" IdStudent = '\".$lintidreg.\"' \" ;\r\n $db->delete('tbl_academicprogress_subjects', $where_delete_records); \r\n $db->delete('tbl_academic_progress', $where_delete_records); \r\n \r\n }",
"function delete()\n\t{\n\t\t$kReport = $this->input->post(\"kReport\");\n\t\t$kStudent = $this->input->post(\"kStudent\");\n\t\t$this->report->delete($kReport);\n\t\tredirect(\"report/get_list/student/$kStudent\");\n\t}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"public function markForDeletion(): void\n {\n $this->oldFileName = $this->fileName;\n $this->fileName = null;\n }",
"public function deleteFile(){\n\t\t$db = $this->db;\n\t\t$id = $_GET[\"id\"];\n\t\t\n\t\t$file = $db->fetchRow($db->select()->from(array(\"tbf\"=>\"tb_applicant_files\"))->where(\"id = ?\", $id));\n\t\tif ($file){\n\t\t\tif ($file[\"userid\"]!=$_SESSION[\"userid\"]){\n\t\t\t\treturn array(\"success\"=>false);\n\t\t\t}\n\t\t\t//$db->delete(\"tb_applicant_files\", $db->quoteInto(\"id = ?\", $id));\n\t\t\t$db->update(\"tb_applicant_files\", array(\"is_deleted\" => 1), $db->quoteInto(\"id = ?\", $id));\n $db->delete(\"solr_candidates\", $db -> quoteInto(\"userid=?\",$_SESSION[\"userid\"]));\n\t\t\t\n\t\t\tglobal $base_api_url;\n\t\t\t\n\t\t\tfile_get_contents($base_api_url . \"/solr-index/sync-candidates/\");\n\t\t\t\n\t\t\tif (file_exists(getcwd().\"/../applicants_files/\".$file[\"name\"])){\n\t\t\t\tunlink(getcwd().\"/../applicants_files/\".$file[\"name\"]);\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfile_get_contents($base_api_url . \"/mongo-index/sync-candidates-files/?userid=\" . $_SESSION[\"userid\"]);\n\t\t\t\n\t\t\t\n\t\t\treturn array(\"success\"=>true);\n\t\t}else{\n\t\t\treturn array(\"success\"=>false);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}",
"public function deleted(Student $student)\n {\n //\n }",
"public function delete_file(){\n if($this->file_name != 'sample.jpg'){\n unlink($this->dir_location . $this->file_name);\n }\n }",
"function clearStudentFW ( $sessionID, $studentID, $Reason ) {\r\n\t\tif($this->getAccessLevel() > 7) {\r\n\r\n // add a contact indicating that the student was removed\r\n $description = \"Student removed from First Watch List [\".$Reason.\"].\";\r\n $this->updateSpecialHistory($studentID,$description,0); \r\n\r\n // update db\r\n\t\t\t$query = \"DELETE FROM `students-FW` WHERE StudentID = '\".$studentID.\"' AND Reason= '\".$Reason.\"'\";\r\n\t\t\tmysql_query($query);\t\t\r\n\t\t\t$query = \"SELECT * FROM `students-FW` WHERE StudentID = '\".$studentID.\"'\";\r\n\t\t\t$result = mysql_query($query);\r\n\t\t\t\r\n\t\t\tif(mysql_num_rows($result) == 0)\r\n\t\t\t{\r\n\t\t\t\t$query = \"UPDATE students SET FirstWatch = 0 WHERE StudentID = '\".$studentID.\"'\";\r\n\t\t\t\tmysql_query($query);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function deleteDocument() {\n $file = $this->getDocumentFile().$this->getAttribute('evidencias')[2];\n\n// check if file exists on server\n if (empty($file) || !file_exists($file)) {\n return false;\n }\n\n// check if uploaded file can be deleted on server\n if (!unlink($file)) {\n return false;\n }\n\n// if deletion successful, reset your file attributes\n $this->evidencias = null;\n\n return true;\n }",
"public function removeMutira(){\n $this->validaAutenticacao();\n\n $tweet = Conteiner::getModel('Mutira');\n $tweet->__set('mutira', $_POST['mutira']);\n $tweet->__set('id_usuario', $_SESSION['id']);\n \n\n $tweet->removeMutira();\n\n //header('Location: /timeline');\n\n }",
"public function delete($file){\n\t\t\n\t\t//If the users file exists try to delete it\n\t\tif(file_exists($file))\n\t\t{\n\t\t\tunlink($file) or die($this->openFile(\"core/fragments/errors/error34.phtml\"));\n\t\t}\n\t}",
"public function delete($filepath);",
"function deleteEventFromFile($idEvent, $idUser, $eventsArray, $file)\n\t{\n\t\t$i = search_2d_array($eventsArray, \"Event ID\", $idEvent);\n\t\t$p = $eventsArray[$i][\"User ID\"];\n\t\tif ($p == $idUser)\n\t\t{\n\t\t\t// Make string array of file and remove line at index\n\t\t\t$eventStringArray = file($file);\n\t\t\tunset($eventStringArray[$i]);\n\t\t\t// Reset array to string and rewrite file\n\t\t\t$fileContent = implode(\"\", $eventStringArray);\n\t\t\t$eventFile = fopen($file, \"wb\");\n\t\t\t// if the file doesn't open\n\t\t\tif ($eventFile === FALSE)\n\t\t\t\t$errorMessage = \"There was an error deleting the event.\";\n\t\t\t// otherwise write the string and close the file\n\t\t\telse \n\t\t\t{\n\t\t\t\tfwrite($eventFile, $fileContent);\n\t\t\t\tfclose($eventFile);\n\t\t\t\t// Reread the file to the web page's eventsArray\n\t\t\t\t$eventsArray = get2DAssocArray($file, $keys);\n\t\t\t}\n\t\t}\n\t}",
"function stopWatchingStudent( $sessionID, $studentID ) {\r\n\t\t$user = $_SESSION['userid'];\r\n\t\t$query=\"delete from studentwatch where userid='$user' and studentid='$studentID'\";\r\n\t\tmysql_query($query);\r\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"function deleteRecord()\t{\n\t\tif ($this->conf['delete'])\t{\t// If deleting is enabled\n\t\n\t\t\t$origArr = $GLOBALS['TSFE']->sys_page->getRawRecord($this->theTable, $this->recUid);\n\t\t\tif (($GLOBALS['TSFE']->loginUser && $this->conf['requireLogin']) || ( $this->aCAuth($origArr)&& $this->conf['requireLogin'])||!$this->conf['requireLogin'])\t{\t// Must be logged in OR be authenticated by the aC code in order to delete\n\t\t\t\t\t// If the recUid selects a record.... (no check here)\n\t\t\t\tif (is_array($origArr))\t{\n\t\t\t\t\tif ($this->aCAuth($origArr) || $this->metafeeditlib->DBmayFEUserEdit($this->theTable,$origArr, $GLOBALS['TSFE']->fe_user->user,$this->conf['allowedGroups'],$this->conf['fe_userEditSelf'],$this->conf))\t{\t// Display the form, if access granted.\n\t\t\t\t\t\tif (!$GLOBALS['TCA'][$this->theTable]['ctrl']['delete'])\t{\t// If the record is fully deleted... then remove the image (or any file) attached.\n\t\t\t\t\t\t\t$this->deleteFilesFromRecord($this->recUid);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->cObj->DBgetDelete($this->theTable, $this->recUid, TRUE);\n\t\t\t\t\t\t$this->currentArr = $origArr;\n\t\t\t\t\t\t$this->saved = 1;\n\t\t\t\t\t\t$this->userProcess_alt($conf['edit.']['userFunc_afterDelete'],$conf['edit.']['userFunc_afterDelete.'],array('rec'=>$this->currentArr, 'origRec'=>$origArr));\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->error = '###TEMPLATE_NO_PERMISSIONS###';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\t\t$this->error = '###TEMPLATE_NO_PERMISSIONS###';\n\t\t }\n\t\t}\n\t}",
"public function destroy($id)\n {\n $student = Student::findOrFail($id);\n if($student->photo_id == null) {\n $user = User::where('user_id', '=', $student->student_id);\n $user->delete();\n $student->delete();\n } else {\n $user = User::where('user_id', '=', $student->student_id);\n $user->delete();\n unlink(public_path() . $student->photo->file);\n $student->delete();\n }\n \n return redirect()->back()->with('delete_student','The student has been deleted successfully !');\n }",
"public function purgeAllClone($stri_extra_id='')\n {\n $stri_file_name=serialisable::constructFileName($stri_extra_id);\n $stri_user_temp_path=serialisable::constructUserTempPath();\n $stri_file=$stri_user_temp_path.\"/\".$stri_file_name;\n $lenght = strlen($stri_file)-4;//calcule la taille de la chaine -4 (qui correspond a l'extension .slz)\n \n $obj_dir_reader=new file_reader_writer($stri_user_temp_path);\n $arra_file=$obj_dir_reader->readDirectory();\n \n foreach($arra_file as $stri_file2)//parcours le repertoire\n {\n $va=substr_compare($stri_file,$stri_file2,'0',$lenght);\n \n if($va==0)\n { unlink($stri_file2);\n //echo $stri_file.\" \".$stri_file2.\" \".$va.\"<br />\";\n }\n }\n \n return false; \n }",
"function cvs_delete_user($cvs_user, $cvs_project) {\r\n $all_cvs_users = cvs_read_passwd($cvs_project);\r\n $cvs_fields=$all_cvs_users[$cvs_user];\r\n if (!is_null($cvs_fields)) {\r\n\tunset($all_cvs_users[$cvs_user]);\r\n\tcvs_write_file($all_cvs_users, $cvs_project);\r\n\tcvs_log(1, \"Deleted user $cvs_user\");\r\n } else {\r\n\tcvs_log(3, \"User $cvs_user does not exist\");\r\n } \r\n}",
"function RemoveSingleFile($file_id, $file_location){\n\t$file_location = $_SERVER[\"DOCUMENT_ROOT\"] . $file_location;\n\n\tif (unlink($file_location)){\t\t\t\n\t\t$stringBuilder = \"DELETE FROM `file` WHERE file_id=? \";\n\t\t//preparing the query\n\t\t$query = GetDatabaseConnection()->prepare($stringBuilder);\n\t\tif($query->execute(array($file_id))){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n}",
"function unlink_file($bean_id,$file_name) {\n\t\tglobal $log, $root_directory, $upload_dir;\n\t\t$log->debug(\"Entering unlink_file(\".$bean_id.\",\".$file_name.\") method ...\");\n\t\t$log->debug(\"Exiting unlink_file method ...\");\n\t\treturn unlink($root_directory.\"/\".$upload_dir.$bean_id.$file_name);\n\t}",
"function deleteFile($hash);",
"function delete_s2sfu_file( $post_id ) {\n\n\t$filename = get_post_meta( $post_id, '_wp_attached_file', true );\n\t@unlink( ABSPATH . 'wp-content/plugins/s2member-files/' . $filename );\n\t\n}",
"private function removeKey( $file, $key, $value ) {\n // Validate data\n if( !is_scalar( $value ) )\n throw new \\InvalidArgumentException( 'Argument 3 passed to ' . __METHOD__ . ' must be an integer or a string, ' . gettype( $value ) . ' given' );\n\n $match = 0;\n $key = $this->normalizeKey( $key );\n $temp = new \\SplTempFileObject( $this->swap );\n $pointer = $this->openFile( $file . '.key', self::FILE_READ );\n\n // Itereate through lines\n foreach( $pointer as $line ) {\n $data = $this->getDataFromLine( $line, $key, '=' );\n\n // We have a match\n if( FALSE !== $data ) {\n $data = $this->formatter->decode( $data );\n\n // Remove the index\n if( $pos = array_search( $value, $data ) ) {\n unset( $data[$pos] );\n\n // Write the new line if not empty\n if( !empty( $data ) )\n $temp->fwrite( $key . '=' . $this->formatter->encode( $data ) . PHP_EOL );\n\n $match++;\n }\n else {\n $temp->fwrite( $line . PHP_EOL );\n }\n }\n else {\n $temp->fwrite( $line . PHP_EOL );\n }\n }\n\n $this->closeFile( $pointer );\n\n if( $match ) {\n $temp->rewind();\n\n $pointer = $this->openFile( $file, self::FILE_WRITE );\n\n foreach( $temp as $line ) {\n $pointer->fwrite( $line );\n }\n\n $this->closeFile( $pointer );\n }\n\n $this->closeFile( $temp );\n\n return $match;\n }",
"public function deleteGraceMarks($studentId,$classId,$subjectId){\n $query=\"DELETE from \".TEST_GRACE_MARKS_TABLE.\" WHERE studentId='\".$studentId.\"' AND classId='\".$classId.\"' AND subjectId='\".$subjectId.\"'\";\n return SystemDatabaseManager::getInstance()->executeUpdateInTransaction($query);\n }",
"function delete_student($id){\n\t\t\tprint_r($this->input->post());\n\t\t}",
"public function delete_case_study($case_study_id){\n\t\t$success = $this->clear_flagged_case_study($case_study_id);\n\t\tif(!$success){\n\t\t\treturn false;\n\t\t}\n\t\t//get the case study file\n\t\t$q = \"select filename from \".TP.\"transaction_case_studies where case_study_id='\".$case_study_id.\"'\";\n\t\t$res = mysql_query($q);\n\t\tif(!$res){\n\t\t\treturn false;\n\t\t}\n\t\t$cnt = mysql_num_rows($res);\n\t\tif(0 == $cnt){\n\t\t\t//no such case study, this should not happen\n\t\t\treturn false;\n\t\t}\n\t\t$row = mysql_fetch_assoc($res);\n\t\t$filename = $row['filename'];\n\t\tunlink(CASE_STUDY_PATH.\"/\".$filename);\n\t\t//now delete the record\n\t\t$q = \"delete from \".TP.\"transaction_case_studies where case_study_id='\".$case_study_id.\"'\";\n\t\t$result = mysql_query($q);\n\t\tif(!$result){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"function wLogErase($path,$param) {\n \n $fp = unlink($path.\"/\".$param.\".log\");\n //fclose ($fp);\n \n}",
"public function remove_row($mark) {\n\n\t\t$this->db->where('oznaka', $mark); // email must be unique !\n\t\t$this->db->delete('sale');\n\t}",
"function striplinesfromcsv($numberoflines,$filename) {\r\n\t\t\r\n\t\t$fileName = 'nightlies/'.$filename;\r\n\t\t$a = preg_replace(\"/^(.*?\\n){0,$numberoflines}/\",'', file_get_contents($fileName));\r\n\t\t$b = fopen($fileName, 'w');\r\n\t\tfwrite($b, $a);\r\n\t\tfclose($b);\r\n\t\t\r\n\t\t//$filename = 'nightlies/'.$filename;\t\t\r\n\t\t//$file = file($filename);\r\n\t\t//file_put_contents($filename, implode(\"\\n\", array_slice($file, $numberoflines)));\r\n\t\t\r\n\t\techo \" > > > Stripping \".$numberoflines.\" lines from '\".$filename.\"' <br>\";\r\n\t}",
"protected function removeFile()\n {\n if (@is_file($this->getFilePath())) {\n @unlink($this->getFilePath());\n }\n }",
"function DeleteFile($id, $CheminU) {\r\n if (is_file($CheminU.\"/\".$id)) unlink($CheminU.\"/\".$id);\r\n}",
"public function deleteSource()\n {\n return Yii::$app->storage->fileSystemDeleteFile($this->filter_id . '_' . $this->file->name_new_compound);\n }",
"public function destroy(Student $student)\n {\n // return $student;\n $img_perfil = $student->avatar;\n\n if ($img_perfil != 'img-default.png') \n {\n $file_path = public_path().'/images/students/'.$img_perfil;\n \\File::delete($file_path);\n $student->delete($student);\n return redirect('students');\n } \n else \n {\n $student->delete($student);\n return redirect('students');\n }\n\n // return $file_path;\n // return $img_perfil;\n }",
"private function DeleteFirstLine() {\r\n\t\t$handle = fopen($this->results_file, \"r\");\r\n\t\t$first = fgets($handle,2048); \r\n\t\t$outfile=\"temp.txt\";\r\n\t\t$o = fopen($outfile,\"w\");\r\n\t\twhile (!feof($handle)) {\r\n\t\t\t$buffer = fgets($handle,2048);\r\n\t\t\tfwrite($o,$buffer);\r\n\t\t}\r\n\t\tfclose($handle);\r\n\t\tfclose($o);\r\n\t}",
"public function deleteIndexedFile(File $file)\n {\n $query = $this->pdo->prepare(\"DELETE FROM rt_files WHERE id = :id_bind\");\n $query->bindValue(\":id_bind\", $file->getId(), \\PDO::PARAM_INT);\n $query->execute();\n }",
"public static function deleteFile($fileName, $userId);"
] | [
"0.64361817",
"0.60772014",
"0.6060365",
"0.60162276",
"0.60119575",
"0.6002251",
"0.5964741",
"0.5884228",
"0.5871385",
"0.5852393",
"0.58314866",
"0.5815117",
"0.5789033",
"0.57733095",
"0.57686245",
"0.5760568",
"0.57599443",
"0.5746159",
"0.5715588",
"0.57068044",
"0.5688397",
"0.56877697",
"0.56726485",
"0.5626491",
"0.56259084",
"0.5623993",
"0.561178",
"0.5611463",
"0.5604102",
"0.5552188",
"0.5551935",
"0.55476147",
"0.55393434",
"0.5529225",
"0.5525676",
"0.5519541",
"0.54884076",
"0.5486585",
"0.54775035",
"0.5458344",
"0.54464185",
"0.54443884",
"0.544341",
"0.5438669",
"0.54350734",
"0.54242676",
"0.5413684",
"0.5412242",
"0.5405383",
"0.5400775",
"0.5389521",
"0.538206",
"0.53767806",
"0.5376394",
"0.53675663",
"0.53632754",
"0.5360539",
"0.53530127",
"0.5350097",
"0.53453374",
"0.53447783",
"0.53426415",
"0.5339018",
"0.5335292",
"0.5335292",
"0.5335292",
"0.5335292",
"0.5321664",
"0.5314199",
"0.53117067",
"0.53097296",
"0.53051186",
"0.5301367",
"0.5300775",
"0.5297955",
"0.52965224",
"0.529623",
"0.52842164",
"0.52679926",
"0.52651435",
"0.5259675",
"0.52538896",
"0.5248578",
"0.5248022",
"0.52479565",
"0.5247363",
"0.52181894",
"0.52181196",
"0.52158064",
"0.52148926",
"0.5213141",
"0.52050847",
"0.5197217",
"0.51899105",
"0.51815265",
"0.5178731",
"0.5173785",
"0.51712143",
"0.5165671",
"0.5150707",
"0.51499766"
] | 0.0 | -1 |
Edit a student record in the file (green return text) | function edit($id)
{
// a. find the student record in question
$dir = "students/".substr($id,0,2);
$student_arr = file( $dir ."/". $id. ".json");
$previous_student_arr = $student_arr;
$previous_student_arr = json_decode($previous_student_arr[0]);
$student_arr = json_decode($student_arr[0]);
$keep = "";
echo " [".$student_arr->name."] Enter name:";
$keep = fgetc(STDIN);
if($keep!="\n") {
$student_arr->name = trim(fgets(STDIN));
}
echo " [".$student_arr->surname."] Enter surname:";
$keep = fgetc(STDIN);
if($keep!="\n") {
$student_arr->name = trim(fgets(STDIN));
}
echo " [".$student_arr->age."] Enter age:";
$keep = fgetc(STDIN);
if($keep!="\n") {
$student_arr->age = trim(fgets(STDIN));
}
echo " [".$student_arr->curriculum."] Enter curriculum:";
$keep = fgetc(STDIN);
if($keep!="\n") {
$student_arr->curriculum = trim(fgets(STDIN));
}
$dir = "students/".substr($student_arr->student_id,0,2);
print_r($student_arr);
$record = fopen($_SERVER['DOCUMENT_ROOT'] . $dir ."/". $student_arr->student_id . ".json","wb");
fwrite($record,json_encode($student_arr,true));
fclose($record);
print_r($previous_student_arr);
if($previous_student_arr==$student_arr){
echo "\33[34m Editing of student (" .$student_arr->student_id. ") succesful. \33[0m";
} else {
echo "This student didn't change anything.";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(ReadingRecord $readingRecord)\n {\n //\n }",
"public function edit(Student $student)\n {\n //\n }",
"public function edit(Student $student)\n {\n //\n }",
"public function edit(Student $student)\n {\n //\n }",
"public function edit(Student $student)\n {\n //\n }",
"public function edit(Student $student)\n {\n //\n }",
"public function edit(Student $student)\n {\n //\n }",
"public function edit(Student $student)\n {\n //\n }",
"public function edit(Student $student)\n {\n //\n }",
"public function edit(StudentPoint $student_point)\n {\n //\n }",
"public function edit(Record $record)\n {\n //\n }",
"function fileEdit(){\n\t\t$result = mysql_query(getFile($_GET['file']));\n\t\t$GLOBALS['adminObjectId'] = $_GET['file'];\n\t\tif($row = mysql_fetch_assoc($result)) {\n\t\t\tgetFileGlobals($row);\n\t\t\tfileForm(\"edit\");\n\t\t}\n\t}",
"public function edit(Sample $sample)\n {\n //\n }",
"public function editStudent($surname, $firstname, $othername, $birth_date, $address, $student_id){\n\t\t\t$query = $this->connection()->prepare(\"UPDATE student SET surname='$surname', firstname='$firstname', othername='$othername', birth_date='$birth_date', address='$address' WHERE id='$student_id'\");\n\t\t $query->execute();\n\t\t return true;\n\t\t}",
"public function edit()\n\t{\n\t\t//\n\t}",
"public function edit() {\n\t\t\t\n\t\t}",
"public function edit( )\r\n {\r\n //\r\n }",
"public function editStudent() {\n\n\t\tif ( POST ) {\n\t\t\t$validation = new Validation();\n\t\t\t$validation->name( 'name' )->value( $_POST['name'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'guardian_id' )->value( $_POST['guardian_id'] )->pattern( 'int' )->required();\n\t\t\t$validation->name( 'date_of_birth' )->value( $_POST['date_of_birth'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'gender' )->value( $_POST['gender'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'blood_group' )->value( $_POST['blood_group'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'religion' )->value( $_POST['religion'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'current_address' )->value( $_POST['current_address'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'permanent_address' )->value( $_POST['permanent_address'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'extra_curricular_activities' )->value( $_POST['extra_curricular_activities'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'remarks' )->value( $_POST['remarks'] )->pattern( 'text' )->required();\n\n\t\t\tif ( $validation->isSuccess() ) {\n\t\t\t\t$student = new Student();\n\t\t\t\t$student->id = trim( $_POST['id'] );\n\t\t\t\t$student->name = trim( $_POST['name'] );\n\t\t\t\t$student->guardian_id = trim( $_POST['guardian_id'] );\n\t\t\t\t$student->date_of_birth = trim( $_POST['date_of_birth'] );\n\t\t\t\t$student->gender = trim( $_POST['gender'] );\n\t\t\t\t$student->blood_group = trim( $_POST['blood_group'] );\n\t\t\t\t$student->religion = trim( $_POST['religion'] );\n\t\t\t\t$student->current_address = trim( $_POST['current_address'] );\n\t\t\t\t$student->permanent_address = trim( $_POST['permanent_address'] );\n\t\t\t\t$student->registration_no = trim( $_POST['registration_no'] );\n\t\t\t\t$student->extra_curricular_activities = trim( $_POST['extra_curricular_activities'] );\n\t\t\t\t$student->remarks = trim( $_POST['remarks'] );\n\t\t\t\t$student->status = trim( $_POST['status'] );\n\t\t\t\t$student->assignment = trim( $_POST['assignment'] );\n\t\t\t\t$new_file = new File();\n\t\t\t\t//attaching file , this method will work as a validation method for future\n\t\t\t\t//returns false if there are no files given\n\t\t\t\tif ( $new_file->attach_file( $_FILES['photo'] ) ) {\n\t\t\t\t\t//New File directory\n\t\t\t\t\t$new_file->upload_dir = 'images/students';\n\t\t\t\t\t// old file information\n\t\t\t\t\t$this->file->upload_dir = 'images/students';\n\t\t\t\t\t$this->file->file_name = $_POST['oldPhoto'];\n\t\t\t\t\t$student->photo = $new_file->file_name;\n\t\t\t\t\tif ( $student->update() ) {\n\t\t\t\t\t\t//Destroy the old file\n\t\t\t\t\t\tif ( $this->file->destroy() ) {\n\t\t\t\t\t\t\t//Save the new File\n\t\t\t\t\t\t\tif ( $new_file->save() ) {\n\t\t\t\t\t\t\t\tredirect( 'students/index' );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$this->file->destroy();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdie( 'Could not delete the file' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdie( 'Something went Wrong' );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$student->photo = $_POST['oldPhoto'];\n\t\t\t\t\tif ( $student->update() ) {\n\t\t\t\t\t\tredirect( 'students/index' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdie( 'Something went Wrong' );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\techo $validation->displayErrors();\n\t\t\t}\n\n\t\t}\n\t}",
"public function edit()\n\t{\n\t\t\n\t}",
"public function edit(student_sibling $student_sibling)\n {\n //\n }",
"public function update_student($row)\n\t\t{\n\t\t\t$student = new Student();\n\t\t\t$student->setId($row['id']);\n\t\t\t$student->setFirstName($row['firstName']);\n\t\t\t$student->setLastName($row['lastName']);\n\t\t\t$student->setGender($row['gender']);\n\t\t\t$student->setAge($row['age']);\n\t\t\t$student->setGroup($row['sgroup']);\n\t\t\t$student->setFaculty($row['faculty']);\n\t\t\t$this->conn->update($student);\n\t\t}",
"public function edit($id)\n {\n $data['student']=Student_info::findOrfail($id);\n echo '<pre>';\n print_r($data['student']);\n echo '</pre>';\n // return view('student_info_update',$data);\n\n }",
"public function edit(File $file)\n {\n //\n }",
"public function edit(ResearchMember $researchMember)\n {\n //\n }",
"function testUpdate_Students($link, $student_id) {\n\t\t$student = Student::select($link, $student_id);\n\t\t\n\t\t// set attributes\n $fname \t\t= $student->fname;\n $email \t\t= $student->email;\n $phone \t\t= $student->phone;\n $password \t= $student->password;\n\t\t\n\t\t// perform update operation\n\t\tswitch($student_id % 3) {\n\n\t\t\tcase(0):\n\t\t\t\tStudent::update($link, $student_id, 'Updated Name', $email, $phone, $password);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase(1):\n\t\t\t\tStudent::update($link, $student_id, $fname, $email, '000-000-0000', $password);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase(2):\n\t\t\t\tStudent::update($link, $student_id, $fname, $email, $phone, 'update');\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\techo \"student id does not exist.\";\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function checkEditStudent(): void\n {\n if (isset($_GET['edit'])) {\n $student = studentLoader::getStudent($_GET['edit'], $this->pdo);\n $allGroups = groupLoader::getAllAssignedGroups($this->pdo);\n require 'View/studentEdit.php';\n }\n }",
"public function editStudent($id): void\n {\n $student = studentLoader::getStudent($_GET['id']);\n $student->setEmail($_POST['email']);\n $student->setFirstName($_POST['firstName']);\n $student->setLastName($_POST['lastName']);\n $student->setGroup(new group($_POST['className']));\n\n studentLoader::saveStudent($student, $this->pdo);\n require 'View/studentEdit.php';\n }",
"public function edit(Studentadd $studentadd)\n {\n //\n }",
"public function EditRecord($id, $id_field='')\n {\n if (empty($id_field)) {\n $id_field = $this->Index_Name;\n }\n echo $this->EditRecordText($id, $id_field);\n }",
"public function edit(Marriage $marriage)\n {\n //\n }",
"public function edit(Suitcase $suitcase)\n {\n //\n }",
"public function editAccount($person,$oldname);",
"public function edit(PreRegisteredStudent $preRegisteredStudent)\n {\n //\n }",
"function editRecord($rec)\r\n\t\t{\r\n\t\t\t// Create associative array of key fields and data values\r\n\t\t\t$data = array(\"idMedicalRecord\"=>$rec[0],\"medicalRec_weight\"=>$rec[1],\"medicalRec_height\"=>$rec[2],\"medicalRec_bloodPressure\"=>$rec[3],\"medicalRec_temperature\"=>$rec[4],\"medicalRec_bloodIronLevel\"=>$rec[5],\"medicalRec_time\"=>$rec[6],\"medicalRec_date\"=>$rec[7],\"medicalRec_medicalHistory\"=>$rec[8],\"medicalRec_rejectionReason\"=>$rec[9]);\r\n\t\t\t// Bind values to object's attributes\r\n\t\t\t$this->bind($data);\r\n\t\t\t// Add new updated values to table in database to location of given Primary key\r\n\t\t\t$this->update($rec[0]);\r\n\t\t}",
"public function modifyFile($new_record, $line = null, $record_index = null) {\n $array = $this->readFile();\n if (is_null($line) && is_null($record_index)) {\n $array = $new_record;\n }\n else if (is_null($record_index)) {\n $array[$line] = $new_record;\n }\n else {\n $array[$line][$record_index] = $new_record;\n }\n $this->writeFile($array);\n }",
"public function edit(PatientRecord $patientRecord)\n {\n //\n }",
"public function edit(BookRecord $bookRecord)\n {\n //\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 editRecord() {\n \n $permissions = $this->permission();\n $access = FALSE;\n foreach ($permissions as $per) {\n if ($per->permission == 'user-edit') {\n $access = TRUE;\n break;\n }\n }\n if ($access) {\n $id = $this->uri->segment(3);\n $user = $this->UserModel->getRecord($id);\n $permission_group = $this->UserModel->getUserType($user->id);\n $user->user_role = $permission_group->user_type;\n $this->data['result'] = $user;\n $this->set_view('user/edit_record_page',$this->data);\n } else {\n echo \"access denied\";\n }\n }",
"public function edit()\n {\n \n }",
"public function edit()\n {\n return \"Ini Halaman Edit\";\n }",
"public function edit(Routine $routine)\n {\n //\n }",
"function edit(){\n\t@header(\"Location:modifier.php?id=\".$_GET['line']);\n}",
"public function edit(Fs $Fs)\n {\n //\n }",
"public function edit(Fs $Fs)\n {\n //\n }",
"public function edit(Fs $Fs)\n {\n //\n }",
"public function update()\n {\n if ($this->temp_reg_no == $this->student->reg_no) {\n $this->rules['student.reg_no'] = 'required|string|max:10|alpha_dash';\n }\n\n $validatedData = $this->validate();\n\n Student::where('id', $this->student->id)\n ->update($validatedData['student']);\n\n session()->flash('alert', true);\n return redirect()->to('students');\n }",
"function edit_info($page, $id, $edit) {\r\n \r\n $this->db->where('id', $id);\r\n $this->db->update($page, $edit);\r\n }",
"public function edit(Cour $cour)\n {\n //\n }",
"public function edit_student($map,$user_id){\n if(empty($map)){\n return 0;\n }else{\n return $this->where(\"user_id=%d\",$user_id)->save($map);\n }\n }",
"public function p_editProfile() {\n\t$_POST['modified'] = Time::now();\n \n $w = \"WHERE user_id = \".$this->user->user_id;\n\t\t\n\t# Insert\n\tDB::instance(DB_NAME)->update(\"users\", $_POST, $w);\n \n Router::redirect(\"/users/profile\");\n\n }",
"public function updateRecord()\n\t{\n\t\tif($this->user->hasRight($this->getHandler()->getEditRight()))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$record = $this->getHandler()->getRecord();\n\t\t\t\t$record->import($this->getRequest());\n\n\t\t\t\t// check owner\n\t\t\t\tif(!$this->isOwner($record))\n\t\t\t\t{\n\t\t\t\t\tthrow new Exception('You are not the owner of the record');\n\t\t\t\t}\n\n\t\t\t\t// check captcha\n\t\t\t\t$this->handleCaptcha($record);\n\n\t\t\t\t// update\n\t\t\t\t$this->getHandler()->update($record);\n\n\n\t\t\t\t$msg = new Message('You have successful edit a ' . $record->getName(), true);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t\tcatch(\\Exception $e)\n\t\t\t{\n\t\t\t\t$msg = new Message($e->getMessage(), false);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$msg = new Message('Access not allowed', false);\n\n\t\t\t$this->setResponse($msg, null, $this->user->isAnonymous() ? 401 : 403);\n\t\t}\n\t}",
"public function edit(Python $python)\n {\n //\n }",
"public function edit(Studentpreferences $studentpreferences)\n {\n //\n }",
"public function edit(Reader $reader)\n {\n //\n }",
"function updateRecord()\n{\n\n // Connect to DB\n require('connect.php');\n\n //User inputs for id, idiom, occurence and translation \n // in the record they'd like to edit \n\n $id = $_POST['update-id'];\n $idiom = $_POST['update-idiom'];\n $occurence = $_POST['update-occurence'];\n $translation = $_POST['update-translation'];\n\n // Update query\n $sql = \"UPDATE `meno` \n SET\n `idiom` = '$idiom',\n `occurence` = '$occurence',\n `translation` = '$translation',\n `commentary` = '$commentary'\n WHERE `id` = '$id' \";\n\n $update_query = mysqli_query($connection, $sql);\n\n if (!$update_query) {\n echo \"Error: \" . $sql . mysqli_error($connection);\n }\n\n mysqli_close($connection);\n\n header('Location: index.php');\n\n // check if save button has been clicked \n}",
"public function update($record);",
"function modifyStudent( $sessionID, $studentID, $studentInfo ) {\r\n\t\tif( $this->userCanModifyStudent( $sessionID ) ) {\r\n\t\t\t$keys = array_keys($studentInfo);\r\n\t\t\t$query = 'UPDATE students SET ';\r\n\t\t\tfor ($i=0; $i<sizeof($studentInfo); $i++){\r\n\t\t\t\tif ($i == 0){\r\n\t\t\t\t\t$query .= $keys[$i].\"='\".addslashes(htmlspecialchars($studentInfo[$keys[$i]])).\"'\";\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t$query .= ', '.$keys[$i].\"='\".addslashes(htmlspecialchars($studentInfo[$keys[$i]])).\"'\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$query .= \" ,Modifier='\".$_SESSION['userid'].\"' WHERE StudentID='\".$studentID.\"'\";\r\n\t\t\t$result = mysql_query($query);\r\n\t\t}\r\n\t}",
"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 student_edit_form_submit($form, &$form_state) {\n $id = arg(1);\n $num_edited = db_update('student')\n ->fields(array(\n 'st_fnm' => check_plain($form_state['input']['st_fnm']),\n 'st_lnm' => check_plain($form_state['input']['st_lnm']),\n 'st_email' => check_plain($form_state['input']['st_email']),\n ))\n ->condition('st_id', $id, NULL, 'IS NOT NULL')\n ->execute();\n drupal_set_message(t('Entry has been updated.')\n );\n}",
"public function edit(StudentFee $studentFee)\n {\n //\n }",
"public function edit(Woman $woman)\n {\n //\n }",
"public function edit(QualityRecord $qualityRecord)\n {\n //\n }",
"public function edit() {\n }",
"public function edit(Student $student)\n\t{\n\t\t$this->authorize('update', $student);\n\t\t//$student = Student::findOrFail($id);\n\t\treturn view('student.edit', compact('student'));\n\t}",
"public function edit(exam $exam)\n {\n //\n }",
"public function edit()\n {\n //\n\t\treturn 'ini halaman edit';\n }",
"public function edit_record()\n {\n \t$id = $this->uri->segment(4);\n $table = CMS_TABLE.' as u';\n\t\t$fields = array('u.*');\n\t\t$match = array('u.cms_id' => $id);\n\t\t$result \t = $this->general_model->get_records($table,$fields,'','',$match);\n\t\t$data['editRecord'] = $result;\n\t\t$data['main_content'] = $this->type.'/'.$this->viewname.'/add';\n\t $this->load->view($this->type.'/assets/template',$data);\n }",
"public function edit(Snake $snake)\n {\n //\n }",
"public function Edit()\n\t{\n\t\t\n\t}",
"function renderFileEdit($record) {\n\t\t$this->pi_loadLL();\n\n\t\t$formCode = tslib_CObj::getSubpart($this->fileContent, '###EDITFORM###');\n\n\t\t$markerArray = $this->recordToMarkerArray($record, 'renderFields');\n\t\t$markerArray = $this->render_header($record, $markerArray);\n\n\t\t$markerArray['###CRDATE_AGE###'] = $this->cObj->stdWrap($record['crdate'], $this->conf['renderFields.']['crdate_age.']);\n\n\t\t$markerArray['###LABEL_FILE###'] = $this->pi_getLL('LABEL_FILE');\n\t\t$markerArray['###LABEL_TITLE###'] = $this->pi_getLL('LABEL_TITLE');\n\t\t$markerArray['###LABEL_COPYRIGHT###'] = $this->pi_getLL('LABEL_COPYRIGHT');\n\t\t$markerArray['###LABEL_AUTHOR###'] = $this->pi_getLL('LABEL_AUTHOR');\n\t\t$markerArray['###LABEL_DESCRIPTION###'] = $this->pi_getLL('LABEL_DESCRIPTION');\n\t\t$markerArray['###VALUE_TITLE###'] = $record['title'];\n\t\t$markerArray['###VALUE_COPYRIGHT###'] = $record['copyright'];\n\t\t$markerArray['###VALUE_AUTHOR###'] = $record['creator'];\n\t\t$markerArray['###VALUE_DESCRIPTION###'] = $record['description'];\n\t\t$markerArray['###LABEL_LANGUAGE###'] = $this->pi_getLL('LANGUAGE_HEADER');\n\t\t$markerArray['###LABEL_FEGROUPS###'] = $this->pi_getLL('LABEL_FEGROUPS');\n\t\t// selected kommen aus Datenbank: t3lib_utility_Debug::debug($record['tx_damfrontend_fegroup']);\n\t\t$selected = explode(',', $record['tx_damfrontend_fegroup']);\n\t\t// Auswahl\n\t\t$SELECT = 'uid, title';\n\t\t$FROM = 'fe_groups';\n\t\t$whereOptions = array();\n\t\tif ($this->conf['fileList.']['fileEdit.']['pid_FEGroups'] > 0) $whereOptions[] = '(pid = ' . $this->conf['fileList.']['fileEdit.']['pid_FEGroups'] . ')';\n\t\tif ($this->conf['fileList.']['fileEdit.']['uids_FEGroups']) $whereOptions[] = '(uid in (' . $this->conf['fileList.']['fileEdit.']['uids_FEGroups'] . '))';\n\t\t$WHERE = implode(' OR ', $whereOptions);\n\t\t// add enable fields\n\t\t$WHERE = $WHERE ? $WHERE . ' ' . tslib_cObj::enableFields('fe_groups') : '1=1 ' . tslib_cObj::enableFields('fe_groups') ;\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($SELECT, $FROM, $WHERE);\n\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\t$groups[$row['uid']] = $row['title'];\n\t\t}\n\t\t$markerArray['###FEGROUPS###'] = $this->renderSelector($groups, $selected, 'FEGROUPS', 3, false, true);\n\t\t$markerArray['###VALUE_LANGUAGE###'] = $this->renderLanguageSelector($record['language']);\n\t\t$hiddenFields = '<input type=\"hidden\" name=\"saveUID\" value=\"' . $record['uid'] . '\" />';\n\t\t$markerArray['###HIDDENFIELDS###'] = $hiddenFields;\n\t\t$markerArray = $markerArray + $this->substituteLangMarkers($formCode);\n\n\t\t$markerArray['###BUTTON_CONFIRM###'] = $this->cObj->stdWrap('<input name=\"editok\" type=\"submit\" value=\"' . $this->pi_getLL('BUTTON_CONFIRM') . '\"', $this->conf['filelist.']['fileEdit.']['button_confirm.']);\n\t\t$markerArray['###CANCEL###'] = $this->cObj->stdWrap('<input name=\"cancelEdit\" type=\"submit\" value=\"' . $this->pi_getLL('CANCEL') . '\">', $this->conf['filelist.']['fileEdit.']['button_cancel.']);\n\n\t\treturn tslib_cObj::substituteMarkerArray($formCode, $markerArray);\n\t}",
"public function edit()\r\n {\r\n //\r\n }",
"public function edit()\r\n {\r\n //\r\n }",
"public function edit()\n {\n \n \n }",
"function edit_person($datafull)\n {\n\t $datafull['name']=str_replace(\"-\",\" \",trim($datafull['name']));\n\t \n\t $id=$datafull['id'];\n\t $data = array(\n 'name' => $datafull['name'],\n 'description' => $datafull['description'],\n 'wlink' => $datafull['wlink'],\n 'sex' => $datafull['sex']\n ); \n\t\t\t\t \n\t\t\t\t if ($datafull['defult'])\n\t\t\t\t {$data['defult'] = 'TRUE';}else{$data['defult'] = 'FALSE'; }\n\t\t\t\t \n\t\t\t\t if ($datafull['active'])\n\t\t\t\t {$data['active'] = 'TRUE';}else{$data['active'] = 'FALSE'; }\n \n\t $this->db->where('id', $id);\n $this->db->update('person', $data);\n\t\n }",
"public function save() {\n\t\t$fileContent = trim(file_get_contents($this->filepath));\n\t\tif ($this->rows) {\n\t\t\t$fp = fopen($this->filepath, 'w');\n\t\t\t$rowcount = count($this->rows);\n\t\t\tfor ($index = 0; $index < $rowcount; ++$index) {\n\t\t\t\t$row = $this->rows[$index];\n\t\t\t\tif ($row->isEditable()) {\n\t\t\t\t\t$variableName = $row->variableName();\n\t\t\t\t\t$pattern = '/\\$'.$variableName.'[\\s]+=([^;]+);/';\n\t\t\t\t\t$replacement = $row->toString();\n\t\t\t\t\t$fileContent = preg_replace($pattern, $replacement, $fileContent);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfwrite($fp, $fileContent);\n\t\t\tfclose($fp);\n\t\t}\n\t}",
"public function edit(Sick $sick)\n {\n //\n }",
"public function edit(StudentToCourse $studentToCourse)\n {\n //\n }",
"function a_edit() {\n\t\tif (isset($_POST[\"btSubmit\"])) {\n\t\t\t$_POST['use_passw']=password_hash($_POST['use_passw'], PASSWORD_DEFAULT);\n\t\t\t$u=new User();\n\t\t\t$u->chargerDepuisTableau($_POST);\n\t\t\t$u->sauver();\n\t\t\theader(\"location:index.php?m=documents\");\n\t\t} else {\t\t\t\t\n\t\t\t$id = isset($_GET[\"id\"]) ? $_GET[\"id\"] : 0;\n\t\t\t$u=new User($id);\n\t\t\textract($u->data);\t\n\t\t\trequire $this->gabarit;\n\t\t}\n\t}",
"public function simpan_edit($id_004, $object)\n\t{\n\t\t$this->db->where('id_004', $id_004)->update('data_b', $object);\n\t}",
"public function edit($id)\n {\n $res = DB::table('student')->where('student_id',$id)->first();\n\n return view('student.update',['res'=>$res]);\n }",
"function editWine() {\n\t\tif (isset($_SESSION['wine_name_long'])) {\n\t\t\t$wineIdx = getWineRecIndex(\n\t\t\t\t\t\tbase64_decode($_SESSION['wine_name_long'])\n\t\t\t\t\t);\n\t\t\t//add the wines into an array\n\t\t\t$editWine = [\n\t\t\t\t\"name\" => $_POST['wine_name'],\n\t\t\t\t\"image\" => $_POST['wine_image'],\n\t\t\t\t\"origin\" => $_POST['wine_origin'],\n\t\t\t\t\"desc\" => $_POST['wine_desc'],\n\t\t\t\t\"price\" => $_POST['wine_price']\n\t\t\t];\n\t\t\t//get the existing wines\n\t\t\t$wines = getWines();\n\n\t\t\t//get the contents of the wine file\n\t\t\t$writeFile = fopen('data/wines.json', \"w\");\n\t\t\t//replace the current record with the new record\n\t\t\t$wines[$wineIdx] = $editWine;\n\t\t\t//convert userRecord to JSON\n\t\t\t$winesJson = json_encode($wines,JSON_PRETTY_PRINT);\n\t\t\t//write JSON string to file\n\t\t\tfwrite($writeFile, $winesJson);\n\t\t\t//close file\n\t\t\tfclose($writeFile);\n\n\t\t\t//redirect to homepage\n\t\t\theader('Location: index.php');\t\n\t\t}\n\t}",
"public function edit(user_instrumento $user_instrumento)\n {\n //\n }",
"public function edit(Student $student)\n {\n //$student = Student::where('NoControl', $NoControl )->firstOrFail();\n $carrera = Carrera::pluck('nombre','id');\n $metodo = Metodo::pluck('nombre','id');\n\n return view('students.edit', compact('student','carrera','metodo'));\n }",
"public function edit()\n {\n }",
"public function edit()\n {\n }",
"public function edit()\n {\n }",
"function update_sample($edit_sample,$sample_manual_id, $sample_name, $sample_unit, $sample_result, $client_id, $sample_type, $pay_status, $sample_image, $date_taken, $result_taken, $comment, $lab_scientist, $sample_description) {\r\n\t\tglobal $db;\r\n\t\t$query = \"UPDATE samples SET\r\n\t\t\tsample_manual_id='\".$sample_manual_id.\"',\r\n\t\t\tsample_name='\".$sample_name.\"',\r\n\t\t\tsample_unit='\".$sample_unit.\"',\r\n\t\t\tsample_result='\".$sample_result.\"',\r\n\t\t\tclient_id='\".$client_id.\"',\r\n\t\t\tsample_type='\".$sample_type.\"',\r\n\t\t\tpay_status='\".$pay_status.\"',\r\n\t\t\tsample_image='\".$sample_image.\"',\r\n\t\t\tsample_type='\".$sample_type.\"',\r\n\t\t\tdate_taken='\".$date_taken.\"',\r\n\t\t\tresult_taken='\".$result_taken.\"',\r\n\t\t\tcomment='\".$comment.\"',\r\n\t\t\tlab_scientist='\".$lab_scientist.\"',\r\n\t\t\tsample_description='\".$sample_description.\"'\r\n\t\t\tWHERE sample_id='\".$edit_sample.\"'\r\n\t\t\";\r\n\t\t$result = $db->query($query) or die($db->error);\r\n\t\t\r\n\t\treturn 'Sample was updated successfuly.';\t\r\n\t}",
"function EditRecord($class, $id, $data)\r\n\t{\r\n\t\t$TotalArr = array();\r\n\t\tforeach($this->MyClasses[$class]['db'] as $key=>$value)\r\n\t\t{\r\n\t\t\tif(isset($data[$key]))\r\n\t\t\t{\r\n\t\t\t\t$TotalArr[$key] = $data[$key];\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->update($this->MyClasses[$class]['table'], $TotalArr, array(\"id\"=>$id));\t\r\n\t}",
"protected function editar()\n {\n }",
"public function edit(Fichier $fichier)\n {\n //\n }",
"public function edit()\n {\n \n }",
"public function edit()\n {\n \n }",
"public function edit()\n {\n \n }",
"public function edit(Rcfa $rcfa)\n {\n //\n }",
"public function edit($id , $student)\n {\n\n $student = User::find($student);\n $studentAttend = $this->studentAttendRepository->find($id);\n\n if (empty($studentAttend)) {\n Flash::error('حضور الطالب غير متوفر');\n\n return redirect(route('studentAttends.index'));\n }\n\n return view('student_attends.edit',compact('studentAttend', 'student'));\n }",
"public function edit(Learn $learn)\n {\n //\n }",
"public function edit($id)\n {\n // return view('student.edit');\n }",
"function modifyLine(string $address, int $line, string $fName, string $lName, string $imgLink) {\n $csvarr = fileFetcher($address); //gets the file, $address, as an array.\n for ($i = 0; $i < count($csvarr); $i++) {\n $csvarr[$i] = explode(\"|\", $csvarr[$i]);\n }\n if (count($csvarr) < $line) { //if $line is too large,\n echo \"This line does not exist, \" . $line . \",please try again.\"; //outputs error message\n die(); //and kills program\n }\n\n $csvarr[$line][0] = $fName; //sets the line to its modified version.\n $csvarr[$line][1] = $lName; //sets the line to its modified version.\n $csvarr[$line][2] = $imgLink; //sets the author to its modified version.\n saveMan($csvarr, $address); //puts array into file at $address.\n}",
"public function edit($id)\n {\n $this -> authorize('UpdateInfo');\n $genders = Gender::all();\n $roles = Role::all();\n $student = Student::findOrFail($id);\n return view('students.edit',compact('student','roles','genders') );\n }"
] | [
"0.63576794",
"0.61951625",
"0.61951625",
"0.61951625",
"0.61951625",
"0.61951625",
"0.61951625",
"0.61951625",
"0.61951625",
"0.59537905",
"0.5950145",
"0.59412473",
"0.5887603",
"0.58696836",
"0.5851138",
"0.5836256",
"0.5819414",
"0.5807374",
"0.5786073",
"0.5781609",
"0.5779855",
"0.5772327",
"0.57654756",
"0.5752837",
"0.5750801",
"0.57163167",
"0.5715395",
"0.57153136",
"0.57070065",
"0.5700348",
"0.56941843",
"0.5685262",
"0.5664972",
"0.56555325",
"0.5652497",
"0.5644071",
"0.5643002",
"0.56221783",
"0.56008196",
"0.55870956",
"0.55717313",
"0.55692446",
"0.5561945",
"0.5559939",
"0.5559939",
"0.5559939",
"0.55583745",
"0.5557636",
"0.55497426",
"0.5537394",
"0.55299866",
"0.55295986",
"0.55265397",
"0.55254877",
"0.55229247",
"0.55108166",
"0.5504488",
"0.5502401",
"0.55011547",
"0.5500765",
"0.5498542",
"0.54923904",
"0.54766774",
"0.5475635",
"0.5472837",
"0.54713964",
"0.5467733",
"0.5466458",
"0.5465877",
"0.54616094",
"0.5448437",
"0.5426794",
"0.5426794",
"0.54248035",
"0.5421016",
"0.5413968",
"0.54123116",
"0.54083073",
"0.5408142",
"0.5407159",
"0.5403418",
"0.5402448",
"0.54019856",
"0.54017055",
"0.5401126",
"0.5401126",
"0.5401126",
"0.53972656",
"0.5396841",
"0.53923583",
"0.5391533",
"0.53844804",
"0.53844804",
"0.53844804",
"0.5383321",
"0.53827065",
"0.5366523",
"0.53630984",
"0.5360541",
"0.53557575"
] | 0.64862144 | 0 |
Remove a student record from the file (red return text) | function delete($id)
{
// a. first find the file in question.
$search_val = find_by_val("student_id",$id);
$dir = "students/".substr($id,0,2);
$delete_location = $_SERVER['DOCUMENT_ROOT'] . $dir ."/". $id. ".json";
// b. remove the file not the folder
if (!unlink($delete_location)) {
err("$delete_location \00[0m cannot be deleted due to an error");
}
else {
err("$delete_location \33[0m has been deleted");
}
// c. if a folder is empty then it must be removed
if (is_dir_empty($dir)) {
rmdir($_SERVER['DOCUMENT_ROOT'] . $dir ."/");
}
if(!empty($search_val))
echo "\33[34m Your Student \33[34m has been deleted \33[34m succesfully. \33[0m";
else
err("Value non-existent \33[34m Are you sure these are the correct search values? Please try again. ");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function remove_passwords($term) {\n\tglobal $samba_share;\n\t$file=$samba_share.$term.'_users_stu.csv';\n\tif (file_exists($file)) {\n\n\t\t$stu_file=file_get_contents($file);\n\t\t$student_users=explode(\"\\n\",$stu_file);\n\t\t$writeit=\"\";\n\t\tforeach ($student_users as $line) {\n\t\t\t$line=preg_replace('/\"1845(\\d{4})\"/', '\"\"', $line);\n\t\t\t$line=preg_replace('/\"status\"(.*)$/','\"status\"',$line);\n\t\t\t$line=preg_replace('/\"active\"(.*)$/','\"active\"',$line);\n\t\t\t$line=preg_replace('/\"deleted\"(.*)$/','\"deleted\"',$line);\n\t\t\tif (strlen($line)>10) { $writeit .= $line.\"\\n\"; }\n\t\t}\n\t\tfile_put_contents($samba_share.$term.'_users_students.csv', $writeit);\n\t\n\t}\n}",
"public static function remove_row( $name, $file ) {;\n $content = file_get_contents( $file );\n $content = str_replace( $name.'.php', '' , $content );\n\n file_put_contents( $file, $content );\n self::skip_empty_lines( $file);\n }",
"function deleteLine(string $address, int $line) {\n $csvarr = fileFetcher($address); // gets file at $address, as an array.\n for ($i = 0; $i < count($csvarr); $i++) {\n $csvarr[$i] = explode(\"|\", $csvarr[$i]);\n }\n if (count($csvarr) < $line || $line < 0) { // if line doesn't exist, kills program\n echo \"This line does not exist,\" . $line . \",please try again.\";\n die(\"<a href='../index.php'>Return Home</a>\");\n }\n\n $csvarr[$line][0] = \"Anonymous\";\n $csvarr[$line][1] = \"Author\";\n $csvarr[$line][2] = \"https://pbs.twimg.com/profile_images/1268660533127008256/UNoc474t_400x400.jpg\";\n saveMan($csvarr, $address); // puts array into $id.\n return $csvarr[$line]; // returns line removed to display later.\n}",
"function removestudent(){\n $classid = $_GET['classid'];\n $studid = $_GET['studid'];\n include('../../config.php'); \n $q = \"delete from studentsubject where studid=$studid and classid=$classid\";\n mysql_query($q);\n \n $tmp = mysql_query(\"select * from class where id=$classid\");\n $tmp_row = mysql_fetch_array($tmp);\n $tmp_subject = $tmp_row['subject'];\n $tmp_class = $tmp_row['course'].' '.$tmp_row['year'].'-'.$tmp_row['section'];\n \n $tmp = mysql_query(\"select * from student where id=$studid\");\n $tmp_row = mysql_fetch_array($tmp);\n $tmp_student = $tmp_row['fname'].' '.$tmp_row['lname'];\n \n $act = \"remove student $tmp_student from class $tmp_class with the subject of $tmp_subject\";\n $this->logs($act);\n \n header('location:../classstudent.php?r=success&classid='.$classid.'');\n }",
"function deleteFile($db, $strDetailID = \"\")\n{\n global $words;\n $bolNewData = true;\n if ($strDetailID != \"\") {\n $strSQL = \"SELECT * FROM hrd_training_request \";\n $strSQL .= \"WHERE id = '$strDetailID' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strFile = $rowDb['doc'];\n if ($strFile != \"\") {\n if (file_exists(\"trainingdoc/\" . $strFile)) {\n unlink(\"trainingdoc/\" . $strFile);\n }\n $strSQL = \"UPDATE hrd_training_request SET doc = '' WHERE id = '$strDetailID' \";\n $resExec = $db->execute($strSQL);\n //writeLog(ACTIVITY_DELETE, MODULE_PAYROLL,\"file $strDetailID\",0);\n }\n }\n }\n return true;\n}",
"function removeStudentFromAlerts($student){\r\n\t\t$user = $_SESSION['userid'];\r\n\t\t$query = \"delete from studentalert where userid='$user' and studentid='$student'\";\r\n\t\tmysql_query($query);\r\n\t}",
"private function deleteFileRecord($fileName) {\n /** @var URLRequest $record */\n $record = URLRequest::where('fileName', $fileName)->first();\n shell_exec('cd /Stream && sudo rm ' . $record->fileName);//Remove the file from the /Stream directory.\n $record->delete(); //Delete $record from the database.\n }",
"function deleteDocument() {\n \tglobal $synAbsolutePath;\n global ${$this->name}, ${$this->name.\"_name\"}, ${$this->name.\"_old\"}; // ${$this->name} = ${\"surname\"} = $surname\n include_once(\"../../includes/php/utility.php\");\n $ext=$this->translate($this->getValue());\n $mat=$this->translatePath($this->mat);\n $filename=$this->createFilename(false);\n $documentRoot=$synAbsolutePath.\"/\";\n $fileToBeRemoved=$documentRoot.$mat.$filename.\"*\";\n foreach (glob($fileToBeRemoved) as $filename)\n unlink($filename);\n }",
"public function actionRemove() {\n if (!isset($_POST['id']))\n die(\"what?\");\n $id = (int) $_POST['id'];\n if ($id < 1)\n die(\"unknown file\");\n CUserfiles::model()->RemoveFile($this->user_id, $id);\n\n echo \"OK\";\n }",
"public function remove(&$simbio, $str_args) {\n if (!User::isUserLogin()) {\n return false;\n }\n if (isset($_POST['record'])) {\n // master file type\n $this->dbTable = $str_args?$str_args:self::$tables[0];\n // auto generate fields from database\n $this->autoGenerateFields($simbio);\n // get primary key\n $_primary_key = 'id';\n foreach ($this->dbFields as $_fld => $_fld_info) {\n if (isset($_fld_info['isPrimary'])) {\n $_primary_key = $_fld;\n break;\n }\n }\n // convert scalar var to array var\n if (!is_array($_POST['record'])) {\n $_POST['record'][0] = $_POST['record'];\n }\n foreach ($_POST['record'] as $_rec_ID) {\n $_rec_ID = (integer)$_rec_ID;\n $simbio->dbDelete(\"`$_primary_key`='$_rec_ID'\", $this->dbTable);\n }\n }\n $this->index($simbio, $str_args);\n }",
"function delLineFromFile($fileName, $lineNum){\n\t\t if(!is_writable($fileName))\n\t\t\t{\n\t\t\t// print an error\n\t\t\tprint \"The file $fileName is not writable\";\n\t\t\t// exit the function\n\t\t\texit;\n\t\t\t}\n\t\t else\n\t\t\t {\n\t\t\t// read the file into an array \n\t\t\t$arr = file($fileName);\n\t\t\t}\n\n\t\t // the line to delete is the line number minus 1, because arrays begin at zero\n\t\t $lineToDelete = $lineNum-1;\n\n\t\t // check if the line to delete is greater than the length of the file\n\t\t if($lineToDelete > sizeof($arr))\n\t\t\t{\n\t\t\t // print an error\n\t\t\tprint \"You have chosen a line number, <b>[$lineNum]</b>, higher than the length of the file.\";\n\t\t\t// exit the function\n\t\t\texit;\n\t\t\t}\n\n\t\t //remove the line\n\t\t unset($arr[\"$lineToDelete\"]);\n\n\t\t // open the file for reading\n\t\t if (!$fp = fopen($fileName, 'w+'))\n\t\t\t{\n\t\t\t// print an error\n\t\t\t\tprint \"Cannot open file ($fileName)\";\n\t\t\t // exit the function\n\t\t\t\texit;\n\t\t\t\t}\n\n\t\t // if $fp is valid\n\t\t if($fp)\n\t\t\t{\n\t\t\t\t// write the array to the file\n\t\t\t\tforeach($arr as $line) { fwrite($fp,$line); }\n\n\t\t\t\t// close the file\n\t\t\t\tfclose($fp);\n\t\t\t\t}\n\n\t\t\n\t\t}",
"function\tdel_student($login)\n{\n $c = new MongoClient();\n $db = $c->mydb;\n $collection = $c->mydb->selectCollection('student');\n $user = $collection->findOne(array(\"login\" => $login));\n if (!isset($user))\n {\n echo \"\\nL'utilisateur \".$login.\" n'existe pas dans la base de donnees !\\n\\n\";\n return (0);\n }\n else\n {\n echo \"\\nEtes-vous sur de vouloir supprimer l'utilisateur \".$login.\" ?\\n\";\n $cmdline = fopen(\"php://stdin\", \"r\");\n echo \"> \";\n $ent = fgets($cmdline);\n preg_match(\"/^.*$/\", $ent, $rep);\n if ($rep[0] == \"oui\")\n\t{\n\t $collection->remove(array(\"login\" => $login));\n\t echo \"L'utilisateur \".$login.\" a ete supprime !\\n\\n\";\n\t return (0);\n\t}\n else if ($rep[0] == \"non\")\n\t{\n\t echo \"L'utilisateur \".$login.\" n'as pas ete supprime !\\n\\n\";\n\t return (0);\n\t}\n else if ($rep[0] == \"exit\" || $rep[0] == \"quit\")\n\t{\n\t echo \"Bye !\\n\\n\";\n\t return (0);\n\t}\n else\n\t{\n\t echo \"'oui' ou 'non' ?\\n\";\n\t del_student($login);\n\t}\n }\n}",
"public function remove($index)\n {\n $this->lines = \\array_diff_key($this->lines, array($index => ''));\n\n $this->write();\n }",
"public function removeDocRecord($id){\n //get document by ID\n $file = File::find($id)->delete();\n\n //load form view or\n //redirect back to the main page\n return view('document_control.document_control_review', [\n 'file' => $file\n ]);\n }",
"public function remove($params)\n {\n $this->load->model(\"import_model\");\n $id = $params[0];\n ///XÓA DATA TRƯỚC KHI XÓA FILE\n $this->truncate($id, false);\n //XÓA FILE\n $status = $this->import_model->update(array(\"deleted\" => 1), $id);\n\n /// Log audit trail\n $text = \"USER '\" . $this->session->userdata('username') . \"' removed record($id) to the table 'pmp_import'\";\n $this->import_model->trail($status, \"delete\", null, null, $id, $text);\n header('Location: ' . $_SERVER['HTTP_REFERER']);\n exit;\n }",
"public function rm($section){\n\t\t$body = $this->toArray();\n\t\tunset($body[$section]);\n\t\t$this->updateFile($body);\n\t}",
"function remove_file_from_db( $fn ) {\n // Prepare DELETE statement for selected file\n $delete = \"DELETE FROM files WHERE filename = :filename\";\n $stmt = $this->pdo->prepare($delete);\n\n //Bind parameters\n $stmt->bindParam(':filename', $fn);\n\n //Execute statement\n $stmt->execute();\n\n return;\n }",
"function unlinkFile() {\n\tif (isset($_REQUEST['ulink']) && $_REQUEST['ulink']!=\"\" && isset($_REQUEST['docid']) && $_REQUEST['docid']>0) {\n\t\tunlink('document/'. $_REQUEST['docid'].'/'.$_REQUEST['ulink']);\n\t}\n\theader(\"Location: index.php?view=\".$_REQUEST['controller'].\"&file=\".$_REQUEST['file'].\"&task=lendMoneyViewC\".\"&pid=\".$_REQUEST['docid'].\"\");\t\n}",
"public function removeStudentFromList(){\n\n\t\t$viewDataController = new ViewDataController();\n\t\t$data = $viewDataController->buildData();\n\n\t\t$input = Request::all();\t\n\n\t\tif (!isset($input['user_id']) || empty($input['user_id'])) {\n\t\t\treturn 'failed';\n\t\t}\n\n\t\t$cache = Cache::get(env('ENVIRONMENT').'_'.$data['user_id'].'_studentList');\n\n\t\t$cnt = 0;\n\t\tforeach ($cache as $key) {\n\t\t\tif ($key['user_id'] == $input['user_id']) {\n\t\t\t\tunset($cache[$cnt]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$cnt++;\n\t\t}\n\n\t\tCache::put(env('ENVIRONMENT').'_'.$data['user_id'].'_studentList', $cache, 60);\n\n\t\treturn 'success';\n\t}",
"function remove($rowindex) {\r\n assert($this->ds->_rowid[$rowindex] != '');\r\n # before deleting row, check if there's a file field, and its value is exist, then delete the assocaiated file first\r\n $um = NULL;\r\n $row = NULL;\r\n foreach ($this->properties as $colvar=>$col) {\r\n if ($col->inputtype == 'file' and $col->datatype == 'int') {\r\n # populate this row first (just once, in case there is more than 1 file field)\r\n if (!$row)\r\n $row = $this->get_row(array('rowid'=>$this->ds->_rowid[$rowindex]));\r\n if (!$row) continue;\r\n $file_id = $row[$col->colname];\r\n if (!$um)\r\n $um = instantiate_module('upload_manager');\r\n $um->del_file($file_id); # del the file\r\n }\r\n }\r\n\r\n $sql = 'delete from `'.$this->db_table.'` where rowid='.$this->ds->_rowid[$rowindex].' limit 1'; # with safeguard\r\n #~ echo '<br>'.$sql;\r\n $res = mysql_query($sql) or die('<br>'.$sql.'<br>'.mysql_error()); #do to database\r\n }",
"private function deleteLangFileContent() \n {\n $this->read();\n unset($this->arrayLang[$this->key]);\n $this->save();\n }",
"function striplinesfromcsv($numberoflines,$filename) {\r\n\t\t\r\n\t\t$fileName = 'nightlies/'.$filename;\r\n\t\t$a = preg_replace(\"/^(.*?\\n){0,$numberoflines}/\",'', file_get_contents($fileName));\r\n\t\t$b = fopen($fileName, 'w');\r\n\t\tfwrite($b, $a);\r\n\t\tfclose($b);\r\n\t\t\r\n\t\t//$filename = 'nightlies/'.$filename;\t\t\r\n\t\t//$file = file($filename);\r\n\t\t//file_put_contents($filename, implode(\"\\n\", array_slice($file, $numberoflines)));\r\n\t\t\r\n\t\techo \" > > > Stripping \".$numberoflines.\" lines from '\".$filename.\"' <br>\";\r\n\t}",
"function remove_first_line ($filename) {\n $file = file($filename);\n $output = $file[0];\n unset($file[0]);\n $return=implode(\"\",$file);\n return $return;\n}",
"private function removeFile($fid) {\n // Load and delete old file.\n $file = File::load($fid);\n \\Drupal::service('file.usage')->delete($file, 'itkore_admin', 'user', '1', '1');\n }",
"public function deleteLine($line) {\r\n\t\tif ($this->exists && $line !== null) {\r\n\t\t\t$lineData = $this->readByLine ();\r\n\t\t\t\r\n\t\t\t$inodes = new iArrayList ();\r\n\t\t\tfor($y = 0; $y < sizeof ( $lineData ); $y ++) {\r\n\t\t\t\t$inodes->add_iNode ( new iNode ( $lineData [$y], null, null, null ) );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$inodes->removeNode ( $line );\r\n\t\t\t\r\n\t\t\t$this->clearFile ();\r\n\t\t\t\r\n\t\t\tfor($y = 0; $y < $inodes->count; $y ++) {\r\n\t\t\t\t$this->writeToFile ( $inodes->getNode ( $y )->Data1 );\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$inodes->__destruct ();\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"function delete_student($studentID) {\n global $db;\n $query = 'DELETE FROM students \n WHERE studentID = :studentID';\n $statement = $db->prepare($query);\n $statement->bindValue(':studentID', $studentID);\n $statement->execute();\n $statement->closeCursor();\n }",
"public function rm($filename)\n {\n $nodes = $this->idx_tree->nodes();\n unset($nodes[$filename]);\n $this->idx_tree->nodes($nodes);\n }",
"function removeHard()\r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\r\n\t\t$userid = ($this->user) ? $this->user->id : $this->owner_id;\r\n\r\n\t\tUserFilesRemoveFile($dbh, $this->id, $userid, false, true);\r\n\t}",
"private function DeleteFirstLine() {\r\n\t\t$handle = fopen($this->results_file, \"r\");\r\n\t\t$first = fgets($handle,2048); \r\n\t\t$outfile=\"temp.txt\";\r\n\t\t$o = fopen($outfile,\"w\");\r\n\t\twhile (!feof($handle)) {\r\n\t\t\t$buffer = fgets($handle,2048);\r\n\t\t\tfwrite($o,$buffer);\r\n\t\t}\r\n\t\tfclose($handle);\r\n\t\tfclose($o);\r\n\t}",
"function delete_first_line() {\n\t\tarray_shift($this->record);\n\t\treturn true;\n\t}",
"function deleteStringFromFile($file, $string)\n {\n $rowNumber = 0;\n $array = array();\n\n $read = fopen($file, \"r\");\n while (!feof($read)) {\n $array[$rowNumber] = fgets($read);\n ++$rowNumber;\n }\n fclose($read);\n\n $write = fopen($file, \"w\");\n foreach($array as $value) {\n if(!strstr($value, $string)) {\n fwrite($write, $value);\n }\n }\n fclose($write);\n }",
"function cvs_delete_user($cvs_user, $cvs_project) {\r\n $all_cvs_users = cvs_read_passwd($cvs_project);\r\n $cvs_fields=$all_cvs_users[$cvs_user];\r\n if (!is_null($cvs_fields)) {\r\n\tunset($all_cvs_users[$cvs_user]);\r\n\tcvs_write_file($all_cvs_users, $cvs_project);\r\n\tcvs_log(1, \"Deleted user $cvs_user\");\r\n } else {\r\n\tcvs_log(3, \"User $cvs_user does not exist\");\r\n } \r\n}",
"public function delete($filename);",
"public function deleteSource()\n {\n return Yii::$app->storage->fileSystemDeleteFile($this->filter_id . '_' . $this->file->name_new_compound);\n }",
"function delete() {\n try {\n $delete = \"Name: \" . $_POST[\"username\"] . \" , Email: \" . $_POST[\"email\"] . \" , Phone: \" . $_POST[\"phone\"];\n $data = file($this->directory);\n $out = array();\n \n foreach ($data as $line) {\n if (trim($line) != $delete) {\n $out[] = $line;\n }\n }\n\n $file = fopen($this->directory, \"w+\");\n flock($file, LOCK_EX);\n foreach ($out as $line) {\n fwrite($file, $line);\n }\n flock($file, LOCK_UN);\n fclose($file);\n return true;\n }\n catch(Exception $e) {\n echo \"Delete not successful: \" . $e;\n return false;\n }\n }",
"function deleteWine() {\n\t\tif (isset($_GET['wine'])) {\n\t\t\t//get the index of the wine\n\t\t\t$wineIdx = getWineRecIndex(\n\t\t\t\t\t\tbase64_decode($_GET['wine'])\n\t\t\t\t\t);\n\t\t\t//get the existing wines\n\t\t\t$wines = getWines();\n\n\t\t\t//get the contents of the wine file\n\t\t\t$writeFile = fopen('data/wines.json', \"w\");\n\t\t\t//delete the record from the array using the index\n\t\t\tarray_splice($wines, $wineIdx, 1);\n\t\t\t//convert userRecord to JSON\n\t\t\t$winesJson = json_encode($wines,JSON_PRETTY_PRINT);\n\t\t\t//write JSON string to file\n\t\t\tfwrite($writeFile, $winesJson);\n\t\t\t//close file\n\t\t\tfclose($writeFile);\n\t\t}\n\t}",
"protected function removeSysFileReferenceRecordsFromImportDataWithRelationToMissingFile() {}",
"public function removeSeatMember() {\n $id = $this->input->get('id');\n $tdata = array(\n 'student_id' => '',\n 'student_name' => '',\n 'class' => '',\n 'roll_number' => ''\n );\n $this->db->where('id', $id);\n if ($this->db->update('dormitory_bed', $tdata)) {\n redirect('dormitory/dormitoryReport', 'refresh');\n }\n }",
"public function remove($s_name)\n {\n // Get full student details\n $this->readSingle($s_name);\n\n // Delete student from p_s_junction\n $query = '\n DELETE FROM p_s_junction\n WHERE p_id = :p_id \n AND s_id = :s_id\n ';\n\n // Prepare statement\n $stmt = $this->conn->prepare($query);\n\n // Bind data\n $stmt->bindParam(':p_id', $this->p_id);\n $stmt->bindParam(':s_id', $this->s_id);\n\n // Execute query, return false if query doesn't execute\n if (!$stmt->execute()) return false; // Query executing with 0 rows affected won't return false, therefore we need to check for that separately\n\n // Check rows affected, if none, show error\n if ($stmt->rowCount() == 0) {\n $_SESSION['message'] = \"Could not delete student because the specified student was not found.\";\n return false;\n }\n\n // Print error if something goes wrong\n // printf(\"ERROR: \", $stmt->error);\n\n // Set session message if successful\n $_SESSION['message'] = \"Student removed from the project!\";\n\n // If student is no longer participating in any projects, delete from database\n if (!$this->readSingle($this->s_name, \"any\")) {\n $this->delete($this->s_id);\n\n // Change message\n $_SESSION['message'] = \"Student deleted!\";\n }\n\n return true;\n }",
"public function clearRecord($rid){\n $oldRecord = $this->domDocument->getElementById($rid); //get Root\n $this->domDocument->documentElement->removeChild($oldRecord); // remove root\n // save back to disk \n $this->domDocument->save($this->xmlPath);\n }",
"function deleteFilesFromRecord($uid)\t{\n\t\t$table = $this->theTable;\n\t\t$rec = $GLOBALS['TSFE']->sys_page->getRawRecord($table,$uid);\n\n\t\t//$GLOBALS['TSFE']->includeTCA();\n\t\tt3lib_div::loadTCA($table);\n\t\treset($GLOBALS['TCA'][$table]['columns']);\n\t\t$iFields=array();\n\t\twhile(list($field,$conf)=each($GLOBALS['TCA'][$table]['columns']))\t{\n\t\t\tif ($conf['config']['type']=='group' && $conf['config']['internal_type']=='file')\t{\n\n\t\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery($table, $this->conf['uidField'].'='.intval($uid), array($field => ''));\n\n\t\t\t\t$delFileArr = explode(',',$rec[$field]);\n\t\t\t\treset($delFileArr);\n\t\t\t\twhile(list(,$n)=each($delFileArr))\t{\n\t\t\t\t\tif ($n)\t{\n\t\t\t\t\t\t$fpath = $conf['config']['uploadfolder'].'/'.$n;\n\t\t\t\t\t\tunlink($fpath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected function removeFilename($filename){@unlink($filename);}",
"public function delete($file){\n\t\t\n\t\t//If the users file exists try to delete it\n\t\tif(file_exists($file))\n\t\t{\n\t\t\tunlink($file) or die($this->openFile(\"core/fragments/errors/error34.phtml\"));\n\t\t}\n\t}",
"function deleteEventFromFile($idEvent, $idUser, $eventsArray, $file)\n\t{\n\t\t$i = search_2d_array($eventsArray, \"Event ID\", $idEvent);\n\t\t$p = $eventsArray[$i][\"User ID\"];\n\t\tif ($p == $idUser)\n\t\t{\n\t\t\t// Make string array of file and remove line at index\n\t\t\t$eventStringArray = file($file);\n\t\t\tunset($eventStringArray[$i]);\n\t\t\t// Reset array to string and rewrite file\n\t\t\t$fileContent = implode(\"\", $eventStringArray);\n\t\t\t$eventFile = fopen($file, \"wb\");\n\t\t\t// if the file doesn't open\n\t\t\tif ($eventFile === FALSE)\n\t\t\t\t$errorMessage = \"There was an error deleting the event.\";\n\t\t\t// otherwise write the string and close the file\n\t\t\telse \n\t\t\t{\n\t\t\t\tfwrite($eventFile, $fileContent);\n\t\t\t\tfclose($eventFile);\n\t\t\t\t// Reread the file to the web page's eventsArray\n\t\t\t\t$eventsArray = get2DAssocArray($file, $keys);\n\t\t\t}\n\t\t}\n\t}",
"function deleteAssignFile($id,$conn){\r\n\r\n //get file path\r\n\r\n $sql3 = \"SELECT * FROM assignmentFiles\r\n WHERE assignmentID = '\".$id.\"'\";\r\n\r\n $result3 = mysqli_query($conn, $sql3);\r\n\r\n if (mysqli_num_rows($result3) > 0) {\r\n // output data of each row\r\n while($row = mysqli_fetch_assoc($result3)){\r\n\r\n\r\n $Path = \"../assignment/\".$row3['file'];\r\n if (file_exists($Path)){\r\n unlink($Path); \r\n } \r\n\r\n }\r\n }\r\n\r\n //end of unlinking \r\n\r\n\r\n\r\n $sql = \"DELETE FROM assignmentFiles\r\n WHERE assignmentID = '\".$id.\"'\";\r\n\r\n mysqli_query($conn, $sql);\r\n\r\n\r\n}",
"function deleteFile() {\r\n\t\tif (file_exists($this->data[$this->alias]['path'])) {\r\n\t\t\tunlink($this->data[$this->alias]['path']);\r\n\t\t}\r\n\t}",
"public function file_delete($filename);",
"function renderFileDeletion($record) {\n\n\t\t$single_Code = tslib_CObj::getSubpart($this->fileContent, '###FILE_DELETION###');\n\t\t// Formating Timefields and filesize\n\t\t$record['tstamp'] = date('d.m.Y', $record['tstamp']);\n\t\t$record['crdate'] = date('d.m.Y', $record['crdate']);\n\t\t#$record['file_size'] = t3lib_div::formatSize($record['file_size'],' bytes | kb| mb| gb');\n\n\t\t// converting all fields in the record to marker (recordfields and markername must match)\n\t\t$markerArray = $this->recordToMarkerArray($record);\n\t\t$markerArray = $markerArray + $this->substituteLangMarkers($single_Code);\n\t\t$markerArray['###FORM_URL###'] = $this->cObj->typolink('', $this->conf['filelist.']['fileDeleteMessage.']['form_url.']);\n\t\t$hiddenFields = '<input type=\"hidden\" name=\"deleteUID\" value=\"' . $record['uid'] . '\" />';\n\t\t$markerArray['###HIDDENFIELDS###'] = $hiddenFields;\n\t\t$this->pi_loadLL();\n\t\t$content = tslib_cObj::substituteMarkerArray($single_Code, $markerArray);\n\t\t$content = tslib_cObj::substituteMarker($content, '###CATEGORY###', $this->cObj->cObjGetSingle($this->conf['singleView.']['category.']['cObject'], $this->conf['singleView.']['category.']['cObject.']));\n\t\t$content = tslib_cObj::substituteMarker($content, '###TITLE_SINGLEVIEW###', $record['title']);\n\t\t$content = tslib_cObj::substituteMarker($content, '###CR_DATE_HEADER###', $this->pi_getLL('CR_DATE_HEADER'));\n\t\t$content = tslib_cObj::substituteMarker($content, '###FILE_SIZE_HEADER###', $this->pi_getLL('FILE_SIZE_HEADER'));\n\t\t$content = tslib_cObj::substituteMarker($content, '###CR_DESCRIPTION_HEADER###', $this->pi_getLL('CR_DESCRIPTION_HEADER'));\n\t\t$content = tslib_cObj::substituteMarker($content, '###COPYRIGHT_HEADER###', $this->pi_getLL('COPYRIGHT_HEADER'));\n\t\t$content = tslib_cObj::substituteMarker($content, '###FILETYPE_HEADER###', $this->pi_getLL('FILETYPE_HEADER'));\n\t\t$content = tslib_cObj::substituteMarker($content, '###LINK_HEADER###', $this->pi_getLL('LINK_HEADER'));\n\t\t$content = tslib_cObj::substituteMarker($content, '###TITLE_SINGLEVIEW_HEADER###', $this->pi_getLL('TITLE_SINGLEVIEW_HEADER'));\n\t\t$content = tslib_cObj::substituteMarker($content, '###LABEL_WARNING###', $this->pi_getLL('LABEL_WARNING'));\n\t\t$content = tslib_cObj::substituteMarker($content, '###MESSAGE_DELETION_WARNING###', $this->pi_getLL('MESSAGE_DELETION_WARNING'));\n\t\t$content = tslib_cObj::substituteMarker($content, '###CONFIRM_DELETION_UID###', $this->cObj->stdWrap('<input name=\"CONFIRM_DELETION\" type=\"submit\" value=\"' . $this->pi_getLL('BUTTON_CONFIRM') . '\">', $this->conf['filelist.']['fileDeleteMessage.']['buttonConfirm.']));\n\t\t$content = tslib_cObj::substituteMarker($content, '###CANCEL_DELETION_UID###', $this->cObj->stdWrap('<input name=\"CANCEL_DELETION\" type=\"submit\" value=\"' . $this->pi_getLL('BUTTON_BACK') . '\">', $this->conf['filelist.']['fileDeleteMessage.']['buttonCancel.']));\n\t\treturn $content;\n\t}",
"function _webform_delete_file($data, $component) {\r\n // Delete an individual submission file.\r\n $filedata = unserialize($data['value']['0']);\r\n if (isset($filedata['filepath']) && is_file($filedata['filepath'])) {\r\n unlink($filedata['filepath']);\r\n db_query(\"DELETE FROM {files} WHERE filepath = '%s'\", $filedata['filepath']);\r\n }\r\n}",
"public function removeMutira(){\n $this->validaAutenticacao();\n\n $tweet = Conteiner::getModel('Mutira');\n $tweet->__set('mutira', $_POST['mutira']);\n $tweet->__set('id_usuario', $_SESSION['id']);\n \n\n $tweet->removeMutira();\n\n //header('Location: /timeline');\n\n }",
"public function delete($file) {\n\t}",
"public function deleteRecords($lintidreg) {\r\n $db = Zend_Db_Table::getDefaultAdapter();\r\n $where_delete_records = \" IdStudent = '\".$lintidreg.\"' \" ;\r\n $db->delete('tbl_academicprogress_subjects', $where_delete_records); \r\n $db->delete('tbl_academic_progress', $where_delete_records); \r\n \r\n }",
"function fileRemove($fileId){\n\tinclude '../../database.php';\n\n\t$stmt = $conn->prepare(\"SELECT * FROM file WHERE file_id=?\");\n\t$stmt->execute(array($fileId));\n\t$filelocation = $stmt->fetch(PDO::FETCH_ASSOC);\n\t$filelocation = $_SERVER[\"DOCUMENT_ROOT\"] . $filelocation;\n\n\tunlink($filelocation);\n\n\t$stmt = $conn->prepare(\"DELETE FROM file WHERE file_id=?\");\n\t$stmt->execute(array($fileId));\n}",
"public function deleteFrom($record = null, $index = null) {\n $array = $this->readFile();\n if (is_null($record)) {\n $array = [];\n }\n else if (!is_null($record) && is_null($index)) {\n $array[$record] = null;\n for ($i = $record; $i < count($array); $i++) {\n if ($i == count($array) - 1) {\n $array[$i] = null;\n break;\n }\n $array[$i] = $array[$i + 1];\n }\n }\n else {\n $array[$record][$index] = null;\n for ($i = $index; $i < count($array[$record]); $i++) {\n if ($i == count($array[$record]) - 1) {\n $record[$i] = null;\n break;\n }\n $array[$record][$i] = $array[$record][$i + 1];\n }\n }\n $this->writeFile($array);\n }",
"private function removeEntrada($filePath){\n \\Storage::delete($filePath);\n }",
"public function deletestudents ($student_number) {\n $sqlQuery = \" DELETE FROM students \";\n $sqlQuery .= \" WHERE student_number= $student_number\";\n $result = $this -> getDbManager () -> executeQuery ( $sqlQuery );\n return $result ;\n }",
"public function deleteStudent($id){\n\t \t\n\t\t//get Student by Id\n\t\t$classes = CaStudent::find($id);\n\t\t\n\t\t//delete student\n\t\t$classes->delete();\n\t\t\n\t }",
"function remove($student,$year,$month)\n {\n $value = array($month => null);\n $this->ci->db->where('student_id', $student);\n $this->ci->db->where('financial_year', $year);\n $this->ci->db->update($this->table, $value);\n }",
"public function unlink($file);",
"function clearStudentFW ( $sessionID, $studentID, $Reason ) {\r\n\t\tif($this->getAccessLevel() > 7) {\r\n\r\n // add a contact indicating that the student was removed\r\n $description = \"Student removed from First Watch List [\".$Reason.\"].\";\r\n $this->updateSpecialHistory($studentID,$description,0); \r\n\r\n // update db\r\n\t\t\t$query = \"DELETE FROM `students-FW` WHERE StudentID = '\".$studentID.\"' AND Reason= '\".$Reason.\"'\";\r\n\t\t\tmysql_query($query);\t\t\r\n\t\t\t$query = \"SELECT * FROM `students-FW` WHERE StudentID = '\".$studentID.\"'\";\r\n\t\t\t$result = mysql_query($query);\r\n\t\t\t\r\n\t\t\tif(mysql_num_rows($result) == 0)\r\n\t\t\t{\r\n\t\t\t\t$query = \"UPDATE students SET FirstWatch = 0 WHERE StudentID = '\".$studentID.\"'\";\r\n\t\t\t\tmysql_query($query);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private function removeUploadedFile()\n {\n if(!isset($_REQUEST['file']))\n {\n exit; \n }\n \n list($file, $src, $size) = explode(':', $_REQUEST['file']);\n \n if(file_exists($src))\n {\n @unlink($src);\n }\n exit;\n }",
"public function deleteGraceMarks($studentId,$classId,$subjectId){\n $query=\"DELETE from \".TEST_GRACE_MARKS_TABLE.\" WHERE studentId='\".$studentId.\"' AND classId='\".$classId.\"' AND subjectId='\".$subjectId.\"'\";\n return SystemDatabaseManager::getInstance()->executeUpdateInTransaction($query);\n }",
"function delUser($username){\n // Reading names from file\n $file=fopen($this->fPasswd,\"r\");\n $i=0;\n while($line=fgets($file,200)){\n $lineArr=explode(\":\",$line);\n if($username!=$lineArr[0]){\n $newUserlist[$i][0]=$lineArr[0];\n $newUserlist[$i][1]=$lineArr[1];\n $i++;\n }else{\n $deleted=true;\n }\n }\n fclose($file);\n\n // Writing names back to file (without the user to delete)\n $file=fopen($path.$this->fPasswd,\"w\");\n for($i=0;$i<count($newUserlist);$i++){\n fputs($file,$newUserlist[$i][0].\":\".$newUserlist[$i][0].\"\\n\");\n }\n fclose($file);\n \n if($deleted==true){\n return true;\n }else{\n return false;\n }\n }",
"public function deleteFile(){\n\t\t$db = $this->db;\n\t\t$id = $_GET[\"id\"];\n\t\t\n\t\t$file = $db->fetchRow($db->select()->from(array(\"tbf\"=>\"tb_applicant_files\"))->where(\"id = ?\", $id));\n\t\tif ($file){\n\t\t\tif ($file[\"userid\"]!=$_SESSION[\"userid\"]){\n\t\t\t\treturn array(\"success\"=>false);\n\t\t\t}\n\t\t\t//$db->delete(\"tb_applicant_files\", $db->quoteInto(\"id = ?\", $id));\n\t\t\t$db->update(\"tb_applicant_files\", array(\"is_deleted\" => 1), $db->quoteInto(\"id = ?\", $id));\n $db->delete(\"solr_candidates\", $db -> quoteInto(\"userid=?\",$_SESSION[\"userid\"]));\n\t\t\t\n\t\t\tglobal $base_api_url;\n\t\t\t\n\t\t\tfile_get_contents($base_api_url . \"/solr-index/sync-candidates/\");\n\t\t\t\n\t\t\tif (file_exists(getcwd().\"/../applicants_files/\".$file[\"name\"])){\n\t\t\t\tunlink(getcwd().\"/../applicants_files/\".$file[\"name\"]);\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfile_get_contents($base_api_url . \"/mongo-index/sync-candidates-files/?userid=\" . $_SESSION[\"userid\"]);\n\t\t\t\n\t\t\t\n\t\t\treturn array(\"success\"=>true);\n\t\t}else{\n\t\t\treturn array(\"success\"=>false);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}",
"function delete_student_meta( $student_id, $meta_key, $meta_value = '' ) {\n return delete_metadata( 'student', $student_id, $meta_key, $meta_value );\n }",
"function unlink_file($bean_id,$file_name) {\n\t\tglobal $log, $root_directory, $upload_dir;\n\t\t$log->debug(\"Entering unlink_file(\".$bean_id.\",\".$file_name.\") method ...\");\n\t\t$log->debug(\"Exiting unlink_file method ...\");\n\t\treturn unlink($root_directory.\"/\".$upload_dir.$bean_id.$file_name);\n\t}",
"public function unshare($user, $filename) {\n $stmt = $this->pdo->prepare('delete from share where owner_id = :id and file_id = (select id from file where user_id = :id and filename = :filename)');\n $stmt->bindValue(':id', $this->id);\n $stmt->bindValue(':filename', $filename);\n return $stmt->execute();\n }",
"public function removeStudent($studentId = FALSE){\n\n if ($studentId) {\n $this->db->where('usr_id', $studentId);\n $this->db->update('user', array('usr_assigned_lecturer_id' => 'DEFAULT'));\n }\n }",
"function delete_data($id, $qr_file)\n {\n /* Delete QR Code Image from Directory */\n unlink($qr_file);\n\n /* Delete QR Code from Database */\n $this->db->where('id', $id);\n $this->db->delete($this->tbl_qr);\n return ($this->db->affected_rows());\n }",
"function deleteSurveyRecord()\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$affectedRows = $ilDB->manipulateF(\"DELETE FROM svy_svy WHERE survey_id = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\n\t\t$result = $ilDB->queryF(\"SELECT questionblock_fi FROM svy_qblk_qst WHERE survey_fi = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\t\t$questionblocks = array();\n\t\twhile ($row = $ilDB->fetchAssoc($result))\n\t\t{\n\t\t\tarray_push($questionblocks, $row[\"questionblock_fi\"]);\n\t\t}\n\t\tif (count($questionblocks))\n\t\t{\n\t\t\t$affectedRows = $ilDB->manipulate(\"DELETE FROM svy_qblk WHERE \" . $ilDB->in('questionblock_id', $questionblocks, false, 'integer'));\n\t\t}\n\t\t$affectedRows = $ilDB->manipulateF(\"DELETE FROM svy_qblk_qst WHERE survey_fi = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\t\t$this->deleteAllUserData();\n\n\t\t$affectedRows = $ilDB->manipulateF(\"DELETE FROM svy_anonymous WHERE survey_fi = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\t\t\n\t\t// delete export files\n\t\tinclude_once \"./Services/Utilities/classes/class.ilUtil.php\";\n\t\t$svy_data_dir = ilUtil::getDataDir().\"/svy_data\";\n\t\t$directory = $svy_data_dir.\"/svy_\".$this->getId();\n\t\tif (is_dir($directory))\n\t\t{\n\t\t\tinclude_once \"./Services/Utilities/classes/class.ilUtil.php\";\n\t\t\tilUtil::delDir($directory);\n\t\t}\n\n\t\tinclude_once(\"./Services/MediaObjects/classes/class.ilObjMediaObject.php\");\n\t\t$mobs = ilObjMediaObject::_getMobsOfObject(\"svy:html\", $this->getId());\n\t\t// remaining usages are not in text anymore -> delete them\n\t\t// and media objects (note: delete method of ilObjMediaObject\n\t\t// checks whether object is used in another context; if yes,\n\t\t// the object is not deleted!)\n\t\tforeach($mobs as $mob)\n\t\t{\n\t\t\tilObjMediaObject::_removeUsage($mob, \"svy:html\", $this->getId());\n\t\t\t$mob_obj =& new ilObjMediaObject($mob);\n\t\t\t$mob_obj->delete();\n\t\t}\n\t}",
"function delUser($username){\n // Reading names from file\n $file=fopen($path.$this->fPasswd,\"r\");\n $i=0;\n while($line=fgets($file,200)){\n $lineArr=explode(\":\",$line);\n if($username!=$lineArr[0]){\n $newUserlist[$i][0]=$lineArr[0];\n $newUserlist[$i][1]=$lineArr[1];\n $i++;\n }else{\n $deleted=true;\n }\n }\n fclose($file);\n\n // Writing names back to file (without the user to delete)\n $file=fopen($path.$this->fPasswd,\"w\");\n for($i=0;$i<count($newUserlist);$i++){\n fputs($file,$newUserlist[$i][0].\":\".$newUserlist[$i][1].\"\\n\");\n }\n fclose($file);\n \n if($deleted==true){\n return true;\n }else{\n return false;\n }\n }",
"public function remove_row($mark) {\n\n\t\t$this->db->where('oznaka', $mark); // email must be unique !\n\t\t$this->db->delete('sale');\n\t}",
"public function removeUser()\n\t{\n\t\tif(isset($this->primarySearchData[$this->ref_user]))\n\t\t{\n\t\t\tunset($this->primarySearchData[$this->ref_user]);\n\t\t}\n\t}",
"function delete()\n\t{\n\t\t$kReport = $this->input->post(\"kReport\");\n\t\t$kStudent = $this->input->post(\"kStudent\");\n\t\t$this->report->delete($kReport);\n\t\tredirect(\"report/get_list/student/$kStudent\");\n\t}",
"public function delete_file(){\n if($this->file_name != 'sample.jpg'){\n unlink($this->dir_location . $this->file_name);\n }\n }",
"function deleteRecord()\t{\n\t\tif ($this->conf['delete'])\t{\t// If deleting is enabled\n\t\n\t\t\t$origArr = $GLOBALS['TSFE']->sys_page->getRawRecord($this->theTable, $this->recUid);\n\t\t\tif (($GLOBALS['TSFE']->loginUser && $this->conf['requireLogin']) || ( $this->aCAuth($origArr)&& $this->conf['requireLogin'])||!$this->conf['requireLogin'])\t{\t// Must be logged in OR be authenticated by the aC code in order to delete\n\t\t\t\t\t// If the recUid selects a record.... (no check here)\n\t\t\t\tif (is_array($origArr))\t{\n\t\t\t\t\tif ($this->aCAuth($origArr) || $this->metafeeditlib->DBmayFEUserEdit($this->theTable,$origArr, $GLOBALS['TSFE']->fe_user->user,$this->conf['allowedGroups'],$this->conf['fe_userEditSelf'],$this->conf))\t{\t// Display the form, if access granted.\n\t\t\t\t\t\tif (!$GLOBALS['TCA'][$this->theTable]['ctrl']['delete'])\t{\t// If the record is fully deleted... then remove the image (or any file) attached.\n\t\t\t\t\t\t\t$this->deleteFilesFromRecord($this->recUid);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->cObj->DBgetDelete($this->theTable, $this->recUid, TRUE);\n\t\t\t\t\t\t$this->currentArr = $origArr;\n\t\t\t\t\t\t$this->saved = 1;\n\t\t\t\t\t\t$this->userProcess_alt($conf['edit.']['userFunc_afterDelete'],$conf['edit.']['userFunc_afterDelete.'],array('rec'=>$this->currentArr, 'origRec'=>$origArr));\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->error = '###TEMPLATE_NO_PERMISSIONS###';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\t\t$this->error = '###TEMPLATE_NO_PERMISSIONS###';\n\t\t }\n\t\t}\n\t}",
"function delete_student($id){\n\t\t\tprint_r($this->input->post());\n\t\t}",
"public function delete_case_study($case_study_id){\n\t\t$success = $this->clear_flagged_case_study($case_study_id);\n\t\tif(!$success){\n\t\t\treturn false;\n\t\t}\n\t\t//get the case study file\n\t\t$q = \"select filename from \".TP.\"transaction_case_studies where case_study_id='\".$case_study_id.\"'\";\n\t\t$res = mysql_query($q);\n\t\tif(!$res){\n\t\t\treturn false;\n\t\t}\n\t\t$cnt = mysql_num_rows($res);\n\t\tif(0 == $cnt){\n\t\t\t//no such case study, this should not happen\n\t\t\treturn false;\n\t\t}\n\t\t$row = mysql_fetch_assoc($res);\n\t\t$filename = $row['filename'];\n\t\tunlink(CASE_STUDY_PATH.\"/\".$filename);\n\t\t//now delete the record\n\t\t$q = \"delete from \".TP.\"transaction_case_studies where case_study_id='\".$case_study_id.\"'\";\n\t\t$result = mysql_query($q);\n\t\tif(!$result){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"function deleteLine($line){\n deleteLineDB($line);\n return \"line deleted\";\n}",
"public function removeClaimed()\n\t{\n\t\t$items = CreditModel::whereRaw('value = claimed')->get();\n\n\t\tif ($items->count() > 0)\n\t\t{\n\t\t\tforeach ($items as $item)\n\t\t\t{\n\t\t\t\t$item->delete();\n\t\t\t}\n\t\t}\n\t}",
"private function removeOldParts()\n {\n $filename = $this->substream->getFilename();\n for ($i = $this->index + 1; true; ++$i) {\n $indexed_filename = $this->getIndexPartFilename($filename, $i);\n $target = dirname($this->filename).'/'.$indexed_filename;\n if (file_exists($target)) {\n unlink($target);\n } else {\n break;\n }\n }\n }",
"public function deleteFromFile($data, $line = NULL, $index = NULL) {\r\n\t\tif ($this->exists && $data !== null) {\r\n\t\t\t$string = new iString ( $data );\r\n\t\t\t\r\n\t\t\tif ($line === null && $index === null) {\r\n\t\t\t\t$lineData = $this->readByLine ();\r\n\t\t\t\t$this->clearFile ();\r\n\t\t\t\tfor($i = 0; $i < sizeof ( $lineData ); $i ++) {\r\n\t\t\t\t\t$words = $lineData [$i];\r\n\t\t\t\t\t$listOfWords = explode ( \" \", $words );\r\n\t\t\t\t\tfor($y = 0; $y < sizeof ( $listOfWords ); $y ++) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($string->compare_NoCase ( trim ( $listOfWords [$y] ) )) {\r\n\t\t\t\t\t\t\t$listOfWords [$y] = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$listOfWords = array_values ( $listOfWords );\r\n\t\t\t\t\t$words = implode ( \" \", $listOfWords );\r\n\t\t\t\t\tif (! isEmpty ( $words )) {\r\n\t\t\t\t\t\t$this->writeToFile ( trim ( $words ) . \"\\n\" );\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn true;\r\n\t\t\t\r\n\t\t\t} else if ($line !== null && $index === null) {\r\n\t\t\t\t$lineData = $this->readByLine ();\r\n\t\t\t\t$this->clearFile ();\r\n\t\t\t\t$words = $lineData [$line];\r\n\t\t\t\t$listOfWords = explode ( \" \", $words );\r\n\t\t\t\tfor($y = 0; $y < sizeof ( $listOfWords ); $y ++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($string->compare_NoCase ( trim ( $listOfWords [$y] ) )) {\r\n\t\t\t\t\t\t$listOfWords [$y] = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$listOfWords = array_values ( $listOfWords );\r\n\t\t\t\t$words = implode ( \" \", $listOfWords );\r\n\t\t\t\tif (isEmpty ( $words )) {\r\n\t\t\t\t\tunset ( $lineData [$line] );\r\n\t\t\t\t\t$lineData = array_values ( $lineData );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$lineData [$line] = trim ( $words ) . \"\\n\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor($y = 0; $y < sizeof ( $lineData ); $y ++) {\r\n\t\t\t\t\t$this->writeToFile ( $lineData [$y] );\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn true;\r\n\t\t\t\r\n\t\t\t} else if ($line !== null && $index !== null) {\r\n\t\t\t\t$wordToMove = $this->getWordByLineIndex ( $line, $index );\r\n\t\t\t\t$this->deleteFromFile ( $wordToMove, $line );\r\n\t\t\t\t\r\n\t\t\t\treturn true;\r\n\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"private function removeKey( $file, $key, $value ) {\n // Validate data\n if( !is_scalar( $value ) )\n throw new \\InvalidArgumentException( 'Argument 3 passed to ' . __METHOD__ . ' must be an integer or a string, ' . gettype( $value ) . ' given' );\n\n $match = 0;\n $key = $this->normalizeKey( $key );\n $temp = new \\SplTempFileObject( $this->swap );\n $pointer = $this->openFile( $file . '.key', self::FILE_READ );\n\n // Itereate through lines\n foreach( $pointer as $line ) {\n $data = $this->getDataFromLine( $line, $key, '=' );\n\n // We have a match\n if( FALSE !== $data ) {\n $data = $this->formatter->decode( $data );\n\n // Remove the index\n if( $pos = array_search( $value, $data ) ) {\n unset( $data[$pos] );\n\n // Write the new line if not empty\n if( !empty( $data ) )\n $temp->fwrite( $key . '=' . $this->formatter->encode( $data ) . PHP_EOL );\n\n $match++;\n }\n else {\n $temp->fwrite( $line . PHP_EOL );\n }\n }\n else {\n $temp->fwrite( $line . PHP_EOL );\n }\n }\n\n $this->closeFile( $pointer );\n\n if( $match ) {\n $temp->rewind();\n\n $pointer = $this->openFile( $file, self::FILE_WRITE );\n\n foreach( $temp as $line ) {\n $pointer->fwrite( $line );\n }\n\n $this->closeFile( $pointer );\n }\n\n $this->closeFile( $temp );\n\n return $match;\n }",
"function DeleteFile($id, $CheminU) {\r\n if (is_file($CheminU.\"/\".$id)) unlink($CheminU.\"/\".$id);\r\n}",
"public function deleteDocumentAction()\n {\n try {\n $this->_helper->viewRenderer->setNoRender();\n\n // Les modèles\n $model_commission = new Model_DbTable_Commission();\n\n $commission = $model_commission->find($this->_request->id_commission)->current();\n\n // On supprime le fichier\n unlink(REAL_DATA_PATH.DS.'uploads'.DS.'documents_commission'.DS.$commission->DOCUMENT_CR);\n\n // On met à null dans la DB\n $commission->DOCUMENT_CR = null;\n $commission->save();\n\n $this->_helper->flashMessenger([\n 'context' => 'success',\n 'title' => 'Le document a bien été supprimé',\n 'message' => '',\n ]);\n } catch (Exception $e) {\n $this->_helper->flashMessenger([\n 'context' => 'error',\n 'title' => 'Erreur lors de la suppression du document',\n 'message' => $e->getMessage(),\n ]);\n }\n }",
"function wLogErase($path,$param) {\n \n $fp = unlink($path.\"/\".$param.\".log\");\n //fclose ($fp);\n \n}",
"function deleteStation($name,$line)\n{\n $station = getStationDB($name, $line);\n\n if (!$station) return \"station does not exist\";\n\n //check if station is terminal\n $stations = getStationsInLine($line);\n\n if ($stations != false) {\n if (sizeof(($stations)) == 2) return \"There are only two stations in the selected line. Try delete line instead\";\n deleteStationDB($station);\n return \"deleting with success\";\n }\n}",
"function delUser($username){\r\n\t\t// Reading names from file\r\n\t\t$file=fopen($this->fPasswd,\"r\");\r\n\t\t$i=0;\r\n\t\t$newUserlist = array();\r\n\t\twhile($line=fgets($file,200)){\r\n\t\t\t$lineArr=explode(\":\",$line);\r\n\t\t\tif($username!=$lineArr[0]){\r\n\t\t\t\t$newUserlist[$i][0]=$lineArr[0];\r\n\t\t\t\t$newUserlist[$i][1]=$lineArr[1];\r\n\t\t\t\t$i++;\r\n\t\t\t}else{\r\n\t\t\t\t$deleted=true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfclose($file);\r\n\r\n\t\t// Writing names back to file (without the user to delete)\r\n\t\t$file=fopen($this->fPasswd,\"w\");\r\n\t\tfor($i=0;$i<count($newUserlist);$i++){\r\n\t\t\tfputs($file,$newUserlist[$i][0].\":\".$newUserlist[$i][1]);\r\n\t\t}\r\n\t\tfclose($file);\r\n\r\n\t\tif($deleted==true){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"function delete_student_id() {\n$id = $this->uri->segment(3);\n$this->delete_model->delete_student_id($id);\n$this->show_student_id();\n}",
"public function deletestudentdata()\n {\n $this->load->model('Studentmodel');\n $deleteid = trim(htmlentities($this->input->get('id')));\n $deletearray = array(\"id\"=>$deleteid);\n $deleteresult = $this->Studentmodel->deletestudentdata($deletearray);\n if($deleteresult)\n {\n $this->viewstudentdata();\n }\n\n }",
"public function removeRule(){\n\n $initial = strpos( $this->content, \"# begin \" . $this->module );\n if (false === $initial )\n return true;\n\n $final = strpos( $this->content, \"# end \" . $this->module );\n\n $replace = substr( $this->content, 0, $initial );\n if ( false !== $final )\n $replace .= substr( $this->content, $final + strlen( \"# end $this->module\") + 1 );\n\n\t\tfile_put_contents($this->file, $replace);\n\t\treturn true;\n\n\t}",
"public function deleteDocument() {\n $file = $this->getDocumentFile().$this->getAttribute('evidencias')[2];\n\n// check if file exists on server\n if (empty($file) || !file_exists($file)) {\n return false;\n }\n\n// check if uploaded file can be deleted on server\n if (!unlink($file)) {\n return false;\n }\n\n// if deletion successful, reset your file attributes\n $this->evidencias = null;\n\n return true;\n }",
"function DelRecord($pkvalue)\n {\n $databasename = $this->databasename;\n $tablename = $this->tablename;\n $path = $this->path;\n $this->numrecords = -1;\n $this->numrecordscache = array();\n $oldfile = $this->GetFileRecord($this->primarykey,$pkvalue);\n $dirold = dirname($oldfile) . \"/\" . basename($oldfile,\".php\");\n if ( !file_exists($oldfile) )\n return false;\n\n if ( preg_match(\"/\\\\/$/si\",$this->datafile) )\n if ( !strpos($pkvalue,\"..\") !== false && file_exists(\"{$this->datafile}$pkvalue/\") && is_dir(\"{$this->datafile}$pkvalue/\") )\n remove_dir_rec(\"{$this->datafile}$pkvalue\");\n\n $this->ClearCachefile();\n $n = readDatabase($oldfile,$this->xmlfieldname,false,false);\n\n if ( count($n) == 1 ) // se è l' ultimo record\n {\n if ( preg_match(\"/\\\\/$/si\",$this->datafile) )\n {\n @ unlink($oldfile);\n if ( file_exists($oldfile) && is_dir($oldfile) )\n {\n remove_dir_rec($oldfile);\n }\n }\n readDatabase($oldfile,$this->xmlfieldname,false,false);\n return true;\n }\n\n $pkey = $this->primarykey;\n $pvalue = $pkvalue;\n $readok = false;\n for ( $i = 0;$i < _MAXTENTATIVIDIACCESSO;$i++ )\n {\n if ( !file_exists($oldfile) ) //errore\n break;\n $oldfilestring = file_get_contents(\"$oldfile\");\n if ( strpos($oldfilestring,\"</{$this->xmltagroot}>\") !== false )\n {\n $readok = true;\n break;\n }\n }\n if ( !$readok )\n {\n return false;\n }\n\n $oldfilestring = removexmlcomments($oldfilestring);\n $strnew = \"\";\n $newfilestring = preg_replace('/<' . $this->xmlfieldname . '>([^(' . $this->xmlfieldname . ')]*)<' . $pkey . '>' . $pvalue . '<\\/' . $pkey . '>(.*?)<\\/' . $this->xmlfieldname . '>/s',$strnew,$oldfilestring);\n $newfilestring = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<?php exit(0);?>\\n\" . trim($newfilestring,\"\\n \");\n //dprint_xml($oldfilestring);\n //dprint_xml($newfilestring);\n //die();\n $file = fopen($oldfile,\"w\");\n fwrite($file,$newfilestring);\n fclose($file);\n $this->ClearCachefile();\n readDatabase($oldfile,$this->xmlfieldname,false,false);\n return true;\n }",
"private function delete_file($file){\n\t\t$fileLink = fopen($file,'w');\n\t\tfclose($fileLink);\n\t\tunlink($file);\n\t}",
"function deleteMatterDetails($slNo) {\r\n\t\t\t$delQuery \t= \"delete from document_details where sl_no=?\";\r\n\t\t\t$query\t\t= $this->pdo->prepare($delQuery);\r\n\t\t\t$sl\t\t\t= array($slNo);\r\n\t\t\t$query->execute($sl);\r\n\t\t\t\r\n\t\t\t$rowDel \t= $query->rowCount();\t// count the number of rows get deleted\r\n\t\t\treturn $rowDel;\r\n\t\t}",
"function FileClear()\n{\n $myfile=\"scoreBoard.txt\";\n file_put_contents($myfile,\"\");\n $myfile=\"scoreBoardTemp.txt\";\n file_put_contents($myfile,\"\");\n}"
] | [
"0.63940316",
"0.6157597",
"0.609182",
"0.60761863",
"0.59994024",
"0.59141207",
"0.59031403",
"0.586917",
"0.58564085",
"0.5855205",
"0.5754017",
"0.5734922",
"0.5732191",
"0.56697124",
"0.56641114",
"0.56093967",
"0.5572034",
"0.55512226",
"0.5548376",
"0.55343753",
"0.5532674",
"0.5514609",
"0.5461149",
"0.54550517",
"0.5417567",
"0.54039395",
"0.5400451",
"0.5399837",
"0.53967994",
"0.5394418",
"0.5389121",
"0.5382852",
"0.53662765",
"0.53499806",
"0.53486496",
"0.5347402",
"0.5344229",
"0.53121287",
"0.52979887",
"0.5270295",
"0.5259484",
"0.5257903",
"0.524348",
"0.5236515",
"0.5230441",
"0.520212",
"0.5197195",
"0.5194596",
"0.5184569",
"0.5183489",
"0.51736605",
"0.51710844",
"0.5171032",
"0.5169981",
"0.5158673",
"0.5151378",
"0.51416403",
"0.5141248",
"0.51361537",
"0.5128883",
"0.5126219",
"0.5125558",
"0.5106719",
"0.5103644",
"0.51026475",
"0.5101639",
"0.5100255",
"0.5099465",
"0.5099402",
"0.50964504",
"0.5096015",
"0.5093218",
"0.5092334",
"0.5089865",
"0.5086398",
"0.5078486",
"0.507827",
"0.5078081",
"0.507677",
"0.50717175",
"0.5067823",
"0.50674164",
"0.5065383",
"0.5065383",
"0.5065383",
"0.5065383",
"0.50650567",
"0.50639355",
"0.50625044",
"0.5061881",
"0.50600874",
"0.50585496",
"0.5055878",
"0.5053701",
"0.50498927",
"0.50449514",
"0.5044554",
"0.5039761",
"0.50390524",
"0.502631"
] | 0.58972216 | 7 |
Search if a Student Record Exist output that it does if it does. If it doesn't exist let the user know (blue return text) | function search()
{
//-- a. seek the file ensure if it doesn't exist let the user know.
echo "Enter Search Criteria: ";
$search_info = trim(fgets(STDIN));
$search_data = explode("-",$search_info);
$field = $search_data[0];
$value = $search_data[1];
//
$search_val = find_by_val($field,$value);
if(!empty($search_val))
echo "\33[34m Your Student has been found succesful. \33[0m";
else
err("Value non-existent \33[34m Are you sure these are the correct search values? Please try again. ");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isstudentsExisting ($student_number){\n $sqlQuery = \"SELECT count (*) as isExisting \";\n $sqlQuery .= \"FROM students \";\n $sqlQuery .= \"WHERE student_number= $student_number\";\n $result = $this -> getDbManager() -> executeSelectQuery ( $sqlQuery );\n if ( $result [0][ \" isExisting \"] == 1) return ( true );\n else return ( false );\n }",
"public function searchStudent($name){\n // foreach ($this->students as $student) {\n // ($student == $name) ? $result = $name.\" is in the list\":$result = $name.\" Not Found\";\n // }\n\n // check is name foun will retrun found message\n $array = $name.\" Not Found\";\n if(in_array($name, $this-> students)){\n $array = $name.\" is in the list\";\n }\n return $array;\n }",
"function getStudentInformation($STID){\n //By default, put nothing in here.\n\t\t$already_completed_parental_application=\"\";\t\t\n $housing_app_completed_in_system=\"\";\n $first_name=\"\";\n $last_name=\"\";\n $middle_name=\"\";\n $student_ID = \"\";\n $student_DATE_OF_BIRTH = \"\";\n $parental_email_address = \"\";\n $student_app_date = \"\";\n\n\n //As long as there is something in the search.\n while($row=oci_fetch_array($STID,OCI_ASSOC)){\n\t\t //Check whether or not they have already completed the Parental Agreement and if they have,\n //use this field to keep them from progressing forward within this application to move forward. (Onward to Page2.php)\n $already_completed_parental_application=$row[\"NC_SH_PRNTL_APPRVL\"];\n //Check whether or not they have a completed housing application on file.\n $housing_app_completed_in_system=$row[\"SS_STAT_INDICATOR\"];\n //Assign first name from the query lookup.\n $first_name = $row[\"FIRST_NAME\"];\n //Assign last name from the query lookup.\n $last_name = $row[\"LAST_NAME\"];\n //Assign middle name from the query lookup.\n $middle_name = $row[\"MIDDLE_NAME\"];\n //Assign the ID from the query lookup.\n $student_ID = $row[\"EMPLID\"];\n //Assign the student DOB to the query lookup.\n $student_DATE_OF_BIRTH = $row[\"BIRTHDATE\"];\n //Assign the email\n $parental_email_address = $row[\"EMAIL_ADDR\"];\n //Assign the application date\n $student_app_date_temp = $row[\"NC_PROCESS_DTTM\"];\n\t\t \n\t\t //For whatever reason, if there is a \" \" (BLANK) in the field, lets write blank, as it \n\t\t //will trigger the condition if the end-user does not have any information within the \"SS_STAT_INDICATOR\" field.\n\t\t //Create a condition that writes the word \"BLANK\" if there is nothing in the field.\n\t\t\t\n\t\t\t//Fields this affects\n\t\t\t//NC_SH_PRNTL_APPRVL (WHETHER THE END USER HAS ALREADY COMPLETED THIS WEB APPLICATION)\n\t\t\t//SS_STAT_INDICATOR (WHETHER THE STUDENT HAS A COMPLETED HOUSING APPLICATION)\n\t\t\t//MIDDLE_NAME (FOR SOME WILD REASON THE QUERY DOES NOT PULL A MIDDLE NAME FOR THE STUDENT).\t\t\t\n\t\t\t\n\t\t\t//Untouched below...\n\t\t\t/*\n\t\t\tif ($already_completed_parental_application==\" \"||$housing_app_completed_in_system==\" \"||$middle_name==\" \"){\n\t\t\t\t $already_completed_parental_application=\"BLANK\"; //Assign the word, BLANK, to whether or not the end user has completed this web application. \n $housing_app_completed_in_system=\"BLANK\";\t//Assign the word, BLANK, to the housing application status in MyPack Portal.\n\t\t\t\t $middle_name=\"BLANK\"; //Assign the word, BLANK, to the middle name pulled (remember to remove this on page3.php when it is displayed back to the user.)\n\t\t }\n\t\t\t*end untouched.\n\t\t\t*/\n\t\t\t//Changes added for the above wrong condition on 02/01/2016.\n\t\t\t//If the field for NC_SH_PRNTL_APPRVL is blank, set the value that's sent back to PAGE1 to BLANK.\n\t\t\tif ($already_completed_parental_application==\" \"){\n\t\t\t$already_completed_parental_application=\"BLANK\"; //Assign the word, BLANK, to whether or not the end user has completed this web application.\n\t\t\t}\n\t\t\t//If the SS_STAT_INDICATOR is blank, set the value that's sent back to PAGE1 to BLANK.\n\t\t\telse if($housing_app_completed_in_system==\" \"){\n\t\t\t$housing_app_completed_in_system=\"BLANK\";\t//Assign the word, BLANK, to the housing application status in MyPack Portal.\n\t\t\t}\n\t\t\t//If the Middle Name is blank, set the value back to Page1 to BLANK.\n\t\t\telse if($middle_name==\" \"){\n\t\t\t\t$middle_name=\"BLANK\";\n\t\t\t}\n\t\t\t//End changes on 02/01/2016.\t\t\n\t\t\t\n\t\t\t\n //End creating a condition...\n\t\t \n\t\t \n\t\t \n }\n\t\t\n\t\t //FORMAT OF NC_PROCESS_DTTM IS DD-MM-YY H:i:s.00000000 AM\n\t\t //Only return a set amount of information.\n\t\t //SHOULD RETURN DD-MM-YY\n\t\t $date_of_application_formatted = substr($student_app_date_temp,0,9);\n\t\t $student_app_date = $date_of_application_formatted;\n\t\t\n\t\t\n //Return information from the database lookup.\n //return $already_completed_parental_application.\" \".$housing_app_completed_in_system.\" \".$first_name.\" \".$last_name.\" \".$middle_name.\" \".$student_ID.\" \".$student_DATE_OF_BIRTH.\" \".$parental_email_address.\" \".$student_app_date;\n\t\t\n\t\t//To prevent empty fields from breaking the communication between this file and the scripts/checkInformation.js that is \n\t\t//used within the /parental_consent/scripts/ let's make the field separator a \",\" (comma) vs an empty field.\n\t\treturn $already_completed_parental_application.\",\".$housing_app_completed_in_system.\",\".$first_name.\",\".$last_name.\",\".$middle_name.\",\".$student_ID.\",\".$student_DATE_OF_BIRTH.\",\".$parental_email_address.\",\".$student_app_date.\",\";\n\t\t\n\t}",
"public function store()\n {\n $student = new student;\n\n $student->name = Input::get('name');\n $student->age = Input::get('age');\n $student->qualification = Input::get('qualification');\n\n if (DB::table('students')->where('name', '=', Input::get('name'))->first()) {\n return \"Already record found with the name \" . Input::get('name');\n } \n $student->save();\n return \"Record saved with the name of \" . Input::get('name');\n\n }",
"function getstudent($search)\n {\n $q = \"select * from student where studid like '%$search%' or fname like '%$search%' or midname like '%$search%' or lname like '%$search%' or college like '%$search%' or course like '%$search%' or year like '%$search%' or section like '%$search%' order by section,year,course,college,lname,midname,fname,studid\";\n $r = mysql_query($q);\n\n return $r;\n }",
"function verifystudent($studid,$classid){\n include('../../config.php'); \n $q = \"select * from studentsubject where studid=$studid and classid=$classid\";\n $r = mysql_query($q);\n if(mysql_num_rows($r) < 1){\n return true;\n }else{\n return false; \n }\n }",
"function verifyStudent($studentID){\r\n if(!empty($studentID)){\r\n\t\t // check X_PNSY_STUDENT table\r\n\t\t $query = \"select ID from `X_PNSY_STUDENT` where ID = '$studentID'\";\r\n\t\t $result = mysql_query($query);\t\t\r\n\t\t if (mysql_num_rows($result) == 0) return false;\r\n\r\n\t\t\r\n\t\t // check students table\r\n\t\t $query = \"select StudentID from `students` where StudentID = '$studentID'\";\r\n\t\t $result = mysql_query($query);\t\t\r\n\t\t if (mysql_num_rows($result) != 0) return true;\r\n\r\n\t\t\r\n\t\t // add student as a default entry\r\n\t\t $query = \"insert into students (StudentID) value ('$studentID')\";\r\n\t\t $result = mysql_query($query);\t\r\n\t\t return $result;\r\n }\r\n\r\n return false;\r\n\t}",
"function student_id()\n\t\t{\n\t\t$custom = $this->custom_parsed();\n\t\tif(isset($custom['student_id']))\n\t\t\t{\n\t\t\treturn $custom['student_id'];\n\t\t\t}\n\t\telseif(isset($custom['person_id']))\n\t\t\t{\n\t\t\t$p = new Person($custom['person_id']);\n\t\t\treturn Student::addperson($p);\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\t$info = $this->infoarray();\n\t\t\tif(isset($info['payer_email']))\n\t\t\t\t{\n\t\t\t\t$p = Person::get_by_email($info['payer_email']);\n\t\t\t\tif($p === false)\n\t\t\t\t\t{\n\t\t\t\t\t$name = $info['first_name'] . ' ' . $info['last_name'];\n\t\t\t\t\t$person_id = Person::add2($info['payer_email'], $name);\n\t\t\t\t\treturn Student::addperson(new Person($person_id));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\treturn false;\n\t\t}",
"function find_by_val($field,$value)\n {\n $arr1=[];\n $found=[];\n $seek = scan_students();\n foreach ($seek as $student => $id) {\n $dir = \"students/\".substr($id,0,2);\n $arr1 = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . $dir .\"/\". $id. \".json\"),true);\n if($arr1[$field] == $value) { $found = $arr1;}\n }\n if(!empty($found))\n echo print_r($found);\n else\n err(\"Student Not Found.\\00[0m This student doesn't exist.\");\n return $found;\n }",
"public function search_student(){\n\t\t$this->verify();\n\t\t$this->load->library('form_validation');\n\t\t$this->form_validation->set_rules('search', \"Search\", 'trim|required');\n\t\tif($this->form_validation->run()){\n\t\t\t$data['search_result']=$this->admin_model->search_student($this->input->post('search'));\n\t\t\t$this->load->view('students/searchResult', $data);\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tform_error('search');\n\t\t}\n\t}",
"public function checkIfTermRecordExistInSessionRecordTable($student_id, $subject, $class_id, $class_type, $class_arm_id, $session_id){\n\t\t\t$query = $this->connection()->prepare(\"SELECT * FROM student_session_record WHERE student_id='$student_id' AND clazz_id='$class_id' AND clazz_type_id='$class_type' AND class_arm_id='$class_arm_id' AND sessionz_id='$session_id' AND subject_id='$subject'\");\n\t\t\t$query->execute();\n\t\t\treturn $query->rowCount();\n\t\t}",
"public function aadharexist($smuid) {\n $is_exist = $this->commodel->isduplicate('student_master','sm_uid',$smuid);\n\t//print_r($is_exist);\n if ($is_exist)\n {\n\t\t$this->form_validation->set_message('aadharexist','Aadhar number' .\" \".$smuid. \" \".'is already exist check your aadhar number again.');\n return false;\n }\n else {\n return true;\n }\n }",
"public function logStudent($data){\n\t\t$department=$data['department'];\n\t\t$roll=$data['roll'];\n\n\t\tif ($department==\"\" or $roll==\"\") {\n\t\t\t$msg=\"<div class='alert alert-danger'><strong>Error !</strong>field must not be empty</div>\";\n\t\t\treturn $msg;\n\t\t}\n\n\t\t$sql=\"SELECT * FROM addstudents WHERE department=:department and roll=:roll\";\n\t\t$query=$this->db->pdo->prepare($sql);\n\t\t$query->bindValue(':department',$department);\n\t\t$query->bindValue(':roll',$roll);\n\t\t$query->execute();\n\t\t$row=$query->rowCount();\n\t\tif ($row<=0) {\n\t\t$msg=\"<div class='alert alert-danger'><strong>Error !</strong>department and roll not matched</div>\";\n\t\t\treturn $msg;\n\t\t}else{\n\t\t\theader(\"location: st_profile.php?department=$department&roll=$roll\");\n\t\t}\n\t\n\t}",
"function search_student(){\n\t\t\theader(\"Location:../view/search_student.php\");\n\t\t}",
"public function validateSchoolNameExistence($schoolName){\n $handle = $this->con->prepare(\"SELECT * FROM school WHERE schoolName = ?\");\n $handle->execute([$schoolName]); \n \n if($handle->rowCount()>0){\n return SCHOOL_NAME_AREADY_EXIST;\n }else{\n return SCHOOL_NAME_DOES_NOT_EXIT;\n }\n }",
"public function checkIfTermRecordExistInSessionFinalReportTable($student_id, $class_id, $class_type, $class_arm_id, $session_id){\n\t\t\t$query = $this->connection()->prepare(\"SELECT * FROM student_session_final_report WHERE student_id='$student_id' AND clazz_id='$class_id' AND clazz_type_id='$class_type' AND class_arm_id='$class_arm_id' AND sessionz_id='$session_id'\");\n\t\t\t$query->execute();\n\t\t\treturn $query->rowCount();\n\t\t}",
"public function studentIDExists($adm_id)\r\n\t\t{\r\n\t\t\t$q = $this->link->query(\"SELECT * FROM `students` WHERE `adm_id` = '{$adm_id}' LIMIT 1\");\r\n\r\n\t\t\tif ($q->num_rows > 0) {\r\n\t\t\t\treturn true;\r\n\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}",
"function sidsearch($sid){\r\n\t\tif ($this->db->get_where('user',array('member_id'=>$sid))->num_rows()==1){\r\n\t\t\t$uid = end($this->db->get_where('user',array('member_id'=>$sid))->result())->id;\r\n\t\t\t$user_info = $this->db->get_where('user_info',array('uid'=>$uid))->row_array();\r\n\t\t\t$user_info['appendix'] = unserialize($user_info['appendix']);\r\n\t\t\tif (isset($user_info['appendix']['ulib']['comp_id']) && is_numeric($user_info['appendix']['ulib']['comp_id'])){\r\n\t\t\t\t$registered = TRUE;\r\n\t\t\t}else{\r\n\t\t\t\t$registered = FALSE;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//generate output\r\n\t\t\t$output = array('en' => $user_info['enn'],\r\n\t\t\t\t\t\t\t'fn' => $user_info['cnfn'],\r\n\t\t\t\t\t\t\t'ln' => $user_info['cnln'],\r\n\t\t\t\t\t\t\t'msg' => 'Target located',\r\n\t\t\t\t\t\t\t'code' => 0,\r\n\t\t\t\t\t\t\t'regi' => $registered,\r\n\t\t\t\t\t\t\t'class' => $user_info['appendix']['class']\r\n\t\t\t);\r\n\t\t}\r\n\t\t//get unregistered user information\r\n\t\telseif ($this->db->get_where('user_veri',array('member_id'=>$sid))->num_rows()==1){\r\n\t\t\t//get app\r\n\t\t\t$user_info = $this->db->get_where('user_veri',array('member_id'=>$sid))->row_array();\r\n\t\t\t$user_info['appendix'] = unserialize($user_info['appendix']);\r\n\t\t\tif (isset($user_info['appendix']['ulib']['comp_id']) && is_numeric($user_info['appendix']['ulib']['comp_id'])){\r\n\t\t\t\t$registered = TRUE;\r\n\t\t\t}else{\r\n\t\t\t\t$registered = FALSE;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$output = array('en' => $user_info['enn'],\r\n\t\t\t\t\t\t\t'fn' => $user_info['cnfn'],\r\n\t\t\t\t\t\t\t'ln' => $user_info['cnln'],\r\n\t\t\t\t\t\t\t'msg' => 'Target located',\r\n\t\t\t\t\t\t\t'code' => 0,\r\n\t\t\t\t\t\t\t'regi' => $registered,\r\n\t\t\t\t\t\t\t'class' => $user_info['appendix']['class']\r\n\t\t\t);\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$output = array('msg' => \"Not yet matched\",\r\n\t\t\t\t\t\t\t'code' => 100\r\n\t\t\t);\r\n\t\t}\r\n\t\t\r\n\t\treturn $output;\r\n\t}",
"function StudentAlreadyUser($UPindentify,$conn){\r\n include 'login.php';\r\n $result = query(\"SELECT UP_Number FROM USER WHERE UP_Number = '$UPindentify';\", UP_Number, $conn);\r\n if ($UPindentify == $result) {\r\n popUp(\"Student ID has already been registered\");\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n}",
"function IfExists($natregno) {\r\n $conn = conn();\r\n $stmt = $conn->prepare(\"SELECT * FROM employee WHERE Natregno='$natregno';\");\r\n $stmt->execute();\r\n $result = $stmt->fetchAll();\r\n if (empty($result)) {\r\n return 1;\r\n }\r\n return 0;\r\n $conn = NULL;\r\n }",
"function show_student_id($data){\n\t$this->db->select('*');\n\t$this->db->from('students');\n\t$this->db->where('student_id', $data);\n\t$query = $this->db->get();\n\t$result = $query->result();\n\treturn $result;\n\t}",
"public function studentInfo(Request $request)\n {\n if($request->has('search')){\n $students = Student::where('student_id',$request->search)\n ->Orwhere('first_name',\"LIKE\",\"%\".$request->search.\"%\")\n ->Orwhere('last_name',\"LIKE\",\"%\".$request->search.\"%\")\n ->select(DB::raw('student_id,\n first_name,\n last_name,\n CONCAT(first_name,\" \",last_name) AS full_name,\n (CASE WHEN Sex=0 THEN \"M\" ELSE \"F\" END) AS Sex, dob'))\n ->paginate(10);\n\n }else\n {\n $students = Student::select(DB::raw('student_id,\n first_name,\n last_name,\n CONCAT(first_name,\" \",last_name) AS full_name,\n (CASE WHEN Sex=0 THEN \"M\" ELSE \"F\" END) AS Sex,\n dob'))\n ->paginate(10)\n ->appends('search',$request->search);\n }\n\n return view('student.studentList',compact('students'));\n }",
"public function studentList()\n {\n return output($this->UserDetails->where([\"roleId\"=>$this->getUserRoleId()])->read(),'success','SM001');\n }",
"public function show(student $student)\n {\n //\n }",
"public function material_exist($studyID)\n\t{\n\t $qryStudy= (array)$this->db->select('id')\n\t ->from('studymaterial')\n\t ->where('id',$studyID)\n\t ->get()->row();\n\n\t if(($qryStudy!=NULL) && ($qryStudy['id']==$studyID)){\n\t return TRUE;\n\t }else{\n\t return FALSE;\n\t }\n\t}",
"public function searchRegisteredStudent($data) {\n\n $this->db->select('*');\n\n $this->db->from('student stu');\n $this->db->where('stu.programOfferId', $data['programOfferId']);\n // $this->db->where('stu.programOfferId', $dataa['programOfferId']); \n\n\n $query = $this->db->get();\n $result = $query->result_array();\n if (!empty($result)) {\n return $result;\n }\n }",
"function FindStudents() {\n global $debug; global $COMMON; global $s_id;\n\n $sql = \"SELECT * FROM `students_basic_info` WHERE upper(`umbc_ID`) = '$s_id'\"; // uppercase so seach is case insensitive\n $rs = $COMMON->executeQuery($sql, $_SERVER[\"SCRIPT_NAME\"]);\n\n echo(\"<table class='table' border='1px'>\");\n echo(\"<tr><th>UMBC ID</th><th>First Name</th><th>Last Name</th><th>Preferred Name</th><th>Email</th><th>Major(s)</th><th>Appointment</th>\");\n while ( $row = mysql_fetch_assoc($rs) ) {\n echo(\"<tr>\\n\");\n echo(\"<td>\".$row['umbc_ID'].\"</td>\\n\");\n echo(\"<td>\".$row['fname'].\"</td>\\n\");\n echo(\"<td>\".$row['lname'].\"</td>\\n\");\n echo(\"<td>\".$row['pname'].\"</td>\\n\");\n echo (\"<td>\".$row['email'].\"</td>\\n\");\n echo \"<td>\\n\";\n if ($row['bio_ba'] == 1) { echo \"Biological Sciences BA<br/>\\n\"; }\n if ($row['bio_bs'] == 1) { echo \"Biological Sciences BS<br/>\\n\"; }\n if ($row['biochem_bs'] == 1) { echo \"Biochemistry & Molecular Biology BS<br/>\\n\"; }\n if ($row['bioinfo_bs'] == 1) { echo \"Bioinformatics & Computational Biology BS<br/>\\n\"; }\n if ($row['bioedu_ba'] == 1) { echo \"Biology Education BA<br/>\\n\"; }\n if ($row['chem_ba'] == 1) { echo \"Chemistry BA<br/>\\n\"; }\n if ($row['chem_bs'] == 1) { echo \"Chemistry BS<br/>\\n\"; }\n if ($row['chemedu_ba'] == 1) { echo \"Chemistry Education BA\"; }\n echo \"</td>\\n\";\n echo \"<td>\\n\";\n if ($row['appt_id'] != NULL) {\n echo \"<form class='form-fill' action='editMadeAppt.php' method='post' name='formEditMadeAppt'>\\n\";\n echo \"<input type='hidden' name='m_id' value='\".$row['appt_id'].\"'>\\n\";\n echo \"<input type='hidden' name='from_view' value='manageView'>\\n\";\n echo \"<input class='edit-button' type='submit' value='View'>\\n\";\n echo \"</form>\\n\";\n } else { // Not signed up\n echo \"<i>No Appointment</i>\";\n }\n echo \"</td>\\n\";\n echo(\"</tr>\\n\");\n }\n echo \"</table>\\n\";\n return $row;\n}",
"public function studentDetail($id) {\n \t$student = Student::find($id);\n \tif(!is_null($student)) {\n \t\treturn response()->json([\"status\" => $this->status, \"success\" => true, \"data\" => $student]);\n \t}\n \telse {\n \t\treturn response()->json([\"status\" => \"failed\", \"success\" => false, \"message\" => \"Whoops! no record found\"]);\n \t}\n\n }",
"public function isStudent($id){\n\t\treturn ($this->field('level',array('id'=>$id)) == 3);\n\t}",
"function isSkIDExists($SkID) {\n\t$db = connectDB();\n\t$sql = \"SELECT SkID FROM infoTable WHERE SkID = ?\";\n\t$stmt = $db->prepare($sql);\n\t$stmt->bind_param(\"i\",$SkID);\n\t$stmt->execute();\n\t$stmt->store_result();\n\t$num_rows = $stmt->num_rows;\n\t$stmt->close();\n\treturn $num_rows > 0;\n}",
"public function show($id) {\n\t\t$student = Student::find ( $id );\n\t\t\n\t\tif (! $student) {\n\t\t\treturn response ( array (\n\t\t\t\t\t'message' => 'Record not found.' \n\t\t\t), 404 );\n\t\t}\n\t\t\n\t\treturn response ( $student, 200 );\n\t}",
"public function display(){\r\n echo \"Unique Row Id: \" . $this->getUnique_studentKey() . \"<br/>\";\r\n echo \"User Id: \" . $this->getStudentUserID() . \"<br/>\";\r\n echo \"Password: \" . $this->getStudentPassword() . \"<br/>\";\r\n echo \"First Name: \" . $this->getFirstName() . \"<br/>\";\r\n echo \"Middle Name: \" . $this->getMiddleName() . \"<br/>\";\r\n echo \"Last Name: \" . $this->getLastName() . \"<br/>\";\r\n echo \"Email: \" . $this->getEmail() . \"<br/>\"; \r\n echo \"School Name: \" . $this->getSchoolName() . \"<br/>\"; \r\n echo \"Grade: \" . $this->getGrade() . \"<br/>\";\r\n echo \"Role: \" . $this->getRole() . \"<br/>\";\r\n }",
"public function studentsListing() {\n \t$students = Student::all();\n \tif(count($students) > 0) {\n \t\treturn response() -> json([\"status\" => $this->status, \"success\" => true, \"count\" => count($students), \"data\" => $students]);\n \t}\n \telse {\n \t\treturn response()->json([\"status\" => \"failed\", \"success\" => false, \"message\" => \"Whoops! no record found\"]);\n \t}\n }",
"function viewStudent( $sessionID, $studentID ) {\r\n\t\tif( $this->userCanViewStudent( $sessionID )){\r\n if(!empty($studentID)){\r\n\t\t\t $this->verifyStudent($studentID);\r\n\t\t\t $query=\"SELECT * FROM X_PNSY_STUDENT ss, students s WHERE ss.ID = '$studentID' AND ss.ID = s.StudentID\";\r\n\t\t\t $result = mysql_query($query);\r\n\t\t\t return mysql_fetch_assoc($result);\r\n }\r\n\t\t}\r\n\t}",
"function searchStudent($students, $student_lastname) {\n $position = -1;\n for($i=0; $i<sizeof($students); $i++) {\n if ($students[$i]['lastname'] === $student_lastname) {\n $position = $i;\n break; // étudiant trouvé, sortie de boucle\n }\n }\n return $position;\n}",
"function show_students(){\n\t$query = $this->db->get('students');\n\t$query_result = $query->result();\n\treturn $query_result;\n\t}",
"function userIsWatchingStudent( $sessionID, $studentID ) {\r\n\t\tif(empty($this->link)){\r\n\t\t\techo \"Not connected to database. Unexpected error. Contact your system administrator.\";\r\n\t\t\texit;\t\r\n\t\t}\r\n\t\t$user = $_SESSION['userid'];\r\n\t\t$query = \"SELECT studentid FROM studentwatch where userid='$user' and studentid='$studentID'\";\r\n\t\t$result = mysql_query($query);\r\n\t\treturn mysql_num_rows($result) > 0;\r\n\t}",
"public function checkCurrentStudent($data) {\n $this->db->where('studentId', $data['studentId']);\n $this->db->where('programOfferId', $data['programOfferId']);\n\n $qu = $this->db->get($this->_student);\n $result = $qu->row_array();\n if (!empty($result)) {\n return $result;\n }\n }",
"public function validateSchoolNameExistenceMapToId($schoolName,$id){\n $handle = $this->con->prepare(\"SELECT * FROM school WHERE schoolName = ? AND id != ?\");\n $handle->execute([$schoolName,$id]); \n \n if($handle->rowCount()>0){\n return SCHOOL_NAME_AREADY_EXIST;\n }else{\n return SCHOOL_NAME_DOES_NOT_EXIT;\n }\n }",
"public function selectSingleStudents($id){\n\n $query=\"SELECT * FROM old_students WHERE id='$id'\";\n $restlt=database::connect()->query($query);\n if($restlt->num_rows>0){\n\n return $restlt;\n\n }else{\n return false;\n }\n }",
"public function hasStudyName() {\n return $this->_has(9);\n }",
"public function getstudentById ($student_number){\n $sqlQuery = \" SELECT * \";\n $sqlQuery .= \" FROM students \";\n $sqlQuery .= \" WHERE student_number= $student_number \";\n $result = $this -> getDbManager () -> executeSelectQuery ( $sqlQuery );\n return ( $result );\n }",
"function student_get(){\n\t\t$id = $this->uri->segment(3); //ini keyword di postman nya unutk mengakses halamannya\n\t\t$user = array(\n\t\t\t1=>array('nama_depan'=>'Budi','nama_belakang'=>'Effendi'),\n\t\t\t2=>array('nama_depan'=>'Iwan','nama_belakang'=>'Mulya')\n\t\t);\n\n\t\tif (isset($user[$id])) {\n\t\t\t$this->response(array('status'=>'sukses','data'=>$user[$id]));\n\t\t}\n\t\telse{\n\t\t\t$this->response(array('status'=>'gagal','data'=>'User Tidak Ditemukan'),REST_Controller:: HTTP_NOT_FOUND);\n\t\t}\n\t}",
"public function showStudentProfile($stud_admission_id)\n\t{\n\t\t\t$student_query = \"SELECT * from edu_admission WHERE admission_id='$stud_admission_id' AND status = 'Active'\";\n\t\t $student_res = $this->db->query($student_query);\n\t\t\t$student_profile= $student_res->result();\n\n\t\t\t if($student_res->num_rows()==0){\n\t\t\t\t $response = array(\"status\" => \"error\", \"msg\" => \"student Not Found\");\n\t\t\t}else{\n\t\t\t\t$response = array(\"status\" => \"success\", \"msg\" => \"Student Profile\", \"studentProfile\"=>$student_profile);\n\t\t\t}\n\n\t\t\treturn $response;\n\t}",
"public function readStudent($Student){\n\n\n\t\t$Result = new Result();\t\n\t\t$Result = $this->_StudentDAO->readStudent($Student);\n\t\t\n\t\tif(!$Result->getIsSuccess())\n\t\t\t$Result->setResultObject(\"Database failure in StudentDAO.readStudent()\");\t\t\n\n\t\treturn $Result;\n\n\n\t}",
"public function is_student() {\n return $this->session->get(\"niveau_acces\") >= 0;\n }",
"function IfExists($natregno) {\r\n $conn = conn();\r\n $sql = \"SELECT * FROM users WHERE national_id='$natregno'\";\r\n $stmt = $conn->prepare($sql);\r\n $stmt->execute();\r\n $result = $stmt->fetchAll();\r\n if (!empty($result)) {\r\n return 1;\r\n }\r\n return 0;\r\n $conn = NULL;\r\n }",
"public function readStudentByUniversityID($Student){\n\n\n\t\t$Result = new Result();\t\n\t\t$Result = $this->_StudentDAO->readStudentByUniversityID($Student);\n\t\t\n\t\tif(!$Result->getIsSuccess())\n\t\t\t$Result->setResultObject(\"Database failure in StudentDAO.readStudentByUniversityID()\");\t\t\n\n\t\treturn $Result;\n\n\n\t}",
"public function show(Student $student)\n {\n //\n }",
"public function show(Student $student)\n {\n //\n }",
"public function show(Student $student)\n {\n //\n }",
"public function show(Student $student)\n {\n //\n }",
"public function show(Student $student)\n {\n //\n }",
"public function show(Student $student)\n {\n //\n }",
"public function show(Student $student)\n {\n //\n }",
"public function show(Student $student)\n {\n //\n }",
"public function show(Student $student)\n {\n //\n }",
"public function show(Student $student)\n {\n //\n }",
"public function show(Student $student)\n {\n //\n }",
"public function show(Student $student)\n {\n //\n }",
"public function show(Student $student)\n {\n //\n }",
"public function show(Student $student)\n {\n //\n }",
"function get_students_manage_table_data_rows($students, $controller) {\n $CI = & get_instance();\n $table_data_rows = '';\n\n foreach ($students->result() as $student) {\n $table_data_rows.=get_student_data_row($student, $controller);\n }\n\n if ($students->num_rows() == 0) {\n $table_data_rows.=\"<tr><td colspan='11'><span class='col-md-12 text-center text-warning' >\" . lang('students_no_student_to_display') . \"</span></tr>\";\n }\n\n return $table_data_rows;\n}",
"function student_info(){\n\tinclude 'db.php';\n\t$username = filter_var($_GET['val']);\n\n\t$sql = 'SELECT id ,name, phone, image , email FROM student WHERE id=' . $username . '' ;\n\t$result = mysqli_query($conn, $sql);\n\n\tif (mysqli_num_rows($result) > 0) {\n\t\t\tforeach($result as $row) {\n\t\t\t\techo \"<div id='main-header'>\";\n\t\t\t\techo \"<h3>student</h3>\";\n\t\t\t\techo \"<a class='button' href='Edit-student.php?val=\" . $row['id'] .\"'>Edit</a></div>\";\n\t\t\t\techo \"<div id='main-info'>\";\n\t\t\t\techo \"<div id='wrapp-img'>\";\n\t\t\t\techo '<img src=images/'. $row['image'] .' alt=\"' . $row['name'] . '\"/>';\n\t\t\t\techo \"</div>\";\n\t\t\t\techo \"<div id='content'>\";\n\t\t\t\techo \"<h2>\". $row['name'] . \"</h2>\";\n\t\t\t\techo \"<span>\" . $row['phone'] . \"</span>\";\n\t\t\t\techo \"<span>\" . $row['email'] . \"</span>\";\n\t\t\t\techo \"</div>\";\n\t\t\t\techo \"</div>\";\n\t\t\t\t }\n\t\t} else {\n\t\t\t\techo \"0 results\";\n\t\t\t}\n\t\t\t\t\n\n\t}",
"public function hasRecord();",
"function is_student_valid($student_id)\n\t{\n\t\t$this->db->where('student_id', $student_id);\n\n\t\t$query = $this->db->get($this->table_name);\n\t\treturn $query->num_rows() == 1;\n\t}",
"function checkForSchools($conn,$school_name)\n{\n $taken = false;\n\n //query string\n $query = \"select school_name from schools where school_name = '\";\n $query .= $school_name;\n $query .= \"';\";\n\n //get db result\n $result = pg_query($conn,$query) or die('Could not connect: ' . pg_last_error());\n dbErrorCheck($conn,$result);\n\n //get numer of rows\n $num = pg_num_rows($result);\n\n // if there is a row then the username and password pair exists\n if ($num == 1)\n {\n return true;\n }\n\telse\n\t{\n\t\treturn false;\n\t}\n\n\n}",
"public function checkIfsubjectExist($subject_name){\n\t\t\t$query = $this->connection()->prepare(\"SELECT name FROM subject WHERE name='$subject_name'\");\n\t\t\t$query->execute();\n\t\t\treturn $query->rowCount();\n\t\t}",
"function findInstructor($unformattedName){\r\n\r\n if(empty($unformattedName)) return false;\r\n\r\n // remove commas, periods, and such\r\n $toRemove = array(\".\",\",\");\r\n $name = str_replace($toRemove, \"\", $unformattedName);\r\n\r\n // split name into words\r\n $name = explode(' ',$name);\r\n \r\n // remove titles\r\n $titles = array(\"Dr\",\"dr\",\"Prof\",\"prof\",\"\");\r\n $name = array_diff($name,$titles);\r\n\r\n // reset indices\r\n $name = array_values($name);\r\n\r\n // with any luck, our array only contains the first and last names, and maybe middle\r\n $subQuery = \"SELECT DISTINCT `ID`, `FIRST_NAME`, `MIDDLE_NAME`, `LAST_NAME`, `WOOSTER_EMAIL` FROM `X_PNSY_FACULTY` WHERE \";\r\n\r\n if(count($name) < 2) return false;\r\n if(count($name) > 1){\r\n // FIRST LAST\r\n $query1 = \"\".$subQuery.\"`FIRST_NAME`='\".$name[0].\"' AND `LAST_NAME`='\".$name[1].\"'\";\r\n\r\n // LAST FIRST\r\n $query2 = $subQuery.\"`FIRST_NAME`='\".$name[1].\"' AND `LAST_NAME`='\".$name[0].\"'\";\r\n }\r\n if(count($name) > 2){\r\n // FIRST MIDDLE LAST\r\n $query3 = $subQuery.\"`FIRST_NAME`='\".$name[0].\"' AND `MIDDLE_NAME`='\".$name[1].\"' AND `LAST_NAME`='\".$name[2].\"'\";\r\n\r\n // LAST FIRST MIDDLE\r\n $query4 = $subQuery.\"`FIRST_NAME`='\".$name[1].\"' AND `MIDDLE_NAME`='\".$name[2].\"' AND `LAST_NAME`='\".$name[0].\"'\";\r\n }\r\n\r\n // make queries\r\n $result = mysql_query($query1);\r\n if($info = mysql_fetch_assoc($result)) return $info;\r\n $result = mysql_query($query2);\r\n if($info = mysql_fetch_assoc($result)) return $info;\r\n if(!empty($query3)){\r\n $result = mysql_query($query3);\r\n if($info = mysql_fetch_assoc($result)) return $info;\r\n }\r\n if(!empty($query4)){\r\n $result = mysql_query($query4);\r\n if($info = mysql_fetch_assoc($result)) return $info;\r\n }\r\n\r\n // return false if nothing works\r\n return false; \r\n }",
"public function studentNameExists($fname, $mname, $lname)\r\n\t\t{\r\n\t\t\t$q = $this->link->query(\"SELECT * FROM `students` WHERE (`fname` = '{$fname}' AND `mname` = '$mname' AND `lname` = '{$lname}') LIMIT 1\");\r\n\r\n\t\t\tif ($q->num_rows > 0) {\r\n\t\t\t\treturn true;\r\n\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}",
"private function alreadyExists($nickname, $mail){\r\n\t\t$command = \"SELECT * FROM Student\r\n\t\tWHERE nickname = '$nickname' OR mail = '$mail'\";\r\n\t\t$db = new Database();\r\n\t\t$result = $db->runCommand($command);\r\n\r\n\t\tif($result == TRUE && $result->num_rows == 1){\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t}",
"public function checkcompleted($idstud,$idsubject){\r\n\t\t$table = \"tbl_studentregsubjects\";\r\n\t\t\r\n\t\t$db = Zend_Db_Table::getDefaultAdapter();\r\n\t\t$select = $db->select()\r\n\t\t\t\t->from(array(\"a\"=>$table))\r\n\t\t\t\t->where(\"a.exam_status = 'C'\") //kena check balik apa yati letak utk complete status\r\n\t\t\t\t->where(\"a.grade_status = 'Pass'\") //kena check balik apa yati letak utk status pass\r\n\t\t\t\t->where('a.IdStudentRegistration = ?',$idstud)\r\n\t\t\t\t->where('IdSubject = ?',$idsubject);\r\n\t\t$result = $db->fetchRow($select); \r\n\r\n\t\t/*if(is_array($result)){\r\n\t\t\treturn $result[\"grade_name\"];\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}*/\r\n\t\t\r\n\t\tif($result){\r\n\t\t\treturn $result['grade_name'];\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"function getStudentByMajorValidate(){\n\t\t\n\t\tif(@$this->major == \"\" | @$this->institution == \"\"){\n\t\t\t$respArray = $this->makeResponse(\"ERROR\", \"Both the major and institution are required!\", \"\");\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->getStudentByMajor( $this->sanitize($this->major), $this->sanitize($this->institution) );\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public function findStudent()\n {\n //$search = '%'.$search.'%';\n $dql = \"SELECT ae FROM ABCIsystemBundle:AbcMembers ae WHERE ae.idCard like'__02%' and ae.status='active'\";\t\n $repositorio = $this->getEntityManager()->createQuery($dql);\n return $repositorio->getResult();\t\n }",
"public function getStudentInformationDetailList($student_id){\n\t\t\t\n\t\t\t\t\t$sql=\"SELECT student.student_id,\n\t\t\t\t\t\t\t\tstudent.student_name,\n\t\t\t\t\t\t\t\tstudent.student_rollNo,\n\t\t\t\t\t\t\t\tsitexam_detail.total_mark,\n\t\t\t\t\t\t\t\tsitexam_detail.exam_status\n\t\t\t\t\t\tFROM sitexam_detail,student\n\t\t\t\t\t\tWHERE \tstudent.student_id=sitexam_detail.student_student_id AND\n\t\t\t\t\t\t\t\tstudent.student_id=:student_id \";\n\t\t\t\t\t\n\t\t\t\t\t$this->openDB();\n\t\t\t\t\t$this->prepareQuery($sql);\n\t\t\t\t\t$this->bindQueryParam(':student_id', $student_id);\n\t\t\t\t\t$result=$this->executeQuery();\n\t\t\t\t\treturn $result;\n\t\t\t\t}",
"public function getStudentInfo() {\n try {\n $this->dbh->query('SELECT * FROM student_info');\n $students = $this->dbh->resultSet();\n return $students;\n } catch(PDOException $e) {\n $this->response = [\n \"status\"=> \"error\",\n \"message\" => \"Unable to fetch all student details. Please contact the admin\"\n ];\n return $this->response;\n }\n\n }",
"private function check_for_username($username)\r\n\t{\r\n\t\tglobal $dbCon;\r\n\r\n\t\t$sql = \"SELECT COUNT(id) AS students FROM student WHERE username = ?;\";\r\n\t\t$stmt = $dbCon->prepare($sql); //Prepare Statement\r\n\t\tif ($stmt === false)\r\n\t\t{\r\n\t\t\ttrigger_error('SQL Error: ' . $dbCon->error, E_USER_ERROR);\r\n\t\t}\r\n\t\t$stmt->bind_param('s', $username);\r\n\t\t$stmt->execute(); //Execute\r\n\t\t$stmt->bind_result($members); //Get ResultSet\r\n\t\t$stmt->fetch();\r\n\t\t$stmt->close();\r\n\r\n\t\tif ($members > 0)\r\n\t\t{\r\n\t\t\treturn \"Username is already in system. Try something else!\";\r\n\t\t}\r\n\t\treturn TRUE;\r\n\t}",
"function Is_Valid(){\n\t\t$query = $this->db->get_where('students',array('user_id'=>$this->user_id));\n\t\tif($query->num_rows() == 1){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public function searchCurrentStudent($data) {\n\n $this->db->select('stu.*,stu_info.*,prg.*');\n $this->db->from('student stu');\n $this->db->join('programoffer prg', 'prg.programOfferId=stu.programOfferId');\n $this->db->join('studentinfo stu_info', 'stu_info.applicationId=stu.applicationId');\n $this->db->where('stu.programOfferId', $data['programOfferId']);\n $query = $this->db->get();\n $result = $query->result_array();\n if (!empty($result)) {\n return $result;\n }\n }",
"function getStudentBySchoolValidate(){\n\t\t\n\t\tif(@$this->school == \"\" | @$this->institution == \"\"){\n\t\t\t$respArray = $this->makeResponse(\"ERROR\", \"Both the school and institution are required!\", \"\");\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->getStudentBySchool( $this->sanitize($this->school), $this->sanitize($this->institution) );\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public function studentNumberSelect($student_id){\n\t \ttry {\n\n\t \t\t$stmt = $this->con->prepare(\"select * from sixtoeightmarksheet where student_id = :student_id and status = 1 \");\n\t \t\t$stmt->bindValue(':student_id', $student_id, PDO::PARAM_STR);\n\t \t\t$stmt->execute();\n\n\t \t\tif($stmt->rowCount() > 0){\n\t \t\t\treturn $stmt->fetch(PDO::FETCH_ASSOC);\n\t \t\t}\n\t \t\telse{\n\t \t\t\t$_SESSION['delete'] = \"Student ID does not match !!! Please try another ID to see Marksheet \";\n\t \t\t\t//header('location=meritmarksheet.php');\n\t \t\t\techo \"<script>window.location='view/admin/marksheet/meritmarksheet.php'</script>\";\n\t \t\t}\n\t \t\t\n\t \t} catch (PDOException $e) {\n\t \t\techo \"Error: \".$e->getMessage().\"<br />\";\n\t \t\tdie();\n\n\t \t}\n\t }",
"public function findstudentsByString ( $str ){\n $sqlQuery = \" SELECT * \";\n $sqlQuery .= \" FROM students \";\n $sqlQuery .= \" WHERE id_nationality LIKE % $str %\";\n $result = $this -> getDbManager () -> executeSelectQuery ( $sqlQuery );\n return ( $result );\n }",
"public function hasRecord() {}",
"function get_student_info_by_id($student_id) {\n return $this->db->get_where('student', array('student_id' => $student_id))->row_array();\n }",
"public function show(Students $student)\n\t{\n\t\t$title = array(\n\t\t\t'active' => self::active,\n\t\t\t'title' => self::title,\n\t\t\t'slug' => self::slug\n\t\t);\n\t\t\n\t\t$parentRel = Parent_relations::whereStudentId($student->id)->get();\n\t\t\n\t\t$company = Company::whereId($student->companies_id)->select('expected_attendance')->first();\n\t\t\n\t\t$highTemp = $this->heighTemp($student->id); \n\t\t$present = $this->present($student->id); \n\t\t$absent = $this->absent($student->id); \n\t\t\n\n\t\tif($company->expected_attendance>0){\n\t\t\t\tif($present == 0) {\n\t\t\t\t\t$percentage=0;\n\t\t\t\t}else{\n\t\t\t\tif($absent == 0){\n\t\t\t\t\t\t$percentage = 100;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$answer = ($absent / $present ) * 100;\n\t\t\t\t\t\t$percentage = 100-$answer;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$percentage = 0;\n\t\t\t}\n\t\t\n\t\t\n\t\t$student->age = date_diff(date_create($student->dob), date_create('today'))->y;\n\t\treturn view('admin.students.show', compact('title', 'student','parentRel','company','highTemp','present','absent','percentage'));\n\t}",
"function if_checked_script($student_id, $exam_id)\r\n{\r\n include \"connect.inc.php\";\r\n\r\n\r\n $query = \"SELECT * FROM `written_answers_marks` WHERE `Student_id`='$student_id'AND `exam_id`='$exam_id'\";\r\n\r\n if ($query_run = mysqli_query($con, $query)) {\r\n\r\n if (mysqli_num_rows($query_run) > 0) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n } else {\r\n echo \"The query couldn't execute\";\r\n }\r\n}",
"public function checkCityNameExistAction() \r\n {\r\n $this->_helper->layout()->disableLayout();\r\n $cityModel = new Application_Model_City();\r\n $cityName = $this->_request->getParam('cityName');\r\n $where = 'name like '. \"'$cityName'\";\r\n $results = $cityModel->fetchRow( $where); \r\n if (count($results)) {\r\n echo 1;\r\n } else {\r\n echo 0;\r\n }\r\n die;\r\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 doShowWithoutQuery()\n {\n /* The function above sets $this->rs to values that shall be displayed. By assigning $this->rs to Smarty\n variable 'student' we can fill the values of $this->rs into a template. */\n $this->_smarty->assign('student', $this->rs);\n\n /* Get the lecture id from session. It may be under some circumstances empty. */\n $lectureId = SessionDataBean::getLectureId();\n if (empty ($lectureId))\n {\n /* Lecture not initialised. */\n $this->action = \"e_nolecture\";\n return;\n }\n\n /* Verify that the student is listed as studying the actual lecture. */\n $slb = new StudentLectureBean (0, $this->_smarty, NULL, NULL);\n $isListed = $slb->studentIsListed($this->id, $lectureId, $this->schoolyear);\n\n if (!$isListed)\n {\n /* Not studying this lecture. */\n $this->action = \"e_notstudent\";\n return;\n }\n\n /* Check for possible student group mode. */\n if (SessionDataBean::getLectureGroupType() != StudentGroupBean::GRPTYPE_NONE)\n {\n $grpb = new StudentGroupBean(null, $this->_smarty, null, null);\n $data = $grpb->assignGroupAndGroupStudentsOfStudent($this->id);\n /* If the student is not member of any student group, the content of `$data` are two empty lists.\n In that case, fetch the list of free student groups (but only in case that the student is not\n a member, as an attempt to fetch a list when all group places are already taken -- which could\n happen if the student is already a member -- results in an exception). */\n if (empty($data[0]))\n {\n $grpb->assignFreeGroupsList();\n }\n }\n\n /* Check the replacement exercises. */\n if (SessionDataBean::getLectureReplacements())\n {\n $termLimits = SchoolYearBean::getTermLimits($this->schoolyear, SessionDataBean::getLectureTerm());\n /* This lecture has replacement exercises activated, we will\n display everything related to the current student. */\n $repBookingBean = new ExerciseRepBookingBean ($lectureId, $this->_smarty, NULL, NULL);\n $bookings = $repBookingBean->getBookedReplacements($termLimits);\n $this->_smarty->assign('bookings', $bookings);\n /* Reset the pre-selected labtask group. */\n $repBookingBean->sessionPopLgrpId();\n }\n\n /* Create a SubtaskBean instance that will be used to fetch\n a list of tasks that shall be displayed. */\n $subtaskBean = new SubtaskBean (0, $this->_smarty, \"x\", \"x\");\n /* Get individual and other assignments that shall be\n displayed in an extra table. */\n $stsubtaskList = $subtaskBean->getStudentSubtaskList($lectureId, $this->id);\n $this->dumpVar('stsubtaskListA', $stsubtaskList);\n\n /* Fetch the evaluation scheme from the database.\n @TODO@ Allow for more than one scheme.\n @TODO@ Allow for more than one lecture !!!!! */\n $evaluationBean = new EvaluationBean ($lectureId, $this->_smarty, NULL, NULL);\n\n /* This will initialise EvaluationBean with the most recent evaluation\n scheme for lecture given by $this->lecture_id. The function returns\n 'true' if the bean has been initialised. */\n $ret = $evaluationBean->initialiseFor($lectureId, $this->schoolyear);\n\n /* Check the initialisation status. */\n if (!$ret)\n {\n /* Nope, the evaluation of this lecture has not been initialised\n yet. */\n //$this->action = \"e_noeval\";\n return;\n }\n\n /* Get the list of tasks for evaluation of this exercise. The list will contain\n only task IDs and we will have to fetch task and subtask information\n by ourselves later. */\n $taskList = $evaluationBean->getTaskList();\n\n /* Fetch a verbose list of tasks. */\n $taskBean = new TaskBean (0, $this->_smarty, NULL, NULL);\n\n /* This will both create a full list of tasks corresponding to the\n evaluation scheme and assing this list to the Smarty variable\n 'taskList'. */\n $fullTaskList = $taskBean->assignFullTaskList($taskList);\n\n /* This will both create a full list of subtasks corresponding to the\n tasks of the chosen evaluation scheme and assign this list to the\n Smarty variable 'subtaskList'. */\n $tsb = new TaskSubtasksBean (0, $this->_smarty, NULL, NULL);\n $subtaskMap = $tsb->getSubtaskMapForTaskList($taskList, $this->schoolyear);\n $subtaskList = TaskSubtasksBean::getSubtaskListFromSubtaskMap($subtaskMap);\n\n $fullSubtaskList = $subtaskBean->assignFullSubtaskList($subtaskList);\n\n /* Create a PointsBean instance that will be used to fetch\n points for subtasks from subtask list. */\n $pointsBean = new PointsBean (0, $this->_smarty, NULL, NULL);\n\n /* Get points of all students. */\n $points = $pointsBean->getPoints(\n array($this->id),\n $subtaskList,\n $this->schoolyear // this is probably not correct: SchoolYearBean::getSchoolYearStart()\n );\n $this->dumpVar('student points', $points);\n\n /* This will pass all the information about points and subtasks to\n Smarty template variables. */\n $this->assignStudentDataFromList(\n array($this->id),\n $points,\n $evaluationBean,\n $subtaskMap,\n $fullSubtaskList,\n $fullTaskList,\n SB_STUDENT_ANY,\n SB_SORT_BY_NAME,\n $lectureId\n );\n\n /* Get points for this student. */\n $stsubtaskList = $pointsBean->addPointsToSubtaskList(\n $this->id,\n $subtaskList,\n $stsubtaskList);\n\n /* Verify which assignments have been accomplished by the student. */\n $asgnBean = new AssignmentsBean (0, $this->_smarty, NULL, NULL);\n $stsubtaskList = $asgnBean->setClassifiedAssignments($this->id, $stsubtaskList);\n\n /* And publish the contents of $subtaskList */\n $this->_smarty->assign('studentSubtaskList', $stsubtaskList);\n }",
"function userCanGetStudentInterims( $studentID ) {\r\n\t\treturn $this->userCanViewStudent('');\r\n\t}",
"function get_mcq_marks($student_id,$exam_id){\r\n include 'connect.inc.php';\r\n $query = \"SELECT `marks` FROM `mcq_marks` WHERE `student_id`='$student_id' AND`exam_id`='$exam_id'\";\r\n if ($query_run = mysqli_query($con, $query)) {\r\n if ($row = mysqli_fetch_row($query_run)) {\r\n return $row[0];\r\n } else {\r\n\r\n }\r\n } else {\r\n echo \"Nice try dude,But you won't get any result\";\r\n }\r\n}",
"function show_student_id($data){\n$this->db->select('*');\n$this->db->from('students');\n$this->db->where('student_id', $data);\n$query = $this->db->get();\n$result = $query->result();\nreturn $result;\n}",
"public function get_logged_in_student_details() {\n\t\t$user_id = $this->session->userdata('user_id');\n\t\t$student_data = $this->db->get_where('students', array('user_id' => $user_id))->row_array();\n\t\t$student_details = $this->get_student_details_by_id('student', $student_data['id']);\n\t\treturn $student_details;\n\t}",
"function participation_in_mcq_exam($exam_id){\r\n include \"connect.inc.php\";\r\n\r\n $student_id = student_get_field('Student_id');\r\n $query = \"SELECT * FROM `mcq_marks` WHERE `Student_id`='$student_id'AND `exam_id`='$exam_id'\";\r\n\r\n if ($query_run = mysqli_query($con, $query)) {\r\n\r\n if (mysqli_num_rows($query_run) > 0) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n } else {\r\n echo \"The query couldn't execute\";\r\n }\r\n\r\n}",
"public function show($id = null)\n {\n \n\t\t$model = new StudentModel();\n\t\t\n\t\t$data = $model->where('id', $id)->first();\n\t \n\t\tif($data){\n\t\t\treturn $this->respond($data);\n\t\t}else{\n\t\t\treturn $this->failNotFound('No Data found');\n\t\t}\n\t}",
"function student_list() {\n $query = db_select('student', 'st');\n $query\n ->fields('st', array('st_id', 'st_fnm', 'st_lnm', 'st_email'))\n ->range(0, 50)\n ->orderby('st.st_id');\n $results = $query\n ->execute();\n $header = array(t('ID'),\n t('First Name'),\n t('Last Name'),\n t('E-mail'),\n t('Delete'),\n t('Edit'),\n );\n $rows = array(); /*values pulling database*/\n foreach ($results as $result) {\n $rows[] = array(\n check_plain($result->st_id),\n check_plain($result->st_fnm),\n check_plain($result->st_lnm),\n check_plain($result->st_email),\n l(t('Delete'), 'formlist/' . $result->st_id . '/delete'),\n l(t('Edit'), 'formlist/' . $result->st_id . '/edit'),\n );\n }\n return theme('table', array('header' => $header, 'rows' => $rows));\n}",
"private function get_student_id($param = '')\r\n\t{\r\n\t\treturn $this->db->get_where('students', array('npm' => $param))->row('student_id');\r\n\t}",
"private function _exists($uid){\n $select = $this->select()\n ->from($this->_name,array('uid'))\n ->where('uid = ?', $uid);\n $row = $this->fetchRow($select);\n\t\t\n // Zend_Debug::dump($select->__toString());\n if($row){\n return true;\n }\n return false;\n \n }",
"public function show(Request $request, Student $student)\n {\n // $student = Student::where('NoControl', $NoControl )->firstOrFail();\n return view('students.show', compact('student'));\n }",
"public function hallticketnoexist($smuid) {\n $is_exist = $this->commodel->isduplicate('student_admission_cancel','sac_hallticketno',$smuid);\n\t//print_r($is_exist);\n if ($is_exist)\n {\n\t\t$this->form_validation->set_message('hallticketnoexist','This Hall Ticket Number' .\" \".$smuid. \" \".'Student Admission Is Cancelled.');\n return false;\n }\n else {\n return true;\n }\n }"
] | [
"0.6216964",
"0.62045556",
"0.6144942",
"0.6064677",
"0.5920059",
"0.590486",
"0.5877793",
"0.5803156",
"0.569305",
"0.5676236",
"0.56665653",
"0.5662382",
"0.5643325",
"0.5638065",
"0.5577599",
"0.55540854",
"0.5552079",
"0.55405957",
"0.5539774",
"0.5531627",
"0.5506155",
"0.5496354",
"0.5481558",
"0.5467736",
"0.5460855",
"0.54491585",
"0.54477423",
"0.5441904",
"0.5431415",
"0.54026806",
"0.53864396",
"0.5367978",
"0.53665316",
"0.53630334",
"0.5360858",
"0.5356027",
"0.5353745",
"0.5353692",
"0.53516525",
"0.53477925",
"0.5329609",
"0.5315478",
"0.5314474",
"0.5296957",
"0.52948403",
"0.5293001",
"0.5284609",
"0.5270019",
"0.5267336",
"0.5267336",
"0.5267336",
"0.5267336",
"0.5267336",
"0.5267336",
"0.5267336",
"0.5267336",
"0.5267336",
"0.5267336",
"0.5267336",
"0.5267336",
"0.5267336",
"0.5267336",
"0.5266565",
"0.52627254",
"0.526259",
"0.5261436",
"0.5251261",
"0.5250138",
"0.52487844",
"0.5245948",
"0.52417195",
"0.5237546",
"0.5232294",
"0.5231107",
"0.52292264",
"0.521711",
"0.52161586",
"0.5203247",
"0.51926947",
"0.5192358",
"0.5191966",
"0.5188217",
"0.5169209",
"0.5164974",
"0.5158611",
"0.51574194",
"0.5154857",
"0.5154406",
"0.5149103",
"0.51476127",
"0.51401836",
"0.51382846",
"0.5117802",
"0.5114404",
"0.5113683",
"0.51069623",
"0.50984424",
"0.509683",
"0.5096583",
"0.5087703"
] | 0.5726374 | 8 |
Scan & store all students that exist in all the records. Basically get all student ids(filenames) in each folder. | function find_by_val($field,$value)
{
$arr1=[];
$found=[];
$seek = scan_students();
foreach ($seek as $student => $id) {
$dir = "students/".substr($id,0,2);
$arr1 = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . $dir ."/". $id. ".json"),true);
if($arr1[$field] == $value) { $found = $arr1;}
}
if(!empty($found))
echo print_r($found);
else
err("Student Not Found.\00[0m This student doesn't exist.");
return $found;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function scan_students()\n {\n $current_students = [];\n $di = new RecursiveDirectoryIterator('students/');\n foreach (new RecursiveIteratorIterator($di) as $filename => $file) {\n $path_info = pathinfo($filename);\n if($path_info['extension']=='json'){\n array_push($current_students,$path_info['filename']);\n }\n }\n // echo print_r($current_students);\n return $current_students;\n }",
"private function scanFolder()\n {\n return scandir($this->currentPath);\n }",
"function scan_files( ){\n\n // List of all the audio files found in the directory and sub-directories\n $audioFileArray = array();\n\n // List of filenames already handled during the scan. To detect dupe filenames.\n $alreadyhandledFileArray = array();\n\n // Make list of all files in db to remove non existent files\n $DBaudioFileArray = array();\n foreach ( $this->get_list_of_files()->fetchAll() as $row ) {\n $DBaudioFileArray[] = $row['filename'];\n }\n\n // Prepare variables for file urls\n //$base_dir = dirname(dirname(realpath($this->filedirectorypath))); // Absolute path to your installation, ex: /var/www/mywebsite\n $doc_root = preg_replace(\"!{$_SERVER['SCRIPT_NAME']}$!\", '', $_SERVER['SCRIPT_FILENAME']); # ex: /var/www\n $protocol = empty($_SERVER['HTTPS']) ? 'http' : 'https';\n $port = $_SERVER['SERVER_PORT'];\n $disp_port = ($protocol == 'http' && $port == 80 || $protocol == 'https' && $port == 443) ? '' : \":$port\";\n $domain = $_SERVER['SERVER_NAME'];\n // variables for file urls\n\n // Create recursive dir iterator which skips dot folders\n $dir = new RecursiveDirectoryIterator( $this->filedirectorypath , FilesystemIterator::SKIP_DOTS);\n\n // Flatten the recursive iterator, consider only files, no directories\n $it = new RecursiveIteratorIterator($dir);\n\n // Find all the mp3 files\n foreach ($it as $fileinfo) {\n if ($fileinfo->isFile() && !strcmp($fileinfo->getExtension(), \"mp3\")) {\n $audioFileArray[] = $fileinfo;\n\n //Warning: files with same md5key in different folders will not be inserted into the db.\n //print md5_file($fileinfo) . \"<br />\\n\";\n }\n }\n\n foreach ($audioFileArray as $key => $fileinfo) {\n\n $filename = $fileinfo->getFilename();\n\n //For each file found on disk remove entry from list from DB\n // if any left at the end, they are files that no longer are present on the drive.\n //print \"unsetting: \" . $filename . \"<br>\";\n unset($DBaudioFileArray[array_search($filename,$DBaudioFileArray,true)]);\n\n // check file not in db\n if( !$this->is_file_in_db( $filename ) ) {\n\n //decode filename date if named according to our naming scheme\n $date = $this->decode_filename($filename);\n\n // Build file url based on server path\n $filepath = realpath($fileinfo->getRealPath());\n $base_url = preg_replace(\"!^{$doc_root}!\", '', $filepath); # ex: '' or '/mywebsite'\n $full_url = \"$protocol://{$domain}{$disp_port}{$base_url}\"; # Ex: 'http://example.com', 'https://example.com/mywebsite', etc.\n\n //print $filename . \" - \" . $full_url . \"<br />\\n\";\n\n //insert audiofile in db for first time\n $this->insert_new_file_into_db( $filename, $full_url, $fileinfo->getRealPath(), $fileinfo->getSize(), $date );\n\n $alreadyhandledFileArray[$key] = $filename;\n\n } else {\n // if file in alreadyhandled array, then duplicate named files have been found\n // how to check for duplicate file names?\n // if we're here then the name has already ben added to the db (but maybe during a previous run)\n //we still need to look for the file in the alreadyhandledFileArray\n if( in_array($filename, $alreadyhandledFileArray) ){\n // flag file\n $this->flag_file($filename, \"Il y a 2 ou plusieurs fichiers audio avec le même nom dans le dossier audio du serveur ftp. Veuillez changer les noms ou supprimer les doublons.\");\n }\n }\n\n\n }\n\n // If there are files from the database that weren't found in the audio folder,\n // flag them and add a comment stating that the file can no longer be found.\n if( count($DBaudioFileArray) ){\n //print_r($DBaudioFileArray);\n foreach($DBaudioFileArray as $key => $fn){\n $this->flag_file($fn, \"Le fichier en question n'est plus présent dans le dossier audio du serveur ftp. Il faut le supprimer de la base de données.\");\n $this->set_file_not_new($fn);\n }\n }\n\n return true;\n }",
"public function get_students($ids)\n\t\t{\n\t\t\t$students=array();\n\t\t\tforeach ($ids as $row){\n\t\t\t\n\t\t\t\t$students[]=$this->create_student($this->conn->get($row));\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn $students;\n\t\t}",
"public function get_student_list_of_logged_in_parent() {\n\t\t$parent_id = $this->session->userdata('user_id');\n\t\t$parent_data = $this->db->get_where('parents', array('user_id' => $parent_id))->row_array();\n\t\t$checker = array(\n\t\t\t'parent_id' => $parent_data['id'],\n\t\t\t'session' => $this->active_session,\n\t\t\t'school_id' => $this->school_id\n\t\t);\n\t\t$students = $this->db->get_where('students', $checker)->result_array();\n\t\tforeach ($students as $key => $student) {\n\t\t\t$checker = array(\n\t\t\t\t'student_id' => $student['id'],\n\t\t\t\t'session' => $this->active_session,\n\t\t\t\t'school_id' => $this->school_id\n\t\t\t);\n\t\t\t$enrol_data = $this->db->get_where('enrols', $checker)->row_array();\n\n\t\t\t$user_details = $this->db->get_where('users', array('id' => $student['user_id']))->row_array();\n\t\t\t$students[$key]['student_id'] = $student['id'];\n\t\t\t$students[$key]['name'] = $user_details['name'];\n\t\t\t$students[$key]['email'] = $user_details['email'];\n\t\t\t$students[$key]['role'] = $user_details['role'];\n\t\t\t$students[$key]['address'] = $user_details['address'];\n\t\t\t$students[$key]['phone'] = $user_details['phone'];\n\t\t\t$students[$key]['birthday'] = $user_details['birthday'];\n\t\t\t$students[$key]['gender'] = $user_details['gender'];\n\t\t\t$students[$key]['blood_group'] = $user_details['blood_group'];\n\t\t\t$students[$key]['class_id'] = $enrol_data['class_id'];\n\t\t\t$students[$key]['section_id'] = $enrol_data['section_id'];\n\n\t\t\t$class_details = $this->crud_model->get_class_details_by_id($enrol_data['class_id'])->row_array();\n\t\t\t$section_details = $this->crud_model->get_section_details_by_id('section', $enrol_data['section_id'])->row_array();\n\n\t\t\t$students[$key]['class_name'] = $class_details['name'];\n\t\t\t$students[$key]['section_name'] = $section_details['name'];\n\t\t}\n\t\treturn $students;\n\t}",
"public function loadStudents(){\n $data=$this->studentsInRiskForThis();\n $cantidad=count($data);\n $contador=0;\n foreach($data as $fila){\n IF(Talleresdet::firstOrCreateStatic([\n 'talleres_id'=>$this->id,\n 'codalu'=>$fila['codalu'],\n ], Talleresdet::SCENARIO_BATCH ))\n $contador++; \n }\n return ['total'=>$cantidad,'contador'=>$contador];\n }",
"function list_fileid($sid)\r\n {\r\n $this->db->select(\"file_id\");\r\n $this->db->where(\"sid\",$sid);\r\n\t\t$result=$this->db->get(\"data_files\")->result_array();\r\n\t\t\r\n\t\t$output=array();\r\n\t\tforeach($result as $row){\r\n\t\t\t$output[]=$row['file_id'];\r\n\t\t}\r\n\r\n\t\treturn $output;\r\n\t}",
"function get_files($instructor=False, $sources=array('class', 'lab', 'project', 'exam', 'review', 'capstone', 'continued-lab'), $file_path = '.', $access=array(), $virtual=array(), $categories=array(), $secret='really') {\n $results = array();\n $basedir = scandir($file_path);\n foreach ($sources as $i => $l0) {\n if (in_array($l0, $basedir) && is_dir($file_path . '/' . $l0)) {\n $level1 = scandir($file_path . '/' . $l0);\n sort($level1);\n foreach ($level1 as $i => $l1) {\n if (substr($l1, 0, 1) != '.' && is_dir($file_path . '/' . $l0 . '/' . $l1)) {\n // The following code allows the system recursively look through the Directory\n // structure within a class, and the system can now process RELATIVE links\n // that go into those subordinate directories\n $level2 = array();\n try {\n $Iterator = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($file_path . '/' . $l0 . '/' . $l1),\n RecursiveIteratorIterator::LEAVES_ONLY,\n RecursiveIteratorIterator::CATCH_GET_CHILD);\n foreach($Iterator as $name => $object) {\n $name = explode(\"/\", $name);\n unset($name[2]);\n unset($name[1]);\n unset($name[0]);\n $name = implode(\"/\", $name);\n $level2[] = $name;\n }\n } catch (Exception $e) {\n // Unable to recurse, so don't bother...\n }\n //$level2 = scandir($file_path . '/' . $l0 . '/' . $l1);\n $results[$l0][$l1] = array();\n sort($level2);\n foreach ($level2 as $i => $l2) {\n $key = sha1($secret.$l0.$l1.$l2);\n if (substr($l2, 0, 1) != '.' && validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access)[0]) {\n if (is_link($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2)) {\n if (validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access)[0]) {\n $vf = validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access);\n $category = categorize_file($instructor, $l2, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2),\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n } else {\n $vf = validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access);\n $category = categorize_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n }\n # Add Virtual files, format like array('class'=>array(1 => array(array('answers.html', 'homework/answers05.html'))))\n foreach ($virtual as $l0 => $l1array) {\n if (isset($results[$l0])) {\n $classes = array_keys($results[$l0]);\n foreach ($l1array as $day => $l2array) {\n if (isset($classes[$day-1])) {\n foreach ($l2array as $i => $values) {\n $virt_file = $values[0];\n $real_file = $values[1];\n if (validate_file($instructor, $real_file, $real_file, $access)[0]) {\n $key = sha1($secret.$real_file.$virt_file);\n $vf = validate_file($instructor, $real_file, $real_file, $access);\n $category = categorize_file($instructor, $virt_file, $real_file, $vf[5], $categories);\n $results[$l0][$classes[$day-1]][$virt_file] = array('actual' => $real_file,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n #####################################################\n # Verify that the class is not blocked by security...\n $today = getdate();\n foreach ($results as $l0 => $classes) {\n $counter = 1;\n foreach ($classes as $l1 => $data) {\n foreach ($data as $filename => $fdata) {\n if ($fdata['year'] == 1 && $fdata['month'] == 1 && $fdata['day'] == 1) {\n $cate = $fdata['category'];\n if (isset($access[$l0.\"_\".$counter]) && $cate == 'title') {\n $sspec = $l0.\"_\".$counter;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$cate])) {\n $sspec = $l0.\"_\".$counter.\"/\".$cate;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$filename])) {\n $sspec = $l0.\"_\".$counter.\"/\".$filename;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/all\"])) {\n $sspec = $l0.\"_\".$counter.\"/all\";\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n }\n }\n }\n $counter++;\n }\n }\n return $results;\n }",
"function get_smsstudents_by_ids($inputarray = array()) {\n $sql = \"select * from student_records where id in(\" . implode(',', $inputarray) . \")\";\n //log_message('error', 'get_smsstudents_by_ids '.$sql);\t\t\n $res = $this->db->query($sql);\n return $res->result();\n }",
"public function getStudentsForPath($path_id) {\n return $this->get('get_students_for_path', ['path_id' => $path_id]);\n }",
"public function list_shared_files_with() {\n $stmt = $this->pdo->prepare('select filename, name from share s, user u, file f where s.user_id = :id and s.owner_id = u.id and s.file_id = f.id');\n $stmt->bindValue(':id', $this->id);\n $stmt->execute();\n $res = $stmt->fetchAll();\n $result = array();\n foreach ($res as $f) {\n array_push($result, array('filename' => $f['filename'],\n 'username' => $f['name']));\n }\n return $result;\n }",
"public function listDirectoryPicturesAndApplyId() \n {\n if (is_dir($this->picturesFolder)){\n $this->files = scandir($this->picturesFolder);\n } else {\n echo 'No image directory';\n }\n \n $values = array();\n foreach ($this->files as $key => $var) {\n if (($var === '.') || ($var === '..') || (substr($var, -4, 1) !== '.')) {\n unset($this->files[$key]);\n } else {\n $id = $this->generateRandomKey();\n $values[] = array(\n 'id' => $id, \n 'picture' => $this->files[$key], \n 'qrcode' => $id . '-qrcode' . $this->outputFileExtension\n ); \n }\n }\n $this->files = $values;\n return (array) $this->files;\n }",
"public function getGroupFilesFromDatabase() {\n $db = \\Helper::getDB();\n $db->where('g.groupId', $db->escape($this->getId()));\n $db->join('documents d', 'd.id = g.documentId', 'LEFT');\n $db->join('users u', 'u.id = d.ownerId', 'LEFT');\n $results = $db->get('group_documents g', NULL, 'd.*, u.*, d.id AS fileId, u.id AS userId');\n // Process all files and their owners\n foreach($results as $result) {\n $user = new \\Models\\User($result['userId'], $result['username'], $result['email'], $result['firstName'], $result['lastName'], $result['lastLogin']);\n $file = new \\Models\\File($result['fileId'], $result['type'], $result['title'], $user, $result['creationDate'], $result['modificationDate'], $result['file']);\n $this->addFile($file);\n }\n }",
"function rScanDir($scanMe) {\r\n\t\tglobal $path, $tmpPath, $cur_folder, $tags2;\r\n\t\tforeach($scanMe as $folder)\r\n\t\t{\r\n\t\t\tif(is_dir($path.$tmpPath.$folder) && $folder !=\".\" && $folder !=\"..\")\r\n\t\t\t{\r\n\t\t\t\t$cur_folder[] = $tmpPath.$folder;\r\n\t\t\t\techo \"getTagString input:\".$tmpPath.$folder.\"<br/>\";\r\n\t\t\t\t$tags2[] = getTagString($tmpPath.$folder);\r\n\t\t\t\t$tmpPath .= $folder.\"/\";\r\n\t\t\t\trScanDir(scandir($path.$tmpPath));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\"));\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\")+1);\r\n\t}",
"function viewAllAttachedFiles($sessionID, $studentID){\r\n $allFiles = array();\r\n $someFiles = array();\r\n $file = array();\r\n $contacts=$this->getStudentsContacts($studentID);\r\n for($i = 0; $i < sizeof($contacts); $i++){\r\n $contactID = $contacts[$i];\r\n $contact = $this->viewContact('',$contactID);\r\n $contactDate = $contact['DateCreated'];\r\n if(!empty($contactID)){\r\n unset($someFiles);\r\n $someFiles = $this->viewAttachedFiles('',$contactID); \r\n for($j = 0; $j < sizeof($someFiles); $j++){\r\n unset($file);\r\n $file['fileid'] = $someFiles[$j];\r\n $file['contactid'] = $contactID;\r\n $file['name'] = $this->getAttachedFileName($someFiles[$j]);\r\n $file['date'] = $contactDate;\r\n array_push($allFiles,$file);\r\n }\r\n }\r\n }\r\n return($allFiles);\r\n\t}",
"function get_all_by_survey($sid)\r\n {\r\n $this->db->select(\"*\");\r\n $this->db->where(\"sid\",$sid);\r\n return $this->db->get(\"data_files\")->result_array();\r\n }",
"function searchforStudents() {\n $searchId = Input::get('sid');\n\n /* get project title according to the group's id */\n $protitle = DB::table('projects')\n ->where('groupID', $searchId)\n ->Where('status', 'Approved')\n ->pluck('title');\n\n /* get project id according to the group's id */\n $proid = DB::table('projects')\n ->where('title', $protitle)\n ->Where('status', 'Approved')\n ->pluck('id');\n\n /* mail adds. of members in the group */\n $groupmails = DB::table('research_groups')\n ->where('groupID', $searchId)\n ->pluck('mails');\n\n $explodedemails = explode(\"/\", $groupmails);\n $sendids = '';\n $sendnames = '';\n \n foreach ($explodedemails as $mail) {\n $id = (DB::table('students')\n ->where('email', $mail)\n ->pluck('regId'));\n\n $sendids .= $id . '/';\n\n /* get student name according to the student's id */\n $stuname = (DB::table('students')\n ->where('email', $mail)\n ->pluck('name'));\n $sendnames .= $stuname . '/';\n }\n \n $explodedsendids = explode(\"/\", rtrim($sendids, \"/\"));\n $explodedsendnames = explode(\"/\", rtrim($sendnames, \"/\"));\n $los = DB::table('settings')->first();\n \n $data = array(\"title\" => $protitle, \"pid\" => $proid, \"sname\" => $explodedsendnames,\n \"noofstu\" => sizeof($explodedemails), \"ids\" => $explodedsendids,\n \"ledrid\" => $explodedsendids[0], \"los\" => $los);\n return json_encode($data);\n }",
"public function list_shared_files() {\n $stmt = $this->pdo->prepare('select filename, name from share s, user u, file f where s.owner_id = :id and s.user_id = u.id and s.file_id = f.id');\n $stmt->bindValue(':id', $this->id);\n $stmt->execute();\n $res = $stmt->fetchAll();\n $result = array();\n foreach ($res as $f) {\n array_push($result, array('filename' => $f['filename'],\n 'username' => $f['name']));\n }\n return $result;\n }",
"public function student_list()\n {\n $grade = $this->input->post('grade');\n $name = $this->input->post('class');\n\n\n $classId = $this->Class_model->getClassId($grade, $name);\n\n $file = $_FILES['file']['tmp_name'];\n\n\n $handle = fopen($file, \"r\");\n\n\n while (($fileop = fgetcsv($handle, 1000, \",\")) !== false) {\n\n if ($fileop[0] != 'index') {\n\n $index = $fileop[0];\n $fname = $fileop[1];\n $lname = $fileop[2];\n $address = $fileop[3];\n $tele = $fileop[4];\n $data = array(\n 'index' => $index,\n 'fname' => $fname,\n 'lname' => $lname,\n 'address' => $address,\n 'tel' => $tele,\n );\n\n $res = $this->Student_model->insertStudent($data);\n\n if ($res == 1) {\n $data = array(\n 'Student_index' => $index,\n 'Class_id' => $classId\n );\n $res = $this->Student_Class_model->registerStudentsToClass($data);\n\n\n }\n if ($res == 1) {\n echo 'File uploaded successfully';\n }\n\n };\n\n }\n\n }",
"public function fetchAllClassIds ()\r\n {\r\n $member_id = $this->getMember_id(true);\r\n $student_class_obj = new Acad_Model_StudentClass();\r\n $student_class_obj->setMember_id($member_id);\r\n return $student_class_obj->fetchClassIds();\r\n }",
"public function find_students(\n string $keyword,\n string $order_by = 'forename',\n $order_dir = self::ORDER_ASC,\n $page = 0,\n $limit = 50,\n &$total_students_count = null\n ) {\n $order_by = htmlentities($order_by);\n $order_dir = $order_dir == self::ORDER_ASC ? 'ASC' : 'DESC';\n $query_string = \n \"SELECT forename, surname, group_id, exam_results\n FROM students\n WHERE CONCAT(forename, ' ', surname, ' ', group_id, ' ', exam_results)\n LIKE :keyword\n ORDER BY $order_by $order_dir\n LIMIT :limit_start, :limit_end\";\n $query = $this->db->prepare($query_string);\n $query->bindValue(':keyword', \"%{$keyword}%\", \\PDO::PARAM_STR);\n $query->bindValue(':limit_start', $page * $limit, \\PDO::PARAM_INT);\n $query->bindValue(':limit_end', $limit, \\PDO::PARAM_INT);\n $query->execute();\n\n $students = array();\n while ($row = $query->fetch(\\PDO::FETCH_NUM)) {\n $student = new Student;\n $student->forename = $row[0];\n $student->surname = $row[1];\n $student->group_id = $row[2];\n $student->exam_results = $row[3];\n array_push($students, $student);\n }\n\n $query->closeCursor();\n\n if (isset($total_students_count)) {\n if ($page == 0 && count($students) < $limit) {\n $total_students_count = count($students);\n } else {\n $query_string = \n \"SELECT COUNT(*)\n FROM students\n WHERE CONCAT(forename, ' ', surname, ' ', group_id, ' ', exam_results)\n LIKE :keyword\n ORDER BY $order_by $order_dir\";\n $query = $this->db->prepare($query_string);\n $query->bindValue(':keyword', \"%{$keyword}%\", \\PDO::PARAM_STR);\n $query->execute();\n\n $total_students_count = intval($query->fetch(\\PDO::FETCH_NUM)[0]);\n\n $query->closeCursor();\n }\n }\n\n return $students;\n }",
"public static function getStudents() {\n\t\t$idm = PSU::get('idmobject');\n\n\t\t$search = array(\n\t\t\tarray('pa.attribute' => 'els_student'),\n\t\t\tarray('pa.type_id' => '2')\n\t\t);\n\n\t\t$return = 'i.pid,i.psu_id,i.username,i.first_name,i.last_name,l.start_date,l.end_date';\n\n\t\t$students = $idm->getUsersByAttribute( $search, 'AND', $return );\n\n\t\tarray_walk( $students, array('ELS', 'dates2timestamp') );\n\t\tarray_walk( $students, array('ELS', 'load_psuperson') );\n\t\t\n\t\tusort( $students, array('ELS', 'student_sort') );\n\n\t\treturn $students;\n\t}",
"function dropbox_submitted_students($assignment_id)\n{\n /*/\n * SELECT DISTINCT users.id, COUNT(dropbox_content.filebox_id) AS num_content \n * FROM dropbox_content \n * JOIN users \n * ON users.id = dropbox_content.student_id \n * WHERE dropbox_content.assignment_id = $assignment_id\n /*/\n $query = \"SELECT DISTINCT users.id, COUNT(dropbox_content.id) AS num_content FROM dropbox_content JOIN users ON users.id = dropbox_content.student_id WHERE dropbox_content.assignment_id = $assignment_id\";\n $students = good_query_table($query);\n $ret = array();\n foreach($students as $student)\n $ret[$student['id']] = $student['num_content'];\n return $ret;\n}",
"protected function valid_studentids() {\n if ($this->studentids === null) {\n if ($this->studentids = get_users_by_capability($this->context, 'mod/data:viewentry', 'u.id,u.username')) {\n $this->studentids = array_keys($this->studentids);\n $this->studentids = array_diff($this->studentids, $this->valid_teacherids());\n } else {\n $this->studentids = array();\n }\n }\n return $this->studentids;\n }",
"private function importManyFiles()\n {\n $path = storage_path(\"data/*.csv\");\n\n // run 2 loops at a time\n foreach (array_slice(glob($path), 0, 2) as $file) {\n // read the data into an array\n $data = array_map('str_getcsv', file($file));\n\n // loop over the data\n foreach ($data as $row) {\n // insert the record or update if the email already exists\n // User::updateOrCreate(\n // ['email' => $row[6]],\n // ['email' => $row[6]]\n // );\n }\n\n // delete the file\n unlink($file);\n }\n }",
"private function getStudent(){\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire.sql\";\n\n\t\t$this->result[\"liste_stagiaire\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_techno_carousel.sql\";\n\n\t\t$this->result[\"liste_techno\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_rs.sql\";\n\n\t\t$this->result[\"liste_rs\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_doc.sql\";\n\n\t\t$this->result[\"liste_doc\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t}",
"private function scan_directory($dir, $scan = \"\", &$nb_files = 0, &$nb_errors = 0){\n\t\t//Si c est la ou on etait , alors on reprend\n\t\tif ($dir == $scan or $scan == \"\"){\n\t\t\t$scan = \"\";\n\t\t\tDB::delete(\"delete from movies where directory = ?\",array($dir));\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tforeach (config(\"app.MOVIES_FILES\") as $ext){\n\t\t\t\t\t\t\tif (stripos($file,\".\".$ext) !== false){\n\t\t\t\t\t\t\t\t//Analyse du fichier\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie = new Movie();\n\t\t\t\t\t\t\t\t//On rajoute le fichier en base\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie->directory = $dir;\n\t\t\t\t\t\t\t\t$movie->filename = $file;\n\t\t\t\t\t\t\t\t$movie->status = -1;\n\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t$movie->name = $this->remove($file);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$movie->status = 1;\n\t\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$nb_files++;\n\t\t\t\t\t\t\t\t}catch(\\Exception $e){\n\t\t\t\t\t\t\t\t\t//Next...\n\t\t\t\t\t\t\t\t\t$nb_errors++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$json = [];\n\t\t\t$json[\"updated\"] = date(\"Y-m-d H:i:s\");\n\t\t\t$json[\"nb_files\"] = $nb_files;\n\t\t\t$json[\"nb_errors\"] = $nb_errors;\n\t\t\t$json[\"scan\"] = $scan;\n\t\t\tfile_put_contents(storage_path().\"/scan_movies.txt\",json_encode($json));\n\t\t}else{\n\t\t\t//Sinon, on reparcourt a partir de l'endroit, ou on etait\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"function get_all_students() {\n global $db;\n $query = 'SELECT * FROM students\n ORDER BY studentID';\n $statement = $db->prepare($query);\n $statement->execute();\n $students = $statement->fetchAll();\n $statement->closeCursor();\n return $students; \n }",
"function scanFiles($dir){\n $path = __DIR__ . DIRECTORY_SEPARATOR . $dir; /** Nurodomas kelias iki jsons folderio */\n $files = scandir($path); /** Nuskenuoja folderi pagal kelia($path) ir grazina esanciu failu masyva */\n\n return $files;\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}",
"function assignStudentIdList($ids)\n {\n $rs = $this->dbQueryStudentIdList($ids);\n $this->_smarty->assign('studentList', $rs);\n return $rs;\n }",
"public function getFiles($uid) {\n\n\t\t$uid = $_SESSION['userid'];\n\t\t$this->pdo = config_db::getConnected();\n\n\t\t$statement = $this->pdo->prepare(\"SELECT * FROM files f\n INNER JOIN user_files uf ON (uf.fileid = f.id)\n INNER JOIN users u ON (uf.uid = u.id)\n WHERE uf.uid = :uid\");\n\t\t$result = $statement->execute(array('uid' => $uid));\n\t\t$rows = $statement->fetchAll(PDO::FETCH_ASSOC);\n \n\t\t$fileinfo = array();\n\t\tforeach($rows as $row) {\n\t $fileinfo[] = $row;\n }\n\n\t\treturn $fileinfo;\n\t}",
"function scanfiles( $path = '' ) {\n\t\t\t\n\t\t\tglobal $bwpsoptions;\n\t\t\t\n\t\t\t$tz = get_option( 'gmt_offset' ) * 60 * 60;\n\n $data = array();\n\n\t\t\tif ( $dirHandle = @opendir( ABSPATH . $path ) ) { //get the directory\n\t\t\t\n\t\t\t\twhile ( ( $item = readdir( $dirHandle ) ) !== false ) { // loop through dirs\n\t\t\t\t\t\n\t\t\t\t\tif ( $item != '.' && $item != '..' ) { //don't scan parent/etc\n\n\t\t\t\t\t\t$relname = $path . $item;\n \n\t\t\t\t\t\t$absname = ABSPATH . $relname;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $this->checkFile( $relname ) == true ) { //make sure the user wants this file scanned\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( filetype( $absname ) == 'dir' ) { //if directory scan it\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$data = array_merge( $data, $this->scanfiles( $relname . '/' ) );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else { //is file so add to array\n\n\t\t\t\t\t\t\t\t$data[$relname] = array();\n\t\t\t\t\t\t\t\t$data[$relname]['mod_date'] = @filemtime( $absname ) + $tz;\n\t\t\t\t\t\t\t\t$data[$relname]['hash'] = @md5_file( $absname );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\t@closedir( $dirHandle ); //close the directory we're working with\n \n\t\t\t} \n\t\t\t\n\t\t\treturn $data; // return the files we found in this dir\n\t\t\t\n\t\t}",
"function dbQueryStudentIdList($ids)\n {\n $where = \" WHERE id IN (\" . arrayToDBString($ids) . \")\";\n $rs = $this->_getFullList($where);\n return $rs;\n }",
"function fm_get_all_sharedf_by_folder($original, $foldid) {\r\n\t$tmpvar = get_records('fmanager_folders',\"owner=$original AND pathid\",$foldid);\r\n\r\n\treturn $tmpvar;\t\r\n}",
"public function loadFiles(){\n\n $files = array();\n\n if($this->id == -1 || empty($this->databasePath))\n return $series;\n\n\n $sqlQuery = 'SELECT D.* FROM data D , books B WHERE B.id = D.book AND B.id='.$this->id;\n\n $pdo = new SPDO($this->databasePath);\n foreach ($pdo->query($sqlQuery) as $row)\n $files[] = BookFile::_createFromRow($this->databasePath, $row); \n \n return $files;\n }",
"function scanDir() {\r\n $returnArray = array();\r\n \r\n if ($handle = opendir($this->uploadDirectory)) {\r\n \r\n while (false !== ($file = readdir($handle))) {\r\n if (is_file($this->uploadDirectory.\"/\".$file)) {\r\n $returnArray[] = $file;\r\n }\r\n }\r\n \r\n closedir($handle);\r\n }\r\n else {\r\n die(\"<b>ERROR: </b> No se puede leer el directorio <b>\". $this->uploadDirectory.'</b>');\r\n }\r\n return $returnArray; \r\n }",
"function getStudents() {\n $students = array();\n\n // Add first student into the students array.\n $first = new Student();\n $first->surname = \"Doe\";\n $first->first_name = \"John\";\n $first->add_email('home','[email protected]');\n $first->add_email('work','[email protected]');\n $first->add_grade(65);\n $first->add_grade(75);\n $first->add_grade(55);\n $students['j123'] = $first; \n\n // Add seconde student into the students array.\n $second = new Student();\n $second->surname = \"Einstein\";\n $second->first_name = \"Albert\";\n $second->add_email('home','[email protected]');\n $second->add_email('work1','[email protected]');\n $second->add_email('work2','[email protected]');\n $second->add_grade(95);\n $second->add_grade(80);\n $second->add_grade(50);\n $students['a456'] = $second;\n\n\n // Add my info into the students array.\n $me = new Student();\n $me->surname = \"Tan\";\n $me->first_name = \"Hai Hua\";\n $me->add_email('school', '[email protected]');\n $me->add_grade(90);\n $students['b721'] = $me;\n\n\n // Add random generated students to the array\n $num = mt_rand(1, 10);\n for ($i = 0; $i < $num; ++$i) {\n $student = new Student();\n $student->surname = Helper::rand_name(10);\n $student->first_name = Helper::rand_name(10);\n $student->add_email('school', $student->first_name . '@.my.bcit.ca');\n $student->add_grade(mt_rand(0,100));\n $student->add_grade(mt_rand(0,100));\n $student->add_grade(mt_rand(0,100));\n $students['k' . mt_rand(100,999)] = $student;\n }\n\n return $students;\n }",
"function open_and_scan($SCAN_DIRECTORY,$prev_files){\n\tglobal $files,$exempt_files,$prev_files,$exempt_directory;\n\t$changed_files = '';\n\t$file_details = stat($SCAN_DIRECTORY);\n\t$dt = array();\n\tforeach($file_details as $key=>$info){\n\t\t$dt[$key] = $info;\n\t}\n\t$data = array(\n\t\t'file'=>$SCAN_DIRECTORY,\n\t\t'info'=>$dt\n\t);\n\tarray_push($files,$data);\n\t$changed_files .= get_prev_stats($SCAN_DIRECTORY,$prev_files);\n\t\t\t\t\t\n\t$handle = opendir($SCAN_DIRECTORY);\n\twhile($f = readdir($handle)){\n\t\tif($f != '.' && $f != '..'){\n\t\t\tif(!is_dir($SCAN_DIRECTORY.$f)){\n\t\t\t\t$file_array = explode('.',$f);\n\t\t\t\t$count = count($file_array);\n\t\t\t\t$extension = $file_array[$count-1];\n\t\t\t\tif($count > 1 && !in_array($extension,$exempt_files)){\n\t\t\t\t\t$file_details = stat($SCAN_DIRECTORY.$f);\n\t\t\t\t\t$dt = array();\n\t\t\t\t\tforeach($file_details as $key=>$info){\n\t\t\t\t\t\t$dt[$key] = $info;\n\t\t\t\t\t}\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'file'=>$SCAN_DIRECTORY.$f,\n\t\t\t\t\t\t'info'=>$dt\n\t\t\t\t\t);\n\t\t\t\t\tarray_push($files,$data);\n\t\t\t\t\t$changed_files .= get_prev_stats($SCAN_DIRECTORY.$f,$prev_files);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(!in_array($f,$exempt_directory)){\n\t\t\t\t\topen_and_scan($SCAN_DIRECTORY.$f.'/',$prev_files);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn array(\n\t\t'changed'=>$changed_files,\n\t\t'files'=>$files\n\t);\n}",
"protected function scanDir()\n {\n $this->moduleList = [];\n foreach ($this->getVendorList() as $vendorName) {\n $this->moduleList[$vendorName] = [];\n }\n\n $this->readModules();\n }",
"public function retrieveAllStudent(){\n\t\t\t$query = $this->connection()->prepare(\"SELECT * FROM student ORDER BY id DESC\");\n\t\t\t$query->execute();\n\t\t\treturn $query->fetchAll();\n\t\t}",
"public static function getAll_files() {\n $db = DBInit::getInstance();\n\n $statement = $db->prepare(\"SELECT id, file_name, uploaded, user FROM files\");\n $statement->execute();\n\n return $statement->fetchAll();\n }",
"function getFiles($inc, $d){\n\t\tglobal $ALL;\n\n\t\tif(is_string($inc)){\n\t\t\t$in = glob($inc)\n\t\t}else if(is_array($inc)){\n\t\t\t$in = array();\n\t\t\tforeach ($inc as $v) {\n\t\t\t\t$glock = glob($v);\n\t\t\t\t$in = array_merge($in, $glock);\n\t\t\t}\n\t\t}else{\n\t\t\tif($d) $in = glob($ALL);\n\t\t\telse $in = array();\n\t\t}\n\n\t\treturn array_unique($in);\n\t}",
"protected function getAllFiles() {\n $sql = \"SELECT * FROM satdatameta\";\n $stmt = $this->connect()->prepare($sql);\n $stmt->execute();\n $results = $stmt->fetchAll();\n return $results;\n }",
"public function port_ids() {\n $file = new CmsFile;\n $files = $file->find_all();\n foreach($files as $file) {\n $new = new WildfireFile;\n $s_path = rtrim(str_replace(\"public/\",\"\",strrchr($file->path,\"public/files\")), \"/\" );\n $new_file = $new->filter(\"filename = '{$file->filename}' AND rpath LIKE '%{$s_path}%'\" )->first();\n if($new_file->id) {\n $new_file->oldid = $file->id;\n $new_file->description = $file->caption;\n $new_file->save();\n }\n }\n exit;\n }",
"public function collectInfoFiles()\r\n {\r\n $files_found = $this->findFiles($this->destination_dir, array('md', '1st', 'txt'));\r\n\r\n if($files_found)\r\n $this->file_list = array_merge($this->file_list, $files_found);\r\n }",
"function getUsers(){\n\t\t$this->users = $this->fileHandler->parseRows($this->userFile, '^', '|');\n\t\t$this->logMsg(SUCCESS, 'users generated');\n\t}",
"public static function loadAll()\n\t{\n\t\t//set up database connection\n\t\t//\n\t\t$databaseConnection = self::getDataBaseConnection();\n\t\t\t\n\t\t//prep our sql statment load all from the student database\n\t\t//\n\t\t$sqlStatement = self::$SQLLoadAllStatement;\n\t\t\t\n\t\t$result = $databaseConnection->query($sqlStatement);\n\t\t\n\t\t$listOfStudents = $result->fetchALL(PDO::FETCH_CLASS, self::$NameOfDatabase);\n\t\t\n\t\t$databaseConnection = null;\n\t\treturn $listOfStudents;\n\t}",
"public function findFiles();",
"function importImages($db, $username)\n{\n // list files in dir that are not in the database for this user\n\n $dataRoot = getConfig(\"upload._diskPath\");\n $userDir = combine($dataRoot, $username);\n $files = scandir($userDir);\n array_shift($files);\n array_shift($files);\ndebug(count($files) . \" files\", $files);\n\n$dbImages = $db->select(\"SELECT distinct filename from user_upload where username='$username'\", null, true);\ndebug(count($dbImages) . \" DB filenames\", $dbImages);\n //difference: insert\n //interserction : update or ignore ?\n}",
"public function get_data()\n\t\t{\n\t\t\tglobal $conn;\n\t\t\ttry{\n\t\t\t\n\t\t\t\t// connect to MySQL and select a database\n\t\t\t\t$students = array();\n\t\t\t\t\n\t\t\t\t$result = $this->conn->query(\"SELECT * FROM `students`\");\n\t\t\t\t\n\t\t\t\tforeach($result as $row)\n\t\t\t\t{\n\t\t\t\t\t$students[] = $this->create_student($row);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $students;\n\t\t\t}\n\t\t\tcatch(Exception $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t\texit();\n\t\t\t}\n\t\t}",
"function get_list($sy_id,$student_id) {\n\t\treturn $this->query(\n\t\t\t\"SELECT * FROM $this->tblname WHERE sy_id=$sy_id AND student_id=$student_id\"\n\t\t);\n\t}",
"public function get_students_list(){\n return $this->n->get_list_from_db();\n }",
"function getAllDistinctFileIndex() {\r\n\t\t\t$query = $this->pdo->prepare('select distinct file_index from document_details');\r\n\t\t\t$query->execute();\r\n\t\t\treturn $query->fetchAll();\r\n\t\t}",
"public function getAllStudents(){\n\n\t\t$Result = new Result();\t\n\t\t$Result = $this->_StudentDAO->getAllStudents();\n\t\t\n\t\tif(!$Result->getIsSuccess())\n\t\t\t$Result->setResultObject(\"Database failure in StudentDAO.getAllStudents()\");\t\t\n\n\t\treturn $Result;\n\t}",
"function globalUniqueShoeGenRefs(){\n\t\t\n\t\t$global_parents_data=array();\n\t\t$global_parents_data_file=array();\n\t\t$global_parents_xls_file=array();\n\t\t$genData=CepClLahalleShoeGen::select('lahs_nomod','lahs_reference','lahs_reference_folder','lahs_export_filename')\n\t\t\t\t\t\t\t\t\t ->where('lahs_status','=',1)->get();\n\t\t\n\t\t//echo \"<pre>\"; print_r($genData);\n\t\tforeach ($genData as $key => $value) {\n\t\t\t$global_parents_data[]=$value['lahs_nomod'];\n\t\t\t$global_parents_data_file[$value['lahs_nomod']]=$value['lahs_reference'];\n\t\t\t$global_parents_xls_file[$value['lahs_nomod']]=$value['lahs_export_filename'];\n\t\t}\n\t\t\t\n\t\t\n\t\t//$res=mysql_fetch_array($res);\n\t\treturn array($global_parents_data,$global_parents_data_file,$global_parents_xls_file);\n\t}",
"function getDocuments($ids = array(), $sort = 'menuindex', $dir = 'ASC', $fields = '*') {\r\n global $modx;\r\n\r\n if (count($ids) == 0) {\r\n return false;\r\n } else {\r\n $tblsc = $modx->getFullTableName('site_content');\r\n $tbldg = $modx->getFullTableName('document_groups');\r\n\r\n // add sc. to field names to refere to the table\r\n $fields = 'sc.' . implode(',sc.', preg_replace('/^\\s/i', '', explode(',', $fields)));\r\n $sort = ($sort == '') ? '' : 'sc.' . implode(',sc.', preg_replace('/^\\s/i', '', explode(',', $sort)));\r\n\r\n // get document groups for current user\r\n if ($docgrp = $modx->getUserDocGroups()) {\r\n $docgrp = implode(',', $docgrp);\r\n }\r\n\r\n // build the query to get documents\r\n $access = ($modx->isFrontend() ? 'sc.privateweb=0' : \"1='\" . $_SESSION['mgrRole'] . \"' OR sc.privatemgr=0\") .\r\n (!$docgrp ? '' : ' OR dg.document_group IN (' . $docgrp . ')');\r\n\r\n $sql = 'SELECT DISTINCT ' . $fields . ' FROM ' . $tblsc . ' sc ' .\r\n 'LEFT JOIN ' . $tbldg . ' dg on dg.document = sc.id ' .\r\n 'WHERE (sc.id IN (' . implode(',', $ids) . ')) ' .\r\n 'AND (' . $access . ') ' .\r\n 'GROUP BY sc.id' .\r\n ($sort ? ' ORDER BY ' . $sort . ' ' . $dir : '');\r\n\r\n $result = $modx->dbQuery($sql);\r\n $resource = array();\r\n\r\n // convert resources to array\r\n for ($i = 0; $i < @ $modx->recordCount($result); $i ++) {\r\n array_push($resource, @ $modx->fetchRow($result));\r\n }\r\n\r\n return $resource;\r\n }\r\n }",
"public function findUsers(): iterable;",
"public function find_all() {\n $this->ensure_path_exists();\n $files = glob($this->glob_keys_pattern(), GLOB_MARK | GLOB_NOSORT);\n $return = array();\n if ($files === false) {\n return $return;\n }\n foreach ($files as $file) {\n $return[] = substr(basename($file), 0, -6);\n }\n return $return;\n }",
"function getStudentInformation($STID){\n //By default, put nothing in here.\n\t\t$already_completed_parental_application=\"\";\t\t\n $housing_app_completed_in_system=\"\";\n $first_name=\"\";\n $last_name=\"\";\n $middle_name=\"\";\n $student_ID = \"\";\n $student_DATE_OF_BIRTH = \"\";\n $parental_email_address = \"\";\n $student_app_date = \"\";\n\n\n //As long as there is something in the search.\n while($row=oci_fetch_array($STID,OCI_ASSOC)){\n\t\t //Check whether or not they have already completed the Parental Agreement and if they have,\n //use this field to keep them from progressing forward within this application to move forward. (Onward to Page2.php)\n $already_completed_parental_application=$row[\"NC_SH_PRNTL_APPRVL\"];\n //Check whether or not they have a completed housing application on file.\n $housing_app_completed_in_system=$row[\"SS_STAT_INDICATOR\"];\n //Assign first name from the query lookup.\n $first_name = $row[\"FIRST_NAME\"];\n //Assign last name from the query lookup.\n $last_name = $row[\"LAST_NAME\"];\n //Assign middle name from the query lookup.\n $middle_name = $row[\"MIDDLE_NAME\"];\n //Assign the ID from the query lookup.\n $student_ID = $row[\"EMPLID\"];\n //Assign the student DOB to the query lookup.\n $student_DATE_OF_BIRTH = $row[\"BIRTHDATE\"];\n //Assign the email\n $parental_email_address = $row[\"EMAIL_ADDR\"];\n //Assign the application date\n $student_app_date_temp = $row[\"NC_PROCESS_DTTM\"];\n\t\t \n\t\t //For whatever reason, if there is a \" \" (BLANK) in the field, lets write blank, as it \n\t\t //will trigger the condition if the end-user does not have any information within the \"SS_STAT_INDICATOR\" field.\n\t\t //Create a condition that writes the word \"BLANK\" if there is nothing in the field.\n\t\t\t\n\t\t\t//Fields this affects\n\t\t\t//NC_SH_PRNTL_APPRVL (WHETHER THE END USER HAS ALREADY COMPLETED THIS WEB APPLICATION)\n\t\t\t//SS_STAT_INDICATOR (WHETHER THE STUDENT HAS A COMPLETED HOUSING APPLICATION)\n\t\t\t//MIDDLE_NAME (FOR SOME WILD REASON THE QUERY DOES NOT PULL A MIDDLE NAME FOR THE STUDENT).\t\t\t\n\t\t\t\n\t\t\t//Untouched below...\n\t\t\t/*\n\t\t\tif ($already_completed_parental_application==\" \"||$housing_app_completed_in_system==\" \"||$middle_name==\" \"){\n\t\t\t\t $already_completed_parental_application=\"BLANK\"; //Assign the word, BLANK, to whether or not the end user has completed this web application. \n $housing_app_completed_in_system=\"BLANK\";\t//Assign the word, BLANK, to the housing application status in MyPack Portal.\n\t\t\t\t $middle_name=\"BLANK\"; //Assign the word, BLANK, to the middle name pulled (remember to remove this on page3.php when it is displayed back to the user.)\n\t\t }\n\t\t\t*end untouched.\n\t\t\t*/\n\t\t\t//Changes added for the above wrong condition on 02/01/2016.\n\t\t\t//If the field for NC_SH_PRNTL_APPRVL is blank, set the value that's sent back to PAGE1 to BLANK.\n\t\t\tif ($already_completed_parental_application==\" \"){\n\t\t\t$already_completed_parental_application=\"BLANK\"; //Assign the word, BLANK, to whether or not the end user has completed this web application.\n\t\t\t}\n\t\t\t//If the SS_STAT_INDICATOR is blank, set the value that's sent back to PAGE1 to BLANK.\n\t\t\telse if($housing_app_completed_in_system==\" \"){\n\t\t\t$housing_app_completed_in_system=\"BLANK\";\t//Assign the word, BLANK, to the housing application status in MyPack Portal.\n\t\t\t}\n\t\t\t//If the Middle Name is blank, set the value back to Page1 to BLANK.\n\t\t\telse if($middle_name==\" \"){\n\t\t\t\t$middle_name=\"BLANK\";\n\t\t\t}\n\t\t\t//End changes on 02/01/2016.\t\t\n\t\t\t\n\t\t\t\n //End creating a condition...\n\t\t \n\t\t \n\t\t \n }\n\t\t\n\t\t //FORMAT OF NC_PROCESS_DTTM IS DD-MM-YY H:i:s.00000000 AM\n\t\t //Only return a set amount of information.\n\t\t //SHOULD RETURN DD-MM-YY\n\t\t $date_of_application_formatted = substr($student_app_date_temp,0,9);\n\t\t $student_app_date = $date_of_application_formatted;\n\t\t\n\t\t\n //Return information from the database lookup.\n //return $already_completed_parental_application.\" \".$housing_app_completed_in_system.\" \".$first_name.\" \".$last_name.\" \".$middle_name.\" \".$student_ID.\" \".$student_DATE_OF_BIRTH.\" \".$parental_email_address.\" \".$student_app_date;\n\t\t\n\t\t//To prevent empty fields from breaking the communication between this file and the scripts/checkInformation.js that is \n\t\t//used within the /parental_consent/scripts/ let's make the field separator a \",\" (comma) vs an empty field.\n\t\treturn $already_completed_parental_application.\",\".$housing_app_completed_in_system.\",\".$first_name.\",\".$last_name.\",\".$middle_name.\",\".$student_ID.\",\".$student_DATE_OF_BIRTH.\",\".$parental_email_address.\",\".$student_app_date.\",\";\n\t\t\n\t}",
"function getallpicindb(&$pic_array, $startdir)\r\n{\r\n global $xoopsDB;\r\n\r\n $sql = \"SELECT filepath, filename \".\r\n \"FROM \".$xoopsDB->prefix(\"xcgal_pictures\").\" \".\r\n \"WHERE filepath LIKE '$startdir%'\";\r\n $result = $xoopsDB->query($sql);\r\n while ($row = $xoopsDB->fetchArray($result)) {\r\n $pic_file = $row['filepath'].$row['filename'];\r\n $pic_array[$pic_file]=1;\r\n }\r\n $xoopsDB->freeRecordSet($result);\r\n}",
"public static function getFiles()\n\t{\n\t\t$result = Array();\n\t\t$files = sfCore::$db->query(\"SELECT * FROM `swoosh_file_storage`\")->asObjects();\n\t\tforeach($files as $file){\n\t\t\t$sfFileStorageItem = sfCore::make('sfFileStorageItem');\n\t\t\t$sfFileStorageItem->loadFromObject($file);\n\t\t\t$result[] = $sfFileStorageItem;\n\t\t}\n\t\treturn $result;\n\t}",
"public function getAllStudent(){\n\n\t\treturn array(\n\t\t\t\"1\"=> new Entity_Student(1,\"pham van thao\",23,\"tlu\"),\n\t\t\t\"2\"=> new Entity_Student(2,\"pham van phen\",24,\"tlu\"),\n\t\t\t\"3\"=> new Entity_Student(3,\"pham van to\",25\"tlu\"),\n\t\t\t\"4\"=> new Entity_Student(4,\"pham van\",26,\"tlu\"),\n\n\t\t);\n\t}",
"function student_list($schoolid)\n{\n\tglobal $DB;\n\t$sql =\"SELECT mus.*,mu.firstname,mu.lastname,mu.email,mu.phone1,mu.picture FROM {user_school} mus join {user} mu on mu.id=mus.userid WHERE mus.role='student' \";\n\t$sql.=\"and mus.schoolid=$schoolid AND mu.deleted=0 ORDER BY mu.timemodified desc\";\n\t$result = $DB->get_records_sql($sql);\n\tif(count($result)>0){\n\t\tforeach($result as $student)\n\t\t{\n\t\t\t\t\t$user = new stdClass();\n\t\t\t\t\t$user->id = $student->userid;\n\t\t\t\t\t//$picture = get_userprofilepic($user);\n\t\t\t\t\t$userurl = getuser_profilelink($user->id);\n\t\t\t\t\t$usrimg = get_userprofilepic($user);\n\t\t\t\t\t$picture ='<div class=\"left picture\"><a href=\"'.$userurl.'\">'.$usrimg.'</a></div>'; \n\t\t\t\t\t$student->picture = $picture;\n\t\t}\n\t}\n\treturn $result;\n}",
"function fm_get_all_shared_by_folder($original, $foldid) {\r\n\t$tmpvar = get_records('fmanager_link',\"owner=$original AND folder\",$foldid);\r\n\r\n\treturn $tmpvar;\t\r\n}",
"function list_files($file_paths, $root_path, $student_class_folder, array $code_exts, array $validation_exts) {\n // Prepare header row\n $output = \"<table>\\n<tr>\";\n $output .= \"<th>Permission</th>\";\n //$output .= \"<th>User</th>\";\n //$output .= \"<th>Group</th>\";\n $output .= \"<th>File</th>\";\n $output .= \"<th>Modify Date</th>\";\n $output .= \"<th>Size</th>\";\n $output .= \"<th>Extra</th>\";\n $output .= \"</tr>\\n\";\n\n foreach ($file_paths as $file_path) {\n $relative_path = substr($file_path, strlen($root_path) + 1);\n // $split = split(\"/\", $relative_path);\n $split = explode(\"/\", $relative_path);\n $filename = $split[count($split) - 1];\n $stat = @stat($file_path);\n\n $output .= '<tr>';\n $output .= '<td>' . perms($stat['mode']) . '</td>';\n //$output .= '<td>' . $stat['uid'] . '</td>';\n //$output .= '<td>' . $stat['gid'] . '</td>';\n // Display the correct link to our files\n if (is_dir($file_path))\n $output .= \"<td><a class=\\\"folder\\\" href=\\\"?folder=$relative_path\\\"\";\n elseif (in_array(strtolower(pathinfo($file_path, PATHINFO_EXTENSION)), $code_exts))\n $output .= \"<td><a class=\\\"code\\\" href=\\\"?file=$relative_path\\\"\";\n else\n $output .= \"<td><a class=\\\"show\\\" target=\\\"_blank\\\" href=\\\"/${student_class_folder}/${relative_path}\\\"\";\n $output .= \">\" . $relative_path . \"</a></td>\"; //. $filename \n\n // Show the date. Depending on the due date color the text\n $ctime = date('Y-m-d H:i:s', $stat['ctime']);\n $mtime = date('Y-m-d H:i:s', $stat['mtime']);\n $output .= \"<td\";\n \n $output .= \">$mtime</td>\";\n\n // Add a cell for the size. Ignore directories\n if (is_dir($file_path))\n $output .= \"<td> </td>\";\n else\n $output .= '<td class=\"right\">' . $stat['size'] . '</td>';\n\n // Add a cell for a validation link. Only do it for files we're checking.\n if (in_array(strtolower(pathinfo($file_path, PATHINFO_EXTENSION)), $validation_exts)) {\n $server_name = filter_input(INPUT_SERVER, 'SERVER_NAME');\n $url = \"https://${server_name}/${student_class_folder}/${relative_path}\";\n $output .= \"<td><a target=\\\"_blank\\\" href=\\\"http://validator.w3.org/check?uri=$url\\\">Validate</a></td>\";\n } elseif (is_dir($file_path))\n $output .= \"<td><a class=\\\"code\\\" href=\\\"?files=${relative_path}\\\">View Code</a></td>\";\n\n //$output .= \"<td> </td>\";\n\n $output .= \"</tr>\\n\";\n }\n $output .= \"</table>\\n\";\n\n if (count($file_paths) == 0)\n $output .= \"<p class=\\\"error\\\">There are no files to display</p>\";\n\n return $output;\n}",
"private function convertFiles(){\n\n\t\t//Create folder in tmp for files\n\t\tmkdir('./tmp/course_files');\n\t\t$sectionCounter = 0;\n\t\n\t\t//Add section to manifest\n\t\tHelper::addIMSSection($this->manifest, $this->currentSectionCounter, $this->identifierCounter, 'Documents');\n\n\t\t$section = $this->manifest->organizations->organization->item->item[$this->currentSectionCounter];\n\t\t\n\t\t//Find all folders and documents\n\t\t$query = \"SELECT document.`path`,document.`filename`,document.`format`,document.`title` FROM document WHERE document.`course_id`=\".$this->course_id.\" ORDER BY path;\";\n\t\t$result = mysqli_query($this->link,$query);\n\t\t\n\t\twhile($data = $result->fetch_assoc())\n\t\t{\n\t\t\t//Find item level\n\t\t\t$level = substr_count($data['path'], '/') - 1;\n\n\t\t\t//If it is a file\n\t\t\tif($data['format']!='.dir')\n\t\t\t{\n\t\t\t\t$s_filename = Helper::sanitizeFilename($data['filename']);\n\t file_put_contents('./tmp/course_files/'.$s_filename, fopen($this->host.'/courses/'.$this->course['code'].'/document'.$data['path'], 'r'));\n\t\t\t\tHelper::addIMSItem($section, $this->manifest, $sectionCounter, $this->identifierCounter, $this->resourceCounter, 'file', $data, $level); \n\t\t\t}\n\t\t\t//If it is a directory\n\t\t\telse if($data['format']=='.dir')\n\t\t\t{\n\t\t\t\tHelper::addIMSLabel($section, $sectionCounter, $this->identifierCounter, $data['filename'], $level);\n\t\t\t}\n\t\t}\n\n\t\t//Proceed to next section\n\t\t$this->currentSectionCounter++;\n\t}",
"function FilesInDataBase_ID($Field,$ID){\n\t\t$query=\"SELECT * FROM `uploadinfo` WHERE `StudentID` = $ID ORDER BY `FileID` DESC\";\n\t\tif($result = mysql_query($query)){\n\t\t\t$num_of_rows=mysql_num_rows($result);\n\t\t\tfor($i=0;$i<$num_of_rows;$i++){\n\t\t\t\t$content=mysql_result($result,$i,$Field);\n\t\t\t\t$File_Field[$i]= $content;\n\t\t\t}\n\t\t\treturn $File_Field;\n\t\t}\n\t}",
"public function get_student_data_by_id($arg1)\n {\n\n $con=mysqli_connect(\"localhost\",\"root\",\"\",\"masterdb2\") or die(\"unable to connet\");\n $sql=\"SELECT `arid_reg_no`, `student_first_name`, `student_cnic`, `student_date_of_birth`, `student_religion`, `student_form_no`, `student_catagorey`, `categorey_of_reserved_seats`, `student_picture_path`, `student_joining_session`, `degree_id`, `student_section`, `student_current_session`, `student_gender`, `student_timing_shift`, `student_currunt_semester` FROM `students` WHERE `student_id`=$arg1\";\n $student_query_data=mysqli_query($this->con,$sql);\n $student_personale_data=mysqli_fetch_assoc($student_query_data);\n\n // echo \"<pre>\";\n // print_r($student_personale_data);\n /*2\n *Get data from father table\n */\n $sql1=\"SELECT `parent_id`, `parent_name`, `parent_cnic`, `parent_occupation`, `parent_annual_income` FROM `parents` WHERE `student_id`='$arg1'\";\n $student_parent=mysqli_query($this->con,$sql1);\n $student_parent_data=mysqli_fetch_assoc($student_parent);\n\n // echo \"<pre>\";\n // print_r($student_parent_data);\n /*3\n *Get data from student contacts table\n */\n $sql2=\"SELECT `student_contact_id`, `student_contact_phone_no`, `student_contact_mobile_no`, `student_contact_email`, `student_contact_permanent_address`, `student_contact_postal_address`, `student_contact_domicile_district`, `student_contact_domicile_province`, `student_contact_city`, `student_contact_nantionality`, `student_area` FROM `student_contacts` WHERE `student_id`='$arg1'\";\n $student_contact=mysqli_query($this->con,$sql2);\n $student_contact_data=mysqli_fetch_assoc($student_contact);\n\n // echo \"<pre>\";\n // print_r($student_contact_data);\n /*4\n *Get data from guardian table\n */\n $sql3=\"SELECT `guardian_id`, `guardian_name`, `guardian_relation`, `guardian_contact_no`, `emaergancey_guardian_name`, `emaergancey_guardian_relation`, `emaergancey_contact_no` FROM `guardians` WHERE `student_id`='$arg1'\";\n $student_guardian=mysqli_query($this->con,$sql3);\n $student_guardian_data=mysqli_fetch_assoc($student_guardian);\n\n // echo \"<pre>\";\n // print_r($student_guardian);\n /*5\n *Get data from student qualification table\n */\n $sql4=\"SELECT `qualification_id`, `qualification_level`, `qualification_degree_or_certificate`, `qualification_year_of_passing`, `borad_univeristy`, `qualification_marks_obtained`, `qualification_marks_total`, `qualification_grade`, `qualification_cgpa`, `qualification_major_subjects` FROM `students_qualifications` WHERE `student_id`='$arg1'\";\n $student_qualifications=mysqli_query($this->con,$sql4);\n $student_qualifications_data=mysqli_fetch_assoc($student_qualifications);\n\n // echo \"<pre>\";\n // print_r($student_guardian);\n /*6\n *Get data from student qualification table\n */\n $sql5=\"SELECT `entry_test_id`, `entry_test_name`, `entry_test_date`, `entry_test_marks`, `disciplinary_action` FROM `entry_tests` WHERE `student_id`='$arg1'\";\n $student_entry_test=mysqli_query($this->con,$sql5);\n $student_entry_test_data=mysqli_fetch_assoc($student_entry_test);\n\n // echo \"<pre>\";\n // print_r($student_entry_test);\n /*\n ***Here is the array of all 6 tables fetch data\n ***\n */\n $student_fetch_data=array($student_personale_data,$student_parent_data,$student_contact_data,$student_guardian_data,$student_qualifications_data,$student_entry_test_data);\n // echo \"<pre>\";\n // print_r($student_fetch_data);\n return $student_fetch_data;\n //echo $student_fetch_data[0]['student_first_name'];\n }",
"protected function fetchStorageRecords() {}",
"private function createRecords(){\r\n\t\t\r\n\t\t$fileNames = explode(',', $this->collection['images']);\r\n\t\t\r\n\t\tforeach($fileNames as $fileName){\r\n\t\t\t\t\r\n\t\t\tif(trim($fileName) && !isset($this->images[$fileName])){\r\n\t\t\t\t\r\n\t\t\t\t$newRecord = array(\r\n\t\t\t\t\t'pid' => $this->collection['pid'],\r\n\t\t\t\t\t'collection' => $this->collection['uid'],\r\n\t\t\t\t\t'crdate' => time(),\r\n\t\t\t\t\t'cruser_id' => $this->collection['cruser_id'],\r\n\t\t\t\t\t'image' => $fileName,\r\n\t\t\t\t\t'title' => $this->getTitleFromName($fileName)\r\n\t\t\t\t);\r\n\t\t\t\t$this->db->exec_INSERTquery('tx_gorillary_images', $newRecord);\r\n\t\t\t\t$newRecord['uid'] = $this->db->sql_insert_id();\r\n\t\t\t\t$this->images[$fileName] = $newRecord;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"public function get_shredfile_list($u_id){\n\t\t$this->db->select('shared_files.u_id,images.img_name,images.imag_org_name,shared_files.s_permission,shared_files.s_created')->from('shared_files');\n\t\t$this->db->join('images', 'images.img_id = shared_files.img_id', 'left');\n\t\t$this->db->where('shared_files.u_id', $u_id);\n\t\t$this->db->order_by(\"shared_files.s_created\", \"DESC\");\n\t\treturn $this->db->get()->result_array();\n\t\t}",
"function readDBFlatfile($pathDB='default') {\n\n\t\t// INIT RETURN VALUES\n\t\t$readFolders = $readImages = false;\n\n\t\t// GET DEFAULT PATH\n\t\tif ($pathDB === 'default') {\n\t\t\t$fDB = DATA_FOLDER .'mg2db_fdatabase.php';\n\t\t\t$iDB = DATA_FOLDER .'mg2db_idatabase.php';\n\t\t}\n\t\t// GET RESTORE PATH (ADMIN ONLY)\n\t\telseif ($backup = $this->getBackupPath($pathDB)) {\n\t\t\t$fDB = sprintf($backup, 'fdatabase');\n\t\t\t$iDB = sprintf($backup, 'idatabase');\n\t\t}\n\t\telse return array($readFolders, $readImages);\t// no valid path\n\n\t\t// ************************************ FOLDER DATABASE ************************************ //\n\n\t\t// RESET FOLDER ARRAY\n\t\t$this->all_folders = array();\n\t\t$this->folderautoid = 0;\n\n\t\t$now = time();\t// in order to check if the folder or image date in future\n\t\tdo {\n\t\t\tif (!is_file($fDB)) {\n\t\t\t\t$this->folderautoid = 1;\n\t\t\t\t$this->all_folders[$this->folderautoid] = $this->getDefaultRootFolder();\n\t\t\t\tbreak; \t\t\t\t\t\t\t\t// no data file\n\t\t\t}\n\n\t\t\t$fp = fopen($fDB,'rb');\n\t\t\tif (!is_resource($fp))\tbreak;\t// cannot open data file\n\n\t\t\t$num_records\t\t = 0;\n\t\t\t$this->folderautoid = (int)fgets($fp, 16);\n\t\t\tif (defined('USER_ADMIN')) {\n\t\t\t\twhile (!feof($fp)) {\n\t\t\t\t\tif (fgets($fp, 2) !== '#')\t\t\t\t\tcontinue;\t// no data row?\n\t\t\t\t\t$record = fgetcsv($fp, 4600, \"\\t\");\n\t\t\t\t\tif (($folderID = (int)$record[0]) < 1) continue;\t// invalid folder id\n\t\t\t\t\t$this->all_folders[$folderID] = $record;\n\t\t\t\t\t$num_records++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\twhile (!feof($fp)) {\n\t\t\t\t\tif (fgets($fp, 2) !== '#')\t\t\t\t\tcontinue;\t// no data row?\n\t\t\t\t\t$record = fgetcsv($fp, 4600, \"\\t\");\n\t\t\t\t\tif (($folderID = (int)$record[0]) < 1) continue;\t// invalid folder id\n\t\t\t\t\tif ((int)$record[4] > $now)\t\t\t\tcontinue;\t// date in future?\n\t\t\t\t\tif ((int)$record[5] < 0) \t\t\t\tcontinue;\t// folder locked?\n\t\t\t\t\t$this->all_folders[$folderID] = $record;\n\t\t\t\t\t$num_records++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfclose($fp);\n\t\t\t$readFolders = $num_records;\n\t\t}\n\t\twhile(0);\n\n\t\t// ************************************ IMAGE DATABASE ************************************ //\n\n\t\t// RESET IMAGE ARRAY\n\t\t$this->all_images\t= array();\n\t\t$this->autoid\t\t= 0;\n\n\t\tdo {\n\t\t\tif (!is_file($iDB)) \t\tbreak;\t// no data file\n\n\t\t\t$fp = fopen($iDB,'rb');\n\t\t\tif (!is_resource($fp))\tbreak;\t// cannot open data file\n\n\t\t\t$num_records = 0;\n\t\t\t$this->autoid = (int)fgets($fp, 16);\n\t\t\tif (defined('USER_ADMIN')) {\n\t\t\t\twhile (!feof($fp)) {\n\t\t\t\t\tif (fgets($fp, 2) !== '#')\t\t\t\t\tcontinue;\t// no data row?\n\t\t\t\t\t$record = fgetcsv($fp, 4600, \"\\t\");\n\t\t\t\t\tif (($imageID = (int)$record[0]) < 1)\tcontinue;\t// invalid image id\n\t\t\t\t\t$this->all_images[$imageID] = $record;\n\t\t\t\t\t$num_records++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\twhile (!feof($fp)) {\n\t\t\t\t\tif (fgets($fp, 2) !== '#')\t\t\t\t\tcontinue;\t// no data row?\n\t\t\t\t\t$record = fgetcsv($fp, 4600, \"\\t\");\n\t\t\t\t\tif (($imageID = (int)$record[0]) < 1)\tcontinue;\t// invalid image id\n\t\t\t\t\tif ((int)$record[4] > $now)\t\t\t\tcontinue;\t// date in future?\n\t\t\t\t\tif ((int)$record[5] < 0) \t\t\t\tcontinue;\t// folder locked?\n\t\t\t\t\t$this->all_images[$imageID] = $record;\n\t\t\t\t\t$num_records++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfclose($fp);\n\t\t\t$readImages = $num_records;\n\t\t}\n\t\twhile(0);\n\n\t\treturn array($readFolders, $readImages);\n\t}",
"public function allStudents()\n {\n\n $students = Student::all();\n return $students;\n\n\n\n }",
"function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) { // scandir() accepts the full path of the folder to be scanned\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\n\t\t\t\t// It is a hidden file\n\t\t\t\t\n\t\t\t\tcontinue; \n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t);\n\t\t\t}\n\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}",
"function getAllFiles($fileIdStr) {\n $fileInfoArray = array();\n $this->connection = $this->ConnectDB();\n if ($this->connection == NULL) {\n try {\n $this->CloseConnectionDB();\n } catch (Exception $exc) {\n \n }\n return $fileInfoArray;\n }\n $fileIdStr = trim($fileIdStr);\n if(strlen($fileIdStr) > 0 && $fileIdStr[strlen($fileIdStr)-1] == ',') {\n $fileIdStr = substr( $fileIdStr , 0, strlen($fileIdStr)-1);\n } \n \n if(strcmp($fileIdStr,\"\") == 0) {\n return $fileInfoArray;\n }\n \n $qry = \"SELECT * FROM files WHERE id_file in ($fileIdStr)\";\n \n $result = mysql_query($qry, $this->connection);\n\n if (!$result || mysql_num_rows($result) <= 0) {\n try {\n $this->CloseConnectionDB();\n } catch (Exception $exc) {\n \n }\n return $fileInfoArray;\n }\n\n while ($row = mysql_fetch_array($result)) {\n $fileInfo = new FileInfo();\n $fileInfo->setId($row['id_file']);\n $fileInfo->setName($row['name']);\n $fileInfo->setType($row['type']);\n $fileInfo->setSize($row['size']);\n $fileInfo->setLocation($row['location']);\n $fileInfo->setUploadDateTime($row['upload_date_time']);\n\n $fileInfoArray[] = $fileInfo;\n }\n\n try {\n $this->CloseConnectionDB();\n } catch (Exception $exc) {\n \n }\n\n return $fileInfoArray;\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}",
"function xcscandir($dir, &$expic_array)\r\n{\r\n static $dir_id = 0;\r\n static $count =0;\r\n static $pic_id=0;\r\n\r\n $pic_array = array();\r\n $dir_array = array();\r\n\r\n getfoldercontent($dir, $dir_array, $pic_array, $expic_array );\r\n\r\n if (count($pic_array) > 0){\r\n $dir_id_str=sprintf(\"d%04d\", $dir_id++);\r\n echo dirheader($dir, $dir_id_str);\r\n foreach ($pic_array as $picture) {\r\n $count++;\r\n $pic_id_str=sprintf(\"i%04d\", $pic_id++);\r\n echo picrow($dir.$picture, $pic_id_str, $dir_id_str );\r\n }\r\n }\r\n if (count($dir_array) > 0){\r\n foreach ($dir_array as $directory) {\r\n xcscandir($dir.$directory.'/', $expic_array);\r\n }\r\n }\r\n return $count;\r\n}",
"function dropbox_submitted_count($student_id)\n{\n global $class_id;\n /*/\n * SELECT dropbox_assignments.id, COUNT(dropbox_content.id) AS num_files\n * FROM dropbox_assignments\n * JOIN dropbox_content\n * ON dropbox_assignments.id = dropbox_content.assignment_id\n * WHERE class_id = $class_id\n * AND dropbox_content.student_id = $student_id\n * GROUP BY id\n /*/\n $ret = array();\n $assignments = good_query_table(\"SELECT dropbox_assignments.id, COUNT(dropbox_content.id) AS num_files FROM dropbox_assignments JOIN dropbox_content ON dropbox_assignments.id = dropbox_content.assignment_id WHERE class_id = $class_id AND dropbox_content.student_id = $student_id GROUP BY id\");\n foreach($assignments as $assignment)\n {\n $ret[$assignment['id']] = $assignment['num_files'];\n }\n return $ret;\n}",
"private function searchFiles()\n {\n $query = File::whereNull('deleted_at');\n $data = $query->get();\n\n return $data;\n }",
"function loadStudents($studentLoader)\n {\n $studentsData = $studentLoader->getAllStudents();\n foreach ($studentsData as $student) {\n $student = $studentLoader->createStudent($student);\n $students[] = $student;\n }\n if (!isset($students)) {\n return [];\n }\n return $students;\n }",
"public function readdata() \n {\n \n \n $dir = scandir($this->dirName);\n \n foreach($dir as $key => $data){\n if($key>1){ \n $batchsequence = false;\n if(substr($data, 0, 8)==Config('constants.bankingSuitFolder').'R')\n {\n $this->readReplyFile($data);\n //update `collections` set transaction_status=1 where transmission_status=2 and transaction_status=2\n \n }elseif(substr($data, 0, 8)==Config('constants.bankingSuitFolder').'O'){\n $this->readOutputFile($data);\n }\n }\n \n } \n }",
"public function getAll(): array\n {\n $response = $this->client->request('GET', $this->resourceUri);\n\n $json = json_decode((string)$response->getBody());\n\n $dirItemCollection = [];\n\n foreach ($json as $starredFile) {\n $dirItemCollection[] = (new DirectoryItem)->fromJson($starredFile);\n }\n\n return $dirItemCollection;\n }",
"public function &getFolders($folder)\n\t{\n\t\t$registry =& AEFactory::getConfiguration();\n\t\t$breakflag_before_process = $registry->get('volatile.breakflag', false);\n\n\t\t// Reset break flag before continuing\n\t\t$breakflag = false;\n\n\t\t// Initialize variables\n\t\t$arr = array();\n\t\t$false = false;\n\n\t\tif(!is_dir($folder) && !is_dir($folder.'/')) return $false;\n\n\t\t$counter = 0;\n\t\t$registry =& AEFactory::getConfiguration();\n\t\t$maxCounter = $registry->get('engine.scan.smart.large_dir_threshold',100);\n\n\t\t$allowBreakflag = ($registry->get('volatile.operation_counter', 0) != 0) && !$breakflag_before_process;\n\n\t\t$handle = @opendir($folder);\n\t\t/* If opening the directory doesn't work, try adding a trailing slash. This is useful in cases\n\t\t * like this: open_basedir=/home/user/www/ and the root is /home/user/www. Trying to scan\n\t\t * /home/user/www results in error, trying to scan /home/user/www/ succeeds. Duh!\n\t\t */\n\t\tif ($handle === FALSE) {\n\t\t\t$handle = @opendir($folder.'/');\n\t\t}\n\t\t// If directory is not accessible, just return FALSE\n\t\tif ($handle === FALSE) {\n\t\t\t$this->setWarning('Unreadable directory '.$folder);\n\t\t\treturn $false;\n\t\t}\n\n\t\twhile ( (($file = @readdir($handle)) !== false) && (!$breakflag) )\n\t\t{\n\t\t\tif (($file != '.') && ($file != '..'))\n\t\t\t{\n\t\t\t\t// # Fix 2.4: Do not add DS if we are on the site's root and it's an empty string\n\t\t\t\t$ds = ($folder == '') || ($folder == '/') || (@substr($folder, -1) == '/') || (@substr($folder, -1) == DIRECTORY_SEPARATOR) ? '' : DIRECTORY_SEPARATOR;\n\t\t\t\t$dir = $folder . $ds . $file;\n\t\t\t\t$isDir = is_dir($dir);\n\t\t\t\tif ($isDir) {\n\t\t\t\t\t$data = _AKEEBA_IS_WINDOWS ? AEUtilFilesystem::TranslateWinPath($dir) : $dir;\n\t\t\t\t\tif($data) $arr[] = $data;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$counter++;\n\t\t\tif($counter >= $maxCounter) $breakflag = $allowBreakflag;\n\t\t}\n\t\t@closedir($handle);\n\n\t\t// Save break flag status\n\t\t$registry->set('volatile.breakflag', $breakflag);\n\n\t\treturn $arr;\n\t}",
"function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) {\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\t\t\t\tcontinue; // Ignore hidden files\n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\t\t\t\t$path_info = pathinfo($f);\n\t\t\t\t//if ($path_info && $path_info.extension )\n\t\t\t\t$ext = $path_info['extension'];\n\t\t\t\tif($ext =='html'||$ext =='jpg' || $ext ==='png' || $ext == 'pdf'){\n\t\t\t\t\t$text = ($ext =='html') ?'doc':'image';\n\t\t\t\t\t$files[] = array(\n\t\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\t\"text\" => $text,\n\t\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}",
"public function getAllStudents() {\n try {\n if(BaseController::isLoggedIn() && BaseController::isTeacher()) { \n $user = new UserModel();\n $user->id = BaseController::getUserId();\n $user_data = $user->getUserDataById();\n \n $student = new StudentModel();\n $students = $student->getAllStudents();\n \n $model = array(\n 'user_data' => $user_data,\n 'students' => $students\n );\n BaseController::display(self::$controller . '/students.php', $model);\n } else {\n BaseController::load('user/login.php', array('error_description' => 'Изисква се регистрация.'));\n }\n } catch (Exception $e) {\n BaseController::load('error.php');\n }\n }",
"public function get_examApply_studentIds ($examId){\n $this->db->select('studentId');\n $this->db->from('exam_marks');\n $this->db->where('examId',$examId);\n $query1 = $this->db->get();\n $data = $query1->result_array();\n\n $studentIds = array('');\n\n foreach($data as $row){\n array_push($studentIds,$row['studentId']);\n }\n \n\n $this->db->where('examId',$examId);\n $this->db->where_not_in('studentId',$studentIds);\n $this->db->order_by('studentId','asc');\n $query = $this->db->get('exam_student_enroll');\n return $query->result_array();\n }",
"public function scanSourceFolders() {\n $this->addons = [];\n foreach ($this->sources as $sourceDir) {\n $this->scanSource($sourceDir);\n }\n }",
"public function getAllStudentsResults() {\n try {\n if(BaseController::isLoggedIn() && BaseController::isTeacher()) {\n $user = new UserModel();\n $user->id = BaseController::getUserId();\n $user_data = $user->getUserDataById();\n \n $student = new StudentModel();\n $results = $student->getAllStudentsResults();\n \n $model = array(\n 'user_data' => $user_data,\n 'results' => $results\n );\n BaseController::display(self::$controller . '/student-results.php', $model);\n } else {\n BaseController::load('user/login.php', array('error_description' => 'Изисква се регистрация.'));\n }\n } catch (Exception $e) {\n BaseController::load('error.php');\n }\n }",
"function fetchFileList() {\n try {\n global $db_table_prefix;\n\n $results = array();\n\n $db = pdoConnect();\n\n $query = \"SELECT\n id,\n path\n FROM \".$db_table_prefix.\"filelist\";\n\n $stmt = $db->prepare($query);\n\n if (!$stmt->execute()){\n // Error\n return false;\n }\n\n while ($r = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $i = $r['id'];\n $results[$i] = $r['path'];\n }\n $stmt = null;\n\n return $results;\n } catch (PDOException $e) {\n addAlert(\"danger\", \"Oops, looks like our database encountered an error.\");\n error_log(\"Error in \" . $e->getFile() . \" on line \" . $e->getLine() . \": \" . $e->getMessage());\n return false;\n } catch (ErrorException $e) {\n addAlert(\"danger\", \"Oops, looks like our server might have goofed. If you're an admin, please check the PHP error logs.\");\n return false;\n }\n}",
"public abstract function get_ids();",
"protected function fetchSOAPRecordsFromFolder($folder)\n {\n $fileList = array();\n foreach(scandir($folder) as $file) {\n if(substr($file, 0, 1) != '.') {\n $fileContent = file_get_contents($folder.'/'.$file);\n\n $doc = new \\DOMDocument;\n $doc->loadXML($fileContent, LIBXML_NOERROR);\n $doc->formatOutput = TRUE;\n $fileContentFormatted = $doc->saveXML();\n\n array_push($fileList, $fileContentFormatted);\n }\n }\n return $fileList;\n }",
"public function study_has_bulk_access($sid)\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('da_collections c');\t\n\t\t$this->db->join('da_collection_surveys cs', 'c.id = cs.cid','INNER');\n\t\t$this->db->where('cs.sid',$sid);\n\t\t$result=$this->db->get()->result_array();\n\n\t\treturn $result;\n\t}",
"protected function markStudents($exam)\n {\n $student_ids = $this->getRequest()->request->keys();\n $em = $this->getDoctrine()->getEntityManager();\n $invalid_records = array();\n for($i = 0; $i < count($student_ids); $i++)\n {\n $record = $this->getDoctrine()->getRepository(\"UnsapaIPWBundle:Record\")->findByExamAndStudentId($exam->getId(), $student_ids[$i]);\n\n if($record === NULL)\n throw $this->createNotFoundException(\"Étudiant inexistant.\");\n\n $mark = floatval($this->getRequest()->request->get($student_ids[$i]));\n $unpersistant_record = new Record();\n $unpersistant_record->setExam($record->getExam());\n $unpersistant_record->setStudent($record->getStudent());\n $unpersistant_record->setDocument($record->getDocument());\n $unpersistant_record->setMark($record->getMark());\n\n if(empty($mark))\n $unpersistant_record->setMark(NULL);\n else\n $unpersistant_record->setMark($mark);\n\n $validator = $this->get('validator');\n $errors = $validator->validate($unpersistant_record);\n if(count($errors) > 0)\n {\n array_push($invalid_records, $record);\n }\n else\n {\n $record->setMark($unpersistant_record->getMark());\n $em->persist($record);\n $em->flush();\n }\n }\n return $invalid_records;\n }",
"public function run()\n\t{\n\t\t$StudentRowset = Student::all();\n\t\t$count = 1;\n\t\t$subCount = 0;\n\t\tforeach ($StudentRowset as $StudentRow) {\n\n\t\t\tif ($subCount < 15) {\n\t\t\t\t$subCount += 1;\n\t\t\t} else {\n\t\t\t\t$subCount = 0;\n\t\t\t}\n\n\t\t\tif ($subCount == 0) {\n\t\t\t\t$count += 1;\n\t\t\t}\n\n\t\t\t$StudentRow->getCourseRowsetByRowset()->attach($StudentRow->id * $count);\n\t\t}\n\t}",
"private function listFolderFiles($dir){\n $children = false;\n $isRoot = false;\n if($dir==$this->file_storage){\n $isRoot = true;\n }\n\n $folderName = $this->getFolderName($dir);\n if(!$isRoot){\n //$this->info('Directory Name: '.$folderName['child']);\n //$this->info('Parent Name: '.$folderName['parent']);\n }\n\n //$this->info('Folder: '.$dir);\n\n foreach (new \\DirectoryIterator($dir) as $fileInfo) {\n if (!$fileInfo->isDot()) {\n if ($fileInfo->isDir()) {\n $this->listFolderFiles($fileInfo->getPathname());\n }else{\n $rename = false;\n //$this->info('File: '.$fileInfo->getFilename());\n //$info = new SplFileInfo($dir.'/'.$fileInfo->getFilename());\n $ext = \".\".pathinfo($fileInfo->getFilename(), PATHINFO_EXTENSION);\n //$ext = \".\"$info->getExtension();\n //$this->info('File: extension '.$ext);\n $filebreak = str_replace($ext,\"\",$fileInfo->getFilename());\n if (strpos($filebreak, '.') !== false || strpos($filebreak, \"'\") !== false || strpos($filebreak, \"#\") !== false) {\n $rename = true;\n }\n if($rename){\n $replace = array(\".\", \"'\", \"#\", \";\", \"/\", \"?\", \":\", \"@\", \"=\", \"&\", \",\");\n //“;”, “/”, “?”, “:”, “@”, “=” and “&\n $fileraw = str_replace($replace,\" \",$filebreak);\n //$this->info('File: raw '.$fileraw);\n $newfilename = $fileraw . $ext;\n //$this->info('File: new '.$newfilename);\n $prod_filename = $newfilename;\n rename($dir.'/'.$fileInfo->getFilename(),$dir.'/'.$newfilename);\n }else{\n $prod_filename = $fileInfo->getFilename();\n }\n $this->checkFileExtension($dir.'/'.$prod_filename, $prod_filename, $dir);\n }\n $children = true;\n }else{\n $children = false;\n }\n }\n //$this->info('Children: '.$children);\n\n if(!$isRoot){\n $this->folders[$this->count]['name'] \t\t\t= $folderName['child'];\n $this->folders[$this->count]['parent'] \t\t= $folderName['parent'];\n $this->folders[$this->count]['full_path']\t= $dir;\n $this->folders[$this->count]['children']\t= $children;\n $this->count++;\n }\n //$this->info('#################');\n }",
"public function test_scan_files()\n {\n $content = array('.gitignore','.htaccess','index.php','README');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_FILES);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\File', $dir);\n }\n }",
"function directory_scan($directory, $withfiles) {\n\t$scanned_directory = array_diff(scandir($directory), array(\"..\", \".\")); //This removes all of the unessesary results\n\n\tfor ($i = 0; ($i < count(scandir($directory))) && $withfiles == true; $i = $i + 1) {\n\t\tif (isset($scanned_directory[$i]) && (is_dir($directory . \"/\" . $scanned_directory[$i]) == FALSE)) { // If current item is a file, make it a download link\n\t\t\techo \"<div class='fileDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='movefrom[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/file.svg' class='foldersvg'/>\";\n\t\t\techo \"<p class='fileLink'>\" . $scanned_directory[$i] . \"</p>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='fileinfo'><b>Type</b>: \" . mime_content_type($directory. \"/\" . $scanned_directory[$i]) . \" <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 0) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\t\t\t\n\t\t\techo \"</div>\";\n\t\t} else if (isset($scanned_directory[$i]) && $directory . \"/\" . $scanned_directory[$i] != \"uploads/\" . $_SESSION[\"username\"] . \"/Trash\") { // Makes this a special dir box if a item is folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='movefrom[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\techo \"<input type='button' class='folderButton' value='\" . $scanned_directory[$i] . \"' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Type</b>: Folder <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 1) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\n\t\t\techo \"</div>\"; \n\t\t}\n\t}\n\t\n\tfor ($i = 0; ($i < count(scandir($directory))) && $withfiles == false; $i = $i + 1) { //$withfiles only outputs files when true. when false, it will output files and folders. This is for the right-side of the page\n\t\tif ($i==0 && $directory != \"uploads/\" . $_SESSION[\"username\"]) { //when $i gets to its first iteration, output the \"back a directory\" folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='moveto[../]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\techo \"<input type='button' class='folderButton' value='../' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Info</b>: Selecting this will move your selection back a folder.</p> \";\n\t\t\techo \"</div>\";\n\t\t}\n\t\t\n\t\tif (isset($scanned_directory[$i]) && is_dir($directory . \"/\" . $scanned_directory[$i])) { // Makes this a special dir box if an item is folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='moveto[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\tif ($directory . \"/\" . $scanned_directory[$i] == \"uploads/\" . $_SESSION[\"username\"] . \"/Trash\") {\n\t\t\t\techo \"<img src='Assets/SVG/bin.svg' class='foldersvg'/>\";\n\t\t\t} else {\n\t\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\t}\n\t\t\techo \"<input type='button' class='folderButton' value='\" . $scanned_directory[$i] . \"' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Type</b>: Folder <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 1) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\n\t\t\techo \"</div>\";\n\t\t}\n\t}\n\n}",
"function sidsearch($sid){\r\n\t\tif ($this->db->get_where('user',array('member_id'=>$sid))->num_rows()==1){\r\n\t\t\t$uid = end($this->db->get_where('user',array('member_id'=>$sid))->result())->id;\r\n\t\t\t$user_info = $this->db->get_where('user_info',array('uid'=>$uid))->row_array();\r\n\t\t\t$user_info['appendix'] = unserialize($user_info['appendix']);\r\n\t\t\tif (isset($user_info['appendix']['ulib']['comp_id']) && is_numeric($user_info['appendix']['ulib']['comp_id'])){\r\n\t\t\t\t$registered = TRUE;\r\n\t\t\t}else{\r\n\t\t\t\t$registered = FALSE;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//generate output\r\n\t\t\t$output = array('en' => $user_info['enn'],\r\n\t\t\t\t\t\t\t'fn' => $user_info['cnfn'],\r\n\t\t\t\t\t\t\t'ln' => $user_info['cnln'],\r\n\t\t\t\t\t\t\t'msg' => 'Target located',\r\n\t\t\t\t\t\t\t'code' => 0,\r\n\t\t\t\t\t\t\t'regi' => $registered,\r\n\t\t\t\t\t\t\t'class' => $user_info['appendix']['class']\r\n\t\t\t);\r\n\t\t}\r\n\t\t//get unregistered user information\r\n\t\telseif ($this->db->get_where('user_veri',array('member_id'=>$sid))->num_rows()==1){\r\n\t\t\t//get app\r\n\t\t\t$user_info = $this->db->get_where('user_veri',array('member_id'=>$sid))->row_array();\r\n\t\t\t$user_info['appendix'] = unserialize($user_info['appendix']);\r\n\t\t\tif (isset($user_info['appendix']['ulib']['comp_id']) && is_numeric($user_info['appendix']['ulib']['comp_id'])){\r\n\t\t\t\t$registered = TRUE;\r\n\t\t\t}else{\r\n\t\t\t\t$registered = FALSE;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$output = array('en' => $user_info['enn'],\r\n\t\t\t\t\t\t\t'fn' => $user_info['cnfn'],\r\n\t\t\t\t\t\t\t'ln' => $user_info['cnln'],\r\n\t\t\t\t\t\t\t'msg' => 'Target located',\r\n\t\t\t\t\t\t\t'code' => 0,\r\n\t\t\t\t\t\t\t'regi' => $registered,\r\n\t\t\t\t\t\t\t'class' => $user_info['appendix']['class']\r\n\t\t\t);\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$output = array('msg' => \"Not yet matched\",\r\n\t\t\t\t\t\t\t'code' => 100\r\n\t\t\t);\r\n\t\t}\r\n\t\t\r\n\t\treturn $output;\r\n\t}",
"protected function parse_csv_data(string $root_path, string $table_name)\n {\n // get the files\n $FILES = scandir($root_path);\n $FILES = array_diff(scandir($root_path), array('.', '..'));\n\n // scan each file and store into contaner\n $container = [];\n foreach($FILES as $file):\n\n // Get the complete path\n $COMPLETE_PATH = $root_path . $file;\n\n // Process each listing in the CSV file\n clearstatcache();\n if(filesize($COMPLETE_PATH)):\n\n $FILE_CONTENT = file_get_contents($COMPLETE_PATH); \n $COLUMN_NAME_COUNT = 0;\n\n while($dup_pos = strpos($FILE_CONTENT, \"()\")) {\n $FILE_CONTENT = substr_replace($FILE_CONTENT, \"UNKNOWN\" . $COLUMN_NAME_COUNT, $dup_pos, 2);\n $COLUMN_NAME_COUNT += 1;\n }\n file_put_contents($COMPLETE_PATH, $FILE_CONTENT);\n\n // pull csv data\n $csv = Reader::createFromPath($COMPLETE_PATH, 'r');\n $csv -> setHeaderOffset(0);\n $stmt = (new Statement()) -> offset(0);\n\n //process each listing entry\n $LISTINGS = $stmt -> process($csv);\n $data_obj = array(\n 'status' => true,\n 'tb_name' => $table_name,\n 'data' => $LISTINGS\n ); \n\n // store into container\n array_push($container, $data_obj); \n endif;\n endforeach;\n\n // return\n return $container;\n }"
] | [
"0.6626312",
"0.5772552",
"0.5551689",
"0.5516066",
"0.54075825",
"0.5361266",
"0.53024673",
"0.5262366",
"0.52584785",
"0.5188217",
"0.51165456",
"0.51117533",
"0.50930315",
"0.50889266",
"0.5075992",
"0.507278",
"0.5050092",
"0.50408554",
"0.5021227",
"0.5010898",
"0.49974826",
"0.49949044",
"0.49927753",
"0.49896923",
"0.4987649",
"0.49766108",
"0.4970111",
"0.49688706",
"0.4963002",
"0.49564543",
"0.49525657",
"0.49364677",
"0.4930362",
"0.4929558",
"0.4922309",
"0.49220827",
"0.49213928",
"0.49182478",
"0.49108252",
"0.4896266",
"0.48798922",
"0.48740077",
"0.48684683",
"0.48632482",
"0.48543462",
"0.4846765",
"0.48343718",
"0.48241824",
"0.47961202",
"0.47880235",
"0.47776142",
"0.47720107",
"0.4770009",
"0.47622615",
"0.4759872",
"0.4759107",
"0.4758268",
"0.47558782",
"0.4753719",
"0.4752531",
"0.47472686",
"0.47439227",
"0.4737332",
"0.47343192",
"0.47323224",
"0.4718788",
"0.47122166",
"0.46959472",
"0.46936142",
"0.46835536",
"0.4679972",
"0.467953",
"0.46764973",
"0.46657023",
"0.46628958",
"0.46609873",
"0.46583512",
"0.465696",
"0.46523252",
"0.46495876",
"0.46449795",
"0.46378836",
"0.463592",
"0.46252134",
"0.46242517",
"0.4606157",
"0.45993245",
"0.4595745",
"0.45942244",
"0.4589389",
"0.4583339",
"0.45783168",
"0.45772365",
"0.4574709",
"0.45690718",
"0.45661825",
"0.45615652",
"0.45573258",
"0.45487207",
"0.45457703"
] | 0.5496636 | 4 |
Scan & store all students that exist in all the records. Basically get all student ids(filenames) in each folder. | function scan_students()
{
$current_students = [];
$di = new RecursiveDirectoryIterator('students/');
foreach (new RecursiveIteratorIterator($di) as $filename => $file) {
$path_info = pathinfo($filename);
if($path_info['extension']=='json'){
array_push($current_students,$path_info['filename']);
}
}
// echo print_r($current_students);
return $current_students;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function scanFolder()\n {\n return scandir($this->currentPath);\n }",
"function scan_files( ){\n\n // List of all the audio files found in the directory and sub-directories\n $audioFileArray = array();\n\n // List of filenames already handled during the scan. To detect dupe filenames.\n $alreadyhandledFileArray = array();\n\n // Make list of all files in db to remove non existent files\n $DBaudioFileArray = array();\n foreach ( $this->get_list_of_files()->fetchAll() as $row ) {\n $DBaudioFileArray[] = $row['filename'];\n }\n\n // Prepare variables for file urls\n //$base_dir = dirname(dirname(realpath($this->filedirectorypath))); // Absolute path to your installation, ex: /var/www/mywebsite\n $doc_root = preg_replace(\"!{$_SERVER['SCRIPT_NAME']}$!\", '', $_SERVER['SCRIPT_FILENAME']); # ex: /var/www\n $protocol = empty($_SERVER['HTTPS']) ? 'http' : 'https';\n $port = $_SERVER['SERVER_PORT'];\n $disp_port = ($protocol == 'http' && $port == 80 || $protocol == 'https' && $port == 443) ? '' : \":$port\";\n $domain = $_SERVER['SERVER_NAME'];\n // variables for file urls\n\n // Create recursive dir iterator which skips dot folders\n $dir = new RecursiveDirectoryIterator( $this->filedirectorypath , FilesystemIterator::SKIP_DOTS);\n\n // Flatten the recursive iterator, consider only files, no directories\n $it = new RecursiveIteratorIterator($dir);\n\n // Find all the mp3 files\n foreach ($it as $fileinfo) {\n if ($fileinfo->isFile() && !strcmp($fileinfo->getExtension(), \"mp3\")) {\n $audioFileArray[] = $fileinfo;\n\n //Warning: files with same md5key in different folders will not be inserted into the db.\n //print md5_file($fileinfo) . \"<br />\\n\";\n }\n }\n\n foreach ($audioFileArray as $key => $fileinfo) {\n\n $filename = $fileinfo->getFilename();\n\n //For each file found on disk remove entry from list from DB\n // if any left at the end, they are files that no longer are present on the drive.\n //print \"unsetting: \" . $filename . \"<br>\";\n unset($DBaudioFileArray[array_search($filename,$DBaudioFileArray,true)]);\n\n // check file not in db\n if( !$this->is_file_in_db( $filename ) ) {\n\n //decode filename date if named according to our naming scheme\n $date = $this->decode_filename($filename);\n\n // Build file url based on server path\n $filepath = realpath($fileinfo->getRealPath());\n $base_url = preg_replace(\"!^{$doc_root}!\", '', $filepath); # ex: '' or '/mywebsite'\n $full_url = \"$protocol://{$domain}{$disp_port}{$base_url}\"; # Ex: 'http://example.com', 'https://example.com/mywebsite', etc.\n\n //print $filename . \" - \" . $full_url . \"<br />\\n\";\n\n //insert audiofile in db for first time\n $this->insert_new_file_into_db( $filename, $full_url, $fileinfo->getRealPath(), $fileinfo->getSize(), $date );\n\n $alreadyhandledFileArray[$key] = $filename;\n\n } else {\n // if file in alreadyhandled array, then duplicate named files have been found\n // how to check for duplicate file names?\n // if we're here then the name has already ben added to the db (but maybe during a previous run)\n //we still need to look for the file in the alreadyhandledFileArray\n if( in_array($filename, $alreadyhandledFileArray) ){\n // flag file\n $this->flag_file($filename, \"Il y a 2 ou plusieurs fichiers audio avec le même nom dans le dossier audio du serveur ftp. Veuillez changer les noms ou supprimer les doublons.\");\n }\n }\n\n\n }\n\n // If there are files from the database that weren't found in the audio folder,\n // flag them and add a comment stating that the file can no longer be found.\n if( count($DBaudioFileArray) ){\n //print_r($DBaudioFileArray);\n foreach($DBaudioFileArray as $key => $fn){\n $this->flag_file($fn, \"Le fichier en question n'est plus présent dans le dossier audio du serveur ftp. Il faut le supprimer de la base de données.\");\n $this->set_file_not_new($fn);\n }\n }\n\n return true;\n }",
"public function get_students($ids)\n\t\t{\n\t\t\t$students=array();\n\t\t\tforeach ($ids as $row){\n\t\t\t\n\t\t\t\t$students[]=$this->create_student($this->conn->get($row));\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn $students;\n\t\t}",
"function find_by_val($field,$value)\n {\n $arr1=[];\n $found=[];\n $seek = scan_students();\n foreach ($seek as $student => $id) {\n $dir = \"students/\".substr($id,0,2);\n $arr1 = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . $dir .\"/\". $id. \".json\"),true);\n if($arr1[$field] == $value) { $found = $arr1;}\n }\n if(!empty($found))\n echo print_r($found);\n else\n err(\"Student Not Found.\\00[0m This student doesn't exist.\");\n return $found;\n }",
"public function get_student_list_of_logged_in_parent() {\n\t\t$parent_id = $this->session->userdata('user_id');\n\t\t$parent_data = $this->db->get_where('parents', array('user_id' => $parent_id))->row_array();\n\t\t$checker = array(\n\t\t\t'parent_id' => $parent_data['id'],\n\t\t\t'session' => $this->active_session,\n\t\t\t'school_id' => $this->school_id\n\t\t);\n\t\t$students = $this->db->get_where('students', $checker)->result_array();\n\t\tforeach ($students as $key => $student) {\n\t\t\t$checker = array(\n\t\t\t\t'student_id' => $student['id'],\n\t\t\t\t'session' => $this->active_session,\n\t\t\t\t'school_id' => $this->school_id\n\t\t\t);\n\t\t\t$enrol_data = $this->db->get_where('enrols', $checker)->row_array();\n\n\t\t\t$user_details = $this->db->get_where('users', array('id' => $student['user_id']))->row_array();\n\t\t\t$students[$key]['student_id'] = $student['id'];\n\t\t\t$students[$key]['name'] = $user_details['name'];\n\t\t\t$students[$key]['email'] = $user_details['email'];\n\t\t\t$students[$key]['role'] = $user_details['role'];\n\t\t\t$students[$key]['address'] = $user_details['address'];\n\t\t\t$students[$key]['phone'] = $user_details['phone'];\n\t\t\t$students[$key]['birthday'] = $user_details['birthday'];\n\t\t\t$students[$key]['gender'] = $user_details['gender'];\n\t\t\t$students[$key]['blood_group'] = $user_details['blood_group'];\n\t\t\t$students[$key]['class_id'] = $enrol_data['class_id'];\n\t\t\t$students[$key]['section_id'] = $enrol_data['section_id'];\n\n\t\t\t$class_details = $this->crud_model->get_class_details_by_id($enrol_data['class_id'])->row_array();\n\t\t\t$section_details = $this->crud_model->get_section_details_by_id('section', $enrol_data['section_id'])->row_array();\n\n\t\t\t$students[$key]['class_name'] = $class_details['name'];\n\t\t\t$students[$key]['section_name'] = $section_details['name'];\n\t\t}\n\t\treturn $students;\n\t}",
"public function loadStudents(){\n $data=$this->studentsInRiskForThis();\n $cantidad=count($data);\n $contador=0;\n foreach($data as $fila){\n IF(Talleresdet::firstOrCreateStatic([\n 'talleres_id'=>$this->id,\n 'codalu'=>$fila['codalu'],\n ], Talleresdet::SCENARIO_BATCH ))\n $contador++; \n }\n return ['total'=>$cantidad,'contador'=>$contador];\n }",
"function list_fileid($sid)\r\n {\r\n $this->db->select(\"file_id\");\r\n $this->db->where(\"sid\",$sid);\r\n\t\t$result=$this->db->get(\"data_files\")->result_array();\r\n\t\t\r\n\t\t$output=array();\r\n\t\tforeach($result as $row){\r\n\t\t\t$output[]=$row['file_id'];\r\n\t\t}\r\n\r\n\t\treturn $output;\r\n\t}",
"function get_files($instructor=False, $sources=array('class', 'lab', 'project', 'exam', 'review', 'capstone', 'continued-lab'), $file_path = '.', $access=array(), $virtual=array(), $categories=array(), $secret='really') {\n $results = array();\n $basedir = scandir($file_path);\n foreach ($sources as $i => $l0) {\n if (in_array($l0, $basedir) && is_dir($file_path . '/' . $l0)) {\n $level1 = scandir($file_path . '/' . $l0);\n sort($level1);\n foreach ($level1 as $i => $l1) {\n if (substr($l1, 0, 1) != '.' && is_dir($file_path . '/' . $l0 . '/' . $l1)) {\n // The following code allows the system recursively look through the Directory\n // structure within a class, and the system can now process RELATIVE links\n // that go into those subordinate directories\n $level2 = array();\n try {\n $Iterator = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($file_path . '/' . $l0 . '/' . $l1),\n RecursiveIteratorIterator::LEAVES_ONLY,\n RecursiveIteratorIterator::CATCH_GET_CHILD);\n foreach($Iterator as $name => $object) {\n $name = explode(\"/\", $name);\n unset($name[2]);\n unset($name[1]);\n unset($name[0]);\n $name = implode(\"/\", $name);\n $level2[] = $name;\n }\n } catch (Exception $e) {\n // Unable to recurse, so don't bother...\n }\n //$level2 = scandir($file_path . '/' . $l0 . '/' . $l1);\n $results[$l0][$l1] = array();\n sort($level2);\n foreach ($level2 as $i => $l2) {\n $key = sha1($secret.$l0.$l1.$l2);\n if (substr($l2, 0, 1) != '.' && validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access)[0]) {\n if (is_link($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2)) {\n if (validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access)[0]) {\n $vf = validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access);\n $category = categorize_file($instructor, $l2, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2),\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n } else {\n $vf = validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access);\n $category = categorize_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n }\n # Add Virtual files, format like array('class'=>array(1 => array(array('answers.html', 'homework/answers05.html'))))\n foreach ($virtual as $l0 => $l1array) {\n if (isset($results[$l0])) {\n $classes = array_keys($results[$l0]);\n foreach ($l1array as $day => $l2array) {\n if (isset($classes[$day-1])) {\n foreach ($l2array as $i => $values) {\n $virt_file = $values[0];\n $real_file = $values[1];\n if (validate_file($instructor, $real_file, $real_file, $access)[0]) {\n $key = sha1($secret.$real_file.$virt_file);\n $vf = validate_file($instructor, $real_file, $real_file, $access);\n $category = categorize_file($instructor, $virt_file, $real_file, $vf[5], $categories);\n $results[$l0][$classes[$day-1]][$virt_file] = array('actual' => $real_file,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n #####################################################\n # Verify that the class is not blocked by security...\n $today = getdate();\n foreach ($results as $l0 => $classes) {\n $counter = 1;\n foreach ($classes as $l1 => $data) {\n foreach ($data as $filename => $fdata) {\n if ($fdata['year'] == 1 && $fdata['month'] == 1 && $fdata['day'] == 1) {\n $cate = $fdata['category'];\n if (isset($access[$l0.\"_\".$counter]) && $cate == 'title') {\n $sspec = $l0.\"_\".$counter;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$cate])) {\n $sspec = $l0.\"_\".$counter.\"/\".$cate;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$filename])) {\n $sspec = $l0.\"_\".$counter.\"/\".$filename;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/all\"])) {\n $sspec = $l0.\"_\".$counter.\"/all\";\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n }\n }\n }\n $counter++;\n }\n }\n return $results;\n }",
"function get_smsstudents_by_ids($inputarray = array()) {\n $sql = \"select * from student_records where id in(\" . implode(',', $inputarray) . \")\";\n //log_message('error', 'get_smsstudents_by_ids '.$sql);\t\t\n $res = $this->db->query($sql);\n return $res->result();\n }",
"public function getStudentsForPath($path_id) {\n return $this->get('get_students_for_path', ['path_id' => $path_id]);\n }",
"public function list_shared_files_with() {\n $stmt = $this->pdo->prepare('select filename, name from share s, user u, file f where s.user_id = :id and s.owner_id = u.id and s.file_id = f.id');\n $stmt->bindValue(':id', $this->id);\n $stmt->execute();\n $res = $stmt->fetchAll();\n $result = array();\n foreach ($res as $f) {\n array_push($result, array('filename' => $f['filename'],\n 'username' => $f['name']));\n }\n return $result;\n }",
"public function listDirectoryPicturesAndApplyId() \n {\n if (is_dir($this->picturesFolder)){\n $this->files = scandir($this->picturesFolder);\n } else {\n echo 'No image directory';\n }\n \n $values = array();\n foreach ($this->files as $key => $var) {\n if (($var === '.') || ($var === '..') || (substr($var, -4, 1) !== '.')) {\n unset($this->files[$key]);\n } else {\n $id = $this->generateRandomKey();\n $values[] = array(\n 'id' => $id, \n 'picture' => $this->files[$key], \n 'qrcode' => $id . '-qrcode' . $this->outputFileExtension\n ); \n }\n }\n $this->files = $values;\n return (array) $this->files;\n }",
"public function getGroupFilesFromDatabase() {\n $db = \\Helper::getDB();\n $db->where('g.groupId', $db->escape($this->getId()));\n $db->join('documents d', 'd.id = g.documentId', 'LEFT');\n $db->join('users u', 'u.id = d.ownerId', 'LEFT');\n $results = $db->get('group_documents g', NULL, 'd.*, u.*, d.id AS fileId, u.id AS userId');\n // Process all files and their owners\n foreach($results as $result) {\n $user = new \\Models\\User($result['userId'], $result['username'], $result['email'], $result['firstName'], $result['lastName'], $result['lastLogin']);\n $file = new \\Models\\File($result['fileId'], $result['type'], $result['title'], $user, $result['creationDate'], $result['modificationDate'], $result['file']);\n $this->addFile($file);\n }\n }",
"function rScanDir($scanMe) {\r\n\t\tglobal $path, $tmpPath, $cur_folder, $tags2;\r\n\t\tforeach($scanMe as $folder)\r\n\t\t{\r\n\t\t\tif(is_dir($path.$tmpPath.$folder) && $folder !=\".\" && $folder !=\"..\")\r\n\t\t\t{\r\n\t\t\t\t$cur_folder[] = $tmpPath.$folder;\r\n\t\t\t\techo \"getTagString input:\".$tmpPath.$folder.\"<br/>\";\r\n\t\t\t\t$tags2[] = getTagString($tmpPath.$folder);\r\n\t\t\t\t$tmpPath .= $folder.\"/\";\r\n\t\t\t\trScanDir(scandir($path.$tmpPath));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\"));\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\")+1);\r\n\t}",
"function viewAllAttachedFiles($sessionID, $studentID){\r\n $allFiles = array();\r\n $someFiles = array();\r\n $file = array();\r\n $contacts=$this->getStudentsContacts($studentID);\r\n for($i = 0; $i < sizeof($contacts); $i++){\r\n $contactID = $contacts[$i];\r\n $contact = $this->viewContact('',$contactID);\r\n $contactDate = $contact['DateCreated'];\r\n if(!empty($contactID)){\r\n unset($someFiles);\r\n $someFiles = $this->viewAttachedFiles('',$contactID); \r\n for($j = 0; $j < sizeof($someFiles); $j++){\r\n unset($file);\r\n $file['fileid'] = $someFiles[$j];\r\n $file['contactid'] = $contactID;\r\n $file['name'] = $this->getAttachedFileName($someFiles[$j]);\r\n $file['date'] = $contactDate;\r\n array_push($allFiles,$file);\r\n }\r\n }\r\n }\r\n return($allFiles);\r\n\t}",
"function get_all_by_survey($sid)\r\n {\r\n $this->db->select(\"*\");\r\n $this->db->where(\"sid\",$sid);\r\n return $this->db->get(\"data_files\")->result_array();\r\n }",
"function searchforStudents() {\n $searchId = Input::get('sid');\n\n /* get project title according to the group's id */\n $protitle = DB::table('projects')\n ->where('groupID', $searchId)\n ->Where('status', 'Approved')\n ->pluck('title');\n\n /* get project id according to the group's id */\n $proid = DB::table('projects')\n ->where('title', $protitle)\n ->Where('status', 'Approved')\n ->pluck('id');\n\n /* mail adds. of members in the group */\n $groupmails = DB::table('research_groups')\n ->where('groupID', $searchId)\n ->pluck('mails');\n\n $explodedemails = explode(\"/\", $groupmails);\n $sendids = '';\n $sendnames = '';\n \n foreach ($explodedemails as $mail) {\n $id = (DB::table('students')\n ->where('email', $mail)\n ->pluck('regId'));\n\n $sendids .= $id . '/';\n\n /* get student name according to the student's id */\n $stuname = (DB::table('students')\n ->where('email', $mail)\n ->pluck('name'));\n $sendnames .= $stuname . '/';\n }\n \n $explodedsendids = explode(\"/\", rtrim($sendids, \"/\"));\n $explodedsendnames = explode(\"/\", rtrim($sendnames, \"/\"));\n $los = DB::table('settings')->first();\n \n $data = array(\"title\" => $protitle, \"pid\" => $proid, \"sname\" => $explodedsendnames,\n \"noofstu\" => sizeof($explodedemails), \"ids\" => $explodedsendids,\n \"ledrid\" => $explodedsendids[0], \"los\" => $los);\n return json_encode($data);\n }",
"public function list_shared_files() {\n $stmt = $this->pdo->prepare('select filename, name from share s, user u, file f where s.owner_id = :id and s.user_id = u.id and s.file_id = f.id');\n $stmt->bindValue(':id', $this->id);\n $stmt->execute();\n $res = $stmt->fetchAll();\n $result = array();\n foreach ($res as $f) {\n array_push($result, array('filename' => $f['filename'],\n 'username' => $f['name']));\n }\n return $result;\n }",
"public function student_list()\n {\n $grade = $this->input->post('grade');\n $name = $this->input->post('class');\n\n\n $classId = $this->Class_model->getClassId($grade, $name);\n\n $file = $_FILES['file']['tmp_name'];\n\n\n $handle = fopen($file, \"r\");\n\n\n while (($fileop = fgetcsv($handle, 1000, \",\")) !== false) {\n\n if ($fileop[0] != 'index') {\n\n $index = $fileop[0];\n $fname = $fileop[1];\n $lname = $fileop[2];\n $address = $fileop[3];\n $tele = $fileop[4];\n $data = array(\n 'index' => $index,\n 'fname' => $fname,\n 'lname' => $lname,\n 'address' => $address,\n 'tel' => $tele,\n );\n\n $res = $this->Student_model->insertStudent($data);\n\n if ($res == 1) {\n $data = array(\n 'Student_index' => $index,\n 'Class_id' => $classId\n );\n $res = $this->Student_Class_model->registerStudentsToClass($data);\n\n\n }\n if ($res == 1) {\n echo 'File uploaded successfully';\n }\n\n };\n\n }\n\n }",
"public function fetchAllClassIds ()\r\n {\r\n $member_id = $this->getMember_id(true);\r\n $student_class_obj = new Acad_Model_StudentClass();\r\n $student_class_obj->setMember_id($member_id);\r\n return $student_class_obj->fetchClassIds();\r\n }",
"public function find_students(\n string $keyword,\n string $order_by = 'forename',\n $order_dir = self::ORDER_ASC,\n $page = 0,\n $limit = 50,\n &$total_students_count = null\n ) {\n $order_by = htmlentities($order_by);\n $order_dir = $order_dir == self::ORDER_ASC ? 'ASC' : 'DESC';\n $query_string = \n \"SELECT forename, surname, group_id, exam_results\n FROM students\n WHERE CONCAT(forename, ' ', surname, ' ', group_id, ' ', exam_results)\n LIKE :keyword\n ORDER BY $order_by $order_dir\n LIMIT :limit_start, :limit_end\";\n $query = $this->db->prepare($query_string);\n $query->bindValue(':keyword', \"%{$keyword}%\", \\PDO::PARAM_STR);\n $query->bindValue(':limit_start', $page * $limit, \\PDO::PARAM_INT);\n $query->bindValue(':limit_end', $limit, \\PDO::PARAM_INT);\n $query->execute();\n\n $students = array();\n while ($row = $query->fetch(\\PDO::FETCH_NUM)) {\n $student = new Student;\n $student->forename = $row[0];\n $student->surname = $row[1];\n $student->group_id = $row[2];\n $student->exam_results = $row[3];\n array_push($students, $student);\n }\n\n $query->closeCursor();\n\n if (isset($total_students_count)) {\n if ($page == 0 && count($students) < $limit) {\n $total_students_count = count($students);\n } else {\n $query_string = \n \"SELECT COUNT(*)\n FROM students\n WHERE CONCAT(forename, ' ', surname, ' ', group_id, ' ', exam_results)\n LIKE :keyword\n ORDER BY $order_by $order_dir\";\n $query = $this->db->prepare($query_string);\n $query->bindValue(':keyword', \"%{$keyword}%\", \\PDO::PARAM_STR);\n $query->execute();\n\n $total_students_count = intval($query->fetch(\\PDO::FETCH_NUM)[0]);\n\n $query->closeCursor();\n }\n }\n\n return $students;\n }",
"public static function getStudents() {\n\t\t$idm = PSU::get('idmobject');\n\n\t\t$search = array(\n\t\t\tarray('pa.attribute' => 'els_student'),\n\t\t\tarray('pa.type_id' => '2')\n\t\t);\n\n\t\t$return = 'i.pid,i.psu_id,i.username,i.first_name,i.last_name,l.start_date,l.end_date';\n\n\t\t$students = $idm->getUsersByAttribute( $search, 'AND', $return );\n\n\t\tarray_walk( $students, array('ELS', 'dates2timestamp') );\n\t\tarray_walk( $students, array('ELS', 'load_psuperson') );\n\t\t\n\t\tusort( $students, array('ELS', 'student_sort') );\n\n\t\treturn $students;\n\t}",
"function dropbox_submitted_students($assignment_id)\n{\n /*/\n * SELECT DISTINCT users.id, COUNT(dropbox_content.filebox_id) AS num_content \n * FROM dropbox_content \n * JOIN users \n * ON users.id = dropbox_content.student_id \n * WHERE dropbox_content.assignment_id = $assignment_id\n /*/\n $query = \"SELECT DISTINCT users.id, COUNT(dropbox_content.id) AS num_content FROM dropbox_content JOIN users ON users.id = dropbox_content.student_id WHERE dropbox_content.assignment_id = $assignment_id\";\n $students = good_query_table($query);\n $ret = array();\n foreach($students as $student)\n $ret[$student['id']] = $student['num_content'];\n return $ret;\n}",
"protected function valid_studentids() {\n if ($this->studentids === null) {\n if ($this->studentids = get_users_by_capability($this->context, 'mod/data:viewentry', 'u.id,u.username')) {\n $this->studentids = array_keys($this->studentids);\n $this->studentids = array_diff($this->studentids, $this->valid_teacherids());\n } else {\n $this->studentids = array();\n }\n }\n return $this->studentids;\n }",
"private function importManyFiles()\n {\n $path = storage_path(\"data/*.csv\");\n\n // run 2 loops at a time\n foreach (array_slice(glob($path), 0, 2) as $file) {\n // read the data into an array\n $data = array_map('str_getcsv', file($file));\n\n // loop over the data\n foreach ($data as $row) {\n // insert the record or update if the email already exists\n // User::updateOrCreate(\n // ['email' => $row[6]],\n // ['email' => $row[6]]\n // );\n }\n\n // delete the file\n unlink($file);\n }\n }",
"private function getStudent(){\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire.sql\";\n\n\t\t$this->result[\"liste_stagiaire\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_techno_carousel.sql\";\n\n\t\t$this->result[\"liste_techno\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_rs.sql\";\n\n\t\t$this->result[\"liste_rs\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_doc.sql\";\n\n\t\t$this->result[\"liste_doc\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t}",
"function get_all_students() {\n global $db;\n $query = 'SELECT * FROM students\n ORDER BY studentID';\n $statement = $db->prepare($query);\n $statement->execute();\n $students = $statement->fetchAll();\n $statement->closeCursor();\n return $students; \n }",
"private function scan_directory($dir, $scan = \"\", &$nb_files = 0, &$nb_errors = 0){\n\t\t//Si c est la ou on etait , alors on reprend\n\t\tif ($dir == $scan or $scan == \"\"){\n\t\t\t$scan = \"\";\n\t\t\tDB::delete(\"delete from movies where directory = ?\",array($dir));\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tforeach (config(\"app.MOVIES_FILES\") as $ext){\n\t\t\t\t\t\t\tif (stripos($file,\".\".$ext) !== false){\n\t\t\t\t\t\t\t\t//Analyse du fichier\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie = new Movie();\n\t\t\t\t\t\t\t\t//On rajoute le fichier en base\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie->directory = $dir;\n\t\t\t\t\t\t\t\t$movie->filename = $file;\n\t\t\t\t\t\t\t\t$movie->status = -1;\n\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t$movie->name = $this->remove($file);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$movie->status = 1;\n\t\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$nb_files++;\n\t\t\t\t\t\t\t\t}catch(\\Exception $e){\n\t\t\t\t\t\t\t\t\t//Next...\n\t\t\t\t\t\t\t\t\t$nb_errors++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$json = [];\n\t\t\t$json[\"updated\"] = date(\"Y-m-d H:i:s\");\n\t\t\t$json[\"nb_files\"] = $nb_files;\n\t\t\t$json[\"nb_errors\"] = $nb_errors;\n\t\t\t$json[\"scan\"] = $scan;\n\t\t\tfile_put_contents(storage_path().\"/scan_movies.txt\",json_encode($json));\n\t\t}else{\n\t\t\t//Sinon, on reparcourt a partir de l'endroit, ou on etait\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"function scanFiles($dir){\n $path = __DIR__ . DIRECTORY_SEPARATOR . $dir; /** Nurodomas kelias iki jsons folderio */\n $files = scandir($path); /** Nuskenuoja folderi pagal kelia($path) ir grazina esanciu failu masyva */\n\n return $files;\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}",
"function assignStudentIdList($ids)\n {\n $rs = $this->dbQueryStudentIdList($ids);\n $this->_smarty->assign('studentList', $rs);\n return $rs;\n }",
"public function getFiles($uid) {\n\n\t\t$uid = $_SESSION['userid'];\n\t\t$this->pdo = config_db::getConnected();\n\n\t\t$statement = $this->pdo->prepare(\"SELECT * FROM files f\n INNER JOIN user_files uf ON (uf.fileid = f.id)\n INNER JOIN users u ON (uf.uid = u.id)\n WHERE uf.uid = :uid\");\n\t\t$result = $statement->execute(array('uid' => $uid));\n\t\t$rows = $statement->fetchAll(PDO::FETCH_ASSOC);\n \n\t\t$fileinfo = array();\n\t\tforeach($rows as $row) {\n\t $fileinfo[] = $row;\n }\n\n\t\treturn $fileinfo;\n\t}",
"function dbQueryStudentIdList($ids)\n {\n $where = \" WHERE id IN (\" . arrayToDBString($ids) . \")\";\n $rs = $this->_getFullList($where);\n return $rs;\n }",
"function scanfiles( $path = '' ) {\n\t\t\t\n\t\t\tglobal $bwpsoptions;\n\t\t\t\n\t\t\t$tz = get_option( 'gmt_offset' ) * 60 * 60;\n\n $data = array();\n\n\t\t\tif ( $dirHandle = @opendir( ABSPATH . $path ) ) { //get the directory\n\t\t\t\n\t\t\t\twhile ( ( $item = readdir( $dirHandle ) ) !== false ) { // loop through dirs\n\t\t\t\t\t\n\t\t\t\t\tif ( $item != '.' && $item != '..' ) { //don't scan parent/etc\n\n\t\t\t\t\t\t$relname = $path . $item;\n \n\t\t\t\t\t\t$absname = ABSPATH . $relname;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $this->checkFile( $relname ) == true ) { //make sure the user wants this file scanned\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( filetype( $absname ) == 'dir' ) { //if directory scan it\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$data = array_merge( $data, $this->scanfiles( $relname . '/' ) );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else { //is file so add to array\n\n\t\t\t\t\t\t\t\t$data[$relname] = array();\n\t\t\t\t\t\t\t\t$data[$relname]['mod_date'] = @filemtime( $absname ) + $tz;\n\t\t\t\t\t\t\t\t$data[$relname]['hash'] = @md5_file( $absname );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\t@closedir( $dirHandle ); //close the directory we're working with\n \n\t\t\t} \n\t\t\t\n\t\t\treturn $data; // return the files we found in this dir\n\t\t\t\n\t\t}",
"public function loadFiles(){\n\n $files = array();\n\n if($this->id == -1 || empty($this->databasePath))\n return $series;\n\n\n $sqlQuery = 'SELECT D.* FROM data D , books B WHERE B.id = D.book AND B.id='.$this->id;\n\n $pdo = new SPDO($this->databasePath);\n foreach ($pdo->query($sqlQuery) as $row)\n $files[] = BookFile::_createFromRow($this->databasePath, $row); \n \n return $files;\n }",
"function fm_get_all_sharedf_by_folder($original, $foldid) {\r\n\t$tmpvar = get_records('fmanager_folders',\"owner=$original AND pathid\",$foldid);\r\n\r\n\treturn $tmpvar;\t\r\n}",
"function getStudents() {\n $students = array();\n\n // Add first student into the students array.\n $first = new Student();\n $first->surname = \"Doe\";\n $first->first_name = \"John\";\n $first->add_email('home','[email protected]');\n $first->add_email('work','[email protected]');\n $first->add_grade(65);\n $first->add_grade(75);\n $first->add_grade(55);\n $students['j123'] = $first; \n\n // Add seconde student into the students array.\n $second = new Student();\n $second->surname = \"Einstein\";\n $second->first_name = \"Albert\";\n $second->add_email('home','[email protected]');\n $second->add_email('work1','[email protected]');\n $second->add_email('work2','[email protected]');\n $second->add_grade(95);\n $second->add_grade(80);\n $second->add_grade(50);\n $students['a456'] = $second;\n\n\n // Add my info into the students array.\n $me = new Student();\n $me->surname = \"Tan\";\n $me->first_name = \"Hai Hua\";\n $me->add_email('school', '[email protected]');\n $me->add_grade(90);\n $students['b721'] = $me;\n\n\n // Add random generated students to the array\n $num = mt_rand(1, 10);\n for ($i = 0; $i < $num; ++$i) {\n $student = new Student();\n $student->surname = Helper::rand_name(10);\n $student->first_name = Helper::rand_name(10);\n $student->add_email('school', $student->first_name . '@.my.bcit.ca');\n $student->add_grade(mt_rand(0,100));\n $student->add_grade(mt_rand(0,100));\n $student->add_grade(mt_rand(0,100));\n $students['k' . mt_rand(100,999)] = $student;\n }\n\n return $students;\n }",
"function scanDir() {\r\n $returnArray = array();\r\n \r\n if ($handle = opendir($this->uploadDirectory)) {\r\n \r\n while (false !== ($file = readdir($handle))) {\r\n if (is_file($this->uploadDirectory.\"/\".$file)) {\r\n $returnArray[] = $file;\r\n }\r\n }\r\n \r\n closedir($handle);\r\n }\r\n else {\r\n die(\"<b>ERROR: </b> No se puede leer el directorio <b>\". $this->uploadDirectory.'</b>');\r\n }\r\n return $returnArray; \r\n }",
"function open_and_scan($SCAN_DIRECTORY,$prev_files){\n\tglobal $files,$exempt_files,$prev_files,$exempt_directory;\n\t$changed_files = '';\n\t$file_details = stat($SCAN_DIRECTORY);\n\t$dt = array();\n\tforeach($file_details as $key=>$info){\n\t\t$dt[$key] = $info;\n\t}\n\t$data = array(\n\t\t'file'=>$SCAN_DIRECTORY,\n\t\t'info'=>$dt\n\t);\n\tarray_push($files,$data);\n\t$changed_files .= get_prev_stats($SCAN_DIRECTORY,$prev_files);\n\t\t\t\t\t\n\t$handle = opendir($SCAN_DIRECTORY);\n\twhile($f = readdir($handle)){\n\t\tif($f != '.' && $f != '..'){\n\t\t\tif(!is_dir($SCAN_DIRECTORY.$f)){\n\t\t\t\t$file_array = explode('.',$f);\n\t\t\t\t$count = count($file_array);\n\t\t\t\t$extension = $file_array[$count-1];\n\t\t\t\tif($count > 1 && !in_array($extension,$exempt_files)){\n\t\t\t\t\t$file_details = stat($SCAN_DIRECTORY.$f);\n\t\t\t\t\t$dt = array();\n\t\t\t\t\tforeach($file_details as $key=>$info){\n\t\t\t\t\t\t$dt[$key] = $info;\n\t\t\t\t\t}\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'file'=>$SCAN_DIRECTORY.$f,\n\t\t\t\t\t\t'info'=>$dt\n\t\t\t\t\t);\n\t\t\t\t\tarray_push($files,$data);\n\t\t\t\t\t$changed_files .= get_prev_stats($SCAN_DIRECTORY.$f,$prev_files);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(!in_array($f,$exempt_directory)){\n\t\t\t\t\topen_and_scan($SCAN_DIRECTORY.$f.'/',$prev_files);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn array(\n\t\t'changed'=>$changed_files,\n\t\t'files'=>$files\n\t);\n}",
"protected function scanDir()\n {\n $this->moduleList = [];\n foreach ($this->getVendorList() as $vendorName) {\n $this->moduleList[$vendorName] = [];\n }\n\n $this->readModules();\n }",
"public function retrieveAllStudent(){\n\t\t\t$query = $this->connection()->prepare(\"SELECT * FROM student ORDER BY id DESC\");\n\t\t\t$query->execute();\n\t\t\treturn $query->fetchAll();\n\t\t}",
"public static function getAll_files() {\n $db = DBInit::getInstance();\n\n $statement = $db->prepare(\"SELECT id, file_name, uploaded, user FROM files\");\n $statement->execute();\n\n return $statement->fetchAll();\n }",
"function getFiles($inc, $d){\n\t\tglobal $ALL;\n\n\t\tif(is_string($inc)){\n\t\t\t$in = glob($inc)\n\t\t}else if(is_array($inc)){\n\t\t\t$in = array();\n\t\t\tforeach ($inc as $v) {\n\t\t\t\t$glock = glob($v);\n\t\t\t\t$in = array_merge($in, $glock);\n\t\t\t}\n\t\t}else{\n\t\t\tif($d) $in = glob($ALL);\n\t\t\telse $in = array();\n\t\t}\n\n\t\treturn array_unique($in);\n\t}",
"protected function getAllFiles() {\n $sql = \"SELECT * FROM satdatameta\";\n $stmt = $this->connect()->prepare($sql);\n $stmt->execute();\n $results = $stmt->fetchAll();\n return $results;\n }",
"public function port_ids() {\n $file = new CmsFile;\n $files = $file->find_all();\n foreach($files as $file) {\n $new = new WildfireFile;\n $s_path = rtrim(str_replace(\"public/\",\"\",strrchr($file->path,\"public/files\")), \"/\" );\n $new_file = $new->filter(\"filename = '{$file->filename}' AND rpath LIKE '%{$s_path}%'\" )->first();\n if($new_file->id) {\n $new_file->oldid = $file->id;\n $new_file->description = $file->caption;\n $new_file->save();\n }\n }\n exit;\n }",
"public function collectInfoFiles()\r\n {\r\n $files_found = $this->findFiles($this->destination_dir, array('md', '1st', 'txt'));\r\n\r\n if($files_found)\r\n $this->file_list = array_merge($this->file_list, $files_found);\r\n }",
"function getUsers(){\n\t\t$this->users = $this->fileHandler->parseRows($this->userFile, '^', '|');\n\t\t$this->logMsg(SUCCESS, 'users generated');\n\t}",
"public static function loadAll()\n\t{\n\t\t//set up database connection\n\t\t//\n\t\t$databaseConnection = self::getDataBaseConnection();\n\t\t\t\n\t\t//prep our sql statment load all from the student database\n\t\t//\n\t\t$sqlStatement = self::$SQLLoadAllStatement;\n\t\t\t\n\t\t$result = $databaseConnection->query($sqlStatement);\n\t\t\n\t\t$listOfStudents = $result->fetchALL(PDO::FETCH_CLASS, self::$NameOfDatabase);\n\t\t\n\t\t$databaseConnection = null;\n\t\treturn $listOfStudents;\n\t}",
"public function findFiles();",
"function importImages($db, $username)\n{\n // list files in dir that are not in the database for this user\n\n $dataRoot = getConfig(\"upload._diskPath\");\n $userDir = combine($dataRoot, $username);\n $files = scandir($userDir);\n array_shift($files);\n array_shift($files);\ndebug(count($files) . \" files\", $files);\n\n$dbImages = $db->select(\"SELECT distinct filename from user_upload where username='$username'\", null, true);\ndebug(count($dbImages) . \" DB filenames\", $dbImages);\n //difference: insert\n //interserction : update or ignore ?\n}",
"public function get_data()\n\t\t{\n\t\t\tglobal $conn;\n\t\t\ttry{\n\t\t\t\n\t\t\t\t// connect to MySQL and select a database\n\t\t\t\t$students = array();\n\t\t\t\t\n\t\t\t\t$result = $this->conn->query(\"SELECT * FROM `students`\");\n\t\t\t\t\n\t\t\t\tforeach($result as $row)\n\t\t\t\t{\n\t\t\t\t\t$students[] = $this->create_student($row);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $students;\n\t\t\t}\n\t\t\tcatch(Exception $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t\texit();\n\t\t\t}\n\t\t}",
"function get_list($sy_id,$student_id) {\n\t\treturn $this->query(\n\t\t\t\"SELECT * FROM $this->tblname WHERE sy_id=$sy_id AND student_id=$student_id\"\n\t\t);\n\t}",
"public function get_students_list(){\n return $this->n->get_list_from_db();\n }",
"function getAllDistinctFileIndex() {\r\n\t\t\t$query = $this->pdo->prepare('select distinct file_index from document_details');\r\n\t\t\t$query->execute();\r\n\t\t\treturn $query->fetchAll();\r\n\t\t}",
"public function getAllStudents(){\n\n\t\t$Result = new Result();\t\n\t\t$Result = $this->_StudentDAO->getAllStudents();\n\t\t\n\t\tif(!$Result->getIsSuccess())\n\t\t\t$Result->setResultObject(\"Database failure in StudentDAO.getAllStudents()\");\t\t\n\n\t\treturn $Result;\n\t}",
"function globalUniqueShoeGenRefs(){\n\t\t\n\t\t$global_parents_data=array();\n\t\t$global_parents_data_file=array();\n\t\t$global_parents_xls_file=array();\n\t\t$genData=CepClLahalleShoeGen::select('lahs_nomod','lahs_reference','lahs_reference_folder','lahs_export_filename')\n\t\t\t\t\t\t\t\t\t ->where('lahs_status','=',1)->get();\n\t\t\n\t\t//echo \"<pre>\"; print_r($genData);\n\t\tforeach ($genData as $key => $value) {\n\t\t\t$global_parents_data[]=$value['lahs_nomod'];\n\t\t\t$global_parents_data_file[$value['lahs_nomod']]=$value['lahs_reference'];\n\t\t\t$global_parents_xls_file[$value['lahs_nomod']]=$value['lahs_export_filename'];\n\t\t}\n\t\t\t\n\t\t\n\t\t//$res=mysql_fetch_array($res);\n\t\treturn array($global_parents_data,$global_parents_data_file,$global_parents_xls_file);\n\t}",
"function getDocuments($ids = array(), $sort = 'menuindex', $dir = 'ASC', $fields = '*') {\r\n global $modx;\r\n\r\n if (count($ids) == 0) {\r\n return false;\r\n } else {\r\n $tblsc = $modx->getFullTableName('site_content');\r\n $tbldg = $modx->getFullTableName('document_groups');\r\n\r\n // add sc. to field names to refere to the table\r\n $fields = 'sc.' . implode(',sc.', preg_replace('/^\\s/i', '', explode(',', $fields)));\r\n $sort = ($sort == '') ? '' : 'sc.' . implode(',sc.', preg_replace('/^\\s/i', '', explode(',', $sort)));\r\n\r\n // get document groups for current user\r\n if ($docgrp = $modx->getUserDocGroups()) {\r\n $docgrp = implode(',', $docgrp);\r\n }\r\n\r\n // build the query to get documents\r\n $access = ($modx->isFrontend() ? 'sc.privateweb=0' : \"1='\" . $_SESSION['mgrRole'] . \"' OR sc.privatemgr=0\") .\r\n (!$docgrp ? '' : ' OR dg.document_group IN (' . $docgrp . ')');\r\n\r\n $sql = 'SELECT DISTINCT ' . $fields . ' FROM ' . $tblsc . ' sc ' .\r\n 'LEFT JOIN ' . $tbldg . ' dg on dg.document = sc.id ' .\r\n 'WHERE (sc.id IN (' . implode(',', $ids) . ')) ' .\r\n 'AND (' . $access . ') ' .\r\n 'GROUP BY sc.id' .\r\n ($sort ? ' ORDER BY ' . $sort . ' ' . $dir : '');\r\n\r\n $result = $modx->dbQuery($sql);\r\n $resource = array();\r\n\r\n // convert resources to array\r\n for ($i = 0; $i < @ $modx->recordCount($result); $i ++) {\r\n array_push($resource, @ $modx->fetchRow($result));\r\n }\r\n\r\n return $resource;\r\n }\r\n }",
"public function findUsers(): iterable;",
"public function find_all() {\n $this->ensure_path_exists();\n $files = glob($this->glob_keys_pattern(), GLOB_MARK | GLOB_NOSORT);\n $return = array();\n if ($files === false) {\n return $return;\n }\n foreach ($files as $file) {\n $return[] = substr(basename($file), 0, -6);\n }\n return $return;\n }",
"function getStudentInformation($STID){\n //By default, put nothing in here.\n\t\t$already_completed_parental_application=\"\";\t\t\n $housing_app_completed_in_system=\"\";\n $first_name=\"\";\n $last_name=\"\";\n $middle_name=\"\";\n $student_ID = \"\";\n $student_DATE_OF_BIRTH = \"\";\n $parental_email_address = \"\";\n $student_app_date = \"\";\n\n\n //As long as there is something in the search.\n while($row=oci_fetch_array($STID,OCI_ASSOC)){\n\t\t //Check whether or not they have already completed the Parental Agreement and if they have,\n //use this field to keep them from progressing forward within this application to move forward. (Onward to Page2.php)\n $already_completed_parental_application=$row[\"NC_SH_PRNTL_APPRVL\"];\n //Check whether or not they have a completed housing application on file.\n $housing_app_completed_in_system=$row[\"SS_STAT_INDICATOR\"];\n //Assign first name from the query lookup.\n $first_name = $row[\"FIRST_NAME\"];\n //Assign last name from the query lookup.\n $last_name = $row[\"LAST_NAME\"];\n //Assign middle name from the query lookup.\n $middle_name = $row[\"MIDDLE_NAME\"];\n //Assign the ID from the query lookup.\n $student_ID = $row[\"EMPLID\"];\n //Assign the student DOB to the query lookup.\n $student_DATE_OF_BIRTH = $row[\"BIRTHDATE\"];\n //Assign the email\n $parental_email_address = $row[\"EMAIL_ADDR\"];\n //Assign the application date\n $student_app_date_temp = $row[\"NC_PROCESS_DTTM\"];\n\t\t \n\t\t //For whatever reason, if there is a \" \" (BLANK) in the field, lets write blank, as it \n\t\t //will trigger the condition if the end-user does not have any information within the \"SS_STAT_INDICATOR\" field.\n\t\t //Create a condition that writes the word \"BLANK\" if there is nothing in the field.\n\t\t\t\n\t\t\t//Fields this affects\n\t\t\t//NC_SH_PRNTL_APPRVL (WHETHER THE END USER HAS ALREADY COMPLETED THIS WEB APPLICATION)\n\t\t\t//SS_STAT_INDICATOR (WHETHER THE STUDENT HAS A COMPLETED HOUSING APPLICATION)\n\t\t\t//MIDDLE_NAME (FOR SOME WILD REASON THE QUERY DOES NOT PULL A MIDDLE NAME FOR THE STUDENT).\t\t\t\n\t\t\t\n\t\t\t//Untouched below...\n\t\t\t/*\n\t\t\tif ($already_completed_parental_application==\" \"||$housing_app_completed_in_system==\" \"||$middle_name==\" \"){\n\t\t\t\t $already_completed_parental_application=\"BLANK\"; //Assign the word, BLANK, to whether or not the end user has completed this web application. \n $housing_app_completed_in_system=\"BLANK\";\t//Assign the word, BLANK, to the housing application status in MyPack Portal.\n\t\t\t\t $middle_name=\"BLANK\"; //Assign the word, BLANK, to the middle name pulled (remember to remove this on page3.php when it is displayed back to the user.)\n\t\t }\n\t\t\t*end untouched.\n\t\t\t*/\n\t\t\t//Changes added for the above wrong condition on 02/01/2016.\n\t\t\t//If the field for NC_SH_PRNTL_APPRVL is blank, set the value that's sent back to PAGE1 to BLANK.\n\t\t\tif ($already_completed_parental_application==\" \"){\n\t\t\t$already_completed_parental_application=\"BLANK\"; //Assign the word, BLANK, to whether or not the end user has completed this web application.\n\t\t\t}\n\t\t\t//If the SS_STAT_INDICATOR is blank, set the value that's sent back to PAGE1 to BLANK.\n\t\t\telse if($housing_app_completed_in_system==\" \"){\n\t\t\t$housing_app_completed_in_system=\"BLANK\";\t//Assign the word, BLANK, to the housing application status in MyPack Portal.\n\t\t\t}\n\t\t\t//If the Middle Name is blank, set the value back to Page1 to BLANK.\n\t\t\telse if($middle_name==\" \"){\n\t\t\t\t$middle_name=\"BLANK\";\n\t\t\t}\n\t\t\t//End changes on 02/01/2016.\t\t\n\t\t\t\n\t\t\t\n //End creating a condition...\n\t\t \n\t\t \n\t\t \n }\n\t\t\n\t\t //FORMAT OF NC_PROCESS_DTTM IS DD-MM-YY H:i:s.00000000 AM\n\t\t //Only return a set amount of information.\n\t\t //SHOULD RETURN DD-MM-YY\n\t\t $date_of_application_formatted = substr($student_app_date_temp,0,9);\n\t\t $student_app_date = $date_of_application_formatted;\n\t\t\n\t\t\n //Return information from the database lookup.\n //return $already_completed_parental_application.\" \".$housing_app_completed_in_system.\" \".$first_name.\" \".$last_name.\" \".$middle_name.\" \".$student_ID.\" \".$student_DATE_OF_BIRTH.\" \".$parental_email_address.\" \".$student_app_date;\n\t\t\n\t\t//To prevent empty fields from breaking the communication between this file and the scripts/checkInformation.js that is \n\t\t//used within the /parental_consent/scripts/ let's make the field separator a \",\" (comma) vs an empty field.\n\t\treturn $already_completed_parental_application.\",\".$housing_app_completed_in_system.\",\".$first_name.\",\".$last_name.\",\".$middle_name.\",\".$student_ID.\",\".$student_DATE_OF_BIRTH.\",\".$parental_email_address.\",\".$student_app_date.\",\";\n\t\t\n\t}",
"function getallpicindb(&$pic_array, $startdir)\r\n{\r\n global $xoopsDB;\r\n\r\n $sql = \"SELECT filepath, filename \".\r\n \"FROM \".$xoopsDB->prefix(\"xcgal_pictures\").\" \".\r\n \"WHERE filepath LIKE '$startdir%'\";\r\n $result = $xoopsDB->query($sql);\r\n while ($row = $xoopsDB->fetchArray($result)) {\r\n $pic_file = $row['filepath'].$row['filename'];\r\n $pic_array[$pic_file]=1;\r\n }\r\n $xoopsDB->freeRecordSet($result);\r\n}",
"public static function getFiles()\n\t{\n\t\t$result = Array();\n\t\t$files = sfCore::$db->query(\"SELECT * FROM `swoosh_file_storage`\")->asObjects();\n\t\tforeach($files as $file){\n\t\t\t$sfFileStorageItem = sfCore::make('sfFileStorageItem');\n\t\t\t$sfFileStorageItem->loadFromObject($file);\n\t\t\t$result[] = $sfFileStorageItem;\n\t\t}\n\t\treturn $result;\n\t}",
"public function getAllStudent(){\n\n\t\treturn array(\n\t\t\t\"1\"=> new Entity_Student(1,\"pham van thao\",23,\"tlu\"),\n\t\t\t\"2\"=> new Entity_Student(2,\"pham van phen\",24,\"tlu\"),\n\t\t\t\"3\"=> new Entity_Student(3,\"pham van to\",25\"tlu\"),\n\t\t\t\"4\"=> new Entity_Student(4,\"pham van\",26,\"tlu\"),\n\n\t\t);\n\t}",
"function student_list($schoolid)\n{\n\tglobal $DB;\n\t$sql =\"SELECT mus.*,mu.firstname,mu.lastname,mu.email,mu.phone1,mu.picture FROM {user_school} mus join {user} mu on mu.id=mus.userid WHERE mus.role='student' \";\n\t$sql.=\"and mus.schoolid=$schoolid AND mu.deleted=0 ORDER BY mu.timemodified desc\";\n\t$result = $DB->get_records_sql($sql);\n\tif(count($result)>0){\n\t\tforeach($result as $student)\n\t\t{\n\t\t\t\t\t$user = new stdClass();\n\t\t\t\t\t$user->id = $student->userid;\n\t\t\t\t\t//$picture = get_userprofilepic($user);\n\t\t\t\t\t$userurl = getuser_profilelink($user->id);\n\t\t\t\t\t$usrimg = get_userprofilepic($user);\n\t\t\t\t\t$picture ='<div class=\"left picture\"><a href=\"'.$userurl.'\">'.$usrimg.'</a></div>'; \n\t\t\t\t\t$student->picture = $picture;\n\t\t}\n\t}\n\treturn $result;\n}",
"function fm_get_all_shared_by_folder($original, $foldid) {\r\n\t$tmpvar = get_records('fmanager_link',\"owner=$original AND folder\",$foldid);\r\n\r\n\treturn $tmpvar;\t\r\n}",
"function list_files($file_paths, $root_path, $student_class_folder, array $code_exts, array $validation_exts) {\n // Prepare header row\n $output = \"<table>\\n<tr>\";\n $output .= \"<th>Permission</th>\";\n //$output .= \"<th>User</th>\";\n //$output .= \"<th>Group</th>\";\n $output .= \"<th>File</th>\";\n $output .= \"<th>Modify Date</th>\";\n $output .= \"<th>Size</th>\";\n $output .= \"<th>Extra</th>\";\n $output .= \"</tr>\\n\";\n\n foreach ($file_paths as $file_path) {\n $relative_path = substr($file_path, strlen($root_path) + 1);\n // $split = split(\"/\", $relative_path);\n $split = explode(\"/\", $relative_path);\n $filename = $split[count($split) - 1];\n $stat = @stat($file_path);\n\n $output .= '<tr>';\n $output .= '<td>' . perms($stat['mode']) . '</td>';\n //$output .= '<td>' . $stat['uid'] . '</td>';\n //$output .= '<td>' . $stat['gid'] . '</td>';\n // Display the correct link to our files\n if (is_dir($file_path))\n $output .= \"<td><a class=\\\"folder\\\" href=\\\"?folder=$relative_path\\\"\";\n elseif (in_array(strtolower(pathinfo($file_path, PATHINFO_EXTENSION)), $code_exts))\n $output .= \"<td><a class=\\\"code\\\" href=\\\"?file=$relative_path\\\"\";\n else\n $output .= \"<td><a class=\\\"show\\\" target=\\\"_blank\\\" href=\\\"/${student_class_folder}/${relative_path}\\\"\";\n $output .= \">\" . $relative_path . \"</a></td>\"; //. $filename \n\n // Show the date. Depending on the due date color the text\n $ctime = date('Y-m-d H:i:s', $stat['ctime']);\n $mtime = date('Y-m-d H:i:s', $stat['mtime']);\n $output .= \"<td\";\n \n $output .= \">$mtime</td>\";\n\n // Add a cell for the size. Ignore directories\n if (is_dir($file_path))\n $output .= \"<td> </td>\";\n else\n $output .= '<td class=\"right\">' . $stat['size'] . '</td>';\n\n // Add a cell for a validation link. Only do it for files we're checking.\n if (in_array(strtolower(pathinfo($file_path, PATHINFO_EXTENSION)), $validation_exts)) {\n $server_name = filter_input(INPUT_SERVER, 'SERVER_NAME');\n $url = \"https://${server_name}/${student_class_folder}/${relative_path}\";\n $output .= \"<td><a target=\\\"_blank\\\" href=\\\"http://validator.w3.org/check?uri=$url\\\">Validate</a></td>\";\n } elseif (is_dir($file_path))\n $output .= \"<td><a class=\\\"code\\\" href=\\\"?files=${relative_path}\\\">View Code</a></td>\";\n\n //$output .= \"<td> </td>\";\n\n $output .= \"</tr>\\n\";\n }\n $output .= \"</table>\\n\";\n\n if (count($file_paths) == 0)\n $output .= \"<p class=\\\"error\\\">There are no files to display</p>\";\n\n return $output;\n}",
"private function convertFiles(){\n\n\t\t//Create folder in tmp for files\n\t\tmkdir('./tmp/course_files');\n\t\t$sectionCounter = 0;\n\t\n\t\t//Add section to manifest\n\t\tHelper::addIMSSection($this->manifest, $this->currentSectionCounter, $this->identifierCounter, 'Documents');\n\n\t\t$section = $this->manifest->organizations->organization->item->item[$this->currentSectionCounter];\n\t\t\n\t\t//Find all folders and documents\n\t\t$query = \"SELECT document.`path`,document.`filename`,document.`format`,document.`title` FROM document WHERE document.`course_id`=\".$this->course_id.\" ORDER BY path;\";\n\t\t$result = mysqli_query($this->link,$query);\n\t\t\n\t\twhile($data = $result->fetch_assoc())\n\t\t{\n\t\t\t//Find item level\n\t\t\t$level = substr_count($data['path'], '/') - 1;\n\n\t\t\t//If it is a file\n\t\t\tif($data['format']!='.dir')\n\t\t\t{\n\t\t\t\t$s_filename = Helper::sanitizeFilename($data['filename']);\n\t file_put_contents('./tmp/course_files/'.$s_filename, fopen($this->host.'/courses/'.$this->course['code'].'/document'.$data['path'], 'r'));\n\t\t\t\tHelper::addIMSItem($section, $this->manifest, $sectionCounter, $this->identifierCounter, $this->resourceCounter, 'file', $data, $level); \n\t\t\t}\n\t\t\t//If it is a directory\n\t\t\telse if($data['format']=='.dir')\n\t\t\t{\n\t\t\t\tHelper::addIMSLabel($section, $sectionCounter, $this->identifierCounter, $data['filename'], $level);\n\t\t\t}\n\t\t}\n\n\t\t//Proceed to next section\n\t\t$this->currentSectionCounter++;\n\t}",
"function FilesInDataBase_ID($Field,$ID){\n\t\t$query=\"SELECT * FROM `uploadinfo` WHERE `StudentID` = $ID ORDER BY `FileID` DESC\";\n\t\tif($result = mysql_query($query)){\n\t\t\t$num_of_rows=mysql_num_rows($result);\n\t\t\tfor($i=0;$i<$num_of_rows;$i++){\n\t\t\t\t$content=mysql_result($result,$i,$Field);\n\t\t\t\t$File_Field[$i]= $content;\n\t\t\t}\n\t\t\treturn $File_Field;\n\t\t}\n\t}",
"public function get_student_data_by_id($arg1)\n {\n\n $con=mysqli_connect(\"localhost\",\"root\",\"\",\"masterdb2\") or die(\"unable to connet\");\n $sql=\"SELECT `arid_reg_no`, `student_first_name`, `student_cnic`, `student_date_of_birth`, `student_religion`, `student_form_no`, `student_catagorey`, `categorey_of_reserved_seats`, `student_picture_path`, `student_joining_session`, `degree_id`, `student_section`, `student_current_session`, `student_gender`, `student_timing_shift`, `student_currunt_semester` FROM `students` WHERE `student_id`=$arg1\";\n $student_query_data=mysqli_query($this->con,$sql);\n $student_personale_data=mysqli_fetch_assoc($student_query_data);\n\n // echo \"<pre>\";\n // print_r($student_personale_data);\n /*2\n *Get data from father table\n */\n $sql1=\"SELECT `parent_id`, `parent_name`, `parent_cnic`, `parent_occupation`, `parent_annual_income` FROM `parents` WHERE `student_id`='$arg1'\";\n $student_parent=mysqli_query($this->con,$sql1);\n $student_parent_data=mysqli_fetch_assoc($student_parent);\n\n // echo \"<pre>\";\n // print_r($student_parent_data);\n /*3\n *Get data from student contacts table\n */\n $sql2=\"SELECT `student_contact_id`, `student_contact_phone_no`, `student_contact_mobile_no`, `student_contact_email`, `student_contact_permanent_address`, `student_contact_postal_address`, `student_contact_domicile_district`, `student_contact_domicile_province`, `student_contact_city`, `student_contact_nantionality`, `student_area` FROM `student_contacts` WHERE `student_id`='$arg1'\";\n $student_contact=mysqli_query($this->con,$sql2);\n $student_contact_data=mysqli_fetch_assoc($student_contact);\n\n // echo \"<pre>\";\n // print_r($student_contact_data);\n /*4\n *Get data from guardian table\n */\n $sql3=\"SELECT `guardian_id`, `guardian_name`, `guardian_relation`, `guardian_contact_no`, `emaergancey_guardian_name`, `emaergancey_guardian_relation`, `emaergancey_contact_no` FROM `guardians` WHERE `student_id`='$arg1'\";\n $student_guardian=mysqli_query($this->con,$sql3);\n $student_guardian_data=mysqli_fetch_assoc($student_guardian);\n\n // echo \"<pre>\";\n // print_r($student_guardian);\n /*5\n *Get data from student qualification table\n */\n $sql4=\"SELECT `qualification_id`, `qualification_level`, `qualification_degree_or_certificate`, `qualification_year_of_passing`, `borad_univeristy`, `qualification_marks_obtained`, `qualification_marks_total`, `qualification_grade`, `qualification_cgpa`, `qualification_major_subjects` FROM `students_qualifications` WHERE `student_id`='$arg1'\";\n $student_qualifications=mysqli_query($this->con,$sql4);\n $student_qualifications_data=mysqli_fetch_assoc($student_qualifications);\n\n // echo \"<pre>\";\n // print_r($student_guardian);\n /*6\n *Get data from student qualification table\n */\n $sql5=\"SELECT `entry_test_id`, `entry_test_name`, `entry_test_date`, `entry_test_marks`, `disciplinary_action` FROM `entry_tests` WHERE `student_id`='$arg1'\";\n $student_entry_test=mysqli_query($this->con,$sql5);\n $student_entry_test_data=mysqli_fetch_assoc($student_entry_test);\n\n // echo \"<pre>\";\n // print_r($student_entry_test);\n /*\n ***Here is the array of all 6 tables fetch data\n ***\n */\n $student_fetch_data=array($student_personale_data,$student_parent_data,$student_contact_data,$student_guardian_data,$student_qualifications_data,$student_entry_test_data);\n // echo \"<pre>\";\n // print_r($student_fetch_data);\n return $student_fetch_data;\n //echo $student_fetch_data[0]['student_first_name'];\n }",
"protected function fetchStorageRecords() {}",
"private function createRecords(){\r\n\t\t\r\n\t\t$fileNames = explode(',', $this->collection['images']);\r\n\t\t\r\n\t\tforeach($fileNames as $fileName){\r\n\t\t\t\t\r\n\t\t\tif(trim($fileName) && !isset($this->images[$fileName])){\r\n\t\t\t\t\r\n\t\t\t\t$newRecord = array(\r\n\t\t\t\t\t'pid' => $this->collection['pid'],\r\n\t\t\t\t\t'collection' => $this->collection['uid'],\r\n\t\t\t\t\t'crdate' => time(),\r\n\t\t\t\t\t'cruser_id' => $this->collection['cruser_id'],\r\n\t\t\t\t\t'image' => $fileName,\r\n\t\t\t\t\t'title' => $this->getTitleFromName($fileName)\r\n\t\t\t\t);\r\n\t\t\t\t$this->db->exec_INSERTquery('tx_gorillary_images', $newRecord);\r\n\t\t\t\t$newRecord['uid'] = $this->db->sql_insert_id();\r\n\t\t\t\t$this->images[$fileName] = $newRecord;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"public function get_shredfile_list($u_id){\n\t\t$this->db->select('shared_files.u_id,images.img_name,images.imag_org_name,shared_files.s_permission,shared_files.s_created')->from('shared_files');\n\t\t$this->db->join('images', 'images.img_id = shared_files.img_id', 'left');\n\t\t$this->db->where('shared_files.u_id', $u_id);\n\t\t$this->db->order_by(\"shared_files.s_created\", \"DESC\");\n\t\treturn $this->db->get()->result_array();\n\t\t}",
"function readDBFlatfile($pathDB='default') {\n\n\t\t// INIT RETURN VALUES\n\t\t$readFolders = $readImages = false;\n\n\t\t// GET DEFAULT PATH\n\t\tif ($pathDB === 'default') {\n\t\t\t$fDB = DATA_FOLDER .'mg2db_fdatabase.php';\n\t\t\t$iDB = DATA_FOLDER .'mg2db_idatabase.php';\n\t\t}\n\t\t// GET RESTORE PATH (ADMIN ONLY)\n\t\telseif ($backup = $this->getBackupPath($pathDB)) {\n\t\t\t$fDB = sprintf($backup, 'fdatabase');\n\t\t\t$iDB = sprintf($backup, 'idatabase');\n\t\t}\n\t\telse return array($readFolders, $readImages);\t// no valid path\n\n\t\t// ************************************ FOLDER DATABASE ************************************ //\n\n\t\t// RESET FOLDER ARRAY\n\t\t$this->all_folders = array();\n\t\t$this->folderautoid = 0;\n\n\t\t$now = time();\t// in order to check if the folder or image date in future\n\t\tdo {\n\t\t\tif (!is_file($fDB)) {\n\t\t\t\t$this->folderautoid = 1;\n\t\t\t\t$this->all_folders[$this->folderautoid] = $this->getDefaultRootFolder();\n\t\t\t\tbreak; \t\t\t\t\t\t\t\t// no data file\n\t\t\t}\n\n\t\t\t$fp = fopen($fDB,'rb');\n\t\t\tif (!is_resource($fp))\tbreak;\t// cannot open data file\n\n\t\t\t$num_records\t\t = 0;\n\t\t\t$this->folderautoid = (int)fgets($fp, 16);\n\t\t\tif (defined('USER_ADMIN')) {\n\t\t\t\twhile (!feof($fp)) {\n\t\t\t\t\tif (fgets($fp, 2) !== '#')\t\t\t\t\tcontinue;\t// no data row?\n\t\t\t\t\t$record = fgetcsv($fp, 4600, \"\\t\");\n\t\t\t\t\tif (($folderID = (int)$record[0]) < 1) continue;\t// invalid folder id\n\t\t\t\t\t$this->all_folders[$folderID] = $record;\n\t\t\t\t\t$num_records++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\twhile (!feof($fp)) {\n\t\t\t\t\tif (fgets($fp, 2) !== '#')\t\t\t\t\tcontinue;\t// no data row?\n\t\t\t\t\t$record = fgetcsv($fp, 4600, \"\\t\");\n\t\t\t\t\tif (($folderID = (int)$record[0]) < 1) continue;\t// invalid folder id\n\t\t\t\t\tif ((int)$record[4] > $now)\t\t\t\tcontinue;\t// date in future?\n\t\t\t\t\tif ((int)$record[5] < 0) \t\t\t\tcontinue;\t// folder locked?\n\t\t\t\t\t$this->all_folders[$folderID] = $record;\n\t\t\t\t\t$num_records++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfclose($fp);\n\t\t\t$readFolders = $num_records;\n\t\t}\n\t\twhile(0);\n\n\t\t// ************************************ IMAGE DATABASE ************************************ //\n\n\t\t// RESET IMAGE ARRAY\n\t\t$this->all_images\t= array();\n\t\t$this->autoid\t\t= 0;\n\n\t\tdo {\n\t\t\tif (!is_file($iDB)) \t\tbreak;\t// no data file\n\n\t\t\t$fp = fopen($iDB,'rb');\n\t\t\tif (!is_resource($fp))\tbreak;\t// cannot open data file\n\n\t\t\t$num_records = 0;\n\t\t\t$this->autoid = (int)fgets($fp, 16);\n\t\t\tif (defined('USER_ADMIN')) {\n\t\t\t\twhile (!feof($fp)) {\n\t\t\t\t\tif (fgets($fp, 2) !== '#')\t\t\t\t\tcontinue;\t// no data row?\n\t\t\t\t\t$record = fgetcsv($fp, 4600, \"\\t\");\n\t\t\t\t\tif (($imageID = (int)$record[0]) < 1)\tcontinue;\t// invalid image id\n\t\t\t\t\t$this->all_images[$imageID] = $record;\n\t\t\t\t\t$num_records++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\twhile (!feof($fp)) {\n\t\t\t\t\tif (fgets($fp, 2) !== '#')\t\t\t\t\tcontinue;\t// no data row?\n\t\t\t\t\t$record = fgetcsv($fp, 4600, \"\\t\");\n\t\t\t\t\tif (($imageID = (int)$record[0]) < 1)\tcontinue;\t// invalid image id\n\t\t\t\t\tif ((int)$record[4] > $now)\t\t\t\tcontinue;\t// date in future?\n\t\t\t\t\tif ((int)$record[5] < 0) \t\t\t\tcontinue;\t// folder locked?\n\t\t\t\t\t$this->all_images[$imageID] = $record;\n\t\t\t\t\t$num_records++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfclose($fp);\n\t\t\t$readImages = $num_records;\n\t\t}\n\t\twhile(0);\n\n\t\treturn array($readFolders, $readImages);\n\t}",
"public function allStudents()\n {\n\n $students = Student::all();\n return $students;\n\n\n\n }",
"function getAllFiles($fileIdStr) {\n $fileInfoArray = array();\n $this->connection = $this->ConnectDB();\n if ($this->connection == NULL) {\n try {\n $this->CloseConnectionDB();\n } catch (Exception $exc) {\n \n }\n return $fileInfoArray;\n }\n $fileIdStr = trim($fileIdStr);\n if(strlen($fileIdStr) > 0 && $fileIdStr[strlen($fileIdStr)-1] == ',') {\n $fileIdStr = substr( $fileIdStr , 0, strlen($fileIdStr)-1);\n } \n \n if(strcmp($fileIdStr,\"\") == 0) {\n return $fileInfoArray;\n }\n \n $qry = \"SELECT * FROM files WHERE id_file in ($fileIdStr)\";\n \n $result = mysql_query($qry, $this->connection);\n\n if (!$result || mysql_num_rows($result) <= 0) {\n try {\n $this->CloseConnectionDB();\n } catch (Exception $exc) {\n \n }\n return $fileInfoArray;\n }\n\n while ($row = mysql_fetch_array($result)) {\n $fileInfo = new FileInfo();\n $fileInfo->setId($row['id_file']);\n $fileInfo->setName($row['name']);\n $fileInfo->setType($row['type']);\n $fileInfo->setSize($row['size']);\n $fileInfo->setLocation($row['location']);\n $fileInfo->setUploadDateTime($row['upload_date_time']);\n\n $fileInfoArray[] = $fileInfo;\n }\n\n try {\n $this->CloseConnectionDB();\n } catch (Exception $exc) {\n \n }\n\n return $fileInfoArray;\n }",
"function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) { // scandir() accepts the full path of the folder to be scanned\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\n\t\t\t\t// It is a hidden file\n\t\t\t\t\n\t\t\t\tcontinue; \n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t);\n\t\t\t}\n\n\t\t}\n\t\n\t}\n\n\treturn $files;\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}",
"function xcscandir($dir, &$expic_array)\r\n{\r\n static $dir_id = 0;\r\n static $count =0;\r\n static $pic_id=0;\r\n\r\n $pic_array = array();\r\n $dir_array = array();\r\n\r\n getfoldercontent($dir, $dir_array, $pic_array, $expic_array );\r\n\r\n if (count($pic_array) > 0){\r\n $dir_id_str=sprintf(\"d%04d\", $dir_id++);\r\n echo dirheader($dir, $dir_id_str);\r\n foreach ($pic_array as $picture) {\r\n $count++;\r\n $pic_id_str=sprintf(\"i%04d\", $pic_id++);\r\n echo picrow($dir.$picture, $pic_id_str, $dir_id_str );\r\n }\r\n }\r\n if (count($dir_array) > 0){\r\n foreach ($dir_array as $directory) {\r\n xcscandir($dir.$directory.'/', $expic_array);\r\n }\r\n }\r\n return $count;\r\n}",
"function dropbox_submitted_count($student_id)\n{\n global $class_id;\n /*/\n * SELECT dropbox_assignments.id, COUNT(dropbox_content.id) AS num_files\n * FROM dropbox_assignments\n * JOIN dropbox_content\n * ON dropbox_assignments.id = dropbox_content.assignment_id\n * WHERE class_id = $class_id\n * AND dropbox_content.student_id = $student_id\n * GROUP BY id\n /*/\n $ret = array();\n $assignments = good_query_table(\"SELECT dropbox_assignments.id, COUNT(dropbox_content.id) AS num_files FROM dropbox_assignments JOIN dropbox_content ON dropbox_assignments.id = dropbox_content.assignment_id WHERE class_id = $class_id AND dropbox_content.student_id = $student_id GROUP BY id\");\n foreach($assignments as $assignment)\n {\n $ret[$assignment['id']] = $assignment['num_files'];\n }\n return $ret;\n}",
"private function searchFiles()\n {\n $query = File::whereNull('deleted_at');\n $data = $query->get();\n\n return $data;\n }",
"function loadStudents($studentLoader)\n {\n $studentsData = $studentLoader->getAllStudents();\n foreach ($studentsData as $student) {\n $student = $studentLoader->createStudent($student);\n $students[] = $student;\n }\n if (!isset($students)) {\n return [];\n }\n return $students;\n }",
"public function getAll(): array\n {\n $response = $this->client->request('GET', $this->resourceUri);\n\n $json = json_decode((string)$response->getBody());\n\n $dirItemCollection = [];\n\n foreach ($json as $starredFile) {\n $dirItemCollection[] = (new DirectoryItem)->fromJson($starredFile);\n }\n\n return $dirItemCollection;\n }",
"public function readdata() \n {\n \n \n $dir = scandir($this->dirName);\n \n foreach($dir as $key => $data){\n if($key>1){ \n $batchsequence = false;\n if(substr($data, 0, 8)==Config('constants.bankingSuitFolder').'R')\n {\n $this->readReplyFile($data);\n //update `collections` set transaction_status=1 where transmission_status=2 and transaction_status=2\n \n }elseif(substr($data, 0, 8)==Config('constants.bankingSuitFolder').'O'){\n $this->readOutputFile($data);\n }\n }\n \n } \n }",
"public function &getFolders($folder)\n\t{\n\t\t$registry =& AEFactory::getConfiguration();\n\t\t$breakflag_before_process = $registry->get('volatile.breakflag', false);\n\n\t\t// Reset break flag before continuing\n\t\t$breakflag = false;\n\n\t\t// Initialize variables\n\t\t$arr = array();\n\t\t$false = false;\n\n\t\tif(!is_dir($folder) && !is_dir($folder.'/')) return $false;\n\n\t\t$counter = 0;\n\t\t$registry =& AEFactory::getConfiguration();\n\t\t$maxCounter = $registry->get('engine.scan.smart.large_dir_threshold',100);\n\n\t\t$allowBreakflag = ($registry->get('volatile.operation_counter', 0) != 0) && !$breakflag_before_process;\n\n\t\t$handle = @opendir($folder);\n\t\t/* If opening the directory doesn't work, try adding a trailing slash. This is useful in cases\n\t\t * like this: open_basedir=/home/user/www/ and the root is /home/user/www. Trying to scan\n\t\t * /home/user/www results in error, trying to scan /home/user/www/ succeeds. Duh!\n\t\t */\n\t\tif ($handle === FALSE) {\n\t\t\t$handle = @opendir($folder.'/');\n\t\t}\n\t\t// If directory is not accessible, just return FALSE\n\t\tif ($handle === FALSE) {\n\t\t\t$this->setWarning('Unreadable directory '.$folder);\n\t\t\treturn $false;\n\t\t}\n\n\t\twhile ( (($file = @readdir($handle)) !== false) && (!$breakflag) )\n\t\t{\n\t\t\tif (($file != '.') && ($file != '..'))\n\t\t\t{\n\t\t\t\t// # Fix 2.4: Do not add DS if we are on the site's root and it's an empty string\n\t\t\t\t$ds = ($folder == '') || ($folder == '/') || (@substr($folder, -1) == '/') || (@substr($folder, -1) == DIRECTORY_SEPARATOR) ? '' : DIRECTORY_SEPARATOR;\n\t\t\t\t$dir = $folder . $ds . $file;\n\t\t\t\t$isDir = is_dir($dir);\n\t\t\t\tif ($isDir) {\n\t\t\t\t\t$data = _AKEEBA_IS_WINDOWS ? AEUtilFilesystem::TranslateWinPath($dir) : $dir;\n\t\t\t\t\tif($data) $arr[] = $data;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$counter++;\n\t\t\tif($counter >= $maxCounter) $breakflag = $allowBreakflag;\n\t\t}\n\t\t@closedir($handle);\n\n\t\t// Save break flag status\n\t\t$registry->set('volatile.breakflag', $breakflag);\n\n\t\treturn $arr;\n\t}",
"function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) {\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\t\t\t\tcontinue; // Ignore hidden files\n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\t\t\t\t$path_info = pathinfo($f);\n\t\t\t\t//if ($path_info && $path_info.extension )\n\t\t\t\t$ext = $path_info['extension'];\n\t\t\t\tif($ext =='html'||$ext =='jpg' || $ext ==='png' || $ext == 'pdf'){\n\t\t\t\t\t$text = ($ext =='html') ?'doc':'image';\n\t\t\t\t\t$files[] = array(\n\t\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\t\"text\" => $text,\n\t\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}",
"public function getAllStudents() {\n try {\n if(BaseController::isLoggedIn() && BaseController::isTeacher()) { \n $user = new UserModel();\n $user->id = BaseController::getUserId();\n $user_data = $user->getUserDataById();\n \n $student = new StudentModel();\n $students = $student->getAllStudents();\n \n $model = array(\n 'user_data' => $user_data,\n 'students' => $students\n );\n BaseController::display(self::$controller . '/students.php', $model);\n } else {\n BaseController::load('user/login.php', array('error_description' => 'Изисква се регистрация.'));\n }\n } catch (Exception $e) {\n BaseController::load('error.php');\n }\n }",
"public function get_examApply_studentIds ($examId){\n $this->db->select('studentId');\n $this->db->from('exam_marks');\n $this->db->where('examId',$examId);\n $query1 = $this->db->get();\n $data = $query1->result_array();\n\n $studentIds = array('');\n\n foreach($data as $row){\n array_push($studentIds,$row['studentId']);\n }\n \n\n $this->db->where('examId',$examId);\n $this->db->where_not_in('studentId',$studentIds);\n $this->db->order_by('studentId','asc');\n $query = $this->db->get('exam_student_enroll');\n return $query->result_array();\n }",
"public function getAllStudentsResults() {\n try {\n if(BaseController::isLoggedIn() && BaseController::isTeacher()) {\n $user = new UserModel();\n $user->id = BaseController::getUserId();\n $user_data = $user->getUserDataById();\n \n $student = new StudentModel();\n $results = $student->getAllStudentsResults();\n \n $model = array(\n 'user_data' => $user_data,\n 'results' => $results\n );\n BaseController::display(self::$controller . '/student-results.php', $model);\n } else {\n BaseController::load('user/login.php', array('error_description' => 'Изисква се регистрация.'));\n }\n } catch (Exception $e) {\n BaseController::load('error.php');\n }\n }",
"public function scanSourceFolders() {\n $this->addons = [];\n foreach ($this->sources as $sourceDir) {\n $this->scanSource($sourceDir);\n }\n }",
"function fetchFileList() {\n try {\n global $db_table_prefix;\n\n $results = array();\n\n $db = pdoConnect();\n\n $query = \"SELECT\n id,\n path\n FROM \".$db_table_prefix.\"filelist\";\n\n $stmt = $db->prepare($query);\n\n if (!$stmt->execute()){\n // Error\n return false;\n }\n\n while ($r = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $i = $r['id'];\n $results[$i] = $r['path'];\n }\n $stmt = null;\n\n return $results;\n } catch (PDOException $e) {\n addAlert(\"danger\", \"Oops, looks like our database encountered an error.\");\n error_log(\"Error in \" . $e->getFile() . \" on line \" . $e->getLine() . \": \" . $e->getMessage());\n return false;\n } catch (ErrorException $e) {\n addAlert(\"danger\", \"Oops, looks like our server might have goofed. If you're an admin, please check the PHP error logs.\");\n return false;\n }\n}",
"public abstract function get_ids();",
"public function study_has_bulk_access($sid)\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('da_collections c');\t\n\t\t$this->db->join('da_collection_surveys cs', 'c.id = cs.cid','INNER');\n\t\t$this->db->where('cs.sid',$sid);\n\t\t$result=$this->db->get()->result_array();\n\n\t\treturn $result;\n\t}",
"protected function fetchSOAPRecordsFromFolder($folder)\n {\n $fileList = array();\n foreach(scandir($folder) as $file) {\n if(substr($file, 0, 1) != '.') {\n $fileContent = file_get_contents($folder.'/'.$file);\n\n $doc = new \\DOMDocument;\n $doc->loadXML($fileContent, LIBXML_NOERROR);\n $doc->formatOutput = TRUE;\n $fileContentFormatted = $doc->saveXML();\n\n array_push($fileList, $fileContentFormatted);\n }\n }\n return $fileList;\n }",
"protected function markStudents($exam)\n {\n $student_ids = $this->getRequest()->request->keys();\n $em = $this->getDoctrine()->getEntityManager();\n $invalid_records = array();\n for($i = 0; $i < count($student_ids); $i++)\n {\n $record = $this->getDoctrine()->getRepository(\"UnsapaIPWBundle:Record\")->findByExamAndStudentId($exam->getId(), $student_ids[$i]);\n\n if($record === NULL)\n throw $this->createNotFoundException(\"Étudiant inexistant.\");\n\n $mark = floatval($this->getRequest()->request->get($student_ids[$i]));\n $unpersistant_record = new Record();\n $unpersistant_record->setExam($record->getExam());\n $unpersistant_record->setStudent($record->getStudent());\n $unpersistant_record->setDocument($record->getDocument());\n $unpersistant_record->setMark($record->getMark());\n\n if(empty($mark))\n $unpersistant_record->setMark(NULL);\n else\n $unpersistant_record->setMark($mark);\n\n $validator = $this->get('validator');\n $errors = $validator->validate($unpersistant_record);\n if(count($errors) > 0)\n {\n array_push($invalid_records, $record);\n }\n else\n {\n $record->setMark($unpersistant_record->getMark());\n $em->persist($record);\n $em->flush();\n }\n }\n return $invalid_records;\n }",
"public function run()\n\t{\n\t\t$StudentRowset = Student::all();\n\t\t$count = 1;\n\t\t$subCount = 0;\n\t\tforeach ($StudentRowset as $StudentRow) {\n\n\t\t\tif ($subCount < 15) {\n\t\t\t\t$subCount += 1;\n\t\t\t} else {\n\t\t\t\t$subCount = 0;\n\t\t\t}\n\n\t\t\tif ($subCount == 0) {\n\t\t\t\t$count += 1;\n\t\t\t}\n\n\t\t\t$StudentRow->getCourseRowsetByRowset()->attach($StudentRow->id * $count);\n\t\t}\n\t}",
"private function listFolderFiles($dir){\n $children = false;\n $isRoot = false;\n if($dir==$this->file_storage){\n $isRoot = true;\n }\n\n $folderName = $this->getFolderName($dir);\n if(!$isRoot){\n //$this->info('Directory Name: '.$folderName['child']);\n //$this->info('Parent Name: '.$folderName['parent']);\n }\n\n //$this->info('Folder: '.$dir);\n\n foreach (new \\DirectoryIterator($dir) as $fileInfo) {\n if (!$fileInfo->isDot()) {\n if ($fileInfo->isDir()) {\n $this->listFolderFiles($fileInfo->getPathname());\n }else{\n $rename = false;\n //$this->info('File: '.$fileInfo->getFilename());\n //$info = new SplFileInfo($dir.'/'.$fileInfo->getFilename());\n $ext = \".\".pathinfo($fileInfo->getFilename(), PATHINFO_EXTENSION);\n //$ext = \".\"$info->getExtension();\n //$this->info('File: extension '.$ext);\n $filebreak = str_replace($ext,\"\",$fileInfo->getFilename());\n if (strpos($filebreak, '.') !== false || strpos($filebreak, \"'\") !== false || strpos($filebreak, \"#\") !== false) {\n $rename = true;\n }\n if($rename){\n $replace = array(\".\", \"'\", \"#\", \";\", \"/\", \"?\", \":\", \"@\", \"=\", \"&\", \",\");\n //“;”, “/”, “?”, “:”, “@”, “=” and “&\n $fileraw = str_replace($replace,\" \",$filebreak);\n //$this->info('File: raw '.$fileraw);\n $newfilename = $fileraw . $ext;\n //$this->info('File: new '.$newfilename);\n $prod_filename = $newfilename;\n rename($dir.'/'.$fileInfo->getFilename(),$dir.'/'.$newfilename);\n }else{\n $prod_filename = $fileInfo->getFilename();\n }\n $this->checkFileExtension($dir.'/'.$prod_filename, $prod_filename, $dir);\n }\n $children = true;\n }else{\n $children = false;\n }\n }\n //$this->info('Children: '.$children);\n\n if(!$isRoot){\n $this->folders[$this->count]['name'] \t\t\t= $folderName['child'];\n $this->folders[$this->count]['parent'] \t\t= $folderName['parent'];\n $this->folders[$this->count]['full_path']\t= $dir;\n $this->folders[$this->count]['children']\t= $children;\n $this->count++;\n }\n //$this->info('#################');\n }",
"public function test_scan_files()\n {\n $content = array('.gitignore','.htaccess','index.php','README');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_FILES);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\File', $dir);\n }\n }",
"function directory_scan($directory, $withfiles) {\n\t$scanned_directory = array_diff(scandir($directory), array(\"..\", \".\")); //This removes all of the unessesary results\n\n\tfor ($i = 0; ($i < count(scandir($directory))) && $withfiles == true; $i = $i + 1) {\n\t\tif (isset($scanned_directory[$i]) && (is_dir($directory . \"/\" . $scanned_directory[$i]) == FALSE)) { // If current item is a file, make it a download link\n\t\t\techo \"<div class='fileDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='movefrom[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/file.svg' class='foldersvg'/>\";\n\t\t\techo \"<p class='fileLink'>\" . $scanned_directory[$i] . \"</p>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='fileinfo'><b>Type</b>: \" . mime_content_type($directory. \"/\" . $scanned_directory[$i]) . \" <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 0) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\t\t\t\n\t\t\techo \"</div>\";\n\t\t} else if (isset($scanned_directory[$i]) && $directory . \"/\" . $scanned_directory[$i] != \"uploads/\" . $_SESSION[\"username\"] . \"/Trash\") { // Makes this a special dir box if a item is folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='movefrom[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\techo \"<input type='button' class='folderButton' value='\" . $scanned_directory[$i] . \"' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Type</b>: Folder <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 1) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\n\t\t\techo \"</div>\"; \n\t\t}\n\t}\n\t\n\tfor ($i = 0; ($i < count(scandir($directory))) && $withfiles == false; $i = $i + 1) { //$withfiles only outputs files when true. when false, it will output files and folders. This is for the right-side of the page\n\t\tif ($i==0 && $directory != \"uploads/\" . $_SESSION[\"username\"]) { //when $i gets to its first iteration, output the \"back a directory\" folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='moveto[../]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\techo \"<input type='button' class='folderButton' value='../' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Info</b>: Selecting this will move your selection back a folder.</p> \";\n\t\t\techo \"</div>\";\n\t\t}\n\t\t\n\t\tif (isset($scanned_directory[$i]) && is_dir($directory . \"/\" . $scanned_directory[$i])) { // Makes this a special dir box if an item is folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='moveto[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\tif ($directory . \"/\" . $scanned_directory[$i] == \"uploads/\" . $_SESSION[\"username\"] . \"/Trash\") {\n\t\t\t\techo \"<img src='Assets/SVG/bin.svg' class='foldersvg'/>\";\n\t\t\t} else {\n\t\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\t}\n\t\t\techo \"<input type='button' class='folderButton' value='\" . $scanned_directory[$i] . \"' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Type</b>: Folder <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 1) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\n\t\t\techo \"</div>\";\n\t\t}\n\t}\n\n}",
"function sidsearch($sid){\r\n\t\tif ($this->db->get_where('user',array('member_id'=>$sid))->num_rows()==1){\r\n\t\t\t$uid = end($this->db->get_where('user',array('member_id'=>$sid))->result())->id;\r\n\t\t\t$user_info = $this->db->get_where('user_info',array('uid'=>$uid))->row_array();\r\n\t\t\t$user_info['appendix'] = unserialize($user_info['appendix']);\r\n\t\t\tif (isset($user_info['appendix']['ulib']['comp_id']) && is_numeric($user_info['appendix']['ulib']['comp_id'])){\r\n\t\t\t\t$registered = TRUE;\r\n\t\t\t}else{\r\n\t\t\t\t$registered = FALSE;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//generate output\r\n\t\t\t$output = array('en' => $user_info['enn'],\r\n\t\t\t\t\t\t\t'fn' => $user_info['cnfn'],\r\n\t\t\t\t\t\t\t'ln' => $user_info['cnln'],\r\n\t\t\t\t\t\t\t'msg' => 'Target located',\r\n\t\t\t\t\t\t\t'code' => 0,\r\n\t\t\t\t\t\t\t'regi' => $registered,\r\n\t\t\t\t\t\t\t'class' => $user_info['appendix']['class']\r\n\t\t\t);\r\n\t\t}\r\n\t\t//get unregistered user information\r\n\t\telseif ($this->db->get_where('user_veri',array('member_id'=>$sid))->num_rows()==1){\r\n\t\t\t//get app\r\n\t\t\t$user_info = $this->db->get_where('user_veri',array('member_id'=>$sid))->row_array();\r\n\t\t\t$user_info['appendix'] = unserialize($user_info['appendix']);\r\n\t\t\tif (isset($user_info['appendix']['ulib']['comp_id']) && is_numeric($user_info['appendix']['ulib']['comp_id'])){\r\n\t\t\t\t$registered = TRUE;\r\n\t\t\t}else{\r\n\t\t\t\t$registered = FALSE;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$output = array('en' => $user_info['enn'],\r\n\t\t\t\t\t\t\t'fn' => $user_info['cnfn'],\r\n\t\t\t\t\t\t\t'ln' => $user_info['cnln'],\r\n\t\t\t\t\t\t\t'msg' => 'Target located',\r\n\t\t\t\t\t\t\t'code' => 0,\r\n\t\t\t\t\t\t\t'regi' => $registered,\r\n\t\t\t\t\t\t\t'class' => $user_info['appendix']['class']\r\n\t\t\t);\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$output = array('msg' => \"Not yet matched\",\r\n\t\t\t\t\t\t\t'code' => 100\r\n\t\t\t);\r\n\t\t}\r\n\t\t\r\n\t\treturn $output;\r\n\t}",
"protected function parse_csv_data(string $root_path, string $table_name)\n {\n // get the files\n $FILES = scandir($root_path);\n $FILES = array_diff(scandir($root_path), array('.', '..'));\n\n // scan each file and store into contaner\n $container = [];\n foreach($FILES as $file):\n\n // Get the complete path\n $COMPLETE_PATH = $root_path . $file;\n\n // Process each listing in the CSV file\n clearstatcache();\n if(filesize($COMPLETE_PATH)):\n\n $FILE_CONTENT = file_get_contents($COMPLETE_PATH); \n $COLUMN_NAME_COUNT = 0;\n\n while($dup_pos = strpos($FILE_CONTENT, \"()\")) {\n $FILE_CONTENT = substr_replace($FILE_CONTENT, \"UNKNOWN\" . $COLUMN_NAME_COUNT, $dup_pos, 2);\n $COLUMN_NAME_COUNT += 1;\n }\n file_put_contents($COMPLETE_PATH, $FILE_CONTENT);\n\n // pull csv data\n $csv = Reader::createFromPath($COMPLETE_PATH, 'r');\n $csv -> setHeaderOffset(0);\n $stmt = (new Statement()) -> offset(0);\n\n //process each listing entry\n $LISTINGS = $stmt -> process($csv);\n $data_obj = array(\n 'status' => true,\n 'tb_name' => $table_name,\n 'data' => $LISTINGS\n ); \n\n // store into container\n array_push($container, $data_obj); \n endif;\n endforeach;\n\n // return\n return $container;\n }"
] | [
"0.57698435",
"0.5550492",
"0.55180883",
"0.5496296",
"0.5408772",
"0.5361843",
"0.5304064",
"0.52624863",
"0.526012",
"0.5188724",
"0.51179993",
"0.511087",
"0.5094498",
"0.50861484",
"0.5077359",
"0.50752896",
"0.50510573",
"0.50421214",
"0.5021373",
"0.50137556",
"0.49985644",
"0.49973005",
"0.49949625",
"0.499082",
"0.49879503",
"0.4977608",
"0.49713218",
"0.49668923",
"0.49609333",
"0.49539343",
"0.49534068",
"0.4937366",
"0.49317893",
"0.4927971",
"0.49237674",
"0.49226385",
"0.49194747",
"0.49193916",
"0.49081597",
"0.48940125",
"0.48823762",
"0.48746616",
"0.48680028",
"0.4863936",
"0.48550293",
"0.4845074",
"0.4833907",
"0.48256892",
"0.47961253",
"0.47873443",
"0.47800863",
"0.47746232",
"0.47723225",
"0.4764005",
"0.4761452",
"0.4760936",
"0.47595802",
"0.47572872",
"0.47543773",
"0.4752614",
"0.47470322",
"0.47455454",
"0.4740261",
"0.47356147",
"0.4733047",
"0.47179914",
"0.47121534",
"0.4695967",
"0.4694359",
"0.46850616",
"0.46814916",
"0.46813148",
"0.46748337",
"0.46679676",
"0.46613166",
"0.46609896",
"0.46570653",
"0.4655952",
"0.4653825",
"0.46499154",
"0.4646614",
"0.46369144",
"0.463616",
"0.4623712",
"0.4622172",
"0.46076533",
"0.46014252",
"0.45955643",
"0.45940349",
"0.4589881",
"0.45863998",
"0.45803994",
"0.45782968",
"0.45755452",
"0.45702168",
"0.4564215",
"0.45598286",
"0.45558017",
"0.45487252",
"0.45454824"
] | 0.6625037 | 0 |
Sensure a directory is empty beore removing it. | function is_dir_empty($diectory)
{
if (!is_dir($diectory)) return false;
foreach (scandir($diectory) as $dir)
{
if (!in_array($dir, ['.','..','.json'])) return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function clear_directory($dir_path)\n{\n $dir = @opendir($dir_path);\n if(!$dir) return FALSE;\n\n while ($file = readdir($dir))\n if (strlen($file)>2)\n unlink(\"$dir_path/$file\");\n\n closedir($dir);\n return TRUE;\n}",
"function empty_dir($dir) {\n $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir), RecursiveIteratorIterator::CHILD_FIRST);\n foreach ($iterator as $file) {\n if ($file->isFile()) {\n @unlink($file->__toString());\n } else {\n @rmdir($file->__toString());\n }\n }\n }",
"function emptyDir($dir)\n{\n foreach (scandir($dir) as $basename) {\n $path = $dir . '/' . $basename;\n\n if (is_file($path)) {\n unlink($path);\n }\n }\n}",
"public function clean()\n {\n if ( is_dir( $this->_strDirectory ) ) {\n $h = opendir($this->_strDirectory);\n while ($h && $f = readdir($h)) { \n if ( $f != '.' && $f != '..') {\n $fn = $this->_strDirectory . '/' . $f;\n if ( is_dir($fn) ) {\n $dir = new Sys_Dir($fn);\n $dir->delete();\n } else {\n $file = new Sys_File( $fn );\n $file->delete();\n }\n }\n }\n\t if ( $h ) { closedir( $h ); }\n \n }\n }",
"public function testRemoveDirectory()\n {\n $directory = vfsStream::url('foo');\n $method = $this->makeMethodPublic('empty_directory');\n $method->invokeArgs($this->testModel, [$directory, true]);\n\n $this->assertFileNotExists(vfsStream::url('foo'));\n }",
"function delete_dir( $dir ) {\n\t\t$file_array = sb_folder_listing( $dir . '/', array( '.txt', '.gz' ) );\n\t\tif ( count( $file_array ) == 0 ) {\n\t\t\t// Directory is empty, delete it...\n\t\t\tsb_delete_directory( $dir );\n\t\t} else {\n\t\t\tfor ( $i = 0; $i < count( $file_array ); $i++ ) {\n\t\t\t\tsb_delete_file( $dir . '/' . $file_array[$i] );\n\t\t\t}\n\t\t\tsb_delete_directory( $dir );\n\t\t}\n\t}",
"public function remove_dir() {\n\n $path = $this->get_upload_pres_path();\n\n //append_debug_msg($path);\n\n if(!$path || !file_exists($path)){ return; }\n delete_dir($path);\n }",
"function empty_dir($name)\n{\n\tif($dir = @opendir($name))\n\t{\n\t\twhile($file=readdir($dir))\n\t\t{\n\t\t\tif($file!='..')\n\t\t\t{\n\t\t\t\t@unlink($file);\n\t\t\t}\n\t\t}\n\t\tclosedir($dir);\n\t}\n}",
"function remove_dir($path) {\n\t\tif (file_exists($path) && is_dir($path))\n\t\t\trmdir($path);\n\t}",
"public function emptyDirectory($directory)\n {\n if (is_dir($directory)) {\n iterator_count($this->scanDirectory($directory, false, 'rmdir', 'unlink'));\n }\n }",
"function recursive_remove_directory($directory, $empty = true) {\n\tif (substr($directory, -1) == DIRECTORY_SEPARATOR) {\n\t\t$directory = substr($directory, 0, -1);\n\t}\n\n\t// if the path is not valid or is not a directory ...\n\tif (!file_exists($directory) || !is_dir($directory)) {\n\t\t// ... we return false and exit the function\n\t\treturn FALSE;\n\n\t\t// ... if the path is not readable\n\t} elseif (!is_readable($directory)) {\n\t\t// ... we return false and exit the function\n\t\treturn FALSE;\n\n\t\t// ... else if the path is readable\n\t} else {\n\t\t// we open the directory\n\t\t$handle = opendir($directory);\n\n\t\t// and scan through the items inside\n\t\twhile (FALSE !== ($item = readdir($handle))) {\n\t\t\t// if the filepointer is not the current directory\n\t\t\t// or the parent directory\n\t\t\tif ($item != '.' && $item != '..') {\n\t\t\t\t// we build the new path to delete\n\t\t\t\t$path = $directory . DIRECTORY_SEPARATOR . $item;\n\n\t\t\t\t// if the new path is a directory\n\t\t\t\tif (is_dir($path)) {\n\t\t\t\t\t// we call this function with the new path\n\t\t\t\t\trecursive_remove_directory($path, $empty);\n\t\t\t\t\t// if the new path is a file\n\t\t\t\t} else {\n\t\t\t\t\t// $path = normalize_path($path, false);\n\t\t\t\t\ttry {\n\t\t\t\t\t\t@unlink($path);\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}\n\t\t\t}\n\t\t}\n\n\t\t// close the directory\n\t\tclosedir($handle);\n\n\t\t// if the option to empty is not set to true\n\t\tif ($empty == FALSE) {\n\t\t\t@rmdir($directory);\n\t\t\t// try to delete the now empty directory\n\t\t\t// if (!rmdir($directory)) {\n\t\t\t//\n\t\t\t// // return false if not possible\n\t\t\t// return FALSE;\n\t\t\t// }\n\t\t}\n\n\t\t// return success\n\t\treturn TRUE;\n\t}\n}",
"public function destroyFolder()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'];\n if (!file_exists($file)) die('File not found '.$file);\n if (!is_dir($file)) die('Not a folder '.$file);\n $h=opendir($file);\n while($f=readdir($h)) {\n if ($f!='.' && $f!='..') die('Folder is not empty');\n }\n closedir($h);\n rmdir($file);\n }",
"public function testCleanDirectory()\n {\n mkdir(self::$temp.DS.'baz');\n file_put_contents(self::$temp.DS.'baz'.DS.'file.txt', 'Hello World');\n\n Storage::cleandir(self::$temp.DS.'baz');\n\n $this->assertTrue(is_dir(self::$temp.DS.'baz'));\n $this->assertTrue(! is_file(self::$temp.DS.'baz'.DS.'file.txt'));\n }",
"public function test_remove()\n {\n $path = ROOT.DS.'test_dir';\n $object = Directory::create($path);\n $object->remove($path);\n $this->assertFalse(is_dir($path));\n }",
"function clear_local($dir){\n \n$di = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS);\n$ri = new RecursiveIteratorIterator($di, RecursiveIteratorIterator::CHILD_FIRST);\nforeach ( $ri as $file ) {\n $file->isDir() ? rmdir($file) : unlink($file);\n}\n\n\n\n}",
"public function clear()\n {\n return FileHelper::rmdir($this->path);\n }",
"function deleteDirectory($dir) { //this function is taken from https://stackoverflow.com/questions/1653771/how-do-i-remove-a-directory-that-is-not-empty\n\t if (!file_exists($dir)) {\n\t return true;\n\t }\n\t\n\t if (!is_dir($dir)) {\n\t return unlink($dir);\n\t }\n\t\n\t foreach (scandir($dir) as $item) {\n\t if ($item == '.' || $item == '..') {\n\t continue;\n\t }\n\t\n\t if (!deleteDirectory($dir . DIRECTORY_SEPARATOR . $item)) {\n\t return false;\n\t }\n\t\n\t }\n\t\n\t return rmdir($dir);\n\t}",
"public function cleanUpFolder()\r\n {\r\n $fs = new Filesystem();\r\n\r\n foreach($this->file_list as $file) :\r\n if ( preg_match('#^'.$this->destination_dir.'/#', $file))\r\n $fs->remove($file);\r\n endforeach;\r\n }",
"public function emptyDirectory($directory)\n {\n if(!is_dir($directory))\n {\n return;\n }\n $filesystem = new Filesystem();\n\n $finder = new Finder();\n $finder->in($directory)->depth(0);\n foreach($finder as $file)\n {\n $filesystem->remove($file);\n }\n }",
"public function testDeleteDirectory()\n {\n mkdir(self::$temp.DS.'foo');\n file_put_contents(self::$temp.DS.'foo'.DS.'file.txt', 'Hello World');\n\n Storage::rmdir(self::$temp.DS.'foo');\n\n $this->assertTrue(! is_dir(self::$temp.DS.'foo'));\n $this->assertTrue(! is_file(self::$temp.DS.'foo'.DS.'file.txt'));\n }",
"protected function clean()\n {\n /** @var Directory $directory */\n $directory = WPStaging::getInstance()->get(Directory::class);\n (new Filesystem())->delete($directory->getCacheDirectory());\n (new Filesystem())->mkdir($directory->getCacheDirectory(), true);\n }",
"function delete() {\n global $USER;\n if($this->Dir !== 0 && $this->mayI(DELETE)) {\n $this->loadStructure();\n foreach($this->files as $file) {\n $file->delete();\n }\n foreach($this->folders as $folder) {\n $folder->delete();\n }\n rmdir($this->path);\n parent::delete();\n }\n }",
"public function flush()\n {\n if ($this->fileSystem->isDirectory($this->directory))\n {\n $this->fileSystem->deleteDirectory($this->directory, true);\n }\n }",
"function clearDirUpload($dossier) {\r\n\t\t$ouverture=@opendir($dossier);\r\n\t\tif (!$ouverture) return false;\r\n\t\twhile($fichier=readdir($ouverture)) {\r\n\t\t\tif ($fichier == '.' || $fichier == '..' || $fichier == \".htaccess\") continue;\r\n\t\t\t\tif (is_dir($dossier.\"/\".$fichier)) {\r\n\t\t\t\t\t$r=clearDirUpload($dossier.\"/\".$fichier);\r\n\t\t\t\t\tif (!$r) return false;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$r=@unlink($dossier.\"/\".$fichier);\r\n\t\t\t\t\tif (!$r) return false;\r\n\t\t\t\t}\r\n\t\t}\r\n\t\tclosedir($ouverture);\r\n\t\t$r=@rmdir($dossier);\r\n\t\tif (!$r) return false;\r\n\t\treturn true;\r\n\t}",
"function recursive_remove_directory($directory, $empty=FALSE)\n{\n\tif(substr($directory,-1) == '/')\n\t{\n\t\t$directory = substr($directory,0,-1);\n\t}\n\n\t// if the path is not valid or is not a directory ...\n\tif(!file_exists($directory) || !is_dir($directory))\n\t{\n\t\t// ... we return false and exit the function\n\t\treturn FALSE;\n\n\t// ... if the path is not readable\n\t}elseif(!is_readable($directory))\n\t{\n\t\t// ... we return false and exit the function\n\t\treturn FALSE;\n\n\t// ... else if the path is readable\n\t}else{\n\n\t\t// we open the directory\n\t\t$handle = opendir($directory);\n\n\t\t// and scan through the items inside\n\t\twhile (FALSE !== ($item = readdir($handle)))\n\t\t{\n\t\t\t// if the filepointer is not the current directory\n\t\t\t// or the parent directory\n\t\t\tif($item != '.' && $item != '..')\n\t\t\t{\n\t\t\t\t// we build the new path to delete\n\t\t\t\t$path = $directory.'/'.$item;\n\n\t\t\t\t// if the new path is a directory\n\t\t\t\tif(is_dir($path)) \n\t\t\t\t{\n\t\t\t\t\t// we call this function with the new path\n\t\t\t\t\trecursive_remove_directory($path);\n\n\t\t\t\t// if the new path is a file\n\t\t\t\t}else{\n\t\t\t\t\t// we remove the file\n\t\t\t\t\tunlink($path);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// close the directory\n\t\tclosedir($handle);\n\n\t\t// if the option to empty is not set to true\n\t\tif($empty == FALSE)\n\t\t{\n\t\t\t// try to delete the now empty directory\n\t\t\tif(!rmdir($directory))\n\t\t\t{\n\t\t\t\t// return false if not possible\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t// return success\n\t\treturn TRUE;\n\t}\n}",
"public function testEmptyDirectory()\n {\n $directory = vfsStream::url('foo');\n $method = $this->makeMethodPublic('empty_directory');\n $method->invokeArgs($this->testModel, [$directory]);\n \n $this->assertFalse($this->mockFileUploadDir->hasChild('bar'));\n $this->assertFileExists(vfsStream::url('foo'));\n }",
"function recursive_remove_directory($directory, $empty=FALSE)\r\n{\r\n if(substr($directory,-1) == '/')\r\n {\r\n $directory = substr($directory,0,-1);\r\n }\r\n if(!file_exists($directory) || !is_dir($directory))\r\n {\r\n return FALSE;\r\n }elseif(is_readable($directory))\r\n {\r\n $handle = opendir($directory);\r\n while (FALSE !== ($item = readdir($handle)))\r\n {\r\n if($item != '.' && $item != '..')\r\n {\r\n $path = $directory.'/'.$item;\r\n if(is_dir($path)) \r\n {\r\n recursive_remove_directory($path);\r\n }else{\r\n unlink($path);\r\n }\r\n }\r\n }\r\n closedir($handle);\r\n if($empty == FALSE)\r\n {\r\n if(!rmdir($directory))\r\n {\r\n return FALSE;\r\n }\r\n }\r\n }\r\n return TRUE;\r\n }",
"public function delete()\n {\n $filesystem = $this->localFilesystem(dirname($this->path));\n\n method_exists($filesystem, 'deleteDir')\n ? $filesystem->deleteDir(basename($this->path))\n : $filesystem->deleteDirectory(basename($this->path));\n }",
"public function clearDir(string $path): void\n {\n foreach ($this->listContents($path, false) as $content) {\n if ($content instanceof DirectoryAttributes) {\n $this->clearDir($content->path());\n $this->deleteDirectory($content->path());\n } else {\n $this->delete($content->path());\n }\n }\n }",
"function recursiveDelete ($directory, $empty = true) { \r\n\r\n if(substr($directory,-1) == \"/\") { \r\n $directory = substr($directory,0,-1); \r\n } \r\n\r\n if(!file_exists($directory) || !is_dir($directory)) { \r\n return false; \r\n } elseif(!is_readable($directory)) { \r\n return false; \r\n } else { \r\n $directoryHandle = opendir($directory);\r\n $contents = \".\";\r\n\r\n while ($contents) {\r\n $contents = readdir($directoryHandle);\r\n if(strlen($contents) && $contents != '.' && $contents != '..') {\r\n $path = $directory . \"/\" . $contents; \r\n \r\n if(is_dir($path)) { \r\n recursiveDelete($path); \r\n } else { \r\n unlink($path); \r\n } \r\n } \r\n } \r\n \r\n closedir($directoryHandle); \r\n\r\n if($empty == true) { \r\n if(!rmdir($directory)) {\r\n return false; \r\n } \r\n } \r\n \r\n return true; \r\n } \r\n}",
"private function _rmdirs($directory, $empty = true)\n {\n if (substr($directory, -1) == DIRECTORY_SEPARATOR) {\n $directory = substr($directory, 0, -1);\n }\n\n // if the path is not valid or is not a directory ...\n if (!file_exists($directory) || !is_dir($directory)) {\n // ... we return false and exit the function\n return FALSE;\n } elseif (!is_readable($directory)) {\n // ... we return false and exit the function\n return FALSE;\n // ... else if the path is readable\n } else {\n // we open the directory\n $handle = opendir($directory);\n // and scan through the items inside\n while (FALSE !== ($item = readdir($handle))) {\n // we build the new path to delete\n $path = $directory . DIRECTORY_SEPARATOR . $item;\n if (!in_array($item, $this->mw_cache_deleted_items)) {\n if ($item != '.' && $item != '..' && substr($item, 0, 1) !== '.') {\n // if the path is a directory\n if (is_dir($path)) {\n // we call this function with the new path\n $this->_rmdirs($path, $empty);\n } else {\n // if the path is a file\n try {\n $this->mw_cache_deleted_items[] = $item;\n if (is_file($path)) {\n @unlink($path);\n }\n } catch (Exception $e) {\n }\n }\n }\n // $this->mw_cache_deleted_items[] = $item;\n }\n\n }\n // close the directory\n closedir($handle);\n // if the option to empty is not set to true\n if ($empty == FALSE) {\n @rmdir($directory);\n\n }\n return TRUE;\n }\n }",
"private function clear()\n {\n unlink($this->getConfig()->read('tmp_dir') . Evaluator::FILENAME);\n rmdir($this->getConfig()->read('tmp_dir'));\n }",
"public function delete($delete_dir_if_empty = true)\n\t{\n\t\t$this->_parent->{$this->_name.'_file_name'} = '';\n\t\t$this->_parent->{$this->_name.'_file_size'} = 0;\n\t\t$this->_parent->{$this->_name.'_content_type'} = '';\n\t\t$this->_parent->save(array('validate' => false, 'save_attachments' => false));\n\n\n\t\t/* Since the parent is updated by this point, this attachment now thinks everything is \"junk\" */\n\t\t$this->deleteJunk();\n\n\t\t/* Now, lets remove the parent folder to keeps things clean */\n\t\t$dir = dirname($this->path());\n\t\tif(is_dir($dir))\n\t\t\trmdir(dirname($this->path()));\n\n\t\treturn true;\n\t}",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"private function cleanTmp()\n {\n // cleanup files in tmp\n $dir = ELAB_ROOT . '/uploads/tmp';\n $di = new \\RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS);\n $ri = new \\RecursiveIteratorIterator($di, \\RecursiveIteratorIterator::CHILD_FIRST);\n foreach ($ri as $file) {\n $file->isDir() ? rmdir($file) : unlink($file);\n }\n }",
"function clean_temp_dir($dir='') {\n // that a mess may be piling up in $CFG->dataroot/temp/webworkquiz_import\n return true;\n \n if ($dir == '') {\n $dir = $this->temp_dir; \n }\n $slash = \"/\";\n\n // Create arrays to store files and directories\n $dir_files = array();\n $dir_subdirs = array();\n\n // Make sure we can delete it\n chmod($dir, 0777);\n\n if ((($handle = opendir($dir))) == FALSE) {\n // The directory could not be opened\n return false;\n }\n\n // Loop through all directory entries, and construct two temporary arrays containing files and sub directories\n while($entry = readdir($handle)) {\n if (is_dir($dir. $slash .$entry) && $entry != \"..\" && $entry != \".\") {\n $dir_subdirs[] = $dir. $slash .$entry;\n }\n else if ($entry != \"..\" && $entry != \".\") {\n $dir_files[] = $dir. $slash .$entry;\n }\n }\n\n // Delete all files in the curent directory return false and halt if a file cannot be removed\n for($i=0; $i<count($dir_files); $i++) {\n chmod($dir_files[$i], 0777);\n if (((unlink($dir_files[$i]))) == FALSE) {\n return false;\n }\n }\n\n // Empty sub directories and then remove the directory\n for($i=0; $i<count($dir_subdirs); $i++) {\n chmod($dir_subdirs[$i], 0777);\n if ($this->clean_temp_dir($dir_subdirs[$i]) == FALSE) {\n return false;\n }\n else {\n if (rmdir($dir_subdirs[$i]) == FALSE) {\n return false;\n }\n }\n }\n\n // Close directory\n closedir($handle);\n if (rmdir($this->temp_dir) == FALSE) {\n return false; \n }\n // Success, every thing is gone return true\n return true;\n }",
"function scorm_delete_files($directory) {\n if (is_dir($directory)) {\n $files=scorm_scandir($directory);\n set_time_limit(0);\n foreach($files as $file) {\n if (($file != '.') && ($file != '..')) {\n if (!is_dir($directory.'/'.$file)) {\n unlink($directory.'/'.$file);\n } else {\n scorm_delete_files($directory.'/'.$file);\n }\n }\n }\n rmdir($directory);\n return true;\n }\n return false;\n}",
"public function emptyDirectory($file, $inLoop=0)\n\t{\n\t\t$errors = 0;\n\t\t\n\t\t//-----------------------------------------\n\t\t// Remove trailing slashes..\n\t\t//-----------------------------------------\n\t\t\n\t\t$file = rtrim( $file, '/' );\n\t\t\n\t\tif ( file_exists($file) )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Attempt CHMOD\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t@chmod( $file, IPS_FOLDER_PERMISSION );\n\t\t\t\n\t\t\tif ( is_dir( $file ) )\n\t\t\t{\n\t\t\t\t$handle = opendir( $file );\n\t\t\t\t\n\t\t\t\twhile ( ($filename = readdir($handle)) !== false )\n\t\t\t\t{\n\t\t\t\t\tif ( ($filename != \".\") && ($filename != \"..\") )\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->emptyDirectory( $file.\"/\".$filename, 1 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tclosedir($handle);\n\t\t\t\t\n\t\t\t\tif ( $inLoop )\n\t\t\t\t{\n\t\t\t\t\tif ( ! @rmdir($file) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$errors++;\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 ( ! @unlink($file) )\n\t\t\t\t{\n\t\t\t\t\t$errors++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( $errors == 0 )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function truncateDir( $sDir ){\n foreach( new DirectoryIterator( $sDir ) as $oFileDir ) {\n if( $oFileDir->isFile( ) ){\n unlink( $oFileDir->getPathname( ) );\n }\n else{\n if( $oFileDir->isDir( ) && ( !strstr( $oFileDir->getFilename( ), '.' ) && !strlen( $oFileDir->getFilename( ) ) < 3 ) ){\n $this->truncateDir( $oFileDir->getPathname( ).'/' );\n rmdir( $oFileDir->getPathname( ) );\n }\n }\n } // end foreach\n }",
"public function on_delete() {\n $this->remove_dir();\n }",
"function clearDir($dir) {\n\t\treturn cmfcDirectory::clear($dir);\n\t}",
"protected function cleanup() {\n $h = opendir($this->tmpdir);\n while (false !== ($e = readdir($h))) {\n if ($e!='.'&&$e!='..'&&is_file($this->tmpdir.'/'.$e)) unlink ($this->tmpdir.'/'.$e);\n }\n if (is_object($this->history)) $this->history->cleanup();\n closedir($h);\n rmdir($this->tmpdir);\n }",
"function RecursiveDelete($sDirectory, $bIsEmpty = false) \n{ \n if(substr($sDirectory,-1) == \"/\") \n\t{ \n $sDirectory = substr($sDirectory, 0, -1); \n } \n\n if(!file_exists($sDirectory) || !is_dir($sDirectory)) \n\t{ \n return false; \n } else\n\t\tif(!is_readable($sDirectory)) \n\t\t{ \n\t\t\treturn false; \n\t\t} else \n\t\t{ \n\t\t\t$stDirectoryHandle = opendir($sDirectory); \n\t\t\t\n\t\t\twhile ($sContents = readdir($stDirectoryHandle)) \n\t\t\t{ \n\t\t\t\tif($sContents != '.' && $sContents != '..' && $sContents != '.htaccess') \n\t\t\t\t{ \n\t\t\t\t\t$sPath = $sDirectory . \"/\" . $sContents; \n\t\t\t\t\t\n\t\t\t\t\tif(is_dir($sPath)) \n\t\t\t\t\t{ \n\t\t\t\t\t\tRecursiveDelete($sPath); \n\t\t\t\t\t} else \n\t\t\t\t\t{ \n\t\t\t\t\t\tunlink($sPath); \n\t\t\t\t\t} \n\t\t\t\t} \n\t\t\t} \n\t\t\t\n\t\t\tclosedir($stDirectoryHandle); \n\n\t\t\tif($bIsEmpty == false) \n\t\t\t{ \n\t\t\t\tif(!rmdir($sDirectory)) \n\t\t\t\t{ \n\t\t\t\t\treturn false; \n\t\t\t\t} \n\t\t\t} \n\t\t\t\n\t\t\treturn true; \n\t\t} \n}",
"public static function clear(){\n $directory = \"bin\";\n\n if(is_dir($directory)) {\n $scan = scandir($directory);\n unset($scan[0], $scan[1]); //unset . and ..\n foreach($scan as $file) {\n $filename = \"$directory/$file\";\n $filedate = date (\"d/m/Y\", filemtime($filename));\n\n if( $filedate < date(\"d/m/Y\") )\n unlink($filename);\n }\n }\n }",
"public function clear()\n {\n $handle = opendir(CACHE_FOLDER);\n while (false !== ($file = readdir($handle))) {\n if ($file !== '.' && $file !== '..') {\n if (is_dir(CACHE_FOLDER . $file)) {\n //purge ($dir.$file.'/');\n //rmdir($dir.$file);\n } else {\n unlink(CACHE_FOLDER . $file);\n }\n }\n }\n closedir($handle);\n\n return true;\n }",
"public static function remove_empty_subfolders($path) {\n $empty = true;\n $files = glob($path . DIRECTORY_SEPARATOR . \"*\");\n foreach ($files as $file) {\n $empty &= is_dir($file) && FilesHelper::remove_empty_subfolders($file);\n }\n\n if ($empty && false === @rmdir($path)) {\n ProviderLog::errorHandler(E_USER_ERROR, \"Can't rmdir $path\" . (isset($php_errormsg) ? \", $php_errormsg\" : \"\"), __FILE__, __LINE__);\n }\n return $empty;\n }",
"private function clear_directory(string $dir): void {\n $clear = apply_filters(static::CLEAR_FILTER, false);\n if (!$clear || !$dir || !file_exists($dir)) {\n return;\n }\n $files = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($dir, \\RecursiveDirectoryIterator::SKIP_DOTS),\n \\RecursiveIteratorIterator::CHILD_FIRST\n );\n foreach ($files as $fileinfo) {\n $todo = ($fileinfo->isDir() ? 'rmdir' : 'unlink');\n $todo($fileinfo->getRealPath());\n }\n }",
"function cleanDir($path) {\n if(file_exists($path) && is_dir($path)){\n\t\t$dirHandle = opendir($path);\n\t\twhile(false!==($file = readdir($dirHandle))){\n\t\t\tif($file!='.' && $file!='..' && $file!='db_upload.php'){\n\t\t\t\t$tmpPath = $path.'/'.$file;\n\t\t\t\tchmod($tmpPath, 0777);\n\t\t\t\tif(is_dir($tmpPath)){\n\t\t\t\t\tcleanDir($tmpPath);\n\t\t\t\t} else {\n\t\t\t\t\tif(!unlink($tmpPath)){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tclosedir($dirHandle);\n \n\t} else {\n\t\treturn false;\n\t}\n}",
"function rrmdir($dir) {\n if (is_dir($dir)) { \n $objects = scandir($dir); \n foreach ($objects as $object) { \n if ($object != \".\" && $object != \"..\") { \n if (filetype($dir.\"/\".$object) == \"dir\") rrmdir($dir.\"/\".$object); else unlink($dir.\"/\".$object); \n } \n } \n reset($objects);\n rmdir($dir); \n } \n }",
"function recursive_remove_directory($directory, $empty=FALSE)\n{\n if(substr($directory,-1) == '/')\n {\n $directory = substr($directory,0,-1);\n }\n\n // if the path is not valid or is not a directory ...\n if(!file_exists($directory) || !is_dir($directory))\n {\n // ... we return false and exit the function\n return FALSE;\n\n // ... if the path is not readable\n }elseif(!is_readable($directory))\n {\n // ... we return false and exit the function\n return FALSE;\n\n // ... else if the path is readable\n }else{\n\n // we open the directory\n $handle = opendir($directory);\n\n // and scan through the items inside\n while (FALSE !== ($item = readdir($handle)))\n {\n // if the filepointer is not the current directory\n // or the parent directory\n if($item != '.' && $item != '..')\n {\n // we build the new path to delete\n $path = $directory.'/'.$item;\n\n // if the new path is a directory\n if(is_dir($path)) \n {\n // we call this function with the new path\n recursive_remove_directory($path);\n\n // if the new path is a file\n }else{\n // we remove the file\n unlink($path);\n }\n }\n }\n // close the directory\n closedir($handle);\n\n // if the option to empty is not set to true\n if($empty == FALSE)\n {\n // try to delete the now empty directory\n if(!rmdir($directory))\n {\n // return false if not possible\n return FALSE;\n }\n }\n // return success\n return TRUE;\n }\n}",
"public function cleanupUploadsFolder()\n {\n $upload_folder = $this->getTempFolder();\n if ( is_dir( $upload_folder ) ) {\n $this->cleanupFolder( $upload_folder );\n }\n }",
"public function deleteDirectory()\n {\n if ($this->isFatalError()) {\n $this->returnException('Can not delete directory: ' . $this->deleteDir . '. This seems to be the root directory. Exclude this directory from deleting and try again.');\n throw new \\Exception('Can not delete directory: ' . $this->deleteDir . ' This seems to be the root directory. Exclude this directory from deleting and try again.');\n }\n\n // Finished or path does not exist\n if (\n empty($this->deleteDir) ||\n $this->deleteDir == get_home_path() ||\n !is_dir($this->deleteDir)\n ) {\n $this->job->current = \"finish\";\n $this->updateJob();\n return $this->deleteFinish();\n }\n\n $this->log(\"Delete staging site: \" . $this->clone->path, Logger::TYPE_INFO);\n\n // Make sure the root dir is never deleted!\n if ($this->deleteDir == get_home_path()) {\n $this->log(\"Fatal Error 8: Trying to delete root of WP installation!\", Logger::TYPE_CRITICAL);\n $this->returnException('Fatal Error 8: Trying to delete root of WP installation!');\n }\n\n // Check if threshold is reached\n if ($this->isOverThreshold()) {\n return;\n }\n\n $clone = (string)$this->clone->path;\n $errorMessage = __(sprintf(\"Could not delete the entire staging site. The folder %s still exists and is not empty. <br/> Try to empty this folder manually by using FTP or file manager plugin and then try to delete again the staging site here.<br/> If this happens again please contact us at [email protected]\", $clone), \"wp-staging\");\n $deleteStatus = \"finished\";\n if ($this->isNotEmpty($this->deleteDir)) {\n $fs = (new Filesystem())\n ->setShouldStop([$this, 'isOverThreshold'])\n ->setRecursive();\n try {\n if (!$fs->deleteNew($this->deleteDir)) {\n return;\n }\n } catch (\\RuntimeException $ex) {\n $errorMessage = $ex->getMessage();\n $deleteStatus = \"unfinished\";\n }\n }\n\n // Throw fatal error if the folder has still not been deleted and there are files in it\n if ($this->isNotEmpty($this->deleteDir)) {\n $response = [\n 'job' => 'delete',\n 'status' => true,\n 'delete' => $deleteStatus,\n 'message' => $errorMessage,\n 'error' => true,\n ];\n wp_die(json_encode($response));\n }\n\n // Successful finish deleting job\n return $this->deleteFinish();\n }",
"public function clear(): bool\n {\n $directory = new \\RecursiveDirectoryIterator($this->directory);\n\n // Return false if has subdirectories\n /* @var \\SplFileInfo $element */\n foreach ($directory as $element) {\n // Skip '.' and '..' directories\n if (\\in_array($element->getFilename(), ['.', '..'], true)) {\n continue;\n }\n\n if ($element->isDir()) {\n return false;\n }\n }\n\n // Remove all files\n /** @var \\SplFileInfo $element */\n foreach ($directory as $element) {\n // Skip '.' and '..' directories\n if (\\in_array($element->getFilename(), ['.', '..'], true)) {\n continue;\n }\n\n // Delete the file\n if ($element->isFile()) {\n \\unlink($element->getPathname());\n }\n }\n\n return \\rmdir($directory->getPath());\n }",
"function cleanUpTmpFiles($target){\n if (is_dir($target)) {\n $files = glob($target . '*', GLOB_MARK); //GLOB_MARK adds a slash to directories returned\n\n foreach ($files as $file) {\n cleanUpTmpFiles($file);\n }\n\n // Checks if dir is empty\n if (!(new FilesystemIterator($target))->valid()) {\n rmdir($target);\n }\n } elseif (is_file($target)) {\n unlink($target);\n }\n}",
"private function maybe_remove_dir( $dir ) {\r\n\t\tif ( $this->filesystem->is_dir( $dir ) ) {\r\n\t\t\trocket_rrmdir( $dir, [], $this->filesystem );\r\n\t\t}\r\n\t}",
"function emptydir($dirname=null, $filepattern='*') {\n if ($dirname === null) { return; }\n array_map('unlink', glob($dirname.$filepattern));\n }",
"public static function deleteDirectory ($path) {\n\t\t\\rmdir($path);\n\t}",
"public function clear()\n {\n return $this->hashDirectory->clearDirectory($this->path);\n }",
"function rrmdir($dir) {\nif (is_dir($dir)) {\n $objects = scandir($dir);\n foreach ($objects as $object) {\n if ($object != \".\" && $object != \"..\") {\n if (filetype($dir.\"/\".$object) == \"dir\") rrmdir($dir.\"/\".$object); else unlink($dir.\"/\".$object);\n }\n }\n reset($objects);\n rmdir($dir);\n}\n}",
"function rrmdir($path) {\n\t$files = glob($path . '/*');\n\tforeach ($files as $file) {\n\t\tis_dir($file) ? rrmdir($file) : unlink($file);\n\t}\n\trmdir($path);\n\treturn;\n}",
"function clean_dirsize_cache($path)\n {\n }",
"protected function cleanupChunks(){\n\t\tforeach (scandir($this->chunksFolder) as $item){\n\t\t\tif ($item == \".\" || $item == \"..\")\n\t\t\t\tcontinue;\n\n\t\t\t$path = $this->chunksFolder.DIRECTORY_SEPARATOR.$item;\n\n\t\t\tif (!is_dir($path))\n\t\t\t\tcontinue;\n\n\t\t\tif (time() - filemtime($path) > $this->chunksExpireIn){\n\t\t\t\t$this->removeDir($path);\n\t\t\t}\n\t\t}\n\t}",
"protected function cleanupTestDirectory() {\n\t\tforeach ($this->filesToRemove as $file) {\n\t\t\tif (file_exists($this->testBasePath . $file)) {\n\t\t\t\tunlink($this->testBasePath . $file);\n\t\t\t}\n\t\t}\n\n\t\tforeach ($this->directoriesToRemove as $directory) {\n\t\t\tif (file_exists($this->testBasePath . $directory)) {\n\t\t\t\trmdir($this->testBasePath . $directory);\n\t\t\t}\n\t\t}\n\t}",
"protected function cleanDirectories()\n {\n $filesystem = new Filesystem();\n\n $filesystem->cleanDirectory($this->getSeedFilePath());\n\n $filesystem->cleanDirectory(database_path('factories'));\n }",
"public function clean()\n {\n $fileSystem = new Filesystem();\n \n if ($fileSystem->exists($this->getCacheDir())) {\n $fileSystem->remove($this->getCacheDir());\n }\n }",
"function rrmdir($dir) {\n if (is_dir($dir)) { \n $objects = scandir($dir); \n foreach ($objects as $object) { \n if ($object != \".\" && $object != \"..\") { \n if (filetype($dir.\"/\".$object) == \"dir\") rmdir($dir.\"/\".$object); else \\\nunlink($dir.\"/\".$object); \n } \n } \n reset($objects); \n rmdir($dir); \n } \n}",
"protected function cleanOutputDir()\n {\n $directoryIterator = new RecursiveDirectoryIterator(\n ZEPHIR_PARSER_OUTPUT,\n FilesystemIterator::KEY_AS_PATHNAME |\n FilesystemIterator::CURRENT_AS_FILEINFO |\n FilesystemIterator::SKIP_DOTS\n );\n\n $iterator = iterator_to_array(\n new RecursiveIteratorIterator($directoryIterator, RecursiveIteratorIterator::CHILD_FIRST)\n );\n\n try {\n foreach ($iterator as $file) {\n /* @var \\SplFileInfo $file */\n if ($file->isDir()) {\n rmdir($file->getRealPath());\n continue;\n }\n\n if (strpos($file->getBasename(), '.') !== 0) {\n unlink($file->getRealPath());\n }\n }\n } catch (\\UnexpectedValueException $e) {\n // Ignore\n }\n }",
"private function remove_directory($path) {\n $files = glob($path . '/*');\n foreach ($files as $file) {\n is_dir($file) ? remove_directory($file) : unlink($file);\n }\n rmdir($path);\n return;\n }",
"function delete_tmp_folder_content()\n{\n\t$baseDir = '../backups/tmp/';\n\t$files = scandir($baseDir);\n\tforeach ($files as $file) \n\t{\n\t\tif ( ($file != '.') && ($file != '..') && ($file != '.htaccess') ) \n\t\t{\n\t\t\tif ( is_dir($baseDir . $file) ) recursive_deletion($baseDir.$file.'/');\n\t\t\telse unlink('../backups/tmp/' . $file);\n\t\t}\n\t}\n}",
"public function flush()\n {\n if (! $this->files->isDirectory($this->directory)) {\n return false;\n }\n\n foreach ($this->files->directories($this->directory) as $directory) {\n $deleted = $this->files->deleteDirectory($directory);\n\n if (! $deleted || $this->files->exists($directory)) {\n return false;\n }\n }\n\n return true;\n }",
"function flushDir($dir) {\n\t$files = glob(\"$dir/*\");\n\tforeach($files as $file) {\n\t\tif (is_dir($file)) {\n\t\t\tflushDir($file);\n\t\t\trmdir($file);\n\t\t} elseif (is_file($file)) {\n\t\t\tunlink($file);\n\t\t}\n\t}\n\t\n\t$hiddenFiles = glob(\"$dir/.*\");\n\tforeach($hiddenFiles as $hiddenFile)\n\t{\n\t\tif (is_file($hiddenFile)) {\n\t\t\tunlink($hiddenFile);\n\t\t}\n\t}\n}",
"function clearCacheDirectory($directory = NULL) {\n $counter = 0;\n if (empty($directory)) {\n if (defined('PAPAYA_PATH_PUBLICFILES') &&\n trim(PAPAYA_PATH_PUBLICFILES) != '') {\n $directory = $_SERVER['DOCUMENT_ROOT'].PAPAYA_PATH_PUBLICFILES;\n }\n }\n if (is_dir($directory)) {\n if ($dh = opendir($directory)) {\n while (FALSE !== ($file = readdir($dh))) {\n if ($file != '.' && $file != '..') {\n if (is_dir($directory.$file)) {\n $counter += $this->clearCacheDirectory($directory.$file.'/');\n @rmdir($directory.$file);\n } elseif (is_file($directory.$file)) {\n @unlink($directory.$file);\n ++$counter;\n }\n }\n }\n }\n }\n return $counter;\n }",
"function rrmdir($dir) {\n\tif (is_dir($dir)) {\n\t $objects = scandir($dir);\n\n\t //debug($objects);\n\n\t foreach ($objects as $object) {\n\t\tif ($object != \".\" && $object != \"..\") {\n\t\t\t//echo $dir.\"/\".$object . '<br>';\n\n\t\t if (filetype($dir.\"/\".$object) == \"dir\") rmdir($dir.\"/\".$object); else unlink($dir.\"/\".$object);\n\t\t}\n\t }\n\t reset($objects);\n\t rmdir($dir);\n\t}\n }",
"function remove_directory($src)\n{\n $dir = opendir($src);\n while(false !== ( $file = readdir($dir)) )\n\t{\n if (( $file != '.' ) && ( $file != '..' ))\n\t\t{\n $full = $src . '/' . $file;\n\t\t\t\n if ( is_dir($full) )\n\t\t\t{\n remove_directory($full);\n }\n else\n\t\t\t{\n unlink($full);\n }\n }\n }\n closedir($dir);\n rmdir($src);\n}",
"public function testDeleteDirectoryReturnFalseWhenNotADirectory()\n {\n mkdir(self::$temp.DS.'bar');\n file_put_contents(self::$temp.DS.'bar'.DS.'file.txt', 'Hello World');\n\n $this->assertFalse(Storage::rmdir(self::$temp.DS.'bar'.DS.'file.txt'));\n }",
"private function clearFolder()\n {\n foreach (File::allFiles(Auth()->user()->getPublicPath()) as $file) {\n File::delete($file);\n }\n return null;\n }",
"function rrmdir($dir)\n{\n ini_set('max_execution_time', 0);\n set_time_limit(0);\n if (is_dir($dir)) {\n $files = scandir($dir);\n foreach ($files as $file) {\n if ($file != \".\" && $file != \"..\") {\n rrmdir(\"$dir/$file\");\n }\n }\n rmdir($dir);\n } elseif (file_exists($dir)) {\n unlink($dir);\n }\n return true;\n}",
"protected function cleanupFilesystem() {\n $this->deleteFile($this->_directories[\"communication.log\"]);\n $this->deleteFile($this->_directories[\"communicationDetails\"]);\n $this->deleteFile($this->_directories[\"communityRegistry\"]);\n $this->deleteDirector($this->_directories[\"communityDefinitionsDir\"]);\n $this->deleteDirector($this->_directories[\"nodeListDir\"]);\n }",
"function deletedirectory($path)\n{\n $files = glob($path . '*', GLOB_MARK);\n foreach ($files as $file)\n {\n unlink($file);\n }\n rmdir($path);\n}",
"public static function delete_directory() {\n\n\t \t$dirname = ABSPATH . trailingslashit( get_option('upload_path') ) . 'zip_downloads';\n\t\n\t if ( is_dir( $dirname ) )\n\t \t$dir_handle = opendir( $dirname ); \n\t\n\t if ( !$dir_handle )\n\t\t\treturn false;\n\t\n\t while( $file = readdir( $dir_handle ) ) {\n\t\n\t \tif ( $file != \".\" && $file != \"..\" ) {\n\t \tif ( !is_dir( $dirname . \"/\" . $file ) ) \n\t \t\tunlink( $dirname . \"/\" . $file ); \n\t \t} \n\t } \n\t\n\t closedir( $dir_handle );\n\t rmdir( $dirname ); \n\t return true; \n \t}",
"function delete_directory($dirname) {\n if (is_dir($dirname))\n $dir_handle = opendir($dirname);\nif (!$dir_handle)\n return false;\nwhile($myfile = readdir($dir_handle)) {\n if ($myfile != \".\" && $myfile != \"..\") {\n if (!is_dir($dirname.\"/\".$myfile))\n unlink($dirname.\"/\".$myfile);\n else\n delete_directory($dirname.'/'.$myfile);\n }\n}\nclosedir($dir_handle);\nrmdir($dirname);\nreturn true;\n}",
"protected function cleanup()\n {\n $cleanupDirNames = ['Repository', 'Voter', 'Entity', 'Form', '../templates'];\n foreach ($cleanupDirNames as $cleanupDirName) {\n if (is_dir($dir = __DIR__ . '/App/src/' . $cleanupDirName)) {\n $this->rrmdir($dir);\n }\n }\n // Entity-dir must exist or locators for entity will fail (doctrine functionality; cannot be changed)\n mkdir(__DIR__.'/App/src/Entity');\n }",
"function fud_rmdir($dir, $deleteRootToo=false)\n{\n\tif(!$dh = @opendir($dir)) {\n\t\treturn;\n\t}\n\twhile (false !== ($obj = readdir($dh))) {\n\t\tif($obj == '.' || $obj == '..') {\n\t\t\tcontinue;\n\t\t}\n\t\tif (!@unlink($dir .'/'. $obj)) {\n\t\t\tfud_rmdir($dir .'/'. $obj, true);\n\t\t}\n\t}\n\tclosedir($dh);\n\tif ($deleteRootToo) {\n\t\t@rmdir($dir);\n\t}\n\treturn;\n}",
"public function cleanTmpFolder() {\n\t\tarray_map('unlink', glob($this->settings->tmp_path . '/*'));\n\t}",
"public function delete()\n {\n if (empty($this->_dirname))\n {\n return FALSE;\n }\n return $this->delete_rec($this->_dirname);\n }",
"function _removeDir($dir) {\r\n\t\tif(file_exists($dir)) {\r\n\t\t\tif($objs = glob($dir.\"/*\"))\r\n\t\t\t\tforeach($objs as $obj) {\r\n\t\t\t\t\tis_dir($obj) ? rmdir($obj) : unlink($obj);\r\n\t\t\t\t}\r\n\t\t\trmdir($dir);\r\n\t\t}\r\n\t}",
"function delete_dir($path)\n{\n $file_scan = scandir($path);\n foreach ($file_scan as $filecheck)\n {\n $file_extension = pathinfo($filecheck, PATHINFO_EXTENSION);\n if ($filecheck != '.' && $filecheck != '..')\n {\n if ($file_extension == '')\n {\n delete_dir($path . $filecheck . '/');\n }\n else\n {\n unlink($path . $filecheck);\n }\n }\n }\n rmdir($path);\n}",
"protected function emptyDirectory($directory, $deleteDirectory = false)\n\t{\n\t\tif (!is_dir($directory) || !($directoryHandle = opendir($directory))) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\twhile (false !== ($object = readdir($directoryHandle))) \n\t\t{\n\t\t\tif ($object == '.' || $object == '..') {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (!is_dir($directory.'/'.$object)) {\n\t\t\t\tunlink($directory.'/'.$object);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->emptyDirectory($directory.'/'.$object, true);\t// The object is a folder, recurse through it.\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($deleteDirectory)\n\t\t{\n\t\t\tclosedir($directoryHandle);\n\t\t\trmdir($directory);\n\t\t}\n\t}",
"function rrmdir($path)\n{\n exec(\"rm -rf {$path}\");\n}",
"function cleanupTmp() {\n // try to delete all the tmp files we know about.\n foreach($this->tmpFilesCreated as $file) {\n if(file_exists($file)) {\n $status = unlink($file);\n }\n }\n $this->tmpFilesCreated = array();\n // try to completely delete each directory we created.\n $dirs = array_reverse($this->tmpDirsCreated);\n foreach($dirs as $dir) {\n if(file_exists($dir)) {\n $this->recursiveRmdir($dir);\n }\n }\n $this->tmpDirsCreated = array();\n }",
"function remdir()\r\n {\r\n if(is_writable($_REQUEST['file']))\r\n {\r\n $dir=$_GET['file'];\r\n $this->deleteDirectory($dir); \r\n }\r\n else{echo \"Permission Denied !\";}\r\n }",
"public function clearStorage(): void\n {\n// foreach ($this->remoteFilesystems as $filesystem) {\n// $contents = $filesystem->listContents('/', true);\n// foreach ($contents as $contentItem) {\n// if ('file' !== $contentItem['type']) {\n// continue;\n// }\n// $filesystem->delete($contentItem['path']);\n// }\n// }\n }",
"private function rrmdir($dir) { \r\n\t foreach(glob($dir . '/*') as $file) { \r\n\t if(is_dir($file)) rrmdir($file); else unlink($file); \r\n\t } \r\n\t rmdir($dir); \r\n\t}",
"public function clear() {\n @rmpath($this->storage);\n }",
"public function cleanFolders() {\n if ($this->config->item('clean_folders') == true) {\n $dirs = array_diff(scandir($this->pathCreator), array('.', '..', '.DS_Store'));\n\n if (!empty($dirs)) {\n foreach ($dirs as $folder) {\n print(\"\\nFolder : \" . $folder);\n print(\"\\nMax Date : \" . date('Y-m-d H:i:s', strtotime('-' . $this->config->item('clean_folders_time'))));\n print(\"\\nCreated On : \" . date('Y-m-d H:i:s', filemtime($this->pathCreator . '/' . $folder)));\n\n if (strtotime('-' . $this->config->item('clean_folders_time')) > filemtime($this->pathCreator . '/' . $folder)) {\n print(\"\\n...Deleted !\");\n system('rm -rf ' . escapeshellarg($this->pathCreator . '/' . $folder), $retval);\n } else {\n print(\"\\n...Living...\");\n }\n }\n }\n print(\"\\n\\nProcess complete !\");\n } else {\n print(\"\\n\\nError : Active 'clean_folders' in /application/config.php\");\n }\n }",
"function isDirEmpty($dir)\n{\n if (!is_readable($dir)) {\n return null;\n }\n\n return (count(scandir($dir)) == 2);\n}",
"function rrmdir($dir) {\r\n\tif (is_dir($dir)) {\r\n\t\t$objects = scandir($dir);\r\n\t\tforeach ($objects as $object) {\r\n\t\t\tif ($object != \".\" && $object != \"..\") {\r\n\t\t\t\tif (filetype($dir.\"/\".$object) == \"dir\") rrmdir($dir.\"/\".$object); else unlink($dir.\"/\".$object);\r\n\t\t\t}\r\n\t\t}\r\n\t\treset($objects);\r\n\t\treturn rmdir($dir);\r\n\t}\r\n}",
"function deleteFolder();",
"public static function clean($dir){\n self::output(sprintf(\"removing %s\", $dir));\n $files = scandir($dir);\n foreach($files as $file){\n if($file === \".\" || $file === \"..\" || $file === \"./\"){\n continue;\n }\n if(is_dir($dir . '/' . $file)){\n self::clean($dir . '/' . $file);\n rmdir($dir . '/' . $file);\n } else {\n unlink($dir . '/' . $file);\n }\n }\n return true;\n }",
"protected static function cleanup($path)\n {\n \tforeach (array('', '.orig', '.x', '.y') as $suffix) {\n\t \tif (is_dir($path . $suffix) && !is_link($path . $suffix)) {\n\t \t\tstatic::cleanup($path . $suffix . '/' . basename($path));\n\t \t\tif (!rmdir($path . $suffix)) throw new Exception(\"Cleanup failed\");\n\t\t\t} elseif (file_exists($path . $suffix) || is_link($path . $suffix)) {\n\t\t\t\tunlink($path . $suffix);\n\t\t\t}\n \t}\n }",
"function delete_directory($dir) { \r\n \t \r\n\t if(is_dir($dir)) { $current_dir = opendir($dir); } else { return false; }\r\n \t \r\n \t while($entryname = readdir($current_dir)) { \r\n\t\t if(is_dir(\"$dir/$entryname\") and ($entryname != \".\" and $entryname!=\"..\")) { \r\n\t\t\t\tdelete_directory(\"${dir}/${entryname}\"); \r\n\t\t } elseif ($entryname != \".\" and $entryname!=\"..\") { \r\n\t\t\t\tunlink(\"${dir}/${entryname}\"); \r\n\t\t } \r\n \t } \r\n \t \r\n \t closedir($current_dir); \r\n \t @rmdir(${dir});\r\n\t \r\n\t return true; \r\n }"
] | [
"0.69822717",
"0.68900925",
"0.6833278",
"0.68303496",
"0.67394084",
"0.6573315",
"0.65600204",
"0.6551564",
"0.65309227",
"0.653",
"0.6487482",
"0.643801",
"0.64371556",
"0.6404532",
"0.6403065",
"0.6378778",
"0.637524",
"0.63386786",
"0.6327002",
"0.6317663",
"0.6314302",
"0.62475216",
"0.6247472",
"0.62377816",
"0.6225096",
"0.6190519",
"0.6187281",
"0.6170931",
"0.6161399",
"0.61561346",
"0.61421406",
"0.6139484",
"0.6139113",
"0.61352307",
"0.6133126",
"0.61189896",
"0.6117966",
"0.60823303",
"0.60687625",
"0.60597616",
"0.60485184",
"0.60290545",
"0.6021372",
"0.601643",
"0.6010199",
"0.600837",
"0.6006908",
"0.60035145",
"0.60033256",
"0.59988815",
"0.59930867",
"0.59895176",
"0.59866357",
"0.59711826",
"0.5962274",
"0.5961982",
"0.5956569",
"0.59393907",
"0.592892",
"0.5897031",
"0.5895936",
"0.58918196",
"0.5888485",
"0.58866215",
"0.588647",
"0.5878695",
"0.5878329",
"0.58683443",
"0.5855171",
"0.585161",
"0.58462983",
"0.58454573",
"0.5840584",
"0.58345795",
"0.581679",
"0.5812435",
"0.5801365",
"0.5801362",
"0.57969487",
"0.57964605",
"0.57893044",
"0.5785986",
"0.5785881",
"0.578483",
"0.57800126",
"0.577837",
"0.5774188",
"0.57677394",
"0.57654804",
"0.5737473",
"0.57348037",
"0.5731945",
"0.5728259",
"0.57134557",
"0.5712985",
"0.57050735",
"0.57049066",
"0.57017916",
"0.5692675",
"0.5690421",
"0.5683403"
] | 0.0 | -1 |
Get Order by an OrderNumber | public function getById($orderlineId); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function fetchOrderModel(string $orderNumber): Order\n {\n /** @var Order $order */\n $order = Bootstrap::getObjectManager()->get(Order::class);\n $order->loadByIncrementId($orderNumber);\n return $order;\n }",
"public static function getOrderIdByOrderNumber($orderNumber)\n {\n\n $db = JFactory::getDBO();\n $q = 'SELECT `virtuemart_order_id` FROM `#__virtuemart_orders` WHERE `order_number`=\"' . $db->escape($orderNumber) . '\"';\n $db->setQuery($q);\n $orderId = $db->loadResult();\n return $orderId;\n }",
"public function getOrderNumber();",
"public function getOrderNumber();",
"private function getOrder($orderoid){\n $rs = selectQuery('select * from WTSORDER where KOID=\"'.$orderoid.'\"');\n if ($rs->rowcount() == 1){\n $ors = $rs->fetch();\n foreach($ors as $k=>$v){\n\t$order->{$k} = $v;\n }\n } else {\n $order = null;\n XLogs::critical(get_class($this), 'Impossible de trouver la commande ayant pour KOID : '.$orderoid);\n }\n return $order;\n }",
"public static function order($orderId) {\n //Return an object with the information about $orderId\n\t\t\treturn self::get(self::order_index() . '/' . $orderId);\n\t\t}",
"public static function getByNumber($number)\n {\n return self::whereOrderNumTunn($number)\n ->first();\n }",
"public static function getOrder($number)\n {\n if (empty($number) === true)\n return null;\n\n /** @var \\Magento\\Framework\\ObjectManagerInterface $om */\n $om = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n\n $isInvoiceNumber = str_starts_with($number, '{invoicenumber}');\n if ($isInvoiceNumber)\n $number = substr($number, strpos($number, '{invoicenumber}') + 15);\n\n if (empty($number) === true)\n return null;\n\n $order = null;\n if ($isInvoiceNumber) {\n $invoice = $om->create('\\Magento\\Sales\\Model\\Order\\Invoice')->loadByIncrementId($number);\n if (empty($invoice) === true)\n return null;\n $order = $invoice->getOrder();\n if (empty($order) === true)\n return null;\n } else {\n $order = $om->create('\\Magento\\Sales\\Model\\Order')->loadByIncrementId($number);\n if (empty($order) === true)\n return null;\n if ($number != $order->getIncrementId())\n return null;\n }\n\n $conf_general = $om->get('\\Magento\\Framework\\App\\Config\\ScopeConfigInterface')->getValue('general',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n\n $ret = [ ];\n $ret ['number'] = $order->getIncrementId();\n $ret ['status'] = $order->getStatus();\n $ret ['date'] = date('d.m.Y', strtotime($order->getCreatedAt()));\n $ret ['email'] = $order->getCustomerEmail();\n $ret ['customer_number'] = $order->getCustomerId();\n $ret ['payment_method'] = $order->getPayment() == null ? null : ($order->getPayment()->getMethodInstance() == null ? null : $order->getPayment()->getMethodInstance()->getCode());\n $ret ['amount'] = $order->getGrandTotal();\n $ret ['currency_code'] = $order->getOrderCurrencyCode();\n $ret ['exchange_rate'] = $order->getBaseToOrderRate();\n\n // Rechnungsnummer und -datum\n $invoiceColl = $order->getInvoiceCollection();\n if ($invoiceColl->getSize() > 0) {\n foreach ($order->getInvoiceCollection() as $invoice) {\n $ret ['invoice_number'] [] = $invoice->getIncrementId();\n $invoiceDate = date('d.m.Y', strtotime($invoice->getCreatedAt()));\n if (!isset($ret ['invoice_date']) || strtotime($ret ['invoice_date']) < strtotime($invoiceDate)) {\n $ret ['invoice_date'] = $invoiceDate;\n }\n }\n }\n\n $shippingAddress = $order->getShippingAddress();\n if ($shippingAddress) {\n $ret ['delivery_firstname'] = self::myutf8_encode($shippingAddress->getFirstname());\n $ret ['delivery_lastname'] = self::myutf8_encode($shippingAddress->getLastname());\n $ret ['delivery_company'] = self::myutf8_encode($shippingAddress->getCompany());\n if (method_exists($shippingAddress, 'getStreetFull')) {\n $ret ['delivery_street'] = self::myutf8_encode($shippingAddress->getStreetFull());\n } elseif (method_exists($shippingAddress, 'getStreet')) {\n $street = $shippingAddress->getStreet();\n $ret ['delivery_street'] = self::myutf8_encode($street [0]);\n }\n $ret ['delivery_postcode'] = self::myutf8_encode($shippingAddress->getPostcode());\n $ret ['delivery_city'] = self::myutf8_encode($shippingAddress->getCity());\n $ret ['delivery_countrycode'] = self::myutf8_encode($shippingAddress->getCountryId());\n $ret ['delivery_phone'] = self::myutf8_encode($shippingAddress->getTelephone());\n }\n\n $billingAddress = $order->getBillingAddress();\n if ($billingAddress) {\n $ret ['language_code'] = substr($conf_general ['locale'] ['code'], 0, 2) . '-' . $billingAddress->getCountryId();\n $ret ['billing_firstname'] = self::myutf8_encode($billingAddress->getFirstname());\n $ret ['billing_lastname'] = self::myutf8_encode($billingAddress->getLastname());\n $ret ['billing_company'] = self::myutf8_encode($billingAddress->getCompany());\n if (method_exists($billingAddress, 'getStreetFull')) {\n $ret ['billing_street'] = self::myutf8_encode($billingAddress->getStreetFull());\n } elseif (method_exists($billingAddress, 'getStreet')) {\n $street = $billingAddress->getStreet();\n $ret ['billing_street'] = self::myutf8_encode($street [0]);\n }\n $ret ['billing_postcode'] = self::myutf8_encode($billingAddress->getPostcode());\n $ret ['billing_city'] = self::myutf8_encode($billingAddress->getCity());\n $ret ['billing_countrycode'] = self::myutf8_encode($billingAddress->getCountryId());\n $ret ['billing_phone'] = self::myutf8_encode($billingAddress->getTelephone());\n } else {\n $ret ['language_code'] = substr($conf_general ['locale'] ['code'], 0, 2);\n }\n\n foreach ($order->getAllItems() as $itemId => $item) {\n $sku = $item->getSku();\n if ($sku) {\n $ret ['products'] [] = $sku;\n } else {\n $ret ['products'] [] = $item->getName();\n }\n }\n\n $ret ['store_id'] = $order->getStoreId();\n\n /** @var \\Magento\\Framework\\Module\\Dir\\Reader $reader */\n $reader = $om->get('\\Magento\\Framework\\Module\\Dir\\Reader');\n $path = $reader->getModuleDir('', 'Ltc_Komfortkasse');\n $order_extension = false;\n if (file_exists(\"{$path}/Helper/KomfortkasseOrderExtension.php\") === true) {\n $order_extension = true;\n }\n if ($order_extension && method_exists('KomfortkasseOrderExtension', 'extendOrder') === true) {\n $ret = KomfortkasseOrderExtension::extendOrder($order, $ret);\n }\n\n return $ret;\n }",
"public function queryOrdernumber($ordn) {\n\t\t$q = $this->query();\n\t\t$q->filterByOrdernumber($ordn);\n\t\treturn $q;\n\t}",
"public function GetQuestion($OrderNumber) {\n foreach ($this->list as $Item) {\n if ($Item->OrderNumber == $OrderNumber)\n return $Item;\n }\n return null;\n }",
"public function getOneOrder($orderId) {\n\n $this->load->model('account/order');\n return $this->model_account_order->getOrder($orderId);\n }",
"public function getOrderById($orderId)\n {\n }",
"public function setOrderNumber($var)\n {\n GPBUtil::checkString($var, True);\n $this->orderNumber = $var;\n\n return $this;\n }",
"static public function getOrderById($order_id) {\n $order = DB::table('orders')->where('id', $order_id)->get();\n return $order;\n }",
"static function getOrder(int $OrderID) {\r\n $sqlSelect = \"SELECT * FROM Orders WHERE OrderID = :OrderID\";\r\n //Query\r\n self::$db->query($sqlSelect);\r\n //Bind\r\n self::$db->bind(':OrderID', $OrderID);\r\n //Execute\r\n self::$db->execute();\r\n //Return\r\n return self::$db->singleResult();\r\n }",
"public function getOrderNumber()\n {\n return $this->orderNumber;\n }",
"public function getOrderNumber()\n {\n return $this->orderNumber;\n }",
"public function getOrderNumber()\n {\n return $this->orderNumber;\n }",
"public function getOrder(string $order_id): \\GDAX\\Types\\Response\\Authenticated\\Order;",
"public function setOrderNumber($orderNumber)\n {\n $this->orderNumber = $orderNumber;\n return $this;\n }",
"public function getOrderNumber()\n {\n return $this->OrderNumber;\n }",
"public function ordernumber($ordn) {\n\t\tif ($ordn) {\n\t\t\t$this->query->filterByOrdernumber($ordn);\n\t\t}\n\t\treturn $this;\n\t}",
"public function getOrderByID($order_id)\n {\n $order = $this->db->prepare(<<<SQL\nSELECT orders.order_id, orders.order_date, orders.arrival_date, orders.student_number\nFROM orders\nWHERE orders.order_id = :order_id\nORDER BY orders.order_date;\nSQL\n );\n $order->execute(array(':order_id' => $order_id));\n return $order->fetch(\\PDO::FETCH_OBJ);\n }",
"public function getOrder()\n {\n return $this->orderFactory->create()->load($this->getReservedOrderId(), 'increment_id');\n }",
"public function getExtOrderIdByOrderId($orderId)\n {\n $connection = $this->getConnection();\n $tableName = $this->getMainTable();\n $table = $this->getTable($tableName);\n\n $select = $connection->select()\n ->from($table, OrderReferenceInterface::EXT_ORDER_ID)\n ->where('order_id = :order_id');\n\n $bind = [':order_id' => (string)$orderId];\n\n return $connection->fetchOne($select, $bind);\n }",
"public function getOrder($orderId) {\n\t\t$action = new EventerraActionMyOrders($this);\n\t\ttry {\n\t\t\t$array = $action->request($orderId);\n\t\t} catch (\\Eventerra\\Exceptions\\EventerraSDKException $exception) {\n\t\t\tif ($exception->getCode() == 5) {\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\tthrow $exception;\n\t\t\t}\n\t\t}\n\t\treturn array_shift($array);\n\t}",
"public function getOrderId();",
"public function bookingByOrder($orderNo)\n\t{\n\t\t$ch = new Curl();\n\t\t\n\t\t$this->headers['Authorization'] = 'Bearer ' . $this->authToken;\n\t\t\n\t\t$data = [];\n\t\t\n\t\treturn $ch->get(GojekID::BASE_ENDPOINT . Action::bookingByOrder . '/' . $orderNo, $data, $this->headers)->getResponse();\n\t}",
"public function getPurchaseOrderNumber();",
"public function getOrderIdByExtOrderId($extOrderId)\n {\n $connection = $this->getConnection();\n $tableName = $this->getMainTable();\n $table = $this->getTable($tableName);\n\n $select = $connection->select()\n ->from($table, OrderReferenceInterface::ORDER_ID)\n ->where('ext_order_id = :ext_order_id');\n\n $bind = [':ext_order_id' => (string)$extOrderId];\n\n return $connection->fetchOne($select, $bind);\n }",
"private function _getOrder()\n {\n if (!is_null($this->_order)) {\n return $this->_order;\n }\n \n $orderId = $this->getRequest()->getParam('orderId');\n if (!empty($orderId)) {\n $this->_order = Mage::getSingleton('sales/order')->loadByIncrementId($orderId);\n return $this->_order;\n }\n \n Mage::throwException('Forbidden');\n }",
"public function get_order( $order_id ) {\n\t\treturn $this->request( \"orders/{$order_id}\" );\n\t}",
"private function getOrderById(int $orderId): OrderInterface\n {\n return $this->orderRepository->get($orderId);\n }",
"private function getOrder($order_id){\r\n\r\n if($this->flow_woocommerce_version_check()){\r\n return new WC_Order($order_id);\r\n }\r\n else{\r\n return wc_get_order($order_id);\r\n }\r\n }",
"protected function getOrderItem()\n\t{\n\t\t$search = $this->object->createSearch();\n\n\t\t$expr = [];\n\t\t$expr[] = $search->compare( '==', 'order.base.rebate', 14.50 );\n\t\t$expr[] = $search->compare( '==', 'order.base.sitecode', 'unittest' );\n\t\t$expr[] = $search->compare( '==', 'order.base.price', 53.50 );\n\t\t$expr[] = $search->compare( '==', 'order.base.editor', $this->editor );\n\t\t$search->setConditions( $search->combine( '&&', $expr ) );\n\t\t$results = $this->object->searchItems( $search );\n\n\t\tif( ( $item = reset( $results ) ) === false ) {\n\t\t\tthrow new \\RuntimeException( 'No order found' );\n\t\t}\n\n\t\treturn $item;\n\t}",
"function getOrder($orderId) {\n\techo \"Getting Order: \" . $orderId . \"</br>\";\n\t$response = getRequest('/api/order/' . $orderId);\n\tprintInfo($response);\n}",
"public function getOrder($url, $orderUUID);",
"function getOrder();",
"public function orderNumber($order_number) {\n $this->data['attachment']['payload']['order_number'] = $order_number;\n\n return $this;\n }",
"public static function getByOrderId($orderId) {\n $result = db_query('\n SELECT instruction_id as id\n FROM `'.self::tableName.'` \n WHERE order_id = '.(int)$orderId\n )->fetchAll(\\PDO::FETCH_OBJ);\n if(!is_array($result))\n return NULL;\n return new Instruction($result[count($result)-1]->id);\n }",
"public function getOrderById($id_order)\n {\n return $this->orderRepository->getOrderById($id_order);\n }",
"protected function _getOrder()\n {\n if (empty($this->_order)) {\n // get proper order\n $id = $this->_request['track_id'];\n $this->_order = Mage::getModel('sales/order')->loadByIncrementId($id);\n if (!$this->_order->getId()) {\n $this->_debugData['exception'] = sprintf('Wrong order ID: \"%s\".', $id);\n $this->_debug();\n Mage::app()->getResponse()\n ->setHeader('HTTP/1.1','503 Service Unavailable')\n ->sendResponse();\n exit;\n }\n }\n return $this->_order;\n }",
"protected function getOrder($orderId) {\n $order = Order::with('items.catalog.product')->where('id', '=', $orderId)->where('status', '=', Order::PENDING)->first();\n return $order;\n }",
"public function getOrder();",
"public function getOrder();",
"public function getOrder();",
"public function getOrder();",
"public function getOrder();",
"public function getOrder();",
"public function getOrderNumber()\n {\n return array_key_exists('OrderNumber', $this->data) ? $this->data['OrderNumber'] : null;\n }",
"public function getOrderByReference(string $order_reference): OrderInterface;",
"function getSelectedOrder($orderId) {\n try {\n // get DB connection\n $db = new DbOperation();\n $orders = $db->getSelectedOrder ($orderId);\n if ( $orders != null ) {\n echo '{\"gotOrder\":' . json_encode ( $orders ) . '}';\n } else {\n echo '{\"error\":{\"text\":' . \"Failed to get orders data\" . '}}';\n }\n } catch ( Exception $e ) {\n echo '{\"error\":{\"text\":' . $e->getMessage () . '}}';\n }\n}",
"public function getOrderNo()\n {\n return $this->order_no;\n }",
"function getOrder()\n{\n\n}",
"public function getOrderno()\n {\n return $this->orderno;\n }",
"function findById($orderId);",
"function getOrderbyId($order_id){\n\t\t$conn \t= connectDB();\n\t\t$sth \t= $conn \t-> prepare('SELECT *\n\t\t\t\t\t\t\t\t\t\tFROM `order`\n\t\t\t\t\t\t\t\t\t\tWHERE `id` = ? ');\n\t\t$sth \t-> execute(array($order_id));\n\t\treturn \t$sth;\n\t}",
"public function getOrder($purchaseOrderNumber): GetOrderResponse\n {\n return $this->client->request('getOrder', 'GET', \"vendor/directFulfillment/orders/v1/purchaseOrders/{$purchaseOrderNumber}\",\n [\n ]\n );\n }",
"public function getInvoiceOrder();",
"public function setOrderNumber($orderNumber)\n {\n $this->orderNumber = $orderNumber;\n }",
"protected function getOrderNumber($idOrder, $tryNumber)\n {\n return intval($idOrder) . '_' . intval($tryNumber);\n }",
"public function getOrderDetailsByOrderId($orderId)\n {\n $sql = <<<'EOT'\nSELECT\n `d`.`id` AS `orderdetailsID`,\n `d`.`orderID` AS `orderID`,\n `d`.`ordernumber`,\n `d`.`articleID`,\n `d`.`articleordernumber`,\n `d`.`price` AS `price`,\n `d`.`quantity` AS `quantity`,\n `d`.`price`*`d`.`quantity` AS `invoice`,\n `d`.`name`,\n `d`.`status`,\n `d`.`shipped`,\n `d`.`shippedgroup`,\n `d`.`releasedate`,\n `d`.`modus`,\n `d`.`esdarticle`,\n `d`.`taxID`,\n `t`.`tax`,\n `d`.`tax_rate`,\n `d`.`esdarticle` AS `esd`\nFROM\n `s_order_details` AS `d`\nLEFT JOIN\n `s_core_tax` AS `t`\nON\n `t`.`id` = `d`.`taxID`\nWHERE\n `d`.`orderID` = :orderId\nORDER BY\n `orderdetailsID` ASC\nEOT;\n\n return $this->db->fetchAll($sql, ['orderId' => $orderId]);\n }",
"public function getOrder()\n {\n return $this->hasOne(Orders::className(), ['id' => 'order_id']);\n }",
"public function getExistingOrder($orderid = '') {\n $orderid = isset($orderid) ? $orderid : '';\n\n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId($orderid);\n\n // if no order found\n if (!$order->getId())\n return FALSE;\n else\n return $order;\n}",
"public function retrieveCustomerOrder($customer_nr, $order_nr)\n {\n $query = 'SELECT order_view.order_nr, name, order_view.state, buying_price, ROUND(order_view.price, 2) AS total, model, ski_quantity, msrp, subtotal, date_placed \n FROM order_view INNER JOIN orders ON orders.order_nr = order_view.order_nr WHERE order_view.order_nr = :order_nr';\n $stmt = $this->db->prepare($query);\n $stmt->bindValue(\":order_nr\", $order_nr);\n $stmt->execute();\n $orders = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n if (empty($orders))\n throw new BusinessException(httpErrorConst::notFound, \"Record not found\");\n\n $row = array();\n\n // Prints order\n $row['order_nr'] = $orders[0]['order_nr'];\n $row['name'] = $orders[0]['name'];\n $row['date_placed'] = $orders[0]['date_placed'];\n $row['buying_price'] = $orders[0]['buying_price'];\n $row['state'] = $orders[0]['state'];\n $row['total'] = $orders[0]['total'];\n\n // Prints suborders\n $row['sub_orders'] = array();\n for($i = 0; $i < count($orders); $i++){\n $this->fillSubOrder($row, $i, $orders[$i]);\n }\n\n return $row;\n }",
"public function getOrder($user_id, $order_id)\n {\n $where = [\n 'user_id' => $user_id,\n 'order_id' =>$order_id,\n ];\n $result = $this->where($where)->find(); \n\n return $result;\n }",
"protected function GetOrderID() {\n\treturn $this->Value('ID_Order');\n }",
"public function getOrder()\n {\n $orderId = $this->getData(self::ORDER_ID);\n\n return $this->order->load($orderId);\n }",
"function _getSSOrderID($google_order_number){\r\n\t\t\r\n\t\t\t$dbq = 'SELECT orderID FROM ?#ORDERS_TABLE WHERE google_order_number=?';\r\n\t\t\t$dbr = db_phquery($dbq, $google_order_number);\r\n\t\t\tif(!db_num_rows($dbr['resource'])){\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t\tlist($order_id) = db_fetch_row($dbr);\r\n\t\t\treturn $order_id;\r\n\t}",
"public function setOrderNo($order_no)\n {\n $this->order_no = $order_no;\n\n return $this;\n }",
"public function getByOrder($orderId) {\n\n return $this->fetchAll(\n $this->select()\n ->where(\"`orderId` = ?\", $orderId)\n );\n }",
"public function getOrder()\n {\n return $this->hasOne(Order::className(), ['id' => 'order_id']);\n }",
"public function getOrder()\n {\n return $this->hasOne(Order::className(), ['id' => 'order_id']);\n }",
"function get_order()\n{\n\n}",
"function getOrderId($orderName) \n {\n return (int)preg_replace(\"/[^0-9]/\", \"\", $orderName);\n }",
"public function setOrderNumber($value)\n {\n return $this->set('OrderNumber', $value);\n }",
"public function get_order_data_from_table( $order ) {\n\t\tglobal $wpdb;\n\n\t\treturn $wpdb->get_row( $wpdb->prepare( \"SELECT * FROM {$wpdb->prefix}woocommerce_orders WHERE order_id = %d;\", $order->get_id() ) );\n\t}",
"public function getOrderIdByOrderPass($orderNumber, $orderPass)\n {\n\n $db = JFactory::getDBO();\n $q = 'SELECT `virtuemart_order_id` FROM `#__virtuemart_orders` WHERE `order_pass`=\"' . $db->escape($orderPass) . '\" AND `order_number`=\"' . $db->escape($orderNumber) . '\"';\n $db->setQuery($q);\n $orderId = $db->loadResult();\n if (empty($orderId)) vmdebug('getOrderIdByOrderPass no Order found $orderNumber = ' . $orderNumber . ' $orderPass = ' . $orderPass . ' $q = ' . $q);\n return $orderId;\n }",
"public function getCheckoutPurchaseOrderNo();",
"private function fetchOrder()\n {\n $this->oOrder = Mage::getSingleton('sales/order');\n try {\n $this->oOrder->load($this->getParameter('orderid',self::REGEX_INTEGER));\n } catch (Exception $e) {\n $this->returnMessage = self::MESSAGE_INVALID_ORDER_ID;\n $this->returnStatus = self::STATUS_ERROR;\n $this->sendStatus();\n }\n\n if(!$this->oOrder->getPayment() || substr($this->oOrder->getPayment()->getMethod(),0,3) != 'mcp') {\n $this->returnMessage = self::MESSAGE_NOT_MICROPAYMENT_ORDER;\n $this->returnStatus = self::STATUS_ERROR;\n $this->sendStatus();\n }\n }",
"public function getOrder() { \n if ($this->hasOrder()) {\n return $this->getData('order');\n }\n if (Mage::registry('current_order')) {\n return Mage::registry('current_order');\n }\n if (Mage::registry('order')) {\n return Mage::registry('order');\n }\n Mage::throwException(Mage::helper('sales')->__('Can\\'t get order instance'));\n }",
"public function findByOrder ($orderId) {\n\n return $this->fetchAll(\n $this->select()\n ->where(\"`orderId` = ?\", $orderId)\n );\n\n }",
"public function get_order($order_id)\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->where('orders.order_status = order_status.order_status_id AND users.user_id = orders.user_id AND orders.order_id = '.$order_id);\n\t\t$query = $this->db->get('orders, order_status, users');\n\t\t\n\t\treturn $query;\n\t}",
"public function get_order_by_id($id) {\n if(!$id) {\n throw new Exception('id should not be empty');\n }\n return $this->linkemperor_exec(null, null,\"/api/v2/customers/orders/$id.json\");\n }",
"protected function _getOrder()\n {\n if ($this->getOrder()) {\n $order = $this->getOrder();\n } else if ($this->getCheckout()->getLastRealOrderId()) {\n $order = Mage::getModel('sales/order')->loadByIncrementId($this->getCheckout()->getLastRealOrderId());\n } else {\n return null;\n }\n return $order;\n }",
"public function getNumber() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->orderNumber;\r\n\t}",
"public function sGetArticleIdByOrderNumber($ordernumber)\n {\n $checkForProduct = $this->db->fetchRow(\n 'SELECT articleID AS id FROM s_articles_details WHERE ordernumber=?',\n [$ordernumber]\n );\n\n if (isset($checkForProduct['id'])) {\n return $checkForProduct['id'];\n }\n\n return false;\n }",
"public function get_order_id_by_order_key( $order_key ) {\n\t\tglobal $wpdb;\n\n\t\treturn $wpdb->get_var( $wpdb->prepare(\n\t\t\t\"SELECT order_id FROM {$wpdb->prefix}woocommerce_orders WHERE order_key = %s\",\n\t\t\t$order_key\n\t\t) );\n\t}",
"protected function findOrder($order_id)\n\t{\n\t\t$order = false;\n\t\tforeach($this->json_object->transactions as $transaction)\n\t\t{\n\t\t\tforeach($transaction->related_resources as $resource)\n\t\t\t{\n\t\t\t\tforeach($resource as $type => $resource_data)\n\t\t\t\t{\n\t\t\t\t\tif($type == 'order' && $resource_data->id == $order_id)\n\t\t\t\t\t{\n\t\t\t\t\t\t$order = $resource_data;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif($order === false)\n\t\t{\n\t\t\t$text = MainFactory::create('PayPalText');\n\t\t\tthrow new Exception($text->get_text('invalid_order_id'));\n\t\t}\n\t\treturn $order;\n\t}",
"public function orderQueryAction()\n {\n // https://api.weixin.qq.com/pay/orderquery?access_token=xxxxxx\n $orderId = $this->params()->fromRoute('id', '0');\n\n $order = $this->getOrderTable()->getOrder($orderId);\n if ($orderId == '0' || !$order) {\n return $this->errorViewModel(array('code' => 1, 'msg' => 'order '.$orderId.' not exist.'));\n }\n\n $postResult = $this->orderQuery($orderId);\n // echo $postResult;\n echo '<br>errcode:';\n echo $postResult->errcode;\n echo '<br>errmsg:';\n echo $postResult->errmsg;\n if ($postResult->errcode == 0) {\n echo '<br>orderinfo:';\n var_dump($postResult->order_info);\n }\n\n return $this->viewModel();\n }",
"public function getOrderById($order_id)\n {\n $client = $this->httpClientFactory->create();\n $client->setUri($this->chronos_url.\"orders/$order_id/detail/\");\n $client->setMethod(\\Zend_Http_Client::GET);\n $client->setHeaders([\n 'Content-Type: application/json', \n 'Accept: application/json',\n \"Authorization: Token $this->token\"\n ]);\n try {\n $response = $client->request();\n $body = $response->getBody();\n $string = json_decode(json_encode($body),true);\n $order_data=json_decode($string);\n \n return $order_data;\n } catch (\\Zend_Http_Client_Exception $e) {\n $this->logger->addInfo('Chronos order save helper', [\"Get order error\"=>$e->getMessage()]);\n return false;\n }\n }",
"public function getCustomerGroupPriceByOrdernumberAction()\n {\n $data = $this->Request()->getParams();\n\n if (empty($data['customerId']) || empty($data['ordernumber'])) {\n $this->view->assign(['success' => false]);\n\n return;\n }\n\n /** @var \\Shopware\\Models\\Customer\\Customer $customerModel */\n $customerModel = $this->getModelManager()->find('Shopware\\Models\\Customer\\Customer', $data['customerId']);\n\n /** @var \\Shopware\\Models\\Article\\Repository $productRepository */\n $productRepository = $this->getModelManager()->getRepository('Shopware\\Models\\Article\\Detail');\n\n /** @var Shopware\\Models\\Article\\Detail $productModel */\n $productModel = $productRepository->findOneBy(['number' => $data['ordernumber']]);\n $prices = $productModel->getPrices();\n\n $priceForCustomerGroup = 0;\n\n /** @var \\Shopware\\Models\\Article\\Price $price */\n foreach ($prices as $price) {\n if ($price->getCustomerGroup()->getKey() == $customerModel->getGroup()->getKey()) {\n $priceForCustomerGroup = $price->getPrice();\n break;\n }\n $priceForCustomerGroup = $price->getPrice();\n }\n\n $priceForCustomerGroup = $this->calculateGrossPrice(\n $priceForCustomerGroup,\n $productModel->getArticle()->getTax()->getTax()\n );\n\n $this->view->assign(\n [\n 'data' => ['price' => $priceForCustomerGroup],\n 'success' => true\n ]\n );\n }",
"public function sGetOrderNumber()\n {\n $number = $this->numberRangeIncrementer->increment('invoice');\n $number = $this->eventManager->filter(\n 'Shopware_Modules_Order_GetOrdernumber_FilterOrdernumber',\n $number,\n ['subject' => $this]\n );\n\n return (string) $number;\n }",
"public function findOrder($orderId){\r\n \t$query = $this->getDbTable()->select()\r\n \t->from(array('d' => 'detailorder'),array('*'))\r\n \t->join(array('e' => 'equipment'),'d.equipmentId = e.equipmentId',array('e.equipmentId', 'e.name', 'e.image', 'e.price', 'e.priceSale'))\r\n \t->where('d.orderId = ?', $orderId)\r\n \t->setIntegrityCheck(false);\r\n \r\n \t$resultRows = $this->getDbTable()->fetchAll($query);\r\n \tif(count($resultRows) == 0){\r\n \t\treturn 0;\r\n \t}\r\n \telse{\r\n \t\treturn $resultRows;\r\n \t}\r\n }",
"public function selectOMGOrderFromOrders($orderId)\r\n {\r\n $sql = \"SELECT orders.*, orderitems.product AS prItem,\r\n IFNULL(\r\n round(\r\n sum(\r\n (\r\n decrease_price * (1 -(decrease_discount / 100)) * decrease_quantity\r\n ) + (\r\n (\r\n decrease_price * (1 -(decrease_discount / 100)) * decrease_quantity\r\n ) * (vat_rate / 100)\r\n )\r\n ),\r\n 2\r\n ),\r\n 0\r\n ) AS documentAmount\r\n FROM orders\r\n LEFT JOIN orderitems ON orders.order_id = orderitems.order\r\n\t\t\t\tWHERE 1 AND (state = 'BA' OR state = 'SI')\r\n\t\t\t\tAND submitId = '$orderId'\r\n\t\t\t\tGROUP BY orders.order_id\r\n\t\t\t\tLIMIT 1\";\r\n\r\n $results=$this->conn->fetchAssoc($sql);\r\n return $results;\r\n }",
"public function getOrderItemNumber() {\n\t\treturn $this->orderItemNumber;\n\t}",
"public function getOrder($id) {\n return Order::fetch($id);\n }",
"protected function getOrderByTransactionKey()\n {\n $trxId = $this->getTransactionKey();\n\n $this->transaction->load($trxId, 'txn_id');\n $order = $this->transaction->getOrder();\n\n if (!$order) {\n throw new \\Buckaroo\\Magento2\\Exception(__('There was no order found by transaction Id'));\n }\n\n return $order;\n }",
"public function custid($ordn) {\n\t\t$q = $this->queryOrdernumber($ordn);\n\t\t$q->select(SoModel::aliasproperty('custid'));\n\t\treturn $q->findOne();\n\t}",
"private function getOrder($orderId)\n {\n try {\n $order = $this->orderRepository->get($orderId);\n } catch (InputException $e) {\n return null;\n } catch (NoSuchEntityException $e) {\n return null;\n }\n\n return $order;\n }"
] | [
"0.7427878",
"0.7353671",
"0.68314254",
"0.68314254",
"0.67587936",
"0.6755244",
"0.66848737",
"0.65451616",
"0.650618",
"0.6461843",
"0.6460398",
"0.6456172",
"0.64149725",
"0.6347064",
"0.6323347",
"0.6320527",
"0.6320527",
"0.6320527",
"0.6310595",
"0.6280282",
"0.6267892",
"0.6204959",
"0.61832744",
"0.61329603",
"0.6130761",
"0.6128154",
"0.61244136",
"0.6119189",
"0.60974544",
"0.60824275",
"0.6075182",
"0.60683143",
"0.6021027",
"0.6016549",
"0.6013406",
"0.5989877",
"0.59875184",
"0.5977161",
"0.5963607",
"0.5950217",
"0.59377193",
"0.5932539",
"0.5927334",
"0.5915715",
"0.5915715",
"0.5915715",
"0.5915715",
"0.5915715",
"0.5915715",
"0.5910273",
"0.59052455",
"0.58557063",
"0.5849252",
"0.5843938",
"0.58426046",
"0.5837812",
"0.5817519",
"0.58032686",
"0.5801495",
"0.57947403",
"0.5756309",
"0.57413787",
"0.5734694",
"0.5732639",
"0.5710943",
"0.5708682",
"0.5708275",
"0.569024",
"0.5689633",
"0.5686948",
"0.5686124",
"0.5680408",
"0.5680408",
"0.56702614",
"0.56533355",
"0.56502444",
"0.56487787",
"0.5606706",
"0.56000257",
"0.5596455",
"0.5588006",
"0.55877954",
"0.55876815",
"0.5586953",
"0.55827427",
"0.55812544",
"0.55770713",
"0.55571187",
"0.55512494",
"0.5550951",
"0.55504674",
"0.5548587",
"0.5533162",
"0.55264753",
"0.5507327",
"0.5492758",
"0.5485928",
"0.5476871",
"0.5468132",
"0.5464727"
] | 0.5580548 | 86 |
Delete a Order by an OrderNumber | public function deleteById($orderlineId); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function deleteOrder($order_id);",
"function deleteOrder($orderId);",
"public function deleting(Order $Order)\n {\n //code...\n }",
"public function deleteOrderDetails($product_code,$order_id=NULL,$quantity,$token=NULL);",
"public function deleted(Order $Order)\n {\n //code...\n }",
"public function deleted(Order $order)\n {\n //\n }",
"public function deleted(Order $order)\n {\n //\n }",
"public function deleteOrder(){\r\n $cookies = new CookieModel();\r\n $cookie_id = $cookies -> read();\r\n $Form = M('userinfo');\r\n $condition_in['stuid'] = $cookie_id;\r\n $data = $Form->where($condition_in)->find();\r\n if (! $data['manager']) $this->redirect('/');\r\n\r\n $key = $_REQUEST['id'];\r\n //$key = 2;\r\n $condition['id'] = $key;\r\n $form = M(\"orderinfo\");\r\n $data = $form->where($condition)->delete();\r\n $this->redirect('/index.php/Admin/index');\r\n //$this->display();\r\n }",
"public function delete_order()\n\t{\n\t\tif ($this->checkLogin('A') == '') {\n\t\t\tredirect('admin');\n\t\t} else {\n\t\t\t$order_id = $this->uri->segment(4, 0);\n\t\t\t$condition = array('id' => $order_id);\n\t\t\t$old_order_details = $this->order_model->get_all_details(PRODUCT, array('id' => $order_id));\n\t\t\t$this->update_old_list_values($order_id, array(), $old_order_details);\n\t\t\t$this->update_user_order_count($old_order_details);\n\t\t\t$this->order_model->commonDelete(PRODUCT, $condition);\n\t\t\t$this->setErrorMessage('success', 'Order deleted successfully');\n\t\t\tredirect('admin/order/display_order_list');\n\t\t}\n\t}",
"public function delete(string $orderNumber): array\n\t{\n\t\t$this->_setPath(\"order/${orderNumber}\");\n\n\t\t$payload = $this->_generateCreateUpdateDeleteOrderPayload([]);\n\t\t$payload[\"RefOrderId\"] = $orderNumber;\n\n\t\treturn $this->traitDelete($payload);\n\t}",
"function deleteItem($orderId)\n {\n }",
"public function deleted(Order $order)\n\t{\n\t\t//\n\t}",
"public function deleted(Order $order)\n\t{\n\t\t//\n\t}",
"public function deleteOrder($id_order)\n\t\t{\n\t\t\t$this->mgrOrder->deleteOrder($id_order);\n\t\t}",
"function deleteOrder () {\n\t//\terror_log ( 'addOrder\\n', 3, '/var/tmp/php.log' );\n\t$request = Slim::getInstance ()->request ();\n\t$orderId = json_decode ( $request->getBody () );\n\ttry {\n\t\t$db = new DbOperation();\n\t\t$db->deleteOrder ( $orderId->orderId );\n\t\techo '{\"deleteStatus\":\"YES\"}';\n\t} catch ( Exception $e ) {\n\t\t//\t\terror_log ( $e->getMessage (), 3, '/var/tmp/php.log' );\n\t\techo '{\"errorText\":\"Delete order fail with text as\", \"text\":}' . $e->getMessage () . $e . '}';\n\t}\n}",
"public function destroy(Order $order)\n {\n\n }",
"public function destroy(order $order)\n {\n //\n }",
"function deleteItem($orderId)\n {\n $dataService = new OrderDataService();\n\n return $dataService->deleteItem($orderId);\n }",
"public function delete($orderId)\n {\n $query = \"DELETE FROM orders\n WHERE id = :id\";\n\n $this->db->prepare($query);\n\n $this->db->bind('id', $orderId);\n\n return $this->db->execute();\n \n }",
"public function destroy(Order $order)\n {\n //\n }",
"public function destroy(RequestOrder $requestOrder)\n\n {\n\n //\n\n }",
"static function cancelOrder($order_id) {\n\t\t\t$query = \"delete from orders where OID = ?\";\n\t\t\t$dataArr = array($order_id);\n\t\t\tOrder::manDb($query, $dataArr);\n\t\t}",
"public function delete_OrderPage(){\n $id_product = $_REQUEST[\"id_product\"];\n $id_order = $_REQUEST[\"id_order\"];\n $query = \"DELETE FROM order_u\n WHERE order_u.id = $id_order;\";\n $data = $this->connection->query($query);\n\n $query = \"DELETE FROM order_product\n WHERE order_product.order_id = $id_order;\";\n $data = $this->connection->query($query);\n \n }",
"public function destroy($order_id)\n {\n $order=Orders::findOrFail($order_id);\n $order->delete();\n }",
"public function destroy(Order $order)\n {\n //\n }",
"public function destroy(Order $order)\n {\n //\n }",
"public function destroy(Order $order)\n {\n //\n }",
"public function destroy(Order $order)\n {\n //\n }",
"public function destroy(Order $order)\n {\n //\n }",
"public function destroy(Order $order)\n {\n //\n }",
"public function destroy(Order $order)\n {\n //\n }",
"public function destroy(Order $order)\n {\n //\n }",
"public function destroy(Order $order)\n {\n //\n }",
"public function destroy(Order $order)\n {\n //\n }",
"public function destroy(Order $order)\n {\n //\n }",
"public function destroy(Order $order)\n {\n //\n }",
"public function destroy(Order $order)\n {\n //\n }",
"public function destroy(Order $order)\n {\n //\n }",
"public function destroy(Order $order)\n {\n //\n }",
"public function destroy(Order $order)\n {\n //\n }",
"public function destroy(Order $order)\n {\n //\n }",
"public function destroy(Order $order)\n {\n //\n }",
"public function destroy(Order $order)\n {\n //\n }",
"public function destroy(Order $order)\n {\n //\n }",
"public function destroy(Order $order)\n {\n //\n }",
"public function delete_order($where) {\n return $this->db->delete($this->order, $where);\n }",
"public function destroy(Order $Order)\n {\n //\n }",
"public function destroy(Order $order)\n {\n \n $order->order_lines()->delete();\n $order->delete(); \n return redirect()->route('orders.index');\n }",
"public function destroy(Order $order)\n {\n \n }",
"public function delete( &$order, $args = array() ) {\n\t\tglobal $wpdb;\n\n\t\t$order_id = $order->get_id();\n\n\t\tparent::delete( $order, $args );\n\n\t\tif ( $args['force_delete'] || 0 == $order->get_id() ) {\n\t\t\t$wpdb->delete(\n\t\t\t\t\"{$wpdb->prefix}woocommerce_orders\",\n\t\t\t\tarray(\n\t\t\t\t\t'order_id' => $order_id,\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}",
"public function deleteOrderById(Request $request) {\n\t\tif (version_compare(PHP_VERSION, '7.2.0', '>=')) {\n\t\t\t// Ignores notices and reports all other kinds... and warnings\n\t\t\terror_reporting(E_ALL ^ E_NOTICE ^ E_WARNING);\n\t\t\t// error_reporting(E_ALL ^ E_WARNING); // Maybe this is enough\n\t\t}\n\t\t$token = JWTAuth::getToken();\n\t\t$user = JWTAuth::toUser($token);\n\t\t$data = $request->all(); \n\t\t$orderDetail = OrderDetail::where('order_id',$data['id'])->delete();\n\t\t$order = Order::find($data['id'])->delete();\n\n\t\t$r = new ApiResponse();\n\t\t$r->success = true;\n\t\t$r->message = 'Orden borrada con exito';\n\t\t$r->code = 200;\n\t\t$r->data = $data['id'];\n\n\t\treturn $r->doResponse();\n\t}",
"public function destroy(Order $order)\n {\n $order->delete();\n return $this->index();\n }",
"public function delete(Order $order)\n {\n $order->delete();\n\n return response()->json([], 200);\n }",
"public function deleteItemOrder($index)\n {\n array_splice($this->orders, $index, 1);\n }",
"public function destroy(Order $order)\n {\n $order->delete();\n }",
"function MyShop_OrderDelete($args) {\n global $_TABLES;\n\n $sql = \"DELETE FROM {$_TABLES['myshop_order']} WHERE orderid = '{$args['orderid']}'\";\n DB_query($sql);\n}",
"public function testDeleteOrder() {\n $order_item = $this->createEntity('commerce_order_item', [\n 'type' => 'default',\n 'unit_price' => [\n 'number' => '999',\n 'currency_code' => 'USD',\n ],\n ]);\n $order = $this->createEntity('commerce_order', [\n 'type' => 'default',\n 'mail' => $this->loggedInUser->getEmail(),\n 'order_items' => [$order_item],\n 'uid' => $this->loggedInUser,\n 'store_id' => $this->store,\n ]);\n $order->delete();\n\n $order_exists = (bool) Order::load($order->id());\n $order_item_exists = (bool) OrderItem::load($order_item->id());\n $this->assertEmpty($order_exists, 'The new order has been deleted from the database.');\n $this->assertEmpty($order_item_exists, 'The matching order item has been deleted from the database.');\n }",
"function removeOrderNotIn($orders,$numberId,$requester){//if put connection mean transaction\n $notInList='';\n $count=0;\n foreach( $orders as $order){\n if(isset($order->id)){//has id to delete\n $count++;\n if(empty($notInList)) {\n $notInList.='('.$order->id;\n }else{\n $notInList.=','.$order->id;\n }\n }\n }\n if(!empty($notInList)) {\n $notInList.=')';\n $sql='DELETE FROM `order` WHERE number_id='.$numberId.' AND id NOT IN '.$notInList;\n }else{\n $sql='DELETE FROM `order` WHERE number_id='.$numberId;\n }\n if(isset($this->connection)){\n if($this->queryNotAutoClose($sql)) return $count;\n else return -1;\n }else{\n if($this->query($sql)) return $count;\n else return -1;\n }\n //TODO log this action to file for know who delete\n }",
"public function delete($order_id)\n {\n $this->db->where('id', $order_id);\n return $this->db->delete('orders') == TRUE;\n }",
"public function delete_sales_order() {\n\t\t$values=array(\"rstatus\"=>\"C\");\n\t\t$rowIndex = $_POST['row_index'];\n\t\t$where =array(\"id\"=>$_POST['so_id']);\n\t\tif($this->update(\"sales_order\",$values,$where)) {\t\t\t\n\t\t\techo '{\"salesOrderList\":{\"updateFlag\":\"void\",\"rowIndex\":'.$rowIndex.'}}';\n\t\t}\n\t\telse\n\t\t\techo 'Error while inserting sales tbl';\n\t}",
"public function destroy(StatusOrder $statusOrder)\n {\n //\n }",
"public function deleteById($orderscheduleId);",
"public function deleted(Order $order)\n {\n foreach (OrderProduct::where('order_id',$order->id)->get() as $orderProduct) {\n $product = Product::find($orderProduct->product_id);\n $cardController = new GlobalCardController();\n $product->count = $cardController->countProduct($orderProduct->product_id);\n $product->save();\n }\n }",
"public function destroy(CustomerOrder $customerOrder)\n {\n //\n }",
"public function destroy(CustomerOrder $customerOrder)\n {\n //\n }",
"public function destroy(GroceryOrder $groceryOrder)\n {\n //\n }",
"public function processVoucherDeleteRequest(Order $order, array $data);",
"public function destroy(TxShopDomainModelOrderItem $order)\n {\n //\n }",
"public function destroy(Order $order)\n {\n $order->delete();\n return redirect()->route('order.index');\n }",
"public function destroy(Order $order)\n {\n /** order dengan status 1 forceDelete */\n if ($order->status == 1) {\n foreach ($order->details()->get() as $detail) {\n $qty = $detail->product->stock->qty + $detail->qty;\n ProductStock::whereProductId($detail->product_id)\n ->update(['qty' => $qty]);\n }\n\n if ($order->payment_count > 0) {\n Storage::delete($order->payment->proof);\n $order->payment()->forceDelete();\n }\n\n $order->details()->forceDelete();\n $order->forceDelete();\n return redirect(route('orders.index'))->withToastSuccess('Succesfully Deleted');\n }\n\n $order->delete();\n\n return redirect(route('orders.index'))->withToastSuccess('Succesfully Deleted');\n }",
"public function deleteOrderFromGrid($observer)\n {\n $order = $observer->getOrder();\n if ($order->getId()) {\n $coreResource = Mage::getSingleton('core/resource');\n $writeConnection = $coreResource->getConnection('core_write');\n $salesOrderGridTable = $coreResource->getTableName('sales_flat_order_grid');\n $query = sprintf('Delete from %s where entity_id = %s', $salesOrderGridTable, (int)$order->getId());\n $writeConnection->raw_query($query);\n }\n }",
"public function deleteLooseCarton($order_no)\n {\n $delete_loosecarton = new DeleteLooseCarton();\n $loosecarton_query = $delete_loosecarton->query()->getSql();\n return DB::delete($loosecarton_query, [':order_no' => $order_no]);\n }",
"public function deleteOrderById($request, $response, $args){\n\t\t$id = $args['id'];\n $validations = [\n v::intVal()->validate($id)\n ];\n\n if ($this->validate($validations) === false) {\n return $response->withStatus(400);\n }\n\t\t// First Delete all its order items\n\t\t//$delete = Models\\Order::find($id)->delete();\n\t\treturn $response->withJson(json_encode(array(\"status\" => TRUE)));\n\t}",
"static function cleanupOrder( $orderID )\n {\n $db = eZDB::instance();\n $orderID =(int) $orderID;\n $rows = $db->arrayQuery( \"SELECT productcollection_id, order_nr FROM ezorder WHERE id='$orderID'\" );\n if ( count( $rows ) > 0 )\n {\n // Who deletes which order in shop should be logged.\n eZAudit::writeAudit( 'order-delete', array( 'Order ID' => $orderID,\n 'Comment' => 'Removed the order and its related data from the database: eZOrder::cleanupOrder()' ) );\n\n $productCollectionID = $rows[0]['productcollection_id'];\n $orderNr = (int)$rows[0]['order_nr'];\n $db = eZDB::instance();\n $db->begin();\n $db->query( \"DELETE FROM ezorder where id='$orderID'\" );\n $db->query( \"DELETE FROM ezproductcollection where id='$productCollectionID'\" );\n $db->query( \"DELETE FROM ezproductcollection_item where productcollection_id='$productCollectionID'\" );\n $db->query( \"DELETE FROM ezorder_status_history WHERE order_id=$orderNr\" );\n $db->commit();\n }\n }",
"public function destroy(Order $order)\n {\n //\n $order->delete();\n\n return redirect()->route('orders.index')\n\n ->with('success','Pedido Eliminado Exitosamente');\n }",
"public function delete($id)\n {\n Order::findOrFail($id)->delete();\n }",
"public function destroy(OrderStatus $orderStatus)\n {\n //\n }",
"public function destroy(Order $order)\n {\n /*if (Gate::allows('delete-order', $order)) {*/\n $order->delete();\n return redirect()->route('order.my');\n /*} else {\n abort(403);\n }*/\n }",
"public function destroy(OrderDetails $orderDetails)\n {\n //\n }",
"public function destroy(Order $order)\n {\n $order->delete();\n return $this->respond();\n }",
"public function orders_delete($app, $collection_id = null, $order_id = null) {\n\t\t//Delete order\n\t\t$success = Elementorder::delete($order_id);\n\n\t\treturn $app->toJSON(['status' => $success]);\n\t}",
"public function unsetOrderID($index)\n {\n unset($this->orderID[$index]);\n }",
"public function deleteorders($id, $order)\n {\n UserModel::authentication();\n\n //get the session user\n $user = UserModel::user();\n\n OrderModel::manage_order($id, $order);\n }",
"public function destroy(Order $order)\n {\n $order->delete();\n return redirect()->route('orders.index');\n }",
"public function deleteOrder($order_id) {\n\t\t$this->load->model('order/order_history');\n\n\t\t$this->model_order_order_history->addOrderHistory($order_id, 0);\n\n\t\t$this->db->query(\"DELETE FROM `\" . DB_PREFIX . \"order` WHERE order_id = '\" . (int)$order_id . \"'\");\n\t\t$this->db->query(\"DELETE FROM `\" . DB_PREFIX . \"order_custom_field` WHERE order_id = '\" . (int)$order_id . \"'\");\n\t\t$this->db->query(\"DELETE FROM `\" . DB_PREFIX . \"order_product` WHERE order_id = '\" . (int)$order_id . \"'\");\n\t\t$this->db->query(\"DELETE FROM `\" . DB_PREFIX . \"order_option` WHERE order_id = '\" . (int)$order_id . \"'\");\n\t\t$this->db->query(\"DELETE FROM `\" . DB_PREFIX . \"order_additionally` WHERE order_id = '\" . (int)$order_id . \"'\");\n\t\t$this->db->query(\"DELETE FROM `\" . DB_PREFIX . \"order_total` WHERE order_id = '\" . (int)$order_id . \"'\");\n\t\t$this->db->query(\"DELETE FROM `\" . DB_PREFIX . \"order_history` WHERE order_id = '\" . (int)$order_id . \"'\");\n\t}",
"public function destroy(Order $order)\n {\n $order->delete();\n\n return redirect(route('orders.index'));\n }",
"public function destroy(Order $order){\n foreach ($order->products as $product){\n $product->update([\n 'stock'=>$product->stock +$product->pivot->quantity\n ]);\n }//end of foreach\n $order->products()->detach();\n $order->delete();\n session()->flash('success',__('site.deleted_successfully'));\n return redirect()->route('dashboard.orders.index');\n }",
"public function deleteOrder($id){\n $orders = Order_Ecommerces::find($id);\n \n //PRENDO L'ARRAY CHE TORNA DALLA QUERY PRECEDENTE E CONFRONTO L'ID DELL'ORDINE CON L'ID DELLA RELAZIONE TRA ORDINE E LA TABELLA ORDER_ECOMMERCE_PRODUCT\n $orderProductId=Order_Ecommerce_product::where('order_ecommerce_id', '=', $orders['id'])->get();\n \n\n foreach ($orderProductId as $item) {\n \n //UNA VOLTA RECUPERATO L'ID DELL'ORDINE TRAMITE LA RELAZIONE, POSSO ASSEGNARE A UNA VARIABILE LA QUANTITA ORDINATA IN FASE DI ORDINE DEL PRODOTTO \n $quantita_bloccata=$item['quantita'];\n //SELEZIONO LA TABELLA SECTORS E LA COLONNA PRODUCT_ID E LA CONFRONTO CON IL PRODUCT_ID DELL'ORDINE SE IL VALORE è UGUALE, CHIEDO ALLA QUERY DI DECREMENTARE IL VALORE DELLA QUANTITà BLOCCATA DI QUELL'ORDINE CON LA COLONNA PRESENTE NELLA TABELLA SECTOR, IN MODO CHE QUANDO CANCELLERò L'ORDINE, LA QUANTITà SARà DI NUOVO DISPONIBILE\n $updateQty=DB::table('sectors')->where('product_id', '=', $item['product_id'])->decrement('quantita_bloccata', $quantita_bloccata);\n }\n\n\n\n //UNA VOLTA CHE HO FATTO TUTTI I CONTROLLI E RESETTATO LO STATO DELLE QUANTITA A PRIMA CHE L'ORDINE VENISSE CREATO, SETTO L'ORDINE STESSO SU STATO ANNULLATO, IL DATO NON VERRà CANCELLATO DAL DATABASE IN MODO DA POTERLO USARE PIU AVANTI PER FINI STATISTICI\n $orderDelete= DB::table('order_Ecommerces')->where('id', '=', $id)->update(['annullato' => 1]);\n\n return redirect()->back();\n }",
"public function destroy(Request $request)\n {\n $id = $request->id;\n $order = Orders::find($id) ;\n $order->delete() ;\n return $request->id;\n }",
"public function unsetOrderId(): void\n {\n $this->orderId = [];\n }",
"public function removeOrder(Order $order) {\n $this->orders->removeElement($order);\n }",
"public function delete($proveedor);",
"public function remove($order){\r\n /*\r\n $cache_id = \"standingorder_\" . $order;\r\n \r\n //remove standing order from cache\r\n if(Cache::has($cache_id)){\r\n Cache::forget($cache_id);\r\n }\r\n */\r\n $so = $this->soap->removeStandingOrder($this->licence, $order);\r\n return $so;\r\n }",
"public function destroy(Request $request, Order $order)\n {\n $validator = Validator::make($request->all(), [\n 'id' => ['required', Rule::exists('order')->where('order_status', Order::STATUS_CLOSED)],\n ]);\n if ($validator->fails())\n {\n return ['code' => 3001, 'message' => $validator->errors()->first(), 'data' => $validator->errors()];\n }\n $ids = is_array($request->id) ? $request->id : [$request->id];\n $model = $order::whereIn('id', $ids);\n if ($model->delete())\n {\n return [\n 'code' => 200,\n 'message' => __('admin.SuccessDestroyed'),\n 'log' => sprintf('[%s][%s]『id:%s』', __('admin.SuccessDestroyed'), $order->tableComments, json_encode($ids))\n ];\n } else\n {\n return ['code' => 5001, 'message' => __('admin.Server internal error')];\n }\n }",
"public function forceDeleted(Order $order)\n {\n //\n }",
"public function forceDeleted(Order $order)\n {\n //\n }",
"public function forceDeleted(Order $order)\n {\n //\n }",
"public function delete(Order $order)\n {\n if (!Auth::user()->isAdmin()) {\n return redirect()->back()->with(['error_message' => 'Page not found!']);\n }\n }",
"public function update(string $orderNumber, array $data): array\n\t{\n\t\t$this->_setPath(\"order/${orderNumber}\");\n\n\t\t$payload = $this->_generateCreateUpdateDeleteOrderPayload($data);\n\n\t\treturn $this->traitUpdate($payload);\n\t}",
"public function destroy(Order $order)\n {\n foreach ($order->products as $product) {\n\n $product->update([\n 'stock' => $product->stock + $product->pivot->quantity\n ]);\n\n }//end of for each\n\n $order->delete();\n session()->flash('success', __(' تم الحذف بنجاح'));\n return redirect()->route('dashboard.orders.index');\n \n }"
] | [
"0.76382196",
"0.7599958",
"0.72785854",
"0.6903683",
"0.67808634",
"0.674524",
"0.674524",
"0.6722107",
"0.671904",
"0.66062057",
"0.66048974",
"0.6599808",
"0.6599808",
"0.64452493",
"0.64338654",
"0.6430342",
"0.64131606",
"0.6408023",
"0.63942975",
"0.63826406",
"0.6368379",
"0.63680065",
"0.6355597",
"0.63282526",
"0.6291623",
"0.6291623",
"0.6291623",
"0.6291623",
"0.6291623",
"0.6291623",
"0.6291623",
"0.6291623",
"0.6291623",
"0.6291623",
"0.6291623",
"0.6291623",
"0.6291623",
"0.6291623",
"0.6291623",
"0.6291623",
"0.6291623",
"0.6291623",
"0.6291623",
"0.6291623",
"0.6291623",
"0.6272841",
"0.6270908",
"0.6248077",
"0.6243548",
"0.6241408",
"0.61821824",
"0.6107949",
"0.60897064",
"0.60836077",
"0.6074258",
"0.6061444",
"0.6042059",
"0.59960383",
"0.5995138",
"0.5979578",
"0.59356356",
"0.5933357",
"0.5924167",
"0.59210944",
"0.59210944",
"0.5917109",
"0.5898672",
"0.58977413",
"0.58741784",
"0.5861122",
"0.5848801",
"0.5847995",
"0.5847423",
"0.58329743",
"0.5832414",
"0.58192134",
"0.581631",
"0.5807387",
"0.58066756",
"0.5799284",
"0.5792813",
"0.5789561",
"0.5769862",
"0.57638496",
"0.5725149",
"0.57091075",
"0.57034445",
"0.56983566",
"0.56820333",
"0.5674031",
"0.5659722",
"0.56553596",
"0.56506443",
"0.5642523",
"0.5639195",
"0.5639195",
"0.5639195",
"0.56386644",
"0.56301194",
"0.562107"
] | 0.6960964 | 3 |
Retrieves a list of models based on the current search/filter conditions. Typical usecase: Initialize the model fields with values from filter form. Execute this method to get CActiveDataProvider instance which will filter models according to data in model fields. Pass data provider to CGridView, CListView or any similar widget. | public function search($const = false)
{
// @todo Please modify the following code to remove attributes that should not be searched.
$criteria = new CDbCriteria;
$criteria->compare('title', $this->title, true);
$criteria->compare('status', $this->status);
$criteria->compare('const_query', $const?1:0);
return new CActiveDataProvider($this, array(
'criteria' => $criteria,
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 search()\n {\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('model_id',$this->model_id,true);\n $criteria->compare('color',$this->color,true);\n $criteria->compare('is_in_pare',$this->is_in_pare);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\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('generator_id',$this->generator_id,true);\n\t\t$criteria->compare('serial_number',$this->serial_number,true);\n\t\t$criteria->compare('model_number',$this->model_number,true);\n\t\t$criteria->compare('manufacturer_name',$this->manufacturer_name,true);\n\t\t$criteria->compare('manufacture_date',$this->manufacture_date,true);\n\t\t$criteria->compare('supplier_name',$this->supplier_name,true);\n\t\t$criteria->compare('date_of_purchase',$this->date_of_purchase,true);\n\t\t$criteria->compare('date_of_first_use',$this->date_of_first_use,true);\n\t\t$criteria->compare('kva_capacity',$this->kva_capacity);\n\t\t$criteria->compare('current_run_hours',$this->current_run_hours);\n\t\t$criteria->compare('last_serviced_date',$this->last_serviced_date,true);\n\t\t$criteria->compare('engine_make',$this->engine_make,true);\n\t\t$criteria->compare('engine_model',$this->engine_model,true);\n\t\t$criteria->compare('fuel_tank_capacity',$this->fuel_tank_capacity);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('idmodel',$this->idmodel);\n\t\t$criteria->compare('usuario_anterior',$this->usuario_anterior);\n\t\t$criteria->compare('usuario_nuevo',$this->usuario_nuevo);\n\t\t$criteria->compare('estado_anterior',$this->estado_anterior,true);\n\t\t$criteria->compare('estado_nuevo',$this->estado_nuevo,true);\n\t\t$criteria->compare('fecha',$this->fecha,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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 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,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('sex',$this->sex);\n\t\t$criteria->compare('car',$this->car,true);\n\t\t$criteria->compare('source_id',$this->source_id,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('client_type_id',$this->client_type_id,true);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('link',$this->link,true);\n\t\t$criteria->compare('other',$this->other,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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\t\t$criteria->compare('UserID',$this->UserID);\n\t\t$criteria->compare('ProviderID',$this->ProviderID);\n\t\t$criteria->compare('Date',$this->Date,true);\n\t\t$criteria->compare('RawID',$this->RawID);\n\t\t$criteria->compare('Document',$this->Document,true);\n\t\t$criteria->compare('State',$this->State,true);\n\t\t$criteria->compare('Temperature',$this->Temperature,true);\n\t\t$criteria->compare('Conditions',$this->Conditions,true);\n\t\t$criteria->compare('Expiration',$this->Expiration,true);\n\t\t$criteria->compare('Comments',$this->Comments,true);\n\t\t$criteria->compare('Quantity',$this->Quantity,true);\n\t\t$criteria->compare('Type',$this->Type,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array(\n \t'pageSize'=>Yii::app()->params['defaultPageSize'], \n ),\n\t\t));\n\t}",
"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\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search() {\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\t\t// $criteria->compare('text',$this->text,true);\n\t\t// $criteria->compare('record',$this->record,true);\n\t\t$criteria->compare('user',$this->user,true);\n\t\t$criteria->compare('createdBy',$this->createdBy,true);\n\t\t$criteria->compare('viewed',$this->viewed);\n\t\t$criteria->compare('createDate',$this->createDate,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('comparison',$this->comparison,true);\n\t\t// $criteria->compare('value',$this->value,true);\n\t\t$criteria->compare('modelType',$this->modelType,true);\n\t\t$criteria->compare('modelId',$this->modelId,true);\n\t\t$criteria->compare('fieldName',$this->fieldName,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\r\n\t{\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('Currency_ID',$this->Currency_ID);\n\t\t$criteria->compare('CurrencyNo',$this->CurrencyNo,true);\n\t\t$criteria->compare('ExchangeVND',$this->ExchangeVND,true);\n\t\t$criteria->compare('AppliedDate',$this->AppliedDate,true);\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}",
"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 }",
"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('firm',$this->firm,true);\n\t\t$criteria->compare('change_date',$this->change_date,true);\n\t\t$criteria->compare('item_id',$this->item_id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('availability',$this->availability,true);\n\t\t$criteria->compare('price',$this->price,true);\n\t\t$criteria->compare('bonus',$this->bonus,true);\n\t\t$criteria->compare('shipping_cost',$this->shipping_cost,true);\n\t\t$criteria->compare('product_page',$this->product_page,true);\n\t\t$criteria->compare('sourse_page',$this->sourse_page,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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('column_id',$this->column_id);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('value',$this->value,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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('type',$this->type);\n\t\t$criteria->compare('condition',$this->condition,true);\n\t\t$criteria->compare('value',$this->value,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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,true);\n\t\t$criteria->compare('industry',$this->industry,true);\n\t\t$criteria->compare('industry_sub',$this->industry_sub,true);\n\t\t$criteria->compare('area',$this->area,true);\n\t\t$criteria->compare('province',$this->province,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('contact_name',$this->contact_name,true);\n\t\t$criteria->compare('contact_tel',$this->contact_tel,true);\n\t\t$criteria->compare('ip',$this->ip,true);\n\t\t$criteria->compare('source',$this->source,true);\n $criteria->compare('status',$this->status);\n\t\t$criteria->compare('update_time',$this->update_time);\n\t\t$criteria->compare('create_time',$this->create_time);\n\t\t$criteria->compare('notes',$this->notes);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('university',$this->university,true);\n\t\t$criteria->compare('major',$this->major,true);\n\t\t$criteria->compare('gpa',$this->gpa,true);\n\t\t$criteria->compare('appl_term',$this->appl_term);\n\t\t$criteria->compare('toefl',$this->toefl);\n\t\t$criteria->compare('gre',$this->gre);\n\t\t$criteria->compare('appl_major',$this->appl_major,true);\n\t\t$criteria->compare('appl_degree',$this->appl_degree,true);\n\t\t$criteria->compare('appl_country',$this->appl_country,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that should not be searched.\n\t\t$criteria = new \\CDbCriteria;\n\n\t\tforeach (array_keys($this->defineAttributes()) as $name)\n\t\t{\n\t\t\t$criteria->compare($name, $this->$name);\n\t\t}\n\n\t\treturn new \\CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria\n\t\t));\n\t}",
"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('goods_code',$this->goods_code,true);\n\t\t$criteria->compare('type_id',$this->type_id);\n\t\t$criteria->compare('brand_id',$this->brand_id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('kind',$this->kind,true);\n\t\t$criteria->compare('color',$this->color,true);\n\t\t$criteria->compare('size',$this->size,true);\n\t\t$criteria->compare('material',$this->material,true);\n\t\t$criteria->compare('quantity',$this->quantity);\n\t\t$criteria->compare('purchase_price',$this->purchase_price,true);\n\t\t$criteria->compare('selling_price',$this->selling_price,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 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\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('meta_title',$this->meta_title,true);\n\t\t$criteria->compare('meta_keywords',$this->meta_keywords,true);\n\t\t$criteria->compare('meta_description',$this->meta_description,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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('ContractsDetailID',$this->ContractsDetailID,true);\n\t\t$criteria->compare('ContractID',$this->ContractID,true);\n\t\t$criteria->compare('Type',$this->Type,true);\n\t\t$criteria->compare('CustomerID',$this->CustomerID,true);\n\t\t$criteria->compare('Share',$this->Share);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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 search() {\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria = $this->criteriaSearch();\r\n\t\t$criteria->limit = 10;\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria' => $criteria,\r\n\t\t));\r\n\t}",
"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('organizationName',$this->organizationName,true);\n\t\t$criteria->compare('contactNo',$this->contactNo,true);\n\t\t$criteria->compare('partnerType',$this->partnerType);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('area',$this->area,true);\n\t\t$criteria->compare('category',$this->category,true);\n\t\t$criteria->compare('emailId',$this->emailId,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('firstName',$this->firstName,true);\n\t\t$criteria->compare('lastName',$this->lastName,true);\n\t\t$criteria->compare('gender',$this->gender,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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(Globals::FLD_NAME_ACTIVITY_ID,$this->{Globals::FLD_NAME_ACTIVITY_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_TASK_ID,$this->{Globals::FLD_NAME_TASK_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_BY_USER_ID,$this->{Globals::FLD_NAME_BY_USER_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_ACTIVITY_TYPE,$this->{Globals::FLD_NAME_ACTIVITY_TYPE},true);\n\t\t$criteria->compare(Globals::FLD_NAME_ACTIVITY_SUBTYPE,$this->{Globals::FLD_NAME_ACTIVITY_SUBTYPE},true);\n\t\t$criteria->compare(Globals::FLD_NAME_COMMENTS,$this->{Globals::FLD_NAME_COMMENTS},true);\n\t\t$criteria->compare(Globals::FLD_NAME_CREATED_AT,$this->{Globals::FLD_NAME_CREATED_AT},true);\n\t\t$criteria->compare(Globals::FLD_NAME_SOURCE_APP,$this->{Globals::FLD_NAME_SOURCE_APP},true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('manufacturers_image',$this->manufacturers_image,true);\n\t\t$criteria->compare('date_added',$this->date_added);\n\t\t$criteria->compare('last_modified',$this->last_modified);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('url_clicked',$this->url_clicked);\n\t\t$criteria->compare('date_last_click',$this->date_last_click);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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\t\t$criteria->compare('type_id',$this->type_id);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('date',$this->date);\n\t\t$criteria->compare('del',$this->del);\n\t\t$criteria->compare('action_id',$this->action_id);\n\t\t$criteria->compare('item_id',$this->item_id);\n\t\t$criteria->compare('catalog',$this->catalog,true);\n\t\t$criteria->compare('is_new',$this->is_new);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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('case',$this->case);\n\t\t$criteria->compare('basis_doc',$this->basis_doc);\n\t\t$criteria->compare('calc_group',$this->calc_group);\n\t\t$criteria->compare('time',$this->time,true);\n\t\t$criteria->compare('value',$this->value,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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('name',$this->name,true);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('competition',$this->competition);\n\t\t$criteria->compare('partner',$this->partner);\n\t\t$criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('website',$this->website,true);\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('data_attributes_fields',$this->data_attributes_fields,true);\n\t\t$criteria->compare('is_active',$this->is_active);\n\t\t$criteria->compare('created',$this->created,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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('skill_id',$this->skill_id);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('account_id',$this->account_id);\n\t\t$criteria->compare('field_name',$this->field_name);\n\t\t$criteria->compare('content',$this->content);\n\t\t$criteria->compare('old_data',$this->old_data,true);\n\t\t$criteria->compare('new_data',$this->new_data,true);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('type',$this->type);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_updated',$this->date_updated,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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,true);\n\t\t$criteria->compare('company_id',$this->company_id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('validator',$this->validator,true);\n\t\t$criteria->compare('position',$this->position);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n $criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('display_name',$this->display_name,true);\n $criteria->compare('actionPrice',$this->actionPrice);\n\t\t$criteria->compare('translit',$this->translit,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('display_description',$this->display_description,true);\n\t\t$criteria->compare('meta_keywords',$this->meta_keywords,true);\n\t\t$criteria->compare('meta_description',$this->meta_description,true);\n\t\t$criteria->compare('editing',$this->editing);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'pagination' => array(\n 'pageSize' => 15,\n ),\n\t\t));\n\t}",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('BrandID', $this->BrandID);\n $criteria->compare('BrandName', $this->BrandName, true);\n $criteria->compare('Pinyin', $this->Pinyin, true);\n $criteria->compare('Remarks', $this->Remarks, true);\n $criteria->compare('OrganID', $this->OrganID);\n $criteria->compare('UserID', $this->UserID);\n $criteria->compare('CreateTime', $this->CreateTime);\n $criteria->compare('UpdateTime', $this->UpdateTime);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\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('code', $this->code, true);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('printable_name', $this->printable_name, true);\n\t\t$criteria->compare('iso3', $this->iso3, true);\n\t\t$criteria->compare('numcode', $this->numcode);\n\t\t$criteria->compare('is_default', $this->is_default);\n\t\t$criteria->compare('is_highlight', $this->is_highlight);\n\t\t$criteria->compare('is_active', $this->is_active);\n\t\t$criteria->compare('date_added', $this->date_added);\n\t\t$criteria->compare('date_modified', $this->date_modified);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}",
"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('componente_id',$this->componente_id);\n\t\t$criteria->compare('tipo_dato',$this->tipo_dato,true);\n\t\t$criteria->compare('descripcion',$this->descripcion,true);\n\t\t$criteria->compare('cruce_automatico',$this->cruce_automatico,true);\n\t\t$criteria->compare('sw_obligatorio',$this->sw_obligatorio,true);\n\t\t$criteria->compare('orden',$this->orden);\n\t\t$criteria->compare('sw_puntaje',$this->sw_puntaje,true);\n\t\t$criteria->compare('sw_estado',$this->sw_estado,true);\n\t\t$criteria->compare('todos_obligatorios',$this->todos_obligatorios,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\r\n\t{\r\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('real_name',$this->real_name,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('zip_code',$this->zip_code,true);\n\t\t$criteria->compare('province_id',$this->province_id);\n\t\t$criteria->compare('city_id',$this->city_id);\n\t\t$criteria->compare('district_id',$this->district_id);\n\t\t$criteria->compare('district_address',$this->district_address,true);\n\t\t$criteria->compare('street_address',$this->street_address,true);\n\t\t$criteria->compare('is_default',$this->is_default);\n\t\t$criteria->compare('create_time',$this->create_time);\n\t\t$criteria->compare('update_time',$this->update_time);\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}",
"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('EMCE_ID',$this->EMCE_ID);\n\t\t$criteria->compare('MOOR_ID',$this->MOOR_ID);\n\t\t$criteria->compare('EVCR_ID',$this->EVCR_ID);\n\t\t$criteria->compare('EVES_ID',$this->EVES_ID);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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('customerName',$this->customerName,true);\n\t\t$criteria->compare('agencyHead',$this->agencyHead,true);\n\t\t$criteria->compare('region_id',$this->region_id);\n\t\t$criteria->compare('province_id',$this->province_id);\n\t\t$criteria->compare('municipalityCity_id',$this->municipalityCity_id);\n\t\t$criteria->compare('barangay_id',$this->barangay_id);\n\t\t$criteria->compare('houseNumber',$this->houseNumber,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t$criteria->compare('fax',$this->fax,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('type_id',$this->type_id);\n\t\t$criteria->compare('nature_id',$this->nature_id);\n\t\t$criteria->compare('industry_id',$this->industry_id);\n\t\t$criteria->compare('created_by',$this->created_by);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('update_time',$this->update_time,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->name,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('state',$this->address,true);\n\t\t$criteria->compare('country',$this->address,true);\n\t\t$criteria->compare('contact_number',$this->contact_number,true);\n\t\t$criteria->compare('created_by',$this->created_by,true);\n\t\t$criteria->compare('is_deleted',$this->is_deleted);\n\t\t$criteria->compare('deleted_by',$this->deleted_by,true);\n\t\t$criteria->compare('created_at',$this->created_at,true);\n\t\t$criteria->compare('updated_at',$this->updated_at,true);\n\t\tif(YII::app()->user->getState(\"role\") == \"admin\") {\n\t\t\t$criteria->condition = 'is_deleted = 0';\n\t\t}\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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('user_id',$this->user_id);\n\t\t$criteria->compare('industry_id',$this->industry_id);\n\t\t$criteria->compare('professional_status_id',$this->professional_status);\n\t\t$criteria->compare('birthday',$this->birthday);\n\t\t$criteria->compare('location',$this->location);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }",
"public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }",
"public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }",
"public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }",
"public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }",
"public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }",
"public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }",
"public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }",
"public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('memo',$this->memo,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\r\r\n\t{\r\r\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\r\r\n\r\r\n\t\t$criteria=new CDbCriteria;\r\r\n\r\r\n\t\t$criteria->compare('id',$this->id);\r\r\n\t\t$criteria->compare('user_id',$this->user_id);\r\r\n\t\t$criteria->compare('adds',$this->adds);\r\r\n\t\t$criteria->compare('edits',$this->edits);\r\r\n\t\t$criteria->compare('deletes',$this->deletes);\r\r\n\t\t$criteria->compare('view',$this->view);\r\r\n\t\t$criteria->compare('lists',$this->lists);\r\r\n\t\t$criteria->compare('searches',$this->searches);\r\r\n\t\t$criteria->compare('prints',$this->prints);\r\r\n\r\r\n\t\treturn new CActiveDataProvider($this, array(\r\r\n\t\t\t'criteria'=>$criteria,\r\r\n\t\t));\r\r\n\t}",
"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('applyId',$this->applyId);\n\t\t$criteria->compare('stuId',$this->stuId);\n\t\t$criteria->compare('stuName',$this->stuName,true);\n\t\t$criteria->compare('specification',$this->specification,true);\n\t\t$criteria->compare('assetName',$this->assetName,true);\n\t\t$criteria->compare('applyTime',$this->applyTime,true);\n\t\t$criteria->compare('loanTime',$this->loanTime,true);\n\t\t$criteria->compare('returnTime',$this->returnTime,true);\n\t\t$criteria->compare('RFID',$this->RFID,true);\n\t\t$criteria->compare('stuTelNum',$this->stuTelNum,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=$this->getBaseCDbCriteria();\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\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('verid',$this->verid);\n\t\t$criteria->compare('appversion',$this->appversion,true);\n\t\t$criteria->compare('appfeatures',$this->appfeatures,true);\n\t\t$criteria->compare('createtime',$this->createtime,true);\n\t\t$criteria->compare('baseNum',$this->baseNum);\n\t\t$criteria->compare('slave1Num',$this->slave1Num);\n\t\t$criteria->compare('packagename',$this->packagename,true);\n\t\t$criteria->compare('ostype',$this->ostype);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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('itemcode', $this->itemcode, true);\n $criteria->compare('product_id', $this->product_id, true);\n $criteria->compare('delete_flag', $this->delete_flag);\n $criteria->compare('status', $this->status);\n $criteria->compare('expire', $this->expire, true);\n $criteria->compare('date_input', $this->date_input, true);\n $criteria->compare('d_update', $this->d_update, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\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,true);\n\t\t$criteria->compare('client_id',$this->client_id,true);\n\t\t$criteria->compare('extension',$this->extension,true);\n\t\t$criteria->compare('rel_type',$this->rel_type,true);\n\t\t$criteria->compare('rel_id',$this->rel_id,true);\n\t\t$criteria->compare('meta_key',$this->meta_key,true);\n\t\t$criteria->compare('meta_value',$this->meta_value,true);\n\t\t$criteria->compare('date_entry',$this->date_entry,true);\n\t\t$criteria->compare('date_update',$this->date_update,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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,true);\n\t\t$criteria->compare('column_id',$this->column_id,true);\n\t\t$criteria->compare('research_title',$this->research_title,true);\n\t\t$criteria->compare('research_url',$this->research_url,true);\n\t\t$criteria->compare('column_type',$this->column_type);\n\t\t$criteria->compare('filiale_id',$this->filiale_id,true);\n\t\t$criteria->compare('area_name',$this->area_name,true);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('trigger_config',$this->trigger_config);\n\t\t$criteria->compare('status',$this->status);\n $criteria->compare('terminal_type',$this->terminal_type);\n\t\t$criteria->compare('start_time',$this->start_time,true);\n\t\t$criteria->compare('end_time',$this->end_time,true);\n\t\t$criteria->compare('explain',$this->explain,true);\n\t\t$criteria->compare('_delete',$this->_delete);\n\t\t$criteria->compare('_create_time',$this->_create_time,true);\n\t\t$criteria->compare('_update_time',$this->_update_time,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function backendSearch()\n {\n $criteria = new CDbCriteria();\n\n return new CActiveDataProvider(\n __CLASS__,\n array(\n 'criteria' => $criteria,\n )\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\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('birthday',$this->birthday,true);\n\t\t$criteria->compare('sex',$this->sex);\n\t\t$criteria->compare('photo',$this->photo,true);\n\t\t$criteria->compare('is_get_news',$this->is_get_news);\n\t\t$criteria->compare('user_id',$this->user_id);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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('tbl_customer_supplier', $this->tbl_customer_supplier, true);\n $criteria->compare('id_customer', $this->id_customer, true);\n $criteria->compare('id_supplier', $this->id_supplier, true);\n $criteria->compare('title', $this->title, true);\n $criteria->compare('date_add', $this->date_add, true);\n $criteria->compare('date_upd', $this->date_upd, true);\n $criteria->compare('active', $this->active);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\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('order_id',$this->order_id);\n\t\t$criteria->compare('device_id',$this->device_id,true);\n\t\t$criteria->compare('money',$this->money,true);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('add_time',$this->add_time);\n\t\t$criteria->compare('recharge_type',$this->recharge_type);\n\t\t$criteria->compare('channel',$this->channel,true);\n\t\t$criteria->compare('version_name',$this->version_name,true);\n\t\t$criteria->compare('pay_channel',$this->pay_channel);\n\t\t$criteria->compare('chanel_bid',$this->chanel_bid);\n\t\t$criteria->compare('chanel_sid',$this->chanel_sid);\n\t\t$criteria->compare('versionid',$this->versionid);\n\t\t$criteria->compare('chanel_web',$this->chanel_web);\n\t\t$criteria->compare('dem_num',$this->dem_num);\n\t\t$criteria->compare('last_watching',$this->last_watching,true);\n\t\t$criteria->compare('pay_type',$this->pay_type);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\r\n {\r\n // @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n $criteria = new CDbCriteria;\r\n\r\n $criteria->compare('id', $this->id);\r\n $criteria->compare('country_id', $this->country_id);\r\n $criteria->compare('user_id', $this->user_id);\r\n $criteria->compare('vat', $this->vat);\r\n $criteria->compare('manager_coef', $this->manager_coef);\r\n $criteria->compare('curator_coef', $this->curator_coef);\r\n $criteria->compare('admin_coef', $this->admin_coef);\r\n $criteria->compare('status', $this->status);\r\n\r\n return new CActiveDataProvider($this, array(\r\n 'criteria' => $criteria,\r\n ));\r\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,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('code',$this->code,true);\n\t\t$criteria->compare('purchase_price',$this->purchase_price);\n\t\t$criteria->compare('sell_price',$this->sell_price);\n\t\t$criteria->compare('amount',$this->amount);\n\t\t$criteria->compare('measurement',$this->measurement,true);\n\t\t$criteria->compare('date_create',$this->date_create,true);\n\t\t$criteria->compare('date_update',$this->date_update,true);\n\t\t$criteria->compare('date_out',$this->date_out,true);\n\t\t$criteria->compare('date_in',$this->date_in,true);\n\t\t$criteria->compare('firma_id',$this->firma_id,true);\n\t\t$criteria->compare('image_url',$this->image_url,true);\n\t\t$criteria->compare('instock',$this->instock);\n\t\t$criteria->compare('user_id',$this->user_id);\n $criteria->compare('warning_amount',$this->warning_amount);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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,true);\n\t\t$criteria->compare('fname',$this->fname,true);\n\t\t$criteria->compare('mname',$this->mname,true);\n\t\t$criteria->compare('lname',$this->lname,true);\n\t\t$criteria->compare('photo',$this->photo,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('gender',$this->gender,true);\n\t\t$criteria->compare('date_of_birth',$this->date_of_birth,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('landline',$this->landline,true);\n\t\t$criteria->compare('em_contact_name',$this->em_contact_name,true);\n\t\t$criteria->compare('em_contact_relation',$this->em_contact_relation,true);\n\t\t$criteria->compare('em_contact_number',$this->em_contact_number,true);\n\t\t$criteria->compare('created_by',$this->created_by,true);\n\t\t$criteria->compare('created_date',$this->created_date,true);\n\n return new CActiveDataProvider( $this, array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => Yii::app()->user->getState( 'pageSize', Yii::app()->params[ 'defaultPageSize' ] ),\n ),\n ) );\n\t}",
"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\t\t\n\t\t$criteria=new CDbCriteria;\n\t\t\n\t\t$criteria->compare('COMPETITOR_ID',$this->COMPETITOR_ID);\n\t\t$criteria->compare('WSDC_NO',$this->WSDC_NO);\n\t\t$criteria->compare('FIRST_NAME',$this->FIRST_NAME,true);\n\t\t$criteria->compare('LAST_NAME',$this->LAST_NAME,true);\n\t\t$criteria->compare('COMPETITOR_LEVEL',$this->COMPETITOR_LEVEL);\n\t\t$criteria->compare('REMOVED',$this->REMOVED);\n\t\t$criteria->compare('ADDRESS',$this->ADDRESS,true);\n\t\t$criteria->compare('CITY',$this->CITY,true);\n\t\t$criteria->compare('STATE',$this->STATE,true);\n\t\t$criteria->compare('POSTCODE',$this->POSTCODE);\n\t\t$criteria->compare('COUNTRY',$this->COUNTRY,true);\n\t\t$criteria->compare('PHONE',$this->PHONE,true);\n\t\t$criteria->compare('MOBILE',$this->MOBILE,true);\n\t\t$criteria->compare('EMAIL',$this->EMAIL,true);\n\t\t$criteria->compare('LEADER',$this->LEADER);\n\t\t$criteria->compare('REGISTERED',$this->REGISTERED);\n\t\t$criteria->compare('BIB_STATUS',$this->BIB_STATUS);\n\t\t$criteria->compare('BIB_NUMBER',$this->BIB_NUMBER);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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('name',$this->name,true);\n\t\t$criteria->compare('sys_name',$this->sys_name,true);\n\t\t$criteria->compare('description',$this->description,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 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('CustomerId',$this->CustomerId,true);\n\t\t$criteria->compare('AddressId',$this->AddressId,true);\n\t\t$criteria->compare('CustomerStatusId',$this->CustomerStatusId,true);\n\t\t$criteria->compare('DateMasterId',$this->DateMasterId,true);\n\t\t$criteria->compare('FirstName',$this->FirstName,true);\n\t\t$criteria->compare('LastName',$this->LastName,true);\n\t\t$criteria->compare('CustomerPhoto',$this->CustomerPhoto,true);\n\t\t$criteria->compare('CustomerCode',$this->CustomerCode);\n\t\t$criteria->compare('Telephone',$this->Telephone,true);\n\t\t$criteria->compare('Mobile',$this->Mobile,true);\n\t\t$criteria->compare('EmailId',$this->EmailId,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 search() {\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$parameters = array('limit'=>ceil(Profile::getResultsPerPage()));\n\t\t$criteria->scopes = array('findAll'=>array($parameters));\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('itemId',$this->itemId);\n\t\t$criteria->compare('changedBy',$this->changedBy,true);\n\t\t$criteria->compare('recordName',$this->recordName,true);\n\t\t$criteria->compare('fieldName',$this->fieldName,true);\n\t\t$criteria->compare('oldValue',$this->oldValue,true);\n\t\t$criteria->compare('newValue',$this->newValue,true);\n\t\t$criteria->compare('diff',$this->diff,true);\n\t\t$criteria->compare('timestamp',$this->timestamp);\n\n\t\treturn new SmartActiveDataProvider(get_class($this), array(\n\t\t\t'sort'=>array(\n\t\t\t\t'defaultOrder'=>'timestamp DESC',\n\t\t\t),\n\t\t\t'pagination'=>array(\n\t\t\t\t'pageSize'=>Profile::getResultsPerPage(),\n\t\t\t),\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\r\n\t{\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('id',$this->id);\r\n\t\t$criteria->compare('user_id',$this->user_id);\r\n\t\t$criteria->compare('mem_type',$this->mem_type);\r\n\t\t$criteria->compare('business_type',$this->business_type);\r\n\t\t$criteria->compare('product_name',$this->product_name,true);\r\n\t\t$criteria->compare('panit',$this->panit,true);\r\n\t\t$criteria->compare('sex',$this->sex);\r\n\t\t$criteria->compare('tname',$this->tname);\r\n\t\t$criteria->compare('ftname',$this->ftname,true);\r\n\t\t$criteria->compare('ltname',$this->ltname,true);\r\n\t\t$criteria->compare('etname',$this->etname);\r\n\t\t$criteria->compare('fename',$this->fename,true);\r\n\t\t$criteria->compare('lename',$this->lename,true);\r\n\t\t$criteria->compare('birth',$this->birth,true);\r\n\t\t$criteria->compare('email',$this->email,true);\r\n\t\t$criteria->compare('facebook',$this->facebook,true);\r\n\t\t$criteria->compare('twitter',$this->twitter,true);\r\n\t\t$criteria->compare('address',$this->address,true);\r\n\t\t$criteria->compare('province',$this->province);\r\n\t\t$criteria->compare('prefecture',$this->prefecture);\r\n\t\t$criteria->compare('district',$this->district);\r\n\t\t$criteria->compare('postcode',$this->postcode,true);\r\n\t\t$criteria->compare('tel',$this->tel,true);\r\n\t\t$criteria->compare('mobile',$this->mobile,true);\r\n\t\t$criteria->compare('fax',$this->fax,true);\r\n\t\t$criteria->compare('high_education',$this->high_education);\r\n\t\t$criteria->compare('career',$this->career);\r\n\t\t$criteria->compare('skill_com',$this->skill_com);\r\n\t\t$criteria->compare('receive_news',$this->receive_news,true);\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}",
"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\t\t$criteria->compare('company_id', $this->company_id);\n\t\t$criteria->compare('productId', $this->productId);\n\t\t$criteria->compare('upTo', $this->upTo);\n\t\t$criteria->compare('fixPrice', $this->fixPrice);\n\t\t$criteria->compare('isActive', $this->isActive);\n\t\t$criteria->order = 'company_id';\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t\t\t'criteria' => $criteria,\n\t\t\t\t));\n\t}",
"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('city_id',$this->city_id);\n\t\t$criteria->compare('locality',$this->locality,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 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\t\t$criteria->compare('item_id',$this->item_id);\n\t\t$criteria->compare('table_id',$this->table_id);\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 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('cou_id',$this->cou_id);\n\t\t$criteria->compare('thm_id',$this->thm_id);\n\t\t$criteria->compare('cou_nom',$this->cou_nom,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=$this->getBaseCDbCriteria();\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }",
"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('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n// $criteria->compare('alias', $this->alias, true);\n// $criteria->compare('module', $this->module, true);\n $criteria->compare('crud', $this->crud, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\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('idempleo',$this->idempleo);\n\t\t$criteria->compare('administrativo',$this->administrativo,true);\n\t\t$criteria->compare('comercial',$this->comercial,true);\n\t\t$criteria->compare('artes',$this->artes,true);\n\t\t$criteria->compare('informatica',$this->informatica,true);\n\t\t$criteria->compare('salud',$this->salud,true);\n\t\t$criteria->compare('marketing',$this->marketing,true);\n\t\t$criteria->compare('servicio_domestico',$this->servicio_domestico,true);\n\t\t$criteria->compare('construccion',$this->construccion,true);\n\t\t$criteria->compare('agricultura',$this->agricultura,true);\n\t\t$criteria->compare('ganaderia',$this->ganaderia,true);\n\t\t$criteria->compare('telecomunicaciones',$this->telecomunicaciones,true);\n\t\t$criteria->compare('atencion_cliente',$this->atencion_cliente,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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_VALOR',$this->ID_VALOR);\n\t\t$criteria->compare('ID_UBICACION',$this->ID_UBICACION);\n\t\t$criteria->compare('ID_VISITA',$this->ID_VISITA);\n\t\t$criteria->compare('VALOR',$this->VALOR);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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\n\t\t$criteria->compare('id_aspecto',$this->id_aspecto,true);\n\t\t$criteria->compare('tbl_Programa_id_programa',$this->tbl_Programa_id_programa,true);\n\t\t$criteria->compare('tbl_Factor_id_factor',$this->tbl_Factor_id_factor);\n\t\t$criteria->compare('tbl_caracteristica_id_caracteristica',$this->tbl_caracteristica_id_caracteristica,true);\n\t\t$criteria->compare('num_aspecto',$this->num_aspecto,true);\n\t\t$criteria->compare('aspecto',$this->aspecto,true);\n\t\t$criteria->compare('instrumento',$this->instrumento,true);\n\t\t$criteria->compare('fuente',$this->fuente,true);\n\t\t$criteria->compare('documento',$this->documento,true);\n\t\t$criteria->compare('link',$this->link,true);\n\t\t$criteria->compare('Observaciones',$this->Observaciones,true);\n\t\t$criteria->compare('cumple',$this->cumple,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t\n\t\t));\n\t}",
"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('sex',$this->sex,true);\n\t\t$criteria->compare('website_url',$this->website_url,true);\n\t\t$criteria->compare('summary',$this->summary,true);\n\t\t$criteria->compare('user_name',$this->user_name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('created_datetime',$this->created_datetime,true);\n\t\t$criteria->compare('icon_src',$this->icon_src,true);\n\t\t$criteria->compare('show_r18',$this->show_r18);\n\t\t$criteria->compare('show_bl',$this->show_bl);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('creationDate',$this->creationDate,true);\n\t\t$criteria->compare('year',$this->year);\n\t\t$criteria->compare('term',$this->term,true);\n\t\t$criteria->compare('activated',$this->activated);\n\t\t$criteria->compare('startingDate',$this->startingDate,true);\n\t\t$criteria->compare('activation_userId',$this->activation_userId);\n\t\t$criteria->compare('parent_catalogId',$this->parent_catalogId);\n $criteria->compare('isProspective', $this->isProspective);\n $criteria->compare('creatorId', $this->creatorId);\n $criteria->compare('isProposed', $this->isProposed);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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('FirstName',$this->FirstName,true);\n\t\t$criteria->compare('LastName',$this->LastName,true);\n\t\t$criteria->compare('location',$this->location);\n\t\t$criteria->compare('theripiest',$this->theripiest);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('gender',$this->gender,true);\n\t\t$criteria->compare('dob',$this->dob,true);\n\t\t$criteria->compare('inurancecompany',$this->inurancecompany,true);\n\t\t$criteria->compare('injurydate',$this->injurydate,true);\n\t\t$criteria->compare('therapy_start_date',$this->therapy_start_date,true);\n\t\t$criteria->compare('ASIA',$this->ASIA,true);\n\t\t$criteria->compare('injury',$this->injury,true);\n\t\t$criteria->compare('medication',$this->medication,true);\n\t\t$criteria->compare('notes',$this->notes,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search () {\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('formId', $this->formId, true);\n\t\t$criteria->compare('data', $this->data, true);\n\t\t$criteria->compare('ctime', $this->ctime);\n\t\t$criteria->compare('mtime', $this->mtime);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t 'criteria' => $criteria,\n\t\t ));\n\t}",
"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\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('imputetype_id',$this->imputetype_id);\n\t\t$criteria->compare('project_id',$this->project_id);\n\n\t\treturn new ActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('category_id',$this->category_id);\n\t\t$criteria->compare('amount',$this->amount);\n\t\t$criteria->compare('price_z',$this->price_z);\n\t\t$criteria->compare('price_s',$this->price_s);\n\t\t$criteria->compare('price_m',$this->price_m);\n\t\t$criteria->compare('dependence',$this->dependence,true);\n\t\t$criteria->compare('barcode',$this->barcode,true);\n\t\t$criteria->compare('unit',$this->unit,true);\n\t\t$criteria->compare('minimal_amount',$this->minimal_amount);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'pagination' => array('pageSize' => 100),\n\t\t));\n\t}",
"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('name',$this->name,true);\n\t\t$criteria->compare('image',$this->image,true);\n\t\t$criteria->compare('manager',$this->manager);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t$criteria->compare('realname',$this->realname,true);\n\t\t$criteria->compare('identity',$this->identity,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('bussiness_license',$this->bussiness_license,true);\n\t\t$criteria->compare('bankcode',$this->bankcode,true);\n\t\t$criteria->compare('banktype',$this->banktype,true);\n\t\t$criteria->compare('is_open',$this->is_open,true);\n\t\t$criteria->compare('introduction',$this->introduction,true);\n\t\t$criteria->compare('images_str',$this->images_str,true);\n\t\t$criteria->compare('gmt_created',$this->gmt_created,true);\n\t\t$criteria->compare('gmt_modified',$this->gmt_modified,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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('id_user',$this->id_user);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('email_admin',$this->email_admin,true);\n\t\t$criteria->compare('password_api',$this->password_api,true);\n\t\t$criteria->compare('url_result_api',$this->url_result_api,true);\n\t\t$criteria->compare('id_currency_2',$this->id_currency_2);\n\t\t$criteria->compare('id_currency_1',$this->id_currency_1,true);\n\t\t$criteria->compare('is_test_mode',$this->is_test_mode);\n\t\t$criteria->compare('is_commission_shop',$this->is_commission_shop);\n\t\t$criteria->compare('commission',$this->commission);\n\t\t$criteria->compare('is_enable',$this->is_enable);\n\t\t$criteria->compare('is_active',$this->is_active);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('mod_date',$this->mod_date,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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,true);\n\t\t$criteria->compare('userID',$this->userID,true);\n\t\t$criteria->compare('mtID',$this->mtID,true);\n\t\t$criteria->compare('fxType',$this->fxType);\n\t\t$criteria->compare('leverage',$this->leverage);\n\t\t$criteria->compare('amount',$this->amount,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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\t\t/*\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('percent_discount',$this->percent_discount,true);\n\t\t$criteria->compare('taxable',$this->taxable);\n\t\t$criteria->compare('id_user_created',$this->id_user_created);\n\t\t$criteria->compare('id_user_modified',$this->id_user_modified);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_modified',$this->date_modified,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t\t*/\n\t}",
"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('name',$this->name,true);\n\t\t$criteria->compare('surname',$this->surname,true);\n\t\t$criteria->compare('comany_name',$this->comany_name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('uuid',$this->uuid,true);\n\t\t$criteria->compare('is_admin',$this->is_admin);\n\t\t$criteria->compare('paid_period_start',$this->paid_period_start,true);\n\t\t$criteria->compare('ftp_pass',$this->ftp_pass,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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('HISTORY',$this->HISTORY,true);\n\t\t$criteria->compare('WELCOME_MESSAGE',$this->WELCOME_MESSAGE,true);\n\t\t$criteria->compare('LOCATION',$this->LOCATION,true);\n\t\t$criteria->compare('PHONES',$this->PHONES,true);\n\t\t$criteria->compare('FAX',$this->FAX,true);\n\t\t$criteria->compare('EMAIL',$this->EMAIL,true);\n\t\t$criteria->compare('MISSION',$this->MISSION,true);\n\t\t$criteria->compare('VISION',$this->VISION,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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,true);\n\t\t$criteria->compare('price',$this->price,true);\n\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('breed',$this->breed,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('date_birthday',$this->date_birthday,true);\n\t\t$criteria->compare('sex',$this->sex,true);\n\t\t$criteria->compare('color',$this->color,true);\n\t\t$criteria->compare('tattoo',$this->tattoo,true);\n\t\t$criteria->compare('sire',$this->sire,true);\n\t\t$criteria->compare('dame',$this->dame,true);\n\t\t$criteria->compare('owner_type',$this->owner_type,true);\n\t\t$criteria->compare('honors',$this->honors,true);\n\t\t$criteria->compare('photo_preview',$this->photo_preview,true);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('pet_status',$this->pet_status,true);\n\t\t$criteria->compare('about',$this->about,true);\n\t\t$criteria->compare('uid',$this->uid);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('veterinary',$this->veterinary,true);\n\t\t$criteria->compare('vaccinations',$this->vaccinations,true);\n\t\t$criteria->compare('show_class',$this->show_class,true);\n\t\t$criteria->compare('certificate',$this->certificate,true);\n $criteria->compare('neutered_spayed',$this->certificate,true);\n \n\n $criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('city',$this->city,true);\n\n \n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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, true);\n $criteria->compare('company_id', Yii::app()->user->company_id);\n $criteria->compare('zone_id', $this->zone_id, true);\n $criteria->compare('low_qty_threshold', $this->low_qty_threshold);\n $criteria->compare('high_qty_threshold', $this->high_qty_threshold);\n $criteria->compare('created_date', $this->created_date, true);\n $criteria->compare('created_by', $this->created_by, true);\n $criteria->compare('updated_date', $this->updated_date, true);\n $criteria->compare('updated_by', $this->updated_by, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\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('orgName',$this->orgName,true);\n\t\t$criteria->compare('noEmp',$this->noEmp);\n\t\t$criteria->compare('phone',$this->phone);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('addr1',$this->addr1,true);\n\t\t$criteria->compare('addr2',$this->addr2,true);\n\t\t$criteria->compare('state',$this->state,true);\n\t\t$criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('orgType',$this->orgType,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('fax',$this->fax);\n\t\t$criteria->compare('orgId',$this->orgId,true);\n\t\t$criteria->compare('validity',$this->validity);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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 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,true);\n\t\t$criteria->compare('category',$this->category,true);\n\t\t$criteria->compare('sortorder',$this->sortorder,true);\n\t\t$criteria->compare('fullname',$this->fullname,true);\n\t\t$criteria->compare('shortname',$this->shortname,true);\n\t\t$criteria->compare('idnumber',$this->idnumber,true);\n\t\t$criteria->compare('summary',$this->summary,true);\n\t\t$criteria->compare('summaryformat',$this->summaryformat);\n\t\t$criteria->compare('format',$this->format,true);\n\t\t$criteria->compare('showgrades',$this->showgrades);\n\t\t$criteria->compare('sectioncache',$this->sectioncache,true);\n\t\t$criteria->compare('modinfo',$this->modinfo,true);\n\t\t$criteria->compare('newsitems',$this->newsitems);\n\t\t$criteria->compare('startdate',$this->startdate,true);\n\t\t$criteria->compare('marker',$this->marker,true);\n\t\t$criteria->compare('maxbytes',$this->maxbytes,true);\n\t\t$criteria->compare('legacyfiles',$this->legacyfiles);\n\t\t$criteria->compare('showreports',$this->showreports);\n\t\t$criteria->compare('visible',$this->visible);\n\t\t$criteria->compare('visibleold',$this->visibleold);\n\t\t$criteria->compare('groupmode',$this->groupmode);\n\t\t$criteria->compare('groupmodeforce',$this->groupmodeforce);\n\t\t$criteria->compare('defaultgroupingid',$this->defaultgroupingid,true);\n\t\t$criteria->compare('lang',$this->lang,true);\n\t\t$criteria->compare('theme',$this->theme,true);\n\t\t$criteria->compare('timecreated',$this->timecreated,true);\n\t\t$criteria->compare('timemodified',$this->timemodified,true);\n\t\t$criteria->compare('requested',$this->requested);\n\t\t$criteria->compare('enablecompletion',$this->enablecompletion);\n\t\t$criteria->compare('completionnotify',$this->completionnotify);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('zipcode',$this->zipcode,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('role',$this->role,true);\n\t\t$criteria->compare('active',$this->active);\n\t\t$criteria->compare('camaras',$this->camaras);\n\t\t$criteria->compare('freidoras',$this->freidoras);\n\t\t$criteria->compare('cebos',$this->cebos);\n\t\t$criteria->compare('trampas',$this->trampas);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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('cod_venda',$this->cod_venda,true);\n\t\t$criteria->compare('filial_cod_filial',$this->filial_cod_filial,true);\n\t\t$criteria->compare('funcionario_cod_funcionario',$this->funcionario_cod_funcionario,true);\n\t\t$criteria->compare('cliente_cod_cliente',$this->cliente_cod_cliente,true);\n\t\t$criteria->compare('data_2',$this->data_2,true);\n\t\t$criteria->compare('valor_total',$this->valor_total);\n\t\t$criteria->compare('forma_pagamento',$this->forma_pagamento,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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('attribute',$this->attribute,true);\n\t\t$criteria->compare('displayName',$this->displayName,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('value_type',$this->value_type,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('state', $this->state);\n $criteria->compare('type','0');\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"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('name', $this->name, true);\n $criteria->compare('sex', $this->sex);\n $criteria->compare('mobile', $this->mobile, true);\n $criteria->compare('idcard', $this->idcard, true);\n $criteria->compare('password', $this->password, true);\n $criteria->compare('place_ids', $this->place_ids, true);\n $criteria->compare('depart_id', $this->depart_id);\n $criteria->compare('bank', $this->bank, true);\n $criteria->compare('bank_card', $this->bank_card, true);\n $criteria->compare('address', $this->address, true);\n $criteria->compare('education', $this->education, true);\n $criteria->compare('created', $this->created);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\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->buscar,'OR');\n\t\t$criteria->compare('fecha',$this->buscar,true,'OR');\n\t\t$criteria->compare('fechaUpdate',$this->buscar,true,'OR');\n\t\t$criteria->compare('idProfesional',$this->buscar,'OR');\n\t\t$criteria->compare('importe',$this->buscar,'OR');\n\t\t$criteria->compare('idObraSocial',$this->buscar,'OR');\n\t\t$criteria->compare('estado',$this->buscar,true,'OR');\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"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('codop',$this->codop,true);\n\t\t$criteria->compare('codcatval',$this->codcatval,true);\n\t\t$criteria->compare('cuentadebe',$this->cuentadebe,true);\n\t\t$criteria->compare('cuentahaber',$this->cuentahaber,true);\n\t\t$criteria->compare('desop',$this->desop,true);\n\t\t$criteria->compare('descat',$this->descat,true);\n\t\t$criteria->compare('debe',$this->debe,true);\n\t\t$criteria->compare('haber',$this->haber,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array('pagesize'=>100),\n\t\t));\n\t}"
] | [
"0.72127825",
"0.7136067",
"0.7093868",
"0.7092793",
"0.69851667",
"0.69601536",
"0.69477975",
"0.6940818",
"0.69330317",
"0.6923378",
"0.690978",
"0.69027317",
"0.68979496",
"0.68971545",
"0.6892498",
"0.688223",
"0.68793845",
"0.6873633",
"0.6848405",
"0.68481565",
"0.68344474",
"0.68248796",
"0.6815281",
"0.68071365",
"0.68030006",
"0.67969006",
"0.67962015",
"0.6795326",
"0.6794667",
"0.67936474",
"0.67895097",
"0.67850757",
"0.6784554",
"0.6783576",
"0.6780559",
"0.678039",
"0.6778287",
"0.67775595",
"0.6776229",
"0.67755276",
"0.6774439",
"0.6774439",
"0.6774439",
"0.6774439",
"0.6774439",
"0.6774439",
"0.6774439",
"0.6774439",
"0.6772257",
"0.67681736",
"0.6766741",
"0.6765388",
"0.67620844",
"0.6761996",
"0.67607635",
"0.67605174",
"0.6758544",
"0.675808",
"0.67532384",
"0.67531157",
"0.6751695",
"0.67481714",
"0.6747892",
"0.67464304",
"0.67446625",
"0.67444783",
"0.67441547",
"0.6743848",
"0.67436653",
"0.674305",
"0.67413104",
"0.6740276",
"0.67395735",
"0.67384887",
"0.6737069",
"0.67367435",
"0.6734255",
"0.6731825",
"0.67306423",
"0.672503",
"0.6722928",
"0.6722267",
"0.67212665",
"0.6712663",
"0.6712623",
"0.6710047",
"0.6708465",
"0.6706299",
"0.670594",
"0.67055833",
"0.67035687",
"0.6702478",
"0.6700182",
"0.6698587",
"0.6696019",
"0.66949546",
"0.66945523",
"0.66928726",
"0.6692768",
"0.6692374",
"0.6690821"
] | 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.7574005",
"0.7528819",
"0.7270635",
"0.7269363",
"0.72611624",
"0.7211197",
"0.72105455",
"0.7130912",
"0.7127844",
"0.7127844",
"0.7101899",
"0.7101899",
"0.7101485",
"0.70736724",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427",
"0.70631427"
] | 0.0 | -1 |
Getting the last Id | public function submitAddPortfolio(Request $request) {
$lastid = Portfolio::select('id')->orderBy('id', 'desc')->first();
if (empty($lastid['id']))
$lastid = 1;
else {
$lastid = $lastid['id'] + 1;
}
// end
$rules = [
'filename' => 'required',
'title' => 'required',
'pdetails' => 'required',
'link' => 'required',
];
$messages = [
'required' => 'This field is required',
];
$validator = Validator:: make($request->all(), $rules, $messages);
if ($validator->fails()) {
return Redirect::to('addportfolio')->withErrors($validator)->withInput();
} else {
if ($request->isMethod('post')) {
$table = new Portfolio();
// upload the image
$image = $request->file('filename');
$portfolioextension = $request->file('filename')->getClientOriginalExtension();
$imageRealPath = $image->getRealPath();
$img = Image::make($imageRealPath);
$path = public_path('dist/portfolio/');
if (!File::exists($path))
File::makeDirectory($path, 0777, true);
$img->save(public_path('dist/portfolio') . '/' . $lastid . '.' . $portfolioextension);
chmod(public_path('dist/portfolio') . '/' . $lastid . '.' . $portfolioextension, 0777);
$table->image = '/dist/portfolio/' . $lastid . '.' . $portfolioextension;
$table->title = $request->input('title');
$table->link = $request->input('link');
$table->details = $request->input('pdetails');
$table->save();
return Redirect::back();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getLastId();",
"public function getLastId();",
"public function lastId();",
"public function lastId(){\n return $this->lastId;\n }",
"public function lastId()\r\n {\r\n return $this->getKey('last_id');\r\n }",
"function get_last_id()\n {\n // TODO: Implement get_last_id() method.\n }",
"function lastId()\n {\n return isset($this->_query) ? $this->_query->lastId() : $this->_lastid;\n }",
"public function get_last_id() {\n\t\treturn $this->last_id;\n\t}",
"public static function get_last_id(){\r\n\t\treturn self::$last_id;\r\n\t}",
"public function lastId() : int\n\t{\n\t\treturn $this->handle->lastId();\n\t}",
"public function getLastId()\n {\n return $this->galleryMapper->getMaxId();\n }",
"public function lastId(): int\n {\n return $this->lastId;\n }",
"public function getLastId(){\n\n\t\t\treturn $this->lastInsertedIds;\n\t\t}",
"public function lastID(): int;",
"public function getLastId() \n {\n if(!Patient::all() -> isEmpty()){\n $recentId = Patient::orderBy('patient_id', 'desc')->first()->patient_id;\n return $recentId;\n }\n }",
"public function getLastId() {\n return $this->LastInsertId;\n }",
"public function getLastId()\r\n {\r\n return $this->photoMapper->getLastId();\r\n }",
"public function getLastId()\n {\n return $this->wallpaperMapper->getMaxId();\n }",
"public function scopeGetLastId()\n {\n return $this->latest()->first()->id;\n }",
"function last_id(){\n\t\treturn(-1);\n\t}",
"protected function getLastID()\n {\n return $this->driver->getInsertId();\n }",
"public function getLastId()\n {\n return $this->adodb->insert_Id();\n }",
"function lastID(){\n return pg_last_oid($this->consulta);\n }",
"public function getLastInsertId();",
"public function getLastInsertId();",
"public function getLastInsertId();",
"function lastID()\r\n\t{\r\n\t\tassert($this->link != null);\r\n\t\treturn intval($this->link->lastInsertId());\r\n\t}",
"public static function lastId()\n {\n return self::connect()->lastInsertId();\n }",
"public function lastId() {\n\t\tif (is_null($this->lastId)) {\n\t\t\tthrow new Exception('Unable to get last ID - wrong query type');\n\t\t}\n\n\t\treturn $this->lastId;\n\t}",
"public function lastId()\n\t{\n\t\treturn $this->_instance->lastInsertId();\n\t}",
"public function getLastId(){\n return $this->con->insertId();\n }",
"public function getLastId()\n\t{\n\t\t$lastId = $this->getRoleModel()->getLastId();\n\t\treturn $lastId;\n\t}",
"abstract public function getLastInsertId();",
"public function lastID() {\n return $this->getPDO()->lastInsertId();\n }",
"public function lastInsertId();",
"public function lastInsertId();",
"public function lastInsertId();",
"protected function getLastId(){\n $student_current_id = \"SELECT students.id FROM `students` ORDER BY id DESC LIMIT 1\";\n $sql = $this->conn->prepare($student_current_id);\n $sql->execute();\n\n $result = $sql->setFetchMode(PDO::FETCH_ASSOC);\n $student_id = $sql->fetchAll();\n echo \"<br><br><br><br>\";\n foreach ($student_id as $id){\n $my_id = $id['id'];\n }\n return $my_id;\n }",
"public function lastId()\n\t{\n\t\treturn $this->lastInsertID();\n\t}",
"static function getLastID()\r\n {\r\n $tableUser = DatabaseManager::getNameTable('TABLE_USER');\r\n\r\n $query = \"SELECT MAX(id) AS Max FROM $tableUser\";\r\n\r\n return DatabaseManager::singleFetchAssoc($query)[\"Max\"];\r\n }",
"public function getLastInsertID();",
"function getLastId()\n {\n return mysqli_insert_id($this->Db);\n }",
"public function getLastElementId()\n\t{\n\t\treturn $this->lastElementId;\n\t}",
"protected function getLastPrimaryKey()\n {\n return $this->getLastEntityId();\n }",
"public function last_id() {\n return $this->_connection->lastInsertId();\n }",
"public function lastID(){\n return $this->_lastInsertID;\n }",
"public static function getLastUserId()\n {\n $lastId = DB::table('users')\n ->select('id')\n ->orderBy('id','desc')\n ->limit(1)\n ->get();\n return $lastId;\n }",
"public function LastID()\r\r\n {\r\r\n $query=\"SELECT MAX(id) as Max FROM DevisVente WHERE 1\";\r\r\n $req = $this->connexion->getConnexion()->query($query);\r\r\n\r\r\n $dv = $req->fetchAll(PDO::FETCH_OBJ);\r\r\n\r\r\n return $dv;\r\r\n }",
"public function getLastID() {\n return $this->db->insert_id();\n }",
"public function get_new_id()\n {\n $query = \"select MAX(id) as id from team\";\n $res = $this->db->query($query);\n $res->result_array();\n $last_id = ($res->result()[0]->id)+1;\n return $last_id;\n }",
"public function getLastInsertId(): int;",
"function getLastid(){\n $this->lastid = mysqli_insert_id($this->dcon);\n return $this->lastid;\n }",
"public function lastInsertedId()\n {\n $query = 'MATCH (n) RETURN MAX(id(n)) AS lastIdCreated';\n\n $statement = $this->getCypherQuery($query, []);\n $result = $statement->getResultSet();\n\n return $result[0][0];\n }",
"public function retrieveLastItemId() {\n return $this->itemsDB->retrieveLastItemId();\n }",
"public function requestLastInsertedId() {\n $sql = \"SELECT MAX(idTraffic) FROM traffic\";\n $result = $this->db->fetchOne($sql);\n return $result;\n }",
"function getLastID (){\n\n $connetion = $this->conexionMongoDB();\n\n // Si se dio la conexion\n if ($connetion!=null){\n\n $filter = array();\n // Estableciendo las opciones apra que solo se traiga el id mas alto en la base de datos\n $options = ['sort' => ['id' => -1],'limit'=> 1];\n $cursor = array();\n try{\n\n $query = new MongoDB\\Driver\\Query($filter,$options);\n $cursor = $connetion->executeQuery($this->credentials->getNameMongoDB().\".\".$this->credentials->getCollection(),$query);\n\n }catch (MongoDB\\Driver\\Exception $e){\n\n $_SESSION['title'] = TITLE_FAIL_CONNECTION;\n $_SESSION['message'] = MESSAGE_MONGO_EXCEPTION;\n header(\"Location: ../php/mensaje.php\");\n\n }\n catch (Exception $e){\n echo $e->getMessage();\n die();\n }\n\n $id_max = 0;\n\n foreach ($cursor as $element){\n $id_max = $element->id;\n }\n\n return $id_max;\n\n }\n\n }",
"function last_id(){\n\t$conexion = new ConexionOther();\t\n\t$link = $conexion;\n\treturn $link->lastInsertId();\n}",
"public function insertGetId()\n {\n return $this->lastId;\n }",
"public function insertGetId()\n {\n return $this->lastId;\n }",
"public function getLastInsertId(){\n return $this->lastInsertId;\n }",
"function getLastInsertID(){\r\n $query = 'SELECT DISTINCT LAST_INSERT_ID() FROM ' . $this->table_name; \r\n $stmt = $this->dbConn->prepare($query);\r\n \r\n $stmt->execute();\r\n \r\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\r\n \r\n $lastID = $row['LAST_INSERT_ID()'];\r\n \r\n return $lastID;\r\n }",
"function get_last_id() {\n if ($this->is_valid())\n return @mysql_insert_id($this->connection);\n }",
"public function getLastInsertId()\r\n {\r\n return $this->getMaster()->lastInsertId();\r\n }",
"public static function getLastRowId()\n {\n return self::$id;\n }",
"public function lastId()\n\t{\n\t\treturn mysqli_insert_id($this->connection);\n\t}",
"function getLastID(){\r\n $sql = $this->db->prepare(\"SELECT LAST_INSERT_ID()\");\r\n if($sql->execute()){\r\n $id = $sql->fetchColumn(0);\r\n return $id;\r\n }\r\n else\r\n return false;\r\n }",
"function lastId() {\n return mysqli_insert_id($this->con);\n }",
"public function lastInsertId(){\n return $this->link->lastInsertId();\n }",
"protected function getNextId()\n {\n return Field::max('id') + 1;\n }",
"public function lastInsertId () {\r\n return $this->cachedLastInsertId; // $this->db->lastInsertId();\r\n }",
"protected function getLastPostId() {\n $this->lastPostId = Post::select('habr_id')->orderBy('unix_time','desc')->first()->habr_id;\n }",
"public static function getLastNotificationID(){\n $row = getDatabase()->queryFirstRow(\"SELECT `id` FROM `notifications` ORDER BY `id` DESC\");\n return $row['id'];\n }",
"public function lastId()\n {\n return $this->mysqli->insert_id;\n }",
"public function lastId () {\n\treturn mysql_insert_id();\n }",
"function lastid(){\n\t\t$query = 'SELECT idVideo FROM video Order By idVideo Desc Limit 1';\n\t\t$link = createConection();\n\t\tif($row = pg_fetch_array(pg_exec($link,$query))){\n\t\t\tcloseConection($link);\n\t\t\treturn $row['idvideo'];\n\t\t}else{\n\t\t\tcloseConection($link);\n\t\t\treturn 0;\n\t\t}\n\t}",
"public function getLastInsertId()\n {\n return $this->lastInsertId;\n }",
"public function getNextId()\n {\n return $this->oMapper->getNextId();\n }",
"public function getLastId2()\r\n\t{\r\n\t\tif (Conexion::getEstatusConexion()) {\r\n\t\t\t$strSql = 'SELECT id_investigacion FROM investigaciones ORDER BY id_investigacion DESC LIMIT 1;';\r\n\t\t\t$respuestaArreglo = [];\r\n\t\t\t$id = 0;\r\n\t\t\ttry {\r\n\t\t\t\t$strExec = Conexion::prepare($strSql);\r\n\t\t\t\t$strExec->execute();\r\n\t\t\t\t$respuestaArreglo = $strExec->fetchAll();\r\n\t\t\t\tforeach ($respuestaArreglo as $valor) {\r\n\t\t\t\t\t$id = $valor['id_investigacion'];\r\n\t\t\t\t}\r\n\t\t\t} catch (PDOException $e) {\r\n\t\t\t\t\r\n\t\t\t\treturn $id;\r\n\t\t\t}\r\n\r\n\t\t\treturn $id;\r\n\t\t} else {\r\n\t\t\treturn $id;\r\n\t\t}\r\n\t}",
"public static function lastID($db){\n\t\t\treturn $db->lastInsertId(); \n\t\t}",
"protected function lastInsertedId() {\n\t\t// envoi de la request\n\t\t{\n\t\t\t$sql = \"SELECT IDENTITY_VAL_LOCAL() as ID FROM \".$this->getTableName().\" FETCH FIRST 1 ROWS ONLY\";\n\t\t\t$q1 = query_db2($sql, true);\n\t\t\t$results = result_db2($q1);\n\t\t}\n\t\t\n\t\t// analyse des resultats\n\t\t{\n\t\t\tif (empty($results)) {\n\t\t\t\tunset($sql, $q1, $results);\n\t\t\t\treturn (null);\n\t\t\t}\n\t\t\t$res = $results['ID'];\n\t\t}\n\t\t\n\t\t// retour\n\t\tunset($sql, $q1, $results);\n\t\treturn ($res);\n\t}",
"public function getLastInsertedId() {\n\t\treturn $this->lastInsertedID;\n\t}",
"function lastId() {\r\n return mysql_insert_id();\r\n }",
"public function getLastInsertId()\n {\n return $this->getPdo()->lastInsertId();\n }",
"function getLastinsertId (){\n return $this->pdo->lastInsertId();\n }",
"public function lastInsertedId(): mixed;",
"function lastId()\n {\n return mysql_insert_id();\n }",
"function LastId($seq='')\n\t{\n\t\tif (!$seq) {\n\t\t\treturn false;\n\t\t}\n\t\t$query = \"SELECT \".$seq.\".currval FROM dual\";\n\t\t$nextid = $this->FetchOne($query);\n\t\treturn $nextid;\n\t}",
"public function lastInsertId(){\n return $this->pdo->lastInsertId();\n }",
"public function getLastInsertedID(){\n // Return last created id\n return $this->connection->insert_id();\n }",
"public function id() {\n return $this->lastInsertId();\n }",
"public function lastId(): int\n {\n return (int) $this->pdo->lastInsertId();\n }",
"public function getLastInsertId()\n {\n return $this->PDO->lastInsertId();\n }",
"public function getLastEntryId($db) {\n return $db->lastInsertId();\n }",
"function lastInsertId() {\n return $this->pdo->lastInsertId();\n }",
"public function getLast()\n {\n $post = Post::findFirst([\"order\" => \"id DESC\"]);\n\n if($post == true)\n {\n return $post->id + 1;\n }\n else\n {\n return 1;\n }\n }",
"public static function getId() {\n\t\treturn self::getConexao()->lastInsertId();\n\t}",
"public function getLastInsertId()\t{\n\t\treturn $this->_hDb->lastInsertId();\n\t}",
"function lastInsertId()\n\t{\n\t\treturn @$this->functions['insert_id']($this->connection_master);\n\t}",
"public static function getLastInsertId()\n {\n return self::$sql->lastInsertId();\n }",
"public function getLastInsertID()\n {\n\t return $this->connections[ $this->activeConnection]->insert_id;\n }",
"public function getLastInsertId()\n {\n return $this->getHandler()->getConnection()->lastInsertId();\n }"
] | [
"0.9115486",
"0.9115486",
"0.91010386",
"0.88181263",
"0.8676524",
"0.86586565",
"0.8576924",
"0.8508489",
"0.84644306",
"0.8443903",
"0.84314585",
"0.84215254",
"0.8396023",
"0.8388422",
"0.834308",
"0.8329831",
"0.8299534",
"0.82903117",
"0.8264374",
"0.8206549",
"0.8189418",
"0.8129134",
"0.80778986",
"0.8055723",
"0.8055723",
"0.8055723",
"0.8051685",
"0.8047801",
"0.7995515",
"0.7991983",
"0.79915905",
"0.79585576",
"0.7954605",
"0.79080987",
"0.790341",
"0.790341",
"0.790341",
"0.78655106",
"0.7847339",
"0.7846141",
"0.78434986",
"0.78233844",
"0.7799891",
"0.77951264",
"0.7789393",
"0.77537704",
"0.7748619",
"0.76995194",
"0.7698976",
"0.7691353",
"0.7678287",
"0.7677896",
"0.7664839",
"0.76646644",
"0.7662246",
"0.76125103",
"0.7607428",
"0.7599652",
"0.7599652",
"0.75984323",
"0.7596368",
"0.7590336",
"0.75801355",
"0.7571225",
"0.756881",
"0.75372285",
"0.7535044",
"0.75335675",
"0.75076544",
"0.7495762",
"0.74889416",
"0.7455603",
"0.7434139",
"0.7419335",
"0.74179995",
"0.74167764",
"0.74122137",
"0.74105304",
"0.7405163",
"0.74026376",
"0.7399454",
"0.73935074",
"0.738325",
"0.73797524",
"0.737798",
"0.73638815",
"0.73541677",
"0.73412156",
"0.7333262",
"0.73239076",
"0.7321325",
"0.7320299",
"0.7319437",
"0.7308148",
"0.7308111",
"0.7301081",
"0.7298626",
"0.72952443",
"0.7271937",
"0.7263458",
"0.72496814"
] | 0.0 | -1 |
Constructs a new DibsPaytypesEvent. | public function __construct(array $paytypes) {
$this->paytypes = $paytypes;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getEventTypes()\n {\n return new EventTypes(array('order_name' => true));\n }",
"protected function _generateEventLabels()\n {\n if (!self::$_eventList) {\n self::$_eventList = array(\n 'T0000' => Mage::helper('paypal')->__('General: received payment of a type not belonging to the other T00xx categories'),\n 'T0001' => Mage::helper('paypal')->__('Mass Pay Payment'),\n 'T0002' => Mage::helper('paypal')->__('Subscription Payment, either payment sent or payment received'),\n 'T0003' => Mage::helper('paypal')->__('Preapproved Payment (BillUser API), either sent or received'),\n 'T0004' => Mage::helper('paypal')->__('eBay Auction Payment'),\n 'T0005' => Mage::helper('paypal')->__('Direct Payment API'),\n 'T0006' => Mage::helper('paypal')->__('Express Checkout APIs'),\n 'T0007' => Mage::helper('paypal')->__('Website Payments Standard Payment'),\n 'T0008' => Mage::helper('paypal')->__('Postage Payment to either USPS or UPS'),\n 'T0009' => Mage::helper('paypal')->__('Gift Certificate Payment: purchase of Gift Certificate'),\n 'T0010' => Mage::helper('paypal')->__('Auction Payment other than through eBay'),\n 'T0011' => Mage::helper('paypal')->__('Mobile Payment (made via a mobile phone)'),\n 'T0012' => Mage::helper('paypal')->__('Virtual Terminal Payment'),\n 'T0100' => Mage::helper('paypal')->__('General: non-payment fee of a type not belonging to the other T01xx categories'),\n 'T0101' => Mage::helper('paypal')->__('Fee: Web Site Payments Pro Account Monthly'),\n 'T0102' => Mage::helper('paypal')->__('Fee: Foreign ACH Withdrawal'),\n 'T0103' => Mage::helper('paypal')->__('Fee: WorldLink Check Withdrawal'),\n 'T0104' => Mage::helper('paypal')->__('Fee: Mass Pay Request'),\n 'T0200' => Mage::helper('paypal')->__('General Currency Conversion'),\n 'T0201' => Mage::helper('paypal')->__('User-initiated Currency Conversion'),\n 'T0202' => Mage::helper('paypal')->__('Currency Conversion required to cover negative balance'),\n 'T0300' => Mage::helper('paypal')->__('General Funding of PayPal Account '),\n 'T0301' => Mage::helper('paypal')->__('PayPal Balance Manager function of PayPal account'),\n 'T0302' => Mage::helper('paypal')->__('ACH Funding for Funds Recovery from Account Balance'),\n 'T0303' => Mage::helper('paypal')->__('EFT Funding (German banking)'),\n 'T0400' => Mage::helper('paypal')->__('General Withdrawal from PayPal Account'),\n 'T0401' => Mage::helper('paypal')->__('AutoSweep'),\n 'T0500' => Mage::helper('paypal')->__('General: Use of PayPal account for purchasing as well as receiving payments'),\n 'T0501' => Mage::helper('paypal')->__('Virtual PayPal Debit Card Transaction'),\n 'T0502' => Mage::helper('paypal')->__('PayPal Debit Card Withdrawal from ATM'),\n 'T0503' => Mage::helper('paypal')->__('Hidden Virtual PayPal Debit Card Transaction'),\n 'T0504' => Mage::helper('paypal')->__('PayPal Debit Card Cash Advance'),\n 'T0600' => Mage::helper('paypal')->__('General: Withdrawal from PayPal Account'),\n 'T0700' => Mage::helper('paypal')->__('General (Purchase with a credit card)'),\n 'T0701' => Mage::helper('paypal')->__('Negative Balance'),\n 'T0800' => Mage::helper('paypal')->__('General: bonus of a type not belonging to the other T08xx categories'),\n 'T0801' => Mage::helper('paypal')->__('Debit Card Cash Back'),\n 'T0802' => Mage::helper('paypal')->__('Merchant Referral Bonus'),\n 'T0803' => Mage::helper('paypal')->__('Balance Manager Account Bonus'),\n 'T0804' => Mage::helper('paypal')->__('PayPal Buyer Warranty Bonus'),\n 'T0805' => Mage::helper('paypal')->__('PayPal Protection Bonus'),\n 'T0806' => Mage::helper('paypal')->__('Bonus for first ACH Use'),\n 'T0900' => Mage::helper('paypal')->__('General Redemption'),\n 'T0901' => Mage::helper('paypal')->__('Gift Certificate Redemption'),\n 'T0902' => Mage::helper('paypal')->__('Points Incentive Redemption'),\n 'T0903' => Mage::helper('paypal')->__('Coupon Redemption'),\n 'T0904' => Mage::helper('paypal')->__('Reward Voucher Redemption'),\n 'T1000' => Mage::helper('paypal')->__('General. Product no longer supported'),\n 'T1100' => Mage::helper('paypal')->__('General: reversal of a type not belonging to the other T11xx categories'),\n 'T1101' => Mage::helper('paypal')->__('ACH Withdrawal'),\n 'T1102' => Mage::helper('paypal')->__('Debit Card Transaction'),\n 'T1103' => Mage::helper('paypal')->__('Reversal of Points Usage'),\n 'T1104' => Mage::helper('paypal')->__('ACH Deposit (Reversal)'),\n 'T1105' => Mage::helper('paypal')->__('Reversal of General Account Hold'),\n 'T1106' => Mage::helper('paypal')->__('Account-to-Account Payment, initiated by PayPal'),\n 'T1107' => Mage::helper('paypal')->__('Payment Refund initiated by merchant'),\n 'T1108' => Mage::helper('paypal')->__('Fee Reversal'),\n 'T1110' => Mage::helper('paypal')->__('Hold for Dispute Investigation'),\n 'T1111' => Mage::helper('paypal')->__('Reversal of hold for Dispute Investigation'),\n 'T1200' => Mage::helper('paypal')->__('General: adjustment of a type not belonging to the other T12xx categories'),\n 'T1201' => Mage::helper('paypal')->__('Chargeback'),\n 'T1202' => Mage::helper('paypal')->__('Reversal'),\n 'T1203' => Mage::helper('paypal')->__('Charge-off'),\n 'T1204' => Mage::helper('paypal')->__('Incentive'),\n 'T1205' => Mage::helper('paypal')->__('Reimbursement of Chargeback'),\n 'T1300' => Mage::helper('paypal')->__('General (Authorization)'),\n 'T1301' => Mage::helper('paypal')->__('Reauthorization'),\n 'T1302' => Mage::helper('paypal')->__('Void'),\n 'T1400' => Mage::helper('paypal')->__('General (Dividend)'),\n 'T1500' => Mage::helper('paypal')->__('General: temporary hold of a type not belonging to the other T15xx categories'),\n 'T1501' => Mage::helper('paypal')->__('Open Authorization'),\n 'T1502' => Mage::helper('paypal')->__('ACH Deposit (Hold for Dispute or Other Investigation)'),\n 'T1503' => Mage::helper('paypal')->__('Available Balance'),\n 'T1600' => Mage::helper('paypal')->__('Funding'),\n 'T1700' => Mage::helper('paypal')->__('General: Withdrawal to Non-Bank Entity'),\n 'T1701' => Mage::helper('paypal')->__('WorldLink Withdrawal'),\n 'T1800' => Mage::helper('paypal')->__('Buyer Credit Payment'),\n 'T1900' => Mage::helper('paypal')->__('General Adjustment without businessrelated event'),\n 'T2000' => Mage::helper('paypal')->__('General (Funds Transfer from PayPal Account to Another)'),\n 'T2001' => Mage::helper('paypal')->__('Settlement Consolidation'),\n 'T9900' => Mage::helper('paypal')->__('General: event not yet categorized'),\n );\n asort(self::$_eventList);\n }\n }",
"public function __construct(int $type)\n {\n $this->_eventType = $type;\n }",
"function __construct($name, $eventTypeId) {\n $this->name = $name;\n $this->eventTypeId = $eventTypeId;\n }",
"public function __construct(VendorAPI_Blackbox_EventLog $log, $days)\n\t{\n\t\tparent::__construct($log);\n\t\t$this->days = $days;\n\t\t$this->addActionToStack('VERIFY_PAYDATES');\n\t}",
"private function createinstallevent()\n {\n $cat = CategoryUtil::getCategoryByPath('/__SYSTEM__/Modules/PostCalendar/Events');\n\n $eventArray = array(\n 'title' => $this->__('PostCalendar Installed'),\n 'hometext' => ':text:' . $this->__('On this date, the PostCalendar module was installed. Thank you for trying PostCalendar! This event can be safely deleted if you wish.'),\n 'alldayevent' => true,\n 'eventstatus' => PostCalendar_Entity_CalendarEvent::APPROVED,\n 'sharing' => PostCalendar_Entity_CalendarEvent::SHARING_GLOBAL,\n 'website' => 'https://github.com/craigh/PostCalendar/wiki',\n 'categories' => array(\n 'Main' => $cat['id']));\n\n try {\n $event = new PostCalendar_Entity_CalendarEvent();\n $event->setFromArray($eventArray);\n $this->entityManager->persist($event);\n $this->entityManager->flush();\n } catch (Exception $e) {\n return LogUtil::registerError($e->getMessage());\n }\n\n return true;\n }",
"public function __construct()\n {\n $this->notificationTypes = ['TransactionBillWasClosed', 'LoyaltyRewardEarned', 'CustomerRedeemReward', 'CustomerRedeemDeal'];\n }",
"public function __construct()\n {\n $this->types = array(self::TYPE_EMISSION, self::TYPE_TRANSFER);\n }",
"protected function _generateEventLabels()\n {\n if (!self::$_eventList) {\n self::$_eventList = array(\n 'T0000' => Mage::helper('paypalmx')->__('General: Recibir pagos de de tipo no perteneciente a la categoria T00xx'),\n 'T0001' => Mage::helper('paypalmx')->__('Pagos masivos'),\n 'T0002' => Mage::helper('paypalmx')->__('Pagos subscritos, tambien pagos enviados y recibidos'),\n 'T0003' => Mage::helper('paypalmx')->__('Pagos previamente aprovados (BillUser API), ya sean enviados o recividos'),\n 'T0004' => Mage::helper('paypalmx')->__('eBay Auction Payment'),\n 'T0005' => Mage::helper('paypalmx')->__('Pagos Directos del API'),\n 'T0006' => Mage::helper('paypalmx')->__('Express Checkout APIs'),\n 'T0007' => Mage::helper('paypalmx')->__('Pagos regulares de la tienda'),\n 'T0008' => Mage::helper('paypalmx')->__('Pagos de envio ya sea USPS o UPS'),\n 'T0009' => Mage::helper('paypalmx')->__('Pagos de certificados de regalo: compra de un certificado de regalo'),\n 'T0010' => Mage::helper('paypalmx')->__('Auction Payment other than through eBay'),\n 'T0011' => Mage::helper('paypalmx')->__('Pago echos desde un telefono (echos por via telefonica)'),\n 'T0012' => Mage::helper('paypalmx')->__('Pagos por terminal virtual'),\n 'T0100' => Mage::helper('paypalmx')->__('General: sin cuota de pago, no perteneciente a la categoria T01xx'),\n 'T0101' => Mage::helper('paypalmx')->__('Cuota: Web Site Payments Pro Account Monthly'),\n 'T0102' => Mage::helper('paypalmx')->__('Cuota: Retiro foraneo de ACH'),\n 'T0103' => Mage::helper('paypalmx')->__('Cuota: Retiro de WorldLink Check'),\n 'T0104' => Mage::helper('paypalmx')->__('Cuota: solicitud de pagos masivos'),\n 'T0200' => Mage::helper('paypalmx')->__('General de conversion de moneda'),\n 'T0201' => Mage::helper('paypalmx')->__('Conversion de moneda usado por el usuario'),\n 'T0202' => Mage::helper('paypalmx')->__('Conversion de moneda requerido para cubrir el balance negativo'),\n 'T0300' => Mage::helper('paypalmx')->__('Fundacion general de la cuenta PayPal'),\n 'T0301' => Mage::helper('paypalmx')->__('Ayudante del balance PayPal funcion de la cuenta PayPal'),\n 'T0302' => Mage::helper('paypalmx')->__('ACH Fundacion para recuperacion de fondos del balance de la cuenta.'),\n 'T0303' => Mage::helper('paypalmx')->__('Fundacion EFT (Banco aleman)'),\n 'T0400' => Mage::helper('paypalmx')->__('Retiro general de la cuenta de Paypal'),\n 'T0401' => Mage::helper('paypalmx')->__('Limpiado Automático'),\n 'T0500' => Mage::helper('paypalmx')->__('General: Uso de la cuenta Paypal para comprar asi como para recibir pagos'),\n 'T0501' => Mage::helper('paypalmx')->__('Transaccion de Paypal tarjeto de debito virtual'),\n 'T0502' => Mage::helper('paypalmx')->__('Retiros de la tarjeta de debito PayPal del cajero automatico'),\n 'T0503' => Mage::helper('paypalmx')->__('Tranascciones escodndidas de la tarjeta de debito Virtual de PayPal'),\n 'T0504' => Mage::helper('paypalmx')->__('Avanzado Tarjeta de debito de PayPal'),\n 'T0600' => Mage::helper('paypalmx')->__('General: retiro de la cuenta de PayPalt'),\n 'T0700' => Mage::helper('paypalmx')->__('General (Compras con una tarjeta de credito)'),\n 'T0701' => Mage::helper('paypalmx')->__('Balance Negativo'),\n 'T0800' => Mage::helper('paypalmx')->__('General: bonus del tipo no perteneciente a las otras T08xx categories'),\n 'T0801' => Mage::helper('paypalmx')->__('Tarjeta de debito regreso de dinero'),\n 'T0802' => Mage::helper('paypalmx')->__('Bonus a referencias del comerciante'),\n 'T0803' => Mage::helper('paypalmx')->__('Bonus del ayudante'),\n 'T0804' => Mage::helper('paypalmx')->__('Bonus del seguro al comprador PayPal'),\n 'T0805' => Mage::helper('paypalmx')->__('Bonus de proteccion de PayPal'),\n 'T0806' => Mage::helper('paypalmx')->__('Bonus por primer uso de ACH'),\n 'T0900' => Mage::helper('paypalmx')->__('Redención General'),\n 'T0901' => Mage::helper('paypalmx')->__('Certificado de regalo de Redención'),\n 'T0902' => Mage::helper('paypalmx')->__('Points Incentive Redemption'),\n 'T0903' => Mage::helper('paypalmx')->__('Cupon de Redención'),\n 'T0904' => Mage::helper('paypalmx')->__('Reward Voucher Redemption'),\n 'T1000' => Mage::helper('paypalmx')->__('General. Product no longer supported'),\n 'T1100' => Mage::helper('paypalmx')->__('General: reversal of a type not belonging to the other T11xx categories'),\n 'T1101' => Mage::helper('paypalmx')->__('ACH Withdrawal'),\n 'T1102' => Mage::helper('paypalmx')->__('Debit Card Transaction'),\n 'T1103' => Mage::helper('paypalmx')->__('Reversal of Points Usage'),\n 'T1104' => Mage::helper('paypalmx')->__('ACH Deposit (Reversal)'),\n 'T1105' => Mage::helper('paypalmx')->__('Reversal of General Account Hold'),\n 'T1106' => Mage::helper('paypalmx')->__('Account-to-Account Payment, initiated by PayPal'),\n 'T1107' => Mage::helper('paypalmx')->__('Payment Refund initiated by merchant'),\n 'T1108' => Mage::helper('paypalmx')->__('Fee Reversal'),\n 'T1110' => Mage::helper('paypalmx')->__('Hold for Dispute Investigation'),\n 'T1111' => Mage::helper('paypalmx')->__('Reversal of hold for Dispute Investigation'),\n 'T1200' => Mage::helper('paypalmx')->__('General: adjustment of a type not belonging to the other T12xx categories'),\n 'T1201' => Mage::helper('paypalmx')->__('Chargeback'),\n 'T1202' => Mage::helper('paypalmx')->__('Reversal'),\n 'T1203' => Mage::helper('paypalmx')->__('Charge-off'),\n 'T1204' => Mage::helper('paypalmx')->__('Incentive'),\n 'T1205' => Mage::helper('paypalmx')->__('Reimbursement of Chargeback'),\n 'T1300' => Mage::helper('paypalmx')->__('General (Authorization)'),\n 'T1301' => Mage::helper('paypalmx')->__('Reauthorization'),\n 'T1302' => Mage::helper('paypalmx')->__('Void'),\n 'T1400' => Mage::helper('paypalmx')->__('General (Dividend)'),\n 'T1500' => Mage::helper('paypalmx')->__('General: temporary hold of a type not belonging to the other T15xx categories'),\n 'T1501' => Mage::helper('paypalmx')->__('Open Authorization'),\n 'T1502' => Mage::helper('paypalmx')->__('ACH Deposit (Hold for Dispute or Other Investigation)'),\n 'T1503' => Mage::helper('paypalmx')->__('Available Balance'),\n 'T1600' => Mage::helper('paypalmx')->__('Funding'),\n 'T1700' => Mage::helper('paypalmx')->__('General: Withdrawal to Non-Bank Entity'),\n 'T1701' => Mage::helper('paypalmx')->__('WorldLink Withdrawal'),\n 'T1800' => Mage::helper('paypalmx')->__('Buyer Credit Payment'),\n 'T1900' => Mage::helper('paypalmx')->__('General Adjustment without businessrelated event'),\n 'T2000' => Mage::helper('paypalmx')->__('General (Funds Transfer from PayPal Account to Another)'),\n 'T2001' => Mage::helper('paypalmx')->__('Settlement Consolidation'),\n 'T9900' => Mage::helper('paypalmx')->__('General: event not yet categorized'),\n );\n asort(self::$_eventList);\n }\n }",
"public static function createEvent(array $data)\n {\n $event = new \\echolibre\\google_wave\\Model\\Event;\n \n $event->type = $data['type'];\n $event->timestamp = $data['timestamp'];\n $event->modifiedBy = $data['modifiedBy'];\n $event->properties = new \\stdClass();\n \n if (isset($data['properties'])) {\n $event->properties = $data['properties'];\n }\n \n return $event;\n }",
"public static function create_type() {\n\t\tregister_post_type(\n\t\t\tself::TYPE,\n\t\t\tarray(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name' => 'Events',\n\t\t\t\t\t'singular_name' => 'Event',\n\t\t\t\t\t'add_new_item' => 'Add new event',\n\t\t\t\t\t'not_found' => 'No events found',\n\t\t\t\t),\n\t\t\t\t'public' => true,\n\t\t\t\t'supports' => array( 'title' ),\n\t\t\t)\n\t\t);\n\t}",
"public function __construct()\n {\n parent::__construct('BaseEvent');\n }",
"public function __construct(ContractTypeRepository $contract_types)\n {\n $this->contract_types = $contract_types;\n }",
"public function __construct(?string $dateDeposit = null, ?string $depositCountry = null, ?string $depositZipCode = null, ?string $objectType = null, ?string $recipientCity = null, ?string $recipientCountry = null, ?string $recipientName = null, ?string $recipientRef = null, ?string $recipientZipCode = null, ?string $shipperCity = null, ?string $shipperRef = null, ?string $shipperZipCode = null, ?\\StructType\\Event $significantEvent = null, ?string $skybillNumber = null)\n {\n $this\n ->setDateDeposit($dateDeposit)\n ->setDepositCountry($depositCountry)\n ->setDepositZipCode($depositZipCode)\n ->setObjectType($objectType)\n ->setRecipientCity($recipientCity)\n ->setRecipientCountry($recipientCountry)\n ->setRecipientName($recipientName)\n ->setRecipientRef($recipientRef)\n ->setRecipientZipCode($recipientZipCode)\n ->setShipperCity($shipperCity)\n ->setShipperRef($shipperRef)\n ->setShipperZipCode($shipperZipCode)\n ->setSignificantEvent($significantEvent)\n ->setSkybillNumber($skybillNumber);\n }",
"function eventclass_payments()\n\t{\n\t\t$this->events[\"BeforeMoveNextList\"]=true;\n\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\t\t$this->events[\"AfterEdit\"]=true;\n\n\n//\tonscreen events\n\n\t}",
"public static function _register()\n {\n self::assignElements([\n 'Type' => ['type' => 'MarkUpMarkDownEventTypeCodeType', 'enum' => true, 'xmlns' => self::XMLNS],\n 'Time' => [],\n 'Reason' => []\n ], parent::NAME);\n\n self::assignAttributes([]);\n }",
"public function postCreatePayPeriod(){\n \n $pay_period = new TimeTrackingPayPeriod();\n $this->postPayPeriod($pay_period);\n \n }",
"public function add_booking_discount( $types ) {\n $types['booking_person'] = __( 'Booking Person Discount (Amount Off Per Person)', 'dokan' );\n\n return $types;\n }",
"public function __construct(BaseEvent $baseEvent)\n {\n $this->baseEvent = $baseEvent;\n }",
"final private static function makeEvent(Sincronizacao $sincronizacao)\n {\n $endpoint = self::getEventEndpoint($sincronizacao->sym_table, $sincronizacao->sym_action);\n\n $dependencies = self::getDependencies($sincronizacao);\n $eventClass = self::getEventClass($endpoint);\n\n return new $eventClass($dependencies['entry'], $dependencies['extra']);\n }",
"function __construct ($strId)\n\t\t{\n\t\t\tparent::__construct ('ServiceStateType');\n\t\t\t\n\t\t\t$strName = 'Unknown';\n\t\t\t\n\t\t\tswitch ($strId)\n\t\t\t{\n\t\t\t\tcase SERVICE_STATE_TYPE_ACT:\n\t\t\t\t\t$strName = 'Australian Capital Territory';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SERVICE_STATE_TYPE_NSW:\n\t\t\t\t\t$strName = 'New South Wales';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SERVICE_STATE_TYPE_NT:\n\t\t\t\t\t$strName = 'Northern Territory';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SERVICE_STATE_TYPE_QLD:\n\t\t\t\t\t$strName = 'Queensland';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SERVICE_STATE_TYPE_SA:\n\t\t\t\t\t$strName = 'South Australia';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SERVICE_STATE_TYPE_TAS:\n\t\t\t\t\t$strName = 'Tasmania';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SERVICE_STATE_TYPE_VIC:\n\t\t\t\t\t$strName = 'Victoria';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SERVICE_STATE_TYPE_WA:\n\t\t\t\t\t$strName = 'Western Australia';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$this->oblstrType\t\t= $this->Push (new dataString\t('Id',\t\t$strId));\n\t\t\t$this->oblstrName\t\t= $this->Push (new dataString\t('Name',\t$strName));\n\t\t}",
"public function __construct($eventType = null)\n {\n $this\n ->setEventType($eventType);\n }",
"public static function createFromXML(\\SimpleXMLElement $xml)\n {\n $event = new Event();\n\n // loop attributes\n foreach ($xml->attributes() as $attributeName => $value) {\n $method = 'set' . ucfirst($attributeName);\n\n switch ($attributeName) {\n case 'availablefrom':\n $method = 'setAvailableFrom';\n $value = new \\DateTime($value);\n break;\n case 'availableto':\n $method = 'setAvailableTo';\n $value = new \\DateTime($value);\n break;\n case 'creationdate':\n $method = 'setCreationDate';\n $value = new \\DateTime($value);\n break;\n case 'lastupdated':\n $method = 'setLastUpdated';\n $value = new \\DateTime($value);\n break;\n case 'pctcomplete':\n $method = 'setPercentageComplete';\n $value = (int) $value;\n break;\n case 'isparent':\n $method = 'setIsParent';\n $value = ((string) $value == 'true');\n break;\n case 'published':\n case 'private':\n $value = ((string) $value == 'true');\n break;\n default:\n $value = (string) $value;\n }\n\n if (!method_exists($event, $method)) {\n if (UitDatabank::DEBUG) {\n throw new Exception('Unknown attribute: ' . $attributeName);\n }\n } else {\n call_user_func(array($event, $method), $value);\n }\n }\n\n // loop elements\n foreach ($xml as $element) {\n $value = null;\n $elementName = $element->getName();\n $method = 'set' . ucfirst($element->getName());\n\n switch ($elementName) {\n case 'calendar':\n $value = Calendar::createFromXML($element);\n break;\n case 'categories':\n if (isset($element->category)) {\n foreach ($element->category as $category) {\n $event->addCategory(\n Category::createFromXML($category)\n );\n }\n }\n break;\n case 'contactinfo':\n $value = ContactInfo::createFromXML($element);\n break;\n case 'eventdetails':\n if (isset($element->eventdetail)) {\n foreach ($element->eventdetail as $eventDetail) {\n $event->addEventDetail(\n EventDetail::createFromXML($eventDetail)\n );\n }\n }\n break;\n case 'languages':\n if (isset($element->language)) {\n foreach ($element->language as $language) {\n $event->addLanguage(\n Language::createFromXML($language)\n );\n }\n }\n break;\n case 'location':\n $value = Location::createFromXML($element);\n break;\n case 'organiser':\n $value = Organiser::createFromXML($element);\n break;\n case 'agefrom':\n $value = (int) $value;\n break;\n case 'bookingperiod':\n $value = Period::createFromXML($element);\n break;\n default:\n $value = (string) $value;\n break;\n }\n\n if (!method_exists($event, $method)) {\n if (UitDatabank::DEBUG) {\n throw new Exception('Unknown element: ' . $elementName);\n }\n } else {\n if ($value !== null) {\n call_user_func(array($event, $method), $value);\n }\n }\n }\n\n return $event;\n }",
"public function definition()\n {\n $price = $this->faker->randomFloat(8, 0.25, 46743.27); //BTC on 2021.09.14\n $amount = $this->faker->randomNumber(8);\n $timestamp = $this->faker->dateTime()->getTimestamp();\n\n return [\n 'event_type' => 'trade',\n 'event_time' => $timestamp,\n 'symbol' => $this->faker->randomElement(['xrpusd', 'xlmusd', 'btcusd']),\n 'trade_id' => $this->faker->randomNumber(5),\n 'price' => $price,\n 'quantity' => $amount,\n 'buyer_order_id' => $this->faker->randomNumber(5),\n 'seller_order_id' => $this->faker->randomNumber(5),\n 'trade_time' => $timestamp,\n 'buyer_is_the_market_maker' => $this->faker->boolean(),\n 'ignore' => $this->faker->boolean(),\n ];\n }",
"public function __construct($_startDate = NULL,$_endDate = NULL)\r\n\t{\r\n\t\tPayPalWsdlClass::__construct(array('StartDate'=>$_startDate,'EndDate'=>$_endDate));\r\n\t}",
"public function create(array $attributes = [])\n {\n return IncomeTypes::create($attributes);\n }",
"function create_lds_event($indirec, $eventName, $eventABV, $eParent)\n\t{\n\t\t//throw new exception(\"create_lds_event - this function is not implemented\");\n\t}",
"public function __construct(RdtEvent $rdtEvent, RdtInvitation $rdtInvitation)\n {\n $this->rdtEvent = $rdtEvent;\n $this->rdtInvitation = $rdtInvitation;\n }",
"public function __construct($_transactionID,$_status = NULL)\r\n\t{\r\n\t\tPayPalWsdlClass::__construct(array('TransactionID'=>$_transactionID,'Status'=>$_status));\r\n\t}",
"public function __construct()\n {\n parent::__construct(new WalletType);\n }",
"public function createGtPayDriver()\n {\n return $this->repository(new GTPay($this->dataRepository, $this->config));\n }",
"#[Pure]\n public function __construct(EventBase $base, EventDnsBase $dns_base, string $address, int $port, ?EventSslContext $ctx = null) {}",
"function event($event=null) {\n switch ($event) { \n case 'payreturn': // Order was successful...\n\t $this->handle_Transaction('success');\n\t\t\t\t\t $this->savelog(\"PAYPAL PAYMENT:SUCCESS!!!\");\n\t break;\n case 'paycancel' : //$this->savelog(\"PAYPAL PAYMENT:CANCELED\");\t\n\t \t $this->handle_Transaction('cancel');\n\t\t\t\t\t $this->savelog(\"PAYPAL PAYMENT:CANCELED!!!\");\n\t break;\n case 'payipn' : // Paypal is calling page for IPN validation...\t\n $this->paypal_ipn();\n\t\t if ($status==true)\n \t $this->savelog(\"PAYPAL PAYMENT:IPN IN PROCEESS!!!\");\t\t\n\t\t else\n\t\t $this->savelog(\"PAYPAL PAYMENT:IPN STATUS ERROR!!!\");\t\t\t\n\t break;\n\t\t\t\t\t \n default : \n\t case 'stutpay':\n\t case 'process': $this->savelog(\"PAYPAL PAYMENT:INITIALIZE!!!\");\n\t \n\t $this->p->add_field('address_override', '1');\n $cust_data = GetGlobal('controller')->calldpc_method(\"stutasks.get_customer_details use \".$this->transaction); \t\t\t\t\t \n\t\t\t\t\t $this->p->add_field('address1', $cust_data[4]);\n\t\t\t\t\t $this->p->add_field('address2', $cust_data[5]);\n\t\t\t\t\t $this->p->add_field('city', $cust_data[2]);\n\t\t\t\t\t //$this->p->add_field('country', 'EUR'); //must be country code\n\t\t\t\t\t $this->p->add_field('first_name', $cust_data[0]);\n\t\t\t\t\t $this->p->add_field('last_name', $cust_data[1]);\n\t\t\t\t\t $this->p->add_field('zip', $cust_data[6]);\n\t\t\t\t\t \n\t\t\t\t\t $this->p->add_field('charset', $this->mycharset);//choose based on site lang\n\t\t\t\t\t \n\t $this->p->add_field('currency_code', 'EUR');\n\t\t\t\t\t $this->p->add_field('invoice', $this->transaction );\n\t \t \n $this->p->add_field('business', $this->paypal_mail);//'YOUR PAYPAL (OR SANDBOX) EMAIL ADDRESS HERE!');\n $this->p->add_field('return', $this->this_script.'?t=payreturn&type=invoice&key='.GetReq('key').'&tid='.$this->transaction); //back to invoice view\n $this->p->add_field('cancel_return', $this->this_script.'?t=paycancel&type=invoice&key='.GetReq('key').'&tid='.$this->transaction); //back to invoice view\n $this->p->add_field('notify_url', $this->this_script.'?t=payipn&type=invoice&key='.GetReq('key').'&tid='.$this->transaction);\n \n $name = GetGlobal('controller')->calldpc_method(\"stutasks.get_task_pay_title use \".$this->transaction); \t \n $this->p->add_field('item_name', $name);\n \n $price = GetGlobal('controller')->calldpc_method(\"stutasks.get_task_pay_amount use \".$this->transaction);\n $this->p->add_field('amount', $price); \t\t\t\t\t \n\t\t\t\t\t \n $itemqty = GetGlobal('controller')->calldpc_method(\"stutasks.get_task_pay_qty use \".$this->transaction);\n $this->p->add_field('quantity', $itemqty); \t\t\t\t\t \n\t\t\t\t\t \n\t if ($price>0) {\t\n $this->p->submit_paypal_post(); // submit the fields to paypal\n\t\t\t\t\t die();\n\t }\n\t\t\t\t\t break;\t\t \n\t }\n }",
"public function createEvent()\n {\n return new Event();\n }",
"public function test_constructor()\n {\n $this->assertInstanceOf(\\Praxigento\\Odoo\\Observer\\SalesOrderInvoicePay::class, $this->obj);\n }",
"public function __construct($type = null, $warrantCode = null, $debtorCode = null, $objectCode = null)\n {\n $this\n ->setType($type)\n ->setWarrantCode($warrantCode)\n ->setDebtorCode($debtorCode)\n ->setObjectCode($objectCode);\n }",
"public function __construct($_regType = NULL,$_regDt = NULL,$_dtType = NULL,$_postAddr = NULL,$_regStatusCode = NULL,$_registrationNum = NULL,$_message = NULL)\n {\n MicrobiltWsdlClass::__construct(array('RegType'=>$_regType,'RegDt'=>$_regDt,'DtType'=>$_dtType,'PostAddr'=>$_postAddr,'RegStatusCode'=>$_regStatusCode,'RegistrationNum'=>$_registrationNum,'Message'=>$_message),false);\n }",
"protected static function newFactory(): Factory\n {\n return BookingProductEventTicketFactory::new();\n }",
"public function __construct() {\n\n $this->tableName = \"re_event_type\";\n $this->setColumnsInfo(\"id\", \"int(11)\", 0);\n $this->setColumnsInfo(\"name\", \"varchar(250)\", \"\");\n $this->setColumnsInfo(\"id_space\", \"int(11)\", 0);\n $this->primaryKey = \"id\";\n }",
"public static function _register()\n {\n self::assignElements([\n 'Action' => ['type' => 'BidActionCodeType', 'enum' => true, 'xmlns' => self::XMLNS],\n 'Currency' => ['type' => 'CurrencyCodeType', 'enum' => true, 'xmlns' => self::XMLNS],\n 'ItemID' => ['type' => 'ItemIDType', 'xmlns' => self::XMLNS],\n 'MaxBid' => ['type' => 'AmountType', 'xmlns' => self::XMLNS],\n 'Discounts' => ['type' => 'OfferDiscountsType', 'xmlns' => self::XMLNS],\n 'Quantity' => ['type' => 'int'],\n 'SecondChanceEnabled' => ['type' => 'bool'],\n 'SiteCurrency' => ['type' => 'CurrencyCodeType', 'enum' => true, 'xmlns' => self::XMLNS],\n 'TimeBid' => [],\n 'HighestBid' => ['type' => 'AmountType', 'xmlns' => self::XMLNS],\n 'ConvertedPrice' => ['type' => 'AmountType', 'xmlns' => self::XMLNS],\n 'TransactionID' => [],\n 'User' => ['type' => 'UserType', 'xmlns' => self::XMLNS],\n 'UserConsent' => ['type' => 'bool'],\n 'BidCount' => ['type' => 'int'],\n 'Message' => [],\n 'BestOfferID' => ['type' => 'BestOfferIDType', 'xmlns' => self::XMLNS],\n 'MyMaxBid' => ['type' => 'AmountType', 'xmlns' => self::XMLNS]\n ], parent::NAME);\n\n self::assignAttributes([]);\n }",
"function ct_event() {\n\t\tglobal $Language;\n\n\t\t// C_EVENT_ID\n\t\t$this->C_EVENT_ID = new cField('t_event', 't_event', 'x_C_EVENT_ID', 'C_EVENT_ID', '`C_EVENT_ID`', 3, -1, FALSE, '`C_EVENT_ID`', FALSE);\n\t\t$this->C_EVENT_ID->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_EVENT_ID'] =& $this->C_EVENT_ID;\n\n\t\t// FK_CONGTY_ID\n\t\t$this->FK_CONGTY_ID = new cField('t_event', 't_event', 'x_FK_CONGTY_ID', 'FK_CONGTY_ID', '`FK_CONGTY_ID`', 3, -1, FALSE, '`FK_CONGTY_ID`', FALSE);\n\t\t$this->FK_CONGTY_ID->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['FK_CONGTY_ID'] =& $this->FK_CONGTY_ID;\n\n\t\t// C_EVENT_NAME\n\t\t$this->C_EVENT_NAME = new cField('t_event', 't_event', 'x_C_EVENT_NAME', 'C_EVENT_NAME', '`C_EVENT_NAME`', 201, -1, FALSE, '`C_EVENT_NAME`', FALSE);\n\t\t$this->fields['C_EVENT_NAME'] =& $this->C_EVENT_NAME;\n\n\t\t// C_TYPE_EVENT\n\t\t$this->C_TYPE_EVENT = new cField('t_event', 't_event', 'x_C_TYPE_EVENT', 'C_TYPE_EVENT', '`C_TYPE_EVENT`', 3, -1, FALSE, '`C_TYPE_EVENT`', FALSE);\n\t\t$this->C_TYPE_EVENT->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_TYPE_EVENT'] =& $this->C_TYPE_EVENT;\n\n\t\t// C_POST\n\t\t$this->C_POST = new cField('t_event', 't_event', 'x_C_POST', 'C_POST', '`C_POST`', 3, -1, FALSE, '`C_POST`', FALSE);\n\t\t$this->C_POST->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_POST'] =& $this->C_POST;\n\n\t\t// C_URL_IMAGES\n\t\t$this->C_URL_IMAGES = new cField('t_event', 't_event', 'x_C_URL_IMAGES', 'C_URL_IMAGES', '`C_URL_IMAGES`', 201, -1, FALSE, '`C_URL_IMAGES`', FALSE);\n\t\t$this->fields['C_URL_IMAGES'] =& $this->C_URL_IMAGES;\n\n\t\t// C_URL_LINK\n\t\t$this->C_URL_LINK = new cField('t_event', 't_event', 'x_C_URL_LINK', 'C_URL_LINK', '`C_URL_LINK`', 201, -1, FALSE, '`C_URL_LINK`', FALSE);\n\t\t$this->fields['C_URL_LINK'] =& $this->C_URL_LINK;\n\n\t\t// C_DATETIME_BEGIN\n\t\t$this->C_DATETIME_BEGIN = new cField('t_event', 't_event', 'x_C_DATETIME_BEGIN', 'C_DATETIME_BEGIN', '`C_DATETIME_BEGIN`', 135, 7, FALSE, '`C_DATETIME_BEGIN`', FALSE);\n\t\t$this->C_DATETIME_BEGIN->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_DATETIME_BEGIN'] =& $this->C_DATETIME_BEGIN;\n\n\t\t// C_DATETIME_END\n\t\t$this->C_DATETIME_END = new cField('t_event', 't_event', 'x_C_DATETIME_END', 'C_DATETIME_END', '`C_DATETIME_END`', 135, 7, FALSE, '`C_DATETIME_END`', FALSE);\n\t\t$this->C_DATETIME_END->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_DATETIME_END'] =& $this->C_DATETIME_END;\n\n\t\t// C_ODER\n\t\t$this->C_ODER = new cField('t_event', 't_event', 'x_C_ODER', 'C_ODER', '`C_ODER`', 135, 7, FALSE, '`C_ODER`', FALSE);\n\t\t$this->C_ODER->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_ODER'] =& $this->C_ODER;\n\n\t\t// C_NOTE\n\t\t$this->C_NOTE = new cField('t_event', 't_event', 'x_C_NOTE', 'C_NOTE', '`C_NOTE`', 201, -1, FALSE, '`C_NOTE`', FALSE);\n\t\t$this->fields['C_NOTE'] =& $this->C_NOTE;\n\n\t\t// C_USER_ADD\n\t\t$this->C_USER_ADD = new cField('t_event', 't_event', 'x_C_USER_ADD', 'C_USER_ADD', '`C_USER_ADD`', 3, -1, FALSE, '`C_USER_ADD`', FALSE);\n\t\t$this->C_USER_ADD->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_USER_ADD'] =& $this->C_USER_ADD;\n\n\t\t// C_ADD_TIME\n\t\t$this->C_ADD_TIME = new cField('t_event', 't_event', 'x_C_ADD_TIME', 'C_ADD_TIME', '`C_ADD_TIME`', 135, 7, FALSE, '`C_ADD_TIME`', FALSE);\n\t\t$this->C_ADD_TIME->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_ADD_TIME'] =& $this->C_ADD_TIME;\n\n\t\t// C_USER_EDIT\n\t\t$this->C_USER_EDIT = new cField('t_event', 't_event', 'x_C_USER_EDIT', 'C_USER_EDIT', '`C_USER_EDIT`', 3, -1, FALSE, '`C_USER_EDIT`', FALSE);\n\t\t$this->C_USER_EDIT->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_USER_EDIT'] =& $this->C_USER_EDIT;\n\n\t\t// C_EDIT_TIME\n\t\t$this->C_EDIT_TIME = new cField('t_event', 't_event', 'x_C_EDIT_TIME', 'C_EDIT_TIME', '`C_EDIT_TIME`', 135, 7, FALSE, '`C_EDIT_TIME`', FALSE);\n\t\t$this->C_EDIT_TIME->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_EDIT_TIME'] =& $this->C_EDIT_TIME;\n\n\t\t// C_ACTIVE_LEVELSITE\n\t\t$this->C_ACTIVE_LEVELSITE = new cField('t_event', 't_event', 'x_C_ACTIVE_LEVELSITE', 'C_ACTIVE_LEVELSITE', '`C_ACTIVE_LEVELSITE`', 3, -1, FALSE, '`C_ACTIVE_LEVELSITE`', FALSE);\n\t\t$this->C_ACTIVE_LEVELSITE->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_ACTIVE_LEVELSITE'] =& $this->C_ACTIVE_LEVELSITE;\n\n\t\t// C_TIME_ACTIVE\n\t\t$this->C_TIME_ACTIVE = new cField('t_event', 't_event', 'x_C_TIME_ACTIVE', 'C_TIME_ACTIVE', '`C_TIME_ACTIVE`', 135, 7, FALSE, '`C_TIME_ACTIVE`', FALSE);\n\t\t$this->C_TIME_ACTIVE->FldDefaultErrMsg = str_replace(\"%s\", \"/\", $Language->Phrase(\"IncorrectDateDMY\"));\n\t\t$this->fields['C_TIME_ACTIVE'] =& $this->C_TIME_ACTIVE;\n\n\t\t// C_SEND_MAIL\n\t\t$this->C_SEND_MAIL = new cField('t_event', 't_event', 'x_C_SEND_MAIL', 'C_SEND_MAIL', '`C_SEND_MAIL`', 3, -1, FALSE, '`C_SEND_MAIL`', FALSE);\n\t\t$this->C_SEND_MAIL->FldDefaultErrMsg = $Language->Phrase(\"IncorrectInteger\");\n\t\t$this->fields['C_SEND_MAIL'] =& $this->C_SEND_MAIL;\n\n\t\t// C_CONTENT_MAIL\n\t\t$this->C_CONTENT_MAIL = new cField('t_event', 't_event', 'x_C_CONTENT_MAIL', 'C_CONTENT_MAIL', '`C_CONTENT_MAIL`', 201, -1, FALSE, '`C_CONTENT_MAIL`', FALSE);\n\t\t$this->fields['C_CONTENT_MAIL'] =& $this->C_CONTENT_MAIL;\n\n\t\t// C_FK_BROWSE\n\t\t$this->C_FK_BROWSE = new cField('t_event', 't_event', 'x_C_FK_BROWSE', 'C_FK_BROWSE', '`C_FK_BROWSE`', 200, -1, FALSE, '`C_FK_BROWSE`', FALSE);\n\t\t$this->fields['C_FK_BROWSE'] =& $this->C_FK_BROWSE;\n\n\t\t// FK_ARRAY_TINBAI\n\t\t$this->FK_ARRAY_TINBAI = new cField('t_event', 't_event', 'x_FK_ARRAY_TINBAI', 'FK_ARRAY_TINBAI', '`FK_ARRAY_TINBAI`', 200, -1, FALSE, '`FK_ARRAY_TINBAI`', FALSE);\n\t\t$this->fields['FK_ARRAY_TINBAI'] =& $this->FK_ARRAY_TINBAI;\n\n\t\t// FK_ARRAY_CONGTY\n\t\t$this->FK_ARRAY_CONGTY = new cField('t_event', 't_event', 'x_FK_ARRAY_CONGTY', 'FK_ARRAY_CONGTY', '`FK_ARRAY_CONGTY`', 200, -1, FALSE, '`FK_ARRAY_CONGTY`', FALSE);\n\t\t$this->fields['FK_ARRAY_CONGTY'] =& $this->FK_ARRAY_CONGTY;\n\t}",
"public function __construct(EventBase $base, ?EventSslContext $ctx = null) {}",
"public function __construct($_statementDt = NULL,$_numberOfTransactions = NULL,$_numberOfNSFs = NULL,$_balanceAmt = NULL,$_verifiedDt = NULL,$_statementBalAmt = NULL)\n {\n MicrobiltCriminalReportWsdlClass::__construct(array('StatementDt'=>$_statementDt,'NumberOfTransactions'=>$_numberOfTransactions,'NumberOfNSFs'=>$_numberOfNSFs,'BalanceAmt'=>$_balanceAmt,'VerifiedDt'=>$_verifiedDt,'StatementBalAmt'=>$_statementBalAmt),false);\n }",
"public function createNewEvent($copyLastEvent = true, $data = array())\n\t{\n\t\t$event = new App_Model_Event();\n\n\t\t// pokud $copyLastEvent == true, vezmu data z minule udalosti a nastavim\n\t\t// je teto\n\t\tif ($copyLastEvent) {\n\t\t\t// TODO: vzit nastaveni posledni udalosti u teto akce\n\t\t}\n\n\t\t// pokud byla zaslana nejaka inicializacni data, nastavim je\n\t\tif (is_array($data) && count($data)) {\n\t\t\t$event->setPropsFromArray($data);\n\t\t}\n\n\t\t$event->setActionId($this->_actionId);\n\t\t$event->setEventNo(count($this->getAllEvents()) + 1);\n\n\t\t$event->insert();\n\n\t\t// vytvorim take prvni navrh terminu, pokud byl zaslan\n\t\tif (isset($data['dates']) && $data['dates'] != '') {\n\t\t\t$event->createNewProposal($data['dates']);\n\t\t}\n\n\t\treturn $event;\n\t}",
"public function create($type, $packetid, $attributes)\n {\n MQF_Log::log('create packet of type '.$type);\n\n if (!is_array($attributes)) {\n throw new InvalidArgumentException('$attributes must be an array');\n }\n\n $this->type = $type;\n\n // set packet id\n $this->packetid = $packetid;\n\n // add root element\n $root_element = $this->xmldoc->createElement($type);\n\n $root_element->setAttribute('ActionId', $this->packetid);\n\n foreach ($attributes as $name => $value) {\n $root_element->setAttribute($name, $value);\n }\n\n $this->xmldoc->appendChild($root_element);\n }",
"public function __construct($students, $payment, $event)\n {\n $this->students = $students;\n $this->payment = $payment;\n $this->event = $event;\n }",
"public static function from_array($clsname, $d)\r\n {\r\n $newdict = array();\r\n\r\n foreach ($d as $key => $val)\r\n {\r\n if (PiplApi_Utils::piplapi_string_startswith($key, '@'))\r\n {\r\n $key = substr($key, 1);\r\n }\r\n\r\n if ($key == 'last_seen')\r\n {\r\n $val = PiplApi_Utils::piplapi_str_to_datetime($val);\r\n }\r\n\r\n if ($key == 'valid_since')\r\n {\r\n $val = PiplApi_Utils::piplapi_str_to_datetime($val);\r\n }\r\n\r\n if ($key == 'date_range')\r\n {\r\n // PiplApi_DateRange has its own from_array implementation\r\n $val = PiplApi_DateRange::from_array($val);\r\n }\r\n\r\n $newdict[$key] = $val;\r\n }\r\n\r\n return new $clsname($newdict);\r\n }",
"public function testCreatePayrun()\n {\n }",
"public function run()\n {\n LeaveType::create([\n 'type' => 'annual',\n 'days' => 5,\n ]);\n LeaveType::create([\n 'type' => 'personal',\n 'days' => 5,\n ]);\n LeaveType::create([\n 'type' => 'without pay',\n 'days' => 5,\n ]);\n LeaveType::create([\n 'type' => 'long service',\n 'days' => 5,\n ]);\n }",
"function Default_Banking_DTA($type)\n {\n $this->Default_Banking_DTABase();\n $this->type = $type;\n\n $this->sum_bankcodes = 0;\n $this->sum_accounts = 0;\n }",
"public function __construct(RcpDropTrade $dt)\n {\n $this->dt = $dt;\n }",
"function __construct( $data = false ){\n\t\tif( is_object($data) && get_class($data) == \"EM_Event\" ){ //Creates a blank bookings object if needed\n\t\t\t$this->event_id = $data->event_id;\n\t\t}elseif( is_array($data) ){\n\t\t\tforeach( $data as $EM_Booking ){\n\t\t\t\tif( get_class($EM_Booking) == 'EM_Booking'){\n\t\t\t\t\t$this->bookings[] = $EM_Booking;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected function _Build_Event($context) {\r\n $form_instance = $this->form_instance;\r\n // Retrieve the event class item\r\n $class = $context['class'];\r\n // Generate a new event class\r\n $event_instance = new $class();\r\n // Populate with the form instance\r\n $event_instance->form_instance = $form_instance;\r\n // Populate with the form instance\r\n $event_instance->type = $context['type'];\r\n // Populate with the form instance\r\n $event_instance->title = $context['title'];\r\n // Populate with the event context\r\n $event_instance->context = $context;\r\n // If the field has a sanitize method\r\n if (method_exists($event_instance,'On_Create')) { $event_instance->On_Create(); }\r\n // Fire any on create action\r\n $event_instance->Do_Action('create');\r\n // Do a wordpress hook\r\n do_action('vcff_event_create',$event_instance);\r\n // Fire any on create action\r\n $event_instance->Do_Action('after_create');\r\n // Do a wordpress hook\r\n do_action('vcff_trigger_after_create',$event_instance);\r\n // Return the event instance\r\n return $event_instance;\r\n }",
"public function createEvent(string $name): Event\n {\n if (!$this->isEventIDValid($name)) {\n throw new RuntimeException('invalid event name: ' . $name);\n }\n\n $class = $this->validEventIDs[$name];\n /** @var \\CaptainHook\\App\\Event $event */\n $event = new $class($this->io, $this->config, $this->repository);\n return $event;\n }",
"public function __construct(array $event = array())\n {\n $this\n ->setEvent($event);\n }",
"public function testCreatePayrollCalendar()\n {\n }",
"function getType ()\n\t\t{\n\t\t\treturn \"Event\";\n\t\t}",
"public function setEventTypes($event_types)\n {\n $this->event_types = $event_types;\n return $this;\n }",
"public function getClasses() {\n if(!property_exists($this->data, 'classes')) $this->loadClasses();\n require_once(\"Event.php\");\n $classes = array();\n foreach($this->data->classes as $class) {\n $class->type = \"LESSON\";\n $class->period = $class->classPeriod;\n unset($class->classPeriod);\n $classes[] = new Event($this->fenixEdu, $class);\n }\n return $classes;\n }",
"public function __construct(array $attributes = [])\n {\n $this->payment_type = Contract::PAYMENT_TYPE_ENTIRELY;\n\n parent::__construct($attributes);\n }",
"public function testConstruct() {\n\n // Set a Delivery report callback mock.\n $deliveryReportCallback = new DeliveryReportCallback();\n\n $obj = new DeliveryReportCallbackEvent($deliveryReportCallback);\n\n $this->assertEquals(WBWSMSModeEvents::DELIVERY_REPORT_CALLBACK, $obj->getEventName());\n\n $this->assertSame($deliveryReportCallback, $obj->getDeliveryReportCallback());\n }",
"public function run()\n {\n EventPackage::Create([\n 'event_package_description' => 'Conference Fee',\n 'amount' \t=> 20000,\n 'event_id' => '1'\n ]);\n\n EventPackage::Create([\n 'event_package_description' => 'Exhibition Fee',\n 'amount' \t=> 100000,\n 'event_id' => '1'\n ]);\n\n EventPackage::Create([\n 'event_package_description' => 'Membership Fee',\n 'amount' \t=> 10000,\n 'event_id' => '1'\n ]);\n }",
"public function __construct(Payout $payout)\n {\n $this->payout = $payout;\n }",
"function hook_commerce_adyen_payment_types() {\n $types = [];\n\n $types['openinvoice'] = [\n 'label' => 'OpenInvoice',\n 'controllers' => [\n 'payment' => \\Commerce\\Adyen\\Payment\\OpenInvoice\\PaymentController::class,\n 'checkout' => \\Commerce\\Adyen\\Payment\\OpenInvoice\\CheckoutController::class,\n ],\n ];\n\n return $types;\n}",
"public function run()\n\t{\n\t\tContractType::create([\n\t\t\t'key' => 'monthly',\n\t\t\t'description' => 'Mensual']);\n\n\t\tContractType::create([\n\t\t\t'key' => 'biannual',\n\t\t\t'description' => 'Semestral']);\n\t\t\n\t\tContractType::create([\n\t\t\t'key' => 'annual',\n\t\t\t'description' => 'Anual']);\n\t}",
"public function createSimplePayDriver()\n {\n return $this->repository(new SimplePay($this->dataRepository, $this->config));\n }",
"public function insert_bookable_product_type( $types ) {\n $types['booking'] = __( 'Bookable Product', 'dokan' );\n\n return $types;\n }",
"private function createMyEvents()\n {\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Frontend_Checkout',\n 'onPostDispatchCheckoutSecure'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_Checkout_PreRedirect',\n 'onPreRedirectToPayPal'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PreDispatch_Frontend_PaymentPaypal',\n 'onPreDispatchPaymentPaypal'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_PaymentPaypal_Webhook',\n 'onPaymentPaypalWebhook'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_PaymentPaypal_PlusRedirect',\n 'onPaymentPaypalPlusRedirect'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Frontend_Account',\n 'onPostDispatchAccount'\n );\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Javascript',\n 'onCollectJavascript'\n );\n $this->subscribeEvent(\n 'Shopware_Components_Document::assignValues::after',\n 'onBeforeRenderDocument'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Backend_Config',\n 'onPostDispatchConfig'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Backend_Order',\n 'onPostDispatchOrder'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Backend_PaymentPaypal',\n 'onPostDispatchPaymentPaypal'\n );\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Less',\n 'addLessFiles'\n );\n $this->subscribeEvent(\n 'Enlight_Bootstrap_InitResource_paypal_plus.rest_client',\n 'onInitRestClient'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Dispatcher_ControllerPath_Api_PaypalPaymentInstruction',\n 'onGetPaymentInstructionsApiController'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Front_StartDispatch',\n 'onEnlightControllerFrontStartDispatch'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PreDispatch',\n 'onPreDispatchSecure'\n );\n }",
"public static function init(): self\n {\n return new self(new LoyaltyEventAccumulatePoints());\n }",
"function __construct($sdb_domain_type_list = null) {\n\n\t\t\t// i like putting this in _SERVER as it can be executed with 'env AWS_REGION=XXX'\n\t\t\t// when we go to mongrel2 we might need to change this\n\t\t\tif(!array_key_exists('AWS_REGION', $_SERVER)) {\n\t\t\t\t$_SERVER['AWS_REGION']\t= \"DEFAULT_URL\";\n\t\t\t}\n\n\t\t\t$this->sdb\t\t= new AmazonSDB();\n\t\t\t$this->sdb_r\t= new ReflectionClass($this->sdb);\n\t\t\t$aws_constants\t= ($this->sdb_r->getConstants());\n\t\t\t$aws_region\t\t= $aws_constants[$_SERVER['AWS_REGION']];\n\t\t\t$this->sdb->set_region($aws_region);\n\n\t\t\tif($sdb_domain_type_list === null) {\n\t\t\t\tfile_put_contents(\"php://stderr\", \"\\033[0;33mInitialising \" . __CLASS__ . \" with no SDB types, as SDB tool only.\\033[m\\n\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->fh\t\t= array();\n\n\t\t\tforeach($sdb_domain_type_list as $sdb_domain_type) {\n\t\t\t\t$label\t= \"NUMBER_AWS_DOMAINS_\" . strtoupper($sdb_domain_type);\n\t\t\t\t// let's have at least one domain per type we want to store\n\t\t\t\tif(!defined($label)) { define($label, 1); }\n\t\t\t\t// add hasher for this type\n\t\t\t\tif(!array_key_exists($sdb_domain_type, $this->fh)) {\n\t\t\t\t\t$this->fh[$sdb_domain_type] = new Flexihash();\n\t\t\t\t}\n\t\t\t\t// add targets for this type's hasher\n\t\t\t\tforeach(SDBTool::create_padded_domain_names($sdb_domain_type, constant($label)) as $target_domain) {\n\t\t\t\t\t$this->fh[$sdb_domain_type]->addTarget($target_domain);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}",
"protected function __construct()\n {\n parent::__construct(\n 'Event',\n array(\n TextField::create(\n 'title',\n array(\n 'mandatory' => true,\n )\n ),\n TextareaField::create(\n 'description',\n array(\n 'use_markdown' => true,\n )\n ),\n TextField::create(\n 'date',\n array()\n ),\n ReferenceField::create(\n 'guest_lists',\n array(\n 'references' => array(\n array(\n 'module' => '\\\\Honeybee\\\\Domain\\\\Guestlist\\\\GuestlistModule',\n 'identity_field' => 'identifier',\n 'display_field' => 'title',\n ),\n ),\n )\n ),\n ReferenceField::create(\n 'assignee',\n array(\n 'max' => 1,\n 'references' => array(\n array(\n 'module' => '\\\\Honeybee\\\\Domain\\\\User\\\\UserModule',\n 'identity_field' => 'identifier',\n 'display_field' => 'username',\n ),\n ),\n )\n ),\n KeyValueField::create(\n 'meta',\n array(\n 'constraints' => array(\n 'value_type' => 'dynamic',\n ),\n )\n ),\n AggregateField::create(\n 'workflowTicket',\n array(\n 'modules' => array(\n '\\\\Honeybee\\\\Domain\\\\Event\\\\WorkflowTicketModule',\n ),\n )\n ),\n ),\n array(\n 'prefix' => 'event',\n 'identifier_field' => 'identifier',\n 'slugPattern' => 'event-{shortId}',\n )\n );\n }",
"function __construct ()\n\t\t{\n\t\t\tparent::__construct ('Payments', 'Payment', 'Payment');\n\t\t\t$this->Order ('PaidOn', FALSE);\n\t\t}",
"protected function __construct(SchedulizerEvent $eventObj, array $settings){\n $this->eventObj = $eventObj;\n $this->settings = $settings;\n }",
"public static function create(Client $client, $data) {\n if ($data == null || is_array($data)) {\n $d = new Event($data == null ? array() : $data);\n $data = $d->jsonSerialize();\n }\n $req = $client->newRequest(\"POST\", \"/{accountname}/events\");\n $req->setBody($data, \"json\");\n\n $result = $req->run(\"json\");\n return Event::fromJson($result);\n }",
"public function __construct() {\r\n\t\t\r\n\t\t$this->taxonomy = 'tribe_events_cat';\r\n\t\tif ( class_exists( 'Tribe__Events__Main' ) ) {\r\n\t\t\t$this->event_posttype = Tribe__Events__Main::POSTTYPE;\r\n\t\t}else{\r\n\t\t\t$this->event_posttype = 'tribe_events';\r\n\t\t}\r\n\r\n\t\tif ( class_exists( 'Tribe__Events__Organizer' ) ) {\r\n\t\t\t$this->oraganizer_posttype = Tribe__Events__Organizer::POSTTYPE;\r\n\t\t}else{\r\n\t\t\t$this->oraganizer_posttype = 'tribe_organizer';\r\n\t\t}\r\n\r\n\t\tif ( class_exists( 'Tribe__Events__Venue' ) ) {\r\n\t\t\t$this->venue_posttype = Tribe__Events__Venue::POSTTYPE;\r\n\t\t}else{\r\n\t\t\t$this->venue_posttype = 'tribe_venue';\r\n\t\t}\r\n\r\n\t}",
"private function create()\n {\n $events = [\n Webhook::EVENT_CONVERSATION_CREATED,\n Webhook::EVENT_CONVERSATION_UPDATED,\n Webhook::EVENT_MESSAGE_CREATED,\n Webhook::EVENT_MESSAGE_UPDATED,\n ];\n\n $chosenEvents = $this->choice(\n 'What kind of event you want to create',\n $events,\n $defaultIndex = null,\n $maxAttempts = null,\n $allowMultipleSelections = true\n );\n\n $webhookUrl = $this->ask('Please enter the webhook URL'); \n\n $webhook = new Webhook();\n $webhook->events = $chosenEvents;\n $webhook->channelId = $this->whatsAppChannelId;\n $webhook->url = $webhookUrl;\n\n try {\n $response = $this->messageBirdClient->conversationWebhooks->create($webhook);\n } catch (\\Exception $e) {\n $this->error($e->getMessage());\n }\n }",
"public function __construct(Transaction $transaction)\n {\n $this->transaction = $transaction;\n SiteEvent::insert([\n 'event_type' => substr(strrchr(__CLASS__, \"\\\\\"), 1),\n 'event_id' => $transaction->id,\n 'by_user' => $transaction->user_id\n ]);\n }",
"public function __construct(\\WorkdayWsdl\\\\StructType\\Unique_IdentifierObjectType $employee_Probation_Period_Event_Reference = null, \\WorkdayWsdl\\\\StructType\\Employee_Probation_PeriodObjectType $employee_Probation_Period_Reference = null, $effective_Date = null, $start_Date = null, $end_Date = null, \\WorkdayWsdl\\\\StructType\\Employee_Probation_Period_TypeObjectType $probation_Type_Reference = null, \\WorkdayWsdl\\\\StructType\\Employee_Probation_Period_ReasonObjectType $probation_Reason_Reference = null, $extended_End_Date = null, $note = null)\n {\n $this\n ->setEmployee_Probation_Period_Event_Reference($employee_Probation_Period_Event_Reference)\n ->setEmployee_Probation_Period_Reference($employee_Probation_Period_Reference)\n ->setEffective_Date($effective_Date)\n ->setStart_Date($start_Date)\n ->setEnd_Date($end_Date)\n ->setProbation_Type_Reference($probation_Type_Reference)\n ->setProbation_Reason_Reference($probation_Reason_Reference)\n ->setExtended_End_Date($extended_End_Date)\n ->setNote($note);\n }",
"public static function createEdgeType(array $config)\n {\n }",
"public function __construct(array $servicesConfig)\n {\n foreach ($servicesConfig as $serviceName => $serviceInfo) {\n if (!is_string($serviceName) || empty($serviceName)) {\n throw new \\InvalidArgumentException('Name for a currency import service has to be specified.');\n }\n if (empty($serviceInfo['class'])) {\n throw new \\InvalidArgumentException('Class for a currency import service has to be specified.');\n }\n if (empty($serviceInfo['label'])) {\n throw new \\InvalidArgumentException('Label for a currency import service has to be specified.');\n }\n }\n $this->_servicesConfig = $servicesConfig;\n }",
"public function __construct() {\n $this->getDateBought(new \\DateTime());\n }",
"public static function sprintPayTypes()\n {\n return self::$sprintPayTypes;\n }",
"protected function __construct($type, $config) {\n parent::__construct($type, $config);\n $this->class = Source::CLASS_DATA;\n\n $this->satisfies = val('satisfies', $config);\n $this->frequency = 30;\n }",
"function generate_event($payload, $timestamp, $event_type, $connection) {\n $event_id = generateEventIdentifier(40);\n $payload_string = json_encode($payload);\n $sql = \"INSERT INTO agreement_events (event_id, event_type, event_payload, timestamp, target_agreement) VALUES ('$event_id', '$event_type', '$payload_string', $timestamp, '$payload->agreement_id')\";\n $connection->query($sql);\n http_response($event_type);\n}",
"public function __construct($buyOrder)\n {\n $this->venta_id = $buyOrder;\n }",
"public function _construct()\n {\n $this->_init('wsu_taxtra/taxtrareports');\n }",
"public function __construct($_birthDt = NULL,$_dwellingStructureType = NULL,$_score = NULL)\n {\n MicrobiltCriminalReportWsdlClass::__construct(array('BirthDt'=>$_birthDt,'DwellingStructureType'=>$_dwellingStructureType,'Score'=>$_score),false);\n }",
"public function __construct(array $attributes = [])\n {\n parent::__construct($attributes);\n\n $this->setTable(config('helpdesk.tables.due_dates'));\n }",
"public function unsetEventTypes(): void\n {\n $this->eventTypes = [];\n }",
"function __construct()\n\t{\n\t\t$this->events[\"BeforeShowList\"]=true;\n\n\t\t$this->events[\"BeforeProcessList\"]=true;\n\n\t\t$this->events[\"BeforeProcessPrint\"]=true;\n\n\t\t$this->events[\"BeforeShowPrint\"]=true;\n\n\t\t$this->events[\"BeforeQueryList\"]=true;\n\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"BeforeProcessEdit\"]=true;\n\n\t\t$this->events[\"BeforeEdit\"]=true;\n\n\t\t$this->events[\"BeforeShowEdit\"]=true;\n\n\t\t$this->events[\"BeforeProcessView\"]=true;\n\n\t\t$this->events[\"BeforeShowView\"]=true;\n\n\n\n\n\t\t$this->events[\"ProcessValuesView\"]=true;\n\n\t\t$this->events[\"ProcessValuesEdit\"]=true;\n\n\t\t$this->events[\"CustomAdd\"]=true;\n\n\t\t$this->events[\"CustomEdit\"]=true;\n\n\t\t$this->events[\"ProcessValuesAdd\"]=true;\n\n\t\t$this->events[\"BeforeQueryEdit\"]=true;\n\n\t\t$this->events[\"BeforeQueryView\"]=true;\n\n\n\t\t$this->events[\"BeforeProcessAdd\"]=true;\n\n\n//\tonscreen events\n\t\t$this->events[\"calmonthly_snippet2\"] = true;\n\t\t$this->events[\"calmonthly_snippet1\"] = true;\n\t\t$this->events[\"Monthly_Next_Prev\"] = true;\n\n\t}",
"public static function create_paypal_button() {\r\n\t\trequire_once(\"class-tpg-pp-donate-button.php\");\r\n\t\t$obj = new tpg_pp_donate_button();\r\n\t\treturn $obj;\r\n\t}",
"function create_event($personrec, $event, $eventRec,$done=1) {\n\t\tglobal $factarray;\n\t\t\t$eventID = $this->generateHandle();\n\t\t\t$eventHandle = $eventID;\n\t\t\t$egEvent = $this->dom->createElement(\"event\");\n\t\t\t$eType = $this->dom->createElement(\"type\");\n\t\t\t$eTypeText = $this->dom->createTextNode($event);\n\t\t\t$eTypeText = $eType->appendChild($eTypeText);\n\t\t\t$egEvent->appendChild($eType);//$factarray[$event])\n\t\t//\t$egEvent->setAttribute(\"type\", $factarray[$event]);\n\t\t$egEvent->setAttribute(\"id\", $eventID);\n\t\t$egEvent->setAttribute(\"handle\", $eventHandle);\n\t\t$egEvent->setAttribute(\"change\", time());\n\n\t\t\tif (($dateRec = get_sub_record(1, \"2 DATE\", $eventRec)) != null) {\n\t\t\t\t$this->create_date($egEvent, $dateRec, 2);\n\t\t\t}\n\n\t\t\tif (($place = get_gedcom_value($event . \":PLAC\", 1, $personrec)) != null) {\n\t\t\t\t$hlink = $this->query_dom(\"./places/placeobj[@title=\\\"\".preg_replace(\"~\\\"~\", '"', $place).\"\\\"]/@handle\");\n\t\t\t\tif ($hlink == null) {\n\t\t\t\t\t$hlink = $this->generateHandle();\n\t\t\t\t\t$this->create_placeobj($place, $hlink);\n\t\t\t\t\t$this->create_place($egEvent, $hlink);\n\t\t\t\t} else {\n\t\t\t\t\t$this->create_place($egEvent, $hlink);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (($cause = get_gedcom_value($event . \":CAUS\", 1, $personrec)) != null) {\n\t\t\t\t$eCause = $this->dom->createElement(\"cause\");\n\t\t\t\t$etCause = $this->dom->createTextNode($cause);\n\t\t\t\t$etCause = $eCause->appendChild($etCause);\n\t\t\t\t$eCause = $egEvent->appendChild($eCause);\n\t\t\t}\n\n\t\t\tif (($description = get_gedcom_value($event . \":TYPE\", 1, $personrec)) != null) {\n\t\t\t\t$eDescription = $this->dom->createElement(\"description\");\n\t\t\t\t$etDescription = $this->dom->createTextNode($description);\n\t\t\t\t$etDescription = $eDescription->appendChild($etDescription);\n\t\t\t\t$eDescription = $egEvent->appendChild($eDescription);\n\t\t\t}\n\n\t\t\tif (($note = get_sub_record(1, \"2 NOTE\", $eventRec)) != null) {\n\t\t\t\t$this->create_note($egEvent, $note, 2);\n\t\t\t}\n\n\t\t\t$num = 1;\n\t\t\twhile (($sourcerefRec = get_sub_record(2, \"2 SOUR\", $personrec, $num)) != null) {\n\t\t\t\t$this->create_sourceref($egEvent, $sourcerefRec, 2);\n\t\t\t\t$num++;\n\t\t\t}\n\t\t\t$num = 1;\n\t\t\twhile (($namegSource = get_sub_record(1, \"1 OBJE\", $personrec, $num)) != null) {\n\n\t\t\t\t$this->create_mediaref($egEvent, $namegSource, 1,$done);\n\n\t\t\t\t$num++;\n\t\t\t}\n\t\t\t$egEvent = $this->egEvents->appendChild($egEvent);\n\t\t\treturn $eventID;\n\n\t}",
"final protected function addEvent($payload)\n\t\t{\n\n\t\t\tglobal $time_event__duplication, $form_fill_required_vals;\n\t\t\tglobal $time_addEvent__success, $time_addEvent__failure;\n\n\t\t\tif(in_array(null, array_values($payload)))\n\t\t\t\treturn $this->addFrontendError($form_fill_required_vals[$GLOBALS['lang']]);\n\n\t\t\t# Compensation for label of select as first item\n\t\t\tif($payload['type'] !== 0) $payload['type'] -= 1;\n\t\t\telse return $this->addFrontendError($form_fill_required_vals[$GLOBALS['lang']]);\n\n\t\t\t# Get Type\n\t\t\t$type = array(\n\t\t\t\t\"id\" => $payload['type'],\n\t\t\t\t\"name\" => $payload['type'] === 3 ? \"fragranceCollective_spray\" : static::EVENT_TYPES[$payload['type']]\n\t\t\t);\n\n\t\t\t# Ensure DB conn has been established\n\t\t\t$this->init();\n\n\t\t\t# Check unit duplication\n\t\t\t$occurences = $this->db->selectValue(\n\t\t\t\t'SELECT COUNT(*) FROM mod_time WHERE event_name = ?', [$payload['name']]\n\t\t\t);\n\n\t\t\tif($occurences >= 1)\n\t\t\t\treturn $this->addFrontendError($time_event__duplication[$GLOBALS['lang']]);\n\n\t\t\t# Call Model\n\t\t\t$action = $this->callModelFunc(\"mod\", \"saveDataForSpecificModule\", static::ACTIVE_MOD, array(\n\t\t\t\t\"event_name\" => $payload['name'],\n\t\t\t\t\"event_type\" => $type['id'],\n\t\t\t\t\"event_targetUnits\" => $payload['units_csv'],\n\t\t\t\t\"event_loop\" => $payload['loop'] === \"on\" ? true : false,\n\t\t\t\t\"event_plannedExecution_time\" => $payload['time'],\n\t\t\t\t\"event_plannedExecution_date\" => dateToDBDate($payload['date']),\n\t\t\t\t\"event_executedAt\" => null\n\t\t\t));\n\n\t\t\t# End with status report\n\t\t\tif($action) $this->addFrontendMessage($time_addEvent__success[$GLOBALS['lang']]);\n\t\t\telse $this->addFrontendError($time_addEvent__failure[$GLOBALS['lang']]);\n\n\t\t\t$this->startListeningForEvents();\n\n\t\t\t$this->refresh();\n\n\t\t}",
"public function __construct($name, array $config = [])\n\t{\n\t\tif (empty($name)) {\n\t\t\tthrow new WorkflowException('Failed to create event instance : missing $name value');\n\t\t} else {\n\t\t\t$this->name = $name;\n\t\t}\n\t\tif ( isset($config['start'])) {\n\t\t\t$this->_start = $config['start'];\n\t\t\tunset($config['start']);\n\t\t}\n\t\tif ( isset($config['end'])) {\n\t\t\t$this->_end = $config['end'];\n\t\t\tunset($config['end']);\n\t\t}\n\t\tif ( isset($config['transition'])) {\n\t\t\t$this->_transition = $config['transition'];\n\t\t\tunset($config['transition']);\n\t\t}\n\t\tunset($config['name']);\n\t\tparent::__construct($config);\n\t}",
"public function initialize()\n {\n // attributes\n $this->setName('event');\n $this->setPhpName('Event');\n $this->setClassname('ArtRequestORM\\\\Event');\n $this->setPackage('ArtRequest');\n $this->setUseIdGenerator(true);\n // columns\n $this->addPrimaryKey('EVENT_ID', 'EventId', 'INTEGER', true, null, null);\n $this->addColumn('EVENT_TITLE', 'EventTitle', 'VARCHAR', true, 100, null);\n $this->addColumn('EVENT_DESCRIPTION', 'EventDescription', 'LONGVARCHAR', true, null, null);\n $this->addColumn('EVENT_LOCATION', 'EventLocation', 'VARCHAR', true, 100, null);\n $this->addColumn('EVENT_SPONSOR_NAME', 'EventSponsorName', 'VARCHAR', true, 100, null);\n $this->addColumn('EVENT_START_TIME', 'EventStartTime', 'VARCHAR', true, 10, null);\n $this->addColumn('EVENT_END_TIME', 'EventEndTime', 'VARCHAR', true, 10, null);\n $this->addColumn('EVENT_START_DATE', 'EventStartDate', 'DATE', true, null, null);\n $this->addColumn('EVENT_END_DATE', 'EventEndDate', 'DATE', true, null, null);\n $this->addColumn('EVENT_PRICING_MEMBER', 'EventPricingMember', 'DECIMAL', true, null, null);\n $this->addColumn('EVENT_PRICING_STAFF', 'EventPricingStaff', 'DECIMAL', true, null, null);\n $this->addColumn('EVENT_PRICING_STUDENT', 'EventPricingStudent', 'DECIMAL', true, null, null);\n $this->addColumn('EVENT_PRICING_PUBLIC', 'EventPricingPublic', 'DECIMAL', true, null, null);\n // validators\n }",
"public function __construct(EventPostEntity $event, $amount = 0)\n {\n $this->event = $event;\n\n $this->amount = $amount;\n }",
"public function __construct(?EventConfig $cfg = null) {}",
"public function get_event_types()\n {\n return array(0 => 'miscellaneous', 1 => 'appointment', 2 => 'holiday'\n ,3 => 'birthday', 4 => 'personal', 5 => 'education'\n ,6 => 'travel', 7 => 'anniversary', 8 => 'not in office'\n ,9 => 'sick day', 10 => 'meeting', 11 => 'vacation'\n ,12 => 'phone call', 13 => 'business'\n ,14 => 'non-working hours', 50 => 'special occasion'\n );\n }",
"public function addBooking()\n\t{\n\n\t\t$currentTime = Date::current('Y-m-d H:i:s');\n\t\t$logEventFile = $this->workspace().$this->eventName.'.csv';\t\t\n\t\tIF ( !file_exists($logEventFile) ) {\n\t\t\t$fileHeader = array('EventName','BookerName','BookerEmail','BookerPhone','Tickets','PickupPoint',\n\t\t\t\t\t\t\t\t'PayMethod','OtherNames','SitNear','SpecialNeeds','TimeBooked');\n\t\t\t$csvLine = fopen($logEventFile, \"a\");\n\t\t\tfputcsv($csvLine, $fileHeader);\n\t\t\tfclose($csvLine);\t\t\n\t\t}\n\n\t\t$booking = array($this->eventName,$this->senderName,$this->senderEmail,$this->senderPhone,$this->numberOfTickets,$this->pickupPoint\n\t\t\t\t\t\t,$this->paymentOption,$this->otherPartyNames,$this->sittingNear,$this->specialNeeds,$currentTime );\n\n\t\t$csvLine = fopen($logEventFile, \"a\");\n\t\tfputcsv($csvLine, $booking );\n\t\tfclose($csvLine);\n\n\t}",
"public function __construct() {\n $this->Types;\n }"
] | [
"0.50240695",
"0.4963597",
"0.49189267",
"0.47831592",
"0.47248018",
"0.46664563",
"0.46566236",
"0.4607767",
"0.4572097",
"0.4561144",
"0.4555454",
"0.45304328",
"0.4503911",
"0.44528607",
"0.44373566",
"0.4425131",
"0.44250995",
"0.44071388",
"0.44009224",
"0.44007167",
"0.43959475",
"0.43933198",
"0.4388852",
"0.43419048",
"0.4332108",
"0.43285668",
"0.43233654",
"0.43130168",
"0.43065038",
"0.43034816",
"0.43013418",
"0.42974907",
"0.42951667",
"0.4287576",
"0.4268022",
"0.42614412",
"0.4256908",
"0.42551842",
"0.42450175",
"0.42361346",
"0.4235459",
"0.42352697",
"0.42227945",
"0.4218653",
"0.42174375",
"0.42162323",
"0.4215228",
"0.42143026",
"0.4193218",
"0.41784197",
"0.4175471",
"0.41741234",
"0.41671452",
"0.41649887",
"0.4162178",
"0.4160658",
"0.4156443",
"0.41554716",
"0.41470602",
"0.41463244",
"0.41414118",
"0.41276622",
"0.41199532",
"0.41186425",
"0.4118501",
"0.41108242",
"0.4099645",
"0.40795597",
"0.40772828",
"0.40667227",
"0.40612978",
"0.40523973",
"0.40523282",
"0.40450558",
"0.40436006",
"0.40385705",
"0.40339226",
"0.4031225",
"0.40286955",
"0.4027458",
"0.40259334",
"0.40257207",
"0.4009397",
"0.39972252",
"0.399368",
"0.3990095",
"0.39868873",
"0.39859518",
"0.39807755",
"0.39787486",
"0.39766794",
"0.39752987",
"0.3967095",
"0.3966814",
"0.39611435",
"0.39501616",
"0.39444432",
"0.3943388",
"0.39407998",
"0.3938782"
] | 0.5629286 | 0 |
Display a listing of the resource. | public function index()
{
return Brand::all();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
// return $request->all();
$this->validate($request, [
'name' => ['required']
]);
$name = $request->name;
$slug = Str::slug($name);
if($request->destaca){
$destaca = $request->destaca;
}else{
$destaca = 1;
};
$destaca = $request->destaca;
$description= $request->description;
$validateBrand = Brand::where('slug', $slug)->get();
if(count($validateBrand)>=1){
return response()->json(["message" => "Marca ".$name." ya existe!!!"], 400);
}else{
$brand = new Brand;
$brand->name = $name;
$brand->slug = $slug;
$brand->destaca = $destaca;
$brand->description = $description;
$brand->save();
if($request->file('image_url')){
$img = $request->file('image_url');
$path = Storage::disk('public')->put('images/logos-marcas', $img);
// $product->fill(['file' => asset($path)])->save();
// return $path;
$brand->fill(['image_url' => $path])->save();
return $brand;
}
return response()->json($brand, 200);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update($id, Request $request)
{
$name = $request->name;
$slug = Str::slug($name);
$destaca = $request->destaca;
$description= $request->description;
$status = $request->status;
$validateBrand = Brand::where('slug', $slug)->where('id', '!=', $id)->get();
if(count($validateBrand)>=1){
return response()->json(["message" => "Marca ".$name." ya existe!!!"], 400);
}else{
$brand = Brand::find($id);
if($request->name) $brand->name = $name;
if($request->slug) $brand->slug = $slug;
// if($request->destaca or $request->destaca == 0 and $request->destaca != null) $brand->destaca = $destaca;
if($request->destaca or $request->destaca == 0 ) $brand->destaca = $destaca;
if($request->description) $brand->description = $description;
if($request->status){
$brand->status = $status;
/////AFECTAR ARTICULOS AL ACTIVAR O DESACTIVAR MARCA
$product= Product::where('brand_id', $brand->id)->get();
foreach ($product as $element) {
// return $element;
$element->status = $request->status;
$element->save();
}
}
$brand->save();
if($request->hasFile('image_url')){
$img = $request->file('image_url');
$path = Storage::disk('public')->put('images/logos-marcas', $img);
// $product->fill(['file' => asset($path)])->save();
$brand->fill(['image_url' => $path])->save();
$brand->save();
}
return response()->json($brand, 200);
} } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
$brand = Brand::find($id);
$brand->delete();
return response()->json($brand, 200); } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
full path to subform classes | function action_index()
{
$subforms = array(
\Artefacts\Subform_Description::forge(),
\Artefacts\Subform_Owner::forge(),
\Artefacts\Subform_File::forge(),
\Quotes\Subform_Worksub::forge(),
\Quotes\Subform_Quote::forge(),
\Receipts\Subform_Receipt::forge(),
\Jobs\Subform_Jobs::forge(),
\Invoices\Subform_Invoices::forge(),
\Files\Subform_Files::forge()
);
$vsubforms = array();
foreach($subforms as $subform)
{
if(isset($vsubforms[$subform->get_prefix()]))
{
throw new \FuelException('Specified subform prefix already exists in subform test.');
}
$vsubforms[$subform->get_prefix()] = $subform->render();
}
//update
if(\Input::post('save'))
{
foreach ($subforms as $subform)
{
$subform->update(\Input::post($subform->get_prefix()));
}
}
if (\Input::post('save') )
{
if(\Input::param('lock'))
{
//return \Message::set('error', 'Form locked has been changed');
$tab = \Input::param('lock');
\Response::redirect(\Uri::create('mainform/index/?tab='.$tab.'"e_id='.$_GET['quote_id']));
}else{
return \Message::set('success', 'Successfully saved..!') . \Response::redirect(\Uri::create('mainform/index/?tab=0"e_id='.$_GET['quote_id']));
}
}
if ( \Input::post('cancel'))
{
return \Response::redirect(Helper_App::url_from_tab(\Input::get('active_tab')));
}
$view = \View::forge('mainform');
if(\Input::param('wind')){
$this->set_iframe_template();
}
$view->set('subforms', $vsubforms, false);
$this->template->body_classes = array('contact_un');
$this->template->content = $view;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final function getChildFormClass()\n {\n if ($class = $this->getOption('child_form_class') !== null)\n return $class;\n\n return $this->getRelation()->getClass().'Form';\n }",
"protected function getFormClass() : string\n {\n return 'XLite\\Module\\PureClarity\\Personalization\\View\\Form\\Admin\\Dashboard\\Signup';\n }",
"public function getFormClass()\n {\n if(empty($this->_formClass))\n {\n $this->_formClass = str_replace($this->_namespaceMapper,\n $this->_namespaceForm, get_class($this));\n }\n return $this->_formClass;\n }",
"public function getFormClass()\n {\n return 'ClientListForm';\n }",
"function lib4ridora_citation_subtype_form_options() {\n module_load_include('inc', 'xml_form_builder', 'includes/associations');\n $forms = array();\n foreach (xml_form_builder_get_associations(array(), array(), array('MODS')) as $id => $association) {\n $forms[$association['form_name']] = $association['form_name'];\n }\n return $forms;\n}",
"public function getConfigForm() {\r\n\t\treturn parent::getConfigForm()->addElementPath(dirname(__FILE__));\r\n\t}",
"public function test_buildSubForm ( )\n {\n $form = new Rx_Form_Abstract;\n\n $result = $form->buildSubForm();\n\n $this->assertInstanceOf('Zend_Form_SubForm', $result);\n\n }",
"abstract public function getClassPath();",
"public function getSubClasses(): array;",
"public function adminSettingsSubform () {\n $form = array();\n $this->adminSettingsPrintFriendlyForm($form);\n return $form;\n }",
"abstract protected function getFormType(): string;",
"abstract public function forms();",
"public function getConfigForm()\r\n {\r\n $form = parent::getConfigForm();\r\n $form->addElementPath(dirname(__FILE__) . '/fields');\r\n return $form;\r\n }",
"public function testGenerateFormForWithInheritsAllPropertiesOf()\n {\n // add test data\n $this->importTurtle('\n @prefix form: <http://form/> .\n @prefix kno: <'. $this->commonNamespaces->getUri('kno') .'> .\n @prefix rdfs: <'. $this->commonNamespaces->getUri('rdfs') .'> .\n\n form:type1\n kno:has-property form:t1-p1 ;\n kno:has-property form:t1-p2 .\n\n form:type2\n kno:has-property form:t2-p1 ;\n kno:has-property form:t2-p2 ;\n kno:inherits-all-properties-of form:type1 .\n '\n );\n\n $this->commonNamespaces->add('form', 'http://form/');\n\n $this->assertEquals(\n array(\n '\n\n<form method=\"post\" action=\"http://url/\">\n\n <input type=\"hidden\" name=\"__type\" value=\"form:type2\">\n\n {% if root_item[\"_idUri\"] is defined %}\n\n <input type=\"hidden\" name=\"__idUri\" value=\"{{ root_item[\"_idUri\"] }}\">\n\n {% else %}\n\n <input type=\"hidden\" name=\"__uriSchema\" value=\"\">\n\n {% endif %}\n\n <br/><br/>\n\n <strong>form:t2-p1</strong><br/>\n\n <input type=\"text\" name=\"form:t2-p1\" value=\"{% if root_item[\"form:t2-p1\"] is defined %}{{ root_item[\"form:t2-p1\"] }}{% endif %}\">\n\n <br/><br/>\n\n <strong>form:t2-p2</strong><br/>\n\n <input type=\"text\" name=\"form:t2-p2\" value=\"{% if root_item[\"form:t2-p2\"] is defined %}{{ root_item[\"form:t2-p2\"] }}{% endif %}\">\n\n <br/><br/>\n\n <strong>form:t1-p1</strong><br/>\n\n <input type=\"text\" name=\"form:t1-p1\" value=\"{% if root_item[\"form:t1-p1\"] is defined %}{{ root_item[\"form:t1-p1\"] }}{% endif %}\">\n\n <br/><br/>\n\n <strong>form:t1-p2</strong><br/>\n\n <input type=\"text\" name=\"form:t1-p2\" value=\"{% if root_item[\"form:t1-p2\"] is defined %}{{ root_item[\"form:t1-p2\"] }}{% endif %}\">\n\n {% if root_item[\"_idUri\"] is defined %}\n\n <input type=\"hidden\" name=\"action\" value=\"update\">\n\n {% else %}\n\n <input type=\"hidden\" name=\"action\" value=\"insert\">\n\n {% endif %}\n\n <br/><br/>\n\n <button class=\"btn btn-primary\" id=\"\" type=\"submit\">Save</button>\n\n</form>' ,\n array()\n ),\n $this->fixture->generateFormFor('form:type2')\n );\n }",
"public function getCMSFields()\n {\n if (isset($_REQUEST[\"sc\"]) && !self::$called) {\n // just create an instance and return getCMSFields on that\n $subclass = $_REQUEST[\"sc\"];\n $inst = new $subclass;\n\n // prevent handling this case again.\n self::$called = true;\n\n // Get the fields from the subclass. It will in turn self::getCMSFields, but that one will return the actual\n // fields of this class.\n return $inst->getCMSFields();\n }\n\n $fields = parent::getCMSFields();\n\n $fields->removeByName(\"ParentID\");\n\n if ($helperText = $this->helperText()) {\n $helperText = \" - \" . $helperText;\n }\n\n if (isset($_REQUEST[\"sc\"])) {\n $subclass = $_REQUEST[\"sc\"];\n if (ClassInfo::exists($subclass)) {\n $className = preg_replace('/(?!^)[[:upper:]]+/', ' \\0', $subclass);\n $fields->addFieldToTab(\"Root.Main\", new HiddenField(\"SubClass\", \"SubClass\", $subclass));\n if (isset($_REQUEST[\"id\"])) {\n $fields->addFieldToTab(\"Root.Main\", new HiddenField(\"ParentID\", \"ParentID\", $_REQUEST[\"id\"]));\n }\n $fields->addFieldToTab(\"Root.Main\", new ReadonlyField(\"Class\", \"Variation Type\", $className . $helperText), \"Name\");\n }\n } else {\n $className = preg_replace('/(?!^)[[:upper:]]+/', ' \\0', $this->ClassName);\n $fields->addFieldToTab(\"Root.Main\", new ReadonlyField(\"Class\", \"Variation Type\", $className . $helperText), \"Name\");\n }\n\n return $fields;\n }",
"abstract function getForm();",
"public function indexAction() {\n // (first) sub form\n if (!$form = $this->getCurrentSubForm()) {\n $form = $this->getNextSubForm();\n }\n\n //Zend_Debug::dump($form);\n //$form->setDecorators(array(array('ViewScript', array('viewScript' => 'formScript.phtml'))));\n //$this->view->form = $this->getForm()->prepareSubForm($form);\n $form = $this->getForm()->prepareSubForm($form);\n $this->view->form = $form;\n }",
"public function getExtendedType()\n {\n return FormType::class;\n }",
"public function getExtendedType()\n {\n return FormType::class;\n }",
"abstract protected function getForm();",
"public function testGenerateSubForm()\n {\n // add test data\n $this->importTurtle('\n @prefix form: <http://form/> .\n @prefix kno: <'. $this->commonNamespaces->getUri('kno') .'> .\n @prefix rdfs: <'. $this->commonNamespaces->getUri('rdfs') .'> .\n\n form:type1 ;\n kno:has-property form:t1-p1 ;\n kno:has-property form:t1-p2 .\n\n form:t1-p1\n rdfs:label \"Root-Prop-1 DE\"@de ;\n rdfs:label \"Root-Prop-1 EN\"@en .\n\n form:t1-p2\n kno:restriction-reference-is-of-type form:type2 .\n\n form:type2\n kno:has-property form:t2-p1 ;\n kno:has-property form:t2-p2 .\n\n form:t2-p1\n rdfs:label \"Type2-Prop-1\"@en .\n ',\n $this->testGraph,\n $this->store\n );\n\n $this->commonNamespaces->add('form', 'http://form/');\n\n $this->assertEquals(\n array(\n array(\n '<div id=\"form_t1_p2__container\">',\n '<input type=\"hidden\" name=\"form:t1-p2__type\" value=\"form:type2\">',\n '<input type=\"hidden\" name=\"form:t1-p2__uriSchema\" value=\"\">',\n '{% set entry_count = 0 %}',\n '{% if root_item[\"form:t1-p2\"] is defined %}',\n '{% for key,sub_item in root_item[\"form:t1-p2\"] %}',\n '<div class=\"form_t1_p2_element\">',\n\n '<br/><br/>',\n '<strong>Type2-Prop-1</strong><br/>',\n '<input type=\"text\" name=\"form:type1__form:t1-p2__form:type2__form:t2-p1__{{ entry_count }}\" value=\"{{ sub_item[\"form:t2-p1\"] }}\">',\n\n '<br/><br/>',\n '<strong>form:t2-p2</strong><br/>',\n '<input type=\"text\" name=\"form:type1__form:t1-p2__form:type2__form:t2-p2__{{ entry_count }}\" value=\"{{ sub_item[\"form:t2-p2\"] }}\">',\n\n '<input type=\"hidden\" name=\"form:type1__form:t1-p2__form:type2____idUri__{{ entry_count }}\" value=\"{{ sub_item[\"_idUri\"] }}\">',\n\n '</div>',\n '{% set entry_count = entry_count+1 %}',\n '{% endfor %}',\n '{% endif %}',\n '</div>',\n '<button class=\"btn btn-primary btn-xs\" id=\"form_t1_p2__btn\" type=\"button\">Add</button>',\n '{% if root_item[\"form:t1-p2\"] is defined %}',\n '<input type=\"hidden\" name=\"form:type1__form:t1-p2__number\" value=\"{{ root_item[\"form:t1-p2\"]|length }}\" id=\"form_t1_p2__number\">',\n '{% else %}',\n '<input type=\"hidden\" name=\"form:type1__form:t1-p2__number\" value=\"0\" id=\"form_t1_p2__number\">',\n '{% endif %}',\n ),\n'\n<script type=\"text/javascript\">\n\n // store latest number of root_item[\"form:t1-p2\"] entries\n {% if root_item[\"form:t1-p2\"] is defined %}\n var form_t1_p2__number = {{ root_item[\"form:t1-p2\"]|length }};\n {% else %}\n var form_t1_p2__number = 0;\n {% endif %}\n $(document).ready(function(){\n /*\n * dynamically add further fields to #form_t1_p2__container\n */\n $(\"#form_t1_p2__btn\").on(\"click\", function(){\n\n $(\"#form_t1_p2__container\").append(\n `<br/>\n\n\n <div class=\"form_t1_p2_element\">\n\n <br/><br/>\n\n <strong>Type2-Prop-1</strong><br/>\n\n <input type=\"text\" name=\"form:type1__form:t1-p2__form:type2__form:t2-p1__` + form_t1_p2__number + `\" value=\"\">\n\n <br/><br/>\n\n <strong>form:t2-p2</strong><br/>\n\n <input type=\"text\" name=\"form:type1__form:t1-p2__form:type2__form:t2-p2__` + form_t1_p2__number + `\" value=\"\">\n\n <input type=\"hidden\" name=\"form:type1__form:t1-p2__form:type2____idUri__` + form_t1_p2__number + `\" value=\"\">\n\n </div>`\n );\n\n ++form_t1_p2__number;\n\n $(\"#form_t1_p2__number\").val(form_t1_p2__number);\n });\n });\n</script>'\n ),\n $this->fixture->generateSubForm('form:type1', 'form:t1-p2', 'form:type2')\n );\n }",
"public function getForm()\n {\n return $this->getAncestorInstanceOf('FewAgency\\FluentForm\\FluentForm');\n }",
"public function getPotentialForms()\n {\n return array_keys($this->getForm()->getSubForms());\n }",
"public function getParent()\n {\n return BaseProfileFormType::class;\n }",
"protected function getFormObjectName() {}",
"public function getParent()\n {\n return 'form';\n }",
"protected function getFormClass(){\n return (\n (\n $this->_class!==NULL &&\n is_string($this->_class) &&\n strlen(trim($this->_class))\n )\n ?$this->_class\n :$this->setFormClass()\n );\n }",
"public function getPotentialForms() {\n return array_keys($this->getForm()->getSubForms());\n }",
"public function getForms()\n { return craft()->coalescentForms->getAllForms();\n }",
"public function selectFormsBySubType( $sSubType );",
"function get_class_folder() {\n $path = '';\n\n $split = explode('/', filter_input(INPUT_SERVER, 'PHP_SELF'));\n for ($i = 0; $i < count($split) - 2; $i++)\n if ($split[$i])\n $path .= \"/\" . $split[$i];\n if ($path[0] == '/')\n return substr($path, 1);\n return $path;\n}",
"public function getFormClassToExtend() {\n return null === ($model = $this->getParentModel()) ? 'BaseFormFilterDoctrine' : sprintf('%sFormFilter', $model);\n }",
"public function get_usable_full_class_path() {\n\n\t\t$full_path = $this->get_called_class();\n\n\t\treturn strtolower( str_replace( '\\\\', '_', str_replace( '\\\\\\\\', '_', $full_path ) ) );\n\n\t}",
"public function __getDriverPath($type){\n\t\t\treturn $this->__getClassPath($type) . \"/field.{$type}.php\";\n\t\t}",
"public final function getForm()\n {\n $config = $this->getLocalConfiguration();\n\n if(! array_key_exists('entity', $config))\n throw new MSFConfigurationNotFoundException($this->getMsfDataLoader()->getState(),'entity');\n\n $data = null;\n $undeserialized = $this->getUndeserializedMSFDataLoader();\n\n if(array_key_exists($this->getState(), $undeserialized))\n $data = $undeserialized[$this->getState()];\n\n\n if(! array_key_exists('action', $config)){\n $config['action'] = $this->getConfiguration()['__root'];\n }\n\n if(! array_key_exists('method', $config)){\n $config['method'] = $this->getConfiguration()['__method'];\n }\n\n if(! array_key_exists('formtype', $config)){\n if($this->getConfiguration()['__default_formType']){\n $shortname = (new \\ReflectionClass($config['entity']))->getShortName();\n try{\n $defaultNamespace = (new \\ReflectionClass(get_class($this)))->getNamespaceName();\n //Force autoload to fail if the form type is not in the Msf type namespace\n $dontFails = (new \\ReflectionClass($defaultNamespace.'\\\\'.$shortname.'Type'));\n }catch (\\Exception $e){\n if(! array_key_exists('__default_formType_path',$this->getConfiguration()))\n throw new \\Exception(\"Use of '__default_formType' requires to put FormType classes into the MSFType classpath or to provide namespace with '__default_formType_path'.\");\n $defaultNamespace = $this->getConfiguration()['__default_formType_path'];\n }\n $config['formtype'] = $defaultNamespace.'\\\\'.$shortname.'Type';\n }\n else\n throw new MSFConfigurationNotFoundException($this->getMsfDataLoader()->getState(),'formtype');\n }\n\n //Adding user fields\n $this->buildMSF();\n\n /**\n * ici, on pourrait regarder si une fonction init a été fournie. Si oui, utiliser son résultat comme\n * entrée de setcurrentForm()\n */\n $form = $this->getFormFactory()->create(\n $config['formtype'],\n $data,\n [\n 'action' => $config['action'],\n 'method' => $config['method'],\n ]\n );\n\n $this->setCurrentForm($form);\n\n if( ! $this->isAvailable($this->getLocalConfiguration()['after'])){\n $this->setConfigurationWith('__buttons_have_next',false);\n }\n if( ! $this->isAvailable($this->getLocalConfiguration()['before'])){\n $this->setConfigurationWith('__buttons_have_previous',false);\n }\n\n //var_dump($this->getConfiguration()); die;\n\n\n return $this->getCurrentForm();\n }",
"abstract public function getForm() : void;",
"protected function _appendClassesToFormFields()\n {\n if (\n (\n $this->getUseFieldErrorClassServerSide()\n ||\n $this->getUseFieldValidClassServerSide()\n )\n &&\n $this->getWidgetSchema()->getFormFormatter()\n instanceof sfWidgetFormSchemaFormatterJqueryValidationInterface\n )\n {\n $errorClass = $this\n ->getWidgetSchema()\n ->getFormFormatter()\n ->getFieldErrorClass()\n ;\n\n $validClass = $this\n ->getWidgetSchema()\n ->getFormFormatter()\n ->getFieldValidClass()\n ;\n\n foreach ($this as $field)\n {\n $this->_recursiveFormFieldClases($field, $errorClass, $validClass);\n }\n }\n }",
"function _thickbox_path_admin_subfolder()\n {\n }",
"function pirate_forms_autoload( $class ) {\n\t$namespaces = array( 'PirateForms' );\n\t$class1 = str_replace( '_', '-', strtolower( 'class-' . $class ) );\n\tforeach ( $namespaces as $namespace ) {\n\t\tif ( substr( $class, 0, strlen( $namespace ) ) == $namespace ) {\n\t\t\t$filename = PIRATEFORMS_DIR . 'includes/' . $class1 . '.php';\n\t\t\tif ( is_readable( $filename ) ) {\n\t\t\t\trequire_once $filename;\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t$filename = PIRATEFORMS_DIR . 'admin/' . $class1 . '.php';\n\t\t\tif ( is_readable( $filename ) ) {\n\t\t\t\trequire_once $filename;\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t$filename = PIRATEFORMS_DIR . 'public/' . $class1 . '.php';\n\t\t\tif ( is_readable( $filename ) ) {\n\t\t\t\trequire_once $filename;\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t$filename = PIRATEFORMS_DIR . 'public/partials/' . $class1 . '.php';\n\t\t\tif ( is_readable( $filename ) ) {\n\t\t\t\trequire_once $filename;\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t$filename = PIRATEFORMS_DIR . 'gutenberg/' . $class1 . '.php';\n\t\t\tif ( is_readable( $filename ) ) {\n\t\t\t\trequire_once $filename;\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t$filename = PIRATEFORMS_DIR . 'includes/class-pirateforms-widget.php';\n\t\tif ( is_readable( $filename ) ) {\n\t\t\trequire_once $filename;\n\n\t\t\treturn true;\n\t\t}\n\n\t\t$filename = PIRATEFORMS_DIR . 'includes/class-pirateforms-farewell.php';\n\t\tif ( is_readable( $filename ) ) {\n\t\t\trequire_once $filename;\n\n\t\t\treturn true;\n\t\t}\n\t}// End foreach().\n\n\treturn false;\n}",
"public function getFormTemplates();",
"abstract protected function getFormName();",
"function loadFromForm() \r\n {\t \t\r\n\t parent::loadFromForm();\r\n\t \r\n// \t $this->formName = $_REQUEST['form_name']; \t \r\n// \t \r\n// // \t echo 'Inside load_from_form of main page: <pre>'.print_r($this->formValues,true).'</pre><br>';\t \r\n// \t \r\n// \t\tswitch($this->formName) {\r\n// \t\t\t\r\n// \t\t\tcase 'basicStaffForm':\r\n// \t\t\t\t \r\n// \t\t\t\t$this->active_subPage = $this->basic_form;\t\r\n// \t\t\t\tbreak;\r\n// \t\t\tcase 'scheduledActivityForm':\r\n\r\n// \t\t\t\t$this->active_subPage = $this->optional_sheduled_activity_form;\t \r\n// \t\t\t\tbreak;\t\t\t\r\n// \t\t\tdefault:\r\n// \t\t\t\tdie('VALID FORM NAME **NOT** FOUND; name = '.$this->formName);\r\n// \t\t} \r\n// \t\t$this->active_subPage->loadFromForm(); \r\n// \t\t$this->form_submitted = true; \r\n \r\n }",
"protected function getModelsPath()\n\t{\n\t\treturn Framework::fw()->buildPath( '__base' );\n\t}",
"public function indexAction()\n {\n // (first) sub form\n\t\tZend_Session::namespaceUnset($this->_namespace);\t\t// Delete all former forms datas\n\t\t\n if (!$form = $this->getCurrentSubForm()) {\n $form = $this->getNextSubForm();\n }\n $this->view->form = $this->getForm()->prepareSubForm($form);\n }",
"public function getFormName()\n {\n return $this->getModelSimpleName() .'Form';\n }",
"protected function getAggregateRootClass() : string\n {\n return RegistrationRequest::class;\n }",
"public function getCurrentSubForm()\n {\n $request = $this->getRequest();\n if (!$request->isPost()) {\n return false;\n }\n \n foreach ($this->getPotentialForms() as $name) {\n if ($data = $request->getPost($name, false)) {\n if (is_array($data)) {\n return $this->getForm()->getSubForm($name);\n break;\n }\n }\n }\n \n return false;\n }",
"public function getForm();",
"public function listForms();",
"function classgraphAction() {\n\n // get entity manager from registry\n $em = Zend_Registry::get('em');\n\n $form = new Zend_Form();\n // Translate Object ..\n $translate = Zend_Registry::get('Zend_Translate');\n\n $res = $em->createQueryBuilder()->select('DISTINCT(cla.CLA_Name),cla.ClassificationId')\n ->from('Application_Model_QuestionClassifications', 'qc')\n ->from('Response', 'r')\n ->innerJoin('qc.FK_ClassificationId','cla')\n ->innerJoin('qc.FK_QuestionId','q')\n ->where('r.QuestionId = q.QuestionId')->getQuery();\n\n $ClsResultArr = $res->getResult();\n\n $parentClsArr = array();\n $classificationArr= array();\n\n if(is_array($ClsResultArr) && count($ClsResultArr) > 0) {\n foreach($ClsResultArr as $val) {\n $parentClassificationId = $this->getParentClassificationId($val['ClassificationId']);\n\n // get Classification Name\n $qry =$em->createQueryBuilder()->select('cla.CLA_Name')\n ->from('Application_Model_Classifications','cla')\n ->where('cla.ClassificationId='.$this->classParentId)\n ->getQuery();\n $classArr = $qry->getResult();\n $parentClsArr[$this->classParentId] = $classArr[0]['CLA_Name'];\n $classificationArr[] = array(\"className\"=>$val['CLA_Name'], \"classificationId\"=>$val['ClassificationId'],\"parentId\"=>$this->classParentId);\n }\n }\n\n $selClassifications = new Zend_Form_Element_Select('parentClassId', array(\n \"label\" => $translate->_(\"Select Classification\"),\n \"required\" => true,\n ));\n\n $selClassifications->addMultiOptions($parentClsArr);\n\n $form->addElements(array($selClassifications));\n\n $form->addElement(new Zend_Form_Element_Submit(\"Search\"));\n\n $form->setDecorators(array(\n 'FormElements',\n array('HtmlTag', array('tag' => 'dt', 'class' => 'mapping_form')),\n array('Description', array('placement' => 'prepend')),\n 'Form'\n ));\n\n $qry =$em->createQueryBuilder()->select(\n 'COUNT(q.QuestionId) as totOpt,\n SUM(CASE\n WHEN (r.Points = q.QUE_Points) THEN 1\n ELSE 0\n END) as correctPoints,\n SUM(CASE\n WHEN (r.Points <> q.QUE_Points) THEN 1\n ELSE 0\n END) as wrongPoints,\n q.QUE_Points as QuePoints,\n cla.ClassificationId,\n cla.CLA_Name\n '\n )\n ->from('Application_Model_QuestionClassifications','qc')\n ->from('Response','r')\n ->innerJoin('qc.FK_ClassificationId','cla')\n ->innerJoin('qc.FK_QuestionId','q')\n ->where( 'r.QuestionId = q.QuestionId ')\n ->groupBy('cla.ClassificationId')\n ->orderBy('cla.ClassificationId', 'ASC')\n ->getQuery();\n\n $classPointsArr = $qry->getResult();\n\n $classArr = array();\n $resArr1 = array();\n\n $parentClsId = 1;\n\n // Prepare Json data for classification Array.\n foreach($classPointsArr as $val) {\n\n $avgCnt = ($val['correctPoints']/$val['totOpt']*100);\n\n if(!in_array($val['ClassificationId'],$classArr)) {\n $classArr[$val['ClassificationId']]=$val['CLA_Name'];\n $resArr1[$val['ClassificationId']]['me']= round($avgCnt,2);\n $resArr1[$val['ClassificationId']]['mi']= 0;\n $resArr1[$val['ClassificationId']]['ma']= 100;\n } else {\n $resArr1[$val['ClassificationId']]['me']= round($avgCnt,2);\n $resArr1[$val['ClassificationId']]['mi']= 0;\n $resArr1[$val['ClassificationId']]['ma']= 100;\n // $resArr1[$val['ClassificationId']][$val['QuestionId']]= $val['correctPoints'];\n }\n\n // Check if classification already exists in database or not\n $qry = $em->createQueryBuilder()->select('gcl.GraphClassificationId')\n ->from('GraphClassifications','gcl')\n ->innerJoin('gcl.ClassificationId','c')\n ->where('c.ClassificationId='.$val['ClassificationId'])\n ->getQuery();\n\n $graphClassArr = $qry->getResult();\n\n if(is_array($graphClassArr) && count($graphClassArr) > 0) {\n\n } else {\n $graphClassObj = new GraphClassifications();\n $graphClassObj->setClassificationId($em->find('Application_Model_Classifications', $val['ClassificationId']));\n\n $graphClassObj->setTotalQuestions($val['totOpt']);\n $graphClassObj->setCorrectAnswers($val['correctPoints']);\n $graphClassObj->setWrongAnswers($val['wrongPoints']);\n $graphClassObj->setParentClassificationId($parentClsId);\n $graphClassObj->setScore(round($avgCnt,2));\n $graphClassObj->setCreatedDate();\n $graphClassObj->setModifiedDate();\n\n $em->persist($graphClassObj);\n $em->flush();\n }\n }\n\n $qry = $em->createQueryBuilder()\n ->select('c.ClassificationId, c.CLA_Name, gcl.TotalQuestions,gcl.CorrectAnswers')\n ->from('GraphClassifications','gcl')\n ->innerJoin('gcl.ClassificationId','c')\n ->where('gcl.ParentClassificationId='.$parentClsId)\n ->getQuery();\n\n $graphRes = $qry->getResult();\n\n $measureStr = \"\";\n $labelStr = \"\";\n if(is_array($graphRes) && count($graphRes) >0) {\n $cnt= 0;\n foreach($graphRes as $val) {\n if($cnt == (count($classArr)-1)) {\n $measureStr.= \"'\".$val['ClassificationId'].\"'\";\n $labelStr.= \"'\".$val['CLA_Name'].\"'\";\n } else {\n $measureStr.= \"'\".$val['ClassificationId'].\"'\".\",\";\n $labelStr.= \"'\".$val['CLA_Name'].\"'\".\",\";\n }\n $cnt++;\n }\n }\n\n $this->view->labelStr =$labelStr;\n $this->view->measureStr =$measureStr;\n\n $jsonStr = '[[\"2006/1\",'.$this->array2json($resArr1).']]';\n\n $fp = fopen($_SERVER['DOCUMENT_ROOT'].'/js/classification.json','w+');\n @fwrite($fp,$jsonStr,strlen($jsonStr));\n @fclose($fp);\n\n $this->view->form = $form;\n $this->view->clsArr = $classificationArr;\n }",
"protected function _getFormClass() {\r\n if (empty($this->_formClass)) {\r\n \tif(empty($this->_formClass)) {\r\n \t\tthrow new Exception('$_formClass should be a valid Zend_Form class name.');\r\n \t}\r\n $this->_formClass = str_replace('Model_Mapper', 'Form', get_class($this));\r\n }\r\n \r\n return $this->_formClass;\r\n }",
"public function getCurrentStructureFormPrefix() {}",
"function _getFullName() {\n\t\treturn \"document.{$this->form_name}.elements['{$this->field_name}']\";\n\t}",
"public function get_subtypes()\n {\n }",
"public function buildForm()\n {\n $this\n ->add(\n 'new_organization_group',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\OrganizationGroupInformation',\n 'label' => false,\n ]\n ]\n )\n ->add(\n 'group_admin_information',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\GroupAdmin',\n 'label' => false,\n ]\n ]\n )\n ->addSaveButton();\n }",
"final public function getFormName(): string\n {\n\n return str_replace('.', '__', $this->getName());\n }",
"protected function forms()\r\n {\r\n $metaFileInfo = $this->getFormObj()->GetMetaFileInfo();\r\n $modulePath = $metaFileInfo['modules_path'];\r\n $modulePath = substr($modulePath,0,strlen($modulePath)-1);\r\n global $g_MetaFiles;\r\n php_grep(\"<EasyForm\", $modulePath);\r\n \r\n for ($i=0; $i<count($g_MetaFiles); $i++)\r\n {\r\n $g_MetaFiles[$i] = str_replace('/','.',str_replace(array($modulePath.'/','.xml'),'', $g_MetaFiles[$i]));\r\n $list[$i]['val'] = $g_MetaFiles[$i];\r\n $list[$i]['txt'] = $g_MetaFiles[$i];\r\n }\r\n\r\n return $list; \r\n }",
"public function getForms()\n {\n return $this->form;\n }",
"public function getNextSubForm()\n {\n $storedForms = $this->getStoredForms();\n $potentialForms = $this->getPotentialForms();\n \n foreach ($potentialForms as $name) {\n if (!in_array($name, $storedForms)) {\n return $this->getForm()->getSubForm($name);\n }\n }\n return false;\n }",
"public function getCurrentSubForm() {\n $request = $this->getRequest();\n if (!$request->isPost()) {\n return false;\n }\n\n foreach ($this->getPotentialForms() as $name) {\n if ($data = $request->getPost($name, false)) {\n if (is_array($data)) {\n return $this->getForm()->getSubForm($name);\n break;\n }\n }\n }\n\n return false;\n }",
"public function registerFormMapping()\n {\n FormHelper::registerFormTypeMapping([\n 'sonata_product_delivery_status' => 'Sonata\\ProductBundle\\Form\\Type\\ProductDeliveryStatusType',\n 'sonata_product_variation_choices' => 'Sonata\\Component\\Form\\Type\\VariationChoiceType',\n 'sonata_product_api_form_product_parent' => 'Sonata\\ProductBundle\\Form\\Type\\ApiProductParentType',\n 'sonata_product_api_form_product' => 'Sonata\\ProductBundle\\Form\\Type\\ApiProductType',\n 'sonata_currency' => 'Sonata\\Component\\Currency\\CurrencyFormType',\n ]);\n }",
"public function buildForm()\n {\n }",
"protected function form()\n {\n $form = new Form(new Category);\n\n// dump(Category::root(request()->segment(3)));\n\n $form->tab('Конструктор страницы', function($form){\n $form->sortable('source','Страница');\n $form->select('blocks','Добавить блок')->options(Block::where('static',0)->pluck('name','url'))->attribute(['rel' => 'blocks']);\n $form->select('static','Добавить статический блок')->options(Block::where('static',1)->pluck('name','url'))->attribute(['rel' => 'static']);\n });\n $form->tab('Настройки', function($form){\n $form->display('id');\n $form->alias('alias','Алиас');\n $form->text('link');\n $form->select('hook')->options(Resource::all()->pluck('name','id'));\n $form->text('name','Название');\n });\n $form->tab('SEO', function($form){\n $form->textarea('seo_title','seo title');\n $form->textarea('seo_desc','seo description');\n $form->textarea('seo_key','seo keywords');\n\n });\n\n return $form;\n }",
"protected function form()\n {\n return Admin::form(Root::class, function (Form $form) {\n\n //$form->display('id', 'ID');\n $form->text('name','词根');\n $form->select('types')->options([0 => '前缀', 1 => '后缀', 2 => '词根']);\n $form->ckeditor('description','描述');\n\n $form->hasMany('rootcixing', function (Form\\NestedForm $form) {\n //$form->text('rootcixing.description',\"描叙\");\n $form->select('word_speech_id',\"词性\")->options(WordSpeech::all()->pluck('cixing', 'id'));\n\n });\n\n\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n });\n }",
"public function getSubfields();",
"protected function createComponentEditForm() {\r\n\t\t$form = new Form;\r\n\t\t$form->getElementPrototype()->class(\"formWide\");\r\n\t\t$options = array(0 => \"Default\", 1 => \"Odkaz na obsah\", 3 => \"Odkaz na položku menu\");\r\n\t\t// easy way how to create url slug\r\n\t\t$form->addText(\"title\", \"Název:\")\r\n\t\t\t\t->setAttribute('onchange', '\r\n\t\t\t\t\t\t\tvar nodiac = { \"á\": \"a\", \"č\": \"c\", \"ď\": \"d\", \"é\": \"e\", \"ě\": \"e\", \"í\": \"i\", \"ň\": \"n\", \"ó\": \"o\", \"ř\": \"r\", \"š\": \"s\", \"ť\": \"t\", \"ú\": \"u\", \"ů\": \"u\", \"ý\": \"y\", \"ž\": \"z\" };\r\n\t\t\t\t\t\t\ts = $(\"#frmeditForm-title\").val().toLowerCase();\r\n\t\t\t\t\t\t\tvar s2 = \"\";\r\n\t\t\t\t\t\t\tfor (var i=0; i < s.length; i++) {\r\n\t\t\t\t\t\t\t\ts2 += (typeof nodiac[s.charAt(i)] != \"undefined\" ? nodiac[s.charAt(i)] : s.charAt(i));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresult=s2.replace(/[^a-z0-9_]+/g, \"-\").replace(/^-|-$/g, \"\");\r\n\t\t\t\t\t\t\t$(\"#frmeditForm-url\").val(result);\r\n\t\t\t\t\t\t');\r\n\t\t$form->addText(\"url\", \"url:\")->setAttribute(\"readonly\", \"readonly\");\r\n\t\tif (!$this->onlyTree) {\r\n\t\t\t$form->addSelect(\"target_type\", \"Cíl:\", $options);\r\n\t\t\t$content = $this->prepareContentSelectBox();\r\n\t\t\t$menuContent = $this->prepareMenuContentSelectBox();\r\n\t\t\t$form->addSelect(\"target_id\", \"Odkazovaný obsah:\", $content)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t\t$form->addSelect(\"target_menu\", \"Odk. položka menu:\", $menuContent)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t}\r\n\t\t$form->addHidden(\"parent_id\", $this->parent_id);\r\n\t\t$form->addHidden(\"edit_id\", $this->edit_id);\r\n\t\t//filling form\r\n\t\tif ($this->edit_id or $this->edit_id === \"0\") {\r\n\t\t\t$defFromDb = $this->closureModel->getItemById($this->edit_id);\r\n\t\t\t$defaults = new \\Nette\\ArrayHash;\r\n\t\t\tforeach ($defFromDb as $key => $value) {\r\n\t\t\t\t$defaults->$key = $value;\r\n\t\t\t}\r\n\t\t\tif ($this->edit_id === \"0\") {\r\n\t\t\t\t$form[\"title\"]->setDisabled();\r\n\t\t\t}\r\n\t\t\tif (!$this->onlyTree) {\r\n\t\t\t\t$t = $defaults->target;\r\n\t\t\t\tif (!Validators::isNumericInt($t)) {\r\n\t\t\t\t\t$menuItem = $this->checkTargetMenuItemExists($t);\r\n\t\t\t\t\tif ($menuItem) {\r\n\t\t\t\t\t\t$defaults->target_type = 3;\r\n\t\t\t\t\t\t$defaults->target_menu = $menuItem;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$contentId = $this->checkTargetContentExists($t);\r\n\t\t\t\t\t\t$defaults->target_type = 1;\r\n\t\t\t\t\t\t$defaults->target_id = $contentId;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t} elseif ($t <= 0) {\r\n\t\t\t\t\t$defaults->target_type = 0;\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t\t$form[\"target_id\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$defaults->target = null;\r\n\t\t\t$form->setDefaults($defaults);\r\n\t\t}\r\n\r\n\t\t$form->addSubmit('save', 'Save')\r\n\t\t\t\t\t\t->setAttribute('onclick', '$(\"#frmeditForm-title\").trigger(\"change\")')\r\n\t\t\t\t->onClick[] = callback($this, 'editFormSubmitted');\r\n\t\t$form->setRenderer(new \\Kdyby\\BootstrapFormRenderer\\BootstrapRenderer());\r\n\t\treturn $form;\r\n\t}",
"public function getFormType();",
"abstract function setupform();",
"function lib4ridora_citation_form_subtypes() {\n static $map = NULL;\n if ($map === NULL) {\n $map = lib4ridora_get_citation_mapping_info();\n $genre_map = lib4ridora_citation_get_genre_map(FALSE);\n $genre_semantics_map = lib4ridora_citation_get_genre_semantics_map();\n $form_map = variable_get('lib4ridora_citation_subtype_form_associations', array());\n $test_form_association = function ($form_name) {\n // Test that an association exists for the given form (and it is a MODS\n // form).\n module_load_include('inc', 'xml_form_builder', 'includes/associations');\n return xml_form_builder_get_associations(array($form_name), array(), array('MODS'));\n };\n foreach ($map as $name => &$info) {\n $info['genres'] = array_keys($genre_map, $name);\n $genre_semantics = array();\n foreach ($info['genres'] as $genre_key) {\n $genre_semantics[] = $genre_semantics_map[$genre_map[$genre_key]];\n }\n $info['genre_semantics'] = $genre_semantics;\n\n // Use the previously configured form name; otherwise, default to the form\n // with the same human-readable name.\n $info['form'] = isset($form_map[$name]) ? $form_map[$name] : $info['name'];\n if (!$test_form_association($info['form'])) {\n // Association for the form does not exist: Wipe it.\n $info['form'] = NULL;\n }\n }\n // XXX: Deal with leaked reference.\n unset($info);\n }\n\n return $map;\n}",
"public function loadData() {\n\n\n $strPath = class_resourceloader::getInstance()->getPathForFile(\"/portal/forms/\" . $this->arrElementData[\"formular_class\"]);\n\n if($strPath === false) {\n throw new class_exception(\"failed to load form-class \" . $this->arrElementData[\"formular_class\"], class_exception::$level_ERROR);\n }\n\n require_once(_realpath_ . $strPath);\n $strClassname = uniStrReplace(\".php\", \"\", $this->arrElementData[\"formular_class\"]);\n $objForm = new $strClassname($this->arrElementData);\n $strReturn = $objForm->action();\n\n return $strReturn;\n }",
"protected function form()\n {\n $form = new Form(new Category());\n\n $parents = Category::where('parent_id', 0)->get()->toArray();\n $select_ = array_prepend($parents, ['id' => 0, 'name_cn' => '顶级']);\n $select_array = array_column($select_, 'name_cn', 'id');\n //创建select\n $form->select('parent_id', '上级')->options($select_array);\n\n $form->text('name_cn', __('Name cn'))->rules('required');\n $form->text('name_en', __('Name en'))->rules('required');\n $form->multipleImage('top_image', __('置顶图'))->sortable()->removable()->help('按数字大小正序长宽建议比列(178:174|177:87),请按照建议比例顺序上传图片');\n $form->image('image', __('Image'))->help('按数字大小正序长宽建议比列(710:295)');\n $form->text('description', __('Description'))->rules('required');\n $form->ueditor('content', __('Content'));\n $states = [\n 'on' => ['value' => 1, 'text' => '是', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => '否', 'color' => 'danger'],\n ];\n $form->switch('is_top', __('Is top'))->states($states)->default(0);\n $form->number('sort_order', __('Sort order'))->default(99);\n\n return $form;\n }",
"public function testGetSubFormElements()\n {\n $html = '%subForm rootElementUri=\"form:type1\" rootElementPropertyUri=\"form:t1-p2\" subElementTypeUri=\"form:type2\" %';\n\n $res = $this->fixture->getSubFormElements($html);\n\n $this->assertEquals(\n array('form:type1', 'form:t1-p2', 'form:type2'),\n $res\n );\n }",
"protected function setupForms()\n {\n if (null === $this->forms) {\n $configuration = $this->getConfiguration();\n foreach ($configuration['routes'] as $name => $conf) {\n $this->forms[$name] = $this->setupForm($name, $conf);\n }\n }\n }",
"public static function path()\n {\n return class_basename(get_called_class());\n }",
"function hgr_minimalform_init() {\n\t\t\tif(function_exists('vc_map')) {\n\t\t\t\t/*\n\t\t\t\t\tparent element\n\t\t\t\t*/\n\t\t\t\tvc_map(\n\t\t\t\t\tarray(\n\t\t\t\t\t \"name\"\t\t\t\t\t\t=>\t__(\"HGR MinimalForm\", \"hgrextender\"),\n\t\t\t\t\t \"base\"\t\t\t\t\t\t=>\t\"hgr_minimal_form\",\n\t\t\t\t\t \"class\"\t\t\t\t\t\t=>\t\"\",\n\t\t\t\t\t \"icon\"\t\t\t\t\t\t=>\t\"hgr_minimal_form\",\n\t\t\t\t\t \"category\"\t\t\t\t\t=>\t__(\"HighGrade Extender\", \"hgrextender\"),\n\t\t\t\t\t \"as_parent\"\t\t\t\t\t=>\tarray(\"only\" =>\t\"hgr_minimal_input\"),\n\t\t\t\t\t \"description\"\t\t\t\t=>\t__(\"Minimal Form with advanced settings\", \"hgrextender\"),\n\t\t\t\t\t \"content_element\"\t\t\t=>\ttrue,\n\t\t\t\t\t \"show_settings_on_create\"\t=>\ttrue,\n\t\t\t\t\t \"params\"\t\t\t\t\t=>\tarray(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"dropdown\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Form size settings:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"form_size\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\t\"Large\"\t\t\t\t=>\t\"large\",\n\t\t\t\t\t\t\t\t\t\t\"Medium\"\t\t\t=>\t\"medium\",\n\t\t\t\t\t\t\t\t\t\t\"Small\"\t\t\t \t=>\t\"small\",\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Choose from our 3 preset values.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"dropdown\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Form style settings:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"form_style\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\t\"Standard\"\t\t\t\t=>\t\"standard\",\n\t\t\t\t\t\t\t\t\t\t\"Advanced\"\t\t\t\t=>\t\"advanced\",\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Choose customization settings.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"number\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Label text size:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"label_text_size\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t'',\n\t\t\t\t\t\t\t\t\"min\"\t\t\t=>\t8,\n\t\t\t\t\t\t\t\t\"max\"\t\t\t=>\t80,\n\t\t\t\t\t\t\t\t\"suffix\"\t\t=>\t\"px\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Set label text size in pixels.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"dependency\"\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"element\"\t=>\t\"form_style\",\n\t\t\t\t\t\t\t\t\t\"value\"\t\t=>\tarray( \"advanced\" ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Label text color:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"label_text_color\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Set label text color.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"dependency\"\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"element\"\t=>\t\"form_style\",\n\t\t\t\t\t\t\t\t\t\"value\"\t\t=>\tarray( \"advanced\" ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Input text color:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"input_text_color\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Set input text color.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"dependency\"\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"element\"\t=>\t\"form_style\",\n\t\t\t\t\t\t\t\t\t\"value\"\t\t=>\tarray( \"advanced\" )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Next icon color:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"next_icon_color\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Set next icon color.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"dependency\"\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"element\"\t=>\t\"form_style\",\n\t\t\t\t\t\t\t\t\t\"value\"\t\t=>\tarray( \"advanced\" ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t \"type\"\t\t\t=>\t\"textfield\",\n\t\t\t\t\t\t\t\t \"class\"\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t \"heading\"\t\t=>\t__(\"Confirmation text:\",\"hgrextender\"),\n\t\t\t\t\t\t\t\t \"param_name\"\t=>\t\"confirmation_text\",\n\t\t\t\t\t\t\t\t \"value\"\t\t=>\t\"Form has been submitted. Thank you for your time!\",\n\t\t\t\t\t\t\t\t \"description\"\t=>\t__(\"Thank you message after the form is submitted.\",\"hgrextender\"),\n\t\t\t\t\t\t\t\t \"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"number\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Confirmation text size:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"confirmation_text_size\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t'',\n\t\t\t\t\t\t\t\t\"min\"\t\t\t=>\t8,\n\t\t\t\t\t\t\t\t\"max\"\t\t\t=>\t80,\n\t\t\t\t\t\t\t\t\"suffix\"\t\t=>\t\"px\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Set confirmation text size in pixels.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"dependency\"\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"element\"\t=>\t\"form_style\",\n\t\t\t\t\t\t\t\t\t\"value\"\t\t=>\tarray( \"advanced\" ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Confirmation text color:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"confirmation_text_color\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Set confirmation text color.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"dependency\"\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"element\"\t=>\t\"form_style\",\n\t\t\t\t\t\t\t\t\t\"value\"\t\t=>\tarray( \"advanced\" ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Steps text color:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"steps_text_color\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Set steps text color.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"dependency\"\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"element\"\t=>\t\"form_style\",\n\t\t\t\t\t\t\t\t\t\"value\"\t\t=>\tarray( \"advanced\" ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Form input background color:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"form_input_color\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Set color for input background.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"dependency\"\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"element\"\t=>\t\"form_style\",\n\t\t\t\t\t\t\t\t\t\"value\"\t\t=>\tarray( \"advanced\" ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Progress bar background color:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"progress_bar_bgcolor\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Set the background color for progress bar.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"dependency\"\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"element\"\t=>\t\"form_style\",\n\t\t\t\t\t\t\t\t\t\"value\"\t\t=>\tarray( \"advanced\" ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'type' => 'css_editor',\n\t\t\t\t\t\t\t\t'heading' => __( 'Css', 'hgrextender' ),\n\t\t\t\t\t\t\t\t'param_name' => 'css',\n\t\t\t\t\t\t\t\t'group' => __( 'Design options', 'hgrextender' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t\"js_view\"\t=>\t\"VcColumnView\"\n\t\t\t\t));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t\tChild element\n\t\t\t\t*/\n\t\t\t\tvc_map(\n\t\t\t\t\tarray(\n\t\t\t\t\t \"name\"\t\t\t\t=>\t__(\"Input field\", \"hgrextender\"),\n\t\t\t\t\t \"holder\"\t\t\t=>\t\"div\",\n\t\t\t\t\t \"base\"\t\t\t\t=>\t\"hgr_minimal_input\",\n\t\t\t\t\t \"class\"\t\t\t\t=>\t\"\",\n\t\t\t\t\t \"icon\"\t\t\t\t=>\t\"\",\n\t\t\t\t\t \"content_element\"\t=>\ttrue,\n\t\t\t\t\t \"as_child\"\t\t\t=>\tarray(\"only\" =>\t\"hgr_minimal_form\"),\n\t\t\t\t\t \"params\"\t\t\t=>\tarray(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"textfield\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Label text:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"label_text\",\n\t\t\t\t\t\t\t\t\"admin_label\" \t=> \ttrue,\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Set a label text (eg. First name, Address, Telephone).\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"dropdown\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Input type\",\"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"input_type\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\t\"Text\"\t\t=>\t\"text\",\n\t\t\t\t\t\t\t\t\t\t\"E-mail\"\t=>\t\"e-mail\",\n\t\t\t\t\t\t\t\t\t\t\"Telephone\"\t=>\t\"telephone\",\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Select input type. This will verify submitted data.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t )\n\t\t\t\t\t) \n\t\t\t\t);\n\t\t\t}\n\t\t}",
"function form( $instance ) {\n\n require( 'src/widget-fields.php' );\n }",
"public function FormAction()\n {\n return Controller::join_links($this->_widgetEditor->Link('field'), str_replace('\\\\', '_', $this->_widget->ClassName), '');\n }",
"public function init()\n\t{\n\t\tparent::init();\n\n\t\t// Set the form's attributes\n\t\t$this->setName('classesForm');\n\t\t$this->setMethod(self::METHOD_POST);\n\n\t\t// Id\n\t\t$id = new Zend_Form_Element_Hidden('class_id');\n\t\t$id->setOptions(array(\n\t\t\t\t'required' => false,\n\t\t\t\t'filters' => array(\n\t\t\t\t\t\t'StringTrim',\n\t\t\t\t\t\t'StripTags'\n\t\t\t\t),\n\t\t\t\t'decorators' => array('ViewHelper')\n\t\t));\n\t\t$this->addElement($id);\n\n\t\t// Name\n\t\t$name = new Zend_Form_Element_Text('class_name');\n\t\t$name->setOptions(array(\n\t\t\t\t'label' => 'ClassForm:@Name',\n\t\t\t\t'required' => true,\n\t\t\t\t'filters' => array(\n\t\t\t\t\t\t'StringTrim',\n\t\t\t\t\t\t'StripTags'\n\t\t\t\t),\n\t\t\t\t'validators' => array('NotEmpty'),\n\t\t\t\t'decorators' => array('ViewHelper'),\n\t\t\t\t'autocomplete' => 'off'\n\t\t));\n\t\t$this->addElement($name);\n\n\t\t// Code\n\t\t$code = new Zend_Form_Element_Text('class_code');\n\t\t$code->setOptions(array(\n\t\t\t\t'label' => 'ClassForm:@Code',\n\t\t\t\t'required' => true,\n\t\t\t\t'filters' => array(\n\t\t\t\t\t\t'StringTrim',\n\t\t\t\t\t\t'StripTags'\n\t\t\t\t),\n\t\t\t\t'validators' => array('NotEmpty'),\n\t\t\t\t'decorators' => array('ViewHelper'),\n\t\t\t\t'autocomplete' => 'off'\n\t\t));\n\t\t$this->addElement($code);\n\t\t\n\t\t// Period\n\t\t$period = new Lumia_Form_Element_Period('class_period');\n\t\t$period->setOptions(array(\n\t\t\t\t'label' => 'ClassForm:@Period',\n\t\t\t\t'filters' => array(\n\t\t\t\t\t\t'StringTrim',\n\t\t\t\t\t\t'StripTags'\n\t\t\t\t),\n\t\t\t\t'decorators' => array('ViewHelper'),\n\t\t\t\t'autocomplete' => 'off'\n\t\t));\n\t\t$this->addElement($period);\n\t\t\n\t\t// Homeroom teacher\n\t\t$homeroomTeacher = new Zend_Form_Element_Select('class_teacher');\n\t\t$homeroomTeacher->setOptions(array(\n\t\t\t\t'label' => 'ClassForm:@Homeroom teacher',\n\t\t\t\t'required' => true,\n\t\t\t\t'filters' => array(\n\t\t\t\t\t\t'StringTrim',\n\t\t\t\t\t\t'StripTags'\n\t\t\t\t),\n\t\t\t\t'multiOptions' => array(\n\t\t\t\t\t\tnull => 'ClassForm:@Default'\n\t\t\t\t),\n\t\t\t\t'validators' => array('NotEmpty'),\n\t\t\t\t'decorators' => array('ViewHelper')\n\t\t));\n\t\t\n\t\t$teacherModel = new Admin_Model_Teacher();\n\t\t$teacherRows = $teacherModel->allActivate();\n\t\tif ($teacherRows->count())\n\t\t{\n\t\t\tforeach ($teacherRows as $teacherRow)\n\t\t\t{\n\t\t\t\t$homeroomTeacher->addMultiOption($teacherRow->teacher_id, $teacherRow->teacher_name);\n\t\t\t}\n\t\t}\n\n\t\t$this->addElement($homeroomTeacher);\n\n\t\t// Status\n\t\t$status = new Zend_Form_Element_Radio('class_status');\n\t\t$status->setOptions(array(\n\t\t\t\t'label' => 'ClassForm:@Status',\n\t\t\t\t'required' => true,\n\t\t\t\t'filters' => array(\n\t\t\t\t\t\t'StringTrim',\n\t\t\t\t\t\t'StripTags'\n\t\t\t\t),\n\t\t\t\t'multiOptions' => array(\n\t\t\t\t\t\t1 => 'ClassForm:@Status active',\n\t\t\t\t\t\t0 => 'ClassForm:@Status inactive'\n\t\t\t\t),\n\t\t\t\t'validators' => array('NotEmpty'),\n\t\t\t\t'decorators' => array('ViewHelper'),\n\t\t\t\t'autocomplete' => 'off'\n\t\t));\n\t\t$this->addElement($status);\n\t\t\n\t\t// Department\n\t\t$department = new Zend_Form_Element_Select('class_department');\n\t\t$department->setOptions(array(\n\t\t\t\t'label' => 'ClassForm:@Department',\n\t\t\t\t'required' => true,\n\t\t\t\t'filters' => array(\n\t\t\t\t\t\t'StringTrim',\n\t\t\t\t\t\t'StripTags'\n\t\t\t\t),\n\t\t\t\t'multiOptions' => array(\n\t\t\t\t\t\tnull => 'ClassForm:@Default'\n\t\t\t\t),\n\t\t\t\t'validators' => array('NotEmpty'),\n\t\t\t\t'decorators' => array('ViewHelper')\n\t\t));\n\n\t\t$departmentModel = new Admin_Model_Department();\n\t\t$departmentRows = $departmentModel->allActivate();\n\t\tif ($departmentRows->count())\n\t\t{\n\t\t\tforeach ($departmentRows as $departmentRow)\n\t\t\t{\n\t\t\t\t$department->addMultiOption($departmentRow->department_id, $departmentRow->department_name);\n\t\t\t}\n\t\t}\n\n\t\t$this->addElement($department);\n\t\t\n\t\t// Save button\n\t\t$submit = new Zend_Form_Element_Submit('btnSave');\n\t\t$submit->setOptions(array(\n\t\t\t\t'label' => 'Form:@Button save',\n\t\t\t\t'decorators' => array('ViewHelper')\n\t\t));\n\t\t$this->addElement($submit);\n\n\t\t// Reset button\n\t\t$submit = new Zend_Form_Element_Button('btnReset');\n\t\t$submit->setOptions(array(\n\t\t\t\t'label' => 'Form:@Button reset',\n\t\t\t\t'type' => 'reset',\n\t\t\t\t'decorators' => array('ViewHelper')\n\t\t));\n\n\t\t$this->addElement($submit);\n\t}",
"function ctools_term_parent_settings_form($conf) {\n $form['type'] = array(\n '#type' => 'select',\n '#title' => t('Relationship type'),\n '#options' => array('parent' => t('Immediate parent'), 'top' => t('Top level term')),\n '#default_value' => $conf['type'],\n );\n\n return $form;\n}",
"public static function __getDriverPath($type)\n {\n return self::__getClassPath($type) . \"/field.{$type}.php\";\n }",
"public function getName()\n {\n return 'content_form';\n }",
"public function getNextSubForm() {\n $storedForms = $this->getStoredForms();\n $potentialForms = $this->getPotentialForms();\n\n foreach ($potentialForms as $name) {\n if (!in_array($name, $storedForms)) {\n return $this->getForm()->getSubForm($name);\n }\n }\n\n return false;\n }",
"public function form( $instance ){\n }",
"protected function _getType()\n\t{\n\t\t$class = preg_replace('/.*\\\\\\([^\\\\\\]+)$/', '$1', get_called_class());\n\t\t$class = preg_replace('/C(.*)FormElement/i', '$1', $class);\n\t\t$class = strtolower($class);\n\n\t\treturn $class;\n\t}",
"public function retrieveForms()\n {\n return $this->start()->uri(\"/api/form\")\n ->get()\n ->go();\n }",
"public function init()\n {\n $this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_PersonalDetails(), 'subform_personaldetails');\n \t$this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_DataProtection(), 'subform_dataprotection');\n $this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_CorrespondenceDetails(), 'subform_correspondencedetails');\n $this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_InsuredAddress(), 'subform_insuredaddress');\n $this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_PolicyDetails(), 'subform_policydetails');\n $this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_IDD(), 'subform_idd');\n }",
"public function addform() {\n require_once 'modeles/etudiant_modele.php';\n require_once 'vues/etudiants/etudiants_addform_vue.php';\n }",
"protected function getNameFormFileIn()\n {\n $formName = str_replace(' ', '', ucwords(str_replace('-', ' ', $this->owner->id)));\n return \"Form\" . $formName . ucfirst($this->owner->action->actionMethod) . 'In';\n }",
"public function getConfigForm() {\n $rooms = array();\n\n $rooms['0'] = 'None';\n\n $regions = array();\n\n //die($this->getHouse());\n\n $housesService = new HomeNet_Model_House_Service();\n $house = $housesService->getObjectByIdWithRooms($this->getHouse());\n\n $r = $housesService->getHouseRegionNames($this->getHouse());\n\n foreach($r as $region){\n $regions[$region['id']] = $region['name'];\n }\n\n foreach($house->rooms as $room){\n $region = $regions[$room->region];\n $rooms[$region][$room->id] = $room->name;\n }\n\n $form = new Zend_Form();\n\n $subdevices = $this->getSubdevices();\n\n //debugArray($this->settings);\n // die(debugArray($subdevices));\n\n foreach ($subdevices as $position => $subdevice) {\n\n $sub = $subdevice->getConfigForm();\n\n \n if (!empty($subdevice)) {\n \n //set default name\n $name = $sub->getElement('name');//\n if(empty($subdevice->name) && !empty($this->settings['subdevice'.$position.'name'])){\n $name->setValue($this->settings['subdevice'.$position.'name']); \n } \n \n $room = $sub->getElement('room');\n $room->setMultiOptions($rooms);\n\n if(empty($subdevice->room)){\n $room->setValue($this->getRoom());\n }\n\n $sub->setLegend('Subdevice ' . $position . ': ' . $subdevice->name);\n\n $form->addSubForm($sub, 'subdevice' . $position);\n }\n }\n\n //die(debugArray($sub));\n\n return $form;\n }",
"public function getResourceClass();",
"public function getFormTypeClass() {\n return NomenclatureType::class;\n }",
"public function form(): void {\n include \"admin\" . DS . \"form.php\";\n }",
"protected function form()\n {\n $form = new Form(new Category);\n $module_model = new Module();\n\n $options = $this->category_model->getOptions();\n $form->select('parent_id', '父ID')->options($options);\n $form->select('module_id', '模块ID')->options($module_model->getOptions());\n $form->text('name', '名称');\n $form->number('order', '排序');\n $form->text('alias', '别名');\n $form->icon('icon', '图标');\n $form->image('image', '图片')->uniqueName();\n $form->url('link', '链接');\n $form->text('seo_title', 'Seo 标题');\n $form->text('seo_keywords', 'Seo 关键词');\n $form->textarea('seo_description', 'Seo 描述');\n $form->text('index_template', '首页模版');\n $form->text('detail_template', '详情模版');\n $form->switch('status', '状态')->default(1);\n\n $form->saving(function (Form $form) {\n\n if(!empty($form->model()->id)){\n if($form->model()->id == $form->parent_id){\n $error = new MessageBag([\n 'title' => '父ID值有误',\n 'message' => '父ID不允许为自身',\n ]);\n return back()->with(compact('error'));\n }\n }\n\n if(!empty($form->model()->id)){\n $categories = $this->category_model->all()->toArray();\n $ids = getSonIds($form->model()->id,$categories);\n if(in_array($form->parent_id,$ids)){\n $error = new MessageBag([\n 'title' => '父ID值有误',\n 'message' => '父ID不允许为自身的子集',\n ]);\n\n return back()->with(compact('error'));\n }\n }\n });\n\n return $form;\n }",
"public function setupSimpleClasses($form) {\n\t\t$this->classButtons($form);\n\t\tforeach ($form->getControls() as $control) {\n\t\t\tif ($control instanceof \\Nette\\Forms\\Controls\\Button) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\t$controlClass = $control->getControlPrototype()->class;\n\t\t\t\tif (strpos($controlClass, 'select2') === false) {\n\t\t\t\t\t$control->getControlPrototype()->class(\"form-control $controlClass\");\n\t\t\t\t}\n\t\t\t\t$control->getLabelPrototype()->class('control-label ');\n\t\t\t}\n\t\t}\n\t}",
"public function getFullQualifiedClassname() : string\n {\n return $this->fqcn;\n \n }",
"function getFormDefinition($formid) {\n $form_table = new Table(json_decode(file_get_contents(dirname(__FILE__) .RenderForm::$form_config), true));\n //join the datasource\n $source_table = new Table(json_decode(file_get_contents(dirname(__FILE__) .RenderForm::$source_config), true));\n $form_table->join($source_table, [\"DataSource\" => \"ID\"]);\n $join_table = new Table(json_decode(file_get_contents(dirname(__FILE__) .RenderForm::$sourcechild_config), true));\n \n $form_definition = $form_table->read(new Query(['ID' => ['=' => $formid]]));\n if(!$form_definition) {\n $error = new Response(500, \"Invalid Form\");\n $error->send();\n }\n $form = $form_definition[0];\n //query the children separately\n $source = [\n \"Name\" => $this->safeGet($form, \"DataSource.Name\"),\n \"Table\" => $this->safeGet($form, \"DataSource.Root\"),\n \"Structure\" => [\n \"Table\" => $this->safeGet($form, \"DataSource.Definition\"),\n \"Key\" => $this->safeGet($form, \"DataSource.Reference\")\n ]\n ];\n $source_id = $this->safeGet($form, \"DataSource.ID\"); \n $joins = $join_table->read(new Query([\"DataSource\" => [\"=\" => $source_id]]));\n $formatted_joins = [];\n foreach($joins as $join) {\n $formatted_joins[] = [\n \"Table\" => $join['Root'],\n \"Type\" => $join['Type'],\n \"Alias\" => $join['Name']\n ];\n }\n $source[\"Joins\"] = $formatted_joins;\n $definition = json_decode($this->safeGet($form, \"Form.Data\"), true);\n return [\"form\" => $definition, \"source\" => $source, 'Name' => $this->safeGet($form, \"Form.Name\")];\n }",
"function child(string $subpath) {\n if (!$subpath)\n return $this;\n $subpath = explode('/', $subpath);\n $typeChildname = array_shift($subpath);\n $pos = strpos($typeChildname, '-');\n $type = substr($typeChildname, 0, $pos);\n $childname = substr($typeChildname, $pos+1);\n if ($type == 'dbServers')\n $child = new DbServer($this->path.'/dbServers-'.$childname, $this->yaml['dbServers'][$childname]);\n elseif ($type == 'views') {\n //echo \"<pre>yaml=\"; print_r($this->yaml);\n //echo \"childname=$childname<br>\\n\";\n $view = $this->yaml['views'][$childname];\n $child = new Table(\n $this->path.\"/views-$childname\",\n $this->yaml['dbServers'][$view['server']]['params'],\n \"$view[schema].$view[table]\",\n isset($view['criteria']) ? $view['criteria'] : []\n );\n }\n elseif ($type == 'ugeojson') {\n $ugeojson = $this->yaml['ugeojson'][$childname];\n $child = new UGeoJSON(\n $this->path.\"/ugeojson-$childname\",\n $ugeojson['url']\n );\n }\n else\n throw new \\Exception(\"Cas non prévu\");\n if (!$subpath)\n return $child;\n else\n return $child->child(implode('/',$subpath));\n }",
"public function model()\n {\n return FormInfo::class;\n }",
"public function defineFormFields()\n {\n return 'fields.yaml';\n }",
"function readNamePath()\r\n {\r\n $result=$this->className();\r\n\r\n if ($this->readOwner()!=null)\r\n {\r\n $s=$this->readOwner()->readNamePath();\r\n\r\n if ($s!=\"\") $result = $s . \".\" . $result;\r\n\r\n }\r\n\r\n return($result);\r\n }"
] | [
"0.62079877",
"0.5860808",
"0.5816864",
"0.5624751",
"0.56047815",
"0.5594288",
"0.5562095",
"0.5514982",
"0.54195565",
"0.54043114",
"0.5375375",
"0.5374392",
"0.5356819",
"0.53502023",
"0.5268945",
"0.5259698",
"0.525807",
"0.5250663",
"0.5250663",
"0.5238515",
"0.52246314",
"0.5210619",
"0.5209971",
"0.52094436",
"0.5206616",
"0.5204238",
"0.5188876",
"0.51866704",
"0.5185832",
"0.5171934",
"0.517044",
"0.5165697",
"0.5142879",
"0.5142628",
"0.51371336",
"0.513557",
"0.51332426",
"0.51319337",
"0.5129792",
"0.51258296",
"0.51108205",
"0.5104871",
"0.5081354",
"0.50782627",
"0.5058632",
"0.50566196",
"0.50140667",
"0.5004403",
"0.5002809",
"0.49939603",
"0.49933237",
"0.4988315",
"0.49877387",
"0.4979461",
"0.49706483",
"0.49662983",
"0.49581534",
"0.49498186",
"0.49484992",
"0.4946573",
"0.49438515",
"0.49408746",
"0.49278796",
"0.49273798",
"0.49260166",
"0.49217865",
"0.4911084",
"0.49108285",
"0.49059042",
"0.49046746",
"0.4902755",
"0.49018773",
"0.48986572",
"0.4892347",
"0.489169",
"0.48885357",
"0.4885162",
"0.488354",
"0.4880554",
"0.4876963",
"0.4859795",
"0.48474568",
"0.4844931",
"0.48444256",
"0.48424882",
"0.48417133",
"0.48405376",
"0.48377696",
"0.483168",
"0.4830928",
"0.48241025",
"0.48204193",
"0.48148534",
"0.48102367",
"0.48097998",
"0.47932872",
"0.47928166",
"0.4787038",
"0.4786417",
"0.47854224"
] | 0.49500585 | 57 |
create table excel pakai | private function makeMigrationXls(){
if(!Schema::hasTable('sap_')){
Schema::create('sap_', function (Blueprint $table) {
$table->increments('id');
foreach (array_keys($this->data[0]) as $key => $value) {
$table->string($value)->nullable();
}
});
}
foreach ($this->data as $value) {
DB::table('sap_')->insert($value);
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n parent::create();\n\n $sheet = $this->add_sheet();\n\n $this->add_table($sheet, $this->database, $this->generate_table());\n }",
"abstract public function createTable();",
"private function createDummyTable() {}",
"function createTable($name, $rows);",
"protected abstract function createTestTable();",
"public function createTable($table, $file){\n if ($result = $this->query(\"SHOW TABLES LIKE '\".$table.\"'\")) {\n if($result->num_rows == 1) {\n // echo \"Table exists. Skipping Creating table. Moving on to insertion\";\n return true;\n }\n }\n\n $file = fopen($file,'r');\n $column = fgetcsv($file);\n for($i=0;$i<sizeof($column);$i++){\n $this->columnName = implode(\" varchar(20),\",$column);\n }\n $createTable = \"CREATE TABLE \".$table.\"(id INT(11) NOT NULL AUTO_INCREMENT ,\".$this->columnName.\" varchar(20), PRIMARY KEY (`id`))\";\n echo $createTable;\n if($this->query($createTable)){\n // echo \"Created \";\n return true;\n } else {\n // echo \"Not Created\".$this->error;\n return false;\n }\n }",
"function exportDataToExcel($table_details,$file_name,$worksheet_name)\n\n\t{\n\t// Creating a workbook\n\t$workbook = new Spreadsheet_Excel_Writer();\n\t\n\t// sending HTTP headers\n\t$workbook->send(\"$file_name\".'xls');\n\t\n\t// Creating a worksheet\n\t$worksheet =& $workbook->addWorksheet(\"'$worksheet_name'\");\n\t\n\t\n\t\tif ($table_details)\n\t\t\t{\n\t\t\t\t$colcount=0; //for setting the footer colspan\n\t\t\t\tforeach($table_details[0] as $key=>$value)\n\t\t\t\t\t{\n\t\t\t\t\t$worksheet->write(0,$colcount ,$key );\n\t\t\t\t\t$colcount++;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t$i=0;\n\t\t\t$cnt=count($table_details);\n\t\t\t\n\t\t\tfor($j=0; $j<$cnt; $j++)\n\t\t\t\t{\n\t\n\t\t\t\t$cell=0;\n\t\t\t\tforeach($table_details[$j] as $key=>$value)\n\t\t\t\t\t{\n\t\n\t\t\t\t\t$worksheet->write($j+1,$cell ,$value );\n\t\t\t\t\t$cell++;\n\t\t\t\t\t}\n\t\n\t\t\t\t}\n\t$workbook->close();\n\t}",
"public function makeTableur()\n {\n return $this->setDocumentPropertiesWithMetas(new Spreadsheet());\n }",
"public function gen_excel() {\n $this->load->library('excel');\n //activate worksheet number 1\n $this->excel->setActiveSheetIndex(0);\n //name the worksheet\n $this->excel->getActiveSheet()->setTitle('Customer list');\n\n // load database\n $this->load->database();\n\n // load model\n // get all users in array formate\n $this->load->model('Welcome_model');\n\n \n// $data['res'] = $this->customer_model->load_product_data($product, $type);\n \n $table_data = $this->Welcome_model->select_Insert_data();\n \n// echo '<pre>';\n// print_r($res);\n// exit();\n \n// $this->customer_model->create_openJobOrder_excel($data);\n $this->Welcome_model->creat_Excel($table_data);\n }",
"function createTable($mifix = \"\", $data_table, $params = array(), $debug = FALSE)\n\t\t{\n\t\t\t$c = new rex_sql;\n\t\t\t$c->debugsql = $debug;\n\t\t\t$c->setQuery('CREATE TABLE IF NOT EXISTS `'.$data_table.'` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY );');\n\n\t\t\t// Tabellenset in die Basics einbauen, wenn noch nicht vorhanden\n\t\t\t$c = new rex_sql;\n\t\t\t$c->debugsql = $debug;\n\t\t\t$c->setQuery('DELETE FROM rex_'.$mifix.'_table where table_name=\"'.$data_table.'\"');\n\t\t\t$c->setTable('rex_'.$mifix.'_table');\n\n\t\t\t$params[\"table_name\"] = $data_table;\n\t\t\tif(!isset($params[\"status\"])) { $params[\"status\"] = 1; }\n\t\t\tif(!isset($params[\"name\"])) { $params[\"name\"] = 'Tabelle \"'.$data_table.'\"'; }\n\t\t\tif(!isset($params[\"prio\"])) { $params[\"prio\"] = 100; }\n\t\t\tif(!isset($params[\"search\"])) { $params[\"search\"] = 0; }\n\t\t\tif(!isset($params[\"hidden\"])) { $params[\"hidden\"] = 0; }\n\t\t\tif(!isset($params[\"export\"])) { $params[\"export\"] = 0; }\n\n\t\t\tforeach($params as $k => $v) { $c->setValue($k, $v); }\n\t\t\t$c->insert();\n\n\t\t\treturn TRUE;\n\n\t\t}",
"public function createTable()\n\t{\n\t\t$app = Factory::getApplication();\n\n\t\tif ($app->isSite())\n\t\t{\n\t\t\techo 'Error creating DB table - Need to run this in admin area';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$user = Factory::getUser();\n\n\t\tif (!$user->authorise('core.admin'))\n\t\t{\n\t\t\techo 'Error creating DB table - You need to be superadmin user to exeacute this task';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$jinput = $app->input;\n\t\t$context = $jinput->get->get('context', '', 'cmd');\n\n\t\tif (empty($context))\n\t\t{\n\t\t\techo 'Error creating DB table - No context is passed';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$model = $this->getModel('indexer');\n\t\t$model->createTable($context);\n\t}",
"public function excel()\n {\n Excel::create('ReporteExcel', function($excel) {\n $excel->sheet('EdadGenero', function($sheet) {\n $usersinfo = User::select(DB::raw(\"users.cc as Cedula_Ciudadania, users.lastname as Apellidos, users.name as Nombres, users.email as Email, users.cellphone as Celular, users.department as DepartamentoNac, users.city as CiudadNac, users.created_at as FechaRegistro\"))->get();\n $sheet->fromArray($usersinfo);\n });\n })->export('xls');\n\n }",
"function createTable($objSchema);",
"public function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\t$table_name \t = $this->table_name;\n\t\t$charset_collate = $wpdb->get_charset_collate();\n\n\t\t$query = \"CREATE TABLE {$table_name} (\n\t\t\tid bigint(10) NOT NULL AUTO_INCREMENT,\n\t\t\tname text NOT NULL,\n\t\t\tdate_created datetime NOT NULL,\n\t\t\tdate_modified datetime NOT NULL,\n\t\t\tstatus text NOT NULL,\n\t\t\tical_hash text NOT NULL,\n\t\t\tPRIMARY KEY id (id)\n\t\t) {$charset_collate};\";\n\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\tdbDelta( $query );\n\n\t}",
"private function createTables() {\n \n foreach($this->G->tableInfo as $table) {\n $this->tables[$table[\"title\"]] = new IdaTable($table[\"title\"]);\n } \n }",
"public function createTable()\n {\n // Create out table\n // First line of the file.\n $fh = $this->getInputFileHandle();\n rewind($fh);\n $fl = fgets($fh);\n // Trim and htmlentities the first line of the file to make column names\n $cols = array_map('trim', array_map('htmlentities', str_getcsv($fl, $this->vars['delimiter'], $this->vars['quotechar'], $this->vars['escapechar'])));\n // array to hold definitions\n $defs = array();\n // if our table *doesn't* have headers, give generic names\n if (!$this->vars['hh']) {\n $oc = $cols;\n $c = count($cols);\n $cols = array();\n for ($i = 0; $i < $c; $i++) {\n $col = \" `Column_\" . $i . \"` \";\n $col .= is_numeric($oc[$i]) ? \"DECIMAL(12,6) DEFAULT NULL\" :\n \"VARCHAR(512) CHARACTER SET \" . $this->vars['characterSet'] . \" COLLATE \" . $this->vars['collation'] . \" DEFAULT NULL\";\n $cols[] = $col;\n }\n } else {\n // if our table *does* have headers\n $file = new SplFileObject($this->vars['ifn']);\n $headers = $file->fgetcsv($this->vars['delimiter'], $this->vars['quotechar'], $this->vars['escapechar']);\n\n // number of columns to get for guessing types\n $n = min(10, $this->numLines());\n $firstNCols = array();\n for($i = 0; $i < $n; $i++){\n $firstNCols[$i] = $file->fgetcsv($this->vars['delimiter'], $this->vars['quotechar'], $this->vars['escapechar']);\n }\n $sl = $firstNCols[0];\n if(count($sl) !== count($cols)){\n $baseurl = explode('?', $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'])[0];\n trigger_error(\"Number of columns inconsistent throughout file. For more information, see the error documentation.\");\n exit(1);\n }\n\n // guess the column types from the first n rows of info\n $colTypes = array_fill(0,count($cols),null);\n for($i = 0; $i < $n; $i++){\n foreach ($cols as $j => $col) {\n if(!isset($firstNCols[$i])){\n trigger_error('Why don\\'t we have row ' . $i . '??');\n }\n if(!isset($firstNCols[$i][$j])){\n if(count($firstNCols[$i]) !== count($cols)){\n trigger_error('Column count is inconsistent throughout the file. If you\\'re sure you have the right amount of columns, please check the delimiter options.');\n }\n trigger_error('Why don\\'t we have column ' . $j . '??');\n }\n $colTypes[$j] = $this->guessType(\n $firstNCols[$i][$j],\n $colTypes[$j]\n );\n }\n }\n\n foreach($colTypes as $i => &$type){\n $type = (is_null($type)) ? 'VARCHAR(512) CHARACTER SET ' . $this->vars['characterSet'] . ' COLLATE ' . $this->vars['collation'] . '' : $type;\n }\n\n /*echo \"<pre>\";\n print_r(array_combine($cols,$colTypes));\n echo \"</pre>\";\n exit();*/\n\n // We can pretty much only guess two data types from one row of information\n foreach ($cols as $i => &$col) {\n $cname = $col;\n $col = ' `' . $cname . '` ';\n $col .= $colTypes[$i];\n $col .= \" COMMENT '$cname'\";\n }\n }\n // Always have an id column!\n array_unshift($cols, ' `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY COMMENT \\'id\\'');\n $SQL = \"CREATE TABLE IF NOT EXISTS `{$this->vars['db']['db']}`.`{$this->vars['db']['table']}` (\\n\";\n $SQL .= implode(\",\\n\", $cols);\n $SQL .= \"\\n) ENGINE=InnoDB DEFAULT CHARSET=\".$this->vars['characterSet'].\" CHARSET=\".$this->vars['characterSet'].\" COLLATE \".$this->vars['collation'].\";\";\n $this->executeSql($SQL);\n\n return $this;\n }",
"public function export_excel()\n\t{\n\t$data = array(\n array ('Name', 'Surname'),\n array('Schwarz', 'Oliver'),\n array('Test', 'Peter')\n );\n\t\t\n\t\t//$data = $this->db->get('test')->result_array();\n\t\t$this->load->library('Excel-Generation/excel_xml');\n\t\t$this->excel_xml->addArray($data);\n\t\t$this->excel_xml->generateXML('my-test');\n\t}",
"public function export(){\n include APPPATH.'third_party/PHPExcel/Classes/PHPExcel.php';\n \n // Panggil class PHPExcel nya\n $excel = new PHPExcel();\n\n // Settingan awal fil excel\n $excel->getProperties()->setCreator('My Notes Code')\n ->setLastModifiedBy('My Notes Code')\n ->setTitle(\"Data Buku\")\n ->setSubject(\"tb_buku\")\n ->setDescription(\"Laporan Semua Data Buku\")\n ->setKeywords(\"Data Buku\");\n\n // Buat sebuah variabel untuk menampung pengaturan style dari header tabel\n $style_col = array(\n 'font' => array('bold' => true), // Set font nya jadi bold\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER, // Set text jadi ditengah secara horizontal (center)\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n ),\n 'borders' => array(\n 'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n 'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n 'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n )\n );\n\n // Buat sebuah variabel untuk menampung pengaturan style dari isi tabel\n $style_row = array(\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER, // Set text jadi ditengah secara horizontal (center)\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n ),\n 'borders' => array(\n 'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n 'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n 'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n )\n );\n\n $excel->setActiveSheetIndex(0)->setCellValue('A1', \"RELASI INTI MEDIA ( FAMILIA, ISTANA MEDIA, QUDSI MEDIA DAN FORUM )\"); // Set kolom A1 dengan tulisan \"DATA SISWA\"\n $excel->setActiveSheetIndex(0)->setCellValue('A2', \"Jl. Permadi Nyutran RT/RW. 61/19 MJ II No. 1606 C, Wirogunan, Mergangsan, Yogyakarta 55151\"); // Set kolom A1 dengan tulisan \"DATA SISWA\"\n $excel->setActiveSheetIndex(0)->setCellValue('A3', \"Email: [email protected] Telp: (0274) 2870300\"); // Set kolom A1 dengan tulisan \"DATA SISWA\"\n $excel->setActiveSheetIndex(0)->setCellValue('A5', \"DATA BUKU\");\n $excel->getActiveSheet()->mergeCells('A1:N1'); // Set Merge Cell pada kolom A1 sampai E1\n $excel->getActiveSheet()->mergeCells('A2:N2'); // Set Merge Cell pada kolom A1 sampai E1\n $excel->getActiveSheet()->mergeCells('A3:N3'); // Set Merge Cell pada kolom A1 sampai E1\n $excel->getActiveSheet()->mergeCells('A5:N5'); // Set Merge Cell pada kolom A1 sampai E1\n $excel->getActiveSheet()->getStyle('A1')->getFont()->setBold(TRUE); // Set bold kolom A1\n $excel->getActiveSheet()->getStyle('A5')->getFont()->setBold(TRUE); // Set bold kolom A1\n $excel->getActiveSheet()->getStyle('A1')->getFont()->setSize(15); // Set font size 15 untuk kolom A1\n $excel->getActiveSheet()->getStyle('A5')->getFont()->setSize(15);\n $excel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $excel->getActiveSheet()->getStyle('A2')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $excel->getActiveSheet()->getStyle('A3')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $excel->getActiveSheet()->getStyle('A5')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); // Set text center untuk kolom A1\n\n // Buat header tabel nya pada baris ke 3\n $excel->setActiveSheetIndex(0)->setCellValue('A7', \"NO\"); // Set kolom A3 dengan tulisan \"NO\"\n $excel->setActiveSheetIndex(0)->setCellValue('B7', \"KODE BUKU\"); // Set kolom A3 dengan tulisan \"NO\"\n $excel->setActiveSheetIndex(0)->setCellValue('C7', \"JUDUL\"); // Set kolom B3 dengan tulisan \"NIS\"\n $excel->setActiveSheetIndex(0)->setCellValue('D7', \"KATEGORI\"); // Set kolom C3 dengan tulisan \"NAMA\"\n $excel->setActiveSheetIndex(0)->setCellValue('E7', \"PENULIS\"); // Set kolom D3 dengan tulisan \"JENIS KELAMIN\"\n $excel->setActiveSheetIndex(0)->setCellValue('F7', \"PENERBIT\");\n $excel->setActiveSheetIndex(0)->setCellValue('G7', \"UKURAN\");\n $excel->setActiveSheetIndex(0)->setCellValue('H7', \"JUMLAH HALAMAN\");\n $excel->setActiveSheetIndex(0)->setCellValue('I7', \"ISBN\");\n $excel->setActiveSheetIndex(0)->setCellValue('J7', \"TAHUN TERBIT\");\n $excel->setActiveSheetIndex(0)->setCellValue('K7', \"HARGA (Rp)\");\n $excel->setActiveSheetIndex(0)->setCellValue('L7', \"STOK\");\n $excel->setActiveSheetIndex(0)->setCellValue('M7', \"KETERANGAN\");\n $excel->setActiveSheetIndex(0)->setCellValue('N7', \"STATUS\");\n\n // Apply style header yang telah kita buat tadi ke masing-masing kolom header\n $excel->getActiveSheet()->getStyle('A7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('B7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('C7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('D7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('E7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('F7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('G7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('H7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('I7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('J7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('K7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('L7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('M7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('N7')->applyFromArray($style_col);\n\n\n // Panggil function view yang ada di SiswaModel untuk menampilkan semua data siswanya\n $buku = $this->buku_model->showAllBuku();\n\n $no = 1; // Untuk penomoran tabel, di awal set dengan 1\n $numrow = 8; // Set baris pertama untuk isi tabel adalah baris ke 4\n foreach($buku as $data){ // Lakukan looping pada variabel siswa\n $excel->setActiveSheetIndex(0)->setCellValue('A'.$numrow, $no);\n $excel->setActiveSheetIndex(0)->setCellValue('B'.$numrow, $data->kd_buku);\n $excel->setActiveSheetIndex(0)->setCellValue('C'.$numrow, $data->judul);\n $excel->setActiveSheetIndex(0)->setCellValue('D'.$numrow, $data->nama_kategori);\n $excel->setActiveSheetIndex(0)->setCellValue('E'.$numrow, $data->nama_penulis);\n $excel->setActiveSheetIndex(0)->setCellValue('F'.$numrow, $data->nama_penerbit);\n $excel->setActiveSheetIndex(0)->setCellValue('G'.$numrow, $data->ukuran);\n $excel->setActiveSheetIndex(0)->setCellValue('H'.$numrow, $data->jml_halaman);\n $excel->setActiveSheetIndex(0)->setCellValue('I'.$numrow, $data->isbn);\n $excel->setActiveSheetIndex(0)->setCellValue('J'.$numrow, $data->thn_terbit);\n $excel->setActiveSheetIndex(0)->setCellValue('K'.$numrow, $data->harga);\n $excel->setActiveSheetIndex(0)->setCellValue('L'.$numrow, $data->stok);\n $excel->setActiveSheetIndex(0)->setCellValue('M'.$numrow, $data->keterangan);\n $excel->setActiveSheetIndex(0)->setCellValue('N'.$numrow, $data->status);\n \n // Apply style row yang telah kita buat tadi ke masing-masing baris (isi tabel)\n $excel->getActiveSheet()->getStyle('A'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('B'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('C'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('D'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('E'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('F'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('G'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('H'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('I'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('J'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('K'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('L'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('M'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('N'.$numrow)->applyFromArray($style_row);\n \n $no++; // Tambah 1 setiap kali looping\n $numrow++; // Tambah 1 setiap kali looping\n }\n\n // Set width kolom\n $excel->getActiveSheet()->getColumnDimension('A')->setWidth(5); // Set width kolom A\n $excel->getActiveSheet()->getColumnDimension('B')->setWidth(13); // Set width kolom B\n $excel->getActiveSheet()->getColumnDimension('C')->setWidth(60); // Set width kolom C\n $excel->getActiveSheet()->getColumnDimension('D')->setWidth(25); // Set width kolom D\n $excel->getActiveSheet()->getColumnDimension('E')->setWidth(40); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('F')->setWidth(15); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('G')->setWidth(13); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('H')->setWidth(20); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('I')->setWidth(20); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('J')->setWidth(15); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('K')->setWidth(18); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('L')->setWidth(10); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('M')->setWidth(40); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('N')->setWidth(15); // Set width kolom E\n \n // Set height semua kolom menjadi auto (mengikuti height isi dari kolommnya, jadi otomatis)\n $excel->getActiveSheet()->getDefaultRowDimension()->setRowHeight(-1);\n\n // Set orientasi kertas jadi LANDSCAPE\n $excel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);\n\n // Set judul file excel nya\n $excel->getActiveSheet(0)->setTitle(\"Laporan Data Buku\");\n $excel->setActiveSheetIndex(0);\n\n // Proses file excel\n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n header('Content-Disposition: attachment; filename=\"Data Buku.xlsx\"'); // Set nama file excel nya\n header('Cache-Control: max-age=0');\n\n $write = PHPExcel_IOFactory::createWriter($excel, 'Excel2007');\n $write->save('php://output');\n }",
"public function test()\n {\n\t\t$data = Session::get('exdata');\n $title = ['id', 'name', 'sex'];\n\n\n $spreadsheet = new Spreadsheet();\n $worksheet = $spreadsheet->getActiveSheet();\n //设置工作表标题名称\n $worksheet->setTitle('测试Excel');\n\n //表头\n //设置单元格内容\n foreach ($title as $key => $value) {\n $worksheet->setCellValueByColumnAndRow($key + 1, 1, $value);\n }\n\t\tLog::write($data, 'exdataT');\n $row = 2; //第二行开始\n foreach ($data as $item) {\n $column = 1;\n foreach ($item as $value) {\n $worksheet->setCellValueByColumnAndRow($column, $row, $value);\n $column++;\n }\n $row++;\n }\n\n # 保存为xlsx\n $filename = '测试Excel.xlsx';\n $writer = IOFactory::createWriter($spreadsheet, 'Xlsx');\n $writer->save($filename);\n \n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n header('Content-Disposition: attachment;filename=\"'.$filename.'\"');\n header('Cache-Control: max-age=0');\n $writer->save('php://output');\n\n }",
"public function createSchemaTable();",
"function export_nik_unins_lunas()\n\t{\n\t\t$excel_id=$this->uri->segment(3);\n\t\t$datas = $this->model_transaction->get_lunas_gagal($excel_id);\n\t\t\n\t\t// Create new PHPExcel object\n\t\t$objPHPExcel = $this->phpexcel;\n\t\t// Set document properties\n\t\t$objPHPExcel->getProperties()->setCreator(\"MICROFINANCE\")\n\t\t\t\t\t\t\t\t\t ->setLastModifiedBy(\"MICROFINANCE\")\n\t\t\t\t\t\t\t\t\t ->setTitle(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t\t\t ->setSubject(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t\t\t ->setDescription(\"REPORT, generated using PHP classes.\")\n\t\t\t\t\t\t\t\t\t ->setKeywords(\"REPORT\")\n\t\t\t\t\t\t\t\t\t ->setCategory(\"Test result file\");\n\t\t\t\t\t\t\t\t\t \n\t\t$objPHPExcel->setActiveSheetIndex(0); \n\t\t\n\t\t/*\n\t\t| BORDER OPTION\n\t\t*/\n\t\t$styleArray['borders']['outline']['style']=PHPExcel_Style_Border::BORDER_THIN;\n\t\t$styleArray['borders']['outline']['color']['rgb']='000000';\n\t\t/*\n\t\t| SET COLUMN WIDTH\n\t\t*/\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(15);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(30);\n\n\t\t/*\n\t\t| ROW HEADER TITLE\n\t\t*/\n\t\t$row=1;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,\"List Pelunasan Tidak Sesuai\");\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row)->getFont()->setBold(true);\n\t\t\n\t\t$row+=1;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,\"NIK\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('B'.$row,\"Nama\");\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getFont()->setBold(true);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':A'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('B'.$row.':B'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\t\t$row+=1;\n\t\t/*\n\t\t| ROW DATA\n\t\t*/\n\t\tfor($i=0;$i<count($datas);$i++){\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,$datas[$i]['nik']);\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('B'.$row,$datas[$i]['nama']);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getFont()->setSize(11);\n\t\t\t$row++;\n\t\t}\n\n\t\theader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n\t\theader('Content-Disposition: attachment;filename=\"PELUNASAN TIDAK SESUAI.xlsx\"');\n\t\theader('Cache-Control: max-age=0');\n\n\t\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\t\t$objWriter->save('php://output');\n\t}",
"public function createTable()\n {\n $sql = \"\n CREATE TABLE IF NOT EXISTS `\".self::TABLE.\"`(\n `migration` VARCHAR(20) NOT NULL,\n `up` VARCHAR(1000) NOT NULL,\n `down` VARCHAR(1000) NOT NULL\n ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;\n \";\n\n $this->adapter->query($sql, Adapter::QUERY_MODE_EXECUTE);\n }",
"public function tableWizard() {}",
"public function createTransactionsTable()\n {\n $data = array(\n array('Transaction Start','Transaction End','Firstname',\n 'Surname','Amount','Currency','Paid','PRET/TNT')\n );\n\n foreach ($this->participants->findAll() as $participant) {\n $start = \"\";\n $end = \"\";\n\n $transaction = $participant->getSuccessfulTransaction();\n if ($transaction) {\n $start = $transaction->getTDate()->format(\"j.n.Y H:i\");\n if ($transaction->getTransactionEndDate()) {\n $end = $transaction->getTransactionEndDate()->format(\"j.n.Y H:i\");\n }\n }\n\n if ($participant->isPret()) {\n $amount = $this->pretEventHelper->getParticipantFee($participant);\n $currency = $this->pretEventHelper->getCurrency();\n } else {\n $amount = $this->tntEventHelper->getParticipantFee($participant);\n $currency = $this->tntEventHelper->getCurrency();\n }\n\n // if participant already paid, obtain appropriate amount\n if ($transaction) {\n $amount = $transaction->getAmount();\n }\n\n $data[] = array(\n $start, $end, $participant->getFirstname(), $participant->getSurname(),\n $amount, $currency, $participant->isPaid() ? \"Yes\" : \"No\",\n $participant->getPretOrTnt()\n );\n }\n\n $writer = new XLSXWriter();\n $writer->setTitle('IFMSA PRET/TNT Transactions Table');\n $writer->setSubject('');\n $writer->setAuthor('IFMSA PRET/TNT Website');\n $writer->setDescription('');\n $writer->setCompany('');\n $writer->writeSheet($data);\n return $writer->writeToString();\n }",
"private function _createTables()\r\n {\r\n return true;\r\n }",
"public function excel()\n {\n Excel::create('Lista de vehiculos', function($excel) {\n $excel->sheet('Excel sheet', function($sheet) {\n //otra opción -> $products = Product::select('name')->get();\n\n $vehiculo = Transporte::join('empleados', 'empleados.id', '=', 'transportes.chofer_id')\n ->select('transportes.nombre_Unidad','transportes.no_Serie','transportes.placas','transportes.poliza_Seguro','transportes.vigencia_Seguro','transportes.aseguradora','transportes.m3_Unidad','transportes.capacidad', \\DB::raw(\"concat(empleados.nombre,' ',empleados.apellidos) as 'name'\"))\n ->where('empleados.estado', 'Activo')\n ->get(); \n $sheet->fromArray($vehiculo);\n $sheet->row(1,['Nombre Vehiculo','Numero Serie','Placas','Poliza Seguro','Vigencia Seguro','Aseguradora','Capacidad Ubica','Capacidad','Nombre Chofer']);\n\n $sheet->setOrientation('landscape');\n });\n })->export('xls');\n }",
"private function createTables()\n {\n $this->createConfigsTable();\n $this->createServersTable();\n $this->createSearchesTable();\n }",
"protected function createTable() {\n $this->db->initializeQuery();\n $query = \"\nCREATE TABLE `items` (\n`id`INTEGER,\n`name`TEXT,\n`price`REAL,\nPRIMARY KEY(`id`)\n);\n\";\n\n $r = $this->db->q->Expr($query)->execute($this->db->c);\n \n }",
"public function createTable() {\n global $database;\n $SQL = \"CREATE TABLE IF NOT EXISTS `\".self::getTableName().\"` ( \".\n \"`src_id` INT(11) NOT NULL AUTO_INCREMENT, \".\n \"`i18n_id` INT(11) NOT NULL DEFAULT '-1', \".\n \"`src_file` VARCHAR(64) NOT NULL DEFAULT '', \".\n \"`src_path` TEXT, \".\n \"`src_module` VARCHAR(64) NOT NULL DEFAULT '', \".\n \"`src_line` INT(11) NOT NULL DEFAULT '-1', \".\n \"`src_status` ENUM('ACTIVE','BACKUP') NOT NULL DEFAULT 'ACTIVE', \".\n \"`src_timestamp` TIMESTAMP, \".\n \"PRIMARY KEY (`src_id`), KEY (`i18n_id`, `src_module`)\".\n \" ) ENGINE=MyIsam AUTO_INCREMENT=1 DEFAULT CHARSET utf8 COLLATE utf8_general_ci\";\n if (null == $database->query($SQL)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n return true;\n }",
"private function createNewTable() {\n //generate the create table statement\n $sql = \"create table $this->tableName(\";\n $comma = \"\";\n $keyNameList = [];\n foreach ($this->columns as $column /* @var $column DbColumn */) {\n $sql .= \" $comma $column->columnName $column->dataType $column->extraStuff\";\n $comma = \",\";\n if ($column->primaryKey === true) {\n $keyNameList[] = $column->columnName;\n }\n }\n //generate the primary key list, if any are present\n $primaryKeySql = \"\";\n if (count($keyNameList) > 0) {\n $primaryKeySql = \"primary key(\";\n $comma = \"\";\n foreach ($keyNameList as $keyName) {\n $primaryKeySql = \"$primaryKeySql $comma $keyName\";\n $comma = \",\";\n }\n $primaryKeySql = \",$primaryKeySql)\";\n }\n\n //constraints\n $cSql = \"\";\n //we are assuming that there is at least one table. otherwise, the query would fail anyway.\n $comma = \",\";\n foreach ($this->constraints as $c) {\n $cSql .= \" $comma\";\n switch ($c->constraintType) {\n case \"foreign key\":\n $cSql .= \" FOREIGN KEY($c->columnName) REFERENCES $c->referencesTableName($c->referencesColumnName)\";\n break;\n }\n }\n $sql = \"$sql $primaryKeySql $cSql)\";\n return DbManager::nonQuery($sql);\n }",
"function createTable(){\n \n $conn = $this->connect();\n \n $sql = 'CREATE TABLE IF NOT EXISTS ' . $this->dbtable . \n\t\t\t\t\t'( codigo INTEGER NOT NULL AUTO_INCREMENT, email VARCHAR(100), CONSTRAINT pk_' . $this->dbtable . \n\t\t\t\t\t' PRIMARY KEY (codigo)) ENGINE=INNODB CHARSET=utf8';\n $ret = mysql_query( $sql, $conn);\n mysql_close( $conn );\n\t\t\treturn $ret;\n }",
"protected function createTable() {\n\t\t$query = \"\n\t\tCREATE TABLE `items` (\n\t\t\t`id`\tINTEGER,\n\t\t\t`firstName`\tTEXT,\n\t\t\t`lastName`\tTEXT,\n\t\t\t`address`\tTEXT,\n\t\t\t'occupation' TEXT,\n\t\t\tPRIMARY KEY(`id`)\n\t\t);\n\t\t\";\n\t\t$this->PDO->query($query);\n\t}",
"function export_nik_unins_angsuran()\n\t{\n\t\t$angsuran_id=$this->uri->segment(3);\n\t\t$datas = $this->model_transaction->get_angsuran_unins($angsuran_id);\n\n\t\t// Create new PHPExcel object\n\t\t$objPHPExcel = $this->phpexcel;\n\t\t// Set document properties\n\t\t$objPHPExcel->getProperties()->setCreator(\"MICROFINANCE\")\n\t\t\t\t\t\t\t\t\t ->setLastModifiedBy(\"MICROFINANCE\")\n\t\t\t\t\t\t\t\t\t ->setTitle(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t\t\t ->setSubject(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t\t\t ->setDescription(\"REPORT, generated using PHP classes.\")\n\t\t\t\t\t\t\t\t\t ->setKeywords(\"REPORT\")\n\t\t\t\t\t\t\t\t\t ->setCategory(\"Test result file\");\n\t\t\t\t\t\t\t\t\t \n\t\t$objPHPExcel->setActiveSheetIndex(0); \n\t\t\n\t\t/*\n\t\t| BORDER OPTION\n\t\t*/\n\t\t$styleArray['borders']['outline']['style']=PHPExcel_Style_Border::BORDER_THIN;\n\t\t$styleArray['borders']['outline']['color']['rgb']='000000';\n\t\t/*\n\t\t| SET COLUMN WIDTH\n\t\t*/\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(15);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(30);\n\n\t\t/*\n\t\t| ROW HEADER TITLE\n\t\t*/\n\t\t$row=1;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,\"List Angsuran Non-Debet\");\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row)->getFont()->setBold(true);\n\t\t\n\t\t$row+=1;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,\"NIK\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('B'.$row,\"Nama\");\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getFont()->setBold(true);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':A'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('B'.$row.':B'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\t\t$row+=1;\n\t\t/*\n\t\t| ROW DATA\n\t\t*/\n\t\tfor($i=0;$i<count($datas);$i++){\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,$datas[$i]['nik']);\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('B'.$row,$datas[$i]['nama']);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getFont()->setSize(11);\n\t\t\t$row++;\n\t\t}\n\n\t\theader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n\t\theader('Content-Disposition: attachment;filename=\"ANGSURAN NON-DEBET.xlsx\"');\n\t\theader('Cache-Control: max-age=0');\n\n\t\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\t\t$objWriter->save('php://output');\n\t}",
"protected function createTestTables()\n {\n $db = $this->getDb();\n\n $table = 'EmailTemplateAr';\n $columns = [\n 'id' => 'pk',\n 'name' => 'string',\n 'subject' => 'string',\n 'bodyHtml' => 'text',\n ];\n $db->createCommand()->createTable($table, $columns)->execute();\n\n $columns = [\n 'name' => 'TestActiveMessage',\n 'subject' => 'test subject',\n 'bodyHtml' => 'test body HTML',\n ];\n $db->createCommand()->insert($table, $columns)->execute();\n }",
"function create_table($table_name, $field_name, $field_type, $field_length){\n // $sql_chk = db::query(\"SELECT COUNT(*) AS TOTAL FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_CATALOG='\".strtoupper(db::$_dbName).\"' AND TABLE_NAME = '\".$table_name.\"'\");\n // $rec_chk = db::fetch_array($sql_chk);\n // if($rec_chk['TOTAL'] > 0)\n // {\n // echo \"<script>alert('ตาราง \".$table_name.\" ถูกใช้งานแล้ว กรุณาตรวจสอบ'); window.location.href='\".$_SERVER['HTTP_REFERER'].\"';</script>\";\n // db::db_close();\n // exit;\n // }\n\n $field_length = $field_length == \"\" ? \"\" : \"(\".$field_length.\")\";\n\n $sql_create = \" CREATE TABLE [dbo].[\".$table_name.\"]([\".$field_name.\"] \".$field_type.\" \".$field_length.\" NOT NULL, PRIMARY KEY ([\".$field_name.\"]))\";\n\n }",
"abstract public function openTableHead();",
"function mscaffolding_create_table($name, $data)\n\t{\n\t\t$query_string = \"CREATE TABLE `\" . lconf_get(\"db_name\") . \"`.`\" . $name . \"` (`id` INT NOT NULL AUTO_INCREMENT,\";\n\n\t\tfor ($i = 0; $i < count($data) / 2; $i++)\n\t\t{\n\t\t\t$query_string .= \"`\" . $data[\"name\" . $i] . \"`\" . mscaffolding_get_type($data[\"type\" . $i]);\n\t\t}\n\n\t\t$query_string .= \" PRIMARY KEY ( `id` )) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_slovenian_ci\";\n\n\t\treturn ldb_query($query_string);\n\t}",
"public function export()\n\t{\n\t\tinclude APPPATH . 'third_party/PHPExcel/PHPExcel.php';\n\n\t\t// Panggil class PHPExcel nya\n\t\t$excel = new PHPExcel();\n\n\t\t// Settingan awal fil excel\n\t\t$excel->getProperties()->setCreator('PT Pelindo')\n\t\t\t->setLastModifiedBy('PT Pelindo')\n\t\t\t->setTitle(\"Rekap Rapor Akhlak\")\n\t\t\t->setSubject(\"Rekap Rapor Akhlak\")\n\t\t\t->setDescription(\"Rekap Rapor Akhlak\")\n\t\t\t->setKeywords(\"Rekap Rapor Akhlak\");\n\n\t\t// Buat sebuah variabel untuk menampung pengaturan style dari header tabel\n\t\t$style_col = array(\n\t\t\t'font' => array('bold' => true), // Set font nya jadi bold\n\t\t\t'alignment' => array(\n\t\t\t\t'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER, // Set text jadi ditengah secara horizontal (center)\n\t\t\t\t'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n\t\t\t),\n\t\t\t'borders' => array(\n\t\t\t\t'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n\t\t\t\t'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n\t\t\t\t'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n\t\t\t\t'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n\t\t\t)\n\t\t);\n\n\t\t// Buat sebuah variabel untuk menampung pengaturan style dari isi tabel\n\t\t$style_row = array(\n\t\t\t'alignment' => array(\n\t\t\t\t'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n\t\t\t),\n\t\t\t'borders' => array(\n\t\t\t\t'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n\t\t\t\t'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n\t\t\t\t'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n\t\t\t\t'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n\t\t\t)\n\t\t);\n\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('A1', \"Rekap Rapor Akhlak\"); // Set kolom A1 dengan tulisan \"Rekap Rapor Akhlak\"\n\t\t$excel->getActiveSheet()->mergeCells('A1:J1'); // Set Merge Cell pada kolom A1 sampai E1\n\t\t$excel->getActiveSheet()->getStyle('A1')->getFont()->setBold(TRUE); // Set bold kolom A1\n\t\t$excel->getActiveSheet()->getStyle('A1')->getFont()->setSize(15); // Set font size 15 untuk kolom A1\n\t\t$excel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); // Set text center untuk kolom A1\n\n\t\t// Buat header tabel nya pada baris ke 3\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('A3', \"NO\"); // Set kolom A3 dengan tulisan \"NO\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('B3', \"NAMA CABANG\"); // Set kolom B3 dengan tulisan \"NIS\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('C3', \"NILAI AMANAH\"); // Set kolom C3 dengan tulisan \"NAMA\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('D3', \"NILAI KOMPETEN\"); // Set kolom D3 dengan tulisan \"JENIS KELAMIN\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('E3', \"NILAI HARMONIS\"); // Set kolom E3 dengan tulisan \"ALAMAT\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('F3', \"NILAI LOYAL\"); // Set kolom E3 dengan tulisan \"ALAMAT\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('G3', \"NILAI ADAPTIF\"); // Set kolom E3 dengan tulisan \"ALAMAT\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('H3', \"NILAI KOLABORATIF\"); // Set kolom E3 dengan tulisan \"ALAMAT\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('I3', \"NILAI TOTAL\"); // Set kolom E3 dengan tulisan \"ALAMAT\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('J3', \"TANGGAL UPLOAD\"); // Set kolom E3 dengan tulisan \"ALAMAT\"\n\n\t\t// Apply style header yang telah kita buat tadi ke masing-masing kolom header\n\t\t$excel->getActiveSheet()->getStyle('A3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('B3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('C3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('D3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('E3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('F3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('G3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('H3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('I3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('J3')->applyFromArray($style_col);\n\n\t\t// Panggil function view yang ada di SiswaModel untuk menampilkan semua data siswanya\n\t\t$siswa = $this->RaporModel->view();\n\n\t\t$no = 1; // Untuk penomoran tabel, di awal set dengan 1\n\t\t$numrow = 4; // Set baris pertama untuk isi tabel adalah baris ke 4\n\t\tforeach ($siswa as $data) { // Lakukan looping pada variabel siswa\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('A' . $numrow, $no);\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('B' . $numrow, $data->cabang);\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('C' . $numrow, $data->nilai_amanah . '%');\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('D' . $numrow, $data->nilai_kompeten . '%');\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('E' . $numrow, $data->nilai_harmonis . '%');\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('F' . $numrow, $data->nilai_loyal . '%');\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('G' . $numrow, $data->nilai_adaptif . '%');\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('H' . $numrow, $data->nilai_kolab . '%');\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('I' . $numrow, $data->nilai_total . '%');\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('J' . $numrow, $data->created_at);\n\n\t\t\t// Apply style row yang telah kita buat tadi ke masing-masing baris (isi tabel)\n\t\t\t$excel->getActiveSheet()->getStyle('A' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('B' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('C' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('D' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('E' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('F' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('G' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('H' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('I' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('J' . $numrow)->applyFromArray($style_row);\n\n\t\t\t$no++; // Tambah 1 setiap kali looping\n\t\t\t$numrow++; // Tambah 1 setiap kali looping\n\t\t}\n\n\t\t// Set width kolom\n\t\t$excel->getActiveSheet()->getColumnDimension('A')->setWidth(2); // Set width kolom A\n\t\t$excel->getActiveSheet()->getColumnDimension('B')->setWidth(14); // Set width kolom B\n\t\t$excel->getActiveSheet()->getColumnDimension('C')->setWidth(14); // Set width kolom C\n\t\t$excel->getActiveSheet()->getColumnDimension('D')->setWidth(16); // Set width kolom D\n\t\t$excel->getActiveSheet()->getColumnDimension('E')->setWidth(16); // Set width kolom E\n\t\t$excel->getActiveSheet()->getColumnDimension('F')->setWidth(12); // Set width kolom E\n\t\t$excel->getActiveSheet()->getColumnDimension('G')->setWidth(14); // Set width kolom E\n\t\t$excel->getActiveSheet()->getColumnDimension('H')->setWidth(19); // Set width kolom E\n\t\t$excel->getActiveSheet()->getColumnDimension('I')->setWidth(12); // Set width kolom E\n\t\t$excel->getActiveSheet()->getColumnDimension('J')->setWidth(19); // Set width kolom E\n\n\t\t// Set height semua kolom menjadi auto (mengikuti height isi dari kolommnya, jadi otomatis)\n\t\t$excel->getActiveSheet()->getDefaultRowDimension()->setRowHeight(-1);\n\n\t\t// Set orientasi kertas jadi LANDSCAPE\n\t\t$excel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);\n\n\t\t// Set judul file excel nya\n\t\t$excel->getActiveSheet(0)->setTitle(\"Rekap Rapor Akhlak\");\n\t\t$excel->setActiveSheetIndex(0);\n\n\t\t// Proses file excel\n\t\theader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n\t\theader('Content-Disposition: attachment; filename=\"Rekap Rapor Akhlak.xlsx\"'); // Set nama file excel nya\n\t\theader('Cache-Control: max-age=0');\n\n\t\t$write = PHPExcel_IOFactory::createWriter($excel, 'Excel2007');\n\t\t$write->save('php://output');\n\t}",
"function importData($tabName, $filePath) \n{\n\tglobal $mysqli;\n\tif (!file_exists($filePath)) {\n\t\tdie(\"Error: El archivo \".$filePath.\" No existe!\");\n\t}\n\t$data = array();\n\tif (($gestor = fopen($filePath, \"r\")) !== FALSE) {\n\t\twhile ($datos = fgetcsv($gestor, 1000, \";\")) {\n\t\t\t$data[]=$datos;\n\t\t}\n\t \n\t fclose($gestor);\n\t}\t\n\t$create=\"CREATE TABLE IF NOT EXISTS `$tabName` (\n\t `id` int(8) NOT NULL AUTO_INCREMENT,\n\t `name` varchar(100) NOT NULL,\n\t `author` varchar(30) NOT NULL,\n\t `isbn` varchar(30) NOT NULL,\n\t PRIMARY KEY (`id`)\n\t) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1\";\n\n\t$insert = \"INSERT INTO $tabName (\";\n\n\t$create=\"CREATE TABLE IF NOT EXISTS `$tabName` (\";\n\tfor ($i=0; $i < count($data[0]) ; $i++) { \n\t\tif ($i==count($data[0])-1) {\n\t\t\t$insert.=strtolower($data[0][$i].\" )\");\n\t\t\t$create.=\" `\".$data[0][$i].\"` varchar(200)\";\n\t\t}else{\n\t\t\t$insert.=strtolower($data[0][$i].\",\");\n\n\t\t\t$create.=\" `\".$data[0][$i].\"` varchar(200),\";\n\t\t}\n\t}\n\t$create.=\") ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;\";\n\n\t$insert.=\" VALUES \";\n\tfor ($j=1; $j < count($data); $j++) { \n\t\tif ($j != 1) {\n\t\t\t# code...\n\t\t\t$insert.=\", ( \";\n\n\t\t}else{\n\n\t\t\t$insert.=\" ( \";\n\t\t}\n\t\tfor ($i=0; $i < count($data[$j]) ; $i++) { \n\t\t\tif ($i==count($data[$j])-1) {\n\t\t\t\t$insert.=\"\n\t\t\t\t'\".strtolower($data[$j][$i].\"' )\");\n\t\t\t\t//$create.=\" `\".$data[$j][$i].\"` varchar(200)\";\n\t\t\t}else{\n\t\t\t\t$insert.=\"\n\t\t\t\t'\".strtolower($data[$j][$i].\"',\");\n\n\t\t\t\t//$create.=\" `\".$data[$j][$i].\"` varchar(200),\";\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif (!$mysqli->query($create)) {\n\t\tshowErrors();\n\t}\n\n\n\t\n\tif (!($mysqli->query($insert))) {\n\t echo \"\\nQuery execute failed: ERRNO: (\" . $mysqli->errno . \") \" . $mysqli->error;\n\t die;\n\t};\n\n\treturn true;\n}",
"public function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\n\t\tif ( $wpdb->get_var( \"SHOW TABLES LIKE '$this->table_name'\" ) == $this->table_name ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$sql = \"CREATE TABLE \" . $this->table_name . \" (\n\t\tid bigint(20) NOT NULL AUTO_INCREMENT,\n\t\tuser_id bigint(20) NOT NULL,\n\t\tusername varchar(50) NOT NULL,\n\t\temail varchar(50) NOT NULL,\n\t\tname mediumtext NOT NULL,\n\t\tproduct_count bigint(20) NOT NULL,\n\t\tsales_value mediumtext NOT NULL,\n\t\tsales_count bigint(20) NOT NULL,\n\t\tstatus mediumtext NOT NULL,\n\t\tnotes longtext NOT NULL,\n\t\tdate_created datetime NOT NULL,\n\t\tPRIMARY KEY (id),\n\t\tUNIQUE KEY email (email),\n\t\tKEY user (user_id)\n\t\t) CHARACTER SET utf8 COLLATE utf8_general_ci;\";\n\n\t\tdbDelta( $sql );\n\n\t\tupdate_option( $this->table_name . '_db_version', $this->version );\n\t}",
"public function download_category_excel_sheet() {\n $spreadsheet = new Spreadsheet();\n $sheet = $spreadsheet->getActiveSheet();\n $sheet->setCellValue('A1', 'ar_name');\n $sheet->setCellValue('B1', 'en_name');\n $sheet->setCellValue('C1', 'discount');\n\n $writer = new Xlsx($spreadsheet);\n\n $filename = 'add_category_template';\n\n header('Content-Type: application/vnd.ms-excel');\n header('Content-Disposition: attachment;filename=\"' . $filename . '.xlsx\"');\n\n $writer->save('php://output');\n }",
"function createTable() {\n print \"\\nCreate table: \".$dbtable.\"\\n\";\n if (createDB()) {\n print \"OK\\n\";\n }\n interceptExit();\n }",
"public function crearTablas(){\r\n\t\t\t$this->crearTablaUsuario();\r\n\t\t\t$this->crearTablaDeporte();\r\n\t\t\t$this->crearTablaUsuarioDeporte();\r\n\t\t\t$this->crearTablaPassw();\r\n\t\t}",
"function create()\n {\n $this->definitions['columns'] =& $this->columns;\n return $this->connection->create_table($this->name, $this->definitions);\n }",
"private function _createTable() {\n $query = \"\n CREATE TABLE `seo_metadata` (\n `metadata_id` int(11) NOT NULL auto_increment,\n `seo_id` char(60) NOT NULL,\n `seo_title` varchar(255) NOT NULL,\n `seo_description` varchar(255) NOT NULL,\n `seo_keyword` varchar(255) NOT NULL,\n PRIMARY KEY (`metadata_id`),\n KEY `id_idx` (`id`)\n )\";\n $this->getAdapter()->query( $query );\n }",
"function createTables()\n {\n $sqls = $this->simplexmlObject->xpath(\"//table\");\n foreach($sqls as $sql) {\n try {\n $db = $this->getConnection();\n $db->exec($sql);\n $tablename = $sql->getName();\n print(\"Created $tablename table.\\n\");\n $this->closeConnection($db, $sql);\n } catch (PDOException $e) {\n echo $e->getMessage();\n }\n }\n \n }",
"public function exportExcel() \n {\n $st = ST::select(\n 'no_st',\n 'tanggal_st',\n 'tujuan_st',\n 'tipe', \n 'bidang',\n 'uraian',\n \n 'tanggal_mulai',\n 'tanggal_selesai',\n 'hp',\n 'no_laporan',\n 'tanggal_laporan',\n\n 'penanggung_jawab_id',\n 'pengendali_mutu_id',\n 'pengendali_teknis_id',\n 'ketua_tim_id', \n \n 'lokasi', \n 'biaya',\n 'km_id',\n 'costsheet_id'\n \n )->get();\n\n \n\n return Excel::create('data_tugas', function($excel) use ($st){\n $excel->sheet('st_bpkp', function($sheet) use ($st) {\n $sheet->fromArray($st);\n });\n })->download('xls');\n\n }",
"abstract protected function excel ();",
"private function create_tables()\n {\n global $wpdb;\n\n /* http://wiip.fr/content/choisir-le-type-de-colonne-de-ses-tables-mysql */\n $sql = '\n CREATE TABLE IF NOT EXISTS '.$this->tables['users'].'(\n id int(11) NOT NULL auto_increment,\n PRIMARY KEY (id),\n nom VARCHAR(255) NOT NULL,\n prenom VARCHAR(255) NOT NULL,\n email VARCHAR(320) NOT NULL,\n password VARCHAR(500) NOT NULL,\n adresse CHAR(255),\n codepostal CHAR(10),\n ville CHAR(60),\n pays CHAR(60),\n telephone_professionnel CHAR(20),\n dateinscription CHAR(20) NOT NULL,\n statut VARCHAR(15),\n evenement VARCHAR(255),\n date_evenement DATE,\n specialite VARCHAR(100),\n categorie VARCHAR(20),\n isUpdate VARCHAR(10),\n organisme_facturation CHAR(100),\n email_facturation CHAR(255),\n adresse_facturation CHAR(255),\n ville_facturation CHAR(60),\n codepostal_facturation CHAR(10),\n pays_facturation CHAR(50),\n contacts TEXT\n \n\n )';\n\n dbDelta($sql);\n\n $sql = '\n CREATE TABLE IF NOT EXISTS '.$this->tables['users_file'].'(\n id int(11) NOT NULL auto_increment,\n PRIMARY KEY (id),\n email VARCHAR(320) NOT NULL,\n fichier VARCHAR(500) NOT NULL,\n chemin VARCHAR(500) NOT NULL,\n date_enregistrement VARCHAR(500) NOT NULL,\n type_doc VARCHAR(100) NOT NULL\n \n )';\n\n dbDelta($sql);\n }",
"public function export_excel(){\n // Load plugin PHPExcel nya\n include APPPATH.'third_party/PHPExcel/PHPExcel.php';\n \n // Panggil class PHPExcel nya\n $excel = new PHPExcel();\n // Settingan awal fil excel\n $excel->getProperties()->setCreator('SIMITA')\n ->setLastModifiedBy('SIMITA')\n ->setTitle(\"Data Koneksi Internet\")\n ->setSubject(\"Koneksi Internet\")\n ->setDescription(\"Laporan Data Koneksi Internet\")\n ->setKeywords(\"Laporan\");\n // Buat sebuah variabel untuk menampung pengaturan style dari header tabel\n $style_col = array(\n 'font' => array('bold' => true), // Set font nya jadi bold\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER, // Set text jadi ditengah secara horizontal (center)\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n ),\n 'borders' => array(\n 'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n 'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n 'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n )\n );\n // Buat sebuah variabel untuk menampung pengaturan style dari isi tabel\n $style_row = array(\n 'alignment' => array(\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n ),\n 'borders' => array(\n 'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n 'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n 'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n )\n );\n $excel->setActiveSheetIndex(0)->setCellValue('A1', \"LAPORAN DATA INVENTORY INTERNET CABANG\"); // Set kolom A1 dengan tulisan \"DATA SISWA\"\n $excel->getActiveSheet()->mergeCells('A1:G1'); // Set Merge Cell pada kolom A1 sampai E1\n $excel->getActiveSheet()->getStyle('A1')->getFont()->setBold(TRUE); // Set bold kolom A1\n $excel->getActiveSheet()->getStyle('A1')->getFont()->setSize(15); // Set font size 15 untuk kolom A1\n $excel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); // Set text center untuk kolom A1\n // Buat header tabel nya pada baris ke 3\n $excel->setActiveSheetIndex(0)->setCellValue('A3', \"NO\"); // Set kolom A3 \n $excel->setActiveSheetIndex(0)->setCellValue('B3', \"CABANG\"); // Set kolom B3 \n $excel->setActiveSheetIndex(0)->setCellValue('C3', \"PROVIDER\"); // Set kolom C3 \n $excel->setActiveSheetIndex(0)->setCellValue('D3', \"NO.PELANGGAN\"); // Set kolom D3 \n $excel->setActiveSheetIndex(0)->setCellValue('E3', \"IP PUBLIC\"); // Set kolom E3 \n $excel->setActiveSheetIndex(0)->setCellValue('F3', \"Tgl. Kontrak\");\n $excel->setActiveSheetIndex(0)->setCellValue('G3', \"Tgl. Habis Kontrak\");\n // Apply style header yang telah kita buat tadi ke masing-masing kolom header\n $excel->getActiveSheet()->getStyle('A3')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('B3')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('C3')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('D3')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('E3')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('F3')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('G3')->applyFromArray($style_col);\n $internet = $this->m_internet->semua()->result();\n $no = 1; // Untuk penomoran tabel, di awal set dengan 1\n $numrow = 4; // Set baris pertama untuk isi tabel adalah baris ke 4\n foreach($internet as $data){ // Lakukan looping pada variabel\n $excel->setActiveSheetIndex(0)->setCellValue('A'.$numrow, $no);\n $excel->setActiveSheetIndex(0)->setCellValue('B'.$numrow, $data->nama_cabang);\n $excel->setActiveSheetIndex(0)->setCellValue('C'.$numrow, $data->nama_provider);\n $excel->setActiveSheetIndex(0)->setCellValue('D'.$numrow, $data->nomor_pelanggan);\n $excel->setActiveSheetIndex(0)->setCellValue('E'.$numrow, $data->ip_public);\n $excel->setActiveSheetIndex(0)->setCellValue('F'.$numrow, $data->tanggal_kontrak);\n $excel->setActiveSheetIndex(0)->setCellValue('G'.$numrow, $data->masa_kontrak);\n \n // Apply style row yang telah kita buat tadi ke masing-masing baris (isi tabel)\n $excel->getActiveSheet()->getStyle('A'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('B'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('C'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('D'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('E'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('F'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('G'.$numrow)->applyFromArray($style_row);\n \n $no++; // Tambah 1 setiap kali looping\n $numrow++; // Tambah 1 setiap kali looping\n }\n // Set width kolom\n $excel->getActiveSheet()->getColumnDimension('A')->setWidth(5); // Set width kolom A\n $excel->getActiveSheet()->getColumnDimension('B')->setWidth(30); // Set width kolom B\n $excel->getActiveSheet()->getColumnDimension('C')->setWidth(25); // Set width kolom C\n $excel->getActiveSheet()->getColumnDimension('D')->setWidth(20); // Set width kolom D\n $excel->getActiveSheet()->getColumnDimension('E')->setWidth(25); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('F')->setWidth(25);\n $excel->getActiveSheet()->getColumnDimension('G')->setWidth(25);\n \n // Set height semua kolom menjadi auto (mengikuti height isi dari kolommnya, jadi otomatis)\n $excel->getActiveSheet()->getDefaultRowDimension()->setRowHeight(-1);\n // Set orientasi kertas jadi LANDSCAPE\n $excel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);\n // Set judul file excel nya\n $excel->getActiveSheet(0)->setTitle(\"Laporan Data Siswa\");\n $excel->setActiveSheetIndex(0);\n // Proses file excel\n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n header('Content-Disposition: attachment; filename=\"Laporan Koneksi Internet.xlsx\"'); // Set nama file excel nya\n header('Cache-Control: max-age=0');\n $write = PHPExcel_IOFactory::createWriter($excel, 'Excel2007');\n $write->save('php://output');\n }",
"public function createTable($columns, $values = [], $tablename = '') {\n\n $html = \"<table id='\".$tablename.\"'>\";\n \n $html .= $this->createHeader($columns);\n \n $html .= $this->createRows($columns, $values);\n \n $html .= \"</table>\";\n return $html;\n }",
"function export(){\n\n $this->load->model(\"MBenang\");\n\n $this->load->library(\"excel\");\n\n $object = new PHPExcel();\n\n $object->setActiveSheetIndex(0);\n\n // Nama Field Baris Pertama\n $table_columns = $this->MBenang->getColoumnName();\n\n $column = 0;\n\n $object->getActiveSheet()->setCellValueByColumnAndRow($column, 1, 'Data Master Benang');\n\n $object->getActiveSheet()->setTitle('Data Master Benang');\n\n foreach($table_columns as $field){\n\n\n $object->getActiveSheet()->setCellValueByColumnAndRow($column, 2, $field);\n\n $object->getActiveSheet()->getColumnDimension()->setAutoSize(true);\n\n $object->getSheet(0)->getStyle('A3:C3')->getBorders()->getAllBorders()->getColor()->setRGB('949FA8');\n\n $column++;\n\n }\n\n $benang_data = $this->MBenang->fetch_data();\n\n $excel_row = 3;\n\n foreach($benang_data as $row){\n\n $object->getActiveSheet()->setCellValueByColumnAndRow(0, $excel_row, $row->kd_jenis);\n\n $object->getActiveSheet()->setCellValueByColumnAndRow(1, $excel_row, $row->jenis_benang);\n\n $excel_row++;\n\n }\n\n $object_writer = PHPExcel_IOFactory::createWriter($object, 'Excel2007');\n\n header('Content-Type: application/vnd.ms-excel');\n\n header('Content-Disposition: attachment;filename=\"Data-master-benang.xls\"');\n\n $object_writer->save('php://output');\n\n }",
"public function create_table()\n {\n $sql = \"CREATE TABLE IF NOT EXISTS `whollycoders`.`table_contacts_171005_1207` (\n `contact_ID` INT NOT NULL AUTO_INCREMENT , \n `contact_firstname` VARCHAR(50) NOT NULL , \n `contact_lastname` VARCHAR(50) NOT NULL , \n `contact_phone` VARCHAR(20) NOT NULL , \n `contact_email` VARCHAR(100) NOT NULL , \n `contact_date_added` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP , \n PRIMARY KEY (`contact_ID`)\n ) ENGINE = InnoDB;\";\n $result = $this->process_query($sql);\n }",
"public function create_tables() {\n\t\tglobal $wpdb;\n\t\t$charset_collate = $wpdb->get_charset_collate();\n\n\t\t$schema = \"CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}cn_addressbooks` ( \n\t\t\t`id` INT NOT NULL AUTO_INCREMENT , `name` VARCHAR(100) NOT NULL , `address` VARCHAR(255) NULL , \n\t\t\t`phone` VARCHAR(30) NULL , `created_by` BIGINT(20) NOT NULL , `created_at` DATETIME NOT NULL , \n\t\t\tPRIMARY KEY (`id`)) \n\t\t\t$charset_collate\";\n\n\t\tif ( ! function_exists( 'dbDelta') ) {\n\t\t\trequire_once ABSPATH . 'wp-admin/includes/upgrade.php';\n\t\t}\n\n\t\tdbDelta( $schema );\n\t}",
"public function loadWFData($table, $filename){\n //$filename = \"/Users/aprateek/Desktop/sms_cat_healthcare_speciality.csv\";\n error_log(\"Filenaem=\".$filename);\n $pd = array_map('str_getcsv', file($filename));\n $headers=array();\n foreach ($pd[0] as $head){\n $headers[]=trim($head);\n }\n if (count($headers) == 0){\n throw new Exception(\"The csv file has missing or malformed header\");\n }\n error_log(\"Head=\".SmsWfUtils::flatten($headers));\n \n try {\n $this->t_crtinsupd(\"DROP TABLE IF EXISTS \".$table.\";\");\n $create_stmt = \"CREATE TABLE IF NOT EXISTS \".$table.\" (\";\n foreach($headers as $head){\n $create_stmt .= self::esc($head).\" TEXT ,\";\n }\n $create_stmt = substr($create_stmt, 0, strlen($create_stmt) -1);\n $create_stmt .= \");\";\n error_log(\"create stmt=\".$create_stmt);\n $this->t_crtinsupd($create_stmt);\n }\n catch(Exception $e){\n throw new Exception(\"Error encountered while creating schema \".$e->getMessage());\n }\n \n try {\n foreach(array_splice($pd, 1) as $row){\n $insert_stmt=\"insert into \".$table.\" values (\";\n $data = array();\n for ($i=0; $i<count($pd[0]);$i++){\n $header = self::esc(trim($pd[0][$i]));\n $data[$header] = self::esc(trim($row[$i]));\n $insert_stmt .= \"'\".self::esc(trim($row[$i])).\"',\";\n }\n $insert_stmt = substr($insert_stmt, 0, strlen($insert_stmt) -1);\n $insert_stmt .= \");\";\n error_log(\"insert_stmt=\".$insert_stmt);\n $this->t_crtinsupd($insert_stmt);\n }\n }\n catch(Exception $e){\n throw new Exception(\"Error encountered while saving data \".$e->getMessage());\n }\n }",
"public function scheme_download(){\n $this->load->library('PHPExcel');\n $this->load->library('PHPExcel/IOFactory');\n\n $objPHPExcel = new PHPExcel();\n \n $objPHPExcel->createSheet();\n \n $objPHPExcel->getProperties()->setTitle(\"export\")->setDescription(\"none\");\n\n $objPHPExcel->setActiveSheetIndex(0);\n\n // Field names in the first row\n $fields = array(\n 'Scheme Name',\n 'Start Date',\n 'End Date',\n 'Product'\n );\n \n $col = 0;\n foreach ($fields as $field)\n {\n $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col, 1, $field);\n $col++;\n }\n \n // Fetching the table data\n $this->load->model('scheme/schememodel');\n $results = $this->model_scheme_schememodel->getschemedata($this->request->get);\n \n $row = 2;\n \n foreach($results as $data)\n {\n $col = 0;\n $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0, $row, $data['Scheme_Name']);\n $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(1, $row, $data['START_DATE']);\n $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(2, $row, $data['END_DATE']);\n $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(3, $row, $data['product_name']);\n $objPHPExcel->getActiveSheet()->getColumnDimension('A')->setAutoSize(true);\n $objPHPExcel->getActiveSheet()->getColumnDimension('B')->setAutoSize(true);\n $objPHPExcel->getActiveSheet()->getColumnDimension('C')->setAutoSize(true);\n $objPHPExcel->getActiveSheet()->getColumnDimension('D')->setAutoSize(true);\n \n \n \n \n $objPHPExcel->getActiveSheet()->getStyle('A1:L1')->getFont()->setItalic(true);\n $objPHPExcel->getActiveSheet()->getStyle('A1:L1')->getFont()->setBold(true);\n $objPHPExcel->getActiveSheet()->getStyle('A1:L1')->getFont()->setSize(12);\n $objPHPExcel->getActiveSheet()->getDefaultRowDimension('A1:L1')->setRowHeight(20);\n $objPHPExcel->getActiveSheet()->getStyle('A1:L1')->getFont()->getColor()->setRGB('FF0000');\n $row++;\n }\n\n \n\n \n$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n // Sending headers to force the user to download the file\n header('Content-Type: application/vnd.ms-excel');\n header('Content-Disposition: attachment;filename=\"Attendance_report_'.date('dMy').'.xls\"');\n header('Cache-Control: max-age=0');\n\n $objWriter->save('php://output');\n \n }",
"public function create()\n {\n $db = XenForo_Application::get('db');\n $db->query('CREATE TABLE `' . self::DB_TABLE . '`\n (`threema_id` CHAR(8) NOT NULL PRIMARY KEY,\n `public_key` CHAR(64) NOT NULL)\n ');\n }",
"public function createTable()\n {\n $this->dbInstance->query(\"CREATE TABLE IF NOT EXISTS Image\n (\n ImageID int NOT NULL AUTO_INCREMENT,\n Name varchar(255) NOT NULL,\n File varchar(255) NOT NULL,\n Thumb varchar(255) NOT NULL,\n uploadDate DATETIME DEFAULT CURRENT_TIMESTAMP,\n UserFK int,\n PRIMARY KEY (ImageID),\n FOREIGN KEY (UserFK) REFERENCES User(UserID) ON DELETE CASCADE\n )\n \");\n }",
"public function export() \n \t\t{\n \t\t$data = $this->model_patient->export();\n \t\t#load PHPExcel library\n \t\t$this->excel->setActiveSheetIndex(0);\n \t\t#name the worksheet\n \t\t$this->excel->getActiveSheet()->setTitle('Data Pasien SN Health Center');\n \n \t\t#STYLING\n \t\t$styleArray = array('borders' => array('allborders' => array('style' => PHPExcel_Style_Border::BORDER_THIN,'color' => array('argb' => '0000'))));\n \n \t\t#set report header\n \t\t$this->excel->getActiveSheet()->getStyle('A:K')->getFont()->setName('Times New Roman');\n \t\t$this->excel->getActiveSheet()->mergeCells('A1:K1');\n \t\t$this->excel->getActiveSheet()->setCellValue('A1', 'DAFTAR PASIEN APLIKASI SN HEALTH CENTER');\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getFont()->setBold(true);\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getFont()->setSize(12);\n \n \n \t\t//set column name\n \t\t$this->excel->getActiveSheet()->setCellValue('A2', 'No');\n \t\t$this->excel->getActiveSheet()->setCellValue('B2', 'Nomor Registrasi');\n \t\t$this->excel->getActiveSheet()->setCellValue('C2', 'Nomor KTP');\n \t\t$this->excel->getActiveSheet()->setCellValue('D2', 'Nama');\n \t\t$this->excel->getActiveSheet()->setCellValue('E2', 'Jenis Kelamin');\n \t\t$this->excel->getActiveSheet()->setCellValue('F2', 'Tanggal Lahir');\n \t\t$this->excel->getActiveSheet()->setCellValue('G2', 'Agama');\n \t\t$this->excel->getActiveSheet()->setCellValue('H2', 'Pekerjaan');\n \t\t$this->excel->getActiveSheet()->setCellValue('I2', 'Nomor HP');\n \t\t$this->excel->getActiveSheet()->setCellValue('J2', 'Alamat');\n \t\t$this->excel->getActiveSheet()->setCellValue('K2', 'Tanggal & Waktu Registrasi');\n \n\t\t\t $this->excel->getActiveSheet()->getStyle('A2:K2')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('A')->setWidth(4);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('B')->setWidth(30);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('C')->setWidth(25);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('D')->setWidth(30);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('E')->setWidth(15);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('F')->setWidth(15);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('G')->setWidth(15);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('H')->setWidth(15);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('I')->setWidth(15);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('J')->setWidth(40);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('K')->setWidth(25);\n \n \t\t$no = 3;\n \t\t$nomor = 1;\n \t\tforeach ($data as $v) \n \t\t{\n \t\t\t\n \t\t\t$this->excel->getActiveSheet()->getStyle('A' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('A' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('A' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('A' . $no, $nomor);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('B' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('B' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('B' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('B' . $no, $v->patient_noregis);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('C' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('C' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('C' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('C' . $no, strval($v->patient_noktp));\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('D' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('D' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('D' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('D' . $no, $v->patient_name);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('E' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('E' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('E' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('E' . $no, $v->patient_sex);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('F' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('F' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('F' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('F' . $no, $v->patient_datebirth);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('G' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('G' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('G' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('G' . $no, $v->patient_religion);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('H' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('H' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('H' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('H' . $no, $v->patient_job);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('I' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('I' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('I' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('I' . $no, $v->patient_phone);\n\t\t\t\t \n\t\t\t\t$this->excel->getActiveSheet()->getStyle('J' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('J' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('J' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t\t\t$this->excel->getActiveSheet()->setCellValue('J' . $no, $v->patient_address);\n\t\t\t\t\t\t\n\t\t\t\t$this->excel->getActiveSheet()->getStyle('K' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('K' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('K' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('K' . $no, $v->patient_registerdate);\n\t\t\t\t\n\t\t\t\t$no++;\n \t\t\t$nomor++;\n \t\t}\n \n \t\t$this->excel->getActiveSheet()->getStyle('A2:K' . ($no - 1))->applyFromArray($styleArray);\n \t\tob_end_clean();\n \t\t$filename = 'Daftar Pasien Aplikasi SN Health Center.xls'; //save our workbook as this file name\n \t\theader('Content-Type: application/vnd.ms-excel'); //mime type\n \t\theader('Content-Disposition: attachment;filename=\"' . $filename . '\"'); //tell browser what's the file name\n \t\theader('Cache-Control: max-age=0'); //no cache\n \t\t$objWriter = PHPExcel_IOFactory::createWriter($this->excel, 'Excel5');\n \t\t$objWriter->save('php://output');\n \n \t\tredirect('admin/patient');\n \t\t}",
"function createTableToTemplates(){\n\n\tglobal $mysqli,$templatesTableName;\n\n\t$create=\"CREATE TABLE IF NOT EXISTS `$templatesTableName` (\n\t `id` int(8) NOT NULL AUTO_INCREMENT,\n\t `clienteName` varchar(100) NOT NULL,\n\t `method` text NOT NULL,\n\t `created` TIMESTAMP,\n\t PRIMARY KEY (`id`)\n\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1\";\t\n\n\tif (!$mysqli->query($create)) {\n\t\tshowErrors();\n\t}\n\treturn true;\n}",
"private function writeTable() {\n\t\trequire_once $GLOBALS[\"DIR_PRINT\"] . \"pdftable.php\";\n\t\t\n\t\t// create table with data and sum\n\t\t$table = new PDFTable($this->data);\n\t\t\n\t\t// set columns\n\t\t$table->setColumnWidth(1, 30);\n\t\t$table->setColumnWidth(2, 25);\n\t\t$table->setColumnWidth(3, 25);\n\t\t$table->setColumnWidth(5, 25);\n\t\t$table->setColumnWidth(6, 25);\n\t\t$table->setColumnWidth(7, 30);\n\t\t$table->setColumnWidth(13, 35);\n\t\t$table->setColumnWidth(14, 30);\n\t\t$table->setColumnWidth(15, 15);\n\t\t$table->setColumnWidth(16, 24);\n\t\t\n\t\t$table->changeColumnLabel(1, \"Nachname\");\n\t\t$table->changeColumnLabel(2, \"Vorname\");\n\t\t$table->changeColumnLabel(3, \"Privat\");\n\t\t$table->changeColumnLabel(5, \"Mobil\");\n\t\t$table->changeColumnLabel(6, \"Berufl.\");\n\t\t$table->changeColumnLabel(7, \"E-Mail\");\n\t\t$table->changeColumnLabel(13, \"Straße\");\n\t\t$table->changeColumnLabel(14, \"Ort\");\n\t\t$table->changeColumnLabel(15, \"PLZ\");\n\t\t$table->changeColumnLabel(16, \"Instrument\");\n\t\t\n\t\t$table->setColumnType(3, FieldType::CHAR);\n\t\t$table->setColumnType(5, FieldType::CHAR);\n\t\t$table->setColumnType(6, FieldType::CHAR);\n\t\t$table->setColumnType(15, FieldType::CHAR);\n\t\t\n\t\t$table->setCellBorder(\"T\");\n\t\t$table->setVerticalSpacing(1);\n\t\t\n\t\t// write the document\n\t\t$table->write($this->pdf);\n\t}",
"public static function create_tables() {\n Site::create_table();\n Membership_Area::create_table();\n Restricted_Content::create_table();\n User::create_table();\n }",
"public function create_table_config(){\n $sql = \" CREATE TABLE IF NOT EXISTS {$this->table_config} (\n `id` varchar(100),\n `day` varchar(50) DEFAULT NULL,\n `range` varchar(50) DEFAULT NULL,\n `qty` smallint DEFAULT 0,\n `type` varchar(50) DEFAULT NULL,\n `order` smallint DEFAULT 0,\n PRIMARY KEY (`id`)\n )\";\n\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n dbDelta($sql);\n }",
"protected function createMigrationTable()\n {\n $migration_table = $this->config_file->getMigrationTable();\n\n $resource = $this->db_adapter->query(\"\n CREATE TABLE $this->migration_table (\n file VARCHAR PRIMARY KEY,\n ran_at TIMESTAMP DEFAULT NOW()\n );\n \");\n }",
"private function createDBTables(){\n\t\tif (!$this['db']->getSchemaManager()->tablesExist('bookings')){\n\t\t\t$this['db']->executeQuery(\"CREATE TABLE bookings (\n\t\t\t\tid INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\tfirstName VARCHAR(40) NOT NULL,\n\t\t\t\tlastName VARCHAR(40) NOT NULL,\n\t\t\t\tphone VARCHAR(10) NOT NULL,\n\t\t\t\temail VARCHAR(20) DEFAULT NULL,\n\t\t\t\tbirthday DATE NOT NULL,\n\t\t\t\tstartDate DATE NOT NULL,\n\t\t\t\tendDate DATE NOT NULL,\n\t\t\t\tarrivalTime TIME DEFAULT NULL,\n\t\t\t\tadditionalInformation TEXT,\n\t\t\t\tnrOfPeople INT NOT NULL,\n\t\t\t\tpayingMethod VARCHAR(10) NOT NULL\n\t\t\t\t);\");\n\t\t}\n\t}",
"function createTable($table_name, $columns_array)\n{\n // $table_name = 'zoho_contact_information_v1';\n $drop_table = \"DROP TABLE IF EXISTS $table_name\";\n execute_sql($drop_table);\n $table = \"CREATE TABLE `$table_name` (\";\n $table .= 'id int NOT NULL PRIMARY KEY AUTO_INCREMENT,';\n\n foreach ($columns_array as $column) {\n $column = str_replace(' ', '__', $column);\n $table .= $column . ' varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,';\n }\n\n $table = trim($table, ',');\n $table .= ') ENGINE=InnoDB DEFAULT CHARSET=utf8;';\n\n execute_sql($table);\n}",
"function createTableModel()\r\n {\r\n?>\r\n // table model\r\n var <?php echo $this->Name; ?>_tableModel = new qx.ui.table.SimpleTableModel();\r\n <?php\r\n if ($this->owner!=null)\r\n {\r\n ?>\r\n <?php echo $this->owner->Name.\".\".$this->Name; ?>_tableModel=<?php echo $this->Name; ?>_tableModel;\r\n <?php\r\n }\r\n ?>\r\n<?php\r\n }",
"function write_table_head()//scrie capul de tabel pentru perioadele de vacanta\r\n{\r\n\t$output = \"\";\r\n\tadd($output,'<table width=\"500px\" cellpadding=\"1\" cellspacing=\"1\" class=\"special\">');\r\n\tadd($output,'<tr class=\"tr_head\"><td>Nr</td><td>Data inceput</td><td>Data sfarsit</td></tr>');\r\n\t\r\n\treturn $output;\r\n}",
"public function excel()\n {\n Excel::create('clientes', function($excel) {\n $excel->sheet('Excel sheet', function($sheet) {\n //otra opción -> $products = Product::select('name')->get();\n $clientes = Cliente::\n join('regimen_fiscal', 'regimen_fiscal.id','=','cliente.id_Regimen_Fiscal')\n ->select('cliente.nombre','cliente.rfc','cliente.contacto','regimen_fiscal.nombre as RegimenFiscal', 'cliente.telefono', 'cliente.email','cliente.codigo_Postal', 'cliente.direccion_fact', 'cliente.direccion_entr', 'cantidad_venta','cliente.volumen_venta', 'cliente.email', 'cliente.saldocliente','cliente.codigo_Postal')\n ->where('cliente.estado', 'Activo')\n ->get(); \n $sheet->fromArray($clientes);\n $sheet->row(1,['Nombre','RFC','Contacto', 'Regimen Fiscal' ,'Teléfono','Email','Codigo Postal','Dirección de Facturación','Dirección de Entrega de Embarque','Asignación de Cantidad de Venta por Año',' Asignación de Volumen de Venta por Año','Saldo Cliente $']);\n $sheet->setOrientation('landscape');\n \n\n });\n })->export('xls');\n }",
"public function build_table()\n {\n if (count($this->properties) > 0)\n {\n foreach ($this->properties as $property => $values)\n {\n $contents = array();\n $contents[] = $property;\n \n if (! is_array($values))\n {\n $values = array($values);\n }\n \n if (count($values) > 0)\n {\n foreach ($values as $value)\n {\n $contents[] = $value;\n }\n }\n \n $this->addRow($contents);\n }\n \n $this->setColAttributes(0, array('class' => 'header'));\n }\n else\n {\n $contents = array();\n $contents[] = Translation::get('NoResults', null, Utilities::COMMON_LIBRARIES);\n $row = $this->addRow($contents);\n $this->setCellAttributes($row, 0, 'style=\"font-style: italic;text-align:center;\" colspan=2');\n }\n }",
"public function createTable($code){\n\t\t$tableName = 'tcimport_populating_' . $code;\n\t\t$this->_table = $tableName;\n\n\t\t// $comment = 'Drop ' . $this->_table . ' table';\n\t\t// $sql = 'DROP TABLE IF EXISTS ' . $this->_table . ';';\n\t\t// $this->addQuery($sql, $comment);\n\n\t\t$comment = 'Create ' . $this->_table . ' table';\n\n\t\t$sql = $this->generateTable();\n\t\t$this->addQuery($sql, $comment);\n\n\t\treturn $this;\n\t}",
"public function makeExcelSheet($data)\n\t{\n\t\t/** Reading Excel with PHPExcel_IOFactory */\n\t\trequire_once 'PHPExcel/IOFactory.php';\n\n\t\t$objReader = PHPExcel_IOFactory::createReader('Excel5');\n\t\t\n\t\t// template file\n\t\t$objPHPExcel = $objReader->load(APPLICATION_PATH . '/../data/templates/com-tpl.xls');\n\n\t\t$baseRow = 11; // base row in template file\n\t\t\n\t\tforeach($data as $r => $dataRow) {\n\t\t\t$row = $baseRow + ($r+1);\n\t\t\t\n\t\t\t$objPHPExcel->getActiveSheet()->insertNewRowBefore($row,1);\n\t\t\t\n\t\t\tif (!empty($dataRow)){\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row, ucfirst($dataRow['zone']));\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('B'.$row, ucfirst($dataRow['village']));\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('C'.$row, ucfirst($dataRow['prod_name']));\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('D'.$row, $dataRow['unit_measure']);\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('E'.$row, $dataRow['quantity']);\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('F'.$row, ucfirst($dataRow['quality']));\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('G'.$row, $dataRow['price']);\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('H'.$row,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t ucfirst($dataRow['contact_fname']).' '.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t ucfirst($dataRow['contact_lname']).' '.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t 'TEL: ' . $dataRow['contact_tel']);\n\t\t\t}\n\t\t}\n\t\t$objPHPExcel->getActiveSheet()->removeRow($baseRow-1,1);\n\t\t\n\t\t// fill data area with white color\n\t\t$objPHPExcel->getActiveSheet()\n\t\t\t\t\t->getStyle('A'.$baseRow .':'.'H'.$row)\n\t\t\t\t\t->getFill()\n\t\t\t\t\t->applyFromArray(\n \t\t\t\t\t\t\t array(\n \t\t \t\t 'type' \t=> PHPExcel_Style_Fill::FILL_SOLID,\n \t\t\t\t\t\t 'startcolor' \t=> array('rgb' => 'FFFFFF'),\n \t\t\t\t \t 'endcolor' \t=> array('rgb' => 'FFFFFF')\n \t\t\t\t\t ));\n\t\t\n\t\t$comNo = $dataRow['com_number'];\n\t\t$deliveryDate = date('d-m-Y', strtotime($dataRow['ts_date_delivered']));\n\t\t\n\t\t$ComTitle = \"INFORMATION SUR LES PRODUITS FORESTIERS NON LIGNEUX DU \" .\n\t\t \"CERCLE DE TOMINIAN No: $comNo Du $deliveryDate\";\n\t\t\n\t\t$titleRow = $baseRow-1;\n\t\t// create new row\n\t\t$objPHPExcel->getActiveSheet()->insertNewRowBefore($titleRow,1);\n\t\t$objPHPExcel->getActiveSheet()\n\t\t\t\t\t->mergeCells('A'.$titleRow. ':'.'H'.$titleRow)\n\t\t\t\t\t->setCellValue('A'.$titleRow, $ComTitle)\n\t\t\t\t\t->getStyle('A'.$titleRow)->getFont()\n\t\t\t\t\t->setBold(true)\n\t\t\t\t\t->setSize(13)\n\t\t\t\t\t->setColor(new PHPExcel_Style_Color());\n\t\t\t\t\t\n\t//\t$objPHPExcel->getActiveSheet()->getRowDimension('A'.$titleRow)->setRowHeight(10);\n\t\t\t\t\t\n\t\t$title = 'ComNo'.$comNo;\n\t\t// set title of sheet\n\t\t$objPHPExcel->getActiveSheet()->setTitle($title);\n\n\t\t// Redirect output to a client’s web browser (Excel5)\n\t\theader('Content-Type: application/vnd.ms-excel');\n\t\theader('Content-Disposition: attachment;filename=\"communique.xls\"');\n\t\theader('Cache-Control: max-age=0');\n\n\t\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');\n\t\t$objWriter->save('php://output');\n\t\texit;\n\t}",
"function createTable() {\r\n \r\n $conn = mysql_connect($this->mysql_host,$this->mysql_user,$this->mysql_pass);\r\n \r\n $rs = mysql_select_db($this->mysql_db,$conn);\r\n \r\n $sql = \"CREATE TABLE \".$this->mysql_table.\" ( currency char(3) NOT NULL default '', rate float NOT NULL default '0', PRIMARY KEY(currency) ) ENGINE=MyISAM\";\r\n \r\n $rs = mysql_query($sql,$conn) or die(mysql_error());\r\n \r\n $sql = \"INSERT INTO \".$this->mysql_table.\" VALUES('EUR',1)\";\r\n \r\n $rs = mysql_query($sql,$conn) or die(mysql_error());\r\n \r\n $this->downloadExchangeRates();\r\n }",
"public function action_export_obic(){\n\t\t$objPHPExcel = new \\PHPExcel();\n\t\t//add header\n $header = [\n '会社NO', '伝票番号', '発生日', 'システム分類', 'サイト番号', '仕訳区分', '伝票区分', '事業所コード', '行番号', '借方総勘定科目コード',\n '借方補助科目コード', '借方補助内訳科目コード', '借方部門コード', '借方取引先コード', '借方税区分', '借方税込区分',\n '借方金額', '借方消費税額', '借方消費税本体科目コード', '借方分析コード1', '借方分析コード2', '借方分析コード3', '借方分析コード4', '借方分析コード5',\n '借方資金コード', '借方プロジェクトコード', '貸方総勘定科目コード', '貸方補助科目コード', '貸方補助内訳科目コード', '貸方部門コード',\n '貸方取引先コード', '貸方税区分', '貸方税込区分', '貸方金額', '貸方消費税額', '貸方消費税本体科目コード',\n '貸方分析コード1', '貸方分析コード2', '貸方分析コード3', '貸方分析コード4', '貸方分析コード5', '貸方資金コード',\n '貸方プロジェクトコード', '明細摘要', '伝票摘要', 'ユーザID', '借方事業所コード', '貸方事業所コード'\n ];\n\n $objPHPExcel->getProperties()->setCreator('VisionVietnam')\n ->setLastModifiedBy('Phong Phu')\n ->setTitle('Office 2007 Document')\n ->setSubject('Office 2007 Document')\n ->setDescription('Document has been generated by PHP')\n ->setKeywords('Office 2007 openxml php')\n ->setCategory('OBIC File');\n $last_column = null;\n $explicit = [7,8,10,11,12,13,15,16,27,28,29,30,32];\n\n foreach($header as $i=>$v){\n\t\t\t$column = \\PHPExcel_Cell::stringFromColumnIndex($i);\n\t\t\t$objPHPExcel->setActiveSheetIndex(0)->setCellValue($column.'1',$v);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle($column.'1')\n\t\t\t\t\t\t->applyFromArray([\n\t\t\t\t\t\t 'font' => [\n\t\t\t\t\t\t 'name' => 'Times New Roman',\n\t\t\t\t\t\t 'bold' => true,\n\t\t\t\t\t\t 'italic' => false,\n\t\t\t\t\t\t 'size' => 10,\n\t\t\t\t\t\t 'color' => ['rgb'=> \\PHPExcel_Style_Color::COLOR_WHITE]\n\t\t\t\t\t\t ],\n\t\t\t\t\t\t 'alignment' => [\n\t\t\t\t\t\t 'horizontal' => \\PHPExcel_Style_Alignment::HORIZONTAL_CENTER,\n\t\t\t\t\t\t 'vertical' => \\PHPExcel_Style_Alignment::VERTICAL_CENTER,\n\t\t\t\t\t\t 'wrap' => false\n\t\t\t\t\t\t ]\n\t\t\t\t\t\t]);\n switch($i+1){\n case 4:\n case 15:\n case 16:\n case 18:\n $width = 20;\n break;\n case 13:\n case 14:\n case 20:\n case 21:\n case 22:\n case 23:\n case 24:\n case 25:\n case 30:\n case 31:\n $width = 25;\n break;\n case 10:\n case 11:\n case 12:\n case 19:\n case 26:\n case 27:\n case 28:\n $width = 30;\n break;\n case 29:\n case 44:\n case 45:\n $width = 40;\n break;\n default:\n $width = 15;\n break;\n }\n $objPHPExcel->getActiveSheet()->getColumnDimension($column)->setWidth($width);\n $last_column = $column;\n }\n //decode params\n $param = \\Input::param();\n parse_str(base64_decode($param['p']), $params);\n //get form payment content\n $rows = $this->generate_content($params);\n $i = 0;\n foreach($rows as $row){\n\t\t\tforeach($row as $k=>$v){\n\t\t\t\t$column = \\PHPExcel_Cell::stringFromColumnIndex($k);\n\t\t\t\tif(in_array($k+1,$explicit)){\n\t\t\t\t\t$objPHPExcel->setActiveSheetIndex()->setCellValueExplicit($column.($i+2),$v,\\PHPExcel_Cell_DataType::TYPE_STRING);\n\t\t\t\t}else{\n\t\t\t\t\t$objPHPExcel->setActiveSheetIndex()->setCellValue($column.($i+2),$v);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A1:'.$last_column.'1')->getFill()->setFillType(\\PHPExcel_Style_Fill::FILL_SOLID);\n $objPHPExcel->getActiveSheet()->getStyle('A1:'.$last_column.'1')->getFill()->getStartColor()->setRGB('5f5f5f');\n\n\t\t$objWriter = \\PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');\n\t\tob_end_clean();\n\n\t\theader(\"Last-Modified: \". gmdate(\"D, d M Y H:i:s\") .\" GMT\");\n header(\"Cache-Control: max-age=0\");\n header('Content-Type: application/vnd.ms-excel');\n header('Content-Disposition: attachment;filename=\"obic-'.date('Y-m-d').'.xls\"');\n $objWriter->save('php://output');\n\t\texit;\n }",
"function libExcel() {\n\t\t$this->objPHPExcel = new PHPExcel();\n\t\t// Set document properties\n\t\t// echo date('H:i:s') , \" Set document properties\" , EOL;\n\t\t$this->objPHPExcel->getProperties()->setCreator(\"Maarten Balliauw\")\n\t\t\t\t\t\t\t ->setLastModifiedBy(\"Maarten Balliauw\")\n\t\t\t\t\t\t\t ->setTitle(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t ->setSubject(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t ->setDescription(\"Test document for Office 2007 XLSX, generated using PHP classes.\")\n\t\t\t\t\t\t\t ->setKeywords(\"office 2007 openxml php\")\n\t\t\t\t\t\t\t ->setCategory(\"Test result file\");\n\n\t}",
"public function createTable(){\n\t\t\t\n\t\t$sql = \"CREATE TABLE IF NOT EXISTS `biblio_entries_inbook` (\n\t\t`id_publi` int(11) NOT NULL AUTO_INCREMENT,\t\n\t\t`chapter` varchar(150) NOT NULL,\n\t\t`pages` varchar(15) NOT NULL,\t\t\t\t\n\t\t`publisher` int(11) NOT NULL,\n\t\t`volume` int(11) NOT NULL,\t\t\n\t\t`series` varchar(20) NOT NULL,\n\t\t`address` varchar(50) NOT NULL,\n\t\t`edition` varchar(50) NOT NULL,\t\t\t\t\t\t\n\t\tPRIMARY KEY (`id_publi`)\n\t\t);\";\n\t\t$pdo = $this->runRequest($sql);\n\t\treturn $pdo;\n\t}",
"function createSpreadsheet(){\n\t\t\n\t\n\t\terror_reporting(E_ALL);\n\t\tini_set('display_errors', TRUE);\n\t\tini_set('display_startup_errors', TRUE);\n\t\n\t\tdefine('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');\n\t\n\t\t/** Include PHPExcel */\n\t\t//require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';\n\t\t\n\t\trequire_once $GLOBALS['ROOT_PATH'].'Classes/PHPExcel.php';\n\t\n\t\n\t\tPHPExcel_Cell::setValueBinder( new PHPExcel_Cell_AdvancedValueBinder() );\n\t\n\t\t// Create new PHPExcel object\n\t\t$objPHPExcel = new PHPExcel();\n\t\t$currentMonth = date('Y-m');\n\t\t$title = $this->getHhName() . ' ' . $currentMonth;\n\t\t\n\t\t// Set document properties\n\t\t$objPHPExcel->getProperties()->setCreator(\"HhManagement\")\n\t\t->setLastModifiedBy(\"HhManagement\")\n\t\t->setTitle($title)\n\t\t->setSubject($currentMonth);\n\t\n\t\t//default styles\n\t\t$objPHPExcel->getDefaultStyle()->getFont()->setName('Calibri');\n\t\t$objPHPExcel->getDefaultStyle()->getFont()->setSize(12);\n\t\n\t\n\t\t//styles....\n\t\n\t\t//fonts\n\t\t//font red bold italic centered\n\t\t$fontRedBoldItalicCenter = array (\n\t\t\t\t'font' => array (\n\t\t\t\t\t\t'bold' => true,\n\t\t\t\t\t\t'italic' => true,\n\t\t\t\t\t\t'color' => array(\n\t\t\t\t\t\t\t\t'argb' => 'FFF40202',\n\t\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'alignment' => array (\n\t\t\t\t\t\t'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER,\n\t\t\t\t\t\t'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER\n\t\t\t\t)\n\t\t);\n\t\n\t\t//font red bold\n\t\t$fontRedBold = array (\n\t\t\t\t'font' => array (\n\t\t\t\t\t\t'bold' => true,\n\t\t\t\t\t\t'color' => array(\n\t\t\t\t\t\t\t\t'argb' => 'FFF40202',\n\t\t\t\t\t\t)\n\t\t\t\t)\n\t\t);\n\t\n\t\t//font red\n\t\t$fontRed = array (\n\t\t\t\t'font' => array (\n\t\t\t\t\t\t'color' => array(\n\t\t\t\t\t\t\t\t'argb' => 'FFF40202',\n\t\t\t\t\t\t)\n\t\t\t\t)\n\t\t);\n\t\n\t\t//font Green\n\t\t$fontGreen = array (\n\t\t\t\t'font' => array (\n\t\t\t\t\t\t'color' => array(\n\t\t\t\t\t\t\t\t'argb' => '0008B448',\n\t\t\t\t\t\t)\n\t\t\t\t)\n\t\t);\n\t\n\t\t//font Bold Italic\n\t\t$fontBoldItalic = array (\n\t\t\t\t'font' => array (\n\t\t\t\t\t\t'bold' => true,\n\t\t\t\t\t\t'italic' => true,\n\t\t\t\t)\n\t\t);\n\t\n\t\t//font Bold Italic Centered\n\t\t$fontBoldItalicCenter = array (\n\t\t\t\t'font' => array (\n\t\t\t\t\t\t'bold' => true,\n\t\t\t\t\t\t'italic' => true,\n\t\t\t\t),\n\t\t\t\t'alignment' => array (\n\t\t\t\t\t\t'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER,\n\t\t\t\t\t\t'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER\n\t\t\t\t)\n\t\t);\n\t\n\t\t//background fillings\n\t\t//fill red\n\t\t$fillRed = array (\n\t\t\t\t'fill' => array(\n\t\t\t\t\t\t'type' => PHPExcel_Style_Fill::FILL_SOLID,\n\t\t\t\t\t\t'startcolor' => array(\n\t\t\t\t\t\t\t\t'argb' => 'FFF40202',\n\t\t\t\t\t\t),\n\t\t\t\t),\n\t\t);\n\t\n\t\t//fill yellow\n\t\t$fillYellow = array (\n\t\t\t\t'fill' => array(\n\t\t\t\t\t\t'type' => PHPExcel_Style_Fill::FILL_SOLID,\n\t\t\t\t\t\t'startcolor' => array(\n\t\t\t\t\t\t\t\t'argb' => 'FFF2E500',\n\t\t\t\t\t\t),\n\t\t\t\t),\n\t\t);\n\t\n\t\t//fill green\n\t\t$fillGreen = array (\n\t\t\t\t'fill' => array(\n\t\t\t\t\t\t'type' => PHPExcel_Style_Fill::FILL_SOLID,\n\t\t\t\t\t\t'startcolor' => array(\n\t\t\t\t\t\t\t\t'argb' => 'FF92D050',\n\t\t\t\t\t\t),\n\t\t\t\t),\n\t\t);\n\t\n\t\t//fill gray\n\t\t$fillGray = array (\n\t\t\t\t'fill' => array(\n\t\t\t\t\t\t'type' => PHPExcel_Style_Fill::FILL_SOLID,\n\t\t\t\t\t\t'startcolor' => array(\n\t\t\t\t\t\t\t\t'argb' => 'FFD9D9D9',\n\t\t\t\t\t\t),\n\t\t\t\t),\n\t\t);\n\t\n\t\t//fill cream\n\t\t$fillCream = array (\n\t\t\t\t'fill' => array(\n\t\t\t\t\t\t'type' => PHPExcel_Style_Fill::FILL_SOLID,\n\t\t\t\t\t\t'startcolor' => array(\n\t\t\t\t\t\t\t\t'argb' => 'FFC4BD97',\n\t\t\t\t\t\t),\n\t\t\t\t),\n\t\t);\n\t\n\t\t//sets the heading for the first table\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A1')->applyFromArray($fillCream);\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('B1','Equal AMT');\n\t\t$objPHPExcel->getActiveSheet()->getStyle('B1')->applyFromArray($fontRedBoldItalicCenter);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('B1')->applyFromArray($fillCream);\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('C1','Ind. bills');\n\t\t$objPHPExcel->getActiveSheet()->getStyle('C1')->applyFromArray($fontRedBoldItalicCenter);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('C1')->applyFromArray($fillCream);\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('D1','To rent');\n\t\t$objPHPExcel->getActiveSheet()->getStyle('D1')->applyFromArray($fontRedBoldItalicCenter);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('D1')->applyFromArray($fillCream);\n\t\n\t\t$numberOfMembers = $this->getNumberOfMembers();\n\t\t$monthTotal = $this->getMonthTotal();\n\t\t$rent = $this->getHhRent();\n\t\t$col = 65;//starts at column A\n\t\t$row = 2;//the table starts at row 2\n\t\n\t\t//array used to associate the bills with the respective user\n\t\t$array =[];\n\t\n\t\t//sets the members names fair amount and value\n\t\t$members = $this->getMembers();\n\t\tforeach ($members as $member) {\n\t\t\t$name = $member->getUserFirstName();\n\t\t\t$cellName = chr($col) . $row;\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue($cellName,$name);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle($cellName)->applyFromArray($fontBoldItalic);\n\t\n\t\t\t$cellInd = chr($col+2) . $row;\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue($cellInd,'0.0');\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle($cellInd)->getNumberFormat()\n\t\t\t->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle($cellInd)->applyFromArray($fillRed);\n\t\n\t\t\t$cellFair = chr($col+1) . $row;\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle($cellFair)->applyFromArray($fontRed);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle($cellFair)->getNumberFormat()\n\t\t\t->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle($cellFair)->applyFromArray($fillGray);\n\t\n\t\t\t$cellRent = chr($col+3) . $row;\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue($cellRent,'=SUM('. $cellFair .'-'. $cellInd .')');\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle($cellRent)->applyFromArray($fontGreen);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle($cellRent)->getNumberFormat()\n\t\t\t->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle($cellInd)->applyFromArray($fillYellow);\n\t\n\t\t\t$array[$name]['cell'] = $cellInd;\n\t\t\t$row++;\n\t\t}\n\t\n\t\t//inserts the sum of the fair amounts to compare to the one below\n\t\t$endCell = chr($col+1) . ($row-1);\n\t\t$cell = chr($col+1) . $row;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue($cell,'=SUM(B2:'.$endCell.')');\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->applyFromArray($fontRed);\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->getNumberFormat()\n\t\t->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->applyFromArray($fillGray);\n\t\n\t\t//insert the rent check values\n\t\t$cell = chr($col+2) .$row;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue($cell,'Rent');\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->applyFromArray($fontBoldItalic);\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->applyFromArray($fillYellow);\n\t\t$cell = chr($col+3) . $row;\n\t\t$endCell = chr($col+3) .($row-1);\n\t\t$objPHPExcel->getActiveSheet()->setCellValue($cell,'=SUM(D2:'.$endCell.')');\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->applyFromArray($fontRedBold);\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->getNumberFormat()\n\t\t->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->applyFromArray($fillYellow);\n\t\n\t\t//inserts the bill and amount labels\n\t\t$row += 2;\n\t\t$cellMergeEnd = chr($col+1) . $row;\n\t\t$cell = chr($col) . $row++;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue($cell,'House bills');\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->applyFromArray($fontBoldItalicCenter);\n\t\t$objPHPExcel->getActiveSheet()->mergeCells($cell.':'.$cellMergeEnd);\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->applyFromArray($fillRed);\n\t\n\t\t$cell = chr($col) . $row;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue($cell,'Bill');\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->applyFromArray($fontBoldItalicCenter);\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->applyFromArray($fillGreen);\n\t\n\t\t$cell = chr($col+1) . $row++;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue($cell,'Amount');\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->applyFromArray($fontBoldItalicCenter);\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->applyFromArray($fillGreen);\n\t\n\t\n\t\t//inserts the bills\n\t\t$startCell = chr($col+1) . $row;\n\t\tforeach ($members as $member) {\n\t\t\t$name = $member->getUserFirstName();\n\t\t\t$col = 65;\n\t\t\t$bills = $member->getBills();\n\t\t\t$array[$name]['bills'] = [];\n\t\t\tforeach ($bills as $bill) {\n\t\t\t\t$desc = $bill->getBillDescription();\n\t\t\t\t$amount = $bill->getBillAmount();\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue(chr($col) . $row,$desc);\n\t\t\t\t$amountCell = chr($col+1) . $row++;\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue($amountCell,$amount);\n\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle($amountCell)->getNumberFormat()\n\t\t\t\t->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);\n\t\t\t\tarray_push($array[$name]['bills'], $amountCell);\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\n\t\t$col = 65;\n\t\n\t\t//inserts rent\n\t\t$cell = chr($col) .$row;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue($cell,'Rent');\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->applyFromArray($fillYellow);\n\t\n\t\t$cell = chr($col+1) . $row++;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue($cell,$rent);\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->getNumberFormat()\n\t\t->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->applyFromArray($fillYellow);\n\t\t$endCell = chr($col+1) . ($row-1);\n\t\n\t\t//inserts the total of bills\n\t\t$col = 65;\n\t\t$cell = chr($col) .$row;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue($cell,'Total H-B');\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->applyFromArray($fontRedBoldItalicCenter);\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->applyFromArray($fillCream);\n\t\n\t\t$cell = chr($col+1) .$row++;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue($cell, '=SUM('. $startCell .':'. $endCell .')');\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->applyFromArray($fontRedBoldItalicCenter);\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->getNumberFormat()\n\t\t->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->applyFromArray($fillCream);\n\t\n\t\t//inserts the fair amount\n\t\t$cell = chr($col) .$row;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue($cell,'Fair Amount if ' . $numberOfMembers);\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->applyFromArray($fillGray);\n\t\t$cell = chr($col+1) .$row;\n\t\t$objPHPExcel->getActiveSheet()\n\t\t->setCellValue($cell,'='. chr($col+1) .($row-1) . '/' . $numberOfMembers);\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->getNumberFormat()\n\t\t->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);\n\t\t$objPHPExcel->getActiveSheet()->getStyle($cell)->applyFromArray($fillGray);\n\t\t$fairAmountCell = chr($col+1) . $row;\n\t\n\t\t$row = 2;\n\t\tforeach ($members as $member) {\n\t\t\t$col = 66;\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue(chr($col) . $row++,'='. $fairAmountCell);\n\t\t}\n\t\n\t\t//inserts the individual bills\n\t\tforeach ($array as $value){\n\t\t\t$cell = $value['cell'];\n\t\t\t$sumOfBills = '';\n\t\t\t\t\n\t\t\tif (isset($value['bills'])) {\n\t\t\t\t$bills = $value['bills'];\n\t\t\t\t$counter = 1;\n\t\t\t\tforeach ($bills as $bill){\n\t\t\t\t\tif ($counter == 1){\n\t\t\t\t\t\t$sumOfBills .= $bill;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$sumOfBills .= '+' . $bill;\n\t\t\t\t\t}\n\t\t\t\t\t$counter++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue($cell,'=SUM('. $sumOfBills . ')');\n\t\t}\n\t\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setAutoSize(true);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setAutoSize(true);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setAutoSize(true);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setAutoSize(true);\n\t\n\t\t// Rename worksheet\n\t\t$objPHPExcel->getActiveSheet()->setTitle($title);\n\t\n\t\t// Set active sheet index to the first sheet, so Excel opens this as the first sheet\n\t\t$objPHPExcel->setActiveSheetIndex(0);\n\t\n\t\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\t\t$objWriter->setPreCalculateFormulas(true);\n\t\t//$objWriter->save(str_replace('.php', '.xlsx', __FILE__));\n\t\t$objWriter->save(str_replace('.php', '.xlsx', $GLOBALS['ROOT_PATH']. 'spreadsheets/'. $title .'.php'));\n\t\n\t\treturn $title . '.xlsx';\n\t}",
"function export_log_trx_pendebetan()\n\t{\n\t\t$trx_date=$this->uri->segment(3);\n\t\t$angsuran_id=$this->uri->segment(4);\n\t\t$datas = $this->model_transaction->get_log_trx_pendebetan($trx_date,$angsuran_id);\n\t\t$data_angsuran_temp = $this->model_transaction->get_mfi_angsuran_temp_by_angsuran_id($angsuran_id);\n\n\t\t// Create new PHPExcel object\n\t\t$objPHPExcel = $this->phpexcel;\n\t\t// Set document properties\n\t\t$objPHPExcel->getProperties()->setCreator(\"MICROFINANCE\")\n\t\t\t\t\t\t\t\t\t ->setLastModifiedBy(\"MICROFINANCE\")\n\t\t\t\t\t\t\t\t\t ->setTitle(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t\t\t ->setSubject(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t\t\t ->setDescription(\"REPORT, generated using PHP classes.\")\n\t\t\t\t\t\t\t\t\t ->setKeywords(\"REPORT\")\n\t\t\t\t\t\t\t\t\t ->setCategory(\"Test result file\");\n\t\t\t\t\t\t\t\t\t \n\t\t$objPHPExcel->setActiveSheetIndex(0); \n\t\t\n\t\t/*\n\t\t| BORDER OPTION\n\t\t*/\n\t\t$styleArray['borders']['outline']['style']=PHPExcel_Style_Border::BORDER_THIN;\n\t\t$styleArray['borders']['outline']['color']['rgb']='000000';\n\t\t/*\n\t\t| SET COLUMN WIDTH\n\t\t*/\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(15);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(30);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setWidth(20);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setWidth(20);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('E')->setWidth(20);\n\n\t\t/*\n\t\t| ROW HEADER TITLE\n\t\t*/\n\t\t$row=1;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,\"List Angsuran Ter Debet\");\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row)->getFont()->setBold(true);\n\t\t\n\t\t$row+=2;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,\"NIK\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('B'.$row,\"Nama\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('C'.$row,\"Jumlah Pembayaran\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('D'.$row,\"Jumlah Terdebet\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('E'.$row,\"Selisih\");\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':E'.$row)->getFont()->setBold(true);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':A'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('B'.$row.':B'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('C'.$row.':C'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('D'.$row.':D'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('E'.$row.':E'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':E'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\t\t$row+=1;\n\t\t/*\n\t\t| ROW DATA\n\t\t*/\n\t\tfor($i=0;$i<count($datas);$i++){\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,$datas[$i]['nik']);\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('B'.$row,$datas[$i]['nama']);\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('C'.$row,$datas[$i]['jumlah_bayar']);\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('D'.$row,$datas[$i]['jumlah_angsuran']);\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('E'.$row,($datas[$i]['jumlah_bayar']-$datas[$i]['jumlah_angsuran']));\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':E'.$row)->getFont()->setSize(11);\n\t\t\t$row++;\n\t\t}\n\n\t\theader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n\t\theader('Content-Disposition: attachment;filename=\"ANGSURAN TER DEBET_'.$data_angsuran_temp['keterangan'].'.xlsx\"');\n\t\theader('Cache-Control: max-age=0');\n\n\t\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\t\t$objWriter->save('php://output');\n\t}",
"public function export()\n {\n include APPPATH . 'third_party/PHPExcel.php';\n\n // Panggil class PHPExcel nya\n $excel = new PHPExcel();\n\n date_default_timezone_set('Asia/Jakarta');\n $date = date(\"mY\");\n\n // Settingan awal fil excel\n $excel->getProperties()->setCreator('Admin PTPN VIII (' .$this->session->userdata('status_login'). ')')\n ->setLastModifiedBy('Admin PTPN VIII (' .$this->session->userdata('status_login'). ')')\n ->setTitle(\"Data A1\" .$date)\n ->setSubject(\"A1\" .$date)\n ->setDescription(\"Laporan Data A1\" .$date)\n ->setKeywords(\"Data A1\" .$date);\n\n // Buat sebuah variabel untuk menampung pengaturan style dari header tabel\n $style_col = array(\n 'font' => array('bold' => true), // Set font nya jadi bold\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER, // Set text jadi ditengah secara horizontal (center)\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n ),\n 'borders' => array(\n 'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n 'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n 'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n )\n );\n // Buat sebuah variabel untuk menampung pengaturan style dari isi tabel\n $style_row = array(\n 'alignment' => array(\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n ),\n 'borders' => array(\n 'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n 'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n 'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n )\n );\n\n // Buat header tabel nya pada baris ke 1\n $excel->setActiveSheetIndex(0)->setCellValue('A1', \"NPP\");\n $excel->setActiveSheetIndex(0)->setCellValue('B1', \"NAMA\");\n $excel->setActiveSheetIndex(0)->setCellValue('C1', \"NM_PGL\");\n $excel->setActiveSheetIndex(0)->setCellValue('D1', \"GLR_DPN\");\n $excel->setActiveSheetIndex(0)->setCellValue('E1', \"GLR_BLK\");\n $excel->setActiveSheetIndex(0)->setCellValue('F1', \"TPT_LAHIR\");\n $excel->setActiveSheetIndex(0)->setCellValue('G1', \"TGL_LAHIR\");\n $excel->setActiveSheetIndex(0)->setCellValue('H1', \"KELAMIN\");\n $excel->setActiveSheetIndex(0)->setCellValue('I1', \"GOL_DARAH\");\n $excel->setActiveSheetIndex(0)->setCellValue('J1', \"AGAMA\");\n $excel->setActiveSheetIndex(0)->setCellValue('K1', \"ALAMAT\");\n $excel->setActiveSheetIndex(0)->setCellValue('L1', \"KOTA\");\n $excel->setActiveSheetIndex(0)->setCellValue('M1', \"TINGGAL\");\n $excel->setActiveSheetIndex(0)->setCellValue('N1', \"SIPIL\");\n $excel->setActiveSheetIndex(0)->setCellValue('O1', \"STAT_IS\");\n $excel->setActiveSheetIndex(0)->setCellValue('P1', \"TGL_NIKAH\");\n $excel->setActiveSheetIndex(0)->setCellValue('Q1', \"TGL_CERAI\");\n $excel->setActiveSheetIndex(0)->setCellValue('R1', \"KANDUNG\");\n $excel->setActiveSheetIndex(0)->setCellValue('S1', \"ANGKAT\");\n $excel->setActiveSheetIndex(0)->setCellValue('T1', \"TANGGUNG\");\n $excel->setActiveSheetIndex(0)->setCellValue('U1', \"TGL_PPH\");\n $excel->setActiveSheetIndex(0)->setCellValue('V1', \"KD_PEND\");\n $excel->setActiveSheetIndex(0)->setCellValue('W1', \"TGL_SK\");\n $excel->setActiveSheetIndex(0)->setCellValue('X1', \"NO_SK\");\n $excel->setActiveSheetIndex(0)->setCellValue('Y1', \"KD_KELAS\");\n $excel->setActiveSheetIndex(0)->setCellValue('Z1', \"KLS_TMT\");\n $excel->setActiveSheetIndex(0)->setCellValue('AA1', \"KLS_SK\");\n $excel->setActiveSheetIndex(0)->setCellValue('AB1', \"GOL\");\n $excel->setActiveSheetIndex(0)->setCellValue('AC1', \"MK\");\n $excel->setActiveSheetIndex(0)->setCellValue('AD1', \"GOL_TMT\");\n $excel->setActiveSheetIndex(0)->setCellValue('AE1', \"GOL_SK\");\n $excel->setActiveSheetIndex(0)->setCellValue('AF1', \"GPO\");\n $excel->setActiveSheetIndex(0)->setCellValue('AG1', \"KD_KBN\");\n $excel->setActiveSheetIndex(0)->setCellValue('AH1', \"KD_ADF\");\n $excel->setActiveSheetIndex(0)->setCellValue('AI1', \"KD_JAB\");\n $excel->setActiveSheetIndex(0)->setCellValue('AJ1', \"NAMA_JAB\");\n $excel->setActiveSheetIndex(0)->setCellValue('AK1', \"KD_BUD\");\n $excel->setActiveSheetIndex(0)->setCellValue('AL1', \"JAB_TMT\");\n $excel->setActiveSheetIndex(0)->setCellValue('AM1', \"JAB_SK\");\n $excel->setActiveSheetIndex(0)->setCellValue('AN1', \"JAB_TGL\");\n $excel->setActiveSheetIndex(0)->setCellValue('AO1', \"ASTEK\");\n $excel->setActiveSheetIndex(0)->setCellValue('AP1', \"TASPEN\");\n $excel->setActiveSheetIndex(0)->setCellValue('AQ1', \"NO_KK\");\n $excel->setActiveSheetIndex(0)->setCellValue('AR1', \"NO_NIK\");\n $excel->setActiveSheetIndex(0)->setCellValue('AS1', \"NO_BPJS\");\n $excel->setActiveSheetIndex(0)->setCellValue('AT1', \"TGL_MPP\");\n $excel->setActiveSheetIndex(0)->setCellValue('AU1', \"TGL_PEN\");\n $excel->setActiveSheetIndex(0)->setCellValue('AV1', \"MKTHN\");\n $excel->setActiveSheetIndex(0)->setCellValue('AW1', \"MKBLN\");\n $excel->setActiveSheetIndex(0)->setCellValue('AX1', \"MKHR\");\n $excel->setActiveSheetIndex(0)->setCellValue('AY1', \"MPP\");\n $excel->setActiveSheetIndex(0)->setCellValue('AZ1', \"STAT_REC\");\n\n // Apply style header yang telah kita buat tadi ke masing-masing kolom header\n $excel->getActiveSheet()->getStyle('A1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('B1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('C1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('D1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('E1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('F1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('G1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('H1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('I1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('J1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('K1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('L1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('M1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('N1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('O1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('P1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_DDMMYYYY);\n $excel->getActiveSheet()->getStyle('Q1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_DDMMYYYY);\n $excel->getActiveSheet()->getStyle('R1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('S1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('T1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('U1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('V1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('W1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('X1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('Y1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('Z1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AA1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AB1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AC1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AD1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AE1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AF1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AG1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AH1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AI1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AJ1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AK1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AL1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AM1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AN1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AO1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AP1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AQ1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AR1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AS1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AT1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AU1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AV1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AW1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AX1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AY1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AZ1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n\n // Menampilkan semua data dari tabel rekao A1\n $numrow = 2; // Set baris pertama untuk isi tabel adalah baris ke 2\n $sdm01 = $this->Model_admin->tampil_a1();\n foreach ($sdm01->result_array() as $i) { // Lakukan looping pada variabel siswa\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('A' . $numrow, $i['npp'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValue('B' . $numrow, $i['nama']);\n $excel->setActiveSheetIndex(0)->setCellValue('C' . $numrow, $i['nm_pgl']);\n $excel->setActiveSheetIndex(0)->setCellValue('D' . $numrow, $i['glr_dpn']);\n $excel->setActiveSheetIndex(0)->setCellValue('E' . $numrow, $i['glr_blk']);\n $excel->setActiveSheetIndex(0)->setCellValue('F' . $numrow, $i['kota_lhr']);\n $excel->setActiveSheetIndex(0)->setCellValue('G' . $numrow, date('d-m-Y', strtotime($i['tgl_lhr'])));\n $excel->setActiveSheetIndex(0)->setCellValue('H' . $numrow, $i['j_kelamin']);\n $excel->setActiveSheetIndex(0)->setCellValue('I' . $numrow, $i['gol_darah']);\n $excel->setActiveSheetIndex(0)->setCellValue('J' . $numrow, $i['agama']);\n $excel->setActiveSheetIndex(0)->setCellValue('K' . $numrow, $i['alamat_tgl']);\n $excel->setActiveSheetIndex(0)->setCellValue('L' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('M' . $numrow, '1');\n $excel->setActiveSheetIndex(0)->setCellValue('N' . $numrow, $i['st_sipil']);\n\n $sdm02 = $this->Model_admin->get_sdm02_a1($i['npp']);\n foreach ($sdm02 as $a) {\n\n $excel->setActiveSheetIndex(0)->setCellValue('O' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('P' . $numrow, date('d-m-Y', strtotime($a['tgl_nkh'])));\n $excel->setActiveSheetIndex(0)->setCellValue('Q' . $numrow, date('d-m-Y', strtotime($a['tgl_cerai'])));\n }\n\n $sdm02 = $this->Model_admin->get_sdm02_a1_anak($i['npp']);\n foreach ($sdm02 as $b) {\n $excel->setActiveSheetIndex(0)->setCellValue('R' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('S' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('T' . $numrow, $b['tanggungan']);\n $excel->setActiveSheetIndex(0)->setCellValue('U' . $numrow, '');\n }\n\n $sdm03 = $this->Model_admin->get_sdm03_a1($i['npp']);\n foreach ($sdm03 as $c) {\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('V' . $numrow, $c['kd_pend'], PHPExcel_Cell_DataType::TYPE_STRING);\n }\n\n $excel->setActiveSheetIndex(0)->setCellValue('W' . $numrow, date('d-m-Y', strtotime($i['tgl_masuk'])));\n\n $sdm08 = $this->Model_admin->get_sdm08_a1($i['npp']);\n foreach ($sdm08 as $d) {\n\n $excel->setActiveSheetIndex(0)->setCellValue('X' . $numrow, $d['no_sk']);\n }\n\n $sdm16 = $this->Model_admin->get_sdm16_a1($i['npp']);\n foreach ($sdm16 as $e) {\n $excel->setActiveSheetIndex(0)->setCellValue('Y' . $numrow, $e['kd_kelas']);\n $excel->setActiveSheetIndex(0)->setCellValue('Z' . $numrow, date('d-m-Y', strtotime($e['kls_tmt'])));\n $excel->setActiveSheetIndex(0)->setCellValue('AA' . $numrow, $e['kls_sk']);\n }\n\n $sdm16 = $this->Model_admin->get_sdm16_a1_akhir($i['npp']);\n foreach ($sdm16 as $a) {\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AB' . $numrow, $a['golongan'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AC' . $numrow, $a['mk'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValue('AD' . $numrow, date('d-m-Y', strtotime($a['gol_tmt'])));\n $excel->setActiveSheetIndex(0)->setCellValue('AE' . $numrow, $a['gol_sk']);\n $excel->setActiveSheetIndex(0)->setCellValue('AF' . $numrow, '');\n }\n\n $sdm08 = $this->Model_admin->get_sdm08_a1_akhir($i['npp']);\n foreach ($sdm08 as $a) {\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AG' . $numrow, $a['kd_kbn'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AH' . $numrow, $a['kd_adf'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AI' . $numrow, $a['kd_jab'], PHPExcel_Cell_DataType::TYPE_STRING);\n\n $jab = $this->Model_admin->get_jabatan($a['kd_jab']);\n foreach ($jab as $jab) {\n $excel->setActiveSheetIndex(0)->setCellValue('AJ' . $numrow, $jab['nama']);\n }\n\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AK' . $numrow, $a['kd_bud'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValue('AL' . $numrow, date('d-m-Y', strtotime($a['jab_tmt'])));\n $excel->setActiveSheetIndex(0)->setCellValue('AM' . $numrow, $a['jab_sk']);\n $excel->setActiveSheetIndex(0)->setCellValue('AN' . $numrow, date('d-m-Y', strtotime($a['jab_tgl'])));\n }\n\n\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AO' . $numrow, $i['no_astek'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AP' . $numrow, $i['no_pens'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AQ' . $numrow, $i['no_kk'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AR' . $numrow, $i['no_nik'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AS' . $numrow, $i['no_bpjs'], PHPExcel_Cell_DataType::TYPE_STRING);\n\n $sdm16 = $this->Model_admin->get_sdm16_a1_akhir($i['npp']);\n $golongan = $sdm16[0]['golongan'];\n $golongan = (int)$golongan;\n if ($golongan >= 0 and $golongan <= 8) {\n $tgl_pen = date('Y-m-d', strtotime('+55 year +1 month', strtotime($i['tgl_lhr'])));\n $tgl_mpp = date('Y-m-d', strtotime('-6 month', strtotime($tgl_pen)));\n $excel->setActiveSheetIndex(0)->setCellValue('AT' . $numrow, date('01-m-Y', strtotime($tgl_mpp)));\n $excel->setActiveSheetIndex(0)->setCellValue('AU' . $numrow, date('01-m-Y', strtotime($tgl_pen)));\n }\n if ($golongan >= 9 and $golongan <= 16) {\n $tgl_pen = date('Y-m-d', strtotime('+56 year +1 month', strtotime($i['tgl_lhr'])));\n $tgl_mpp = date('Y-m-d', strtotime('-6 month', strtotime($tgl_pen)));\n $excel->setActiveSheetIndex(0)->setCellValue('AT' . $numrow, date('01-m-Y', strtotime($tgl_mpp)));\n $excel->setActiveSheetIndex(0)->setCellValue('AU' . $numrow, date('01-m-Y', strtotime($tgl_pen)));\n }\n\n $sdm01 = $this->Model_admin->tampil_a1($i['npp'])->result_array();\n $skrng = date_create($sdm01[0]['tgl_masuk']);\n $tgl_pen = date_create($tgl_pen);\n\n $diff = date_diff($skrng, $tgl_pen);\n\n if ($diff->y > 57) {\n $excel->setActiveSheetIndex(0)->setCellValue('AV' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('AW' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('AX' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('AY' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('AZ' . $numrow, '');\n } else {\n $excel->setActiveSheetIndex(0)->setCellValue('AV' . $numrow, $diff->y);\n $excel->setActiveSheetIndex(0)->setCellValue('AW' . $numrow, $diff->m);\n $excel->setActiveSheetIndex(0)->setCellValue('AX' . $numrow, $diff->d);\n $excel->setActiveSheetIndex(0)->setCellValue('AY' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('AZ' . $numrow, '');\n }\n\n // Apply style row yang telah kita buat tadi ke masing-masing baris (isi tabel)\n $excel->getActiveSheet()->getStyle('A' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('B' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('C' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('D' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('E' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('F' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('G' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('H' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('I' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('J' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('K' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('L' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('M' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('N' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('O' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('P' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('Q' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('R' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('S' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('T' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('U' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('V' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('W' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('X' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('Y' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('Z' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AA' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AB' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AC' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AD' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AE' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AF' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AG' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AH' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AI' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AJ' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AK' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AL' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AM' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AN' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AO' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AP' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AQ' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AR' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AS' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AT' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AU' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AV' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AW' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AX' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AY' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AZ' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n\n $numrow++; // Tambah 1 setiap kali looping\n }\n\n\n // Set width kolom\n $excel->getActiveSheet()->getColumnDimension('A')->setWidth(15);\n $excel->getActiveSheet()->getColumnDimension('B')->setWidth(30);\n $excel->getActiveSheet()->getColumnDimension('C')->setWidth(30);\n $excel->getActiveSheet()->getColumnDimension('D')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('E')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('F')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('G')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('H')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('I')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('J')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('K')->setWidth(50);\n $excel->getActiveSheet()->getColumnDimension('L')->setWidth(20);\n $excel->getActiveSheet()->getColumnDimension('M')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('N')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('O')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('P')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('Q')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('R')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('S')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('T')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('U')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('V')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('W')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('X')->setWidth(25);\n $excel->getActiveSheet()->getColumnDimension('Y')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('Z')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('AA')->setWidth(25);\n $excel->getActiveSheet()->getColumnDimension('AB')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AC')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AD')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('AE')->setWidth(25);\n $excel->getActiveSheet()->getColumnDimension('AF')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AG')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AH')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AI')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('AJ')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AK')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('AL')->setWidth(25);\n $excel->getActiveSheet()->getColumnDimension('AM')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('AN')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AO')->setWidth(15);\n $excel->getActiveSheet()->getColumnDimension('AP')->setWidth(15);\n $excel->getActiveSheet()->getColumnDimension('AQ')->setWidth(15);\n $excel->getActiveSheet()->getColumnDimension('AR')->setWidth(15);\n $excel->getActiveSheet()->getColumnDimension('AS')->setWidth(15);\n $excel->getActiveSheet()->getColumnDimension('AT')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('AU')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('AV')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AW')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AX')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AY')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AZ')->setWidth(5);\n\n // Set height semua kolom menjadi auto (mengikuti height isi dari kolommnya, jadi otomatis)\n $excel->getActiveSheet()->getDefaultRowDimension()->setRowHeight(-1);\n\n // Set orientasi kertas jadi LANDSCAPE\n $excel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);\n\n date_default_timezone_set('Asia/Jakarta');\n $date = date(\"mY\");\n\n // Set judul file excel nya\n $excel->getActiveSheet(0)->setTitle(\"Data A1\");\n $excel->setActiveSheetIndex(0);\n\n // Proses file excel\n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n header('Content-Disposition: attachment; filename=\"Data A1' . $date . '.xlsx\"'); // Set nama file excel nya\n header('Cache-Control: max-age=0');\n\n header('Content-Transfer-Encoding: binary');\n header('Accept-Ranges: bytes');\n header('Cache-control: no-cache, pre-check=0, post-check=0');\n header('Cache-control: private');\n header('Pragma: private');\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // any date in the past\n\n $write = PHPExcel_IOFactory::createWriter($excel, 'Excel2007');\n $write->save('php://output');\n }",
"public function makeTable($header, $data) {\n $this->SetFillColor(255, 0, 0);\n $this->SetTextColor(255);\n $this->SetDrawColor(128, 0, 0);\n $this->SetLineWidth(.3);\n $this->SetFont('', 'B');\n // Header\n $w = array(10, 25, 40, 10, 25, 15, 60, 10, 10, 10, 10, 10, 10, 10, 10, 10);\n for ($i = 0; $i < count($header); $i++)\n if ($i == 0) {\n $this->Cell($w[$i], 7, $header[$i], 1, 0, 'C', true);\n } else {\n $this->Cell($w[$i], 7, $header[$i], 1, 0, 'L', true);\n }\n $this->Ln();\n // Color and font restoration\n $this->SetFillColor(224, 235, 255);\n $this->SetTextColor(0);\n $this->SetFont('');\n // Data\n $fill = false;\n\n foreach ($data as $row) {\n $this->nr++;\n $this->Cell($w[0], 6, $this->nr, 'LR', 0, 'C', $fill);\n $this->Cell($w[1], 6, $row['article'], 'LR', 0, 'L', $fill);\n $this->Cell($w[2], 6, $row['brand'], 'LR', 0, 'L', $fill);\n $this->Cell($w[3], 6, $row['inch'], 'LR', 0, 'L', $fill);\n $this->Cell($w[4], 6, $row['size'], 'LR', 0, 'L', $fill);\n $this->Cell($w[5], 6, $row['lisi'], 'LR', 0, 'L', $fill);\n $this->Cell($w[6], 6, $row['design'], 'LR', 0, 'L', $fill);\n $this->Cell($w[7], 6, $row['onhand'], 'LR', 0, 'C', $fill);\n $this->Cell($w[8], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[9], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[10], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[11], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[12], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[13], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[14], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[15], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Ln();\n $fill = !$fill;\n }\n // Closing line\n $this->Cell(array_sum($w), 0, '', 'T');\n }",
"private function prepareTables() {}",
"public function createTable( $table ) {\n\t\t$rawTable = $this->safeTable($table,true);\n\t\t$table = $this->safeTable($table);\n\n\t\t$sql = ' CREATE TABLE '.$table.' (\n \"id\" integer AUTO_INCREMENT,\n\t\t\t\t\t CONSTRAINT \"pk_'.$rawTable.'_id\" PRIMARY KEY(\"id\")\n\t\t )';\n\t\t$this->adapter->exec( $sql );\n\t}",
"function createDBTables() {\n $installer = new TrelloInstaller();\n return $installer->install();\n }",
"function buildTempTableFromData($uniqueId){\n\t\t//require_once($_SERVER['DOCUMENT_ROOT'] .\"/inc/php/classes/sql_safe.php\" );\n\t\t//Grab first row\n\t\t if(!isset($this->data[0])){\n\t\t \tthrow new Exception(\"Bad Data Format. Foxpro report needs an array of arrays\");\n\t\t }\n\t\t$firstRow = $this->data[0];\n\t\t$columns = array_keys($firstRow);\n\n\t\t//See the excel sheet in project files for an explanation of this logic.\n\t\t$paramLimit = 1500; //sqlsrv max escaped params is 2100. driver will throw an error if you exceed 2100.\n\t\t$rowCount = count($this->data);\n\t\t$columnCount = count($this->data[0]);\n\t\tif($columnCount > $paramLimit){\n\t\t\tthrow new Exception(\"Cannot insert more columns than the parameter limit! Column Count = {$columnCount}. Parameter Limit = {$paramLimit}.\");\n\t\t}\n\t\t$paramTotal = $columnCount*$rowCount;\n\t\t$groupsNeeded = ceil($paramTotal/$paramLimit);\n\t\t$chunkSize = floor($rowCount/$groupsNeeded);\n\t\t$chunks = array_chunk($this->data,$chunkSize);\n\n\t\t$tableName = \"tmp_foxpro_autogen_\".$uniqueId;\n\n\t\t$columnSqlArray = array();\n\t\tforeach ($columns as $column) {\n\t\t\t$columnSqlArray[] = \"[{$column}] [varchar](MAX) NULL\";\n\t\t}\n\t\t$tableNameQuery = \"FWE_DEV..[{$tableName}]\";\n\t\t$createQuery = \"CREATE TABLE {$tableNameQuery} (\" . implode(\",\", $columnSqlArray) . \")\";\n\t\t$this->mssqlHelperInstance->query($createQuery);\n\n\t\t$dbClass = get_class($this->mssqlHelperInstance);\n\t\tif ($dbClass == 'mssql_helper') {\n\t\t\trequire_once($_SERVER['DOCUMENT_ROOT'] . '/inc/php/classes/sqlsrv_helper.php');\n\t\t\t$insertInstance = new sqlsrv_helper('m2m');\n\t\t} else {\n\t\t\t$insertInstance = $this->mssqlHelperInstance;\n\t\t}\n\n\t\tforeach($chunks as $chunk) {\n\n\t\t\t$insertSqlArray = array();\n\t\t\t$queryValues = array();\n\t\t\tforeach ($chunk as $row) {\n\t\t\t\t$values = array_values($row);\n\t\t\t\t$rowArray = array();\n\t\t\t\tforeach ($values as $value) {\n\t\t\t\t\t$rowArray[] = \"?\";\n\t\t\t\t\t$queryValues[] = (string)$value;\n\t\t\t\t}\n\t\t\t\t$insertSqlArray[] = \"(\" . implode(\",\", $rowArray) . \")\";\n\t\t\t}\n\t\t\t$insertQuery = \"INSERT INTO {$tableNameQuery} (\" . implode(\",\", $columns) . \") VALUES \" . implode(\",\", $insertSqlArray) . \"\";\n\n\t\t\t$insertInstance->query($insertQuery, $queryValues);\n\t\t}\n\t\t$this->tableName = $tableNameQuery;\n\t}",
"public function createTable()\n\t{\n\t\t$table = $this->getTableName();\n\t\t$indexes = $this->defineIndexes();\n\t\t$columns = array();\n\n\t\t// Add any Foreign Key columns\n\t\tforeach ($this->getBelongsToRelations() as $name => $config)\n\t\t{\n\t\t\t$required = !empty($config['required']);\n\t\t\t$columns[$config[2]] = array('column' => ColumnType::Int, 'required' => $required);\n\n\t\t\t// Add unique index for this column?\n\t\t\t// (foreign keys already get indexed, so we're only concerned with whether it should be unique)\n\t\t\tif (!empty($config['unique']))\n\t\t\t{\n\t\t\t\t$indexes[] = array('columns' => array($config[2]), 'unique' => true);\n\t\t\t}\n\t\t}\n\n\t\t// Add all other columns\n\t\tforeach ($this->defineAttributes() as $name => $config)\n\t\t{\n\t\t\t$config = ModelHelper::normalizeAttributeConfig($config);\n\n\t\t\t// Add (unique) index for this column?\n\t\t\t$indexed = !empty($config['indexed']);\n\t\t\t$unique = !empty($config['unique']);\n\n\t\t\tif ($unique || $indexed)\n\t\t\t{\n\t\t\t\t$indexes[] = array('columns' => array($name), 'unique' => $unique);\n\t\t\t}\n\n\t\t\t$columns[$name] = $config;\n\t\t}\n\n\t\t// Create the table\n\t\tblx()->db->createCommand()->createTable($table, $columns);\n\n\t\t// Create the indexes\n\t\tforeach ($indexes as $index)\n\t\t{\n\t\t\t$columns = ArrayHelper::stringToArray($index['columns']);\n\t\t\t$unique = !empty($index['unique']);\n\t\t\t$name = \"{$table}_\".implode('_', $columns).($unique ? '_unique' : '').'_idx';\n\t\t\tblx()->db->createCommand()->createIndex($name, $table, implode(',', $columns), $unique);\n\t\t}\n\t}",
"public function export() \n \t\t{\n \t\t$data = $this->model_user->export();\n \t\t#load PHPExcel library\n \t\t$this->excel->setActiveSheetIndex(0);\n \t\t#name the worksheet\n \t\t$this->excel->getActiveSheet()->setTitle('Data User SN Health Care');\n \n \t\t#STYLING\n \t\t$styleArray = array('borders' => array('allborders' => array('style' => PHPExcel_Style_Border::BORDER_THIN,'color' => array('argb' => '0000'))));\n \n \t\t#set report header\n \t\t$this->excel->getActiveSheet()->getStyle('A:I')->getFont()->setName('Times New Roman');\n \t\t$this->excel->getActiveSheet()->mergeCells('A1:J1');\n \t\t$this->excel->getActiveSheet()->setCellValue('A1', 'DAFTAR USER APLIKASI SN HEALTH CARE');\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getFont()->setBold(true);\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getFont()->setSize(12);\n \n \n \t\t//set column name\n \t\t$this->excel->getActiveSheet()->setCellValue('A2', 'No');\n \t\t$this->excel->getActiveSheet()->setCellValue('B2', 'Nama');\n \t\t$this->excel->getActiveSheet()->setCellValue('C2', 'Jenis Kelamin');\n \t\t$this->excel->getActiveSheet()->setCellValue('D2', 'Tanggal Lahir');\n \t\t$this->excel->getActiveSheet()->setCellValue('E2', 'Email');\n \t\t$this->excel->getActiveSheet()->setCellValue('F2', 'Password');\n \t\t$this->excel->getActiveSheet()->setCellValue('G2', 'Nomor Handphone');\n \t\t$this->excel->getActiveSheet()->setCellValue('H2', 'Wilayah');\n \t\t$this->excel->getActiveSheet()->setCellValue('I2', 'Alamat');\n \t\t$this->excel->getActiveSheet()->setCellValue('J2', 'Tanggal & Waktu Registrasi');\n \n\t\t\t $this->excel->getActiveSheet()->getStyle('A2:J2')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('A')->setWidth(4);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('B')->setWidth(30);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('C')->setWidth(15);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('D')->setWidth(15);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('E')->setWidth(30);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('F')->setWidth(30);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('G')->setWidth(20);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('H')->setWidth(30);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('I')->setWidth(40);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('J')->setWidth(25);\n \n \t\t$no = 3;\n \t\t$nomor = 1;\n \t\tforeach ($data as $v) \n \t\t{\n \t\t\t\n \t\t\t$this->excel->getActiveSheet()->getStyle('A' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('A' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('A' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('A' . $no, $nomor);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('B' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('B' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('B' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('B' . $no, $v->user_name);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('C' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('C' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('C' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('C' . $no, $v->user_sex);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('D' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('D' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('D' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('D' . $no, $v->user_datebirth);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('E' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('E' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('E' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('E' . $no, $v->user_email);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('F' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('F' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('F' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('F' . $no, $v->user_password);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('G' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('G' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('G' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('G' . $no, $v->user_phone);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('H' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('H' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('H' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('H' . $no, $v->district_name);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('I' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('I' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('I' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('I' . $no, $v->user_address);\n\t\t\t\t \n\t\t\t\t$this->excel->getActiveSheet()->getStyle('J' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('J' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('J' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('J' . $no, $v->user_registerdate);\n\t\t\t\t\n\t\t\t\t$no++;\n \t\t\t$nomor++;\n \t\t}\n \n \t\t$this->excel->getActiveSheet()->getStyle('A2:J' . ($no - 1))->applyFromArray($styleArray);\n \t\tob_end_clean();\n \t\t$filename = 'Daftar User Aplikasi SN Health Care.xls'; //save our workbook as this file name\n \t\theader('Content-Type: application/vnd.ms-excel'); //mime type\n \t\theader('Content-Disposition: attachment;filename=\"' . $filename . '\"'); //tell browser what's the file name\n \t\theader('Cache-Control: max-age=0'); //no cache\n \t\t$objWriter = PHPExcel_IOFactory::createWriter($this->excel, 'Excel5');\n \t\t$objWriter->save('php://output');\n \n \t\tredirect('admin/user');\n \t\t}",
"public function export_data_anggota_keluarga()\n {\n $spreadsheet = new Spreadsheet();\n $currentData = $this->AnggotaKeluargaModel->findAll();\n // tulis header/nama kolom \n $spreadsheet->setActiveSheetIndex(0)\n ->setCellValue('A1', 'No. KK')\n ->setCellValue('B1', 'No. KTP')\n ->setCellValue('C1', 'Nama')\n ->setCellValue('D1', 'Tempat Lahir')\n ->setCellValue('E1', 'Tanggal Lahir')\n ->setCellValue('F1', 'Jenis Kelamin')\n ->setCellValue('G1', 'Status Perkawinan')\n ->setCellValue('H1', 'Pendidikan')\n ->setCellValue('I1', 'Pekerjaan')\n ->setCellValue('J1', 'Catatan');\n\n $column = 2;\n // tulis data mobil ke cell\n foreach ($currentData as $data) {\n $spreadsheet->setActiveSheetIndex(0)\n ->setCellValue('A' . $column, $data['noKK'])\n ->setCellValue('B' . $column, $data['noKTP'])\n ->setCellValue('C' . $column, $data['nama'])\n ->setCellValue('D' . $column, $data['tempatLahir'])\n ->setCellValue('E' . $column, $data['tanggalLahir'])\n ->setCellValue('F' . $column, $data['jenisKelamin'])\n ->setCellValue('G' . $column, $data['statusPerkawinan'])\n ->setCellValue('H' . $column, $data['pendidikan'])\n ->setCellValue('I' . $column, $data['pekerjaan'])\n ->setCellValue('J' . $column, $data['catatan']);\n $column++;\n }\n // tulis dalam format .xlsx\n $writer = new Xlsx($spreadsheet);\n $fileName = 'Data Anggota Keluarga';\n\n // Redirect hasil generate xlsx ke web client\n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n header('Content-Disposition: attachment;filename=' . $fileName . '.xlsx');\n header('Cache-Control: max-age=0');\n\n $writer->save('php://output');\n }",
"public function createTables()\r\n {\r\n $sql = \"\r\n CREATE TABLE IF NOT EXISTS coins\r\n (\r\n id INT NOT NULL AUTO_INCREMENT,\r\n playername VARCHAR(32) NOT NULL,\r\n coins INT NOT NULL,\r\n ip VARCHAR(32) NOT NULL,\r\n cid VARCHAR(64) NOT NULL,\r\n PRIMARY KEY (id)\r\n );\r\n \";\r\n self::update($sql);\r\n }",
"public static function createTables()\n\t{\n\t\treturn (self::createContentTable());\n\t}",
"public function create_table($table, $definition, $index=array()){\n\t\t$create_sql = \"CREATE TABLE $table (\";\n\t\tif(!is_array($definition)){\n\t\t\tnew DbException(\"Definición invalida para crear la tabla '$table'\");\n\t\t\treturn false;\n\t\t}\n\t\t$create_lines = array();\n\t\t$index = array();\n\t\t$unique_index = array();\n\t\t$primary = array();\n\t\t$not_null = \"\";\n\t\t$size = \"\";\n\t\tforeach($definition as $field => $field_def){\n\t\t\tif(isset($field_def['not_null'])){\n\t\t\t\t$not_null = $field_def['not_null'] ? 'NOT NULL' : '';\n\t\t\t} else {\n\t\t\t\t$not_null = \"\";\n\t\t\t}\n\t\t\tif(isset($field_def['size'])){\n\t\t\t\t$size = $field_def['size'] ? '('.$field_def['size'].')' : '';\n\t\t\t} else {\n\t\t\t\t$size = \"\";\n\t\t\t}\n\t\t\tif(isset($field_def['index'])){\n\t\t\t\tif($field_def['index']){\n\t\t\t\t\t$index[] = \"INDEX($field)\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($field_def['unique_index'])){\n\t\t\t\tif($field_def['unique_index']){\n\t\t\t\t\t$index[] = \"UNIQUE($field)\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($field_def['primary'])){\n\t\t\t\tif($field_def['primary']){\n\t\t\t\t\t$primary[] = \"$field\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($field_def['auto'])){\n\t\t\t\tif($field_def['auto']){\n\t\t\t\t\t$gen = $this->fetch_one(\"SELECT COUNT(*) FROM RDB\\$GENERATORS WHERE RDB\\$GENERATOR_NAME = UPPER('{$table}_{$field}_seq')\");\n\t\t\t\t\tif(!$gen[0]){\n\t\t\t\t\t\t$this->query(\"INSERT INTO RDB\\$GENERATORS (RDB\\$GENERATOR_NAME) VALUES (UPPER('{$table}_{$field}_seq'))\");\n\t\t\t\t\t}\n\t\t\t\t\t$this->query(\"SET GENERATOR {$table}_{$field}_seq TO 1;\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($field_def['extra'])){\n\t\t\t\t$extra = $field_def['extra'];\n\t\t\t} else {\n\t\t\t\t$extra = \"\";\n\t\t\t}\n\t\t\t$create_lines[] = \"$field \".$field_def['type'].$size.' '.$not_null.' '.$extra;\n\t\t}\n\t\t$create_sql.= join(',', $create_lines);\n\t\t$last_lines = array();\n\t\tif(count($primary)){\n\t\t\t$last_lines[] = 'PRIMARY KEY('.join(\",\", $primary).')';\n\t\t}\n\t\tif(count($index)){\n\t\t\t$last_lines[] = join(',', $index);\n\t\t}\n\t\tif(count($unique_index)){\n\t\t\t$last_lines[] = join(',', $unique_index);\n\t\t}\n\t\tif(count($last_lines)){\n\t\t\t$create_sql.= ','.join(',', $last_lines).')';\n\t\t}\n\t\treturn $this->query($create_sql);\n\n\t}",
"function table_creation(){\n\t\tglobal $wpdb;\n\t\t\t$table = $wpdb->prefix.'wiki';\n\t\t\t$sql = \"CREATE TABLE IF NOT EXISTS `$table`(\n\t\t\t\t`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n\t\t\t\t`post_id` bigint(20) NOT NULL,\n\t\t\t\t`author_id` bigint(20) NOT NULL,\t\n\t\t\t\t`post_content` longtext collate utf8_general_ci,\n\t\t\t\t`percent` int(100),\n\t\t\t\t`matched_keys` longtext collate utf8_general_ci,\n\t\t\t\t`time` TIMESTAMP,\t\t\t\t\n\t\t\t\tPRIMARY KEY(id)\n\t\t\t\t\n\t\t\t\t)\";\n\t\t\t//loading the dbDelta function manually\n\t\t\tif(!function_exists('dbDelta')) :\n\t\t\t\trequire_once(ABSPATH.'wp-admin/includes/upgrade.php');\n\t\t\tendif;\n\t\t\tdbDelta($sql);\n\t}",
"function createTable($tablename, $fields, $types, $overwrite = FALSE) {\r\n //CREATE TABLE `TableName` (`FieldName1` DATE, `FieldName2` VARCHAR (50), `FieldName3` TEXT)\r\n $params = \"\";\r\n if (count($fields) == count($types)) {\r\n $params .= \"(\";\r\n $i = 0;\r\n foreach ($fields as $field) {\r\n $params .= $field . \" \" . $types[$i];\r\n if ($i < (count($types) - 1)) {\r\n $params .= \",\";\r\n }\r\n $i++;\r\n }\r\n $params .= \");\";\r\n }\r\n if ($overwrite == TRUE) {\r\n $query = \"drop table if exists $tablename;\";\r\n $this->makeQuery($query);\r\n }\r\n\r\n $query = \"CREATE TABLE $tablename \" . $params;\r\n //echo $query.'<br/>';\r\n return $this->makeQuery($query);\r\n }",
"public function exportExcel()\n {\n /** Fuente de Datos Eloquent */\n $data = User::all();\n\n /** Creamos nuestro archivo Excel */\n Excel::create('usuarios', function ($excel) use ($data) {\n\n /** Creamos una hoja */\n $excel->sheet('Hoja Uno', function ($sheet) use ($data) {\n /**\n * Insertamos los datos en la hoja con el método with/fromArray\n * Parametros: (\n * Datos,\n * Valores del encabezado de la columna,\n * Celda de Inicio,\n * Comparación estricta de los valores del encabezado\n * Impresión de los encabezados\n * )*/\n $sheet->with($data, null, 'A1', false, false);\n });\n\n /** Descargamos nuestro archivo pasandole la extensión deseada (xls, xlsx) */\n })->download('xlsx');///** Descarga del documento en csv ->download('csv');\n }",
"protected function generateTable(){\n\t\t$columns = $this->getConfig()->getColumns();\n\t\t$columns['magento_entity_id'] = array('type' => 'int');\n\n\t\t$sql = 'CREATE TABLE ' . $this->_table . '(';\n\n\t\tforeach ($columns as $name => $params) {\n\t\t\t$type = $this->getConfig()->getTypeForDatabase($params['type'], $name);\n\t\t\t$value = isset($params['default']) ? $params['default'] : 'NULL';\n\t\t\tif ($value != 'NULL') {\n\t\t\t\t$value = 'DEFAULT ' . $value;\n\t\t\t}\n\t\t\t$primary = isset($params['primary']) && $params['primary'] ? ' PRIMARY KEY' : '';\n\n\t\t\t$sql .= \"\\n\" . $name . \" \" . $type . \" \" . $value . $primary . \",\";\n\t\t}\n\t\t$sql = substr($sql, 0, -1) . ') ENGINE=InnoDB DEFAULT CHARSET=utf8;' . \"\\n\";\n\n\t\treturn $sql;\n\t}",
"public function CreateTable($sql){\n\t\t//Create Table\n\t\tif ($this->connection->query($sql) === TRUE) {\n\t\t #echo \"Table has been created successfully\";\n\t\t} else {\n\t\t #echo \"Error to creating table: \".$this->connection->error;\n\t\t}\n\t\t#echo \"<br>\";\n\t}",
"public function createExcelReport(\\PhpOffice\\PhpSpreadsheet\\Spreadsheet $spreadSheet){\n\t\t$wsResumen = new \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet($spreadSheet, 'Resumen');\n\t\t$wsDatos = new \\PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet($spreadSheet, 'Datos');\n\t\t//2. Escribe los datos sobre las hojas de cáculo\n\t\t//2.1. Escribe lo datos de la primera hoja\n\t\t//2.1.1. Inconsistencias por tipo\n\t\t$wsResumen->setCellValue(\"A3\",\"Inconsistencias por tipo\");\n\t\t$wsResumen->setCellValue(\"A4\",\"Desfase horario\");\n\t\t$wsResumen->setCellValue(\"A5\",\"Programación no coincide\");\n\t\t$wsResumen->setCellValue(\"A6\",\"Otros\");\n\t\t$wsResumen->setCellValue(\"A7\",\"Total\");\n\t\t//2.1.2. Inconsistencias por motivo\n\t\t$wsResumen->setCellValue(\"A9\",\"Inconsistencias por motivo\");\n\t\t$wsResumen->setCellValue(\"A10\",\"Origen\");\n\t\t$wsResumen->setCellValue(\"A11\",\"Error humano\");\n\t\t$wsResumen->setCellValue(\"A12\",\"Evento en vivo\");\n\t\t$wsResumen->setCellValue(\"A13\",\"Total\");\n\t\t//2.1.3. Inconsistencias por programadora\n\t\t$wsResumen->setCellValue(\"A15\",\"Inconsistencias por casa programadora\");\n\n\t\t//2.2. Escribe lo datos de la segunda hoja\n\t\t$wsDatos->setCellValue(\"A1\",\"Fecha-Hora Reporte\");\n\t\t$wsDatos->setCellValue(\"B1\",\"Fecha-Hora Evento\");\n\t\t$wsDatos->setCellValue(\"C1\",\"ID Evento\");\n\t\t$wsDatos->setCellValue(\"D1\",\"Título Evento\");\n\t\t$wsDatos->setCellValue(\"E1\",\"ID Canal\");\n\t\t$wsDatos->setCellValue(\"F1\",\"Nombre Canal\");\n\t\t$wsDatos->setCellValue(\"G1\",\"Casa Programadora\");\n\t\t$wsDatos->setCellValue(\"H1\",\"Tipo Error\");\n\t\t$wsDatos->setCellValue(\"I1\",\"Motivo Error\");\n\t\t$wsDatos->setCellValue(\"J1\",\"Desafase\");\n\t\t$wsDatos->setCellValue(\"K1\",\"Transmitiendo\");\n\t\t$wsDatos->setCellValue(\"L1\",\"Usuario\");\n\n\t\t$totals = $this->calculateTotals();\n\t\t$wsResumen = $this->setResumenPage($wsResumen,$totals);\n\t\t$wsDatos = $this->setDataPage($wsDatos);\t\t\n\t\t//Vincula las hojas al documento\n\t\t$spreadSheet->addSheet($wsResumen, 0);\n\t\t$spreadSheet->addSheet($wsDatos, 1);\n\t\treturn $spreadSheet;\n\n\n\t}",
"public function createTable()\n {\n $table = self::$table_name;\n $SQL = <<<EOD\n CREATE TABLE IF NOT EXISTS `$table` (\n `communication_usage_id` INT(11) NOT NULL AUTO_INCREMENT,\n `communication_usage_name` VARCHAR(32) NOT NULL DEFAULT '',\n `communication_usage_description` VARCHAR(255) NOT NULL DEFAULT '',\n PRIMARY KEY (`communication_usage_id`),\n UNIQUE (`communication_usage_name`)\n )\n COMMENT='The communication usage definition table'\n ENGINE=InnoDB\n AUTO_INCREMENT=1\n DEFAULT CHARSET=utf8\n COLLATE='utf8_general_ci'\nEOD;\n try {\n $this->app['db']->query($SQL);\n $this->app['monolog']->addInfo(\"Created table 'contact_communication_usage'\", array(__METHOD__, __LINE__));\n } catch (\\Doctrine\\DBAL\\DBALException $e) {\n throw new \\Exception($e);\n }\n }",
"public function export_to_excel($part)\n {\n // Init\n $table = [];\n $columns = [];\n\n $master_opsional = [];\n foreach (MasterOpsional::all() as $index => $item) {\n $master_opsional[$item['id_master_opsional']] = $item['opsional_master_ops']; \n }\n\n // print_r(MasterJenisAset::all());die();\n // Set column\n $columns = array_merge($columns, \n $this->get_column_responden(),\n $this->get_column_karak_rumah_tangga(),\n $this->get_column_pekerjaan_rumah_tangga(),\n $this->get_column_aset_rumah_tangga(),\n $this->get_column_kesehatan(),\n $this->get_column_perahu(),\n $this->get_column_alat_tangkap(),\n $this->get_column_tenaga_penggerak(),\n $this->get_column_aset_pendukung_usaha(),\n $this->get_column_biaya_tetap(),\n $this->get_column_biaya_variabel(),\n $this->get_column_penerimaan_usaha(),\n $this->get_column_ketenagakerjaan(),\n $this->get_column_konsumsi_pangan(),\n $this->get_column_konsumsi_non_pangan(),\n $this->get_column_partisiasi_sosial(),\n $this->get_column_partisiasi_organisasi(),\n $this->get_column_partisiasi_politik(),\n $this->get_column_rasa_percaya_masy(),\n $this->get_column_rasa_percaya_org(),\n $this->get_column_rasa_percaya_pol(),\n $this->get_column_nilai_norma()\n );\n \n $table[] = $columns;\n\n // Set data each responden\n // foreach (Responden::all() as $key => $value) {\n $i = $part - 1;\n $limit = 100;\n\n foreach (Responden::skip($i * $limit)->take($limit)->get() as $key => $value) {\n $row = [];\n $row = array_merge($row, \n $this->get_data_responden($value->id_responden),\n $this->get_data_karak_rumah_tangga($value->id_responden),\n $this->get_data_pekerjaan_rumah_tangga($value->id_responden),\n $this->get_data_aset_rumah_tangga($value->id_responden),\n $this->get_data_kesehatan($value->id_responden),\n $this->get_data_perahu($value->id_responden),\n $this->get_data_alat_tangkap($value->id_responden),\n $this->get_data_tenaga_penggerak($value->id_responden),\n $this->get_data_aset_pendukung_usaha($value->id_responden),\n $this->get_data_biaya_tetap($value->id_responden),\n $this->get_data_biaya_variabel($value->id_responden),\n $this->get_data_penerimaan_usaha($value->id_responden),\n $this->get_data_ketenagakerjaan($value->id_responden),\n $this->get_data_konsumsi_pangan($value->id_responden),\n $this->get_data_konsumsi_non_pangan($value->id_responden),\n $this->get_data_partisipasi_sosial($value->id_responden, $master_opsional),\n $this->get_data_partisipasi_organisasi($value->id_responden, $master_opsional),\n $this->get_data_partisipasi_politik($value->id_responden, $master_opsional),\n $this->get_data_rasa_percaya_masy($value->id_responden, $master_opsional),\n $this->get_data_rasa_percaya_org($value->id_responden, $master_opsional),\n $this->get_data_rasa_percaya_pol($value->id_responden, $master_opsional),\n $this->get_data_nilai_norma($value->id_responden, $master_opsional)\n );\n\n $table[] = $row;\n }\n // echo 'kolom: ' . count($table[0]) . '<br>';\n // echo 'data: ' . count($table[1]);\n // print_r($table); \n // die();\n\n Excel::create('Panelkanas_2016_Rekod_' . (($i * $limit) + 1) . '_' . (($i * $limit) + $limit), function($excel) use($table){\n $excel->sheet('Sheet1', function($sheet) use($table){\n $sheet->fromArray(\n $table,\n null,\n 'A1',\n false,\n false\n );\n\n\n // Set format of cell\n $sheet->row(1, function($row) {\n // call cell manipulation methods\n $row->setFontWeight('bold');\n\n });\n });\n\n })->export('xlsx');\n }",
"public function createTable(\n SugarBean $bean\n )\n {\n $sql = $this->getHelper()->createTableSQL($bean);\n $this->tableName = $bean->getTableName();\n $msg = \"Error creating table: \".$this->tableName. \":\";\n $this->query($sql,true,$msg);\n }",
"protected function startTable() {}",
"function crea_file_xlsx($id_progetto, $pq) {\n $writer = new XLSXWriter();\n foreach ($pq as $progetto_questionario) {\n $this->crea_sheet_questionario($writer, $progetto_questionario);\n }\n $filename = $this->get_new_file($id_progetto);\n if (file_exists($filename)) unlink($filename);\n $writer->writeToFile($filename);\n return $filename;\n }"
] | [
"0.70440465",
"0.67297953",
"0.6537376",
"0.648276",
"0.64484566",
"0.63876796",
"0.63686043",
"0.6332067",
"0.6309053",
"0.6308547",
"0.6252669",
"0.62516093",
"0.62474275",
"0.6240335",
"0.6238694",
"0.61718243",
"0.61523706",
"0.6140888",
"0.61248845",
"0.61178154",
"0.61086893",
"0.6107778",
"0.60817826",
"0.60674983",
"0.60208356",
"0.6019191",
"0.5998164",
"0.5979194",
"0.5960063",
"0.595309",
"0.5949203",
"0.5947596",
"0.59404343",
"0.59266907",
"0.59240496",
"0.59207445",
"0.5904181",
"0.59010524",
"0.58866745",
"0.58843046",
"0.58824617",
"0.58776885",
"0.5873177",
"0.58658314",
"0.5861932",
"0.58478546",
"0.5844942",
"0.5841084",
"0.5836937",
"0.5818253",
"0.5816076",
"0.58131",
"0.5810039",
"0.5803337",
"0.57746166",
"0.5769216",
"0.5756304",
"0.57562923",
"0.57528013",
"0.5740589",
"0.5739648",
"0.5738836",
"0.5731983",
"0.5730787",
"0.5728738",
"0.57258546",
"0.5722645",
"0.57186073",
"0.5715899",
"0.57157767",
"0.5708466",
"0.57065874",
"0.56923264",
"0.5689643",
"0.56892973",
"0.56834644",
"0.56802213",
"0.56747246",
"0.56693",
"0.56661266",
"0.566601",
"0.56629574",
"0.56591547",
"0.5658287",
"0.5654335",
"0.56524104",
"0.5651047",
"0.5633637",
"0.5623888",
"0.5623746",
"0.56210357",
"0.56202906",
"0.56172866",
"0.561025",
"0.5609841",
"0.56082594",
"0.560804",
"0.5604029",
"0.5602498",
"0.5596267",
"0.55936706"
] | 0.0 | -1 |
gets instance conenctor manager | public function getConnectorManager()
{
if (empty($this->connectorManger)) {
$this->connectorManager = new ConnectorManager();
}
return $this->connectorManager;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function getInstance(){\n if(MethodologiesManager::$obj == null){\n MethodologiesManager::$obj = new MethodologiesManager(new EloquentConnection());\n }\n return MethodologiesManager::$obj;\n }",
"function analogue()\n {\n return Manager::getInstance();\n }",
"public function getInstance()\n {\n return self::$instance;\n }",
"public static function get_instance() {\n\t\treturn self::$instance;\n\t}",
"public static function get_instance() {\n\t\treturn self::$instance;\n\t}",
"public static function get_instance()\n {\n }",
"public static function get_instance()\n {\n }",
"public static function get_instance()\n {\n }",
"public static function get_instance()\n {\n }",
"public static function get_instance()\n {\n }",
"public static function get_instance()\n {\n }",
"public function getInstance()\n {\n return $this->instance;\n }",
"public function getInstance()\n {\n return $this->instance;\n }",
"public function getInstance()\n {\n return $this->instance;\n }",
"public function getInstance()\n {\n return $this->instance;\n }",
"public static function getInstance()\n {\n return self::$instance;\n }",
"public static function getInstance()\n {\n return self::$instance;\n }",
"public static function &get_instance()\n {\n return self::$instance;\n }",
"public static function getInstance() {\n return self::$instance;\n }",
"static function getInstance()\n {\n if (!$instance) {\n $instance = new Connection(); //Chamando o construtor dessa classe\n }\n return $instance;\n }",
"public function getInstance() {\n\t\treturn $this->instance;\n\t}",
"public static function getInstance() {\n\t\treturn self::$instance;\n\t}",
"public static function getInstance()\n {\n return static::$instance;\n }",
"public static function getInstance()\n\t{\n\t\treturn self::$instance;\n\t}",
"public static function getInstance(): ConnectionManager\n\t{\n\t\tif (self::$instance === NULL)\n\t\t{\n\t\t\tself::$instance = new self();\n\t\t}\n\n\t\treturn self::$instance;\n\t}",
"public static function &get_instance() {\n\n\t\treturn self::$instance;\n\n\t}",
"public static function instance() {\n return self::$instance;\n }",
"public static function get_instance ();",
"public static function instance() {\r\n return self::$instance;\r\n }",
"public static function getInstance()\r\n {\r\n return static::$instance;\r\n }",
"public static function instance() {\n\t\treturn static::$instance;\n\t}",
"public static function &get_instance()\n\t{\n\t\treturn self::$instance;\n\t}",
"public static function &get_instance()\n\t{\n\t\treturn self::$instance;\n\t}",
"public static function &get_instance()\n\t{\n\t\treturn self::$instance;\n\t}",
"static function getInstance(){\n\t if (!isset(self::$instance)) {\n\t self::$instance = new TeamSetManager();\n\t\t\t//Set global variable for tracker monitor instances that are disabled\n\t self::$instance->setup();\n\t } // if\n\t return self::$instance;\n\t}",
"public static function &getinstance()\n {\n\t\treturn self::$instance;\n\t}",
"public static function getInstance()\n {\n if(self::$con)\n {\n return self::$con;\n }\n $a = new self();\n return self::$con;\n\n }",
"public static function get_instance() {\n \t if ( ! self::$instance ) {\n \t self::$instance = new self();\n \t }\n \t return self::$instance;\n \t}",
"function Cofiguration()\n\t{\n\t\t//$this->objConMgr = new ConnectionMgr();\n\t}",
"public function getInstance()\n {\n return $this;\n }",
"public static function getInstance(): self;",
"public function getCManager() {\n return $this->_cmanager;\n }",
"public function getConnection()\n\t{\n\t\treturn static::$instances[$this->_instance];\n\t}",
"public static function getInstance() {\n \tif(!self::$instance) {\n\n // Vi vedo già strabuzzare gli occhi. Una classe statica di configurazione con tutti gli elementi necessari sarebbe opportuna.\n // visto i pochissimi parametri di configurazione necessari e i limitati scopi del progetto, per ora ho lasciato così.\n \t \trequire(__SITE_PATH . '/config/config.php');\n \tself::$instance = new self($db_host, $db_user, $db_password, $db_name);\n \t}\n\n\t\treturn self::$instance;\n\t}",
"public static function getInstance()\n\t{\n\t\tif (is_null (self::$_singleton))\n\t\t{\n\t\t\tself::$_singleton = new conexion;\n\t\t}\n\t\treturn self::$_singleton;\n\t}",
"public static function getInstance()\n\t{\n\t\tif (is_null (self::$_singleton))\n\t\t{\n\t\t\tself::$_singleton = new conexion;\n\t\t}\n\t\treturn self::$_singleton;\n\t}",
"abstract public function get_instance();",
"public function get_instance() {\n if ( null == self::$instance ) {\n self::$instance = new self;\n }\n return self::$instance;\n }",
"public static function getInstance()\n {\n return self::$instance ?? self::getNewInstance();\n }",
"public static function getInstance()\n\t{\n\t\tstatic $xInstance = null;\n\t\tif(!$xInstance)\n\t\t{\n\t\t\t$xInstance = new Manager();\n\t\t}\n\t\treturn $xInstance;\n\t}",
"public static function get_instance(){\n\n\tif (null == self::$instance) {\n\t\tself::$instance = new self;\n\t}\n\n\treturn self::$instance;\n}",
"static function getInstance(){\r\n\r\n\t\tif(!isset(self::$instance)) self::$instance = new self();\r\n\t\treturn self::$instance;\r\n\t}",
"public static function getInstance() {\n\t\treturn parent::getInstance(__CLASS__); \n\t}",
"public function get_active_instance() {\n\n\n }",
"function get() {\n\t\tif (!self::$instance) self::$instance = new self;\n\t\treturn self::$instance;\n\t}",
"public function get_instance() {\r\n\t\treturn $this->obj;\r\n\t}",
"public static function instance() {\n if (static::$instance === null) {\n static::$instance = static::resolve_connection();\n }\n\n return static::$instance;\n }",
"public static function get_instance() {\n\n\t\treturn null === self::$instance ? new self() : self::$instance;\n\n\t}",
"public function setInstance(){\n\t\treturn self::$_singleton = $this;\n\t}",
"public static function getInstance() {\n\t\treturn parent::getInstance(__CLASS__);\n\t}",
"static public function getInstance()\n {\n if (self::$instance == null)\n {\n self::$instance = new self;\n }\n return self::$instance;\n }",
"public static function getInstance(){\n\t\treturn parent::_getInstance(get_class());\n\t}",
"public function getInstance(): self\n {\n return $this;\n }",
"public static function &instance()\n {\n return self::$instance;\n }",
"static function getInstance () {\n\t\t\tif (self :: $_instance == null)\n\t\t\t\tself :: $_instance = new self ();\n\t\t\t\t\n\t\t\treturn self :: $_instance;\n\t\t}",
"public static function getInstance();",
"public static function getInstance();",
"public static function getInstance();",
"public static function getInstance();",
"public static function getInstance();",
"public static function getInstance();",
"public static function getInstance();",
"public static function getInstance();",
"public static function getInstance() {}",
"public static function getInstance() {}",
"public static function getInstance() {}",
"public static function getInstance() {}",
"public static function getInstance() {}",
"public static function getInstance() {}",
"public static function getInstance() {}",
"public static function getInstance() {}",
"public static function getInstance() {}",
"public static function getInstance() {}",
"public static function getInstance(){\n if(self::$instance == null){\n self::$instance = new self;\n }\n return self::$instance;\n\n }",
"public static function get_instance() {\n\n if ( null == self::$instance ) {\n self::$instance = new self;\n }\n\n return self::$instance;\n\n }",
"public static function getInstance(){\n\t\tif ( !self::$instancia instanceof self ) {\n\t\t\tself::$instancia = new self;\n\t\t}\n\t\treturn self::$instancia;\n\t}",
"public static function get_instance() {\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\t\n\t\treturn self::$instance;\n\t}",
"public static function get_instance() {\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\t\n\t\treturn self::$instance;\n\t}",
"public static function get_instance() {\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\t\n\t\treturn self::$instance;\n\t}",
"public static function get_instance() {\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\t\n\t\treturn self::$instance;\n\t}",
"static public function getInstance()\n\t{\n\t\treturn parent::getInstance();\n\t}",
"private static function instance() {\n\t\tif (!isset(self::$instance)) {\n\t\t\tself::$instance = new self();\n\t\t}\n\n\t\treturn self::$instance;\n\t}",
"public static function getInstance() {\n if (!self::$instance instanceof self) {\n self::$instance = new self;\n }\n return self::$instance;\n }",
"public static function getInstance(){\r\n if(!self::$_instance){\r\n self::$_instance = new self();\r\n }\r\n return self::$_instance;\r\n }",
"public function instance();",
"public static function instance()\n {\n global $container;\n return $container->getByType(self::class);\n }",
"public static function getInstance()\n {\n if(null == self::$_inst){\n self::$_inst = new self();\n }\n return self::$_inst; \n }",
"public static function &getInstance() {\n\t\tstatic $instance = NULL;\n\t\tif (!isset($instance))\n\t\t\t$instance = new Manager();\n\t\treturn $instance;\n\t}",
"public static function get_instance() {\n\t\t\tif ( !self::$instance ) self::$instance = new self;\n\t\t\treturn self::$instance;\n\t\t}",
"public\n\tstatic function getInstance() {\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}",
"public static function get_instance() {\n\t\tif ( null === self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t\tself::$instance->init();\n\t\t}\n\n\t\treturn self::$instance;\n\t}"
] | [
"0.68586224",
"0.6853848",
"0.6846559",
"0.683165",
"0.683165",
"0.6732868",
"0.6732868",
"0.6732868",
"0.6732868",
"0.67320615",
"0.6731514",
"0.66979706",
"0.66979706",
"0.66979706",
"0.66979706",
"0.6687231",
"0.6687231",
"0.6671062",
"0.66629267",
"0.6659249",
"0.66429025",
"0.6638675",
"0.66146994",
"0.66084594",
"0.66072106",
"0.658639",
"0.6570535",
"0.6567284",
"0.65645504",
"0.6559336",
"0.6552878",
"0.65370136",
"0.65370136",
"0.65370136",
"0.65189457",
"0.6510244",
"0.6503489",
"0.64837706",
"0.6482954",
"0.64785284",
"0.6463648",
"0.64607793",
"0.6426601",
"0.6423786",
"0.64213794",
"0.64213794",
"0.6407277",
"0.6386651",
"0.6376038",
"0.6368452",
"0.6354792",
"0.6344641",
"0.63405484",
"0.6337967",
"0.63313264",
"0.6312426",
"0.6298359",
"0.6296564",
"0.6292679",
"0.6288768",
"0.6266541",
"0.62628603",
"0.6261138",
"0.6256373",
"0.62549734",
"0.6254889",
"0.6254889",
"0.6254889",
"0.6254889",
"0.6254889",
"0.6254889",
"0.6254889",
"0.6254889",
"0.625442",
"0.625442",
"0.625442",
"0.625442",
"0.6253547",
"0.6253547",
"0.6253547",
"0.6253446",
"0.6253446",
"0.6253446",
"0.6247859",
"0.62345153",
"0.62332916",
"0.62201643",
"0.62201643",
"0.62201643",
"0.62201643",
"0.6218651",
"0.6214559",
"0.6213109",
"0.6207749",
"0.6206618",
"0.6206527",
"0.6205103",
"0.620245",
"0.62008166",
"0.6196405",
"0.61923105"
] | 0.0 | -1 |
handles if given connector hash is valid | public function validateHash(array $args)
{
if (!empty($args['connectorHash'])) {
$cm = $this->getConnectorManager();
$valid = $cm->isHashValid($args['connectorHash']);
if (!$valid) {
// hash is invalid throw api error for 412
throw new DotbApiExceptionInvalidHash(
'EXCEPTION_CONNECTORS_META_OUT_OF_DATE',
null,
null,
0,
'connectors_meta_out_of_date'
);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function valid_compte_hashValidation($hash){ \n\n\t\t$sql = \"UPDATE utilisateur SET ut_compte_valide = '1' WHERE ut_hash_validation = ?\";\n\t\t$res = $this->executerRequete($sql,array($hash));\n\t\t\treturn ($res->rowCount() == 1); // si 1 alors mise a jour ok\n\n\t\t}",
"public function validateHash($password, $hash);",
"private function hash_validation() { //check hash\n\n\t\t$testMode = getRequest('ik_pw_via');\n\n\t\tif(isset($testMode) && $testMode == 'test_interkassa_test_xts'){\n\t\t\t$secretKey = $this->object->test_key;\n\t\t} else {\n\t\t\t$secretKey = $this->object->secret_key;\n\t\t}\n\n\t\t$data = array();\n\n\t\tforeach ($_REQUEST as $key => $value) {\n if (!preg_match('/ik_/', $key)) continue;\n $data[$key] = $value;\n }\n\n\t\t$ik_sign = $data['ik_sign'];\n\t\t$sign = $this->createSign($data,$secretKey);\n\n\t\t$this->wrlog(\"hash: \".$sign);\n\t\t$this->wrlog(\"ik_sign: \".$ik_sign);\n\t\treturn $sign == $ik_sign ? true : false;\n\t}",
"function verify_hash($hash) // Colorize: green\n { // Colorize: green\n return isset($hash) // Colorize: green\n && // Colorize: green\n is_string($hash) // Colorize: green\n && // Colorize: green\n preg_match(MD5_HASH_REGEXP, $hash); // Colorize: green\n }",
"protected function validateChecksum() {\n\t}",
"public function checkContentHash() {}",
"public function isHash($data)\r\n {\r\n $pattern = '%(?:\\b|:|\\s)([A-Za-z0-9\\\\\\\\.]{13}|[A-Fa-f0-9]{8}|[A-Fa-f0-9]{16}|[A-Fa-f0-9]{32}|[A-Fa-f0-9]{40}|[A-Fa-f0-9]{64}|[a-f0-9]{15}|[a-f0-9]{40}|\\$\\d\\$([^$]*\\$)?[/.A-Za-z0-9]{8,64})(?:\\b|:|\\s)%im';\r\n if (preg_match($pattern, $data, $matches)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"public function validateHash($hash = null, $log_msg = '')\n\t{\n\t\tif (!$hash)\n\t\t{\n\t\t\t$hash = postval($this->getVarName());\n\t\t}\n\t\t\n\t\t/*if (mb_strlen($hash) > 13)\n\t\t{\n\t\t\tputlog(\"ABUSE\", \"%b%c13BOT-ABUSE:%c%b %u\".login::$user->player->data['up_name'].\"%u sendte hash %u$hash%u til %u{$_SERVER['REQUEST_URI']}%u (har ikke javascript?)\");\n\t\t\t$hash = mb_substr($hash, 0, 13);\n\t\t}*/\n\n\t\t// is this it?\n\t\tif (!$this->isUsed() && $this->checkHash($hash) && $this->setUsed())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t// it is either used, belongs to another form object or does not exists\n\t\t// find the form object by the hash (even if it is the same)\n\t\t$obj = static::getByHash($hash, $this->user);\n\t\tif ($obj && $obj->checkDomain($this->domain))\n\t\t{\n\t\t\t$obj->addFailedAttempt($log_msg);\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\t// no object found\n\t\t\t$msg = (!empty($log_msg) ? '; Info: '.$log_msg : '');\n\t\t\tputlog(\"ABUSE2\", \"%c4%bFORMS-ABUSE:%b%c %u\".$this->user->player->data['up_name'].\"%u utførte formdata med ukjent hash!\"\n\t\t\t .\" (Area: %u\".$this->domain.\"%u; Hash: '\".$hash.$msg.\"')\");\n\t\t}\n\n\t\treturn false;\n\t}",
"static public function isValidApikeyHash($hash, $secureSalt)\n {\n global $vbulletin;\n $hash = rawurldecode($hash);\n \n // $randomSalt - random\n // $key = md5( md5($apikey.$secureSalt) . $randomSalt )\n // $hash = \"$key:$randomSalt\"\n \n if (!$hash OR !$secureSalt OR !$vbulletin->options['aitmagentovb_apikey']) return false;\n \n $hashArr = explode(':', $hash);\n if (count($hashArr) == 2)\n {\n $thisKey = $hashArr[0];\n $randomSalt = $hashArr[1];\n $apiKey = $vbulletin->options['aitmagentovb_apikey'];\n $realKey = md5( md5($apiKey . $secureSalt) . $randomSalt);\n if ($realKey == $thisKey)\n {\n $sql = '\n SELECT \n *,\n IF(`validthru` < NOW(), 1, 0) AS is_expired\n FROM `'.TABLE_PREFIX.'aitmagentovb_hash`\n WHERE `hash` = \"'.$hash.'\"\n '; \n // it's safe enough for non-escape usage of $hash here\n $hashRow = $vbulletin->db->query_first($sql);\n if ($hashRow AND $hashRow['hashid']) \n {\n $vbulletin->db->query_write('\n DELETE FROM `'.TABLE_PREFIX.'aitmagentovb_hash` \n WHERE `hashid`='.$hashRow['hashid']\n );\n \n if (!$hashRow['is_expired'] AND 'mage' == $hashRow['created_by'])\n {\n return true;\n }\n }\n }\n }\n \n return false;\n }",
"private function validateHashDigest($username, $stored_hash) {\n $this->debugPrint(\"Validating user's hash...\");\n\n /* Check if we've passed both the values we need */\n if (empty($username))\n callError(\"Internal Error: Username empty.\");\n if (empty($stored_hash))\n callError(\"Internal Error: Hash empty.\");\n\n /* Break apart the Digest response */\n if (!($digest_data = $this->parseDigest($_SERVER['PHP_AUTH_DIGEST']))) {\n $this->debugPrint(\"User passed invalid data.\");\n return false;\n }\n\n $a1 = $this->decrypt($stored_hash);\n\n /* Generate a valid response */\n $a2 = md5($_SERVER['REQUEST_METHOD'] . \":\" . $digest_data['uri']);\n $valid = md5($a1 . \":\" . $digest_data['nonce'] . \":\" . $digest_data['nc'] . \":\" . $digest_data['cnonce'] . \":\" . $digest_data['qop'] . \":\" . $a2);\n\n return $valid == $digest_data['response'];\n }",
"function CheckKey($hash,$name){\n\t\tglobal $secretKey; \n\t\t$checkHash = md5($name.$secretKey);\n\t\tif(strcmp($checkHash,$hash) == 0){\n\t\t\treturn 'pass'; //hash matches\n\t\t}else{\n\t\t\treturn 'fail'; //hash failed\n\t\t}\n\t}",
"function verifyPluginHash( &$pParamHash ){\n\t\tif( empty( $pParamHash['guid'] ) ){\n\t\t\t$this->mErrors['plugin']['guid'] = tra('A value for guid is required.');\n\t\t}\n\n\t\tif( empty( $pParamHash['package_guid'] ) ){\n\t\t\t$this->mErrors['plugin']['package_guid'] = tra('A value for package_guid is required.');\n\t\t}\n\n\t\tif( empty( $pParamHash['handler_file'] ) ){\n\t\t\t$this->mErrors['plugin']['handler_file'] = tra('A value for handler_file is required.');\n\t\t}\n\n\t\tif( count( $this->mErrors )== 0 ){\n\t\t\t$path_type = $this->getPackagePluginSchemaValue( $pParamHash['guid'], 'path_type', $pParamHash['package_guid'] );\n\n\t\t\t$pParamHash['plugin_store']['package_guid'] = $pParamHash['package_guid'];\n\t\t\t$pParamHash['plugin_store']['version'] = !empty( $pParamHash['version'] )?$pParamHash['version']:'0.0.0';\n\t\t\t$pParamHash['plugin_store']['active'] = (isset( $pParamHash['active'] ) && ( $pParamHash['active'] != TRUE || $pParamHash['active'] != 'y') )?'n':'y';\n\t\t $pParamHash['plugin_store']['required'] = (isset( $pParamHash['required'] ) && ( $pParamHash['required'] === TRUE || $pParamHash['required'] == 'y') )?'y':'n';\n\t\t\t$pParamHash['plugin_store']['name'] = !empty( $pParamHash['name'] )?$pParamHash['name']:ucfirst($pParamHash['guid']);\n\t\t\t$pParamHash['plugin_store']['description'] = !empty( $pParamHash['description'] )?$pParamHash['description']:NULL;\n\t\t\t$pParamHash['plugin_store']['path_type'] = !empty( $path_type )?$path_type:'package'; \t\t// if no path_type set we assume it came with the package\n\t\t\t$pParamHash['plugin_store']['handler_file'] = $pParamHash['handler_file'];\n\t\t\t$pParamHash['plugin_store']['pos'] = !empty( $pParamHash['pos'] )?$pParamHash['pos']:'1';\n\t\t}\n\n\t\treturn( count( $this->mErrors )== 0 );\n\t}",
"private function checkHash( $hash )\n {\n // The first 64 characters of the hash is the salt\n $salt = substr($hash, 0, 64);\n \n // create a new hash by append the password to the salt string\n $hashToCheck = $salt . $this->password;\n \n // Hash the password a bunch of times\n for ( $i = 0; $i < 100000; $i ++ ) {\n $hashToCheck = hash('sha256', $hashToCheck);\n }\n \n $hashToCheck = $salt . $hashToCheck;\n \n // check the local hash with the database hash\n if( $hash == $hashToCheck )\n return true;\n \n // return false if no match\n return false;\n }",
"public function compareHash($hash)\n {\n // No Need to Compare Hash, Hashing is Not Required\n if (config('prionapi.auth_method') == 'single') {\n return true;\n }\n\n $serverHash = $this->hash;\n if ($hash != $serverHash) {\n app()->make('error')->code('2010');\n }\n\n return true;\n }",
"static function check($password, $hash) {\n if (starts_with($hash, '$2a$')) {\n $salt = substr($hash, 0, 19);\n }elseif (starts_with($hash, '$6$')) {\n $salt = substr($hash, 0, 19);\n }else{\n throw new Exception('Unknown hash type: '.$hash);\n }\n return crypt($password, $salt) === $hash;\n }",
"function password_is_hash($password)\r\n{\r\n $nfo = password_get_info($password);\r\n return $nfo['algo'] != 0;\r\n}",
"function hashExists($hash);",
"public function validate_hash( $req_id, $json, $die_on_failure = true ) {\r\n\t\tif ( defined( 'WPMUDEV_IS_REMOTE' ) && ! WPMUDEV_IS_REMOTE ) {\r\n\t\t\tif ( $die_on_failure ) {\r\n\t\t\t\twp_send_json_error(\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'code' => 'remote_disabled',\r\n\t\t\t\t\t\t'message' => 'Remote calls are disabled in wp-config.php'\r\n\t\t\t\t\t)\r\n\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( empty( $_SERVER['HTTP_WDP_AUTH'] ) ) {\r\n\t\t\tif ( $die_on_failure ) {\r\n\t\t\t\twp_send_json_error(\r\n\t\t\t\t\tarray( 'code' => 'missing_auth_header', 'message' => 'Missing authentication header' )\r\n\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$hash = $_SERVER['HTTP_WDP_AUTH'];\r\n\t\t$api_key = WPMUDEV_Dashboard::$api->get_key();\r\n\r\n\t\t$hash_string = $req_id . $json;\r\n\r\n\t\t$valid = hash_hmac( 'sha256', $hash_string, $api_key );\r\n\r\n\t\t$is_valid = hash_equals( $valid, $hash ); //Timing attack safe string comparison, PHP <5.6 compat added in WP 3.9.2\r\n\t\tif ( ! $is_valid && $die_on_failure ) {\r\n\t\t\twp_send_json_error(\r\n\t\t\t\tarray( 'code' => 'incorrect_auth', 'message' => 'Incorrect authentication' )\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t//check nonce to prevent replay attacks\r\n\t\tlist( $req_id, $timestamp ) = explode( '-', $req_id );\r\n\t\t$nonce = WPMUDEV_Dashboard::$site->get_option( 'hub_nonce' );\r\n\t\tif ( floatval( $timestamp ) > $nonce ) {\r\n\t\t\tWPMUDEV_Dashboard::$site->set_option( 'hub_nonce', floatval( $timestamp ) );\r\n\t\t} else {\r\n\t\t\twp_send_json_error(\r\n\t\t\t\tarray( 'code' => 'nonce_failed', 'message' => 'Nonce check failed' )\r\n\t\t\t);\r\n\t\t}\r\n\r\n\r\n\t\tif ( ! defined( 'WPMUDEV_IS_REMOTE' ) ) {\r\n\t\t\tdefine( 'WPMUDEV_IS_REMOTE', $is_valid );\r\n\t\t}\r\n\r\n\t\treturn $is_valid;\r\n\t}",
"function checkHashBL() {\n\t $isCorrect = false;\t \n\t // If the user exists\n\t if ( checkUserIdDAL($_POST['userId']) )\n\t {\n\t // Create the hash corresponding to the input password with the Blowfish algorithm\n\t $inputHash = hash('sha512',$_POST['password']);\n\t // Get the hash corresponding to the userId from the database\n\t $databaseHash = getHashDAL($_POST['userId']);\n\t\t// If the hash is correct\n\t\t if ( $databaseHash == $inputHash )\n\t\t {\n\t\t\t$isCorrect = true;\n\t\t }\n\t }\n\t return $isCorrect;\n }",
"function testHash()\n {\n $this->assertEqual($this->referenceHash, auth::hashString($this->referenceClear), \"Testing hash consistency.\");\n }",
"function phpbb_check_hash($password, $hash)\n{\n\t$itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n\tif (strlen($hash) == 34)\n\t{\n\t\treturn (_hash_crypt_private($password, $hash, $itoa64) === $hash) ? true : false;\n\t}\n\n\treturn (md5($password) === $hash) ? true : false;\n}",
"public function checkHash(&$aResponse)\n {\n // checks hash2 and newly generated hash - returns false if both are differed\n if ($aResponse['hash2'] != $this->_generateHash($aResponse))\n return false;\n\n $this->_getDecodeData($aResponse, array( 'auth_code', 'product', 'tariff', 'amount', 'test_mode', 'uniqid' ));\n }",
"public function testUnknownHash()\n {\n $this->setExpectedException(\n function_exists( 'password_hash' )\n ? 'PHPUnit_Framework_Error'\n : 'InvalidArgumentException'\n );\n\n Password::hash( $this->examplePassword, -1 );\n }",
"function verifyHash(string $hash, string $string): bool\n{\n return ($hash == crypt($string, $hash));\n}",
"protected function is_hash_digest_valid() {\r\n\t\t$result = false;\r\n\t\t$data = $this->build_variables_string();\r\n\t\tif ( $data ) {\r\n\t\t\t$hash_digest_received = self::get_post_var( 'HashDigest' );\r\n\t\t\t$hash_digest_calculated = $this->calculate_hash_digest( $data, 'SHA1', get_option( 'paymentsense_preshared_key' ) );\r\n\t\t\t$result = strToUpper( $hash_digest_received ) === strToUpper( $hash_digest_calculated );\r\n\t\t}\r\n\t\treturn $result;\r\n\t}",
"public static function chlogCheckHash($data, $hash) {\n return password_verify($data, $hash);\n }",
"function external_check_password($password, $hash, $user_id = '')\n{\n if (strlen($hash) <= 32) {\n $check = ( $hash == md5($password) );\n if ($check && $user_id) {\n // Rehash using new hash.\n external_set_password($password, $user_id);\n $hash = external_hash_password($password);\n }\n\n return apply_filters('check_password', $check, $password, $hash, $user_id);\n }\n\n // If the stored hash is longer than an MD5, presume the\n // new style phpass portable hash.\n $external_hasher = new PasswordHash(8, FALSE);\n\n $check = $external_hasher->CheckPassword($password, $hash);\n\n return apply_filters('check_password', $check, $password, $hash, $user_id);\n}",
"function validate_password($hashed_password, $cleartext_password) {\n if (!is_string($hashed_password) || !is_string($cleartext_password))\n return false;\n if (config\\HASHING_ALGORITHM == \"crypt\") {\n $salt_end = strrpos($hashed_password, \"$\");\n if ($salt_end === false) {\n // DES, first two charachers is salt.\n $salt = substr($hashed_password, 0, 2);\n } else {\n // Salt before $.\n $salt_end++;\n $salt = substr($hashed_password, 0, $salt_end);\n }\n return crypt($cleartext_password, $salt) == $hashed_password;\n } else if (config\\HASHING_ALGORITHM == \"sha1\") {\n if (strlen($hashed_password) != 80)\n return false;\n $salt = substr($hashed_password, 0, 40);\n $hash = substr($hashed_password, 40);\n return $hash == sha1($salt . $cleartext_password, false);\n } else if (config\\HASHING_ALGORITHM == \"md5\") {\n if (strlen($hashed_password) != 64)\n return false;\n $salt = substr($hashed_password, 0, 32);\n $hash = substr($hashed_password, 32);\n return $hash == sha1($salt . $cleartext_password, false);\n } else\n trigger_error(\"The configured hashing algorithm '\" . config\\HASHING_ALGORITHM . \"' is not supported.\", \\E_USER_ERROR);\n}",
"public function validateHashOrAlert($hash = null, $log_msg = '')\n\t{\n\t\t$res = $this->validateHash($hash, $log_msg);\n\t\tif (!$res)\n\t\t{\n\t\t\t\\ess::$b->page->add_message($this->invalidText, \"error\");\n\t\t}\n\n\t\treturn $res;\n\t}",
"public function checkHash($string, $hash)\n {\n $path = $this->buildPath(static::CHHASH_ENDPOINT);\n\n $data = [ \n 'string' => $string,\n 'hash' => $hash\n ];\n\n $request = $this->performRequest('POST', $path, ['body' => $data]);\n return $request->data->valid;\n }",
"function leonardo_check_hash($password, $hash)\n{\n $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n if (strlen($hash) == 34)\n {\n return (_leonardo_hash_crypt_private($password, $hash, $itoa64) === $hash) ? true : false;\n }\n\n return (md5($password) === $hash) ? true : false;\n}",
"private function isHashElement($line) {\n\t//--\n\treturn strpos($line, ':');\n\t//--\n}",
"public function testHashSecret()\n {\n $this->assertEquals(\n 'HASHYsecretyThang',\n $this->gateway->getHashSecret()\n );\n }",
"public function afterValidationOnCreate()\n {\n $this->hash = $this->getDI()->getSecurity()->hash($this->hash);\n }",
"function wp_hash($data, $scheme = 'auth')\n {\n }",
"function maybe_hash_hex_color($color)\n {\n }",
"public function rules()\n {\n return [\n 'hash' => 'required|string|size:32'\n ];\n }",
"function isHashEqual($id, $hash){ global $dbName, $dbPass;\n $mysqli = mysqli_connect(\"localhost\", $dbName, $dbPass, \"[Redacted]\") \n or die(mysql_error());\n $query = mysqli_query($mysqli, \"SELECT hash FROM Users WHERE id='$id' \");\n if (mysqli_num_rows($query) > 0) {\n if(mysqli_fetch_assoc($query)[\"hash\"]==$hash){\n return [True, \"$id\"];\n }else {\n return [False, \"Doesn't match\"];\n }\n } else {\n return [False, \"No user\"];\n }\n}",
"function validate_pw($password, $hash){\n /* Regenerating the with an available hash as the options parameter should\n * produce the same hash if the same password is passed.\n */\n return crypt($password, $hash)==$hash;\n }",
"function cp_CheckTransaction($hash)\n{\n $hash = mysql_real_escape_string($hash);\n $query = \"SELECT `id` from `op_transactions` WHERE `hash`='\" . $hash . \"'\";\n $data = simple_query($query);\n if (!empty($data)) {\n return false;\n }\n return true;\n}",
"private function validate_hashkey($hash_key, $api_key, $payment_id)\n {\n return md5($api_key . $payment_id) === $hash_key;\n }",
"function hasher($raw_data, $hashed_data = false)\n{\n if ($hashed_data) {\n if (password_verify($raw_data, $hashed_data)) {\n return true;\n } else {\n return false;\n }\n } else {\n return password_hash($raw_data, PASSWORD_BCRYPT, ['cost' => 12]);\n }\n}",
"public function hash();",
"function check_hash($n){\n\tif(!$n) return;\n\t$hashpos = strpos($n, \"#\");\n\n\tif($hashpos === false){\n\t\t$output = \"#\" . $n;\n\t}else if($hashpos == 0){\n\t\t$output = $n;\n\t}\n\treturn $output;\n}",
"function validMd5($api_key) {\n\n return preg_match(\"/^[a-f0-9]{32}$/\", $api_key);\n}",
"public function verifyHash($input)\n {\n $salt = substr($input, 0, strrpos($input, '$') + 1);\n $checksum = substr($input, strrpos($input, '$') + 1);\n\n return ($this->verifySalt($salt) && 1 === preg_match('/^[\\.\\/0-9A-Za-z]{28}$/', $checksum));\n }",
"function verifyHash($password, $hash) {\r\n return $hash == crypt($password, $hash);\r\n}",
"public function testThatEscapeDataWorksAsExpectedHashAlgoSha1() {\n // because \\RendererTest::$hash_algo_index will have a value of 3\n // see \\Rotexsoft\\FileRenderer::hash_algos() in ./tests/bootstrap.php\n \n $this->executeEscapeDataTests();\n }",
"abstract protected static function getHashAlgorithm() : string;",
"private function userForAuth($hash){\n\n }",
"function validate_this_server($link, $data, $secret_key) // Colorize: green\n { // Colorize: green\n if (get_secret_key($link, $data) != $secret_key) // Colorize: green\n { // Colorize: green\n $error_details = \"Access violation\"; // Colorize: green\n error_log($error_details); // Colorize: green\n // Colorize: green\n db_disconnect($link); // Colorize: green\n // Colorize: green\n $data[\"message\"] = \"Access error\"; // Colorize: green\n $data[\"details\"] = $error_details; // Colorize: green\n // Colorize: green\n die(json_encode($data)); // Colorize: green\n } // Colorize: green\n }",
"function verifyUser ($username, $hash) {\r\n //TO-DO\r\n\r\n //if credentials match return true\r\n\r\n //else return false\r\n\r\n //dummy CODE\r\n return true;\r\n}",
"function user_is_valid($username, $hash_pw)\n {\n // Connect to MySQL\n $link = get_link(TRUE);\n\n $username = mysqli_real_escape_string($link, $username);\n $query = \"\n SELECT * FROM User\n WHERE name = '$username' AND hash_pw = '$hash_pw'\";\n $result = mysqli_query($link, $query);\n if ($row = mysqli_fetch_array($result))\n return TRUE;\n mysqli_free_result($result);\n mysqli_close($link);\n return FALSE;\n }",
"function calculate_app_version_hash($link, $data, $app_version_id) // Colorize: green\n { // Colorize: green\n // Ignore PhpAlignmentVerifier [BEGIN] // Colorize: green\n $sql = \"SELECT\" // Colorize: green\n . \" hash\" // Colorize: green\n . \" FROM \" . DB_TABLE_APP_FILES // Colorize: green\n . \" WHERE app_version_id = '\" . $link->real_escape_string($app_version_id) . \"'\"; // Colorize: green\n // Ignore PhpAlignmentVerifier [END] // Colorize: green\n // Colorize: green\n // Colorize: green\n // Colorize: green\n $result = $link->query($sql); // Colorize: green\n die_if_sql_failed($result, $link, $data, $sql); // Colorize: green\n // Colorize: green\n // Colorize: green\n // Colorize: green\n if ($result->num_rows == 0) // Colorize: green\n { // Colorize: green\n $result->close(); // Colorize: green\n // Colorize: green\n // Colorize: green\n // Colorize: green\n $error_details = \"Version is empty\"; // Colorize: green\n error_log($error_details); // Colorize: green\n // Colorize: green\n db_disconnect($link); // Colorize: green\n // Colorize: green\n $data[\"message\"] = \"Internal error\"; // Colorize: green\n $data[\"details\"] = $error_details; // Colorize: green\n // Colorize: green\n die(json_encode($data)); // Colorize: green\n } // Colorize: green\n // Colorize: green\n // Colorize: green\n // Colorize: green\n $res = pack(\"H*\", \"00000000000000000000000000000000\"); // Colorize: green\n // Colorize: green\n while ($row = $result->fetch_row()) // Colorize: green\n { // Colorize: green\n $res ^= pack(\"H*\", $row[0]); // Colorize: green\n } // Colorize: green\n // Colorize: green\n $result->close(); // Colorize: green\n // Colorize: green\n // Colorize: green\n // Colorize: green\n return bin2hex($res); // Colorize: green\n }",
"function sanitize_hex_color_no_hash($color)\n {\n }",
"public function testThatEscapeDataWorksAsExpectedHashAlgoSha256() {\n // because \\RendererTest::$hash_algo_index will have a value of 2\n // see \\Rotexsoft\\FileRenderer::hash_algos() in ./tests/bootstrap.php\n \n $this->executeEscapeDataTests();\n }",
"function is_md5($str)\n{\n\t//return false;\n\treturn preg_match(\"/^[a-f0-9]{32}$/i\", $str);\n}",
"public function hash_check($user,$pass){\r\n //check if password matches hash \r\n $hash=array();\r\n $hash= checkLoginInfoTest($user);\r\n foreach ($hash as $hashItem):\r\n $hashGiven=(string)$hashItem['password'];\r\n endforeach;\r\n if (isset($hashGiven)){\r\n if (password_verify($pass,(string)$hashGiven))\r\n { \r\n return true;\r\n } \r\n else\r\n {\r\n return false;\r\n }\r\n }\r\n \r\n \r\n}",
"public function verifyUserbyHash($hash){\r\n $this->db->query('SELECT * FROM users WHERE reset=:hash');\r\n $this->db->bind(':hash', $hash);\r\n\r\n if($row = $this->db->fetcher()){\r\n if($row['active'] == 1){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }\r\n else\r\n return false;\r\n}",
"public function verifyPassword (string $hash, string $password): bool;",
"function verifyPaymentDatafeed($src, $prc, $successCode, $merchantReferenceNumber, $paydollarReferenceNumber, $currencyCode, $amount, $payerAuthenticationStatus, $secureHashSecret, $secureHash) {\r\n\t$buffer = $src . '|' . $prc . '|' . $successCode . '|' . $merchantReferenceNumber . '|' . $paydollarReferenceNumber . '|' . $currencyCode . '|' . $amount . '|' . $payerAuthenticationStatus . '|' . $secureHashSecret;\r\n\t$verifyData = sha1($buffer);\r\n\tif ($secureHash == $verifyData) { return true; }\r\n\treturn false;\r\n}",
"public function checkHash($hash)\n\t{\n\t\treturn $this->hash && $this->hash == $hash;\n\t}",
"public function getUserByHash($hash=''){\n\n if($hash!='')\n {\n \n //consulta validade do link HASH\n $sql = new Sql();\n $res = $sql->select('SELECT * FROM pwd_recovery WHERE \n hash_recovery = :hash_recovery AND\n DATE_ADD(dt_register, INTERVAL 1 HOUR) >= NOW() LIMIT 0,1',\n array(':hash_recovery'=>$hash));\n \n \n //caso nada encontrado então ou o HASH é inválido ou o tempo limite expirou\n if(count($res)==0){\n //sinaliza como não alterado pois o hash é invalido\n $_result = 0;\n }\n else\n {\n //recebe ID USUARIO que sera necessario para o update da senha \n $recoveryData = $res[0];\n $_result = $recoveryData['id_usuario']; \n } \n return $_result;\n \n }\n else\n {\n return false;\n }\n\n }",
"public function comparePasswordHash($pwd, $hash);",
"protected function _delete($hash)\n\t{\n\t\t$aEaccelerator_list_keys = eaccelerator_list_keys();\n\t\tif (is_array($aEaccelerator_list_keys) && count($aEaccelerator_list_keys) > 0)\n\t\t{\n\t\t\t$iLenActualKey = strlen($hash);\n\n\t\t\tforeach ($aEaccelerator_list_keys as $value)\n\t\t\t{\n\t\t\t\tif (isset($value['name']))\n\t\t\t\t{\n\t\t\t\t\t// fix left ':'\n\t\t\t\t\t$value['name'] = ltrim($value['name'], ':');\n\n\t\t\t\t\t// Начало строки совпадает с именем кэша\n\t\t\t\t\tif (strpos($value['name'], $hash) === 0\n\t\t\t\t\t// 32 от md5 + _ + strlen($cacheName) + _ + 32 от md5\n\t\t\t\t\t// Проверка на длин нужна для проверки от вхождения имени одного кэша в другой,\n\t\t\t\t\t// например, INF_SYS в INF_SYS_ITEM\n\t\t\t\t\t// Внимание, нельзя использовать strlen($hash), т.к. мы всегда сравниваем\n\t\t\t\t\t// с учетом полного пути, т.к. в кэше хранятся с полными именами\n\t\t\t\t\t&& strlen($value['name']) == $iLenActualKey)\n\t\t\t\t\t{\n\t\t\t\t\t\teaccelerator_rm($value['name']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}",
"public static function validateHash($string, $match) {\n return crypt($string, $match);\n }",
"public function testGetInvalidData()\n {\n Hash::get('string', 'path');\n }",
"public function GetPasswordHash ();",
"public function checkHash()\n {\n $config = $this->getDI()->get('config');\n $connect_string = sprintf('http://%s:%s@%s:%s/', $config->eunod->user, $config->eunod->pass, $config->eunod->host, $config->eunod->port);\n $coind = new jsonRPCClient($connect_string);\n\n return $coind->verifymessage($this->masternode_address, $this->signed_msg, $this->telegram_username);\n }",
"public function testAddHash()\n {\n $validator = new File\\Md5('12345');\n $validator->addHash('12344');\n $this->assertEquals(['12345' => 'md5', '12344' => 'md5'], $validator->getMd5());\n\n $validator->addHash(['12321', '12121']);\n $this->assertEquals(\n ['12345' => 'md5', '12344' => 'md5', '12321' => 'md5', '12121' => 'md5'],\n $validator->getMd5()\n );\n }",
"function password_needs_rehash($hash, $algo, array $options = array()) {\n $info = password_get_info($hash);\n if ($info['algo'] != $algo) {\n return true;\n }\n switch ($algo) {\n case PASSWORD_BCRYPT:\n $cost = isset($options['cost']) ? $options['cost'] : 10;\n if ($cost != $info['options']['cost']) {\n return true;\n }\n break;\n }\n return false;\n }",
"function leonardo_check_password($password,$hash) {\n\treturn leonardo_check_hash($password, $hash);\n}",
"public function testErrorIsThrownWhenPlainPasswordIsPassedWithHashFlagEnabled()\n {\n $this->expectException(\\InvalidArgumentException::class);\n $hibp = HibpFactory::createTestClient([]);\n $password = 'foo';\n $hibp->isPwnedPassword($password, true);\n $this->fail('Expected Exception Was Not thrown for providing a plain text password with hash flag on');\n }",
"function validate_server($link, $data, $address, $secret_key) // Colorize: green\n { // Colorize: green\n if (get_server_secret_key($link, $data, $address) != $secret_key) // Colorize: green\n { // Colorize: green\n $error_details = \"Access violation\"; // Colorize: green\n error_log($error_details); // Colorize: green\n // Colorize: green\n db_disconnect($link); // Colorize: green\n // Colorize: green\n $data[\"message\"] = \"Access error\"; // Colorize: green\n $data[\"details\"] = $error_details; // Colorize: green\n // Colorize: green\n die(json_encode($data)); // Colorize: green\n } // Colorize: green\n }",
"function verify($string)\n{\n\t$string = preg_replace(\"/[^a-z0-9\\-]/\", \"\", $string);\n\tif(strlen($string) == 36)\n\t{\n\t\t$hash = explode(\"-\", $string);\n\t\t$hash = $hash[4].$hash[0].$hash[3].$hash[1].$hash[2];\n\t\treturn $hash;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}",
"static function password_needs_rehash($hash, $algo, array $options = array()) {\n $info = self::password_get_info($hash);\n if ($info['algo'] != $algo) {\n return true;\n }\n switch ($algo) {\n case PASSWORD_BCRYPT:\n/**/ if ($bcrypt_2y)\n if ('bcrypt' !== $info['algoName'])\n return true;\n case 0:\n $cost = isset($options['cost']) ? $options['cost'] : 10;\n if (isset($info['options']['cost']) && $cost != $info['options']['cost']) {\n return true;\n }\n break;\n }\n return false;\n }",
"public function verify($password, $hash);",
"function cpay_CheckTransaction($hash) {\r\n $hash = loginDB_real_escape_string($hash);\r\n $query = \"SELECT `id` from `op_transactions` WHERE `hash`='\" . $hash . \"'\";\r\n $data = simple_query($query);\r\n if (empty($data)) {\r\n return (true);\r\n } else {\r\n return (false);\r\n }\r\n}",
"function password_needs_rehash($hash, $algo, array $options = array()) {\r\n $info = password_get_info($hash);\r\n if ($info['algo'] != $algo) {\r\n return true;\r\n }\r\n switch ($algo) {\r\n case PASSWORD_BCRYPT:\r\n $cost = isset($options['cost']) ? $options['cost'] : PASSWORD_BCRYPT_DEFAULT_COST;\r\n if ($cost != $info['options']['cost']) {\r\n return true;\r\n }\r\n break;\r\n }\r\n return false;\r\n }",
"function cafet_verify_password(string $password, string $hash, string $pseudo = null): bool\n {\n if($hash == '') return false;\n \n $hash_info = explode('.', $hash);\n \n if (count($hash_info) == 1 && isset($pseudo)) {\n return sha1(Config::salt . $password . $pseudo) === $hash;\n }\n \n if (count($hash_info) < 3) {\n throw new InvalidArgumentException('Wrong password hash format');\n }\n \n [$algo, $salt, $hashed] = $hash_info;\n \n return cafet_digest($algo, $salt, $password) === $hashed;\n }",
"public function getHash() {}",
"static function controlHash($mixed){\n\t\t$data = json_encode($mixed);\n\t\tif(json_last_error()!=JSON_ERROR_NONE) $data = $mixed;\n\t\treturn sha1(md5($data).APP_CONTROL_SECRET);\n\t}",
"public function checkHash($params)\n {\n return $this->hash->checkHash($this->password, $params);\n }",
"public function _hash($str) {\n switch ($this->config['algoritmo_criptografia']) {\n case 'sha1':\n return ($str == '') ? '' : sha1($str);\n break;\n case 'crypt':\n return crypt($str);\n break;\n case 'base64':\n return base64_encode($str);\n break;\n case 'plain':\n return $str;\n break;\n case 'md5':\n default:\n return md5($str);\n break;\n }\n }",
"function external_hash_password($password)\n{\n $external_hasher = new PasswordHash(8, FALSE);\n\n return $external_hasher->HashPassword($password);\n}",
"function hpcman_hash($algo, $p) {\n switch($algo) {\n case'cleartext':\n return $p;\n break;\n case 'crypt':\n return base64_encode(crypt($p, $p));\n break;\n case 'md5':\n return md5($p);\n break;\n case 'ssha':\n $salt = \"CCCC\";\n return base64_encode(pack(\"H*\", sha1($p.$salt)).$salt);\n break;\n case 'sha256':\n $crypt_salt = '$5$' . gen_salt('crypt-sha256') . '$';\n return base64_encode(crypt($p, $crypt_salt));\n }\n\n return false;\n}",
"private function hashPass($params) {\n if ($params) {\n\n $url = $this -> hashserver . http_build_query($params);\n return $url;\n\n }\n else {\n return false;\n }\n }",
"private function detectStep($hash)\n\t{\n\t\tif( empty($hash) ){\n\t\t\treturn '1';\n\t\t}\n\n\t\t$hash = filter_var(trim($hash), FILTER_SANITIZE_STRING);\n\t\tif( empty($hash) ){\n\t\t\treturn '1';\n\t\t}\n\n\t\t$user_meta = $this->timber->user_meta_model->getMetaByMultiple(array(\n\t\t\t'me_key' => '_user_fpwd_hash',\n\t\t\t'me_value' => $hash\n\t\t));\n\n\t\tif( (false === $user_meta) || !(is_object($user_meta)) ){\n\t\t\treturn '1';\n\t\t}\n\n\t\t$this->hash = $hash;\n\t\treturn '2';\n\t}",
"function checkhashSSHA($salt, $password) {\n\n $hash = base64_encode(sha1($password . $salt, true) . $salt);\n\n return $hash;\n}",
"public function hashValidation(){\n\t\t$this->hash_validation = md5(uniqid(rand(), true).$this->email); \n\t\treturn $this->hash_validation;\n\t}",
"private function setHashAndStatus($data) {\n\t\t$hash = sha1(json_encode($data));\n\n\t\t// hash exists in DB ?\n\t\t$sql = 'SELECT * FROM `*PREFIX*ocDashboard_usedHashs` WHERE usedHash = ? AND widget = ? AND user = ? LIMIT 1;';\n\t\t$params = Array($hash,$this->id,$this->user);\n\t\t$query = \\OCP\\DB::prepare($sql);\n\t\t$result = $query->execute($params)->fetchRow();\n\t\t\t\t\n\t\t// if not in DB, write to DB\n\t\tif(!$result) {\n\t\t\t$sql2 = 'INSERT INTO `*PREFIX*ocDashboard_usedHashs` (id,usedHash,widget,user,timestamp) VALUES (\\'\\',?,?,?,?); ';\n\t\t\t$params = Array($hash,$this->id,$this->user,time());\n\t\t\t$query2 = \\OCP\\DB::prepare($sql2);\n\t\t\t$result2 = $query2->execute($params);\n\t\t\tif($this->status < 3) {\n\t\t\t\t$this->status = 2;\n\t\t\t\tOCP\\Util::writeLog('ocDashboard',\"Could not write hash to db.\", \\OCP\\Util::WARN);\n\t\t\t}\n\t\t}\n\t}",
"public function validate_config_on_save($host_obj)\n\t\t{\n\t\t\t$hash_value = trim($host_obj->certificate);\n\t\t\t\n\t\t\tif (!strlen($hash_value))\n\t\t\t{\n\t\t\t\tif (!isset($host_obj->fetched_data['certificate']) || !strlen($host_obj->fetched_data['certificate']))\n\t\t\t\t\t$host_obj->validation->setError('Please paste certificate file content', 'certificate', true);\n\n\t\t\t\t$host_obj->certificate = $host_obj->fetched_data['certificate'];\n\t\t\t}\n\t\t}",
"function checkForBadLink($url) {\n\t\t$link = getDbConnect();\n\t\t$preparedStatement = $link->prepare(\"select hash from google_safe_browsing where hash = :hash;\");\n\t\t$preparedStatement->execute(array(\":hash\" => md5($url)));\n\t\treturn count($preparedStatement->fetchAll()) == 0;\n\t}",
"public static function isSha1($input) {\n return preg_match(\"/^[a-f0-9]{40}$/\", strtolower($input));\n }",
"function check_hash_key($hash_key)\n\t\t{\n\t\t\t$statement = $this->conn_id->prepare(\"select user_id,is_active from users where hash_key = :hash_key\");\n\t\t\t$statement->execute(array(':hash_key' => $hash_key));\n\t\t\t$row = $statement->fetch();\n\t\t\tif (isset($row['user_id']))\n\t\t\t{\n\t\t\t\tif ( $row['is_active'] == 1 )\n\t\t\t\t{\n\t\t\t\t\t// Already a verified user\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ( $this->verify_success($row['user_id']) == TRUE )\n\t\t\t\t\t{\n\t\t\t\t\t\t// Now you are a verified user\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// Still not verified\n\t\t\t\t\t\treturn 0;\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// Supplied hash key doesn't exist\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}",
"function check_link_hash($token, $link_name)\n{\n\treturn $token === generate_link_hash($link_name);\n}",
"public function hash(): string;",
"public function hash_check(){\n $this->read_hash_file();\n\n // read all files hashes\n $this->read_directory();\n\n // save updated md5 hashes\n $this->save_hash_file();\n \n // log changes\n if(!empty($this->md5_gen_old)){\n $this->save_log_file();\n\n // email changes\n if($this->email)\n $this->emailChanges(); \n }\n }",
"function isValidHairColour($hairColour) {\n\n $hairColour = trim($hairColour);\n\n // test length\n if (strlen($hairColour) != 7) {\n return 0;\n }\n\n // check that string begins with a hash character\n if (substr($hairColour, 0, 1) != '#') {\n return 0;\n }\n\n // check that characters 2 to 7 are hexadecimal\n $hexCharacters = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n 'a', 'b', 'c', 'd', 'e', 'f'];\n for ($i = 1; $i < 7; ++$i) {\n $currentCharacter = substr($hairColour, $i, 1);\n if (!in_array($currentCharacter, $hexCharacters)) {\n return 0;\n }\n }\n\n // if we've fallen through, the hair colour string is valid\n return 1;\n}",
"private function hashing() {\n\t\t$data = md5($this->name.$this->date);\n\t\t$data = md5($data);\n\t\t$data = strrev($data);\n\t\t//$data = md5($data);\n\t\t$data = strtoupper($data);\n\t\t//$data = strrev($data);\n\n\t\t$datatemp = NULL;\n\t\tfor($i=0; $i<=strlen($data); $i++) {\n\t\t\t$arr = substr($data, $i, 1);\n\t\t\tif($i == '4' || $i == '8' || $i == '12' || $i == '16' || $i == '20' || $i == '24' || $i == '28' || $i == '32') {\n\t\t\t\t$datatemp .= substr($this->strfinger, ($i/4)-1, 1);\t\n\t\t\t}\n\t\t\t$datatemp .= \"/%\".$this->combine[$arr];\n\t\t}\n\n\t\t$this->resulthashcode = substr($datatemp, 1, strlen($datatemp)-6);\n\t\t$this->result = true;\n\t}"
] | [
"0.62204945",
"0.6210698",
"0.6137567",
"0.61097914",
"0.5977902",
"0.59247816",
"0.5880834",
"0.5870791",
"0.5834529",
"0.5796652",
"0.5700268",
"0.5693106",
"0.56841606",
"0.56671655",
"0.5655448",
"0.5638411",
"0.56305283",
"0.56303585",
"0.5620119",
"0.5605997",
"0.5604783",
"0.55909014",
"0.5568672",
"0.55670047",
"0.5554278",
"0.55176693",
"0.55164343",
"0.5507106",
"0.5504457",
"0.54933083",
"0.5466988",
"0.5444167",
"0.54424614",
"0.54187626",
"0.54186904",
"0.5396871",
"0.5373985",
"0.53519815",
"0.5341928",
"0.5340016",
"0.52968985",
"0.52906746",
"0.52905333",
"0.5287293",
"0.52727777",
"0.5259033",
"0.5254717",
"0.5252554",
"0.5251164",
"0.5241635",
"0.5238039",
"0.52242637",
"0.5218587",
"0.52111876",
"0.52073616",
"0.52049375",
"0.52027667",
"0.5185724",
"0.518295",
"0.5174017",
"0.51722854",
"0.5172046",
"0.5163255",
"0.5162004",
"0.5136857",
"0.5129858",
"0.51218873",
"0.51209563",
"0.5117947",
"0.5114788",
"0.51090235",
"0.5108189",
"0.5107674",
"0.510498",
"0.50987816",
"0.5091929",
"0.5090183",
"0.5090048",
"0.508948",
"0.50840014",
"0.50793207",
"0.5076904",
"0.5067269",
"0.5063872",
"0.5060045",
"0.50595474",
"0.5057334",
"0.5055879",
"0.50533277",
"0.50517297",
"0.5050986",
"0.50428855",
"0.5040262",
"0.5039684",
"0.5039225",
"0.50335133",
"0.5031587",
"0.5029359",
"0.5023535",
"0.5021905"
] | 0.6839638 | 0 |
Transform the \ContactGroup entity | public function transform(ContactGroup $model)
{
return [
'id' => $model->id,
'org_id' => $model->org_id,
'name' => $model->name,
'description' => $model->description
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function parseContacts($data, $contactGroup) {\n $contactGroup['contacts'] = [];\n if ($data) {\n $contacts = [];\n foreach($data as $contact) {\n $newContact = [];\n $newContact['accounting_id'] = IndexSanityCheckHelper::indexSanityCheck('ContactID',$contact);\n $newContact['name'] = IndexSanityCheckHelper::indexSanityCheck('Name',$contact);\n array_push($contacts, $newContact);\n }\n $contactGroup['contacts'] = $contacts;\n }\n\n return $contactGroup;\n }",
"public function addContactToGroup($request, $group_id){\n\n $contacts = $request->input('contacts');\n\n if(!empty($contacts)){\n foreach ($contacts as $key => $value) {\n $obj = new ContactGroup();\n $obj->account_id = $this->getAccountId();\n //$obj->extn = $this->extn;\n $obj->group_id = $group_id;\n $obj->contact_id = $value;\n $obj->save();\n }\n $this->updateGroupContactNumber($group_id, count($contacts));\n return $this->processServiceResponse(true, \"Contact Added Successfully!\", $contacts);\n }\n return $this->processServiceResponse(false, \"Contact Added Failed!\", $contacts);\n }",
"private function parseGroups()\n\t{\n\t\t/**\n\t\t * Grupos\n\t\t */\n\t\t$groups = $this->habbo->groups;\n\n\t\t/**\n\t\t * Convertirlos a Entity\n\t\t */\n\t\tforeach( $groups as $group )\n\t\t\t$this->addGroup( new Group( $group ) );\n\t}",
"function acf_translate_field_group( $field_group = array() ) {\n\treturn acf_translate_internal_post_type( $field_group, 'acf-field-group' );\n}",
"public function getContactGroups(){\n $contactGroups = [];\n foreach ($this->data as $contactGroup) {\n $newContactGroup = [];\n $newContactGroup['accounting_id'] = IndexSanityCheckHelper::indexSanityCheck('ContactGroupID', $contactGroup);\n $newContactGroup['name'] = IndexSanityCheckHelper::indexSanityCheck('Name', $contactGroup);\n $newContactGroup['status'] = IndexSanityCheckHelper::indexSanityCheck('Status', $contactGroup);\n if (IndexSanityCheckHelper::indexSanityCheck('Contacts', $contactGroup)) {\n $newContactGroup = $this->parseContacts($contactGroup['Contacts'], $newContactGroup);\n }\n array_push($contactGroups, $newContactGroup);\n }\n\n return $contactGroups;\n }",
"function acf_prepare_field_group_for_export( $field_group = array() ) {\n\treturn acf_prepare_internal_post_type_for_export( $field_group, 'acf-field-group' );\n}",
"public function getContactGroups(){\n $contactGroups = [];\n foreach ($this->data as $contactGroup) {\n $newContactGroup = [];\n $newContactGroup['accounting_id'] = IndexSanityCheckHelper::indexSanityCheck('ContactGroupID', $contactGroup);\n $newContactGroup['name'] = IndexSanityCheckHelper::indexSanityCheck('Name', $contactGroup);\n $newContactGroup['status'] = IndexSanityCheckHelper::indexSanityCheck('Status', $contactGroup);\n array_push($contactGroups, $newContactGroup);\n }\n\n return $contactGroups;\n }",
"function buildGroup($entity) {\n // The the standard group name.\n $group = parent::buildGroup($entity);\n // Add the scheme.\n if ($this->conf['group_by_scheme']) {\n // Get all stream wrappers.\n $stream_wrapper = file_get_stream_wrappers();\n $group .= ' · ' . $stream_wrapper[file_uri_scheme($entity->uri)]['name'];\n }\n return $group;\n }",
"private static function GroupResult2GroupRecord(\\stdClass $group){\n\t\t\tif(isset(\n\t\t\t\t$group->GroupID,\n\t\t\t\t$group->GroupName,\n\t\t\t\t$group->Charter,\n\t\t\t\t$group->GroupPicture,\n\t\t\t\t$group->FounderID,\n\t\t\t\t$group->MembershipFee,\n\t\t\t\t$group->OpenEnrollment,\n\t\t\t\t$group->ShowInList,\n\t\t\t\t$group->AllowPublish,\n\t\t\t\t$group->MaturePublish,\n\t\t\t\t$group->OwnerRoleID\n\t\t\t) === false){\n\t\t\t\tthrow new UnexpectedValueException('Call to API was successful, but required response sub-properties were missing.');\n\t\t\t}\n\t\t\treturn WebUI\\GroupRecord::r(\n\t\t\t\t$group->GroupID,\n\t\t\t\t$group->GroupName,\n\t\t\t\t$group->Charter,\n\t\t\t\t$group->GroupPicture,\n\t\t\t\t$group->FounderID,\n\t\t\t\t$group->MembershipFee,\n\t\t\t\t$group->OpenEnrollment,\n\t\t\t\t$group->ShowInList,\n\t\t\t\t$group->AllowPublish,\n\t\t\t\t$group->MaturePublish,\n\t\t\t\t$group->OwnerRoleID\n\t\t\t);\n\t\t}",
"function acf_prepare_field_group_for_import( $field_group ) {\n\treturn acf_prepare_internal_post_type_for_import( $field_group, 'acf-field-group' );\n}",
"function acf_prepare_field_group_for_export($field_group = array())\n{\n}",
"public function mapToModel($contact);",
"protected function applyGroup(XsdGroup $group)\n {\n // It provides for naming a model group for use by reference in the XML representation of complex type \n // definitions and model groups. The correspondences between the properties of the information item and \n // properties of the component it corresponds to are as follows:\n \n // <group\n // id = ID\n // maxOccurs = (nonNegativeInteger | unbounded) : 1\n // minOccurs = nonNegativeInteger : 1\n // name = NCName\n // ref = QName\n // {any attributes with non-schema namespace . . .}>\n // Content: (annotation?, (all | choice | sequence)?)\n // </group>\n \n // Мать вашу, какому идиоту понадобилось использовать группы???\n throw new Exception('Мать вашу, какому идиоту понадобилось использовать группы???');\n }",
"function acf_prepare_field_group_for_import($field_group)\n{\n}",
"function &_returnGroupFromRow(&$row) {\n\t\t$group = $this->newDataObject();\n\t\t$group->setId($row['group_id']);\n\t\t$group->setAboutDisplayed($row['about_displayed']);\n\t\t$group->setPublishEmail($row['publish_email']);\n\t\t$group->setSequence($row['seq']);\n\t\t$group->setContext($row['context']);\n\t\t$group->setAssocType($row['assoc_type']);\n\t\t$group->setAssocId($row['assoc_id']);\n\t\t$this->getDataObjectSettings('group_settings', 'group_id', $row['group_id'], $group);\n\n\t\tHookRegistry::call('GroupDAO::_returnGroupFromRow', array(&$group, &$row));\n\n\t\treturn $group;\n\t}",
"private function setCustomerGroupValue()\n {\n $value = $this->getData(self::$groupAttributeCode);\n try {\n $group = $this->groupRepository->getById($value);\n $this->setCustomAttribute(self::$groupAttributeCode, $group->getCode());\n } catch (NoSuchEntityException $e) {\n $this->setCustomAttribute(self::$groupAttributeCode, 'N/A');\n }\n }",
"function acf_translate_field_group($field_group = array())\n{\n}",
"public function removeContactGroupAction($id_contact, $id_group) {\n\t\t$this->group->id = $id_group;\n\t\t$this->group->id_contact = $id_contact;\n\t\treturn $this->group->removeContactGroup();\n\t}",
"public function group()\n {\n return $this->hasMany('Antares\\Customfields\\Model\\FieldGroup', 'category_id', 'id');\n }",
"abstract protected function _buildGroupBy( $group );",
"public function Group($field,$group){\n $this->_groups[$field] = array_merge($group,array(\"currentGroup\" => \"?\", \"currentMsg\" => \"\"));\n }",
"function Inscription_Handle_Collaborations_Group($group)\n {\n if (empty($group)) { $group=\"Collaborations\"; }\n \n if (empty($this->ItemDataSGroups[ $group ]))\n {\n $this->ItemDataSGroups[ $group ]=\n $this->ReadPHPArray(\"System/Inscriptions/SGroups.\".$group.\".php\");\n }\n\n return $group;\n }",
"function addToGroup($group)\n {\n $this->_api->doRequest(\"PUT\", \"{$group->getBaseApiPath()}/contacts/{$this->id}\"); \n $this->_group_ids_set[$group->id] = true; \n }",
"public function updateGroupContactNumber($group_id, $num_contacts){\n $updateList = Group::find($group_id);\n if($updateList){\n $updateList->num_contacts = $updateList->num_contacts + $num_contacts;\n $updateList->save();\n }\n }",
"public function postGroup()\n {\n $group = $this->em->newEntity( 'friends\\model\\Group' );\n $loadable = $this->role->applyLoadable( $group );\n $loadable->loadData();\n if( $loadable->validate() )\n {\n $active = $this->role->applyActive( $group );\n $active->save();\n $jump = $this->view->get( 'appUrl' ) . 'group';\n header( 'Location: ' . $jump );\n exit;\n }\n return $this->getGroup();\n }",
"public static function group(Api\\GroupCreate $group)\n {\n $fields = [];\n\n if ($group->getName() != null) {\n $fields['name'] = $group->getName();\n }\n\n if (!empty($group->getMembers())) {\n $fields['members'] = $group->getMembers();\n }\n\n if (!empty($group->getChildGroups())) {\n $fields['child_groups'] = $group->getChildGroups();\n }\n\n if ($group->getAutoUpdate() != null) {\n $fields['auto_update'] = Serialize::_groupAutoUpdateHelper(\n $group->getAutoUpdate()\n );\n }\n\n if (!empty($group->getTags())) {\n $fields['tags'] = $group->getTags();\n }\n\n return Serialize::_toJson($fields);\n }",
"public function groupBy($group=null)\n {\n $group = LambdaUtils::toSelectCallable($group);\n\n $result = new ObjectArray(array());\n if($this instanceof ObjectArray)\n {\n $result = $this->newInstance();\n }\n\n foreach($this as $record)\n {\n $key = call_user_func($group, $record);\n\n $data = array();\n if($this->__converter instanceof IListConverter)\n {\n $data = $this->newConverterInstance();\n }\n $newitemtype = new ArrayList($data);\n\n $result->get($key, $newitemtype, true)->add($record);\n }\n\n return $result;\n }",
"public function meta(): Group;",
"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 }",
"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 }",
"function acf_write_json_field_group($field_group)\n{\n}",
"function acf_import_field_group( $field_group ) {\n\treturn acf_import_internal_post_type( $field_group, 'acf-field-group' );\n}",
"function createSampleGroup($group)\n{\n foreach ($group['items'] as &$subGroup) {\n if (! isset($subGroup['publicId'])) {\n $subGroup['publicId'] = isset($group['publicId']) ? $group['publicId'] : 'sample';\n }\n\n foreach ($subGroup['items'] as &$sampleArray) {\n $sampleArray[] = ($subGroup['publicId']);\n $sampleArray = ClassUtils::verifyVarArgsInstance($sampleArray, TransformationSample::class);\n $sampleArray->keepSpaces = true;\n }\n }\n\n return $group;\n}",
"private function normalizeGroup($raw)\n {\n $group = array();\n $group['id'] = strval($raw->Name);\n foreach($raw->Attribute as $item)\n {\n $name = (string)$item->Name;\n $value = (string)$item->Value;\n if($name == 'members')\n {\n if($value != '')\n $group[$name][] = $value;\n continue;\n }\n $group[$name] = $value;\n }\n return $group;\n }",
"private function normalize()\n {\n $field_id = isset($this->columns[0]) ? $this->columns[0] : 'id';\n\n $field_text = isset($this->columns[1]) ? $this->columns[1] : $field_id;\n\n $groups = [];\n\n $has_empty_groups = false;\n\n foreach ($this->data as $key => $datum) {\n $has_empty_groups = !is_numeric($key);\n }\n\n foreach ($this->data as $key => $datum) {\n if (is_array($datum) && isset($datum['id']) && isset($datum['text'])) {\n $this->push($datum);\n\n continue;\n }\n\n if (is_numeric($key)) {\n if (is_string($datum)) {\n $datum = [$datum];\n }\n\n $id = multi_dot_call($datum, $field_id);\n $id = $id === null ? (string) multi_dot_call($datum, '0') : (string) $id;\n\n $text = multi_dot_call($datum, $field_text);\n if (is_array($text)) {\n $lang = App::getLocale();\n $text = $text[$lang] ?? implode($this->separator, $text);\n }\n $text = $text === null ? (string) multi_dot_call($datum, '0') : (string) $text;\n\n if ($id && $text) {\n $text = $id . \") \" . $text;\n }\n\n foreach (array_slice($this->columns, 2) as $part) {\n $t = multi_dot_call($datum, $part);\n if ($t) {\n $text .= $this->separator.$t;\n }\n }\n\n $item = ['id' => $id, 'text' => $text];\n\n if ($id == $this->value) {\n $item['selected'] = true;\n }\n\n if (!$has_empty_groups) {\n $this->push($item);\n } else {\n $groups['Other'][] = $item;\n }\n } else {\n $groups[ucfirst($key)] = $datum;\n }\n }\n\n foreach ($groups as $group_name => $group) {\n $this->push([\n 'text' => $group_name,\n 'children' => collect($group)->map(function ($datum) use ($field_id, $field_text) {\n if (is_string($datum)) {\n $datum = [$field_id => $datum, $field_text => $datum];\n }\n\n $id = (string) multi_dot_call($datum, $field_id);\n\n $text = (string) multi_dot_call($datum, $field_text);\n\n foreach (array_slice($this->columns, 2) as $part) {\n $t = multi_dot_call($datum, $part);\n\n if ($t) {\n $text .= ' '.$t;\n }\n }\n\n $item = ['id' => $id, 'text' => $text];\n\n if ($id == $this->value) {\n $item['selected'] = true;\n }\n\n return $item;\n })->toArray()\n ]);\n }\n }",
"function removeFromGroup($group)\n { \n $this->_api->doRequest(\"DELETE\", \"{$group->getBaseApiPath()}/contacts/{$this->id}\"); \n unset($this->_group_ids_set[$group->id]);\n }",
"private function getOrCreateCSRContactGroup()\n\t{\n\t\t$group = $this->getCSRContactGroup();\n\t\tif (!$group) {\n\t\t\t$contactGroup = new ContactGroup();\n\t\t\t$contactGroup->setName($this->groepNaam);\n\t\t\t$createContactGroupRequest = new CreateContactGroupRequest();\n\t\t\t$createContactGroupRequest->setContactGroup($contactGroup);\n\t\t\t$group = $this->peopleService->contactGroups->create(\n\t\t\t\t$createContactGroupRequest\n\t\t\t);\n\t\t}\n\n\t\t$this->csrGroupResourceName = $group->getResourceName();\n\t\treturn $group;\n\t}",
"public function initCampaignContactGroups()\n\t{\n\t\t$this->collCampaignContactGroups = array();\n\t}",
"public function getCustomerGroup();",
"public function createGroup($name)\n {\n $this->addParam('name', $name);\n $response = $this->request->post($this->requestUrl('create_group'), $this->params);\n\n// var_dump(\"ManagesContacts createGroup response\");\n// var_dump($response);\n\n return $response;\n }",
"function acf_get_raw_field_groups()\n{\n}",
"public function setGroup($group) {}",
"public function setGroup($group) {}",
"public function createGroupAction() {\n\t\t$this->group->id_parent = isset($this->data['id_parent']) ? $this->data['id_parent'] : null;\n\t\t$this->group->group_name = $this->data['group_name'];\n\t\t$this->group->description = $this->data['description'];\n\t\treturn $this->group->save();\n\t}",
"function acf_get_raw_field_group($id = 0)\n{\n}",
"function updateLocaleFields(&$group) {\n\t\t$this->updateDataObjectSettings('group_settings', $group, array(\n\t\t\t'group_id' => $group->getId()\n\t\t));\n\t}",
"function acf_update_field_group( $field_group ) {\n\treturn acf_update_internal_post_type( $field_group, 'acf-field-group' );\n}",
"function osa_clone_node_alter_group_class(&$node, $context) {\r\n $node->field_event_children['und'][0]['value'] = json_encode(array());\r\n}",
"public function group($group);",
"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 }",
"private static function fromRow($row){\n $permissions = self::fetchPermissions($row['id']);\n if($permissions === null) return null;\n $output = new Group($row['name'], $permissions);\n $output->setModified($row['modified']);\n $output->setId($row['id']);\n $output->setNew(false);\n return $output;\n }",
"public function updateGroup($old_group, $new_group)\n {\n $em = $this->doctrine->getEntityManager();\n $group = $em->getRepository('CmarMeetingBundle:Group')->findOneBy(array('key' => $old_group->{'key'}));\n $meeting = $em->getRepository('CmarMeetingBundle:Meeting')->findOneByStatesAndTitle(array(Meeting::STATE_NOW, Meeting::STATE_NEW, Meeting::STATE_LOCKED), $old_group->{'name'});\n\n if ($group == null){\n $this->logger->info(\"Group does not exist\");\n throw new \\LogicException(\"Group does not exist\");\n } else {\n $this->mapGroup($group, $new_group);\n $errors = $this->validator->validate($group);\n if (count($errors) > 0) {\n throw new \\LogicException(\"Validation Exception \\\"\" . $errors[0]->getPropertyPath() . \"\\\": \" . $errors[0]->getMessageTemplate(), -1);\n } \n \n $principal_id_group = $this->adoAdmin->principalFindGroupByName($old_group->{'name'});\n $out = $this->adoAdmin->getScoByUrl($meeting->getUrl());\n $sco_id_meeting = (integer)$out->{'sco'}->attributes()->{'sco-id'};\n $xml = $this->adoAdmin->principalUpdateforType($new_group->{'name'}, 'group', $new_group->{'description'}, $principal_id_group);\n $xml = $this->adoAdmin->scoUpdate($meeting, $new_group, $sco_id_meeting);\n\n $meeting->setTitle($new_group->{'name'});\n $meeting->setDescription($new_group->{'description'});//Si la descripcion es null la cambia\n if ($new_group->{'type'} != null){\n if ($new_group->{'type'} == 'public'){\n $meeting->setPublic(true);\n } elseif ($new_group->{'type'} == 'private'){\n $meeting->setPublic(false);\n }\n }\n $em->persist($meeting);\n $em->persist($group);\n \n try {\n $em->flush();\n } catch (\\Exception $e) {\n $this->logger->info(\"DDBB Exception\"); \n throw new \\LogicException(\"DDBB Exception\", -1);\n }\n }\n }",
"public static function saveGroup(GroupEntity $group)\n {\n // Set a local array of the Group fields to save in both insert and updated.\n // We need to ignore the Buddies and Meetings fields however, they are\n // stored in separate tables.\n $fields = $group->fieldsAsArray(\n true,\n false,\n array(\n GroupEntity::FLD_BUDDIES,\n GroupEntity::FLD_MEETINGS,\n )\n );\n\n // If the $group's id is null, it means we're saving a new group and need\n // to do an insert.\n if (is_null($group->getId())) {\n try {\n $id = DB::connection('app_w')\n ->table('groups')\n ->insertGetId($fields);\n return $id;\n } catch (\\Exception $e) {\n GSBException::database('Database problem 1');\n return false;\n }\n }\n\n // If we made it down here, thre is an id in the $group and we are editing\n // an existing group, so we need to do an update.\n try {\n // We need to unset the Group's id field because we're doing an update.\n // The id field is only required for inserting a new record.\n unset($fields[GroupEntity::FLD_ID]);\n\n $affected = DB::connection('app_w')\n ->table('groups')\n ->where('id', $group->getId())\n ->update($fields);\n return true;\n } catch (\\Exception $e) {\n GSBException::database('Database problem 2');\n return false;\n }\n }",
"public function groups(): MorphToMany;",
"public function clearCampaignContactGroups()\n\t{\n\t\t$this->collCampaignContactGroups = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function postProcess(): void {\n $groupsToAddTo = (array) $this->getSubmittedValue('groups');\n $summaryInfo = ['groups' => [], 'tags' => []];\n foreach ($groupsToAddTo as $groupID) {\n // This is a convenience for now - really url & name should be determined at\n // presentation stage - ie the summary screen. The only info we are really\n // preserving is which groups were created vs already existed.\n $summaryInfo['groups'][$groupID] = [\n 'url' => CRM_Utils_System::url('civicrm/group/search', 'reset=1&force=1&context=smog&gid=' . $groupID),\n 'name' => Group::get(FALSE)\n ->addWhere('id', '=', $groupID)\n ->addSelect('name')\n ->execute()\n ->first()['name'],\n 'new' => FALSE,\n 'added' => 0,\n 'notAdded' => 0,\n ];\n }\n\n if ($this->getSubmittedValue('newGroupName')) {\n /* Create a new group */\n $groupsToAddTo[] = $groupID = Group::create(FALSE)->setValues([\n 'title' => $this->getSubmittedValue('newGroupName'),\n 'description' => $this->getSubmittedValue('newGroupDesc'),\n 'group_type' => $this->getSubmittedValue('newGroupType') ?? [],\n 'is_active' => TRUE,\n ])->execute()->first()['id'];\n $summaryInfo['groups'][$groupID] = [\n 'url' => CRM_Utils_System::url('civicrm/group/search', 'reset=1&force=1&context=smog&gid=' . $groupID),\n 'name' => $this->getSubmittedValue('newGroupName'),\n 'new' => TRUE,\n 'added' => 0,\n 'notAdded' => 0,\n ];\n }\n $tagsToAdd = (array) $this->getSubmittedValue('tag');\n foreach ($tagsToAdd as $tagID) {\n // This is a convenience for now - really url & name should be determined at\n // presentation stage - ie the summary screen. The only info we are really\n // preserving is which tags were created vs already existed.\n $summaryInfo['tags'][$tagID] = [\n 'url' => CRM_Utils_System::url('civicrm/contact/search', 'reset=1&force=1&context=smog&id=' . $tagID),\n 'name' => Tag::get(FALSE)\n ->addWhere('id', '=', $tagID)\n ->addSelect('name')\n ->execute()\n ->first()['name'],\n 'new' => TRUE,\n 'added' => 0,\n 'notAdded' => 0,\n ];\n }\n if ($this->getSubmittedValue('newTagName')) {\n $tagsToAdd[] = $tagID = Tag::create(FALSE)->setValues([\n 'name' => $this->getSubmittedValue('newTagName'),\n 'description' => $this->getSubmittedValue('newTagDesc'),\n 'is_selectable' => TRUE,\n 'used_for' => 'civicrm_contact',\n //NYSS new tags during import should be imported as keywords\n 'parent_id'\t=> 296,\n ])->execute()->first()['id'];\n $summaryInfo['tags'][$tagID] = [\n 'url' => CRM_Utils_System::url('civicrm/contact/search', 'reset=1&force=1&context=smog&id=' . $tagID),\n 'name' => $this->getSubmittedValue('newTagName'),\n 'new' => FALSE,\n 'added' => 0,\n 'notAdded' => 0,\n ];\n }\n // Store the actions to take on each row & the data to present at the end to the userJob.\n $this->updateUserJobMetadata('post_actions', [\n 'group' => $groupsToAddTo,\n 'tag' => $tagsToAdd,\n ]);\n $this->updateUserJobMetadata('summary_info', $summaryInfo);\n\n // If ACL applies to the current user, update cache before running the import.\n if (!CRM_Core_Permission::check('view all contacts')) {\n $userID = CRM_Core_Session::getLoggedInContactID();\n CRM_ACL_BAO_Cache::deleteEntry($userID);\n CRM_ACL_BAO_Cache::deleteContactCacheEntry($userID);\n }\n\n $this->runTheImport();\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 }",
"public function getGroup(): GroupInterface;",
"function updateObject(&$group) {\n\t\t$returner = $this->update(\n\t\t\t'UPDATE groups\n\t\t\t\tSET\tseq = ?,\n\t\t\t\t\tassoc_type = ?,\n\t\t\t\t\tassoc_id = ?,\n\t\t\t\t\tabout_displayed = ?,\n\t\t\t\t\tcontext = ?,\n\t\t\t\t\tpublish_email = ?\n\t\t\t\tWHERE\tgroup_id = ?',\n\t\t\tarray(\n\t\t\t\t(float) $group->getSequence(),\n\t\t\t\t(int) $group->getAssocType(),\n\t\t\t\t(int) $group->getAssocId(),\n\t\t\t\t(int) $group->getAboutDisplayed(),\n\t\t\t\t(int) $group->getContext(),\n\t\t\t\t(int) $group->getPublishEmail(),\n\t\t\t\t(int) $group->getId()\n\t\t\t)\n\t\t);\n\t\t$this->updateLocaleFields($group);\n\t\treturn $returner;\n\t}",
"public function SaveGroupCategory() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->lstGroup) $this->objGroupCategory->GroupId = $this->lstGroup->SelectedValue;\n\t\t\t\tif ($this->calDateRefreshed) $this->objGroupCategory->DateRefreshed = $this->calDateRefreshed->DateTime;\n\t\t\t\tif ($this->txtProcessTimeMs) $this->objGroupCategory->ProcessTimeMs = $this->txtProcessTimeMs->Text;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the GroupCategory object\n\t\t\t\t$this->objGroupCategory->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}",
"function acf_flush_field_group_cache($field_group)\n{\n}",
"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 generateGroup( $row )\n {\n if ( !isset($row) ) return null;\n $Group = new Group();\n $Group->id = (int)$row['id'];\n $Group->name = $row['name'];\n return $Group;\n }",
"public function getGroup();",
"public function getGroup();",
"public function getGroup();",
"public function group_del_contact($group,$contact_dn){\n \n // Find the parent dn\n $group_info=$this->group_info($group,array(\"cn\"));\n if ($group_info[0][\"dn\"]===NULL){ return (false); }\n $group_dn=$group_info[0][\"dn\"];\n \n $del=array();\n $del[\"member\"] = $contact_dn;\n \n $result=@ldap_mod_del($this->_conn,$group_dn,$del);\n if ($result==false){ return (false); }\n return (true);\n }",
"public function getGroup(): ContentEntityInterface;",
"protected function _upgradeContactLists()\n {\n $criteria = array('__type' => 'Group');\n $sources = array_keys($GLOBALS['cfgSources']);\n\n foreach ($sources as $sourcekey) {\n try {\n $driver = $GLOBALS['injector']->getInstance('Turba_Factory_Driver')->create($sourcekey);\n $lists = $driver->search($criteria);\n } catch (Turba_Exception $e) {\n return;\n }\n\n for ($j = 0, $cnt = count($lists); $j < $cnt; ++$j) {\n $list = $lists->next();\n $attributes = $list->getAttributes();\n $members = @unserialize($attributes['__members']);\n if (is_array($members) && !empty($members[0])) {\n $c = count($members);\n for ($i = 0; $i < $c; ++$i) {\n if (substr_count($members[$i], ':') == 2) {\n preg_match('/^([a-zA-Z0-9]+:[a-zA-Z0-9]+)(:[a-zA-Z0-9]+)$/', $members[$i], $matches);\n $source = $matches[1];\n $contact_key = substr($matches[2], 1);\n } elseif (substr_count($members[$i], ':') == 1) {\n list($source, $contact_key) = explode(':', $members[$i]);\n } else {\n break;\n }\n $source = $this->_updateShareName($source);\n $members[$i] = $source . ':' . $contact_key;\n }\n $list->setValue('__members', serialize($members));\n $list->store();\n }\n }\n }\n }",
"function field_group_features_export_alter(&$export, $module_name) {\n // Make sure we have fresh data by loading directly.\n ctools_include('export');\n $field_groups = ctools_export_load_object('field_group');\n\n // Support the separate field base -vs- field instance structure that was\n // added in Features v7.x-2.0-beta2.\n if (function_exists('field_instance_features_export')) {\n $export_var = 'field_instance';\n }\n else {\n $export_var = 'field';\n }\n\n // Add fieldgroups based on the fields that are present.\n if (!empty($export['features'][$export_var])) {\n if (!isset($export['features']['field_group'])) {\n $export['features']['field_group'] = array();\n }\n foreach ($export['features'][$export_var] as $field) {\n list($entity_type, $bundle, $field_name) = explode('-', $field);\n\n foreach ($field_groups as $group_id => $group) {\n\n if ($group->entity_type == $entity_type && $group->bundle == $bundle && in_array($field_name, $group->data['children']) && !in_array($group->identifier, $export['features']['field_group'])) {\n if (isset($group->export_module) && $group->export_module != $module_name) {\n $export['dependencies'][$group->export_module] = $group->export_module;\n }\n else {\n $export['features']['field_group'][$group_id] = $group_id;\n }\n }\n }\n }\n }\n\n // Add any parent field groups that haven't been selected.\n if (!empty($export['features']['field_group'])) {\n foreach ($export['features']['field_group'] as $id) {\n $group = isset($field_groups[$id]) ? $field_groups[$id] : FALSE;\n\n if ($group && !empty($group->parent_name)) {\n $parent_id = $group->parent_name . '|' . $group->entity_type . '|' . $group->bundle . '|' . $group->mode;\n $parent_group = isset($field_groups[$parent_id]) ? $field_groups[$parent_id] : FALSE;\n\n if ($parent_group && !isset($export['features']['field_group'][$parent_id])) {\n if (isset($parent_group->export_module) && $parent_group->export_module != $module_name) {\n $export['dependencies'][$parent_group->export_module] = $parent_group->export_module;\n }\n else {\n $export['features']['field_group'][$parent_id] = $parent_id;\n }\n }\n }\n }\n if(empty($export['dependencies']['field_group'])) {\n $export['dependencies']['field_group'] = 'field_group';\n }\n }\n}",
"public function group()\n {\n return $this->belongsTo(GroupModel::class);\n }",
"public function AddImContactToGroup($request)\n {\n return $this->makeRequest(__FUNCTION__, $request);\n }",
"function acf_import_field_group($field_group)\n{\n}",
"public function prepareDataGroup($inputData) {\n\t\t\t$data = array();\n\n\t\t\tif($this->actionType == \"create\") {\n\t\t\t\t$group_arr = array();\n\t\t\t\t$group_arr['attribute:visible'] = true;\n\t\t\t\t$data['group'] = $group_arr;\n\t\t\t} else {\n\t\t\t\tif($inputData instanceof umiFieldsGroup) {\n\t\t\t\t\t$data['group'] = $inputData;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new coreException(\"Expected instance of umiFieldsGroup\");\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $data;\n\t\t}",
"abstract public function transform();",
"function acf_upgrade_500_field_groups()\n{\n}",
"public function group()\n {\n return $this->belongsTo('App\\Models\\Group');\n }",
"public function group()\n {\n return $this->belongsTo('App\\Models\\Group');\n }",
"public function getGroup ()\n {\n return $this->getObject();\n }",
"function group() {\n return $this->belongsTo(Group::class, 'groupId');\n }",
"public function getGroup() {}",
"public function getGroup() {}",
"public function getGroup() {}",
"public function getGroup() {}",
"function acf_get_raw_field_group( $id = 0 ) {\n\treturn acf_get_raw_internal_post_type( $id, 'acf-field-group' );\n}",
"private function prepareItem($customerGroup)\n {\n $content = [];\n if (!is_array($customerGroup)) {\n $customerGroup = [$customerGroup];\n }\n foreach ($customerGroup as $groupId) {\n try {\n $group = $this->customerGroupRepository->getById($groupId);\n } catch (NoSuchEntityException $noEntityException) {\n continue;\n }\n $content[] = $group->getCode();\n }\n return implode(', ', $content);\n }",
"public function group(): Collection;",
"function _acf_apply_get_local_field_groups($groups = array())\n{\n}",
"function acf_update_field_group($field_group)\n{\n}",
"function acf_flush_field_group_cache( $field_group ) {\n\tacf_flush_internal_post_type_cache( $field_group, 'acf-field-group' );\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}",
"function updateGroup() {\n\t\t$groupId = Request::getUserVar('groupId') === null? null : (int) Request::getUserVar('groupId');\n\t\tif ($groupId === null) {\n\t\t\t$this->validate();\n\t\t\t$group = null;\n\t\t} else {\n\t\t\t$this->validate($groupId);\n\t\t\t$group =& $this->group;\n\t\t}\n\t\t$this->setupTemplate($group);\n\n\t\timport('classes.manager.form.GroupForm');\n\n\t\t$groupForm = new GroupForm($group);\n\t\t$groupForm->readInputData();\n\n\t\tif ($groupForm->validate()) {\n\t\t\t$groupForm->execute();\n\t\t\tRequest::redirect(null, null, 'groups');\n\t\t} else {\n\n\t\t\t$templateMgr =& TemplateManager::getManager();\n\t\t\t$templateMgr->append('pageHierarchy', array(Request::url(null, 'manager', 'groups'), 'manager.groups'));\n\n\t\t\t$templateMgr->assign('pageTitle',\n\t\t\t\t$group?\n\t\t\t\t\t'manager.groups.editTitle':\n\t\t\t\t\t'manager.groups.createTitle'\n\t\t\t);\n\n\t\t\t$groupForm->display();\n\t\t}\n\t}",
"public static function get_by_group(Group_DO $group){\n \n global $wpdb;\n $collections = array();\n \n $sql = \"SELECT id FROM \" . self::get_table_name() . \" WHERE group_id=\" \n . $group->get_id();\n \n $results = $wpdb->get_results($sql);\n \n foreach( $results as $row ){\n $collections[$row->id] = new Affiliation_Collection_DO($row->id);\n }\n \n return $collections;\n }",
"public function RemoveImContactFromGroup($request)\n {\n return $this->makeRequest(__FUNCTION__, $request);\n }",
"public function parseEntity(XTemplate $xtpl, $oContactSendingNewsletter){ \n\n\t\t\t\t\n\t\t$xtpl->assign ( 'cd_contact_sending_newsletter', stripslashes ( $oContactSendingNewsletter->getCd_contact_sending_newsletter () ) );\n\t\t$xtpl->assign ( 'cd_contact_sending_newsletter_label', BOL_LBL_CONTACTSENDINGNEWSLETTER_CD_CONTACT_SENDING_NEWSLETTER );\n\t\t\t\t\n\t\t$xtpl->assign ( 'cd_sending_newsletter', stripslashes ( $oContactSendingNewsletter->getCd_sending_newsletter () ) );\n\t\t$xtpl->assign ( 'cd_sending_newsletter_label', BOL_LBL_CONTACTSENDINGNEWSLETTER_CD_SENDING_NEWSLETTER );\n\t\t\t\t\n\t\t$xtpl->assign ( 'cd_contact', stripslashes ( $oContactSendingNewsletter->getCd_contact () ) );\n\t\t$xtpl->assign ( 'cd_contact_label', BOL_LBL_CONTACTSENDINGNEWSLETTER_CD_CONTACT );\n\t\t\t\t\n\t\t$xtpl->assign ( 'cd_category', stripslashes ( $oContactSendingNewsletter->getCd_category () ) );\n\t\t$xtpl->assign ( 'cd_category_label', BOL_LBL_CONTACTSENDINGNEWSLETTER_CD_CATEGORY );\n\t\t\t\t\n\t\t$xtpl->assign ( 'dt_date', stripslashes ( $oContactSendingNewsletter->getDt_date () ) );\n\t\t$xtpl->assign ( 'dt_date_label', BOL_LBL_CONTACTSENDINGNEWSLETTER_DT_DATE );\n\t\t\t\t\n\t\t$xtpl->assign ( 'ds_time', stripslashes ( $oContactSendingNewsletter->getDs_time () ) );\n\t\t$xtpl->assign ( 'ds_time_label', BOL_LBL_CONTACTSENDINGNEWSLETTER_DS_TIME );\n\t\t\t\t\n\t\t$xtpl->assign ( 'bl_sent', stripslashes ( $oContactSendingNewsletter->getBl_sent () ) );\n\t\t$xtpl->assign ( 'bl_sent_label', BOL_LBL_CONTACTSENDINGNEWSLETTER_BL_SENT );\n\t\t\t\t\n\t\t$xtpl->assign ( 'dt_sent', stripslashes ( $oContactSendingNewsletter->getDt_sent () ) );\n\t\t$xtpl->assign ( 'dt_sent_label', BOL_LBL_CONTACTSENDINGNEWSLETTER_DT_SENT );\n\t\t\t\t\n\t\t$xtpl->assign ( 'nu_hard', stripslashes ( $oContactSendingNewsletter->getNu_hard () ) );\n\t\t$xtpl->assign ( 'nu_hard_label', BOL_LBL_CONTACTSENDINGNEWSLETTER_NU_HARD );\n\t\t\t\t\n\t\t$xtpl->assign ( 'nu_soft', stripslashes ( $oContactSendingNewsletter->getNu_soft () ) );\n\t\t$xtpl->assign ( 'nu_soft_label', BOL_LBL_CONTACTSENDINGNEWSLETTER_NU_SOFT );\n\t\t\t\t\n\t\t$xtpl->assign ( 'bl_processed', stripslashes ( $oContactSendingNewsletter->getBl_processed () ) );\n\t\t$xtpl->assign ( 'bl_processed_label', BOL_LBL_CONTACTSENDINGNEWSLETTER_BL_PROCESSED );\n\t\t\t\t\n\t\t$xtpl->assign ( 'bl_open', stripslashes ( $oContactSendingNewsletter->getBl_open () ) );\n\t\t$xtpl->assign ( 'bl_open_label', BOL_LBL_CONTACTSENDINGNEWSLETTER_BL_OPEN );\n\t\t\n\t\t\n\t}",
"public function group() {\n\t\treturn $this->belongsTo('Group');\n\t}",
"public function store(Request $request)\n {\n\n\n\n $contact = new Contact();\n\n $this->validateContact($request);\n\n\n //Model has been validated, proceed to save in storage.\n $contact->name = $request->name;\n $contact->surname = $request->surname;\n $contact->email = $request->email;\n $contact->phone = $request->phone;\n\n DB::beginTransaction();\n\n $contact->save();\n $contact->groups()->sync($request->groups);\n $contact->save();\n\n DB::commit();\n\n\n return response()->json($contact);\n }",
"public function filterByContactGroup($contactGroup, $comparison = null)\n {\n if ($contactGroup instanceof ContactGroup) {\n return $this\n ->addUsingAlias(ContactPeer::ID, $contactGroup->getContactId(), $comparison);\n } elseif ($contactGroup instanceof PropelObjectCollection) {\n return $this\n ->useContactGroupQuery()\n ->filterByPrimaryKeys($contactGroup->getPrimaryKeys())\n ->endUse();\n } else {\n throw new PropelException('filterByContactGroup() only accepts arguments of type ContactGroup or PropelCollection');\n }\n }",
"public function group()\n {\n return $this->belongsTo('App\\Group');\n }",
"public function group()\n {\n return $this->belongsTo(Group::class);\n }"
] | [
"0.60255605",
"0.57956856",
"0.55557865",
"0.55095255",
"0.5487097",
"0.54014796",
"0.5331914",
"0.5316126",
"0.5301569",
"0.52960724",
"0.5271924",
"0.527151",
"0.5235497",
"0.5210859",
"0.519019",
"0.5148069",
"0.5136212",
"0.5135771",
"0.51137406",
"0.5105334",
"0.5102308",
"0.5090085",
"0.5071325",
"0.5021622",
"0.5016676",
"0.5012026",
"0.5009906",
"0.49923745",
"0.49738672",
"0.496437",
"0.49573326",
"0.49531603",
"0.49428013",
"0.49351612",
"0.49184653",
"0.4913208",
"0.49105442",
"0.49101162",
"0.49021634",
"0.4900188",
"0.48994523",
"0.4895783",
"0.4895496",
"0.48865876",
"0.48788372",
"0.48731056",
"0.4858246",
"0.483914",
"0.4834024",
"0.483197",
"0.48229337",
"0.48092327",
"0.48025626",
"0.47953874",
"0.4787248",
"0.4785663",
"0.4776193",
"0.47752354",
"0.47750548",
"0.47749245",
"0.47605523",
"0.47603783",
"0.476004",
"0.47565243",
"0.47565243",
"0.47565243",
"0.4722957",
"0.47184289",
"0.47164258",
"0.47146252",
"0.4712362",
"0.47066888",
"0.47056466",
"0.4698759",
"0.46913046",
"0.468354",
"0.46815816",
"0.46815816",
"0.46777213",
"0.46742696",
"0.4669495",
"0.4669495",
"0.4669495",
"0.4669495",
"0.46689275",
"0.46682006",
"0.46673775",
"0.4650758",
"0.46501455",
"0.46494442",
"0.46474928",
"0.4643121",
"0.4642974",
"0.46369204",
"0.46361357",
"0.46350703",
"0.4632383",
"0.46308306",
"0.46302664",
"0.4629553"
] | 0.66498 | 0 |
Create a new filesystem wrapper | public function __construct($root = '')
{
$this->root = $root;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create(array $config): FilesystemInterface;",
"public function filesystem(): Filesystem;",
"protected function createFilesystemDriver(): StoreContract\n {\n return $this->createCacheBased('filesystem');\n }",
"public function createFilesystemDriver()\n {\n return new FilesystemHealthCheck;\n }",
"public function getFileSystem() {}",
"protected function getFilesystemService()\n {\n return $this->services['filesystem'] = new \\phpbb\\filesystem\\filesystem();\n }",
"protected function getFilesystemService()\n {\n return $this->services['filesystem'] = new \\Symfony\\Component\\Filesystem\\Filesystem();\n }",
"private function registerFileSystem()\n\t{\n\t\t$this->app->singleton('glottos.fileSystem', function($app) {\n\t\t\treturn new Filesystem;\n\t\t});\n\t}",
"public function make(array $config, FlysystemManager $manager)\n {\n $adapter = $this->createAdapter($config);\n\n if (is_array($cache = Arr::get($config, 'cache', false))) {\n $adapter = new CachedAdapter($adapter, $this->createCache($cache, $manager));\n }\n\n $options = $this->getOptions($config);\n\n if (Arr::get($config, 'eventable', false)) {\n return new EventableFilesystem($adapter, $options);\n }\n\n return new Filesystem($adapter, $options);\n }",
"public static function getFileSystem()\n\t{\n\t\t//#! Set the permission constants if not already set.\n\t\tif ( ! defined( 'FS_CHMOD_DIR' ) ) {\n\t\t\tdefine( 'FS_CHMOD_DIR', ( fileperms( ABSPATH ) & 0777 | 0755 ) );\n\t\t}\n\t\tif ( ! defined( 'FS_CHMOD_FILE' ) ) {\n\t\t\tdefine( 'FS_CHMOD_FILE', ( fileperms( ABSPATH . 'index.php' ) & 0777 | 0644 ) );\n\t\t}\n\n\t\t//#! Setup a new instance of WP_Filesystem_Direct and use it\n\t\tglobal $wp_filesystem;\n\t\tif ( ! ( $wp_filesystem instanceof \\WP_Filesystem_Base ) ) {\n\t\t\tif ( ! class_exists( 'WP_Filesystem_Direct' ) ) {\n\t\t\t\trequire_once( ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php' );\n\t\t\t\trequire_once( ABSPATH . 'wp-admin/includes/class-wp-filesystem-direct.php' );\n\t\t\t}\n\t\t\t$wp_filesystem = new \\WP_Filesystem_Direct( [] );\n\t\t}\n\t\treturn $wp_filesystem;\n\t}",
"public function it_should_be_able_to_create_a_filesystem_storeage_instance()\n {\n $attachment = $this->buildMockAttachment('filesystem');\n\n $storage = Storage::create($attachment);\n\n $this->assertInstanceOf('Codesleeve\\Stapler\\Storage\\Filesystem', $storage);\n }",
"private function registerFileSystem()\n {\n $this->app->singleton('firewall.filesystem', function () {\n return new Filesystem();\n });\n }",
"protected function getFileFactory() {}",
"public function __construct()\n {\n $this->fileSystem = new Filesystem();\n }",
"public function getFilesystemForStorage(Storage $storage);",
"public function it_should_be_able_to_create_a_filesystem_storeage_instance_by_default()\n {\n $attachment = $this->buildMockAttachment();\n\n $storage = Storage::create($attachment);\n\n $this->assertInstanceOf('Codesleeve\\Stapler\\Storage\\Filesystem', $storage);\n }",
"public function createFSService();",
"public function make()\n {\n return new FileStore(\n Paths::filePaths($this->paths, $this->names),\n $this->shortCircuit,\n $this->fileEncoding\n );\n }",
"protected function localFilesystem($path)\n {\n $adapter = class_exists(Local::class)\n ? new Local($path)\n : new LocalFilesystemAdapter($path);\n\n return new Filesystem($adapter);\n }",
"public function create($storage = null)\n {\n $storage = $storage ?: $this->getStorageDisk();\n\n return new FileHandler(\n $this->makeStorage($storage),\n $this->makeProcessor()\n );\n }",
"protected function createFile() {}",
"public function getFilesystem(): Filesystem\n {\n return $this->filesystem;\n }",
"public function getFilesystem(): Filesystem\n {\n return $this->filesystem;\n }",
"function getFilesystemService() {\n\t// $this->app->make('filesystem');\n\t// - or -\n\t// app('filesystem')\n\t// - or -\n\t// App::make('filesystem');\n\t// - or -\n\treturn $this->app['filesystem'];\n}",
"public function createFile(FileInterface $file, DirectoryInterface $parent): FileInterface;",
"public static function create()\n {\n $directories = [\n self::PATH.'/app',\n self::PATH.'/logs',\n self::PATH.'/bootstrap/cache',\n self::PATH.'/framework/cache',\n self::PATH.'/framework/views',\n ];\n\n foreach ($directories as $directory) {\n if (! is_dir($directory)) {\n function_exists('__vapor_debug') && __vapor_debug(\"Creating storage directory: $directory\");\n\n mkdir($directory, 0755, true);\n }\n }\n }",
"private function createKernel()\n {\n $iterator = (new Finder())\n ->name('*Kernel.php')\n ->depth(0)\n ->in(__DIR__.'/'.$this->args['kernel_options']['kernel.root_dir'])\n ->getIterator();\n $iterator->rewind(); //Seems weird that I have rewind a new iterator, but I do\n /** @var SplFileInfo $file */\n $file = $iterator->current();\n $class = $file->getBasename('.php');\n\n require_once $file;\n\n return new $class(\n isset($this->args['kernel_options']['kernel.environment']) ? $this->args['kernel_options']['kernel.environment'] : 'dev',\n isset($this->args['kernel_options']['kernel.debug']) ? $this->args['kernel_options']['kernel.debug'] : true\n );\n }",
"public function getFilesystem()\n\t{\n\t\treturn null;\n\t}",
"protected function _initFilesystem() {\n $this->_createWriteableDir($this->getTargetDir());\n $this->_createWriteableDir($this->getQuoteTargetDir());\n\n // Directory listing and hotlink secure\n $io = new Varien_Io_File();\n $io->cd($this->getTargetDir());\n if (!$io->fileExists($this->getTargetDir() . DS . '.htaccess')) {\n $io->streamOpen($this->getTargetDir() . DS . '.htaccess');\n $io->streamLock(true);\n $io->streamWrite(\"Order deny,allow\\nAllow from all\");\n $io->streamUnlock();\n $io->streamClose();\n }\n }",
"protected function getSession_Storage_FilesystemService()\n {\n return $this->services['session.storage.filesystem'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockFileSessionStorage((__DIR__.'/sessions'), 'MOCKSESSID', ${($_ = isset($this->services['session.storage.metadata_bag']) ? $this->services['session.storage.metadata_bag'] : $this->getSession_Storage_MetadataBagService()) && false ?: '_'});\n }",
"protected function getLiipImagine_Binary_Loader_Prototype_FilesystemService()\n {\n return $this->services['liip_imagine.binary.loader.prototype.filesystem'] = new \\Liip\\ImagineBundle\\Binary\\Loader\\FileSystemLoader($this->get('liip_imagine.mime_type_guesser'), $this->get('liip_imagine.extension_guesser'), '', '');\n }",
"public function __construct(Filesystem $filesystem){\n\t\t$this->filesystem = $filesystem;\n\t\t$this->createDirectoryForTemporaryFiles();\n\t\t$this->fpdi = new Fpdi();\n\t\t$this->tmpFiles = collect([]);\n\t\t$this->files = collect([]);\n\t}",
"public static function getFilesystem()\n {\n return self::$filesystem;\n }",
"public static function mount($path,$flags=0)\n{\ntry\n{\nif ($flags & \\PHK::IS_CREATOR)\n\t{\n\t$mnt='_tmp_mnt_'.(self::$tmp_mnt_num++);\n\tself::$proxy_tab[$mnt]=null;\n\tself::$phk_tab[$mnt]=new \\PHK\\Build\\Creator($mnt,$path,$flags);\n\t}\nelse\t// Mount an existing archive\n\t{\n\t$parentMnt=$mnt=$mtime=$options=$buildInfo=null;\n\tself::computeMnt($path,$parentMnt,$mnt,$mtime);\n\tif (self::isMounted($mnt)) return $mnt;\n\n\tself::$proxy_tab[$mnt]=null;\n\tself::$phk_tab[$mnt]=$phk=new \\PHK($parentMnt,$mnt,$path,$flags,$mtime);\n\n\tself::getStoreData($mnt,$options,$buildInfo);\n\t$phk->init($options,$buildInfo);\n\t}\n}\ncatch (\\Exception $e)\n\t{\n\tif (isset($mnt) && self::isMounted($mnt)) unset(self::$phk_tab[$mnt]);\n\tthrow new \\Exception($path.': Cannot mount - '.$e->getMessage());\n\t}\n\nreturn $mnt;\n}",
"public function createStorage();",
"public function getFilesystem()\n {\n return $this->filesystem;\n }",
"public function createFromRealDirectory($realPath);",
"public function __construct() {\n\t\t@mkdir($this->storage, 0777, true);\n\t}",
"public function createFileSystemMock(MutationInterface2 $mutation);",
"public function __construct(Filesystem $filesystem)\n\t{\n\t\t$this->filesystem = $filesystem;\n\t}",
"public function create($mode=0777, $flags=0)\n \t{\n \t\tif ($this->exists()) {\n \t\t\tif ($flags & Fs::PRESERVE) return;\n \t\t\tthrow new Fs_Exception(\"Unable to create directory '{$this->_path}': File already exists\");\n \t\t}\n \t\t\n \t\t$path = (string)$this->realpath();\n \t\tif (!@mkdir($path, $mode, $flags & Fs::RECURSIVE)) throw new Fs_Exception(\"Failed to create directory '$path'\", error_get_last());\n \t\t$this->clearStatCache();\n \t}",
"protected function fileObj() {\n\t\t$fileObj = new Varien_Io_File ();\n\t\treturn $fileObj;\n\t}",
"protected function initializeFs()\n {\n return CacheFs::initialize();\n }",
"public function getFileMounts() {}",
"public function __construct(Filesystem $filesystem)\n {\n $this->filesystem = $filesystem;\n }",
"public function __construct(Filesystem $filesystem)\n {\n $this->filesystem = $filesystem;\n }",
"public function setFileSystem(FilesystemInterface $fileSystem);",
"public function create()\n {\n if (! $this->adapter->fileExists($this->path, true)) {\n // ensure the parent directory exists\n new Directory(dirname($this->path), $this->adapter);\n\n if ($this->adapter->createFile($this->path) === false) {\n $this->throwUnableToCreate();\n }\n }\n\n return $this;\n }",
"function create_folder($name)\n{\n $location = Path::get_repository_path() . 'lib/content_object/';\n Filesystem::create_dir($location . $name);\n}",
"public static function gi() {\n if (self::$oInstance === null) {\n self::$oInstance = new MLFilesystem;\n }\n return self::$oInstance;\n }",
"protected function getFiles_FactoryService()\n {\n return $this->services['files.factory'] = new \\phpbb\\files\\factory($this);\n }",
"public function getFilesystem() {\n return $this->_filesystem;\n }",
"public function make($path, $type);",
"private function createTemporaryFileManager($mode = 'w+')\n {\n return new File($this->createTemporaryFile(), $mode);\n }",
"public function __construct(Filesystem $filesystem){\n $this->file = $filesystem;\n\n parent::__construct();\n }",
"private function makeRootFolder() : File\n {\n return new File([\n 'id' => 0,\n 'folder_id' => 0,\n 'path' => config('asgard.media.config.files-path'),\n ]);\n }",
"public function createFileService( $connectionString ) {\n $settings = StorageServiceSettings::createFromConnectionString(\n $connectionString\n );\n\n $httpClient = $this->httpClient();\n $serializer = $this->serializer();\n $uri = Utilities::tryAddUrlScheme(\n $settings->getFileEndpointUri()\n );\n\n $fileWrapper = new FileRestProxy( $httpClient, $uri, $settings->getName(), $serializer );\n\n // Adding headers filter\n $headers = array(\n Resources::USER_AGENT => Resources::SDK_USER_AGENT,\n );\n\n $headers[Resources::X_MS_VERSION] = Resources::FILE_API_LATEST_VERSION;\n\n $headersFilter = new HeadersFilter( $headers );\n $fileWrapper = $fileWrapper->withFilter( $headersFilter );\n\n // Adding date filter\n $dateFilter = new DateFilter();\n $fileWrapper = $fileWrapper->withFilter( $dateFilter );\n\n $authFilter = new AuthenticationFilter( $this->fileAuthenticationScheme(\n $settings->getName(),\n $settings->getKey()\n ) );\n\n $fileWrapper = $fileWrapper->withFilter( $authFilter );\n\n return $fileWrapper;\n }",
"protected function adapt(FilesystemBase $filesystem)\n\t{\n\t\treturn new FilesystemAdapter($filesystem);\n\t}",
"public function __construct(FilesystemContract $filesystem)\n {\n $this->filesystem = $filesystem;\n }",
"public function __construct(Filesystem $filesystem)\n {\n parent::__construct();\n $this->filesystem = $filesystem;\n }",
"public function test_set_filesystem_storage()\n {\n\n $payumBuilder = m::spy('Payum\\Core\\PayumBuilder');\n $config = [\n 'path' => 'foo.path',\n ];\n $app = m::spy('Illuminate\\Contracts\\Foundation\\Application');\n\n $filesystem = m::spy('Illuminate\\Filesystem\\Filesystem');\n\n /*\n |------------------------------------------------------------\n | Act\n |------------------------------------------------------------\n */\n\n $filesystem->shouldReceive('isDirectory')->andReturn(false);\n\n $payumBuilder\n ->shouldReceive('setTokenStorage')->andReturnSelf()\n ->shouldReceive('addStorage')->andReturnSelf();\n\n $manager = new PayumBuilderManager($payumBuilder, $config, $app);\n\n /*\n |------------------------------------------------------------\n | Assert\n |------------------------------------------------------------\n */\n\n $manager->setFilesystemStorage($filesystem);\n\n $filesystem->shouldHaveReceived('isDirectory')->with($config['path'])->once();\n $filesystem->shouldHaveReceived('makeDirectory')->with($config['path'], 0777, true)->once();\n $payumBuilder->shouldHaveReceived('setTokenStorage')->once();\n $payumBuilder->shouldHaveReceived('addStorage')->twice();\n }",
"public function storage(): FilesystemAdapter\n {\n return Storage::disk($this->getDiskName());\n }",
"protected function getFiles_FilespecService()\n {\n return new \\phpbb\\files\\filespec(${($_ = isset($this->services['filesystem']) ? $this->services['filesystem'] : ($this->services['filesystem'] = new \\phpbb\\filesystem\\filesystem())) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, ${($_ = isset($this->services['php_ini']) ? $this->services['php_ini'] : ($this->services['php_ini'] = new \\bantu\\IniGetWrapper\\IniGetWrapper())) && false ?: '_'}, ${($_ = isset($this->services['upload_imagesize']) ? $this->services['upload_imagesize'] : ($this->services['upload_imagesize'] = new \\FastImageSize\\FastImageSize())) && false ?: '_'}, './../', ${($_ = isset($this->services['mimetype.guesser']) ? $this->services['mimetype.guesser'] : $this->getMimetype_GuesserService()) && false ?: '_'}, ${($_ = isset($this->services['plupload']) ? $this->services['plupload'] : $this->getPluploadService()) && false ?: '_'});\n }",
"protected function createDirectory() {}",
"protected function buildFsTree()\n {\n mkdir($this->config_path, 0755, true);\n mkdir($this->compiledViewsPath(), 0755, true);\n }",
"public function runStructureFolder():Create {\n\n # Get path of structure\n $structurePath = File::path(Structure::DEFAULT_TEMPLATE);\n\n # Get data for render\n $data = self::_getData();\n\n # Run creation of docker structure\n Structure::create($structurePath, $data);\n\n # Return instance\n return $this;\n\n }",
"public function getName()\n {\n return 'filesystem';\n }",
"public function create($path);",
"private static function file()\n {\n $files = ['File', 'Filesystem'];\n $folder = static::$root.'Filesystem'.'/';\n\n self::call($files, $folder);\n\n $files = ['FileNotFoundException', 'DirectoryNotFoundException'];\n $folder = static::$root.'Filesystem/Exceptions'.'/';\n\n self::call($files, $folder);\n }",
"protected function get_filesystem() {\n\n\t\t// The WordPress filesystem.\n\t\tglobal $wp_filesystem;\n\n\t\tif ( empty( $wp_filesystem ) ) {\n\t\t\trequire_once wp_normalize_path( ABSPATH . '/wp-admin/includes/file.php' );\n\t\t\tWP_Filesystem();\n\t\t}\n\n\t\treturn $wp_filesystem;\n\t}",
"public function setFileSystem($fileSystem) {}",
"protected function get_filesystem() {\r\n\r\n\t\t// The Wordpress filesystem.\r\n\t\tglobal $wp_filesystem;\r\n\r\n\t\tif ( empty( $wp_filesystem ) ) {\r\n\t\t\trequire_once wp_normalize_path( ABSPATH . '/wp-admin/includes/file.php' );\r\n\t\t\tWP_Filesystem();\r\n\t\t}\r\n\r\n\t\treturn $wp_filesystem;\r\n\t}",
"public function getFilesystemPath()\n {\n return new FilesystemPath($this->__toString());\n }",
"public static function create($contents, $ext = '', $name = '', $interface = \"LocalFileInterface\"){\n\t\t$hash = md5(serialize(func_get_args()));\n\n\t\tif($file = self::hashExists($hash)){\n\t\t\treturn $file;\n\t\t}\n\t\t//the new file is unique;\n\n\t\t$file = new File();\n\t\t$file['hash'] = $hash;\n\t\t$file['ext'] = $ext;\n\t\t$file['name'] = $name;\n\t\t$file['created_at'] = new MongoDate();\n\t\t$file['size'] = strlen($contents) * 8;\n\t\t$file['interface'] = $interface;\n\t\t$file['interface_data'] = null;\n\t\t$file->save();\n\n\t\t$interface = new $interface($file);\n\t\t$file = $interface->create($contents);\n\t\t$file->save();\n\t\t\n\t\treturn $file;\n\n\t}",
"protected function instance($filename)\n {\n file_put_contents($filename, 'Hello world');\n\n $name = basename($filename);\n\n return new File($filename, $name, UPLOAD_ERR_OK);\n }",
"public function setUp()\n {\n parent::setUp();\n $this->dsn = 'Local://'.DIR_WORK;\n $this->options = array('permission'=>0666);\n $this->uri = 'tmp.txt';\n $this->storage = new \\mychaelstyle\\Storage($this->dsn);\n $this->object = $this->storage->createFile($this->uri,$this->options);\n }",
"public function createS3Filesystem($config)\n {\n $config = $this->parseEnv($config);\n\n $config['root'] = array_get($config, 'path');\n\n return $this->filesystem->createS3Driver($config);\n }",
"public function __construct()\n {\n parent::__construct();\n $this->files = new Filesystem();\n }",
"public function createContainer()\n\t{\n\t\tif ($cacheDir = $this->getCacheDirectory()) {\n\t\t\t$cache = new Cache(new Nette\\Caching\\Storages\\PhpFileStorage($cacheDir), 'Nette.Configurator');\n\t\t\t$cacheKey = array($this->parameters, $this->files);\n\t\t\t$cached = $cache->load($cacheKey);\n\t\t\tif (!$cached) {\n\t\t\t\t$code = $this->buildContainer($dependencies);\n\t\t\t\t$cache->save($cacheKey, $code, array(\n\t\t\t\t\tCache::FILES => $this->parameters['productionMode'] ? NULL : $dependencies,\n\t\t\t\t));\n\t\t\t\t$cached = $cache->load($cacheKey);\n\t\t\t}\n\t\t\tNette\\Utils\\LimitedScope::load($cached['file'], TRUE);\n\n\t\t} elseif ($this->files) {\n\t\t\tthrow new Nette\\InvalidStateException(\"Set path to temporary directory using setTempDirectory().\");\n\n\t\t} else {\n\t\t\tNette\\Utils\\LimitedScope::evaluate($this->buildContainer()); // back compatibility with Environment\n\t\t}\n\n\t\t$container = new $this->parameters['container']['class'];\n\t\t$container->initialize();\n\t\tNette\\Environment::setContext($container); // back compatibility\n\t\treturn $container;\n\t}",
"function __construct($filepath, $create = false, $chmod = 0777) {\n\t\t$this->path = $filepath;\n\n\t\tif ($this->exists() == false && $create == true) {\n\t\t\t$this->create($chmod);\n\t\t}\n\n\t\tif ($this->exists()) {\n\t\t\t$this->open();\n\t\t}\n\t}",
"public function __construct($fullPath, $openMode = self::MODE_READ)\n {\n\n if (!file_exists($fullPath)) {\n (new Filesystem())->mkdir(dirname($fullPath));\n }\n\n parent::__construct($fullPath, $openMode);\n }",
"protected function createStream(): StreamInterface\n {\n return Utils::streamFor(Utils::tryFopen($this->filename, $this->mode));\n }",
"public function filesystem() {\n return $this->fileSystem;\n }",
"public function updateFilesystem()\n {\n }",
"public function __construct()\n {\n $this->files = new Filesystem();\n parent::__construct();\n }",
"public function create() {\n\t\t$implementationClassName = 'Imagine\\\\' . $this->settings['driver'] . '\\Imagine';\n\t\treturn new $implementationClassName();\n\t}",
"public function create($path)\n {\n return $this->fs->cloud()->createDir($path);\n }",
"function filesystem(string $path){\n return $_SERVER['DOCUMENT_ROOT'].'/'.$path;\n}",
"function createFileFuncObj()\t{\n\t\tif (!$this->fileFunc)\t{\n\t\t\t$this->fileFunc = t3lib_div::makeInstance('t3lib_basicFileFunctions');\n\t\t}\n\t}",
"public function createFileSet() {\n $this->fileset = new TarFileSet();\n $this->filesets[] = $this->fileset;\n return $this->fileset;\n }",
"private function addSyncFsNode()\n {\n $config = new SyncFSConfiguration();\n $builder = new TreeBuilder();\n $node = $builder->root('fs');\n\n return $config->getConfigNode($node);\n }",
"public function getAdapter(): Filesystem\n {\n return $this->adapter;\n }",
"function create($path, $name, $next);",
"private function getFileHandler() {\n $mode = $this->replace ? \"w+\" : \"a+\";\n return fopen($this->pathFilename(), $mode);\n }",
"protected function getFileLocatorService()\n {\n return $this->services['file_locator'] = new \\phpbb\\routing\\file_locator(${($_ = isset($this->services['filesystem']) ? $this->services['filesystem'] : ($this->services['filesystem'] = new \\phpbb\\filesystem\\filesystem())) && false ?: '_'}, './../');\n }",
"public static function create(string $source): File {\n $file = new File();\n $file->init($source);\n return $file;\n }",
"private function getFileCache()\n {\n $shopIdCalculatorMock = $this->getMock(ShopIdCalculator::class, array('getShopId'), array(), '', false);\n $shopIdCalculatorMock->method('getShopId')->willReturn(1);\n\n return oxNew(SubShopSpecificFileCache::class, $shopIdCalculatorMock);\n }",
"protected function createFileDriver(array $config)\n\t{\n\t\t$path = $config['path'];\n\n\t\treturn $this->repository(new FileStore($this->royalcms['files'], $path));\n\t}",
"public function makeFolder()\n\t{\n\t\t$dir = new Folder($this->fileDir);\n\t\tif($dir->pwd() == null){\n\t\t\treturn new Folder($this->fileDir,true,0755);\n\t\t}\n\t}",
"public function mount()\n {\n\n }",
"public function getFilesystem()\n {\n return $this->files;\n }"
] | [
"0.72791356",
"0.70920235",
"0.67926335",
"0.6628072",
"0.66063297",
"0.6478215",
"0.64568096",
"0.6434806",
"0.6368421",
"0.63450944",
"0.6334146",
"0.6295976",
"0.62945616",
"0.6215496",
"0.6212335",
"0.61978155",
"0.6165078",
"0.6120218",
"0.6057397",
"0.5900967",
"0.5885029",
"0.58678603",
"0.58678603",
"0.5833623",
"0.58212703",
"0.58117396",
"0.5799841",
"0.57762057",
"0.57652175",
"0.57609993",
"0.57355726",
"0.5710963",
"0.56946194",
"0.5676185",
"0.5626631",
"0.5614256",
"0.5590234",
"0.5571636",
"0.5565323",
"0.5560265",
"0.55512965",
"0.5547557",
"0.5546627",
"0.5521587",
"0.552009",
"0.552009",
"0.55162746",
"0.55062354",
"0.54689",
"0.5456139",
"0.5455841",
"0.54410326",
"0.54371995",
"0.54245114",
"0.5420063",
"0.5414986",
"0.5413244",
"0.54084384",
"0.5405601",
"0.54024833",
"0.5394117",
"0.53840667",
"0.5376103",
"0.536091",
"0.53392893",
"0.5336291",
"0.5323266",
"0.5322981",
"0.5319801",
"0.53170925",
"0.5309062",
"0.53008455",
"0.5295587",
"0.5279062",
"0.52664196",
"0.525515",
"0.5253395",
"0.5248389",
"0.5246674",
"0.523526",
"0.5232236",
"0.52273196",
"0.52272594",
"0.522642",
"0.5224844",
"0.5220909",
"0.5195956",
"0.5172115",
"0.51682657",
"0.51679796",
"0.51639396",
"0.51628",
"0.5147204",
"0.51177645",
"0.5106947",
"0.51048166",
"0.5093981",
"0.5091467",
"0.50890744",
"0.5086433",
"0.50811577"
] | 0.0 | -1 |
Open a file and return the contents | public function get($file)
{
if (!$this->exists($this->path($file)))
{
throw new FileNotFoundException("File not found at $file");
}
return file_get_contents($this->path($file));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getFileContents() {\n $path = $this->getFilePath();\n return file_get_contents($path);\n }",
"public function getContents($file);",
"function fileGetContents($filename);",
"public function getFileContents($file)\n\t{\n\t\treturn file_get_contents($file);\n\t}",
"function get_file_contents($filename) {\r\n if (!function_exists('file_get_contents')) {\r\n $fhandle = fopen($filename, 'r');\r\n $fcontents = fread($fhandle, filesize($filename));\r\n fclose($fhandle);\r\n } else {\r\n $fcontents = file_get_contents($filename);\r\n }\r\n\r\n return $fcontents;\r\n }",
"public function readFile($file){\n\t\tif (isset($file) && file_exists($file)) return file_get_contents($file);\n\t\telse return '';\n\t}",
"public function contents() {\n\t\treturn file_get_contents($this->path);\n\t}",
"public function getFileContents()\r\n {\r\n $this->fileContents = $this->fileContents ?? file_get_contents($this->file);\r\n\r\n return $this->fileContents;\r\n }",
"public function read()\n\t{\n\t\treturn file_get_contents($this->getPath());\n\t}",
"public function contents($path)\n {\n if ($this->check($path)) return File::contents($path);\n }",
"public function read($file);",
"function file_get_contents($filename=false)\n\t{\n\t\tif (!is_file($filename) || !is_readable($filename)) {\n\t\t\treturn false;\n\t\t}\n\t\t$handle = fopen($filename, \"r\");\n\t\t$contents = fread($handle, filesize($filename));\n\t\tfclose($handle);\n\t\treturn $contents;\n\t}",
"function openFile($filename) \n{\n $handle = fopen($filename, 'r');\n $contents = fread($handle, filesize($filename));\n $contentsArray = explode(\"\\n\", trim($contents));\n fclose($handle);\n return $contentsArray;\n}",
"function local_file_get_contents($file) {\r\n\t\treturn file_get_contents($file);\r\n\t}",
"function Get_File_Contents($Filename) {\n //return 'hello';\n $File_Handle = fopen($Filename, \"r\");\n $File_Contents = fread($File_Handle, filesize($Filename));\n fclose($File_Handle);\n return $File_Contents;\n }",
"function Get_File_Contents($fileName)\n{\n //return 'hello';\n $fileHandle = fopen($fileName, \"r\");\n $fileContents = fread($fileHandle, filesize($fileName));\n fclose($fileHandle);\n return $fileContents;\n}",
"abstract public function getContent($file);",
"public function readFile($file) {\n\t\treturn $this->read(file_get_contents($file));\n\t}",
"public function read($path) {\n return file_get_contents($path);\n }",
"function my_file_get_contents($filename, $use_include_path = 0) {\n\n $data = \"\";\n $file = @fopen($filename, \"rb\", $use_include_path);\n if ($file) {\n while (!feof($file)) {\n $data .= fread($file, 1024);\n }\n fclose($file);\n }\n return $data;\n}",
"private static function getFileContent($filename)\n\t{\n\t\treturn file_get_contents($filename);\n\t}",
"public function get($file)\n {\n $path = $this->getPath($file);\n\n if ( ! file_exists($path)) throw new FileDoesNotExist;\n\n return file_get_contents($path);\n }",
"function fatchfilecontent($file_path = NULL)\n {\n $handle = fopen($file_path, \"r\");\n $contents = '';\n while (!feof($handle)) {\n $contents .= fread($handle, 8192);\n }\n fclose($handle);\n return $contents;\n }",
"function GetFile($filename){\n $filename = 'brown' . DIRECTORY_SEPARATOR . $filename;\n $handle = fopen($filename, 'r');\n $contents = fread($handle, filesize($filename));\n fclose($handle);\n return $contents;\n}",
"protected function getFileContent($filename)\n {\n return file_get_contents($filename);\n }",
"public function getContents($path)\n {\n return file_get_contents($path);\n }",
"public static function get($_path)\r\n {\r\n if($this->isFile($_path))\r\n {\r\n return file_get_contents($_path);\r\n }\r\n }",
"function reading_file($file_txt) {\n\t$data_txt = $file_txt;\n\t$fh = fopen($data_txt, \"r\");\n\t$file = file_get_contents($data_txt);\n\treturn $file;\n}",
"public function getContent()\n {\n return file_get_contents($this->fullPath);\n }",
"function _getFileContents( $file )\r\n {\r\r\n if (function_exists('file_get_contents')) {\r\n $content = @file_get_contents( $file );\r\n } else {\r\n $content = implode('', file($file));\r\n }\r\n\r\n /**\r\n * store the file name\r\n */\r\n array_push($this->_files, $file);\r\n\r\n return $content;\r\n }",
"public function getContent() {\n\t\treturn $this->storage->file_get_contents($this->path);\n\t}",
"public function read($path)\n {\n return file_get_contents($path);\n }",
"function readfile($file) {\n clearstatcache(TRUE, $file);\n if(function_exists(\"file_get_contents\")&&file_exists($file)) {\n return file_get_contents($file);\n } else {\n $string = \"\";\n\n $file_handle = @fopen($file, \"r\");\n if(!$file_handle) {\n return false;\n }\n while (!feof($file_handle)) {\n $line = fgets($file_handle);\n $string .= $line;\n }\n fclose($file_handle);\n\n return $string;\n }\n }",
"function getFileContents($pathToFile) {\n\t$file = $pathToFile;\n\t$handle = fopen($file, \"r\");\n\t$pageContents = fread($handle, filesize($file));\n\tfclose($handle);\n\treturn $pageContents;\n}",
"public function get()\n {\n if(is_null($this->contents) && $this->exists())\n $this->contents = file_get_contents($this->getPath());\n\n return $this->contents;\n }",
"function file_get_contents($file) {\n\t\treturn join('', file($file));\n\t}",
"public function getFileContent()\n {\n return $this->extractFileAsText();\n }",
"protected function getFileContent($fileName)\n {\n return file_get_contents($fileName);\n }",
"function readFile( $file, $binary = false )\n\t{\n\t\t$content = '';\n\t\tif ( file_exists( $file ) )\n\t\t{\n\t\t\t$handle = @fopen( $file, 'rb' ); \n\t\t\tif ( is_resource( $handle ) ) \n\t\t\t{\n\t\t\t\twhile ( false !== ( $c = fgetc( $handle ) ) )\n\t\t\t\t{\n\t\t\t\t\t$content .= $c;\n\t\t\t\t}\n\t\t\t\tfclose( $handle ); \n\t\t\t}\n\t\t}\n\t\treturn $content;\n }",
"public function readFile() {\n $content = $this->getFileContents();\n return json_decode($content, 1);\n }",
"public function read(string $file): string;",
"public function getContents(){\n return file_get_contents($this->source);\n }",
"public function getContent()\n\t{\n\t\tinclude_once(ISC_BASE_PATH.'/lib/class.file.php');\n\t\t$fc = new FileClass();\n\t\t$filePath = $this->filePath;\n\t\t$content = $fc->readFromFile($filePath);\n\t\tif ($content === false) {\n\t\t\t// Init new file with default content.\n\t\t\t$content = $this->defaultContent;\n\t\t\t$res = $fc->writeToFile($content, $filePath);\n\t\t}\n\n\t\treturn $content;\n\t}",
"public function getContents(): string\n {\n return (string) file_get_contents($this->getAbsolutePath());\n }",
"public static function read($file)\n\t{\n\t\t$info = self::getInfo($file);\n\t\tif (!$info->exists)\n\t\t{\n\t\t\tthrow new \\Exception('File does not exist');\n\t\t}\n\t\tif (!$info->size)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\t$handle = fopen($file,'r');\n\t\t$output = fread($handle,filesize($file));\n\t\tfclose($handle);\n\t\treturn $output;\n\t}",
"public function readFile($path);",
"public function read_file() {\t\t\r\n\t\t$file = $this->filepath;\r\n\t\t\r\n\t\tif(file_exists($file)) {\r\n\t\t\t$this->_content = file_get_contents($file);\t\r\n\t\t} \r\n\t}",
"public function getFileContents()\n {\n return $this->get('FileContents');\n }",
"public function getFileContents()\n {\n return $this->get('FileContents');\n }",
"public function get_contents($file)\n {\n }",
"public function get_contents($file)\n {\n }",
"public function get_contents($file)\n {\n }",
"public function get_contents($file)\n {\n }",
"public function get_contents($file)\n {\n }",
"public function get_content($file_name)\n\t{\n\t\tif ( $this->check_path($file_name) && defined('BBN_DATA_PATH') && is_file(BBN_DATA_PATH.$file_name) ){\n return file_get_contents(BBN_DATA_PATH.$file_name);\n }\n\t\treturn false;\n\t}",
"public function getContent()\n\t\t\t{\n\t\t\t\tif($this->exist)\n\t\t\t\t\treturn file_get_contents($this->path);\n\t\t\t\telse\n\t\t\t\t\treturn '';\n\t\t\t}",
"public function readFile($file = null)\n\t{\n\t\t$path = $this->_root . DIRECTORY_SEPARATOR . $file;\n\t\tif (is_file($path))\n\t\t{\n\t\t\treturn file_get_contents($path);\n\t\t}\n\t\treturn false;\n\t}",
"public function get($fileName)\n\t{\n\t\treturn file_get_contents($fileName);\n\t}",
"public function getContents(string $sFileName):string\n\t{\n\t if (stream_is_local($sFileName) && !is_file($sFileName)) {\n \t throw new FileNotFoundException(sprintf('Failed to open \"%s\" because file does not exist.', $sFileName), 0, null, $sFileName);\n\t\t}\n\t\treturn file_get_contents($sFileName);\n\t}",
"public static function getContent($filename)\n\t{\n\t\treturn @file_get_contents((string) $filename);\n\t}",
"function uber_file_get_contents($filepath) {\r\n\r\n // try file_open_contents() first\r\n $r = @file_get_contents($filepath);\r\n if ($r !== FALSE) { return $r; }\r\n\r\n // if no open basedir restrictions, return value from file_get_contents\r\n $is_open_basedir_restrictions = ini_get('open_basedir') && !@file_exists(\"/\"); // if root doesn't exist then open_basedir in effect. In future we can check if target filepath matches open_basedir\r\n if (!$is_open_basedir_restrictions) { return $r; }\r\n\r\n if (!function_exists(\"shell_exec\")) { return false; }\r\n\r\n // otherwise, try windows shell commands\r\n if (isWindows()) {\r\n $filepath = str_replace(\"/\", \"\\\\\", $filepath); // use windows slashes\r\n $command = escapeshellcmd(\"type $filepath\");\r\n $response = shell_exec(\"$command\"); // for debugging add: 2>&1\r\n return $response;\r\n }\r\n\r\n // else, try linux commands\r\n $command = escapeshellcmd(\"cat $filepath\");\r\n $response = shell_exec(\"$command\"); // for debugging add: 2>&1\r\n return $response;\r\n}",
"function forReadFile($templet) {\n//$handle = fopen(\"http://www.example.com/\", \"rb\");\n$handle = fopen($templet, \"rb\");\n$contents = stream_get_contents($handle);\nfclose($handle);\n//echo $contents;\nreturn $contents ;\n\n}",
"function read() {\n\t\tif ($this->f && filesize($this->path) > 0) {\n\t\t\treturn fread($this->f, filesize($this->path));\n\t\t}\n\t\treturn '';\n\t}",
"public function get_file_content($file)\n {\n return is_bool($file) ? FALSE : file_get_contents($file);\n }",
"public function readFile($file) {\n\t\tif (!file_exists($file)) {\n\t\t\tthrow new Exception('File '.$file.' does not exist from '.\n\t\t\t\t$this->className.'->'.__FUNCTION__.'() line '.__LINE__\n\t\t\t);\n\t\t} else {\n\t\t\ttry {\n\t\t\t\t$handle \t= fopen($file, 'r');\n\t\t\t\t$string \t= NULL;\n\t\t\t\t\n\t\t\t\twhile (!feof($handle)) {\n\t\t\t\t\t$string .= fgets($handle, 1024);\n\t\t\t\t} //<-- end while -->\n\t\t\t\t\n\t\t\t\tfclose($handle);\n\t\t\t\treturn $string;\n\t\t\t} catch (Exception $e) { \n\t\t\t\tthrow new Exception($e->getMessage().' from '.$this->className\n\t\t\t\t\t.'->'.__FUNCTION__.'() line '.__LINE__\n\t\t\t\t);\n\t\t\t} //<-- end try -->\n\t\t} //<-- end if -->\n\t}",
"function read_file($file) {\n\t$handle = fopen($file, \"r\");\n\t\t$contents = fread($handle, filesize($file));\n\tfclose($handle);\n\treturn explode(\"\\n\", $contents);\n}",
"private function readFile($path)\n\t{\n\t\tif (!file_exists($path)) {\n\t\t\tthrow new \\Exception('Unable to read file: ' . $path);\n\t\t}\n\t\treturn file_get_contents($path);\n\t}",
"public static function getFileContent($filename)\r\n\t{\r\n\t\t$buffer = '';\r\n\t\tif( $fd = @fopen($filename, 'r') )\r\n\t\t{\r\n\t\t\twhile(! @feof ($fd))\r\n\t\t\t\t$buffer .= @fgets($fd, 4096); \r\n\t\t\t@fclose($fd);\r\n\t\t}\r\n\t\telse\r\n\t\t\tself::reportRunningWarning(\"Common::getFileContent() Unable to read the file '$filename' !\");\r\n\t\treturn $buffer;\r\n\t}",
"protected function getContents()\n {\n return $this->engine->get($this->path, $this->gatherData());\n }",
"public static function readFile($path) {\n if (is_file($path)) {\n return file_get_contents($path);\n } else {\n throw new Visio\\Exception\\FileNotFound('File \\'' . $path . '\\' not found!');\n }\n }",
"public static function contents($path)\n {\n if (self::exists($path)) return trim(file_get_contents($path));\n\n throw new FileDoesNotExistException(sprintf('%s is not a valid file', $path));\n }",
"public function getFileContent($filePath): string\n {\n return file_get_contents($this->rootDir . '/' . $filePath);\n }",
"function openFile($filename = FILENAME){\n\n\t //open list of things to do//\n\t $handle = fopen($filename , 'r');\n\t //read in entire file and remove any blank lines//\n\t $content = trim(fread($handle , filesize($filename)));\n\t //always close the file//\n\t fclose($handle);\n\t //split the contents of file into an array//\n\t $list = explode(\"\\n\", $content);\n\n\t // Returns a list of items in an array, from the filename specified.\n\t return $list;\n\n\t}",
"public function get_content() {\n // Check if no content is yet loaded\n if (empty($this->content)) {\n $this->content = @file_get_contents($this->name);\n }\n\n return $this->content;\n }",
"public static function read($filename)\n\t{\n\t\t$contents='';\n\t\tclearstatcache();\n\t\tif(file_exists($filename))\n\t\t{\n\t\t\t$fsize=filesize($filename);\n\t\t\tif($fsize>0)\n\t\t\t{\n\t\t\t\t$fp=fopen($filename,'r');\n\t\t\t\t$contents=fread($fp,$fsize);\n\t\t\t\tfclose($fp);\n\t\t\t}\n\t\t}\n\t\tif(version_compare(PHP_VERSION,'5.4.0','<'))\n\t\t\tif(get_magic_quotes_runtime())\n\t\t\t\t$contents=stripslashes($contents);\n\t\treturn $contents;\n\t}",
"public static function getContent ($path) {\n\t\treturn \\file_get_contents($path);\n\t}",
"public function get(): string\n {\n if ( ! $this->isReadable() ) {\n throw new FileSystemException(\n 'File access denied'\n );\n }\n\n return file_get_contents($this->directory->getPath().'/'.$this->filename);\n }",
"function get_content($file) {\n include($file);\n return array($q, $a);\n }",
"protected function openFile() {}",
"public function readFilePath () {\n if ($this->pathExists->toBoolean () == TRUE) {\n # Return the number of read chars, and output the content;\n return new I (readfile ($this->varContainer));\n }\n }",
"public function read($path);",
"public function read($fileName)\n {\n $data=$this->fileAction('r',$fileName);\n return $data;\n }",
"public function get($filepath);",
"public function fetch( $file ) {\n extract( $this->vars ); // Extract the vars to local namespace\n ob_start(); // Start output buffering\n include( $file ); // Include the file\n $contents = ob_get_contents(); // Get the contents of the buffer\n ob_end_clean(); // End buffering and discard\n return $contents; // Return the contents\n }",
"public function openText() {\r\n return new StreamReader($this->fullName());\r\n }",
"public function read($file) {\n\t}",
"public static function read_content($id)\n {\n $meta = self::meta($id);\n self::file_exists($meta, true);\n return file_get_contents($meta['file']);\n }",
"protected function getContents()\n {\n $filepath = $this->getFilepath();\n\n // Cancel if the file doesn't exist\n if (!$this->files->has($filepath)) {\n return [];\n }\n\n // Get and parse file\n if ($this->contents === null) {\n $this->contents = $this->files->read($filepath);\n $this->contents = json_decode($this->contents, true);\n }\n\n return $this->contents;\n }",
"public static function getFileContents($filePath) {\n $fh = @fopen($filePath, 'r');\n if(!$fh) {\n return null;\n }\n $data = fread($fh, filesize($filePath));\n fclose($fh);\n if (get_magic_quotes_runtime()) {\n $data = stripslashes($data);\n }\n return $data;\n }",
"public function read(): string\n {\n if ($this->exists()) {\n return file_get_contents($this->path) ?: '';\n }\n\n return '';\n }",
"private function getContents()\n {\n if ($this->contents) {\n return $this->contents;\n }\n\n return $this->contents = $this->directory->getContents();\n }",
"public function open()\n {\n $loaded = @file_get_contents($this->getFilepath());\n\n $this->_contents = $loaded ? : '';\n\n return $this;\n }",
"public static function getFile() {}",
"public static function readFile($path) {\n $path = self::resolvePath($path);\n $data = @file_get_contents($path);\n if ($data === false) {\n throw new Exception(pht(\"Failed to read file '%s'.\", $path));\n }\n\n return $data;\n }",
"function read_file ($file)\r\r\n// file einlesen\r\r\n{\r\r\n\tif (file_exists($file) && is_file($file)){\r\r\n\t\t$handle = fopen($file,\"r\");\r\r\n\t\tif (filesize($file) > 0){\r\r\n\t\t\t$object = fread($handle,filesize($file));\r\r\n\t\t}\r\r\n\t\telse {$object = \"file is empty\";}\r\r\n\t}\r\r\n\telse {$object = \"file not found\";}\r\r\n\treturn $object;\r\r\n}",
"public function openFile()\n {\n // check directory $file_path and create the directory if it doesn't exist\n if (!file_exists($this->file_path)) {\n if (!mkdir($this->file_path, 0777, true)) {\n throw new Exception('Failed to create directory.');\n }\n }\n\n // open $file_name and create the file if it doesn't exist\n $file = new SplFileObject($this->file_path.$this->file_name, 'a+');\n\n return $file;\n }",
"final function getFile();",
"public function getFileContent(string $filePath): string\n {\n return $this->apiAdapter->call($filePath);\n }",
"public function getFileContents($filename)\n\t{\n\t\t$command = sprintf('show --raw %s:%s', $this->hash, $filename);\n\t\treturn $this->repository->run($command);\n\t}",
"public function getFile();"
] | [
"0.79625887",
"0.78986555",
"0.7595353",
"0.7501221",
"0.74787325",
"0.7386877",
"0.7269128",
"0.7239975",
"0.7192103",
"0.71920425",
"0.7181598",
"0.714959",
"0.713588",
"0.7122956",
"0.71011025",
"0.710067",
"0.7040828",
"0.7002866",
"0.69977957",
"0.6992191",
"0.6983698",
"0.6951601",
"0.6930784",
"0.6924644",
"0.6899722",
"0.68989086",
"0.6898069",
"0.68795",
"0.6865065",
"0.6858186",
"0.68562317",
"0.6850988",
"0.6821304",
"0.6814095",
"0.680989",
"0.68050677",
"0.67893815",
"0.6781756",
"0.67763025",
"0.67569023",
"0.67514616",
"0.6746713",
"0.6743773",
"0.67421705",
"0.6736865",
"0.6734569",
"0.67136836",
"0.6702236",
"0.6702236",
"0.66985446",
"0.66974574",
"0.66974574",
"0.66968447",
"0.66968447",
"0.6691928",
"0.6681292",
"0.6675038",
"0.66638064",
"0.6654154",
"0.6645923",
"0.66326267",
"0.6622503",
"0.6622371",
"0.65924066",
"0.6582729",
"0.65404356",
"0.65364164",
"0.6514357",
"0.6494098",
"0.6479721",
"0.6475114",
"0.6462708",
"0.6453764",
"0.645121",
"0.6443994",
"0.6434716",
"0.64341605",
"0.64329344",
"0.6432231",
"0.643156",
"0.6430224",
"0.64201915",
"0.6414387",
"0.6410729",
"0.64043736",
"0.63909346",
"0.63775593",
"0.6370031",
"0.636224",
"0.63613564",
"0.6352283",
"0.6350608",
"0.63419574",
"0.63378423",
"0.6319056",
"0.6316929",
"0.6315527",
"0.63142264",
"0.631326",
"0.6310711"
] | 0.6977324 | 21 |
Create this file for us and set content | public function put($filename, $content)
{
$directory = $this->directory($filename);
if (!$this->exists($directory))
{
$this->mkdir($directory);
}
return file_put_contents($this->path($filename), $content);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function createFile() {}",
"abstract public function setContentFromFile($file);",
"protected function _writeFileBody() {}",
"public function write_file ( $content ) {\r\n\r\n\t}",
"private function setContent()\n {\n $this->setTag();\n $this->openRoot();\n $this->setParam(ModulesInterface::KEY_NAME, ApiInterface::RAML_TYPE_STRING, ucfirst($this->generator->version));\n $this->setParam(ConfigInterface::ATTRIBUTES_CASE, ApiInterface::RAML_TYPE_STRING, ConfigInterface::DEFAULT_CASE);\n $this->setQueryParams();\n $this->setTrees();\n $this->setJwtContent();\n $this->setConfigEntities();\n $this->closeRoot();\n }",
"public function setDataFileFromContentRaw($contentRaw)\n {\n $tempFilePath = parent::createTempFile();\n file_put_contents($tempFilePath, $contentRaw);\n $this->dataFilePath = $tempFilePath;\n }",
"public function crear(){\n\t\t$this->archivo = fopen($this->nombre , \"w+\");\n\t}",
"public function setContent($content){\n //asign the content\n $this->contentObject = $content;\n\n //save to disk as serialized\n $json = json_encode($this->contentObject);\n if($this->exists()){\n file_put_contents($this->getPath(), $json);\n }\n\t}",
"function StoreToCache($content)\n {\n File::CreateWithText($this->file, $content);\n }",
"private function auto_create(){\n\n if ( $this->firebug ) \\FB::info(get_called_class().\": auto creating file\");\n\n $root = $this->use_codeza_root ? (string)new Code_Alchemy_Root_Path() : '';\n\n $filename = $root . $this->template_file;\n\n if ( file_exists($filename) && ! file_exists($this->file_path)) {\n\n $copier = new Smart_File_Copier($filename,$this->file_path,$this->string_replacements,false);\n\n $copier->copy();\n\n }\n\n\n\n }",
"protected function setContent() {}",
"public function createNewContent()\n {\n $files = array_diff(scandir($this->config->pathToEntries), ['.', '..']);\n foreach ($files as $file) {\n $this->parseDailyEntry($file);\n }\n\n foreach ($this->entries as $month => $monthlyEntries) {\n $this->writeParsedEntriesPerMonth($month, $monthlyEntries);\n }\n }",
"public function save(){\n return parent::writeFile( $this->outputFile, $this->template);\n }",
"public function generate() {\n if (!$this->filePath) {\n throw new Exception('Trying to save file without path');\n }\n \n $tempDir = codemonkey_pathTempDir;\n \n $content = $this->generateCode();\n \n $this->checkIfTempFolderExists();\n $this->checkIfFoldersExist();\n \n try {\n $fp = fopen($tempDir.$this->filePath, 'w');\n fputs($fp, $content);\n fclose($fp);\n chmod($tempDir.$this->filePath, 0775);\n } catch (Exception $e) {\n echo \"Could not generate file \".$this->filePath.\"<br />\\n\"\n . $e->getMessage().\"<br />\\n\";\n }\n }",
"public function prepareFile()\n {\n // TODO: Implement prepareFile() method.\n }",
"function create_file($file_path, $content=''){\r\n die( __FILE__ . ' : ' . __LINE__ );\r\n }",
"public function createPackageFile()\n\t{\n\t\t$packageFilePath = __DIR__ . \"/templates/packagefile.txt\";\n\n\t\t// If file exists, copy content into new file called package.json in project root.\n\t\tif($this->filesystem->exists($packageFilePath))\n\t\t{\n\t\t\t$this->filesystem->put('package.json', $this->filesystem->get($packageFilePath));\n\t\t}\n\t}",
"function add_to_file_contents($content) {\n\t\t$this->contents .= $content;\n\t}",
"protected function writeProjectFile()\r\n\t{\r\n\t\t//override to implement the parsing and file creation.\r\n\t\t//to add a new file, use: $this->addFile('path to new file', 'file contents');\r\n\t\t//echo \"Create Project File.\\r\\n\";\r\n\t}",
"private function setContentsFromFile()\n {\n $this->file->typeChecker()->assertMarkdown();\n $this->contents = $this->file->contents();\n }",
"function readFile(){\n $this->setHeaders();\n $this->readContent();\n\n }",
"public function file_put_contents($file, $content);",
"public function save()\n {\n if ($this->createDirectoryStructure($this->getPath())) {\n $content = $this->generateContents();\n file_put_contents($this->getPathname(), $content);\n }\n }",
"public function create($data) {\n\t\t// Create an ID\n\t\t$id = $this->idCreate();\n\t\t// Write the data file\n\t\tfile_put_contents( $this->init['path']['data'] . $id . $this->init['data']['ext'] );\n\t}",
"function save()\r\n {\r\n // read the template\r\n\t $str = dirname(__FILE__); \r\n $content = file_get_contents(dirname(__FILE__).'/partinfo.php'); \r\n if (!$content){\r\n return \"fail read template\";\r\n } \t\r\n \r\n\t $tags = array(\"#TITLE#\", \r\n\t \t\"#BRAND#\", \r\n\t \t\"#MODULE#\", \r\n\t \t\"#ENGINE#\", \r\n \"#TYPE#\", \r\n \"#NAME#\", \r\n \"ADDRESS\", \r\n \"#DATE#\", \r\n \"#PRICE#\", \r\n \"DESCRIPTION\");\r\n\t \r\n $fields[0] = $this->title;\r\n $fields[1] = $this->brand;\r\n $fields[2] = $this->series;\r\n $fields[3] = $this->module;\r\n $fields[4] = \"配件\";\r\n $fields[5] = $this->module;\r\n $fields[6] = \"广州\";\r\n $fields[7] = $this->date;\r\n $fields[8] = $this->price;\r\n $fields[9] = $this->description;\r\n \r\n $content = str_replace($tags,$fields,$content); \r\n \r\n $date = date(\"Ymd-Hms\");\r\n $filename = sprintf(\"publish/%d-%d-%s.php\", $this->id, $this->uid, $date);\r\n $fp = fopen($filename, \"w\");\r\n if (!$fp) {\r\n return \"fail create file\";\r\n }\r\n \r\n if (fwrite($fp, $content) == FALSE) { \t \r\n fclose($fp);\r\n return \"fail wirte content\";\r\n }\r\n \r\n fclose($fp);\r\n return $filename;\r\n }",
"public function add(){\n\t\t\n\t\t// Open or create file\n\t\t$f = fopen($this->file, 'wb');\n\t\tfclose($f);\n\t}",
"private function export() {\r\n $this->app->setTemplateData(array(\"content\" => $this->content, \"content-title\" => \"Oudermisbehandeling\", \"content-sub-title\" => $this->title, \"title\" => \"Ecareplan ~ Oudermisbehandeling - \" . $this->title, \"headscript\" => $this->script));\r\n }",
"protected function initStorageFile()\n {\n $storageFilePath = $this->getStoragePath();\n if(!file_exists($storageFilePath)) {\n touch($storageFilePath);\n fwrite(fopen($storageFilePath, \"w\"), static::HEADER . \"\\n\");\n }\n }",
"abstract function setContent();",
"protected function setUp()\n {\n $this->filename = tempnam(sys_get_temp_dir(), 'Prospect');\n file_put_contents($this->filename, \"This is a test file\");\n $this->object = new File('picture',$this->filename,'text/plain');\n }",
"public function generate() {\n $this->event->getIO()->write(\"<info>Generate settings file:</info>\");\n\n $parameters = $this->getParameters();\n if ($parameters) {\n $new_settings = $this->twigEnvironment->render($this->getTemplateFilename(), $this->getReplacements($parameters));\n $target_settings_file = $this->getDestinationPath() . '/' . $this->getDestinationFile();\n\n // Ensure folder and existing file is writable.\n chmod($this->getDestinationPath(), 0755);\n if (file_exists($target_settings_file)) {\n chmod($target_settings_file, 0644);\n }\n\n file_put_contents($target_settings_file, $new_settings);\n }\n else {\n $this->event->getIO()->write(\"<error>Unable to find any parameters files</error>\");\n }\n }",
"public function create()\n {\n $this->setContent();\n // create config file\n $file = $this->generator->formatConfigPath() .\n ModulesInterface::CONFIG_FILENAME . PhpInterface::PHP_EXT;\n $isCreated = FileManager::createFile($file, $this->sourceCode, true);\n if ($isCreated) {\n Console::out($file . PhpInterface::SPACE . Console::CREATED, Console::COLOR_GREEN);\n }\n }",
"public function set_up()\n {\n $this->filePointer = fopen($this->filePointer, 'r');\n $this->xml = new XMLWriter();\n }",
"function setBufferFile()\r\n\t {\r\n\t \t//$this->_bufferFile = '/tmp/fabrik_package-' . $this->label . '.xml';\r\n\t\t$this->_bufferFile = JPATH_SITE . \"/administrator/components/com_fabrik/fabrik_package-\". $this->label . '.xml';\r\n\t }",
"function set($name,$content=''){\n $name = md5($name);\n $file = $this->_tmp_path.$this->_type.$name.'.cache';\n $u = umask(0);\n $fh = fopen($file, 'w') or die(\"impossível obter a cache $name. Permissões não definidas\");\n @fwrite($fh, serialize($content));\n fclose($fh);\n umask($u);\n }",
"public function save()\n {\n if (file_exists($this->_filePath)) {\n $existingFile = file_get_contents($this->_filePath, FILE_USE_INCLUDE_PATH);\n $this->_template = str_replace(\"</routes>\", $this->_template, $existingFile);\n } else {\n $atTheStart = '<?xml version=\"1.0\"?>\n<routes xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:module:Magento_Webapi:etc/webapi.xsd\">';\n $this->_template = $atTheStart . $this->_template;\n }\n\n parent::save();\n return $this;\n }",
"public function write()\n\t{\n\t\t$source = $this->compile();\n\n\t\t// file location\n\t\t$file = $this->template->getEnvironment()->getCache() . '/';\n\t\t$file .= $this->template->getEnvironment()->getCacheFilename($this->filename);\n\n\t\t// attempt to create the directory if needed\n\t\tif(!is_dir(dirname($file)))\n\t\t{\n\t\t\tmkdir(dirname($file), 0777, true);\n\t\t}\n\n\t\t// write to tempfile and rename\n\t\t$tmpFile = tempnam(dirname($file), basename($file));\n\t\tif(@file_put_contents($tmpFile, $source) !== false)\n\t\t{\n\t\t\tif(@rename($tmpFile, $file))\n\t\t\t{\n\t\t\t\tchmod($file, 0644);\n\t\t\t}\n\t\t}\n\t}",
"public function storeTo($path = './') {\n\t\tfile_put_contents($path . $this->filename, $this->content);\t\n\t}",
"public function FrontendOutputPostGenerate() {\n\t\t\tfile_put_contents($this->location, $this->template);\n\t\t}",
"public function save()\n\t{\n\t\treturn file_put_contents(self::filepath($this->name), $this->content);\n\t}",
"public static function setContent($filename, $content, $createFile = true, $append = false, $chmod = 0777)\n\t{\n\t\t// redefine vars\n\t\t$filename = (string) $filename;\n\t\t$content = (string) $content;\n\t\t$createFile = (bool) $createFile;\n\t\t$append = (bool) $append;\n\n\t\t// file may not be created, but it doesn't exist either\n\t\tif(!$createFile && self::exists($filename)) throw new SpoonFileSystemException('The file \"'. $filename .'\" doesn\\'t exist');\n\n\t\t// create directory recursively if needed\n\t\tSpoonDirectory::create(dirname($filename), $chmod, true);\n\n\t\t// create file & open for writing\n\t\t$handler = ($append) ? @fopen($filename, 'a') : @fopen($filename, 'w');\n\n\t\t// something went wrong\n\t\tif($handler === false) throw new SpoonFileSystemException('The file \"'. $filename .'\" could not be created. Check if PHP has enough permissions.');\n\n\t\t// write to file & close it\n\t\t@fwrite($handler, $content);\n\t\t@fclose($handler);\n\n\t\t// chmod file\n\t\t@chmod($filename, $chmod);\n\n\t\t// status\n\t\treturn true;\n\t}",
"public function setTemplate($file);",
"public function createFile()\n {\n return $this->addExcludesNameEntry($this->files);\n }",
"protected function _writeFileHeader() {}",
"protected function store()\n\t{\n\t\t// rebuild the keys table\n\t\t$this->reindex();\n\t\t//---------------------\n\t\tif (($handle = fopen($this->_origin, \"r\")) !== FALSE)\n\t\t{\n $tasksTag = new SimpleXMLElement(\"<tasks></tasks>\");\n foreach($this->_data as $key => $record){\n $taskTag = $tasksTag->addChild(\"task\");\n foreach($this -> _fields as $value){\n $taskTag->addAttribute($value, $record->$value);\n }\n }\n /*\n $newsXML->addAttribute('newsPagePrefix', 'value goes here');\n $newsIntro = $newsXML->addChild('content');\n $newsIntro->addAttribute('type', 'latest');\n Header('Content-type: text/xml');\n echo $newsXML->asXML();*/\n\n $tasksTag -> asXML ($this -> _origin);\n \n\t\t}\n\t\t// --------------------\n\t}",
"protected function write()\n {\n if (!is_dir($this->path)) {\n mkdir($this->path);\n }\n\n file_put_contents($this->file, json_encode([\n 'network' => $this->network,\n 'epoch' => static::$epoch,\n 'iteration' => static::$iteration,\n 'a' => $this->a,\n 'e' => $this->e\n ]));\n }",
"public function saveNewTxtFile()\r\n {\r\n\r\n $fileName = date(\"Y-m-d\") . '-' . rand(0, 512) . \"Question\";\r\n\r\n $file = new StorageFileSaver($fileName);\r\n\r\n foreach ($this->fileContent as $content) {\r\n $file->write($content);\r\n }\r\n\r\n $file->saveAndCloseFile();\r\n }",
"public function writeContentControllerFile($file){\n /*sample file*/ \n $sampleFile = self::SAMPLE_PATH.DS.'Action.php'; \n $sampleAbstractFile = self::SAMPLE_PATH.DS.'Abstract.php';\n $sampleExport = self::SAMPLE_PATH.DS.'ExportData.php';\n /* */ \n $class_name = Mage::helper('magento2challenge')->getClassName($file);\n $explodeClass = explode('_',$class_name);\n $namespace = $explodeClass[0];\n $modulename = $explodeClass[1];\n $exController = explode('Controller',end($explodeClass));\n $className = $exController[0];\n $exFile = explode('Controller.php',$file);\n $controllerPath = $exFile[0];\n if(strpos($file,'Adminhtml') !== false) { \n $class = $namespace.DS.$modulename.DS.'Controller'.DS.'Adminhtml'.DS.$className; \n $absClass = $namespace.DS.$modulename.DS.'Controller'.DS.'Adminhtml';\n }\n else{\n $class = $namespace.DS.$modulename.DS.'Controller'.DS.$className; \n $absClass = $namespace.DS.$modulename.DS.'Controller';\n }\n $abstractClass = $controllerPath.'.php';\n if(!file_exists($controllerPath))\n mkdir($controllerPath,0777,true);\t\n // write content file\n $functionNames = $this->getFunctionsName(file_get_contents($file),$class_name);\t\n $funcArray = array();\n $functionContent = '';\n foreach($functionNames as $func){\n //create abstract action\n $abstractContent = file_get_contents($sampleAbstractFile);\n if(substr_count(file_get_contents($file),$func) > 1){\n if(!in_array($func,$funcArray)){\n $functionContent .= \t$this->replaceContentFunction($file,$func,$class_name,true);\n $sampleContent = file_get_contents($sampleAbstractFile);\n $action = $className;\n $fileContent = $this->replaceAbstractContent($sampleContent,$absClass,$action,$functionContent);\n $fileContent = $this->replaceCreateBlock($fileContent, $namespace, $modulename,'other');\n $filePath = $abstractClass;\n $handle = fopen ($filePath, 'w');\n fputs($handle, $fileContent); \n }\n $funcArray[] = $func; \n }\n //\n //create action file and write content \n $sampleContent = file_get_contents($sampleFile);\n $funcEx = explode('Action',$func);\n $action = ucwords($funcEx[0]);\n $newContent = $this->replaceContentFunction($file,$func,$class_name,false);\n $fileContent = $this->replacePhp($sampleContent,$class,$action,$class,$newContent);\n if($action == 'New') $action = 'NewAction';\n $filePath = $controllerPath.DS.$action.'.php';\n $handle = fopen ($filePath, 'w');\n // replace export csv/excel\n if(strpos($fileContent,'_prepareDownloadResponse') !== false){\n $funcEx = explode('Action',$func);\n $actionName = ucwords($funcEx[0]);\n $fileName = strtolower($modulename);\n if(strpos($fileContent,'getCsv()')){\n $fileName = $fileName.'.csv';\n $fileName = \"'\".$fileName.\"'\";\n $functionName = 'getCsvFile';\n }\n if(strpos($fileContent,'getXml()')){\n $fileName = $fileName.'.xml';\n $fileName = \"'\".$fileName.\"'\";\n $functionName = 'getExcelFile';\n }\n if(!isset($functionName)) continue; \n $blockclassName = $this->replaceCreateBlock($fileContent, $namespace, $modulename,'export'); \n $fileContent = $this->replaceExport(file_get_contents($sampleExport),$class,$actionName,$fileName,$blockclassName,$functionName);\n }\n else{\n $fileContent = $this->replaceCreateBlock($fileContent, $namespace, $modulename,'other');\n }\n //\n fputs($handle, $fileContent); \n fclose($handle);\n //\n }\n // delete file\n unlink($file);\n //\n return true;\t\n }",
"public function write($content);",
"public static function createTempFile($content) {}",
"protected function createFile($path,$data) {\n File::put($path,$data);\n }",
"public function save(IO\\File $file) {\n\t\t\tfile_put_contents($file, $this->render());\n\t\t\t$this->file = $file;\n\t\t}",
"public function create_from_file($file);",
"protected function setUp(): void\n {\n /** @var File $file */\n parent::setUp();\n TestAssetStore::activate('UsedOnTableTest');\n $path = dirname(__DIR__) . '/Forms/fixtures/testfile.txt';\n $content = file_get_contents($path ?? '');\n $file = File::get()->find('Name', 'testfile.txt');\n $file->setFromString($content, $file->generateFilename());\n }",
"public function open(): void\n {\n $this->content->seek(0, SEEK_SET);\n $this->lastAccessed = time();\n }",
"function generateHtml($content)\n{\n $htmlFile = \"index.html\"; // generated html file name\n $f = fopen($htmlFile, 'w');\n\n// the html code injected to the html file\n\n $htmlData = \"\n<!doctype html>\n<html>\n<head><meta charset='utf-8'>\n<title>Address book</title>\n</head>\n<body>\n$content \n</body>\n</html>\n\";\n fwrite($f, $htmlData);\n fclose($f);\n}",
"function XMLsetContent($data) {\n $this->contentBuffer = $data;\n $this->currentFile = '';\n }",
"public function write() {\n\t\tcopy($this->_path, str_replace('.css', getDatetime(time(), 'Y-m-d_H-i-s') . '.css', $this->_path));\n\t\t$cssData = preg_replace('/\\/\\*\\* @_START_@ \\*\\/(.*?)\\/\\*\\* @_END_@ \\*\\//s', '/** @_START_@ */\n' . $this->toString() . '\n/** @_END_@ */', $this->_fileContent);\n\t\tfile_put_contents($this->_path, $cssData);\n\t}",
"private function create_xml_file(){\r\n global $CFG;\r\n \r\n $tmpfileid = time().rand(1,99999);\r\n $tmpfile = 'export_xml_'.$tmpfileid.'.pdf';\r\n $this->attachfile = $CFG->tempdir.'/'.$tmpfile;\r\n \r\n $dom = new DOMDocument('1.0', 'utf-8');\r\n $dom->preserveWhiteSpace = false;\r\n $dom->formatOutput = true;\r\n $dom->loadXML($this->xml_structure);\r\n $dom->save($this->attachfile);\r\n }",
"function create_industries()\r\n{\r\n\tglobal $NCTcontent;\r\n\r\n\t$handle = fopen('derived/institution_type/industry.txt', 'w+'); // binary update mode\r\n\tfwrite($handle, $NCTcontent);\r\n\tfclose($handle);\r\n\r\n}",
"public function setFile($file) {}",
"function create($file = null) {\n $file = (isset($this->_file) && !$file) ? $this->_file : $file;\n \n \tif (!Fire_File_Helper::exists($file)) {\n $io = new Fire_File_IO_Helper($file);\n $io->open('w+');\n $io->close();\n } else {\n Fire_Error::throwError(sprintf('File \"%s\" already exists.',\n $file\n ), __FILE__, __LINE__\n );\n }\n \n }",
"public function write(string $file, string $content): void;",
"public function createReadmeFile()\r\n {\r\n $originalFile = realpath(__DIR__ . '/../Resources/files/templates/README');\r\n $newFile = $this->destination_dir.'/README.md';\r\n\r\n $this->createCopiedFile($originalFile, $newFile);\r\n }",
"public static function setFile($file) {}",
"public function createNewConfig() { \n\n\t\t/** \n\t\t * Start by creating the top of the php file\n\t\t *\n\t\t */\n\t\t$this->newFileStr = \"<?php\\n\\n\";\n\n\t\t/** \n\t\t * We want to loop through the new config variables\n\t\t * and concatenate the variable\n\t\t *\n\t\t * @var string stores new variables.\n\t\t */\n\n\t\tforeach ($this->fileSettings as $name => $val) {\n\n\t\t/** \n\t\t * Output our config variables comment\n\t\t * and concatenate the variable\n\t\t *\n\t\t * @var string stores new config comment\n\t\t */\n\n\t\t$this->newFileStr .= \"\\n\\n//\" . $val['1'] . \"\\n\";\n\t\t\n\n\t\t/** \n\t\t *\n\t\t * Using var_export() allows you to set complex values \n\t\t * such as arrays and also ensures types will be correct\n\t\t *\n\t\t * @var string stores new config setting\n\t\t */\n\t\t\n\t\t$this->newFileStr .= \"$\".$name.\" = \".var_export($val['0'], TRUE).\";\\n\";\n\n\n\t\t} // end of foreach\n\n\t\t/** \n\t\t *\n\t\t * End our php file\n\t\t *\n\t\t */\n\n\t\t$this->newFileStr .= \"\\n?>\";\n\n\t\t/** \n\t\t *\n\t\t * Create out new config\n\t\t *\n\t\t */\n\t\tfile_put_contents($this->filePath, $this->newFileStr, LOCK_EX);\n\n\t}",
"public function create()\n {\n return $this->process($this->filename);\n }",
"public function set($args)\n\t\t{\n\t\t\tif(!$this->set_file($args['id']))\n\t\t\t\treturn false;\n\n\t\t\t$new_obj = new NBXML(PATH_POSTS.$this->files[0], 0, TRUE, '', FALSE);\n\n\t\t\t$new_obj->setChild('title', \t\t\t$args['title']);\n\t\t\t$new_obj->setChild('content', \t\t\t$args['content']);\n\t\t\t$new_obj->setChild('description', \t\t$args['description']);\n\t\t\t$new_obj->setChild('allow_comments', \t$args['allow_comments']);\n\t\t\t$new_obj->setChild('mod_date', \t\t\tDate::unixstamp());\n\n\t\t\t// Quote\n\t\t\tif(isset($args['quote']))\n\t\t\t{\n\t\t\t\t$new_obj->setChild('quote', $args['quote']);\n\t\t\t}\n\n\t\t\t// ---------------------------------------------------------\n\t\t\t// Filename\n\t\t\t// ---------------------------------------------------------\n\t\t\t$file = explode('.', $this->files[0]);\n\n\t\t\t// Category\n\t\t\tif(isset($args['id_cat']))\n\t\t\t\t$file[2] = $args['id_cat'];\n\n\t\t\t// Draft, publish\n\t\t\t$file[4] = 'NULL';\n\n\t\t\tif(isset($args['mode']))\n\t\t\t{\n\t\t\t\tif($args['mode']=='draft')\n\t\t\t\t\t$file[4] = 'draft';\n\t\t\t}\n\n\t\t\t// Publish date\n\t\t\tif(isset($args['unixstamp']))\n\t\t\t{\n\t\t\t\t$file[0] = $args['unixstamp'];\n\n\t\t\t\t$new_obj->setChild('pub_date', $args['unixstamp']);\n\n\t\t\t\t$file[5] = Date::format_gmt($args['unixstamp'], 'Y');\n\t\t\t\t$file[6] = Date::format_gmt($args['unixstamp'], 'm');\n\t\t\t\t$file[7] = Date::format_gmt($args['unixstamp'], 'd');\n\t\t\t\t$file[8] = Date::format_gmt($args['unixstamp'], 'H');\n\t\t\t\t$file[9] = Date::format_gmt($args['unixstamp'], 'i');\n\t\t\t\t$file[10] = Date::format_gmt($args['unixstamp'], 's');\n\t\t\t}\n\n\t\t\t// Implode the filename\n\t\t\t$filename = implode('.', $file);\n\n\t\t\t// Delete the old post\n\t\t\tif($this->delete( array('id'=>$args['id']) ))\n\t\t\t{\n\t\t\t\t// Slug\n\t\t\t\t$this->slug($args['id'], $args['slug']);\n\n\t\t\t\t// Save config\n\t\t\t\t$this->savetofile();\n\n\t\t\t\t// Save the new post\n\t\t\t\treturn $new_obj->asXml(PATH_POSTS.$filename);\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}",
"function grabarTemplate($filename, $somecontent) {\n fopen($filename, \"wb\");\n // Let's make sure the file exists and is writable first.\n if (is_writable($filename)) {\n\n // In our example we're opening $filename in append mode.\n // The file pointer is at the bottom of the file hence\n // that's where $somecontent will go when we fwrite() it.\n if (!$handle = fopen($filename, 'a')) {\n return \"No se pudo abrir el archivo ($filename)\";\n }\n\n // Write $somecontent to our opened file.\n if (fwrite($handle, $somecontent) === FALSE) {\n return \"No se pudo escribir en el archivo ($filename)\";\n }\n\n //echo \"Success, wrote (html) to file ($filename)<br/>\";\n\n fclose($handle);\n } else {\n return \"El Archivo $filename tiene permisos de escritura\";\n }\n }",
"function __construct()\n {\n \t$this->fwrite = $this->GetHeader() . \"\\n\";\n }",
"public function write($name, $content);",
"public function save($filename, $content);",
"protected function _createEntity()\n\t\t{\n\t\t\t// Form template name.\n\t\t\t$separator = '__';\n\t\t\t$template = $type = $this->_createForm->type->getValue();\n\t\t\t$subject = $this->_createForm->subject->getValue();\n\t\t\tif ( $platformId = $this->_createForm->platform_id->getValue() ) {\n\t\t\t\t$platform = Table::_( 'platforms' )->get( $platformId );\n\t\t\t\t$template = $platform->name . $separator . $template;\n\t\t\t}\n\t\t\tif ( $pluginId = $this->_createForm->plugin_id->getValue() ) {\n\t\t\t\t$filter = new D_Filter_PluginDirectory();\n\t\t\t\t$plugin = Table::_( 'plugins' )->get( $pluginId );\n\t\t\t\t$template = str_replace( '-', '_', $filter->filter( $plugin->name ) ) . $separator . $template;\n\t\t\t}\n\t\t\t$template .= '.phtml';\n\t\t\t// Write a file.\n\t\t\t$directory = $this->_getTypeDirectory( $type );\n\t\t\tif ( !file_exists( $directory . $template ) ) {\n\t\t\t\tfile_put_contents(\n\t\t\t\t\t$directory . $template,\n\t\t\t\t\t$this->_createForm->content->getValue()\n\t\t\t\t);\n\t\t\t}\n\t\t\t// Save a subject.\n\t\t\t$settingId = Model::_( 'settings' )->setting( $template . '[email subject]' );\n\t\t\tModel::_( 'settings' )->string( $settingId, $subject );\n\t\t}",
"protected function _write() {}",
"public function run()\n {\n $entrada = [\n 'original_name' => 'PDF de Teste',\n 'path' => './tmp/PDFdeTeste.pdf',\n 'estagio_id' => '1',\n 'user_id' => '1',\n ];\n \n /* File::create($entrada);\n File::factory(40)->create(); */\n }",
"public function set($filepath, $data);",
"public function writeFile()\n {\n $this->eof();\n\n return parent::writeFile();\n }",
"public static function create_file($path,$data) {\n\t\t\t\t\n\t\t// Open Empty File\n\t\tif(!$file = fopen($path,\"w+\")) {\n\t\t\tdie(\"Disk::create_file: Cant open File: \".$path);\n\t\t}\n\t\t\n\t\t// Set Content\n\t\tif(fwrite($file,$data) === false) {\n\t\t\tdie(\"Disk::create_file: Cant write to File: \".$path);\n\t\t}\n\t\t\n\t\t// Close\n\t\tfclose($file);\n\t}",
"abstract public function createFile(FileData $fileData);",
"public function create() {\n $this->createPersonHeader();\n $this->createRecipientHeader();\n $this->createBody();\n $this->createText();\n $this->createFooter();\n }",
"protected function _setFile()\n\t{\n\t\t$this->_moveToImageDir();\n\n\t\tif (!$this->_validateMimeType()) {\n\t\t\tunlink($this->getFilePath()); // delete file\n\t\t\tthrow new Exception('Not Allowed MIME Type File ERROR!');\n\t\t}\n\n\t\t$this->_file = file_get_contents($this->getFilePath());\n\t}",
"private function createFile($filename, $content){\n\tfile_put_contents($filename.\".gz\", gzencode($content, 9)) or die(\"\\nCannot write file \".$filename);\t \n\techo \"\\nFilename \" . $filename . \" was successfully written\\n\";\n }",
"public function setFileToSignFromContentRaw($contentRaw)\n {\n $tempFilePath = parent::createTempFile();\n file_put_contents($tempFilePath, $contentRaw);\n $this->fileToSignPath = $tempFilePath;\n }",
"public function setFileToSignFromContentRaw($contentRaw)\n {\n $tempFilePath = parent::createTempFile();\n file_put_contents($tempFilePath, $contentRaw);\n $this->fileToSignPath = $tempFilePath;\n }",
"public function setContent()\n {\n }",
"protected function setPlainContent() {}",
"function write() {\n\t\t$this->readychk();\n\t\tif (!is_dir($this->dir_path)) { mkdir($this->dir_path); }\n\t\tif (!is_dir($this->asset_path)) { mkdir($this->asset_path); }\n\n\t\t$cstr = json_encode($this->export(TRUE, TRUE));\n\t\tif (\n\t\t\t$cstr === FALSE &&\n\t\t\tjson_last_error() !== JSON_ERROR_NONE\n\t\t) { throw new IntException(\"Slide config encoding failed.\"); }\n\t\tfile_lock_and_put($this->conf_path, $cstr);\n\t}",
"public function createFile($title, $data = null)\r\n\t{\r\n\t\tif (substr($title, -5) == '.html')\r\n\t\t{\r\n\t\t\t$title = substr($title, 0, -5);\r\n\t\t}\r\n\r\n\t\t$file = new GeekPoint_AdminDAVi_File_AdminTemplate($this->_addonId, $title);\r\n\t\t$file->put($data);\r\n\t}",
"private static function create($viewName, $content)\n {\n preg_match_all('/<pre[^>]*>.*?<\\/pre>/is', $content, $match);\n $match = $match[0];\n $content = self::clearHTML($content);\n $search = array_map(array('\\scoop\\view\\Template', 'clearHTML'), $match);\n $search += array(' ?><?php ');\n $match += array(';');\n $content = str_replace($search, $match, $content);\n $path = explode('/', $viewName);\n $count = count($path)-1;\n $dir = '';\n for ($i=0; $i<$count; $i++) {\n $dir .= $path[$i].'/';\n if (!file_exists($dir)) {\n mkdir($dir, 0700);\n }\n }\n $view = fopen($viewName, 'w');\n fwrite($view, trim($content));\n fclose($view);\n }",
"public function write($contents);",
"public function writeToFile() {\n $this->offset = ftell($this->file); //Save the file pointer\n $this->headerSize = 12;\n $this->size = 108;//count up all the fields\n \\Flare\\Common\\ByteUtils::writeUnsignedInteger($this->file, $this->size); //Write the box size place holder for now\n \\Flare\\Common\\ByteUtils::writeChars($this->file, $this->boxType); //Write the box type\n \n \\Flare\\Common\\ByteUtils::writeUnsignedByte($this->file, $this->version); //Write the box version\n \\Flare\\Common\\ByteUtils::writeUnsignedByte($this->file, $this->flags[0]); //Write the box version\n \\Flare\\Common\\ByteUtils::writeUnsignedByte($this->file, $this->flags[1]); //Write the box version\n \\Flare\\Common\\ByteUtils::writeUnsignedByte($this->file, $this->flags[2]); //Write the box version //12 bytes so far\n \n \\Flare\\Common\\ByteUtils::writeUnsignedInteger($this->file, $this->creationTime); //Write the creation time\n \\Flare\\Common\\ByteUtils::writeUnsignedInteger($this->file, $this->modificationTime); //Write the creation time\n \\Flare\\Common\\ByteUtils::writeUnsignedInteger($this->file, $this->timeScale); //Write the timeScale\n \\Flare\\Common\\ByteUtils::writeUnsignedInteger($this->file, $this->duration); //Write the duration //28 bytes\n \n \\Flare\\Common\\ByteUtils::writeFixed16_16($this->file, $this->rate); //Later Change this to the fixed point - 32 Bytes\n \n \\Flare\\Common\\ByteUtils::writeFixed8_8($this->file, $this->volume); //34 bytes\n \\Flare\\Common\\ByteUtils::padBytes($this->file, 10); //44 bytes\n //+3 \n \n $this->writeMatrix(); // 80 bytes\n \n \n \\Flare\\Common\\ByteUtils::padBytes($this->file, 4*6); //104\n \\Flare\\Common\\ByteUtils::writeUnsignedInteger($this->file, $this->nextTrackID); //108\n \n\n \n }",
"private function writeConfigFile()\n {\n if (!$this->configFile) {\n $confDir = $this->scratchSpace . DIRECTORY_SEPARATOR . 'config';\n mkdir($confDir);\n $this->configFile = $confDir . DIRECTORY_SEPARATOR . 'config.yml';\n }\n file_put_contents($this->configFile, $this->configYaml);\n $this->container->setParameter('config.filename', $this->configFile);\n }",
"private function createNewTmpICal()\n\t{\n\n\t\t$config = Factory::getConfig();\n\t\t$path = $config->get('config.tmp_path') ? $config->get('config.tmp_path') : $config->get('tmp_path');\n\t\techo \"create temp CSV conversion file in \" . $path . \"<br/>\";\n\t\t$this->tmpFileName = tempnam($path, \"phpJE\");\n\t\t//$this->tmpFileName = tempnam(\"/tmp\", \"phpJE\");\n\t\t$this->tmpfile = fopen($this->tmpFileName, \"w\");\n\t\tfwrite($this->tmpfile, \"BEGIN:VCALENDAR\\n\");\n\t\tfwrite($this->tmpfile, \"VERSION:2.0\\n\");\n\t\tfwrite($this->tmpfile, \"PRODID:-//jEvents 2.0 for Joomla//EN\\n\");\n\t\tfwrite($this->tmpfile, \"CALSCALE:GREGORIAN\\n\");\n\t\tfwrite($this->tmpfile, \"METHOD:PUBLISH\\n\");\n\n\t}",
"protected static function file()\n {\n }",
"protected function feedCreate($file){\n\t\tHeaderPrint($file,queryBuilder('head'));\n\t\tMerchPrint($file,queryBuilder(''));\n\t}",
"private function setTempFile() {\n $this->filename = tempnam('/tmp/', 'siwiki_relplot_');\n $this->fileresource = fopen($this->filename, 'a+');\n }",
"private function writeTextToFile() {\n\t\t$text = $this -> pm -> getText($this -> padid);\n\t\t$path = sprintf('%s/%s.tex', $this -> directory, $this -> name);\n\t\tfile_put_contents($path, $text);\n\t}",
"public function createFile(File $file): void;",
"protected function setCache()\n {\n if ($this->cache) {\n $cacheFile = $this->getCacheFile();\n $this->setupCachePath($cacheFile);\n file_put_contents($cacheFile, $this->templateOutput);\n }\n }",
"protected function build()\n {\n $this->getResponse()->setVersion($this->getConf()->getVersion());\n $this->getResponse()->setCreate(json_decode($this->getConf()->getCreate()));\n }",
"public function putContent($data) {\n\t\t$this->storage->file_put_contents($this->path, $data);\n\t}"
] | [
"0.68384475",
"0.6802304",
"0.6677871",
"0.6294031",
"0.62883687",
"0.62876844",
"0.6283592",
"0.6260655",
"0.61966467",
"0.6190149",
"0.61694306",
"0.61668736",
"0.6092504",
"0.6083858",
"0.60480934",
"0.60477996",
"0.6003446",
"0.59711623",
"0.5963684",
"0.594418",
"0.59119606",
"0.5893511",
"0.5890108",
"0.58825",
"0.5881618",
"0.58628243",
"0.5851381",
"0.5834659",
"0.5788892",
"0.57584614",
"0.5754121",
"0.5746918",
"0.5745868",
"0.57447946",
"0.57442683",
"0.5735897",
"0.57343394",
"0.5712514",
"0.57019585",
"0.56863064",
"0.567386",
"0.5665536",
"0.5662663",
"0.56588286",
"0.56474996",
"0.56309915",
"0.5627492",
"0.5619301",
"0.5616572",
"0.5612786",
"0.5594704",
"0.55935574",
"0.5575944",
"0.5571732",
"0.5567704",
"0.55651796",
"0.55608094",
"0.5543315",
"0.55431664",
"0.55287623",
"0.5520073",
"0.55158633",
"0.5506928",
"0.5500633",
"0.5498567",
"0.54948586",
"0.54884535",
"0.5468913",
"0.54602355",
"0.54597896",
"0.5455917",
"0.54541177",
"0.54507834",
"0.54484034",
"0.5448261",
"0.54362774",
"0.5435834",
"0.54307485",
"0.5422934",
"0.5414931",
"0.54135764",
"0.5408464",
"0.54039574",
"0.54039574",
"0.5397677",
"0.539182",
"0.53915",
"0.53883487",
"0.5388146",
"0.53803456",
"0.53688776",
"0.5365865",
"0.5357737",
"0.535492",
"0.53475374",
"0.53466713",
"0.5346158",
"0.5344153",
"0.53348833",
"0.5333572",
"0.5327624"
] | 0.0 | -1 |
Return the directory for this $file | public function directory($file)
{
return dirname($this->path($file));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDirectory()\n {\n return dirname($this->file);\n }",
"function getFileDirectory() {\n\t\treturn dirname($this->getFilename());\n\t}",
"public function directoryOf($file){\n $path_parts = pathinfo($file);\n return $path_parts['dirname'];\n }",
"public function getDirectory()\n {\n /* get directory from filename */\n $directory = dirname($this->getFileName());\n /* remove current working directory */\n $directory = str_replace(getcwd(), '', $directory);\n /* replace Windows-style directory seperators */\n $directory = str_replace('\\\\', '/', $directory);\n /* remove leading '/' */\n if ($directory[0] === '/') {\n $directory = mb_substr($directory, 1);\n }\n return $directory;\n }",
"function GetFileDir() {\n\t\t\treturn $this->FileDir;\n\t\t}",
"public function getDirectory()\n {\n return $this->_path['dirname'];\n }",
"public function dir() {\n\t\treturn dirname($this->_path) . '/';\n\t}",
"public function get_directory() {\n\t\treturn $this->directory;\n\t}",
"public function getDir()\n {\n return $this->dir;\n }",
"public function getDir()\n {\n return $this->dir;\n }",
"public function getDir()\n {\n return $this->dir;\n }",
"public function getDir()\n {\n return $this->dir;\n }",
"public function getDir()\n {\n return $this->dir;\n }",
"public function getDir()\n {\n return $this->dir;\n }",
"protected function getDir()\n {\n $reflectionClass = new \\ReflectionClass(get_class($this));\n return dirname($reflectionClass->getFileName());\n }",
"public function getFileDirectory();",
"public function directory() \r\n {\r\n return $this->directory;\r\n }",
"public function getDir() {\n\t\treturn $this->_dir;\n\t}",
"public function getDirectory()\n {\n return $this->directory;\n }",
"public function getDirectory()\n {\n return $this->directory;\n }",
"public function getDirectory()\n {\n return $this->directory;\n }",
"public function getDirectory() {\n return $this->dir;\n }",
"public function getPath()\r\n {\r\n return pathinfo($this->filename, PATHINFO_DIRNAME);\r\n }",
"public function getDirectory(): string\n {\n return $this->directory;\n }",
"public function getDirectory(): string\n {\n return $this->directory;\n }",
"public function getDirname()\n {\n return static::dirname($this->path);\n }",
"public function get_files_directory() {\n return '../data/files/' . hash_secure($this->name);\n }",
"public function getDir();",
"public function get_directory_path()\n {\n return $this->directory_path;\n }",
"protected function get_dir() {\r\n return dirname( ( new \\ReflectionClass( static::class ) )->getFileName());\r\n }",
"public function getDirectory() {\n\t\t return $this->directory;\n\t }",
"public function getDir(): string;",
"public function getDirname()\n {\n return dirname($this->getPath());\n }",
"function get_dir_path() {\n\n\t\treturn $this->dir_path;\n\n\t}",
"public function myFileLocation()\r\n {\r\n $reflection = new ReflectionClass($this);\r\n\r\n return dirname($reflection->getFileName());\r\n }",
"public function getDir() {\n return Yii::getAlias('@static').'/'.$this->module.'/'. $this->parent_id .'/';\n }",
"public function getDirectory();",
"public function getDirectory();",
"public function getDirectory()\n {\n return mfConfig::get('mf_sites_dir').\"/\".$this->getSiteName().\"/\".$this->getApplication().\"/view/pictures/\".$this->get('lang');\n }",
"public function getPath(){\n\t \treturn $this->dirname.'/'.$this->filename.'.'.$this->extension;\n\t }",
"public function getBaseDirectory(): string\n {\n return $this->file->getBaseDirectory();\n }",
"public function getFilesDir()\n {\n return $this->files_dir;\n }",
"protected function getUploadDir()\n {\n return 'uploads/org' . $this->id;\n }",
"protected function getUploadDir()\n {\n return 'uploads/documents/' . $this->doctype;\n }",
"function dirPath () { return (\"../../\"); }",
"public function getFileBaseDir()\n {\n return Mage::getBaseDir('media').DS.'family'.DS.'file';\n }",
"public function getPath()\n {\n return $this->_folder . DIRECTORY_SEPARATOR . $this->_name;\n }",
"protected function _dir(): string\n {\n if ($container = $this->_container()) {\n assert($container->hasId());\n return \"{$container}/\" . static::DIR;\n }\n return static::DIR;\n }",
"public abstract function getDirectory();",
"protected function getFilesystemPath()\n {\n return dirname($this->path);\n }",
"function get_directory($filebase){\n\tswitch ($filebase) {\n\t\tcase 'home':\n\t\t\treturn HOME_DIR;\n\t\t\tbreak;\n\t\tcase 'gprofile':\n\t\t\treturn GPROFILE_DIR;\n\t\t\tbreak;\n\t\tcase 'profile':\n\t\t\treturn PROFILE_DIR;\n\t\t\tbreak;\n\t\tcase 'account':\n\t\t\treturn ACCOUNT_DIR;\n\t\t\tbreak;\n\t\tcase 'search':\n\t\t\treturn SEARCH_DIR;\n\t\t\tbreak;\n\t\tcase 'stats':\n\t\t\treturn STATS_DIR;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn '/';\n\t\t\tbreak;\n\t}\n}",
"protected function getDir($dir){\n\t\t$dir = realpath($this->path . '/' . (FileManagerUtility::startsWith($dir, $this->basename) ? $dir : $this->basename));\n\t\t\n\t\treturn $this->checkFile($dir) ? $dir : $this->basedir;\n\t}",
"function dirPath() { return (\"../\"); }",
"protected function getPath () {\n\tglobal $Config;\n\treturn $Config->get('dir_root').'/'.$this->dir.'/'.$this->name;\n }",
"public function filePath() {\n return $this->baseDir() . '/' . $this->fileName();\n }",
"abstract public function directoryLocation();",
"protected function getFileDirectory($file, $thumb = NULL)\n {\n return pathinfo($file, PATHINFO_DIRNAME) . '/';\n }",
"public function getPath()\n {\n return $this->directory->getRealPath();\n }",
"protected function getUploadDir()\n {\n // on se débarrasse de « __DIR__ » afin de ne pas avoir de problème lorsqu'on affiche\n // le document/image dans la vue.\n return 'uploads/jeweler/' . $this->id .'/';\n }",
"public function getPathAttribute()\n {\n return pathinfo($this->file_path, PATHINFO_DIRNAME);\n }",
"public function getDirectory(): string;",
"public function directory();",
"public function getFileBaseDir()\n {\n return Mage::getBaseDir('media').DS.'invitationstatus'.DS.'file';\n }",
"public static function get_directory() : string {\r\n\t\treturn Core::get_app_path( self::$directory );\r\n\t}",
"public function getPath()\n {\n return $this->dirs[0];\n }",
"public function getPath()\n {\n return $this->dirs[0];\n }",
"public function dirname() {\n return $this->dirname;\n }",
"public function getPath(): string\n {\n return $this->directory->getPath();\n }",
"public function getDirname();",
"protected function getUploadDir()\n {\n // when displaying uploaded doc/image in the view.\n return '/uploads/users/'.$this->getId().'/';\n }",
"public function getDirName() {\n\t\treturn dirname($this->getPath());\n\t}",
"public function getDirectory()\n {\n return $this->_element;\n }",
"public static function get_directory(): string {\n return Simply_Static\\Options::instance()->get('local_dir') ?: '';\n }",
"public function getFilesDirectoryPath();",
"public function getBaseDir()\n {\n return $this->filesystem->getDirectoryWrite(DirectoryList::MEDIA)->getAbsolutePath(self::MEDIA_PATH);\n\n }",
"public function getFilepath()\n {\n $filepath = $this->_path['dirname'].DIRECTORY_SEPARATOR.$this->_path['filename'];\n\n if ($this->_path['extension'])\n $filepath .= '.'.$this->_path['extension'];\n\n return $filepath;\n }",
"protected function getUploadDir()\n {\n return __DIR__ . '/../../../../web' . $this->getFilesPath();\n }",
"function dirPath() {return (\"../../../../\"); }",
"protected function _getUploadDir()\n {\n return $this->_mediaDirectory->getAbsolutePath($this->_appendScopeInfo(self::UPLOAD_DIR));\n }",
"private function &__getDir()\n\t{\n\t\tif(is_null($this->__dir))\n\t\t{\n\t\t\t$this->__dir = new Directory(dirname($this->_path) . DIRECTORY_SEPARATOR, false);\n\t\t}\n\n\t\treturn $this->__dir;\n\t}",
"function serendipity_getRealDir($file) {\n $dir = str_replace( \"\\\\\", \"/\", dirname($file));\n $base = preg_replace('@/include$@', '', $dir) . '/';\n return $base;\n}",
"final function getDirectory () { return $this->xml_dir->path; }",
"public function getBaseDir()\n {\n return $this->filesystem\n ->getDirectoryRead(DirectoryList::MEDIA)\n ->getAbsolutePath(self::MEDIA_PATH);\n }",
"public function getBasePath()\n {\n return dirname($this->file);\n }",
"protected function getUploadDir()\r\n {\r\n // get rid of the __DIR__ so it doesn't screw when displaying uploaded doc/image in the view.\r\n return $this->getMediaType();\r\n }",
"protected function getBaseDir()\n {\n $ref = new \\ReflectionObject($this);\n\n return realpath(dirname(dirname($ref->getFileName())));\n }",
"protected function getUploadDir()\n {\n // when displaying uploaded doc/image in the view.\n return 'images/page/'.$this->page->getId();\n }",
"private function getDir() {\n return sprintf(\"%s/%s/\", app_path(), config('newportal.portlets.namespace'));\n }",
"protected function getUploadDir()\n {\n // al mostrar el documento/imagen cargada en la vista.\n return 'documents/expenses';\n }",
"function destDir($src_file) {\n\t\t$dir = basename($src_file, \".zip\");\n\t\treturn $dir;\n\t}",
"public function getDataDir()\n {\n return (string) $this->file->get(self::SETTING_DATA_DIR);\n }",
"protected function getUploadDir()\n {\n // when displaying uploaded doc/image in the view.\n return 'uploads/documents/w2share';\n }",
"public function getDirectoryRelativePath(): string\n {\n return $this->config->getValue('general/file/import_images_base_dir');\n }",
"public function directoryName() \r\n {\r\n return $this->directory->fullName();\r\n }",
"protected function getFileSnapshotDirectory(): string\n {\n return $this->getSnapshotDirectory().\n DIRECTORY_SEPARATOR.\n 'files';\n }",
"protected function getUploadDir()\n {\n // al mostrar el documento/imagen cargada en la vista.\n return 'uploads/images/equipo';\n }",
"public function get()\n {\n return $this->_dirname;\n }",
"protected function extract_dir($file)\n\t{\n\t\treturn substr($file, 0, -strlen(basename($file)));\n\t}",
"public function getDirectory()\n {\n if ($this->directory instanceof \\Closure) {\n $this->directory = $this->directory->call($this->values(), $this->form);\n }\n\n return $this->directory ?: $this->defaultDirectory();\n }",
"protected function getUploadDir()\n {\n // al mostrar el documento/imagen cargada en la vista.\n return 'usuarios/fotos_perfil';\n }"
] | [
"0.85628796",
"0.82756287",
"0.7842453",
"0.7825812",
"0.7731061",
"0.7720469",
"0.75859004",
"0.7497771",
"0.7495889",
"0.7495889",
"0.7495889",
"0.7495889",
"0.7495889",
"0.7495889",
"0.745824",
"0.7438007",
"0.73969424",
"0.73377943",
"0.72780335",
"0.72780335",
"0.72780335",
"0.7244452",
"0.7243394",
"0.7241842",
"0.7241842",
"0.723336",
"0.7225316",
"0.7190595",
"0.71734726",
"0.71175903",
"0.7109626",
"0.70474046",
"0.7031195",
"0.6978353",
"0.6974218",
"0.6932321",
"0.6913413",
"0.6913413",
"0.69087267",
"0.6892996",
"0.6882659",
"0.68734246",
"0.6817564",
"0.68040025",
"0.6802593",
"0.6788364",
"0.67881393",
"0.6786732",
"0.6766288",
"0.67561215",
"0.67443293",
"0.6718177",
"0.67133904",
"0.6707811",
"0.6693026",
"0.66835654",
"0.6678498",
"0.6664132",
"0.6653908",
"0.6646923",
"0.6644632",
"0.66332585",
"0.66276765",
"0.6617126",
"0.6615061",
"0.6615061",
"0.6605186",
"0.66036993",
"0.6585946",
"0.65808207",
"0.6580359",
"0.65751934",
"0.65715355",
"0.65683067",
"0.6559264",
"0.6553547",
"0.6546029",
"0.65444815",
"0.65373176",
"0.6519332",
"0.6504284",
"0.6500049",
"0.6497832",
"0.6490748",
"0.648913",
"0.6488288",
"0.64800024",
"0.64716625",
"0.64569813",
"0.64566606",
"0.64539725",
"0.64528906",
"0.64479333",
"0.64431775",
"0.6436619",
"0.64324725",
"0.64243627",
"0.6414374",
"0.6413621",
"0.64080846"
] | 0.7876371 | 2 |
Returns an array of file content from given directory | public function getFileContentsFromDirectory($directory)
{
$directory = $this->path($directory);
$contents = array();
foreach (new RecursiveIteratorIterator (new RecursiveDirectoryIterator($directory)) as $filename)
{
if ($filename->isFile())
{
$relativePath = $this->makeRelativePath($filename, $directory);
$contents[$relativePath] = file_get_contents($filename);
}
}
return $contents;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 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 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}",
"public function getFiles(DirectoryInterface $directory): array;",
"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 }",
"function _directory_contents($dir, $limit, $offset)\n\t{\n\t\treturn array(\n\t\t\t'files' => $this->_browser_get_files($dir, $limit, $offset)\n\t\t);\n\t}",
"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 }",
"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 function get_directory_content($directory){\n if (is_dir( $directory )){\n $open_directory = opendir($directory);\n $files = array();\n while($file = readdir($open_directory)){\n if($file !== '.' && $file !== '..'){\n $files[] = $file;\n }\n }\n return $files;\n }else{\n $this->modx->log(modX::LOG_LEVEL_ERROR,'[sekUserGalleries] Directory does not exist: '.$directory);\n return false;\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}",
"public function getFiles(): array;",
"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 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 }",
"public function getFiles($dir)\n {\n return Filesystem::getAll(path($dir), 'php');\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}",
"public function getDirContent($directory)\r\n {\r\n return array_diff(scandir(getcwd().$directory), array('..', '.'));\r\n }",
"public function getFiles();",
"public function getFiles();",
"public function getFiles();",
"function folderContent($path)\n\t\t{\n\t\t\t$myDirectory = opendir($path);\n\t\t\t\n\t\t\t$dirArray = array();\n\t\t\t\n\t\t\t// get each entry\n\t\t\twhile($entryName = readdir($myDirectory)) \n\t\t\t{\n\t\t\t\tif($entryName != '.' && $entryName != '..' && $entryName != '.svn')\n\t\t\t\t{\n\t\t\t\t\t$info = pathinfo($path.'/'.$entryName);\n\t\t\t\t\t$stat = stat($path.'/'.$entryName);\n\t\t\t\t\t\n\t\t\t\t\t$obj = array\n\t\t\t\t\t(\n\t\t\t\t\t\t'baseName'=>$info['basename'],\n\t\t\t\t\t\t'extension'=>$info['extension'],\n\t\t\t\t\t\t'fileName'=>$info['filename'],\n\t\t\t\t\t\t'atime' =>date('d-m-Y H:i:s',$stat['atime']),\n\t\t\t\t\t\t'mtime'=> date('d-m-Y H:i:s',$stat['mtime'])\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t$dirArray[$info['basename']] = $obj;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// close directory\n\t\t\tclosedir($myDirectory);\n\t\t\tsort($dirArray);\n\t\t\treturn $dirArray;\n\n\t\t}",
"function papi_get_all_files_in_directory( $directory = '' ) {\n\t$result = [];\n\n\tif ( empty( $directory ) || ! is_string( $directory ) ) {\n\t\treturn $result;\n\t}\n\n\tif ( file_exists( $directory ) && $handle = opendir( $directory ) ) {\n\t\twhile ( false !== ( $file = readdir( $handle ) ) ) {\n\t\t\tif ( ! in_array( $file, ['..', '.'] ) ) {\n\t\t\t\tif ( is_dir( $directory . '/' . $file ) ) {\n\t\t\t\t\t$result = array_merge( $result, papi_get_all_files_in_directory( $directory . '/' . $file ) );\n\t\t\t\t} else {\n\t\t\t\t\t$file = $directory . '/' . $file;\n\t\t\t\t\t$result[] = preg_replace( '/\\/\\//si', '/', $file );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tclosedir( $handle );\n\t}\n\n\treturn $result;\n}",
"public function getFiles() : Array\n\t{\n\t\t$files = [];\n\n\t\tif ($this->exists() && $this->isReadable()) {\n\n\t\t\t$directory = opendir($this->directory);\n\t\t\twhile($opened = readdir($directory)) {\n\t\t\t\n\t\t\t\tif (is_file($this->directory . DIRECTORY_SEPARATOR . $opened) && !Directory::isBlockListed($opened)) {\n\t\t\t\t\t$files[] = $opened;\n\t\t\t\t}\n\t\t\n\t\t\t}\n\n\t\t\tclosedir($directory);\n\t\t}\n\n\t\treturn $files;\n\t}",
"public function getContents()\n {\n $list = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($this->_root)\n );\n $elements = array();\n foreach ($list as $element) {\n if ($this->_include->isIncluded($element)\n && !$this->_ignore->isIgnored($element)) {\n $file = substr($element->getPathname(), strlen($this->_root));\n $elements[$file] = array(\n 'role' => $this->_role->getRole($file),\n 'as' => $this->_install_as->getInstallAs($file, 'Horde_' . basename($this->_root))\n );\n }\n }\n return $elements;\n }",
"function getFileAsArray($dir, $ext=array()) {\n\t\t$output = array();\n\t\tif ($handle = opendir($dir)) {\n\t\t\twhile (false !== ($file = readdir($handle))) {\n\t\t\t\tif (!is_dir($dir.\"/\".$file)) {\n\t\t\t\t\t$path_parts = pathinfo($dir.\"/\".$file);\n\t\t\t\t\tif (in_array($path_parts[\"extension\"],$ext) || count($ext) == 0) {\n\t\t\t\t\t\tarray_push($output, $file);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\treturn $output;\n\t}",
"public function getFiles ();",
"public function getFiles()\n {\n $dir = $this->getDir();\n\n return array_filter(array_map(function ($file) use ($dir) {\n if (is_file($dir.$file) && pathinfo($file, PATHINFO_EXTENSION) == 'php') {\n return $dir.$file;\n }\n }, scandir($dir)));\n }",
"function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) {\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\t\t\t\tcontinue; // Ignore hidden files\n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\t\t\t\t$path_info = pathinfo($f);\n\t\t\t\t//if ($path_info && $path_info.extension )\n\t\t\t\t$ext = $path_info['extension'];\n\t\t\t\tif($ext =='html'||$ext =='jpg' || $ext ==='png' || $ext == 'pdf'){\n\t\t\t\t\t$text = ($ext =='html') ?'doc':'image';\n\t\t\t\t\t$files[] = array(\n\t\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\t\"text\" => $text,\n\t\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}",
"public function listFiles($dir);",
"protected function _readDirectoryRecursive($content_dir) {\n\t\t$Found = array();\n\t\t$content_dir = rtrim($content_dir, '/') . '/';\n\t\tif(is_dir($content_dir)) {\n\t\t\ttry {\n\t\t\t\t$Resource = opendir($content_dir);\n\t\t\t\twhile(false !== ($Item = readdir($Resource))) {\n\t\t\t\t\t$preg_result = array();\n\t\t\t\t\tif($Item == \".\" || $Item == \"..\" || preg_match_all('/^[\\.-]+.*$/i', $Item, $preg_result, PREG_SET_ORDER) > 0) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif(is_dir($content_dir . $Item)) {\n\t\t\t\t\t\t$Found[] = $content_dir . $Item;\n\t\t\t\t\t\t$Found[] = $this->_readDirectoryRecursive($content_dir . $Item);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$Found[] = $content_dir . $Item;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch(Exception $e) {}\t\t\n\t\t}\n\t\treturn $Found;\t\t\n\t}",
"protected function listFiles($dir) {\n $dir = file_stream_wrapper_uri_normalize($dir);\n $files = array();\n if ($items = scandir($dir)) {\n foreach ($items as $item) {\n if (is_file(\"$dir/$item\")) {\n $files[] = \"$dir/$item\";\n }\n }\n }\n return $files;\n }",
"public function Get(){\n\n // TODO: this is horrible - try to use glob or RecursiveIteratorIterator - no time\n $fileList = [];\n\n if (!is_dir($this->currentPath)) {\n return $fileList;\n }\n\n $files = $this->scanFolder($this->currentPath);\n\n // up one level link\n if ($this->currentPath != $this->rootPath) {\n $fileList[] = array(\n 'file_name' => \"↑\",\n 'directory' => true,\n 'extension' => '',\n 'size' => \"\",\n 'link' => $this->oneLevelUp(),\n );\n }\n\n foreach ($files as $file) {\n if($file == \".\" || $file == \"..\"){\n continue;\n }\n\n if ($this->isDir($file)) {\n $fileList[] = array(\n 'file_name' => $file,\n 'directory' => true,\n 'extension' => 'folder',\n 'size' => \"\",\n 'link' => $this->currentPath . $file,\n );\n } else {\n // filter on the fly\n $ext = $this->fileExtension($file);\n if(!empty($this->extensionFilter)){\n if(!in_array($ext, $this->extensionFilter)){\n continue;\n }\n }\n $fileList[] = [\n 'file_name' => $file,\n 'directory' => false,\n 'extension' => $ext,\n 'size' => $this->fileSize($file),\n 'link' => \"\",\n ];\n\n }\n }\n\n return $fileList;\n }",
"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}",
"public function get_files($directory)\n {\n $files = array();\n\n if ($directory[strlen($directory)-1] !== '/') $directory .= '/';\n\n if ($catalog = opendir($directory))\n {\n while (false !== ($item = readdir($catalog)))\n {\n if (!in_array($item, array(\".\",\"..\",\".git\")))\n {\n $file = $directory.$item;\n $fileName = pathinfo($item);\n $fileSize = filesize($file) / 8;\n $fileType = filetype($file);\n if ($fileType === 'dir')\n {\n $path = $directory.$fileName['filename'];\n }\n $fileData = array(\n 'name' => $fileName['filename'],\n 'extension' => $fileName['extension'],\n 'size' => $fileSize,\n 'type' => $fileType,\n 'path' => $path,\n );\n $files[] = $fileData;\n }\n }\n }\n closedir($catalog);\n\n return $files;\n }",
"public function all()\n {\n $dir = public_path() . '/uploads/temp/' . Session::getId() . '/';\n $data = [];\n $mimetypes = new Mimetype;\n if(file_exists($dir)) {\n foreach(scandir($dir) as $file) {\n if(in_array($file, ['.', '..'])) continue;\n $filedata = [];\n $filedata['name'] = $file;\n $filedata['url'] = url('/uploads/temp/' .Session::getId() . '/' .$file);\n $filedata['size'] = File::size($dir . $file);\n $filedata['type'] = $mimetypes->detectByFileExtension(File::extension($file));\n $data[] = $filedata;\n }\n return $data;\n }\n }",
"function find_all_files($dir) \n{ \n $files = array();\n foreach (glob($dir) as $file) {\n $files[] = $file;\n }\n return $files;\n}",
"function get_dir_content($in_dir,$in_args=array()){\r\n $dir = rtrim($in_dir, '\\\\/');\r\n $args = array_merge(array(\r\n 'recursive' => false,\r\n 'keep_structure' => false,\r\n 'name_pattren' => false,\r\n 'extension' => false,\r\n 'size_greater_than' => false,\r\n 'size_less_than' => false,\r\n 'type' => 'file',//can be dir also\r\n ),$in_args);\r\n \r\n if(!is_dir($dir)){\r\n lako::get('exception')->raise(\"Unable to read files from '{$dir}' as this is not a DIR.\");\r\n return false;\r\n }\r\n \r\n $files = array_diff(scandir($dir), array('..', '.'));\r\n $send_files = array();\r\n foreach($files as $key => $file){\r\n $send_file = array(\r\n 'name' => $file,\r\n 'path' => $dir.'/'.$file,\r\n );\r\n $send_file['type'] = is_dir($send_file['path'])? 'dir': 'file';\r\n \r\n \r\n if($args['type'] != $send_file['type'])\r\n continue;\r\n \r\n if(($send_file['type'] == 'file') && $args['extension'])\r\n if($this->get_extension($file) != $args['extension'])\r\n continue;\r\n \r\n $send_files[] = $send_file;\r\n }\r\n \r\n return $send_files;\r\n }",
"public static function getFiles( $directory )\n {\n if ( substr( $directory, -1 ) == DS )\n {\n $directory = substr( $directory, 0, -1 );\n }\n \n if( !file_exists( $directory ) || !is_dir( $directory ) )\n throw new Exception( 'Directory ['.Security::preventInjection ( $directory ).'] does not exist, unable to get files.' );\n \n $base = $directory;\n $directoryHandle = opendir( $directory );\n \n $arr = array();\n\n while ( $contents = readdir( $directoryHandle ) )\n {\n if ( $contents != '.' && $contents != '..' )\n {\n $path = $directory . DS . $contents;\n\n if ( is_dir( $path ) )\n {\n $files = self::getFiles( $base.DS.$contents );\n foreach($files as $file)\n $arr[] = $file;\n }\n else\n {\n $arr[] = $base.DS.$contents;\n }\n }\n }\n\n closedir( $directoryHandle );\n return $arr;\n }",
"private function get_files(): array {\n\t\t$files = [];\n\n\t\tif ( $this->directory->is_readable() ) {\n\t\t\tforeach ( $this->directory->get_files() as $file ) {\n\t\t\t\tif ( ! $file->isFile() || ! $file->isReadable() || $file->getSize() === 0 ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( $this->extension !== null && $this->extension !== $file->getExtension() ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$files[] = $file->getFileInfo();\n\t\t\t}\n\t\t}\n\n\t\treturn $files;\n\t}",
"public function getFiles() {}",
"public function listFiles(string $directory): Collection;",
"function listContent()\n\t{\n\t\tif (!$this->isOpen)\n\t\t\treturn false;\n\n\t\t$content = array();\n\n\t\t$i = 0;\n\t\twhile ($curFile = $this->zip->statIndex($i++))\n\t\t\t$content[] = $curFile['name'];\n\t\treturn $content;\n\t}",
"function files_dir__listdir( $dirpath )\n{\n $ret = array() ;\n if($handle = opendir( $dirpath ))\n {\n\twhile (false !== ($file = readdir($handle)))\n\t{\n array_push( $ret, $file ) ;\n } \n }\n return $ret ;\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}",
"function getFiles(){\r\n\r\n global $dirPtr, $theFiles;\r\n \r\n chdir(\".\");\r\n $dirPtr = openDir(\".\");\r\n $currentFile = readDir($dirPtr);\r\n while ($currentFile !== false){\r\n $theFiles[] = $currentFile;\r\n $currentFile = readDir($dirPtr);\r\n } // end while\r\n \r\n}",
"function getfiles($dir=false) {\n\t\tif (!$dir) $dir = $this->curdir;\n\t\t$dir = $this->valdir($dir);\n\t\t$val = $this->dirinfo[$dir][\"files\"];\n\t\treturn $val;\n\t}",
"function getFiles($dir = \".\")\r\n{\r\n $files = array();\r\n if ($handle = opendir($dir)) {\r\n while (false !== ($item = readdir($handle))) {\r\n if (is_file(\"$dir/$item\")) {\r\n $files[] = \"$dir/$item\";\r\n } elseif (is_dir(\"$dir/$item\") && ($item != \".\") && ($item != \"..\")) {\r\n $files = array_merge($files, getFiles(\"$dir/$item\"));\r\n }\r\n }\r\n closedir($handle);\r\n }\r\n return $files;\r\n}",
"private function readFileAsArray()\n {\n return file($this->getFolder() . $this->filename);\n }",
"public function getFileToConvert()\n {\n $directory = $this->inputDirectory;\n $files = array();\n if ($handle = @opendir($directory)) {\n while (false !== ( $file = readdir($handle) )) {\n if (!preg_match(\"/^\\./\", $file)) {\n if (is_file($directory . '/' . $file)) {\n $files[] = $file;\n }\n }\n }\n }\n return $files;\n }",
"function list_files () {\n\t\t$root = $this->get_root();\n\t\t\n\t\treturn $this->_list_files($root);\n\t}",
"public static function dirContents(string $path): array\n {\n $path = static::normalizePath($path);\n $records = array_diff(@scandir($path) ?: [], ['.', '..']);\n foreach ($records as &$record) {\n $record = sprintf('%s%s%s', $path, DIRECTORY_SEPARATOR, $record);\n }\n return $records;\n }",
"public function listContents($directory = '', $recursive = false): array\n {\n $directory = $this->applyPathPrefix($directory);\n $list = [];\n $marker = null;\n while (true) {\n $response = $this->listObjects($directory, $recursive, $marker);\n foreach ($response['items'] as $content) {\n $list[] = $this->normalizeFileInfo($content);\n }\n if (empty($response['marker'])) {\n break;\n }\n $marker = $response['marker'] ?: '';\n }\n return $list;\n }",
"public function filesInThis($directory)\n\t{\n\t\treturn Storage::files($directory);\n\t}",
"public function listContents($directory = '', $recursive = false)\n {\n if ($directory === '') {\n $entries = $this->model->all();\n } else {\n $directory = $this->sanitizeDirectoryName($directory);\n $entries = $this->model->where('location', 'LIKE', $directory . '%')->get();\n }\n\n if ($entries->count() === 0) {\n return [];\n }\n\n $result = [];\n $directories = [];\n\n foreach ($entries as $file) {\n\n if ( ! $this->checkRecursiveParam($directory, $file, $recursive)) {\n continue;\n }\n\n $directories = $this->addDirectories($file, $directories);\n\n $result[] = $this->getMetadataForFile($file);\n }\n\n foreach ($directories as $directory => $folder) {\n $result[] = $this->getMetadataForDirectory($folder['path'], $folder['timestamp']);\n }\n\n return $result;\n }",
"public function getFiles(): array\n {\n return [$this->file];\n }",
"public static function readDirectory ($path) {\n\t\t$list = new \\Array_hx();\n\t\t$dir = \\opendir($path);\n\t\t$file = null;\n\t\twhile (true) {\n\t\t\t$file = \\readdir($dir);\n\t\t\tif (!($file !== false)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (($file !== \".\") && ($file !== \"..\")) {\n\t\t\t\t$list->arr[$list->length++] = $file;\n\t\t\t}\n\t\t}\n\t\t\\closedir($dir);\n\t\treturn $list;\n\t}",
"public function getFiles(): array\n {\n try {\n if (count($this->_filesCollection) === 0) {\n $path = $this->_flysystemHelper->getCurrentPath();\n\n $contents = $this->_flysystemManager->getAdapter()->listContents($path);\n foreach ($contents as $file) {\n if ($this->validateFile($file)) {\n $this->_filesCollection[] = $file;\n }\n }\n }\n } catch (\\Exception $e) {\n $this->_messageManager->addErrorMessage($e->getMessage());\n return [];\n }\n\n return $this->_filesCollection;\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 }",
"function getAllFiles($dirName){\n $files = [];\n try{\n $dirHandle = opendir( appDir($dirName));\n while($fileOrDir = readdir($dirHandle)){\n if(is_dir($fileOrDir)){\n continue;\n }\n $files[] = $dirName.'/'.$fileOrDir;\n }\n closedir($dirHandle);\n }catch(\\Exception $ex){\n echo $ex->getMessage();\n exit;\n }\n return $files;\n}",
"public function getAll() : Array\n\t{\n\t\tif ($this->exists() && $this->isReadable()) {\n\t\t\treturn scandir($this->directory);\n\t\t}\n\n\t\treturn [];\n\t}",
"public function files()\n {\n if($this->collection->empty())\n {\n foreach($this->fileList() as $file)\n {\n if(!is_dir($file))\n {\n $this->files->push($file);\n $this->collection->push(new Reader($this->path . $file));\n }\n else\n {\n $this->directories->push($file);\n }\n }\n }\n\n return $this->collection->get();\n }",
"private static function getContent($dir)\n {\n $file_path = self::getPath($dir);\n\n if (!file_exists($file_path)) {\n throw new FileNotFoundException(\n sprintf(self::EXISTS_ERROR, $file_path)\n );\n }\n\n return file_get_contents($file_path);\n }",
"function getDirContent($dirPath, $sep = '/')\n{\n\t$contents = array(\n\t\t'dirs' => array(),\n\t\t'files' => array()\n\t);\n\t$rootDir = dir($dirPath);\n\n\twhile(($entry = $rootDir->read()) !== false)\n\t{\n\t\tif(!preg_match('/^\\.{1,2}$/', $entry))\n\t\t{\n\t\t\t$isDir = is_dir($dirPath . $entry);\n\t\t\t$array = $isDir ? 'dirs' : 'files';\n\t\t\t$contents[$array][] = array(\n\t\t\t\t'name' => $entry,\n\t\t\t\t'path' => \"{$dirPath}{$entry}\" . ($isDir ? $sep : '')\n\t\t\t);\n\t\t}\n\t}\n\n\t$rootDir->close();\n\treturn $contents;\n}",
"function scanDir() {\r\n $returnArray = array();\r\n \r\n if ($handle = opendir($this->uploadDirectory)) {\r\n \r\n while (false !== ($file = readdir($handle))) {\r\n if (is_file($this->uploadDirectory.\"/\".$file)) {\r\n $returnArray[] = $file;\r\n }\r\n }\r\n \r\n closedir($handle);\r\n }\r\n else {\r\n die(\"<b>ERROR: </b> No se puede leer el directorio <b>\". $this->uploadDirectory.'</b>');\r\n }\r\n return $returnArray; \r\n }",
"function getFilesInDir($dirname, $path_return = ''){\n if( !is_dir($dirname) ){\n return false;\n }\n // On ouvre le dossier\n $dir = opendir($dirname);\n // Init du tableau\n $files = array();\n // On liste les fichier\n while($file = readdir($dir)){\n if($file != '.' && $file != '..' && !is_dir($dirname.$file) && $file != ' '){\n $files[$file] = $path_return . $file;\n }\n }\n // On ferme le dossier\n closedir($dir);\n // On retourne les fichiers\n return $files;\n}",
"public function getFiles()\n {\n $result = array();\n foreach ($this->_subdirectories as $directory) {\n $result = array_merge(\n $result,\n array_map(\n array($this, '_prependDirectory'),\n $directory->getFiles()\n )\n );\n }\n $result = array_merge(\n $result,\n array_map(\n array($this, '_prependDirectory'),\n array_keys($this->_files)\n )\n );\n return $result;\n }",
"function getFiles($dir) {\n\t$files = array();\n\t$dh = opendir($dir);\n\twhile (($file = readdir($dh)) !== false) {\n\t\t$path = $dir . $file;\n\t\tif (!is_dir($path)) {\n\t\t\t$files[] = $path;\n\t\t}\n\t\telseif (is_dir($path) && basename($path) != \".\" && basename($path) != \"..\") {\n\t\t\t$files = array_merge($files, getFiles($path . \"/\"));\n\t\t}\n\t}\n\tclosedir($dh);\n\treturn $files;\n}",
"public function directoryFiles($path)\n {\n $contents = [];\n\n // Scan directory\n $directoryFiles = scandir($path);\n\n foreach ($directoryFiles as $index => $filePath) {\n\n // Ommit . and ..\n if ( ! in_array($filePath, ['.', '..'])) {\n\n // Check if this is a directory\n if (is_dir($path . DIRECTORY_SEPARATOR . $filePath)) {\n\n // Rescan and get files in this directory\n $contents = array_merge($contents, self::directoryFiles($path . DIRECTORY_SEPARATOR . $filePath));\n\n } else {\n\n // Add file to contens array\n $contents[] = $path . DIRECTORY_SEPARATOR . $filePath;\n }\n }\n }\n\n return $contents;\n }",
"private static function get_file_list($directory) {\n global $CFG;\n $directoryroot = $CFG->dirroot;\n $finaleventfiles = array();\n if (is_dir($directory)) {\n if ($handle = opendir($directory)) {\n $eventfiles = scandir($directory);\n foreach ($eventfiles as $file) {\n if ($file != '.' && $file != '..') {\n // Ignore the file if it is external to the system.\n if (strrpos($directory, $directoryroot) !== false) {\n $location = substr($directory, strlen($directoryroot));\n $eventname = substr($file, 0, -4);\n $finaleventfiles[$eventname] = $location . '/' . $file;\n }\n }\n }\n }\n }\n return $finaleventfiles;\n }",
"public function readAll()\r\n {\r\n $plugins_dir = $this->basePath.\"/extern/openInviter/plugins\";\r\n $array_file=array();\r\n \r\n $temp=glob(\"{$plugins_dir}/*.php\");\r\n foreach ($temp as $file) {\r\n// echo 'File: '.$file.' - Check: '.str_replace(\"{$plugins_dir}/\",'',$file).\"\\n\";\r\n\r\n if (($file!=\".\") AND ($file!=\"..\") AND (!isset($this->ignoredFiles[str_replace(\"{$plugins_dir}/\",'',$file)]))) {\r\n $array_file[$file]=$file;\r\n }\r\n }\r\n\r\n return $array_file;\r\n }",
"function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) { // scandir() accepts the full path of the folder to be scanned\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\n\t\t\t\t// It is a hidden file\n\t\t\t\t\n\t\t\t\tcontinue; \n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t);\n\t\t\t}\n\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}",
"function getImages($dir)\n {\n global $imagetypes;\n\n // array to hold return value\n $retval = array();\n\n // add trailing slash if missing\n if(substr($dir, -1) != \"/\") $dir .= \"/\";\n\n \n \n \n // full server path to directory\n $fulldir = \"{$_SERVER['DOCUMENT_ROOT']}/$dir\";\n \n\n $d = @dir($fulldir) or die(\"getImages: Failed opening directory $dir for reading\");\n while(false !== ($entry = $d->read())) {\n // skip hidden files\n if($entry[0] == \".\") continue;\n\n // check for image files\n if(in_array(mime_content_type(\"$fulldir$entry\"), $imagetypes)) {\n $retval[] = array(\n \"file\" => \"/$dir$entry\",\n \"size\" => getimagesize(\"$fulldir$entry\")\n );\n }\n }\n $d->close();\n\n return $retval;\n }",
"public function loadFiles()\n\t{\n\t\t$files = array();\n\t\t\n\t\t$searchPath = $this->getLocalFolder().\"/*.*\";\n\t\t$filesArray = glob($searchPath);\n\t\t\n\t\tforeach($filesArray as $file)\n\t\t{\n\t\t\t$files[] = new File($file);\n\t\t}\n\t\t\n\t\treturn $files;\n\t}",
"public function allFiles($directory)\n {\n return iterator_to_array(Finder::create()->files()->ignoreDotFiles(false)->in($directory), false);\n }",
"function directory_contents()\n\t{\n\t\t$this->datatables();\n\n\t\t$dir_id\t= ee()->input->get('directory_id');\n\t\t$dir\t= $this->directory($dir_id, FALSE, TRUE);\n\n\t\t$offset\t= ee()->input->get('offset');\n\t\t$limit\t= ee()->input->get('limit');\n\n\t\t$data = $dir ? call_user_func($this->config['directory_contents_callback'], $dir, $limit, $offset) : array();\n\n\t\tif (count($data) == 0)\n\t\t{\n\t\t\techo '{}';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['files'] = $this->find_thumbs($dir, $data['files']);\n\n\t\t\tforeach ($data['files'] as &$file)\n\t\t\t{\n\t\t\t\tunset($file['encrypted_path']);\n\t\t\t}\n\n\t\t\t$data['id'] = $dir_id;\n\t\t\techo json_encode($data);\n\t\t}\n\t\texit;\n\t}",
"function getFilesFromDir($dir) { \n\n $files = array(); \n if ($handle = opendir($dir)) { \n while (false !== ($file = readdir($handle))) { \n if ($file != \".\" && $file != \"..\") { \n if(is_dir($dir.'/'.$file)) { \n $dir2 = $dir.'/'.$file; \n $files[] = getFilesFromDir($dir2); \n } \n else { \n $files[] = $dir.'/'.$file; \n } \n } \n } \n closedir($handle); \n } \n\n return $files; \n}",
"public function getItemFiles($sDirectory)\n {\n $aItemFiles = array();\n \n $dh = opendir($sDirectory);\n \n while (($infile = readdir($dh)) !== false) {\n if ($infile != '.' && $infile != '..') {\n //skip htm, since we don't upload those to dspace\n if (substr($infile, -3) != 'htm') {\n //get details on each file\n $sFile = $sDirectory . $infile;\n \n $aFileData = $this->getFileData($sFile);\n $aItemFiles[] = array(\n 'name' => $infile,\n 'filesize' => $aFileData['filesize'],\n 'checksum' => $aFileData['checksum'],\n 'mimetype' => $aFileData['mimetype'],\n );\n \n }\n }\n }\n closedir($dh);\n\n \n return $aItemFiles;\n }",
"public function listContents($directory = '', $recursive = false)\n {\n }",
"public function listContents($directory = '', $recursive = false)\n {\n }",
"protected function loadAllJoomlaFileIntoGiganticArray()\n\t{\n\t\treturn $this->loadFilesIntoArray(\n\t\t\tJFolder::files(JPATH_BASE, '.*\\.(php|xml)', true, true)\n\t\t);\n\t}",
"public static function read_dir_contents($dir, $type = 'all') {\n\t\t$files = array();\n\t\t$dir_handler = opendir($dir);\n\n\t\tif (! $dir_handler)\n\t\t{\n\t\t\tthrow new Exception(\"Failed to open directory {$dir}\");\n\n\t\t\treturn false;\n\t\t}\n\n\t\twhile ($filename = readdir($dir_handler)) {\n\t\t\tif ($filename == '.' || $filename == '..' || $filename == '.svn' || $filename == '.git') {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tswitch ($type)\n\t\t\t{\n\t\t\t\tcase 'all':\n\t\t\t\t\t$files[$filename] = $filename;\n\t\t\t\tbreak;\n\t\t\t\tcase 'files':\n\t\t\t\t\tif (is_file($dir.'/'.$filename)) $files[$filename] = $filename;\n\t\t\t\tbreak;\n\t\t\t\tcase 'folder':\n\t\t\t\t\tif (is_dir($dir.'/'.$filename)) $files[$filename] = $filename;\n\t\t\t\tbreak;\n\t\t\t}\n \t\t}\n\t\tclosedir($dir_handler);\n\n\t\treturn $files;\n\t}",
"protected function getFiles(): array\n {\n return [];\n }",
"public function getAllFiles() {\n $files = [];\n\n foreach(scandir($this->dir) as $filename) {\n if($filename != '.' && $filename != '..') {\n $files[] = $this->getFileInfo($filename);\n }\n }\n\n return $files;\n }",
"function get_files($directory, $pattern = false) {\n\n\t\tif(!isset($directory) OR is_dir($directory) == false ) return false;\n\t\t$returnval = array();\n\n\t\tif(false != ($handle = opendir($directory))) {\n\t\twhile (false !== ($file = readdir($handle))) {\n\n\t if ($file != \".\" && $file != \"..\") {\n\n\t\tif($pattern != false) {\n\n\t\tif(preg_match(\"$pattern\", $file) > 0 ) {\n\t\t$returnval[] = $file;\n }\n\t\t\t}else{\n\t\t\t\t$returnval[] = $file;\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\t}\n\t\tclosedir($handle);\n\t\treturn $returnval;\n\t}",
"function getDirContents($dir){\r\n foreach(scandir($dir) as $key => $value){\r\n print \"$value<BR>\";\r\n }\r\n\r\n\r\n }",
"private function getContents()\n {\n if ($this->contents) {\n return $this->contents;\n }\n\n return $this->contents = $this->directory->getContents();\n }",
"function getConfigFiles($config_dir) {\n $files = array();\n foreach (glob($config_dir . '/*.yaml') as $file) {\n $files[] = $file;\n }\n return $files;\n }",
"public function getFiles(): array\n {\n return $this->files;\n }",
"function sloodle_get_files($dir, $relative = true)\n {\n // Make sure we have a valid directory\n if (empty($dir)) return false;\n // Open the directory\n if (!is_dir($dir)) return false;\n if (!$dh = opendir($dir)) return false;\n \n // Go through each item\n $output = array();\n while (($file = readdir($dh)) !== false) {\n // Ignore anything starting with a . and anything which isn't a file\n if (strpos($file, '.') == 0) continue;\n $filetype = @filetype($dir.'/'.$file);\n if (empty($filetype) || $filetype != 'file') continue;\n \n // Store it\n if ($relative) $output[] = $file;\n else $output[] = $dir.'/'.$file;\n }\n closedir($dh);\n natcasesort($output);\n return $output;\n }",
"public function listContent()\n {\n return $this->tarArchive->listContent();\n }",
"public function getFiles($dir){\n\t\tif(!$this->connected){\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->apiCall('getfiles',array('dir'=>$dir),true);\n\t}",
"public static function readContent($directory, $extension = '.php', $filter = false) {\n if (!is_dir($directory))\n throw new Visio\\Exception\\DirectoryNotFound(\"Path '\" . $directory . \"' is not valid directory!\");\n\n $trueDirectory = $directory;\n\n $skip = array(\".\", \"..\", \".svn\", \".htaccess\", \".DS_Store\");\n\n $dir = scandir($directory);\n\n foreach ($dir as $k => $v) {\n if ((is_dir($trueDirectory . $v)) || in_array($v, $skip)) {\n unset($dir[$k]);\n\n continue;\n }\n\n if ($filter === true) {\n $info = pathinfo($dir[$k]);\n if (\".\" . $info['extension'] != $extension) {\n unset($dir[$k]);\n\n continue;\n }\n }\n\n $dir[$k] = basename($dir[$k], $extension);\n }\n\n $dir = array_values($dir);\n\n return $dir;\n }",
"function dirList($directory) \n{\n $results = array();\n // create a handler for the directory\n $handler = opendir($directory);\n // keep going until all files in directory have been read\n while ($file = readdir($handler)) {\n // if $file isn't this directory or its parent, \n // add it to the results array\n if ($file != '.' && $file != '..')\n $results[] = $directory.$file;\n }\n // tidy up: close the handler\n closedir($handler);\n // done!\n return $results;\n}",
"private static function directoryToArray($directory)\n\t{\n\t\tstatic $root = '';\n\n\t\t$aeFiles = \\MarkNotes\\Files::getInstance();\n\t\t$aeFolders = \\MarkNotes\\Folders::getInstance();\n\n\t\tif ($root === '') {\n\t\t\t$aeSettings = \\MarkNotes\\Settings::getInstance();\n\t\t\t$root = str_replace('/', DS, $aeSettings->getFolderDocs(true));\n\t\t}\n\n\t\t$arr = [];\n\n\t\tif ($aeFolders->exists($directory)) {\n\t\t\t// Get the list of files/folders under $directory\n\t\t\t// Only the folder, not subfolders\n\t\t\t$items = $aeFolders->getContent($directory);\n\n\t\t\tforeach ($items as $item) {\n\t\t\t\t// Don't take files/folders starting with a dot\n\t\t\t\tif (substr($item['basename'], 0, 1) !== '.') {\n\t\t\t\t\t// Absolute filename / foldername\n\t\t\t\t\t$name = rtrim($directory, DS) . DS . $item['basename'];\n\t\t\t\t\tif ($item['type'] == 'dir') {\n\t\t\t\t\t\t// It's a folder\n\t\t\t\t\t\t$arr[] = ['name' => $name, 'type' => 'folder'];\n\t\t\t\t\t//$arr[] = array('name' => iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($name)),'type' => 'folder');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// it's a file, get it only if the\n\t\t\t\t\t\t// extension is .md\n\t\t\t\t\t\tif (isset($item['extension'])) {\n\t\t\t\t\t\t\tif ($item['extension'] === 'md') {\n\t\t\t\t\t\t\t\t$arr[] = [\n\t\t\t\t\t\t\t\t\t'name' => rtrim($directory, DS) . '/' . $item['filename'],\n\t\t\t\t\t\t\t\t\t'type' => 'file'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} // if ($aeFolders->exists($directory.DS.$file))\n\t\t\t\t} // if (substr($file, 0, 1) !== '.')\n\t\t\t} // foreach\n\t\t} // if ($aeFiles->folderExists($directory))\n\n\t\t$name = [];\n\n\t\t// Sort the array by name\n\t\tforeach ($arr as $key => $row) {\n\t\t\t$name[$key] = $row['name'];\n\t\t} // foreach\n\n\t\tarray_multisort($name, SORT_ASC | SORT_NATURAL | SORT_FLAG_CASE, $arr);\n\n\t\treturn $arr;\n\t}",
"public function getFiles() {\r\n\r\n $files = array();\r\n\r\n $userId= $this->userId;\r\n $trackingId = $this->trackingFormId;\r\n $dir = FILEPATH . $userId. '/' . $trackingId;\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 array_push($files, array('name'=>$file,\r\n 'urlfilename'=>urlencode($file),\r\n 'size'=>$size));\r\n }\r\n }\r\n closedir($dh);\r\n }\r\n }\r\n\r\n return $files;\r\n }",
"function getFiles($path) {\n $files = array();\n if ($handle = opendir($path)) {\n while (false !== ($file = readdir($handle))) {\n if ($file != \".\" && $file != \"..\") {\n $files[] = $file;\n }\n }\n closedir($handle);\n }\n return $files;\n }",
"public function readFilesInFileadmin() {\n $fileArr = $newArr = array();\n\n // direktes auslesen des Ordners, da evtl. nicht alle Dateien in Tabellen indexiert sind\n $path = GeneralUtility::getIndpEnv('TYPO3_DOCUMENT_ROOT') . GeneralUtility::getIndpEnv('TYPO3_SITE_PATH') . 'fileadmin/';\n $fileList = GeneralUtility::getAllFilesAndFoldersInPath($fileArr, $path);\n\n $pathCount = strlen($path);\n // deployment-Ordner exkludieren\n foreach ($fileList as $filekey => $filevalue) {\n if (strstr($filevalue, '/fileadmin/deployment') == FALSE) {\n $newArr[$filekey] = substr($filevalue, $pathCount);\n }\n }\n\n return $newArr;\n }",
"function icedrive_get_files($path)\r\n {\r\n $files = array();\r\n $response = $this->icedrive->request('PROPFIND', $path);\r\n $response = $this->icedrive_response_to_array($response['body']);\r\n foreach ($response['dresponse'] as $file) {\r\n $files[] = $file['dhref'];\r\n }\r\n return $files;\r\n }",
"protected function getDirectoryFiles($directory)\n {\n $files = [];\n foreach (Finder::create()->files()->name('*.php')->in($directory) as $file) {\n $nesting = $this->getDirectoryNesting($file, $directory);\n $files[$nesting.basename($file->getRealPath(), '.php')] = $file->getRealPath();\n }\n return $files;\n }",
"function scanFiles($dir){\n $path = __DIR__ . DIRECTORY_SEPARATOR . $dir; /** Nurodomas kelias iki jsons folderio */\n $files = scandir($path); /** Nuskenuoja folderi pagal kelia($path) ir grazina esanciu failu masyva */\n\n return $files;\n}",
"public function getFiles() : array\n {\n return $this->files;\n }"
] | [
"0.7942482",
"0.7749241",
"0.73846763",
"0.73031366",
"0.72935766",
"0.7269816",
"0.7178615",
"0.71235967",
"0.70016325",
"0.69821614",
"0.69749314",
"0.68951166",
"0.686314",
"0.6850891",
"0.6839022",
"0.68370837",
"0.68328863",
"0.68328863",
"0.68328863",
"0.6809155",
"0.6794319",
"0.6793204",
"0.67281836",
"0.6723446",
"0.67205274",
"0.66776675",
"0.6669368",
"0.66202676",
"0.66013247",
"0.6585123",
"0.6579083",
"0.65699846",
"0.6542882",
"0.65419143",
"0.65389746",
"0.65306073",
"0.65229744",
"0.6512777",
"0.64923394",
"0.6488988",
"0.6486517",
"0.6478892",
"0.64763254",
"0.6472137",
"0.6458436",
"0.6456583",
"0.64290524",
"0.64287347",
"0.6418175",
"0.6417461",
"0.6413436",
"0.64099985",
"0.6392194",
"0.6387531",
"0.63785565",
"0.63736933",
"0.63670486",
"0.6365988",
"0.6361614",
"0.63487077",
"0.6336144",
"0.63358253",
"0.63353884",
"0.63349146",
"0.63299674",
"0.6327006",
"0.6321558",
"0.6321477",
"0.63174707",
"0.6314141",
"0.6306461",
"0.6297838",
"0.6272207",
"0.62407386",
"0.62400085",
"0.6228313",
"0.6219115",
"0.6219115",
"0.6211099",
"0.62098235",
"0.62096643",
"0.62057436",
"0.6202237",
"0.61986846",
"0.61826634",
"0.61780286",
"0.6174147",
"0.6171654",
"0.61667866",
"0.6160259",
"0.61542773",
"0.61533576",
"0.61349416",
"0.6134274",
"0.61235315",
"0.612324",
"0.6119355",
"0.61191714",
"0.61180705",
"0.61172664"
] | 0.73233104 | 3 |
Strip off the base directory | public function makeRelativePath($path, $base)
{
return str_replace($base . '/', '', $path);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function clean_path($path){ return str_replace(MMRPG_CONFIG_ROOTDIR, '/', $path); }",
"function get_base()\n\t{\n\t\t$site_url = get_site_option('siteurl');\n\t\t$base = trim(preg_replace('#https?://[^/]+#ui', '', $site_url), '/');\n\n\t\t// @since 1.3.0 - guess min dir to check for any dir that we have to\n\t\t// remove from the base\n\t\t$this->_guess_min_dir();\n\n\t\t$this->base = !empty($this->remove_from_base)\n\t\t\t? preg_replace('#^' . $this->remove_from_base . '/?#ui', '', $base, 1)\n\t\t\t: $base;\n\t}",
"public static function stripBase($url, $base = BASE_URL)\n {\n $pattern = '/^(' . preg_quote($base, '/') . '|\\\\/)/i';\n return preg_replace($pattern, '', $url);\n }",
"public static function basedir() {\n\t\t$directory = trim($_SERVER['SUBDIRECTORY'], '/');\n\t\t$directory = str_replace('\\\\', '/', $directory);\n\n\t\treturn '/' . $directory;\n\t}",
"protected static function unroot($path){\n return str_replace($_SERVER['DOCUMENT_ROOT'],'',$path);\n }",
"public function getAppBaseDirName(){\n return $this->getSite()->getParent()->getAppDir(true);\n }",
"public function getBaseDir();",
"private static function resolveBaseProjectDir(): string\n {\n $temp = explode(DIRECTORY_SEPARATOR, __DIR__);\n array_pop($temp);\n array_pop($temp);\n array_pop($temp);\n return implode(DIRECTORY_SEPARATOR, $temp) . DIRECTORY_SEPARATOR;\n }",
"protected function unroot($path)\n {\n return str_replace($_SERVER['DOCUMENT_ROOT'], '', $path);\n }",
"function clean_path($dirty_path) {\n $cleaner_path = preg_replace('/\\.[\\.]+/', '', $dirty_path);\n return preg_replace('/\\/\\./', '', $cleaner_path);\n}",
"public function getBaseDirectory(): string\n {\n return $this->file->getBaseDirectory();\n }",
"function fn_get_rel_dir($dir)\n{\n return str_replace(\n rtrim(Registry::get('config.dir.root'), '\\\\/') . '/',\n '',\n $dir\n );\n}",
"protected function getBaseDir()\n {\n $ref = new \\ReflectionObject($this);\n\n return realpath(dirname(dirname($ref->getFileName())));\n }",
"function trim_path($path = '')\n { \n return trim_url($path, DIRECTORY_SEPARATOR);\n }",
"public function stripBaseUrl($url);",
"function remove_trailing_slash($path)\n{\n\tif (substr($path, -1) == DS )\n\t\t\t$path = substr($path, 0, strlen($path) - 1);\n\treturn $path;\n}",
"function base_path($path = '')\n {\n return str_replace('//' ,'/',str_ireplace('/' . SYSTEMPATHS['core'], '/', __DIR__) . '/' . $path);\n }",
"function tsapress_base_dir(){\n\t$tsapress_base_dir = trim(next(explode(home_url(), site_url())), \"/\"); //grabs base directory structure if wordpress is installed in a subdirectory\n\tif ($tsapress_base_dir != \"\") $tsapress_base_dir .= \"/\";\n\treturn $tsapress_base_dir;\t//outputs \"[base]/\"\n}",
"function getDirPath($base)\n {\n $delim = rtrim($this->rootdir, '/'); //!!!!!\n \n $basearray = split($delim, $base);\n \n \n \n $key = array_search($delim, $basearray);\n \n //get rid of everything before the root folder\n \n $basearray[0] = $delim;\n \n if(!$basearray[1])\n {\n t3lib_div::devLog(\"BASEARRAY\", $this->extKey, 0, array($gluedbase, $base, $basearray));\n \n return $delim; \n }\n \n $basearray[1] = ltrim($basearray[1], '/');\n \n //glue it back together\n //$newbase = array_values($basearray);\n $gluedbase = implode(\"/\", $basearray);\n \n return $gluedbase;\n }",
"public function get_base_dir()\r\n\t\t{\r\n\t\t\treturn str_replace( \"/\", DIRECTORY_SEPARATOR, __DIR__ . \"/../../\" . self::HOME_DIR );\r\n\t\t}",
"protected function _remove_relative_directory($uri)\n\t{\n\t\t$uris = array();\n\t\t$tok = strtok($uri, '/');\n\t\twhile ($tok !== FALSE)\n\t\t{\n\t\t\tif (( ! empty($tok) OR $tok === '0') && $tok !== '..')\n\t\t\t{\n\t\t\t\t$uris[] = $tok;\n\t\t\t}\n\t\t\t$tok = strtok('/');\n\t\t}\n\n\t\treturn implode('/', $uris);\n\t}",
"public function sanitazePath( $path )\r\n\t{\r\n\t\treturn str_replace( '..' . DS , '' , $path );\r\n\t}",
"public function removePrefixFromPath()\n {\n $this->fileStructure->path = $this->getPathWithoutPrefix( $this->fileStructure->path, $this->prefix );\n $this->prefix = \"\";\n }",
"function getContainingDirpath($base)\n {\n $basearray = split(\"/\", $this->getDirPath($base));\n \n unset($basearray[count($basearray) - 1]);\n \n $newbasearray = array_values($basearray);\n \n return implode(\"/\", $newbasearray);\n }",
"public function baseRelPath()\n {\n if($this instanceof Layout)\n {\n $class = Application::getApp();\n }\n else\n {\n $class = \\get_class($this);\n }\n $reflector = new \\ReflectionClass($class);\n $parts = \\explode('\\\\', $reflector->getName());\n $parts = \\array_chunk($parts, 3, false);\n return \\strtolower(\\implode('/', $parts[0])) . '/';\n }",
"private function trimFilename($file)\n {\n return ltrim(str_replace($this->basePath, '', $file->getPathname()), '/');\n }",
"function getContainingDirname($base)\n {\n $basearray = split(\"/\", $base);\n \n unset($basearray[count($basearray)]);\n $newbasearray = array_values($basearray);\n \n return $newbasearray[count($newbasearray) - 1];\n }",
"function base_path()\n {\n return dirname(__DIR__);\n }",
"public function getBaseDirectory(): string\n {\n return $this->baseDirectory;\n }",
"public static function removeLeadingSlash($path) {\n\t\tif (substr($path, 0, 1) == '/') {\n\t\t\treturn substr($path, 1);\n\t\t}\n\t\telse {\n\t\t\treturn $path;\t\n\t\t}\t\n\t}",
"private function _getSourceFileSystemPath()\n\t{\n\t\treturn rtrim($this->getSettings()->path, '/').'/';\n\t}",
"public function getBaseDirectory(): string\n {\n if ( ! $this->baseDirectory) {\n $this->baseDirectory = dirname($this->getPath());\n }\n\n return $this->baseDirectory;\n }",
"function wp_normalize_path( $path ) {\n\t\t$path = str_replace( '\\\\', '/', $path );\n\t\t$path = preg_replace( '|/+|','/', $path );\n\t\treturn $path;\n\t}",
"public static function removeTrailingSlash($path) {\n\t\tif (substr($path, -1) == '/') {\n\t\t\treturn substr($path, 0, -1);\n\t\t}\n\t\telse {\n\t\t\treturn $path;\n\t\t}\t\n\t}",
"protected function getTargetDirectory()\n {\n return '';\n }",
"function rootSite() {\n // $dirname = preg_replace('/\\\\\\+/', '/', dirname(realpath($uri)));\n $dirname = preg_replace('/\\\\\\+/', '/', dirname($_SERVER['PHP_SELF']));\n if (substr($dirname, -1) == \"/\")\n $dirname = substr($dirname, 0, strlen($dirname) - 1); // remove / if it is there to be consistent for URL\n return $dirname;\n }",
"public static function sanitizeDirPath($dir) {\n if(in_array(substr($dir, -1), array('/', '\\\\'))) {\n $dir = substr($dir, 0, strlen($dir) - 1);\n }\n return $dir;\n }",
"public function getPathWithoutBase($basePath, $basePathIsAlreadyDecoded = TRUE);",
"protected function getAbsoluteBasePath() {}",
"function dirPath() {return (\"../../../../\"); }",
"function basepath() {\n $path = getenv('BASEPATH');\n if (empty($path)) {\n return '';\n }\n return rtrim($path, '/');\n}",
"private function get_base_path() : string {\n return plugin_dir_path( dirname( __FILE__, 2 ) );\n }",
"protected function get_normalized_rest_base() {\n\t\treturn preg_replace( '/\\(.*\\)\\//i', '', $this->rest_base );\n\t}",
"function dirPath () { return (\"../../\"); }",
"function serendipity_getRealDir($file) {\n $dir = str_replace( \"\\\\\", \"/\", dirname($file));\n $base = preg_replace('@/include$@', '', $dir) . '/';\n return $base;\n}",
"private function baseName(){\n \n if ($this->baseName===null) {\n $this->baseName= implode('/', array_slice(explode('/', $_SERVER['SCRIPT_NAME']), 0, -1)) . '/';\n }\n return $this->baseName;\n\n }",
"function cleanPath($path) {\n // files////janko/mika\n\n while (strpos($path, \"//\") !== FALSE) {\n $path = str_replace(\"//\", \"/\", $path);\n }\n\n return $path;\n}",
"function dirPath() { return (\"../\"); }",
"public static function _getAppDir($noSlashes){\n return ($noSlashes) ? ltrim(self::APP_BASE_DIR,'/') : self::APP_BASE_DIR;\n }",
"function base_path() {\n\treturn str_replace('index.php','',$_SERVER['SCRIPT_NAME']);\n}",
"public function source_subfolder()\n\t{\n\t\t$settings = $this->source()->settings();\n\t\treturn !empty($settings->subfolder) ? rtrim($settings->subfolder, '/').'/' : '';\n\t}",
"public static function cleanFilePath( $path ) {\n\t\t\t$path = str_replace( '', '', str_replace( array( '\\\\', '\\\\\\\\', '//' ), '/', $path ) );\n\t\t\tif ( $path[ strlen( $path ) - 1 ] === '/' ) {\n\t\t\t\t$path = rtrim( $path, '/' );\n\t\t\t}\n\n\t\t\treturn $path;\n\t\t}",
"protected static function generate_base_url()\n\t{\n\t\t$base_url = parent::generate_base_url();\n\t\treturn str_replace('htdocs/novius-os/', '', $base_url);\n\t}",
"private static function absolutize( $path, $base ) {\n\t\tif ( ! empty( $path ) && ! \\WP_CLI\\Utils\\is_path_absolute( $path ) ) {\n\t\t\t$path = $base . DIRECTORY_SEPARATOR . $path;\n\t\t}\n\t\treturn $path;\n\t}",
"public static function normalizePath(string $path): string\n {\n $path = str_replace('~', $_SERVER['HOME'], $path);\n return rtrim($path, DIRECTORY_SEPARATOR);\n }",
"static function base()\n {\n return trim(App::router()->getBase(), '/');\n }",
"function path_clean($path){\n $path = trim($path);\n $path = str_replace(\"/\",\"\\\\\",$path); // this kills me\n while (strstr($path,\"\\\\\\\\\")) $path = str_replace(\"\\\\\\\\\",\"\\\\\",$path);\n return $path;\n}",
"protected function getBaseInstallationPath()\n {\n\n if ( !$this->composer || !$this->composer->getPackage() ) {\n return self::DEFAULT_ROOT;\n }\n\n $extra = $this->composer->getPackage()->getExtra();\n\n if ( !$extra || empty( $extra['module-dir'] ) ) {\n return self::DEFAULT_ROOT;\n }\n\n return $extra['module-dir'];\n }",
"public function getRelativePath() {\n $str = str_replace(Storage::disk('public')->url(''), '', $this->url);\n $str = str_replace($this->file_name, '', $str);\n return $str;\n }",
"function get_base_dir() {\n return $this->base_dir;\n }",
"public function standardizePath()\n {\n $arrPath = func_get_args();\n\n if (count($arrPath) == 0 || $arrPath == null || $arrPath == \"\")\n {\n return \"\";\n }\n\n $strVar = \"\";\n\n foreach ($arrPath as $itPath)\n {\n $itPath = str_replace(array(TL_ROOT, \"\\\\\"), array(\"\", \"/\"), $itPath);\n $itPath = explode(\"/\", $itPath);\n\n foreach ($itPath as $itFolder)\n {\n if ($itFolder == \"\" || $itFolder == \".\" || $itFolder == \"..\")\n {\n continue;\n }\n\n $strVar .= \"/\" . $itFolder;\n }\n }\n\n return preg_replace(\"/^\\//i\", \"\", $strVar);\n }",
"public static function getBasepath()\n {\n if (! self::$basePath) {\n $candidate = getcwd() ?: dirname(dirname(dirname(dirname(__FILE__))));\n self::$basePath = rtrim($candidate, DIRECTORY_SEPARATOR);\n }\n\n return self::$basePath;\n }",
"private function _removeDirsAndSuffix($filePath)\n {\n $filePath = basename($filePath);\n if (strrpos($filePath, '.'))\n {\n $filePath = substr($filePath, 0, strrpos($filePath, '.'));\n }\n return $filePath;\n }",
"protected function getSubdirectory(): string\n {\n return empty($this->subdirectory) ?\n strtolower(array_reverse(explode('\\\\', \\get_class($this)))[1]) :\n $this->subdirectory;\n }",
"public static function filterDir( $path, string $root ) {\n\t\tif ( \\strpos( $path, '..' ) ) {\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\t$lp\t= \\strlen( $root );\n\t\tif ( \\strlen( $path ) < $lp ) { \n\t\t\treturn ''; \n\t\t}\n\t\t$pos\t= \\strpos( $path, $root );\n\t\tif ( false === $pos ) {\n\t\t\treturn '';\n\t\t}\n\t\t$path\t= \\substr( $path, $pos + $lp );\n\t\treturn \\trim( $path ?? '' );\n\t}",
"public function base_dir(){\n return $this->plugin_dir() . 'base/';\n }",
"public function getBaseDirectory()\n {\n return $this->baseDirectory;\n }",
"public static function getBasepath()\n {\n if (!self::$basePath) {\n $candidate = getcwd() ?: dirname(dirname(dirname(dirname(__FILE__))));\n self::$basePath = rtrim($candidate, DIRECTORY_SEPARATOR);\n }\n\n return self::$basePath;\n }",
"public static function getBasepath()\n {\n if (!self::$basePath) {\n $candidate = getcwd() ?: dirname(dirname(dirname(dirname(__FILE__))));\n self::$basePath = rtrim($candidate, DIRECTORY_SEPARATOR);\n }\n\n return self::$basePath;\n }",
"public function getRootDir(){\n\t\treturn str_replace(realpath($_SERVER['DOCUMENT_ROOT']), \"\", realpath(dirname(__DIR__ . \"/../core.php\")));\n\t}",
"function base_path()\n {\n $paths = getPaths();\n\n return $paths['base'];\n }",
"public static function getBasePath()\n {\n\n $baseUrl = trim(_PS_BASE_URL_, '/') . '/';\n\n $baseUri = trim(__PS_BASE_URI__, '/');\n\n // Do some check on subfolder.\n if(!empty($baseUri)) {\n\n $baseUri = $baseUri . '/';\n\n }\n\n return $baseUrl . $baseUri;\n }",
"public function getBasePart(): string\n {\n $string = str_replace($this->getLastPart(), \"\", $this->getFqcn());\n if (isset($string[-1]) && $string[-1] == \"\\\\\") {\n $string = substr($string, 0, -1);\n }\n \n return $string;\n }",
"public function get_base_root()\r\n {\r\n return realpath(ROOT_DIR_NAME);\r\n }",
"function remove_trailing_slash($path) {\n\treturn rtrim($path, '/');\n}",
"public static function sanitize_relative_path( $path ) {\n\t\treturn preg_replace( '/#(SITE|CONTENT)#/', '', $path );\n\t}",
"private function basePath(): string\n\t{\n\t\treturn rtrim((new RequestFactory)\n\t\t\t->fromGlobals()->url->basePath, '/');\n\t}",
"public function getBaseURL(){\n\t\tif($this->htaccess){\n\t\t\treturn \"/\";\n\t\t}\n\t\treturn \"\";\n\t}",
"public function clean_directory($theDir)\n {\n // proceeds if no '//', '..' or '\\' is in the $theFile\n if (GeneralUtility::validPathStr($theDir)) {\n // Removes all dots, slashes and spaces after a path...\n $theDir = preg_replace('/[\\\\/\\\\. ]*$/', '', $theDir);\n if (!GeneralUtility::isAbsPath($theDir) && @is_dir($theDir)) {\n return $theDir;\n }\n }\n return '';\n }",
"public function getBaseDir()\n\t{\n\t\treturn $this->baseDir;\n\t}",
"public function get_base_dir($base = '.', $verbose = \\false)\n {\n }",
"function wp_normalize_path($path)\n {\n }",
"protected function normalizeFilename($path)\n {\n if (file_exists($path)) {\n $path = realpath($path);\n }\n\n return str_replace(base_path(), '', $path);\n }",
"private function basePath()\n {\n $directory = dirname((new \\ReflectionClass(self::class))->getFileName());\n\n return $directory . '/../../../../twig-bridge/src/BenGorUser/TwigBridge/Infrastructure/Ui';\n }",
"public static function getBasePath()\n {\n $base_path = substr(trim(\\ROOT, '/'), strlen(trim($_SERVER['DOCUMENT_ROOT'], '/')));\n if (DS !== '/') {\n $base_path = str_replace(DS, '/', $base_path);\n }\n return $base_path;\n }",
"public function fix_dir_index($s) {\n\t\t$s = preg_replace(\"/[\\/]+/\", \"/\", $s);\n\t\t/* $s = preg_replace(\"/[\\/]+$/\", \"/\", $s); */\n\t\t$s = preg_replace(\"/^\\//\", \"\", $s);\n\t\treturn $s;\n\t}",
"function rpath($a) {\n return str_replace(_X_ROOT, '', $a);\n }",
"function remove_dot_segments( $path ) {\n //It excludes any parameters if added to absolute url and provides baseurl\n $inSegs = preg_split( '!/!u', $path );\n $outSegs = array( );\n foreach ( $inSegs as $seg )\n {\n if ( empty( $seg ) || $seg == '.' ) {\n continue;\n }\n if ( $seg == '..' ) {\n array_pop( $outSegs );\n }\n else {\n array_push( $outSegs, $seg );\n }\n }\n $outPath = implode( '/', $outSegs );\n if ( isset($path[0]) && $path[0] == '/' ) {\n $outPath = '/' . $outPath;\n }\n if ( $outPath != '/' &&\n (mb_strlen($path)-1) == mb_strrpos( $path, '/', 'UTF-8' ) ) {\n $outPath .= '/';\n }\n $outPath = str_replace('http:/', 'http://', $outPath);\n $outPath = str_replace('https:/', 'https://', $outPath);\n $outPath = str_replace(':///', '://', $outPath);\n return rawurldecode($outPath);\n }",
"private function oneLevelUp()\n {\n if ($this->currentPath == $this->rootPath) {\n return $this->rootPath;\n }\n $currentPath = rtrim($this->currentPath, '/');\n return substr($this->currentPath, 0, strrpos($currentPath, \"/\"));\n }",
"public function getBaseDirectory()\n {\n return $this->getParam(DirectoryKeys::BASE);\n }",
"public function getBaseSlug()\n {\n $slug = $this->slug;\n\n if (substr($slug, -6) == '/index') {\n $slug = rtrim($slug, 'index');\n }\n\n return $slug;\n }",
"protected function stripPublic(string $path): string\n {\n $publicDir = 'public/';\n $length = strlen($publicDir);\n\n if (substr($path, 0, $length) === $publicDir) {\n return substr($path, $length);\n }\n\n return $path;\n }",
"public function getBaseDir()\n {\n return $this->filesystem->getDirectoryWrite(DirectoryList::MEDIA)->getAbsolutePath(self::MEDIA_PATH);\n\n }",
"public function getBasePath()\n {\n return dirname($this->file);\n }",
"function BDC_NormalizePath($p_Path) {\n $canonical = str_replace('\\\\', '/', $p_Path);\n // ensure ending slash\n $canonical = rtrim($canonical, '/');\n $canonical .= '/';\n return $canonical;\n}",
"public function getBranchlessPath()\n {\n $pattern = '#^/?-' . $this->getBranchName() . '-/?#';\n return preg_replace($pattern, '', $this->getPathInfo());\n }",
"public static function remove_the_slash( $url ) {\n return str_replace( \"/\", \"\", $url );\n }",
"function tc_sanitize_uploads( $url ) {\r\n $upload_dir = wp_upload_dir();\r\n return str_replace($upload_dir['baseurl'], '', $url);\r\n }",
"function cap_make_path_relative_to ($path, $base)\n{\n $base = rtrim ($base, '/') . '/';\n if (strncmp ($path, $base, strlen ($base)) == 0) {\n return substr ($path, strlen ($base));\n }\n return $path;\n}",
"function return_base_URL(){\n\t$current_url = \"http://\" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n\n\t$current_url = explode('/', $current_url);\n\tunset($current_url[count($current_url) - 1]);\n\t$current_url = implode('/', $current_url);\n\n\treturn $current_url . '/';\n}",
"public function diruri() {\n if(isset($this->cache['diruri'])) return $this->cache['diruri'];\n return $this->cache['diruri'] = ltrim($this->parent()->diruri() . '/' . $this->dirname(), '/');\n }"
] | [
"0.68108726",
"0.6735982",
"0.6509385",
"0.64558506",
"0.62983984",
"0.61849594",
"0.6182563",
"0.61692953",
"0.6165911",
"0.61442226",
"0.6121962",
"0.6117205",
"0.6113591",
"0.6106034",
"0.61008084",
"0.60910326",
"0.60876644",
"0.60421264",
"0.601965",
"0.60113966",
"0.5992556",
"0.5990869",
"0.5989335",
"0.59891385",
"0.59887356",
"0.59845614",
"0.5974572",
"0.59479064",
"0.5932903",
"0.59322476",
"0.5931479",
"0.592342",
"0.5922554",
"0.5920574",
"0.5903507",
"0.58941954",
"0.5864769",
"0.5860238",
"0.5857365",
"0.5856977",
"0.5854839",
"0.5851918",
"0.58495843",
"0.58447844",
"0.5838525",
"0.5826607",
"0.582443",
"0.5824215",
"0.5817567",
"0.57958317",
"0.57919663",
"0.5773186",
"0.57726586",
"0.5764295",
"0.57633704",
"0.5758565",
"0.5743628",
"0.5740369",
"0.573939",
"0.57343644",
"0.5722378",
"0.5720979",
"0.57161534",
"0.5715058",
"0.5711382",
"0.57106787",
"0.5710413",
"0.5709618",
"0.5709618",
"0.5709115",
"0.5709041",
"0.5705902",
"0.5694465",
"0.5692091",
"0.56840044",
"0.5677932",
"0.5665097",
"0.5659338",
"0.56572735",
"0.56557494",
"0.5653378",
"0.56508756",
"0.5640191",
"0.56359124",
"0.5633416",
"0.56322265",
"0.5632171",
"0.5628925",
"0.5622738",
"0.56199473",
"0.5616156",
"0.5611715",
"0.56106097",
"0.5605955",
"0.55994004",
"0.5596712",
"0.55957806",
"0.55943775",
"0.5594176",
"0.5593851",
"0.55907536"
] | 0.0 | -1 |
Return the path wrapper (for testing purposes mainly) | protected function path($path)
{
return $this->root . $path;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getPath(): string;",
"abstract protected function getPath();",
"public function getPath(): string;",
"public function getPath(): string;",
"public function getPath(): string;",
"public function getPath(): string;",
"public function getPath(): string;",
"public function getPath(): string;",
"public function getPath(): string;",
"public function getPath(): string;",
"public function getPath() : string;",
"protected abstract function getPath();",
"public function path(): string;",
"public function path(): string;",
"public function getPath() {}",
"public function getPath() {}",
"public function getPath() {}",
"public function getPath() {}",
"public function getPath() {}",
"public function getPath() {}",
"public function path() {}",
"public function path() {}",
"public function path();",
"public function getPath(){ }",
"public function getPath(){ }",
"public function getFullPath(): string;",
"function path($path='') {\n return $this->base_dir . $path;\n }",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPathLocation(): string;",
"public function getFilesystemPath()\n {\n return new FilesystemPath($this->__toString());\n }",
"public function get_path(): string\n {\n return $this->path;\n }",
"protected function createPathIfNeeded() {}",
"private function getWrapperPath()\n {\n return realpath(__DIR__.'/../../../src/evidev/composer/Wrapper.php');\n }",
"function statamic_path($path = null)\n{\n return path(APP, $path);\n}",
"public static function getPath()\n {\n }",
"public function getFullPath();",
"private function _getPath():string {\n\n # Declare result\n $result = self::PATH;\n\n # check constant\n if(Env::has(\"phpunit_test\") && Env::get(\"phpunit_test\"))\n\n # Set result\n $result = self::PATH_TEST;\n\n # Strange reaction... Allow to debug next command... ¯\\_(ツ)_/¯\n Env::get(\"crazyphp_root\");\n\n # Process result\n $result = File::path($result);\n\n # Return result\n return $result;\n\n }",
"public function test_get_wrapper_path() {\n /**\n * Test test stream wrapper implementation\n */\n $actual = WP_Stream::new_wrapper_instance('test://')->get_wrapper_path();\n $this->assertEquals($this->test_dir, $actual);\n\n /**\n * Test local stream wrapper implementation\n */\n $actual = WP_Stream::new_wrapper_instance('local://')->get_wrapper_path();\n $this->assertEquals(WP_CONTENT_DIR, $actual);\n }",
"public function getPath() { return $this->_path; }",
"private static function getPath() : string {\n return getBasePath() . '/miaus';\n }",
"function getPathParser();",
"public function get_path() : string\n {\n return $this->path;\n }",
"public function _getObjectPath(){\n if(null === $this->_path || !$this->_path instanceof Path){\n $this->_path = New Path();\n }\n return $this->_path;\n }",
"public function path($path = null);",
"public function path($path = null);",
"public function path(): ?string;",
"protected static function getPathsInternal() {}",
"protected\n function getPath($path)\n {\n // By default, we won't do anything, but\n // it can be overridden from a child class\n return $path;\n }",
"public function getPath(): string\r\n {\r\n return $this->path;\r\n }",
"public function getPath(): string\r\n {\r\n return $this->path;\r\n }",
"public function getPath() : string\n {\n return $this->path;\n }",
"public function getFoundPath() {}",
"protected function getPathHelperService()\n {\n return $this->services['path_helper'] = new \\phpbb\\path_helper(${($_ = isset($this->services['symfony_request']) ? $this->services['symfony_request'] : $this->getSymfonyRequestService()) && false ?: '_'}, ${($_ = isset($this->services['filesystem']) ? $this->services['filesystem'] : ($this->services['filesystem'] = new \\phpbb\\filesystem\\filesystem())) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'}, './../', 'php', 'adm/');\n }",
"private function getPath()\n {\n return $this->path;\n }",
"public function getPath() : Path\n {\n return $this->path;\n }",
"protected abstract function getAbsolutePath(): string;",
"public function path(): string\n {\n return $this->path;\n }",
"function realpath($path)\n{\n return $path;\n}",
"private function getPath()\n\t{\n\t\treturn $this->_sys_path;\n\t}",
"public function getPath()\n\t{\n\t\t\n\t\t$this->setPath();\n\t\treturn $this->path;\n\t\t\n\t}",
"function dirPath () { return (\"../../\"); }",
"abstract public function getCurrentPath();",
"function dirPath() { return (\"../\"); }",
"public function getPath()\n {\n return $this->wrapped->getPath();\n }",
"public function getPathToFile(): string;",
"public function getPath(): string\n {\n return $this->path;\n }",
"public function getPath(): string\n {\n return $this->path;\n }",
"public function getPath(): string\n {\n return $this->path;\n }",
"public function getPath(): string\n {\n return $this->path;\n }",
"public function getPath(): string\n {\n return $this->path;\n }",
"public function get_path() {\n\t\treturn $this->path;\n\t}",
"public function get_path() {\n\t\treturn $this->path;\n\t}",
"function root_path($path = null)\n{\n return statamic_path('../' . $path);\n}",
"public function getAbsolutePath() {}",
"public function getAbsolutePath() {}",
"protected function _getPath()\n {\n if (!empty($this->_path)) {\n return $this->_path;\n }\n\n $id = $this->_config['id'];\n $dir0 = $id % 10000;\n $dir1 = $dir0 % 100;\n $dir2 = $dir0 - $dir1 * 100;\n if ($dir2 < 0) {\n $dir2 = 0;\n }\n $path = 'apps/';\n\n switch ($this->_config['section']) {\n case 1 :\n $path .= 'scripteditor/' . $dir2 . '/' . $dir1 . '/';\n break;\n \tcase 2 :\n $path .= 'slave/' . $dir2 . '/' . $dir1 . '/';\n break;\n default :\n $path .= 'tmp/';\n break;\n }\n $this->_path = $path;\n return $this->_path;\n }",
"final protected function getPathProvider()\n {\n return $this->pathProvider;\n }",
"public function getPath(): string {\n\t\treturn $this->path;\n\t}",
"public function getLocalPath();",
"public function getPath()\n {\n return $this->__get(\"path\");\n }",
"protected function getInstancePath() {}",
"protected function getPath(){\n\t\tif(is_null($this->path)) {\n\t\t\tthrow new \\Exception('Call \"setPath\" first!');\n\t\t}\n\n\t\treturn $this->path;\n\t}",
"public function getPath() : Path\n {\n return new Path($this->uri->getPath() ?: '/');\n }",
"public function getPath()\n {\n return $this->path;\n }",
"public function getPath()\n {\n return $this->path;\n }",
"public function getPath()\n {\n return $this->path;\n }",
"public static function getPath() {\n\t\tif ($args = func_get_args()) {\n\t\t\t$path = self::_getPath($args);\n\t\t} else {\n\t\t\t$path = '';\n\t\t}\n\t\treturn self::fixSlash($path);\n\t}",
"function realPath($path, $relative_to = NULL, $resolve_symlink = TRUE);"
] | [
"0.7434491",
"0.7393222",
"0.7297917",
"0.7297917",
"0.7297917",
"0.7297917",
"0.7297917",
"0.7297917",
"0.7297917",
"0.7297917",
"0.7273592",
"0.7248919",
"0.7196188",
"0.7196188",
"0.71178836",
"0.71178836",
"0.71178836",
"0.71178836",
"0.7117539",
"0.711722",
"0.70903593",
"0.7090151",
"0.7075838",
"0.7067379",
"0.7067379",
"0.7020993",
"0.69738334",
"0.6926203",
"0.6926203",
"0.6926203",
"0.6926203",
"0.6926203",
"0.6926203",
"0.6926203",
"0.6926203",
"0.6926203",
"0.6926203",
"0.6926203",
"0.6926203",
"0.6926203",
"0.6926203",
"0.6880054",
"0.68495905",
"0.6787195",
"0.6785169",
"0.6732093",
"0.6711962",
"0.6709526",
"0.66826093",
"0.6661608",
"0.6645847",
"0.6613262",
"0.6609047",
"0.6594153",
"0.6585532",
"0.65720296",
"0.6571864",
"0.6571864",
"0.6558242",
"0.65548307",
"0.654886",
"0.65365803",
"0.65365803",
"0.6532052",
"0.6531909",
"0.6530341",
"0.65270245",
"0.6526287",
"0.6517038",
"0.6498649",
"0.6491708",
"0.6488677",
"0.64685476",
"0.6449986",
"0.64480066",
"0.644628",
"0.64331",
"0.6432636",
"0.64309454",
"0.64309454",
"0.64309454",
"0.64309454",
"0.64309454",
"0.64123946",
"0.64123946",
"0.63964987",
"0.6389193",
"0.6389193",
"0.6387873",
"0.63705736",
"0.63617563",
"0.6359635",
"0.6353796",
"0.6351894",
"0.6345878",
"0.63454574",
"0.6341482",
"0.6341482",
"0.6341482",
"0.63403535",
"0.6330558"
] | 0.0 | -1 |
Core::getCourier Online Booking delivered() | public function getCourier_list_booking_delivered()
{
$sql = "SELECT a.id, a.order_inv, a.r_name, a.c_driver, a.r_address, a.r_dest, a.r_city, a.r_curren, a.r_costtotal, a.r_description, a.total_insurance, a.total_tax, a.payment_status, a.pay_mode, a.created, a.r_hour, a.status_courier, a.act_status, a.con_status, s.mod_style, s.color FROM add_courier a, styles s WHERE a.status_courier=s.mod_style AND a.username = '".$this->username."' AND a.status_courier='Delivered' ORDER BY a.id ASC";
$row = self::$db->fetch_all($sql);
return ($row) ? $row : 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDeliveredCount()\n {\n return $this->deliveredCount;\n }",
"public function isReadyForIssuing()\n {\n return $this->isFeePaid();\n }",
"public function isRedelivered();",
"public function getDeliveries()\n {\n return $this->deliveries;\n }",
"public function get_booked() {\n return $this->booked;\n }",
"public function isDelivered() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->deliveryDate) ? false: true;\r\n\t}",
"public function getTotalDeliveredQuantity()\n {\n return $this->totalDeliveredQuantity;\n }",
"public function getDeliveryOrder();",
"public function getDeliverable()\n {\n return false;\n }",
"public function hasBoothfee(){\n return $this->_has(6);\n }",
"public function getTotalRefunded();",
"public function getTotalOnlineRefunded();",
"public function getTimeDelivery()\n {\n return $this->timeDelivery;\n }",
"public function getDeliveryReport();",
"public function isDeliverable()\n {\n $deliverable = false;\n\n foreach ($this->getItems() as $item) {\n if ($item->Deliverable) {\n $deliverable = true;\n }\n }\n\n return $deliverable;\n }",
"public function getShippingRefunded();",
"public function getCollected(){\n return $this->aCollected;\n }",
"public function getSatoshisReceived();",
"public function getShippingInvoiced();",
"public function IsBookable()\n\t{\treturn $this->details['tqty'] > $this->details['tbooked'];\n\t}",
"public function getSubtotalRefunded();",
"public function getDelivery()\n {\n return $this->delivery;\n }",
"public function isBounced()\n {\n return $this->getBounceTime() > 0;\n }",
"function on_backorder() {\n\t\treturn ($this->_item_availability->available_to_promise <= $this->backorder_quantity);\n\t}",
"protected function payForBooking($args) {\n\n if ($args['ent_appnt_dt'] == '' || $args['ent_date_time'] == '')\n return $this->_getStatusMessage(1, 1);\n\n $this->curr_date_time = urldecode($args['ent_date_time']);\n\n $args['ent_appnt_dt'] = urldecode($args['ent_appnt_dt']);\n\n $returned = $this->_validate_token($args['ent_sess_token'], $args['ent_dev_id'], '2');\n\n if (is_array($returned))\n return $returned;\n\n $getApptDetQry = \"select a.duration,a.distance_in_mts,a.coupon_code,a.tip_amount as tip,a.discount,a.meter_fee as meter,a.parking_fee as parking,a.toll_fee as toll,a.airport_fee as airport,a.status,a.payment_type,a.appt_lat,a.appt_long,a.drop_lat,a.drop_long,a.address_line1,a.address_line2,a.created_dt,a.arrive_dt,a.appointment_dt,a.amount,a.appointment_id,a.last_modified_dt,(select email from master where mas_id = a.mas_id) as master_email from appointment a where a.appointment_dt = '\" . $args['ent_appnt_dt'] . \"' and a.slave_id = '\" . $this->User['entityId'] . \"' and a.status = 9\";\n $apptDet = mysql_fetch_assoc(mysql_query($getApptDetQry, $this->db->conn));\n\n if ($apptDet['status'] == '4')\n return $this->_getStatusMessage(41, 3);\n\n if ($apptDet['status'] == '5')\n return $this->_getStatusMessage(82, 3);\n\n $masData = $this->_getEntityDet($apptDet['master_email'], '1');\n\n\n $transferString = '';\n\n// $message = \"Payment completed for booking dated \" . date('d-m-Y h:i a', strtotime($apptDet['appointment_dt'])) . \" on \" . $this->appName . \"!\";\n\n $tipText = \"\";\n\n if ($apptDet['tip'] > 0)\n $tipText = \" with tip \" . $apptDet['tip'];\n\n $transferAmt = (((float) $apptDet['amount']) * (90 / 100));\n\n if ($apptDet['payment_type'] == '1') {\n\n $message = \"You have received payment via card for booking id \" . $apptDet['appointment_id'] . \" on \" . $tipText . date('d-m-Y h:i a', strtotime($apptDet['appointment_dt'])) . \".\";\n\n $chargeCustomerArr = array('stripe_id' => $this->User['stripe_id'], 'amount' => (int) ((float) $apptDet['amount'] * 100), 'currency' => 'USD', 'description' => 'From ' . $this->User['email']);\n\n $customer = $this->stripe->apiStripe('chargeCard', $chargeCustomerArr);\n\n if ($customer['error'])\n $charge = array('errNum' => 16, 'errFlag' => 1, 'errMsg' => $customer['error']['message'], 'test' => 1);\n\n $gatewayCommision = (float)($apptDet['amount'] * (2.9 / 100)) + 0.3;\n\n $appCommision = (float)(($apptDet['amount']) * (10 / 100));//$apptDet['amount'] - $transferAmt;\n\n $mas = (((float) ($apptDet['amount']) - $appCommision) - $gatewayCommision); //$transferAmt - $appCommision - $gatewayCommision;\n \n $transferString = \", mas_earning = '\" . round($mas, 2) . \"', pg_commission = '\" . $gatewayCommision . \"',app_commission = '\" . $appCommision . \"'\";\n }else if ($apptDet['payment_type'] == '2') {\n\n $appCommision = $apptDet['amount'] - $transferAmt;\n\n $transferString = \", mas_earning = '\" . round($transferAmt, 2) . \"', app_commission = '\" . $appCommision . \"'\";\n\n $message = \"You have received payment via cash for booking id \" . $apptDet['appointment_id'] . \" on \" . $tipText . date('d-m-Y h:i a', strtotime($apptDet['appointment_dt'])) . \".\";\n }\n\n $duration_in_mts = $apptDet['duration']; //round(abs(strtotime($this->curr_date_time) - strtotime($apptDet['arrive_dt'])) / 60, 2);\n// $fare = number_format((float) (($distance_in_mtr / $this->distanceMetersByUnits) * $typeData['price_per_km']), 2, '.', '');\n// $distance_in_mts = $apptDet['distance_in_mts'];\n\n $dis_in_km = (float) ($apptDet['distance_in_mts'] / $this->distanceMetersByUnits);\n\n// $dis_in_miles = (float) ($distance_in_mts / 1609.36);\n\n $speed_in_mts = $dis_in_km / ($duration_in_mts / 60);\n\n $apptDet['invoice_id'] = 'RY' . str_pad($apptDet['appointment_id'], 6, '0', STR_PAD_LEFT);\n\n $apptDet['speed_in_mts'] = $speed_in_mts;\n\n $apptDet['appt_duration'] = $duration_in_mts;\n\n $apptDet['appt_distance'] = round($dis_in_km, 4);\n\n $apptDet['final_amount'] = $apptDet['amount'];\n\n $mail = new sendAMail($this->host);\n $invoMail = $mail->sendInvoice($masData, $this->User, $apptDet);\n\n $updateInvoiceDetailsQry = \"update appointment set payment_status = '1',inv_id = '\" . $apptDet['invoice_id'] . \"'\" . $transferString . \" where appointment_id = '\" . $apptDet['appointment_id'] . \"'\"; //mas_id = '\" . $masData['mas_id'] . \"' and slave_id = '\" . $this->User['entityId'] . \"' and \n mysql_query($updateInvoiceDetailsQry, $this->db->conn);\n\n $aplPushContent = array('alert' => $message, 'nt' => '11', 'n' => $this->User['firstName'] . ' ' . $this->User['last_name'], 'd' => $args['ent_appnt_dt'], 'e' => $this->User['email']);\n $andrPushContent = array(\"payload\" => $message, 'action' => '11', 'sname' => $this->User['firstName'] . ' ' . $this->User['last_name'], 'dt' => $args['ent_appnt_dt'], 'smail' => $this->User['email']);\n\n $this->ios_cert_path = $this->ios_roadyo_pas;\n $this->ios_cert_pwd = $this->ios_pas_pwd;\n $this->androidApiKey = $this->slaveApiKey;\n $push = $this->_sendPush($this->User['entityId'], array($masData['mas_id']), $message, '11', $this->User['email'], $this->curr_date_time, '1', $aplPushContent, $andrPushContent);\n $out = array('push' => $push, 'charge' => $charge, 'tr' => $transfer, 'invoice' => $invoMail, 'qry' => $updateInvoiceDetailsQry . $getApptDetQry);\n return $this->_getStatusMessage(84, $out);\n }",
"public function getCourier_deliveries_list()\n {\n $sql = \"SELECT a.id, a.order_inv, a.c_driver, a.r_address, a.created, a.r_hour, a.status_courier, a.act_status, s.mod_style, s.color FROM consolidate a, styles s WHERE a.status_courier=s.mod_style AND a.c_driver = '\".$this->username.\"' AND a.act_status=1 ORDER BY a.id ASC\";\n $row = self::$db->fetch_all($sql);\n \n return ($row) ? $row : 0;\n }",
"function show_estimated_ship_date_new_subscription_orders_email( $order ) { \n $item = array_pop( $order->get_items() );\n if ( $order->status == 'processing' && $item['name'] != 'Try or Gift' ) {\n echo '<h2>Estimated Shipment Date</h2>';\n echo '<p>Your package ships by: <strong>' . new_orders_next_subscription_ship_date( $order->order_date ) . '</strong>.</p>';\n }\n}",
"public function getDiscountRefunded();",
"public function isInvoiced() {\n\t\treturn true;\n\t}",
"public function getBookingChannel()\n {\n return $this->bookingChannel;\n }",
"function checkdelivery($package) {\n\n\t$item = $package['item'];\t\n\t$quantity = $package['quantity'];\t\n\t$to = $package['to'];\t\n\t$from = $package['from'];\t\n\n// Based on the location of the delivery address and \n// the warehouse the courier can decide if they can \n// make the delivery. If yes, they could then let the \n// warehouse know the cost and delivery date.\n\n\t$accepted = 1;\n\n\tif ( $accepted )\n\t{\n\t\t$cost = 10;\n\t\t$date = '12-05-2004';\n\n\t\t$output = array(\n\t\t\t\t\t'accepted' => $accepted,\n\t\t\t\t\t'cost' => $cost,\n\t\t\t\t\t'date' => $date\n\t\t\t\t\t);\n\t} else {\n\t\t$output = array(\n\t\t\t\t\t'accepted' => $accepted,\n\t\t\t\t\t'cost' => 0,\n\t\t\t\t\t'date' => 'null'\n\t\t\t\t\t);\n\t}\n\n return new soapval('return', 'DeliveryDetail', $output, false, 'urn:MyURN');\n}",
"public function onBeforeDelivery() {\n if($this->owner->onlyDownloadable()) {\n return $this\n ->owner\n ->redirect($this->owner->Link('finish'));\n }\n }",
"public function getPriceDelivery()\n {\n return $this->priceDelivery;\n }",
"public function getActualDeliveryDate()\n {\n return $this->actualDeliveryDate;\n }",
"public function getActualDeliveryDate()\n {\n return $this->actualDeliveryDate;\n }",
"public function deliverPresentationB()\n {\n return $this->mailer->deliverPresentationB($this->data);\n }",
"public function get_amount_requested()\n {\n }",
"public function get_class_booked_count() {\n $class = $this->input->post('class');\n $result = $this->class->get_class_details($this->tenant_id, $class);\n if ($result->class_pymnt_enrol == 'PDENROL') {\n $totalbooked = $this->class->get_class_booked($result->course_id, $result->class_id, $this->tenant_id);\n $available = $result->total_seats - $totalbooked;\n } else {\n $available = 'any';\n }\n echo $available;\n }",
"public function deliver()\n {\n $GLOBALS['SITE_DB']->query_update('invoices', array('i_state' => 'delivered'), array('id' => get_param_integer('id')), '', 1);\n\n $url = build_url(array('page' => '_SELF', 'type' => 'undelivered'), '_SELF');\n return redirect_screen($this->title, $url, do_lang_tempcode('SUCCESS'));\n }",
"function booking_on_hold($book_id)\r\n\t{\r\n\r\n\t}",
"public function getTotalOfflineRefunded();",
"function scan_delivery_akw()\r\n\t{\r\n\t\t$user=$this->erpm->auth();\r\n\t\tif(!$_POST)\r\n\t\t\tdie();\r\n\t\t$invoice_no=$this->input->post('invoice_no');\r\n\t\t\r\n\t\t$inv_exist=$this->db->query(\"select count(*) as ttl from shipment_batch_process_invoice_link where invoice_no=? and invoice_no!=0\",$invoice_no)->row()->ttl;\r\n\t\t\r\n\t\tif(!$inv_exist)\r\n\t\t\tdie(\"<div class='invoice_not_found' style='background:#cd0000;'>AWB/Invoice/Order No:{$invoice_no} not found</div>\");\r\n\t\t\r\n\t\t$is_shiped=$this->db->query(\"select count(*) as ttl from shipment_batch_process_invoice_link where invoice_no=? and invoice_no!=0 and shipped=1\",$invoice_no)->row()->ttl;\r\n\t\t\r\n\t\tif(!$is_shiped)\r\n\t\t\tdie(\"<div class='invoice_not_shipped' style='background:purple;'>AWB/Invoice/Order No:{$invoice_no} not Shipped</div>\");\r\n\t\t\r\n\t\t$is_delivered=$this->db->query(\"select count(*) as ttl from pnh_invoice_transit_log where invoice_no=? and status=3\",$invoice_no)->row()->ttl;\r\n\t\t\r\n\t\tif(!$is_delivered)\r\n\t\t\tdie(\"<div class='invoice_not_delivered' style='background:orange;'>AWB/Invoice/Order No:{$invoice_no} not Delivered</div>\");\r\n\t\t\r\n\t\t$is_akw=$this->db->query(\"select count(*) as ttl from shipment_batch_process_invoice_link where invoice_no=? and invoice_no!=0 and is_acknowleged=1\",$invoice_no)->row()->ttl;\r\n\t\t\r\n\t\tif($is_akw)\r\n\t\t\tdie(\"<div class='already_scaned' style='background:green;'>AWB/Invoice/Order No:{$invoice_no} already Acknowledged</div>\");\r\n\t\t\r\n\t\t$this->db->query(\"update shipment_batch_process_invoice_link set is_acknowleged=?,is_acknowleged_by=?,is_acknowleged_on=? where invoice_no=? and invoice_no!=0 and shipped=1\",array(1,$user['userid'],cur_datetime(),$invoice_no));\r\n\t\t\r\n\t\tif($this->db->affected_rows())\r\n\t\t{\r\n\t\t\tdie(\"<div class='awkscanned' style='background:#f1f1f1;color: #000 !important;'>AWB/Invoice/Order No:{$invoice_no} is Acknowledged</div>\");\r\n\t\t}\r\n\t}",
"public function updateDeliveries()\n {\n $userId = Authorizer::getResourceOwnerId();\n $agent = Agent::where('user_id', $userId)->first();\n if(!$agent)\n return Response::json(\"Error\", 400);\n\n $deliveriesJSON = Input::get('deliveries');\n\n if(!empty($deliveriesJSON)) {\n\n $deliveries = json_decode($deliveriesJSON, true);\n\n if($deliveries !== null && count($deliveries) > 0)\n {\n foreach ($deliveries as $id => $updates)\n {\n $delivery = Delivery::find(intval($id));\n\n if($delivery)\n {\n // An agent can modify just his own deliveries\n if($delivery->agent_id != $agent->id)\n return Response::json(\"Error\", 403);\n\n // Estimated times\n\n $notifySender = false;\n $notifyRecipient = false;\n\n\n if(!empty($updates[\"estimated_pickup\"]))\n {\n if(static::validateDate($updates[\"estimated_pickup\"])){\n\n if($delivery->estimated_pickup != $updates[\"estimated_pickup\"])\n {\n if(static::dateDifference($delivery->estimated_pickup, $updates[\"estimated_pickup\"]) > 300)\n {\n $notifySender = true;\n }\n $delivery->estimated_pickup = $updates[\"estimated_pickup\"];\n }\n\n }\n }\n\n if(!empty($updates[\"estimated_delivery\"]))\n {\n if(static::validateDate($updates[\"estimated_delivery\"])){\n if ($delivery->estimated_delivery != $updates[\"estimated_delivery\"])\n {\n if(static::dateDifference($delivery->estimated_delivery, $updates[\"estimated_delivery\"]) > 300)\n {\n $notifyRecipient = true;\n }\n $delivery->estimated_delivery = $updates[\"estimated_delivery\"];\n }\n }\n }\n\n // Actual times\n if(!empty($updates[\"pickup_time\"]))\n {\n if(static::validateDate($updates[\"pickup_time\"]))\n {\n $delivery->pickup_time = $updates[\"pickup_time\"];\n\n if($delivery->state == 0) \n $delivery->state = 1;\n }\n }\n\n if(!empty($updates[\"delivery_time\"]))\n {\n if(static::validateDate($updates[\"delivery_time\"]))\n {\n $delivery->delivery_time = $updates[\"delivery_time\"];\n\n if($delivery->state < 2) \n $delivery->state = 2;\n }\n }\n\n // // Delivery state (explicit)\n // if($updates[\"state\"] != null)\n // {\n // $state = intval($updates[\"state\"]);\n // if($state < 0 || $state > 2)\n // return Response::json(\"Error\", 400);\n\n // $delivery->state = $state;\n // }\n\n $delivery->save();\n\n if($notifySender) {\n $estimated_pickup = (new DateTime($delivery->estimated_pickup))->format('H:i');\n Mail::queue('emails.updatesender', ['tracking_code' => $delivery->tracking_code, 'estimated_pickup' => $estimated_pickup], function($message) use($delivery)\n {\n $message->from('[email protected]', 'BikePonyExpress');\n $message->to($delivery->sender_email)->subject('BikePonyExpress: Pickup time updated!');\n });\n }\n\n if($notifyRecipient) {\n $estimated_delivery = (new DateTime($delivery->estimated_delivery))->format('H:i');\n Mail::queue('emails.updaterecipient', ['tracking_code' => $delivery->tracking_code, 'estimated_delivery' => $estimated_delivery], function($message) use($delivery)\n {\n $message->from('[email protected]', 'BikePonyExpress');\n $message->to($delivery->recipient_email)->subject('BikePonyExpress: Delivery time updated!');\n });\n }\n }\n else\n {\n return Response::json(\"Error\", 400);\n }\n }\n\n $updatedDeliveries = $agent->deliveries()->where('state', '<', 2)->orderBy('updated_at', 'desc')->get();\n return !$updatedDeliveries? Response::json(\"Error\", 400) : $updatedDeliveries;\n }\n }\n\n return Response::json(\"Error\", 400);\n }",
"function on_buy()\r\n\t{\r\n\t}",
"public function bookingActive()\n\t{\n\t\t$ch = new Curl();\n\t\t\n\t\t$this->headers['Authorization'] = 'Bearer ' . $this->authToken;\n\t\t\n\t\t$data = [];\n\t\t\n\t\treturn $ch->get(GojekID::BASE_ENDPOINT . Action::bookingActive, $data, $this->headers)->getResponse();\n\t}",
"public function isRedelivered()\n {\n return (bool) $this->message->delivery_info['redelivered'];\n }",
"public function receiveAfricasTalking()\n {\n return $this->receive('africastalking');\n }",
"public function getActualDeliveryTime()\n {\n return $this->actualDeliveryTime;\n }",
"public function QueueSlotBooking(){\r\n //echo 'hi';\r\n $getSessionData = StringHelper::getMainSession(3);\r\n if($getSessionData == FALSE){\r\n return 0;\r\n }else{\r\n $bookingdata = Input::all(); \r\n if(!empty($bookingdata)){\r\n $returnBooking = $this->MainBooking($bookingdata,$bookingdata['booktype']); \r\n return $returnBooking;\r\n }else{\r\n return 0;\r\n } \r\n }\r\n }",
"function add( $EM_Booking ){\n\t\tglobal $wpdb,$EM_Mailer;\n\t\t//Save the booking\n\t\t$email = false;\n\t\t//set status depending on approval settings\n\t\tif( empty($EM_Booking->booking_status) ){ //if status is not set, give 1 or 0 depending on approval settings\n\t\t\t$EM_Booking->booking_status = get_option('dbem_bookings_approval') ? 0:1;\n\t\t}\n\t\t$result = $EM_Booking->save(false);\n\t\tif($result){\n\t\t\t//Success\n\t\t do_action('em_bookings_added', $EM_Booking);\n\t\t\tif( $this->bookings === null ) $this->bookings = array();\n\t\t\t$this->bookings[] = $EM_Booking;\n\t\t\t$email = $EM_Booking->email();\n\t\t\tif( get_option('dbem_bookings_approval') == 1 && $EM_Booking->booking_status == 0){\n\t\t\t\t$this->feedback_message = get_option('dbem_booking_feedback_pending');\n\t\t\t}else{\n\t\t\t\t$this->feedback_message = get_option('dbem_booking_feedback');\n\t\t\t}\n\t\t\tif(!$email){\n\t\t\t\t$EM_Booking->email_not_sent = true;\n\t\t\t\t$this->feedback_message .= ' '.get_option('dbem_booking_feedback_nomail');\n\t\t\t\tif( current_user_can('activate_plugins') ){\n\t\t\t\t\tif( count($EM_Booking->get_errors()) > 0 ){\n\t\t\t\t\t\t$this->feedback_message .= '<br/><strong>Errors:</strong> (only admins see this message)<br/><ul><li>'. implode('</li><li>', $EM_Booking->get_errors()).'</li></ul>';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->feedback_message .= '<br/><strong>No errors returned by mailer</strong> (only admins see this message)';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn apply_filters('em_bookings_add', true, $EM_Booking);\n\t\t}else{\n\t\t\t//Failure\n\t\t\t$this->errors[] = \"<strong>\".get_option('dbem_booking_feedback_error').\"</strong><br />\". implode('<br />', $EM_Booking->errors);\n\t\t}\n\t\treturn apply_filters('em_bookings_add', false, $EM_Booking);\n\t}",
"public function isValidForDelivery();",
"function dispatch_licenses(){\n\t\n//1get all unfinished orders which are paid\n//2fetch all available licences\n\n//if 1 > 0 \n\t//loop for (unfinished orders)\n \t\t//compare ordered product id with available licences\n\t\t//if available\n\t\t\t//fetch email of buyer + send email + add buyer to database\n\t\t//else \n\t\t\t//mail not available to admin\n\t//loop end\n\t\n}",
"function book($id = null) {\n\t\t\n\t\tif($this->RequestHandler->isAjax()){\n\t\t\t$this->redirect(array('controller' => 'deals', 'action'=>'getDealInfo',$id));\n\t\t}\n\t\t$deal = $this->Deal->read(null, $id);\n\t\t$reservationType = $this->Deal->GetReservationType($id);\n\t\t$this->Deal->DealPurchase->set($this->data);\n\t\tif(!empty($this->data) && $this->Deal->DealPurchase->validates()){\n\t\t\t\n\t\t\tif($reservationType == Configure::read('ReservationType.Fixed')){\n\t\t\t\n\t\t\t$nights = $deal['Deal']['max_nights'];\n\t\t\t$date1 = new DateTime($this->data['DealPurchase']['start_date']);\n\t\t\t$date1->add(new DateInterval('P' . $nights . 'D'));\n\t\t\t$this->Session->delete('Trip');\n\t\t\t$this->Session->write('Trip.start_date', $this->data['DealPurchase']['start_date']);\n\t\t\t$this->Session->write('Trip.end_date', $this->data['DealPurchase']['end_date']);\n\t\t\t$this->Session->write('Trip.days', $nights);\n\t\t\t$this->Session->write('Trip.cost', $deal['Deal']['discounted_price']);\n\t\t\t$this->Session->write('Trip.id', $id);\n\t\t\t\n\t\t\t//$this->Session->read('Trip.id');\n\t\t\t\n\t\t\t$this->redirect(array('controller' => 'deals', 'action'=>'purchase',$this->Session->read('Trip.id')));\n\t\t\t\n\t\t\t}\n\t\t\telseif($reservationType == Configure::read('ReservationType.Variable')) { \n\t\t\t\n\t\t\t\t$date1 = new DateTime($this->data['DealPurchase']['start_date']);\n\t\t\t\t$date2 = new DateTime($this->data['DealPurchase']['end_date']);\n\t\t\t\t$interval = $date1->diff($date2);\n\t\t\t\t$days = $interval->d;\n\t\t\t\t\n\t\t\t\t//There is some kind of rounding issue that floors the cost \n\t\t\t\t//when it's done this way. But now it seems to have stopped?\n\t\t\t\t$cost = (floatval($days) * floatval($deal['Deal']['discounted_price'] ));\n\t\t\t\t//debug($days);\n\t\t\t\t//debug($deal['Deal']['discounted_price']);\n\t\t\t\t//debug($cost);\n\t\t\t\t//debug($this->Session->read('Trip.cost'));\n\t\t\t\t$this->Session->delete('Trip');\n\t\t\t\t$this->Session->write('Trip.start_date', $this->data['DealPurchase']['start_date']);\n\t\t\t\t$this->Session->write('Trip.end_date', $this->data['DealPurchase']['end_date']);\n\t\t\t\t$this->Session->write('Trip.days', $days);\n\t\t\t\t$this->Session->write('Trip.cost', $cost);\n\t\t\t\t\t\n\t\t\t\t$this->redirect(array('controller' => 'deals', 'action'=>'purchase',$id));\n\t\t\t\t\n\t\t\t}\n\t\t\telseif($reservationType == Configure::read('ReservationType.Set')) {\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\t$this->set('errors', $this->Deal->DealPurchase->validationErrors);\n\t\t\t\n\t\t\t//Load Availability and Purchase arrays\n\t\t\t//This could probably be refactored to just load a DealsRemaining array?\n\t\t\t$this->loadModel('DealAvailability');\n\t\t\t$availableDates = $this->DealAvailability->getAvailableDates($id);\n\t\t\t$this->loadModel('DealPurchase');\n\t\t\t$reservedDates = $this->DealPurchase->getReservations($id);\n\n\t\t\t$this->set(compact('deal'));\n\t\t\tif($reservationType == Configure::read('ReservationType.Fixed')){\n\t\t\t \t$this->render('book_fixed');\n\t\t\t}\n\t\t\telseif($reservationType == Configure::read('ReservationType.Variable')){\n\t\t\t \t$this->render('book_variable');\n\t\t\t}\n\t\t\telseif($reservationType == Configure::read('ReservationType.Set')){\n\t\t\t \t$this->render('book');\n\t\t\t}\n\t\t\n\t}",
"public function lockDeliveredOrder() {\n\n // auto debit unconfirmed order list if it has been delivered for over an hour\n $unconfirmedOrderList = Order::byStatus(Order::STATUS_DELIVERED)\n ->where(\n DB::raw(\"DATE_ADD(updated_at, INTERVAL 1 HOUR)\"),\n \"<=\",\n date(\"Y-m-d H:i:s\")\n )\n ->get();\n\n $affectedTravels = [];\n foreach ($unconfirmedOrderList as $order) {\n\n $order->status = Order::STATUS_RECEIVED;\n $order->save();\n\n $affectedTravels[$order->travel->id] = CourierTravelRecord::find($order->travel_id);\n\n Event::fire(new OrderReceived($order, User::find($order->user_id)));\n }\n\n foreach ($affectedTravels as $travel) {\n Event::fire(new TravelProfitChanged($travel));\n }\n\n $this->info(\"Order changed from delivered to received: \".\n count($unconfirmedOrderList) .\" item(s)\");\n\n }",
"public function getFirmDelivery()\n {\n return $this->firmDelivery;\n }",
"public function processedsportevents()\n {\n return $this->totalsportevents - $this->pendingsportevents;\n }",
"public function getDeliverydesc()\n {\n return $this->deliverydesc;\n }",
"function _getDmstcTransitTimes() {\r\n\t\t$transitreq = 'USERID=\"' . MODULE_SHIPPING_USPS_USERID . '\">' .\r\n\t\t\t\t'<OriginZip>' . SHIPPING_ORIGIN_ZIP . '</OriginZip>' .\r\n\t\t\t\t'<DestinationZip>' . $this->dest_zip . '</DestinationZip>';\r\n\t\t$transitpriorityreq = 'API=PriorityMail&XML=' . urlencode( '<PriorityMailRequest ' . $transitreq . '</PriorityMailRequest>');\r\n\t\t$transitexpressreq = 'API=ExpressMailCommitment&XML=' . urlencode( '<ExpressMailCommitmentRequest USERID=\"' . MODULE_SHIPPING_USPS_USERID . '\"><OriginZIP>' . SHIPPING_ORIGIN_ZIP . '</OriginZIP><DestinationZIP>' . $this->dest_zip . '</DestinationZIP><Date></Date></ExpressMailCommitmentRequest>');\r\n\t\t$transitparcelreq = 'API=StandardB&XML=' . urlencode( '<StandardBRequest ' . $transitreq . '</StandardBRequest>');\r\n\t\t$usps_server = 'production.shippingapis.com';\r\n\t\t$api_dll = 'shippingAPI.dll';\r\n\t\t$body = '';\r\n\t\tif (!class_exists('httpClient')) {\r\n\t\t\tinclude(DIR_FS_CATALOG . DIR_WS_CLASSES . 'http_client.php');\r\n\t\t}\r\n\t\t$http = new httpClient();\r\n\t\tif ($http->Connect($usps_server, 80)) {\r\n\t\t\t$http->addHeader('Host', $usps_server);\r\n\t\t\t$http->addHeader('User-Agent', 'IntenseCart');\r\n\t\t\t$http->addHeader('Connection', 'Close');\r\n\t\t\tif ($http->Get('/' . $api_dll . '?' . $transitpriorityreq)) $transpriorityresp = $http->getBody();\r\n\t\t\tif ($http->Get('/' . $api_dll . '?' . $transitexpressreq)) $transexpressresp = $http->getBody();\r\n\t\t\tif ($http->Get('/' . $api_dll . '?' . $transitparcelreq)) $transparcelresp = $http->getBody();\r\n\t\t\t$http->Disconnect();\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$prioritytime = '';\r\n\t\t$expresstime = '';\r\n\t\t$parceltime = '';\r\n\t\t\r\n\t\t$doc = XML_unserialize($transpriorityresp);\r\n\t\tif( isset($doc['PriorityMailResponse']['Days']) ){\r\n\t\t\t// add processing time..\r\n\t\t\t$doc['PriorityMailResponse']['Days'] += $this->processing;\r\n\t\t\t\r\n\t\t\t$prioritytime = \r\n\t\t\t\tMODULE_SHIPPING_USPS_TEXT_ESTIMATED \r\n\t\t\t\t. $doc['PriorityMailResponse']['Days'] \r\n\t\t\t\t. ' ' \r\n\t\t\t\t. (\r\n\t\t\t\t\t$doc['PriorityMailResponse']['Days'] == 1 \r\n\t\t\t\t\t\t? \r\n\t\t\t\t\tMODULE_SHIPPING_USPS_TEXT_DAY \r\n\t\t\t\t\t\t: \r\n\t\t\t\t\tMODULE_SHIPPING_USPS_TEXT_DAYS\r\n\t\t\t\t)\r\n\t\t\t;\r\n\t\t}\r\n\t\t\r\n\t\t$doc = XML_unserialize($transparcelresp);\r\n\t\tif( isset($doc['StandardBResponse']['Days']) ){\r\n\t\t\t// add processing time..\r\n\t\t\t$doc['StandardBResponse']['Days'] += $this->processing;\r\n\t\t\t\r\n\t\t\t$parceltime = \r\n\t\t\t\tMODULE_SHIPPING_USPS_TEXT_ESTIMATED \r\n\t\t\t\t. $doc['StandardBResponse']['Days'] \r\n\t\t\t\t. ' ' \r\n\t\t\t\t. (\r\n\t\t\t\t\t$doc['StandardBResponse']['Days'] == 1 \r\n\t\t\t\t\t\t? \r\n\t\t\t\t\tMODULE_SHIPPING_USPS_TEXT_DAY \r\n\t\t\t\t\t\t: \r\n\t\t\t\t\tMODULE_SHIPPING_USPS_TEXT_DAYS\r\n\t\t\t\t)\r\n\t\t\t;\r\n\t\t}\r\n\t\t\r\n\t\t$doc = XML_unserialize($transexpressresp);\r\n// \t\tprint_r( $doc );\r\n\t\tif( isset($doc['ExpressMailCommitmentResponse']['Commitment']) ){\r\n\t\t\tif( isset($doc['ExpressMailCommitmentResponse']['Commitment']['CommitmentName']) ){ // single date\r\n\t\t\t\t$sequence = str_replace(\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'Next', \r\n\t\t\t\t\t\t'Days', \r\n\t\t\t\t\t\t'Day'\r\n\t\t\t\t\t), \r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'1', \r\n\t\t\t\t\t\tMODULE_SHIPPING_USPS_TEXT_DAYS, \r\n\t\t\t\t\t\tMODULE_SHIPPING_USPS_TEXT_DAY\r\n\t\t\t\t\t), \r\n\t\t\t\t\t$doc['ExpressMailCommitmentResponse']['Commitment']['CommitmentName']\r\n\t\t\t\t);\r\n\t\t\t} else { // multiple dates returned, choose longest time\r\n\t\t\t\t$seqlist = array();\r\n\t\t\t\tforeach( $doc['ExpressMailCommitmentResponse']['Commitment'] as $commit ){\r\n\t\t\t\t\tif( isset($commit['CommitmentName']) ){\r\n\t\t\t\t\t\t$seqlist[] = str_replace(\r\n\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t'Next', \r\n\t\t\t\t\t\t\t\t'Days', \r\n\t\t\t\t\t\t\t\t'Day'\r\n\t\t\t\t\t\t\t), \r\n\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t'1', \r\n\t\t\t\t\t\t\t\tMODULE_SHIPPING_USPS_TEXT_DAYS, \r\n\t\t\t\t\t\t\t\tMODULE_SHIPPING_USPS_TEXT_DAY\r\n\t\t\t\t\t\t\t), \r\n\t\t\t\t\t\t\t$commit['CommitmentName']\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\trsort($seqlist);\r\n\t\t\t\t$sequence = $seqlist[0];\r\n\t\t\t}\r\n\t\t\t$expresstime = MODULE_SHIPPING_USPS_TEXT_ESTIMATED . $sequence;\r\n\t\t}\r\n\t\t\r\n\t\treturn array(\r\n\t\t\t'express' => $expresstime, \r\n\t\t\t'priority' => $prioritytime, \r\n\t\t\t'parcel' => $parceltime\r\n\t\t);\r\n\t}",
"private function sellTrasactionPendingAddsMoney(){\n\n }",
"public function receive(){\n $eslId = $this->uri->segment(3); //Get the flower shop ID\n\n $formData = $this->input->post(NULL, TRUE);\n\n $domain = $formData['_domain'];\n $name = $formData['_name'];\n\n if($name === \"bid_available\"){\n //Get data to store\n $data = array(\n 'guildPhoneNumber' => $formData['guildPhoneNumber'],\n 'deliveryRequestId' => $formData['deliveryRequestId'],\n 'driverPhoneNumber' => $formData['driverPhoneNumber'],\n 'driverName' => $formData['driverName'],\n 'estimatedDeliveryTime' => $formData['estimatedDeliveryTime']\n );\n\n //Store bid in DB and exit\n $this->save_bid($data);\n }\n else if($name === \"complete\"){\n $driverPhoneNumber = $formData['driverPhoneNumber'];\n\n $this->load->model('bids_model');\n $this->bids_model->set_delivered($driverPhoneNumber);\n }\n }",
"function book_flight_SINGLE(\n $dateFrom,\n $timeFrom,\n $destinationLocationCode,\n $flightCode,\n $flightNo,\n $originLocationCode,\n $totalAdult,\n $totalChild,\n $totalInfant,\n $marriageGroup,\n $flightClass,\n $passengerDetails,\n $contactPerson_email,\n $contactPerson_phone,\n $remarks = '',\n $phoneCodeArea = '65'\n\n)\n{\n /* +65 is sg */\n $departureDateTime = $dateFrom.\"T\".$timeFrom;\n\n $childExist = \"\";\n $infantExist = \"\";\n if( $totalChild != 0 ) {\n $childExist = '<PassengerType Code=\"CNN\" Quantity=\"'.$totalChild.'\" />';\n }\n if( $totalInfant != 0 )\n {\n /* INF = infant without seat\n INS = infant with seat*/\n $infantExist = '<PassengerType Code=\"INF\" Quantity=\"'.$totalInfant.'\" />';\n }\n\n /* we don't count infant with code INF for number of party*/\n $numberInParty = $totalAdult+$totalChild;//+$totalInfant;\n $service = new SWSWebService(\"[email protected]\",\"8888\",\"CTC78866\",\"8HYD\",\"https://webservices.sabre.com/websvc\");\n if($service->SessionCreate())\n {\n if($service->SessionValidate())\n {\n /* EAB */\n $EnhancedAirBookRQ = '\n <EnhancedAirBookRQ HaltOnError=\"true\" version=\"3.7.0\" xmlns=\"http://services.sabre.com/sp/eab/v3_7\">\n <OTA_AirBookRQ>\n <HaltOnStatus Code=\"NO\"/>\n <HaltOnStatus Code=\"NN\"/>\n <HaltOnStatus Code=\"UC\"/>\n <HaltOnStatus Code=\"US\"/>\n <HaltOnStatus Code=\"UN\"/>\n <HaltOnStatus Code=\"LL\"/>\n <HaltOnStatus Code=\"HL\"/>\n <HaltOnStatus Code=\"WL\"/>\n <OriginDestinationInformation>\n <FlightSegment DepartureDateTime=\"'.$dateFrom.'T'.$timeFrom.'\" FlightNumber=\"'.$flightNo.'\" NumberInParty=\"'.$numberInParty.'\" ResBookDesigCode=\"'.$flightClass.'\" Status=\"NN\">\n <DestinationLocation LocationCode=\"'.$destinationLocationCode.'\" />\n <MarketingAirline Code=\"'.$flightCode.'\" FlightNumber=\"'.$flightNo.'\" />\n <MarriageGrp>'.$marriageGroup.'</MarriageGrp>\n <OperatingAirline Code=\"'.$flightCode.'\" />\n <OriginLocation LocationCode=\"'.$originLocationCode.'\"/>\n </FlightSegment>\n </OriginDestinationInformation>\n <RedisplayReservation NumAttempts=\"3\" WaitInterval=\"5000\" />\n </OTA_AirBookRQ>\n <OTA_AirPriceRQ>\n <PriceRequestInformation Retain=\"true\">\n <OptionalQualifiers>\n <PricingQualifiers>\n <PassengerType Code=\"ADT\" Quantity=\"'.$totalAdult.'\" />'\n .$childExist.$infantExist.'\n </PricingQualifiers>\n </OptionalQualifiers>\n </PriceRequestInformation>\n </OTA_AirPriceRQ>\n <PostProcessing IgnoreAfter=\"false\">\n <RedisplayReservation WaitInterval=\"1000\"/>\n </PostProcessing>\n <PreProcessing IgnoreBefore=\"false\"/>\n </EnhancedAirBookRQ>';\n\n $xml = $service->Execute(\"EnhancedAirBookRQ\",$EnhancedAirBookRQ,'OTA', 'Air');\n //$xml=true;\n if ( $xml ) {\n /*\n $parseResult = simplexml_load_string($xml);\n $arrayFinal = json_decode(json_encode($parseResult), true);\n $countArrayFinal = count($arrayFinal);\n */\n /* init data */\n $priceQuoteInfo = ''; $isInfant = '';\n $remarksPassenger = \"\";\n\n if ( $passengerDetails == TRUE ) {\n $counter_number = 1;\n\n /* every detail PD is different */\n $specialServicePassengerInfo = '';\n $securityServicePassengerInfo = '';\n $serviceAdultInfo = '';\n $serviceChildrenInfo = '';\n $serviceInfantInfo = '';\n $infantParentNameNumber = '1.1';\n $tempIPNN = '';\n $contactNumberInfo = '';\n $contactEmailInfo = '';\n $personInfo = '';\n $passengerRemarksInfo = \"\";\n\n foreach ( $passengerDetails AS $passenger ) {\n $psgTitle = strtoupper($passenger->passengerTitle);\n $rec = 1;\n switch($passenger->passengerType) {\n case 'ADULT' :$rec = 1; break;\n case 'CHILD' : $rec = 2; break;\n case 'INFANT' :\n if($totalChild > 0) {\n $rec = 3;\n } else {\n $rec = 2;\n }\n break;\n default: break;\n }\n\n $priceQuoteInfo .= '<Link NameNumber=\"'.$counter_number.'.1\" Record=\"'.$rec.'\" />';\n $isInfant = 'Infant=\"false\"'; /* used for adult and children */\n $dob = $passenger->passengerDOB;\n $pdtype = 'ADT'; /* use to define passenger type in PD */\n $passengerType = $passenger->passengerType;\n $nameRef = '';\n\n /* get passenger age, especially children and infant, very very need this */\n $today = new DateTime('today');\n $birthdate = new DateTime($dob);\n $passengerAge = $birthdate->diff($today)->y;\n $passengerAge = $passengerAge < 10 ? '0'.$passengerAge : $passengerAge;\n\n $passName = strtoupper(trim($passenger->passengerName));\n $passNameArr = explode (\" \", $passName);\n\n if (count($passNameArr) == 1) {\n $surname = $passName;\n $givenName = $passName;\n } else {\n $givenName = array_shift($passNameArr);\n\n if (count($passNameArr) > 0) {\n $surname = implode(\"\", $passNameArr);\n } else {\n $surname = $givenName;\n }\n }\n\n $remarksPassenger .= \"Name : \".$givenName. \" \".$surname;\n $remarksPassenger .= \"; Passport No : \".$passenger->passengerPassportNo.\", Passport Expiry Date: \". $passenger->passengerPassportExpiryDate.\";\";\n\n /*$givenName = array_pop($passNameArr);\n if (count($passNameArr) == 0) {\n $surname = $givenName;\n } else {\n $surname = implode (\" \", $passNameArr);\n }*/\n /*$surname = array_pop($passNameArr);*/\n /*$middleName = \"\";*/\n /*if (count($passNameArr) == 0) {\n $givenName = $surname;\n } else {\n if(count($passNameArr) > 1) {\n $givenName = implode(\"\", $passNameArr);\n /*array_shift($passNameArr);\n $middleName = implode (\" \", $passNameArr);\n } else {\n $givenName = $passNameArr[0];\n }\n }*/\n /*$givenName = strtoupper(trim($passenger->passenger_givenname));\n $surname = strtoupper(trim($passenger->passenger_surname));\n\n $arrGN = explode(\" \", $givenName);\n if (count($arrGN)) {\n $givenName = implode(\"\", $arrGN);\n }\n $arrSN = explode(\" \", $surname);\n if (count($arrSN)) {\n $surname = implode(\"\", $arrSN);\n }*/\n\n\n /* get country code of passport and citizenship */\n $nationalitycountryCode = \"\";\n $passissuecountryCode = \"\";\n $connection = mysqli_connect(DB_LOCALHOST, DB_USERNAME, DB_PASSWORD, DB_NAME);\n\n //query mysql\n $queryRes = mysqli_query(\n $connection,\n \"\n SELECT * FROM country WHERE country_name = '\".$passenger->passengerPassportIssueCountry.\"' LIMIT 0,1\n \"\n );\n if( mysqli_num_rows($queryRes) > 0 ) {\n $queryRow = mysqli_fetch_array($queryRes, MYSQL_ASSOC);\n $nationalitycountryCode = $queryRow[\"country_code\"];\n }\n\n //query mysql\n $queryRes = mysqli_query(\n $connection,\n \"\n SELECT * FROM country WHERE country_name = '\".$passenger->passengerNationality.\"' LIMIT 0,1\n \"\n );\n if( mysqli_num_rows($queryRes) > 0 ) {\n $queryRow = mysqli_fetch_array($queryRes, MYSQL_ASSOC);\n $passissuecountryCode = $queryRow[\"country_code\"];\n }\n /* END */\n\n $gender = strtolower($passenger->passengerTitle) == 'mr' || strtolower($passenger->passengerTitle) == 'master' ? 'M' : 'F';\n\n\n switch($passenger->passengerType) {\n case 'ADULT' :\n $passengerRemarksInfo.= '<Remark Code=\"H\" SegmentNumber=\"A\" Type=\"General\">\n '.($passenger->passenger_remarks != ''? '<Text>'.$passenger->passenger_remarks . '-'.$counter_number.'.1</Text>': '<Text>No Remarks</Text>').'\n </Remark>';\n\n if ($tempIPNN == '') {\n $tempIPNN = $counter_number.'.1';\n $infantParentNameNumber = $tempIPNN;\n }\n $specialServicePassengerInfo .= '<AdvancePassenger SegmentNumber=\"A\">\n <Document ExpirationDate=\"'.$passenger->passengerPassportExpiryDate.'\" Number=\"'.$passenger->passengerPassportNo.'\" Type=\"P\">\n <IssueCountry>'.$passissuecountryCode.'</IssueCountry>\n <NationalityCountry>'.$nationalitycountryCode.'</NationalityCountry>\n </Document>\n <PersonName DateOfBirth=\"'.$dob.'\" Gender=\"'.$gender.'\" NameNumber=\"'.$counter_number.'.1\" DocumentHolder=\"true\">\n <GivenName>'.$givenName.$psgTitle.'</GivenName>';\n /*if ($middleName != \"\") {\n $specialServicePassengerInfo .= '<MiddleName>'.$middleName.'</MiddleName>';\n }*/\n $specialServicePassengerInfo .= '<Surname>'.$surname.'</Surname>\n </PersonName>\n </AdvancePassenger>';\n $securityServicePassengerInfo .= '<SecureFlight SegmentNumber=\"A\" >\n <PersonName DateOfBirth=\"'.$dob.'\" Gender=\"'.$gender.'\" NameNumber=\"'.$counter_number.'.1\">\n <GivenName>'.$givenName.'</GivenName>\n <Surname>'.$surname.'</Surname>\n </PersonName>\n <VendorPrefs>\n <Airline Hosted=\"false\"/>\n </VendorPrefs>\n </SecureFlight>';\n /*\n $serviceAdultInfo .= '\n <Service SSR_Code=\"OSI\" >\n <PersonName NameNumber=\"'.$counter_number.'.1\" />\n <Text>PASSENGER NAME SHOULD BE '.$surname.'/'.$givenName.' '.$psgTitle.'</Text>\n <VendorPrefs>\n <Airline Code=\"'.$flightCode.'\" Hosted=\"false\"/>\n </VendorPrefs>\n </Service>\n ';\n */\n $phoneNumber = preg_replace('/[^0-9]/','',$contactPerson_phone);\n\n if(strlen($phoneNumber) > 10) {\n $countryCode = substr($phoneNumber, 0, strlen($phoneNumber)-10);\n $areaCode = substr($phoneNumber, -10, 3);\n $nextThree = substr($phoneNumber, -7, 3);\n $lastFour = substr($phoneNumber, -4, 4);\n\n $phoneNumber = $areaCode.$nextThree.'-'.$lastFour;\n }\n else if(strlen($phoneNumber) == 10) {\n $areaCode = substr($phoneNumber, 0, 3);\n $nextThree = substr($phoneNumber, 3, 3);\n $lastFour = substr($phoneNumber, 6, 4);\n\n $phoneNumber = $areaCode.$nextThree.'-'.$lastFour;\n }\n else if(strlen($phoneNumber) > 7 && strlen($phoneNumber) < 10) {\n $nextThree = substr($phoneNumber, 0, 3);\n $lastFour = substr($phoneNumber, 3, 5);\n\n $phoneNumber = $nextThree.'-'.$lastFour;\n }\n else if(strlen($phoneNumber) == 7) {\n $nextThree = substr($phoneNumber, 0, 3);\n $lastFour = substr($phoneNumber, 3, 4);\n\n $phoneNumber = $nextThree.'-'.$lastFour;\n }\n\n $contactNumberInfo .= '<ContactNumber NameNumber=\"'.$counter_number.'.1\" Phone=\"'.$phoneNumber.' '.$passenger->passengerTitle.' '.$givenName.'\" PhoneUseType=\"H\" />';\n $contactEmailInfo = '<Email Address=\"'.$contactPerson_email.'\" NameNumber=\"'.$counter_number.'.1\" ShortText=\"CTC Ticket\" Type=\"BC\"></Email>';\n $personInfo .= '<PersonName '.$isInfant.' NameNumber=\"'.$counter_number.'.1\" PassengerType=\"'.$pdtype.'\">\n <GivenName>'.$givenName.$psgTitle.'</GivenName>\n <Surname>'.$surname.'</Surname>\n </PersonName>';\n\n break;\n case 'CHILD' :\n $passengerRemarksInfo.= '<Remark Code=\"H\" SegmentNumber=\"A\" Type=\"General\">\n '.($passenger->passenger_remarks != ''? '<Text>'.$passenger->passenger_remarks. '-'.$counter_number.'.1</Text>' : '<Text>No Remarks</Text>').'\n </Remark>';\n\n $pdtype = 'CNN';\n $nameRef = 'NameReference=\"C'.$passengerAge.'\"';\n $specialServicePassengerInfo .= '<AdvancePassenger SegmentNumber=\"A\">\n <Document ExpirationDate=\"'.$passenger->passengerPassportExpiryDate.'\" Number=\"'.$passenger->passengerPassportNo.'\" Type=\"P\">\n <IssueCountry>'.$passissuecountryCode.'</IssueCountry>\n <NationalityCountry>'.$nationalitycountryCode.'</NationalityCountry>\n </Document>\n <PersonName DateOfBirth=\"'.$dob.'\" Gender=\"'.$gender.'\" NameNumber=\"'.$counter_number.'.1\" >\n <GivenName>'.$givenName.$psgTitle.'</GivenName>';\n /*if ($middleName != \"\") {\n $specialServicePassengerInfo .= '<MiddleName>'.$middleName.'</MiddleName>';\n }*/\n $specialServicePassengerInfo .= '<Surname>'.$surname.'</Surname>\n </PersonName>\n </AdvancePassenger>';\n $securityServicePassengerInfo .= '<SecureFlight SegmentNumber=\"A\" >\n <PersonName DateOfBirth=\"'.$dob.'\" Gender=\"'.$gender.'\" NameNumber=\"'.$counter_number.'.1\">\n <GivenName>'.$givenName.'</GivenName>\n <Surname>'.$surname.'</Surname>\n </PersonName>\n <VendorPrefs>\n <Airline Hosted=\"false\"/></VendorPrefs>\n </SecureFlight>';\n\n /*<Service SSR_Code=\"OSI\" >\n <PersonName NameNumber=\"'.$counter_number.'.1\" />\n <Text>PASSENGER NAME SHOULD BE '.$surname.'/'.$givenName.' '.$psgTitle.'</Text>\n <VendorPrefs>\n <Airline Code=\"'.$flightCode.'\" Hosted=\"false\"/>\n </VendorPrefs>\n </Service>*/\n $serviceChildrenInfo .= '\n <Service SegmentNumber=\"A\" SSR_Code=\"CHLD\" >\n <PersonName NameNumber=\"'.$counter_number.'.1\" />\n <Text>'.strtoupper(date(\"dMy\", strtotime($dob))).'</Text>\n <VendorPrefs>\n <Airline Hosted=\"false\" />\n </VendorPrefs>\n </Service>';\n $personInfo .= '<PersonName '.$isInfant.' NameNumber=\"'.$counter_number.'.1\" PassengerType=\"'.$pdtype.'\" '.$nameRef.'>\n <GivenName>'.$givenName.$psgTitle.'</GivenName>\n <Surname>'.$surname.'</Surname>\n </PersonName>';\n\n break;\n case 'INFANT' :\n $passengerRemarksInfo.= '<Remark Code=\"H\" SegmentNumber=\"A\" Type=\"General\">\n '.($passenger->passenger_remarks != ''? '<Text>'.$passenger->passenger_remarks . '-'.$counter_number.'.1</Text>': '<Text>No Remarks</Text>').'\n </Remark>';\n\n $pdtype = 'INF';\n $isInfant = 'Infant=\"true\"';\n $passengerAge = $passengerAge == \"00\" ? \"01\" : $passengerAge;\n $nameRef = 'NameReference=\"I'.$passengerAge.'\"';\n $gender = strtolower($passenger->passengerTitle) == 'mr' || strtolower($passenger->passengerTitle) == 'master' ? 'MI' : 'FI';\n $specialServicePassengerInfo .= '<AdvancePassenger SegmentNumber=\"A\">\n <Document ExpirationDate=\"'.$passenger->passengerPassportExpiryDate.'\" Number=\"'.$passenger->passengerPassportNo.'\" Type=\"P\">\n <IssueCountry>'.$passissuecountryCode.'</IssueCountry>\n <NationalityCountry>'.$nationalitycountryCode.'</NationalityCountry>\n </Document>\n <PersonName DateOfBirth=\"'.$dob.'\" Gender=\"'.$gender.'\" NameNumber=\"'.$infantParentNameNumber.'\" >\n <GivenName>'.$givenName.$psgTitle.'</GivenName>';\n /*if ($middleName != \"\") {\n $specialServicePassengerInfo .= '<MiddleName>'.$middleName.'</MiddleName>';\n }*/\n $specialServicePassengerInfo .= '<Surname>'.$surname.'</Surname>\n </PersonName>\n </AdvancePassenger>';\n $securityServicePassengerInfo .= '<SecureFlight SegmentNumber=\"A\" >\n <PersonName DateOfBirth=\"'.$dob.'\" Gender=\"'.$gender.'\" NameNumber=\"'.$infantParentNameNumber.'\">\n <GivenName>'.$givenName.'</GivenName>\n <Surname>'.$surname.'</Surname>\n </PersonName>\n <VendorPrefs>\n <Airline Hosted=\"false\"/></VendorPrefs>\n </SecureFlight>';\n $serviceInfantInfo .=\n /*<Service SSR_Code=\"OSI\" >\n <PersonName NameNumber=\"'.$infantParentNameNumber.'\" />\n <Text>PASSENGER NAME SHOULD BE '.$surname.'/'.$givenName.' '.$psgTitle.'</Text>\n <VendorPrefs>\n <Airline Code=\"'.$flightCode.'\" Hosted=\"false\" />\n </VendorPrefs>\n </Service>*/\n '<Service SegmentNumber=\"A\" SSR_Code=\"INFT\">\n <PersonName NameNumber=\"'.$infantParentNameNumber.'\" />\n <Text>'.strtoupper($surname).'/'.strtoupper($givenName).'/'.strtoupper(date(\"dMy\", strtotime($dob))).'</Text>\n <VendorPrefs>\n <Airline Hosted=\"false\" />\n </VendorPrefs>\n </Service>';\n\n $personInfo .= '<PersonName '.$isInfant.' NameNumber=\"'.$counter_number.'.1\" PassengerType=\"'.$pdtype.'\" '.$nameRef.'>\n <GivenName>'.$givenName.$psgTitle.'</GivenName>\n <Surname>'.$surname.'</Surname>\n </PersonName>';\n break;\n case 'STUDENT' :\n break;\n case 'AGENT' :\n break;\n case 'TOURS' :\n break;\n case 'MILITARY' :\n break;\n default : break;\n\n }\n $counter_number++;\n }\n\n $specialServicePassengerInfo .= $securityServicePassengerInfo. $serviceAdultInfo . $serviceChildrenInfo . $serviceInfantInfo;\n /* put after special req details tag\n <AddRemarkRQ>\n <RemarkInfo>\n <Remark Code=\"H\" SegmentNumber=\"1\" Type=\"General\">\n <Text></Text>\n </Remark>\n </RemarkInfo>\n </AddRemarkRQ> */\n\n $PDBookRQ = '<PassengerDetailsRQ xmlns=\"http://services.sabre.com/sp/pd/v3_3\" version=\"3.3.0\" IgnoreOnError=\"false\" HaltOnError=\"true\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\n <PostProcessing IgnoreAfter=\"false\" RedisplayReservation=\"true\" UnmaskCreditCard=\"true\" xmlns=\"http://services.sabre.com/sp/pd/v3_3\">\n <EndTransactionRQ>\n <EndTransaction Ind=\"true\" />\n <Source ReceivedFrom=\"CTC TRAVEL\"/>\n </EndTransactionRQ>\n </PostProcessing>\n <PreProcessing xmlns=\"http://services.sabre.com/sp/pd/v3_3\" IgnoreBefore=\"false\">\n <UniqueID ID=\"\" />\n </PreProcessing>\n <PriceQuoteInfo>\n '.$priceQuoteInfo.'\n </PriceQuoteInfo>\n <SpecialReqDetails>\n <AddRemarkRQ>\n <RemarkInfo>\n '.$passengerRemarksInfo.'\n </RemarkInfo>\n </AddRemarkRQ>\n <SpecialServiceRQ>\n <SpecialServiceInfo>\n '.$specialServicePassengerInfo.'\n </SpecialServiceInfo>\n </SpecialServiceRQ>\n </SpecialReqDetails>\n <TravelItineraryAddInfoRQ xmlns=\"http://services.sabre.com/sp/pd/v3_3\">\n <AgencyInfo>\n <Address>\n <AddressLine>COMMONWEALTH TRAVEL SERVICE CORPORATION PTE LTD</AddressLine>\n <CityName>CHINATOWN POINT, SINGAPORE</CityName>\n <CountryCode>SG</CountryCode>\n <PostalCode>059413</PostalCode>\n <StreetNmbr>133 NEW BRIDGE ROAD 03-03</StreetNmbr>\n </Address>\n <Ticketing TicketType=\"7TAW\"/>\n </AgencyInfo>\n <CustomerInfo>\n <ContactNumbers>\n '.$contactNumberInfo.'\n </ContactNumbers>\n '.$contactEmailInfo.'\n '.$personInfo.'\n </CustomerInfo>\n </TravelItineraryAddInfoRQ>\n </PassengerDetailsRQ>';\n\n /* end PD true */\n\n $xml = $service->Execute(\"PassengerDetailsRQ\",$PDBookRQ, 'OTA', 'Air');\n\n /*echo '2<br>';\n echo '<xmp>'.$EnhancedAirBookRQ.'</xmp>';\n echo '<xmp>'.$PDBookRQ.'</xmp>';\n if( $xml ) {\n $parseResult = simplexml_load_string($xml);\n $arrayFinal = json_decode(json_encode($parseResult), true);\n var_dump($arrayFinal);\n } else {\n echo htmlspecialchars($service->error);\n }\n die();\n */\n if( $xml ) {\n $parseResult = simplexml_load_string($xml);\n $arrayFinal = json_decode(json_encode($parseResult), true);\n\n $txt = \"[\".date(\"Y-m-d H:i:s\").\"] [SGL][PD] Output \". print_r($arrayFinal, true);\n $txt .= \"[\".date(\"Y-m-d H:i:s\").\"] [SGL][PD] XML \". $xml;\n //log file\n $myfile = fopen(sinstanceurl.\"assets/api-logs/logs.txt\", \"a\") or die(\"Unable to open file!\");\n // $txt = \"[\".date(\"Y-m-d H:i:s\").\"] - \".$output;\n fwrite($myfile, \"\\n\". $txt);\n fclose($myfile);\n\n $countAF = count($arrayFinal);\n return $countAF && array_key_exists('ItineraryRef', $arrayFinal) ? $arrayFinal['ItineraryRef']['@attributes']['ID'] : 'error';\n } else {\n $txt = \"[\".date(\"Y-m-d H:i:s\").\"] [SGL][PD] \". htmlspecialchars($service->error);\n\n //log file\n $myfile = fopen(sinstanceurl.\"assets/api-logs/logs.txt\", \"a\") or die(\"Unable to open file!\");\n // $txt = \"[\".date(\"Y-m-d H:i:s\").\"] - \".$output;\n fwrite($myfile, \"\\n\". $txt);\n fclose($myfile);\n return 'error';\n }\n } else {\n $txt = \"[\".date(\"Y-m-d H:i:s\").\"] [SGL][PD] NO Passenger Data\";\n\n //log file\n $myfile = fopen(sinstanceurl.\"assets/api-logs/logs.txt\", \"a\") or die(\"Unable to open file!\");\n // $txt = \"[\".date(\"Y-m-d H:i:s\").\"] - \".$output;\n fwrite($myfile, \"\\n\". $txt);\n fclose($myfile);\n return 'error';\n }\n }\n else {\n $txt = \"[\".date(\"Y-m-d H:i:s\").\"] [SGL][EAB-2] \". htmlspecialchars($service->error);\n\n //log file\n $myfile = fopen(sinstanceurl.\"assets/api-logs/logs.txt\", \"a\") or die(\"Unable to open file!\");\n // $txt = \"[\".date(\"Y-m-d H:i:s\").\"] - \".$output;\n fwrite($myfile, \"\\n\". $txt);\n fclose($myfile);\n return 'error';\n }\n }\n else {\n $txt = \"[\".date(\"Y-m-d H:i:s\").\"] [SGL][EAB-3] \". htmlspecialchars($service->error);\n\n //log file\n $myfile = fopen(sinstanceurl.\"assets/api-logs/logs.txt\", \"a\") or die(\"Unable to open file!\");\n // $txt = \"[\".date(\"Y-m-d H:i:s\").\"] - \".$output;\n fwrite($myfile, \"\\n\". $txt);\n fclose($myfile);\n return 'error';\n }\n }\n else {\n $txt = \"[\".date(\"Y-m-d H:i:s\").\"] [SGL][EAB-4] \". htmlspecialchars($service->error);\n\n //log file\n $myfile = fopen(sinstanceurl.\"assets/api-logs/logs.txt\", \"a\") or die(\"Unable to open file!\");\n // $txt = \"[\".date(\"Y-m-d H:i:s\").\"] - \".$output;\n fwrite($myfile, \"\\n\". $txt);\n fclose($myfile);\n return 'error';\n }\n}",
"public function getPaymentReceived()\n {\n return $this->payment_received;\n }",
"function show_estimated_ship_date_under_view_order_for_subscriptions( $order_id ) {\n $order = wc_get_order( $order_id );\n $item = array_pop( $order->get_items() );\n if ( $order->status == 'processing' && $item['name'] != 'Try or Gift' ) {\n echo '<h2>Estimated Shipment Date</h2>';\n echo '<p>Your package ships by: <strong>' . new_orders_next_subscription_ship_date( $order->order_date ) . '</strong>.</p>';\n }\n}",
"public function getDeliveryDeadline() {\n return $this->_deliveryDeadline;\n }",
"public function getDeliveryIncluded()\n {\n return $this->deliveryIncluded;\n }",
"function get_pending_bookings(){\n\t\tif( get_option('dbem_bookings_approval') == 0 ){\n\t\t\treturn new EM_Bookings();\n\t\t}\n\t\t$pending = array();\n\t\tforeach ( $this->load() as $EM_Booking ){\n\t\t\tif($EM_Booking->booking_status == 0){\n\t\t\t\t$pending[] = $EM_Booking;\n\t\t\t}\n\t\t}\n\t\t$EM_Bookings = new EM_Bookings($pending);\n\t\treturn $EM_Bookings;\t\n\t}",
"public function getHistoricalMailchimpSubscribed()\n {\n return $this->getParam(self::HISTORICAL_MAILCHIMP_SUBSCRIBED);\n }",
"public function addBooking()\n\t{\n\n\t\t$currentTime = Date::current('Y-m-d H:i:s');\n\t\t$logEventFile = $this->workspace().$this->eventName.'.csv';\t\t\n\t\tIF ( !file_exists($logEventFile) ) {\n\t\t\t$fileHeader = array('EventName','BookerName','BookerEmail','BookerPhone','Tickets','PickupPoint',\n\t\t\t\t\t\t\t\t'PayMethod','OtherNames','SitNear','SpecialNeeds','TimeBooked');\n\t\t\t$csvLine = fopen($logEventFile, \"a\");\n\t\t\tfputcsv($csvLine, $fileHeader);\n\t\t\tfclose($csvLine);\t\t\n\t\t}\n\n\t\t$booking = array($this->eventName,$this->senderName,$this->senderEmail,$this->senderPhone,$this->numberOfTickets,$this->pickupPoint\n\t\t\t\t\t\t,$this->paymentOption,$this->otherPartyNames,$this->sittingNear,$this->specialNeeds,$currentTime );\n\n\t\t$csvLine = fopen($logEventFile, \"a\");\n\t\tfputcsv($csvLine, $booking );\n\t\tfclose($csvLine);\n\n\t}",
"function wcfm_mark_as_recived() {\r\n\t\tglobal $WCFM, $WCFMu, $woocommerce, $wpdb;\r\n\t\t\r\n\t\tif ( !empty( $_POST['orderitemid'] ) ) {\r\n $order_id = $_POST['orderid']; \r\n\t\t\t$order = wc_get_order( $order_id );\r\n\t\t\t$product_id = $_POST['productid'];\r\n $order_item_id = $_POST['orderitemid'];\r\n \r\n //$comment_id = $order->add_order_note( sprintf( __( 'Item(s) <b>%s</b> received by customer.', 'wc-frontend-manager-ultimate' ), get_the_title( $product_id ) ), '1');\r\n \r\n // Keep Tracking URL as Order Item Meta\r\n\t\t\t$sql = \"INSERT INTO {$wpdb->prefix}woocommerce_order_itemmeta\";\r\n\t\t\t$sql .= ' ( `meta_key`, `meta_value`, `order_item_id` )';\r\n\t\t\t$sql .= ' VALUES ( %s, %s, %s )';\r\n\t\t\t\r\n\t\t\t$confirm_message = __( 'YES', 'wc-frontend-manager-ultimate' );\r\n\t\r\n\t\t\t$wpdb->get_var( $wpdb->prepare( $sql, 'wcfm_mark_as_recived', $confirm_message, $order_item_id ) );\r\n\t\t\t\r\n\t\t\t$vendor_id = $WCFM->wcfm_vendor_support->wcfm_get_vendor_id_from_product( $product_id );\r\n\t\t\t\r\n\t\t\t// WCfM Marketplace Table Update\r\n\t\t\tif( $vendor_id && (wcfm_is_marketplace() == 'wcfmmarketplace') ) {\r\n\t\t\t\t$wpdb->query(\"UPDATE {$wpdb->prefix}wcfm_marketplace_orders SET shipping_status = 'completed' WHERE order_id = $order_id and vendor_id = $vendor_id and item_id = $order_item_id\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Notification\r\n\t\t\t$wcfm_messages = sprintf( __( 'Customer marked <b>%s</b> received.', 'wc-frontend-manager-ultimate' ), get_the_title( $product_id ) );\r\n\t\t\t$WCFM->wcfm_notification->wcfm_send_direct_message( -1, 0, 0, 1, $wcfm_messages, 'shipment_received' );\r\n\t\t\t\r\n\t\t\t// Vendor Notification\r\n\t\t\tif( $vendor_id ) {\r\n\t\t\t\t$WCFM->wcfm_notification->wcfm_send_direct_message( -2, $vendor_id, 0, 1, $wcfm_messages, 'shipment_received' );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// WC Order Note\r\n\t\t\t$comment_id = $order->add_order_note( $wcfm_messages, '1');\r\n\t\t\t\r\n\t\t\tdo_action( 'wcfm_after_order_mark_received', $order_id, $order_item_id, $product_id );\r\n }\r\n die;\r\n\t}",
"function getReceived(){\n $total = 0;\n $all = $this->product->include_join_fields()->get()->all;\n foreach ($all as $product){\n \n $total+= $product->join_qty;\n \n }\n return $total;\n }",
"public function getDelivery()\n {\n $value = $this->get(self::delivery);\n return $value === null ? (double)$value : $value;\n }",
"public function displayconfirm_booking()\n\t{\n\t\t$id = $this->uri->segment(4);\n\t\t$excludeArr = array();\n\t\t$condition = array('id' => $id);\n\t\t$dataArr = array('status' => 'Paid');\n\t\t$this->order_model->commonInsertUpdate(PAYMENT, 'update', $excludeArr, $dataArr, $condition);\n\t\tredirect('admin/order/display_cod');\n\t}",
"public function deliveryPriceDhaka()\n {\n }",
"public function getDeliveryMode()\n {\n }",
"public function deliveryPriceOutDhaka()\n {\n }",
"function wpbs_get_booking($booking)\n{\n\n return wp_booking_system()->db['bookings']->get_object($booking);\n\n}",
"function deliverOrder($orderNum)\n\t\t{\n\t\t\t$db = dbConnect::getInstance();\n \t\t $mysqli = $db->getConnection();\n\t\t\t $query = \" update check_tb set status = '2' where id='\".$orderNum.\"' \"; \n $res=$mysqli->query($query) or die (mysqli_error($mysqli));\n $mysqli->query(\"CREATE EVENT updateStatus\".$orderNum.\" ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 MINUTE DO \n \tupdate check_tb set status = '1' where id='\".$orderNum.\"' ;\n \t\") or die (mysqli_error($mysqli));\n\t\t\tif($res)\n\t\t\t{\n\n\t\t\t\treturn true;\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\t\n\t\t\t}\n\t\t}",
"public function order_delivered()\n { $orders = Order::with(['customer'])->where(['order_status'=>'delivered'])->orderBy('id','desc')->get()->toArray();\n return view('back.order.order_delivered')->withOrders($orders);\n }",
"public function getBuyBattleChance()\n {\n return $this->get(self::_BUY_BATTLE_CHANCE);\n }",
"public function getTotalInvoiced();",
"public function bookingAmount() {\n\t\t\t\n\t\t\t$baseAmount = $this->apartment_price_per_night;\n\t\t\tforeach ($this->bookedServices()->get() as $upgrade) {\n\t\t\t\t$baseAmount += $upgrade->price_per_night == 0 ? 0 : $upgrade->price_per_night;\n\t\t\t}\n\t\t\treturn $baseAmount * $this->check_out->diffInDays($this->check_in);\n\t\t}",
"public function pastDue() : bool\n {\n return $this->stripe_status === StripeSubscription::STATUS_PAST_DUE;\n }",
"function countPending() {\n return IncomingMails::count(array('state > 0'));\n }",
"public function schedulePresentationB()\n {\n return $this->mailer->schedulePresentationB($this->data);\n }",
"protected function liveBooking($args) {\n\n if ($args['ent_wrk_type'] == '' || $args['ent_addr_line1'] == '' || $args['ent_lat'] == '' || $args['ent_long'] == '' ||\n $args['ent_zipcode'] == '' || $args['ent_date_time'] == '' || $args['ent_payment_type'] == '' || $args['ent_dri_email'] == '')\n return $this->_getStatusMessage(1, $args);\n\n $args['ent_appnt_dt'] = $args['ent_date_time'];\n $args['ent_appnt_dt_to'] = date('Y-m-d H:i:s', date('+1 hour', strtotime($args['ent_date_time'])));\n\n $this->curr_date_time = urldecode($args['ent_date_time']);\n\n $returned = $this->_validate_token($args['ent_sess_token'], $args['ent_dev_id'], '2');\n\n if (is_array($returned))\n return $returned;\n\n $args['ent_appnt_dt'] = urldecode($args['ent_appnt_dt']);\n\n $getAmountQry = \"select min_fare from workplace_types where type_id = '\" . $args['ent_wrk_type'] . \"'\";\n $typeAmount = mysql_fetch_assoc(mysql_query($getAmountQry, $this->db->conn));\n\n if (!is_array($typeAmount))\n return $this->_getStatusMessage(38, 38);\n\n if ($args['ent_later_dt'] != '') {\n\n $insertAppointmentQry = \"insert into appointment(mas_id,slave_id,created_dt,last_modified_dt,status,appointment_dt,address_line1,address_line2,appt_lat,appt_long,drop_addr1,drop_addr2,drop_lat,drop_long,extra_notes,amount,zipcode,user_device,appt_type,payment_type,type_id) \n values('0','\" . $this->User['entityId'] . \"','\" . $this->curr_date_time . \"','\" . $this->curr_date_time . \"','1',\n '\" . $args['ent_later_dt'] . \"','\" . $args['ent_addr_line1'] . \"','\" . $args['ent_addr_line2'] . \"','\" . $args['ent_lat'] . \"',\n '\" . $args['ent_long'] . \"','\" . $args['ent_drop_addr_line1'] . \"','\" . $args['ent_drop_addr_line2'] . \"','\" . $args['ent_drop_lat'] . \"',\n '\" . $args['ent_drop_long'] . \"','\" . $args['ent_extra_notes'] . \"','\" . $typeAmount['min_fare'] . \"','\" . $args['ent_zipcode'] . \"','\" . $args['ent_dev_id'] . \"','2','\" . $args['ent_payment_type'] . \"','\" . $args['ent_wrk_type'] . \"')\";\n\n mysql_query($insertAppointmentQry, $this->db->conn);\n\n return $this->_getStatusMessage(78, 78);\n }\n\n\n $location = $this->mongo->selectCollection('location');\n\n $location->ensureIndex(array('location' => '2d'));\n\n $doc = $location->findOne(array('email' => $args['ent_dri_email']));\n\n $notifications = $this->mongo->selectCollection('notifications');\n\n $notifications->insert($args);\n\n if (count($doc) <= 0)\n return $this->_getStatusMessage(64, 64);\n\n if ((int) $doc['user'] == 0)\n return $this->_getStatusMessage(64, 64);\n\n $updateStatus = $this->_updateSlvApptStatus($this->User['entityId'], \"1\");\n\n $pushNum = array();\n\n $master = array(\"id\" => $doc[\"user\"], 'rating' => $doc['rating'], 'fname' => $doc['name'], 'image' => $doc['image'], 'email' => $doc['email'], 'lat' => $doc['location']['latitude'], 'lon' => $doc['location']['longitude'], 'carId' => $doc['carId'], 'chn' => $doc['chn'], 'listner' => $doc['listner'], 'type_id' => $doc['type']);\n\n if ($doc['inBooking'] == 2)\n return $this->_getStatusMessage(71, $pushNum);\n\n if ((int) $doc['status'] != 3) {\n//do nothing\n } else {\n\n $checkAppointmentQry = \"select * from appointment where appointment_dt = '\" . (($args['ent_later_dt'] == '') ? $this->curr_date_time : $args['ent_later_dt']) . \"' and mas_id = '\" . $master['id'] . \"' and status IN (1,2)\";\n if (mysql_num_rows(mysql_query($checkAppointmentQry, $this->db->conn)) > 0) {\n $location->update(array('user' => (int) $master['id']), array('$set' => array('inBooking' => 1)));\n return $this->_getStatusMessage(71, $pushNum);\n }\n\n $location->update(array('user' => (int) $master['id']), array('$set' => array('inBooking' => 2)));\n\n $insertAppointmentQry = \"insert into appointment(mas_id,slave_id,created_dt,last_modified_dt,status,appointment_dt,address_line1,address_line2,appt_lat,appt_long,drop_addr1,drop_addr2,drop_lat,drop_long,extra_notes,amount,zipcode,user_device,appt_type,car_id,payment_type,type_id,coupon_code) \n values('\" . $master['id'] . \"','\" . $this->User['entityId'] . \"','\" . $this->curr_date_time . \"','\" . $this->curr_date_time . \"','1',\n '\" . (($args['ent_later_dt'] == '') ? $this->curr_date_time : $args['ent_later_dt']) . \"','\" . $args['ent_addr_line1'] . \"','\" . $args['ent_addr_line2'] . \"','\" . $args['ent_lat'] . \"',\n '\" . $args['ent_long'] . \"','\" . $args['ent_drop_addr_line1'] . \"','\" . $args['ent_drop_addr_line2'] . \"','\" . $args['ent_drop_lat'] . \"',\n '\" . $args['ent_drop_long'] . \"','\" . $args['ent_extra_notes'] . \"','\" . $typeAmount['min_fare'] . \"','\" . $args['ent_zipcode'] . \"','\" . $args['ent_dev_id'] . \"','\" . (($args['ent_later_dt'] == '') ? '1' : '2') . \"','\" . $master['carId'] . \"','\" . $args['ent_payment_type'] . \"','\" . $master['type_id'] . \"','\" . $args['ent_coupon'] . \"')\";\n\n mysql_query($insertAppointmentQry, $this->db->conn);\n\n $apptId = mysql_insert_id();\n\n if ($apptId <= 0)\n return $this->_getStatusMessage(3, $insertAppointmentQry);\n\n if ($args['ent_later_dt'] == '' && $args['ent_addr_line2'] == '') {\n $message = \"You got a new job request from \" . $this->User['firstName'];\n } else if ($args['ent_later_dt'] == '' && $args['ent_addr_line2'] != '') {\n $exploded = explode(\" \", $args['ent_addr_line2']);\n $message = \"You got a new job request in \" . $exploded[0] . $exploded[1] . \" from \" . $this->User['firstName'];\n } else if ($args['ent_later_dt'] != '' && $args['ent_addr_line2'] == '') {\n $message = \"New Job from \" . $this->User['firstName'] . \" for \" . date('jS M \\a\\t g:i A', strtotime($args['ent_later_dt']));\n } else if ($args['ent_later_dt'] != '' && $args['ent_addr_line2'] != '') {\n $exploded = explode(\" \", $args['ent_addr_line2']);\n $message = \"New Job in \" . $exploded[0] . $exploded[1] . \" from \" . $this->User['firstName'] . \" for \" . date('jS M \\a\\t g:i A', strtotime($args['ent_later_dt']));\n }\n\n $this->ios_cert_path = $this->ios_roadyo_driver;\n $this->ios_cert_pwd = $this->ios_dri_pwd;\n $this->androidApiKey = $this->masterApiKey;\n\n $aplPushContent = array('alert' => $message, 'nt' => (($args['ent_later_dt'] == '') ? '7' : '51'), 'sname' => $this->User['firstName'], 'dt' => (($args['ent_later_dt'] == '') ? $this->curr_date_time : $args['ent_later_dt']), 'e' => $this->User['email'], 'sound' => 'taxina.wav', 'bid' => $apptId);\n $andrPushContent = array(\"payload\" => $message, 'action' => (($args['ent_later_dt'] == '') ? '7' : '51'), 'sname' => $this->User['firstName'], 'dt' => (($args['ent_later_dt'] == '') ? $this->curr_date_time : $args['ent_later_dt']), 'e' => $this->User['email'], 'bid' => $apptId);\n\n $pubnubContent = array('a' => 11, 'dt' => (($args['ent_later_dt'] == '') ? $this->curr_date_time : $args['ent_later_dt']), 'e' => $this->User['email'], 'bid' => $apptId, 'nt' => (($args['ent_later_dt'] == '') ? '' : '51'));\n\n $pushNum['pubnub'] = $this->pubnub->publish(array(\n 'channel' => 'dispatcher',\n 'message' => $pubnubContent\n ));\n\n if (!is_null($master['listner']))\n $pushNum['pubnub'] = $this->pubnub->publish(array(\n 'channel' => $master['listner'],\n 'message' => $pubnubContent\n ));\n\n $pushNum['push'] = $this->_sendPush($this->User['entityId'], array($master['id']), $message, '7', $this->User['firstName'], $this->curr_date_time, '1', $aplPushContent, $andrPushContent);\n\n for ($j = 1; $j < 40; $j++) {\n if ($j < 40)\n usleep(500000);\n $getStatus = $this->_getSlvApptStatus($this->User['entityId']);\n\n if ($getStatus['booking_status'] == '3') {\n\n mysql_query(\"update appointment set status = '4', cancel_status = '1', cancel_dt = '\" . $this->curr_date_time . \"' where appointment_id = '\" . $apptId . \"'\", $this->db->conn);\n\n $location->update(array('user' => (int) $master['id']), array('$set' => array('inBooking' => 1)));\n $update = $this->_updateSlvApptStatus($this->User['entityId'], \"0\");\n return $this->_getStatusMessage(74, $update);\n }\n\n $statusCheckQry = \"select status from appointment where appointment_id = '\" . $apptId . \"'\";\n $statusArr = mysql_fetch_assoc(mysql_query($statusCheckQry, $this->db->conn));\n\n if ($j == 39 && $statusArr['status'] == '1')\n mysql_query(\"update appointment set status = '10' where appointment_id = '\" . $apptId . \"'\", $this->db->conn);\n\n\n if ($statusArr['status'] == '6' || $statusArr['status'] == '2' || $statusArr['status'] == '7') {\n\n if ($args['ent_coupon'] != '') {\n $updateCouponStatusQry = \"update coupons set status = 1 where coupon_code = '\" . $args['ent_coupon'] . \"'\";\n mysql_query($updateCouponStatusQry, $this->db->conn);\n }\n\n $location->update(array('user' => (int) $master['id']), array('$set' => array('status' => ($args['ent_later_dt'] == '') ? 5 : 3, 'inBooking' => 1)));\n\n $getVehicleDataQry = \"select wrk.workplace_id, wrk.License_Plate_No, (select v.vehiclemodel from vehiclemodel v, workplace w where w.Vehicle_Model = v.id and w.workplace_id = wrk.workplace_id) as vehicle_model from workplace wrk, master m where m.workplace_id = wrk.workplace_id and m.mas_id = '\" . $master['id'] . \"'\";\n\n $getVehicleDataRes = mysql_query($getVehicleDataQry, $this->db->conn);\n\n $vehicleData = mysql_fetch_assoc($getVehicleDataRes);\n\n $errMsgArr = $this->_getStatusMessage(($args['ent_later_dt'] == '') ? 39 : 78, $pushNum);\n\n return array('errNum' => $errMsgArr['errNum'], 'errFlag' => $errMsgArr['errFlag'], 'errMsg' => $errMsgArr['errMsg'], 'email' => $master['email'], 'apptDt' => $this->curr_date_time, 'dt' => str_replace(' ', '', str_replace('-', '', str_replace(':', '', $this->curr_date_time))), 'model' => $vehicleData['vehicle_model'], 'plateNo' => $vehicleData['License_Plate_No'], 'rating' => round($master['rating'], 1), 't' => $pushNum, 'chn' => $master['chn'], 'bid' => $apptId);\n }\n\n if ($statusArr['status'] == '3') {\n $location->update(array('user' => (int) $master['id']), array('$set' => array('inBooking' => 1)));\n return $this->_getStatusMessage(71, $pushNum);\n }\n }\n }\n $location->update(array('user' => (int) $master['id']), array('$set' => array('inBooking' => 1)));\n return $this->_getStatusMessage(71, $pushNum);\n }",
"public function checkForAnuallyRecurring()\n {\n // not supported\n }",
"public function mark_booking_confirmed() {\n if ( ! current_user_can( 'dokan_manage_bookings' ) ) {\n wp_die( __( 'You do not have sufficient permissions to access this page.', 'dokan' ) );\n }\n\n if ( ! check_admin_referer( 'wc-booking-confirm' ) ) {\n wp_die( __( 'You have taken too long. Please go back and retry.', 'dokan' ) );\n }\n\n $booking_id = isset( $_GET['booking_id'] ) && (int) $_GET['booking_id'] ? (int) $_GET['booking_id'] : '';\n\n if ( ! $booking_id ) {\n die;\n }\n\n // Additional check to see if Seller id is same as current user\n $seller = get_post_meta( $booking_id, '_booking_seller_id', true );\n\n if ( (int) $seller !== dokan_get_current_user_id() ) {\n wp_die( __( 'You do not have sufficient permissions to access this page.', 'dokan' ) );\n }\n\n $booking = get_wc_booking( $booking_id );\n\n if ( $booking->get_status() !== 'confirmed' ) {\n $booking->update_status( 'confirmed' );\n }\n\n wp_safe_redirect( wp_get_referer() );\n die();\n }",
"public function subscribed()\n {\n if ($this->billing_free) {\n if (!$this->billing_subscription_ends_at\n || time() < strtotime($this->billing_subscription_ends_at)\n ) {\n return true;\n }\n }\n \n if (!isset($this->cardUpFront) || $this->cardUpFront) {\n return $this->billingIsActive() || $this->onGracePeriod();\n }\n \n return $this->billingIsActive() || $this->onGracePeriod() || $this->onTrial();\n }",
"public function getTotalDue();",
"public function calculateCharge($attendee) {\n\t\n\t\t$accommodation = $attendee->accommodation;\n\t\t$day_arriving = $attendee->day_arriving;\n\t\t$day_leaving = $attendee->day_leaving;\n\t\t$band = $this->getBand($attendee);\n\t\tif (is_null($band)) {\treturn 0;\t}\n\n\t\tif ($attendee->paymentlevel && $attendee->bireconpaymentlevel) {\n\t\t # The attendee is attending both events. Tread carefully around the issue of room charges.\n\t\t\tif ($this->attendeefield == 'paymentlevel') {\n\t\t\t if ($day_arriving < 3) {\n\t\t\t\t $day_arriving = 3;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t if ($day_leaving > 3) {\n\t\t\t\t $day_leaving = 3;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t$charge = $band->full_rate;\n\t\tif ($accommodation == 'on-site') {\n\t\t $nights = $day_leaving - $day_arriving;\n\t\t\t$charge += ($nights * $band->room_rate);\n\t\t}\n\t \n\t\treturn $charge;\n\t}",
"function book_offer() {\n\n $collectorId = $_SESSION['demo']['user_id'];\n $offerId = $_GET['offerId'];\n //$date = date('d/m/y');\n //$time =date('h:m:s');\n //$insert = mysql_query(\"INSERT INTO stock(offer_ID, collector_ID,collection_date,amount, remark, status) VALUES(d','$collectorId','$date','$time')\") or die ('Unable to add booking'.mysql_error());\n $check = mysql_query(\"SELECT status from offer WHERE offer_ID='$offerId'\");\n if ($check) {\n if (mysql_result($check, 0, 'status') == \"available\") {\n if (mysql_query(\"UPDATE offer SET status ='booked', collector_id='$collectorId' WHERE offer_ID ='$offerId'\") )\n return 1;\n else\n return -1;\n }\n else\n return -1;\n } else {\n return -1;\n }\n}",
"public function getBaseTotalOnlineRefunded();",
"public function outstanding_control_report()\n {\n $this->load->model('ReportModel', 'report');\n $this->load->model('modules/Mailer', 'mailer');\n\n $date = format_date('now', 'd F Y');\n\n $reports = $this->report->getInvoiceControl();\n\n $emailTo = '[email protected]';\n $emailTitle = \"Daily report invoice outstanding on {$date}\";\n $emailTemplate = 'emails/invoice_control';\n $emailData = [\n 'email' => $emailTo,\n 'date' => $date,\n 'reports' => $reports\n ];\n $emailOptions = [\n 'cc' => ['[email protected]', '[email protected]']\n ];\n $this->mailer->send($emailTo, $emailTitle, $emailTemplate, $emailData, $emailOptions);\n }",
"public function hasBooking(): bool\n {\n return $this->bookings()->first() !== null;\n }",
"public function getHalfWorkDayDelivery() {\n return $this->_halfWorkDayDelivery;\n }",
"function it_exchange_get_abandoned_cart_email_times_sent( $email_id ) {\n\t$sent = (int) get_post_meta( $email_id, '_it_exchange_abandoned_cart_emails_sent', true );\n\treturn empty( $sent ) ? 0 : $sent;\n}",
"public function getDiscountTaxCompensationRefunded();",
"public function getFixedTimeDelivery() {\n return $this->_fixedTimeDelivery;\n }",
"private function pick_order($_disbanded = FALSE, $_delivered = TRUE)\n {\n $_accepted = TRUE;\n $_initial_order = (string) \"Delivered\";\n \n $this->add_to_log(__FUNCTION__, 'Find matching order that has required states from fetched MMS order data');\n $this->add_to_log(__FUNCTION__, \"Disbanded: $_disbanded, Delivered: $_delivered\");\n \n // Fetch MMS order based on value for delivered\n if (! $_delivered && $_disbanded) {\n $_initial_order = \"Disbanded\";\n } else \n if (! $_delivered && ! $_disbanded) {\n \n $_initial_order = \"Accepted\";\n }\n \n $this->fetch_mms_order($_initial_order);\n \n if ($this->_mms_data && is_array($this->_mms_data)) {\n $_shipmentNo = (string) \"\";\n $_mms_data = $this->_mms_data;\n \n foreach ($_mms_data as $_key => $_value) {\n \n $this->add_to_log(__FUNCTION__, 'Checking instance of fetched MMS order to see if matches');\n \n $_found = FALSE;\n $_mms_accepted = (array) array();\n $_mms_disbanded = (array) array();\n $_mms_delivered = (array) array();\n $_mms_order = $_value;\n \n // Get shipment number from mms record data\n $_shipmentNo = $this->extract_shipment_no_from_string($_mms_order['payload']);\n \n // Verify shipmentNo has a value and is a string as expected\n if ($_shipmentNo && is_string($_shipmentNo)) {\n if ($_delivered && $_disbanded) {\n // Save delivered state of fetched MMS order\n $_mms_delivered = $_mms_order;\n \n $this->fetch_mms_order('Accepted', $_shipmentNo);\n \n if ($this->_mms_data && is_array($this->_mms_data)) {\n $_mms_accepted = $this->_mms_data[1];\n }\n \n $this->fetch_mms_order('Disbanded', $_shipmentNo);\n \n if ($this->_mms_data && is_array($this->_mms_data)) {\n $_mms_disbanded = $this->_mms_data[1];\n }\n \n if (($_mms_accepted && is_array($_mms_accepted)) && (($_mms_delivered && is_array($_mms_delivered))) && (($_mms_disbanded && is_array($_mms_disbanded)))) {\n // Verify shipment numbers for each state of the MMS order all match to the shipment number been looped for this instance\n $_accept_shipno = $this->extract_shipment_no_from_string($_mms_accepted['payload']);\n $_deliver_shipno = $this->extract_shipment_no_from_string($_mms_delivered['payload']);\n $_disband_shipno = $this->extract_shipment_no_from_string($_mms_disbanded['payload']);\n \n if ($_accept_shipno == $_shipmentNo && $_deliver_shipno == $_shipmentNo && $_disband_shipno == $_shipmentNo) {\n // Construct multidimensional array containing all mms order data states\n $_data = array(\n \"Accepted\" => $_mms_accepted,\n \"Disbanded\" => $_mms_disbanded,\n \"Delivered\" => $_mms_delivered\n );\n \n // Save the order\n if ($_data && is_array($_data) && is_array($_data['Accepted']) && is_array($_data['Disbanded']) && is_array($_data['Delivered'])) {\n // $_found = TRUE if order saves\n $_found = $this->save_order($_data, $_shipmentNo);\n }\n }\n }\n } else \n if ($_delivered && ! $_disbanded) {\n \n // Save delivered state of fetched MMS order\n $_mms_delivered = $_mms_order;\n \n $this->fetch_mms_order('Accepted', $_shipmentNo);\n \n if ($this->_mms_data && is_array($this->_mms_data)) {\n $_mms_accepted = $this->_mms_data[1];\n }\n \n if (($_mms_accepted && is_array($_mms_accepted)) && (($_mms_delivered && is_array($_mms_delivered)))) {\n // Verify shipment numbers for each state of the MMS order all match to the shipment number been looped for this instance\n $_accept_shipno = $this->extract_shipment_no_from_string($_mms_accepted['payload']);\n $_deliver_shipno = $this->extract_shipment_no_from_string($_mms_delivered['payload']);\n \n if ($_accept_shipno == $_shipmentNo && $_deliver_shipno == $_shipmentNo) {\n // Construct multidimensional array containing all mms order data states\n $_data = array(\n \"Accepted\" => $_mms_accepted,\n \"Delivered\" => $_mms_delivered\n );\n \n // Save the order\n if ($_data && is_array($_data) && is_array($_data['Accepted']) && is_array($_data['Delivered'])) {\n // $_found = TRUE if order saves\n $_found = $this->save_order($_data, $_shipmentNo);\n }\n }\n }\n } else \n if (! $_delivered && $_disbanded) {\n \n // Save delivered state of fetched MMS order\n $_mms_accepted = $_mms_order;\n \n $this->fetch_mms_order('Disbanded', $_shipmentNo);\n \n if ($this->_mms_data && is_array($this->_mms_data)) {\n $_mms_disbanded = $this->_mms_data[1];\n }\n \n if (($_mms_accepted && is_array($_mms_accepted)) && (($_mms_disbanded && is_array($_mms_disbanded)))) {\n // Verify shipment numbers for each state of the MMS order all match to the shipment number been looped for this instance\n $_accept_shipno = $this->extract_shipment_no_from_string($_mms_accepted['payload']);\n $_disband_shipno = $this->extract_shipment_no_from_string($_mms_disbanded['payload']);\n \n if ($_accept_shipno == $_shipmentNo && $_disband_shipno == $_shipmentNo) {\n // Construct multidimensional array containing all mms order data states\n $_data = array(\n \"Accepted\" => $_mms_accepted,\n \"Disbanded\" => $_mms_disbanded\n );\n \n // Save the order\n if ($_data && is_array($_data) && is_array($_data['Accepted']) && is_array($_data['Disbanded'])) {\n // $_found = TRUE if order saves\n $_found = $this->save_order($_data, $_shipmentNo);\n }\n }\n }\n }\n \n if ($_shipmentNo && is_string($_shipmentNo) && strlen($_shipmentNo) > 1) {\n $this->add_to_log(__FUNCTION__, \"Check if this order is already on Test: $_shipmentNo\");\n // If this expression is TRUE then MMS order already exists on Test and we need to continue finding another MMS order\n $_found = $this->is_order_on_test($_shipmentNo) ? FALSE : $_found;\n }\n \n if ($_found === TRUE) {\n $this->add_to_log(__FUNCTION__, \"Matching order found and not on test: shipmentNumber: $_shipmentNo\");\n // Break out of foreach because we have found a matching order\n break;\n }\n }\n }\n }\n }",
"public function isRefunded()\n {\n return $this->getRefundedAmount()->isPositive();\n }"
] | [
"0.631243",
"0.6241944",
"0.60767645",
"0.5952808",
"0.5925427",
"0.5905212",
"0.5860488",
"0.582135",
"0.5814719",
"0.57733107",
"0.5763579",
"0.5735767",
"0.57323754",
"0.5717282",
"0.57066816",
"0.56492406",
"0.560451",
"0.5557361",
"0.5552874",
"0.5543098",
"0.5499387",
"0.5464533",
"0.54315656",
"0.5429839",
"0.54292786",
"0.54150975",
"0.541483",
"0.5403261",
"0.5381151",
"0.53656995",
"0.5360192",
"0.53582925",
"0.5356227",
"0.535397",
"0.535397",
"0.5344472",
"0.5340835",
"0.53344095",
"0.5331327",
"0.5311245",
"0.53046584",
"0.52785337",
"0.5268386",
"0.5265539",
"0.5257984",
"0.52469957",
"0.5241221",
"0.5236185",
"0.5225898",
"0.52241987",
"0.52235824",
"0.5219153",
"0.52005035",
"0.51985496",
"0.51923054",
"0.5179625",
"0.51794136",
"0.51790446",
"0.51638925",
"0.51627374",
"0.5158108",
"0.51517534",
"0.51512355",
"0.5143353",
"0.5133353",
"0.51329625",
"0.5127481",
"0.51258564",
"0.512349",
"0.51227754",
"0.51168203",
"0.51125294",
"0.51104975",
"0.5095136",
"0.50819993",
"0.506611",
"0.506593",
"0.5063991",
"0.50636727",
"0.50629246",
"0.50613636",
"0.5055627",
"0.5049263",
"0.5048757",
"0.5041904",
"0.5035688",
"0.5033952",
"0.5031708",
"0.5024607",
"0.50227994",
"0.50203323",
"0.5018604",
"0.49968177",
"0.49962166",
"0.49924144",
"0.49916688",
"0.4981522",
"0.4979896",
"0.49747545",
"0.49743095"
] | 0.7154301 | 0 |
Core::getCourier Online Deliveries list() | public function getCourier_deliveries_list()
{
$sql = "SELECT a.id, a.order_inv, a.c_driver, a.r_address, a.created, a.r_hour, a.status_courier, a.act_status, s.mod_style, s.color FROM consolidate a, styles s WHERE a.status_courier=s.mod_style AND a.c_driver = '".$this->username."' AND a.act_status=1 ORDER BY a.id ASC";
$row = self::$db->fetch_all($sql);
return ($row) ? $row : 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDeliveries()\n {\n return $this->deliveries;\n }",
"function get_export_list(){\n\n\t\t$output = array();\n\n\t\t$query = \"SELECT lead_id FROM leads_pending\n\t\tWHERE sent_fes = 0\n\t\tLIMIT 60000; \";\n\n\t\tif ($result = mysql_query($query, $this->conn)){\n\t\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t\t$output[] = $row['lead_id'];\n\t\t\t}\n\t\t}else{\n\t\t\t$this->display(\"Query failed: $query\" . mysql_error($this->conn));\n\t\t}\n\n\t\treturn $output;\n\t}",
"public function all_deliveries() {\n\t\t$delivery=$this->uri->segment(3);\n\t\t//echo $delivery;\n $data['title'] = \"All Deliveries\";\n $data['content_view'] = \"dispatched_listing_v\";\n $data['banner_text'] = \"Dispatched Orders\";\n $data['link'] = \"dispatched_listing_v\";\n\t\t$data['myClass'] = $this;\n $data['order_list']=Kemsa_Order::get_facility_order($delivery);\n $data['quick_link'] = \"dispatched_listing_v\";\n $this -> load -> view(\"template\", $data);\n }",
"function mailchimp_list(){\n\t\t$list = $this->mailchimp->lists(array(), 0, 25);\n\t\tif($list) {\n\t\t\t$this->sci->assign('maindata' , $list['data']);\n\t\t\t$this->sci->assign('total' , $list['total']);\n\t\t}\n\t\t//print_r($list);\n\t\t$this->sci->da('mailchimp_list.htm');\n\t}",
"public function getCourier_list_booking_delivered()\n {\n\t\t $sql = \"SELECT a.id, a.order_inv, a.r_name, a.c_driver, a.r_address, a.r_dest, a.r_city, a.r_curren, a.r_costtotal, a.r_description, a.total_insurance, a.total_tax, a.payment_status, a.pay_mode, a.created, a.r_hour, a.status_courier, a.act_status, a.con_status, s.mod_style, s.color FROM add_courier a, styles s WHERE a.status_courier=s.mod_style AND a.username = '\".$this->username.\"' AND a.status_courier='Delivered' ORDER BY a.id ASC\";\n $row = self::$db->fetch_all($sql);\n \n return ($row) ? $row : 0;\n }",
"public function actionListAvailable()\n\t{\n\t\t$destination = new Destinations();\n\t\t$tour = new Tours();\n\n\t\t$models = $destination->getAvailableDestination();\n\n\t\t$data = array();\n\t\tforeach ($models as $model) {\n\t\t\t$totalTours = count($tour->getTourInDestination($model->id));\n\n\t\t\t$data[] = array('des' => $model, 'totalTours' => $totalTours);\n\t\t}\n\t\theader('Content-Type: application/json');\n\t\theader(\"Access-Control-Allow-Origin: *\");\n header(\"Access-Control-Allow-Methods: GET, POST, PUT, DELETE\");\n echo json_encode($data);\n\t}",
"public static function list_deals() {\n\t\t$msg = '';\n\t\t$query = self::getDeals();\n\t\tinclude 'views/_list_deals.php';\n\t}",
"public function get_all_subscribed4explanations () {\n\n $list = array();\n $result = $this->query( \"SELECT * FROM beamtime_subscriber\" );\n $nrows = mysql_numrows( $result );\n for( $i = 0; $i < $nrows; $i++ ) {\n $row = mysql_fetch_array( $result, MYSQL_ASSOC );\n $row['subscribed_time'] = LusiTime::from64($row['subscribed_time']);\n array_push ( $list, $row );\n }\n return $list;\n }",
"public function ListarDelivery()\n\t{\n\t\tself::SetNames();\n\t\nif($_SESSION[\"acceso\"] == 'repartidor'){\n\n\t$sql = \"SELECT ventas.idventa, ventas.codventa, ventas.codcliente as cliente, ventas.totalpago, ventas.entregado, ventas.delivery, ventas.repartidor, clientes.codcliente, clientes.cedcliente, clientes.nomcliente, clientes.direccliente, usuarios.nombres, GROUP_CONCAT(cantventa, ' | ', producto SEPARATOR '. ') AS detalles FROM ventas INNER JOIN detalleventas ON detalleventas.codventa = ventas.codventa LEFT JOIN clientes ON ventas.codcliente = clientes.codcliente LEFT JOIN usuarios ON ventas.repartidor = usuarios.codigo WHERE ventas.repartidor = '\".$_SESSION[\"codigo\"].\"' AND ventas.entregado = 1 GROUP BY detalleventas.codventa\";\n foreach ($this->dbh->query($sql) as $row)\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\n\t} else {\n\n\t$sql = \"SELECT ventas.idventa, ventas.codventa, ventas.codcliente as cliente, ventas.totalpago, ventas.entregado, ventas.delivery, ventas.repartidor, clientes.codcliente, clientes.cedcliente, clientes.nomcliente, clientes.direccliente, usuarios.nombres, GROUP_CONCAT(cantventa, ' | ', producto SEPARATOR '<br>') AS detalles FROM ventas INNER JOIN detalleventas ON detalleventas.codventa = ventas.codventa LEFT JOIN clientes ON ventas.codcliente = clientes.codcliente LEFT JOIN usuarios ON ventas.repartidor = usuarios.codigo WHERE ventas.delivery = 1 AND ventas.repartidor != 0 AND ventas.entregado = 1 AND ventas.codigo = '\".$_SESSION[\"codigo\"].\"' GROUP BY detalleventas.codventa\";\n foreach ($this->dbh->query($sql) as $row)\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 saleListCsv()\n {\n return Excel::download(new allInvoiceExport(), 'invoice_lists_'. time() .'.csv');\n }",
"public function list();",
"public function list();",
"public function list();",
"public function getDeliveryList()\n {\n if ($this->_oDelList === null) {\n $this->_oDelList = oxNew('oxDeliveryList');\n $this->_oDelList->getList();\n }\n\n return $this->_oDelList;\n }",
"public static function fetchDueList()\n {\n $aDueList = eZPersistentObject::fetchObjectList( eZStaticExportScheduler::definition(),\n \t null,\n \t array( 'date' => array( '<=', time() ) ),\n \t array( 'date' => 'desc' ) );\n\n\t\t\n\t\treturn $aDueList;\n }",
"function listarCitasDisponibles()\n\t\t{\n\t\t\t$dia = $this->uri->segment(3);\n\t\t\t$mes = $this->uri->segment(4);\n\t\t\t$year = $this->uri->segment(5);\n\t\t\t$diaDeLaSemana = date('N',mktime(0, 0, 0, $mes, $dia, $year));\n\t\t\t\n\t\t\t//Obetenemos los arrays de horarios del dia de la semana concreto\n\t\t\t$diasSemana = $this->PacienteModel->getCalendario();\n\t\t\tforeach ($diasSemana as $value) {\n\t\t\t\tif($diaDeLaSemana == $value->Dia)\n\t\t\t\t{\n\t\t\t\t\t$horaInicio = explode(':', $value->HoraInicio);\n\t\t\t\t\t$horaFin = explode(':', $value->HoraFin);\n\t\t\t\t\t$duracionCita[] = $value->DuracionCita;\n\t\t\t\t\t$unixInicio[] = mktime($horaInicio[0], $horaInicio[1], 0, $mes, $dia, $year);\n\t\t\t\t\t$unixFin[] = mktime($horaFin[0], $horaFin[1], 0, $mes, $dia, $year);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Comprobamos las citas planificadas para el dia concreto\n\t\t\t$data = $this->PacienteModel->getCitasDisponibles($dia, $mes, $year);\n\t\t\tforeach ($data as $value) {\n\t\t\t\t$aux = explode(\" \", $value->FechaIni);\n\t\t\t\t$aux = $aux[1];\n\t\t\t\t$aux = explode(\":\", $aux);\n\t\t\t\t$hora[] = $aux[0];\n\t\t\t\t$min[] = $aux[1];\n\t\t\t}\n\t\t\t\n\t\t\t//Si no hay ninguna cita se ponen los arrays fuera de rango\n\t\t\tif(!isset($hora) && !isset($min))\n\t\t\t{\n\t\t\t\t$hora[0] = -1;\n\t\t\t\t$min[0] = -1;\n\t\t\t}\n\n\t\t\t//Visualizamos las citas disponibles\n\t\t\techo '<ul class=\"list-group\">';\n\t\t\techo '<li class=\"list-group-item\">'.date('d-m-Y',mktime(0, 0, 0, $mes, $dia, $year)).'</li>';\n\t\t\tfor($j = 0; $j < sizeof($unixInicio); $j++)\n\t\t\t\tfor($i = $unixInicio[$j]; $i < $unixFin[$j]; $i += 60*$duracionCita[$j] )\n\t\t\t\t{\n\t\t\t\t\tif ( (in_array(date('H',$i), $hora) && in_array(date('i',$i), $min) )\n\t\t\t\t\t\t|| time()>$i )\n\t\t\t\t\t\techo '<li class=\"list-group-item\">'.date('H:i',$i).'</li>';\n\t\t\t\t\telse \n\t\t\t\t\t\techo '<li class=\"list-group-item active\">\n\t\t\t\t\t\t\t<a style=\"color: black;\" onclick=\"crearCita(\\''.$this->session->userdata('id').'\\',\n\t\t\t\t\t\t\t\\''.date('Y-m-d H:i:s',$i).'\\',\n\t\t\t\t\t\t\t\\''.date('Y-m-d H:i:s',$i + 60 * $duracionCita[$j]).'\\'\n\t\t\t\t\t\t\t)\">'.date('H:i',$i).'</a></li>';\n\t\t\t\t}\n\t\t\techo '</ul>';\n\t\t}",
"public function getList();",
"public function getList();",
"function getCampaignList() {\n\t\treturn $this->gateway->execCommad('getCampaignList',\"\");\n\t}",
"public function getList()\r\n {\r\n // Le résultat sera un tableau d'instances de Sponsor.\r\n\r\n\t$entrainements = array();\r\n\r\n $q = $this->_db->query(\"SELECT id, jour, heure_debut as heureDebut, heure_fin as heureFin, lieu FROM entrainement\");\r\n //$q->execute();\r\n\r\n while ($donnees = $q->fetch(PDO::FETCH_ASSOC))\r\n {\r\n $entrainements[] = new BoEntrainement($donnees);\r\n }\r\n\r\n return $entrainements;\r\n }",
"public function index()\n {\n $Debtors_listings = Debtors_listings::all();\n return response()->json($Debtors_listings);\n }",
"public function listDemarcaciones()\n {\n $list_demarcaciones = \\common\\models\\autenticacion\\Demarcaciones::find()->all();\n\n return $list_demarcaciones;\n }",
"function get_discounts()\n\t\t{\n\t\t\tglobal $db;\n\t\t\t$query = \" SELECT a.*\n\t\t\t\t\t\t FROM \n\t\t\t\t\t\t \t\".$this -> table_discount.\" AS a\n\t\t\t\t\t\t \tORDER BY ordering \";\n\t\t\t$sql = $db->query($query);\n\t\t\t$list = $db->getObjectList();\n\t\t\treturn $list;\n\t\t}",
"public function fetchList();",
"public function exportParticipantsList(){\n return (new ParticipantsExport())->download('participants.xls');\n }",
"public function newsletterList()\n {\n return $this->ozioma->newsletter->list();\n }",
"public function show(Deliveries $deliveries)\n {\n //\n }",
"public function index()\n {\n $delivers = Internal::paginate(5);\n return view('admin.internal.pendingDelivers' , compact('delivers'));\n }",
"public function demandeListeTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Demande\");//type array\n\t}",
"public static function getTwistyListForFront(){\n\t\t$sql = 'SELECT id_twisty,product_name,ord.id_order,ord.total_paid_tax_incl,od.product_reference,product_ean13,product_quantity,tor.id_order_detail,qte_picked,id_box,is_finished,date_twisty,payment,total_shipping '.\n\t\t'FROM '._DB_PREFIX_.'twisty_orders tor '.\n\t\t'LEFT JOIN '._DB_PREFIX_.'order_detail od ON od.id_order_detail=tor.id_order_detail '.\n\t\t'LEFT JOIN '._DB_PREFIX_.'orders ord ON ord.id_order=od.id_order '.\n\t\t'WHERE ord.id_order in ('.\n\t\t'\tSELECT id_order '.\n\t\t'\tFROM '._DB_PREFIX_.'twisty_orders tor '.\n\t\t'\tLEFT JOIN '._DB_PREFIX_.'order_detail od ON od.id_order_detail=tor.id_order_detail '.\n\t\t'\tGROUP BY id_order '.\n\t\t'\tHAVING count(tor.id_order_detail)=sum(is_valid) and count(tor.id_order_detail)=sum(tor.is_show) '.\n\t\t') '.\n\t\t'ORDER BY id_box,product_ean13';\n\t\tif ($results = Db::getInstance()->ExecuteS($sql))\n\t\t\treturn $results;\n\t}",
"public function displayDeliveryTable(){\n $sql=\"SELECT * FROM `deliveries`\n INNER JOIN `users` ON deliveries.user_id=users.user_id\n INNER JOIN `accounts`ON users.account_id=accounts.account_id\";\n $result=$this->conn->query($sql);\n $rows=array();\n\n if($result->num_rows>0){\n while($displayDeli=$result->fetch_assoc()){\n $rows[]=$displayDeli;\n }\n return $rows;\n }else{\n return false;\n }\n }",
"public function lists(): InstantMessageResponse;",
"public function deliveryboy_get()\n { \n $this->response($this->deliveryboy_model->get_all());\n }",
"public static function getList()\n {\n return CHtml::listData(Departamentos::model()->findAll(),'id_departamento', 'descripcion');\n }",
"public function getAllDeatils() {\n $select = $this->select()\n ->from(array('wr' => 'withdrawal_request'))\n ->setIntegrityCheck(false)\n ->join(array('u' => 'users'), 'u.user_id = wr.user_id', array(\"u.user_name\"))\n ->order('requested_amt DESC');\n\n $result = $this->getAdapter()->fetchAll($select);\n\n if ($result) {\n return $result;\n }\n }",
"public function getList()\n {\n }",
"public function dict_cables() {\n $list = array();\n $sql = \"SELECT * FROM {$this->connection->database}.dict_cable ORDER BY name\";\n $result = $this->connection->query ( $sql );\n $nrows = mysql_numrows( $result );\n for( $i = 0; $i < $nrows; $i++ )\n array_push (\n $list,\n new NeoCaptarDictCable (\n $this->connection,\n $this,\n mysql_fetch_array( $result, MYSQL_ASSOC )));\n\n return $list;\n }",
"public function dict_cables() {\n $list = array();\n $sql = \"SELECT * FROM {$this->connection->database}.dict_cable ORDER BY name\";\n $result = $this->connection->query ( $sql );\n $nrows = mysql_numrows( $result );\n for( $i = 0; $i < $nrows; $i++ )\n array_push (\n $list,\n new NeoCaptarDictCable (\n $this->connection,\n $this,\n mysql_fetch_array( $result, MYSQL_ASSOC )));\n\n return $list;\n }",
"public function getObjectivesList() {\n return $this->_get(9);\n }",
"public function getAutoposList(){\n return $this->_get(2);\n }",
"public function listing();",
"static function listNextExhibit(){\n\t\t$res = requete_sql(\"SELECT id FROM exhibit WHERE begin_date > now() AND visible = TRUE ORDER BY begin_date ASC\");\n\t\t$res = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\t$list = array();\n\t\tforeach ($res as $exhibit) {\n\t\t\t$exhibit = new Exhibit($exhibit['id']);\n\t\t\tarray_push($list, $exhibit);\n\t\t}\n\t\treturn $list;\n\t}",
"static function listPassedExhibit(){\n\t\t$res = requete_sql(\"SELECT id FROM exhibit WHERE end_date < now() ORDER BY end_date ASC\");\n\t\t$res = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\t$list = array();\n\t\tforeach ($res as $exhibit) {\n\t\t\t$exhibit = new Exhibit($exhibit['id']);\n\t\t\tarray_push($list, $exhibit);\n\t\t}\n\t\treturn $list;\n\t}",
"public function getDownloadsList($customerId);",
"public function getDeliveryReport();",
"public function listOffers()\n {\n global $mysqli, $_GET;\n $typ_opt =[\"offer-discount\"=>\"Rabatt auf reguläres Angebot\", \"offer\"=>\"Eigenständiges Angebot\", \"offer-additionaldays\"=>\"Zusatztage auf reguläres Angebot\"];\n $offer_list = '';\n $hotel_id = $_GET['hid'];\n $offers = \"SELECT OFR.* FROM `offers` OFR WHERE OFR.hotel_id=\".$hotel_id.\" AND OFR.status<>'deleted' ORDER BY OFR.id DESC \";\n $rows = $mysqli->query($offers);\n if ($rows->num_rows > 0) {\n $i=1;\n while ($offer = $rows->fetch_object()) {\n $offer_id = $offer->id;\n $course_opts = $this->getCourseOptions($offer->course);\n $status_opts = $this->getStatusOptions($offer->status);\n $date_opts = $this->getTypeDateOptions($offer->type_date);\n $typ_opts = $this->getTypes($offer->type);\n $header = $offer->header;\n $footer = $offer->footer;\n $begindate = ($offer->date_begin!=null)?date(\"d.m.Y\",strtotime($offer->date_begin)):'';\n $enddate = ($offer->date_end!=null)?date(\"d.m.Y\",strtotime($offer->date_end)):'';\n\n $offer_list .= '<div class=\"panel panel-default\">\n <div class=\"panel-heading\" role=\"tab\" id=\"heading'.$i.'\"><a class=\"collapsed\" role=\"button\" data-toggle=\"collapse\" data-parent=\"#accordion\" href=\"#collapse'.$i.'\" aria-expanded=\"false\" aria-controls=\"collapse'.$i.'\"><h4 id=\"headtxt_'.$offer_id.'\">'.$offer->title.'<small> Typ: '.$typ_opt[$offer->type].'</small> '.$begindate.' - '.$enddate.'</h4></a>\n <a class=\"btn btn-primary pull-right\" href=\"offer_details.php?ofrid='.$offer_id.'\" role=\"button\">Optionen anzeigen</a>\n <div class=\"clearfix\"></div>\n </div>\n <div id=\"collapse'.$i.'\" class=\"panel-collapse collapse\" role=\"tabpanel\" aria-labelledby=\"heading'.$i.'\">\n <div class=\"panel-body\">\n <form id=\"offerFrm_'.$offer_id.'\" onsubmit=\"return false\">\n <div class=\"row\">\n <div class=\"form-group col-md-6\"><label>Verfügbar von:</label> <input type=\"text\" class=\"form-control offrDate\" placeholder=\"Verfügbar von\" id=\"date_begin_'.$offer_id.'\" name=\"date_begin\" value=\"'.$begindate.'\" readonly></div>\n <div class=\"form-group col-md-6\"><label>Verfügbar bis:</label> <input type=\"text\" class=\"form-control offrDate\" placeholder=\"Verfügbar bis\" id=\"date_end_'.$offer_id.'\" name=\"date_end\" value=\"'.$enddate.'\" readonly></div>\n </div>\n <div class=\"row\">\n <div class=\"form-group col-md-6\"><label>Titel</label> <input type=\"text\" class=\"form-control\" placeholder=\"Title\" id=\"title_'.$offer_id.'\" name=\"title\" value=\"'.$offer->title.'\"></div>\n <div class=\"form-group col-md-6\"><label>Untertitel </label> <input type=\"text\" class=\"form-control\" placeholder=\"Sub title\" name=\"subtitle\" value=\"'.$offer->subtitle.'\"></div>\n </div>\n <div class=\"row\">\n <div class=\"form-group col-md-6\"><label>Kopfbereich über der Beschreibung </label> <textarea name=\"header\" id=\"header_'.$offer_id.'\" class=\"form-control textarea mceEditor\" rows=\"10\">'.$header.'</textarea></div>\n <div class=\"form-group col-md-6\"><label>Fußbereich über der Beschreibung </label> <textarea name=\"footer\" id=\"footer_'.$offer_id.'\" class=\"form-control textarea mceEditor\" rows=\"10\">'.$footer.'</textarea></div>\n </div>\n <div class=\"row\">\n <div class=\"form-group col-md-6\"><label>Leistungen </label> <textarea name=\"services\" class=\"form-control textarea\" rows=\"10\">'.$offer->services.'</textarea></div>\n <div class=\"form-group col-md-6\"><label>Beschreibung (meist Golfkurs / Bei Angebot nicht nötig) </label> <textarea name=\"description\" class=\"form-control textarea\" rows=\"10\">'.$offer->description.'</textarea></div>\n </div>\n <div class=\"row\">\n <div class=\"form-group col-md-6\"><label>Alias </label> <input type=\"text\" class=\"form-control\" placeholder=\"Alias\" name=\"alias\" value=\"'.$offer->alias.'\"></div>\n <div class=\"form-group col-md-6\"><label>Typ </label><select name=\"type\" class=\"form-control\">'.$typ_opts.'</select></div>\n </div>\n <div class=\"row\">\n <div class=\"form-group col-md-6\"><label>Kurs</label><select name=\"course\" class=\"form-control\">'.$course_opts.'</select></div>\n <div class=\"form-group col-md-6\"><label>Status</label><select name=\"status\" class=\"form-control\">'.$status_opts.'</select></div>\n </div>\n <div class=\"row\">\n <div class=\"form-group col-md-6\"><label>Datum Typ</label><select name=\"type_date\" class=\"form-control\">'.$date_opts.'</select></div>\n <div class=\"form-group col-md-6\"><label>Rabatt <small>(EUR)</small></label><input type=\"text\" class=\"form-control\" placeholder=\"Discount\" name=\"discount\" value=\"'.$offer->discount.'\"></div>\n </div>\n <input type=\"hidden\" name=\"offer_id\" value=\"'.$offer_id.'\">\n <div class=\"form-group\"><button class=\"btn btn-primary btn-lg btn-block btnUpdate\" id=\"updateBtn-'.$offer_id.'\" type=\"button\">Aktualisieren</button></div>\n </form>\n </div>\n </div>\n </div>';\n $i++;\n }\n }\n return $offer_list;\n }",
"function printOfferList() {\n\n\t\t// disable caching of target booking page\n\t\t$conf = array(\n\t\t // Link to booking page\n\t\t 'parameter' => $this->lConf['gotoPID'],\n\t\t // We must add cHash because we use parameters\n\t\t 'useCacheHash' => false,\n\t\t);\n\n\t\t$contentError = array();\n\t\t$offers['numOffers'] = 0;\n\t\t$i = 0;\n\n\t\t$productIds = explode(',', $this->lConf['ProductID']);\n\n\t\tforeach ( $productIds as $key => $uid ) {\n\n\t\t\tif (($this->lConf['productDetails'][$uid]['capacitymin']+$this->lConf['productDetails'][$uid]['capacitymax']) > 0) {\n\t\t\t\t$product = $this->lConf['productDetails'][$uid];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// skip because empty or OffTimeProductID\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$i++;\n\t\t\t$offers[$i] = '';\n\t\t\tunset($interval);\n\t\t\tunset($contentError);\n\n\t\t\tif (sizeof($this->lConf['OffTimeProductIDs']) > 0)\n\t\t\t\t$offTimeProducts = ','.implode(',', $this->lConf['OffTimeProductIDs']);\n\n\t\t\tif ($product['maxAvailable'] < $this->lConf['daySelector']) {\n\t\t\t\t$interval['limitedVacancies'] = $availableMaxDate;\n\t\t\t\t$bookNights = $product['maxAvailable'];\n\t\t\t\tif ($product['maxAvailable'] == 1)\n\t\t\t\t\t$text_periods = ' '.$this->pi_getLL('period');\n\t\t\t\telse\n\t\t\t\t\t$text_periods = ' '.$this->pi_getLL('periods');\n\n\t\t\t\t$contentError[] = sprintf($this->pi_getLL('error_vacancies_limited'), $product['maxAvailable'].' '.$text_periods);\n\t\t\t} else {\n\t\t\t\t$bookNights = $this->lConf['daySelector'];\n\t\t\t}\n\n\t\t\tif ($product['minimumStay'] > $this->lConf['daySelector']) {\n\t\t\t\tif ($product['minimumStay'] == 1)\n\t\t\t\t\t$text_periods = ' '.$this->pi_getLL('period');\n\t\t\t\telse\n\t\t\t\t\t$text_periods = ' '.$this->pi_getLL('periods');\n\n\t\t\t\t$contentError[] = sprintf($this->pi_getLL('error_minimumStay'), $product['minimumStay'].' '.$text_periods);\n\t\t\t\tif ($bookNights < $product['minimumStay'])\n\t\t\t\t\t$bookNights = $product['minimumStay'];\n\t\t\t}\n\n\t\t\t// check if checkIn is ok for startDate\n\t\t\tif ($product['prices'][$this->lConf['startDateStamp']]['checkInOk'] === '0') {\n\t\t\t\t$contentError[] = $this->pi_getLL('error_no_checkIn_on').' '.strftime('%a, %x', $this->lConf['startDateStamp']);\n\t\t\t\t$enableBookingLink = 0;\n\t\t\t\tfor ($j=$this->lConf['startDateStamp']; $j < strtotime('+14 day', $this->lConf['startDateStamp']); $j=strtotime('+1 day', $j)) {\n\n\t\t\t\t\tif ($product['prices'][$j]['checkInOk'] == '1') {\n\t\t\t\t\t\t$interval['startDate'] = $j;\n\n\t\t\t\t\t\tif ($this->lConf['enableBookingLink']) {\n\t\t\t\t\t\t\t$params_united = $interval['startDate'].'_'.$bookNights.'_'.$this->lConf['adultSelector'].'_'.$product['uid'].$offTimeProducts.'_'.$this->lConf['uidpid'].'_'.$this->lConf['PIDbooking'].'_bor1';\n\t\t\t\t\t\t\t$conf['additionalParams'] = '&'.$this->prefixId.'[ABx]='.$params_united;\n\t\t\t\t\t\t\t$url = $this->cObj->typoLink(strftime('%a, %x', $interval['startDate']), $conf);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$url = strftime('%a, %x', $j);\n\n\t\t\t\t\t\t$contentError[] = $this->pi_getLL('error_next_checkIn_on').' '.$url;\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$enableBookingLink = $this->lConf['enableBookingLink'];\n\n\t\t\t// show calendar list only up to the vacant day\n\t\t\tif (empty($interval['startDate']))\n\t\t\t\t$interval['startDate'] = $this->lConf['startDateStamp'];\n\t\t\t$interval['endDate'] = strtotime('+'.$bookNights.' day', $this->lConf['startDateStamp']);\n\n\t\t\t$params_united = $interval['startDate'].'_'.$bookNights.'_'.$this->lConf['adultSelector'].'_'.$product['uid'].$offTimeProducts.'_'.$this->lConf['uidpid'].'_'.$this->lConf['PIDbooking'].'_bor1';\n\n\t\t\tif (!empty($product['uiddetails']) && !empty($product['detailsRaw']['header'])) {\n\t\t\t\t// get detailed description:\n\t\t\t\t$title = $product['detailsRaw']['header'];\n \n\t\t\t} else {\n\t\t\t\t$title = $product['title'];\n\t\t\t}\n\n\t\t\tif (!empty($product['detailsRaw']['bodytext']) && !empty($product['uiddetails'])) {\n\n\t\t\t\t$mconf['tables'] = 'tt_content';\n\t\t\t\t$mconf['source'] = explode('#', $product['uiddetails'])[1];\n\t\t\t\t$mconf['dontCheckPid'] = 1;\n\n\t\t\t\t$bodytext = $this->cObj->cObjGetSingle('RECORDS', $mconf);\n\n\t\t\t} else {\n\n\t\t\t\tunset($bodytext);\n\n\t\t\t}\n\n\t\t\tif ($enableBookingLink) {\n\t\t\t\t$conf['additionalParams'] = '&'.$this->prefixId.'[ABx]='.$params_united.'&'.$this->prefixId.'[abnocache]=1';\n\t\t\t\t$link = $this->cObj->typoLink($title, $conf);\n\t\t\t}\n\t\t\telse\n\t\t\t\t$link = $title;\n\n\t\t\t$linkBookNow = '';\n\t\t\tif ($product['maxAvailable'] > 0) {\n\t\t\t\t$offers['numOffers']++;\n\t\t\t\t$offers[$i] .= '<li class=\"offerList\"><div class=\"productTitle\">'.$link.' <b>'.strtolower($this->pi_getLL('result_available')).'</b></div>';\n\t\t\t\t$availableMaxDate = strtotime('+ '.$product['maxAvailable'].' days', $this->lConf['startDateStamp']);\n\n\t\t\t\tif (count($contentError)>0) {\n\t\t\t\t\t$offers[$i] .= '<ul class=\"errorHints\">';\n\t\t\t\t\tforeach ($contentError as $error)\n\t\t\t\t\t\t$offers[$i] .= '<li>'.$error.'</li>';\n\t\t\t\t\t$offers[$i] .= '</ul>';\n\t\t\t\t}\n\t\t\t\t$offers[$i] .= $bodytext;\n\n\t\t\t\tif ($enableBookingLink)\n\t\t\t\t\t$offers[$i] .='<form class=\"requestForm\" action=\"'.$this->pi_getPageLink($this->lConf['gotoPID']).'\" method=\"POST\">';\n\n\t\t\t\t$offers[$i] .= $this->printCalculatedRates($uid, $bookNights, 1, 1);\n\n\t\t\t\tif ($enableBookingLink)\n\t\t\t\t\t$linkBookNow = '<input type=\"hidden\" name=\"'.$this->prefixId.'[ABx]\" value=\"'.$params_united.'\">\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"'.$this->prefixId.'[abnocache]\" value=\"1\">\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"'.$this->prefixId.'[ABwhatToDisplay]\" value=\"BOOKING\"><br/>\n\t\t\t\t\t\t\t\t\t<input class=\"submit\" type=\"submit\" name=\"'.$this->prefixId.'[submit_button]\" value=\"'.htmlspecialchars($this->pi_getLL('bookNow')).'\">\n\t\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t';\n\n\t\t\t} else {\n\t\t\t\t$offers[$i] .= '<li class=\"offerList\"><div class=\"productTitle\"><b>'.$title.' '.strtolower($this->pi_getLL('result_occupied')).'</b> </div>';\n\t\t\t}\n\n\t\t\t// show calendars following TS settings\n\t\t\tif ($this->lConf['form']['showCalendarMonth']>0) {\n\t\t\t\tif (intval($this->lConf['form']['showMonthsBeforeStart'])>0)\n\t\t\t\t\t$intval['startDate'] = strtotime('-'.$this->lConf['form']['showMonthsBeforeStart'].' months', $interval['startDate']);\n\t\t\t\telse\n\t\t\t\t\t$intval['startDate'] = $interval['startDate'];\n\t\t\t\t$intval['endDate'] = strtotime('+'.$this->lConf['form']['showCalendarMonth'].' months', $intval['startDate']);\n\t\t\t\t$offers[$i] .= tx_abbooking_div::printAvailabilityCalendarDiv($product['uid'].$offTimeProducts, $intval, $this->lConf['form']['showCalendarMonth'], 0);\n\n\t\t\t} else if ($this->lConf['form']['showCalendarWeek']>0) {\n\t\t\t\t\t$intval['startDate'] = $interval['startDate'];\n\t\t\t\t$intval['endDate'] = strtotime('+'.$this->lConf['form']['showCalendarWeek'].' weeks', $intval['startDate']);\n\t\t\t\t$offers[$i] .= tx_abbooking_div::printAvailabilityCalendarLine($product['uid'].$offTimeProducts, $intval);\n\t\t\t} else\n\t\t\t\t$offers[$i] .= tx_abbooking_div::printAvailabilityCalendarLine($product['uid'].$offTimeProducts, $interval);\n\n\t\t\tif ($enableBookingLink)\n\t\t\t\t$offers[$i] .= $linkBookNow;\n\t\t\t// close list item...\n\t\t\t$offers[$i] .= '</li>';\n\t\t}\n\t$offers['amount'] = $i;\n\treturn $offers;\n\t}",
"public function list_all() {\n global $retailers;\t\t\n $this->names = array_column($retailers, 'name');\n }",
"public function getObjectivesList() {\n return $this->_get(8);\n }",
"public function get_list()\n\t{\n\n\t\t$sel=$this->db->prepare(\"SELECT * from shop ORDER BY distance ASC\");\n\n $sel->execute();\n\n return ($sel->fetchAll(PDO::FETCH_ASSOC));\n\t\t\n\n\n\n }",
"public function otherList()\n\t{\n\t\techo json_encode($this->other_schedule->fetchData());\n\t}",
"public function get_all_my_trades()\n {\n return $this->_request('allmytrades');\n }",
"public function exportSubscribers(){\n\n\t\t// Get all records\n\t\t$list = model('NewsletterSubscriberModel')->adminGetForExport();\n\n\t\t// Generate CSV data\n\t\t$counter = 1;\n\t\t$csv = 'Nr;Naam;Email;Ingeschreven;Blacklisted';\n\t\tforeach($list as &$row){\n\t\t\t$csv .= \"\\n\" . implode(';', array(\n\t\t\t\t$counter++,\n\t\t\t\tstr_replace(';', ' ', $row['name']),\n\t\t\t\tstr_replace(';', ' ', $row['email']),\n\t\t\t\tdate('d/m/Y', strtotime($row['created'])),\n\t\t\t\t$row['blacklisted']\n\t\t\t));\n\t\t}\n\t\tunset($row);\n\n\t\t// Output data\n\t\theader('Pragma: public');\n\t\theader('Expires: 0');\n\t\theader('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n\t\theader('Cache-Control: private', false);\n\t\theader('Content-Type: text/csv');\n\t\theader('Content-Disposition: attachment; filename=\"inschrijvingen.csv\"');\n\t\theader('Content-Transfer-Encoding: binary');\n\t\theader('Content-Length: '.strlen($csv));\n\t\texit($csv);\n\t}",
"public function index()\n {\n $comercioDespachos = ComercioDespacho::with(['status'])\n ->get();\n \n return $comercioDespachos;\n\n }",
"public function listerDemandes() {\n $q = $this->db->prepare('SELECT * FROM DemandeMain WHERE proj_id = :id AND datetime < NOW() - INTERVAL 30 SECOND LIMIT 1');\n $q->bindValue(':id', $this->id, PDO::PARAM_INT);\n $q->execute();\n $row = $q->fetch();\n if(!empty($row)) {\n $this->donnerMain($row['ut_id']);\n $this->deleteDemande($row['ut_id']);\n }\n \n // Then, removing old requests\n $q = $this->db->prepare('DELETE FROM DemandeMain WHERE proj_id = :id AND datetime < NOW() - INTERVAL 30 SECOND');\n $q->bindValue(':id', $this->id, PDO::PARAM_INT);\n $q->execute();\n \n // Now listing current requests\n $q = $this->db->prepare('SELECT * FROM DemandeMain WHERE proj_id = :id');\n $q->bindValue(':id', $this->id, PDO::PARAM_INT);\n $q->execute();\n \n $demandes = array();\n foreach ($q->fetchAll() as $qdemande) {\n $membre = Utilisateur::getM($this->db, intval($qdemande['ut_id']));\n $demande = array($membre,$qdemande['datetime']);\n $demandes[] = $membre;\n }\n return $demandes;\n }",
"public function getDiscounts(): array;",
"public function listAction(){\n\n $listAdverts = $this\n ->getDoctrine()\n ->getManager()\n ->getRepository('OCPlatformBundle:Advert')\n ->getAdvertWithApplications()\n ;\n\n foreach ($listAdverts as $advert) {\n // Ne déclenche pas de requête : les candidatures sont déjà chargées !\n // Vous pourriez faire une boucle dessus pour les afficher toutes\n $advert->getApplications();\n }\n }",
"public function getBzList() {\n if ($this->cached['Bz']) return array_values($this->cache['Bz']);\n return XPClass::forName('de.uska.db.Progress')\n ->getMethod('getPeer')\n ->invoke()\n ->doSelect(new Criteria(\n array('bz_id', $this->getBz_id(), EQUAL)\n ));\n }",
"public function index()\n {\n $deliveryStatuses = $this->__get('Delivery')->getDeliveryList();\n\n $this->View()->setAssign('deliveryStatuses', $deliveryStatuses);\n }",
"public function all()\n {\n return $this->get('/sale/delivery-methods');\n }",
"public function lists();",
"public function getList(){\n\t\t$listeDepartements = array();\n\t\t$req = $this->db->prepare('SELECT dep_num,dep_nom,vil_num FROM departement ORDER BY dep_nom');\n\t\t$req->execute();\n\n\t\twhile ($departement = $req->fetch(PDO::FETCH_OBJ)) {\n\t\t\t$listeDepartements[]= new Departement($departement);\n\t\t}\n\n\t\treturn $listeDepartements;\n\t\t$req -> closeCursor();\n\t}",
"function getBankLists() {\r\n\t\t$idealPlugin = os_payments::loadPaymentMethod('os_ideal');\t\t\r\n\t\t$params = new JRegistry($idealPlugin->params) ;\t\t\r\n\t\t$partnerId = $params->get('partner_id');\r\n\t\t$ideal = new iDEAL_Payment($partnerId) ;\r\n\t\t$bankLists = $ideal->getBanks();\r\n\t\treturn $bankLists ;\r\n\t}",
"public function getAllPapers() {\r\n $papers = Mage::getModel('giftwrap/giftwrap')\r\n ->getCollection()\r\n ->addFieldToFilter(\r\n 'store_id', Mage::app()->getStore()->getId())\r\n ->addFieldToFilter('status', 1)\r\n ;\r\n $list = array();\r\n foreach ($papers as $paper) {\r\n $list[] = $paper;\r\n }\r\n return $list;\r\n }",
"public static function buyerlist()\n {\n\n $get_buyer_list = DB::table('intra_hp_buyer_posts')\n ->select('intra_hp_buyer_posts.*')\n ->where('is_active', 1)\n ->orderBy('id', 'DESC')\n ->get();\n\n return $get_buyer_list;\n\n }",
"public function get_domains_list() {\n \n }",
"public static function getDataList () { return self::getList('data'); }",
"public function index()\n {\n $user = \\Auth::guard('api')->user();\n\n $lists = \\Acelle\\Model\\Campaign::getAll()\n ->select('uid', 'name', 'type', 'subject', 'html', 'plain', 'from_email', 'from_name', 'reply_to', 'status', 'delivery_at', 'created_at', 'updated_at')\n ->where('customer_id', '=', $user->customer->id)\n ->get();\n\n return \\Response::json($lists, 200);\n }",
"abstract public function getList();",
"public function getSendGiftList()\n {\n\t\t$sql = \"SELECT * FROM $this->table_island_gift ORDER BY sort \";\n\t\treturn $this->_rdb->fetchAll($sql);\n }",
"public function NextDepartures() {\r\n\t\t\t\r\n\t\t}",
"public function getItemsList(){\n return $this->_get(4);\n }",
"public function getEntriesList(){\n return $this->_get(2);\n }",
"public function getAllDelivery(){\n $this->db->distinct();\n $this->db->select(\"dvt_no\");\n $this->db->from(\"t_dvt\");\n $this->db->where('del_flg', '0');\n $this->db->order_by('dvt_no');\n $query = $this->db->get();\n return $query->result_array();\n }",
"function lists() {\n $params = array();\n return $this->callServer(\"lists\", $params);\n }",
"public function getPrequestList(){\n return $this->_get(5);\n }",
"public function EEList() {\n return $this->sendRequest('domain/list');\n }",
"function getDeliveryList($date_time, $address) {\n $address->validate();\n \n $dt = $this->format_datetime($date_time);\n\n return $this->_call_api(\"GET\",\n array(\n \"dl\",\n $dt,\n $address->zip,\n $address->city,\n $address->street\n ),\n \"GET\"\n );\n }",
"public function listdataPrncAction() {\n $this->view->dataList = $this->adm_listdata_serv->getDataList('PERENCANAAN');\n }",
"protected function getAirportList()\n {\n $cache = new FilesystemAdapter();\n $airportCache = $cache->getItem('airportcache.list');\n\n if (!$airportCache->isHit()) {\n $client = $this->container->get('guzzle.avinor.client');\n $response = $client->get('/airportNames.asp');\n $result = $response->getBody()->getContents();\n\n $service = new Service();\n $airports = $service->parse($result);\n\n $airportCache->set($airports);\n $cache->save($airportCache);\n }\n\n return $airportCache->get();\n }",
"public static function getStatusList()\n {\n return BaseServiceDelivery::getStatusList();\n }",
"private function disposableEmailList()\n {\n return array(\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n );\n }",
"public function downloads(): Collection;",
"public function getList()\n {\n $list = new \\BearFramework\\DataList();\n foreach ($this->data as $addon) {\n $list[] = clone($addon);\n }\n return $list;\n }",
"public function index()\n\t{\n\t\t$orderdeliveries = Orderdelivery::all();\n\n\t\treturn View::make('orderdeliveries.index', compact('orderdeliveries'));\n\t}",
"public function index()\n {\n //\n $list_deposits = SysDeposit::orderBy('order','asc')->paginate(20);\n return view('admin.packets.list', ['list_deposits'=>$list_deposits]);\n }",
"public function index()\n {\n $eventpartners = Eventpartner::all();\n return $eventpartners;\n }",
"public function getServerList() {}",
"public function liste()\n {\n $discs = $this->LoadModel('Disc');\n $discDetail = $discs->info_record();\n $this->render('liste', [\n 'discs' => $discDetail\n ]);\n }",
"public function index()\n {\n //\n $slider=Partner::all(); \n return view('livewire.admin.listpartners',['list'=>$slider]);\n }",
"function admin_list_depts($id=NULL)\r\n {\r\n $data['offline_mode']\t\t=\t$this->config->item('offline_mode');\r\n $data['debug_mode']\t\t =\t$this->config->item('debug_mode');\r\n $data['country']\t\t =\t$this->config->item('app_country');\r\n $data['location_id'] = $_SESSION['location_id'];\r\n\t\t$data['user_rights'] = $this->mthirra->get_user_rights($_SESSION['username']);\r\n $data['breadcrumbs'] = breadcrumbs('ehr_admin/admin_mgt','Admin'); \r\n $data['sort_order'] \t = $this->uri->segment(3);\r\n\t\t$data['title'] = \"T H I R R A - List of Departments\";\r\n $data['now_id'] = time();\r\n $data['now_date'] = date(\"Y-m-d\",$data['now_id']);\r\n $data['now_time'] = date(\"H:i\",$data['now_id']);\r\n\t\t$data['depts_list'] = $this->madmin_rdb->get_depts_list('All',$data['sort_order']);\r\n\t\t$this->load->vars($data);\r\n\t\tif ($_SESSION['thirra_mode'] == \"ehr_mobile\"){\r\n $new_header = \"ehr/header_xhtml-mobile10\";\r\n $new_banner = \"ehr/banner_ehr_wap\";\r\n $new_sidebar= \"ehr/sidebar_ehr_admin_wap\";\r\n //$new_body = \"ehr/ehr_admin_list_clinics_wap\";\r\n $new_body = \"ehr/ehr_admin_list_depts_html\";\r\n $new_footer = \"ehr/footer_emr_wap\";\r\n\t\t} else {\r\n //$new_header = \"ehr/header_xhtml1-strict\";\r\n $new_header = \"ehr/header_xhtml1-transitional\";\r\n $new_banner = \"ehr/banner_ehr_html\";\r\n $new_sidebar= \"ehr/sidebar_emr_admin_html\";\r\n $new_body = \"ehr/ehr_admin_list_depts_html\";\r\n $new_footer = \"ehr/footer_emr_html\";\r\n\t\t}\r\n if($data['user_rights']['section_admin'] < 100){\r\n $new_body = \"ehr/ehr_access_denied_html\";\r\n }\r\n\t\t$this->load->view($new_header);\t\t\t\r\n\t\t$this->load->view($new_banner);\t\t\t\r\n\t\t$this->load->view($new_sidebar);\t\t\t\r\n\t\t$this->load->view($new_body);\t\t\t\r\n\t\t$this->load->view($new_footer);\t\t\r\n\t\t\r\n }",
"public function listExpired() \n\t{\n\t\treturn $this->list(true);\n\t}",
"public function getdepositorDeatils() {\n $select = $this->select()\n ->from(array('wr' => 'withdrawal_request'))\n ->setIntegrityCheck(false)\n ->join(array('u' => 'users'), 'u.user_id = wr.user_id', array(\"u.user_name\"))\n ->where('wr.status =?', '1');\n\n $result = $this->getAdapter()->fetchAll($select);\n if ($result) :\n return $result;\n endif;\n }",
"public function listDiscounts()\n {\n return $this->correct(Discount::orderBy('created_at','desc')->get());\n }",
"public function index()\n {\n // get all clients \n $clients = Client::with(['deliveries.products'])->ordered(true)->get();\n\n // return clients as json\n return $clients->toJson();\n }",
"public function getDataList(){\n return $this->_get(1);\n }",
"public function index()\n {\n return new BookedescortCollection(Bookedescort::with('tour')->get());\n }",
"function ships_list()\n\t\t{\n\t\t\t$id = $this->uri->segment(3);\n\n\t\t\t$data['ships'] = $this->ship_model->get_company_ships($id);\n\t\t\t// $data['ships_type'] = $this->\n\t\t\t$this->directPageDetails(\"ships/ships\",\"\",$data);\n\t\t}",
"function getListOfRecords(){\n // the orders will be display and the receipts from there \n \n $element = new Order();\n \n $receipts_filter_orders = cisess(\"receipts_filter_orders\");\n \n if ($receipts_filter_orders===FALSE){\n $receipts_filter_orders = \"Abierta\"; // default to abiertas\n }\n \n if (!empty($receipts_filter_orders))\n {\n $element->where(\"status\",$receipts_filter_orders);\n }\n \n \n $element->order_by(\"id\",\"desc\");\n \n $all = $element->get()->all;\n //echo $element->check_last_query();\n ///die();\n $table = $this->entable($all);\n \n return $table;\n \n \n }",
"public function getList(){\n\t\tuser_login_required();\n\n\t\t//Try to get the list\n\t\t$conversationsList = CS::get()->components->conversations->getList(userID);\n\n\t\t//Check for errors\n\t\tif($conversationsList === false)\n\t\t\tRest_fatal_error(500, \"Couldn't get conversations list !\");\n\t\t\n\t\t//Process the list of conversation\n\t\tforeach($conversationsList as $num => $conv)\n\t\t\t$conversationsList[$num] = self::ConvInfoToAPI($conv);\n\t\t\n\t\t//Return results\n\t\treturn $conversationsList;\n\t}"
] | [
"0.64258206",
"0.61960334",
"0.6028114",
"0.60102975",
"0.6004807",
"0.5967586",
"0.5927006",
"0.58542305",
"0.579075",
"0.57717305",
"0.57650614",
"0.57650614",
"0.57650614",
"0.57487446",
"0.57463753",
"0.5743755",
"0.5728753",
"0.5728753",
"0.5716643",
"0.571424",
"0.5670721",
"0.5660455",
"0.5649818",
"0.56326205",
"0.5626092",
"0.5609482",
"0.55890745",
"0.55758995",
"0.5554754",
"0.5530144",
"0.55186",
"0.54980266",
"0.54808754",
"0.5478706",
"0.54774225",
"0.54751974",
"0.546866",
"0.546866",
"0.5462117",
"0.54561746",
"0.54560494",
"0.54550236",
"0.5453999",
"0.5439305",
"0.5427995",
"0.5426821",
"0.54141885",
"0.5412292",
"0.5401104",
"0.53974086",
"0.5395922",
"0.5387309",
"0.5382238",
"0.5380607",
"0.5380395",
"0.53761595",
"0.53733295",
"0.53671855",
"0.53655696",
"0.536435",
"0.5362212",
"0.53456205",
"0.5333413",
"0.53306305",
"0.53275156",
"0.5308489",
"0.53076756",
"0.5304914",
"0.5303371",
"0.53021306",
"0.5291292",
"0.5286589",
"0.5285239",
"0.52818984",
"0.52737427",
"0.5273632",
"0.5271415",
"0.5257561",
"0.5255554",
"0.5254117",
"0.5249826",
"0.52493936",
"0.52475",
"0.5245747",
"0.5243471",
"0.5241597",
"0.5239417",
"0.52369916",
"0.5236203",
"0.52330667",
"0.5231882",
"0.52308893",
"0.5230705",
"0.5230188",
"0.5227787",
"0.5227068",
"0.52263045",
"0.5225574",
"0.5225485",
"0.5220118"
] | 0.6507052 | 0 |
Core::cost total client dashboard() | public function getcosstotalcourier()
{
$courbudget = 0;
$sql = "SELECT r_costtotal,total_insurance,total_tax FROM " . self::cTable . " WHERE act_status = '1' AND con_status= '0' AND payment_status='0' AND username='" . $this->username . "'";
$row = self::$db->fetch_all($sql);
foreach ($row as $budget){
return $courbudget+= $budget->r_costtotal;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCost();",
"public function totalCost(): float;",
"public function cost(){\n\t\t\n\t\treturn 200;\n\t}",
"function get_cost() {\n\t\t$this->_event->log(\"get_costs\", $_SERVER['REQUEST_TIME'], 5, \"cloudprofile.class.php\", \"Calulating bill for cr $this->id\", \"\", \"\", 0, 0, 0);\n\t\t$cr_appliance_id = $this->appliance_id;\n\t\t$app_id_arr = explode(\",\", $cr_appliance_id);\n\t\t$cr_costs_final = 0;\n\t\tforeach ($app_id_arr as $app_id) {\n\t\t\t$cloud_app = new cloudappliance();\n\t\t\t$cloud_app->get_instance_by_appliance_id($app_id);\n\t\t\t// check state, only bill if active\n\t\t\tif ($cloud_app->state == 1) {\n\t\t\t\t// basic cost\n\t\t\t\t$cr_costs = 0;\n\t\t\t\t// + per cpu\n\t\t\t\t$cr_costs = $cr_costs + $this->cpu_req;\n\t\t\t\t// + per nic\n\t\t\t\t$cr_costs = $cr_costs + $this->network_req;\n\t\t\t\t// ha cost double\n\t\t\t\tif (!strcmp($this->ha_req, '1')) {\n\t\t\t\t\t$cr_costs = $cr_costs * 2;\n\t\t\t\t}\n\t\t\t\t// TODO : disk costs\n\t\t\t\t// TODO : network-traffic costs\n\n\t\t\t\t// sum\n\t\t\t\t$cr_costs_final = $cr_costs_final + $cr_costs;\n\t\t\t\t$this->_event->log(\"get_costs\", $_SERVER['REQUEST_TIME'], 5, \"cloudprofile.class.php\", \"-> Billing active appliance $app_id (cr $this->id) = $cr_costs CC-units\", \"\", \"\", 0, 0, 0);\n\t\t\t} else {\n\t\t\t\t$this->_event->log(\"get_costs\", $_SERVER['REQUEST_TIME'], 5, \"cloudprofile.class.php\", \"-> Not billing paused appliance $app_id (cr $this->id)\", \"\", \"\", 0, 0, 0);\n\t\t\t}\n\t\t}\n\t\t$this->_event->log(\"get_costs\", $_SERVER['REQUEST_TIME'], 5, \"cloudprofile.class.php\", \"-> Final bill for cr $this->id = $cr_costs_final CC-units\", \"\", \"\", 0, 0, 0);\n\t\treturn $cr_costs_final;\n\t}",
"public function getCost() {\n return 15 + $this->carService->getCost();\n }",
"public function get_total_debit(){\n return $this->get_storage_cost() + $this->get_services_cost();\n }",
"public function getTotalcost()\n {\n return $this->totalcost;\n }",
"public function get_services_cost(){\n //find all the requested services on a deadbody\n $sql = \"SELECT * FROM requested_service WHERE dead_no={$this->id}\";\n $this->requested_services = RequestedService::find_by_sql($sql);\n $total_debit = 0;\n //for each requested service find price and add to total debit\n foreach ($this->requested_services as $requested_service) {\n $service = Service::find_by_id($requested_service->service_no);\n $total_debit += $service->price;\n }\n return $total_debit;\n }",
"public function getBaseTotalInvoicedCost();",
"public function getCost()\n {\n return $this->get(self::_COST);\n }",
"function getCost(){\n return $this->cost;\n }",
"public function getCost()\n {\n return $this->cost;\n }",
"public function getCost()\n {\n return $this->cost;\n }",
"public function getCost()\n {\n return $this->cost;\n }",
"public function cost()\n {\n return $this->getPrice();\n }",
"private function totalCost()\n {\n return number_format($this->msgCount() * $this->recipients() * $this->smsCost(), 2);\n }",
"public function getTotalCost()\n {\n $this->loadItems();\n return $this->calculator->getCost($this->items);\n }",
"public function getCost(): double \n {\n return $this->cost;\n }",
"public function cost()\n {\n return $this->price;\n }",
"function showtotals(){\nglobal $XUSER, $SERVER, $ROOMS;\ncleanOnline();\n$q = DoQuery(\"SELECT * FROM $SERVER[TBL_PREFIX]online\");\n$RV[0] = 0; $RV[1] = 0; $RV[2] = 0;\nwhile($row = Do_Fetch_Row($q)){\n$q2 = DoQuery(\"SELECT * FROM $SERVER[TBL_PREFIX]users WHERE username='$row[1]'\");\n$row2 = Do_Fetch_Row($q2);\nif($row2[4] == 4 || $row2[4] == 5){\n$RV[0]++;\n}else{\n$RV[1]++;\n}\n}\ncleanRooms();\n$q = DoQuery(\"SELECT * FROM $SERVER[TBL_PREFIX]rooms\");\nwhile($row = Do_Fetch_Row($q)){\n$RV[2]++;\n}\nreturn $RV;\n}",
"public function cost()\n {\n return $this->beverage->cost() + $this->cost;\n }",
"public function getCosts()\n {\n return $this->_costs;\n }",
"public function total();",
"public function total();",
"public function total();",
"public function getBalance();",
"private static function calculateTotalCost($collection)\n { \n $calls = $collection->all();\n $seconds = 0;\n foreach ($calls as $call) {\n $seconds = $seconds + $call->totaltime;\n }\n\n $minutes = ($seconds / 60); // convert billing seconds to minutes.\n $totalCost = $minutes * env('AVG_COST_PER_MIN');\n\n return number_format($totalCost, 2);\n }",
"public function getCostPerHour()\n {\n return $this->cost_per_hour;\n }",
"public function getShippingCost();",
"function getClientStartUpBal($clientId) {\n\t\n\t\t$startUpBal = 0;\n\t\t$startUpBalAlloc = 0;\n\t\t\n\t\tif($clientId > 0) {\n\t\t\n\t\t\t//getting the startup balance for client while client added in our system\n\t\t\t$sqlGetStartUpBal = \"SELECT startupBalance FROM person WHERE id='$clientId'\";\n\t\t\t$resGetStartUpBal = DB::do_query($sqlGetStartUpBal);\n\t\t\t\n\t\t\tif($resGetStartUpBal) {\n\t\t\t\t\n\t\t\t\t$rowGetStartUpBal = DB :: db_fetch_array($resGetStartUpBal);\n\t\t\t\t\n\t\t\t\t$startUpBal = $rowGetStartUpBal['startupBalance'];\n\t\t\t\t\n\t\t\t\t//getting allocation done for this client towards start up balance\n\t\t\t\t$sqlStartBal = \"SELECT csb.amt_paid\n\t\t\t\t\t\t\tFROM clientstartupbalallocation AS csb\n\t\t\t\t\t\t\tWHERE csb.client_id = $clientId\n\t\t\t\t\t\t\tAND is_erased = 0\n\t\t\t\t\t\t\tORDER BY csb.id ASC\";\n\t\t\t\t\t\t\t\n\t\t\t\t$resStartBal = DB::do_query($sqlStartBal);\n\t\t\t\t\n\t\t\t\tif($resStartBal && (DB::db_fetch_num_rows($resStartBal) > 0)) {\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tWhile($rowStartBal = DB :: db_fetch_array($resStartBal)) {\n\t\t\t\t\t\n\t\t\t\t\t\t$startUpBalAlloc += $rowStartBal['amt_paid'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$startUpBal -= $startUpBalAlloc;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $startUpBal;\n\t}",
"public function getAccountingCost()\n {\n return $this->accountingCost;\n }",
"public function getCostPerTraveledHour()\n {\n return $this->cost_per_traveled_hour;\n }",
"function getCreditosComprometidos(){ return $this->getOEstats()->getTotalCreditosSaldo(); }",
"public function commission_index()\n\t{\n\t\tpermittedArea();\n\t\t$data['assets'] = $this->ledger_model->totalAssets();\n\t\t$data['debits'] = $this->ledger_model->totalDebits();\n\t\t$data['credits'] = $this->ledger_model->totalCredits();\n\t\t$data['wallet'] = $this->ledger_model->totalWallet();\n\t\t$data['usedwallet'] = $this->ledger_model->usedWallet();\n\t\t\n\t\t\n\t\ttheme('commission_index', $data);\n\t}",
"public function cost() {\n $cost = $this->beverage->cost();\n switch ($this->beverage->getSize()) {\n case 'tall':\n $cost += 1;\n break;\n case 'grande':\n $cost += 3;\n break;\n case 'venti':\n $cost += 6;\n break;\n }\n return $cost;\n }",
"public function getTotalCost()\n {\n return number_format($this->total_cost, 2, \".\", \",\");\n }",
"public function getTotalCustomers()\n {\n $AdminDashboardModel = $this->model('AdminDashboardModel');\n $this->totalCustomers = $AdminDashboardModel->getTotalCustomers();\n }",
"public function get_storage_cost(){\n $number_of_days = $this->get_days_spent();\n $total_debit = 0;\n\n //cost for first week\n if ($number_of_days <= 7) {\n $total_debit += $number_of_days * 10.0;\n } else {\n $number_of_days = $number_of_days - 7;\n $total_debit += 7 * 10.0;\n\n //cost for second week\n if ($number_of_days <= 7) {\n $total_debit += $number_of_days * 20.0;\n }else {\n $number_of_days = $number_of_days - 7;\n $total_debit += 7 * 20.0;\n\n //for third week onwards\n $total_debit += $number_of_days * 30.0;\n }\n }\n return $total_debit;\n }",
"public function getTotalCostAttribute()\n {\n $credits = ( isset( $this->subject->{ subject_credits() } ) &&\n is_int( $this->subject->{ subject_credits() } ) ) ?\n (int) $this->subject->{ subject_credits() } : (int) 0;\n $cost = ( isset( $this->cost->{ cost() } ) &&\n is_float( $this->cost->{cost()} ) ) ?\n (float) $this->cost->{ cost() } : (float) 0;\n return (int) $credits * (float) $cost;\n }",
"function valore_costi_totali($id_ordine,$id_user){\r\n $costo_trasporto = valore_costo_trasporto_ordine_user($id_ordine,$id_user);\r\n $costo_gestione = valore_costo_gestione_ordine_user($id_ordine,$id_user);\r\n $costo_mio_gas = valore_costo_mio_gas($id_ordine,$id_user);\r\n $costo_maggiorazione = valore_costo_maggiorazione_mio_gas($id_ordine,$id_user);\r\n $costi_totali = $costo_trasporto +\r\n $costo_gestione +\r\n $costo_mio_gas +\r\n $costo_maggiorazione;\r\n return (float)$costi_totali; \r\n}",
"public function getTotalCost()\n {\n $subtotal = $this->SubTotalCost;\n $discount = $this->DiscountAmount;\n $postage = $this->PostageCost;\n $tax = $this->TaxCost;\n\n return ($subtotal - $discount) + $postage + $tax;\n }",
"function retrieve_client_statistics(){\n\t\t\n\t}",
"public function getTotalCostAttribute(){\n return $this->routeCost()->select(['cost_id', DB::raw('round(AVG(`cost_per_ton`), 0) AS cost_per_ton')])->groupBy('cost_id')->get()->sum('cost_per_ton');\n }",
"public function showAdCost($args)\n {\n $ad_level = $_REQUEST ['level'];\n $repo = $this->entityManager->getRepository('ZSELEX_Entity_Shop');\n $return_array = array();\n /*\n * $get = ModUtil::apiFunc('ZSELEX', 'user', 'get', $getargs =\n * array('table' => 'zselex_advertise_price',\n * 'where' => \"identifier='\" . $ad_level . \"'\"));\n */\n\n $get = $repo->get(array(\n 'entity' => 'ZSELEX_Entity_AdvertisePrice',\n 'fields' => array(\n 'a.price'\n ),\n 'where' => array(\n 'a.identifier' => $ad_level\n )\n ));\n // return $return_array;\n $data [\"adcost\"] = round($get ['price']).\" \".$this->__('points');\n AjaxUtil::output($data);\n }",
"public function getUnitCost()\n {\n return $this->producer->getUnitCost();\n }",
"function spectra_money_supply ()\n\t{\n\t\tif (system_flag_get (\"balance_rebuild\") > 0)\n\t\t{\n\t\t\treturn \"Re-Balancing\";\n\t\t}\n\t\t\n\t\t$response = $GLOBALS[\"db\"][\"obj\"]->query (\"SELECT SUM(`balance`) AS `supply` FROM `\".$GLOBALS[\"tables\"][\"ledger\"].\"`\");\n\t\t$result = $response->fetch_assoc ();\n\t\t\n\t\tif (!isset ($result[\"supply\"]))\n\t\t{\n\t\t\treturn \"Unavailable\";\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\treturn $result[\"supply\"];\n\t\t}\n\t}",
"public static function ctrMostrarTotalCliente(){\n\n\t\t$tabla = 'clientes';\n\n\t\t$respuesta = ModeloCliente::mdlMostrarTotalCliente($tabla);\n\n\t\treturn $respuesta;\n\n\t}",
"function getDashboardData() {\n $arrRes=array();\n \n //For Calculating orders count\n $arrClms = 'pkOrderItemID';\n $varTable = TABLE_ORDER_ITEMS;\n $argWhere = 'AND Status <> \"Canceled\"';\n $arrNum = $this->getNumRows($varTable, $arrClms, $argWhere);\n $arrRes['ordersCount']=$arrNum;\n \n //For Calculating Unique visitors count\n $varQuery = \"SELECT count(DISTINCT VisitorIP) as count FROM \" . TABLE_VISITOR;\n $arrData = $this->getArrayResult($varQuery);\n //pre($arrData);\n $arrRes['visitorsCount']=$arrData;\n \n \n //For Calculating Total Revenue(from orders) sum\n $varQuery = \"SELECT pkOrderItemID,ItemType,\n CASE ItemType\n WHEN 'product' THEN Quantity*((ItemPrice-ItemACPrice)+(((100-w.Commission)*ItemACPrice)/100))\n WHEN 'gift-card' THEN ItemSubTotal\n WHEN 'package' THEN Quantity*(ItemPrice-ItemACPrice)\n ELSE NULL END as 'revenue'\n FROM \" . TABLE_ORDER_ITEMS . \" LEFT JOIN \".TABLE_WHOLESALER.\" w ON w.pkWholesalerID=fkWholesalerID WHERE Status <> 'Canceled'\";\n $arrData = $this->getArrayResult($varQuery);\n $sum=0;\n foreach($arrData as $data){\n $sum+=$data['revenue'];\n }\n //echo $sum;\n \n //pre($arrData);\n $arrRes['revenueSum']=$sum;\n \n //pre($arrRes);\n return $arrRes;\n }",
"public function getBaseTotalOnlineRefunded();",
"protected function giveCost()\n {\n $novoValor = 4;\n $this->valueNow = 210.54 / $novoValor;\n return $this->valueNow;\n }",
"public function getUnitCost()\n {\n return $this->unitCost;\n }",
"public function GetSaldoTotalClientes()\n {\n \t$q\t=\tDoctrine_Query::create()\n \t->from('Cliente c');\n \t\n \t$cli\t=\t$q->execute();\n \t$total = 0;\n \tforeach ($cli as $c)\n \t{\n \t\t\t$saldoActual\t=\t$c->GetSaldo();\n \t\t\t$c->SaldoActual\t=\t$saldoActual;\n \t\t\t$c->save();\n\t\t\t\t\t// sumar saldo total de cada cliente\n \t\t\t$total\t+= $saldoActual;\n \t}\n \t\n \treturn $total;\n }",
"public function getCreateCost()\n {\n return $this->get(self::_CREATE_COST);\n }",
"public function getCreateCost()\n {\n return $this->get(self::_CREATE_COST);\n }",
"private function getAuditCost($audit_id) {\n\t\n\t\t$audit_cost = \"0\";\n\t\t\n\t\t//Get the audit details\n\t\t$audit = $this->getAudit($audit_id);\n\t\n\t\t//Get the client_checklist details\n\t\t$client_checklist = new clientChecklist($this->db);\n\t\t$clientChecklistDetails = $client_checklist->getChecklistByClientChecklistId($audit->client_checklist_id);\n\t\t\n\t\t//Get the number of staff\n\t\t$numberOfStaff = $this->getClientStaffNumber($clientChecklistDetails->client_checklist_id);\n\t\t\n\t\tswitch($numberOfStaff) {\n\t\t\n\t\t\tcase ($numberOfStaff < 11):\n\t\t\t\t\t\t\t\t\t\t\t$audit_cost = $this->base_cost_entry * $this->audit_fee;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tcase ($numberOfStaff < 21):\n\t\t\t\t\t\t\t\t\t\t\t$audit_cost = $this->base_cost_small * $this->audit_fee;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tcase ($numberOfStaff < 51):\n\t\t\t\t\t\t\t\t\t\t\t$audit_cost = $this->base_cost_medium * $this->audit_fee;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tcase ($numberOfStaff < 101):\n\t\t\t\t\t\t\t\t\t\t\t$audit_cost = $this->base_cost_large * $this->audit_fee;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tcase ($numberOfStaff < 9999999999):\n\t\t\t\t\t\t\t\t\t\t\t$audit_cost = $this->base_cost_enterprise * $this->audit_fee;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\t\t$audit_cost = $this->base_cost_entry * $this->audit_fee;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t//Check to see if the staff level is a numeric, if set the audit cost to be the base price\n\t\tif(!is_numeric($numberOfStaff)) {\n\t\t\t$audit_cost = $this->base_cost_entry * $this->audit_fee;\n\t\t}\n\t\t\n\t\t//Return to 2 decimal places\n\t\treturn number_format($audit_cost, 2, '.', '');\n\t}",
"public function getCostFactor() : int\n {\n return $this->cost;\n }",
"private function getTotalCharge() {\n $result = 0;\n\n foreach ($this->rentals as $rental) {\n $result += $rental->getCharge();\n }\n return $result;\n\n }",
"protected function cost()\n {\n return $this->rounds;\n }",
"public function retrieveTotalReport()\n {\n return $this->start()->uri(\"/api/report/totals\")\n ->get()\n ->go();\n }",
"public function getUserCosts()\n {\n // initialize the array for the values\n $graph = array();\n // append the values\n foreach ($this->getCosts() as $key => $costs) {\n $graph[] = \"['$key',$costs]\";\n }\n // concatenate and return the string\n return new TechDivision_Lang_String(\"[[\" . implode(\",\", $graph) . \"]]\");\n }",
"public function get_cost() {\n\n\t\t$cost = $this->cost || is_numeric( $this->cost ) && $this->cost === 0 ? $this->cost : '';\n\n\t\t/**\n\t\t * Filter the add-on cost.\n\t\t *\n\t\t * @since 1.0\n\t\t * @param mixed $cost The add-on cost.\n\t\t * @param \\WC_Checkout_Add_On $add_on This instance of WC_Checkout_Add_On class.\n\t\t */\n\t\treturn apply_filters( 'wc_checkout_add_ons_add_on_get_cost', $cost, $this );\n\t}",
"public function getBalance()\n {\n return (float)$this->client->requestExecute(\"credit\");\n }",
"public function getTotalCosts() {\n $costs = 0;\n \n foreach($this->Expenses() as $expense) {\n if($expense->Cost)\n $costs += $expense->Cost;\n }\n \n return $costs; \n }",
"public function getTotal();",
"public function getTotal();",
"public function charges();",
"public function getCost()\n {\n return isset($this->transaction['order']['cost']) ? $this->transaction['order']['cost'] : '';\n }",
"public function getBaseTotalOfflineRefunded();",
"function getTotal($userSelection) {\n$cookie = 3.00; //This the cost of cookies\n$chips = 10.00; //Cost of Chips\n$soda = 1.00;// Cosst of Soda\n\t//Checks if user wants the combo meal of 0\n\tif($userSelection == 0) {\n\t\t//Calculate Total\n\t\t$userSelection = $cookie + $chips;\n\t\techo $userSelection; //Prints out the total amount\n\t}\n}",
"public function getCost()\n {\n return round($this->price * $this->quantity, 2);\n }",
"public function get_total()\n {\n }",
"public function calculateWeeklyCosts(){\n $view = $this->view;\n $view->setNoRender();\n \n \n Service::loadModels('user', 'user');\n Service::loadModels('team', 'team');\n Service::loadModels('people', 'people');\n Service::loadModels('league', 'league');\n Service::loadModels('car', 'car');\n Service::loadModels('rally', 'rally');\n $teamService = parent::getService('team','team');\n \n /*\n * Wydatki : \n * 1. Pensje zawodnikow\n * 2. Koszty utrzymania samochodu\n * \n * Przychody : \n * 1. Od sponsora (5000)\n */\n \n $teams = $teamService->getAllTeams();\n foreach($teams as $team):\n $playersValue = $teamService->getAllTeamPlayersSalary($team);\n if($playersValue!=0)\n $teamService->removeTeamMoney($team['id'],$playersValue,4,'Player salaries '); \n \n \n $carUpkeep = $teamService->getAllTeamCarsUpkeep($team);\n if($carUpkeep!=0)\n $teamService->removeTeamMoney($team['id'],$carUpkeep,5,'Cars upkeep'); \n \n if(!empty($team['sponsor_id'])){\n $teamService->addTeamMoney($team['id'],5000,2,'Money from '.$team['Sponsor']['name'].' received on '.date('Y-m-d')); \n }\n \n if($team['cash']<0){\n $negativeFinances = (int)$team->get('negative_finances');\n $negativeFinances++;\n $team->set('negative_finances',$negativeFinances);\n $team->save();\n \n if($negativeFinances>=5){\n $team->delete();\n $user = $team->get('User');\n $user->set('active',0);\n $user->save();\n }\n }\n else{\n $team->set('negative_finances',0);\n }\n \n $team->save();\n \n endforeach;\n echo \"done\";exit;\n }",
"private function HTML_SumUp_Cost() : string\n {\n return $this->HTML_TxPart(\n ($this->infos['tx_type'] == 'buy' ? 'Coût' : 'Gain'),\n self::AutoFloatFormat($this->Cost()['amount']) . ' ' . (new Currency($this->Cost()['currency']))->infos['symbol']\n );\n }",
"public function deliveryPriceDhaka()\n {\n }",
"function totalClients(){\n\t\t$data = mysql_query(\"SELECT * FROM Client\") or die(mysql_error());\n\t\treturn $rows = mysql_num_rows($data);\n\t}",
"public function get_total_cost()\n\t{\n\t\t$num = '0.00';\n\t\tif (isset($_SESSION['cart']))\n\t\t{\n\t\t\t#if there are items to display \n\t\t\t\n\t\t\t#get product ids\n\t\t\t$ids = $this->get_ids();\n\t\t\t\n\t\t\t#get product prices\n\t\t\tglobal $Products;\n\t\t\t$prices = $Products->get_prices($ids);\n\t\t\t\n\t\t\t#loop throih adding the cost of each item and timesing it by the number of item in the cart. \n\t\t\tif($prices != NULL)\n\t\t\t{\n\t\t\t\tforeach($prices as $price)\n\t\t\t\t{\n\t\t\t\t\t$num += doubleval($price['price'] * $_SESSION['cart'][$price['id']]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $num;\n\t}",
"public function breakdown(): CostBreakdownContract;",
"public function getTotalCost()\n\t{\n\t\t$tprice = $this->getPrice();\n\n\t\tforeach ($this->options as $o)\n\t\t{\n\t\t\t$tprice += $o->getPrice() * $o->getQuantity();\n\t\t}\n\n\t\treturn $tprice;\n\t}",
"public function getProductsCostTotal()\n {\n return $this->getProducts()->sum('price');\n }",
"public function getCosto()\n {\n return $this->costo;\n }",
"public function getSubTotalCost()\n {\n $total = 0;\n\n foreach ($this->items as $item) {\n if ($item->SubTotal) {\n $total += $item->SubTotal;\n }\n }\n \n return $total;\n }",
"public function getTotalOnlineRefunded();",
"public function getDashboard() {\n $members = \\App\\Member::all();\n $lastIncomes = \\App\\Income::with('member')->orderBy('created_at', 'desc')->limit(10)->get();\n $requestedWithdrawals = \\App\\Withdrawal::with('member')\n ->where('status', '=', \\App\\Status::WITHDRAWAL_REQUESTED)->get();\n $totalSales = \\App\\Sale::count();\n\n return response()->json([\n 'totalMembers' => $members->count(),\n 'totalIncomes' => $members->sum('balance'),\n 'totalPoints' => $members->sum('point'),\n 'totalSales' => $totalSales,\n 'lastIncomes' => $lastIncomes,\n 'requestedWithdrawals' => $requestedWithdrawals\n ], 200);\n }",
"public function getCurrentCredit($registrationNo,$title,$via) {\n\n$con = ($GLOBALS[\"___mysqli_ston\"] = mysqli_connect($this->myHost, $this->username, $this->password));\nif (!$con)\n {\n die('Could not connect: ' . ((is_object($GLOBALS[\"___mysqli_ston\"])) ? mysqli_error($GLOBALS[\"___mysqli_ston\"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));\n }\n\n((bool)mysqli_query( $con, \"USE \" . $this->database));\n\nif($title == \"PATIENT\") {\n$result = mysqli_query($GLOBALS[\"___mysqli_ston\"], \"SELECT sum(cashUnpaid) as total FROM patientCharges WHERE registrationNo = '$registrationNo' \");\n}else {\n$result = mysqli_query($GLOBALS[\"___mysqli_ston\"], \"SELECT sum($via) as total FROM patientCharges WHERE registrationNo = '$registrationNo' and title = '$title' \");\n}\nwhile($row = mysqli_fetch_array($result))\n {\n\nreturn $row['total'];\n\n }\n\n}",
"public function getTotalAmount();",
"function getTotalOrderSumByClientID($clientID) {\r\n\t\tglobal $DBTABLEPREFIX, $menuvar, $clms_config;\r\n\t\t$total_order_value = 0;\r\n\t\t\r\n\t\t$sql = \"SELECT sum(orders_total) AS total_ordered FROM `\" . $DBTABLEPREFIX . \"orders` WHERE orders_client_id = '\" . $clientID . \"'\";\r\n\t\t$result = mysql_query($sql);\r\n\t\t\t\t\r\n\t\tif ($result && mysql_num_rows($result) > 0) {\r\n\t\t\twhile ($row = mysql_fetch_array($result)) {\t\r\n\t\t\t\t$total_order_value = $row['total_ordered'];\r\n\t\t\t}\r\n\t\t\tmysql_free_result($result);\r\n\t\t}\r\n\t\t\r\n\t\treturn $total_order_value;\r\n\t}",
"function dCost($i,$j){\n\t\t\t\treturn $GLOBALS[\"diagCostsTable\"][$i][$j];\n\t\t\t}",
"public function getTotalMealplanCharge()\n\t{\n\t\t$totalPassengers = $this->calculateTotalMealplan();\n\t\t$result = 0;\n\t\tif( $this->mealplan ) {\n\t\t\t$result = $totalPassengers * $this->mealplan;\n\t\t}\n\t\treturn $result;\n\t}",
"public function calculateIngressTotal()\n {\n return (\n $this->calculateInitialAmountCash() +\n $this->calculateIngressCashMovementTotal() +\n $this->calculateCustomerSalesTotal() \n );\n }",
"function spectra_money_top100 ()\n\t{\n\t\tif (system_flag_get (\"balance_rebuild\") > 0)\n\t\t{\n\t\t\t$balance_calc[\"total\"] = \"Re-Balancing\";\n\t\t\t$balance_calc[\"percent\"] = \"0.00\";\n\t\t\n\t\t\treturn $balance_calc;\n\t\t}\n\t\t\n\t\t$accounts = mysqli_getset ($GLOBALS[\"tables\"][\"ledger\"], \"1 ORDER BY `balance` DESC LIMIT 90 OFFSET 10\");\n\n\t\tif ($accounts[\"success\"] < 1 || $accounts[\"data\"] == \"\")\n\t\t{\n\t\t\t$balance_calc[\"total\"] = \"Unavailable\";\n\t\t\t$balance_calc[\"percent\"] = \"0.00\";\n\t\t\n\t\t\treturn $balance_calc;\n\t\t}\n\t\t\n\t//\tInitialize Calculation Result\n\t\t$sum_balances = 0;\n\t\t\n\t\tforeach ($accounts[\"data\"] as $account)\n\t\t{\n\t\t\t$sum_balances = bcadd ($sum_balances, $account[\"balance\"], 8);\n\t\t}\n\t\t\n\t\t$calc_perc = bcdiv ($sum_balances, spectra_money_supply (), 8);\n\t\n\t\t$balance_calc[\"total\"] = $sum_balances;\n\t\t$balance_calc[\"percent\"] = ($calc_perc * 100);\n\t\t\n\t\treturn $balance_calc;\n\t}",
"public function costo()\n {\n return '$' . (string) number_format($this->costo, 2);\n }",
"public function getTotalEstimated() {\n\t\t$total = 0;\n\t\t$this->costitem->get();\n\t\tforeach($this->costitem->all as $item) {\n\t\t\tif ($item->item_type == 'price') {\n\t\t\t\t$total += $item->amount;\n\t\t\t}\n\t\t}\n\t\treturn $total;\n\t\t\n\t}",
"public function ClientsTotals($projectId)\n {\n $sql = $this-> select()\n -> setIntegrityCheck(false)\n -> from(array('a'=>'tbl_clients'), \n array('SUM(small_balance) as small_balance'\n , 'SUM(medium_balance) as medium_balance'\n , 'SUM(large_balance) as large_balance'\n , 'SUM(ifnull(controlled_cost_accounts,0)) as controlled_cost_accounts'\n , 'SUM(aces_es1) as aces_es1'\n , 'SUM(aces_es2) as aces_es2'\n , 'SUM(aces_es3) as aces_es3'\n , 'SUM(aces_esf) as aces_esf'))\n -> where('a.deleted = 0')\n -> where('a.project_id = ?', $projectId);\n \n $result = $this->fetchRow($sql);\n return $result;\n }",
"public function getCustomCost() {\n return $this->customCost;\n }",
"public function formattedNetTotal(): string;",
"public function totClientesCadastrados(){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT ifnull(count(*),0) as total FROM tbclientes \";\n $rsclitot = $this->conexao->query($sql);\n $result = $rsclitot->fetch_array();\n $rstotcli = $result['total'];\n\n return $rstotcli;\n }",
"public function getDayCost()\n {\n return $this->dayCost;\n }",
"public static function getTotalValueOfOrderDashboard()\n {\n \ttry\n \t{\n\t \t$storage = My_Zend_Globals::getStorage();\n\t \n\t \t$table = self::_TABLE_PRODUCT_ORDER_DETAIL;\n\t \n\t \t//Query data from database\n\t \t$select = $storage->select()\n\t\t\t\t\t \t->from($table,'sum(amount_total)')\n\t\t\t\t\t \t->where('order_status = ?', 0);\n\t \t \n\t \t$total = $storage->fetchCol($select);\n\t \t \n\t \t$total = intval($total['total']);\n\t \t\n\t \treturn $total;\n \t}\n \tcatch(Exception $e)\n \t{\n \t\treturn false;\n \t}\t \t\n }",
"protected function giveCost()\n\t{\n\t\t$solarSaving = 2;\n\t\t$this->valueNow = 210.54 / $solarSaving;\n\t\treturn $this->valueNow;\n\t}",
"public function totalColecao(){\r\n\t\t$oSicasConsultaMedicaBD = new SicasConsultaMedicaBD();\r\n\t\treturn $oSicasConsultaMedicaBD->totalColecao();\r\n\t}"
] | [
"0.6750209",
"0.66620797",
"0.6629128",
"0.65792435",
"0.65017426",
"0.6381126",
"0.6251645",
"0.6147378",
"0.61286557",
"0.6060393",
"0.60425127",
"0.60001826",
"0.60001826",
"0.60001826",
"0.5980366",
"0.59654415",
"0.59235674",
"0.591354",
"0.5884104",
"0.58354235",
"0.58299154",
"0.5814658",
"0.5791556",
"0.5791556",
"0.5791556",
"0.57914835",
"0.57889086",
"0.5785017",
"0.5782182",
"0.5753847",
"0.57111233",
"0.57099384",
"0.5705007",
"0.5702992",
"0.56865466",
"0.5680073",
"0.567652",
"0.56683594",
"0.56501204",
"0.563813",
"0.56082",
"0.5605683",
"0.56021637",
"0.5583939",
"0.55674565",
"0.5562852",
"0.556117",
"0.5551795",
"0.55513775",
"0.5544223",
"0.5541134",
"0.5536956",
"0.55330896",
"0.55330896",
"0.5530598",
"0.5525985",
"0.5520722",
"0.5510709",
"0.55046785",
"0.55038846",
"0.54991823",
"0.5497144",
"0.5496641",
"0.54938734",
"0.54938734",
"0.5481149",
"0.5479783",
"0.54776347",
"0.5470455",
"0.54570776",
"0.5455022",
"0.5453617",
"0.54525137",
"0.5446532",
"0.54438215",
"0.54412425",
"0.5441171",
"0.5440065",
"0.5433923",
"0.5425532",
"0.5423204",
"0.54217637",
"0.54185116",
"0.5417685",
"0.54144764",
"0.5410308",
"0.54102576",
"0.5402677",
"0.53996474",
"0.53922516",
"0.5390264",
"0.5375812",
"0.5372798",
"0.5363052",
"0.536266",
"0.53620136",
"0.5357422",
"0.5356983",
"0.5351628",
"0.5345687"
] | 0.61315864 | 8 |
Script adding shipping type attribute for products | public function apply()
{
/** @var EavSetup $eavSetup */
$eavSetup = $this->eavSetupFactory->create(['setup' => $this->moduleDataSetup]);
if (!$eavSetup->getAttribute(Product::ENTITY, 'am_shipping_type')) {
$eavSetup->addAttribute(
Product::ENTITY,
'am_shipping_type',
[
'type' => 'varchar',
'backend' => '',
'frontend' => '',
'label' => 'Shipping Type',
'input' => 'select',
'class' => '',
'source' => '',
'global' => ScopedAttributeInterface::SCOPE_STORE,
'visible' => true,
'required' => false,
'user_defined' => false,
'default' => 0,
'searchable' => false,
'filterable' => false,
'comparable' => false,
'visible_on_front' => false,
'used_in_product_listing' => true,
'unique' => false,
'apply_to' => ''
]
);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function hook_shipping_type() {\n $weight = variable_get('uc_quote_type_weight', array('small_package' => 0));\n\n $types = array();\n $types['small_package'] = array(\n 'id' => 'small_package',\n 'title' => t('Small Packages'),\n 'weight' => $weight['small_package'],\n );\n\n return $types;\n}",
"private function _generateShippingType(){\n $shipping_type = new PagSeguroShippingType();\n $shipping_type->setByType('NOT_SPECIFIED');\n \n return $shipping_type;\n }",
"function custom_template_single_shipping()\n {\n global $product;\n ?>\n <span class=\"shipping-cs-tag\">\n <span>Shipping:</span>\n <span>Free</span>\n </span>\n <?php\n }",
"function get_item_shipping() {\n\t}",
"function setShipping($ship_key)\n {\n return 4.50;\n }",
"function getShipping()\n {\n return array('name'=>'test','cost'=>4.5);\n }",
"private function setShippingOptions() {\n // Reset the settings if this is a recrawl\n if ($this->getSaverData()->isRecrawl()) {\n // Set dimensions and weight\n $this->product->set_weight('');\n $this->product->set_length('');\n $this->product->set_width('');\n $this->product->set_height('');\n\n // Set shipping class\n $this->product->set_shipping_class_id(0);\n }\n\n // No shipping for virtual products.\n if ($this->wcData->isVirtual()) {\n $this->product->set_virtual(true);\n return;\n }\n\n // Not a virtual product.\n $this->product->set_virtual(false);\n\n // Set dimensions and weight\n $this->product->set_weight($this->wcData->getWeight());\n $this->product->set_length($this->wcData->getLength());\n $this->product->set_width($this->wcData->getWidth());\n $this->product->set_height($this->wcData->getHeight());\n\n // Set shipping class\n $this->product->set_shipping_class_id($this->wcData->getShippingClassId());\n }",
"function wdm_add_shipping_method_to_order_email( $order, $is_admin_email ) {\r\n\t\tglobal $wpdb;\r\n\t\t$wpdb->show_errors();\r\n\t\t$table_name = $wpdb->prefix.FOXPOST_TABLE_NAME;\r\n\t\t$fp_datas = $wpdb->get_results(\"SELECT id, terminal_id, status FROM \".$table_name.\" WHERE order_id='\".$order->id.\"'\");\r\n\t\t$apt_id = $fp_datas[0]->terminal_id;\r\n\r\n\t\t$apts = getTerminals();\r\n\t\t$apt_str = 'Ismeretlen';\r\n\t\tforeach($apts as $apt){\r\n\t\t\tif($apt_id == $apt['fp_place_id']){\r\n\t\t\t\t$apt_str = $apt['fp_name'];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\techo '<p><h4>Választott terminál: <u> ' . $apt_str . '</h4></u></p>';\r\n\t}",
"public function getCartShippingMethod()\n {\n }",
"public function getShippingType()\n {\n return $this->shippingType;\n }",
"public function getShipping();",
"function wc_importer_shopify_expand_data( $data ) {\n\tif ( isset( $data['meta:shopify_requires_shipping'] ) ) {\n\t\t$requires_shipping = wc_string_to_bool( $data['meta:shopify_requires_shipping'] );\n\n\t\tif ( ! $requires_shipping ) {\n\t\t\tif ( isset( $data['type'] ) ) {\n\t\t\t\t$data['type'][] = 'virtual';\n\t\t\t} else {\n\t\t\t\t$data['type'] = array( 'virtual' );\n\t\t\t}\n\t\t}\n\n\t\tunset( $data['meta:shopify_requires_shipping'] );\n\t}\n\treturn $data;\n}",
"public function addNewShippingRow(){\n\t\t$map_id = $this->Generic_model->general_fetch_array_return_row('map_attributes_values', array('attribute_id'=>$this->input->post('newRowAttr'), 'value'=>$this->input->post('newRowValue')))->map_id;\n\t\t$details = array(\n\t\t\t'pid' => $this->uri->segment(4),\n\t\t\t'map_id' => $map_id,\n\t\t\t'cost' => $this->input->post('costRowNew')\n\t\t);\n\t\t$response = $this->Generic_model->general_insert('stock_master', $details);\n\t\tif($response){\n\t\t\t$this->session->set_flashdata('success', 'Product Updated successfully with new variant.');\n\t\t}else{\n\t\t\t$this->session->set_flashdata('failure', 'Oops!! Something went wrong. Try again...');\n\t\t}\n\t\tredirect('admin/product/editProduct/'.$this->uri->segment(4));\n\t}",
"public function getShippingInfo();",
"private function _generateShippingData(){\n \n $shipping = new PagSeguroShipping();\n $shipping->setAddress($this->_generateShippingAddressData());\n $shipping->setType($this->_generateShippingType());\n $shipping->setCost(number_format($this->context->cart->getOrderTotal(true, Cart::ONLY_SHIPPING), 2));\n \n return $shipping;\n }",
"function addShippingToMessage ( ) {\r\n\t\t$methods =& $this->getExtraShipping();\r\n\r\n\t\tif( $methods === false || count($methods) == 0 ) return;\r\n\r\n\t\t$this->glmsg .= '<shipping-methods>';\r\n\r\n\t\t// add the selected method first, because we can't pass a selection index to google.\r\n\t\tif( ($index = $this->getExtraShippingIndex()) >= 0) {\r\n\t\t\t$this->glmsg .= '<flat-rate-shipping name=\"' . htmlspecialchars( $this->getExtraShipping($index), ENT_NOQUOTES) . '\">'\r\n\t\t\t\t\t\t . '<price currency=\"' . $this->getConfig('shopcurrency') . '\">'\r\n\t\t\t\t\t\t . number_format( $this->cart->getShippingHandlingTotal() / 100, 2, '.', '')\r\n\t\t\t\t\t\t . '</price>'\r\n\t\t\t\t\t\t . '</flat-rate-shipping>';\r\n\t\t}\r\n\r\n\tfor( $i = 0; $i < count($methods) ; ++$i ) {\r\n\t\t\tif( $methods[$i]['id'] == $index ) continue;\t\t\t\r\n\t\t\t$this->glmsg .= '<flat-rate-shipping name=\"' . htmlspecialchars( $methods[$i]['description'], ENT_NOQUOTES) . '\">'\r\n\t\t\t\t\t\t . '<price currency=\"' . $this->getConfig('shopcurrency') . '\">'\r\n\t\t\t\t\t\t . number_format( $this->cart->getShippingHandlingTotal( $methods[$i]['id'] ) / 100, 2, '.', '')\r\n\t\t\t\t\t\t . '</price>'\r\n\t\t\t\t\t\t . '</flat-rate-shipping>';\r\n\t\t}\r\n\t\t$this->glmsg .= '</shipping-methods>';\r\n }",
"public function getProductType()\n {\n }",
"function wp_tiered_shipping_init() {\n\n class WC_Tiered_Shipping extends WC_Shipping_Method {\n\n /**\n * __construct() {\n */\n public function __construct() {\n $this->id = 'tiered_shipping';\n $this->title = __( 'Tiered Flat Rate Shipping', $this->id );\n $this->method_title = __( 'Tiered flat rate shipping', $this->id );\n $this->description = __( 'A flat rate shipping method that adjusts depending on the number of products purchased.', $this->id );\n $this->init();\n }\n\n\n /**\n * init()\n *\n * Initialize all settings for this shipping method.\n *\n * @return void\n */\n public function init(): void {\n // Load the settings API\n $this->init_form_fields(); // Overridden below.\n $this->init_settings(); // This is part of the settings API. Loads settings you previously init.\n\n // Save settings.\n add_action( 'woocommerce_update_options_shipping_' . $this->id, [ $this, 'process_admin_options' ] );\n }\n\n\n /**\n * init_form_fields()\n *\n * Initialize settings form fields. This is part of the settings API, but\n * overridden here.\n *\n * @return void\n */\n public function init_form_fields() {\n global $woocommerce;\n\n $this->form_fields = [\n 'enabled' => [\n 'title' => __( 'Enabled/Disabled', $this->id ),\n 'type' => 'checkbox',\n 'label' => 'Enable this shipping method'\n ],\n\n 'usertitle' => [\n 'title' => __( 'Shipping method label', $this->id ),\n 'type' => 'text',\n 'description' => __( 'The label that is visible to the user.', $this->id ),\n 'default' => __( 'Tiered Flat Rate', $this->id )\n ],\n\n 'availability' => [\n 'title' => __( 'Availability', $this->id ),\n 'type' => 'select',\n 'class' => 'wc-enhanced-select availability',\n 'options' => [\n 'all' => 'All allowed countries',\n 'except' => 'All allowed countries, except...',\n 'specific' => 'Specific countries'\n ],\n 'default' => __( 'all', $this->id )\n ],\n\n 'countries' => [\n 'title' => __( 'Countries', $this->id ),\n 'type' => 'multiselect',\n 'class' => 'wc-enhanced-select',\n 'options' => $woocommerce->countries->countries,\n 'default' => __( '', $this->id )\n ],\n\n 'basefee' => [\n 'title' => __( 'Base shipping fee ($)', $this->id ),\n 'type' => 'text',\n 'description' => __( 'Flat shipping fee that is applied automatically to the cart total for any number of items.', $this->id )\n ],\n\n 'tierfee' => [\n 'title' => __( 'Tier shipping fee ($)', $this->id ),\n 'type' => 'text',\n 'description' => __( 'Additional shipping fee added to the base fee if the number of items in the cart exceeds a specified number.', $this->id )\n ],\n\n 'quantity' => [\n 'title' => __( 'Number of items to activate tier shipping fee', $this->id ),\n 'type' => 'text',\n 'description' => __( 'Number of items in the cart needed to activate the additional tier shipping fee.', $this->id )\n ],\n\n 'progressive' => [\n 'title' => __( 'Incremental fee?', $this->id ),\n 'type' => 'checkbox',\n 'label' => __( 'Make the tiered shipping fee incremental' ),\n 'description' => __( 'If this option is checked, the tiered shipping fee will be applied incrementally in multiples of the tier item quantity; otherwise, the tiered shipping fee will be a flat fee if the cart is above the specified quantity.', $this->id )\n ]\n ];\n }\n\n\n /**\n * calculate_shipping()\n *\n * Calculate the shipping rate based on product type and number of items.\n *\n * @param array $package\n */\n public function calculate_shipping( $package = [] ) {\n // First, we need to do some checks to make sure that this shipping method\n // is enabled and this users country is included / allowed. If one of these\n // is not true, just return false.\n // Is this shipping type enabled? If not, do nothing.\n $enabled = $this->get_option( 'enabled' );\n\n if ( $enabled == 'no' ) { return false; }\n if ( ! $this->is_tiered_allowed( $package ) ) { return false; }\n\n\n // If we get to this point, we can add this shipping method to the front\n // end and calculate the shipping rate!\n\n global $woocommerce;\n\n // Get all items from cart.\n $items = $woocommerce->cart->get_cart();\n $cart_total_items = 0;\n\n // Sum non-virtual (i.e. shippable) items\n foreach ( $items as $item ) {\n $product = wc_get_product( $item['product_id'] );\n if ( !$product->is_virtual() ) {\n $cart_total_items += $item['quantity'];\n }\n }\n\n // Set the base shipping fee.\n $shipping = $cart_total_items > 0 ? $this->get_option('basefee') : 0;\n\n // Override base fee with tiered fee if cart items are over the tier quantity.\n if ( $cart_total_items > $this->get_option( 'quantity' ) ) {\n\n // If the tier fee should be progressive, calculate the multiplier and add the tier fee * multiplier.\n if ( $this->get_option( 'progressive' ) == 'yes' ) {\n $multiplier = ceil( $cart_total_items / $this->get_option( 'quantity' ) ) - 1;\n $shipping += $this->get_option( 'tierfee' ) * $multiplier;\n }\n\n // If the tier fee is flat, simply add the tier fee.\n else {\n $shipping += $this->get_option( 'tierfee' );\n }\n }\n\n // Set the shipping rate.\n $rate = [\n 'label' => $this->title,\n 'cost' => $shipping,\n 'calc_tax' => 'per_item'\n ];\n\n $this->add_rate( $rate );\n }\n\n\n /**\n * is_tiered_allowed()\n *\n * Determine if the tiered rate is allowed for this location.\n *\n * @param array $package\n */\n function is_tiered_allowed( $package = [] ) {\n $availability = $this->get_option( 'availability' );\n $user_country = $package['destination']['country'];\n $countries = $this->get_option( 'countries' );\n\n switch ( $availability ) {\n // Plugin availability is set to all countries.\n case 'all':\n return true;\n break;\n\n case 'specific':\n $in_allowed_country = false;\n\n for ( $i=0; $i<sizeof( $countries ); $i++ ) {\n if ( $user_country == $countries[$i] ) {\n $in_allowed_country = true;\n break;\n }\n }\n\n return $in_allowed_country;\n break;\n\n case 'except':\n $in_allowed_country = true;\n\n for ( $i=0; $i<sizeof( $countries ); $i++ ) {\n if ( $user_country == $countries[$i] ) {\n $in_allowed_country = false;\n break;\n }\n }\n\n return $in_allowed_country;\n }\n }\n\n }\n}",
"public function getSellerShipping() {\r\n return Mage::getResourceModel ( 'eav/entity_attribute' )->getIdByCode ( 'catalog_product', 'seller_shipping_option' );\r\n }",
"public function setShippingMethod() {\n\t\t$json = array();\n\t\t$json['status'] = false;\n\t\t\n\t\tif (isset($this->request->post['code'])) {\n\t\t\t$code=$this->request->post['code'];\n\t\t\t$shipping_method=$this->session->data['shipping_methods'][$code]; \n\t\t\tif ($shipping_method) {\n\t\t\t\tunset($this->session->data['shipping_method']);\n\t\t\t\t$this->session->data['shipping_method'] = $shipping_method;\n\t\t\t\t\n\t\t\t\t$json['status'] = true;\n\t\t\t\t$json['delivery'] = $shipping_method['delivery'];\n\n\t\t\t} else {\n\t\t\t\t$json['error'] = 'Неизвестный способ доставки';\n\t\t\t}\n\t\t} else {\n\t\t\t$json['error'] = 'Не указан тип доставки';\n\t\t}\n\t\t$this->response->addHeader('Content-Type: application/json');\n\t\t$this->response->setOutput(json_encode($json));\n\t}",
"public function setShipping($shipping);",
"public function getProductType();",
"public function createConfigProduct($type,$data=[],$attribute_set_id,$sku){\n\n $data['type_id'] = $type;\n $data['attribute_set_id'] = $attribute_set_id;\n $data['sku'] = $sku;\n\n /*foreach($data['additional_attributes']['single_data'] as $item){\n $data['custom_attributes'][] = [ \"attribute_code\" => $item['key'], \"value\" => $item['value'] ];\n }*/\n $data['custom_attributes'] = [];\n $data['custom_attributes'][] = [ \"attribute_code\" => \"description\", \"value\" => $data['description'] ];\n $data['custom_attributes'][] = [ \"attribute_code\" => \"short_description\", \"value\" => $data['short_description'] ];\n array_push( $data['custom_attributes'] , ['attribute_code' => 'category_ids', 'value' => $data['categories']] );\n array_push( $data['custom_attributes'] , ['attribute_code' => 'url_key', 'value' => Inflector::slug($data['name'].' '.$sku)] );\n unset( $data['categories'], $data['website_ids'], $data['description'], $data['short_description'], $data['tax_class_id'], $data['associated_skus'], $data['price'], $data['price_changes'], $data['configurable_attributes'], $data['stock_data'] );\n\n $result = $this->curlRequest(\"/rest/V1/products/\", 1, json_encode([\"product\" => $data]));\n\n return $result;\n \n \n }",
"function jigoshop_upgrade_146() {\n\t\n\tJigoshop_Base::get_options()->add_option( 'jigoshop_show_checkout_shipping_fields', 'yes' );\n\t\n}",
"public function setType(PagSeguroShippingType $type)\n {\n $this->type = $type;\n }",
"public function getShippingMethods();",
"public function getShippingDetails();",
"public function setNoMultiShipping(){\n $emptyCache = false;\n $db = JFactory::getDBO();\n if (JeproshopSettingModelSetting::getValue('allow_multi_shipping')){\n // Upgrading quantities\n $query = \"SELECT sum(\" . $db->quoteName('quantity') . \") AS quantity, product_id, product_attribute_id, count(*) as count FROM \";\n $query .= $db->quoteName('#__jeproshop_cart_product') . \" WHERE \" . $db->quoteName('cart_id') . \" = \" . (int)$this->cart_id . \" AND \" ;\n $query .= $db->quoteName('shop_id') . \" = \" . (int)$this->shop_id . \" GROUP BY product_id, product_attribute_id HAVING count > 1\";\n\n $db->setQuery($query);\n $products = $db->loadObjectList();\n\n foreach ($products as $product){\n $query = \"UPDATE \" . $db->quoteName('#__jeproshop_cart_product') . \" SET \" . $db->quoteName('quantity') . \" = \" . $product->quantity;\n $query .= \"\tWHERE \" . $db->quoteName('cart_id') . \" = \".(int)$this->cart_id . \" AND \" . $db->quoteName('shop_id') . \" = \" . (int)$this->shop_id ;\n $query .= \" AND product_id = \" . $product->product_id . \" AND product_attribute_id = \" . $product->product_attribute_id;\n $db->setQuery($query);\n if ($db->query())\n $emptyCache = true;\n }\n\n // Merging multiple lines\n $query = \"DELETE cart_product_1 FROM \" . $db->quoteName('#__jeproshop_cart_product') . \" AS cart_product_1 INNER JOIN \";\n $query .= $db->quoteName('#__jeproshop_cart_product') . \" AS cart_product_2 ON ((cart_product_1.cart_id = cart_product_2.\";\n $query .= \"cart_id) AND (cart_product_1.product_id = cart_product_2.product_id) AND (cart_product_1.product_attribute_id = \";\n $query .= \"cart_product_2.product_attribute_id) AND (cart_product_1.address_delivery_id <> cart_product_2.address_delivery_id) \";\n $query .= \" AND (cart_product_1.date_add > cart_product_2.date_add) )\";\n $db->setQuery($query);\n $db->query();\n }\n\n // Update delivery address for each product line\n $query = \"UPDATE \" . $db->quoteName('#__jeproshop_cart_product') . \" SET \" . $db->quoteName('address_delivery_id') . \" = ( SELECT \";\n $query .= $db->quoteName('address_delivery_id') . \" FROM \" . $db->quoteName('#__jeproshop_cart') . \" WHERE \" . $db->quoteName('cart_id');\n $query .= \" = \" . (int)$this->cart_id . \" AND \" . $db->quoteName('shop_id') . \" = \" . (int)$this->shop_id . \") WHERE \" . $db->quoteName('cart_id');\n $query .= \" = \" . (int)$this->cart_id . (JeproshopSettingModelSetting::getValue('allow_multi_shipping') ? \" AND \" . $db->quoteName('shop_id') . \" = \" .(int)$this->shop_id : \"\");\n\n $db->setQuery($query);\n\n $cache_id = 'jeproshop_cart_set_no_multi_shipping'.(int)$this->cart_id.'_'.(int)$this->shop_id .((isset($this->address_delivery_id) && $this->address_delivery_id) ? '-'.(int)$this->address_delivery_id : '');\n if (!JeproshopCache::isStored($cache_id)){\n $db->setQuery($query);\n if ($result = (bool)$db->query())\n $emptyCache = true;\n JeproshopCache::store($cache_id, $result);\n }\n\n if (JeproshopCustomization::isFeaturePublished()){\n //Db::getInstance()->execute(\n\t\t\t$query = \" UPDATE \" . $db->quoteName('#__jeproshop_customization') . \" SET \" . $db->quoteName('address_delivery_id') . \" = ( SELECT \";\n $query .= $db->quoteName('address_delivery_id') . \" FROM \" . $db->quoteName('#__jeproshop_cart') . \" WHERE \" . $db->quoteName('cart_id');\n $query .= \" = \" . (int)$this->cart_id . \" ) WHERE \" . $db->quoteName('cart_id') . \" = \" .(int)$this->cart_id;\n\n $db->setQuery($query);\n $db->query();\n }\n if ($emptyCache){\n $this->_products = null;\n }\n }",
"public function setShippingDescription($description);",
"function add_product_fields( $product_id,\n$product ) {\nif ( $product->post_type == 'products' ) {\n// Store data in post meta table if present in post data\nif ( isset( $_POST['product_SKU'] ) &&\n$_POST['product_SKU'] != '' ) {\nupdate_post_meta( $product_id, 'SKU',\n$_POST['product_SKU'] );\n}\n\nif ( isset( $_POST['product_position'] ) &&\n$_POST['product_position'] != '' ) {\nupdate_post_meta( $product_id, 'position',\n$_POST['product_position'] );\n}\n}\n}",
"public function setShippingCode($data)\n {\n parent::setShippingCode($data);\n }",
"public function add_product_shipping($product_id)\n\t{\n\t\t$data = array(\n\t\t\t\t'product_shipping'=>1,\n\t\t\t\t'product_width'=>$this->input->post('product_width'),\n\t\t\t\t'product_height'=>$this->input->post('product_height'),\n\t\t\t\t'product_length'=>$this->input->post('product_length'),\n\t\t\t\t'product_weight'=>$this->input->post('product_weight')\n\t\t\t);\n\t\t\t\n\t\t$this->db->where('product_id', $product_id);\n\t\tif($this->db->update('product', $data))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse{\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"public function addTax() {\n\t\t$adb = PearDatabase::getInstance();\n\n\t\t$tableName = $this->getTableNameFromType();\n\t\t$taxid = $adb->getUniqueID($tableName);\n\t\t$taxLabel = $this->getName();\n\t\t$percentage = $this->get('percentage');\n\n\t\t//if the tax is not available then add this tax.\n\t\t//Add this tax as a column in related table\n\t\tif($this->isShippingTax()) {\n\t\t\t$taxname = \"shtax\".$taxid;\n\t\t\t$query = \"ALTER TABLE vtiger_inventoryshippingrel ADD COLUMN $taxname decimal(7,3) DEFAULT NULL\";\n\t\t} else {\n\t\t\t$taxname = \"tax\".$taxid;\n\t\t\t$query = \"ALTER TABLE vtiger_inventoryproductrel ADD COLUMN $taxname decimal(7,3) DEFAULT NULL\";\n\t\t}\n\t\t$res = $adb->pquery($query, array());\n\n\t\tvimport('~~/include/utils/utils.php');\n\n\t\tif ($this->isProductTax()) {\n\t\t\t// TODO Review: if field addition is required in shipping-tax case too.\n\t\t\t// NOTE: shtax1, shtax2, shtax3 that is added as default should also be taken care.\n\n\t\t\t$inventoryModules = getInventoryModules();\n\t\t\tforeach ($inventoryModules as $moduleName) {\n\t\t\t\t$moduleInstance = Vtiger_Module::getInstance($moduleName);\n\t\t\t\t$blockInstance = Vtiger_Block::getInstance('LBL_ITEM_DETAILS',$moduleInstance);\n\t\t\t\t$field = new Vtiger_Field();\n\n\t\t\t\t$field->name = $taxname;\n\t\t\t\t$field->label = $taxLabel;\n\t\t\t\t$field->column = $taxname;\n\t\t\t\t$field->table = 'vtiger_inventoryproductrel';\n\t\t\t\t$field->uitype = '83';\n\t\t\t\t$field->typeofdata = 'V~O';\n\t\t\t\t$field->readonly = '0';\n\t\t\t\t$field->displaytype = '5';\n\t\t\t\t$field->masseditable = '0';\n\n\t\t\t\t$blockInstance->addField($field);\n\t\t\t}\n\t\t}\n\n\t\t//if the tax is added as a column then we should add this tax in the list of taxes\n\t\tif($res) {\n\t\t\t$deleted = 0;\n\t\t\tif($this->isDeleted()) {\n\t\t\t\t$deleted = 1;\n\t\t\t}\n\n\t\t\t$compoundOn = Zend_Json::encode($this->get('compoundon'));\n\t\t\t$regions = Zend_Json::encode($this->get('regions'));\n\n\t\t\t$query = 'INSERT INTO '.$tableName.' values(?,?,?,?,?,?,?,?,?)';\n\t\t\t$params = array($taxid, $taxname, $taxLabel, $percentage, $deleted, $this->get('method'), $this->get('type'), $compoundOn, $regions);\n\t\t\t$adb->pquery($query, $params);\n\t\t\treturn $taxid;\n\t\t}\n\t\tthrow new Error('Error occurred while adding tax');\n\t}",
"function smarty_function_shipping($params, $template)\r\n{\t\r\n\tglobal $config;\r\n\tglobal $order;\t\t\r\n\t\t\r\n\tApp::uses('SmartyComponent', 'Controller/Component');\r\n\t\t$Smarty = new SmartyComponent(new ComponentCollection());\r\n\r\n\tApp::import('Model', 'ShippingMethod');\r\n\t\t$ShippingMethod = new ShippingMethod();\r\n\r\n\t// Get the shipping method \r\n\t$shipping = $ShippingMethod->read(null,$order['Order']['shipping_method_id']);\r\n\t\r\n\t$assignments = array('shipping_alias' => $shipping['ShippingMethod']['code']);\r\n\r\n\t$display_template = $Smarty->load_template($params,'shipping');\t\r\n\t$Smarty->display($display_template,$assignments);\r\n\t\r\n}",
"public function initShippingMethod()\n {\n $helper = Mage::helper('onestepcheckout/shipping');\n if (!$this->getQuote()->getShippingAddress()->getShippingMethod()) {\n $shippingRates = $helper->getShippingRates();\n if ((count($shippingRates) == 1)) {\n $currentShippingRate = current($shippingRates);\n if (count($currentShippingRate) == 1) {\n $shippingRate = current($currentShippingRate);\n $shippingMethod = $shippingRate->getCode();\n }\n } elseif ($lastShippingMethod = $helper->getLastShippingMethod()) {\n $shippingMethod = $lastShippingMethod;\n } elseif ($defaultShippingMethod = Mage::helper('onestepcheckout/config')->getDefaultShippingMethod()) {\n $shippingMethod = $defaultShippingMethod;\n }\n if (isset($shippingMethod)) {\n $this->getOnepage()->saveShippingMethod($shippingMethod);\n }\n }\n }",
"public function getShippingDescription();",
"public function shippingMethods($type){\n\n if ($type === 'free')\n $shippingMethod = Setting::where('key', 'free_shipping_label')->first();\n\n\n elseif ($type === 'inner')\n $shippingMethod = Setting::where('key', 'local_label')->first();\n\n elseif ($type === 'outer')\n $shippingMethod = Setting::where('key', 'outer_label')->first();\n else\n $shippingMethod = Setting::where('key', 'free_shipping_label')->first();\n\n\n return view('admin.settings.shippings.shipping', compact('shippingMethod'));\n\n }",
"protected function shouldAddShippingInformation(): bool\r\n {\r\n if (DocumentTypes::requiresDelivery($this->documentType)) {\r\n return true;\r\n }\r\n\r\n return $this->useShipping === Boolean::YES;\r\n }",
"public function saveShippingAction() {\n\t\tif ($this->getRequest ()->isPost ()) {\n\t\t\t$preAddr = Mage::getSingleton ( 'customer/session' )->getPreaddress ();\n\t\t\t\n\t\t\tif ($preAddr) {\n\t\t\t\t$data = array ();\n\t\t\t\tif (! empty ( $preAddr ['ShippingAddress'] [0] )) {\n\t\t\t\t\t$preData = $preAddr ['ShippingAddress'];\n\t\t\t\t} else {\n\t\t\t\t\t$preData = $preAddr;\n\t\t\t\t}\n\t\t\t\t$dataId = $this->getRequest ()->getPost ( 'addressid' );\n\t\t\t\t\n\t\t\t\t$mpData = Mage::getModel ( 'masterpass/masterpass' );\n\t\t\t\tforeach ( $preData as $value ) {\n\t\t\t\t\tif ($dataId == $value ['AddressId']) {\n\t\t\t\t\t\t$reecipientName = $value ['RecipientName'];\n\t\t\t\t\t\t$name = Mage::helper ( 'masterpass' )->getRecipienName ( $reecipientName );\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (! is_array ( $value ['Line2'] )) {\n\t\t\t\t\t\t\t$lin2 = $value ['Line2'];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$lin2 = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (! is_array ( $value ['Line3'] )) {\n\t\t\t\t\t\t\t$lin3 = $value ['Line3'];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$lin3 = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$regionIdS = Mage::helper ( 'masterpass' )->checkMasterpassData ( $mpData->statesMapping ( $value ['CountrySubdivision'] ) );\n\t\t\t\t\t\t$regionS = Mage::helper ( 'masterpass' )->checkMasterpassData ( $mpData->getMasterpassRegion ( $value ['CountrySubdivision'] ) );\n\t\t\t\t\t\t$shippingPhone = $mpData->getRemoveDash ( Mage::helper ( 'masterpass' )->checkMasterpassData ( $value ['RecipientPhoneNumber'] ) );\n\t\t\t\t\t\t$data = array (\n\t\t\t\t\t\t\t\t'firstname' => $name [0],\n\t\t\t\t\t\t\t\t'lastname' => $name [1],\n\t\t\t\t\t\t\t\t'street' => array (\n\t\t\t\t\t\t\t\t\t\t0 => $value ['Line1'],\n\t\t\t\t\t\t\t\t\t\t1 => $lin2,\n\t\t\t\t\t\t\t\t\t\t2 => $lin3 \n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'city' => $value ['City'],\n\t\t\t\t\t\t\t\t'region_id' => $regionIdS,\n\t\t\t\t\t\t\t\t'region' => $regionS,\n\t\t\t\t\t\t\t\t'postcode' => $value ['PostalCode'],\n\t\t\t\t\t\t\t\t'country_id' => $value ['Country'],\n\t\t\t\t\t\t\t\t'telephone' => $shippingPhone \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\t$customerAddressId = $this->getRequest ()->getPost ( 'shipping_address_id', false );\n\t\t\t\t$this->getOnepage ()->saveShipping ( $data, $customerAddressId );\n\t\t\t}\n\t\t}\n\t\t$this->loadLayout ( false );\n\t\t$this->renderLayout ();\n\t}",
"public function actionNovaPostaShipping()\n {\n echo 35.46;\n }",
"public function getCartShippingMethodID()\n {\n }",
"function es_managing_custom_product_columns( $columns, $post_type ) {\n if ( $post_type == 'product' )\n $columns[ 'member_price' ] = 'Member Price';\n return $columns;\n}",
"private function _generateShippingAddressData(){\n \n $address = new PagSeguroAddress();\n $delivery_address = new Address($this->context->cart->id_address_delivery);\n \n if (!is_null($delivery_address)){\n $address->setCity($delivery_address->city);\n $address->setPostalCode($delivery_address->postcode);\n $address->setStreet($delivery_address->address1);\n $address->setDistrict($delivery_address->address2);\n $address->setComplement($delivery_address->other);\n $address->setCity($delivery_address->city);\n \n $country = new Country($delivery_address->id_country);\n $address->setCountry($country->iso_code);\n \n $state = new State($delivery_address->id_state);\n $address->setState($state->iso_code);\n }\n \n return $address;\n }",
"function get_attribute_by_type($_type,$_id_member=FALSE,$_id_product=FALSE,$_id_zhout=FALSE,$_data_product = array(),$_id_source=NULL)\n\t{\n\t\tswitch($_type)\n\t\t{\n\t\t\tcase 'wishes_product' : $_wishes_product = $this->CI->model_zhout->get_wishes_product_by_id_product($_id_product);\n\t\t\t\t\t\t\t\t\t//Must relate with model wishlist return must an integer\n\t\t\t\t\t\t\t\t\t$_wishlist_already_added = $this->CI->model_product->is_added_stuff($_id_product,$_id_member);\n\t\t\t\t\t\t\t\t\t$_wishlist_html ='';\n\t\t\t\t\t\t\t\t\t$_wishlist_html ='<a href=\"javascript:void(0);\"'.((!$_wishlist_already_added)?'onClick =\"addWishlist(this)\"' :'').'\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t id=\"'.$_id_product.' id_source=\"'.$_id_source.'\">';\n\t\t\t\t\t\t\t\t\tif($_wishes_product)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$_wishlist_html .= 'Wishes('.$_wishes_product.')';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t \t$_wishlist_html .= 'Wishes(0)';\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$_wishlist_html .= '</a>';\n\t\t\t\t\t\t\t\t\treturn $_wishlist_html;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\tcase 'addthis_button' : \n\t\t\t\t\t\t\t\t\treturn '<div class=\"addthis_toolbox addthis_default_style \"\n\t\t\t\t\t\t \t\t\taddthis:url=\"'.$_data_url = ((isset($_data_product['product_detail_page_link']))? $_data_product['product_detail_page_link']:'product internal').'\"\n \t\t\t\t\t \t\t\taddthis:title=\"'.$_data_title =((isset($_data_product['product_detaill']))? $_data_product['product_detail_page_link']:'product internal').'\"\n \t\t\taddthis:description=\"'.$_data_desc =((isset($_data_product['desc']))?$_data_product['desc']:'' ).'\">\n\t\t\t\t\t\t\t\t\t<a class=\"addthis_counter addthis_pill_style\"></a>\n\t\t\t\t\t\t\t\t\t</div>';\n\t\t\t \n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\tcase 'comment_view'\t\t : $_data_comment =$this->CI->model_zhout->get_comment_by_id_zhout($_id_zhout);\n\t\t\t\t\t\t\t\t\tif(count($_data_comment))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$_data_view_comment = array();\n\t\t\t\t\t\t\t\t\t\tif(count($_data_comment)> 2)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$_data_comment =$this->CI->model_zhout->get_comment_by_id_zhout($_id_zhout,0,2,$this->_DEFAULT_SHOW_COMMENT_FROM_LAST);\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_show_all_comment'] = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_data_comment'] = $_data_comment;\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_show_comment_input'] = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_id_zhout'] =$_id_zhout;\n\t\t\t\t\t\t\t\t\t\t\t$this->_INPUT_DATA['comment_text']['value']['ref'] = $_id_zhout;\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_comment_text'] =call_user_func($this->_INPUT_DATA['comment_text']['type'],$this->_INPUT_DATA['comment_text']['value']);\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_for_single_ajax'] =FALSE;\n\t\t\t\t\t\t\t\t\t\t\treturn $this->CI->load->view('zhout/zhout_comment_view',$_data_view_comment,TRUE);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if(count($_data_comment)> 0 && count($_data_comment)<=2)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_show_all_comment'] = FALSE;\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_data_comment'] = $_data_comment;\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_show_comment_input'] = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_id_zhout'] =$_id_zhout;\n\t\t\t\t\t\t\t\t\t\t\t$this->_INPUT_DATA['comment_text']['value']['ref'] = $_id_zhout;\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_comment_text'] =call_user_func($this->_INPUT_DATA['comment_text']['type'],$this->_INPUT_DATA['comment_text']['value']);\n\t\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_for_single_ajax'] =FALSE;\n\t\t\t\t\t\t\t\t\t\t\treturn $this->CI->load->view('zhout/zhout_comment_view',$_data_view_comment,TRUE);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_show_all_comment'] = FALSE;\n\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_data_comment'] = $_data_comment;\n\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_show_comment_input'] = TRUE;\n\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_id_zhout'] =$_id_zhout;\n\t\t\t\t\t\t\t\t\t\t$this->_INPUT_DATA['comment_text']['value']['ref'] = $_id_zhout;\n\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_comment_text'] =call_user_func($this->_INPUT_DATA['comment_text']['type'],$this->_INPUT_DATA['comment_text']['value']);\n\t\t\t\t\t\t\t\t\t\t$_data_view_comment['_for_single_ajax'] =FALSE;\n\t\t\t\t\t\t\t\t\t\treturn $this->CI->load->view('zhout/zhout_comment_view',$_data_view_comment,TRUE);\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn FALSE;\t\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\tcase 'comment_status'\t : $_count_comment = $this->CI->model_zhout->get_comment_by_id_zhout($_id_zhout);\n\t\t\t\t\t\t\t\t\t $_status_comment ='<a href =\"javascript:void(0)\" id=\"comment_status-'.$_id_zhout.'\" onClick=\"commentStatus(this);\" >';\n\t\t\t\t\t\t\t\t\t if(count($_count_comment))\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t \t$_status_comment .= 'COMMENT('.count($_count_comment).')';\t\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t \t$_status_comment .= 'COMMENT('.count($_count_comment).')';\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t $_status_comment .= '</a>';\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t return $_status_comment; \n\t\t\t\t\t\t\t\t\tbreak;\n\t\t case 'more_comments'\t\t: $_data_comment =$this->CI->model_zhout->get_comment_by_id_zhout($_id_zhout,0,FALSE,$this->_DEFAULT_SHOW_COMMENT_FROM_LAST);\n\t\t \t\t\t\t\t\t\t $_data_view_comment['_show_all_comment'] = FALSE;\n\t\t\t\t\t\t\t\t\t $_data_view_comment['_data_comment'] = $_data_comment;\n\t\t\t\t\t\t\t\t\t $_data_view_comment['_show_comment_input'] = TRUE;\n\t\t\t\t\t\t\t\t\t $_data_view_comment['_id_zhout'] =$_id_zhout;\n\t\t\t\t\t\t\t\t\t $this->_INPUT_DATA['comment_text']['value']['ref'] = $_id_zhout;\n\t\t\t\t\t\t\t\t\t $_data_view_comment['_comment_text'] =call_user_func($this->_INPUT_DATA['comment_text']['type'],$this->_INPUT_DATA['comment_text']['value']);\n\t\t\t\t\t\t\t\t\t $_data_view_comment['_for_single_ajax'] =TRUE;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t return $this->CI->load->view('zhout/zhout_comment_view',$_data_view_comment,TRUE);\n\t\t\t\t\t\t\t\t\t \n\t\t \t\t\t\t\t\t\t\t\n\t\t}\n\t}",
"public function setShippingInformation($sourceZip, $destZip, $street, $number, $complement = '', $district = '', $city = '', $state = '', $type = 'Correios') {\n\n $this->validateType($type, 'Shipping');\n\n $this->jsonData['Shipping'] = array(\n 'Type' => $type,\n 'SourceZipCode' => $this->validateNumber($sourceZip),\n 'TargetZipCode' => $this->validateNumber($destZip),\n 'Address' => array(\n 'Street' => $this->validateString($street, 256),\n 'Number' => $this->validateNumber($number, 8),\n 'Complement' => $this->validateString($complement, 256),\n 'District' => $this->validateString($district, 64),\n 'City' => $this->validateString($city, 64),\n 'State' => $this->validateString($state, 2)\n )\n );\n\n }",
"private function addUPSSmallAttributes($installer, $eavSetup)\n {\n $attributes = $this->attrNames;\n if ($this->mageVersion < '2.2.5') {\n unset($attributes['dropship'], $attributes['dropship_location']);\n $count = 65;\n foreach ($attributes as $key => $attr) {\n $isExist = $this->eavConfig\n ->getAttribute('catalog_product', 'en_'.$attr.'')->getAttributeId();\n if ($isExist == null) {\n $this->getAttributeArray(\n $eavSetup,\n 'en_'.$attr,\n \\Magento\\Framework\\DB\\Ddl\\Table::TYPE_DECIMAL,\n ucfirst($attr),\n 'text',\n '',\n $count\n );\n }\n $count++;\n }\n }\n\n $isendropshipExist = $this->eavConfig->getAttribute('catalog_product', 'en_dropship')->getAttributeId();\n\n if ($isendropshipExist == null) {\n $this->getAttributeArray(\n $eavSetup,\n 'en_dropship',\n 'int',\n 'Enable Drop Ship',\n 'select',\n 'Magento\\Eav\\Model\\Entity\\Attribute\\Source\\Boolean',\n 71\n );\n }\n\n $isdropshiplocationExist = $this->eavConfig\n ->getAttribute('catalog_product', 'en_dropship_location')->getAttributeId();\n if ($isdropshiplocationExist == null) {\n $this->getAttributeArray(\n $eavSetup,\n 'en_dropship_location',\n 'int',\n 'Drop Ship Location',\n 'select',\n 'Eniture\\UPSSmallPackageQuotes\\Model\\Source\\DropshipOptions',\n 72\n );\n } else {\n $dataArr = [\n 'source_model' => 'Eniture\\UPSSmallPackageQuotes\\Model\\Source\\DropshipOptions',\n ];\n $this->connection\n ->update($this->tableNames['eav_attribute'], $dataArr, \"attribute_code = 'en_dropship_location'\");\n }\n\n $isHazmatExist = $this->eavConfig->getAttribute('catalog_product', 'en_hazmat')->getAttributeId();\n\n if ($isHazmatExist == null) {\n $this->getAttributeArray(\n $eavSetup,\n 'en_hazmat',\n 'int',\n 'Hazardous Material',\n 'select',\n 'Magento\\Eav\\Model\\Entity\\Attribute\\Source\\Boolean',\n 73\n );\n }\n\n $isInsurance = $this->eavConfig->getAttribute('catalog_product', 'en_insurance')->getAttributeId();\n\n if ($isInsurance == null) {\n $this->getAttributeArray(\n $eavSetup,\n 'en_insurance',\n 'int',\n 'Insure this item',\n 'select',\n 'Magento\\Eav\\Model\\Entity\\Attribute\\Source\\Boolean',\n 74\n );\n }\n $installer->endSetup();\n }",
"function shippingDetails($order) {\n echo '<h2>Shipping details</h2>';\n echo get_post_meta( $order->id, 'shippingMethod', true );\n }",
"public function addAddress()\r\n {\r\n if ($this->_helper()->checkSalesVersion('1.4.0.0')) {\r\n # Community after 1.4.1.0 and Enterprise\r\n $salesFlatOrderAddress = $this->_helper()->getSql()->getTable('sales_flat_order_address');\r\n $this->getSelect()\r\n ->joinLeft(array('flat_order_addr_ship' => $salesFlatOrderAddress), \"flat_order_addr_ship.parent_id = main_table.entity_id AND flat_order_addr_ship.address_type = 'shipping'\", array())\r\n ->joinLeft(array('flat_order_addr_bill' => $salesFlatOrderAddress), \"flat_order_addr_bill.parent_id = main_table.entity_id AND flat_order_addr_bill.address_type = 'billing'\", array())\r\n ->columns(array('country_id' => 'IFNULL(flat_order_addr_ship.country_id, flat_order_addr_bill.country_id)'))\r\n ->group('country_id');\r\n } else {\r\n # Old Community\r\n $entityValue = $this->_helper()->getSql()->getTable('sales_order_entity_varchar');\r\n $entityAtribute = $this->_helper()->getSql()->getTable('eav_attribute');\r\n $entityType = $this->_helper()->getSql()->getTable('eav_entity_type');\r\n $orderEntity = $this->_helper()->getSql()->getTable('sales_order_entity');\r\n\r\n $this->getSelect()\r\n ->joinLeft(array('_eavType' => $entityType), \"_eavType.entity_type_code = 'order_address'\", array())\r\n ->joinLeft(array('_addrTypeAttr' => $entityAtribute), \"_addrTypeAttr.entity_type_id = _eavType.entity_type_id AND _addrTypeAttr.attribute_code = 'address_type'\", array())\r\n ->joinLeft(array('_addrValueAttr' => $entityAtribute), \"_addrValueAttr.entity_type_id = _eavType.entity_type_id AND _addrValueAttr.attribute_code = 'country_id'\", array())\r\n\r\n # Shipping values\r\n ->joinRight(array('_orderEntity_ship' => $orderEntity), \"_orderEntity_ship.entity_type_id = _eavType.entity_type_id AND _orderEntity_ship.parent_id = e.entity_id\", array())\r\n ->joinRight(array('_addrTypeVal_ship' => $entityValue), \"_addrTypeVal_ship.attribute_id = _addrTypeAttr.attribute_id AND _addrTypeVal_ship.entity_id = _orderEntity_ship.entity_id AND _addrTypeVal_ship.value = 'shipping'\", array())\r\n ->joinRight(array('_addrCountryVal_ship' => $entityValue), \"_addrCountryVal_ship.attribute_id = _addrValueAttr.attribute_id AND _addrCountryVal_ship.entity_id = _orderEntity_ship.entity_id\", array())\r\n\r\n # Billing values\r\n ->joinRight(array('_orderEntity_bill' => $orderEntity), \"_orderEntity_bill.entity_type_id = _eavType.entity_type_id AND _orderEntity_bill.parent_id = e.entity_id\", array())\r\n ->joinRight(array('_addrTypeVal_bill' => $entityValue), \"_addrTypeVal_bill.attribute_id = _addrTypeAttr.attribute_id AND _addrTypeVal_bill.entity_id = _orderEntity_bill.entity_id AND _addrTypeVal_bill.value = 'billing'\", array())\r\n ->joinRight(array('_addrCountryVal_bill' => $entityValue), \"_addrCountryVal_bill.attribute_id = _addrValueAttr.attribute_id AND _addrCountryVal_bill.entity_id = _orderEntity_bill.entity_id\", array())\r\n\r\n ->columns(array('country_id' => 'IFNULL(_addrCountryVal_ship.value, _addrCountryVal_bill.value)'))\r\n ->group('country_id');\r\n }\r\n return $this;\r\n }",
"function register_shipping_method($methods)\n {\n $methods['legacy_pakkelabels_shipping_gls_business'] = 'Legacy_Pakkelabels_Shipping_GLS_Business';\n return $methods;\n }",
"public function prepareShippingTypeList() \n { \n return $this->shippingTypeEngine->prepareDatatableShippingTypeList();\n }",
"public function __construct() {\n $this->id = 'gt_shipping';\n $this->title = __( 'Point de livraison' );\n $this->method_description = __( 'Solution de livraison' ); //\n $this->enabled = \"yes\"; // This can be added as an setting but for this example its forced enabled\n $this->init();\n }",
"function warehouse_shipping( $products, $destination_country){\r\n\t\t$pweight=0;\r\n\t\t$amount=0;\r\n\t\t$baseshippingprice=false;\r\n\t\tforeach ( $products as $product ) {\r\n\t\t\t$_enable_warehouse=get_metadata('post',$product['product_id'],'_enable_warehouse',true);\r\n\t\t\tif($_enable_warehouse!=1) continue;\r\n\t\t\tif ( is_product_disable_shipping_weight( $product['product_id'] ) ) {\r\n continue;\r\n\t\t }\r\n\t\t\t$_enable_warehouse=get_metadata('post',$product['product_id'],'_enable_warehouse',true);\r\n\t\t\tif ( isset( $product['variation_id'] ) ) {\r\n\t\t\t\t$is_virtual = get_post_meta( $product['variation_id'], '_virtual', true );\r\n\t\t\t\t$is_downloadable = get_post_meta( $product['variation_id'], '_downloadable', true );\r\n\t\t\t} else {\r\n\t\t\t\t$is_virtual = get_post_meta( $product['product_id'], '_virtual', true );\r\n\t\t\t\t$is_downloadable = get_post_meta( $product['product_id'], '_downloadable', true );\r\n\t\t\t}\r\n\r\n\t\t\tif ( ( $is_virtual == 'yes' ) || ( $is_downloadable == 'yes' ) ) {\r\n\t\t\t\t$downloadable_count++;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t$_enable_warehouse=get_metadata('post',$product['product_id'],'_enable_warehouse',true);\r\n\t\r\n\t\t\t// if warehouse shipping enable for this product\r\n\t\t\tif($_enable_warehouse==1){\r\n\t\t\t\t\r\n\t\t\t\t$pweight+=$product['data']->get_weight()* $product['quantity'];\r\n\t\t\t}\r\n\t\t\t$price[ $seller_id ]['totalp_price'] += $product['line_total'];\r\n\t\t}\r\n\t\t\r\n\t\t\t\t\t\r\n\t\t$dps_country_rates= get_option('_dps_country_rates', true );\r\n\t\t$dps_weight_rates = get_option('_dps_weight_rates', true );\r\n\t\t$dps_threshold_values = get_option('_dps_threshold_value', true );\r\n\t\t$dps_threshold_value=$dps_threshold_values['threshold'];\r\n\t\tif ( isset( $dps_weight_rates[$destination_country] ) ){\r\n\t\t\t\t\t\r\n\t\t\t$baseshippingprice=false;\r\n\t\t\t$cnt=0;\r\n\t\t\tforeach ( $dps_weight_rates[$destination_country]['wf'] as $weight => $weight_rate ){\r\n\t\t\t\t $weightfrom=$dps_weight_rates[$destination_country]['wf'][$cnt];\r\n\t\t\t\t $weightto=$dps_weight_rates[$destination_country]['wto'][$cnt];\r\n\t\t\t\t $weightrate=$dps_weight_rates[$destination_country]['rate'][$cnt];\r\n\t\t\t\t//echo $price[$seller_id]['state_rates']=$weightrate;\r\n\t\t\t\t\r\n\t\t\t\tif($weightfrom<$pweight && $weightto>=$pweight){\r\n\t\t\t\t\t$priceliesonweightrange=true;\r\n\t\t\t\t\t $price[$seller_id]['shipping_rates']=$weightrate;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t $cnt++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(isset($dps_threshold_value[$destination_country])){\r\n\t\t\tif($dps_threshold_value[$destination_country]>0){\r\n\t\t\t\tif($price[$seller_id]['totalp_price']>$dps_threshold_value[$destination_country]){\r\n\t\t\t\t\t$price[$seller_id]['shipping_rates']=0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ( !empty( $price ) ) {\r\n foreach ( $price as $s_id => $value ) {\r\n $amount = $amount + ( ( isset($value['shipping_rates']) ? $value['shipping_rates'] : 0 ) );\r\n\t\t\t\t\r\n\t\t\t\t\r\n }\r\n }\r\n\t\t\r\n\t\treturn $amount;\r\n}",
"function default_template_shipping ()\r\n{\r\n$template = '\r\n{shipping_content alias=$shipping_alias}\r\n';\r\nreturn $template;\r\n}",
"public function getShippingMethodName();",
"function getShippingProfiles($object) {\n $object->addCollectionEntry(\"Paket National\");\n $object->addCollectionEntry(\"Paket International\");\n $object->addCollectionEntry(\"Kurier (Express)\");\n}",
"public function setShippingType($shippingType)\n {\n $this->shippingType = $shippingType;\n return $this;\n }",
"public function setShippingValues(Order $order): void;",
"public function applydeleverytype($userid,$quoteId,$shipping) { \n \n\t\t$objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance(); // Instance of object manager\n\t\t$resource = $objectManager->get('Magento\\Framework\\App\\ResourceConnection');\n\t\t$connection = $resource->getConnection();\n\t\t$quote_sql = \"Select * FROM quote where customer_id=$userid and store_id=1 and entity_id='$quoteId' and is_active=1\";\n\t\t$result_result = $connection->fetchAll($quote_sql);\t\n\t\t//print_r($result_result);\n\t\tif(!empty($result_result))\n\t\t{\n\t\t\t $quoteId2=$result_result[0]['entity_id'];\n\t\t\t $quote = $this->quote->create()->load($quoteId2);\n\t\t\t $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $checkoutSession =$objectManager->get('Magento\\Checkout\\Model\\Session');\n\t\t $checkoutSession->setQuoteId($quoteId2);\n\t\t\t //$orderData['shipping_address']='';\n\t\t\t //$orderData['shipping_address']='';\n\t\t\t// $quote->getShippingAddress()->addData('');\n\t\t\t $shippingAddress=$quote->getShippingAddress(); \n $shippingAddress->setCollectShippingRates(true)\n ->collectShippingRates() \n //->setShippingMethod('freeshipping_freeshipping'); //shipping method\n\t\t\t\t\t\t->setShippingMethod($shipping); //shipping method\n\t\t\t\t\t\t $quote->save();\n\t\t\t\t\t$quoteid3=$quote->getId();\t\n\t\t\t\t\t\n\t\t\t$quote->collectTotals()->save();\t\t \n\t\t\t\t\t\n if($quoteid3)\n\t\t {\n\t\t\t$result[]=array('status'=>array(\"code\"=>\"1\",\"message\"=>\"Success\"),'quoteid'=>$quoteid3);\n\t\t }\n\t\t else\n\t\t {\n\t\t\t $result[]=array('status'=>array(\"code\"=>\"0\",\"message\"=>\"error\"));\n\t\t }\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$result[]=array('status'=>array(\"code\"=>\"0\",\"message\"=>\"Error\"));\n\t\t}\n\t \n\t \n\t\treturn $result; \n\t\t \n\t }",
"public function getProductTypeAttribute()\n {\n return [self::LOAN, self::INSURANCE];\n }",
"public function setShippingAmount($amount);",
"public function store()\n\t{\n\t\t$order = new Order();\n\n\t\t$items = json_decode(Input::get('items', []), true);\n\n\t\tforeach($items as &$item) {\n\t\t\t$id = $item['reference']['id'];\n\t\t\t$model = Product::find($id);\n\t\t\t$item['name'] = $model->name;\n\t\t\t$item['unit_price'] = $model->price;\n\t\t\t$item['total_price_including_tax'] = ceil($model->price * $model->vatgroup->amount * $item['quantity']);\n\t\t\t$item['total_price_excluding_tax'] = ceil($model->price * $item['quantity']);\n\t\t\t$item['type'] = 'physical';\n\t\t\t$item['discount_rate'] = 0;\n\t\t\t$item['tax_rate'] = (int) abs((1 - $model->vatgroup->amount) * 100);\n\t\t}\n\n\t\t$order->items = $items;\n\n\t\t# determine shipping type\n\t\t$total = $order->getTotal();\n\t\t$weight = $order->getWeight();\n\t\tif ($weight <= 1000) {\n\t\t\t$shippingType = 'mail';\n\t\t\t$shippingCost = 39;\n\t\t}else {\n\t\t\t$shippingType = 'service-pack';\n\t\t\t$shippingCost = 99;\n\t\t}\n\n\t\t# free shipping?\n\t\tif ($total >= 800) {\n\t\t\t$shippingCost = 0;\n\t\t}\n\n\t\t# add shipping\n\t\t$items = $order->items;\n\t\t$items[] = [\n\t\t\t'discount_rate' => 0,\n\t\t\t'name' => $shippingType,\n\t\t\t'quantity' => 1,\n\t\t\t'reference' => null,\n\t\t\t'tax_rate' => 0,\n\t\t\t'total_price_excluding_tax' => $shippingCost,\n\t\t\t'total_price_including_tax' => $shippingCost,\n\t\t\t'total_tax_amount' => 0,\n\t\t\t'type' => 'shipping_fee',\n\t\t\t'unit_price' => $shippingCost,\n\t\t];\n\t\t$order->items = $items;\n\n\t\t# set user\n\t\t$order->user_id = Input::get('user_id');\n\n\t\t# set shipping & billing addresses\n\t\t$order->billing_address = [\n\t\t\t'given_name' => $order->user->firstname,\n\t\t\t'family_name' => $order->user->lastname,\n\t\t\t'street_address' => null,\n\t\t\t'postal_code' => null,\n\t\t\t'city' => null,\n\t\t\t'country' => null,\n\t\t\t'email' => $order->user->email,\n\t\t\t'phone' => null,\n\t\t];\n\t\t$order->shipping_address = $order->billing_address;\n\n\t\t# set locale etc\n\t\t$order->locale = 'nb-no';\n\t\t$order->purchase_country = 'no';\n\t\t$order->purchase_currency = 'nok';\n\n\t\t# set total\n\t\t$order->total_price_including_tax = $order->getTotal();\n\n\t\t$total = 0;\n\t\tforeach($order->items as $item) {\n\t\t\t$total += $item['total_price_excluding_tax'];\n\t\t}\n\t\t$order->total_price_excluding_tax = $total;\n\n\t\t# total tax amount\n\t\t$tax = 0;\n\t\tforeach($order->items as $item) {\n\t\t\t$tax += $item['total_price_including_tax'] - $item['total_price_excluding_tax'];\n\t\t}\n\t\t$order->total_tax_amount = $tax;\n\n\t\t$order->status = 'unprocessed';\n\n\t\t# save\n\t\t$order->save();\n\n\t\t# redirect to edit that order now\n\t\treturn Redirect::to(route('admin.orders.edit', $order->id));\n\t}",
"function ufstore_register_types() {\n\t\t// $this->product_slug = 'product';\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Products', 'Post Type General Name', 'text_domain' ),\n\t\t\t'singular_name' => _x( 'Product', 'Post Type Singular Name', 'text_domain' ),\n\t\t\t'menu_name' => __( 'Store', 'text_domain' ),\n\t\t\t'parent_item_colon' => __( 'Parent Procut:', 'text_domain' ),\n\t\t\t'all_items' => __( 'All Products', 'text_domain' ),\n\t\t\t'view_item' => __( 'View Product', 'text_domain' ),\n\t\t\t'add_new_item' => __( 'Add New Product', 'text_domain' ),\n\t\t\t'add_new' => __( 'Add New', 'text_domain' ),\n\t\t\t'edit_item' => __( 'Edit Product', 'text_domain' ),\n\t\t\t'update_item' => __( 'Update Product', 'text_domain' ),\n\t\t\t'search_items' => __( 'Search Product', 'text_domain' ),\n\t\t\t'not_found' => __( 'Not found', 'text_domain' ),\n\t\t\t'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ),\n\t\t);\n\t\t$args = array(\n\t\t\t'label' => __( 'uf_store', 'text_domain' ),\n\t\t\t'description' => __( 'Products in the store', 'text_domain' ),\n\t\t\t'labels' => $labels,\n\t\t\t'supports' => array( 'title', 'editor', 'thumbnail', ),\n\t\t\t'taxonomies' => array( 'ufstore_category' ),\n\t\t\t'hierarchical' => false,\n\t\t\t'public' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_menu' => true,\n\t\t\t'show_in_nav_menus' => true,\n\t\t\t'show_in_admin_bar' => true,\n\t\t\t'menu_position' => 30,\n\t\t\t'can_export' => true,\n\t\t\t'has_archive' => true,\n\t\t\t'exclude_from_search' => false,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'capability_type' => 'page',\n\t\t\t'rewrite' => array( 'slug' => 'product' ),\n\t\t);\n\t\tregister_post_type( 'ufstore', $args );\n\n\n\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Order', 'Post Type General Name', 'text_domain' ),\n\t\t\t'singular_name' => _x( 'Order', 'Post Type Singular Name', 'text_domain' ),\n\t\t\t'menu_name' => __( 'Orders', 'text_domain' ),\n\t\t\t'name_admin_bar' => __( 'Order', 'text_domain' ),\n\t\t\t'parent_item_colon' => __( 'Parent Order:', 'text_domain' ),\n\t\t\t'all_items' => __( 'All Orders', 'text_domain' ),\n\t\t\t'add_new_item' => __( 'Add New Order', 'text_domain' ),\n\t\t\t'add_new' => __( 'Add New', 'text_domain' ),\n\t\t\t'new_item' => __( 'New Order', 'text_domain' ),\n\t\t\t'edit_item' => __( 'Edit Order', 'text_domain' ),\n\t\t\t'update_item' => __( 'Update Order', 'text_domain' ),\n\t\t\t'view_item' => __( 'View Order', 'text_domain' ),\n\t\t\t'search_items' => __( 'Search Orders', 'text_domain' ),\n\t\t\t'not_found' => __( 'Not found', 'text_domain' ),\n\t\t\t'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ),\n\t\t);\n\t\t$args = array(\n\t\t\t'label' => __( 'ufstore_order', 'text_domain' ),\n\t\t\t'description' => __( 'Store Orders', 'text_domain' ),\n\t\t\t'labels' => $labels,\n\t\t\t'supports' => array( 'title', 'revisions', ),\n\t\t\t'hierarchical' => false,\n\t\t\t'public' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_menu' => true,\n\t\t\t'menu_position' => 35,\n\t\t\t'show_in_admin_bar' => true,\n\t\t\t'show_in_nav_menus' => true,\n\t\t\t'can_export' => true,\n\t\t\t'has_archive' => false,\n\t\t\t'exclude_from_search' => true,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'capability_type' => 'page',\n\t\t);\n\t\tregister_post_type( 'ufstore_order', $args );\n\n\t\t// Hook into the 'init' action\n\t\tadd_action( 'init', 'ufstore_order', 0 );\n\t\t//Register the store taxonomy\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Product Categories', 'Taxonomy General Name', 'text_domain' ),\n\t\t\t'singular_name' => _x( 'Product Category', 'Taxonomy Singular Name', 'text_domain' ),\n\t\t\t'menu_name' => __( 'Product Categories', 'text_domain' ),\n\t\t\t'all_items' => __( 'All Categories', 'text_domain' ),\n\t\t\t'parent_item' => __( 'Parent Category', 'text_domain' ),\n\t\t\t'parent_item_colon' => __( 'Parent Category:', 'text_domain' ),\n\t\t\t'new_item_name' => __( 'New Product Category', 'text_domain' ),\n\t\t\t'add_new_item' => __( 'Add New Product Category', 'text_domain' ),\n\t\t\t'edit_item' => __( 'Edit Product Category', 'text_domain' ),\n\t\t\t'update_item' => __( 'Update Product Category', 'text_domain' ),\n\t\t\t'separate_items_with_commas' => __( 'Separate product categories with commas', 'text_domain' ),\n\t\t\t'search_items' => __( 'Search Product Categories', 'text_domain' ),\n\t\t\t'add_or_remove_items' => __( 'Add or remove Product Categories', 'text_domain' ),\n\t\t\t'choose_from_most_used' => __( 'Choose from the most used Product Categories', 'text_domain' ),\n\t\t\t'not_found' => __( 'Not Found', 'text_domain' ),\n\t\t);\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'hierarchical' => true,\n\t\t\t'public' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'show_in_nav_menus' => true,\n\t\t\t'show_tagcloud' => true,\n\t\t\t'query_var' => 'ufstore_category',\n\t\t);\n\t\tregister_taxonomy('ufstore_category', array( 'ufstore' ), $args );\n\t}",
"public function __construct($_chrShippingMethod = null,$_shippingDescription = null)\n {\n parent::__construct(array('chrShippingMethod'=>$_chrShippingMethod,'ShippingDescription'=>$_shippingDescription), false);\n }",
"public function add_rental_product( $types ){\n\n\t\n\t$types[ 'rental' ] = __( 'Rental' );\n\n\treturn $types;\n\n\t}",
"public function getMapShippingTypes()\n {\n return $this->map_shipping_types;\n }",
"function quote($method = '') {\r\n\r\n\t\tglobal $order, $shipping_weight, $shipping_num_boxes, $transittime, $dispinsure, $packing;\r\n\r\n\t\tif ($this->dimensions_support > 0 && is_object($packing)) {\r\n\r\n\t\t\tif ($this->dimensions_support == 1) { // # only ready to ship items are set with dimensions\r\n\r\n\t\t\t\tfor ($i = 0; $i < sizeof($boxesToShip); $i++) {\r\n\t\t\t\t\tif ($boxesToShip[$i]['item_length'] == 0) { // size wasn't set\r\n\t\t\t\t\t\tif ($boxesToShip[$i]['item_weight'] > 60) { // use module estimated dimesions when size not set\r\n\t\t\t\t\t\t\tlist($length, $width, $height) = explode(', ', MODULE_SHIPPING_USPS_PKG_SIZE_OVER60);\r\n\t\t\t\t\t\t} elseif ($boxesToShip[$i]['item_weight'] > 50) {\r\n\t\t\t\t\t\t\tlist($length, $width, $height) = explode(', ', MODULE_SHIPPING_USPS_PKG_SIZE_OVER50);\r\n\t\t\t\t\t\t} elseif ($boxesToShip[$i]['item_weight'] > 40) {\r\n\t\t\t\t\t\t\tlist($length, $width, $height) = explode(', ', MODULE_SHIPPING_USPS_PKG_SIZE_OVER40);\r\n\t\t\t\t\t\t} elseif ($boxesToShip[$i]['item_weight'] > 30) {\r\n\t\t\t\t\t\t\tlist($length, $width, $height) = explode(', ', MODULE_SHIPPING_USPS_PKG_SIZE_OVER30);\r\n\t\t\t\t\t\t} elseif ($boxesToShip[$i]['item_weight'] > 20) {\r\n\t\t\t\t\t\t\tlist($length, $width, $height) = explode(', ', MODULE_SHIPPING_USPS_PKG_SIZE_OVER20);\r\n\t\t\t\t\t\t} elseif ($boxesToShip[$i]['item_weight'] > 10) {\r\n\t\t\t\t\t\t\tlist($length, $width, $height) = explode(', ', MODULE_SHIPPING_USPS_PKG_SIZE_OVER10);\r\n\t\t\t\t\t\t} elseif ($boxesToShip[$i]['item_weight'] > 5) {\r\n\t\t\t\t\t\t\tlist($length, $width, $height) = explode(', ', MODULE_SHIPPING_USPS_PKG_SIZE_OVER5);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tlist($length, $width, $height) = explode(', ', MODULE_SHIPPING_USPS_PKG_SIZE_LESS5);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$boxesToShip[$i]['item_length'] = $length;\r\n\t\t\t\t\t\t$boxesToShip[$i]['item_width'] = $width;\r\n\t\t\t\t\t\t$boxesToShip[$i]['item_height'] = $height;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$numBoxes = $packing->getNumberOfBoxes();\r\n\r\n\t\t\tif (SHIPPING_UNIT_LENGTH == 'CM') { // must convert centimeters to inches before getting quote\r\n\t\t\t\tfor ($i = 0; $i < sizeof($boxesToShip); $i++) {\r\n\t\t\t\t\t$boxesToShip[$i]['item_length'] *= 0.39370079;\r\n\t\t\t\t\t$boxesToShip[$i]['item_width'] *= 0.39370079;\r\n\t\t\t\t\t$boxesToShip[$i]['item_height'] *= 0.39370079;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else { // # The old method. tell us how many boxes plus the box weight\r\n\r\n\t\t\tif ($shipping_weight > 60) { // these are defined in inches and don't need converting\r\n\t\t\t\tlist($length, $width, $height) = explode(', ', MODULE_SHIPPING_USPS_PKG_SIZE_OVER60);\r\n\t\t\t} elseif ($shipping_weight > 50) {\r\n\t\t\t\tlist($length, $width, $height) = explode(', ', MODULE_SHIPPING_USPS_PKG_SIZE_OVER50);\r\n\t\t\t} elseif ($shipping_weight > 40) {\r\n\t\t\t\tlist($length, $width, $height) = explode(', ', MODULE_SHIPPING_USPS_PKG_SIZE_OVER40);\r\n\t\t\t} elseif ($shipping_weight > 30) {\r\n\t\t\t\tlist($length, $width, $height) = explode(', ', MODULE_SHIPPING_USPS_PKG_SIZE_OVER30);\r\n\t\t\t} elseif ($shipping_weight > 20) {\r\n\t\t\t\tlist($length, $width, $height) = explode(', ', MODULE_SHIPPING_USPS_PKG_SIZE_OVER20);\r\n\t\t\t} elseif ($shipping_weight > 10) {\r\n\t\t\t\tlist($length, $width, $height) = explode(', ', MODULE_SHIPPING_USPS_PKG_SIZE_OVER10);\r\n\t\t\t} elseif ($shipping_weight > 5) {\r\n\t\t\t\tlist($length, $width, $height) = explode(', ', MODULE_SHIPPING_USPS_PKG_SIZE_OVER5);\r\n\t\t\t} else {\r\n\t\t\t\tlist($length, $width, $height) = explode(', ', MODULE_SHIPPING_USPS_PKG_SIZE_LESS5);\r\n\t\t\t}\r\n\r\n\t\t\t$package = array('item_weight' => $shipping_weight,\r\n\t\t\t\t'item_price' => round($order->info['subtotal'] / $shipping_num_boxes, 2),\r\n\t\t\t\t'item_length' => $length,\r\n\t\t\t\t'item_width' => $width,\r\n\t\t\t\t'item_height' => $height);\r\n\r\n\t\t\t$boxesToShip = array();\r\n\r\n\t\t\tfor ($i = 0; $i < $shipping_num_boxes; $i++) {\r\n\t\t\t\t$boxesToShip[] = $package;\r\n\t\t\t}\r\n\r\n\t\t\t$totalWeight = round($shipping_weight * $shipping_num_boxes, 2);\r\n\t\t\t$numBoxes = $shipping_num_boxes;\r\n\t\t}\r\n\t\tif (SHIPPING_UNIT_WEIGHT == 'KGS') { // # must convert kilograms to pounds before getting quote\r\n\t\t\tfor ($i = 0; $i < sizeof($boxesToShip); $i++) {\r\n\t\t\t\t$boxesToShip[$i]['item_weight'] *= 2.2046226;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($this->display_weight) {\r\n\t\t\t$shiptitle = sprintf(MODULE_SHIPPING_USPS_TEXT_WEIGHT_DISPLAY, $numBoxes, $totalWeight);\r\n\t\t} else {\r\n\t\t\t$shiptitle = '';\r\n\t\t}\r\n\t\t$this->dest_zip = str_replace(' ', '', $order->delivery['postcode']);\r\n\t\tif ($order->delivery['country']['id'] == SHIPPING_ORIGIN_COUNTRY) { // domestic quote\r\n\t\t\t$this->dest_zip = substr($this->dest_zip, 0, 5);\r\n\t\t\t$dmstcquotes = array();\r\n\t\t\tif( $this->display_transit ){\r\n\t\t\t\t$trnstime = $this->_getDmstcTransitTimes();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$error = false;\r\n\t\t\tforeach ($boxesToShip as $package) {\r\n\t\t\t\t$pkgQuote = $this->_getDmstcQuote($package, $method);\r\n\t\t\t\tif (isset($pkgQuote['error'])) {\r\n\t\t\t\t\t$uspsQuote = $pkgQuote;\r\n\t\t\t\t\t$error = true;\r\n\t\t\t\t\tbreak; // stop if an error is returned\r\n\t\t\t\t}\r\n\t\t\t\tforeach ($pkgQuote as $quote) { // combine quotes for package with the quotes for other packages\r\n\t\t\t\t\tif (isset($dmstcquotes[$quote['id']])) { // already set for this mail type?\r\n\t\t\t\t\t\t$dmstcquotes[$quote['id']]['retailavail'] = ($dmstcquotes[$quote['id']]['retailavail'] && $quote['retailavail']);\r\n\t\t\t\t\t\t$dmstcquotes[$quote['id']]['onlineavail'] = ($dmstcquotes[$quote['id']]['onlineavail'] && $quote['onlineavail']);\r\n\t\t\t\t\t\t$dmstcquotes[$quote['id']]['retailrate'] += $quote['retailrate'];\r\n\t\t\t\t\t\t$dmstcquotes[$quote['id']]['onlinerate'] += $quote['onlinerate'];\r\n\t\t\t\t\t\t$dmstcquotes[$quote['id']]['retailinsval'] += $quote['retailinsval'];\r\n\t\t\t\t\t\t$dmstcquotes[$quote['id']]['onlineinsval'] += $quote['onlineinsval'];\r\n\t\t\t\t\t\t$dmstcquotes[$quote['id']]['count']++;\r\n\t\t\t\t\t} else { // create combined quote since it didn't exist\r\n\t\t\t\t\t\t$dmstcquotes[$quote['id']] = $quote;\r\n\t\t\t\t\t\t$dmstcquotes[$quote['id']]['count'] = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!$error) {\r\n\t\t\t\t$methods = array();\r\n\t\t\t\t$transtypes = array();\r\n\t\t\t\tforeach ($dmstcquotes as $quote) {\r\n\t\t\t\t\tif ($quote['count'] != $numBoxes) continue; // skip methods that don't work for all packages\r\n\t\t\t\t\tif( (MODULE_SHIPPING_USPS_DMSTC_RATE == 'Internet') && $quote['onlineavail'] ){\r\n\t\t\t\t\t\t$title = $quote['name']; //$this->types[$quote['id']];\r\n\t\t\t\t\t\tif ($this->display_insurance && ($quote['onlineinsval'] > 0)) $title .= '<br />---' . MODULE_SHIPPING_USPS_TEXT_INSURED . '$' . (ceil($quote['onlineinsval'] * 100) / 100);\r\n\t\t\t\t\t\tif ($this->display_confirmation && tep_not_null($quote['onlineconf'])) $title .= '<br />---' . $quote['onlineconf'];\r\n\t\t\t\t\t\tif ($this->display_transit && ($trnstime !== false)) {\r\n\t\t\t\t\t\t\t$time = '';\r\n\t\t\t\t\t\t\tif ((strpos($quote['id'], 'First') !== false) || (strpos($quote['id'], 'Priority') !== false)) {\r\n\t\t\t\t\t\t\t\t$time = $trnstime['priority'];\r\n\t\t\t\t\t\t\t} elseif (strpos($quote['id'], 'Express') !== false) {\r\n\t\t\t\t\t\t\t\t$time = $trnstime['express'];\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$time = $trnstime['parcel'];\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\tif( $time != '' ){\r\n\t\t\t\t\t\t\t\t$title .= '<br />' . $time;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (MODULE_SHIPPING_USPS_HANDLING_TYPE == 'Per Shipment') {\r\n\t\t\t\t\t\t\t$cost = $quote['onlinerate'] + $this->dmstc_handling[$quote['id']];\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$cost = $quote['onlinerate'] + ($this->dmstc_handling[$quote['id']] * $numBoxes);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$methods[] = array(\r\n\t\t\t\t\t\t\t'id' => $quote['id'],\r\n\t\t\t\t\t\t\t'title' => $title,\r\n\t\t\t\t\t\t\t'cost' => $cost\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t} elseif( $quote['retailavail'] ){\r\n\t\t\t\t\t\t$title = $quote['name']; //$this->types[$quote['id']];\r\n\t\t\t\t\t\tif ($this->display_insurance && ($quote['retailinsval'] > 0)) $title .= '<br />---' . MODULE_SHIPPING_USPS_TEXT_INSURED . '$' . (ceil($quote['retailinsval'] * 100) / 100);\r\n\t\t\t\t\t\tif ($this->display_confirmation && tep_not_null($quote['retailconf'])) $title .= '<br />---' . $quote['retailconf'];\r\n\t\t\t\t\t\tif ($this->display_transit && ($trnstime !== false)) {\r\n\t\t\t\t\t\t\t$time = '';\r\n\t\t\t\t\t\t\tif ((strpos($quote['id'], 'First') !== false) || (strpos($quote['id'], 'Priority') !== false)) {\r\n\t\t\t\t\t\t\t\t$time = $trnstime['priority'];\r\n\t\t\t\t\t\t\t} elseif (strpos($quote['id'], 'Express') !== false) {\r\n\t\t\t\t\t\t\t\t$time = $trnstime['express'];\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$time = $trnstime['parcel'];\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\tif( $time != '' ){\r\n\t\t\t\t\t\t\t\t$title .= '<br />' . $time;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (MODULE_SHIPPING_USPS_HANDLING_TYPE == 'Per Shipment') {\r\n\t\t\t\t\t\t\t$cost = $quote['retailrate'] + $this->dmstc_handling[$quote['id']];\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$cost = $quote['retailrate'] + ($this->dmstc_handling[$quote['id']] * $numBoxes);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$methods[] = array(\r\n\t\t\t\t\t\t\t'id' => $quote['id'],\r\n\t\t\t\t\t\t\t'title' => $title,\r\n\t\t\t\t\t\t\t'cost' => $cost\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t}\r\n\t\t\t\t} // end foreach $dmstcquotes\r\n\t\t\t\tif (empty($methods)) { // no quotes valid for all packages\r\n\t\t\t\t\t$uspsQuote = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$uspsQuote = $methods;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif( sizeof($this->dmstc_type_change) > 0 ){\r\n\t\t\t\t$this->logTypeChange(array(\r\n\t\t\t\t\t'type' => 'Domestic',\r\n\t\t\t\t\t'changes' => $this->dmstc_type_change,\r\n\t\t\t\t));\r\n\t\t\t}\r\n\t\t} else { // # international quote\r\n\t\t\t$maxinsurance_query = tep_db_query(\"SELECT DISTINCT(max_insurance) FROM USPS_intl_maxins WHERE insurable AND country_code = '\" . tep_db_input($order->delivery['country']['iso_code_2']) . \"' ORDER BY max_insurance\");\r\n\t\t\t$this->intl_maxinsure = array();\r\n\r\n\t\t\twhile ($x = tep_db_fetch_array($maxinsurance_query)) {\r\n\t\t\t\t$this->intl_maxinsure[] = $x['max_insurance'];\r\n\t\t\t}\r\n\r\n\t\t\t$intlquotes = array();\r\n\t\t\tforeach ($boxesToShip as $package) {\r\n\t\t\t\t$pkgQuote = $this->_getIntlQuote($package, $method);\r\n\t\t\t\tif (isset($pkgQuote['error'])) {\r\n\t\t\t\t\t$uspsQuote = $pkgQuote;\r\n\t\t\t\t\t$error = true;\r\n\t\t\t\t\tbreak; // stop if an error is returned\r\n\t\t\t\t}\r\n\t\t\t\tforeach ($pkgQuote as $quote) { // combine quotes for package with the quotes for other packages\r\n\t\t\t\t\tif (isset($intlquotes[$quote['id']])) { // already set for this mail type?\r\n\t\t\t\t\t\t$intlquotes[$quote['id']]['retailavail'] = ($intlquotes[$quote['id']]['retailavail'] && $quote['retailavail']);\r\n\t\t\t\t\t\t$intlquotes[$quote['id']]['onlineavail'] = ($intlquotes[$quote['id']]['onlineavail'] && $quote['onlineavail']);\r\n\t\t\t\t\t\t$intlquotes[$quote['id']]['retailrate'] += $quote['retailrate'];\r\n\t\t\t\t\t\t$intlquotes[$quote['id']]['onlinerate'] += $quote['onlinerate'];\r\n\t\t\t\t\t\t$intlquotes[$quote['id']]['retailinsval'] += $quote['retailinsval'];\r\n\t\t\t\t\t\t$intlquotes[$quote['id']]['onlineinsval'] += $quote['onlineinsval'];\r\n\t\t\t\t\t\t$intlquotes[$quote['id']]['count']++;\r\n\t\t\t\t\t} else { // create combined quote since it didn't exist\r\n\t\t\t\t\t\t$intlquotes[$quote['id']] = $quote;\r\n\t\t\t\t\t\t$intlquotes[$quote['id']]['count'] = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!$error) {\r\n\t\t\t\t$methods = array();\r\n\t\t\t\t$transtypes = array();\r\n\t\t\t\tforeach ($intlquotes as $quote) {\r\n\t\t\t\t\tif ($quote['count'] != $numBoxes) continue; // skip methods that don't work for all packages\r\n\t\t\t\t\tif ((MODULE_SHIPPING_USPS_INTL_RATE == 'Internet') && $quote['onlineavail']) {\r\n\t\t\t\t\t\t$title = $quote['name'];\r\n\t\t\t\t\t\tif ($this->display_insurance && ($quote['onlineinsval'] > 0)) $title .= '<br />---' . MODULE_SHIPPING_USPS_TEXT_INSURED . '$' . (ceil($quote['onlineinsval'] * 100) / 100);\r\n\t\t\t\t\t\tif ($this->display_transit && tep_not_null($quote['transtime'])) {\r\n\t\t\t\t\t\t\t$title .= '<br />---' . MODULE_SHIPPING_USPS_TEXT_ESTIMATED . $quote['transtime'];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (MODULE_SHIPPING_USPS_HANDLING_TYPE == 'Per Shipment') {\r\n\t\t\t\t\t\t\t$cost = $quote['onlinerate'] + $this->intl_handling[$quote['id']];\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$cost = $quote['onlinerate'] + ($this->intl_handling[$quote['id']] * $numBoxes);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$methods[] = array('id' => $quote['id'],\r\n\t\t\t\t\t\t\t'title' => $title,\r\n\t\t\t\t\t\t\t'cost' => $cost);\r\n\t\t\t\t\t} elseif ($quote['retailavail']) {\r\n\t\t\t\t\t\t$title = $quote['name'];\r\n\t\t\t\t\t\tif ($this->display_insurance && ($quote['retailinsval'] > 0)) $title .= '<br />---' . MODULE_SHIPPING_USPS_TEXT_INSURED . '$' . (ceil($quote['retailinsval'] * 100) / 100);\r\n\t\t\t\t\t\tif ($this->display_transit && tep_not_null($quote['transtime'])) {\r\n\t\t\t\t\t\t\t$title .= '<br />' . MODULE_SHIPPING_USPS_TEXT_ESTIMATED . $quote['transtime'];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (MODULE_SHIPPING_USPS_HANDLING_TYPE == 'Per Shipment') {\r\n\t\t\t\t\t\t\t$cost = $quote['retailrate'] + $this->intl_handling[$quote['id']];\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$cost = $quote['retailrate'] + ($this->intl_handling[$quote['id']] * $numBoxes);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$methods[] = array('id' => $quote['id'],\r\n\t\t\t\t\t\t\t'title' => $title,\r\n\t\t\t\t\t\t\t'cost' => $cost);\r\n\t\t\t\t\t}\r\n\t\t\t\t} // end foreach $intlquotes\r\n\t\t\t\tif (empty($methods)) { // no quotes valid for all packages\r\n\t\t\t\t\t$uspsQuote = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$uspsQuote = $methods;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// if there's been a change detected, log it..\r\n\t\t\tif( sizeof($this->intl_type_change) > 0 ){\r\n\t\t\t\t$this->logTypeChange(array(\r\n\t\t\t\t\t'type' => 'International',\r\n\t\t\t\t\t'changes' => $this->intl_type_change,\r\n\t\t\t\t));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (is_array($uspsQuote)) {\r\n\t\t\tif (isset($uspsQuote['error'])) {\r\n\t\t\t\t$this->quotes = array('module' => $this->title . $shiptitle,\r\n\t\t\t\t\t'error' => $uspsQuote['error']);\r\n\t\t\t} else {\r\n\t\t\t\t$quotesort = array();\r\n\t\t\t\tforeach ($uspsQuote as $method) {\r\n\t\t\t\t\t$quotesort[$method['id']] = $method['cost'];\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif( $this->shipping_method_sort_direction == 'desc' ){\r\n\t\t\t\t\tarsort($quotesort); // sort methods by cost high to low\r\n\t\t\t\t} else {\r\n\t\t\t\t\tasort($quotesort);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$methods = array();\r\n\t\t\t\tforeach ($quotesort as $key => $cost) {\r\n\t\t\t\t\tforeach ($uspsQuote as $method) {\r\n\t\t\t\t\t\tif ($method['id'] == $key) $methods[] = $method;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$this->quotes = array('id' => $this->code,\r\n\t\t\t\t\t'module' => $this->title . $shiptitle,\r\n\t\t\t\t\t'methods' => $methods);\r\n\t\t\t\tif ($this->tax_class > 0) {\r\n\t\t\t\t\t$this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else { // quotes was empty\r\n\t\t\t$this->quotes = array('module' => $this->title . $shiptitle,\r\n\t\t\t\t'error' => MODULE_SHIPPING_USPS_TEXT_ERROR);\r\n\t\t}\r\n\t\tif (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title);\r\n\t\t\r\n// \t\tprint_r( $this->quotes );\r\n\t\t\r\n\t\treturn $this->quotes;\r\n\t}",
"public function saveShippingInfo($attributes) {\n\n $userProfile_model = $this->findByPk(Yii::app()->user->id);\n /**\n * in case when profile id is exsit thats why to take new\n * instance\n */\n if (empty($userProfile_model)) {\n $userProfile_model = new UserProfile;\n $userProfile_model->id = Yii::app()->user->id;\n }\n $userProfile_model->attributes = $attributes;\n \n $userProfile_model->save(false);\n }",
"function vendor_defined_taxonomy() {\n // The targeted product attribute taxonomy\n return 'pa_color'; \n}",
"public function saveShippingMethodAction()\n {\n parent::saveShippingMethodAction();\n if ($this->_isActive()) {\n $result = Mage::helper('core')->jsonDecode(\n $this->getResponse()->getBody()\n );\n\n $this->_addHashInfo($result);\n $this->getResponse()->setBody(\n Mage::helper('core')->jsonEncode($result)\n );\n }\n }",
"public function setAttributeByDefault() {\n $userinfo = UserProfile::model()->findByPk(Yii::app()->user->id);\n // in this case when user has set bit that\n // user want to use orignial address to 1\n \n /**\n * in this case when user has its own \n * billing address then it will be same address as shipping\n */\n if(!empty($_REQUEST['billing'])){\n $billing = UserOrderBilling::model()->findByPk($_REQUEST['billing']);\n \n $this->shipping_first_name = $billing->billing_first_name;\n $this->shipping_last_name = $billing->billing_last_name;\n $this->shipping_address1 = $billing->billing_address1;\n $this->shipping_address2 = $billing->billing_address2;\n $this->shipping_country = $billing->billing_country;\n $this->shipping_state = $billing->billing_state;\n $this->shipping_city = $billing->billing_city;\n $this->shipping_zip = $billing->billing_zip;\n $this->shipping_phone = $billing->billing_phone;\n $this->shipping_mobile = $billing->billing_mobile;\n }\n else if (isset($userinfo->is_shipping_address) && $userinfo->is_shipping_address == 1) {\n $this->shipping_first_name = $userinfo->first_name;\n $this->shipping_last_name = $userinfo->last_name;\n $this->shipping_address1 = $userinfo->address;\n $this->shipping_country = $userinfo->country;\n $this->shipping_state = $userinfo->state_province;\n $this->shipping_city = $userinfo->city;\n $this->shipping_zip = $userinfo->zip_code;\n $this->shipping_phone = $userinfo->contact_number;\n \n } else {\n $criteria = new CDbCriteria();\n $criteria->addCondition(\"user_id = \" . Yii::app()->user->id);\n $criteria->order = \"id DESC\";\n\n $user_order_shipping = UserOrderShipping::model()->find($criteria);\n\n if (!empty($user_order_shipping)) {\n $this->shipping_first_name = $user_order_shipping->shipping_first_name;\n $this->shipping_last_name = $user_order_shipping->shipping_last_name;\n $this->shipping_address1 = $user_order_shipping->shipping_address1;\n $this->shipping_address2 = $user_order_shipping->shipping_address2;\n $this->shipping_country = $user_order_shipping->shipping_country;\n $this->shipping_state = $user_order_shipping->shipping_state;\n $this->shipping_city = $user_order_shipping->shipping_city;\n $this->shipping_zip = $user_order_shipping->shipping_zip;\n $this->shipping_phone = $user_order_shipping->shipping_phone;\n $this->shipping_mobile = $user_order_shipping->shipping_mobile;\n }\n }\n $this->_states = $this->getStates();\n }",
"function process_button() {\n global $cart_cgp_ID, $HTTP_POST_VARS, $customer_id, $order, $currencies, $shipping;\n \n $aItems = array();\n $iNr = - 1;\n foreach ($order->products as $sKey => $aProduct) {\n $iNr ++;\n $aItems[$iNr]['quantity'] = $aProduct['qty'];\n $aItems[$iNr]['sku'] = $aProduct['id'];\n $aItems[$iNr]['name'] = $aProduct['name'];\n $aItems[$iNr]['price'] = round($aProduct['final_price'] * (100 + $aProduct['tax']), 0);\n $aItems[$iNr]['vat'] = round($aProduct['tax'], 0);\n $aItems[$iNr]['vat_inc'] = true;\n $aItems[$iNr]['type'] = 1;\n $iTotal += round($aItems[$iNr]['quantity'] * $aItems[$iNr]['price']);\n }\n if (! empty($order->info['shipping_cost']) && $order->info['shipping_cost'] > 0) {\n $shipping_id = $shipping['id'];\n $aShipping = explode('_', $shipping_id);\n $shipping_type = strtoupper($aShipping[0]);\n $configuration_key = 'MODULE_SHIPPING_' . $shipping_type . '_TAX_CLASS';\n $configuration_query = tep_db_query(\"select c.configuration_value from \" . TABLE_CONFIGURATION . \" c where c.configuration_key='\" . $configuration_key . \"'\");\n \n if ($configuration = tep_db_fetch_array($configuration_query)) {\n $tax_class = (int) $configuration['configuration_value'];\n }\n \n if ($tax_class > 0) {\n $aShipping_Tax_Rate = tep_get_tax_rate(MODULE_SHIPPING_FLAT_TAX_CLASS, $order->delivery['country']['id'], $order->delivery['zone_id']);\n }\n $aItems[] = array(\n 'quantity' => 1,\n 'sku' => 'SHIPPING',\n 'name' => 'Bezorgkosten',\n 'price' => round(($shipping['cost'] * (100 + $aShipping_Tax_Rate))),\n 'vat' => round($aShipping_Tax_Rate, 0),\n 'vat_inc' => true,\n 'type' => 2\n );\n $iTotal += round(($shipping['cost'] * (100 + $aShipping_Tax_Rate)));\n }\n \n $is_test = (constant(\"MODULE_PAYMENT_CGP_\" . $this->module_cgp_text . \"_MODE\") === 'Test' ? 1 : 0);\n $amount = $this->format_raw($order->info['total'], $order->info['currency']) * 100;\n \n $total_diff = round($amount - $iTotal);\n \n if ($total_diff != 0) {\n $aItems[] = array(\n 'quantity' => 1,\n 'sku' => 'item_correction',\n 'name' => 'Correction',\n 'price' => $total_diff,\n 'vat' => 0,\n 'vat_inc' => false,\n 'type' => 6\n );\n }\n \n $order_id = substr($cart_cgp_ID, strpos($cart_cgp_ID, '-') + 1);\n $sql_data_array = array(\n 'module' => $this->code,\n 'date_ordered' => 'now()',\n 'orderstr' => base64_encode(serialize($order)),\n 'customer_id' => $customer_id,\n 'is_test' => $is_test,\n 'amount' => $amount,\n 'order_id' => $order_id\n );\n tep_db_perform('CGP_orders_table', $sql_data_array);\n $last_id = tep_db_insert_id();\n $ref = time() . $order_id . \"|\" . $last_id;\n $extra = $order_id . \"|\" . $last_id;\n \n $sHashkey = \"\";\n $siteID = constant(\"MODULE_PAYMENT_CGP_\" . $this->module_cgp_text . \"_SITEID\");\n $hashKey = constant(\"MODULE_PAYMENT_CGP_\" . $this->module_cgp_text . \"_KEYCODE\");\n $language = constant(\"MODULE_PAYMENT_CGP_\" . $this->module_cgp_text . \"_LANGUAGE\");\n \n // create hash\n if ($hashKey != \"\") {\n $sHashKey = md5(($is_test == 1 ? \"TEST\" : \"\") . $siteID . $amount . $ref . $hashKey);\n }\n \n // payment option\n switch ($this->module_cgp_text) {\n case \"VISA\":\n case \"MASTERCARD\":\n case \"VPAY\":\n case \"MAESTRO\":\n case \"AMERICANEXPRESS\":\n $payment_option = tep_draw_hidden_field('option', 'creditcard');\n break;\n \n case \"IDEAL\":\n $payment_option = tep_draw_hidden_field('option', 'ideal') . tep_draw_hidden_field('suboption', $HTTP_POST_VARS['ideal_issuer_id']);\n break;\n \n case \"DIRECTEBANKING\":\n case \"SOFORTUEBERWEISUNG\":\n $payment_option = tep_draw_hidden_field('option', 'directebanking');\n break;\n \n case \"MISTERCASH\":\n $payment_option = tep_draw_hidden_field('option', 'mistercash');\n break;\n \n case \"AFTERPAY\":\n $payment_option = tep_draw_hidden_field('option', 'afterpay');\n break;\n \n case \"KLARNA\":\n $payment_option = tep_draw_hidden_field('option', 'klarna');\n break;\n \n case \"BITCOIN\":\n $payment_option = tep_draw_hidden_field('option', 'bitcoin');\n break;\n \n case \"PAYPAL\":\n $payment_option = tep_draw_hidden_field('option', 'paypal');\n break;\n \n case \"PAYSAFECARD\":\n $payment_option = tep_draw_hidden_field('option', 'paysafecard');\n break;\n \n case \"GIROPAY\":\n $payment_option = tep_draw_hidden_field('option', 'giropay');\n break;\n \n case \"BANKTRANSFER\":\n $payment_option = tep_draw_hidden_field('option', 'banktransfer');\n break;\n \n case \"DIRECTDEBIT\":\n $payment_option = tep_draw_hidden_field('option', 'directdebit');\n break;\n \n case \"PRZELEWY24\":\n $payment_option = tep_draw_hidden_field('option', 'przelewy24');\n break;\n \n case \"BILLINK\":\n $payment_option = tep_draw_hidden_field('option', 'billink');\n break;\n \n case \"IDEALQR\":\n $payment_option = tep_draw_hidden_field('option', 'idealqr');\n break;\n \n case \"PAYSAFECASH\":\n $payment_option = tep_draw_hidden_field('option', 'paysafecash');\n break;\n \n case \"GIFTCARD\":\n $payment_option = tep_draw_hidden_field('option', 'giftcard');\n break;\n\n\t case \"ONLINEUEBERWEISEN\":\n\t\t $payment_option = tep_draw_hidden_field('option', 'onlineueberweisen');\n\t\t break;\n\n\t case \"SPRAYPAY\":\n\t\t $payment_option = tep_draw_hidden_field('option', 'spraypay');\n\t\t break;\n }\n \n // generate items list\n $description = 'Order ' . $order_id;\n \n $process_button_string = tep_draw_hidden_field('siteid', $siteID) . tep_draw_hidden_field('currency', $order->info['currency']) . tep_draw_hidden_field('description', $description) . tep_draw_hidden_field('language', $language) . $payment_option . tep_draw_hidden_field('test', $is_test) . tep_draw_hidden_field('amount', $amount) . tep_draw_hidden_field('ref', $ref) . tep_draw_hidden_field('email', $order->customer['email_address']) . tep_draw_hidden_field('firstname', $order->customer['firstname']) . tep_draw_hidden_field('lastname', $order->customer['lastname']) . tep_draw_hidden_field('address', $order->customer['street_address']) . tep_draw_hidden_field('city', $order->customer['city']) . tep_draw_hidden_field('state', $order->customer['state']) . tep_draw_hidden_field('zipcode', $order->customer['postcode']) . tep_draw_hidden_field('phone', $order->customer['telephone']) . tep_draw_hidden_field('country', $order->customer['country']['iso_code_2']) . tep_draw_hidden_field('shipto_firstname', $order->delivery['firstname']) . tep_draw_hidden_field('shipto_lastname', $order->delivery['lastname']) . tep_draw_hidden_field('shipto_address', $order->delivery['street_address']) . tep_draw_hidden_field('shipto_city', $order->delivery['city']) . tep_draw_hidden_field('shipto_state', $order->delivery['state']) . tep_draw_hidden_field('shipto_zipcode', $order->delivery['postcode']) . tep_draw_hidden_field('url_success', HTTP_SERVER . DIR_WS_CATALOG . 'ext/modules/payment/cgp/cgp.php?cgp_notify=true') . tep_draw_hidden_field('url_pending', HTTP_SERVER . DIR_WS_CATALOG . 'ext/modules/payment/cgp/cgp.php?cgp_notify=true') . tep_draw_hidden_field('url_failure', HTTP_SERVER . DIR_WS_CATALOG . 'ext/modules/payment/cgp/cgp.php?cgp_notify=true') . tep_draw_hidden_field('shop_version', PROJECT_VERSION) . tep_draw_hidden_field('plugin_name', 'OsCommerce CGP') . tep_draw_hidden_field('plugin_version', $this->version) . tep_draw_hidden_field('hash', $sHashKey) . tep_draw_hidden_field('extra', $extra) . tep_draw_hidden_field('cartitems', json_encode($aItems, JSON_HEX_APOS | JSON_HEX_QUOT));\n \n return $process_button_string;\n }",
"function geneshop_add2basket($node, $type) {\n // Verification of the absence of this node in basket.\n if (_geneshop_in_basket($node->nid)) {\n drupal_set_message(t('\"@title\" is already in your basket', array('@title' => $node->title)\n ), 'warning');\n }\n else {\n global $user;\n if ($user->uid == 0 && !drupal_session_started()) {\n // Must initialize sessions for anonymous users.\n drupal_session_start();\n }\n $item = array();\n $sql =<<<SQL\n SELECT *\n FROM chado.gene\n WHERE nid = :nid\nSQL;\n $args = array(':nid' => $node->nid);\n $result = db_query($sql, $args)->fetchObject();\n $vars = get_object_vars ( $result );\n $item['title'] = $result->name;\n $item['content'] = $result->name . \"~\" . $result->coordinate . \"~\" . $result->start . \"~\" . $result->stop . \"~\" . $result->gene_family . \"~\" . $result->description;\n $item['header'] = \"Name~Chromosome~Start~End~Gene family~Description\";\n if (variable_get('geneshop_show_qty', TRUE)) {\n $item['qty'] = 1;\n }\n if (variable_get('geneshop_show_price', FALSE) && ($price = _geneshop_get_price($node))) {\n if ($price <= 0 || !is_numeric($price)\n ) {\n drupal_set_message(t('Sorry, but this product currently unavailable\n for ordering'), 'warning');\n $item = FALSE;\n }\n else {\n if (!isset($_SESSION['basket']['currency'])) {\n $_SESSION['basket']['currency'] = variable_get('geneshop_price_suffix', '');\n }\n if (!isset($_SESSION['basket']['total_sum'])) {\n $_SESSION['basket']['total_sum'] = 0;\n }\n $_SESSION['basket']['total_sum'] += $price;\n $item['price'] = $_SESSION['basket']['store'][$node->nid]['unit_price'] = $price;\n }\n }\n if ($item) {\n $_SESSION['basket']['items'][$node->nid] = $item;\n /*drupal_set_message(t(\"'@title' added in your basket\", array('@title' => $node->title)));*/\n }\n }\n if ($type == 'ajax') {\n $basket_block = geneshop_block_content();\n $commands = array();\n $commands[] = ajax_command_replace(NULL, geneshop_add2basket_link($node->nid));\n $commands[] = ajax_command_replace('#geneshop-ajax-block-content', render($basket_block));\n $output = array('#type' => 'ajax', '#commands' => $commands);\n ajax_deliver($output);\n }\n else {\n // drupal_goto();\n }\n}",
"function create_post_type_gon_products_premium() {\n register_post_type( 'gon_products_premium',\n array(\n 'labels' => array(\n 'name' => __( 'Products' ),\n 'singular_name' => __( 'Product' )\n ),\n 'public' => true,\n 'has_archive' => true,\n\t 'menu_position' => 10,\n\t 'capability_type' => 'post',\n\t 'supports' => array('title', 'editor','page-attributes','thumbnail'),\n\t 'rewrite' => array( 'slug' => 'products' )\n )\n );\n \n \t//add product-type tax\n \n\tregister_taxonomy(\n\t\t'featured_product_type',\n\t\t'gon_products_premium',\n\t\tarray(\n\t\t\t'label' => __( 'Product Categories' ),\n\t\t\t'rewrite' => array( 'slug' => 'product-type' ),\n\t\t\t'hierarchical' => true,\n\t\t)\n\t);\n}",
"public function shipping_tab() {\n global $wpdb, $post;\n\n $vendor_id = $post->post_author;\n\n $shipping_zone = $wpdb->get_results(\n $wpdb->prepare(\n \"SELECT locations.zone_id, locations.seller_id, locations.location_type as vendor_location_type, locations.location_code as vendor_location_code, wc_zones.location_code, wc_zones.location_type FROM {$wpdb->prefix}dokan_shipping_zone_locations as locations INNER JOIN {$wpdb->prefix}woocommerce_shipping_zone_locations as wc_zones ON locations.zone_id = wc_zones.zone_id INNER JOIN {$wpdb->prefix}dokan_shipping_zone_methods as dokan_methods ON dokan_methods.zone_id = locations.zone_id AND dokan_methods.seller_id = locations.seller_id WHERE locations.seller_id =%d AND locations.location_type != 'postcode' ORDER BY wc_zones.zone_id ASC\", $vendor_id\n ), ARRAY_A\n );\n\n $_overwrite_shipping = get_post_meta( $post->ID, '_overwrite_shipping', true );\n $dps_processing = get_user_meta( $vendor_id, '_dps_pt', true );\n $from = get_user_meta( $vendor_id, '_dps_form_location', true );\n $dps_country_rates = get_user_meta( $vendor_id, '_dps_country_rates', true );\n $shipping_policy = get_user_meta( $vendor_id, '_dps_ship_policy', true );\n $refund_policy = get_user_meta( $vendor_id, '_dps_refund_policy', true );\n $product_processing_time = get_post_meta( $post->ID, '_dps_processing_time', true );\n $processing_time = $dps_processing;\n\n if ( 'yes' === $_overwrite_shipping ) {\n $processing_time = ( $product_processing_time ) ? $product_processing_time : $dps_processing;\n }\n\n $country_obj = new WC_Countries();\n $countries = $country_obj->countries;\n $states = $country_obj->states;\n\n $shipping_countries = '';\n $shipping_states = '';\n $location_code = '';\n $check_countries = array();\n $check_states = array();\n\n if ( $shipping_zone ) {\n foreach ( $shipping_zone as $zone ) {\n $location_code = $zone['vendor_location_code'];\n\n if ( $zone['vendor_location_type'] === 'state' ) {\n $location_codes = explode( ':', $location_code );\n $country_code = isset( $location_codes[0] ) ? $location_codes[0] : '';\n $state_code = isset( $location_codes[1] ) ? $location_codes[1] : '';\n\n if ( isset( $states[ $country_code ][ $state_code ] ) && isset( $countries[ $country_code ] ) && ! in_array( $states[ $country_code ][ $state_code ], $check_states, true ) ) {\n $get_state_name = $states[ $country_code ][ $state_code ];\n\n $check_states[ $get_state_name ] = $get_state_name;\n $shipping_states .= $get_state_name . ' (' . $countries[ $country_code ] . '), ';\n }\n }\n\n if ( $zone['vendor_location_type'] === 'country' && $countries[ $location_code ] && ! in_array( $countries[ $location_code ], $check_countries, true ) ) {\n $location_code = $countries[ $location_code ];\n $check_countries[ $location_code ] = $location_code;\n $shipping_countries .= $location_code . ', ';\n }\n }\n }\n ?>\n\n <?php if ( $shipping_countries ) { ?>\n <p>\n <?php esc_html_e( 'Shipping Countries', 'dokan' ); ?>:\n <strong><?php echo rtrim( $shipping_countries, ', ' ); ?></strong>\n </p>\n <hr>\n <?php } ?>\n\n <?php if ( $shipping_states ) { ?>\n <p>\n <?php esc_html_e( 'Shipping States', 'dokan' ); ?>:\n <strong><?php echo rtrim( $shipping_states, ', ' ); ?></strong>\n </p>\n <hr>\n <?php } ?>\n\n <?php if ( $processing_time ) { ?>\n <p>\n <strong>\n <?php esc_html_e( 'Ready to ship in', 'dokan' ); ?> <?php echo dokan_get_processing_time_value( $processing_time ); ?>\n\n <?php\n if ( $from ) {\n echo __( 'from', 'dokan' ) . ' ' . $countries[ $from ];\n }\n ?>\n </strong>\n </p>\n <hr>\n <?php } ?>\n\n <?php if ( $shipping_policy ) { ?>\n <p> </p>\n <strong><?php esc_html_e( 'Shipping Policy', 'dokan' ); ?></strong>\n <hr>\n <?php echo wpautop( $shipping_policy ); ?>\n <?php } ?>\n\n <?php if ( $refund_policy ) { ?>\n <hr>\n <p> </p>\n <strong><?php esc_html_e( 'Refund Policy', 'dokan' ); ?></strong>\n <hr>\n <?php echo wpautop( $refund_policy ); ?>\n <?php } ?>\n <?php\n }",
"public function createShippingMethod($data) {\n\t\t$this->db->query(\"INSERT INTO \" . DB_PREFIX . \"ms_shipping_method () VALUES()\");\n\t\t$shipping_method_id = $this->db->getLastId();\n\t\t\n\t\tforeach ($data['description'] as $language_id => $value) {\n\t\t\t$this->db->query(\"\n\t\t\t\tINSERT INTO \" . DB_PREFIX . \"ms_shipping_method_description \n\t\t\t\tSET shipping_method_id = '\" . (int)$shipping_method_id . \"', \n\t\t\t\t\tlanguage_id = '\" . (int)$language_id . \"', \n\t\t\t\t\tname = '\" . $this->db->escape($value['name']) . \"', \n\t\t\t\t\tdescription = '\" . $this->db->escape($value['description']) . \"'\");\n\t\t}\n\t}",
"public function register_fundraiser_product_type()\n {\n // This is kind of dumb but neccessary. WooCommerce doesn't want\n // to load namespaced classes so we can't depend on our Autoloader.\n require_once( __DIR__ . '/Fundraisers/FundraiserProduct.php' );\n }",
"public function addAttributes($post_id)\n\t{\n\t\t$attr = 'custom';\n\t\t\n\t\twp_set_object_terms($post_id, '0', $attr);\n\n $thedata[sanitize_title($attr)] = array(\n \t'name' => wc_clean($attr),\n 'value' => '0',\n 'postion' => '0',\n 'is_visible' => '0',\n 'is_variation' => '1',\n 'is_taxonomy' => '1'\n );\n \n\t\tupdate_post_meta($post_id, '_product_attributes', $thedata);\n\t\t\t\t\t\t\n\t}",
"function storefront_free_shipping()\n {\n ?>\n <span class=\"free-shipping\">Free shipping worldwide</span>\n <?php\n }",
"public function getProdCategoryShipping()\n {\n return $this->prod_category_shipping;\n }",
"public function addProduct($product,$producttype)\n {\n\t\t\t\t\t//save data from parsed inputstring to array\n\t\t\t\t\t$productname=$product->getName();\n\t\t\t\t\t//$quotes=$this->main->pricelistdata->getQuoteArray($productname);\n\t\t\t\t\t$this->items[$productname]=array(\n\t\t\t\t\t\t'name'=>$productname,\n\t\t\t\t\t\t'description'=>$product->getDescription(),\n\t\t\t\t\t\t'producttypename'=>$product->getProducttype()->getPath(),\n\t\t\t\t\t\t//'producttype'=>$product->getProducttype(),\n\t\t\t\t\t\t'category1'=>$product->getCategory1(),\n\t\t\t\t\t\t'category2'=>$product->getCategory2(),\n\t\t\t\t\t\t'category3'=>$product->getCategory3(),\n\t\t\t\t\t\t'category4'=>$product->getCategory4(),\n\t\t\t\t\t\t'category5'=>$product->getCategory5(),\n\t\t\t\t\t\t'category6'=>$product->getCategory6(),\n\t\t\t\t\t\t'category7'=>$product->getCategory7(),\n\t\t\t\t\t\t'category8'=>$product->getCategory8(),\n\t\t\t\t\t\t'category9'=>$product->getCategory9(),\n\t\t\t\t\t\t'category10'=>$product->getCategory10(),\n\t\t\t\t\t\t'object'=>$product,\n\t\t\t\t\t\t'producttype'=>$producttype,\n\t\t\t\t\t\t);\n }",
"public function testUpdateExternalShipmentCustomFields()\n {\n }",
"public function getShipType()\n {\n return $this->ShipType;\n }",
"public function getShipType()\n {\n return $this->ShipType;\n }",
"public function createnewproduct()\n {\n Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);\n $product = Mage::getModel('catalog/product');\n $websiteId = Mage::app()->getWebsite('base')->getId();\n $storeId = Mage::app()->getStore('default')->getId();\n\n //Set SKU dynamically over here\n $collection = Mage::getModel('catalog/product')\n ->getCollection()\n ->addAttributeToSort('created_at', 'desc');\n $collection->getSelect()->limit(1);\n $latestItemId = $collection->getLastItem()->getId();\n if($latestItemId) {\n $nextProid = $latestItemId + 1;\n } else {\n $nextProid = 1;\n }\n $SampleSKU = 'titechPro'.$nextProid;\n\n try {\n $product\n ->setStoreId($storeId) //you can set data in store scope\n ->setWebsiteIds(array($websiteId)) //website ID the product is assigned to, as an array\n ->setAttributeSetId(4) //ID of a attribute set named 'default'\n ->setTypeId('simple') //product type\n ->setCreatedAt(strtotime('now')) //product creation time\n ->setUpdatedAt(strtotime('now')) //product update time\n ->setSku($SampleSKU) //SKU\n ->setName('Titech sample product') //product name\n ->setWeight(4.0000)\n ->setStatus(1) //product status (1 - enabled, 2 - disabled)\n ->setTaxClassId(4) //tax class (0 - none, 1 - default, 2 - taxable, 4 - shipping)\n ->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH) //catalog and search visibility\n //->setManufacturer(28) //manufacturer id\n //->setColor(24)\n //->setNewsFromDate('06/26/2014') //product set as new from\n //->setNewsToDate('06/30/2014') //product set as new to\n ->setCountryOfManufacture('IN') //country of manufacture (2-letter country code)\n ->setPrice(11.22) //price in form 11.22\n ->setCost(22.33) //price in form 11.22\n //->setSpecialPrice(00.44) //special price in form 11.22\n //->setSpecialFromDate('06/1/2014') //special price from (MM-DD-YYYY)\n //->setSpecialToDate('06/30/2014') //special price to (MM-DD-YYYY)\n ->setMsrpEnabled(1) //enable MAP\n ->setMsrpDisplayActualPriceType(1) //display actual price (1 - on gesture, 2 - in cart, 3 - before order confirmation, 4 - use config)\n ->setMsrp(99.99) //Manufacturer's Suggested Retail Price\n ->setMetaTitle('Sample meta title 2')\n ->setMetaKeyword('Sample meta keyword 2')\n ->setMetaDescription('Sample meta description 2')\n ->setDescription('This is a long description for sample product')\n ->setShortDescription('This is a short description for sample product')\n ->setMediaGallery (array('images'=>array (), 'values'=>array ())) //media gallery initialization\n ->addImageToMediaGallery('media/catalog/product/ti/ti_logo.png', array('image','thumbnail','small_image'), false, false) //assigning image, thumb and small image to media gallery\n ->setStockData(array(\n 'use_config_manage_stock' => 0, //'Use config settings' checkbox\n 'manage_stock'=>1, //manage stock\n 'min_sale_qty'=>1, //Minimum Qty Allowed in Shopping Cart\n 'max_sale_qty'=>2, //Maximum Qty Allowed in Shopping Cart\n 'is_in_stock' => 1, //Stock Availability\n 'qty' => 999 //qty\n )\n )\n ->setCategoryIds(array(2)); //assign product to categories - Set to Default\n\n $product->save();\n return $product->getIdBySku($SampleSKU);\n } catch(Exception $e) {\n Mage::log($e->getMessage());\n }\n }",
"public function createSimpleProduct($type,$data=[],$attribute_set_id,$sku){\n\n $data['type_id'] = $type;\n $data['attribute_set_id'] = $attribute_set_id;\n $data['sku'] = $sku;\n foreach($data['additional_attributes']['single_data'] as $item){\n $data['custom_attributes'][] = [ \"attribute_code\" => $item['key'], \"value\" => $item['value'] ];\n }\n $data['custom_attributes'][] = [ \"attribute_code\" => \"description\", \"value\" => $data['description'] ];\n $data['custom_attributes'][] = [ \"attribute_code\" => \"short_description\", \"value\" => $data['short_description'] ];\n array_push( $data['custom_attributes'] , ['attribute_code' => 'category_ids', 'value' => $data['categories']] );\n array_push( $data['custom_attributes'] , ['attribute_code' => 'url_key', 'value' => Inflector::slug($data['name'].' '.$sku)] );\n unset( $data['additional_attributes'], $data['categories'], $data['websites'], $data['description'], $data['short_description'], $data['tax_class_id'] );\n\n $result = $this->curlRequest(\"/rest/V1/products\",1,json_encode([\"product\" => $data]));\n \n return $result;\n }",
"function wcfm_wcmarketplace_order_mark_shipped() {\r\n\t\tglobal $WCFM, $WCFMu, $woocommerce, $wpdb;\r\n\t\t\r\n\t\t$user_id = apply_filters( 'wcfm_current_vendor_id', get_current_user_id() );\r\n\t\t\r\n\t\tif ( !empty( $_POST['orderid'] ) ) {\r\n\t\t\t$order_id = $_POST['orderid']; \r\n\t\t\t$order = wc_get_order( $order_id );\r\n\t\t\t$product_id = absint( $_POST['productid'] );\r\n\t\t\t$tracking_url = $_POST['tracking_url'];\r\n\t\t\t$tracking_code = $_POST['tracking_code'];\r\n $order_item_id = $_POST['orderitemid'];\r\n \r\n $tracking_url = apply_filters( 'wcfm_tracking_url', $tracking_url, $tracking_code, $order_id );\r\n \r\n if( wcfm_is_vendor() ) {\r\n \t$vendor = get_wcmp_vendor($user_id);\r\n\t\t\t\t$user_id = apply_filters('wcmp_mark_as_shipped_vendor', $user_id);\r\n\t\t\t\t$shippers = (array) get_post_meta($order_id, 'dc_pv_shipped', true);\r\n\t\t\t\t\r\n\t\t\t\tif (!in_array($user_id, $shippers)) {\r\n\t\t\t\t\t$shippers[] = $user_id;\r\n\t\t\t\t\t//$mails = WC()->mailer()->emails['WC_Email_Notify_Shipped'];\r\n\t\t\t\t\t//if (!empty($mails)) {\r\n\t\t\t\t\t\t//$customer_email = get_post_meta($order_id, '_billing_email', true);\r\n\t\t\t\t\t\t//$mails->trigger($order_id, $customer_email, $vendor->term_id, array( 'tracking_code' => $tracking_code, 'tracking_url' => $tracking_url ) );\r\n\t\t\t\t\t//}\r\n\t\t\t\t\tdo_action('wcmp_vendors_vendor_ship', $order_id, $vendor->term_id);\r\n\t\t\t\t\tarray_push($shippers, $user_id);\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t$wpdb->query(\"UPDATE {$wpdb->prefix}wcmp_vendor_orders SET shipping_status = '1' WHERE order_id = $order_id and vendor_id = $user_id and order_item_id = $order_item_id\");\r\n\t\t\t\t$shop_name = $WCFM->wcfm_vendor_support->wcfm_get_vendor_store_by_vendor( absint($user_id) );\r\n\t\t\t\t$wcfm_messages = sprintf( __( 'Vendor <b>%s</b> has shipped <b>%s</b> to customer.<br/>Tracking Code : %s <br/>Tracking URL : <a class=\"wcfm_dashboard_item_title\" target=\"_blank\" href=\"%s\">%s</a>', 'wc-frontend-manager-ultimate' ), $shop_name, get_the_title( $product_id ), $tracking_code, $tracking_url, $tracking_url );\r\n \t$WCFM->wcfm_notification->wcfm_send_direct_message( $user_id, 0, 0, 1, $wcfm_messages, 'shipment_tracking' );\r\n \t$comment_id = $order->add_order_note( $wcfm_messages, '1');\r\n\t\t\t\tadd_comment_meta( $comment_id, '_vendor_id', $user_id );\r\n\t\t\t\t\r\n\t\t\t\tupdate_post_meta($order_id, 'dc_pv_shipped', $shippers);\r\n\t\t\t} else {\r\n\t\t\t\t$comment_id = $order->add_order_note( sprintf( __( 'Product <b>%s</b> has been shipped to customer.<br/>Tracking Code : %s <br/>Tracking URL : <a href=\"%s\">%s</a>', 'wc-frontend-manager-ultimate' ), get_the_title( $product_id ), $tracking_code, $tracking_url, $tracking_url ), '1');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Update Shipping Tracking Info\r\n\t\t\t$this->updateShippingTrackingInfo( $order_id, $order_item_id, $tracking_code, $tracking_url, $product_id );\r\n\t\t\t\r\n\t\t\tdo_action( 'wcfm_after_order_mark_shipped', $order_id, $order_item_id, $tracking_code, $tracking_url, $product_id );\r\n\t\t}\r\n\t\tdie;\r\n\t}",
"public function setShippingServiceName($name){\n $this->shippingServiceName = (string) $name;\n }",
"private function _addShippingElement($order)\n {\n $shippingAddress = $order->addChild('shippingAddress');\n $this->_addAddressElement(\n $shippingAddress,\n $this->shippingAddress['firstName'],\n $this->shippingAddress['lastName'],\n $this->shippingAddress['street'],\n $this->shippingAddress['postalCode'],\n $this->shippingAddress['city'],\n $this->shippingAddress['countryCode']\n );\n }",
"public function setShippingMethod(ShippingMethodInterface $shipping_method);",
"public function saveShippingAction()\n {\n if (!$this->_isActive()) {\n parent::saveShippingAction();\n return;\n }\n\n if ($this->_expireAjax()) {\n return;\n }\n if ($this->getRequest()->isPost()) {\n $data = $this->getRequest()->getPost('shipping', array());\n $customerAddressId = $this->getRequest()->getPost('shipping_address_id', false);\n $result = $this->getOnepage()->saveShipping($data, $customerAddressId);\n\n $this->_addHashInfo($result);\n $this->getResponse()->setBody(\n Mage::helper('core')->jsonEncode($result)\n );\n }\n }",
"function getShippingChoicesList() {\n\t\tApp::import('Model', 'CartsProduct');\n\t\t$this->CartsProduct = &new CartsProduct;\n\t\t$cart_stats = $this->CartsProduct->getStats($this->CartsProduct->Cart->get_id());\n\n\t\t// pokud nesplnuju podminky pro dopravy doporucenym psanim, zakazu si tyto zpusoby dopravy vykreslit zakaznikovi\n\t\t$conditions = array();\n\t\tif (!$this->isRecommendedLetterPossible()) {\n\t\t\t$conditions = array('Shipping.id NOT IN (' . implode(',', $this->Shipping->getRecommendedLetterShippingIds()) . ')');\n\t\t}\n\n\t\t$shipping_choices = $this->Shipping->find('all', array(\n\t\t\t'conditions' => $conditions,\n\t\t\t'contain' => array(),\n\t\t\t'fields' => array('id', 'name', 'price', 'free'),\n\t\t\t'order' => array('Shipping.order' => 'asc')\n\t\t));\n\t\t\n\t\t// pokud mam v kosiku produkty, definovane v Cart->free_shipping_products v dostatecnem mnozstvi, je doprava zdarma\n\t\tApp::import('Model', 'Cart');\n\t\t$this->Cart = &new Cart;\n\t\tif ($this->Cart->isFreeShipping()) {\n\t\t\t// udelam to tak, ze nastavim hodnotu kosiku na strasne moc a tim padem budu mit v kosiku vzdycky vic, nez je\n\t\t\t// minimalni hodnota kosiku pro dopravu zdarma\n\t\t\t$cart_stats['total_price'] = 99999;\n\t\t}\n\n\t\t// v selectu chci mit, kolik stoji doprava\n\t\tforeach ($shipping_choices as $shipping_choice) {\n\t\t\t$shipping_item = $shipping_choice['Shipping']['name'] . ' - ' . $shipping_choice['Shipping']['price'] . ' Kč';\n\t\t\tif ($cart_stats['total_price'] > $shipping_choice['Shipping']['free']) {\n\t\t\t\t$shipping_item = $shipping_choice['Shipping']['name'] . ' - zdarma';\n\t\t\t}\n\t\t\t$shipping_choices_list[$shipping_choice['Shipping']['id']] = $shipping_item;\n\t\t}\n\t\t\n\t\treturn $shipping_choices_list;\n\t}",
"function add_CDEK_shipping_method($methods)\n {\n $methods['CDEK_shipping_method'] = 'WC_CDEK_Shipping_Method';\n return $methods;\n }",
"public function save_shippingAction() {\r\n\t\t$shipping_method = $this->getRequest()->getPost('shipping_method', '');\r\n\t\t$payment_method = $this->getRequest()->getPost('payment_method', false);\r\n\t\t$old_shipping_method = $this->getOnepage()->getQuote()->getShippingAddress()->getShippingMethod();\r\n\t\t$billing_data = $this->getRequest()->getPost('billing', false);\r\n\t\tif($billing_data['country_id']){\r\n\t\t\tMage::getModel('checkout/session')->getQuote()->getBillingAddress()->setData('country_id',$billing_data['country_id'])->save();\r\n\t\t}\r\n\t\t// if ($shipping_method && $shipping_method != '' && $shipping_method != $old_shipping_method) {\r\n\t\t\tMage::helper('onestepcheckout')->saveShippingMethod($shipping_method);\r\n\t\t\t$this->getOnepage()->saveShippingMethod($shipping_method);\r\n\t\t// }\r\n\t\t\r\n\t\t// if ($payment_method != '') {\r\n\t\t\ttry{\r\n\t\t\t\t$payment = $this->getRequest()->getPost('payment', array());\r\n\t\t\t\t$payment['method'] = $payment_method;\r\n\t\t\t\t$this->getOnepage()->savePayment($payment);\r\n\t\t\t\tMage::helper('onestepcheckout')->savePaymentMethod($payment);\r\n\t\t\t}\r\n\t\t\tcatch(Exception $e) {\r\n\t\t\t\t//\r\n\t\t\t}\r\n\t\t// }\r\n\t\t\r\n\t\t// $paymentHtml = $this->_getPaymentMethodsHtml();\r\n\t\t// $reviewHtml = $this->_getReviewTotalHtml();\r\n\t\t// $result = array('payment' => $paymentHtml, \r\n\t\t\t\t\t\t\t\t\t\t// 'review' => $reviewHtml);\r\n\t\t// $this->getResponse()->setBody(Zend_Json::encode($result));\r\n\t\t$this->loadLayout(false);\r\n\t\t$this->renderLayout();\r\n\t}",
"function woocommerce_register_shipping_method( $shipping_method ) {\n\tWC()->shipping->register_shipping_method( $shipping_method );\n}",
"function add_extra_field_to_checkout( $fields ) {\n\n\t$depto_args = wp_parse_args( array(\n\t\t'type' => 'select',\n\t\t'options' => array(\n\t\t\t'Seleccione' => 'Seleccione',\n\t\t\t'Francisco Morazan' => 'Francisco Morazan',\n\t\t\t'Olancho' => 'Olancho',\n\t\t\t'Valle' => 'Valle',\n\t\t),\n\t), $fields['shipping']['shipping_depto'] );\n\n\t$fields['shipping']['shipping_depto'] = $depto_args;\n\t$fields['billing']['billing_depto'] = $depto_args; \n\t$fields['billing']['billing_depto']['priority'] = 80;\n\n\treturn $fields;\n\n}",
"function init() {\r\n\t\t$this->instance_form_fields = include( 'settings/settings-custom-shipping.php' );\r\n\t\t$this->title = $this->get_option( 'title' );\r\n\t\t$this->express_title\t\t\t\t\t\t=\t$this->get_option( 'express_title' );\r\n\t\t$this->conditional_cost\t\t\t\t\t= $this->get_option( 'conditional_cost' );\r\n\t\t$this->express_delivery_status\t= $this->get_option( 'express_delivery_status' );\r\n\t\t$this->express_delivery_price\t\t= $this->get_option( 'express_delivery_price' );\r\n\r\n\t\t$weight_steps_arr = explode( ', ', $this->weight_steps );\r\n\r\n\t\tforeach ( $weight_steps_arr as $weight_step ) {\r\n\t\t\t$this->{'price_below_'.\"{$weight_step}\".'_kg'} = $this->get_option( 'price_below_'.$weight_step.'_kg', 0 );\r\n\r\n\t\t\t$this->weight_based_cost[$weight_step] = $this->get_option( 'price_below_'.$weight_step.'_kg', 0 );\r\n\t\t}\r\n\t}",
"public function shippingMethod()\n {\n return $this->belongsTo(ShippingMethod::class);\n }",
"public function shippingMethod()\n {\n return $this->belongsTo('App\\ShippingMethod');\n }",
"public function setShippingAddressAction()\n {\n $data = $this->Request()->getParams();\n //we need to set this because of a bug in the shopware models\n if (!isset($data['stateId'])) {\n $data['stateId'] = 0;\n }\n\n /** @var Shopware\\Models\\Customer\\Customer $customerModel */\n $customerModel = Shopware()->Models()->find('Shopware\\Models\\Customer\\Customer', $data['userId']);\n\n if ($shippingAddressModel = $customerModel->getShipping()) {\n $shippingAddressModel->fromArray($data);\n\n Shopware()->Models()->persist($shippingAddressModel);\n Shopware()->Models()->flush();\n\n $this->view->assign(['shippingAddressId' => $shippingAddressModel->getId()]);\n }\n }",
"public function createAttributes($pid,&$item,$attmap,$isnew)\n\t{\n\t\t/**\n\t\t * get all store ids\n\t\t */\n\t\t$this->_extra_attrs=array();\n\t\t/* now is the interesring part */\n\t\t/* iterate on attribute backend type index */\n\t\tforeach($attmap as $tp=>$a)\n\t\t{\n\t\t\t/* for static types, do not insert into attribute tables */\n\t\t\tif($tp==\"static\")\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//table name for backend type data\n\t\t\t$cpet=$this->tablename(\"catalog_product_entity_$tp\");\n\t\t\t//data table for inserts\n\t\t\t$data=array();\n\t\t\t//inserts to perform on backend type eav\n\t\t\t$inserts=array();\n\t\t\t//deletes to perform on backend type eav\n\t\t\t$deletes=array();\n\n\t\t\t//use reflection to find special handlers\n\t\t\t$typehandler=\"handle\".ucfirst($tp).\"Attribute\";\n\t\t\t//iterate on all attribute descriptions for the given backend type\n\t\t\tforeach($a[\"data\"] as $attrdesc)\n\t\t\t{\n\t\t\t\t//get attribute id\n\t\t\t\t$attid=$attrdesc[\"attribute_id\"];\n\t\t\t\t//get attribute value in the item to insert based on code\n\t\t\t\t$atthandler=\"handle\".ucfirst($attrdesc[\"attribute_code\"]).\"Attribute\";\n\t\t\t\t$attrcode=$attrdesc[\"attribute_code\"];\n\t\t\t\t//if the attribute code is no more in item (plugins may have come into the way), continue\n\t\t\t\tif(!in_array($attrcode,array_keys($item)))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t//get the item value\n\t\t\t\t$ivalue=$item[$attrcode];\n\t\t\t\t//get item store id for the current attribute\n\t\t\t\t$store_ids=$this->getItemStoreIds($item,$attrdesc[\"is_global\"]);\n\n\n\t\t\t\t//do not handle empty generic int values in create mode\n\t\t\t\tif($ivalue==\"\" && $this->mode!=\"update\" && $tp==\"int\")\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t//for all store ids\n\t\t\t\tforeach($store_ids as $store_id)\n\t\t\t\t{\n\n\t\t\t\t\t//base output value to be inserted = base source value\n\t\t\t\t\t$ovalue=$ivalue;\n\t\t\t\t\t//check for attribute handlers for current attribute\n\t\t\t\t\tforeach($this->_attributehandlers as $match=>$ah)\n\t\t\t\t\t{\n\t\t\t\t\t\t$matchinfo=explode(\":\",$match);\n\t\t\t\t\t\t$mtype=$matchinfo[0];\n\t\t\t\t\t\t$mtest=$matchinfo[1];\n\t\t\t\t\t\tunset($matchinfo);\n\t\t\t\t\t\tunset($hvalue);\n\t\t\t\t\t\tif(preg_match(\"/$mtest/\",$attrdesc[$mtype]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//if there is a specific handler for attribute, use it\n\t\t\t\t\t\t\tif(method_exists($ah,$atthandler))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$hvalue=$ah->$atthandler($pid,$item,$store_id,$attrcode,$attrdesc,$ivalue);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t//use generic type attribute\n\t\t\t\t\t\t\tif(method_exists($ah,$typehandler))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$hvalue=$ah->$typehandler($pid,$item,$store_id,$attrcode,$attrdesc,$ivalue);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//if handlers returned a value that is not \"__MAGMI_UNHANDLED__\" , we have our output value\n\t\t\t\t\t\t\tif(isset($hvalue) && $hvalue!=\"__MAGMI_UNHANDLED__\")\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$ovalue=$hvalue;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//if __MAGMI_UNHANDLED__ ,don't insert anything\n\t\t\t\t\tif($ovalue==\"__MAGMI_UNHANDLED__\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$ovalue=false;\n\t\t\t\t\t}\n\t\t\t\t\t//if handled value is a \"DELETE\"\n\t\t\t\t\tif($ovalue==\"__MAGMI_DELETE__\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$deletes[]=$attid;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t//if we have something to do with this value\n\t\t\t\t\tif($ovalue!==false)\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$data[]=$this->prod_etype;\n\t\t\t\t\t\t$data[]=$attid;\n\t\t\t\t\t\t$data[]=$store_id;\n\t\t\t\t\t\t$data[]=$pid;\n\t\t\t\t\t\t$data[]=$ovalue;\n\t\t\t\t\t\t$insstr=\"(?,?,?,?,?)\";\n\t\t\t\t\t\t$inserts[]=$insstr;\n\t\t\t\t\t}\n\n\t\t\t\t\t//if one of the store in the list is admin\n\t\t\t\t\tif($store_id==0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$sids=$store_ids;\n\t\t\t\t\t\t//remove all values bound to the other stores for this attribute,so that they default to \"use admin value\"\n\t\t\t\t\t\tarray_shift($sids);\n\t\t\t\t\t\tif(count($sids)>0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$sidlist=implode(\",\",$sids);\n\t\t\t\t\t\t\t$ddata=array($this->prod_etype,$attid,$pid);\n\t\t\t\t\t\t\t$sql=\"DELETE FROM $cpet WHERE entity_type_id=? AND attribute_id=? AND store_id IN ($sidlist) AND entity_id=?\";\n\t\t\t\t\t\t\t$this->delete($sql,$ddata);\n\t\t\t\t\t\t\tunset($ddata);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tunset($sids);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\n\n\t\t\tif(!empty($inserts))\n\t\t\t{\n\t\t\t\t//now perform insert for all values of the the current backend type in one\n\t\t\t\t//single insert\n\t\t\t\t$sql=\"INSERT INTO $cpet\n\t\t\t(`entity_type_id`, `attribute_id`, `store_id`, `entity_id`, `value`)\n\t\t\tVALUES \";\n\t\t\t\t$sql.=implode(\",\",$inserts);\n\t\t\t\t//this one taken from mysql log analysis of magento import\n\t\t\t\t//smart one :)\n\t\t\t\t$sql.=\" ON DUPLICATE KEY UPDATE `value`=VALUES(`value`)\";\n\t\t\t\t$this->insert($sql,$data);\n\t\t\t}\n\n\t\t\tif(!empty($deletes))\n\t\t\t{\n\t\t\t\t$sidlist=implode(\",\",$store_ids);\n\t\t\t\t$attidlist=implode(\",\",$deletes);\n\t\t\t\t$sql=\"DELETE FROM $cpet WHERE entity_type_id=? AND attribute_id IN ($attidlist) AND store_id IN ($sidlist) AND entity_id=?\";\n\t\t\t\t$this->delete($sql,array($this->prod_etype,$pid));\n\t\t\t}\n\n\t\t\tif(empty($deletes) && empty($inserts) && $isnew)\n\t\t\t{\n\t\t\t\tif(!$this->_same)\n\t\t\t\t{\n\t\t\t\t\t$this->log(\"No $tp Attributes created for sku \".$item[\"sku\"],\"warning\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tunset($store_ids);\n\t\t\tunset($data);\n\t\t\tunset($inserts);\n\t\t\tunset($deletes);\n\t\t}\n\t\treturn $this->_extra_attrs;\n\t}"
] | [
"0.6803826",
"0.6436384",
"0.63552606",
"0.6342926",
"0.6214153",
"0.6146409",
"0.5982885",
"0.5975315",
"0.59531474",
"0.59239525",
"0.5897245",
"0.588454",
"0.58802414",
"0.5836447",
"0.5820645",
"0.5786976",
"0.5760866",
"0.5731677",
"0.57273954",
"0.5708754",
"0.568646",
"0.5679216",
"0.5666545",
"0.56637925",
"0.5642141",
"0.56403327",
"0.5620844",
"0.5619059",
"0.5617637",
"0.560377",
"0.55840015",
"0.55756867",
"0.5566141",
"0.55413914",
"0.552981",
"0.5510891",
"0.5493253",
"0.54877245",
"0.5476388",
"0.5474823",
"0.5472687",
"0.54581636",
"0.5456242",
"0.5450551",
"0.5448953",
"0.5446384",
"0.54423356",
"0.5434525",
"0.5433011",
"0.54058677",
"0.5404431",
"0.5392123",
"0.5389242",
"0.5387364",
"0.53854716",
"0.5371441",
"0.5368928",
"0.5364852",
"0.53581107",
"0.5349399",
"0.53449047",
"0.5342097",
"0.5332705",
"0.5332298",
"0.5315789",
"0.53073907",
"0.5304076",
"0.5296466",
"0.5288187",
"0.52863497",
"0.5284852",
"0.528462",
"0.5281483",
"0.52643365",
"0.5261769",
"0.52574205",
"0.5241513",
"0.52361536",
"0.5230847",
"0.5227638",
"0.52276284",
"0.5225154",
"0.5225154",
"0.5220057",
"0.52179945",
"0.52137005",
"0.5212524",
"0.521214",
"0.51998425",
"0.51948905",
"0.5191672",
"0.51911676",
"0.51811236",
"0.5176107",
"0.5175339",
"0.516994",
"0.5169186",
"0.5167357",
"0.5167056",
"0.5164092"
] | 0.7075091 | 0 |
Get a string including indispensable info: Use this function to add space into position str: | function addSpace($str){
$s = $str[0];
for($i=1;$i<strlen($str);$i++){
if(ctype_upper($str[$i]) == true){
$s.= ' '.$str[$i];
}
else{
$s.= $str[$i];
}
}
return $s;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function spaces() {\n return str_pad('', $this->currentIndention, ' ', STR_PAD_LEFT);\n }",
"public function indentStr($n = 0)\n\t{\n\t\treturn \"\";\n\t}",
"public function getCurrentPosition() {\n return implode(' ', array($this->x, $this->y, $this->facing));\n }",
"public function getStringOffset() {}",
"public static function getSampleString(): string\n {\n return \" some string with new \\n\\n lines and white spaces \\n\\n\";\n }",
"public static function getSampleString()\n {\n return \" some string with new \\n\\n lines and white spaces \\n\\n\";\n }",
"public function getAlternateSpace() {}",
"function _fixed($string,$len=17) {\r\n\r\n $l=strlen($string);\r\n if ($l<$len) {\r\n $iz=str_repeat(\" \",($len-$l)/2);\r\n if ($l%2!=0)\r\n $de=str_repeat(\" \",(($len-$l)/2)-1);\r\n else\r\n $de=$iz;\r\n }\r\n return \"${iz}$string{$de}\";\r\n}",
"function _rfixed($string,$len=25) {\r\n\r\n $l=strlen($string);\r\n if ($l<$len) \r\n $de=str_repeat(\" \",($len-$l));\r\n \r\n return \"$string{$de}\";\r\n}",
"function shortUpdate($text) {\r\n $chars = 90; \r\n\r\n $text = $text.\" \"; \r\n $text = substr($text,0,$chars); \r\n $text = substr($text,0,strrpos($text,' '));\r\n\r\n if ($chars > 90) {\r\n \t$text = $text.\"...\";\r\n }\r\n else {\r\n \t$text = $text.\"\";\r\n }\r\n\r\n \r\n\r\n return $text; \r\n\r\n}",
"function printID()\n {\n echo str_replace(' ', '', $this->position).substr($this->name, 0,2);;\n }",
"private function getErrorPosition(): string\n {\n if ($this->displayErrorLine) {\n $pieces = preg_split('/\\\\r\\\\n|\\\\n\\\\r|\\\\n|\\\\r/', substr($this->data, 0, $this->position));\n $line = count($pieces);\n $column = strlen(end($pieces));\n\n return \" at line {$line} column {$column}\";\n }\n\n return \" at byte {$this->position}\";\n }",
"function shortUpdate($text) {\n $chars = 90; \n\n $text = $text.\" \"; \n $text = substr($text,0,$chars); \n $text = substr($text,0,strrpos($text,' '));\n\n if ($chars > 90) {\n \t$text = $text.\"...\";\n }\n else {\n \t$text = $text.\"\";\n }\n\n\n return $text; \n\n}",
"function shortUpdate($text) {\n $chars = 90; \n\n $text = $text.\" \"; \n $text = substr($text,0,$chars); \n $text = substr($text,0,strrpos($text,' '));\n\n if ($chars > 90) {\n \t$text = $text.\"...\";\n }\n else {\n \t$text = $text.\"\";\n }\n\n\n return $text; \n\n}",
"public function getSpaceSeparated()\n {\n return $this->format('%s %s %s');\n }",
"public function getCharSpacing() {}",
"function shortText($text, $chars =150){\n $text = $text.\" \";\n $text = substr($text,0,$chars);\n $text = substr($text,0,strrpos($text,' '));\n return $text;\n}",
"public static function spaced()\n {\n return self::generate(' ');\n }",
"function __toString()\r\n {\r\n $string = '';\r\n\t$i=0;\r\n foreach ($this->pieces as $column) {\r\n\r\n foreach ($column as $piece) {\r\n if ($piece === '') {\r\n $string .= ('-');\r\n } else {\r\n $string .= $piece;\r\n }\r\n\t\t$i++;\r\n\t\tif($i%3==0)\r\n\t\t{\r\n\t\t\t$string .= \"\\n\";\r\n\t\t}\r\n }\r\n\r\n }\r\n\r\n return $string;\r\n }",
"public function current(): string\n {\n // Clamp the position to 0 so we don't go 'behind'' the first character\n $position = max(0, $this->position - 1);\n\n return substr($this->string, $position, 1);\n }",
"public function getPosition(): string;",
"public static function widont($str){\n $str = rtrim($str);\n $space = strrpos($str, ' ');\n\n if ($space !== FALSE){\n $str = substr($str, 0, $space).' '.substr($str, $space + 1);\n }\n\n return $str;\n }",
"function str($s){\n return tokens(\n function($a){ return show($a); },\n function($pos, $str){ return updatePosString($pos, $str); },\n $s);\n}",
"function getPosition() {\n return sprintf(\"%010d\", $this->_position);\n }",
"function printNicely($str) \r\n{\r\n\tprint '<div style=\"font: normal 13px Courier New !important; border: 1px solid #CCC; background-color: #EEE; padding: 10px; margin: 10px; text-align: left !important;\">';\r\n\tprint '<pre>' . trim($str) . '</pre>';\r\n\tprint '</div>';\r\n}",
"function get_excerpt($str, $startPos = 0, $maxLength = 100) {\n\tif (strlen($str) > $maxLength) {\n\t\t$excerpt = substr($str, $startPos, $maxLength - 3);\n\t\t$lastSpace = strrpos($excerpt, ' ');\n\t\t$excerpt = substr($excerpt, 0, $lastSpace);\n\t\t$excerpt .= '...';\n\t} else {\n\t\t$excerpt = $str;\n\t}\n\n\treturn $excerpt;\n}",
"function __toString(): string\n {\n return $this->wordSpace->toString() . \" Tw\\n\";\n }",
"public function pretty(): string\n {\n return $this->filename . \":\" . $this->line . \":\" . $this->column;\n }",
"function renderSpaceInfo() {\n\t\treturn \"<br><b>\" . t3lib_div::_GP('title') . \"</b> \" . $GLOBALS['LANG']->getLL('information');\n\t}",
"function espace($valeur){\r\n\t$chaine = substr(\"$valeur\",0,-4).\" \".substr(\"$valeur\",4);\r\n\treturn $chaine;\r\n}",
"function snippet($text, $startPos, $endPos, $append = '…')\n{\n // strip html tags from the text\n $text = strip_formatting($text);\n\n $useMbString = extension_loaded('mbstring');\n $textLength = $useMbString ? mb_strlen($text, 'UTF-8') : strlen($text);\n\n // Calculate the start position. Set to zero if the start position is\n // null or 0, OR if the start offset is greater than the length of the\n // original text.\n $startPosOffset = $startPos - $textLength;\n $startPos = !$startPos || $startPosOffset > $textLength\n ? 0\n : ($useMbString\n ? mb_strrpos($text, ' ', $startPosOffset, 'UTF-8')\n : strrpos($text, ' ', $startPosOffset)\n );\n\n // Calculate the end position. Set to the length of the text if the\n // end position is greater than or equal to the length of the original\n // text, OR if the end offset is greater than the length of the\n // original text.\n $endPosOffset = $endPos - $textLength;\n $endPos = $endPos >= $textLength || $endPosOffset > $textLength\n ? $textLength\n : ($useMbString\n ? mb_strrpos($text, ' ', $endPosOffset, 'UTF-8')\n : strrpos($text, ' ', $endPosOffset)\n );\n\n // Set the snippet by getting its substring.\n $snippet = $useMbString\n ? mb_substr($text, $startPos, $endPos - $startPos, 'UTF-8')\n : substr($text, $startPos, $endPos - $startPos);\n\n // Return the snippet without the append string if the text's original\n // length equals to 1) the length of the snippet, i.e. when the return\n // string is identical to the passed string; OR 2) the calculated\n // end position, i.e. when the return string ends at the same point as\n // the passed string.\n $snippetLength = $useMbString ? mb_strlen($snippet, 'UTF-8') : strlen($snippet);\n return $snippetLength == $textLength || $endPos == $textLength\n ? $snippet\n : $snippet . $append;\n}",
"public function format()\n {\n return sprintf('%s %s %s', $this->x(), $this->y(), $this->z());\n }",
"function affiche_info($str) { echo '<p>'.$str.'</p>'; }",
"public function getString(){\n return \"Side: \" . $this -> side\n . \"<br> Volume: \" . $this -> getVolume()\n . \"<br> Surface: \" . $this -> getSurface();\n }",
"public function getString()\n {\n return $this->format('%s%s%s');\n }",
"function string() {\n $styles = [];\n if ($this->fg !== null) {\n $styles []= $this->fg;\n }\n\n if ($this->bg !== null) {\n $styles []= $this->bg;\n }\n\n $styles = array_merge($styles, $this->format);\n\n if (empty($styles)) {\n return $this->str;\n } else {\n $escape = \"\\e[\" . join(';', $styles) . 'm';\n return $escape . $this->str . \"\\e[\" . self::ANSI_OFF . 'm';\n }\n }",
"public static function introText($str, $len = 100) {\r\n if(mb_strlen($str, \"UTF-8\") <= $len) return $str;\r\n $str = mb_substr($str, 0, $len, \"UTF-8\");\r\n $pos = mb_strrpos($str, ' ', 'UTF-8');\r\n $str = mb_substr($str, 0, $pos, 'UTF-8');\r\n return $str.\" ...\";\r\n }",
"function get_markup() \n\t{\n\t\t$n = count($this->coor);\n\n\t\tif ($n == 0) {\n\t\t\t# Range is special case\n\t\t\treturn $this->make_position( $this->latdeg_min, \n\t\t\t\t\t\t $this->londeg_min )\n\t\t\t . \" to \"\n\t\t\t . $this->make_position( $this->latdeg_max,\n\t\t\t\t\t\t $this->londeg_max );\n\t\t} elseif ($n == 2) {\n\t\t\treturn $this->coor[0].';'.\n\t\t\t $this->coor[1];\n\n\t\t} elseif ($n == 4) {\n\t\t\treturn $this->coor[0].'° '.\n\t\t\t $this->coor[1].' '.\n\t\t\t $this->coor[2].'° '.\n\t\t\t $this->coor[3];\n\n\t\t} elseif ($n == 6) {\n\t\t\treturn $this->coor[0].'°'.\n\t\t\t $this->coor[1].'′ '.\n\t\t\t $this->coor[2].' '.\n\t\t\t $this->coor[3].'°'.\n\t\t\t $this->coor[4].'′ '.\n\t\t\t $this->coor[5];\n\n\t\t} elseif ($n == 8) {\n\t\t\treturn $this->coor[0].'°'.\n\t\t\t $this->coor[1].'′'.\n\t\t\t $this->coor[2].'″ '.\n\t\t\t $this->coor[3].' '.\n\t\t\t $this->coor[4].'°'.\n\t\t\t $this->coor[5].'′'.\n\t\t\t $this->coor[6].'″ '.\n\t\t\t $this->coor[7];\n\t\t} else {\n\t\t\treturn $this->get_error();\n\t\t}\n\t}",
"function izq($text){\r\n return \"<div align=\\\"left\\\">$text</div>\";\r\n }",
"function str_colapse($string,$length=150,$side=\"center\",$filler=\"[....]\"){\n \t\t // side= side to cut chars off, center places .. in the center.\n \t\t // filler is the strning used to indicate chopped of chars.\n\n \t\t $strlength=strlen($string);\n \t\t if($strlength>$length){\n \t\t \t \t if($side==\"right\" or $side==\"end\"){\n \t\t \t \t \t \t $tmpstring=substr($string,0,($length-strlen($filler))).$filler;\n \t\t \t \t } elseif($side==\"left\" or $side==\"begin\"){\n \t\t \t \t \t \t $tmpstring=$filler.\nsubstr($string,\n ($strlength-($length-strlen($filler))),\n ($length-strlen($filler)));\n \t\t \t \t } elseif($side==\"center\" or $side==\"middle\"){\n \t\t \t \t \t \t $firstlength=ceil(($length/100)*20);\n \t\t \t \t \t \t $tmpstring=substr($string,0,$firstlength).$filler.\nsubstr($string,\n ($strlength-($length-($firstlength+strlen($filler)))),\n ($length-($firstlength+strlen($filler))));\n \t\t \t \t }\n \t\t \t \t return $tmpstring;\n \t\t } else {\n \t\t \t \t return $string;\n \t\t }\n }",
"function clDisp($str){\r\n\techo '<pre>' . nl2br(str_replace(\"\\t\", ' ', $str)) . '</pre>';\r\n}",
"function clDisp($str){\r\n\techo '<pre>' . nl2br(str_replace(\"\\t\", ' ', $str)) . '</pre>';\r\n}",
"public function getCharacterSpacing() {}",
"function vire_espace ($t) {\n\t$chaine = \"\";\n\n\tfor ($i=0; $i < strlen($t); $i++) {\n\t\t$c = substr($t, $i, 1);\n\t\tif ($c != \" \") {\n\t\t\t$chaine .= $c;\n\t\t}\n\t}\n\treturn ($chaine);\n}",
"public function wktGenerateMultilinestring();",
"public function getStrAdditionalInfo() {\n return \"\";\n }",
"function chekString($value)\r\n{\r\n\r\n $temp = '<code style=\"font_size: 10px\">strint </code>';\r\n\r\n $temp .= \"<code style='font_size: 9px ; color:red '>\" . PHP_EOL;\r\n\r\n $temp .= \"'{$value}'\" . PHP_EOL;\r\n\r\n $temp .= \"</code>\";\r\n\r\n $temp .= '<code style=\"font_size: 10px\">' . PHP_EOL;\r\n\r\n $temp .= '(length=' . strlen($value) . ')' . PHP_EOL;\r\n\r\n $temp .= \"</code>\" . PHP_EOL;\r\n\r\n return $temp ;\r\n\r\n}",
"function formatForBot($full_name, $party, $entered_house, $constituency, $position = null, $mp_senator)\r\n\t{\r\n\t\t$formatted = $full_name . \" is a member of the \" . $party . \". Joining Parliament for the first time in \" . $entered_house . \" they are now seated as the \". $mp_senator. \" for \". $constituency. \".\";\r\n\t\t\r\n\t\tif($position != null)\r\n\t\t\t$formatted .= \" \".$position;\r\n\t\t\r\n\t\treturn $formatted;\r\n\t}",
"function descripcion_corta($articulo)\n{\n $contenido = $articulo->contenido;\n $encontrar_p = '<p>';\n $encontrar_fin_p = '</p>';\n\n $pos_p = strpos($contenido, $encontrar_p);\n $pos_fin_p = strpos($contenido, $encontrar_fin_p, $pos_p);\n $cantidad_caracteres = $pos_fin_p + 4 - $pos_p;\n\n return substr($contenido, $pos_p, $cantidad_caracteres);\n\n}",
"public function toString($indentation = 0);",
"function string_display_line( $p_string ) \r\n{\r\n\t$p_string = string_strip_hrefs( $p_string );\r\n\t$p_string = string_html_specialchars( $p_string );\r\n\t$p_string = string_restore_valid_html_tags( $p_string, /* multiline = */ false );\r\n\t\r\n\treturn $p_string;\r\n}",
"function string_no_break( $p_string ) {\r\n\tif ( strpos( $p_string, ' ' ) !== false ) {\r\n\t\treturn '<span class=\"nowrap\">' . $p_string . \"</span>\";\r\n\t} else {\r\n\t\treturn $p_string;\r\n\t}\r\n}",
"function my_spaces2nbsp($s_string)\r\n{\r\n\t$sRet=\"\";\r\n\t$sRet = str_replace(SPACE_STRING,NBSP_STRING,$s_string);\r\n\r\n \treturn $sRet;\r\n}",
"private function _indent($amount = 1)\n {\n return str_repeat(' ', $amount);\n }",
"public function full_string() {\r\n $loc_string = \"\";\r\n $loc_string .= ($this->name ? $this->name . ', ' : '');\r\n $loc_string .= ($this->address ? $this->address . ', ' : '');\r\n $loc_string .= ($this->city ? $this->city . ', ' : '');\r\n $loc_string .= ($this->state ? $this->state . ' ' : '');\r\n $loc_string .= ($this->zip ? $this->zip : '');\r\n $loc_string .= ($this->country ? ', ' . $this->country : '');\r\n return $loc_string;\r\n }",
"function get_property_pos_str($children_pos, $fill_num)\n {\n $str = '';\n $d_empty_str = $this->empty_str . ($this->is_inner_delimited ? $this->delimiter : null);\n\n// var_dump($children_pos);\n if ($children_pos) {\n foreach ($children_pos as $pos) {\n $str .= str_pad($pos, $this->pos_len, Database::$empty_char, STR_PAD_LEFT);\n if ($this->is_inner_delimited) {\n $str .= $this->delimiter;\n }\n }\n\n $c_num = count($children_pos);\n if ($c_num < $fill_num) {\n for ($i = 0, $diff = $fill_num - $c_num; $i < $diff; $i++) {\n $str .= $d_empty_str;\n }\n }\n\n } else {\n $str = str_repeat($d_empty_str, $fill_num);\n }\n\n return $str;\n }",
"function format_hspace($p_space){\n\treturn '<span style=\"margin-right:' . $p_space . '\"></span>';\n}",
"public function getIndentationString($indentation = null);",
"public static function getExcerpt(\n string $str,\n int $startPos = 0,\n int $maxLength = 100\n ): string {\n $excerpt = $str;\n $str = str_replace(' ', ' ', $str);\n if (strlen($str) > $maxLength) {\n $excerpt = substr($str, $startPos, $maxLength - 3);\n $lastSpace = strrpos($excerpt, ' ');\n $excerpt = substr($excerpt, 0, (int)$lastSpace);\n $excerpt .= '...';\n }\n\n return $excerpt;\n }",
"function string_preserve_spaces_at_bol( $p_string ) \r\n{\r\n\t$lines = explode( \"\\n\", $p_string );\r\n\t$line_count = count( $lines );\r\n\tfor ( $i = 0; $i < $line_count; $i++ ) {\r\n\t\t$count\t= 0;\r\n\t\t$prefix\t= '';\r\n\t\t\r\n\t\t$t_char = substr( $lines[$i], $count, 1 );\r\n\t\t$spaces = 0;\r\n\t\twhile ( ( $t_char == ' ' ) || ( $t_char == \"\\t\" ) ) {\r\n\t\t\tif ( $t_char == ' ' )\r\n\t\t\t\t$spaces++;\r\n\t\t\telse\r\n\t\t\t\t$spaces += 4; // 1 tab = 4 spaces, can be configurable.\r\n\t\t\t\r\n\t\t\t$count++;\r\n\t\t\t$t_char = substr( $lines[$i], $count, 1 );\r\n\t\t}\r\n\t\t\r\n\t\tfor ( $j = 0; $j < $spaces; $j++ ) {\r\n\t\t\t$prefix .= ' ';\r\n\t\t}\r\n\t\t\r\n\t\t$lines[$i] = $prefix . substr( $lines[$i], $count );\r\n\t}\r\n\treturn implode( \"\\n\", $lines );\r\n}",
"public function get_short_description()\n\t{\n\t\treturn ( strlen($this->description) > 90 ) ? substr($this->description, 0, strrpos(substr($this->description, 0, 90), ' ')) . ' (...)' : $this->description;\n\t}",
"public function getWordSpacing() {}",
"public function getWordSpacing() {}",
"public function __toString(): string\n {\n return implode(\n '\\n',\n array_map(\n function ($span) {\n return (string)$span;\n },\n $this->getArrayCopy()\n )\n );\n }",
"protected function get() {\n $c = $this->lookAhead;\n $this->lookAhead = null;\n\n if ($c === null) {\n if ($this->inputIndex < $this->inputLength) {\n $c = substr($this->input, $this->inputIndex, 1);\n $this->inputIndex += 1;\n } else {\n $c = null;\n }\n }\n\n if ($c === \"\\r\") {\n return \"\\n\";\n }\n\n if ($c === null || $c === \"\\n\" || ord($c) >= self::ORD_SPACE) {\n return $c;\n }\n\n return ' ';\n }",
"function g()\r\n\t{\r\n\t\t$this->str_html = str_replace(array(\"\\r\\n\",\"\\n\",\"\\r\",\"\\t\"), ' ', $this->str_html);\r\n\t\t$this->str_html = preg_replace(\"/(\\s{2,})/\", ' ', $this->str_html);\r\n\t\treturn $this->replace_vars($this->str_html, $this->html_a, 1);\r\n#\t\treturn $this->str_html;\r\n\t}",
"private function getTitleLineString()\n\t{\n\t\t$title = Html::tag('title', $this->items['title']) . \"\\n\";\n\t\t\n\t\treturn $title;\n\t}",
"function nbs( $num = 1 )\n\t{\n\t\treturn str_repeat( ' ', $num );\n\t}",
"public static function info(string $msg): string\n {\n $msg = 'Info: ' . $msg;\n $space = self::tabSpaces($msg);\n $out = static::colorize(str_pad(' ', $space), Color::FG_WHITE, Color::AT_BOLD, Color::BG_BLUE) . PHP_EOL;\n $out .= static::colorize(' ' . $msg . ' ', Color::FG_WHITE, Color::AT_BOLD, Color::BG_BLUE) . PHP_EOL;\n $out .= static::colorize(str_pad(' ', $space), Color::FG_WHITE, Color::AT_BOLD, Color::BG_BLUE) . PHP_EOL;\n\n return $out;\n }",
"function der($text){\r\n return \"<div align=\\\"right\\\">$text</div>\";\r\n }",
"protected static function _offset_str() {\n // get the offset\n $offset = get_option( 'gmt_offset', 0 );\n\n // get the sign of the offset\n $sign = $offset < 0 ? '-' : '+';\n\n // get the suffix, either :00 or :30\n $offset = abs( $offset );\n $floored = floor( $offset );\n $suffix = $offset == $floored ? ':00' : ':30';\n\n return sprintf( '%s%02s%s', $sign, $offset, $suffix );\n }",
"function word_wrap_txt($string, $length){\n\t\t\n\t\t$line = '';\n\t\t$i = 0;\n\t\t\n\t\t$outputStringArray = str_split($string, $length);\n\t\t\n\t\t$noOFLines = count($outputStringArray) + 1;\n\t\t\n\t\tif (count($outputStringArray) == 1){\n\t\t\t\n\t\t\t$line .= \"\\t\".$outputStringArray[0].\"\\t\";\n\t\t\t\n\t\t\t$i++;\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\tforeach ($outputStringArray as $outputString){\n\t\t\t\t//,\"/t |\"\n\t\t\t\tif ($noOFLines == $i){\n\t\t\t\t\t\n\t\t\t\t\t$line .= '|'.\"\\t\".$outputString.\"\\t\".'|';\n\t\t\t\t\t$line .= $i;\n\t\t\t\t\t\n\t\t\t\t\t$i++;\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\tif ($i != 0){\n\t\t\t\t\t\t$line .= \"\\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$line .= '|'.\"\\t\".$outputString.\"\\t\".'|'.\"\\n\";\n\t\t\t\t\t//$line .= $i;\n\t\t\t\t\t\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $line;\n\t\t\n\t}",
"function getLittleDescription($texte, $nbchar = 20)\n{\nreturn (strlen($texte) > $nbchar ? substr(substr($texte,0,$nbchar),0,strrpos(substr($texte,0,$nbchar),\" \")).\"...\" : $texte);\n}",
"function _dumpToString () {\r\n return \"text \\\"\".substr (preg_replace ('/\\s+/', ' ', $this->content), 0, 40).\"\\\" [f:\".preg_replace ('/\\s+/', ' ', join(':', array_keys ($this->_flags))).\"]\";\r\n }",
"function title($name) {\n $total_length = 107;\n $name_length = strlen($name);\n $start = intval(($total_length - $name_length) / 2);\n $end = $total_length - $start - $name_length;\n $title = str_repeat(\"-\", $start) . $name . str_repeat(\"-\", $end);\n echo \"item --gap -- {$title}\\n\";\n \n\n}",
"function string_display( $p_string ) \r\n{\t\r\n\t$p_string = string_strip_hrefs( $p_string );\r\n\t$p_string = string_html_specialchars( $p_string );\r\n\t$p_string = string_restore_valid_html_tags( $p_string, /* multiline = */ true );\r\n\t$p_string = string_preserve_spaces_at_bol( $p_string );\r\n\t$p_string = string_nl2br( $p_string );\r\n\r\n\treturn $p_string;\r\n}",
"public function __toString()\n {\n if ($this->isEmpty()) {\n return '';\n }\n\n return implode(\n '/',\n array(\n $this->getStart()->format('c'),\n $this->getEnd()->format('c')\n )\n );\n }",
"function squish(){\n\t\t$out = $this->trim();\n\t\treturn $out->gsub('/\\s+/',' ');\n\t}",
"protected function getLevelSpaces($level)\n {\n return str_repeat(' ', $this->getMaxLevelLength() - strlen($level));\n }",
"public function strRepresentation() {\n\t\t$retstr = \"\";\n\t\t$retstr .= \"Card \".$this->name.\" - \".$this->id.\" is a(n) \".$this->getTypeAsStr().\" card with a cost of \".$this->cost.\".<br />It boosts the following stats:<br />\";\n\t\t$retstr .= \"Body: \";\n\t\t$retstr .= print_r($this->body, true);\n\t\t$retstr .= \"<br />Mind: \";\n\t\t$retstr .= print_r($this->mind, true);\n\t\t$retstr .= \"<br />Soul: \";\n\t\t$retstr .= print_r($this->soul, true);\n\t\t$retstr .= \"<br />And gives a vitality boost of \".$this->vit;\n\t\treturn $retstr;\n\t}",
"function s($str){ echo '<pre>'; print_r($str); echo '</pre>'; }",
"function convertBlank($s){\r\n\t\t$l = explode(\"\\n\", $s);\r\n\t\tfor($i = 0; $i < count($l); $i++){\r\n\t\t\t$sub = substr($l[$i], 0, 2);\r\n\t\t\tif($sub == ' '){\r\n\t\t\t\t$l[$i] = ' '.substr($l[$i], 2);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn implode(\"\\n\", $l);\r\n\t}",
"function shortString($x, $length)\n{\n if(strlen($x)<=$length)\n {\n echo $x;\n }\n else\n {\n $y=substr($x,0,$length) . '...';\n echo $y;\n }\n}",
"public function display(){\n return $this->string;\n }",
"function pos(string $string) {\n $result = \"\";\n\n for ($x = strlen($string) - 1; $x >= 0; $x--) {\n $result .= substr($string, $x, 1);\n }\n return $result;\n}",
"public function shapeString() : string\n {\n return (string) $this->m . ' x ' . (string) $this->n;\n }",
"public function formatPosition($position){\n\t\t\tif ($position == 1) {\n\t\t\t\t$position='1ST';\n\t\t\t}elseif ($position == 2) {\n\t\t\t\t$position='2ND';\n\t\t\t}elseif ($position <= 3) {\n\t\t\t\t$position='3RD';\n\t\t\t}elseif ($position >= 4) {\n\t\t\t\t$position=$position.'TH';\n\t\t\t}\n\t\t\treturn $position;\n\t\t}",
"public function justifyText() {\n $positions = array();\n for ($i = 0; $i < count($this->textToPrint); $i++) { // do this for each line of text\n\n $lineByLine = str_word_count($this->textToPrint[$i],1,self::CHARLIST);\n\n for ($j = 0; $j < count($lineByLine)-1; $j++) { // pad all words but last with trailing whitespace\n $lineByLine[$j] = $lineByLine[$j]. \" \";\n }\n $whiteSpaces = count($lineByLine) - 1; \n \n // this wasn't getting calculated correctly if there were multiple spaces, such as after a period in a sentence\n $localLength = 0;\n foreach ($lineByLine as $key => $value) {\n $localLength += strlen($value);\n }\n $spacesNeeded = $this->width - $localLength;\n \n if ($whiteSpaces > 0) { // dont' do this for a line containing only one word.\n \n $middle = (int) (($whiteSpaces+1)/2); // need to find middle of array\n $whereToInsert = $middle;\n $lkey = 1;\n $rkey = 1;\n $linc = 2;\n $rinc = 2;\n $rinit = $rkey;\n $linit = $lkey;\n\n if ($whiteSpaces % 2 == 0) { // if there are an even number of whitespaces, then we don't have a true middle, start at the right\n $side = \"right\";\n } else {\n $side = \"middle\";\n }\n\n while ($spacesNeeded > 0) {\n \n // insert to middle, then increment keys\n if ($side == \"middle\") {\n array_splice( $lineByLine, $whereToInsert, 0, \" \" );\n $lkey++;\n $rkey++;\n }\n \n if($side == \"right\") {\n $whereToInsert = $middle+$rkey;\n if ($whereToInsert >= count($lineByLine)) { // reached the end of array -- need to reset right side\n $rkey = $rinit;\n $whereToInsert = $middle+$rkey;\n }\n array_splice( $lineByLine, $whereToInsert, 0, \" \" );\n $rkey+=$rinc;\n } else if ($side == \"left\") {\n $whereToInsert = $middle-$lkey;\n if ($whereToInsert <= 0) { //reached the end of array -- need to reset left side\n $lkey = $linit;\n $whereToInsert = $middle-$lkey;\n }\n array_splice( $lineByLine, $whereToInsert, 0, \" \" );\n $lkey+=$linc;\n }\n \n $middle = (int) (count($lineByLine)/2);\n $side = ($side == \"right\" ? \"left\" : \"right\");\n $spacesNeeded--;\n }\n $this->textToPrint[$i] = implode(\"\", $lineByLine);\n }\n }\n }",
"function toString($newLine = \"\\n\") {\n\t\t$string = '';\n\t\t$string .= \" ID[$this->_ID] $newLine\";\n\t\t$string .= \" ReplacesTerms[$this->_ReplacesTerms] $newLine\";\n\t\t$string .= \" Version[$this->_Version] $newLine\";\n\t\t$string .= \" Description[$this->_Description] $newLine\";\n\t\t$string .= \" HtmlLink[$this->_HtmlLink] $newLine\";\n\t\t$string .= \" PdfLink[$this->_PdfLink] $newLine\";\n\t\treturn $string;\n\t}",
"function asString () {\n \t\treturn $this->printableString();\n \t}",
"public function getLeading() {}",
"public function getLeading() {}",
"protected function getOffset(\\codename\\core\\model\\plugin\\offset $offset) : string {\r\n if ($offset->offset > 0) {\r\n return \" OFFSET \" . $offset->offset . \" \";\r\n }\r\n return '';\r\n }",
"public function getStrikeoutPosition() {}",
"function singleCharactersify($string) {\r\n\t\t// but this function is only currently being used for headings determination (in table of contents and content)\r\n\t\t$trimmed_tagless_string = $string;\r\n\t\tprint('maybe this function (singleCharactersify) should not be used');exit(0);\r\n\t\t$trimmed_tagless_string = ReTidy::trim_nbsp(ReTidy::tagless($trimmed_tagless_string));\r\n\t\t$trimmed_tagless_string = preg_replace('/&[^&;\\s]+;/is', '*', $trimmed_tagless_string);\r\n\t\t$trimmed_tagless_string = preg_replace('/\\s{1,}/is', ' ', $trimmed_tagless_string);\r\n\t\treturn $trimmed_tagless_string;\r\n\t}",
"public function getInfo() {\n $str = \"{$this->judul} | {$this->getLable()} (Rp. {$this->harga})\";\n return $str;\n }",
"public function clean_space()\n {\n for ($i = 0; $i < strlen($this->main_str); $i++) {\n if ($this->main_str[$i] == ' ') {\n $this->main_str[$i] = '';\n }\n }\n return $this->main_str;\n }",
"public function getCenteredOutputString(String $_outputString): String\n {\n $stringLength = mb_strlen($_outputString);\n $paddingLeft = ceil(($this->numberOfShellColumns - $stringLength) / 2) + 1;\n\n return str_repeat(\" \", $paddingLeft) . $_outputString;\n }",
"public function getDebugString()\n {\n if ($this->debug) {\n return '<h3>Debug Info</h3><ul><li>' . implode('</li><li>', $this->debugArray) . '</li></ul>';\n }\n\n return '';\n }",
"private static function format_string($string, $length) {\n\t\tif($string == null) {\n\t\t\t$string = \"\";\n\t\t}\n\t\t$strlen = strlen($string);\n\t\tif($strlen > $length) {\n\t\t\treturn substr($string, 0, $length-3).'...';\n\t\t}\n\t\twhile($strlen < $length) {\n\t\t\t$string .= \" \";\n\t\t\t$strlen++;\n\t\t}\n\t\treturn $string;\n\t}",
"public function toString() : string\n {\n return sprintf(\n self::TO_STRING_FORMAT,\n $this->y,\n $this->m,\n $this->d,\n $this->h,\n $this->i,\n $this->s\n );\n }"
] | [
"0.7130491",
"0.61656785",
"0.61557573",
"0.5994228",
"0.59531844",
"0.5950041",
"0.5831983",
"0.5826125",
"0.58251405",
"0.5806674",
"0.5787674",
"0.5781184",
"0.57305133",
"0.57305133",
"0.5723752",
"0.56490624",
"0.5634406",
"0.56298673",
"0.56283295",
"0.56043226",
"0.5594939",
"0.5591574",
"0.5590737",
"0.55651927",
"0.55608004",
"0.5551128",
"0.55355155",
"0.55329263",
"0.55326277",
"0.55317056",
"0.5497201",
"0.5486581",
"0.5472356",
"0.54600054",
"0.5451895",
"0.54471564",
"0.5433802",
"0.542843",
"0.54011995",
"0.5392604",
"0.5370546",
"0.5370546",
"0.5362271",
"0.5354837",
"0.5354607",
"0.5351906",
"0.5347503",
"0.534541",
"0.53382015",
"0.5335977",
"0.5328749",
"0.5314535",
"0.53037137",
"0.529895",
"0.52934325",
"0.52801085",
"0.52722675",
"0.52690923",
"0.52689034",
"0.5259453",
"0.52550757",
"0.52383935",
"0.52383935",
"0.52346456",
"0.5227363",
"0.5225101",
"0.52194184",
"0.5210619",
"0.52099586",
"0.5209346",
"0.5200591",
"0.5190521",
"0.51788896",
"0.5177029",
"0.516442",
"0.51496184",
"0.51427513",
"0.514268",
"0.5135089",
"0.51317734",
"0.5131771",
"0.5122861",
"0.5119497",
"0.5118764",
"0.51146495",
"0.51120645",
"0.5105615",
"0.5102704",
"0.50952774",
"0.50934434",
"0.5089402",
"0.5089044",
"0.5088751",
"0.50872564",
"0.50823617",
"0.5081601",
"0.5074722",
"0.50717276",
"0.5065402",
"0.506379",
"0.50619143"
] | 0.0 | -1 |
Run the database seeds. | public function run()
{
DB::table('banners')->insert([
'bannerImage' => 'https://miro.medium.com/max/3840/1*EOCQfnhc84knJssqDlXLEA.jpeg'
]);
DB::table('banners')->insert([
'bannerImage' => 'https://royaldestinyblog.files.wordpress.com/2018/09/dnd-banner.jpg?w=700'
]);
DB::table('banners')->insert([
'bannerImage' => 'https://media.dnd.wizards.com/styles/news_banner_header/public/images/head-banner/bg-heroes_0.jpg'
]);
DB::table('banners')->insert([
'bannerImage' => 'https://www.lavanguardia.com/files/image_948_465/uploads/2018/12/06/5fa44ab997050.jpeg'
]);
DB::table('banners')->insert([
'bannerImage' => 'https://media.redadn.es/imagenes/super-smash-bros-ultimate-nintendo-switch_328266.jpg'
]);
} | {
"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 |
Getter of the field 'value'. | public function getValue() {
return $this->value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_value()\n {\n return $this->value;\n }",
"public function get_value() {\n return $this->value;\n }",
"public function value() { return $this->_m_value; }",
"public function get_value()\n\t{\n\t\treturn $this->value;\n\t}",
"protected function getValue() {\r\n return $this->_value;\r\n }",
"public function get_value() {\n\t\treturn $this->_value;\n\t}",
"public function getValue() {\n return $this->value;\n }",
"public function getValue() {\n return $this->value;\n }",
"public function getValue() {\n return $this->value;\n }",
"public function getValue()\r\n {\r\n return $this->value;\r\n }",
"function getValue() {\n return $this->value;\n }",
"public function getFieldValue()\n {\n return $this->value;\n }",
"public function value()\n {\n return $this->value;\n }",
"public function value()\n {\n return $this->value;\n }",
"public function value()\n {\n return $this->value;\n }",
"public function value()\n {\n return $this->value;\n }",
"public function value()\n {\n return $this->value;\n }",
"public function value()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->_value;\n }",
"public function getValue()\n {\n return $this->_value;\n }",
"public function getValue()\n {\n return $this->_value;\n }",
"final public function value()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->_fields['Value']['FieldValue'];\n }",
"public function getValue() {\n return $this->_value;\n }",
"function getValue()\n\t{\n\t\treturn $this->value;\n\t}",
"function getValue()\n\t{\n\t\treturn $this->value;\n\t}",
"public function getValue(){\n return $this->_value;\n }",
"public function getValue(): mixed\n {\n return $this->value;\n }",
"final public function getValue()\n {\n return $this->value;\n }",
"public function getValue() {\n\t\treturn $this -> value;\n\t}",
"function getValue(){\r\n\t\treturn $this->value;\r\n\t}",
"public function getValue()\r\n\t{\r\n\t\treturn $this->value;\r\n\t}",
"public function getValue() {\n\t\treturn $this->value;\n\t}",
"public function getValue() {\n\t\treturn $this->value;\n\t}",
"public function getValue() {\n\t\treturn $this->value;\n\t}",
"public function getValue() {\n\t\treturn $this->value;\n\t}",
"public function getValue() {\n\t\treturn $this->value;\n\t}",
"public function getValue() {\n\t\treturn $this->value;\n\t}",
"public function getValue(){\n return $this->value;\n }",
"public function getValue(){\n return $this->value;\n }",
"public function getValue()\n {\n\treturn $this->value;\n }",
"public function getValue()\n {\n\t\treturn $this->value;\n\t}",
"public function getValue()\n\t{\n\t\treturn $this->_value;\n\t}",
"public function getValue()\n\t{\n\t\treturn $this->_value;\n\t}",
"public function getValue(): mixed\n {\n return $this->field?->getValue();\n }",
"public function getValue()\n {\n return $this->get(self::VALUE);\n }",
"public function getValue()\n {\n return $this->get(self::VALUE);\n }",
"public function getValue() {\n\t\treturn $this->data[\"value\"];\n\t}",
"public function getValue(){\n \treturn $this->value;\n }",
"public function getValue()\n {\n return $this->get(self::_VALUE);\n }"
] | [
"0.8622056",
"0.8615567",
"0.86029536",
"0.84996146",
"0.8456522",
"0.8451566",
"0.84010243",
"0.84010243",
"0.84010243",
"0.8381827",
"0.8375665",
"0.8374002",
"0.834534",
"0.834534",
"0.834534",
"0.834534",
"0.834534",
"0.834534",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.8337014",
"0.83308876",
"0.83308876",
"0.83308876",
"0.8304287",
"0.83017313",
"0.83001584",
"0.82956314",
"0.82956314",
"0.82680064",
"0.82628477",
"0.82617295",
"0.82441974",
"0.8233094",
"0.82134634",
"0.8209365",
"0.8209365",
"0.8209365",
"0.8209365",
"0.8209365",
"0.8209365",
"0.81904787",
"0.81904787",
"0.8186385",
"0.8182005",
"0.8159937",
"0.8159937",
"0.81430954",
"0.8100604",
"0.8100604",
"0.809745",
"0.8077761",
"0.80675083"
] | 0.828375 | 76 |
Create PurchaseLabel from JSON string | public static function fromJson($json) {
$value = json_decode($json, true);
return PurchaseLabel::fromString($value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Label_isni($jsonString='')\n {\n //--------------------------------------------------------------------\n // I'm basically OK with being quiet on missing JSON property names\n //--------------------------------------------------------------------\n error_reporting( error_reporting() & ~E_NOTICE );\n error_reporting( error_reporting() & ~E_WARNING );\n\n if($json = $this->getJSON($jsonString) )\n { \n $this->label= $json['label'];\n $this->isni= $json['isni'];\n $this->edits_pending= $json['edits_pending'];\n $this->created= $json['created'];\n\n }\n }",
"public function createLabel(Request $request) {\n\n $shipment = $request->input('shipment');\n $provider = new Estafeta('labels');\n\n return $provider->generateLabel($shipment);\n }",
"public function makeLabel($label)\n {\n return $this->client->makeLabel($label);\n }",
"public static function getResponse1013() {\n\n return '{\"indicator\":{\"name\":\"Término de facturación de energía activa del PVPC peaje por defecto\",\"short_name\":\"PVPC T. Defecto\",\"id\":1013,\"composited\":false,\"step_type\":\"linear\",\"disaggregated\":false,\"magnitud\":[{\"name\":\"Precio\",\"id\":23}],\"tiempo\":[{\"name\":\"Hora\",\"id\":4}],\"geos\":[{\"geo_id\":3,\"geo_name\":\"España\"}],\"values_updated_at\":\"2017-03-01T21:01:30.000+01:00\",\"values\":[{\"value\":116.62,\"datetime\":\"2017-03-01T00:00:00.000+01:00\",\"datetime_utc\":\"2017-02-28T23:00:00Z\",\"tz_time\":\"2017-02-28T23:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":110.32,\"datetime\":\"2017-03-01T01:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T00:00:00Z\",\"tz_time\":\"2017-03-01T00:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":108.17,\"datetime\":\"2017-03-01T02:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T01:00:00Z\",\"tz_time\":\"2017-03-01T01:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":107.71,\"datetime\":\"2017-03-01T03:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T02:00:00Z\",\"tz_time\":\"2017-03-01T02:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":107.73,\"datetime\":\"2017-03-01T04:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T03:00:00Z\",\"tz_time\":\"2017-03-01T03:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":108.94,\"datetime\":\"2017-03-01T05:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T04:00:00Z\",\"tz_time\":\"2017-03-01T04:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":119.5,\"datetime\":\"2017-03-01T06:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T05:00:00Z\",\"tz_time\":\"2017-03-01T05:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":121.41,\"datetime\":\"2017-03-01T07:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T06:00:00Z\",\"tz_time\":\"2017-03-01T06:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":119.35,\"datetime\":\"2017-03-01T08:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T07:00:00Z\",\"tz_time\":\"2017-03-01T07:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":119.0,\"datetime\":\"2017-03-01T09:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T08:00:00Z\",\"tz_time\":\"2017-03-01T08:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":118.97,\"datetime\":\"2017-03-01T10:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T09:00:00Z\",\"tz_time\":\"2017-03-01T09:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":117.2,\"datetime\":\"2017-03-01T11:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T10:00:00Z\",\"tz_time\":\"2017-03-01T10:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":113.84,\"datetime\":\"2017-03-01T12:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T11:00:00Z\",\"tz_time\":\"2017-03-01T11:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":114.1,\"datetime\":\"2017-03-01T13:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T12:00:00Z\",\"tz_time\":\"2017-03-01T12:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":113.76,\"datetime\":\"2017-03-01T14:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T13:00:00Z\",\"tz_time\":\"2017-03-01T13:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":111.74,\"datetime\":\"2017-03-01T15:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T14:00:00Z\",\"tz_time\":\"2017-03-01T14:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":107.47,\"datetime\":\"2017-03-01T16:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T15:00:00Z\",\"tz_time\":\"2017-03-01T15:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":110.25,\"datetime\":\"2017-03-01T17:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T16:00:00Z\",\"tz_time\":\"2017-03-01T16:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":116.76,\"datetime\":\"2017-03-01T18:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T17:00:00Z\",\"tz_time\":\"2017-03-01T17:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":120.51,\"datetime\":\"2017-03-01T19:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T18:00:00Z\",\"tz_time\":\"2017-03-01T18:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":121.13,\"datetime\":\"2017-03-01T20:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T19:00:00Z\",\"tz_time\":\"2017-03-01T19:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":123.15,\"datetime\":\"2017-03-01T21:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T20:00:00Z\",\"tz_time\":\"2017-03-01T20:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":121.9,\"datetime\":\"2017-03-01T22:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T21:00:00Z\",\"tz_time\":\"2017-03-01T21:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":120.44,\"datetime\":\"2017-03-01T23:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T22:00:00Z\",\"tz_time\":\"2017-03-01T22:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":123.3,\"datetime\":\"2017-03-02T00:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T23:00:00Z\",\"tz_time\":\"2017-03-01T23:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"}]}}';\n }",
"public function generateLabel(generateLabel $request);",
"public function testCreateLabel()\n {\n $label = Tag::label();\n $this->assertEquals(trim((string) $label), \"<label>\\n</label>\");\n $this->assertEquals($label->getJson(), '[[\"label\",\"\",\"\",[]]]');\n\n $label->setAttribute('title', 'Click me');\n $this->assertEquals(trim((string) $label), \"<label title=\\\"Click me\\\">\\n</label>\");\n $this->assertEquals($label->getJson(), '[[\"label\",\" title=\\\"Click me\\\"\",\"\",[]]]');\n $this->assertEquals($label->getAttribute('title'), 'Click me');\n\n $label = Tag::label();\n $label->setAttributes(['title' => 'Click me']);\n $this->assertEquals(trim((string) $label), \"<label title=\\\"Click me\\\">\\n</label>\");\n $this->assertEquals($label->getAttributes(), ['title' => 'Click me']);\n\n $label->input(['value' => 'test']);\n $this->assertEquals(trim((string) $label), \"<label title=\\\"Click me\\\">\\n <input value=\\\"test\\\"/>\\n</label>\");\n $this->assertEquals($label->getJson(), '[[\"label\",\" title=\\\"Click me\\\"\",\"\",[[\"<input value=\\\"test\\\"\\/>\"]]]]');\n\n $this->assertEquals($label->getJson(['ignore_tags' => 'label']), '[[\"<input value=\\\"test\\\"\\/>\"]]');\n }",
"protected function createLabel(array $data)\n {\n /** @var \\BBSLab\\NovaTranslation\\Models\\Translation $keyTranslation */\n $keyTranslation = Translation::query()\n ->select('translations.translation_id')\n ->join('labels', 'translations.translatable_id', '=', 'labels.id')\n ->where('translations.translatable_type', '=', Label::class)\n ->where('labels.key', '=', $data['key'])\n ->first();\n\n $translationId = ! empty($keyTranslation) ? $keyTranslation->translation_id : (new Label)->freshTranslationId();\n\n /** @var \\BBSLab\\NovaTranslation\\Models\\Label $label */\n $label = Label::withoutEvents(function () use ($data) {\n return Label::query()->create([\n 'type' => $data['type'],\n 'key' => $data['key'],\n 'value' => ! empty($data['value']) ? $data['value'] : '',\n ]);\n });\n\n $label->upsertTranslationEntry($data['locale_id'], $translationId);\n }",
"public function jsonProvider() {\n return '{\n \"data\": {\n \"attributes\": {\n \"object_domain\": \"contact\",\n \"object_id\": \"1\",\n \"due\": \"2019-01-25T07:50:14+00:00\",\n \"urgency\": 1,\n \"description\": \"Need to verify this guy house.\",\n \"items\": [\n \"Visit his house\",\n \"Capture a photo\",\n \"Meet him on the house\"\n ],\n \"task_id\": \"123\"\n }\n }\n }';\n}",
"protected function createCurrencyFromJson($json)\n {\n return json_decode($json, true);\n }",
"function _wp_json_convert_string($input_string)\n {\n }",
"public static function createFromJson($json);",
"public function getSMSLabels()\n {\n $urllink = \"http://api.onehop.co/v1/labels/\";\n $ch = curl_init($urllink);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_TIMEOUT, 4);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Accept: ',\n 'apiKey:' . $this->smsAPI\n ));\n $output = Tools::jsonDecode(curl_exec($ch));\n curl_close($ch);\n $labelArr = array();\n $labelInfo = array();\n if ($output && isset($output->labelsList) && $output->labelsList) {\n $output->accountId = '';\n $labelInfo['acountid'] = $output->accountId;\n $labelArr[] = array(\n 'id_option' => '',\n 'name' => 'Select Label'\n );\n foreach ($output->labelsList as $labelVal) {\n $labelArr[] = array(\n 'id_option' => $labelVal,\n 'name' => $labelVal\n );\n }\n } elseif ($output && isset($output->message)) {\n $labelArr[] = array(\n 'id_option' => '',\n 'name' => 'No label available'\n );\n }\n $labelInfo['labellist'] = $labelArr;\n return $labelInfo;\n }",
"public static function createFromJson($json)\n {\n $obj = json_decode($json);\n if ($obj && self::validate($obj)) {\n $product = new Product();\n $product->name = $obj->name;\n $product->description = $obj->description;\n $product->brand_id = $obj->brand;\n $product->barcode = $obj->barcode;\n return $product;\n }\n throw new \\Exception(\"Invalid JSON\");\n }",
"public function purchase_items()\n\t{\n\t\t$products = DB::table('products')->select('id as value', 'product_name as label')->where('category_id', 2)->orderBy('id', 'desc')->get();\n\t\t$str = json_encode($products);\n\t\t$str = preg_replace('/\"([^\"]+)\"\\s*:\\s*/', '$1:', $str);\n\t\techo $str;\n\t}",
"function translate_parse($dataStr)\n\t\t{\n\t\t if($dataStr)\n\t\t {\n\t\t\t $arr = json_decode($dataStr,true); \n\t\t\t\t return $arr['responseData']['translatedText'];\n\t\t }\n\t\t return \"\";\n\t\t}",
"protected function purchaseLabelsRequest($body, $shipment_id)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling purchaseLabels'\n );\n }\n // verify the required parameter 'shipment_id' is set\n if ($shipment_id === null || (is_array($shipment_id) && count($shipment_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $shipment_id when calling purchaseLabels'\n );\n }\n\n $resourcePath = '/shipping/v1/shipments/{shipmentId}/purchaseLabels';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($shipment_id !== null) {\n $resourcePath = str_replace(\n '{' . 'shipmentId' . '}',\n ObjectSerializer::toPathValue($shipment_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\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 $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n\n $sign = new SignatureSellingPartner();\n $headersX = $sign->calculateSignature($this->config->getApiKey(\"accessKey\"),\n $this->config->getApiKey(\"secretKey\"), $this->config->getApiKey(\"region\"),\n $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace(\"https://\", \"\", $this->config->getHost()),\n 'POST', $resourcePath, $query);\n\n $headers = array_merge(\n $headerParams,\n $headers,\n $headersX\n );\n\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function testAddLabel() {\n\n foreach ($this->testCases['Label'] as $key => $testCase) {\n $label = new Label();\n $label->setLabelName($testCase['label_name']);\n $label->setLabelComment($testCase['label_comment']);\n $label->setLabelStatus($testCase['label_status']);\n\n $this->localizationDao = $this->getMock('LocalizationDao');\n $this->localizationDao->expects($this->once())\n ->method('addLabel')\n ->will($this->returnValue($label));\n\n $this->locaizationService->setLocalizationDao($this->localizationDao);\n\n $result = $this->locaizationService->addLabel($testCase['label_name'], $testCase['label_comment']);\n $this->assertTrue($result instanceof Label);\n $this->assertEquals($label, $result);\n }\n }",
"public function addLabel(string $text): LabelerContract;",
"function wpml_pb_shortcode_decode_us_urlencoded_json ( $string, $encoding, $original_string ) {\r\n\t\tif ( $encoding !== 'us_urlencoded_json' ) {\r\n\t\t\treturn $string;\r\n\t\t}\r\n\r\n\t\t$fields_to_translate = array(\r\n\t\t\t'title',\r\n\t\t\t'label',\r\n\t\t\t'description',\r\n\t\t\t'placeholder',\r\n\t\t\t'price',\r\n\t\t\t'substring',\r\n\t\t\t'features',\r\n\t\t\t'btn_text',\r\n\t\t\t'btn_link',\r\n\t\t\t'image',\r\n\t\t\t'link',\r\n\t\t\t'url',\r\n\t\t\t'marker_address',\r\n\t\t\t'marker_text',\r\n\t\t\t'value',\r\n\t\t);\r\n\t\t$rows = json_decode( urldecode( $original_string ), TRUE );\r\n\t\t$result = array();\r\n\t\tforeach ( $rows as $i => $row ) {\r\n\t\t\tforeach ( $row as $key => $value ) {\r\n\t\t\t\tif ( in_array( $key, $fields_to_translate ) ) {\r\n\t\t\t\t\t$result[ $key . '_' . $i ] = array( 'value' => $value, 'translate' => TRUE );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$result[ $key . '_' . $i ] = array( 'value' => $value, 'translate' => FALSE );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $result;\r\n\t}",
"public function run()\n {\n $data = json_decode(\"{\n \\\"countries\\\": [\n {\n \\\"id\\\" : 1,\n \\\"code\\\" : \\\"AD\\\",\n \\\"value\\\" : \\\"Andorra\\\",\n \\\"native\\\" : \\\"Andorra\\\",\n \\\"phone\\\" : \\\"376\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Andorra la Vella\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"ca\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 2,\n \\\"code\\\" : \\\"AE\\\",\n \\\"value\\\" : \\\"United Arab Emirates\\\",\n \\\"native\\\" : \\\"دولة الإمارات العربية المتحدة\\\",\n \\\"phone\\\" : \\\"971\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Abu Dhabi\\\",\n \\\"currency\\\" : \\\"AED\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 3,\n \\\"code\\\" : \\\"AF\\\",\n \\\"value\\\" : \\\"Afghanistan\\\",\n \\\"native\\\" : \\\"افغانستان\\\",\n \\\"phone\\\" : \\\"93\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Kabul\\\",\n \\\"currency\\\" : \\\"AFN\\\",\n \\\"languages\\\" : \\\"ps,uz,tk\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 4,\n \\\"code\\\" : \\\"AG\\\",\n \\\"value\\\" : \\\"Antigua and Barbuda\\\",\n \\\"native\\\" : \\\"Antigua and Barbuda\\\",\n \\\"phone\\\" : \\\"1268\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Saint John's\\\",\n \\\"currency\\\" : \\\"XCD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 5,\n \\\"code\\\" : \\\"AI\\\",\n \\\"value\\\" : \\\"Anguilla\\\",\n \\\"native\\\" : \\\"Anguilla\\\",\n \\\"phone\\\" : \\\"1264\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"The Valley\\\",\n \\\"currency\\\" : \\\"XCD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 6,\n \\\"code\\\" : \\\"AL\\\",\n \\\"value\\\" : \\\"Albania\\\",\n \\\"native\\\" : \\\"Shqipëria\\\",\n \\\"phone\\\" : \\\"355\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Tirana\\\",\n \\\"currency\\\" : \\\"ALL\\\",\n \\\"languages\\\" : \\\"sq\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 7,\n \\\"code\\\" : \\\"AM\\\",\n \\\"value\\\" : \\\"Armenia\\\",\n \\\"native\\\" : \\\"Հայաստան\\\",\n \\\"phone\\\" : \\\"374\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Yerevan\\\",\n \\\"currency\\\" : \\\"AMD\\\",\n \\\"languages\\\" : \\\"hy,ru\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 8,\n \\\"code\\\" : \\\"AO\\\",\n \\\"value\\\" : \\\"Angola\\\",\n \\\"native\\\" : \\\"Angola\\\",\n \\\"phone\\\" : \\\"244\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Luanda\\\",\n \\\"currency\\\" : \\\"AOA\\\",\n \\\"languages\\\" : \\\"pt\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 9,\n \\\"code\\\" : \\\"AQ\\\",\n \\\"value\\\" : \\\"Antarctica\\\",\n \\\"native\\\" : \\\"Antarctica\\\",\n \\\"phone\\\" : \\\"\\\",\n \\\"continent\\\" : \\\"AN\\\",\n \\\"capital\\\" : \\\"\\\",\n \\\"currency\\\" : \\\"\\\",\n \\\"languages\\\" : \\\"\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 10,\n \\\"code\\\" : \\\"AR\\\",\n \\\"value\\\" : \\\"Argentina\\\",\n \\\"native\\\" : \\\"Argentina\\\",\n \\\"phone\\\" : \\\"54\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Buenos Aires\\\",\n \\\"currency\\\" : \\\"ARS\\\",\n \\\"languages\\\" : \\\"es,gn\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 11,\n \\\"code\\\" : \\\"AS\\\",\n \\\"value\\\" : \\\"American Samoa\\\",\n \\\"native\\\" : \\\"American Samoa\\\",\n \\\"phone\\\" : \\\"1684\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Pago Pago\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"en,sm\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 12,\n \\\"code\\\" : \\\"AT\\\",\n \\\"value\\\" : \\\"Austria\\\",\n \\\"native\\\" : \\\"Österreich\\\",\n \\\"phone\\\" : \\\"43\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Vienna\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"de\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 13,\n \\\"code\\\" : \\\"AU\\\",\n \\\"value\\\" : \\\"Australia\\\",\n \\\"native\\\" : \\\"Australia\\\",\n \\\"phone\\\" : \\\"61\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Canberra\\\",\n \\\"currency\\\" : \\\"AUD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 14,\n \\\"code\\\" : \\\"AW\\\",\n \\\"value\\\" : \\\"Aruba\\\",\n \\\"native\\\" : \\\"Aruba\\\",\n \\\"phone\\\" : \\\"297\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Oranjestad\\\",\n \\\"currency\\\" : \\\"AWG\\\",\n \\\"languages\\\" : \\\"nl,pa\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 15,\n \\\"code\\\" : \\\"AX\\\",\n \\\"value\\\" : \\\"Åland\\\",\n \\\"native\\\" : \\\"Åland\\\",\n \\\"phone\\\" : \\\"358\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Mariehamn\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"sv\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 16,\n \\\"code\\\" : \\\"AZ\\\",\n \\\"value\\\" : \\\"Azerbaijan\\\",\n \\\"native\\\" : \\\"Azərbaycan\\\",\n \\\"phone\\\" : \\\"994\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Baku\\\",\n \\\"currency\\\" : \\\"AZN\\\",\n \\\"languages\\\" : \\\"az\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 17,\n \\\"code\\\" : \\\"BA\\\",\n \\\"value\\\" : \\\"Bosnia and Herzegovina\\\",\n \\\"native\\\" : \\\"Bosna i Hercegovina\\\",\n \\\"phone\\\" : \\\"387\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Sarajevo\\\",\n \\\"currency\\\" : \\\"BAM\\\",\n \\\"languages\\\" : \\\"bs,hr,sr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 18,\n \\\"code\\\" : \\\"BB\\\",\n \\\"value\\\" : \\\"Barbados\\\",\n \\\"native\\\" : \\\"Barbados\\\",\n \\\"phone\\\" : \\\"1246\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Bridgetown\\\",\n \\\"currency\\\" : \\\"BBD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 19,\n \\\"code\\\" : \\\"BD\\\",\n \\\"value\\\" : \\\"Bangladesh\\\",\n \\\"native\\\" : \\\"Bangladesh\\\",\n \\\"phone\\\" : \\\"880\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Dhaka\\\",\n \\\"currency\\\" : \\\"BDT\\\",\n \\\"languages\\\" : \\\"bn\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 20,\n \\\"code\\\" : \\\"BE\\\",\n \\\"value\\\" : \\\"Belgium\\\",\n \\\"native\\\" : \\\"België\\\",\n \\\"phone\\\" : \\\"32\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Brussels\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"nl,fr,de\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 21,\n \\\"code\\\" : \\\"BF\\\",\n \\\"value\\\" : \\\"Burkina Faso\\\",\n \\\"native\\\" : \\\"Burkina Faso\\\",\n \\\"phone\\\" : \\\"226\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Ouagadougou\\\",\n \\\"currency\\\" : \\\"XOF\\\",\n \\\"languages\\\" : \\\"fr,ff\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 22,\n \\\"code\\\" : \\\"BG\\\",\n \\\"value\\\" : \\\"Bulgaria\\\",\n \\\"native\\\" : \\\"България\\\",\n \\\"phone\\\" : \\\"359\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Sofia\\\",\n \\\"currency\\\" : \\\"BGN\\\",\n \\\"languages\\\" : \\\"bg\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 23,\n \\\"code\\\" : \\\"BH\\\",\n \\\"value\\\" : \\\"Bahrain\\\",\n \\\"native\\\" : \\\"البحرين\\\",\n \\\"phone\\\" : \\\"973\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Manama\\\",\n \\\"currency\\\" : \\\"BHD\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 24,\n \\\"code\\\" : \\\"BI\\\",\n \\\"value\\\" : \\\"Burundi\\\",\n \\\"native\\\" : \\\"Burundi\\\",\n \\\"phone\\\" : \\\"257\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Bujumbura\\\",\n \\\"currency\\\" : \\\"BIF\\\",\n \\\"languages\\\" : \\\"fr,rn\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 25,\n \\\"code\\\" : \\\"BJ\\\",\n \\\"value\\\" : \\\"Benin\\\",\n \\\"native\\\" : \\\"Bénin\\\",\n \\\"phone\\\" : \\\"229\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Porto-Novo\\\",\n \\\"currency\\\" : \\\"XOF\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 26,\n \\\"code\\\" : \\\"BL\\\",\n \\\"value\\\" : \\\"Saint Barthélemy\\\",\n \\\"native\\\" : \\\"Saint-Barthélemy\\\",\n \\\"phone\\\" : \\\"590\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Gustavia\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 27,\n \\\"code\\\" : \\\"BM\\\",\n \\\"value\\\" : \\\"Bermuda\\\",\n \\\"native\\\" : \\\"Bermuda\\\",\n \\\"phone\\\" : \\\"1441\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Hamilton\\\",\n \\\"currency\\\" : \\\"BMD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 28,\n \\\"code\\\" : \\\"BN\\\",\n \\\"value\\\" : \\\"Brunei\\\",\n \\\"native\\\" : \\\"Negara Brunei Darussalam\\\",\n \\\"phone\\\" : \\\"673\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Bandar Seri Begawan\\\",\n \\\"currency\\\" : \\\"BND\\\",\n \\\"languages\\\" : \\\"ms\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 29,\n \\\"code\\\" : \\\"BO\\\",\n \\\"value\\\" : \\\"Bolivia\\\",\n \\\"native\\\" : \\\"Bolivia\\\",\n \\\"phone\\\" : \\\"591\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Sucre\\\",\n \\\"currency\\\" : \\\"BOB,BOV\\\",\n \\\"languages\\\" : \\\"es,ay,qu\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 30,\n \\\"code\\\" : \\\"BQ\\\",\n \\\"value\\\" : \\\"Bonaire\\\",\n \\\"native\\\" : \\\"Bonaire\\\",\n \\\"phone\\\" : \\\"5997\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Kralendijk\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"nl\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 31,\n \\\"code\\\" : \\\"BR\\\",\n \\\"value\\\" : \\\"Brazil\\\",\n \\\"native\\\" : \\\"Brasil\\\",\n \\\"phone\\\" : \\\"55\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Brasília\\\",\n \\\"currency\\\" : \\\"BRL\\\",\n \\\"languages\\\" : \\\"pt\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 32,\n \\\"code\\\" : \\\"BS\\\",\n \\\"value\\\" : \\\"Bahamas\\\",\n \\\"native\\\" : \\\"Bahamas\\\",\n \\\"phone\\\" : \\\"1242\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Nassau\\\",\n \\\"currency\\\" : \\\"BSD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 33,\n \\\"code\\\" : \\\"BT\\\",\n \\\"value\\\" : \\\"Bhutan\\\",\n \\\"native\\\" : \\\"ʼbrug-yul\\\",\n \\\"phone\\\" : \\\"975\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Thimphu\\\",\n \\\"currency\\\" : \\\"BTN,INR\\\",\n \\\"languages\\\" : \\\"dz\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 34,\n \\\"code\\\" : \\\"BV\\\",\n \\\"value\\\" : \\\"Bouvet Island\\\",\n \\\"native\\\" : \\\"Bouvetøya\\\",\n \\\"phone\\\" : \\\"\\\",\n \\\"continent\\\" : \\\"AN\\\",\n \\\"capital\\\" : \\\"\\\",\n \\\"currency\\\" : \\\"NOK\\\",\n \\\"languages\\\" : \\\"\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 35,\n \\\"code\\\" : \\\"BW\\\",\n \\\"value\\\" : \\\"Botswana\\\",\n \\\"native\\\" : \\\"Botswana\\\",\n \\\"phone\\\" : \\\"267\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Gaborone\\\",\n \\\"currency\\\" : \\\"BWP\\\",\n \\\"languages\\\" : \\\"en,tn\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 36,\n \\\"code\\\" : \\\"BY\\\",\n \\\"value\\\" : \\\"Belarus\\\",\n \\\"native\\\" : \\\"Белару́сь\\\",\n \\\"phone\\\" : \\\"375\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Minsk\\\",\n \\\"currency\\\" : \\\"BYR\\\",\n \\\"languages\\\" : \\\"be,ru\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 37,\n \\\"code\\\" : \\\"BZ\\\",\n \\\"value\\\" : \\\"Belize\\\",\n \\\"native\\\" : \\\"Belize\\\",\n \\\"phone\\\" : \\\"501\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Belmopan\\\",\n \\\"currency\\\" : \\\"BZD\\\",\n \\\"languages\\\" : \\\"en,es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 38,\n \\\"code\\\" : \\\"CA\\\",\n \\\"value\\\" : \\\"Canada\\\",\n \\\"native\\\" : \\\"Canada\\\",\n \\\"phone\\\" : \\\"1\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Ottawa\\\",\n \\\"currency\\\" : \\\"CAD\\\",\n \\\"languages\\\" : \\\"en,fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 39,\n \\\"code\\\" : \\\"CC\\\",\n \\\"value\\\" : \\\"Cocos [Keeling] Islands\\\",\n \\\"native\\\" : \\\"Cocos (Keeling) Islands\\\",\n \\\"phone\\\" : \\\"61\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"West Island\\\",\n \\\"currency\\\" : \\\"AUD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 40,\n \\\"code\\\" : \\\"CD\\\",\n \\\"value\\\" : \\\"Democratic Republic of the Congo\\\",\n \\\"native\\\" : \\\"République démocratique du Congo\\\",\n \\\"phone\\\" : \\\"243\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Kinshasa\\\",\n \\\"currency\\\" : \\\"CDF\\\",\n \\\"languages\\\" : \\\"fr,ln,kg,sw,lu\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 41,\n \\\"code\\\" : \\\"CF\\\",\n \\\"value\\\" : \\\"Central African Republic\\\",\n \\\"native\\\" : \\\"Ködörösêse tî Bêafrîka\\\",\n \\\"phone\\\" : \\\"236\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Bangui\\\",\n \\\"currency\\\" : \\\"XAF\\\",\n \\\"languages\\\" : \\\"fr,sg\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 42,\n \\\"code\\\" : \\\"CG\\\",\n \\\"value\\\" : \\\"Republic of the Congo\\\",\n \\\"native\\\" : \\\"République du Congo\\\",\n \\\"phone\\\" : \\\"242\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Brazzaville\\\",\n \\\"currency\\\" : \\\"XAF\\\",\n \\\"languages\\\" : \\\"fr,ln\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 43,\n \\\"code\\\" : \\\"CH\\\",\n \\\"value\\\" : \\\"Switzerland\\\",\n \\\"native\\\" : \\\"Schweiz\\\",\n \\\"phone\\\" : \\\"41\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Bern\\\",\n \\\"currency\\\" : \\\"CHE,CHF,CHW\\\",\n \\\"languages\\\" : \\\"de,fr,it\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 44,\n \\\"code\\\" : \\\"CI\\\",\n \\\"value\\\" : \\\"Ivory Coast\\\",\n \\\"native\\\" : \\\"Côte d'Ivoire\\\",\n \\\"phone\\\" : \\\"225\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Yamoussoukro\\\",\n \\\"currency\\\" : \\\"XOF\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 45,\n \\\"code\\\" : \\\"CK\\\",\n \\\"value\\\" : \\\"Cook Islands\\\",\n \\\"native\\\" : \\\"Cook Islands\\\",\n \\\"phone\\\" : \\\"682\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Avarua\\\",\n \\\"currency\\\" : \\\"NZD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 46,\n \\\"code\\\" : \\\"CL\\\",\n \\\"value\\\" : \\\"Chile\\\",\n \\\"native\\\" : \\\"Chile\\\",\n \\\"phone\\\" : \\\"56\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Santiago\\\",\n \\\"currency\\\" : \\\"CLF,CLP\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 47,\n \\\"code\\\" : \\\"CM\\\",\n \\\"value\\\" : \\\"Cameroon\\\",\n \\\"native\\\" : \\\"Cameroon\\\",\n \\\"phone\\\" : \\\"237\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Yaoundé\\\",\n \\\"currency\\\" : \\\"XAF\\\",\n \\\"languages\\\" : \\\"en,fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 48,\n \\\"code\\\" : \\\"CN\\\",\n \\\"value\\\" : \\\"China\\\",\n \\\"native\\\" : \\\"中国\\\",\n \\\"phone\\\" : \\\"86\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Beijing\\\",\n \\\"currency\\\" : \\\"CNY\\\",\n \\\"languages\\\" : \\\"zh\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 49,\n \\\"code\\\" : \\\"CO\\\",\n \\\"value\\\" : \\\"Colombia\\\",\n \\\"native\\\" : \\\"Colombia\\\",\n \\\"phone\\\" : \\\"57\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Bogotá\\\",\n \\\"currency\\\" : \\\"COP\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 50,\n \\\"code\\\" : \\\"CR\\\",\n \\\"value\\\" : \\\"Costa Rica\\\",\n \\\"native\\\" : \\\"Costa Rica\\\",\n \\\"phone\\\" : \\\"506\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"San José\\\",\n \\\"currency\\\" : \\\"CRC\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 51,\n \\\"code\\\" : \\\"CU\\\",\n \\\"value\\\" : \\\"Cuba\\\",\n \\\"native\\\" : \\\"Cuba\\\",\n \\\"phone\\\" : \\\"53\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Havana\\\",\n \\\"currency\\\" : \\\"CUC,CUP\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 52,\n \\\"code\\\" : \\\"CV\\\",\n \\\"value\\\" : \\\"Cape Verde\\\",\n \\\"native\\\" : \\\"Cabo Verde\\\",\n \\\"phone\\\" : \\\"238\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Praia\\\",\n \\\"currency\\\" : \\\"CVE\\\",\n \\\"languages\\\" : \\\"pt\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 53,\n \\\"code\\\" : \\\"CW\\\",\n \\\"value\\\" : \\\"Curacao\\\",\n \\\"native\\\" : \\\"Curaçao\\\",\n \\\"phone\\\" : \\\"5999\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Willemstad\\\",\n \\\"currency\\\" : \\\"ANG\\\",\n \\\"languages\\\" : \\\"nl,pa,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 54,\n \\\"code\\\" : \\\"CX\\\",\n \\\"value\\\" : \\\"Christmas Island\\\",\n \\\"native\\\" : \\\"Christmas Island\\\",\n \\\"phone\\\" : \\\"61\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Flying Fish Cove\\\",\n \\\"currency\\\" : \\\"AUD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 55,\n \\\"code\\\" : \\\"CY\\\",\n \\\"value\\\" : \\\"Cyprus\\\",\n \\\"native\\\" : \\\"Κύπρος\\\",\n \\\"phone\\\" : \\\"357\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Nicosia\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"el,tr,hy\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 56,\n \\\"code\\\" : \\\"CZ\\\",\n \\\"value\\\" : \\\"Czech Republic\\\",\n \\\"native\\\" : \\\"Česká republika\\\",\n \\\"phone\\\" : \\\"420\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Prague\\\",\n \\\"currency\\\" : \\\"CZK\\\",\n \\\"languages\\\" : \\\"cs,sk\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 57,\n \\\"code\\\" : \\\"DE\\\",\n \\\"value\\\" : \\\"Germany\\\",\n \\\"native\\\" : \\\"Deutschland\\\",\n \\\"phone\\\" : \\\"49\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Berlin\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"de\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 58,\n \\\"code\\\" : \\\"DJ\\\",\n \\\"value\\\" : \\\"Djibouti\\\",\n \\\"native\\\" : \\\"Djibouti\\\",\n \\\"phone\\\" : \\\"253\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Djibouti\\\",\n \\\"currency\\\" : \\\"DJF\\\",\n \\\"languages\\\" : \\\"fr,ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 59,\n \\\"code\\\" : \\\"DK\\\",\n \\\"value\\\" : \\\"Denmark\\\",\n \\\"native\\\" : \\\"Danmark\\\",\n \\\"phone\\\" : \\\"45\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Copenhagen\\\",\n \\\"currency\\\" : \\\"DKK\\\",\n \\\"languages\\\" : \\\"da\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 60,\n \\\"code\\\" : \\\"DM\\\",\n \\\"value\\\" : \\\"Dominica\\\",\n \\\"native\\\" : \\\"Dominica\\\",\n \\\"phone\\\" : \\\"1767\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Roseau\\\",\n \\\"currency\\\" : \\\"XCD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 61,\n \\\"code\\\" : \\\"DO\\\",\n \\\"value\\\" : \\\"Dominican Republic\\\",\n \\\"native\\\" : \\\"República Dominicana\\\",\n \\\"phone\\\" : \\\"1809,1829,1849\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Santo Domingo\\\",\n \\\"currency\\\" : \\\"DOP\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 62,\n \\\"code\\\" : \\\"DZ\\\",\n \\\"value\\\" : \\\"Algeria\\\",\n \\\"native\\\" : \\\"الجزائر\\\",\n \\\"phone\\\" : \\\"213\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Algiers\\\",\n \\\"currency\\\" : \\\"DZD\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 63,\n \\\"code\\\" : \\\"EC\\\",\n \\\"value\\\" : \\\"Ecuador\\\",\n \\\"native\\\" : \\\"Ecuador\\\",\n \\\"phone\\\" : \\\"593\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Quito\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 64,\n \\\"code\\\" : \\\"EE\\\",\n \\\"value\\\" : \\\"Estonia\\\",\n \\\"native\\\" : \\\"Eesti\\\",\n \\\"phone\\\" : \\\"372\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Tallinn\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"et\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 65,\n \\\"code\\\" : \\\"EG\\\",\n \\\"value\\\" : \\\"Egypt\\\",\n \\\"native\\\" : \\\"مصر\\\",\n \\\"phone\\\" : \\\"20\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Cairo\\\",\n \\\"currency\\\" : \\\"EGP\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 66,\n \\\"code\\\" : \\\"EH\\\",\n \\\"value\\\" : \\\"Western Sahara\\\",\n \\\"native\\\" : \\\"الصحراء الغربية\\\",\n \\\"phone\\\" : \\\"212\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"El Aaiún\\\",\n \\\"currency\\\" : \\\"MAD,DZD,MRO\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 67,\n \\\"code\\\" : \\\"ER\\\",\n \\\"value\\\" : \\\"Eritrea\\\",\n \\\"native\\\" : \\\"ኤርትራ\\\",\n \\\"phone\\\" : \\\"291\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Asmara\\\",\n \\\"currency\\\" : \\\"ERN\\\",\n \\\"languages\\\" : \\\"ti,ar,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 68,\n \\\"code\\\" : \\\"ES\\\",\n \\\"value\\\" : \\\"Spain\\\",\n \\\"native\\\" : \\\"España\\\",\n \\\"phone\\\" : \\\"34\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Madrid\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"es,eu,ca,gl,oc\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 69,\n \\\"code\\\" : \\\"ET\\\",\n \\\"value\\\" : \\\"Ethiopia\\\",\n \\\"native\\\" : \\\"ኢትዮጵያ\\\",\n \\\"phone\\\" : \\\"251\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Addis Ababa\\\",\n \\\"currency\\\" : \\\"ETB\\\",\n \\\"languages\\\" : \\\"am\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 70,\n \\\"code\\\" : \\\"FI\\\",\n \\\"value\\\" : \\\"Finland\\\",\n \\\"native\\\" : \\\"Suomi\\\",\n \\\"phone\\\" : \\\"358\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Helsinki\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fi,sv\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 71,\n \\\"code\\\" : \\\"FJ\\\",\n \\\"value\\\" : \\\"Fiji\\\",\n \\\"native\\\" : \\\"Fiji\\\",\n \\\"phone\\\" : \\\"679\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Suva\\\",\n \\\"currency\\\" : \\\"FJD\\\",\n \\\"languages\\\" : \\\"en,fj,hi,ur\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 72,\n \\\"code\\\" : \\\"FK\\\",\n \\\"value\\\" : \\\"Falkland Islands\\\",\n \\\"native\\\" : \\\"Falkland Islands\\\",\n \\\"phone\\\" : \\\"500\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Stanley\\\",\n \\\"currency\\\" : \\\"FKP\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 73,\n \\\"code\\\" : \\\"FM\\\",\n \\\"value\\\" : \\\"Micronesia\\\",\n \\\"native\\\" : \\\"Micronesia\\\",\n \\\"phone\\\" : \\\"691\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Palikir\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 74,\n \\\"code\\\" : \\\"FO\\\",\n \\\"value\\\" : \\\"Faroe Islands\\\",\n \\\"native\\\" : \\\"Føroyar\\\",\n \\\"phone\\\" : \\\"298\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Tórshavn\\\",\n \\\"currency\\\" : \\\"DKK\\\",\n \\\"languages\\\" : \\\"fo\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 75,\n \\\"code\\\" : \\\"FR\\\",\n \\\"value\\\" : \\\"France\\\",\n \\\"native\\\" : \\\"France\\\",\n \\\"phone\\\" : \\\"33\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Paris\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 76,\n \\\"code\\\" : \\\"GA\\\",\n \\\"value\\\" : \\\"Gabon\\\",\n \\\"native\\\" : \\\"Gabon\\\",\n \\\"phone\\\" : \\\"241\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Libreville\\\",\n \\\"currency\\\" : \\\"XAF\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 77,\n \\\"code\\\" : \\\"GB\\\",\n \\\"value\\\" : \\\"United Kingdom\\\",\n \\\"native\\\" : \\\"United Kingdom\\\",\n \\\"phone\\\" : \\\"44\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"London\\\",\n \\\"currency\\\" : \\\"GBP\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 78,\n \\\"code\\\" : \\\"GD\\\",\n \\\"value\\\" : \\\"Grenada\\\",\n \\\"native\\\" : \\\"Grenada\\\",\n \\\"phone\\\" : \\\"1473\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"St. George's\\\",\n \\\"currency\\\" : \\\"XCD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 79,\n \\\"code\\\" : \\\"GE\\\",\n \\\"value\\\" : \\\"Georgia\\\",\n \\\"native\\\" : \\\"საქართველო\\\",\n \\\"phone\\\" : \\\"995\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Tbilisi\\\",\n \\\"currency\\\" : \\\"GEL\\\",\n \\\"languages\\\" : \\\"ka\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 80,\n \\\"code\\\" : \\\"GF\\\",\n \\\"value\\\" : \\\"French Guiana\\\",\n \\\"native\\\" : \\\"Guyane française\\\",\n \\\"phone\\\" : \\\"594\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Cayenne\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 81,\n \\\"code\\\" : \\\"GG\\\",\n \\\"value\\\" : \\\"Guernsey\\\",\n \\\"native\\\" : \\\"Guernsey\\\",\n \\\"phone\\\" : \\\"44\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"St. Peter Port\\\",\n \\\"currency\\\" : \\\"GBP\\\",\n \\\"languages\\\" : \\\"en,fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 82,\n \\\"code\\\" : \\\"GH\\\",\n \\\"value\\\" : \\\"Ghana\\\",\n \\\"native\\\" : \\\"Ghana\\\",\n \\\"phone\\\" : \\\"233\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Accra\\\",\n \\\"currency\\\" : \\\"GHS\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 83,\n \\\"code\\\" : \\\"GI\\\",\n \\\"value\\\" : \\\"Gibraltar\\\",\n \\\"native\\\" : \\\"Gibraltar\\\",\n \\\"phone\\\" : \\\"350\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Gibraltar\\\",\n \\\"currency\\\" : \\\"GIP\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 84,\n \\\"code\\\" : \\\"GL\\\",\n \\\"value\\\" : \\\"Greenland\\\",\n \\\"native\\\" : \\\"Kalaallit Nunaat\\\",\n \\\"phone\\\" : \\\"299\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Nuuk\\\",\n \\\"currency\\\" : \\\"DKK\\\",\n \\\"languages\\\" : \\\"kl\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 85,\n \\\"code\\\" : \\\"GM\\\",\n \\\"value\\\" : \\\"Gambia\\\",\n \\\"native\\\" : \\\"Gambia\\\",\n \\\"phone\\\" : \\\"220\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Banjul\\\",\n \\\"currency\\\" : \\\"GMD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 86,\n \\\"code\\\" : \\\"GN\\\",\n \\\"value\\\" : \\\"Guinea\\\",\n \\\"native\\\" : \\\"Guinée\\\",\n \\\"phone\\\" : \\\"224\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Conakry\\\",\n \\\"currency\\\" : \\\"GNF\\\",\n \\\"languages\\\" : \\\"fr,ff\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 87,\n \\\"code\\\" : \\\"GP\\\",\n \\\"value\\\" : \\\"Guadeloupe\\\",\n \\\"native\\\" : \\\"Guadeloupe\\\",\n \\\"phone\\\" : \\\"590\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Basse-Terre\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 88,\n \\\"code\\\" : \\\"GQ\\\",\n \\\"value\\\" : \\\"Equatorial Guinea\\\",\n \\\"native\\\" : \\\"Guinea Ecuatorial\\\",\n \\\"phone\\\" : \\\"240\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Malabo\\\",\n \\\"currency\\\" : \\\"XAF\\\",\n \\\"languages\\\" : \\\"es,fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 89,\n \\\"code\\\" : \\\"GR\\\",\n \\\"value\\\" : \\\"Greece\\\",\n \\\"native\\\" : \\\"Ελλάδα\\\",\n \\\"phone\\\" : \\\"30\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Athens\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"el\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 90,\n \\\"code\\\" : \\\"GS\\\",\n \\\"value\\\" : \\\"South Georgia and the South Sandwich Islands\\\",\n \\\"native\\\" : \\\"South Georgia\\\",\n \\\"phone\\\" : \\\"500\\\",\n \\\"continent\\\" : \\\"AN\\\",\n \\\"capital\\\" : \\\"King Edward Point\\\",\n \\\"currency\\\" : \\\"GBP\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 91,\n \\\"code\\\" : \\\"GT\\\",\n \\\"value\\\" : \\\"Guatemala\\\",\n \\\"native\\\" : \\\"Guatemala\\\",\n \\\"phone\\\" : \\\"502\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Guatemala City\\\",\n \\\"currency\\\" : \\\"GTQ\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 92,\n \\\"code\\\" : \\\"GU\\\",\n \\\"value\\\" : \\\"Guam\\\",\n \\\"native\\\" : \\\"Guam\\\",\n \\\"phone\\\" : \\\"1671\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Hagåtña\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"en,ch,es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 93,\n \\\"code\\\" : \\\"GW\\\",\n \\\"value\\\" : \\\"Guinea-Bissau\\\",\n \\\"native\\\" : \\\"Guiné-Bissau\\\",\n \\\"phone\\\" : \\\"245\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Bissau\\\",\n \\\"currency\\\" : \\\"XOF\\\",\n \\\"languages\\\" : \\\"pt\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 94,\n \\\"code\\\" : \\\"GY\\\",\n \\\"value\\\" : \\\"Guyana\\\",\n \\\"native\\\" : \\\"Guyana\\\",\n \\\"phone\\\" : \\\"592\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Georgetown\\\",\n \\\"currency\\\" : \\\"GYD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 95,\n \\\"code\\\" : \\\"HK\\\",\n \\\"value\\\" : \\\"Hong Kong\\\",\n \\\"native\\\" : \\\"香港\\\",\n \\\"phone\\\" : \\\"852\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"City of Victoria\\\",\n \\\"currency\\\" : \\\"HKD\\\",\n \\\"languages\\\" : \\\"zh,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 96,\n \\\"code\\\" : \\\"HM\\\",\n \\\"value\\\" : \\\"Heard Island and McDonald Islands\\\",\n \\\"native\\\" : \\\"Heard Island and McDonald Islands\\\",\n \\\"phone\\\" : \\\"\\\",\n \\\"continent\\\" : \\\"AN\\\",\n \\\"capital\\\" : \\\"\\\",\n \\\"currency\\\" : \\\"AUD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 97,\n \\\"code\\\" : \\\"HN\\\",\n \\\"value\\\" : \\\"Honduras\\\",\n \\\"native\\\" : \\\"Honduras\\\",\n \\\"phone\\\" : \\\"504\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Tegucigalpa\\\",\n \\\"currency\\\" : \\\"HNL\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 98,\n \\\"code\\\" : \\\"HR\\\",\n \\\"value\\\" : \\\"Croatia\\\",\n \\\"native\\\" : \\\"Hrvatska\\\",\n \\\"phone\\\" : \\\"385\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Zagreb\\\",\n \\\"currency\\\" : \\\"HRK\\\",\n \\\"languages\\\" : \\\"hr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 99,\n \\\"code\\\" : \\\"HT\\\",\n \\\"value\\\" : \\\"Haiti\\\",\n \\\"native\\\" : \\\"Haïti\\\",\n \\\"phone\\\" : \\\"509\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Port-au-Prince\\\",\n \\\"currency\\\" : \\\"HTG,USD\\\",\n \\\"languages\\\" : \\\"fr,ht\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 100,\n \\\"code\\\" : \\\"HU\\\",\n \\\"value\\\" : \\\"Hungary\\\",\n \\\"native\\\" : \\\"Magyarország\\\",\n \\\"phone\\\" : \\\"36\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Budapest\\\",\n \\\"currency\\\" : \\\"HUF\\\",\n \\\"languages\\\" : \\\"hu\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 101,\n \\\"code\\\" : \\\"ID\\\",\n \\\"value\\\" : \\\"Indonesia\\\",\n \\\"native\\\" : \\\"Indonesia\\\",\n \\\"phone\\\" : \\\"62\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Jakarta\\\",\n \\\"currency\\\" : \\\"IDR\\\",\n \\\"languages\\\" : \\\"id\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 102,\n \\\"code\\\" : \\\"IE\\\",\n \\\"value\\\" : \\\"Ireland\\\",\n \\\"native\\\" : \\\"Éire\\\",\n \\\"phone\\\" : \\\"353\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Dublin\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"ga,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 103,\n \\\"code\\\" : \\\"IL\\\",\n \\\"value\\\" : \\\"Israel\\\",\n \\\"native\\\" : \\\"יִשְׂרָאֵל\\\",\n \\\"phone\\\" : \\\"972\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Jerusalem\\\",\n \\\"currency\\\" : \\\"ILS\\\",\n \\\"languages\\\" : \\\"he,ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 104,\n \\\"code\\\" : \\\"IM\\\",\n \\\"value\\\" : \\\"Isle of Man\\\",\n \\\"native\\\" : \\\"Isle of Man\\\",\n \\\"phone\\\" : \\\"44\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Douglas\\\",\n \\\"currency\\\" : \\\"GBP\\\",\n \\\"languages\\\" : \\\"en,gv\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 105,\n \\\"code\\\" : \\\"IN\\\",\n \\\"value\\\" : \\\"India\\\",\n \\\"native\\\" : \\\"भारत\\\",\n \\\"phone\\\" : \\\"91\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"New Delhi\\\",\n \\\"currency\\\" : \\\"INR\\\",\n \\\"languages\\\" : \\\"hi,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 106,\n \\\"code\\\" : \\\"IO\\\",\n \\\"value\\\" : \\\"British Indian Ocean Territory\\\",\n \\\"native\\\" : \\\"British Indian Ocean Territory\\\",\n \\\"phone\\\" : \\\"246\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Diego Garcia\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 107,\n \\\"code\\\" : \\\"IQ\\\",\n \\\"value\\\" : \\\"Iraq\\\",\n \\\"native\\\" : \\\"العراق\\\",\n \\\"phone\\\" : \\\"964\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Baghdad\\\",\n \\\"currency\\\" : \\\"IQD\\\",\n \\\"languages\\\" : \\\"ar,ku\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 108,\n \\\"code\\\" : \\\"IR\\\",\n \\\"value\\\" : \\\"Iran\\\",\n \\\"native\\\" : \\\"ایران\\\",\n \\\"phone\\\" : \\\"98\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Tehran\\\",\n \\\"currency\\\" : \\\"IRR\\\",\n \\\"languages\\\" : \\\"fa\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 109,\n \\\"code\\\" : \\\"IS\\\",\n \\\"value\\\" : \\\"Iceland\\\",\n \\\"native\\\" : \\\"Ísland\\\",\n \\\"phone\\\" : \\\"354\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Reykjavik\\\",\n \\\"currency\\\" : \\\"ISK\\\",\n \\\"languages\\\" : \\\"is\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 110,\n \\\"code\\\" : \\\"IT\\\",\n \\\"value\\\" : \\\"Italy\\\",\n \\\"native\\\" : \\\"Italia\\\",\n \\\"phone\\\" : \\\"39\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Rome\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"it\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 111,\n \\\"code\\\" : \\\"JE\\\",\n \\\"value\\\" : \\\"Jersey\\\",\n \\\"native\\\" : \\\"Jersey\\\",\n \\\"phone\\\" : \\\"44\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Saint Helier\\\",\n \\\"currency\\\" : \\\"GBP\\\",\n \\\"languages\\\" : \\\"en,fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 112,\n \\\"code\\\" : \\\"JM\\\",\n \\\"value\\\" : \\\"Jamaica\\\",\n \\\"native\\\" : \\\"Jamaica\\\",\n \\\"phone\\\" : \\\"1876\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Kingston\\\",\n \\\"currency\\\" : \\\"JMD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 113,\n \\\"code\\\" : \\\"JO\\\",\n \\\"value\\\" : \\\"Jordan\\\",\n \\\"native\\\" : \\\"الأردن\\\",\n \\\"phone\\\" : \\\"962\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Amman\\\",\n \\\"currency\\\" : \\\"JOD\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 114,\n \\\"code\\\" : \\\"JP\\\",\n \\\"value\\\" : \\\"Japan\\\",\n \\\"native\\\" : \\\"日本\\\",\n \\\"phone\\\" : \\\"81\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Tokyo\\\",\n \\\"currency\\\" : \\\"JPY\\\",\n \\\"languages\\\" : \\\"ja\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 115,\n \\\"code\\\" : \\\"KE\\\",\n \\\"value\\\" : \\\"Kenya\\\",\n \\\"native\\\" : \\\"Kenya\\\",\n \\\"phone\\\" : \\\"254\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Nairobi\\\",\n \\\"currency\\\" : \\\"KES\\\",\n \\\"languages\\\" : \\\"en,sw\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 116,\n \\\"code\\\" : \\\"KG\\\",\n \\\"value\\\" : \\\"Kyrgyzstan\\\",\n \\\"native\\\" : \\\"Кыргызстан\\\",\n \\\"phone\\\" : \\\"996\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Bishkek\\\",\n \\\"currency\\\" : \\\"KGS\\\",\n \\\"languages\\\" : \\\"ky,ru\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 117,\n \\\"code\\\" : \\\"KH\\\",\n \\\"value\\\" : \\\"Cambodia\\\",\n \\\"native\\\" : \\\"Kâmpŭchéa\\\",\n \\\"phone\\\" : \\\"855\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Phnom Penh\\\",\n \\\"currency\\\" : \\\"KHR\\\",\n \\\"languages\\\" : \\\"km\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 118,\n \\\"code\\\" : \\\"KI\\\",\n \\\"value\\\" : \\\"Kiribati\\\",\n \\\"native\\\" : \\\"Kiribati\\\",\n \\\"phone\\\" : \\\"686\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"South Tarawa\\\",\n \\\"currency\\\" : \\\"AUD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 119,\n \\\"code\\\" : \\\"KM\\\",\n \\\"value\\\" : \\\"Comoros\\\",\n \\\"native\\\" : \\\"Komori\\\",\n \\\"phone\\\" : \\\"269\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Moroni\\\",\n \\\"currency\\\" : \\\"KMF\\\",\n \\\"languages\\\" : \\\"ar,fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 120,\n \\\"code\\\" : \\\"KN\\\",\n \\\"value\\\" : \\\"Saint Kitts and Nevis\\\",\n \\\"native\\\" : \\\"Saint Kitts and Nevis\\\",\n \\\"phone\\\" : \\\"1869\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Basseterre\\\",\n \\\"currency\\\" : \\\"XCD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 121,\n \\\"code\\\" : \\\"KP\\\",\n \\\"value\\\" : \\\"North Korea\\\",\n \\\"native\\\" : \\\"북한\\\",\n \\\"phone\\\" : \\\"850\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Pyongyang\\\",\n \\\"currency\\\" : \\\"KPW\\\",\n \\\"languages\\\" : \\\"ko\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 122,\n \\\"code\\\" : \\\"KR\\\",\n \\\"value\\\" : \\\"South Korea\\\",\n \\\"native\\\" : \\\"대한민국\\\",\n \\\"phone\\\" : \\\"82\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Seoul\\\",\n \\\"currency\\\" : \\\"KRW\\\",\n \\\"languages\\\" : \\\"ko\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 123,\n \\\"code\\\" : \\\"KW\\\",\n \\\"value\\\" : \\\"Kuwait\\\",\n \\\"native\\\" : \\\"الكويت\\\",\n \\\"phone\\\" : \\\"965\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Kuwait City\\\",\n \\\"currency\\\" : \\\"KWD\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 124,\n \\\"code\\\" : \\\"KY\\\",\n \\\"value\\\" : \\\"Cayman Islands\\\",\n \\\"native\\\" : \\\"Cayman Islands\\\",\n \\\"phone\\\" : \\\"1345\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"George Town\\\",\n \\\"currency\\\" : \\\"KYD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 125,\n \\\"code\\\" : \\\"KZ\\\",\n \\\"value\\\" : \\\"Kazakhstan\\\",\n \\\"native\\\" : \\\"Қазақстан\\\",\n \\\"phone\\\" : \\\"76,77\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Astana\\\",\n \\\"currency\\\" : \\\"KZT\\\",\n \\\"languages\\\" : \\\"kk,ru\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 126,\n \\\"code\\\" : \\\"LA\\\",\n \\\"value\\\" : \\\"Laos\\\",\n \\\"native\\\" : \\\"ສປປລາວ\\\",\n \\\"phone\\\" : \\\"856\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Vientiane\\\",\n \\\"currency\\\" : \\\"LAK\\\",\n \\\"languages\\\" : \\\"lo\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 127,\n \\\"code\\\" : \\\"LB\\\",\n \\\"value\\\" : \\\"Lebanon\\\",\n \\\"native\\\" : \\\"لبنان\\\",\n \\\"phone\\\" : \\\"961\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Beirut\\\",\n \\\"currency\\\" : \\\"LBP\\\",\n \\\"languages\\\" : \\\"ar,fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 128,\n \\\"code\\\" : \\\"LC\\\",\n \\\"value\\\" : \\\"Saint Lucia\\\",\n \\\"native\\\" : \\\"Saint Lucia\\\",\n \\\"phone\\\" : \\\"1758\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Castries\\\",\n \\\"currency\\\" : \\\"XCD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 129,\n \\\"code\\\" : \\\"LI\\\",\n \\\"value\\\" : \\\"Liechtenstein\\\",\n \\\"native\\\" : \\\"Liechtenstein\\\",\n \\\"phone\\\" : \\\"423\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Vaduz\\\",\n \\\"currency\\\" : \\\"CHF\\\",\n \\\"languages\\\" : \\\"de\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 130,\n \\\"code\\\" : \\\"LK\\\",\n \\\"value\\\" : \\\"Sri Lanka\\\",\n \\\"native\\\" : \\\"śrī laṃkāva\\\",\n \\\"phone\\\" : \\\"94\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Colombo\\\",\n \\\"currency\\\" : \\\"LKR\\\",\n \\\"languages\\\" : \\\"si,ta\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 131,\n \\\"code\\\" : \\\"LR\\\",\n \\\"value\\\" : \\\"Liberia\\\",\n \\\"native\\\" : \\\"Liberia\\\",\n \\\"phone\\\" : \\\"231\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Monrovia\\\",\n \\\"currency\\\" : \\\"LRD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 132,\n \\\"code\\\" : \\\"LS\\\",\n \\\"value\\\" : \\\"Lesotho\\\",\n \\\"native\\\" : \\\"Lesotho\\\",\n \\\"phone\\\" : \\\"266\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Maseru\\\",\n \\\"currency\\\" : \\\"LSL,ZAR\\\",\n \\\"languages\\\" : \\\"en,st\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 133,\n \\\"code\\\" : \\\"LT\\\",\n \\\"value\\\" : \\\"Lithuania\\\",\n \\\"native\\\" : \\\"Lietuva\\\",\n \\\"phone\\\" : \\\"370\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Vilnius\\\",\n \\\"currency\\\" : \\\"LTL\\\",\n \\\"languages\\\" : \\\"lt\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 134,\n \\\"code\\\" : \\\"LU\\\",\n \\\"value\\\" : \\\"Luxembourg\\\",\n \\\"native\\\" : \\\"Luxembourg\\\",\n \\\"phone\\\" : \\\"352\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Luxembourg\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fr,de,lb\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 135,\n \\\"code\\\" : \\\"LV\\\",\n \\\"value\\\" : \\\"Latvia\\\",\n \\\"native\\\" : \\\"Latvija\\\",\n \\\"phone\\\" : \\\"371\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Riga\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"lv\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 136,\n \\\"code\\\" : \\\"LY\\\",\n \\\"value\\\" : \\\"Libya\\\",\n \\\"native\\\" : \\\"ليبيا\\\",\n \\\"phone\\\" : \\\"218\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Tripoli\\\",\n \\\"currency\\\" : \\\"LYD\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 137,\n \\\"code\\\" : \\\"MA\\\",\n \\\"value\\\" : \\\"Morocco\\\",\n \\\"native\\\" : \\\"المغرب\\\",\n \\\"phone\\\" : \\\"212\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Rabat\\\",\n \\\"currency\\\" : \\\"MAD\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 138,\n \\\"code\\\" : \\\"MC\\\",\n \\\"value\\\" : \\\"Monaco\\\",\n \\\"native\\\" : \\\"Monaco\\\",\n \\\"phone\\\" : \\\"377\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Monaco\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 139,\n \\\"code\\\" : \\\"MD\\\",\n \\\"value\\\" : \\\"Moldova\\\",\n \\\"native\\\" : \\\"Moldova\\\",\n \\\"phone\\\" : \\\"373\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Chișinău\\\",\n \\\"currency\\\" : \\\"MDL\\\",\n \\\"languages\\\" : \\\"ro\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 140,\n \\\"code\\\" : \\\"ME\\\",\n \\\"value\\\" : \\\"Montenegro\\\",\n \\\"native\\\" : \\\"Црна Гора\\\",\n \\\"phone\\\" : \\\"382\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Podgorica\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"sr,bs,sq,hr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 141,\n \\\"code\\\" : \\\"MF\\\",\n \\\"value\\\" : \\\"Saint Martin\\\",\n \\\"native\\\" : \\\"Saint-Martin\\\",\n \\\"phone\\\" : \\\"590\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Marigot\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"en,fr,nl\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 142,\n \\\"code\\\" : \\\"MG\\\",\n \\\"value\\\" : \\\"Madagascar\\\",\n \\\"native\\\" : \\\"Madagasikara\\\",\n \\\"phone\\\" : \\\"261\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Antananarivo\\\",\n \\\"currency\\\" : \\\"MGA\\\",\n \\\"languages\\\" : \\\"fr,mg\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 143,\n \\\"code\\\" : \\\"MH\\\",\n \\\"value\\\" : \\\"Marshall Islands\\\",\n \\\"native\\\" : \\\"M̧ajeļ\\\",\n \\\"phone\\\" : \\\"692\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Majuro\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"en,mh\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 144,\n \\\"code\\\" : \\\"MK\\\",\n \\\"value\\\" : \\\"Macedonia\\\",\n \\\"native\\\" : \\\"Македонија\\\",\n \\\"phone\\\" : \\\"389\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Skopje\\\",\n \\\"currency\\\" : \\\"MKD\\\",\n \\\"languages\\\" : \\\"mk\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 145,\n \\\"code\\\" : \\\"ML\\\",\n \\\"value\\\" : \\\"Mali\\\",\n \\\"native\\\" : \\\"Mali\\\",\n \\\"phone\\\" : \\\"223\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Bamako\\\",\n \\\"currency\\\" : \\\"XOF\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 146,\n \\\"code\\\" : \\\"MM\\\",\n \\\"value\\\" : \\\"Myanmar [Burma]\\\",\n \\\"native\\\" : \\\"Myanma\\\",\n \\\"phone\\\" : \\\"95\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Naypyidaw\\\",\n \\\"currency\\\" : \\\"MMK\\\",\n \\\"languages\\\" : \\\"my\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 147,\n \\\"code\\\" : \\\"MN\\\",\n \\\"value\\\" : \\\"Mongolia\\\",\n \\\"native\\\" : \\\"Монгол улс\\\",\n \\\"phone\\\" : \\\"976\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Ulan Bator\\\",\n \\\"currency\\\" : \\\"MNT\\\",\n \\\"languages\\\" : \\\"mn\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 148,\n \\\"code\\\" : \\\"MO\\\",\n \\\"value\\\" : \\\"Macao\\\",\n \\\"native\\\" : \\\"澳門\\\",\n \\\"phone\\\" : \\\"853\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"\\\",\n \\\"currency\\\" : \\\"MOP\\\",\n \\\"languages\\\" : \\\"zh,pt\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 149,\n \\\"code\\\" : \\\"MP\\\",\n \\\"value\\\" : \\\"Northern Mariana Islands\\\",\n \\\"native\\\" : \\\"Northern Mariana Islands\\\",\n \\\"phone\\\" : \\\"1670\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Saipan\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"en,ch\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 150,\n \\\"code\\\" : \\\"MQ\\\",\n \\\"value\\\" : \\\"Martinique\\\",\n \\\"native\\\" : \\\"Martinique\\\",\n \\\"phone\\\" : \\\"596\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Fort-de-France\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 151,\n \\\"code\\\" : \\\"MR\\\",\n \\\"value\\\" : \\\"Mauritania\\\",\n \\\"native\\\" : \\\"موريتانيا\\\",\n \\\"phone\\\" : \\\"222\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Nouakchott\\\",\n \\\"currency\\\" : \\\"MRO\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 152,\n \\\"code\\\" : \\\"MS\\\",\n \\\"value\\\" : \\\"Montserrat\\\",\n \\\"native\\\" : \\\"Montserrat\\\",\n \\\"phone\\\" : \\\"1664\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Plymouth\\\",\n \\\"currency\\\" : \\\"XCD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 153,\n \\\"code\\\" : \\\"MT\\\",\n \\\"value\\\" : \\\"Malta\\\",\n \\\"native\\\" : \\\"Malta\\\",\n \\\"phone\\\" : \\\"356\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Valletta\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"mt,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 154,\n \\\"code\\\" : \\\"MU\\\",\n \\\"value\\\" : \\\"Mauritius\\\",\n \\\"native\\\" : \\\"Maurice\\\",\n \\\"phone\\\" : \\\"230\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Port Louis\\\",\n \\\"currency\\\" : \\\"MUR\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 155,\n \\\"code\\\" : \\\"MV\\\",\n \\\"value\\\" : \\\"Maldives\\\",\n \\\"native\\\" : \\\"Maldives\\\",\n \\\"phone\\\" : \\\"960\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Malé\\\",\n \\\"currency\\\" : \\\"MVR\\\",\n \\\"languages\\\" : \\\"dv\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 156,\n \\\"code\\\" : \\\"MW\\\",\n \\\"value\\\" : \\\"Malawi\\\",\n \\\"native\\\" : \\\"Malawi\\\",\n \\\"phone\\\" : \\\"265\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Lilongwe\\\",\n \\\"currency\\\" : \\\"MWK\\\",\n \\\"languages\\\" : \\\"en,ny\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 157,\n \\\"code\\\" : \\\"MX\\\",\n \\\"value\\\" : \\\"Mexico\\\",\n \\\"native\\\" : \\\"México\\\",\n \\\"phone\\\" : \\\"52\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Mexico City\\\",\n \\\"currency\\\" : \\\"MXN\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 158,\n \\\"code\\\" : \\\"MY\\\",\n \\\"value\\\" : \\\"Malaysia\\\",\n \\\"native\\\" : \\\"Malaysia\\\",\n \\\"phone\\\" : \\\"60\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Kuala Lumpur\\\",\n \\\"currency\\\" : \\\"MYR\\\",\n \\\"languages\\\" : \\\"\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 159,\n \\\"code\\\" : \\\"MZ\\\",\n \\\"value\\\" : \\\"Mozambique\\\",\n \\\"native\\\" : \\\"Moçambique\\\",\n \\\"phone\\\" : \\\"258\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Maputo\\\",\n \\\"currency\\\" : \\\"MZN\\\",\n \\\"languages\\\" : \\\"pt\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 160,\n \\\"code\\\" : \\\"NA\\\",\n \\\"value\\\" : \\\"Namibia\\\",\n \\\"native\\\" : \\\"Namibia\\\",\n \\\"phone\\\" : \\\"264\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Windhoek\\\",\n \\\"currency\\\" : \\\"NAD,ZAR\\\",\n \\\"languages\\\" : \\\"en,af\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 161,\n \\\"code\\\" : \\\"NC\\\",\n \\\"value\\\" : \\\"New Caledonia\\\",\n \\\"native\\\" : \\\"Nouvelle-Calédonie\\\",\n \\\"phone\\\" : \\\"687\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Nouméa\\\",\n \\\"currency\\\" : \\\"XPF\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 162,\n \\\"code\\\" : \\\"NE\\\",\n \\\"value\\\" : \\\"Niger\\\",\n \\\"native\\\" : \\\"Niger\\\",\n \\\"phone\\\" : \\\"227\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Niamey\\\",\n \\\"currency\\\" : \\\"XOF\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 163,\n \\\"code\\\" : \\\"NF\\\",\n \\\"value\\\" : \\\"Norfolk Island\\\",\n \\\"native\\\" : \\\"Norfolk Island\\\",\n \\\"phone\\\" : \\\"672\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Kingston\\\",\n \\\"currency\\\" : \\\"AUD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 164,\n \\\"code\\\" : \\\"NG\\\",\n \\\"value\\\" : \\\"Nigeria\\\",\n \\\"native\\\" : \\\"Nigeria\\\",\n \\\"phone\\\" : \\\"234\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Abuja\\\",\n \\\"currency\\\" : \\\"NGN\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 165,\n \\\"code\\\" : \\\"NI\\\",\n \\\"value\\\" : \\\"Nicaragua\\\",\n \\\"native\\\" : \\\"Nicaragua\\\",\n \\\"phone\\\" : \\\"505\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Managua\\\",\n \\\"currency\\\" : \\\"NIO\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 166,\n \\\"code\\\" : \\\"NL\\\",\n \\\"value\\\" : \\\"Netherlands\\\",\n \\\"native\\\" : \\\"Nederland\\\",\n \\\"phone\\\" : \\\"31\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Amsterdam\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"nl\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 167,\n \\\"code\\\" : \\\"NO\\\",\n \\\"value\\\" : \\\"Norway\\\",\n \\\"native\\\" : \\\"Norge\\\",\n \\\"phone\\\" : \\\"47\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Oslo\\\",\n \\\"currency\\\" : \\\"NOK\\\",\n \\\"languages\\\" : \\\"no,nb,nn\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 168,\n \\\"code\\\" : \\\"NP\\\",\n \\\"value\\\" : \\\"Nepal\\\",\n \\\"native\\\" : \\\"नपल\\\",\n \\\"phone\\\" : \\\"977\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Kathmandu\\\",\n \\\"currency\\\" : \\\"NPR\\\",\n \\\"languages\\\" : \\\"ne\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 169,\n \\\"code\\\" : \\\"NR\\\",\n \\\"value\\\" : \\\"Nauru\\\",\n \\\"native\\\" : \\\"Nauru\\\",\n \\\"phone\\\" : \\\"674\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Yaren\\\",\n \\\"currency\\\" : \\\"AUD\\\",\n \\\"languages\\\" : \\\"en,na\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 170,\n \\\"code\\\" : \\\"NU\\\",\n \\\"value\\\" : \\\"Niue\\\",\n \\\"native\\\" : \\\"Niuē\\\",\n \\\"phone\\\" : \\\"683\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Alofi\\\",\n \\\"currency\\\" : \\\"NZD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 171,\n \\\"code\\\" : \\\"NZ\\\",\n \\\"value\\\" : \\\"New Zealand\\\",\n \\\"native\\\" : \\\"New Zealand\\\",\n \\\"phone\\\" : \\\"64\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Wellington\\\",\n \\\"currency\\\" : \\\"NZD\\\",\n \\\"languages\\\" : \\\"en,mi\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 172,\n \\\"code\\\" : \\\"OM\\\",\n \\\"value\\\" : \\\"Oman\\\",\n \\\"native\\\" : \\\"عمان\\\",\n \\\"phone\\\" : \\\"968\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Muscat\\\",\n \\\"currency\\\" : \\\"OMR\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 173,\n \\\"code\\\" : \\\"PA\\\",\n \\\"value\\\" : \\\"Panama\\\",\n \\\"native\\\" : \\\"Panamá\\\",\n \\\"phone\\\" : \\\"507\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Panama City\\\",\n \\\"currency\\\" : \\\"PAB,USD\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 174,\n \\\"code\\\" : \\\"PE\\\",\n \\\"value\\\" : \\\"Peru\\\",\n \\\"native\\\" : \\\"Perú\\\",\n \\\"phone\\\" : \\\"51\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Lima\\\",\n \\\"currency\\\" : \\\"PEN\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 175,\n \\\"code\\\" : \\\"PF\\\",\n \\\"value\\\" : \\\"French Polynesia\\\",\n \\\"native\\\" : \\\"Polynésie française\\\",\n \\\"phone\\\" : \\\"689\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Papeetē\\\",\n \\\"currency\\\" : \\\"XPF\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 176,\n \\\"code\\\" : \\\"PG\\\",\n \\\"value\\\" : \\\"Papua New Guinea\\\",\n \\\"native\\\" : \\\"Papua Niugini\\\",\n \\\"phone\\\" : \\\"675\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Port Moresby\\\",\n \\\"currency\\\" : \\\"PGK\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 177,\n \\\"code\\\" : \\\"PH\\\",\n \\\"value\\\" : \\\"Philippines\\\",\n \\\"native\\\" : \\\"Pilipinas\\\",\n \\\"phone\\\" : \\\"63\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Manila\\\",\n \\\"currency\\\" : \\\"PHP\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 178,\n \\\"code\\\" : \\\"PK\\\",\n \\\"value\\\" : \\\"Pakistan\\\",\n \\\"native\\\" : \\\"Pakistan\\\",\n \\\"phone\\\" : \\\"92\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Islamabad\\\",\n \\\"currency\\\" : \\\"PKR\\\",\n \\\"languages\\\" : \\\"en,ur\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 179,\n \\\"code\\\" : \\\"PL\\\",\n \\\"value\\\" : \\\"Poland\\\",\n \\\"native\\\" : \\\"Polska\\\",\n \\\"phone\\\" : \\\"48\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Warsaw\\\",\n \\\"currency\\\" : \\\"PLN\\\",\n \\\"languages\\\" : \\\"pl\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 180,\n \\\"code\\\" : \\\"PM\\\",\n \\\"value\\\" : \\\"Saint Pierre and Miquelon\\\",\n \\\"native\\\" : \\\"Saint-Pierre-et-Miquelon\\\",\n \\\"phone\\\" : \\\"508\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Saint-Pierre\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 181,\n \\\"code\\\" : \\\"PN\\\",\n \\\"value\\\" : \\\"Pitcairn Islands\\\",\n \\\"native\\\" : \\\"Pitcairn Islands\\\",\n \\\"phone\\\" : \\\"64\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Adamstown\\\",\n \\\"currency\\\" : \\\"NZD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 182,\n \\\"code\\\" : \\\"PR\\\",\n \\\"value\\\" : \\\"Puerto Rico\\\",\n \\\"native\\\" : \\\"Puerto Rico\\\",\n \\\"phone\\\" : \\\"1787,1939\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"San Juan\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"es,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 183,\n \\\"code\\\" : \\\"PS\\\",\n \\\"value\\\" : \\\"Palestine\\\",\n \\\"native\\\" : \\\"فلسطين\\\",\n \\\"phone\\\" : \\\"970\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Ramallah\\\",\n \\\"currency\\\" : \\\"ILS\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 184,\n \\\"code\\\" : \\\"PT\\\",\n \\\"value\\\" : \\\"Portugal\\\",\n \\\"native\\\" : \\\"Portugal\\\",\n \\\"phone\\\" : \\\"351\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Lisbon\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"pt\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 185,\n \\\"code\\\" : \\\"PW\\\",\n \\\"value\\\" : \\\"Palau\\\",\n \\\"native\\\" : \\\"Palau\\\",\n \\\"phone\\\" : \\\"680\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Ngerulmud\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 186,\n \\\"code\\\" : \\\"PY\\\",\n \\\"value\\\" : \\\"Paraguay\\\",\n \\\"native\\\" : \\\"Paraguay\\\",\n \\\"phone\\\" : \\\"595\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Asunción\\\",\n \\\"currency\\\" : \\\"PYG\\\",\n \\\"languages\\\" : \\\"es,gn\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 187,\n \\\"code\\\" : \\\"QA\\\",\n \\\"value\\\" : \\\"Qatar\\\",\n \\\"native\\\" : \\\"قطر\\\",\n \\\"phone\\\" : \\\"974\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Doha\\\",\n \\\"currency\\\" : \\\"QAR\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 188,\n \\\"code\\\" : \\\"RE\\\",\n \\\"value\\\" : \\\"Réunion\\\",\n \\\"native\\\" : \\\"La Réunion\\\",\n \\\"phone\\\" : \\\"262\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Saint-Denis\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 189,\n \\\"code\\\" : \\\"RO\\\",\n \\\"value\\\" : \\\"Romania\\\",\n \\\"native\\\" : \\\"România\\\",\n \\\"phone\\\" : \\\"40\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Bucharest\\\",\n \\\"currency\\\" : \\\"RON\\\",\n \\\"languages\\\" : \\\"ro\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 190,\n \\\"code\\\" : \\\"RS\\\",\n \\\"value\\\" : \\\"Serbia\\\",\n \\\"native\\\" : \\\"Србија\\\",\n \\\"phone\\\" : \\\"381\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Belgrade\\\",\n \\\"currency\\\" : \\\"RSD\\\",\n \\\"languages\\\" : \\\"sr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 191,\n \\\"code\\\" : \\\"RU\\\",\n \\\"value\\\" : \\\"Russia\\\",\n \\\"native\\\" : \\\"Россия\\\",\n \\\"phone\\\" : \\\"7\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Moscow\\\",\n \\\"currency\\\" : \\\"RUB\\\",\n \\\"languages\\\" : \\\"ru\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 192,\n \\\"code\\\" : \\\"RW\\\",\n \\\"value\\\" : \\\"Rwanda\\\",\n \\\"native\\\" : \\\"Rwanda\\\",\n \\\"phone\\\" : \\\"250\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Kigali\\\",\n \\\"currency\\\" : \\\"RWF\\\",\n \\\"languages\\\" : \\\"rw,en,fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 193,\n \\\"code\\\" : \\\"SA\\\",\n \\\"value\\\" : \\\"Saudi Arabia\\\",\n \\\"native\\\" : \\\"العربية السعودية\\\",\n \\\"phone\\\" : \\\"966\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Riyadh\\\",\n \\\"currency\\\" : \\\"SAR\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 194,\n \\\"code\\\" : \\\"SB\\\",\n \\\"value\\\" : \\\"Solomon Islands\\\",\n \\\"native\\\" : \\\"Solomon Islands\\\",\n \\\"phone\\\" : \\\"677\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Honiara\\\",\n \\\"currency\\\" : \\\"SBD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 195,\n \\\"code\\\" : \\\"SC\\\",\n \\\"value\\\" : \\\"Seychelles\\\",\n \\\"native\\\" : \\\"Seychelles\\\",\n \\\"phone\\\" : \\\"248\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Victoria\\\",\n \\\"currency\\\" : \\\"SCR\\\",\n \\\"languages\\\" : \\\"fr,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 196,\n \\\"code\\\" : \\\"SD\\\",\n \\\"value\\\" : \\\"Sudan\\\",\n \\\"native\\\" : \\\"السودان\\\",\n \\\"phone\\\" : \\\"249\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Khartoum\\\",\n \\\"currency\\\" : \\\"SDG\\\",\n \\\"languages\\\" : \\\"ar,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 197,\n \\\"code\\\" : \\\"SE\\\",\n \\\"value\\\" : \\\"Sweden\\\",\n \\\"native\\\" : \\\"Sverige\\\",\n \\\"phone\\\" : \\\"46\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Stockholm\\\",\n \\\"currency\\\" : \\\"SEK\\\",\n \\\"languages\\\" : \\\"sv\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 198,\n \\\"code\\\" : \\\"SG\\\",\n \\\"value\\\" : \\\"Singapore\\\",\n \\\"native\\\" : \\\"Singapore\\\",\n \\\"phone\\\" : \\\"65\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Singapore\\\",\n \\\"currency\\\" : \\\"SGD\\\",\n \\\"languages\\\" : \\\"en,ms,ta,zh\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 199,\n \\\"code\\\" : \\\"SH\\\",\n \\\"value\\\" : \\\"Saint Helena\\\",\n \\\"native\\\" : \\\"Saint Helena\\\",\n \\\"phone\\\" : \\\"290\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Jamestown\\\",\n \\\"currency\\\" : \\\"SHP\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 200,\n \\\"code\\\" : \\\"SI\\\",\n \\\"value\\\" : \\\"Slovenia\\\",\n \\\"native\\\" : \\\"Slovenija\\\",\n \\\"phone\\\" : \\\"386\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Ljubljana\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"sl\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 201,\n \\\"code\\\" : \\\"SJ\\\",\n \\\"value\\\" : \\\"Svalbard and Jan Mayen\\\",\n \\\"native\\\" : \\\"Svalbard og Jan Mayen\\\",\n \\\"phone\\\" : \\\"4779\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Longyearbyen\\\",\n \\\"currency\\\" : \\\"NOK\\\",\n \\\"languages\\\" : \\\"no\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 202,\n \\\"code\\\" : \\\"SK\\\",\n \\\"value\\\" : \\\"Slovakia\\\",\n \\\"native\\\" : \\\"Slovensko\\\",\n \\\"phone\\\" : \\\"421\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Bratislava\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"sk\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 203,\n \\\"code\\\" : \\\"SL\\\",\n \\\"value\\\" : \\\"Sierra Leone\\\",\n \\\"native\\\" : \\\"Sierra Leone\\\",\n \\\"phone\\\" : \\\"232\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Freetown\\\",\n \\\"currency\\\" : \\\"SLL\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 204,\n \\\"code\\\" : \\\"SM\\\",\n \\\"value\\\" : \\\"San Marino\\\",\n \\\"native\\\" : \\\"San Marino\\\",\n \\\"phone\\\" : \\\"378\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"City of San Marino\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"it\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 205,\n \\\"code\\\" : \\\"SN\\\",\n \\\"value\\\" : \\\"Senegal\\\",\n \\\"native\\\" : \\\"Sénégal\\\",\n \\\"phone\\\" : \\\"221\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Dakar\\\",\n \\\"currency\\\" : \\\"XOF\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 206,\n \\\"code\\\" : \\\"SO\\\",\n \\\"value\\\" : \\\"Somalia\\\",\n \\\"native\\\" : \\\"Soomaaliya\\\",\n \\\"phone\\\" : \\\"252\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Mogadishu\\\",\n \\\"currency\\\" : \\\"SOS\\\",\n \\\"languages\\\" : \\\"so,ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 207,\n \\\"code\\\" : \\\"SR\\\",\n \\\"value\\\" : \\\"Suriname\\\",\n \\\"native\\\" : \\\"Suriname\\\",\n \\\"phone\\\" : \\\"597\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Paramaribo\\\",\n \\\"currency\\\" : \\\"SRD\\\",\n \\\"languages\\\" : \\\"nl\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 208,\n \\\"code\\\" : \\\"SS\\\",\n \\\"value\\\" : \\\"South Sudan\\\",\n \\\"native\\\" : \\\"South Sudan\\\",\n \\\"phone\\\" : \\\"211\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Juba\\\",\n \\\"currency\\\" : \\\"SSP\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 209,\n \\\"code\\\" : \\\"ST\\\",\n \\\"value\\\" : \\\"São Tomé and Príncipe\\\",\n \\\"native\\\" : \\\"São Tomé e Príncipe\\\",\n \\\"phone\\\" : \\\"239\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"São Tomé\\\",\n \\\"currency\\\" : \\\"STD\\\",\n \\\"languages\\\" : \\\"pt\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 210,\n \\\"code\\\" : \\\"SV\\\",\n \\\"value\\\" : \\\"El Salvador\\\",\n \\\"native\\\" : \\\"El Salvador\\\",\n \\\"phone\\\" : \\\"503\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"San Salvador\\\",\n \\\"currency\\\" : \\\"SVC,USD\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 211,\n \\\"code\\\" : \\\"SX\\\",\n \\\"value\\\" : \\\"Sint Maarten\\\",\n \\\"native\\\" : \\\"Sint Maarten\\\",\n \\\"phone\\\" : \\\"1721\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Philipsburg\\\",\n \\\"currency\\\" : \\\"ANG\\\",\n \\\"languages\\\" : \\\"nl,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 212,\n \\\"code\\\" : \\\"SY\\\",\n \\\"value\\\" : \\\"Syria\\\",\n \\\"native\\\" : \\\"سوريا\\\",\n \\\"phone\\\" : \\\"963\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Damascus\\\",\n \\\"currency\\\" : \\\"SYP\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 213,\n \\\"code\\\" : \\\"SZ\\\",\n \\\"value\\\" : \\\"Swaziland\\\",\n \\\"native\\\" : \\\"Swaziland\\\",\n \\\"phone\\\" : \\\"268\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Lobamba\\\",\n \\\"currency\\\" : \\\"SZL\\\",\n \\\"languages\\\" : \\\"en,ss\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 214,\n \\\"code\\\" : \\\"TC\\\",\n \\\"value\\\" : \\\"Turks and Caicos Islands\\\",\n \\\"native\\\" : \\\"Turks and Caicos Islands\\\",\n \\\"phone\\\" : \\\"1649\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Cockburn Town\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 215,\n \\\"code\\\" : \\\"TD\\\",\n \\\"value\\\" : \\\"Chad\\\",\n \\\"native\\\" : \\\"Tchad\\\",\n \\\"phone\\\" : \\\"235\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"N'Djamena\\\",\n \\\"currency\\\" : \\\"XAF\\\",\n \\\"languages\\\" : \\\"fr,ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 216,\n \\\"code\\\" : \\\"TF\\\",\n \\\"value\\\" : \\\"French Southern Territories\\\",\n \\\"native\\\" : \\\"Territoire des Terres australes et antarctiques fr\\\",\n \\\"phone\\\" : \\\"\\\",\n \\\"continent\\\" : \\\"AN\\\",\n \\\"capital\\\" : \\\"Port-aux-Français\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 217,\n \\\"code\\\" : \\\"TG\\\",\n \\\"value\\\" : \\\"Togo\\\",\n \\\"native\\\" : \\\"Togo\\\",\n \\\"phone\\\" : \\\"228\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Lomé\\\",\n \\\"currency\\\" : \\\"XOF\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 218,\n \\\"code\\\" : \\\"TH\\\",\n \\\"value\\\" : \\\"Thailand\\\",\n \\\"native\\\" : \\\"ประเทศไทย\\\",\n \\\"phone\\\" : \\\"66\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Bangkok\\\",\n \\\"currency\\\" : \\\"THB\\\",\n \\\"languages\\\" : \\\"th\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 219,\n \\\"code\\\" : \\\"TJ\\\",\n \\\"value\\\" : \\\"Tajikistan\\\",\n \\\"native\\\" : \\\"Тоҷикистон\\\",\n \\\"phone\\\" : \\\"992\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Dushanbe\\\",\n \\\"currency\\\" : \\\"TJS\\\",\n \\\"languages\\\" : \\\"tg,ru\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 220,\n \\\"code\\\" : \\\"TK\\\",\n \\\"value\\\" : \\\"Tokelau\\\",\n \\\"native\\\" : \\\"Tokelau\\\",\n \\\"phone\\\" : \\\"690\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Fakaofo\\\",\n \\\"currency\\\" : \\\"NZD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 221,\n \\\"code\\\" : \\\"TL\\\",\n \\\"value\\\" : \\\"East Timor\\\",\n \\\"native\\\" : \\\"Timor-Leste\\\",\n \\\"phone\\\" : \\\"670\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Dili\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"pt\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 222,\n \\\"code\\\" : \\\"TM\\\",\n \\\"value\\\" : \\\"Turkmenistan\\\",\n \\\"native\\\" : \\\"Türkmenistan\\\",\n \\\"phone\\\" : \\\"993\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Ashgabat\\\",\n \\\"currency\\\" : \\\"TMT\\\",\n \\\"languages\\\" : \\\"tk,ru\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 223,\n \\\"code\\\" : \\\"TN\\\",\n \\\"value\\\" : \\\"Tunisia\\\",\n \\\"native\\\" : \\\"تونس\\\",\n \\\"phone\\\" : \\\"216\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Tunis\\\",\n \\\"currency\\\" : \\\"TND\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 224,\n \\\"code\\\" : \\\"TO\\\",\n \\\"value\\\" : \\\"Tonga\\\",\n \\\"native\\\" : \\\"Tonga\\\",\n \\\"phone\\\" : \\\"676\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Nuku'alofa\\\",\n \\\"currency\\\" : \\\"TOP\\\",\n \\\"languages\\\" : \\\"en,to\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 225,\n \\\"code\\\" : \\\"TR\\\",\n \\\"value\\\" : \\\"Turkey\\\",\n \\\"native\\\" : \\\"Türkiye\\\",\n \\\"phone\\\" : \\\"90\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Ankara\\\",\n \\\"currency\\\" : \\\"TRY\\\",\n \\\"languages\\\" : \\\"tr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 226,\n \\\"code\\\" : \\\"TT\\\",\n \\\"value\\\" : \\\"Trinidad and Tobago\\\",\n \\\"native\\\" : \\\"Trinidad and Tobago\\\",\n \\\"phone\\\" : \\\"1868\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Port of Spain\\\",\n \\\"currency\\\" : \\\"TTD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 227,\n \\\"code\\\" : \\\"TV\\\",\n \\\"value\\\" : \\\"Tuvalu\\\",\n \\\"native\\\" : \\\"Tuvalu\\\",\n \\\"phone\\\" : \\\"688\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Funafuti\\\",\n \\\"currency\\\" : \\\"AUD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 228,\n \\\"code\\\" : \\\"TW\\\",\n \\\"value\\\" : \\\"Taiwan\\\",\n \\\"native\\\" : \\\"臺灣\\\",\n \\\"phone\\\" : \\\"886\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Taipei\\\",\n \\\"currency\\\" : \\\"TWD\\\",\n \\\"languages\\\" : \\\"zh\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 229,\n \\\"code\\\" : \\\"TZ\\\",\n \\\"value\\\" : \\\"Tanzania\\\",\n \\\"native\\\" : \\\"Tanzania\\\",\n \\\"phone\\\" : \\\"255\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Dodoma\\\",\n \\\"currency\\\" : \\\"TZS\\\",\n \\\"languages\\\" : \\\"sw,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 230,\n \\\"code\\\" : \\\"UA\\\",\n \\\"value\\\" : \\\"Ukraine\\\",\n \\\"native\\\" : \\\"Україна\\\",\n \\\"phone\\\" : \\\"380\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Kiev\\\",\n \\\"currency\\\" : \\\"UAH\\\",\n \\\"languages\\\" : \\\"uk\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 231,\n \\\"code\\\" : \\\"UG\\\",\n \\\"value\\\" : \\\"Uganda\\\",\n \\\"native\\\" : \\\"Uganda\\\",\n \\\"phone\\\" : \\\"256\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Kampala\\\",\n \\\"currency\\\" : \\\"UGX\\\",\n \\\"languages\\\" : \\\"en,sw\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 232,\n \\\"code\\\" : \\\"UM\\\",\n \\\"value\\\" : \\\"U.S. Minor Outlying Islands\\\",\n \\\"native\\\" : \\\"United States Minor Outlying Islands\\\",\n \\\"phone\\\" : \\\"\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 233,\n \\\"code\\\" : \\\"US\\\",\n \\\"value\\\" : \\\"United States\\\",\n \\\"native\\\" : \\\"United States\\\",\n \\\"phone\\\" : \\\"1\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Washington D.C.\\\",\n \\\"currency\\\" : \\\"USD,USN,USS\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 234,\n \\\"code\\\" : \\\"UY\\\",\n \\\"value\\\" : \\\"Uruguay\\\",\n \\\"native\\\" : \\\"Uruguay\\\",\n \\\"phone\\\" : \\\"598\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Montevideo\\\",\n \\\"currency\\\" : \\\"UYI,UYU\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 235,\n \\\"code\\\" : \\\"UZ\\\",\n \\\"value\\\" : \\\"Uzbekistan\\\",\n \\\"native\\\" : \\\"O‘zbekiston\\\",\n \\\"phone\\\" : \\\"998\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Tashkent\\\",\n \\\"currency\\\" : \\\"UZS\\\",\n \\\"languages\\\" : \\\"uz,ru\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 236,\n \\\"code\\\" : \\\"VA\\\",\n \\\"value\\\" : \\\"Vatican City\\\",\n \\\"native\\\" : \\\"Vaticano\\\",\n \\\"phone\\\" : \\\"39066,379\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Vatican City\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"it,la\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 237,\n \\\"code\\\" : \\\"VC\\\",\n \\\"value\\\" : \\\"Saint Vincent and the Grenadines\\\",\n \\\"native\\\" : \\\"Saint Vincent and the Grenadines\\\",\n \\\"phone\\\" : \\\"1784\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Kingstown\\\",\n \\\"currency\\\" : \\\"XCD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 238,\n \\\"code\\\" : \\\"VE\\\",\n \\\"value\\\" : \\\"Venezuela\\\",\n \\\"native\\\" : \\\"Venezuela\\\",\n \\\"phone\\\" : \\\"58\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Caracas\\\",\n \\\"currency\\\" : \\\"VEF\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 239,\n \\\"code\\\" : \\\"VG\\\",\n \\\"value\\\" : \\\"British Virgin Islands\\\",\n \\\"native\\\" : \\\"British Virgin Islands\\\",\n \\\"phone\\\" : \\\"1284\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Road Town\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 240,\n \\\"code\\\" : \\\"VI\\\",\n \\\"value\\\" : \\\"U.S. Virgin Islands\\\",\n \\\"native\\\" : \\\"United States Virgin Islands\\\",\n \\\"phone\\\" : \\\"1340\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Charlotte Amalie\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 241,\n \\\"code\\\" : \\\"VN\\\",\n \\\"value\\\" : \\\"Vietnam\\\",\n \\\"native\\\" : \\\"Việt Nam\\\",\n \\\"phone\\\" : \\\"84\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Hanoi\\\",\n \\\"currency\\\" : \\\"VND\\\",\n \\\"languages\\\" : \\\"vi\\\",\n \\\"active_default\\\" : 1\n },\n {\n \\\"id\\\" : 242,\n \\\"code\\\" : \\\"VU\\\",\n \\\"value\\\" : \\\"Vanuatu\\\",\n \\\"native\\\" : \\\"Vanuatu\\\",\n \\\"phone\\\" : \\\"678\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Port Vila\\\",\n \\\"currency\\\" : \\\"VUV\\\",\n \\\"languages\\\" : \\\"bi,en,fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 243,\n \\\"code\\\" : \\\"WF\\\",\n \\\"value\\\" : \\\"Wallis and Futuna\\\",\n \\\"native\\\" : \\\"Wallis et Futuna\\\",\n \\\"phone\\\" : \\\"681\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Mata-Utu\\\",\n \\\"currency\\\" : \\\"XPF\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 244,\n \\\"code\\\" : \\\"WS\\\",\n \\\"value\\\" : \\\"Samoa\\\",\n \\\"native\\\" : \\\"Samoa\\\",\n \\\"phone\\\" : \\\"685\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Apia\\\",\n \\\"currency\\\" : \\\"WST\\\",\n \\\"languages\\\" : \\\"sm,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 245,\n \\\"code\\\" : \\\"XK\\\",\n \\\"value\\\" : \\\"Kosovo\\\",\n \\\"native\\\" : \\\"Republika e Kosovës\\\",\n \\\"phone\\\" : \\\"377,381,386\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Pristina\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"sq,sr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 246,\n \\\"code\\\" : \\\"YE\\\",\n \\\"value\\\" : \\\"Yemen\\\",\n \\\"native\\\" : \\\"اليَمَن\\\",\n \\\"phone\\\" : \\\"967\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Sana'a\\\",\n \\\"currency\\\" : \\\"YER\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 247,\n \\\"code\\\" : \\\"YT\\\",\n \\\"value\\\" : \\\"Mayotte\\\",\n \\\"native\\\" : \\\"Mayotte\\\",\n \\\"phone\\\" : \\\"262\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Mamoudzou\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 248,\n \\\"code\\\" : \\\"ZA\\\",\n \\\"value\\\" : \\\"South Africa\\\",\n \\\"native\\\" : \\\"South Africa\\\",\n \\\"phone\\\" : \\\"27\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Pretoria\\\",\n \\\"currency\\\" : \\\"ZAR\\\",\n \\\"languages\\\" : \\\"af,en,nr,st,ss,tn,ts,ve,xh,zu\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 249,\n \\\"code\\\" : \\\"ZM\\\",\n \\\"value\\\" : \\\"Zambia\\\",\n \\\"native\\\" : \\\"Zambia\\\",\n \\\"phone\\\" : \\\"260\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Lusaka\\\",\n \\\"currency\\\" : \\\"ZMK\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 250,\n \\\"code\\\" : \\\"ZW\\\",\n \\\"value\\\" : \\\"Zimbabwe\\\",\n \\\"native\\\" : \\\"Zimbabwe\\\",\n \\\"phone\\\" : \\\"263\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Harare\\\",\n \\\"currency\\\" : \\\"ZWL\\\",\n \\\"languages\\\" : \\\"en,sn,nd\\\",\n \\\"active_default\\\" : 0\n }\n ]}\n \");\n\n foreach ( $data->countries as $item ){\n \\App\\Models\\Countries::create([\n 'id' => $item->id,\n 'code' => $item->code,\n 'value' => $item->value,\n 'native' => $item->native,\n 'phone' => $item->phone,\n 'continent' => $item->continent,\n 'capital' => $item->capital,\n 'currency' => $item->currency,\n 'languages' => $item->languages,\n 'active_default' => $item->active_default,\n ]);\n }\n }",
"function createNewTrelloLabels($newCustomerData) {\n $name = rawurlencode($newCustomerData);\n\t\t\t$urlT = 'https://api.trello.com/1/labels?name='.$name.'&color=black&idBoard='.$this->boardID.'&key='.$this->trelloKey.'&token='.$this->trelloToken;\n\t\t\t$chT = curl_init();\n\t\t\tcurl_setopt($chT, CURLOPT_URL, $urlT);\n\t\t\tcurl_setopt($chT, CURLOPT_POST, TRUE);\n\t\t\tcurl_setopt($chT, CURLOPT_RETURNTRANSFER, true);\n\t\t\tcurl_exec($chT);\n\t\t\tcurl_close($chT);\n\t\t}",
"public function testLabelCreate()\n {\n $user = factory(User::class)->create();\n //authenticating as the user\n Passport::actingAs($user);\n\n $response = $this->withHeaders([\n 'Content-Type' => 'Application/json',\n ])->json('POST', '/api/makelabel',[\n \n 'label'=>'amansu label',\n ]);\n\n $response->assertStatus(201)->assertJson(['message' => 'Note Created']);\n }",
"static function makeRowLabel($record) {\n global $user;\n // Start with client.\n if ($user->isPluginEnabled('cl'))\n $label = $record['client'];\n\n // Add project.\n if (!empty($label) && !empty($record['project'])) $label .= ' - ';\n $label .= $record['project'];\n\n // Add task.\n if (!empty($label) && !empty($record['task'])) $label .= ' - ';\n $label .= $record['task'];\n\n // Add custom field 1.\n if ($user->isPluginEnabled('cf')) {\n if (!empty($label) && !empty($record['cf_1_value'])) $label .= ' - ';\n $label .= $record['cf_1_value'];\n }\n\n return $label;\n }",
"function getLabels()\n{\n $sql=\"SELECT name FROM tablets.manufacturers\";\n $brands=$GLOBALS['db']->getAllValues($sql);\n $brands=json_encode($brands);\n //print_r($brands);\n $lang=$_SESSION['lang'];\n if($lang==\"en_us\"){\n\n $labels = <<<EOF\n[\n {\"type\":\"range\",\"name\":\"total test result\",\"label\":\"Total test result\",\n \"value\":[{\">=\":0,\"<=\":1.5},{\">\":1.5,\"<=\":2.5},{\">\":2.5,\"<=\":3.5},{\">\":3.5,\"<=\":4.5},{\">\":4.5,\"<=\":5.5}],\n \"option\":[\"very good \",\"good \",\"average\",\"sufficient\",\"poor\"]},\n {\"type\":\"date\",\"name\":\"Publication date\",\"label\":\"Tested date\",\n \"value\":[2016,2015,2014],\n \"option\":[2016,2015,2014]},\n {\"type\":\"string\",\"name\":\"Brand\",\"label\":\"Brands\",\n \"value\":$brands,\n \"option\":$brands},\n {\"type\":\"range\",\"name\":\"Screen image diagonal\",\"label\":\"Screen image diagonal\",\n \"value\":[{\"<\":8},{\">=\":8,\"<=\":10},{\">\":10}],\n<<<<<<< HEAD\n \"option\":[\"< 8\\\"\",\"8 - 10\\\"\",\"> 10\\\"\"]},\n=======\n \"option\":[\"> 8\\\"\",\"8 - 10\\\"\",\"> 10\\\"\"]},\n>>>>>>> 7f3fb6250d696d7e9e5bba2a85f6050a0c02fc75\n {\"type\":\"range\",\"name\":\"Native resolution (height)\",\"label\":\"Native resolution (height)\",\n \"value\":[{\"<\":800},{\">=\":800,\"<=\":1200},{\">\":1200,\"<=\":1500},{\">\":1500,\"<=\":2736}],\n \"option\":[\"< 800 Pixel\",\"800 - 1200 Pixel\",\"1200 - 1500 Pixel\",\"1500 -2736 Pixel\"]},\n {\"type\":\"range\",\"name\":\"Native resolution (width)\",\"label\":\"Native resolution (width)\",\n \"value\":[{\"<\":1300},{\">=\":1300,\"<=\":1900},{\">\":1900,\"<=\":2000},{\">\":2000,\"<=\":2736}],\n \"option\":[\"< 1300 Pixel\",\"1300 - 1900 Pixel\",\"1900 - 2000 Pixel\",\"2000 - 2736 Pixel\"]},\n {\"type\":\"string\",\"name\":\"OS installed\",\"label\":\"OS installed\",\n \"value\":[\"Android\",\"iOS\",\"Windows\"],\n \"option\":[\"Android\",\"iOS\",\"Windows\"]},\n {\"type\":\"string\",\"name\":\"Claimed size of internal storage [Gb]\",\"label\":\"Claimed size of internal storage\",\n \"value\":[4,8,16,32,64,128,256],\n \"option\":[\"4GB\",\"8GB\",\"16GB\",\"32GB\",\"64GB\",\"128GB\",\"256GB\"]},\n {\"type\":\"multi\",\"name\":\"\",\"label\":\"Connection\",\n \"value\":[\"3G\",\"LTE\",\"Bluetooth\",\"GPS\",\"NFC\",\"Phone functionality\"],\n \"option\":[\"3G\",\"LTE\",\"Bluetooth\",\"GPS\",\"NFC\",\"Phone functionality\"]},\n {\"type\":\"multi\",\"name\":\"\",\"label\":\"WLAN\",\n \"value\":[\"Wi-Fi G\",\"Wi-Fi N\",\"Wi-Fi 5GHzN\",\"Wi-Fi AC\"],\n \"option\":[\"Wi-Fi G\",\"Wi-Fi N\",\"Wi-Fi 5GHzN\",\"Wi-Fi AC\"]},\n {\"type\":\"multi\",\"name\":\"\",\"label\":\"USB\",\n \"value\":[\"USB 4.0 [y/n]\",\"USB 3.0 [y/n]\",\"USB 2.0 [y/n]\",\"Mini-USB [y/n]\" ,\"Micro-USB [y/n]\", \"HDMI\"],\n \"option\":[\"USB 4.0\",\"USB 3.0\",\"USB 2.0\",\"Mini-USB\" ,\"Micro-USB\", \"HDMI\"]},\n {\"type\":\"multi\",\"name\":\"\",\"label\":\"SD\",\n \"value\":[\"full SD size\",\"mini-SD\",\"micro-SD\"],\n \"option\":[\"full SD size\",\"mini-SD\",\"micro-SD\"]},\n {\"type\":\"multi\",\"name\":\"\",\"label\":\"Accessories\",\n \"value\":[\"Physical keyboard provided\",\"Stylus supplied\"],\n \"option\":[\"Physical keyboard provided\",\"Stylus supplied\"]},\n {\"type\":\"multi\",\"name\":\"\",\"label\":\"Robustness\",\n \"value\":[\"Manufacturer claims waterproof?\",\"Manufacturer claims water resistant?\"],\n \"option\":[\"Waterproof, stated\",\"Water resistant, stated\"]}\n ]\nEOF;\n\n }else if($lang==\"zh_cn\"){\n $sql=\"select CHN from sdictionary where oriword in( SELECT distinct value FROM mobilephones.results where id_evaluation=100001759)\";\n $brandLabels=$GLOBALS['db']->getAllValues($sql);\n $brandLabels=json_encode($brandLabels);\n $labels = <<<EOF\n [\n {\"type\":\"range\",\"name\":\"total test result\",\"label\":\"总评分\",\n \"value\":[{\">=\":0,\"<=\":1.5},{\">\":1.5,\"<=\":2.5},{\">\":2.5,\"<=\":3.5},{\">\":3.5,\"<=\":4.5},{\">\":4.5,\"<=\":5.5}],\n \"option\":[\"优秀\",\"良好\",\"中等\",\"尚可\",\"差劣\"]},\n {\"type\":\"date\",\"name\":\"Publication date\",\"label\":\"测试时间\",\n \"value\":[2016,2015,2014],\n \"option\":[2016,2015,2014]},\n {\"type\":\"string\",\"name\":\"Brand\",\"label\":\"品牌\",\n \"value\":$brands,\n \"option\":$brandLabels}\n ]\nEOF;\n }\n\n $arr = json_decode($labels, true);\n foreach ($arr as $key => $item) {\n if ($item['type'] == 'string') {\n $index=0;\n foreach ($item['value'] as $value) {\n if($item['name']=='Brand'){\n $sql=\"select count(*)from products where id_manufacturer=(select id_manufacturer from manufacturers where `name`='\".$value.\"')\";\n }else\n $sql=\"select count(*) from results where id_evaluation in(select id_evaluation from evaluations where name='\".$item['name'].\"') and value like'%$value%'\";\n //echo $sql;\n $v = $GLOBALS['db']->getOne($sql);\n //echo $value.\" \".$v.\" \".$index.\"+++\\n\";\n if($v==0){\n array_splice($arr[$key]['option'],$index,1);\n array_splice($arr[$key]['value'],$index,1);\n $index--;\n // print_r($arr[$key]['option']);\n\n }else{\n $arr[$key]['number'][] = $v;\n }\n\n\n $index++;\n }\n } else if($item['type'] == 'range') {\n foreach ($item['value'] as $value) {\n $opts = array_keys($value);\n $len = count($opts);\n if($item['name'] == 'total test result'){//评分数据四舍五入\n if ($len == 1 && $opts[0] != -1) {\n $sql = \"select count(*) from results where format(6-value,1)\" . $opts[0] . $value[$opts[0]];\n } else if ($len == 2 && $opts[0] != -1) {\n $sql = \"select count(*) from results where format(6-value,1)\" . $opts[0] . $value[$opts[0]] . \" and format(6-value,1)\" . $opts[1] . $value[$opts[1]];\n }\n }else{//property数值正常读取\n if ($len == 1 && $opts[0] != -1) {\n $sql = \"select count(*) from results where value\" . $opts[0] . $value[$opts[0]];\n } else if ($len == 2 && $opts[0] != -1) {\n $sql = \"select count(*) from results where value\" . $opts[0] . $value[$opts[0]] . \" and value\" . $opts[1] . $value[$opts[1]];\n }\n }\n\n $sql .= \" and id_evaluation=(select id_evaluation from evaluations where \";\n if ($item['name'] == 'total test result')\n $sql .= \"name='\" . $item['name'] . \"')\";\n else\n $sql .= \"id_evaluation>99999999 and name='\" . $item['name'] . \"')\";\n $v = $GLOBALS['db']->getOne($sql);\n $arr[$key]['number'][] = $v;\n }\n }else if($item['type'] == 'date'){\n foreach ($item['value'] as $value) {\n $sql = \"select count(*) from products where FROM_UNIXTIME(timestamp_created, '%Y' )='\" . $value . \"'\" ;\n //echo $sql;\n $v = $GLOBALS['db']->getOne($sql);\n $arr[$key]['number'][] = $v;\n }\n }else if($item['type'] == 'multi'){\n foreach ($item['value'] as $value) {\n $sql = \"select count(*) from results where value=1\" . \" and id_evaluation=(select id_evaluation from evaluations where id_evaluation>99999999 and name='\" .$value . \"')\";\n //echo $sql;\n $v = $GLOBALS['db']->getOne($sql);\n $arr[$key]['number'][] = $v;\n }\n }\n }\n sortByNumber($arr[2]);\n //print_r($arr);\n return json_encode($arr);\n}",
"public function reverseTransform($string) {\n\t\t\treturn json_decode($string);\n\t\t}",
"public function createLabel($arrLabel){\r\n\t\treturn '<label class=\"'.$arrLabel['class'].'\">'.$arrLabel['message'].'</label>';\t\r\n\t}",
"function FormatLabel(&$format, $newFormat)\n{\n $ret = '';\n \n if (isset($format) && is_array($format)) {\n if( $newFormat )\n {\n if (array_key_exists('format', $format)) {\n $ret = $format['format'];\n }\n if (array_key_exists('args', $format)) {\n foreach( $format['args'] as $index => &$arg )\n {\n $key = $index + 1;\n $key = '$' . $key;\n $type = $arg['type'];\n if( $type == 'url' )\n $value = \"<a rel=\\\"nofollow\\\" href=\\\"{$arg['localized_value']}\\\" target=\\\"_blank\\\">\" . htmlspecialchars(FitText($arg['localized_value'],80)) . '</a>';\n else\n $value = htmlspecialchars($arg['localized_value']);\n $ret = str_replace($key, $value, $ret);\n }\n }\n }\n else\n {\n foreach( $format as &$item )\n {\n $type = $item['type'];\n if( $type == 'url' )\n {\n $ret .= \"<a rel=\\\"nofollow\\\" href=\\\"{$item['value']}\\\" target=\\\"_blank\\\">\" . htmlspecialchars(FitText($item['value'],80)) . '</a>';\n }\n else\n $ret .= htmlspecialchars($item['value']);\n }\n }\n }\n \n return $ret;\n}",
"function convertJson($str){\n $str = str_replace(\"idPersonne\",'\"idPersonne\"',$str);\n $str = str_replace(\"{nom\",'{\"nom\"',$str);\n $str = str_replace(\"prenom\",'\"prenom\"',$str);\n $str = str_replace(\"'\",'\"',$str);\n return $str;\n }",
"public static function parseResult($jsonString)\n\t{\n\t\t$object = json_decode($jsonString);\n\t\t$taxlines = array();\n\t\t$taxsummary = array();\n\t\t$taxaddresses = array();\n\t\t$messages = array();\n\t\t$resultcode= null;\n\t\t$doccode= null;\n\t\t$docdate= null;\n\t\t$timestamp= null;\n\t\t$totalamount= null;\n\t\t$totaldiscount= null;\n\t\t$totalexemption= null;\n\t\t$totaltaxable= null;\n\t\t$totaltax= null;\n\t\t$totaltaxcalculated= null;\n\t\t$taxdate= null;\n\n\t\tif( property_exists($object,\"ResultCode\")) $resultcode = $object->ResultCode; \t\t\n\t\tif( property_exists($object,\"DocCode\")) $doccode = $object->DocCode; \n\t\tif( property_exists($object,\"DocDate\")) $docdate = $object->DocDate;\t\t\t \t\t\t\t\n\t\tif( property_exists($object,\"Timestamp\")) $timestamp = $object->Timestamp;\t\t\t\n\t\tif( property_exists($object,\"TotalAmount\")) $totalamount = $object->TotalAmount;\t\t\n\t\tif( property_exists($object,\"TotalDiscount\")) $totaldiscount = $object->TotalDiscount;\t\n\t\tif( property_exists($object,\"TotalExemption\")) $totalexemption = $object->TotalExemption;\t\n\t\tif( property_exists($object,\"TotalTaxable\")) $totaltaxable = $object->TotalTaxable;\t \n\t\tif( property_exists($object,\"TotalTax\")) $totaltax = $object->TotalTax;\t\t \t\n\t\tif( property_exists($object,\"TotalTaxCalculated\")) $totaltaxcalculated = $object->TotalTaxCalculated;\t\t \n\t\tif( property_exists($object,\"TaxDate\")) $taxdate = $object->TaxDate;\t\t\n\n\t\t\n\t\tif(property_exists($object, \"TaxLines\"))\n\t\t\t$taxlines = TaxLine::parseTaxLines(\"{\\\"TaxLines\\\": \".json_encode($object->TaxLines).\"}\");\n\t\tif(property_exists($object, \"TaxSummary\"))\n\t\t\t$taxsummary = TaxDetail::parseTaxDetails(\"{\\\"TaxDetails\\\": \".json_encode($object->TaxSummary).\"}\");\n\t\tif(property_exists($object, \"TaxAddresses\"))\n\t\t\t$taxaddresses = Address::parseAddress(\"{\\\"TaxAddresses\\\": \".json_encode($object->TaxAddresses).\"}\");\t\n\t\tif(property_exists($object, \"Messages\"))\n\t\t\t$messages = Message::parseMessages(\"{\\\"Messages\\\": \".json_encode($object->Messages).\"}\");\n\t\t\n\t\treturn new self( $resultcode , $messages, $doccode, $docdate, \n\t\t$timestamp, $totalamount, $totaldiscount,\n\t\t$totalexemption, $totaltaxable, $totaltax, $totaltaxcalculated,\n\t\t$taxdate, $taxlines, $taxsummary, $taxaddresses );\t\n\t}",
"public function __construct(string $label)\n {\n parent::__construct();\n $this->setLabel($label);\n $this->setId((string) Uuid::uuid1());\n }",
"public function get_label() {\n\t\t\treturn __( 'Costumapi', 'text-domain' );\n\t\t}",
"function buildLabel($label) {\n return check_plain($label);\n }",
"public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"Label\",$param) and $param[\"Label\"] !== null) {\n $this->Label = $param[\"Label\"];\n }\n\n if (array_key_exists(\"Suggestion\",$param) and $param[\"Suggestion\"] !== null) {\n $this->Suggestion = $param[\"Suggestion\"];\n }\n\n if (array_key_exists(\"Keywords\",$param) and $param[\"Keywords\"] !== null) {\n $this->Keywords = $param[\"Keywords\"];\n }\n\n if (array_key_exists(\"Score\",$param) and $param[\"Score\"] !== null) {\n $this->Score = $param[\"Score\"];\n }\n\n if (array_key_exists(\"LibType\",$param) and $param[\"LibType\"] !== null) {\n $this->LibType = $param[\"LibType\"];\n }\n\n if (array_key_exists(\"LibId\",$param) and $param[\"LibId\"] !== null) {\n $this->LibId = $param[\"LibId\"];\n }\n\n if (array_key_exists(\"LibName\",$param) and $param[\"LibName\"] !== null) {\n $this->LibName = $param[\"LibName\"];\n }\n\n if (array_key_exists(\"SubLabel\",$param) and $param[\"SubLabel\"] !== null) {\n $this->SubLabel = $param[\"SubLabel\"];\n }\n\n if (array_key_exists(\"Tags\",$param) and $param[\"Tags\"] !== null) {\n $this->Tags = [];\n foreach ($param[\"Tags\"] as $key => $value){\n $obj = new Tag();\n $obj->deserialize($value);\n array_push($this->Tags, $obj);\n }\n }\n }",
"public function ajaxProcessPrintZprnLabel()\n {\n $id_order = (int)Tools::getValue('id_order');\n $order = new Order($id_order);\n\n if (!Validate::isLoadedObject($order)) {\n exit('Order not exists');\n }\n\n $label_format = SpringXbsHelper::get(Springxbs::LABEL_FORMAT);\n $shipment = \\Db::getInstance()->getRow(\"SELECT * FROM \" . _DB_PREFIX_ . \"springxbs_shipment \n WHERE id_order = '\" . (int)$order->id . \"' AND label_format='\" . pSQL($label_format) . \"'\");\n\n if (!$shipment['label']) {\n exit('Shipment not ordered yet');\n }\n\n $label = SpringXbsHelper::decodeData($shipment['label']);\n echo $label;\n exit();\n }",
"function request_shipping_label($data)\n {\n // Note you may want to associate this in some other way, like with a database ID.\n $this->PartnerTransactionID = substr(uniqid(rand(), true), 0, 10);\n\n $xml = '<LabelRequest Test=\"NO\" LabelSize=\"4X6\" LabelType=\"Default\" LabelSubtype=\"None\" ImageFormat=\"GIF\">\n\t\t\t\t\t<RequesterID>' . $this->RequesterID . '</RequesterID>\n\t\t\t\t\t<AccountID>' . $this->AccountID . '</AccountID>\n\t\t\t\t\t<PassPhrase>' . $this->PassPhrase . '</PassPhrase>\n\t\t\t\t\t<PartnerTransactionID>' . $this->PartnerTransactionID . '</PartnerTransactionID>';\n\n $xml .= '<IntegratedFormType>Form2976</IntegratedFormType>';\n\n if (!empty($data)) {\n foreach ($data as $node_key => $node_value) {\n $xml .= '<' . $node_key . '>' . $node_value . '</' . $node_key . '>';\n }\n }\n\n $xml .= '<ResponseOptions PostagePrice=\"TRUE\"/>\n\t\t\t\t</LabelRequest>';\n\n $data = array(\"labelRequestXML\" => $xml);\n\n\n\n $request = $this->client->post('/LabelService/EwsLabelService.asmx/GetPostageLabelXML', array(), $data);\n return $this->send_request($request);\n }",
"protected function getLabelByApi($id_order, $service_name, $label_format)\n {\n $shipment = $this->getShipment($id_order, $service_name);\n $test_mode = SpringXbsHelper::get(Springxbs::MODULE_TEST_MODE_NAME);\n\n if (isset($shipment['test_mode']) && $shipment['test_mode'] != $test_mode) {\n $this->voidShipment($id_order);\n $this->orderShipment($id_order);//reorder shipment\n exit();\n }\n\n if (!$shipment) {\n exit('The shipment is not exists');\n }\n\n if ($shipment['label_format'] == $label_format) {\n $this->outputLabel(\n $id_order,\n SpringXbsHelper::decodeData($shipment['label']),\n $label_format\n );\n }\n\n $order = new Order($id_order);\n\n $tracking_items = array(\n array(\n \"ShipperReference\" =>\n $order->reference . \"-\" . SpringXbsHelper::get(Springxbs::API_SPRING_SIDE_USER_ID)\n ),\n );\n\n $system_tn = SpringTools::getWsShippingNumber($id_order);\n $tracking_numbers = array_unique(array_filter(array_map('trim', array(\n $shipment['tracking_number'],\n $system_tn,\n ))));\n\n foreach ($tracking_numbers as $tracking_number) {\n $tracking_items[] = array(\n \"TrackingNumber\" => $tracking_number,\n );\n }\n\n foreach ($tracking_items as $shipment_data) {\n $request_data_enc = array(\n \"Apikey\" => SpringXbsHelper::get(Springxbs::MODULE_API_KEY_NAME),\n \"Command\" => \"GetShipmentLabel\",\n \"Shipment\" => $shipment_data,\n );\n $api_result = $this->getApiData($request_data_enc, $test_mode);\n\n if (!isset($api_result['Error']) && isset($api_result['Shipment'])) {\n //success\n \\Db::getInstance()->execute(\n \"UPDATE \" . _DB_PREFIX_ . \"springxbs_shipment\n SET label = '\" . pSQL($api_result['Shipment']['LabelImage']) . \"',\n label_format = '\" . pSQL($api_result['Shipment']['LabelFormat']) . \"', \n test_mode = \" . (int)$test_mode . \", \n error_level = \" . (int)$api_result['ErrorLevel'] . \" \n WHERE id_order = \" . (int)$id_order\n );\n\n $this->outputLabel(\n $id_order,\n SpringXbsHelper::decodeData($api_result['Shipment']['LabelImage']),\n $api_result['Shipment']['LabelFormat']\n );\n return true;\n }\n }\n\n return $api_result['Error'] ?: $api_result['error'];//Response or network error\n }",
"public function inputlabel (\\stdClass $param);",
"function process_line($l) {\n\n $sum = 0;\n $decoded_line = json_decode($l, true);\n// var_dump($decoded_line);\n\n $items = $decoded_line[\"menu\"][\"items\"];\n// var_dump($items);\n\n foreach ($items as $item) {\n// var_dump($item);\n\n if (!is_array($item)) {\n continue;\n }\n\n if (array_key_exists('label', $item)) {\n// var_dump($item);\n $sum += $item['id'];\n }\n\n }\n return $sum;\n}",
"public function GetLabel();",
"function createElementFromJson($json) {\n $category = $json[\"category\"];\n\n switch($category) {\n case \"cartaCredito\": return CartaCredito::createFromJson($json);\n case \"contoBancario\": return ContoBancario::createFromJson($json);\n case \"credenzialeAccesso\": return CredenzialeAccesso::createFromJson($json);\n case \"codiceFiscale\": return CodiceFiscale::createFromJson($json);\n default: return null;\n }\n}",
"public function explotaJsonGuion($json)\n\t\t{\n\t\t\t#Ej: \"Departamento: Guatemala - Municipio: Guatemala\"\n\t\t\t$var = json_decode($json);\n\t\t\t$varPrint = \"\";\n\n\t\t\tforeach ($var as $key => $value) \n\t\t\t{\n\t\t\t\t$varPrint = $varPrint.$key.\": \".$value.\" - \";\n\t\t\t}\n\n\t\t\t$varPrint = $varPrint.\"--\";\n\t\t\t$varPrint = str_replace(\"- --\", \"\", $varPrint);\n\t\t\treturn $varPrint;\n\t\t}",
"private function createLabel($no_urut,$jumlah,$prefix){\n $data =[];\n for ($i=($no_urut+1) ;$i<=($no_urut+$jumlah);$i++)\n {\n $data [] = $prefix.sprintf(\"%04s\", $i);//500 Nun B 0001-0003\n }\n return $data;\n }",
"public function generateLabels();",
"public function get_label();",
"public function get_label();",
"public function json() {\n\t\t$data = parent::json();\n\n\t\t$data['id'] = $this->type . '-' . $this->id;\n\t\t$data['label'] = html_entity_decode( $this->label, ENT_QUOTES, get_bloginfo( 'charset' ) );\n\t\t$data['value'] = $this->value();\n\t\t$data['link'] = $this->get_link();\n\t\t$data['defaultValue'] = $this->setting->default;\n\n\t\treturn $data;\n\t}",
"public function fromJson(string $json){\n $this->content = json_decode($json);\n if(array_key_exists($this->idField, $this->content)){//verifica se possui id se sim seta o id; mesmo comportamento de formArray;\n $this->{$this->idField} = $this->content[$this->idField];\n }\n }",
"public function __construct(string $label)\n {\n $this->label = $label;\n }",
"public function decode($json);",
"public function created(Label $label): void\n {\n if ($label->labelable instanceof LabelableWithLocationContract) {\n $label->labelable->incrementLocationQuantity($label->location_id);\n }\n }",
"function createCartCountLabel(){\n $count = getCartCount();\n $label = \" \";\n \n if($count != 0) {\n $label = '<div class = \"ui blue horizontal label\">'.$count.'</div>';\n }\n return $label;\n}",
"public function getJsonString() {\n return json_encode([\n 'net' => $this->net,\n 'tax' => $this->tax,\n ]);\n }",
"public static function createFromJson(string $json): self\n {\n $data = json_decode($json, true);\n\n return new self((bool) $data['status'], $data['returnData']);\n }",
"public function run()\n {\n $now = Carbon::now()->toDateTimeString();\n\n Label::truncate();\n\n $labels = collect([\n [\n 'en' => 'test',\n 'ja' => 'テスト',\n ],\n [\n 'en' => 'biller',\n 'ja' => '請求元',\n ],\n [\n 'en' => 'particulars',\n 'ja' => '明細書',\n ],\n [\n 'en' => 'amount',\n 'ja' => '数量',\n ],\n [\n 'en' => 'status',\n 'ja' => '決済状況',\n ],\n [\n 'en' => 'pending',\n 'ja' => '未決済',\n ],\n [\n 'en' => 'paid',\n 'ja' => '済み',\n ],\n [\n 'en' => 'submit',\n 'ja' => '確認',\n ],\n [\n 'en' => 'card number',\n 'ja' => 'カード番号',\n ],\n [\n 'en' => 'expiration date',\n 'ja' => '有効期限',\n ],\n [\n 'en' => 'name on card',\n 'ja' => 'カードの名前',\n ],\n [\n 'en' => 'name on card',\n 'ja' => 'カードの名前',\n ],\n [\n 'en' => 'security code',\n 'ja' => 'セキュリティコード',\n ],\n [\n 'en' => 'save card',\n 'ja' => 'カードを保存',\n ],\n [\n 'en' => 'invoice no.',\n 'ja' => '請求書番号。',\n ],\n [\n 'en' => 'card details',\n 'ja' => 'カードの詳細',\n ],\n [\n 'en' => 'card error',\n 'ja' => 'カードエラー',\n ],\n [\n 'en' => 'invalid card',\n 'ja' => '無効なカード',\n ],\n [\n 'en' => 'login to all payment',\n 'ja' => 'allpaymentにログインします',\n ],\n [\n 'en' => 'email address',\n 'ja' => 'イーメールアドレス',\n ],\n [\n 'en' => 'password',\n 'ja' => 'パスワード',\n ],\n [\n 'en' => 'forgot password?',\n 'ja' => 'パスワードを再設定する',\n ],\n [\n 'en' => 'register a new account',\n 'ja' => '新しいアカウントを登録する',\n ],\n [\n 'en' => 'login',\n 'ja' => 'ログインする',\n ],\n [\n 'en' => 'pay as guest',\n 'ja' => 'ゲストとして支払う',\n ],\n [\n 'en' => 'name',\n 'ja' => '名前',\n ],\n [\n 'en' => 'confirm password',\n 'ja' => 'パスワードの確認',\n ],\n [\n 'en' => 'existing account',\n 'ja' => '既存のアカウント',\n ],\n [\n 'en' => 'register',\n 'ja' => '登録',\n ],\n ]);\n\n Label::insert(\n $labels->map(function($label) use ($now) {\n return array_merge(\n $label,\n [\n 'created_at' => $now,\n 'updated_at' => $now,\n ],\n );\n })->toArray()\n );\n }",
"function Release_raw($jsonString='')\n {\n //--------------------------------------------------------------------\n // I'm basically OK with being quiet on missing JSON property names\n //--------------------------------------------------------------------\n error_reporting( error_reporting() & ~E_NOTICE );\n error_reporting( error_reporting() & ~E_WARNING );\n\n if($json = $this->getJSON($jsonString) )\n { \n $this->id= $json['id'];\n $this->title= $json['title'];\n $this->artist= $json['artist'];\n $this->added= $json['added'];\n $this->last_modified= $json['last_modified'];\n $this->lookup_count= $json['lookup_count'];\n $this->modify_count= $json['modify_count'];\n $this->source= $json['source'];\n $this->barcode= $json['barcode'];\n $this->comment= $json['comment'];\n\n }\n }",
"public static function DecodeJson (& $jsonStr);",
"private function build_meta_label($quantity, $limited = false, $limit = 0) {\n\n $label = \"\";\n\n $metatagclasses = 'label';\n if ($limited) {\n\n $quotient = 100.0 * (floatval($quantity) / floatval($limit) - 1.0);\n $metatagclasses .= ($quotient > 0.0 ? ' label-important' : ' label-success');\n\n $quotientstring = format_float($quotient, 2);\n if ($quotientstring[0] != '-') {\n $quotientstring = '+' . $quotientstring;\n }\n $quotientstring .= '%';\n\n $a = new stdClass();\n $a->value = $quotientstring;\n $a->target = $limit;\n\n $label .= get_string('quotientdisplay', 'assignsubmission_sketchfab', $a);\n }\n\n $rval = html_writer::tag(\n 'span',\n $label,\n array(\n 'class' => $metatagclasses\n )\n );\n\n return $rval;\n }",
"function generateMobileResponse($result, $statuscode = 1, $statustext = \"\") {\n\n $item = new stdClass();\n $item->result = $result;\n $item->statuscode = $statuscode;\n\n if (is_array($statustext)) {\n\n $item->statustext = trim(implode(\"\\n\", $statustext));\n } else {\n $item->statustext = $statustext;\n }\n\n\n echo json_encode($item);\n die();\n}",
"public function testGetLabelByName() {\n\n foreach ($this->testCases['Label'] as $key => $testCase) {\n $label = new Label();\n $label->setLabelName($testCase['label_name']);\n $label->setLabelComment($testCase['label_comment']);\n $label->setLabelStatus($testCase['label_status']);\n\n $this->localizationDao = $this->getMock('LocalizationDao');\n $this->localizationDao->expects($this->once())\n ->method('getLabelByName')\n ->will($this->returnValue($label));\n\n $this->locaizationService->setLocalizationDao($this->localizationDao);\n\n $result = $this->locaizationService->getLabelByName($testCase['label_name']);\n $this->assertTrue($result instanceof Label);\n $this->assertEquals($label, $result);\n }\n }",
"public function createLabel($userEmail, $label)\n\t{\n\t\t$service = new Google_Service_Gmail($this);\n\n\t\treturn $service->users_labels->create($userEmail, $label);\n\t}",
"static function from_json($data)\r\n {\r\n $decoded = json_decode($data, true);\r\n $decoded[\"admission_date\"] .= \" \" . $decoded[\"admission_time\"];\r\n $person = new Person();\r\n $person->from_array($decoded);\r\n if ((isset($decoded[\"id\"])) && (!empty($decoded[\"id\"]))){\r\n $person->id = $decoded[\"id\"];\r\n }\r\n return $person;\r\n }",
"public static function createFromJSON(string $JsonString): \\Comet\\ServerMetaVersionInfo\n\t{\n\t\t$decodedJsonObject = json_decode($JsonString); // as stdClass\n\t\tif (\\json_last_error() != \\JSON_ERROR_NONE) {\n\t\t\tthrow new \\Exception(\"JSON decode failed: \" . \\json_last_error_msg(), \\json_last_error());\n\t\t}\n\t\t$retn = new ServerMetaVersionInfo();\n\t\t$retn->inflateFrom($decodedJsonObject);\n\t\treturn $retn;\n\t}",
"public static function jsonSpin() \n\t{\n\t\t$ret = self::getItem();\n\t\treturn self::jsonItem($ret);\n\t}",
"function rf_convert_vc_json($value)\n{\n $value = str_replace('``','\"', $value);\n $value = preg_replace('/`\\}`/', ']',$value);\n $value = preg_replace('/`\\{`/','[',$value);\n return htmlspecialchars($value);\n}",
"public function updateFromJson($json)\n {\n $obj = json_decode($json);\n if ($obj && self::validate($obj, false)) {\n $this->name = $obj->name;\n $this->description = $obj->description;\n $this->brand_id = $obj->brand;\n } else {\n throw new \\Exception(\"Bad format exception\");\n }\n }",
"public function define_label_for_store_credit() {\n\t\t\tglobal $store_credit_label;\n\n\t\t\tif ( empty( $store_credit_label ) || ! is_array( $store_credit_label ) ) {\n\t\t\t\t$store_credit_label = array();\n\t\t\t}\n\n\t\t\tif ( empty( $store_credit_label['singular'] ) ) {\n\t\t\t\t$store_credit_label['singular'] = get_option( 'sc_store_credit_singular_text' );\n\t\t\t}\n\n\t\t\tif ( empty( $store_credit_label['plural'] ) ) {\n\t\t\t\t$store_credit_label['plural'] = get_option( 'sc_store_credit_plural_text' );\n\t\t\t}\n\n\t\t}",
"abstract function add_label();",
"public function _getLabel($name) {\n\t$lbl = $this->_client->makeLabel($name);\n\treturn $lbl;\n }",
"function socialtoaster_parse_json($string) {\n $string = rtrim(ltrim($string, \"(\"),\")\\r\\n\");\n $json_obj = json_decode($string);\n return $json_obj;\n }",
"function json_cb(&$item, $key) { \n if (is_string($item)) $item = mb_encode_numericentity($item, array (0x80, 0xffff, 0, 0xffff), 'UTF-8'); \n}",
"function Monitor_Shortcuts_convertMetricToPrometheusLabel($bean)\n{\n // TODO: hadi, 97-06-18: Fetch tags of metric (be get_tags_list function)\n // and add these tags as some labels to result\n $labels = $bean->jsonSerialize();\n $result = $bean->name . ' {';\n foreach ($labels as $key => $value) {\n if ($key == 'value' || $key == 'modif_dtime') {\n continue;\n }\n $result = $result . $key . '=\"' . $value . '\",';\n }\n return $result . '} ';\n}",
"function getItemJs(&$transId, &$item) {\n return <<<HTML\nga('ecommerce:addItem', {\n 'id': '$transId',\n 'name': '{$item['nombreweleda']}',\n 'sku': '{$item['codigo']}',\n 'category': '{$item['familia_linea']}',\n 'price': '{$item['precio']}',\n 'quantity': '{$item['cantidad']}'\n});\nHTML;\n}",
"public function addLabel($text){\n $name=\"label\".$this->labelID;\n $this->labelID++;\n $this->items[$name]['type']=\"label\";\n $this->items[$name]['text']=$text;\n }",
"public function createLabels()\n {\n // default labels\n $labels = [\n 'name' => $this->plural,\n 'singular_name' => $this->singular,\n 'menu_name' => $this->plural,\n 'all_items' => \"All {$this->plural}\",\n 'edit_item' => \"Edit {$this->singular}\",\n 'view_item' => \"View {$this->singular}\",\n 'update_item' => \"Update {$this->singular}\",\n 'add_new_item' => \"Add New {$this->singular}\",\n 'new_item_name' => \"New {$this->singular} Name\",\n 'parent_item' => \"Parent {$this->plural}\",\n 'parent_item_colon' => \"Parent {$this->plural}:\",\n 'search_items' => \"Search {$this->plural}\",\n 'popular_items' => \"Popular {$this->plural}\",\n 'separate_items_with_commas' => \"Seperate {$this->plural} with commas\",\n 'add_or_remove_items' => \"Add or remove {$this->plural}\",\n 'choose_from_most_used' => \"Choose from most used {$this->plural}\",\n 'not_found' => \"No {$this->plural} found\",\n ];\n\n return array_replace($labels, $this->labels);\n }",
"public function json() {\n\t\t$json = parent::json();\n\t\t$json['upsell_text'] = wp_kses_post( $this->upsell_text );\n\n\t\treturn $json;\n\t}",
"public function setLabel($label);",
"public function setLabel($label);",
"public function setLabel($label);",
"public function setLabel($label);",
"public function deserialize($json);",
"public function getLabel() {}",
"public function getLabel() {}",
"public function createLabel(Parcel|int $parcel, ShippingMethod|int $shippingMethod, SenderAddress|Address|int|null $senderAddress): Parcel\n {\n $parcelData = $this->getParcelData(\n $this->parseParcelArgument($parcel),\n null,\n null,\n null,\n null,\n true,\n $shippingMethod,\n $senderAddress,\n null,\n null,\n null,\n null\n );\n\n try {\n $response = $this->guzzleClient->put('parcels', [\n 'json' => [\n 'parcel' => $parcelData,\n ],\n ]);\n\n return Parcel::fromData(json_decode((string)$response->getBody(), true)['parcel']);\n } catch (TransferException $exception) {\n throw $this->parseGuzzleException($exception, 'Could not create parcel with Sendcloud.');\n }\n }",
"private function generateLabel($hasdata,$order_id){\n\ttry\n {\n\t\tif(!isset($hasdata['DeliveryConfirmationLabel'])){\n\t\t\treturn array(\"filename\"=>'',\"tracking_no\"=>'');\n\t\t}\n\t\t$filecontent=base64_decode($hasdata['DeliveryConfirmationLabel']);\n\n\t\t$path = 'uploads/pdf/';\n\t\t$usps_filename = $order_id.'_label_'.rand(9999,99999).'.pdf';\n\t\t$label_title = $path.$usps_filename;\n\n\t\t\n\t\t$file=fopen($label_title,\"w\");\n\t\t\n\t\tfwrite($file,$filecontent);\n\t\tfclose($file);\n\n\t\t\n\t\treturn array(\"filename\"=>$usps_filename,\"tracking_no\"=>substr($hasdata['DeliveryConfirmationNumber'], 8));\n }\n catch(\\App\\Http\\Controllers\\Exception $e)\n\t{\n\t\t\n\t return Redirect::to('/admin/orders')->withErrors( $e->getErrors() ) ->withInput();\n\t}\n\t\t \n}",
"public function getFrontendLabel();",
"function getItemJs(&$transId, &$item) {\r\n return <<<HTML\r\nga('ecommerce:addItem', {\r\n 'id': '$transId',\r\n 'name': '{$item['name']}',\r\n 'sku': '{$item['sku']}',\r\n 'category': '{$item['category']}',\r\n 'price': '{$item['price']}',\r\n 'quantity': '{$item['quantity']}'\r\n});\r\nHTML;\r\n }",
"function label($value)\n {\n return '\"'.$value.'\"';\n }",
"private function convertFromJson() {\n if ($this->value == null) {\n $this->data = null;\n return;\n }\n\n // array\n $data = trim($this->value);\n if ($data == '[]') {\n $this->data = [];\n return;\n }\n\n // null value (as string)\n if (mb_strtolower($data) == 'null') {\n $this->data = null;\n return;\n }\n\n // is object\n $json = json_decode($data);\n if ($json != null) {\n $this->data = $json;\n return;\n }\n\n // simple type: numberic or string\n $this->data = $data;\n $data = mb_strtolower($data);\n if ($data == 'false') $this->data = false;\n else if ($data == 'true') $this->data = true;\n else if (is_int($data)) $this->data = (int)$data;\n else if (is_float($data)) $this->data = (float)$data;\n else if (is_double($data)) $this->data = (double)$data;\n }",
"function f_app_lov_return_label($lov)\n {\n//############################################ HELP #############################################################################\n/*\n $lov[\"name\"] = \"procesi\"; \t\t\t//DS -> sherben vetem per funksionin lov_name_default_values();\n $lov[\"obj_or_label\"] = \"label\"; \t\t\t//DS -> sherben vetem per funksionin lov_name_default_values(); pranon vetem vlerat object, label; default = object;\n $lov[\"type\"] = \"dinamik\"; \t\t//*DS -> pranon vlerat dinamik, statik;\n $lov[\"tab_name\"] = \"proces\"; \t\t//*D -> per tipin=\"dinamik\" emri tabeles ku do behet select | per tipin=\"statik\" sduhet;\n $lov[\"id\"] = \"id_proces\"; \t\t//*DS -> per tipin=\"dinamik\" emri i fushes qe ruan kodin | per tipin=\"statik\" lista e kodeve te ndara me ndaresin perkates, default ,;\n $lov[\"field_name\"] = \"name_proces\"; \t\t//*DS -> per tipin=\"dinamik\" emri i fushes qe ruan emertimin, mund te perdoret p.sh: Concat(id_proces, ' ', name_proces) | per tipin=\"statik\" lista e emertimeve te ndara me ndaresin perkates, default ,;\n\n $lov[\"layout_forma\"] = \"\"; \t\t//DS -> ka kuptim vetem kur kthehet me shume se nje etikete; ne rast se vendoset vlera 'table' elementet strukturohen ne nje tabele; vlera te ndryshme jane: <br> = elementet thyhen njeri poshte tjetrit;   = elementet ndahen me nje ose me shume spacio; default = <br>; ;\n\n $lov[\"distinct\"] = \"F\"; \t\t//D -> per tipin=\"dinamik\", pranon vlerat T,F (pra true ose false), default = 'F', pra ti beje distinct vlerat apo jo;\n\n $lov[\"filter\"] = \"WHERE id_proces < 30\";//D -> per tipin=\"dinamik\" kushti i filtrimit te te dhenave, default = '', p.sh: WHERE status = 1 AND id > 0 (mos haroni 'WHERE'); kur kjo ka vlere $lov[\"id_select\"] i shtohet si fitrim shtese;\n $lov[\"filter_plus\"] = \"\"; //D -> per tipin=\"dinamik\" kusht filtrimi shtese, default = '', p.sh: AND status = 1 AND id > 0 (mos haroni qe 'WHERE' ne kete rast nuk duhet sepse duhet ta kete variabli $filter); meret parasysh vetem kur $filter != ''; filtrimi i vlerave kryhet: $filter.\" \".$filter_plus\n\n $lov[\"id_select\"] = \"1\"; \t\t//DS -> vlerat e kodit per te cilat duhet te meren emertimet te ndara me ndaresin perkates default ,(presje); bosh kur i duam te gjitha vlerat; kur eshte vetem nje vlere vendoset vetem vlera e kodit pa presje; selektimi behet me id IN ($lov[\"id_select\"]), per id te tipit stringe mos haroni ti mbyllni ne thonjeza teke;\n $lov[\"order_by\"] = \"name_proces\"; \t\t//D -> emri i kolones qe do perdoret per order, default = $lov[\"name\"] | per tipin=\"statik\" sduhet;\n\n $lov[\"ndares_vlerash\"] = \",\"; \t\t//S -> stringa qe ndan vlerat e listes statike (kod dhe emertim), default = ,(presje);\n $lov[\"class_etiketa\"] = \"\"; \t\t//DS -> emri i klases ne style per etiketat, vetem ne rastet kur strukturohen ne tabele; po spati vlere nuk meret parasysh;\n $lov[\"isdate\"] = \"\"; \t\t//D -> pranon vlerat T,F (pra true ose false), default = 'F'; perdoret kur etiketa eshte e tipit date;\n $lov[\"asc_desc\"] = \"\"; \t\t//D -> per orderin, pranon vlerat ASC,DESC; default = 'ASC';;\n*/\n//###############################################################################################################################\n\n $lov_array_id = \"\";\n $lov_array_name = \"\";\n\n IF (!isset($lov[\"ndares_vlerash\"]) OR ($lov[\"ndares_vlerash\"]==\"\"))\n {$lov[\"ndares_vlerash\"] = \",\";}\n\n //PER LISTEN DINAMIKE ---------------------------------------------------------------------------------------------------------\n IF ($lov[\"type\"] == \"dinamik\")\n {\n IF (!isset($lov[\"order_by\"]) OR ($lov[\"order_by\"]==\"\"))\n {$lov[\"order_by\"] = $lov[\"field_name\"];}\n\n IF (!isset($lov[\"asc_desc\"]) OR ($lov[\"asc_desc\"]==\"\"))\n {$lov[\"asc_desc\"] = \" ASC\";}\n\n $filter = \"\";\n IF (ISSET($lov[\"filter\"]) AND ($lov[\"filter\"] != \"\"))\n {\n $filter = $lov[\"filter\"];\n \n IF (ISSET($lov[\"filter_plus\"]) AND ($lov[\"filter_plus\"] != \"\"))\n {$filter .= \" \".$lov[\"filter_plus\"];}\n }\n\n IF ((isset($lov[\"id_select\"])) AND ($lov[\"id_select\"] != \"\"))\n {\n IF ($filter == \"\")\n {$filter = \" WHERE \".$lov[\"id\"].\" IN (\".$lov[\"id_select\"].\") \";}\n ELSE\n {$filter .= \" AND \".$lov[\"id\"].\" IN (\".$lov[\"id_select\"].\") \";}\n }\n\n $lov_distinct = \"\";\n IF (ISSET($lov[\"distinct\"]) AND ($lov[\"distinct\"] == \"T\"))\n {$lov_distinct = \"DISTINCT\";}\n\n IF ($lov[\"isdate\"] == \"T\")\n {$sql = \"SELECT \".$lov_distinct.\" \".$lov[\"id\"].\" as id_as, IF(\".$lov[\"field_name\"].\" IS NULL, '',DATE_FORMAT(\".$lov[\"field_name\"].\",'%d.%m.%Y')) AS fusha_as_as, \".$lov[\"field_name\"].\" as field_name_order FROM \".$lov[\"tab_name\"].\" \".$filter.\" ORDER BY field_name_order \".$lov[\"asc_desc\"];}\n ELSE\n {$sql = \"SELECT \".$lov_distinct.\" \".$lov[\"id\"].\" as id_as, IF(\".$lov[\"field_name\"].\" IS NULL, '',\".$lov[\"field_name\"].\") AS fusha_as_as FROM \".$lov[\"tab_name\"].\" \".$filter.\" ORDER BY \".$lov[\"order_by\"].\" \".$lov[\"asc_desc\"];}\n\n $i = -1;\n $rs = WebApp::execQuery($sql);\n $rs->MoveFirst();\n while (!$rs->EOF())\n {\n $id = $rs->Field(\"id_as\");\n $name = $rs->Field(\"fusha_as_as\");\n\n $i = $i + 1;\n $lov_array_id[$i] = $id;\n $lov_array_name[$i] = $name;\n \n $lov_array_id_id[$id] = $id;\n $lov_array_id_name[$id] = $name;\n\n $rs->MoveNext();\n }\n }\n //PER LISTEN DINAMIKE =========================================================================================================\n\n //PER LISTEN STATIKE ----------------------------------------------------------------------------------------------------------\n IF ($lov[\"type\"] == \"statik\")\n {\n $lov_array_id_temp = EXPLODE($lov[\"ndares_vlerash\"], $lov[\"id\"]);\n $lov_array_name_temp = EXPLODE($lov[\"ndares_vlerash\"], $lov[\"field_name\"]);\n\n IF ((ISSET($lov[\"id_select\"])) AND ($lov[\"id_select\"] != \"\"))\n {\n $kaloje_kushtin_stristr = \"N\";\n }\n ELSE\n {\n $kaloje_kushtin_stristr = \"Y\";\n }\n\n $k = -1;\n $id_select_txt = $lov[\"ndares_vlerash\"].$lov[\"id_select\"].$lov[\"ndares_vlerash\"];\n FOR ($i=0; $i < count($lov_array_id_temp); $i++)\n {\n $lov_array_id_txt = $lov[\"ndares_vlerash\"].$lov_array_id_temp[$i].$lov[\"ndares_vlerash\"];\n\n IF (STRISTR($id_select_txt, $lov_array_id_txt) OR ($kaloje_kushtin_stristr == \"Y\"))\n {\n $k = $k + 1;\n $lov_array_id[$k] = $lov_array_id_temp[$i];\n $lov_array_name[$k] = $lov_array_name_temp[$i];\n\n $lov_array_id_id[$lov_array_id_temp[$i]] = $lov_array_id_temp[$i];\n $lov_array_id_name[$lov_array_id_temp[$i]] = $lov_array_name_temp[$i];\n }\n }\n }\n //PER LISTEN STATIKE ==========================================================================================================\n\n //FORMOHET HTML E LOV ---------------------------------------------------------------------------------------------------------\n IF (($lov[\"all_data_array\"] == \"Y\") OR ($lov[\"only_ids\"] == \"Y\"))\n {\n IF ($lov[\"all_data_array\"] == \"Y\")\n {\n $lov_html = $lov_array_id_name;\n }\n \n IF ($lov[\"only_ids\"] == \"Y\")\n {\n $lov_html = $lov_array_id_id;\n }\n }\n ELSE\n {\n $lov_html = \"\";\n\n IF (!isset($lov[\"class_etiketa\"]) OR ($lov[\"class_etiketa\"]==\"\"))\n {$lov[\"class_etiketa\"] = \"\";}\n ELSE\n {$lov[\"class_etiketa\"] = \"class='\".$lov[\"class_etiketa\"].\"'\";}\n\n IF (!isset($lov[\"layout_forma\"]) OR ($lov[\"layout_forma\"]==\"\"))\n {$lov[\"layout_forma\"] = \"<br>\";}\n\n IF ($lov[\"layout_forma\"] == \"table\")\n {$lov_html .= \"<Table border=0 cellspacing=0 cellpadding=0>\";}\n\n FOR ($i=0; $i < count($lov_array_id); $i++)\n {\n IF ($lov[\"layout_forma\"] == \"table\")\n {\n $lov_html .= \"<TR><TD \".$lov[\"class_etiketa\"].\">\".$lov_array_name[$i].\"</TD></TR>\";\n }\n ELSE\n {\n IF ($lov[\"layout_forma\"] == \"<br>\")\n {\n IF ($i == 0)\n {$lov_html .= $lov_array_name[$i];}\n ELSE\n {$lov_html .= $lov[\"layout_forma\"].$lov_array_name[$i];}\n }\n ELSE\n {\n $lov_html .= $lov[\"layout_forma\"].$lov_array_name[$i];\n }\n }\n }\n \n IF ($lov[\"layout_forma\"] == \"table\")\n {\n $lov_html .= \"</Table>\";\n }\n \n }\n //FORMOHET HTML E LOV =========================================================================================================\n\n RETURN $lov_html;\n }",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();",
"public function getLabel();"
] | [
"0.52658886",
"0.5149901",
"0.50144184",
"0.49271137",
"0.47502184",
"0.4749456",
"0.47452065",
"0.47268164",
"0.46878815",
"0.4677468",
"0.46685994",
"0.46589783",
"0.46467033",
"0.46402663",
"0.46071574",
"0.45938554",
"0.45135733",
"0.45074317",
"0.45042673",
"0.4457392",
"0.4456847",
"0.44324988",
"0.44157115",
"0.441175",
"0.4409538",
"0.43988132",
"0.43960255",
"0.43833447",
"0.4359548",
"0.4351261",
"0.43484738",
"0.4337627",
"0.43322152",
"0.43294927",
"0.43235645",
"0.4309443",
"0.4305911",
"0.42970952",
"0.42967677",
"0.4287948",
"0.4278524",
"0.4245274",
"0.42283028",
"0.42209187",
"0.42209187",
"0.4215305",
"0.4212365",
"0.42082432",
"0.420042",
"0.41915405",
"0.41871473",
"0.4183729",
"0.41798085",
"0.41772217",
"0.41752818",
"0.41645315",
"0.41638714",
"0.41558632",
"0.4148523",
"0.4142658",
"0.41254658",
"0.41231135",
"0.41228235",
"0.4121724",
"0.4119804",
"0.41190925",
"0.41171056",
"0.41131666",
"0.4110032",
"0.41073802",
"0.4105535",
"0.4105488",
"0.4105085",
"0.41049787",
"0.4102542",
"0.40861228",
"0.40861228",
"0.40861228",
"0.40861228",
"0.40853277",
"0.40845722",
"0.40845722",
"0.40805745",
"0.40648356",
"0.40628582",
"0.40588138",
"0.40507814",
"0.40448558",
"0.40407017",
"0.4039468",
"0.4039468",
"0.4039468",
"0.4039468",
"0.4039468",
"0.4039468",
"0.4039468",
"0.4039468",
"0.4039468",
"0.4039468",
"0.4039468"
] | 0.78822225 | 0 |
JSON representing this object | public function jsonSerialize() {
return json_encode($this->value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function toJSON(){\n return json_encode($this);\n }",
"public function serialize() {\r\n return json_encode($this);\r\n }",
"public function get_json()\n {\n return json_encode($this);\n }",
"public function serialize()\n {\n return json_encode($this);\n }",
"public function toJson() {\n return json_encode($this);\n }",
"public function __toString()\r\n {\r\n return json_encode($this);\r\n }",
"public function json(){ return json_encode( $this->objectify() ); }",
"public function toJson() {\r\n\t\t// Returns:\t\tReturns JSON encoded string\r\n\t\treturn json_encode($this);\r\n\t}",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\ChrisHemmings\\Electio\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\ChrisHemmings\\Electio\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function json() \n\t{\n return json_encode($this);\n\t}",
"public function ToJson()\n {\n return json_encode($this);\n }",
"public function toJson()\n {\n return json_encode($this);\n }",
"public function toJson() {\n\t\t\treturn json_encode(array(\n\t\t\t\t'id' => $this->id,\n\t\t\t\t'model' => $this->model,\n\t\t\t\t'type' => json_decode($this->type->toJson()),\n\t\t\t\t'description' => $this->description,\n\t\t\t\t'area' => json_decode($this->area->toJson()),\n\t\t\t\t'status' => $this->status\n\t\t\t));\n\t\t}",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\MuhimbiPDFOnline\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\MuhimbiPDFOnline\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Yext\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Yext\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString(){\n return json_encode($this->json);\n }",
"public function makeJSON()\n {\n return(json_encode($this));\n }",
"public function makeJSON()\n {\n return(json_encode($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\QsrAutomations\\Api\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\QsrAutomations\\Api\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\QsrAutomations\\Api\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\QsrAutomations\\Api\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\QsrAutomations\\Api\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\QsrAutomations\\Api\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\BumbalClient\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\BumbalClient\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Ubo\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Ubo\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Tweak\\Api\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Tweak\\Api\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Tweak\\Api\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Tweak\\Api\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Autodesk\\Forge\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Autodesk\\Forge\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Upcloud\\ApiClient\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Upcloud\\ApiClient\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function jsonSerialize() {\n\n return ['id' => $this->id,\n 'name' => $this->name,\n 'author' => $this->author,\n 'description' => $this->description];\n \n \n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Voximplant\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Voximplant\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Voximplant\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Voximplant\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function toJson()\n {\n return $this->serializer()->serialize($this);\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Kinow\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Kinow\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\Nomad\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\Nomad\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Ory\\Hydra\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Ory\\Hydra\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n return json_encode($this, JSON_PRETTY_PRINT);\n }",
"public function __toString()\n {\n return json_encode($this, JSON_PRETTY_PRINT);\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\Infoplus\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\Infoplus\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\KnetikCloud\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\KnetikCloud\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function toJson() {\n\t\treturn json_encode($this->jsonSerialize());\n\t}",
"function toJSON()\n {\n return json_encode($this->toArray());\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Service\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Service\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function toJSON() {\n return json_encode($this->data);\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Progrupa\\Azure\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Progrupa\\Azure\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function toJSON()\n {\n return json_encode( $this->toArray() );\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Gateway\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Gateway\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n //if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n // return json_encode(\n // ObjectSerializer::sanitizeForSerialization($this),\n // JSON_PRETTY_PRINT\n // );\n //}\n\n return json_encode(ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function jsonSerialize()\n {\n return $this->toJson();\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Abulia\\TflUnified\\Swagger\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Abulia\\TflUnified\\Swagger\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\CyberSource\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\CyberSource\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\CyberSource\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\CyberSource\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Secuconnect\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Secuconnect\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Secuconnect\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Secuconnect\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }",
"public function jsonSerialize()\n {\n }",
"public function jsonSerialize()\n {\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\UniversityOfAdelaide\\OpenShift\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\UniversityOfAdelaide\\OpenShift\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\UniversityOfAdelaide\\OpenShift\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\UniversityOfAdelaide\\OpenShift\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Caplinked\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Caplinked\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Caplinked\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Caplinked\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\gooten.api.client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\gooten.api.client\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }",
"public function toJSON()\n\t{\n\t\treturn $this->json;\n\t}",
"public function __toString() {\n\t\tif (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n\t\t\treturn json_encode(\\Wallee\\Sdk\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n\t\t}\n\n\t\treturn json_encode(\\Wallee\\Sdk\\ObjectSerializer::sanitizeForSerialization($this));\n\t}",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\iNew\\Rest6_1\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\iNew\\Rest6_1\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\iNew\\Rest6_1\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\iNew\\Rest6_1\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\iNew\\Rest6_1\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\iNew\\Rest6_1\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Sales\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Sales\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function toJson() {\n\t\tdebug($this);\n\t}",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\Bytescout\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\Bytescout\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Dcm\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Dcm\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString() {\n\t\treturn json_encode($this->data);\n\t}",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Marketing\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Marketing\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function toJSON () {\r\n \treturn json_encode($this->_response);\r\n }",
"public function jsonize()\n {\n return json_encode($this->toArray());\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Finance\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Finance\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Finance\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Finance\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function serialize()\n\t{\n\t\treturn json_encode(array(\n\t\t\t'data' => $this->data,\n\t\t\t'this' => $this->getArrayCopy(),\n\t\t\t'name' => $this->name,\n\t\t\t'merged' => $this->merged,\n\t\t));\n\t}",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }"
] | [
"0.8273287",
"0.8053849",
"0.8026659",
"0.80202705",
"0.79846925",
"0.79654515",
"0.7963293",
"0.79629296",
"0.79591405",
"0.7954452",
"0.79476494",
"0.7943521",
"0.79175496",
"0.79172707",
"0.79085547",
"0.79066193",
"0.7886816",
"0.7886816",
"0.78849727",
"0.78849727",
"0.78849727",
"0.78720427",
"0.78475004",
"0.7844605",
"0.7844605",
"0.78395706",
"0.78364253",
"0.7836288",
"0.7835651",
"0.78296304",
"0.78296304",
"0.78231114",
"0.78217465",
"0.7810582",
"0.7809872",
"0.78060925",
"0.78060925",
"0.7803461",
"0.7802139",
"0.77952164",
"0.7794167",
"0.77928436",
"0.778942",
"0.7787179",
"0.77831715",
"0.7782717",
"0.7771414",
"0.7771414",
"0.7771414",
"0.7771414",
"0.7771414",
"0.7771414",
"0.7771414",
"0.7771414",
"0.7771414",
"0.7771414",
"0.7769038",
"0.7767849",
"0.77676946",
"0.77657974",
"0.77657974",
"0.77587706",
"0.77587706",
"0.77555716",
"0.77555716",
"0.7754746",
"0.7754746",
"0.77455723",
"0.77455723",
"0.7738102",
"0.7738102",
"0.7732337",
"0.77311534",
"0.7729571",
"0.7722833",
"0.7722833",
"0.7722833",
"0.7717108",
"0.7714262",
"0.7712609",
"0.77099466",
"0.7708591",
"0.77042216",
"0.7703097",
"0.7698492",
"0.7696445",
"0.7696445",
"0.7692736",
"0.7690583",
"0.7690583",
"0.7690583",
"0.7690583",
"0.7690583",
"0.7690583",
"0.7690583",
"0.7690583",
"0.7690583",
"0.7690583",
"0.7690583",
"0.7690583",
"0.7690583"
] | 0.0 | -1 |
JSON representing this object | public function toJson() {
return $this->jsonSerialize();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function toJSON(){\n return json_encode($this);\n }",
"public function serialize() {\r\n return json_encode($this);\r\n }",
"public function get_json()\n {\n return json_encode($this);\n }",
"public function serialize()\n {\n return json_encode($this);\n }",
"public function toJson() {\n return json_encode($this);\n }",
"public function __toString()\r\n {\r\n return json_encode($this);\r\n }",
"public function json(){ return json_encode( $this->objectify() ); }",
"public function toJson() {\r\n\t\t// Returns:\t\tReturns JSON encoded string\r\n\t\treturn json_encode($this);\r\n\t}",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\ChrisHemmings\\Electio\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\ChrisHemmings\\Electio\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function json() \n\t{\n return json_encode($this);\n\t}",
"public function ToJson()\n {\n return json_encode($this);\n }",
"public function toJson()\n {\n return json_encode($this);\n }",
"public function toJson() {\n\t\t\treturn json_encode(array(\n\t\t\t\t'id' => $this->id,\n\t\t\t\t'model' => $this->model,\n\t\t\t\t'type' => json_decode($this->type->toJson()),\n\t\t\t\t'description' => $this->description,\n\t\t\t\t'area' => json_decode($this->area->toJson()),\n\t\t\t\t'status' => $this->status\n\t\t\t));\n\t\t}",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\MuhimbiPDFOnline\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\MuhimbiPDFOnline\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Yext\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Yext\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString(){\n return json_encode($this->json);\n }",
"public function makeJSON()\n {\n return(json_encode($this));\n }",
"public function makeJSON()\n {\n return(json_encode($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\QsrAutomations\\Api\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\QsrAutomations\\Api\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\QsrAutomations\\Api\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\QsrAutomations\\Api\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\QsrAutomations\\Api\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\QsrAutomations\\Api\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\BumbalClient\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\BumbalClient\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Ubo\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Ubo\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Tweak\\Api\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Tweak\\Api\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Tweak\\Api\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Tweak\\Api\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Autodesk\\Forge\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Autodesk\\Forge\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Upcloud\\ApiClient\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Upcloud\\ApiClient\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function jsonSerialize() {\n\n return ['id' => $this->id,\n 'name' => $this->name,\n 'author' => $this->author,\n 'description' => $this->description];\n \n \n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Voximplant\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Voximplant\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Voximplant\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Voximplant\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function toJson()\n {\n return $this->serializer()->serialize($this);\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Kinow\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Kinow\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\Nomad\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\Nomad\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Ory\\Hydra\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Ory\\Hydra\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n return json_encode($this, JSON_PRETTY_PRINT);\n }",
"public function __toString()\n {\n return json_encode($this, JSON_PRETTY_PRINT);\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\Infoplus\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\Infoplus\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\KnetikCloud\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\KnetikCloud\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function toJson() {\n\t\treturn json_encode($this->jsonSerialize());\n\t}",
"function toJSON()\n {\n return json_encode($this->toArray());\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Service\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Service\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function toJSON() {\n return json_encode($this->data);\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Progrupa\\Azure\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Progrupa\\Azure\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function toJSON()\n {\n return json_encode( $this->toArray() );\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Gateway\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Gateway\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Swagger\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n //if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n // return json_encode(\n // ObjectSerializer::sanitizeForSerialization($this),\n // JSON_PRETTY_PRINT\n // );\n //}\n\n return json_encode(ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function jsonSerialize()\n {\n return $this->toJson();\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Abulia\\TflUnified\\Swagger\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Abulia\\TflUnified\\Swagger\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\CyberSource\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\CyberSource\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\CyberSource\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\CyberSource\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Secuconnect\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Secuconnect\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Secuconnect\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Secuconnect\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }",
"public function jsonSerialize()\n {\n }",
"public function jsonSerialize()\n {\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\UniversityOfAdelaide\\OpenShift\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\UniversityOfAdelaide\\OpenShift\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\UniversityOfAdelaide\\OpenShift\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\UniversityOfAdelaide\\OpenShift\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Caplinked\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Caplinked\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Caplinked\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Caplinked\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\gooten.api.client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\gooten.api.client\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }",
"public function toJSON()\n\t{\n\t\treturn $this->json;\n\t}",
"public function __toString() {\n\t\tif (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n\t\t\treturn json_encode(\\Wallee\\Sdk\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n\t\t}\n\n\t\treturn json_encode(\\Wallee\\Sdk\\ObjectSerializer::sanitizeForSerialization($this));\n\t}",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\iNew\\Rest6_1\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\iNew\\Rest6_1\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\iNew\\Rest6_1\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\iNew\\Rest6_1\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\iNew\\Rest6_1\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\iNew\\Rest6_1\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Sales\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Sales\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function toJson() {\n\t\tdebug($this);\n\t}",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\Bytescout\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\Bytescout\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Dcm\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Dcm\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString() {\n\t\treturn json_encode($this->data);\n\t}",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Marketing\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Marketing\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function toJSON () {\r\n \treturn json_encode($this->_response);\r\n }",
"public function jsonize()\n {\n return json_encode($this->toArray());\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Finance\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Finance\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Finance\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Finance\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function serialize()\n\t{\n\t\treturn json_encode(array(\n\t\t\t'data' => $this->data,\n\t\t\t'this' => $this->getArrayCopy(),\n\t\t\t'name' => $this->name,\n\t\t\t'merged' => $this->merged,\n\t\t));\n\t}",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }"
] | [
"0.8273287",
"0.8053849",
"0.8026659",
"0.80202705",
"0.79846925",
"0.79654515",
"0.7963293",
"0.79629296",
"0.79591405",
"0.7954452",
"0.79476494",
"0.7943521",
"0.79175496",
"0.79172707",
"0.79085547",
"0.79066193",
"0.7886816",
"0.7886816",
"0.78849727",
"0.78849727",
"0.78849727",
"0.78720427",
"0.78475004",
"0.7844605",
"0.7844605",
"0.78395706",
"0.78364253",
"0.7836288",
"0.7835651",
"0.78296304",
"0.78296304",
"0.78231114",
"0.78217465",
"0.7810582",
"0.7809872",
"0.78060925",
"0.78060925",
"0.7803461",
"0.7802139",
"0.77952164",
"0.7794167",
"0.77928436",
"0.778942",
"0.7787179",
"0.77831715",
"0.7782717",
"0.7771414",
"0.7771414",
"0.7771414",
"0.7771414",
"0.7771414",
"0.7771414",
"0.7771414",
"0.7771414",
"0.7771414",
"0.7771414",
"0.7769038",
"0.7767849",
"0.77676946",
"0.77657974",
"0.77657974",
"0.77587706",
"0.77587706",
"0.77555716",
"0.77555716",
"0.7754746",
"0.7754746",
"0.77455723",
"0.77455723",
"0.7738102",
"0.7738102",
"0.7732337",
"0.77311534",
"0.7729571",
"0.7722833",
"0.7722833",
"0.7722833",
"0.7717108",
"0.7714262",
"0.7712609",
"0.77099466",
"0.7708591",
"0.77042216",
"0.7703097",
"0.7698492",
"0.7696445",
"0.7696445",
"0.7692736",
"0.7690583",
"0.7690583",
"0.7690583",
"0.7690583",
"0.7690583",
"0.7690583",
"0.7690583",
"0.7690583",
"0.7690583",
"0.7690583",
"0.7690583",
"0.7690583",
"0.7690583"
] | 0.0 | -1 |
This method will provide all the relevant index scopes for a given index | public function getAll(Index $index): iterable; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFromContext(Index $index): IndexScope;",
"public function getFromChannelAndLocaleAndCurrency(\n Index $index,\n string $channelCode = null,\n string $localeCode = null,\n string $currencyCode = null\n ): IndexScope;",
"protected function scopes()\n {\n return [\n 'period' => new FilterPriodScope(),\n 'status' => new FilterStatusScope()\n ];\n }",
"public function getQueryBuilderForIndex(Request $Request, $context = null);",
"public function getScopes();",
"public function getScopes();",
"public function getScopes();",
"public function get($index)\n {\n \n }",
"protected function getAllAvailableIndexConfigurationsOptions() {}",
"public function scopes() {\n return array(\n # Importance\n 'main' =>array('condition'=>'importance='.self::IP_MAIN ),\n 'casual' =>array('condition'=>'importance='.self::IP_CASUAL),\n # Status\n 'new' =>array( 'condition'=>'status='.self::ST_NEW ),\n 'playing' =>array( 'condition'=>'status='.self::ST_OK ),\n 'abandoned'=>array( 'condition'=>'status='.self::ST_ABANDONED),\n );\n }",
"public function setIndex(ProvidesIndexContract $index);",
"private function getIndexersForTable($index, $tablename)\n {\n $ret = [];\n $indexers = tx_mksearch_util_Config::getIndexersForTable($tablename);\n foreach ($indexers as $indexer) {\n if ($this->isIndexerDefined($index, $indexer)) {\n $ret[] = $indexer;\n }\n }\n\n return $ret;\n }",
"public function buildIndex();",
"public function resolve($index, array $dimensions)\n {\n if ($index === 'catalog_product_index_price') {\n $dimensions = $this->filterDimensions($dimensions);\n }\n return $this->indexScopeResolver->resolve($index, $dimensions);\n }",
"protected function getIndex()\n\t{\n\t\tif (!$this->index) {\n\t\t\t$this->index = $this->getClient()->initIndex($this->name);\n\t\t}\n\t\t\n\t\treturn $this->index;\n\t}",
"public function getList($index = '')\n {\n \t// $result = Yii::$app->cache->get($key);\n \t// if (empty($result)) {\n \t// \t$result = $this->object->find()->asArray()->all();\n \t// \tYii::$app->cache->set($key, $result);\n \t// }\n if (empty($index)) {\n $result = $this->object->find()->asArray()->all();\n }else{\n $result = $this->object->find()->indexBy($index)->asArray()->all();\n }\n return $result;\n }",
"protected static function initIndexes()\n {\n static::$indexes = [];\n foreach (static::$indexesConf as $name => &$index) {\n if (!isset($index['type'])) {\n $index['type'] = 'Generic';\n }\n $index['name'] = $name;\n $index['modelClass'] = static::class;\n\n $class = ClassFinder::getNamespace(\\Zer0\\Model\\Indexes\\AbstractIndex::class) . '\\\\' . $index['type'];\n\n static::$indexes[$name] = new $class($index);\n }\n }",
"protected function getIndex()\n\t{ \n /*\n $sm = $this->account->getServiceManager();\n $dbh = $sm->get(\"Db\");\n $this->dbh = $dbh;\n\t\treturn new \\Netric\\EntityQuery\\Index\\Pgsql($this->account, $dbh);\n * \n */\n $this->dbh = $this->account->getServiceManager()->get(\"Db\");\n return new \\Netric\\EntityQuery\\Index\\Pgsql($this->account);\n\t}",
"function get_index_params()\n {\n return array();\n }",
"public function scopes() {\n return array(\n 'withRelated' => array(\n 'with' => array(\n 'quest' => array(\n 'alias' => 'characterQuestsQuest' . self::getScopeCounter(),\n 'scopes' => 'withRelated'\n ),\n ),\n 'order' => $this->getTableAlias(true) . \".`id` DESC\"\n ),\n );\n }",
"public function getIndexList() {\n return self::$indexes;\n }",
"public function index() {\n return $this->handleNotFound(function () {\n $list = [];\n\n foreach ($this->researchService->findAll($this->userId) as $research) {\n $list[] = $this->service->findAll($this->userId, $research->getResearchIndex());\n }\n\n return $list;\n });\n }",
"public function getIndexConfigurations()\n {\n if (null === $this->indexConfigurations) {\n foreach ($this->searchIndexes as $indexName => $indexConfiguration) {\n $this->indexConfigurations[$indexName] = new IndexConfiguration(\n $indexName,\n $indexConfiguration['icon'],\n $this->translator->trans($indexConfiguration['name'], [], 'admin'),\n new Route($indexConfiguration['view']['name'], $indexConfiguration['view']['result_to_view']),\n isset($indexConfiguration['security_context']) ? $indexConfiguration['security_context'] : null,\n isset($indexConfiguration['contexts']) ? $indexConfiguration['contexts'] : []\n );\n }\n }\n\n return $this->indexConfigurations;\n }",
"public function getScopes(): array;",
"public function getScopes(): array;",
"public function getIndex()\n\t{\n\n\t\tself::addArgument('courses', Course::actives());\n\n\t\treturn self::make('index');\n\n\t}",
"public function getIndex()\n {\n return $this->get(self::_INDEX);\n }",
"public function getIndex() {}",
"public function getIndex() {}",
"private function processIndexes()\n {\n foreach ($this->indexes as $index) {\n foreach ($index->columns as $indexColumn) {\n $indexColumnName = $indexColumn['name'];\n if (!array_key_exists(strtolower($indexColumnName), $this->columns)) {\n throw new RuntimeException(\"Key column '$indexColumnName' doesn't exist in table\");\n }\n }\n }\n\n // figure out all sequences of columns covered by non-FK indexes\n foreach ($this->indexes as $index) {\n if ($index->type !== 'FOREIGN KEY') {\n foreach ($index->getCovers() as $cover) {\n $lookup = implode('\\0', $cover);\n $this->covers[$lookup] = true;\n }\n }\n }\n\n $indexes = [];\n $foreigns = [];\n $ibfkCounter = 0;\n\n foreach ($this->indexes as $index) {\n if ($index->type === 'FOREIGN KEY') {\n if ($this->addIndexForForeignKey) {\n // TODO - doesn't correctly deal with indexes like foo(10)\n $lookup = implode('\\0', $index->getColumns());\n if (!array_key_exists($lookup, $this->covers)) {\n $newIndex = new IndexDefinition();\n $newIndex->type = 'KEY';\n $newIndex->columns = $index->columns;\n if (!is_null($index->constraint)) {\n $newIndex->name = $index->constraint;\n } elseif (!is_null($index->name)) {\n $newIndex->name = $index->name;\n }\n $indexes[] = $newIndex;\n }\n }\n\n $foreign = new IndexDefinition();\n if (is_null($index->constraint)) {\n $foreign->constraint = $this->name . '_ibfk_' . ++$ibfkCounter;\n } else {\n $foreign->constraint = $index->constraint;\n }\n $foreign->type = 'FOREIGN KEY';\n $foreign->columns = $index->columns;\n $foreign->reference = $index->reference;\n $foreigns[] = $foreign;\n } else {\n $indexes[] = $index;\n }\n }\n\n // now synthesise names for any unnamed indexes,\n // and collect indexes by type\n $usedName = [];\n $keyTypes = [\n 'PRIMARY KEY',\n 'UNIQUE KEY',\n 'KEY',\n 'FULLTEXT KEY',\n 'FOREIGN KEY',\n ];\n $indexesByType = array_fill_keys($keyTypes, []);\n foreach ($indexes as $index) {\n $name = $index->name;\n if ($index->type === 'PRIMARY KEY') {\n $name = 'PRIMARY';\n } elseif (is_null($name)) {\n $base = $index->columns[0]['name'];\n $name = $base;\n $i = 1;\n while (isset($usedName[$name])) {\n $name = $base . '_' . ++$i;\n }\n $index->name = $name;\n } elseif (array_key_exists(strtolower($name), $usedName)) {\n throw new RuntimeException(\"Duplicate key name '$name'\");\n }\n $index->name = $name;\n $usedName[strtolower($name)] = true;\n\n $indexesByType[$index->type][] = $index;\n }\n\n if (count($indexesByType['PRIMARY KEY']) > 1) {\n throw new RuntimeException(\"Multiple PRIMARY KEYs defined\");\n }\n\n foreach ($indexesByType['PRIMARY KEY'] as $pk) {\n foreach ($pk->columns as $indexColumn) {\n $column = $this->columns[strtolower($indexColumn['name'])];\n if ($column->nullable) {\n $column->nullable = false;\n if (is_null($column->default)) {\n $column->default = $column->getUninitialisedValue();\n }\n }\n }\n }\n\n $this->indexes = [];\n foreach (array_reduce($indexesByType, 'array_merge', []) as $index) {\n $this->indexes[$index->name] = $index;\n }\n foreach ($foreigns as $foreign) {\n $this->foreigns[$foreign->constraint] = $foreign;\n }\n }",
"public function getIndex() {}",
"public function getIndex() {}",
"public function getIndex() {}",
"public function getIndex() {}",
"public function getIndex() {}",
"public function getIndex() {}",
"public function getIndex() {}",
"public function getIndex() {return $this->index;}",
"public function scopes()\n {\n return [\n 'none' => 'Testing Unit',\n 'tag' => new TagScope(),\n 'category' => new CategoryScope(),\n\n ];\n }",
"public function availableFunds(\n IndexFundsRequest $request,\n Organization $organization\n ) {\n $this->authorize('show', $organization);\n $this->authorize('viewAnyProvider', [FundProvider::class, $organization]);\n\n $query = Implementation::queryFundsByState([\n Fund::STATE_ACTIVE, Fund::STATE_PAUSED\n ])->whereNotIn(\n 'id', $organization->organization_funds()->pluck(\n 'fund_id'\n )->toArray());\n\n return FundResource::collection(Fund::search(\n $request, $query\n )->latest()->get());\n }",
"public function getIndex()\n {\n // add stuff here\n }",
"protected function getAllIndexesRequest()\n {\n\n $resourcePath = '/indexes';\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 []\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('auth_token');\n if ($apiKey !== null) {\n $queryParams['auth_token'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-RSearch-App-ID');\n if ($apiKey !== null) {\n $headers['X-RSearch-App-ID'] = $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 }",
"public function getIndex() {\n \treturn $this->index;\n }",
"public function scopes()\n\t{\n\t\t$_arScopes = parent::scopes();\n\n\t\tif ( $this->hasAttribute( 'user_id' ) && ! Yii::app()->user->isGuest )\n\t\t{\n\t\t\t$_arScopes['mine'] = array(\n\t\t\t\t'condition' => 'user_id = :user_id',\n\t\t\t\t'params' => array( ':user_id' => Yii::app()->user->id ),\n\t\t\t);\n\t\t}\n\n\t\t//\tActive scopes...\n\t\tif ( $this->hasAttribute( 'active_ind' ) )\n\t\t{\n\t\t\t$_arScopes['active'] = array(\n\t\t\t\t'condition' => 'active_ind = 1 and delete_ind = 0',\n\t\t\t);\n\n\t\t\t$_arScopes['inactive'] = array(\n\t\t\t\t'condition' => 'active_ind = 0 and delete_ind = 0',\n\t\t\t);\n\t\t}\n\n\t\t//\tActive scopes...\n\t\tif ( $this->hasAttribute( 'delete_ind' ) )\n\t\t{\n\t\t\t$_arScopes['deleted'] = array(\n\t\t\t\t'condition' => 'delete_ind = 1',\n\t\t\t);\n\t\t}\n\n\t\treturn $_arScopes;\n\t}",
"public function getAllIndexes()\n {\n return $this->indexes;\n }",
"public function defineIndexes()\n\t{\n\t\treturn array();\n\t}",
"public function getIndex()\n {\n return $this->index;\n }",
"public function getIndex()\n {\n return $this->index;\n }",
"public function getIndex()\n {\n return $this->index;\n }",
"public function getIndex()\n {\n return $this->index;\n }",
"public function indexBy($index) {\n $this->indexBy = $index;\n return $this;\n }",
"protected function loadAutocompleteSearchByIndex($index_id) {\n /** @var \\Drupal\\search_api_autocomplete\\SearchInterface[] $searches */\n $searches = $this->entityTypeManager\n ->getStorage('search_api_autocomplete_search')\n ->loadByProperties([\n 'index_id' => $index_id,\n ]);\n return $searches;\n }",
"public function getIndex() {\n return $this->index;\n }",
"public function getIndex() {\n return $this->index;\n }",
"public function getIndex() {\n return $this->index;\n }",
"public function scopes()\n {\n return [\n 'category' => new CategoryScope(),\n ];\n }",
"public function index()\n {\n return $this->make('index')->with('accounts', $this->accounts->all());\n }",
"function get_index()\r\n\t{\r\n\r\n\t}",
"public function indexProvider() {\n\t\treturn array(\n\t\t\t//set #0\n\t\t\tarray(\n\t\t\t\t//query\n\t\t\t\tarray(),\n\t\t\t\t//paginate\n\t\t\t\tarray(\n\t\t\t\t\t'Audit' => array(\n\t\t\t\t\t\t'limit' => 10,\n\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t'id',\n\t\t\t\t\t\t\t'event',\n\t\t\t\t\t\t\t'model',\n\t\t\t\t\t\t\t'created',\n\t\t\t\t\t\t\t'user_id',\n\t\t\t\t\t\t\t'entity_id'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'contain' => array(\n\t\t\t\t\t\t\t'User' => array(\n\t\t\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t\t\t'id',\n\t\t\t\t\t\t\t\t\t'email'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'conditions' => array(),\n\t\t\t\t\t\t'order' => array('created' => 'desc')\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\t\t\t//set #1\n\t\t\tarray(\n\t\t\t\t//query\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '544e33d1-debc-46f2-bc54-42aec0a85480',\n\t\t\t\t\t'created' => '01.01.2014 12:00:01 - 02.03.2014 01:00:10',\n\t\t\t\t\t'model' => 'Momo',\n\t\t\t\t\t'user_id' => array(1, 3, 6),\n\t\t\t\t\t'event' => array('EDIT', 'CREATE'),\n\t\t\t\t\t'entity_id' => '5'\n\t\t\t\t),\n\t\t\t\t//paginate\n\t\t\t\tarray(\n\t\t\t\t\t'Audit' => array(\n\t\t\t\t\t\t'limit' => 10,\n\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t'id',\n\t\t\t\t\t\t\t'event',\n\t\t\t\t\t\t\t'model',\n\t\t\t\t\t\t\t'created',\n\t\t\t\t\t\t\t'user_id',\n\t\t\t\t\t\t\t'entity_id'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'contain' => array(\n\t\t\t\t\t\t\t'User' => array(\n\t\t\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t\t\t'id',\n\t\t\t\t\t\t\t\t\t'email'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t'Audit.id' => '544e33d1-debc-46f2-bc54-42aec0a85480',\n\t\t\t\t\t\t\t'Audit.created BETWEEN ? AND ?' => array('2014-01-01 12:00:01', '2014-03-02 01:00:10'),\n\t\t\t\t\t\t\t'LOWER(Audit.model) LIKE' => '%momo%',\n\t\t\t\t\t\t\t'user_id' => array(1, 3, 6),\n\t\t\t\t\t\t\t'event' => array('EDIT', 'CREATE'),\n\t\t\t\t\t\t\t'entity_id' => '5'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'order' => array('created' => 'desc')\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\t\t\t//set #2\n\t\t\tarray(\n\t\t\t\t//query\n\t\t\t\tarray(\n\t\t\t\t\t'list' => 1\n\t\t\t\t),\n\t\t\t\t//paginate\n\t\t\t\tarray(\n\t\t\t\t\t'Audit' => array(\n\t\t\t\t\t\t'limit' => 10,\n\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t'id',\n\t\t\t\t\t\t\t'event',\n\t\t\t\t\t\t\t'model',\n\t\t\t\t\t\t\t'created',\n\t\t\t\t\t\t\t'user_id',\n\t\t\t\t\t\t\t'entity_id'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'contain' => array(\n\t\t\t\t\t\t\t'User' => array(\n\t\t\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t\t\t'id',\n\t\t\t\t\t\t\t\t\t'email'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'conditions' => array(),\n\t\t\t\t\t\t'order' => array('created' => 'desc')\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\t\t\t//set #3\n\t\t\tarray(\n\t\t\t\t//query\n\t\t\t\tarray(\n\t\t\t\t\t'list' => 1,\n\t\t\t\t\t'count' => 3,\n\t\t\t\t),\n\t\t\t\t//paginate\n\t\t\t\tarray(\n\t\t\t\t\t'Audit' => array(\n\t\t\t\t\t\t'limit' => 3,\n\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t'id',\n\t\t\t\t\t\t\t'event',\n\t\t\t\t\t\t\t'model',\n\t\t\t\t\t\t\t'created',\n\t\t\t\t\t\t\t'user_id',\n\t\t\t\t\t\t\t'entity_id'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'contain' => array(\n\t\t\t\t\t\t\t'User' => array(\n\t\t\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t\t\t'id',\n\t\t\t\t\t\t\t\t\t'email'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'conditions' => array(),\n\t\t\t\t\t\t'order' => array('created' => 'desc')\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\t\t\t//set #4\n\t\t\tarray(\n\t\t\t\t//query\n\t\t\t\tarray(\n\t\t\t\t\t'created' => '2014-01-01 12:00:01',\n\t\t\t\t),\n\t\t\t\t//paginate\n\t\t\t\tarray(\n\t\t\t\t\t'Audit' => array(\n\t\t\t\t\t\t'limit' => 10,\n\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t'id',\n\t\t\t\t\t\t\t'event',\n\t\t\t\t\t\t\t'model',\n\t\t\t\t\t\t\t'created',\n\t\t\t\t\t\t\t'user_id',\n\t\t\t\t\t\t\t'entity_id'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'contain' => array(\n\t\t\t\t\t\t\t'User' => array(\n\t\t\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t\t\t'id',\n\t\t\t\t\t\t\t\t\t'email'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t'Audit.created' => '2014-01-01 12:00:01'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'order' => array('created' => 'desc')\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\t\t\t//set #5\n\t\t\tarray(\n\t\t\t\t//query\n\t\t\t\tarray(\n\t\t\t\t\t'created' => '2014-01-01',\n\t\t\t\t),\n\t\t\t\t//paginate\n\t\t\t\tarray(\n\t\t\t\t\t'Audit' => array(\n\t\t\t\t\t\t'limit' => 10,\n\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t'id',\n\t\t\t\t\t\t\t'event',\n\t\t\t\t\t\t\t'model',\n\t\t\t\t\t\t\t'created',\n\t\t\t\t\t\t\t'user_id',\n\t\t\t\t\t\t\t'entity_id'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'contain' => array(\n\t\t\t\t\t\t\t'User' => array(\n\t\t\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t\t\t'id',\n\t\t\t\t\t\t\t\t\t'email'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t'Audit.created BETWEEN ? AND ?' => array('2014-01-01 00:00:00', '2014-01-01 23:59:59')\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'order' => array('created' => 'desc')\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\t\t\t//set #6\n\t\t\tarray(\n\t\t\t\t//query\n\t\t\t\tarray(\n\t\t\t\t\t'created' => '01/01/2014',\n\t\t\t\t),\n\t\t\t\t//paginate\n\t\t\t\tarray(\n\t\t\t\t\t'Audit' => array(\n\t\t\t\t\t\t'limit' => 10,\n\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t'id',\n\t\t\t\t\t\t\t'event',\n\t\t\t\t\t\t\t'model',\n\t\t\t\t\t\t\t'created',\n\t\t\t\t\t\t\t'user_id',\n\t\t\t\t\t\t\t'entity_id'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'contain' => array(\n\t\t\t\t\t\t\t'User' => array(\n\t\t\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t\t\t'id',\n\t\t\t\t\t\t\t\t\t'email'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t'Audit.created BETWEEN ? AND ?' => array('2014-01-01 00:00:00', '2014-01-01 23:59:59')\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'order' => array('created' => 'desc')\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\t\t\t//set #7\n\t\t\tarray(\n\t\t\t\t//query\n\t\t\t\tarray(\n\t\t\t\t\t'created' => '01/01/2014 12:00:01',\n\t\t\t\t),\n\t\t\t\t//paginate\n\t\t\t\tarray(\n\t\t\t\t\t'Audit' => array(\n\t\t\t\t\t\t'limit' => 10,\n\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t'id',\n\t\t\t\t\t\t\t'event',\n\t\t\t\t\t\t\t'model',\n\t\t\t\t\t\t\t'created',\n\t\t\t\t\t\t\t'user_id',\n\t\t\t\t\t\t\t'entity_id'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'contain' => array(\n\t\t\t\t\t\t\t'User' => array(\n\t\t\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t\t\t'id',\n\t\t\t\t\t\t\t\t\t'email'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t'Audit.created' => '2014-01-01 12:00:01'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'order' => array('created' => 'desc')\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}",
"public function indexes()\r\n {\r\n return $this->indexes;\r\n }",
"public function getIndexing(): array {\n\t\treturn $this->_indexing;\n\t}",
"public function getAll()\n {\n return $this->scopeRepository->findAll();\n }",
"public function getProperties($index);",
"public function takeIndex()\n\t\t{\n\t\t\t$this->csv->takeIndexCSV();\n\t\t\t$this->txt->takeIndexTXT();\n\t\t}",
"function apachesolr_index_status($env_id) {\n $remaining = 0;\n $total = 0;\n\n foreach (entity_get_info() as $entity_type => $info) {\n $bundles = apachesolr_get_index_bundles($env_id, $entity_type);\n if (empty($bundles)) {\n continue;\n }\n\n $table = apachesolr_get_indexer_table($entity_type);\n $query = db_select($table, 'aie')\n ->condition('aie.status', 1)\n ->condition('aie.bundle', $bundles)\n ->addTag('apachesolr_index_' . $entity_type);\n\n $total += $query->countQuery()->execute()->fetchField();\n\n $query = _apachesolr_index_get_next_set_query($env_id, $entity_type);\n $remaining += $query->countQuery()->execute()->fetchField();\n }\n return array('remaining' => $remaining, 'total' => $total);\n}",
"public function getIndex() {\n\t\treturn $this->index;\n\t}",
"public function getIndex() {\n\t\treturn $this->index;\n\t}",
"public function getIndex() {\n\t\treturn $this->index;\n\t}",
"public function getIndex() {\n\t\treturn $this->index;\n\t}",
"protected function constructScopes() {}",
"public function getAllIndexes() {\n return array_merge(\n [ $this->primaryKeys, ],\n $this->uniqueKeys,\n $this->indexes\n );\n }",
"public abstract function get($index);",
"public function getIndex(){\n\n\t\treturn View::make('tax.view')\n\t\t\t->with('taxes', Tax::all());\n\t}",
"public function get_scope_locations()\n { \n response_json(lookup_scope_locations(get_post('scope')));\n }",
"public function getIndex();",
"public function getIndex();",
"public function getIndex();",
"public function getAllScopes()\n {\n $scopes = $this->model->all()->toArray();\n\n return $scopes;\n }",
"public function getIndexerOptionsByIndex(tx_mksearch_model_internal_Index $index)\n {\n $fields = [\n 'CMP.hidden' => [OP_EQ_INT => 0],\n 'INDX.hidden' => [OP_EQ_INT => 0],\n 'INDX.uid' => [OP_EQ_INT => $index->uid],\n ];\n $options = [\n 'orderby' => [\n 'INDXCMPMM.sorting' => 'ASC',\n ],\n ];\n $tmpCfg = $this->search($fields, $options);\n foreach ($tmpCfg as $oModel) {\n $sTs .= \"{\\n\".$oModel->record['configuration'].\"\\n}\";\n }\n\n return tx_mksearch_util_Misc::parseTsConfig($sTs);\n }",
"protected function indexName( $index ) {\n\t\t// Backwards-compatibility hack\n\t\t$renamed = array(\n\t\t\t'ar_usertext_timestamp' => 'usertext_timestamp',\n\t\t\t'un_user_id' => 'user_id',\n\t\t\t'un_user_ip' => 'user_ip',\n\t\t);\n\n\t\tif ( isset( $renamed[$index] ) ) {\n\t\t\treturn $renamed[$index];\n\t\t} else {\n\t\t\treturn $index;\n\t\t}\n\t}",
"public function findForIndex() {\n\t\treturn $this->findAll();\n\t}",
"public function getIndex() {\r\n\t\t\treturn $this->index;\r\n\t\t}",
"function getElasticSearchIndexes() {\n\n return 'pdb'.',' . 'geo'.',' . 'dbgap' .','. 'lincs' .','. 'arrayexpress'.','. 'gemma'.',' . 'sra'.','.'bioproject' .','.'clinicaltrials'.',' . 'dryad' .','\n .'cvrg'.','.'dataverse' .','.'neuromorpho'.','.'peptideatlas'.','.'ctn'.','.'cia'.','.'mpd'.','.'niddkcr'.','.'physiobank'.','.'proteomexchange'.','.'openfmri'.','.'nursadatasets'.','\n .'yped'.','.'cil'.','.'icpsr'.','.'gdc'.','.'bmrb'.','.'swissprot'.','.'clinvar'.','.'retina'.','.'emdb'.','.'epigenomics'.','.'nitrcir'.','.'neurovaultatlases'.','.'neurovaultcols'.','\n .'neurovaultnidm'.','.'rgd'.','.'datacitebgi'.','.'datacitemorphobank'.','.'vectorbase'.','.'datacitegnd'.','.'datacitepeerj'.','.'datacitezenodo'.','.'omicsdi'.','.'datacitesbgrid'\n .','.'simtk'.','.'datacitecxidb'.','.'datacitebils'.','.'dataciteada'.','.'dataciteukda'.','.'dataciteadaptive'.','.'datacitemit'.','.'datacitectsi'.','.'datacitefdz'\n .','.'datacitembf'.','.'datacitenimh'.','.'datacitejhu'.','.'datacitecandi'.','.'datacitelshtm'.','.'datacitedatabrary'.','.'immport'.','.'datacitesdscsg'.','.'datacitecrcns'\n .','.'nsrr'.','.'lsdb'.','.'naturedata'.','.'genenetwork'.','.'ndarpapers'.','.'datacitethieme'.','.'datacitefigshare'.','.'dataciteccdc'.','.'wormbase'.','.'gtexldacc'.','.'metabolomics';\n\n}",
"public function getSearchIndex();",
"public function getNavigations($indexBy = null, $indexAllData = false)\n {\n $navigationRecords = AmNav_NavigationRecord::model()->ordered()->findAll();\n $navigations = AmNav_NavigationModel::populateModels($navigationRecords);\n if ($indexBy !== null) {\n $indexedNavigations = array();\n foreach ($navigations as $navigation) {\n $indexedNavigations[$navigation->$indexBy] = $indexAllData ? $navigation : $navigation->name;\n }\n return $indexedNavigations;\n }\n return $navigations;\n }",
"public function query($index){\n $this->httpRequest->query($index);\n }",
"public function index()\n {\n return OrderIndexResource::collection(Order::all());\n }",
"public function listScopes()\n {\n $query = 'SELECT ' . $this->_db->distinct('pref_scope') . ' FROM '\n . $this->_params['table'];\n try {\n return $this->_db->selectValues($query);\n } catch (Horde_Db_Exception $e) {\n throw new Horde_Prefs_Exception($e);\n }\n }",
"public static function _index()\n\t{\n\t\treturn self::$_index;\n\t}",
"public function getStats()\n {\n $stats['health'] = $this->client->cluster()->health();\n\n $info = [];\n\n foreach (ExtconfService::getIndices() as $language => $index) {\n $info[$language] = [\n 'name' => $index,\n 'language' => $language,\n ];\n\n foreach (ExtconfService::getIndexers() as $name => $config) {\n $info[$language]['types'][$name] = [\n 'name' => $name,\n 'documents' => $this->client->count([\n 'index' => $index,\n 'type' => $config['config']['type'],\n ])['count'],\n ];\n }\n }\n\n $stats['indices'] = $info;\n\n return $stats;\n }",
"public function indexAll()\n {\n $citas = Cita::all();\n return $citas;\n }",
"public function getIndex( )\n\t{\n\n\t\tself::addArgument('students', User::getStudents());\n\n\t\tself::addArgument('section', 'index');\n\n\t\treturn self::make('index');\n\n\t}",
"public function getIndexes()\n {\n\treturn $this->indexes;\n }",
"public function indexes()\n {\n return array_merge(parent::indexes(), array(\n 'userId' => array(\n 'key' => array(\n 'userId' => \\EMongoCriteria::SORT_ASC,\n ),\n 'unique' => true,\n ),\n ));\n }",
"public function index()\n {\n //if no type cache then add indexType\n if(!Cache::has('indexType')){\n $type = $this->getGoodsByType(Type::with('childrenType')->get());\n Cache::put('indexType',$type,$this->expiresAt);\n }\n //if no lb cache then add\n if(!Cache::has('indexLb')){\n $lb = Ad::where('position_id','1')->where('enable','1')->get();\n Cache::put('indexLb',$lb,$this->expiresAt);\n }\n //if no nav cache then add\n if(!Cache::has('indexNav')){\n $nav = Ad::where('position_id','3')->where('enable','1')->get();\n Cache::put('indexNav',$nav,$this->expiresAt);\n }\n $type = Cache::get('indexType');\n $lb = Cache::get('indexLb');\n $nav = Cache::get('indexNav');\n\n return view('home.index',compact('type','lb','nav'));\n }",
"public function index()\n {\n return Auto::with('type', 'organizations', 'employers', 'employers.position')->get();\n }",
"protected function createIndex(): IndexInterface {\n return Index::create([\n 'name' => $this->getRandomGenerator()->string(),\n 'id' => $this->getRandomGenerator()->name(),\n 'status' => 1,\n 'datasource_settings' => [\n 'entity:entity_test' => [],\n ],\n 'tracker_settings' => [\n 'default' => [],\n ],\n 'server' => $this->server->id(),\n 'options' => ['index_directly' => TRUE],\n ]);\n }",
"public function getIndexParam(SearchApiIndex $index, $with_type = FALSE) {\n $index_name = $this->getIndexName($index);\n\n $params = array();\n $params['index'] = $index_name;\n\n if ($with_type) {\n $params['type'] = $index->machine_name;\n }\n\n return $params;\n }",
"public function getIndex()\n {\n return view('admin.api-keys.index', [\n 'keys' => ApiKey::query()->orderBy('last_used_on', 'desc')->paginate(10),\n ]);\n }",
"public function getIndex()\n\t{\n\t //\n\t $bankAccount = BankAccount::all();\n\n\t return $bankAccount;\n\n\t}"
] | [
"0.7597148",
"0.5817061",
"0.5677836",
"0.5616579",
"0.5549429",
"0.5549429",
"0.5549429",
"0.55404556",
"0.5504399",
"0.5458559",
"0.544613",
"0.5403047",
"0.53921366",
"0.5390148",
"0.5387861",
"0.5372585",
"0.5365177",
"0.53591543",
"0.5348482",
"0.53473",
"0.52692485",
"0.52522796",
"0.52325946",
"0.5226816",
"0.5226816",
"0.51950216",
"0.51833934",
"0.51784074",
"0.51784074",
"0.51772344",
"0.5176011",
"0.5176011",
"0.5176011",
"0.51757514",
"0.5175469",
"0.5175469",
"0.5175469",
"0.51386046",
"0.5129969",
"0.51274633",
"0.51264846",
"0.5126424",
"0.50948405",
"0.50907147",
"0.50863695",
"0.5083119",
"0.5078149",
"0.5078149",
"0.5078149",
"0.5078149",
"0.50592655",
"0.5044246",
"0.5028712",
"0.5028712",
"0.5028712",
"0.50235635",
"0.5022894",
"0.4997733",
"0.49750453",
"0.49734032",
"0.4961673",
"0.4952165",
"0.49397403",
"0.49366048",
"0.49360007",
"0.4930046",
"0.4930046",
"0.4930046",
"0.4930046",
"0.49245128",
"0.49092227",
"0.48982292",
"0.4896213",
"0.48957485",
"0.48935",
"0.48935",
"0.48935",
"0.4884167",
"0.48806342",
"0.48803192",
"0.48772538",
"0.48709115",
"0.48675373",
"0.48557043",
"0.48506668",
"0.48336232",
"0.4832949",
"0.48258388",
"0.4820416",
"0.4813756",
"0.481067",
"0.4808969",
"0.4805201",
"0.47920528",
"0.47876593",
"0.47863013",
"0.478523",
"0.4781178",
"0.4781176",
"0.4776127"
] | 0.6521152 | 1 |
Returns an index scope from the application context (channel, locale, currency) | public function getFromContext(Index $index): IndexScope; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFromChannelAndLocaleAndCurrency(\n Index $index,\n string $channelCode = null,\n string $localeCode = null,\n string $currencyCode = null\n ): IndexScope;",
"#[CustomOpenApi\\Operation(id: 'channelIndex', tags: [Tags::Channel, Tags::V1])]\n #[CustomOpenApi\\Parameters(model: Channel::class)]\n #[CustomOpenApi\\Response(resource: ChannelResource::class, isCollection: true)]\n public function index()\n {\n return CustomQueryBuilder::buildResource(Channel::class, ChannelResource::class, fn($query) => $query->tenanted());\n }",
"public function localeIndex()\n {\n return $this->localeIndex;\n }",
"public function getQueryBuilderForIndex(Request $Request, $context = null);",
"public function getControllerIndex($context = null);",
"public function localeIndex();",
"public function scopes()\n {\n return [\n 'category' => new CategoryScope(),\n ];\n }",
"public function getTemplateIndex($context = null);",
"protected function _scope()\n\t{\n\t\treturn $this->_meta['scope'];\n\t}",
"public function getScope()\n {\n $code = Mage::app()->getRequest()->getParam('store');\n $code_w = Mage::app()->getRequest()->getParam('website');\n if ($code != '') {\n $store_id = Mage::getModel('core/store')->load($code)->getId();\n } else if ($code_w != '') {\n $website_id = Mage::getModel('core/website')->load($code)->getId();\n $store_id = Mage::app()->getWebsite($website_id)->getDefaultStore()->getId();\n } else {\n $store_id = 0;\n }\n\n if ($code == '' && $code_w == '') {\n $data['scope'] = 'default';\n $data['scope_id'] = 0;\n } else if (isset($website_id)) {\n $data['scope'] = 'websites';\n $data['scope_id'] = $website_id;\n } else if (isset($store_id)) {\n $data['scope'] = 'stores';\n $data['scope_id'] = $store_id;\n } else {\n $data['scope'] = 'default';\n $data['scope_id'] = 0;\n }\n\n return $data;\n }",
"public function getScope();",
"public function getScope();",
"protected function scopes()\n {\n return [\n 'period' => new FilterPriodScope(),\n 'status' => new FilterStatusScope()\n ];\n }",
"public function index()\n {\n return ChannelResource::collection(Channel::all());\n }",
"abstract public function getScope();",
"public function scopes() {\n return array(\n # Importance\n 'main' =>array('condition'=>'importance='.self::IP_MAIN ),\n 'casual' =>array('condition'=>'importance='.self::IP_CASUAL),\n # Status\n 'new' =>array( 'condition'=>'status='.self::ST_NEW ),\n 'playing' =>array( 'condition'=>'status='.self::ST_OK ),\n 'abandoned'=>array( 'condition'=>'status='.self::ST_ABANDONED),\n );\n }",
"protected function getIndex()\n\t{ \n /*\n $sm = $this->account->getServiceManager();\n $dbh = $sm->get(\"Db\");\n $this->dbh = $dbh;\n\t\treturn new \\Netric\\EntityQuery\\Index\\Pgsql($this->account, $dbh);\n * \n */\n $this->dbh = $this->account->getServiceManager()->get(\"Db\");\n return new \\Netric\\EntityQuery\\Index\\Pgsql($this->account);\n\t}",
"static function v() {return jucf(function() {\n\t\t/** @var IS $r */\n\t\tif (!($token = ju_request_header('Authorization'))) { /** @var string|null $token */\n\t\t\t$r = ju_my_local() ? ju_store() : ju_error('Please provide a valid token key');\n\t\t}\n\t\telse {\n\t\t\t$sel = ju_db_from('core_config_data', ['scope', 'scope_id']); /** @var Sel $sel */\n\t\t\t$sel->where('? = path', 'justuno_settings/options_interface/token_key');\n\t\t\t$sel->where('? = value', $token);\n\t\t\t$w = function(array $a) {return jutr(jua($a, 'scope'), array_flip([\n\t\t\t\tSS::SCOPE_STORES, SS::SCOPE_WEBSITES, IScopeConfig::SCOPE_TYPE_DEFAULT\n\t\t\t]));};\n\t\t\t/** @var array(string => string) $row */\n\t\t\t$row = ju_first(ju_sort(ju_conn()->fetchAll($sel), function(array $a, array $b) use($w) {return $w($a) - $w($b);}));\n\t\t\tju_assert($row, \"The token «{$token}» is not registered in Magento.\");\n\t\t\t$scope = jua($row, 'scope'); /** @var string $scope */\n\t\t\t$scopeId = jua($row, 'scope_id'); /** @var string $scopeId */\n\t\t\t$r = SS::SCOPE_STORES === $scope ? ju_store($scopeId) : (\n\t\t\t\tIScopeConfig::SCOPE_TYPE_DEFAULT === $scope ? ju_store() :\n\t\t\t\t\tju_store_m()->getWebsite($scopeId)->getDefaultStore()\n\t\t\t);\n\t\t}\n\t\tju_sentry_extra(__CLASS__, 'Store', \"{$r->getCode()} ({$r->getId()})\");\n\t\treturn $r;\n\t});}",
"protected function getIndex()\n\t{\n\t\tif (!$this->index) {\n\t\t\t$this->index = $this->getClient()->initIndex($this->name);\n\t\t}\n\t\t\n\t\treturn $this->index;\n\t}",
"public function getIndex()\n {\n return $this->get(self::_INDEX);\n }",
"public function defaultScope()\n {\n return array(\n 'order' => $this->getTableAlias(false, false) . '.is_sticky DESC, ' . $this->getTableAlias(false, false) . '.created DESC, ' . $this->getTableAlias(false, false) . '.subject',\n );\n }",
"function get_index()\r\n\t{\r\n\r\n\t}",
"private function scope($params)\n {\n if (isset($params['scope'])) {\n return $params['scope'];\n }\n\n return 'global';\n }",
"public function defaultScope()\n {\n return array('order' => 'loanId DESC');\n }",
"public function getIndex() {\n \treturn $this->index;\n }",
"public static function getIndexName(): string\n {\n return Utilities::config('index');\n }",
"public function get($scope);",
"public function index()\n {\n return Currency::all();\n }",
"public function getIndex()\n\t{\n\n\t\tself::addArgument('courses', Course::actives());\n\n\t\treturn self::make('index');\n\n\t}",
"protected function getSessionContext()\n\t{\n\t\t$app = JFactory::getApplication();\n\t\t$package = $app->getUserState('com_fabrik.package', 'fabrik');\n\t\treturn 'com_' . $package . '.list' . $this->model->getRenderContext() . '.plugins.' . $this->onGetFilterKey() . '.';\n\t}",
"public function index()\n {\n return Session::get('app.locale');\n }",
"public static function _index()\n\t{\n\t\treturn self::$_index;\n\t}",
"public function getLuceneIndexFile($locale) {\n\n $req = Request::createFromGlobals();\n return __DIR__ . '/../../../../app/cache/data/index-' . $req->server->get('SYMFONY__DOMAIN__NAME') . '-' . $locale;\n }",
"public function searchApplicants()\n {\n $query = Channel::find();\n\n // add conditions that should always apply here\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n return $dataProvider;\n }\n // grid filtering conditions\n\n $query->andFilterWhere(['!=', 'om', Yii::$app->user->id]);\n $query->andFilterWhere(['=', 'status', 2]);\n\n return $dataProvider;\n }",
"public function getIndex() {return $this->index;}",
"public static function getScope() {\n\t\treturn self::getPathParams()['scope'];\n\t}",
"public function get($index)\n {\n \n }",
"public function defaultScope()\n { \n \t// Dont do the scope check for logging in and for admin pages \n \t// **ATTENTION: This will need to be changed in the future\n\n \t// admin page can only show tutor\n \tif ('admin' == Yii::app()->controller->getAction()->getId())\n\t return array( \n\t 'condition'=>'(type=\"tutor\")', \n\t ); \n\n\n\t\tif (null == Yii::app()->user->id) \n\t\t\treturn array();\n\t\telse if ('view' == Yii::app()->controller->getAction()->getId())\n\t\t\treturn array();\n\t\telse \n\t return array( \n\t 'condition'=>'(id='.Yii::app()->user->id.')', \n\t ); \n\n }",
"public function indexAction($scope = null, $name = null)\n \t{\n\t\t\tif (false === $this->get('security.context')->isGranted('ROLE_INDEX')) {\n \t\tthrow new AccessDeniedException();\n \t\t}\n\t\t\t$this->scope = $scope;\n\t\t\tif($scope == null) {\n\t\t\t\t$user = $this->get('security.context')->getToken()->getUser();\n\t\t\t\t$role = explode(\"_\",implode(\"\",$user->getRoles()));\n\t\t\t\tif(isset($role[3]))\n\t\t\t\t\t\t$this->scope = $role[3]; \t\t\t\t\n\t\t\t}\n\t\t\t$scope = $this->scope;\n\n \t$em = $this->getDoctrine()->getEntityManager();\n\t\t\t$entities = null;\t\n\t\t\tif($scope == 'ANY')\n \t\t$entities = $em->getRepository('MyCompanyMyProjectAppBundle:PamSemestre')->findAll();\n \treturn array('entities' => $entities);\n \t}",
"public function index()\n {\n return Curator::with([])\n ->get();\n }",
"public function index()\n {\n return OrderIndexResource::collection(Order::all());\n }",
"public function getApiScope()\n {\n return $this->api_scope;\n }",
"public function defaultScope() {\n return array(\n 'order' => $this->getTableAlias(false, false) . '.name'\n );\n }",
"public function getIndex() {}",
"public function getIndex() {}",
"public function getIndex() {}",
"public function getIndex() {}",
"public function getIndex() {}",
"public function getIndex() {}",
"public function getIndex() {}",
"public function getIndex() {}",
"public function getIndex() {}",
"public function getBonusesScope($isAdmin, $loggedInUserId, $sentUserId);",
"public function get_resource_index(){\n return $this->resource_index;\n }",
"public function getControllerRead($context = null);",
"public function getIndex() {\n return $this->index;\n }",
"public function getIndex() {\n return $this->index;\n }",
"public function getIndex() {\n return $this->index;\n }",
"public function getIndex()\n {\n return $this->index;\n }",
"public function getIndex()\n {\n return $this->index;\n }",
"public function getIndex()\n {\n return $this->index;\n }",
"public function getIndex()\n {\n return $this->index;\n }",
"protected static function order_index() {\n\t\t\treturn self::index() . 'orders';\n\t\t}",
"public function index($orderBy = 'base_value')\n\t{\n\t\tif ( $this->checkAccess( config('lex.acl.index') ) ) {\n\t\t\t$currencies = Currency::orderBy($orderBy)->paginate( config('lex.pagination', 15) );\n\t\t\treturn view( config('lex.views.index'), compact('currencies') );\n\t\t}\n\t\t\n\t\treturn view( $this->unauthorized, ['message' => 'view currency list'] );\n\t}",
"public function getIndexAttribute()\n {\n return $this->config['index'];\n }",
"public function scopes()\n {\n return [\n 'none' => 'Testing Unit',\n 'tag' => new TagScope(),\n 'category' => new CategoryScope(),\n\n ];\n }",
"public function getViewScope() {\n \t\n \t// Return our scope\n \treturn $this->oView;\n }",
"public function index()\n {\n return Channel::all();\n }",
"private function scopes() {\n\n \t global $cfg;\n\n if (is_array($cfg->scopes) && sizeof($cfg->scopes) > 0) {\n $this->scope = implode(',', $cfg->scopes);\n } else {\n\n $scopes = array(\n 'incoming-webhook',\n 'commands',\n 'bot',\n 'channels:read',\n 'channels:history',\n 'channels:write',\n 'chat:write:bot',\n 'chat:write:user',\n 'emoji:read',\n 'im:write',\n 'im:history',\n 'reactions:read',\n 'reactions:write',\n 'team:read',\n 'users:read',\n 'users.profile:read',\n );\n\n $this->scope = implode(',', $scopes);\n }\n }",
"public function getCategoryIndexFromStringOrNumberReturnsIndexDataProvider() {}",
"public function category_index($locale)\n {\n $this->checkLang($locale);\n\n return $this->sendResult('paginate 10 Category',\n CategoryResource::collection(Category::paginate(10)));\n }",
"public function scopes() {\n return array(\n 'withRelated' => array(\n 'with' => array(\n 'quest' => array(\n 'alias' => 'characterQuestsQuest' . self::getScopeCounter(),\n 'scopes' => 'withRelated'\n ),\n ),\n 'order' => $this->getTableAlias(true) . \".`id` DESC\"\n ),\n );\n }",
"public function getCurrentLocaleEntity();",
"function get_index_params()\n {\n return array();\n }",
"public function getIndex() {\n\t\treturn $this->index;\n\t}",
"public function getIndex() {\n\t\treturn $this->index;\n\t}",
"public function getIndex() {\n\t\treturn $this->index;\n\t}",
"public function getIndex() {\n\t\treturn $this->index;\n\t}",
"function getControllerContext() ;",
"public function scopes()\n\t{\n\t\t$_arScopes = parent::scopes();\n\n\t\tif ( $this->hasAttribute( 'user_id' ) && ! Yii::app()->user->isGuest )\n\t\t{\n\t\t\t$_arScopes['mine'] = array(\n\t\t\t\t'condition' => 'user_id = :user_id',\n\t\t\t\t'params' => array( ':user_id' => Yii::app()->user->id ),\n\t\t\t);\n\t\t}\n\n\t\t//\tActive scopes...\n\t\tif ( $this->hasAttribute( 'active_ind' ) )\n\t\t{\n\t\t\t$_arScopes['active'] = array(\n\t\t\t\t'condition' => 'active_ind = 1 and delete_ind = 0',\n\t\t\t);\n\n\t\t\t$_arScopes['inactive'] = array(\n\t\t\t\t'condition' => 'active_ind = 0 and delete_ind = 0',\n\t\t\t);\n\t\t}\n\n\t\t//\tActive scopes...\n\t\tif ( $this->hasAttribute( 'delete_ind' ) )\n\t\t{\n\t\t\t$_arScopes['deleted'] = array(\n\t\t\t\t'condition' => 'delete_ind = 1',\n\t\t\t);\n\t\t}\n\n\t\treturn $_arScopes;\n\t}",
"public function getControllerContext() {}",
"public function actionIndex()\n {\n $searchModel = new ExcelSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $currency = !empty(Yii::$app->session->get('currency')) ? Yii::$app->session->get('currency') : 'EUR' ;\n $currencySign=Currency::$currencySign[$currency];\n $currency = ($currency == 'EUR') ? 1 : Currency::getCurrency($currency);\n return $this->render('index', compact('searchModel','dataProvider', 'currency','currencySign')); \n }",
"public function defaultScope(){\n\t\treturn array(\n\t\t\t'condition'=>'type = '.ITest::TYPE_KNOWLEDGE,\n\t\t);\t\n\t}",
"public function scope()\n\t{\n\t\treturn array\n\t\t(\n\t\t\t'directory' => $this->request->directory,\n\t\t\t'controller' => $this->request->controller,\n\t\t\t'action' => $this->request->action,\n\t\t);\n\t}",
"public function getIndex() {\r\n\t\treturn $this->_index;\r\n\t}",
"public function index()\n {\n return Contract::all();\n }",
"public function getIndex()\n {\n return view('admin.api-keys.index', [\n 'keys' => ApiKey::query()->orderBy('last_used_on', 'desc')->paginate(10),\n ]);\n }",
"public function getContexts();",
"public function index()\n {\n //\n $theme = $this->theme;\n return $theme->scope('site.index')->render();\n }",
"public function getIndex()\n {\n // add stuff here\n }",
"public function index()\n {\n return Stock::get();\n }",
"public function getIndex()\n {\n return isset($this->index) ? $this->index : null;\n }",
"public function getIndex() {\r\n\t\t\treturn $this->index;\r\n\t\t}",
"static public function getScope()\r\n {\r\n return self::$_scope;\r\n }",
"public function index()\n {\n return JournalEntry::currentReport()->orderByDesc('created_at')->get();\n }",
"public function getPaymentIndex();",
"public static function getScope()\n {\n return self::$scope;\n }",
"function _scholar_polls_context_default_contexts() {\n $items = array();\n\n $items[] = array(\n 'namespace' => 'scholar',\n 'attribute' => 'feature',\n 'value' => 'polls',\n 'description' => 'Polls feature context',\n 'node' => array(\n '0' => 'poll',\n ),\n 'views' => array(\n '0' => 'scholar_polls',\n ),\n 'menu' => 'polls',\n 'block' => array(\n 'vsite_taxonomy_0' => array(\n 'module' => 'vsite_taxonomy',\n 'delta' => '0',\n 'weight' => 41,\n 'region' => 'right',\n 'status' => '0',\n 'label' => 'Categories - Filter categorized content',\n 'type' => 'context_ui',\n ),\n 'vsite_widgets_2' => array(\n 'module' => 'vsite_widgets',\n 'delta' => '2',\n 'weight' => 42,\n 'region' => 'right',\n 'status' => '0',\n 'label' => 'ShareThis Button - Allows you to share posts using popular online services',\n 'type' => 'context_ui',\n ),\n ),\n );\n return $items;\n}",
"protected function _getScope()\n {\n if (!$this->hasData('scope')) {\n $this->setScope(null);\n }\n return $this->_getData('scope');\n /*\n if (!$this->_scope) {\n $this->_scope = $this->_storeFactory->create(\n [\n 'url' => $this,\n 'data' => ['force_disable_rewrites' => false, 'disable_store_in_url' => false],\n ]\n );\n }\n return $this->_scope; */\n }",
"protected function _getIndexer()\n {\n return Mage::getSingleton('algoliasearch/algolia');\n }"
] | [
"0.75075257",
"0.6033961",
"0.540871",
"0.5361528",
"0.52263415",
"0.50955284",
"0.508293",
"0.5064449",
"0.50310546",
"0.50261116",
"0.49943587",
"0.49943587",
"0.49889183",
"0.4978954",
"0.49274015",
"0.4917363",
"0.49060947",
"0.48657656",
"0.48547855",
"0.4851444",
"0.4833559",
"0.482323",
"0.48079905",
"0.47928652",
"0.4792095",
"0.47760323",
"0.47701794",
"0.47572145",
"0.4756357",
"0.4725833",
"0.4713636",
"0.47091126",
"0.47046307",
"0.47037363",
"0.47018725",
"0.46924433",
"0.4690678",
"0.46853188",
"0.46838796",
"0.46755055",
"0.46698564",
"0.46586293",
"0.4653017",
"0.46526965",
"0.46526965",
"0.46526965",
"0.4652617",
"0.4652617",
"0.46511117",
"0.46510276",
"0.46510276",
"0.46510276",
"0.46506694",
"0.4646325",
"0.46382642",
"0.4633206",
"0.4633206",
"0.4633206",
"0.46323115",
"0.46323115",
"0.46323115",
"0.46323115",
"0.4628825",
"0.4615011",
"0.46100152",
"0.46088758",
"0.46083272",
"0.4606302",
"0.45994288",
"0.45939735",
"0.45903498",
"0.45902413",
"0.4586234",
"0.45748782",
"0.45744172",
"0.45744172",
"0.45744172",
"0.45744172",
"0.4554444",
"0.45518574",
"0.4527982",
"0.45205235",
"0.45187062",
"0.45165622",
"0.45128474",
"0.45100358",
"0.45007452",
"0.44898307",
"0.4489266",
"0.44889158",
"0.4487445",
"0.44861194",
"0.44853762",
"0.44818634",
"0.44799608",
"0.4479417",
"0.44760403",
"0.447553",
"0.4471604",
"0.4468959"
] | 0.73292917 | 1 |
Returns an index scope based on the given arguments | public function getFromChannelAndLocaleAndCurrency(
Index $index,
string $channelCode = null,
string $localeCode = null,
string $currencyCode = null
): IndexScope; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFromContext(Index $index): IndexScope;",
"public function buildIndex();",
"abstract public function getScope();",
"public function getIndex() {}",
"public function getIndex() {}",
"public function getIndex() {}",
"public function getIndex() {}",
"public function getIndex() {}",
"public function getIndex() {}",
"public function getIndex() {}",
"public function getIndex() {}",
"public function getIndex() {}",
"function get_index_params()\n {\n return array();\n }",
"function get_index()\r\n\t{\r\n\r\n\t}",
"public function getQueryBuilderForIndex(Request $Request, $context = null);",
"public function getScope();",
"public function getScope();",
"public function getSearchIndex();",
"function getIndex() ;",
"abstract protected function getIndex();",
"public function getIndex();",
"public function getIndex();",
"public function getIndex();",
"public static function all(...$arguments)\n {\n return (new static)->index(...$arguments);\n }",
"protected function getIndex()\n\t{ \n /*\n $sm = $this->account->getServiceManager();\n $dbh = $sm->get(\"Db\");\n $this->dbh = $dbh;\n\t\treturn new \\Netric\\EntityQuery\\Index\\Pgsql($this->account, $dbh);\n * \n */\n $this->dbh = $this->account->getServiceManager()->get(\"Db\");\n return new \\Netric\\EntityQuery\\Index\\Pgsql($this->account);\n\t}",
"public static function create($scope, $indices = array())\n\t{\n\t\tif (empty(self::$instance[$scope]))\n\t\t{\n\t\t\tself::$instance[$scope] = new self(\n\t\t\t\t$scope,\n\t\t\t\t$indices\n\t\t\t);\n\t\t}\n\n\t\treturn self::$instance[$scope];\n\t}",
"public function getIndex()\n {\n // add stuff here\n }",
"public function _INDEX()\n\t{\n\t\t\n\t}",
"public function indexBy(callable $function);",
"public function getCategoryIndexFromStringOrNumberReturnsIndexDataProvider() {}",
"public function defineIndexes()\n\t{\n\t\treturn array();\n\t}",
"public function getIndex()\n\t{\n\n\t\tself::addArgument('courses', Course::actives());\n\n\t\treturn self::make('index');\n\n\t}",
"public function scopes() {\n return array(\n # Importance\n 'main' =>array('condition'=>'importance='.self::IP_MAIN ),\n 'casual' =>array('condition'=>'importance='.self::IP_CASUAL),\n # Status\n 'new' =>array( 'condition'=>'status='.self::ST_NEW ),\n 'playing' =>array( 'condition'=>'status='.self::ST_OK ),\n 'abandoned'=>array( 'condition'=>'status='.self::ST_ABANDONED),\n );\n }",
"private function scope($params)\n {\n if (isset($params['scope'])) {\n return $params['scope'];\n }\n\n return 'global';\n }",
"public function get($index)\n {\n \n }",
"protected function scopes()\n {\n return [\n 'period' => new FilterPriodScope(),\n 'status' => new FilterStatusScope()\n ];\n }",
"public function indexBy($index) {\n $this->indexBy = $index;\n return $this;\n }",
"public function indexBy($callback);",
"public function buildIndexParameters(array $arguments) {\n\t\tif (isset($arguments['query']) && $arguments['query'] instanceof \\TYPO3\\Flow\\Persistence\\QueryInterface) {\n\t\t\t$query = $arguments['query'];\n\n\t\t\tif (isset($arguments['count']) && $arguments['count'] === TRUE) {\n\t\t\t\t$parameters = array();\n\t\t\t} else {\n\t\t\t\t$parameters = array(\n\t\t\t\t\t'include_docs' => TRUE\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ($query->getLimit() !== NULL) {\n\t\t\t\t$parameters['limit'] = $query->getLimit();\n\t\t\t}\n\t\t\tif ($query->getOffset() !== NULL) {\n\t\t\t\t$parameters['skip'] = $query->getOffset();\n\t\t\t}\n\n\t\t\t$constraint = $query->getConstraint();\n\t\t\tif ($constraint !== NULL) {\n\t\t\t\t$parameters['q'] = $this->buildStatementForConstraint($constraint);\n\t\t\t} else {\n\t\t\t\tthrow new \\TYPO3\\Flow\\Exception('Call without constraint is not supported by CouchDB QueryIndex', 1299689063);\n\t\t\t}\n\n\t\t\treturn $parameters;\n\t\t} else {\n\t\t\tthrow new \\TYPO3\\Flow\\Exception('query argument for QueryIndex must implement QueryInterface', 1299689063);\n\t\t}\n\t}",
"public abstract function get($index);",
"public function getArgument($index);",
"abstract function index();",
"abstract function index();",
"abstract function index();",
"public function getIndexFunctionSource() {\n\t\t$this->ensureConfigured();\n\n\t\treturn 'function(doc){if(' . $this->buildClassnameConstraint() . '){' .\n\t\t\t'var result = new Document();'.\n\t\t\timplode('', $this->indexStatements) .\n\t\t\t'return result;}}';\n\t}",
"public function getIndex( )\n\t{\n\n\t\tself::addArgument('students', User::getStudents());\n\n\t\tself::addArgument('section', 'index');\n\n\t\treturn self::make('index');\n\n\t}",
"public function getCompleteScope(): int;",
"static function index(array $param = [])\n {\n }",
"#[CustomOpenApi\\Operation(id: 'channelIndex', tags: [Tags::Channel, Tags::V1])]\n #[CustomOpenApi\\Parameters(model: Channel::class)]\n #[CustomOpenApi\\Response(resource: ChannelResource::class, isCollection: true)]\n public function index()\n {\n return CustomQueryBuilder::buildResource(Channel::class, ChannelResource::class, fn($query) => $query->tenanted());\n }",
"public function get($scope);",
"public function createIndex(): void;",
"public function getIndexInfo()\n {\n return $this->__call(__FUNCTION__, func_get_args());\n }",
"function putIndex(){\n\n }",
"function putIndex(){\n\n }",
"protected function getIndex()\n\t{\n\t\tif (!$this->index) {\n\t\t\t$this->index = $this->getClient()->initIndex($this->name);\n\t\t}\n\t\t\n\t\treturn $this->index;\n\t}",
"public function buildIndexUri(): string;",
"protected function constructScopes() {}",
"protected function getIndexRequest()\n\t{\n\t\t$url = $this->url();\n\t\n\t\t$url\n\t\t\t->getQuery()\n\t\t\t\t->setParameter('code', 200)\n\t\t\t\t->setParameter('format', 'json')\n\t\t\t\t->setParameter(\n\t\t\t\t\t'output', \n\t\t\t\t\t'{\"entities\":[{\"id\":1,\"foo\":\"bar\"},{\"id\":2,\"foo\":\"baz\"}]}'\n\t\t\t\t);\n\t\t\t\t\n\t\treturn new Api\\Request\\Index((string) $url);\n\t}",
"public function getIndex() {\n \treturn $this->index;\n }",
"function &getIndexes(){\n\t\treturn array();\n\t}",
"public function getIndex() {return $this->index;}",
"public function index($columns)\n {\n // Default the index\n $index = null;\n\n // Get the args\n $args = func_get_args();\n if (count($args) == 1) {\n if (is_string($columns)) {\n $indexName = \"idx_$this->tableName\".\"_$columns\";\n $index = new DbIndex($this, $indexName);\n $index->column($columns);\n } // end if string\n\n if (is_object($columns)) {\n if ($columns->name && $columns->sortType) {\n $indexName = \"idx_$this->table_name\".\"_$columns->name\";\n $index = new DbIndex($this, $indexName);\n $index->column($columns->name, $columns->sortType);\n } // end if correct object\n } // end if object\n\n if (is_array($columns)) {\n $indexName = \"idx_\".$this->tableName;\n $cols = [];\n foreach($columns as $col) {\n $indexName .= \"_\".$col;\n $indexColumn = new stdClass;\n $indexColumn->name = $col;\n $indexColumn->sortType = DbSortTypes::Asc;\n $cols[] = $indexColumn;\n } // end foreach\n\n // We create the index\n // Assign the columns\n $index = new DbIndex($this, $indexName, false, $cols);\n } // end if array\n } else {\n // Several columns, default ASC\n // The name:\n $indexName = \"idx_\".$this->tableName;\n $cols = [];\n foreach($args as $arg) {\n $indexName .= \"_\".$arg;\n $indexColumn = new stdClass;\n $indexColumn->name = $arg;\n $indexColumn->sortType = DbSortTypes::Asc;\n $cols[] = $indexColumn;\n } // end foreach\n\n // We create the index\n // Assign the columns\n $index = new DbIndex($this, $indexName, false, $cols);\n } // end if one arg\n\n if ($index) {\n $this->indexes[] = $index;\n return $this->indexes[count($this->indexes)-1];\n } // end if index\n\n // If we got here, it's an error\n throw new Exception(\"Index cannot be form\");\n }",
"public function index(IndexableEntity $entity);",
"public function func_refindex() {}",
"public function buildProjectIndexes($options = array()){\n\t\t\n\t\t\n\t\tif(!empty( $options['category']) ) $paginator = $this->facadeProject->findAllProjectsByCategoryPaginator($options['category']);\n\t\telse $paginator = $this->facadeProject->findAllProjects();\r\n\t\n\t\t\\Zend_Search_Lucene_Analysis_Analyzer::setDefault(new \\Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8Num_CaseInsensitive ());\r\n\t\t$index = \\Zend_Search_Lucene::create(APPLICATION_PATH . '/indexes/projects');\r\n\t\r\n\t\t// go through all members in the index file\r\n\t\tforeach ($paginator as $project){\r\n\t\t\t$this->addProjectIndex($project); // add new index to the index\r\n\t\t}\r\n\t\r\n\t\t// optimize the index\r\n\t\t$index->optimize();\n\t\r\n\t\treturn $index->numDocs();\r\n\t}",
"public function getIndexAnalysis()\n {\n foreach ($this->items as $item) {\n if ('index' == $item->getName()) {\n return $item;\n }\n }\n }",
"public static function get_search_sql($args = array()){\n global $TFUSE;\n return $TFUSE->ext->seek->get_search_sql($args);\n }",
"public function scopes()\n {\n return [\n 'none' => 'Testing Unit',\n 'tag' => new TagScope(),\n 'category' => new CategoryScope(),\n\n ];\n }",
"public function getIndex()\n {\n return $this->get(self::_INDEX);\n }",
"public function index(): Relation;",
"public static function _index()\n\t{\n\t\treturn self::$_index;\n\t}",
"public function scopes()\n {\n return [\n 'category' => new CategoryScope(),\n ];\n }",
"abstract public function doIndex($item);",
"public function defaultScope()\n {\n return array('order' => 'loanId DESC');\n }",
"abstract public function index($params);",
"public function fullIndexAction() {}",
"public static function index($name)\n {\n // Call baseInit() if not yet called\n $class = static::class;\n if (!isset(self::$baseInited[$class])) {\n self::$baseInited[$class] = true;\n static::baseInit();\n }\n return static::$indexes[$name] ?? null;\n }",
"public function scopeSearch($query){\n if (request()->has('search_query') && !empty(request()->search_query) && request()->has('search_columns') && !empty(request()->search_columns) ) {\n \t$query = $this->getQuery($query , request()->search_columns , request()->search_query );\n }else{\n \tif (request()->has('search_query') && !empty(request()->search_query)) {\n \t\t$query = $this->getQuery($query , $this->fillable , request()->search_query );\n \t}\n }\n\n \n \n \n \n \n return $query;\n }",
"function getElasticSearchIndexes() {\n\n return 'pdb'.',' . 'geo'.',' . 'dbgap' .','. 'lincs' .','. 'arrayexpress'.','. 'gemma'.',' . 'sra'.','.'bioproject' .','.'clinicaltrials'.',' . 'dryad' .','\n .'cvrg'.','.'dataverse' .','.'neuromorpho'.','.'peptideatlas'.','.'ctn'.','.'cia'.','.'mpd'.','.'niddkcr'.','.'physiobank'.','.'proteomexchange'.','.'openfmri'.','.'nursadatasets'.','\n .'yped'.','.'cil'.','.'icpsr'.','.'gdc'.','.'bmrb'.','.'swissprot'.','.'clinvar'.','.'retina'.','.'emdb'.','.'epigenomics'.','.'nitrcir'.','.'neurovaultatlases'.','.'neurovaultcols'.','\n .'neurovaultnidm'.','.'rgd'.','.'datacitebgi'.','.'datacitemorphobank'.','.'vectorbase'.','.'datacitegnd'.','.'datacitepeerj'.','.'datacitezenodo'.','.'omicsdi'.','.'datacitesbgrid'\n .','.'simtk'.','.'datacitecxidb'.','.'datacitebils'.','.'dataciteada'.','.'dataciteukda'.','.'dataciteadaptive'.','.'datacitemit'.','.'datacitectsi'.','.'datacitefdz'\n .','.'datacitembf'.','.'datacitenimh'.','.'datacitejhu'.','.'datacitecandi'.','.'datacitelshtm'.','.'datacitedatabrary'.','.'immport'.','.'datacitesdscsg'.','.'datacitecrcns'\n .','.'nsrr'.','.'lsdb'.','.'naturedata'.','.'genenetwork'.','.'ndarpapers'.','.'datacitethieme'.','.'datacitefigshare'.','.'dataciteccdc'.','.'wormbase'.','.'gtexldacc'.','.'metabolomics';\n\n}",
"public function getScopes();",
"public function getScopes();",
"public function getScopes();",
"public function scopes()\n \t{\n \t\t$dogs = Dog::all();\n \t\treturn view('exam.scopes',compact('dogs'));\t\n \t}",
"function _campaign_resource_index($parameters) {\n // Initialize output.\n $index = array();\n\n // Get the results of the explore_campaigns view.\n $view = views_get_view('explore_campaigns');\n $view->execute();\n\n $filter_staff_pick = FALSE;\n if (isset($parameters['is_staff_pick']) && $parameters['is_staff_pick']) {\n $filter_staff_pick = TRUE;\n }\n\n foreach ($view->result as $result) {\n $campaign = new StdClass();\n $campaign->title = $result->label;\n $campaign->nid = $result->entity_id;\n $campaign->is_staff_pick = $result->bm_field_staff_pick[0];\n // If not filtering by staff pick:\n if (!$filter_staff_pick) {\n // Add this campaign to the result.\n $index[] = $campaign;\n }\n // Else check if it's a staff pick:\n if ($campaign->is_staff_pick) {\n $index[] = $campaign;\n }\n }\n\n return $index;\n}",
"public function isIndex();",
"public function getScopes(): array;",
"public function getScopes(): array;",
"protected function _scope()\n\t{\n\t\treturn $this->_meta['scope'];\n\t}",
"public function getControllerIndex($context = null);",
"public function search($args){\n\t\t//Sets defaults where input doesn't exist.\n\t\t//This will only add if the index doesn't exist?\n\t\t$args += [\n\t\t\t\"page\" => 0,\n\t\t\t\"index\" => null,\n\t\t\t\"type\" => \"books\"\n\t\t];\n\t\textract($args);\n\t\t//Now check we have a query\n\t\tif(!isset($query)){\n\t\t\techo \"NEED TO HAVE A QUERY IN SEARCH\";\n\t\t\texit(1);\n\t\t}\n\t\t//Create url for search\n\t\t$url = \"$this->apiRoot/$type?q=$query&p=$page\" . ($index === null ? \"\" : \"&i=$index\") . $this->apiTail;\n\n\t\t//Run search, return json as array\n\t\t//return file_get_contents($url);\n\t\treturn apiSampleSearch();\n\t}",
"public function getQueryScope()\n {\n return $this->getQuery();\n }",
"public function defaultScope() {\n return array(\n 'order' => $this->getTableAlias(false, false) . '.name'\n );\n }",
"protected function getAllIndexesRequest()\n {\n\n $resourcePath = '/indexes';\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 []\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('auth_token');\n if ($apiKey !== null) {\n $queryParams['auth_token'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-RSearch-App-ID');\n if ($apiKey !== null) {\n $headers['X-RSearch-App-ID'] = $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 }",
"public function buildIndexQuery(array $param): Builder\n {\n return $this->model->buildIndexQuery($param);\n }",
"public function scopeSearch($query, $term);",
"private function createIndexs()\n {\n if(is_array($this->queryIndex) && count($this->queryIndex) > 0){\n $queryIndex = implode(', ', $this->queryIndex);\n return \", {$queryIndex}\";\n }\n }",
"function getIndexName()\n\t{\n\t\treturn $this->indexName;\n\t}",
"function get_default_search($args = array()){\r\n\t\t$defaults = array(\r\n\t\t\t'eventful' => false, //Locations that have an event (scope will also play a part here\r\n\t\t\t'eventless' => false, //Locations WITHOUT events, eventful takes precedence\r\n\t\t\t'orderby' => 'name',\r\n\t\t\t'scope' => 'all'\r\n\t\t);\r\n\t\t$args['eventful'] = ($args['eventful'] == true);\r\n\t\t$args['eventless'] = ($args['eventless'] == true);\r\n\t\treturn parent::get_default_search($defaults, $args);\r\n\t}",
"public function defaultScope()\n { \n \t// Dont do the scope check for logging in and for admin pages \n \t// **ATTENTION: This will need to be changed in the future\n\n \t// admin page can only show tutor\n \tif ('admin' == Yii::app()->controller->getAction()->getId())\n\t return array( \n\t 'condition'=>'(type=\"tutor\")', \n\t ); \n\n\n\t\tif (null == Yii::app()->user->id) \n\t\t\treturn array();\n\t\telse if ('view' == Yii::app()->controller->getAction()->getId())\n\t\t\treturn array();\n\t\telse \n\t return array( \n\t 'condition'=>'(id='.Yii::app()->user->id.')', \n\t ); \n\n }",
"public static function search()\n {\n return new DIndexSearch(get_called_class());\n }"
] | [
"0.718105",
"0.5625875",
"0.54953057",
"0.5454769",
"0.5454769",
"0.5454769",
"0.5454424",
"0.5454424",
"0.5454424",
"0.54543394",
"0.54543394",
"0.5453691",
"0.5394627",
"0.5369575",
"0.530874",
"0.5304495",
"0.5304495",
"0.5284758",
"0.5260252",
"0.52202696",
"0.5208177",
"0.5208177",
"0.5208177",
"0.5168891",
"0.5146458",
"0.5135388",
"0.49696475",
"0.49546626",
"0.49463776",
"0.492609",
"0.48954463",
"0.48741356",
"0.48644963",
"0.48615408",
"0.48450398",
"0.48302343",
"0.4824451",
"0.48156044",
"0.4815397",
"0.47840798",
"0.47741997",
"0.47738785",
"0.47738785",
"0.47738785",
"0.47702786",
"0.47630957",
"0.47518682",
"0.47420657",
"0.4723981",
"0.47096843",
"0.47093925",
"0.46972623",
"0.4693868",
"0.4693868",
"0.4693687",
"0.46806353",
"0.46724355",
"0.46573234",
"0.4649061",
"0.4636844",
"0.46262503",
"0.46193597",
"0.4615083",
"0.4608908",
"0.45992875",
"0.45992678",
"0.45984793",
"0.45947823",
"0.4567187",
"0.45636457",
"0.45633125",
"0.4552721",
"0.4552085",
"0.45509255",
"0.45428014",
"0.4538627",
"0.45258898",
"0.4523758",
"0.45095733",
"0.45055386",
"0.45055386",
"0.45055386",
"0.45040658",
"0.4502596",
"0.4502419",
"0.4483471",
"0.4483471",
"0.44832298",
"0.4482464",
"0.44819924",
"0.44789547",
"0.4476658",
"0.44711247",
"0.44652182",
"0.4456899",
"0.4455512",
"0.44433594",
"0.44421667",
"0.4425792",
"0.44236618"
] | 0.545216 | 12 |
/ This function is not allowed to actually change the attribute $method, it will render objects of this class unusable when trying to send a command to a bose speaker. Method exists only for consistency. | private function setMethod($method) {
return;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setMethod($value) { $this->_method = $value; }",
"abstract protected function setMethod();",
"public function setMethod($method);",
"public function setMethod($method);",
"public function set_method($method)\n {\n }",
"public function setMethod($method)\n {\n $this->method = $method;\n }",
"public function set_method($method) {\n $this->_method = (string)$method;\n }",
"public function method($method)\n {\n $this->method = $method;\n }",
"public function setMethod(string $method): self;",
"public function SetMethod ($method = NULL);",
"protected function setMethod($method) {\n $this->_method = $method;\n }",
"public function setMethod($method)\n {\n $this->method = $method;\n }",
"public function setMethod($method)\n {\n $this->method = $method;\n }",
"public function setMethod($method)\n {\n $this->method = $method;\n }",
"public function setMethod($method)\n {\n $this->method = $method;\n }",
"function setMethod( $val){\n\t$this->_method = $val;\n\t}",
"public function setMethod($method)\n {\n $this->method = strtolower($method);\n }",
"private function setMethod(string $method): void\n {\n $this->method = $method;\n }",
"public function getMethod() {}",
"public function getMethod() {}",
"public function getMethod() {}",
"public function getMethod() {}",
"function getMethod()\r\n {\r\n }",
"public function getMethod()\n {\n }",
"public function setMethod($method)\n {\n $this->setAttribute('method', strtolower($method));\n }",
"public function setMethod( $method )\n\t{\n\t\t$this->setAttribute( \"method\", $method );\n\t}",
"public function __call($method, $message)\n {\n }",
"public function withMethod($method)\n {\n }",
"public function withMethod($method)\n {\n }",
"protected function callCommandMethod() {}",
"public function method(string $method): self;",
"public function setMethod($method)\n {\n $method = strtolower($method);\n\n // ensure this is a supported method\n if (!isset($this->methods[$method])) {\n throw new RuntimeException(\"Unsupported method: '$method'\");\n }\n\n $command = $this->getCommandPath($this->methods[$method]);\n\n if ($command == false && $this->getAutoSelect()) {\n // remove the method we were unable to find so we don't check it again\n unset($this->methods[$method]);\n\n // check all remaining methods until we find one that can be used\n foreach ($this->methods as $method => $command) {\n if ($command = $this->getCommandPath($command) !== false) {\n break;\n }\n }\n }\n\n if ($command == false) {\n $this->options['method'] = '';\n $this->command = '';\n throw new RuntimeException('Command not found: ' . $method);\n }\n\n $this->options['method'] = $method;\n $this->command = $command;\n\n return $this;\n }",
"function processMethods( &$method, $key )\r\n{\r\n $method = $method->name;\r\n}",
"final function send()\n {\n if (! $command = $this->Command )\n throw new \\Exception('No Command Is Specified.');\n\n\n // Alter Platform Commands\n $methodName = $command->getMethodName();\n $nameSpace = implode('_', $command->getNamespace());\n $alterCall = $nameSpace.'_'.$methodName;\n if (! method_exists($this, $alterCall) )\n throw new \\BadMethodCallException(sprintf(\n 'Method (%s) is not defined in Platform as (%s).'\n , $command->getMethodName()\n , $alterCall\n ));\n\n\n // Call Alternative Method Call Instead ...\n $r = $this->{$alterCall}( $command );\n if (! $r instanceof iResponse)\n throw new \\Exception(sprintf(\n 'Result from (%s) must be instance of iResponse. given: (%s).'\n , $alterCall, \\Poirot\\Std\\flatten($r)\n ));\n\n return $r;\n }",
"public function setMethod($method)\n\t{\n\t\t$this->method = $method;\n\t\treturn $this;\n\t}",
"public function setMethod($method)\n\t{\n\t\t//Inline bots adds answerInlineQuery.\n\t\t$this->method = $method;\n\t\treturn True;\n\t}",
"public function setRequestMethod($method) {}",
"public function method() {\n\t}",
"public function SetMethod($method) {\n\t\t$this->method = ucwords($method);\n\n\t\treturn TRUE;\n\t}",
"public function setMethod($request_method) {}",
"public function setMethod($method){\n\t\tswitch ($method){\n\t\t\tcase self::GET: $this->method = self::GET;\n\t\t\t\tbreak;\n\t\t\tcase self::PUT: $this->method = self::PUT;\n\t\t\t\tbreak;\n\t\t\tcase self::POST: $this->method = self::POST;\n\t\t\t\tbreak;\n\t\t\tcase self::HEAD: $this->method = self::HEAD;\n\t\t\t\tbreak;\n\t\t\tcase self::DELETE: $this->method = self::DELETE;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new \\InvalidArgumentException('Unknown method: ' . $method);\n\t\t}\n\t}",
"public function setMethod($method)\n {\n $method = strtoupper($method);\n $this->method = $method;\n return $this;\n }",
"public function method(string $method)\n {\n $this->method= $method;\n return $this;\n }",
"public function setMethod($method) {\n $this->method = $method;\n return $this;\n }",
"public function setMethod($method)\n {\n $this->_method = $method;\n return $this;\n }",
"public function method(): string{\n return $this->_method;\n }",
"public function setMethod (string $method) : self {\n $this->method = $method;\n return $this;\n }",
"public function setMethod (string $method)\n {\n $this->method = $method;\n $this->save();\n return $this;\n }",
"public function getMethod() { return $this->_method; }",
"public function setMethod($method)\r\n {\r\n $this->method = $method;\r\n\r\n return $this;\r\n }",
"public function get_method()\n {\n }",
"public function setMethod($method)\n {\n $this->method = $method;\n return $this;\n }",
"public function setMethod($method)\n {\n $this->method = $method;\n return $this;\n }",
"public function getMethod();",
"public function getMethod();",
"public function getMethod();",
"public function getMethod();",
"public function getMethod();",
"public function getMethod();",
"public function getMethod();",
"protected function setMethod($method)\n\t{\n\t\t$this->method = \\strtoupper($method);\n\t\treturn $this;\n\t}",
"public function getMethod(): string {}",
"public function setMethod($method)\n {\n // Backwards compatibility\n $map = array('left' => 'west', 'right' => 'east', 'top' => 'north', 'bottom' => 'south');\n if($key = array_search($method, $map))\n {\n $message = sprintf('sfImageTransformPlugin thumbnail method \\'%s\\' is depreciated use \\'%s\\'', $method, $key);\n sfContext::getInstance()->getEventDispatcher()->notify(new sfEvent($this, 'application.log', array($message, 'priority' => sfLogger::ERR)));\n }\n \n if(in_array($method, $this->methods))\n {\n $this->method = strtolower($method);\n \n return true;\n }\n \n return false;\n }",
"public function setMethod($method) \n {\n $this->method = $method;\n\n return $this;\n }",
"public function setMethod($method)\n {\n if ($this->method !== null) {\n throw new RuntimeException('Method cannot be overwritten');\n }\n $this->method = $method;\n }",
"public function __construct($method)\n\t{\n\t\t$message = '<em>%s</em> is not implemented.';\n\t\t$error = sprintf($message, $method);\n\n\t\tparent::__construct($error);\n\t}",
"public function getMethod() :string;",
"public function method($method) {\n\t\t$this->setRequirement('_method', strtoupper($method));\n\t\treturn $this;\n\t}",
"public function setMethod($method)\n {\n $this->method = (string) strtoupper($method);\n\n return $this;\n }",
"public function setMethod($method)\n {\n switch ($method) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'DELETE':\n $this->method = $method;\n break;\n default:\n throw new \\Exception('Not supported method');\n }\n\n curl_setopt($this->handler, CURLOPT_CUSTOMREQUEST, $this->method);\n }",
"public function setMethod($method)\n {\n $this->method = strtoupper($method);\n\n return $this;\n }",
"public function getMethod() : string;",
"private function __call($method)\r\n\t{\r\n\t\tthrow new TACException('Invalid method called => (' . __CLASS__ . '::' . $method . ')');\r\n\t}",
"public function setMethod($name)\n {\n $this->method = $name;\n }",
"public function setMethod(string $method)\n {\n $this->_method = $method;\n\n return $this;\n }",
"public function & SetMethod ($method = NULL) {\n\t\t/** @var $this \\MvcCore\\Route */\n\t\t$this->method = strtoupper($method);\n\t\treturn $this;\n\t}",
"public function method() {\n return $this->method;\n }",
"public function __call($method, $attributes = [])\n {\n $class = head($attributes);\n $classname = is_object($class) ? get_class($class) : $class;\n $position = $this->findOccurence($classname, ['Commands\\\\', 'Queries\\\\', 'Models\\\\']);\n $default = substr_replace($classname, 'Events\\\\'.Str::studly($method), $position);\n $name = $this->resolveEventClass($classname, $default);\n $fire = Str::endsWith($method, 'ing') ? 'until' : 'event';\n\n $event = (new $name(...$attributes))->event($this->normalizeEventClass($classname, $default));\n\n return $this->{$fire}($event);\n }",
"public function method(&$class, $method);",
"public function testSetMethod()\n {\n $this->_req->setMethod('SOMETHING');\n $this->assertEquals('SOMETHING', $this->_req->getMethod());\n }",
"public function setMethod(string $method)\n {\n $this->method = $method;\n\n return $this;\n }",
"public function getMethod ()\n {\n return $this->method;\n }",
"public function __call($method, array $arguments) {}",
"public function method(): string\n {\n return $this->method;\n }",
"public function getMethod(){\n return $this->method;\n }",
"public static function setMethod(&$ch,$method)\n {\n switch($method){\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'DELETE':\n curl_setopt($ch,CURLOPT_CUSTOMREQUEST, $method);\n break;\n default:\n throw new \\Exception(\"Metodo no soportado\");\n break;\n }\n }",
"public function setMethod($method)\n {\n $this->method = $method;\n\n return $this;\n }",
"public function method($method = null)\n {\n if (is_null($method)) {return $this->method;}\n if (is_int($method)) {$this->method = $this->valid_method[$method];}\n if (in_array(strtoupper($method), $this->valid_method)) {\n $this->method = strtoupper($method);\n }\n }",
"public function __call($method, $arguments) {}",
"public function __call($method, $arguments) {}",
"public function addMethod($method){\n //checking if the method variable is array and it has indexes\n if(is_array($method) && !empty($method)){\n //loop though it\n foreach($method as $hookedClassMethod){\n //append the method to the methods array\n $this->methods[] = $hookedClassMethod;\n \n }\n //if the method variable is not array but not empty then it should be a string or any other value\n //other checks might be valid such as making sure it is a string\n }elseif(!is_array($method) && !empty($method)){\n //append the method to the methods array\n $this->methods[] = $hookedClassMethod;\n \n }else{\n //throw an exception if the passed argument does not match our conditions\n throw new RuntimeException('addMethod expect 1 argument and it should not be empty');\n \n }\n }",
"public function setMethod($requestMethod)\n {\n $this->_method = $requestMethod;\n }",
"public function __get(string $method);",
"function addMethod($method)\n {\n if (is_string($method)) {\n $this->methods[] = $this->normalizeMethod($method);\n } else if (is_array($method)) {\n foreach ($method as $item) {\n $this->methods[] = $this->normalizeMethod($item);\n }\n } else {\n throw new \\InvalidArgumentException('Invalid $method argument type : expected string or array');\n }\n return $this;\n }",
"protected function handleMethod()\n {\n try {\n parent::$method = new ReflectionMethod(parent::$view->name, Request::$method);\n } catch(Exception $e) {\n self::jump(405);\n }\n }",
"public function getMethod(): string;",
"public function getMethod(): string;",
"public function getMethod(): string;",
"public function getMethod(): string;",
"public function getMethod(): string;"
] | [
"0.72696596",
"0.71478105",
"0.7129051",
"0.7129051",
"0.7054419",
"0.70030844",
"0.6945324",
"0.69099635",
"0.6857366",
"0.6797961",
"0.6664143",
"0.66458887",
"0.66458887",
"0.66458887",
"0.66458887",
"0.6604361",
"0.6603469",
"0.6594303",
"0.6544439",
"0.6544439",
"0.6544439",
"0.6544439",
"0.65192175",
"0.65144634",
"0.64249796",
"0.64135057",
"0.63954234",
"0.6383414",
"0.6383414",
"0.63550764",
"0.63495076",
"0.63194454",
"0.6281959",
"0.62739176",
"0.6245516",
"0.6244257",
"0.6240646",
"0.6238298",
"0.6221875",
"0.62006325",
"0.61997616",
"0.61882323",
"0.61800665",
"0.61799824",
"0.6174319",
"0.6169965",
"0.6167237",
"0.6163521",
"0.61560756",
"0.6112777",
"0.6108301",
"0.6094553",
"0.6094553",
"0.60679615",
"0.60679615",
"0.60679615",
"0.60679615",
"0.60679615",
"0.60679615",
"0.60679615",
"0.60667205",
"0.6054023",
"0.60350645",
"0.6015057",
"0.5985186",
"0.5978717",
"0.59727794",
"0.59683776",
"0.595577",
"0.59486496",
"0.593497",
"0.5927982",
"0.59252346",
"0.59148777",
"0.59114856",
"0.58957267",
"0.58956444",
"0.58878565",
"0.58807683",
"0.58731353",
"0.58633614",
"0.58497405",
"0.58451456",
"0.5842744",
"0.58332485",
"0.5831355",
"0.5819236",
"0.5809666",
"0.5809197",
"0.5809197",
"0.58091897",
"0.5800452",
"0.57861024",
"0.5777432",
"0.577548",
"0.5771399",
"0.5771399",
"0.5771399",
"0.5771399",
"0.5771399"
] | 0.71377045 | 2 |
/ This function is not allowed to actually change the attribute $path, it will render objects of this class unusable when trying to send a command to a bose speaker. Method exists only for consistency. | private function setPath($path) {
return;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setPath($path){ }",
"public function setPathAttribute($path){ //modificaremos el atributo path, estamos recibiendo path de la BD\n\n if(! empty($path)){ //El campo path no debe estar vacio para que ejecute toda esa accion\n $name = Carbon::now()->second.$path->getClientOriginalName();//CON CARBON LE ESPECIFICAMOS LA FECHA DE HOY, TOMAMOS EL SEGUNDOEN QUE ES SUBIDO Y LO CONCATENAMOS AL NOMBRE ORIGINAL DEL ARCHIVO, creamos una variable que contatenara el nombre con los segundos\n $this->attributes['path'] = $name; //hacemos referencia a path y vamos a cambiarlo el nombre\n \\Storage::disk('local')->put($name, \\File::get($path)); //ACA SE HACE LA SUBIDA DEL ARCHIVO, especificamos el local y mediante el metodo put vamos a almacenar nuestro archivo, recibe el nombre y el archivo que vamos a subir que es el path\n }\n }",
"public function setPath( $path );",
"public function setPathAttribute($path) {\n\n //$this->attributes[\"path\"] asemos referencia a el atributo path\n // Carbon::now()->second es para obtener los segundos actuales\n //concadenamos luego el nombre del archivo q estamos resiviendo con $path->getClientOriginalName()\n $this->attributes[\"path\"] = Carbon::now()->second . $path->getClientOriginalName();\n\n //nombre del archivo va a ser lo mismo\n $name = Carbon::now()->second . $path->getClientOriginalName();\n\n //para subir un archivo se hace con la clase \\Storage::disk(\"local\")\n //y con el metodo put almasenamos el archivo, resive el nombre y el archivo q vamos a subir\n //en este caso entramos a la clase \\File::get() y le accinamos la ruta de nuestro archivo\n \\Storage::disk(\"local\")->put($name, \\File::get($path));\n }",
"function set_path($path) \n {\n $this->path = \"/\" . trim($path, \"/\");\n }",
"public function testSetPath(): void\n {\n $set = $this->class->setPath($this->value);\n\n self::assertTrue($set instanceof Command);\n }",
"public function setPath($path);",
"public function setPath($path);",
"public function setPath($path);",
"public function setPath($path);",
"public function setPath(string $path)\n {\n $this->path = $path;\n\t}",
"public function setPath($path = '');",
"public function setPath($path)\n {\n return parent::setPath($path);\n }",
"public function setPath()\n {\n $this->path = $this->getNamespace() . $this->getControllerName();\n }",
"public function setPath($path)\n\t{\n\t\t\n\t\t$this->__path = (string)$path;\n\n\t}",
"public function setPath( $path )\n\t{\n\t\t$this->path = $path;\n\t\t$this->modified = true;\n\t}",
"public function setPath(string $path): self;",
"public function setPath(string $path): self;",
"public static function setPath($path)\n {\n }",
"function setPath($path)\n {\n $this->path = trim($path);\n }",
"public function setPath($path)\n\t{\n\t\t$this->path = $path;\n\t}",
"function setPath($path) {\r\n\t\tif($this->configured) {\r\n\t\t\treturn 'Configuration is frozen';\r\n\t\t}\r\n\t\t$URLDecodedPath = '';\r\n\t\t$URLDecodedPath = urldecode($path);\r\n\t\t$this->path = $URLDecodedPath;\r\n\t}",
"public function setPath($path)\r\n\t{\r\n\t\t$this->path=$path;\r\n\t}",
"public function set_path($path) {\n $this->path = $path;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n }",
"public function setPath( $val ) { $this->__set('path', $val); }",
"public function setPath( $path )\n {\n $this->path = us($path);\n }",
"public function SetPath($path)\n\t{\n\t\t$this->path = $path;\n\t}",
"public function setPath($path)\n {\n if ($path == self::AUTO_DETECT) $path = $this->findSendmail();\n $this->path = $path;\n }",
"function setPath($path) {\n if (substr($path,-1)!=\"/\") $path.=\"/\";\n //if (!file_exists($path)) echo \"<div>Path $path not found</div>\";\n $this->mat = $path;\n return true;\n }",
"public static function setPath($path)\n\t{\n\t\tself::$path = $path;\n\t}",
"public function setPath(string $path): void\n {\n $this->path = (string) $path;\n }",
"public function path() {}",
"public function path() {}",
"public function setPath($value = null)\n {\n\n }",
"protected\n function getPath($path)\n {\n // By default, we won't do anything, but\n // it can be overridden from a child class\n return $path;\n }",
"public function setPath($path)\n\t{\n\t\t$this->_path = $path;\n\t\treturn $this;\n\t}",
"public function withPath($path)\n {\n }",
"public function setPath(string $path) : self\n {\n $this->initialized['path'] = true;\n $this->path = $path;\n return $this;\n }",
"public function setPath(?string $value): void {\n $this->getBackingStore()->set('path', $value);\n }",
"public function setPath($path) {\n $this->path = $path;\n return $this;\n }",
"public function setPath($path) {\n $this->path = $path;\n return $this;\n }",
"public function setPath($value)\n {\n return $this->set('Path', $value);\n }",
"public static function set_path($path) {\n\t\tstatic::$path = $path;\n\t}",
"abstract protected function getPath();",
"public function setPath($path)\n\t{\n\t\t/* This must be created here to prevent the directory from\n\t\t * becoming automatically converted to an absolute path. */\n\t\t$this->path = new PhingFile($path);\n\t}",
"protected function alterPathForStreamWrapper($path) {\n return $path;\n }",
"protected function setPath( string $path ) : void\n {\n $this->path = DIGITAL_BASE_PATH.$path;\n }",
"public function setContextPath($path) {\n\t\t\n\t}",
"protected abstract function getPath();",
"public function getPath() { return $this->_path; }",
"protected function createPathIfNeeded() {}",
"public function setPath(?string $path): static\n {\n $this->path = $path;\n return $this;\n }",
"public function setAttachPath($path)\n {\n $this->attachPath = $path;\n }",
"public function set_path($path)\n\t{\n\t\t$this->route_stack[self::SEG_PATH] = $path;\n\t}",
"public function set_path() {\n\t\t\t\n\t\t\t// pick up the path types\n\t\t\t$path_types = include_once(CONFIGPATH . 'path-types.php' );\n\n\t\t\t// get the base path for the deploy type\n\t\t\t$base_path = $path_types[ $this->repo[ 'type' ] ];\n\n\t\t\t// check if it is a valid path\n\t\t\t$this->is_path_valid( $base_path );\n\n\t\t\t// append the repositories name to get the final deploy path\n\t\t\t$this->repo[ 'path' ] = $base_path . '/' . $this->repo[ 'name' ];\n\t\t}",
"public function setPath($path)\r\n {\r\n if (null !== $path) {\r\n $this->path = (string) $path;\r\n } else {\r\n $this->path = $path;\r\n }\r\n\r\n return $this;\r\n }",
"function admin_updatePathway( $path, $name )\n{\n\tglobal $g_admin_pathway;\n\n\t$new_pos = count($g_admin_pathway);\n\n\t$g_admin_pathway[$new_pos]['url' ] = $path;\n\t$g_admin_pathway[$new_pos]['name'] = $name;\n}",
"public function __construct()\n {\n foreach ($this as $key => $property)\n if (is_array($property) && isset($property['path']))\n $this->{$key}['path'] = VPATH . $property['path'] . EXT;\n }",
"public function getPath() {}",
"public function getPath() {}",
"public function getPath() {}",
"public function getPath() {}",
"public function getPath() {}",
"public function getPath() {}",
"protected function changePath()\n {\n chdir(base_path());\n }",
"public function setPath( $path ) {\n\t\t$this->seedPath = rtrim( $path, '/' ) . '/';\n\t}",
"public function setCommandPath($path) {\n\t\tif (false === realpath($path))\n\t\t\tthrow new App_Pdf_Adapter_Exception(\"Invalid path: $path\");\n\n\t\t$this->_commandPath = realpath($path);\n\t\treturn $this;\n\t}",
"public function __construct($path){\n $this->path = $path;\n }",
"public function withPath($path)\n {\n // TODO: Implement withPath() method.\n }",
"public function withPath($path)\n {\n // TODO: Implement withPath() method.\n }",
"public function getPath(){ }",
"public function getPath(){ }",
"private function setPath()\n {\n $urlE = $this->explodedUrl;\n\n unset($urlE[0], $urlE[1], $urlE[2]);\n $url = implode('/', $urlE);\n $pathE = explode('?', $url);\n $e = explode('/', $pathE[0]);\n $this->path = count($e) == 1 && $e[0] === '' ? array() : $e;\n }",
"function completePath(){\n \treturn $this->path . $this->name;\n }",
"function __construct($path) {\n\t\t$this->path = $path;\t\t\n\t}",
"public static function setPath($path)\n {\n static::$pathTop = $path;\n }",
"public function __construct( $path )\n {\n $this->setPath( $path );\n }",
"public function setPath($path)\n {\n $this->_path = $path;\n\n return $this;\n }",
"public function setPath($path) {\n /*** check if path is a directory ***/\n if (!is_dir($path)) {\n throw new Exception ('Invalid controller path: `' . $path . '`');\n }\n /*** set the path ***/\n $this->path = $path;\n }",
"public function path($path = null);",
"public function path($path = null);",
"public function setPath($path) { \n $this->__imageSavePath = $path; \n }",
"public function setPath($name = null, $_path, $appBaseDir = false){\n return $this->_getObjectPath()->addPath($name, $_path, $appBaseDir);\n }",
"public function setPath($path)\n {\n $this->path = $path;\n\n return $this;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n\n return $this;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n\n return $this;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n\n return $this;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n\n return $this;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n\n return $this;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n\n return $this;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n\n return $this;\n }",
"public function setPath($Path)\n {\n $this->__set(\"path\", $Path);\n }",
"public function setPartialPaths() {}"
] | [
"0.69205874",
"0.6797022",
"0.6795881",
"0.67047936",
"0.6603736",
"0.66008294",
"0.6491899",
"0.6491899",
"0.6491899",
"0.6491899",
"0.64860547",
"0.64691657",
"0.6464472",
"0.64613265",
"0.6444354",
"0.64167",
"0.6414064",
"0.6414064",
"0.6410894",
"0.63993835",
"0.6336694",
"0.6335353",
"0.62966096",
"0.62561715",
"0.62321603",
"0.62321603",
"0.62321603",
"0.62321603",
"0.62321603",
"0.62321603",
"0.62321603",
"0.6204752",
"0.61423963",
"0.61366343",
"0.6083742",
"0.60748106",
"0.60676086",
"0.60216874",
"0.5983051",
"0.59820306",
"0.5965021",
"0.5942832",
"0.59140795",
"0.5902742",
"0.5879814",
"0.5799196",
"0.57966965",
"0.57966965",
"0.5791152",
"0.57648295",
"0.5763191",
"0.57564586",
"0.5746159",
"0.57426053",
"0.5724804",
"0.5716073",
"0.57139486",
"0.56909156",
"0.56682307",
"0.5658388",
"0.5638482",
"0.56343955",
"0.5633344",
"0.56319445",
"0.5620298",
"0.56108224",
"0.561045",
"0.561045",
"0.561045",
"0.561045",
"0.5610233",
"0.5603946",
"0.55901265",
"0.55773",
"0.5575069",
"0.55682087",
"0.55682087",
"0.55624855",
"0.55624855",
"0.5551211",
"0.55389404",
"0.5524515",
"0.5508215",
"0.55050766",
"0.54976344",
"0.54927284",
"0.54925835",
"0.54925835",
"0.5473042",
"0.546475",
"0.5456091",
"0.5456091",
"0.5456091",
"0.5456091",
"0.5456091",
"0.5456091",
"0.5456091",
"0.5456091",
"0.54553",
"0.54391694"
] | 0.67820823 | 3 |
Autoloading a system library usin constructor method | public function __construct() {
parent::__construct();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct()\n {\n // Init security library object\n $this->securityLibObj = new SecurityLib();\n\n // Init exception library object\n $this->utilityLibObj = new UtilityLib();\n\n // Init DateTime library object\n $this->dateTimeLibObj = new DateTimeLib();\n }",
"public function __construct()\n {\n // Init security library object\n $this->securityLibObj = new SecurityLib();\n\n // Init exception library object\n $this->utilityLibObj = new UtilityLib();\n }",
"public function __construct()\n {\n // Init security library object\n $this->securityLibObj = new SecurityLib();\n\n // Init exception library object\n $this->utilityLibObj = new UtilityLib();\n }",
"public function __construct()\n {\n // Init security library object\n $this->securityLibObj = new SecurityLib();\n\n // Init exception library object\n $this->utilityLibObj = new UtilityLib();\n }",
"function __construct(){\n spl_autoload_register(function ($className) {\n $ds = DIRECTORY_SEPARATOR;\n $dir = App::$param['path'];\n $className = strtr($className, '\\\\', $ds);\n $file = \"{$dir}{$className}.php\";\n if (is_readable($file)) {\n require_once $file;\n }\n });\n set_include_path(get_include_path() . PATH_SEPARATOR . App::$param['path'] . PATH_SEPARATOR . App::$param['path'] . \"app\" . PATH_SEPARATOR . App::$param['path'] . \"app/libs/PEAR/\");\n }",
"public function __construct()\n\t{\n\t\t$this->_sys_path=$GLOBALS['path_to_site'].'/lib/core/api';\n\t}",
"function __construct() {\n // require_once(str_replace(\"\\\\\", \"/\", APPPATH).'libraries/NuSOAP/lib/nusoap'.EXT);\n require_once(str_replace(\"\\\\\", \"/\", APPPATH).'libraries/nusoap/nusoap'.EXT);\n }",
"function __construct() {\n self::add_extension();\n self::require_php_api();\n self::define_globals();\n self::require_subclasses();\n }",
"public function system_init() {\n }",
"function __constructor(){}",
"public function __construct() {\n if(!file_exists(SYSPATH.\"load_class.php\")){\n\t\t\theader('HTTP/1.1 503 Service Unavailable.', TRUE, 503);\n\t\t\techo 'Your appication folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF;\n\t\t\texit(3); // EXIT_CONFIG\n\t\t}\n\t\trequire_once(SYSPATH.\"load_class.php\");\n //Enable auto loading from the classes and libraries folders\n $classLoader = new ClassLoader(Array(APPPATH.'classes', APPPATH.'libraries'));\n $classLoader->register();\n $this->classLoader = $classLoader;\n }",
"public function __construct()\n {\n // Init security library object\n $this->securityLibObj = new SecurityLib();\n\n // Init exception library object\n $this->utilityLibObj = new UtilityLib();\n $this->staticDataConfigObj = new StaticDataConfig();\n \n }",
"public function __construct()\n {\n // Init security library object\n $this->securityLibObj = new SecurityLib();\n\n // Init exception library object\n $this->utilityLibObj = new UtilityLib();\n $this->staticDataConfigObj = new StaticDataConfig();\n \n }",
"function __construct() {\n $this->getSystemConfig();\n }",
"function __construct()\n {\n spl_autoload_register(array($this, 'load'));\n }",
"private function loadLib(){\n foreach($this->lib as $key=>$lib){\n $this->$key = RO::lib($lib);\n }\n }",
"function _initialize()\n {\n\n //initalize Loader\n $auto_load=array(\"io\",\"segment\",\"router\");\n \n foreach($auto_load as $library)\n {\n $this->$library=& load_class($library);\n }\n //load loader class\n $this->load =& load_class('Loader');\n \n //call auto load from config file\n $this->load->_auto_load();\n }",
"public function __construct()\n {\n // Init security library object\n $this->securityLibObj = new SecurityLib();\n\n // Init exception library object\n $this->utilityLibObj = new UtilityLib();\n\n // Init dateTimeLibObj library object\n $this->dateTimeLibObj = new DateTimeLib();\n\n // Init StaticDataConfig model object\n $this->staticDataObj = new StaticDataConfig();\n }",
"public function __construct()\n {\n // Init security library object\n $this->securityLibObj = new SecurityLib();\n\n // Init exception library object\n $this->utilityLibObj = new UtilityLib();\n\n // Init dateTimeLibObj library object\n $this->dateTimeLibObj = new DateTimeLib();\n\n // Init StaticDataConfig model object\n $this->staticDataObj = new StaticDataConfig();\n }",
"public function __construct()\n\t{\n\t\tparent::__construct('system');\n\t}",
"public function __construct()\n {\n // Init security library object\n $this->securityLibObj = new SecurityLib();\n }",
"public function __construct()\n {\n // Init security library object\n $this->securityLibObj = new SecurityLib();\n }",
"public function __construct()\n {\n // Init security library object\n $this->securityLibObj = new SecurityLib();\n\n }",
"public function __construct() {\n spl_autoload_register(array($this, 'loader'));\n }",
"function _construct(){ }",
"public function __construct()\n\t{\n\t\trequire_once Kohana::find_file('vendor', 'f1/f1_oauth');\n\t\trequire_once Kohana::find_file('vendor', 'f1/f1_util');\n\t\trequire_once Kohana::find_file('vendor', 'f1/f1_signer');\n\t}",
"public function __construct()\n {\n // do not try to autoload here!\n if (class_exists('COM', false))\n {\n try\n {\n // Microsoft says this is now deprecated\n $this->comObject = new \\COM('CAPICOM.Utilities.1');\n }\n catch (\\Exception $e)\n {\n throw \\Drilld\\Exception::wrap($e);\n }\n }\n else\n {\n throw new \\Drilld\\Exception('COM class not found');\n }\n }",
"public function __construct()\r\n {\r\n $configDir = ROOT . DS . \"config\" . DS;\r\n \r\n foreach(glob($configDir . \"*.php\") as $file)\r\n {\r\n $pathInfo = pathinfo($file);\r\n $GLOBALS[$pathInfo[\"filename\"]] = require($file);\r\n }\r\n\r\n // Include all PHP files from the config dir\r\n $libsDir = ROOT . DS . \"core\" . DS . \"utilities\" . DS . \"libs\" . DS . \"jwt\" . DS;\r\n \r\n foreach(glob($libsDir . \"*.php\") as $file)\r\n {\r\n ///echo $file.\"<br>\";\r\n $pathInfo = pathinfo($file);\r\n require($file);\r\n }\r\n \r\n spl_autoload_register(array($this, \"load\"));\r\n }",
"public function __construct()\n {\n self::autoload();\n }",
"public function __construct()\n {\n $this->_ci_ob_level = ob_get_level();\n $this->_ci_library_paths = array(APPPATH, TRPATH, BASEPATH);\n $this->_ci_helper_paths = array(APPPATH, TRPATH, BASEPATH);\n $this->_ci_model_paths = array(APPPATH, TRPATH);\n $this->_ci_view_paths = array(\n APPPATH . 'views/' => true,\n TRPATH . 'views/' => true\n );\n\n $this->sparksLoaderPath = APPPATH . 'third_party/';\n\n log_message('debug', 'Loader Class Initialized');\n\n parent::__construct();\n }",
"public function __construct() {\n\n parent::__construct();\n load_class('Service', 'core');\n $this->_ci_service_paths = array(APPPATH);\n }",
"public function __construct() { \n\t\n\t\t/* Do a Require Once On the needed Libraries */\n\t\trequire_once Config::get('prefix') . '/modules/mpd/mpd.class.php';\n\n\t}",
"public function _init() {}",
"function __construct()\n {\n parent::__construct(); \n //$this->load->library('Web_File_Manager/Elfinder');\n $this->load->library('Web_File_Manager/Item');\n\n }",
"public function __construct() {\n\n\t\t$this->pluginName = 'ssm/core';\n\t\t$this->loader = new Loader();\n\n $this->defineConstants();\n\n\t}",
"public function __construct() {\n $this->loader();\n }",
"public function __construct() {\n\t\tforeach(glob(CORE_BASE . 'helpers/*.php') as $file) {\n\t\t\trequire_once $file;\n\t\t}\n\t}",
"public function __construct() {\n\t\tspl_autoload_register( array( $this, 'autoload_api_google_files' ) );\n\t}",
"function __construct()\n {\n // $this->_ci =& get_instance();\n //load config \n // $this->load->library('user_agent'); \n }",
"public function __construct() {\n\t\t$this->hasExistsMethod = function_exists('apc_exists');\n\t}",
"public function library()\n\t{\n\t\n\t}",
"function __construct() {}",
"function __construct() {}",
"function __construct() {}",
"function __construct() {}",
"function __construct() {}",
"function __construct() {}",
"public function __construct()\n\t{\n\t\tforeach(Config::item('core.preload') as $type => $load)\n\t\t{\n\t\t\tif ($load == FALSE) continue;\n\n\t\t\tforeach(explode(',', $load) as $name)\n\t\t\t{\n\t\t\t\tif (($name = trim($name)) == FALSE) continue;\n\n\t\t\t\tswitch($type)\n\t\t\t\t{\n\t\t\t\t\tcase 'libraries':\n\t\t\t\t\t\tif ($name == 'database')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->database();\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$this->library($name);\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'models':\n\t\t\t\t\t\t$this->model($name);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected function _initSystemHelper()\n {\n if (!$this->_systemHelper) {\n $this->_systemHelper = new System\\Helper();\n }\n }",
"public function __construct(){\r\n $this->init_hooks();\r\n $this->includes_and_requires();\r\n }",
"function __autoload($class){\nrequire LIBS.$class.\".php\";\n}",
"protected abstract function __construct();",
"public function init() {\n parent::init();\n if (!is_object($this->api)) {\n $class = $this->api;\n $this->api = new $class;\n }\n $this->loadPlugins();\n }",
"public function __init(){}",
"public static function init() {\n $class = __CLASS__;\n new $class;\n }",
"public function __construct()\n {\n if ($module = Registry::get('request')->getModules()) {\n $path = Micro::getInstance()->config['AppDir'] . $module . '/' . ucfirst(basename($module)) . 'Module.php';\n\n if (file_exists($path)) {\n $path = substr(basename($path), 0, -4);\n self::$module = new $path();\n }\n }\n }",
"private function __construct()\r\n {\r\n // Prevent direct instantiation\r\n }",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function __construct()\n {\n // Init security library object\n $this->securityLibObj = new SecurityLib();\n\n // Init exception library object\n $this->utilityLibObj = new UtilityLib();\n\n // Init General staticData Model Object\n $this->staticDataObj = new StaticData();\n }",
"public function _init(){}",
"private final function __construct() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"function __construct() {\n require_once('src/Libraries/General.class.php');\n require_once('src/Libraries/ErrorHandler.class.php');\n require_once('src/Libraries/Cache.class.php');\n // init classes\n $this->classes['error'] = new \\Gluon\\Libraries\\ErrorHandler;\n $this->classes['cache'] = new \\Gluon\\Libraries\\Cache($this->classes['error']);\n $this->messages = $this->classes['cache']->get_cache_byfile('messages.yml.php');\n $GLOBALS['app'] = $this->classes['cache']->get_cache_byfile('app.yml.php');\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() {}",
"public function __construct() {\n\t\trequire_once FRONTEND_PATH.'../vendor/autoload.php';\n\n\t\tinclude FRONTEND_PATH.'system/classmap.php';\n\n\t\t$this->map = $CLASSMAP;\n\n\t\tspl_autoload_register( array($this, 'classmapLoader') );\n\t}",
"function _construct() {\n \t\n\t\t\n\t}",
"function __construct(){\n\t\tparent::__construct();\n\t\t\n\t\t$this->load->library('commonstructure');\n\n\t}",
"public function __construct () {\n $this->loadEnvironment();\n }",
"static public function initialize()\r\n {\r\n spl_autoload_register(\"self::load\");\r\n }",
"public function __construct()\n\t{\n\t\t$this->system = new System;\n\n\t\t$config = $this->system->getFileContent( \"Config\\\\config.json\" );\n\t\t$config = json_decode( $config, True );\n\n\t\tforeach( $config as $key => $value ) {\n\t\t\t$this->$key = $value;\n\t\t}\n\n\t\tif( $_SERVER['SERVER_NAME'] == \"localhost\" ) {\n\t\t\t$server = \"http://\" . $_SERVER['SERVER_NAME'];\n\t\t} else {\n\t\t\t$server = $_SERVER['SERVER_NAME'];\n\t\t}\n\t\t$this->server = $server . \"/\" . $this->workspace;\n\t\t\n\t\t$this->address = $this->parseAddress( $_SERVER['REQUEST_URI'] );\n\t}",
"protected function registerSystem() { }",
"function __autoload($class)\n{\n require LIBS.$class.\".php\";\n}"
] | [
"0.7429468",
"0.7292706",
"0.7292706",
"0.7292706",
"0.72368014",
"0.6937666",
"0.6919827",
"0.6915052",
"0.69046414",
"0.6863052",
"0.6856215",
"0.6847969",
"0.6847969",
"0.68470633",
"0.68226445",
"0.67772263",
"0.6751986",
"0.673813",
"0.673813",
"0.67188984",
"0.66930634",
"0.66930634",
"0.66647345",
"0.66539556",
"0.6640025",
"0.6638484",
"0.6636115",
"0.6630983",
"0.66167116",
"0.6598496",
"0.6588474",
"0.6573781",
"0.6558855",
"0.64844644",
"0.64799076",
"0.6469757",
"0.6464494",
"0.64641213",
"0.64640594",
"0.6461427",
"0.6452747",
"0.6432007",
"0.6432007",
"0.6432007",
"0.6432007",
"0.6432007",
"0.6432007",
"0.6429099",
"0.6422338",
"0.64154005",
"0.6409721",
"0.63986456",
"0.6393326",
"0.63824207",
"0.6375357",
"0.6374854",
"0.63746625",
"0.6371379",
"0.6371379",
"0.6371379",
"0.6371379",
"0.6371379",
"0.6370011",
"0.6370011",
"0.6370011",
"0.6370011",
"0.6370011",
"0.6370011",
"0.6370011",
"0.6370011",
"0.6370011",
"0.6370011",
"0.6370011",
"0.6370011",
"0.6370011",
"0.6370011",
"0.6370011",
"0.6369227",
"0.63666046",
"0.63596195",
"0.6353962",
"0.6353962",
"0.6353962",
"0.6353962",
"0.6353944",
"0.6353327",
"0.6353327",
"0.6353327",
"0.6353327",
"0.6353327",
"0.6353327",
"0.63531584",
"0.63531584",
"0.6344738",
"0.6343738",
"0.6343573",
"0.63396865",
"0.6335229",
"0.6327195",
"0.6307283",
"0.6299295"
] | 0.0 | -1 |
Could not read argv | public function __construct($message = "", $code = 0, \Exception $previous = null)
{
if (!$code) {
$code = self::E_ANY;
}
parent::__construct($message, $code, $previous);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function parseArguments($argv) {\n\t\t$shortopts = \"h::i:o:p::d::s:c::\";\n\n\t\t$longopts = array(\n\t\t\t\"help::\", // --help\n\t\t\t\"input:\", // --input=file\n\t\t\t\"output:\", // --output=file\n\t\t\t\"pretty-xml::\", // --pretty-xml=k\n\t\t\t\"details::\", // --details=class_uses\n\t\t\t\"search:\", // --search=XPATH\n\t\t\t\"conflicts::\" // --conflicts\n\t\t);\n\n\t\t// Parsovani argumentu\n\t\t$options = getopt($shortopts, $longopts);\n\n\t\t// Pokud byl zadan neplatny argument typu: -hxxxxx\n\t\tif (array_key_exists('h', $options))\n\t\t\tif (is_bool($options['h']) === false)\n\t\t\t\tthrow new customException(\"Bad input arguments. Try --help.\", self::E_ARG);\n\n\t\t// Osetreni opakujicich se prepinacu\n\t\tforeach ($options as $value) {\n\t\t\tif (is_array($value))\n\t\t\t\tthrow new customException(\"Bad input arguments. Try --help.\", self::E_ARG);\n\t\t}\n\n\t\t// Osetreni neznameho argumentu\n\t\t$optionsLen = count($options);\n\t\tif ($optionsLen != (count($argv) - 1))\n\t\t\tthrow new customException(\"Bad input arguments. Try --help.\", self::E_ARG);\n\n\t\t// Kontrola kratkych prepinacu a dlouhych prepinacu: --output=file -o=file\n\t\t// Sjednoceni formatu na dlouhe prepinace, pro jednotne pouzivani dale\n\t\tforeach ($longopts as $value) {\n\t\t\t$firstChar = substr($value, 0, 1);\n\t\t\t$value = str_replace(\":\", \"\", $value);\n\n\t\t\t// Duplikace prepinacu\n\t\t\tif (array_key_exists($value, $options) && array_key_exists($firstChar, $options))\n\t\t\t\tthrow new customException(\"Bad input arguments. Try --help.\", self::E_ARG);\n\t\t\telse {\n\t\t\t\t// Sjednoceni na dlouhe prepinace: -o=file >>> --output=file\n\t\t\t\tif (array_key_exists($firstChar, $options)) {\n\t\t\t\t\t$options[$value] = $options[$firstChar];\n\t\t\t\t\tunset($options[$firstChar]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Test zda byl zadany --help|-h prepinac bez ostatnich\n\t\tif (array_key_exists(\"help\", $options)) {\n\t\t\tif ($optionsLen > 1)\n\t\t\t\tthrow new customException(\"Bad input arguments. Try --help.\", self::E_ARG);\n\n\t\t\t$this->getHelp();\n\t\t\texit(self::OK);\n\t\t}\n\n\t\t// Kontrola vstupu, zda existuje a jestli se da z daneho souboru cist\n\t\tif (array_key_exists(\"input\", $options)) {\n\t\t\tif (!file_exists($options['input']) || !is_readable($options['input']))\n\t\t\t\tthrow new customException(\"Bad input file.\", self::E_INPUT_FILE);\n\n\t\t\t$this->input = $options['input'];\n\t\t}\n\n\t\t// Kontrola vystupniho souboru, zda se da vytvorit a zapsat do neho\n\t\tif (array_key_exists(\"output\", $options)) {\n\t\t\tif (is_writable($options['output'])) {\n\t\t\t\t// Vytvori soubor pro zapis, pokud se nepodari skonci chybou\n\t\t\t\tif ( !($fw = fopen($options['output'], \"w\")) )\n\t\t\t\t\tthrow new customException(\"Bad output file.\", self::E_OUTPUT_FILE);\n\t\t\t} else {\n\t\t\t\t// Pokud existuje ale neni pro zapis, skonci chybou\n\t\t\t\tif (file_exists($options['output']))\n\t\t\t\t\tthrow new customException(\"Bad output file.\", self::E_OUTPUT_FILE);\n\n\t\t\t\t// Soubor neexistuje, vytvori se a pokud se nepodari, skonci chybou\n\t\t\t\tif ( !($fw = fopen($options['output'], \"w\")) )\n\t\t\t\t\tthrow new customException(\"Bad output file.\", self::E_OUTPUT_FILE);\n\t\t\t}\n\t\t\t$this->output = $options['output'];\n\t\t}\n\n\t\t// Kontrola pretty-xml, kontrola zda je to kladne cele cislo,\n\t\t// pokud nebylo zadane, nastavi se na predvolenou hodnotu\n\t\tif (array_key_exists(\"pretty-xml\", $options)) {\n\t\t\t// Kontrola zda obsahuje jen cisla\n\t\t\tif (ctype_digit($options['pretty-xml']))\n\t\t\t\t$this->prettyXml = intval($options['pretty-xml']);\n\n\t\t\t// Pokud nebyla nastavena prepinaci hodnota, pouzije se predvolena\n\t\t\telseif (is_bool($options['pretty-xml']) === true)\n\t\t\t\t$this->prettyXml = 4;\n\t\t\telse\n\t\t\t \tthrow new customException(\"Bad input format.\", self::E_ARG);\n\t\t}\n\n\t\t// Kontrola details, zda byl zadany a jestli byla zadana trida\n\t\tif (array_key_exists(\"details\", $options)) {\n\t\t\t$this->details = true;\n\n\t\t\tif ($options['details'] != \"\")\n\t\t\t\t$this->detailName = $options['details'];\n\t\t}\n\n\t\t// Zpracovani XPATH vyrazu\n\t\tif (array_key_exists(\"search\", $options)) {\n\t\t\tif ($options['search'] == \"\")\n\t\t\t\tthrow new customException(\"Bad input arguments. Try --help.\", self::E_ARG);\n\n\t\t\t$this->search = $options['search'];\n\t\t}\n\n\t\t// Zpracovani konfliktu a jejich vygenerovani do souboru\n\t\tif (array_key_exists(\"conflicts\", $options)) {\n\t\t\t$this->conflicts = true;\n\t\t\tif (is_bool($options['conflicts']) === false)\n\t\t\t\tthrow new customException(\"Bad input arguments. Try --help.\", self::E_ARG);\n\t\t}\n\t}",
"private function getArguments() {\n return array_slice($argv, 1);\n }",
"private function cmdline($argv)\n {\n $result = array();\n\n $argc = count($argv);\n for($i = 0;$i < $argc;$i++)\n {\n switch($argv[$i])\n {\n case \"-l\":\n if($i + 1 <= $argc - 1)\n {\n $i++;\n if(in_array(strtolower($argv[$i]), array('de','en')))\n $result['lang'] = $argv[$i];\n else\n $this->usage();\n }\n else\n $this->usage();\n break;\n case \"-s\":\n $this->shorten = true;\n break;\n case \"status\":\n if(!isset($result['mode']))\n $result['mode'] = MODE_STATUS_ONLY;\n else\n $this->usage();\n break;\n case \"resolve\":\n if(!isset($result['mode']))\n $result['mode'] = MODE_KEEP_LATEST;\n else\n $this->usage();\n break;\n default:\n if(is_dir($argv[$i]))\n $result['path'] = $argv[$i];\n break;\n }\n }\n\n // We need at least a mode\n if(!isset($result['mode']))\n $this->usage();\n\n return $result;\n }",
"function parseCommLineArgs($argc, $argv){\n\t\t$args = array(\n\t\t\t\"help\" => false,\n\t\t\t\"input\" => null,\n\t\t\t\"output\" => null,\n\t\t\t\"query\" => null,\n\t\t\t\"n\" => false,\n\t\t\t\"root\" => null,\n\t\t);\n\n\t\t// Query file variable\n\t\t$qf = null;\n\n\t\t// No arguments passed\n\t\tif($argc == 1){\n\t\t\tfprintf(STDERR, \"ERROR! The script was launched with an illegal combination of arguments\\n\");\n\t\t\tprintHelp();\n\t\t\texit(EWARGS);\n\t\t}\n\n\t\t// Cycle, in which arguments are parsed\n\t\tfor($i = 1; $i < $argc; $i++){\n\t\t\tif($args[\"help\"] !== false){\n\t\t\t\tfprintf(STDERR, \"ERROR! The script was launched with an illegal combination of arguments\\n\");\n\t\t\t\texit(EWARGS);\n\t\t\t} \n\t\t\telseif($argv[$i] == \"--help\"){\n\t\t\t\tif($i > 1){\n\t\t\t\t\tfprintf(STDERR, \"ERROR! The script was launched with an illegal combination of arguments\\n\");\n\t\t\t\t\texit(EWARGS);\n\t\t\t\t}\n\n\t\t\t\t$args[\"help\"] = true;\n\t\t\t} \n\t\t\telseif($argv[$i] == \"-n\"){\n\t\t\t\tif($args[\"n\"]){\n\t\t\t\t\tfprintf(STDERR, \"ERROR! The script was launched with an illegal combination of arguments\\n\");\n\t\t\t\t\texit(EWARGS);\n\t\t\t\t}\n\n\t\t\t\t$args[\"n\"] = true;\n\t\t\t} \n\t\t\telseif(substr($argv[$i], 0, 8) == \"--input=\"){\n\t\t\t\tif($args[\"input\"] != null){\n\t\t\t\t\tfprintf(STDERR, \"ERROR! The script was launched with an illegal combination of arguments\\n\");\n\t\t\t\t\texit(EWARGS);\n\t\t\t\t}\n\t\t\t\telse if(strlen($argv[$i]) == 8)\n\t\t\t\t\t$args[\"input\"] = 'php://stdin';\n\t\t\t\telse\n\t\t\t\t\t$args[\"input\"] = substr($argv[$i],8);\n\t\t\t} \n\t\t\telseif(substr($argv[$i], 0, 9) == \"--output=\"){\n\t\t\t\tif($args[\"output\"] != null){\n\t\t\t\t\tfprintf(STDERR, \"ERROR! The script was launched with an illegal combination of arguments\\n\");\n\t\t\t\t\texit(EWARGS);\n\t\t\t\t}\n\t\t\t\telse if(strlen($argv[$i]) == 9)\n\t\t\t\t\t$args[\"output\"] = 'STDOUT';\n\t\t\t\telse\n\t\t\t\t\t$args[\"output\"] = substr($argv[$i],9);\n\t\t\t} \n\t\t\telseif(substr($argv[$i], 0, 8) == \"--query=\"){\n\t\t\t\tif($args[\"query\"] != null){\n\t\t\t\t\tfprintf(STDERR, \"ERROR! The script was launched with an illegal combination of arguments\\n\");\n\t\t\t\t\texit(EWARGS);\n\t\t\t\t}\n\t\t\t\telse if(strlen($argv[$i]) == 8)\n\t\t\t\t\t$args[\"query\"] = '';\n\t\t\t\telse\n\t\t\t\t\t$args[\"query\"] = substr($argv[$i],8);\n\t\t\t} \n\t\t\telseif(substr($argv[$i], 0, 5) == \"--qf=\"){\n\t\t\t\tif($qf != null){\n\t\t\t\t\tfprintf(STDERR, \"ERROR! The script was launched with an illegal combination of arguments\\n\");\n\t\t\t\t\texit(EWARGS);\n\t\t\t\t}\n\t\t\t\telse if(strlen($argv[$i]) == 5)\n\t\t\t\t\t$args[\"query\"] = '';\n\t\t\t\telse\n\t\t\t\t\t$qf = substr($argv[$i],5);\n\t\t\t} \n\t\t\telseif(substr($argv[$i], 0, 7) == \"--root=\"){\n\t\t\t\tif($args[\"root\"] != null || strlen($argv[$i]) == 7){\n\t\t\t\t\tfprintf(STDERR, \"ERROR! The script was launched with an illegal combination of arguments\\n\");\n\t\t\t\t\texit(EWARGS);\n\t\t\t\t}\n\n\t\t\t\t$args[\"root\"] = substr($argv[$i],7);\n\t\t\t} \n\t\t\telse{\n\t\t\t\tfprintf(STDERR, \"ERROR! The script was launched with an illegal combination of arguments\\n\");\n\t\t\t\texit(EWARGS);\n\t\t\t}\n\t\t}\n\n\t\tif($args[\"help\"] !== false)\n\t\t\treturn $args;\n\n\n\n\t\t// Checks for a collision of --qf and --query arguments\n\t\tif($args[\"query\"] != null and $qf != null){\n\t\t\tfprintf(STDERR, \"ERROR! The script was launched with an illegal combination of arguments\\n\");\n\t\t\texit(EWARGS);\n\t\t}\n\t\telse if($args[\"query\"] == null and $qf == null){\n\t\t\tfprintf(STDERR, \"ERROR! Wrong query\\n\");\n\t\t\texit(EWQUERY);\n\t\t}\n\n\t\t// Loads query from file\n\t\tif($qf != null){\n\t\t\tif($qf == \"\"){\n\t\t\t\tfprintf(STDERR, \"ERROR! Wrong query\\n\");\n\t\t\t\texit(EWQUERY);\n\t\t\t}\n\t\t\telseif(!file_exists($qf) || !is_readable($qf)){\n\t\t\t\tfprintf(STDERR, \"ERROR! File with query could not be open!\\n\");\n\t\t\t\texit(EWQUERY);\n\t\t\t}\n\t\t\t$args[\"query\"] = file_get_contents($qf);\n\t\t}\n\t\t\n\t\tif($args[\"query\"] == null || $args[\"query\"] == \"\"){\n\t\t\tfprintf(STDERR, \"ERROR! Wrong query\\n\");\n\t\t\texit(EWQUERY);\n\t\t}\n\n\t\treturn $args;\n\t}",
"public static function forUnreadableArguments()\n {\n $message = 'Could not read command arguments. Is register_argc_argv off?';\n\n return new self($message, AmpCliException::E_ARG_READ);\n }",
"function load_parameters($argv)\n{\n\n // array with matching regular expressions\n $params [0] = \"/^.*\\.php$/\";\n $params [1] = \"/^(-n)$/\";\n $params [2] = \"/^--input=(.*)$/\";\n $params [3] = \"/^--output=(.*)$/\";\n $params [4] = \"/^--qf=(.*)$/\";\n $params [5] = \"/^--query=(.*)$/\";\n $params [6] = \"/^--root=(.*)$/\";\n $params [7] = \"/^(--help)$/\";\n $params [8] = \"/^(-help)$/\";\n $params [9] = \"/^-input=(.*)$/\";\n $params [10] = \"/^-output=(.*)$/\";\n $params [11] = \"/^-qf=(.*)$/\";\n $params [12] = \"/^-query=(.*)$/\";\n $params [13] = \"/^-root=(.*)$/\";\n\n // syntax check the validity of arguments \n $counter=-1;\n foreach ($argv as $argument) \n {\n ++$counter;\n for ($i = 0; $i < count($params); $i++) \n { \n if (preg_match($params[$i], $argument))\n {\n \n if($i>7 && $i<14)\n { \n // from short option do long option of argument (from -xyz to --xyz) \n $argv[$counter]=\"-\".$argv[$counter];\n }\n break;\n }\n else\n {\n if ($i == 13)\n {\n exit_program(\"Bad parameters, try to use -help or --help\\n\",code_error::error_param);\n }\n } \n }\n }\n\n // parameter check\n parse_str(implode('&', array_slice($argv,1)),$opt);\n if ((array_key_exists(\"--help\", $opt) and (count($argv) == 2)))\n Help();\n if ((count($argv)-1 != count($opt)) \n or (isset($opt[\"--query\"]) and isset($opt[\"--qf\"]))\n or (!isset($opt[\"--query\"]) and !isset($opt[\"--qf\"]))\n or (array_key_exists(\"--help\", $opt) and (count($argv) != 2)))\n {\n exit_program(\"Bad parameters, try to use -help or --help\\n\",code_error::error_param);\n }\n return $opt;\n}",
"public function parse_args($argv)\n {\n $this->stats = new Stats();\n $argc = count($argv);\n\n if($argc == 1)\n {\n return;\n }\n else if($argc == 2)\n {\n if($argv[1] == \"--help\" or $argv[1] == \"-h\")\n {\n print \"IPPcode19 parser\\n\";\n print \"Written by Tomáš Sasák for BUT FIT 2019.\\n\\n\";\n print \"Parser parses IPPcode19 language and translates it into XML representation.\\n\";\n print \"Checks syntactic analysis and lexical analysis.\\n\";\n print \"IPPcode19 is taken from STDIN.\\n\";\n exit(0);\n }\n }\n else if(preg_grep(\"/^--stats=.+$/\", $argv))\n {\n $this->stats->parse_stats($argv);\n return;\n }\n fwrite(STDERR, \"Error, unknown parameters!\\n\");\n exit(10);\n }",
"public function __construct($argv)\n {\n }",
"public function cli_validateArgs() {}",
"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}",
"public static function arguments($argv)\n {\n $_ARG = array();\n foreach($argv as $arg)\n {\n if(preg_match('#^-{1,2}([a-zA-Z0-9]*)=?(.*)$#', $arg, $matches))\n {\n $key = $matches[1];\n switch ($matches[2])\n {\n case '':\n case 'true':\n $arg = true;\n break;\n case 'false':\n $arg = false;\n break;\n default:\n $arg = $matches[2];\n }\n $_ARG[$key] = $arg;\n }\n else\n {\n $_ARG['input'][] = $arg;\n }\n }\n return $_ARG;\n }",
"function arg_parse($argc, $argv){\n\n if($argc == 2 && ($argv[1] === \"--help\" || $argv[1] === \"-help\")){\n fwrite(STDIN,\n \"Usage: php7.3 test.php | --help | [--stats=file] [--loc] | [--comments] | [--labels] | [--jumps]\n Parser for .IPPcode19 language\\n\n --help help message\n --stats=file file which will contain code statistics\n --loc statistic for lines of code present in source file\n --comments statistic for commentaries present in source code\n --labels statistic for labels in source code\n --jumps statistic for jump instructions in source cod\n\n Parse will parse given input from STDIN and checks it lexical and syntax correctness.\n Through analysis parser also generates XML file as output to STDOUT. XML file consists\n of instructions and their operands writen in XML standard.\n \\n\");\n exit(0);\n }\n elseif($argc > 2 && $argv[1] === \"--help\"){\n fwrite(STDERR, \"ERROR : ARGUMENTS : multiple use of --help argumet\\n\");\n exit(10);\n }\n }",
"function arg_check($argv,$argc,$opt){\n $parse_error = false;\n foreach ($argv as $param_count => $value) {\n\n if ($param_count == 0) continue; //TODO: handle stdin and\n\n if ($value == \"--help\" && $param_count === 1) { //help was called, exiting with 0\n help();\n }\n if ($value == \"-n\" ){\n $opt->generate_header = false;\n continue;\n }\n if (preg_match(INPUTRGX, $value) === 1 ) { //--input=\n $opt->in_filename = get_filename(MATCHINFILENAME,$value);\n continue;\n }\n if (preg_match(OUTPUTRGX, $value) === 1 ) { //--output=\n $opt->out_filename = get_filename(MATCHOUTFILENAME,$value);\n $opt->write_to_file = true;\n continue;\n }\n if (preg_match(ROOTRGX, $value) === 1 ) { //-r=\n $opt->wrap_root = true;\n $opt->wrap_root_text = get_filename(MATCHROOTRGX,$value); // actually returns name of root tag not filename\n continue;\n }\n if (preg_match(ARRAYRGX, $value) === 1 ) { //--array-name\n $opt->array_text = get_filename(MATCHARRAYRGX,$value);\n continue;\n }\n if (preg_match(ITEMRGX, $value) === 1 ) { //--item-name\n $opt->item_text = get_filename(MATCHITEMRGX,$value);\n continue;\n }\n if ($value === \"-s\") { //-s\n $opt->string_is_attribute = false;\n continue;\n }\n if ($value === \"-i\") { //-i\n $opt->int_is_attribute = false;\n continue;\n }\n if ($value === \"-l\") { //-l\n $opt->values_to_elements = true;\n continue;\n }\n if ($value === \"-t\" || $value === \"--index-items\" ) { //-t\n $opt->index_items = true;\n continue;\n }\n if ($value === \"-a\" || $value === \"--array-size\" ) { //-a\n $opt->array_size = true;\n continue;\n }\n if (preg_match(REPLACEELEMENTRGX, $value) === 1 ) { //--h\n $opt->substitute_element = true;\n $opt->substitute_string = get_filename(MATCHELEMENTREPLACEMENTTGX,$value);\n continue;\n }\n if ($value === \"-c\" ) { //-c\n $opt->substitute_value = true;\n continue;\n }\n if (preg_match(STARTINDEXRGX, $value) === 1 ) { //--start\n $opt->change_start_index = true;\n $opt->index = get_filename(MATCHSTARTINDEXRGX,$value);\n continue;\n }\n $parse_error = true; //ending with error\n break;\n }\n check_start_index($opt); //check value entered after --start=\n\n if (check_element_validity($opt->wrap_root_text,$opt) || //check validity of\n check_element_validity($opt->array_text,$opt) || //entered params\n check_element_validity($opt->item_text,$opt) ) {\n err(\"Invalid element\",50);\n }\n\n if ($parse_error ) {\n err(\"Invalid parameters, try --help for more\",1); //ERR\n }\n }",
"private function getArguments()\n {\n $opts = getopt(\n \"\",\n array(\n 'help',\n 'debug',\n 'host:',\n 'port:',\n 'virtualport:',\n 'timeout:',\n 'warning-packetloss:',\n 'critical-packetloss:',\n 'warning-ping:',\n 'critical-ping:',\n 'minimal-uptime:',\n 'warning-clients:',\n 'critical-clients:',\n 'ignore-reserved-slots',\n 'ignore-virtualserverstatus',\n )\n );\n\n // show usage help when help isset or no (valid) parameters given\n if (count($opts) == 0 || isset($opts['help'])) {\n $this->echoExit(\n 99,\n PHP_EOL .\n \"Icinga Teamspeak3 performance/health check\" . PHP_EOL . PHP_EOL .\n \"* all checks are optional, they will be executed when a warning and or critical limit has been given\" . PHP_EOL .\n \"* when virtualport is not set, uptime & clients check will be done globally, other checks do require the virtualport to be set\" . PHP_EOL . PHP_EOL .\n 'Usage:' . PHP_EOL .\n '--host <localhost> --port <10011> [--virtualport <portnr>] ' . PHP_EOL .\n '[--warning-packetloss <percentage>] [--critical-packetloss <percentage>] ' . PHP_EOL .\n '[--warning-ping <ms>] [--critical-ping <ms>] ' . PHP_EOL .\n '[--warning-clients <percent>] [--critical-clients <percentage>]' . PHP_EOL .\n '[--minimal-uptime <seconds>] ' . PHP_EOL .\n '[--ignore-reserved-slots] - a reserved slot will be counted as free slot' . PHP_EOL .\n '[--ignore-virtualserverstatus] - go to UNKNOWN state when virtual server is offline' . PHP_EOL .\n '[--timeout <10>] [--debug]' . PHP_EOL\n );\n }\n\n $this->host = isset($opts['host']) ? $opts['host'] : 'localhost';\n $this->telnetport = isset($opts['port']) ? intval($opts['port']) : 10011;\n $this->virtualport = isset($opts['virtualport']) ? intval($opts['virtualport']) : 0;\n $this->debug = isset($opts['debug']) ? true : false;\n $this->timeout = isset($opts['timeout']) ? intval($opts['timeout']) : 10;\n $this->warningPacketLoss = isset($opts['warning-packetloss']) ? floatval($opts['warning-packetloss']) : 0;\n $this->criticalPacketLoss = isset($opts['critical-packetloss']) ? floatval($opts['critical-packetloss']) : 0;\n $this->warningPing = isset($opts['warning-ping']) ? intval($opts['warning-ping']) : 0;\n $this->criticalPing = isset($opts['critical-ping']) ? intval($opts['critical-ping']) : 0;\n $this->minimalUptime = isset($opts['minimal-uptime']) ? intval($opts['minimal-uptime']) : 0;\n $this->warningClientPercent = isset($opts['warning-clients']) ? intval($opts['warning-clients']) : 0;\n $this->criticalClientPercent = isset($opts['critical-clients']) ? intval($opts['critical-clients']) : 0;\n $this->ignoreReservedSlots = isset($opts['ignore-reserved-slots']) ? true : false;\n $this->ignoreVirtualstatus = isset($opts['ignore-virtualserverstatus']) ? true : false;\n\n if ($this->virtualport == 0) {\n if ($this->warningPacketLoss != 0 || $this->criticalPacketLoss) {\n $this->echoExit(self::STATE_UNKNOWN, \"cannot check packetloss without port of virtual server set\");\n }\n if ($this->warningPing != 0 || $this->criticalPing) {\n $this->echoExit(self::STATE_UNKNOWN, \"cannot check ping without port of virtual server set\");\n }\n }\n }",
"function get_args($argc, $argv, &$prepinace, &$inputFile, &$outputFile, &$k, &$n){\n\n foreach($argv as $arg){\n \n if(!strcmp($arg, \"--help\")) {\n if($argc == 2){\n print_help();\n }\n else{\n chyba_prepinace();\n }\n }\n \n else if(!strncmp($arg, \"--input=\", 8)){\n if ($prepinace[\"input\"] == true){\n chyba_prepinace();\n }\n else{\n $prepinace[\"input\"] = true;\n $inputFile = mb_substr($arg, 8, mb_strlen($arg));\n if($inputFile == \"\" || $inputFile == \".\"){\n $inputFile = \"./\"; //nezadany adresar => aktualny adresar\n }\n }\n \n \n }\n \n else if(!strncmp($arg, \"--output=\", 9)){\n if($prepinace[\"output\"] == true || mb_strlen($arg) <= 9){\n chyba_prepinace();\n }\n $prepinace[\"output\"] = true;\n $outputFile = mb_substr($arg, 9, mb_strlen($arg)); \n }\n \n else if(!strncmp($arg, \"--pretty-xml\", 12)) {\n if($prepinace[\"pretty\"] == true){\n chyba_prepinace();\n }\n $prepinace[\"pretty\"] = true;\n if(!strncmp($arg, \"--pretty-xml=\", 13)){\n $k = strval(mb_substr($arg, 13, mb_strlen($arg)));\n if(!is_numeric($k)){\n chyba_prepinace();\n }\n if($k == 0){\n $k = 4; //implicitna hodnota pri zadani prettyxml parametru\n }\n }\n \n // fprintf(STDOUT, $k); \n }\n \n else if(!strcmp($arg, \"--no-inline\")){\n if($prepinace[\"no-inline\"] == true){\n chyba_prepinace();\n }\n $prepinace[\"no-inline\"] = true;\n }\n \n else if(!strncmp($arg, \"--max-par=\", 10)){\n if($prepinace[\"maxPar\"] == true || mb_strlen($arg) <=10){\n chyba_prepinace();\n }\n $prepinace[\"maxPar\"] = true;\n $n = mb_substr($arg, 10, mb_strlen($arg));\n if(!is_numeric($n)){\n chyba_prepinace();\n } \n }\n \n else if(!strcmp($arg, \"--no-duplicates\")){\n if($prepinace[\"noDuplicates\"] == true){\n chyba_prepinace(); \n }\n $prepinace[\"noDuplicates\"] = true; \n }\n \n else if(!strcmp($arg, \"--remove-whitespace\")){\n if($prepinace[\"removeWhitespaces\"] == true){\n chyba_prepinace();\n }\n $prepinace[\"removeWhitespaces\"] = true;\n }\n else if(preg_match('/^--/', $arg)){\n chyba_prepinace();\n }\n } \n}",
"function handleArgs()\n{\n global $recursive;\n global $path;\n global $parseFile;\n global $intFile;\n\n $shortOpts = \"\";\n $longOpts = array(\n \"help\",\n \"directory:\",\n \"recursive\",\n \"parse-script:\",\n \"int-script:\"\n );\n\n # get arguments\n $options = getopt($shortOpts, $longOpts);\n\n foreach ($options as $key=>$value) {\n if ($key === \"help\" && count($options) == 1) {\n echo \"This is test script for parse.php and interpret.py scripts.\";\n echo \"Run by php test.php [--directory=pat] [--recursive] [--parse-script=file] [--in-script=file]\";\n exit(0);\n } elseif ($key === \"recursive\") {\n $recursive = 1;\n } elseif ($key === \"directory\") {\n $path = $value;\n } elseif ($key === \"parse-script\") {\n $parseFile = $value;\n } elseif ($key === \"int-script\") {\n $intFile = $value;\n } else {\n # undefined arguments are present\n errorMsg(10);\n }\n }\n}",
"function handle_parameters($argv)\n{\n\t$short_opts = \"a\"; // Do not generate cols\n\t$short_opts .= \"b\"; // Group elements\n\t$short_opts .= \"g\"; // Relations option\n\n\t$long_opts = array(\"help\", // Prints help and exits program\n\t\t\"input::\", // Optional input file\n\t\t\"output::\", // Optional output file\n\t\t\"header::\", // Optional header text\n\t\t\"etc::\", // Optional max columns\n\t\t\"isvalid::\", // extension (validating of XML)\n\t);\n\n\tunset($argv[0]); // Unset script name in arguments\n\n\t$options = getopt($short_opts, $long_opts); // call getopt to parse args\n\n\tforeach($argv as $arg)\n\t\tif(!preg_match('/^(--((isvalid)|(input)|(output)|(header)|(etc))=.+)|(^-[abg]+)|(^--help+)/', $arg)) // regular expression to validate the correctness of the parameters\n\t\t\tprint_error(\"BAD_PARAM\", $arg . \" was not recognized as parameter.\");\n\n\tif(isset($options[\"etc\"]))\n\t{\n\t\tif(isset($options[\"b\"])) // --etc and -b can not be set together\n\t\t\tprint_error(\"PARAMS\", \"error: -b and --etc= are set together\");\n\n\t\t$options[\"etc\"] = intval($options[\"etc\"]);\n\t\tif(!is_int($options[\"etc\"])) // after --etc= there must be an int number\n\t\t\tprint_error(\"PARAMS\", \"etc value is not integer.\");\n\t}\n\n\tif(isset($options[\"help\"]))\n\t{\n\t\tif(!preg_match('/^--help+/', implode(\" \", $argv)))\n\t\t\tprint_help(1);\n\t\telse\n\t\t\tprint_help();\n\t}\n\n\tif(isset($options[\"input\"]))\n\t{\n\t\tif(!file_exists($input = $options[\"input\"])) //checking if input file exists\n\t\t{\n\t\t\tprint_error(\"INPUT\", $options[\"input\"] . \" can not be opened.\");\n\t\t}\n\t}\n\n\tif(isset($options[\"output\"]))\n\t{\n\t\tif($options[\"output\"] === $options[\"input\"]) // input and output can not be the same file\n\t\t\tprint_error(\"OUTPUT\", $options[\"output\"] . \" file is same for input and output.\");\n\t}\n\n\treturn $options;\n}",
"function parse_argv() {\n \n // Get arguments.\n $arguments = $_SERVER['argv'];\n \n // Remove the calling script from the arguments.\n array_shift($arguments);\n \n // Parse the remaining arguments.\n foreach( $arguments as $index => $argument ) {\n \n // Split the argument.\n $split = explode('=', $argument);\n \n // Extract the option and value if applicable.\n $option = str_starts_with($split[0], '-') ? $split[0] : false;\n $value = $option ? $split[1] ?? null : $split[0];\n \n // Save the named option if found.\n if( $option ) {\n \n // Remove options delimiters from the option.\n $option = preg_replace('/^--?/', '', $option);\n \n // Save the option with its value.\n $arguments[$option] = $value;\n \n // Unset the original index.\n unset($arguments[$index]);\n \n }\n \n \n }\n \n // Return the parsed arguments.\n return $arguments;\n \n}",
"public function getInput(array $argv = null)\n {\n try {\n return new ArgvInput($argv, $this->environment->getDefinition());\n } catch (\\Exception $e) {\n $this->renderException($e, new ConsoleOutput());\n exit(1);\n }\n }",
"private function checkArg()\n {\n // {\n // echo '【エラー】:引数が不正です、第一引数に変換元フォルダ、第二引数に変換後ファイルパスを指定して下さい' . PHP_EOL;\n // return false;\n // }\n\n $this->input_dir_path = '../database/reversi/wtb';\n $this->output_file_path = '../database/reversi/csv';\n\n return true;\n }",
"protected function runningFromCliOrWrongConfiguration() {}",
"public function __construct($argv) {\n\t\t$this->parseArguments($argv);\n\t}",
"function test_params($argc, $argv)\n{\n\tglobal $format, $instream, $outstream, $br;\t// globalni promenne do kterych se prizazuji nazvy souboru\n\n\t$isfor = 0;\n\t$isin = 0;\n\t$isout = 0;\n\n\tfor ($i = 1; $i < $argc; $i++)\n\t{\n\t\tif (is_help($argv[$i]) && $argc == 2)\n\t\t{\n\t\t\tprint_help();\n\t\t}\n\t\telse if (is_br($argv[$i]) && $br == 0)\n\t\t{\n\t\t\t$br++;\n\t\t}\n\t\telse if (is_format($argv[$i]) && $isfor == 0)\n\t\t{\n\t\t\t$format = mb_substr($argv[$i], mb_strpos($argv[$i], '=') + 1);\t\t// prirazeni nazvu souboru - cast argumentu za =\n\t\t\t$isfor++;\n\t\t}\n\t\telse if (is_input($argv[$i]) && $isin == 0)\n\t\t{\n\t\t\t$instream = mb_substr($argv[$i], mb_strpos($argv[$i], '=') + 1);\t// prirazeni nazvu souboru - cast argumentu za =\n\t\t\t$isin++;\n\t\t}\n\t\telse if (is_output($argv[$i]) && $isout == 0)\n\t\t{\n\t\t\t$outstream = mb_substr($argv[$i], mb_strpos($argv[$i], '=') + 1);\t// prirazeni nazvu souboru - cast argumentu za =\n\t\t\t$isout++;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}\n\treturn true;\n}",
"public function parse($argv)\n {\n $this->parseCommandLineOptions($this->stripSpaces($argv));\n }",
"function parse_args($argv,$argc){\n \n //Checking if help argument is present, if so, prints help\n if($argc == 2 && $argv[1] == \"--help\"){\n echo \"Nápověda pro skript v jazyce php pro provedení lexikální a syntaktické analýzy jazyka .IPPCode21\\n\";\n echo \"Verze php: 7.4.14\\n\";\n echo \"Spuštění skriptu: php parser.php <název souboru>\\n\";\n echo \"Výstup skriptu je xml soubor \\\"out.xml\\\"\\n\";\n echo \"Zobrazení nápovědy: php parser.php --help\\n\";\n exit(0);\n }\n //If argc > 1 (1st arg is program name, implicitly), searching for STATP extension parameters\n //Along with checking for arguments, checking formats and arguments order\n elseif($argc > 1){\n //Number of --stat parameters (must be at least 0)\n $n_of_stat = -1; \n //Array of permissions, it's size will be equal to number of --stat output files\n $permissions_array = array();\n //Allowed parameters (excluding --statp which is checked separately)\n $allowed_params = array(\"--loc\",\"--comments\",\"--labels\",\"--jumps\",\"--fwjumps\",\"--backjumps\",\n \"--badjumps\");\n \n //Used_filenames needs to be stored for latter repetition check. (There can't be 2\n // stat argument with same file name ) \n $used_filenames = array();\n for($i = 1; $i < $argc; $i = $i + 1)\n {\n //If --stat parameter with correct file name is present\n if(preg_match(\"/\\A--stats=.*\\z/\",$argv[$i])){\n $n_of_stat += 1; //increase number of --stat parameter\n $file_name = substr($argv[$i],8); //extract filename from parameter\n \n //If filename is used return File output error\n if (in_array($file_name,$used_filenames)){\n exit(ErrNums::FILE_OUTPUT_ERROR);\n }\n\n //If not open file and include it's name in used_filename array\n $file = fopen($file_name,'w');\n $used_filenames[$n_of_stat] = $file_name;\n \n //If file opening wasn't successful return File output error\n if(!$file){\n exit(ErrNums::FILE_OUTPUT_ERROR);\n }\n\n //Adding new Statistic permission to permission array (more in scripts/statistics.php)\n //Saving output file to permission array\n //Defining order array, which defines order of parameters (needed for correct output)\n $permissions_array[$n_of_stat] = new StatisticsPermissions();\n $permissions_array[$n_of_stat]->file = $file;\n $permissions_array[$n_of_stat]->order = array();\n }\n /*If argument isn't --stat, then it must be one of allowed_parameters\n If it is,argument is pushed to order array. If not, returns MISSING_PARAMETERS err */\n elseif (in_array($argv[$i],$allowed_params) && $n_of_stat >= 0){\n array_push($permissions_array[$n_of_stat]->order,$argv[$i]);\n }\n else{\n exit(ErrNums::MISSING_PARAMETERS);\n }\n }\n return $permissions_array;\n }\n}",
"function get_cli_args($param, $required = \\false)\n {\n }",
"public function provideArgvArrays()\n {\n return array(\n array(array('bla'), array('project:run')),\n array(array('bla', 'project:parse'), array('project:parse')),\n array(array('bla', '-f', 'blabla'), array('project:run', '-f', 'blabla')),\n );\n }",
"abstract protected function get_args();",
"public function ParseArgs($argv)\n {\n $debug = false;\n $pools = [];\n $output = 'html';\n if (!empty($argv))\n foreach ($argv as $arg)\n if (is_numeric($arg)) {\n $debug = true;\n $pools = stristr($arg, ',')?explode(',', $arg):[$arg];\n } else\n $output = in_array(@$arg, ['html', 'json', 'csv'])?$arg:false;\n return [$output, $debug, $pools];\n }",
"function checkParams()\n{\n global $argc;\n $longopts = array(\"help\", \"directory:\", \"recursive\", \"parse-script:\", \"int-script:\", \"parse-only\", \"int-only\");\n $options = getopt(\"\", $longopts);\n\n if($argc != count($options)+1)\n {\n fprintf(STDERR, \"Neco je spatne s argumenty programu!\\n\");\n fflush(STDERR);\n exit(WRONG_PARAMS);\n }\n else if(array_key_exists(\"help\", $options) && count($options) > 1) //--help muze byt vzdy jen samostatne\n {\n fprintf(STDERR, \"help muze byt pouzit jedine samostatne!\\n\");\n fflush(STDERR);\n exit(WRONG_PARAMS);\n }\n else if(array_key_exists(\"parse-only\", $options) && array_key_exists(\"int-script\", $options))\n {\n fprintf(STDERR, \"Argumenty parse-only a int-script se nesmi kobinovat!\\n\");\n fflush(STDERR);\n exit(WRONG_PARAMS);\n }\n else if(array_key_exists(\"int-only\", $options) && array_key_exists(\"parse-script\", $options))\n {\n fprintf(STDERR, \"Argumenty int-only a parse-script se nesmi kobinovat!\\n\");\n fflush(STDERR);\n exit(WRONG_PARAMS);\n }\n else if(array_key_exists(\"int-only\", $options) && array_key_exists(\"parse-only\", $options))\n {\n fprintf(STDERR, \"Argumenty int-only a parse-only se nesmi kobinovat!\\n\");\n fflush(STDERR);\n exit(WRONG_PARAMS);\n }\n else if(array_key_exists(\"help\", $options) && count($options) == 1) //jen --help\n {\n $help_out = \"Skript slouží pro automatické testování postupné aplikace parse.php a interpret.py. \".\n \"Skript projde zadaný adresář s testy a využije je pro automatické otestování správné funkčnosti \".\n \"obou předchozích programů včetně vygenerování přehledného souhrnu v HTML 5 do standardního výstupu.\\n\";\n printf($help_out);\n exit(SUCCESS);\n }\n set_params($options);\n}",
"private function parse_args() {\n\t\t//exit;\t\t\n\t}",
"protected function getArgs(): string\n {\n return (true === isset($this->server[self::_ARGV][1]))\n ? (string) $this->server[self::_ARGV][1]\n : '';\n }",
"public static function exec(array $argv , array $param , string $input = '');",
"function getParams(){\n\t\tglobal $argv;\n\t\t$params= $argv;\n\t\tunset($params[0]);\n\t\treturn $params;\n\t}",
"private function parseArgs(){\n $args=$GLOBALS['argv'];\n $this->fileMode = 'w';\n \n if (count($args) < 2) {\n die(\"\\nNo conversion script selected\\n\\nUsage: php CreateFileFromCsv.php updateShipping [--verbose] [--sample] [--append]\\n\\n\");\n }\n\n $scriptName = $args[1];\n\n if($scriptName == 'list') {\n $this->listScripts();\n die(\"\\n\\n\");\n }\n\n if (class_exists($scriptName, true)) {\n $this->script = new $scriptName();\n } else {\n die(\"\\nCould not find script model of class $scriptName\\n\\n\");\n }\n\n unset($args[0], $args[1]);\n \n foreach($args as $arg) {\n\n $a = explode('=', $arg);\n\n switch(strtolower($a[0])) {\n case '--verbose':\n $this->verbose = true;\n break;\n \n case '--sample':\n if($a[1] ?? null && is_numeric($a[1])) {\n $this->sample = $a[1];\n echo \"Number of samples: {$this->sample}\";\n } else {\n $this->sample = 1;\n }\n\n $this->verbose = true;\n break;\n \n case '--append':\n $this->fileMode = 'a';\n break;\n\n case '--input':\n if($a[1]) {\n $this->input = $a[1];\n } else {\n die(\"No file specified with --input\");\n }\n break;\n\n case '--output':\n if($a[1]) {\n $this->output = $a[1];\n } else {\n die(\"No file specified with --output\");\n }\n break;\n\n case '--nonewline':\n $this->newline = '';\n break;\n\n case '--newline':\n $this->newline = \"\\n\";\n break;\n }\n }\n }",
"protected function parseCliArguments()\n {\n $shortOptions = 'm::h::';\n $longOptions = array(\n 'months:',\n 'output:',\n 'output_folder:',\n 'help::'\n );\n $options = getopt($shortOptions, $longOptions);\n\n if (isset($options['h']) || isset($options['help']))\n {\n throw new NoticeException('Please see information on how to use this tool below', 1);\n }\n\n if (!isset($options['m']) && !isset($options['months']))\n {\n throw new ErrorException('You must supply a months value using either -m or --months');\n }\n\n if (isset($options['m']) || isset($options['months']))\n {\n $months = (isset($options['m'])) ? $options['m'] : $options['months'];\n if (!is_numeric($months))\n {\n throw new ErrorException('The months value provided is not a numeric');\n }\n if ($months < 1)\n {\n throw new ErrorException('The months value needs to be greater than zero');\n }\n if ($months > 1200)\n {\n throw new ErrorException('You want \"' . $months . '\" months of output? Come on now, your being a bit silly. How about we try using \"1200\", Surely ten years will be enough for now?');\n }\n $this->setNumberOfMonths($months);\n }\n\n if (isset($options['output']))\n {\n $this->setOutput($options['output']);\n }\n\n if (isset($options['output_folder']))\n {\n $this->setOutputFolder($options['output_folder']);\n }\n }",
"function macro_get_plain_argument($number)\n{\n return isset($_SERVER['argv'][$number]) ? $_SERVER['argv'][$number] : null;\n}",
"protected static function isCommandLine() {}",
"public function args()\n {\n return [];\n }",
"function parseCliOptions2(){\n global $argv;\n \n if ( isset($argv[1]) ) {\n global $site_path;\n $site_path = $argv[1];\n }\n \n global $verbose;\n $verbose = false;\n}",
"public function readFileFromParam() {\n\t\tglobal $argv;\n\t\t$myArr = array();\n $myString = \"\";\n $len = 0;\n \n\t\tif (($file = fopen($argv[1], \"r\") or exit (\"Sorry - file not found.\")) != FALSE) {\n\t\t\twhile (($data = fgets($file)) != FALSE) {\n\t\t\t $myArr[$len] = $data;\n $len++; \n\t\t\t}\n\t\t}\t\n\t\tfclose($file);\n \n // make sure that we have input that we are expecting \n if ($len >= 2) {\n $this->width = intval($myArr[0]);\n for ($i = 1; $i < $len; $i++) {\n $myString.=$myArr[$i];\n }\n $this->originalArray = explode(\" \", $myString);\n } else die(\"Bad input - exiting.\");\n\n \n\t}",
"protected function getArguments()\n {\n return array(\n array('filename', InputArgument::REQUIRED, 'Filename to load.'),\n );\n }",
"public function getArgs();",
"public function getArgs();",
"public function dispatch(mixed $argv): int\n {\n if (!is_array($argv) && !is_string($argv)) {\n throw new InvalidArgumentException('$argv must be either of type array or type string.');\n }\n\n if (is_string($argv)) {\n $argv = explode(' ', $argv);\n }\n\n if (!isset($argv[0])) {\n $this->Console->writeLine(\n file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . 'avolutions.txt')\n );\n $this->Console->writeLine('Usage:', ['color' => 'green']);\n $this->Console->writeLine(' command [arguments] [options]');\n $this->Console->writeLine('');\n $this->showAvailableCommands($this->CommandCollection);\n\n return ExitStatus::ERROR;\n }\n\n // first remaining argument must be command name (no space allowed)\n $commandName = $argv[0];\n unset($argv[0]);\n\n $command = $this->CommandCollection->getByName($commandName);\n if ($command == null) {\n $this->Console->writeLine('No valid command provided, choose one of the available commands.', 'error');\n $this->Console->writeLine('');\n $this->showAvailableCommands($this->CommandCollection);\n\n return ExitStatus::ERROR;\n }\n\n try {\n $Command = $this->Application->get($command);\n return $Command->start($argv);\n } catch (Throwable $exception) {\n $this->Console->writeLine($exception->getMessage(), 'error');\n return ExitStatus::ERROR;\n }\n }",
"protected function setCliArguments() {}",
"public function testParseShortArguments()\n\t{\n\t\t$_SERVER['argv'] = array('/dev/null', '-ab', '-c', '-e', 'f', 'foobar', 'ghijk');\n\t\t$instance = new Cli(null, array('filter' => new \\Awf\\Tests\\Stubs\\Input\\FilterMock));\n\n\t\t$this->assertThat(\n\t\t\t$instance->get('a'),\n\t\t\t$this->identicalTo(true),\n\t\t\t'Line: ' . __LINE__ . '.'\n\t\t);\n\n\t\t$this->assertThat(\n\t\t\t$instance->get('b'),\n\t\t\t$this->identicalTo(true),\n\t\t\t'Line: ' . __LINE__ . '.'\n\t\t);\n\n\t\t$this->assertThat(\n\t\t\t$instance->get('c'),\n\t\t\t$this->identicalTo(true),\n\t\t\t'Line: ' . __LINE__ . '.'\n\t\t);\n\n\t\t$this->assertThat(\n\t\t\t$instance->get('e'),\n\t\t\t$this->identicalTo('f'),\n\t\t\t'Line: ' . __LINE__ . '.'\n\t\t);\n\n\t\t$this->assertThat(\n\t\t\t$instance->args,\n\t\t\t$this->equalTo(array('foobar', 'ghijk')),\n\t\t\t'Line: ' . __LINE__ . '.'\n\t\t);\n\t}",
"function usage_and_die($message=false)\n{\n\tif ($message) {\n\t\techo $message.\"\\n\";\n\t}\n\n\techo 'Usage: '.$_SERVER['argv'][0].' /starting/path'.\"\\n\";\n\n\texit(1);\n}",
"protected function getCoreArguments(): SymfonyArgvInput\n {\n if ($this->coreArguments !== null) {\n return $this->coreArguments;\n }\n\n $argvWithoutConfig = [];\n if (isset($_SERVER['argv'])) {\n $argv = $_SERVER['argv'];\n\n for ($i = 0; $i < count($argv); ++$i) {\n if (preg_match('#^(?:-([^c-]*)?c|--config(?:=|$))(.*)$#', $argv[$i], $match)) {\n if (!empty($match[2])) { //same index\n $this->preloadConfiguration($match[2]);\n } elseif (isset($argv[$i + 1])) { //next index\n $this->preloadConfiguration($argv[++$i]);\n }\n if (!empty($match[1])) {\n $argvWithoutConfig[] = \"-\" . $match[1]; //rest commands\n }\n continue;\n }\n $argvWithoutConfig[] = $argv[$i];\n }\n }\n\n return $this->coreArguments = new SymfonyArgvInput($argvWithoutConfig);\n }",
"function mdl_cmd_arguments(array $args)\n{\n return array_values(array_filter($args, function ($arg) {\n return substr($arg, 0, 1) !== '-' && substr($arg, 0, 2) !== '--';\n }));\n}",
"public function __construct($argv = array()){\n\t\t\n\t\t$this->setParameter($argv);\t\t\t\n\t\t$this->run();\t\t\n\t}",
"public function testParseLongArguments()\n\t{\n\t\t$_SERVER['argv'] = array('/dev/null', '--ab', 'cd', '--ef', '--gh=bam');\n\t\t$instance = new Cli(null, array('filter' => new \\Awf\\Tests\\Stubs\\Input\\FilterMock));\n\n\t\t$this->assertThat(\n\t\t\t$instance->get('ab'),\n\t\t\t$this->identicalTo('cd'),\n\t\t\t'Line: ' . __LINE__ . '.'\n\t\t);\n\n\t\t$this->assertThat(\n\t\t\t$instance->get('ef'),\n\t\t\t$this->identicalTo(true),\n\t\t\t'Line: ' . __LINE__ . '.'\n\t\t);\n\n\t\t$this->assertThat(\n\t\t\t$instance->get('gh'),\n\t\t\t$this->identicalTo('bam'),\n\t\t\t'Line: ' . __LINE__ . '.'\n\t\t);\n\n\t\t$this->assertThat(\n\t\t\t$instance->args,\n\t\t\t$this->equalTo(array()),\n\t\t\t'Line: ' . __LINE__ . '.'\n\t\t);\n\t}",
"public function testFullArgvSetMerge()\n {\n //Argv with pass through arguments\n $argv = [\n '/Users/tom/Sites/_MyCode/PHP/twRobo/src/tg',\n 'phpunit:watch',\n './vendor/bin',\n '--',\n '--configuration=phpunit.xml.dist',\n '--coverage=clover',\n ];\n\n\n $merger = new Merger();\n $merger->setArgs($argv, $this->configfile);\n $merged = $merger->merge();\n\n $this->assertCount(6, $merged);\n $this->assertEquals($argv, $merged);\n }",
"public function getArg($name = '')\n {\n if (!isset($this->parsedArgs[$name])) {\n throw new \\PhpCli\\Exception(self::ERR_NO_ARG_BY_NAME);\n }\n\n return $this->parsedArgs[$name];\n }",
"protected function getArguments()\n\t{\n\t\treturn [];\n\n\t\treturn array(\n\t\t\tarray('run', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}",
"private function setParameter($argv){\n\t\t\t\n\t\t// CLI argv count which must be 7 including filename\n\t\tif(count($argv) == 7){\n\n\t\t\tif( ( isset($argv[1]) && ($argv[1] == '-u') ) && (isset($argv[3]) && ($argv[3] == '-p')) ){\n\n\t\t\t\t$this->setUser($argv[2]);\n\t\t\t\t$this->setPassword($argv[4]);\n\t\t\t\t$this->setUrl($argv[5]);\n\t\t\t\t$this->setContributor($argv[6]);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->setError('Invalid parameters.');\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$this->setError('Insufficient parameters.');\n\t\t}\n\t}",
"public static function parse($argv = null) {\n\n\t\tif (self::_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn self::_callAdapter(get_class(), __FUNCTION__, $argv);\n\n\t\t$argv = self::_applyFilter(get_class(), __FUNCTION__, $argv, array('event' => 'args'));\n\n\t\t$argv = ($argv) ? : $_SERVER['argv'];\n\n\t\tarray_shift($argv);\n\t\t\n\t\t$out = array();\n\n\t\tfor ($i = 0, $j = count($argv); $i < $j; $i++) {\n\t\t\t$arg = $argv[$i];\n\n\t\t\t// --foo --bar=baz\n\t\t\tif (substr($arg, 0, 2) === '--') {\n\t\t\t\t$eqPos = strpos($arg, '=');\n\n\t\t\t\t// --foo\n\t\t\t\tif ($eqPos === false) {\n\t\t\t\t\t$key = substr($arg, 2);\n\n\t\t\t\t\t// --foo value\n\t\t\t\t\tif ($i + 1 < $j && $argv[$i + 1][0] !== '-') {\n\t\t\t\t\t\t$value = $argv[$i + 1];\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$value = isset($out[$key]) ? $out[$key] : true;\n\t\t\t\t\t}\n\t\t\t\t\t$out[$key] = $value;\n\t\t\t\t}\n\n\t\t\t\t// --bar=baz\n\t\t\t\telse {\n\t\t\t\t\t$key = substr($arg, 2, $eqPos - 2);\n\t\t\t\t\t$value = substr($arg, $eqPos + 1);\n\t\t\t\t\t$out[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// -k=value -abc\n\t\t\telse if (substr($arg, 0, 1) === '-') {\n\t\t\t\t// -k=value\n\t\t\t\tif (substr($arg, 2, 1) === '=') {\n\t\t\t\t\t$key = substr($arg, 1, 1);\n\t\t\t\t\t$value = substr($arg, 3);\n\t\t\t\t\t$out[$key] = $value;\n\t\t\t\t}\n\t\t\t\t// -abc\n\t\t\t\telse {\n\t\t\t\t\t$chars = str_split(substr($arg, 1));\n\t\t\t\t\tforeach ($chars as $char) {\n\t\t\t\t\t\t$key = $char;\n\t\t\t\t\t\t$value = isset($out[$key]) ? $out[$key] : true;\n\t\t\t\t\t\t$out[$key] = $value;\n\t\t\t\t\t}\n\t\t\t\t\t// -a value1 -abc value2\n\t\t\t\t\tif ($i + 1 < $j && $argv[$i + 1][0] !== '-') {\n\t\t\t\t\t\t$out[$key] = $argv[$i + 1];\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// plain-arg\n\t\t\telse {\n\t\t\t\t$value = $arg;\n\t\t\t\t$out[] = $value;\n\t\t\t}\n\t\t}\n\n\t\tself::$args = $out;\n\n\t\t$out = self::_applyFilter(get_class(), __FUNCTION__, $out, array('event' => 'return'));\n\n\t\treturn $out;\n\t}",
"public function main($argv)\n {\n // step 0: create some plumbing\n $this->lastContext = $context = new Context();\n $context->argvZero = $argv[0];\n\n // Register error handler\n \\set_error_handler(array($this, 'errorHandler'));\n\n // step 1: parse the command-line args\n // we do this first because it may change where we look\n // for our commands\n $context->phixDefinedSwitches = PhixSwitches::buildSwitches();\n list($phixParsedSwitches, $argsIndex) = $this->parsePhixArgs($context, $argv);\n\n // step 2: process the switches we have just parsed\n //\n // we parse the switches twice; once to find out where to\n // look for extensions, and then once more to decide what\n // to do once the extensions are loaded\n $errCode = $this->processPhixSwitchesBeforeCommandLoad($context, $phixParsedSwitches);\n if ($errCode !== null)\n {\n return $errCode;\n }\n\n // step 3: load the phix commands\n //\n // we do this here in case anyone has used the -I switch\n $context->commandsList = $this->loadPhixCommands($context, $phixParsedSwitches);\n\n // step 4: process the switches a second time\n //\n // just in case anything ever wants to happen after we have\n // loaded a list of available commands\n $errCode = $this->processPhixSwitchesAfterCommandLoad($context, $phixParsedSwitches);\n if ($errCode !== null)\n {\n return $errCode;\n }\n\n // step 5: do we have a valid command to execute?\n if (!isset($argv[$argsIndex]))\n {\n // no command given - special case\n $argv[$argsIndex] = 'help';\n }\n $errCode = $this->validateCommand($argv, $argsIndex, $context);\n if ($errCode !== null)\n {\n return $errCode;\n }\n\n // step 6: execute the validated command\n $errCode = $this->processCommand($argv, $argsIndex, $context);\n\n // all done\n return $errCode;\n }",
"public function CheckArguments($argc,$argv){\n\t\t\t\n for($i = 1; $i < $argc; $i++){\n \n $arg = $argv[$i];\n if($arg == '--help'){\n if($argc > 2){\n $this->Error(ERROR_PARAM,\"Combnation --help with another arguments\");\n }\n\n $this->PrintHelp();\n }\n else if(preg_match('/^--stats=[.]*/', $arg)){\n \n $filename = preg_split(\"/[=]/\", $arg, -1)[1];\n array_push($this->statfiles,$filename);\n \n if(count($this->statfiles) > 1){\n array_push($this->statFlags,$this->statFlag);\n $this->statFlag = array();\n }\n }\n else if(isset($this->FLAGS[$arg])){\n array_push($this->statFlag,$arg);\n }\n else{\n $this->Error(ERROR_PARAM, \"Unknown parameter\");\n }\n\n }\n array_push($this->statFlags,$this->statFlag);\n\n if(count($this->statfiles) !== count(array_unique($this->statfiles))){\n $this->Error(ERROR_PARAM, \"Duplicities in filenames for statistics\");\n }\n\n\t\t}",
"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 getArguments() ;",
"function fake_getopt($argv_in, $short_options, $long_options)\n{\n $command = fake_getopt_command($argv_in, $short_options, $long_options);\n $output = null;\n $result_code = null;\n exec($command, $output, $result_code);\n if(count($output) > 0)\n return unserialize($output[0]);\n return array();\n}",
"abstract public static function args();",
"protected function parsePhixArgs(Context $context, $argv)\n {\n // affect phix.\n //\n // switches after the first command are switches for\n // that command\n\n $parser = new CommandLineParser();\n return $parser->parseSwitches($argv, 1, $context->phixDefinedSwitches);\n }",
"function getopt(string $short_options, array $long_options = [], ?int &$rest_index = null): array\n{\n error_clear_last();\n $safeResult = \\getopt($short_options, $long_options, $rest_index);\n if ($safeResult === false) {\n throw InfoException::createFromPhpError();\n }\n return $safeResult;\n}",
"public function loadCommandLine(array $argv)\n {\n for ($i=0; $i<sizeof($argv); $i++) {\n $arg = $argv[$i];\n \n if (substr($arg, 0, 2) == \"--\") {\n $arg = substr($arg, 2);\n \n $parts = explode(\"=\", $arg);\n $name = array_shift($parts);\n $value = implode(\"=\", $parts);\n \n $this->{$name} = $value;\n }\n }\n }",
"protected function wrong_arguments() {\n\t\t\twp_die();\n\t\t}",
"abstract protected function main(array $arguments);",
"protected function parseArguments()\n\t{\n\t\t$argv = $_SERVER['argv'];\n\n\t\t$this->calledScript = array_shift($argv);\n\n\t\t$out = array();\n\n\t\tfor ($i = 0, $j = count($argv); $i < $j; $i++)\n\t\t{\n\t\t\t$arg = $argv[$i];\n\n\t\t\t// --foo --bar=baz\n\t\t\tif (substr($arg, 0, 2) === '--')\n\t\t\t{\n\t\t\t\t$eqPos = strpos($arg, '=');\n\n\t\t\t\t// --foo\n\t\t\t\tif ($eqPos === false)\n\t\t\t\t{\n\t\t\t\t\t$key = substr($arg, 2);\n\n\t\t\t\t\t// --foo value\n\t\t\t\t\tif ($i + 1 < $j && $argv[$i + 1][0] !== '-')\n\t\t\t\t\t{\n\t\t\t\t\t\t$value = $argv[$i + 1];\n\t\t\t\t\t\t$i++;\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$value = isset($out[$key]) ? $out[$key] : true;\n\t\t\t\t\t}\n\n\t\t\t\t\t$out[$key] = $value;\n\t\t\t\t}\n\n\t\t\t\t// --bar=baz\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$key = substr($arg, 2, $eqPos - 2);\n\t\t\t\t\t$value = substr($arg, $eqPos + 1);\n\t\t\t\t\t$out[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// -k=value -abc\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (substr($arg, 0, 1) === '-')\n\t\t\t\t{\n\t\t\t\t\t// -k=value\n\t\t\t\t\tif (substr($arg, 2, 1) === '=')\n\t\t\t\t\t{\n\t\t\t\t\t\t$key = substr($arg, 1, 1);\n\t\t\t\t\t\t$value = substr($arg, 3);\n\t\t\t\t\t\t$out[$key] = $value;\n\t\t\t\t\t}\n\t\t\t\t\t// -abc\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$chars = str_split(substr($arg, 1));\n\n\t\t\t\t\t\tforeach ($chars as $char)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$key = $char;\n\t\t\t\t\t\t\t$value = isset($out[$key]) ? $out[$key] : true;\n\t\t\t\t\t\t\t$out[$key] = $value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// -a a-value\n\t\t\t\t\t\tif ((count($chars) === 1) && ($i + 1 < $j) && ($argv[$i + 1][0] !== '-'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$out[$key] = $argv[$i + 1];\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// plain-arg\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->args[] = $arg;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->data = $out;\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t//\tarray('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}",
"abstract protected function arguments(): array;",
"function checkExecParams() {\n return TRUE;\n }",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t// array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t// array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}",
"protected function getArguments()\n {\n return array(//\t\t\tarray('example', InputArgument::REQUIRED, 'An example argument.'),\n );\n }",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t//array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t//array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t//array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}",
"public function getArgs()\n {\n return $this->meta[Cli::ARGS] ?? [];\n }",
"protected function getArguments()\n {\n return array( //\t\t\tarray('example', InputArgument::REQUIRED, 'An example argument.'),\n );\n }",
"protected function getArguments()\n {\n return array( //\t\t\tarray('example', InputArgument::REQUIRED, 'An example argument.'),\n );\n }",
"public function arguments(): array;",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n {\n return [\n ['module', InputArgument::OPTIONAL, 'The module for the language file'],\n ['langFile', InputArgument::OPTIONAL, 'The language file to work on'],\n ['targetLocale', InputArgument::OPTIONAL, 'The target locale for which to add missing keys'],\n ];\n }",
"protected function getArguments()\n {\n return [\n//\t\t\t['example', InputArgument::REQUIRED, 'An example argument.'],\n ];\n }",
"public function testParticalArgvSetMerge()\n {\n $argv = [\n '/Users/tom/Sites/_MyCode/PHP/twRobo/src/tg',\n 'phpunit:watch',\n './vendor/bin',\n ];\n\n\n $merger = new Merger();\n $merger->setArgs($argv, $this->configfile);\n $merged = $merger->merge();\n\n $this->assertCount(5, $merged);\n $this->assertEquals(\"--\", $merged[3]);\n $this->assertEquals(\"--configuration=phpunit.xml.dev\", $merged[4]);\n }",
"protected function getArguments()\n {\n return [\n ['path', InputArgument::REQUIRED, 'path'],\n ];\n }",
"function buildOptions($argv)\n{\n $options = array();\n foreach ($argv as $option) {\n $isopt = $option[0] == \"-\";\n\n if ($isopt) {\n $optarr = explode(\"=\", substr($option, 1), 2);\n $optname = $optarr[0];\n if (count($optarr) > 1) {\n $optval = $optarr[1];\n } else {\n $optval = 1;\n }\n $options[$optname] = $optval;\n }\n }\n return $options;\n}",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t];\n\t}",
"protected function getArguments()\n {\n return array(\n array('action', InputOption::VALUE_REQUIRED, 'Bootstrap setup script')\n );\n }",
"protected function determineCommand($argv, $argMin = 0)\n\t{\n\t\t// we know what switches to parse for\n\n\t\t// a list of the commands that we have found\n\t\t$commands = [];\n\n\t\t// start at the right-hand side, and work left until we find\n\t\t// a recognised command\n\t\t$argMax = count($argv);\n\t\tfor ($argIndex = $argMin; $argIndex < $argMax; $argIndex++)\n\t\t{\n\t\t\t$command = $this->getCommand($argv[$argIndex]);\n\t\t\tif ($command !== null) {\n\t\t\t\t// we have a command\n\t\t\t\treturn array($command, $argIndex);\n\t\t\t}\n\t\t}\n\n\t\t// special case .. implicit command with no params or switches\n\t\tif ($this->hasDefaultCommand()) {\n\t\t\treturn array($this->getDefaultCommand(), null);\n\t\t}\n\n\t\t// error - explicit command required, but the command line\n\t\t// has nothing at all on it\n\t\treturn array(null, null);\n\t}",
"private function detect_args ()\n {\n\n $uri = $this->get_uri();\n\n if (!$uri) $this->usage();\n\n $segments = preg_split(\"|/|\", $uri, null, PREG_SPLIT_NO_EMPTY);\n\n $args = array();\n foreach ($segments as $k => $v)\n {\n // Check explicit argument form first\n if (strpos($v, ':') !== false)\n {\n $arg = explode(':', $v);\n $args[$arg[0]] = $arg[1];\n continue;\n }\n\n if ($v === 'js' || $v === 'css')\n {\n $args['type'] = $v;\n continue;\n }\n\n $args['files'] = $v;\n\n if (strpos($v, '.js') !== false || strpos($v, '.coffee') !== false)\n $args['type'] = 'js';\n\n else if (strpos($v, '.css') !== false || strpos($v, '.less') !== false)\n $args['type'] = 'css';\n }\n\n if (!isset($args['type'])) $this->error('Could not reliably determine request type (js or css)');\n if (!isset($args['files'])) $this->error('Did not specify any files');\n\n // $args['mini] will be false if $args['mini'] is 'false' or 'no', else true\n $args['mini'] = !isset($args['mini']) || !($args['mini'] === 'false' || $args['mini'] === 'no');\n\n return $args;\n }",
"public function cli($argv)\n {\n $xmlObj = null;\n $xml = array(\n 'base' => null,\n 'version' => null,\n 'required' => null,\n 'components' => array()\n );\n\n // Parse the XML file\n if (($xmlObj =@ new \\SimpleXMLElement($this->url . 'popcorn.xml', LIBXML_NOWARNING, true)) !== false) {\n $xml['base'] = (string)$xmlObj->attributes()->base;\n $xml['version'] = (string)$xmlObj->attributes()->version;\n $xml['required'] = (string)$xmlObj->attributes()->required;\n\n foreach ($xmlObj->component as $item) {\n $comp = (string)$item->attributes()->name;\n $xml['components'][$comp] = array();\n if ($item->count() > 0) {\n $children = $item->children();\n foreach ($children as $child) {\n $xml['components'][$comp][] = (string)$child->attributes()->name;\n }\n }\n }\n\n // Validate command parameter\n if (!isset($argv[2])) {\n throw new \\Pop\\Exception('You must pass a command parameter, i.e. \\'install\\' or \\'remove\\'.');\n } else if (!in_array($argv[2], $this->commands)) {\n throw new \\Pop\\Exception(\n 'That is not a valid command. Available commands are \\'' .\n implode('\\', \\'', $this->commands) . '\\'.'\n );\n }\n\n $ext = $argv[1];\n $command = $argv[2];\n $parameters = $argv;\n array_shift($parameters);\n array_shift($parameters);\n array_shift($parameters);\n\n // Validate component parameters\n if (($command == 'install') || ($command == 'remove')) {\n if (!isset($parameters[0])) {\n throw new \\Pop\\Exception('You must pass at least one component to install or remove.');\n }\n if (strtolower($parameters[0]) != 'all') {\n foreach ($parameters as $comp) {\n if (!array_key_exists($comp, $xml['components'])) {\n if (in_array($comp, $this->defaults)) {\n $msg = 'One or more of the components is a default component. It cannot be installed or removed.' .\n PHP_EOL . 'Use \\'./pop list\\' to list the available components.';\n } else {\n $msg = 'One or more of the components is not available.' .\n PHP_EOL . 'Use \\'./pop list\\' to list the available components.';\n }\n throw new \\Pop\\Exception($msg);\n }\n }\n }\n }\n\n // Execute command\n switch ($command) {\n // Show the version\n case 'version':\n $latest = null;\n $handle = fopen(self::URL, 'r');\n if ($handle !== false) {\n $latest = stream_get_contents($handle);\n fclose($handle);\n }\n echo PHP_EOL . 'Popcorn ' . self::VERSION . ' is installed and uses components from Pop PHP Framework ' . $xml['required'] . '.';\n echo PHP_EOL . 'Popcorn ' . trim($latest) . ' is the latest available.' . PHP_EOL . PHP_EOL;\n break;\n\n // Display help\n case 'help':\n echo PHP_EOL . 'Help for Popcorn:';\n echo PHP_EOL . '=================' . PHP_EOL;\n echo PHP_EOL . wordwrap('The Popcorn CLI interface serves as a dependency manager and allows you to install or remove certain components from the Pop PHP Framework to use with Popcorn. It requires either the TAR or ZIP program to be installed.', 80, PHP_EOL) . PHP_EOL . PHP_EOL;\n echo \" help\\t\\t\\tDisplay this help\" . PHP_EOL;\n echo \" version\\t\\tDisplay the version\" . PHP_EOL;\n echo \" list\\t\\t\\tList available components\" . PHP_EOL;\n echo \" build module.php\\tBuild a quick module scaffolding\" . PHP_EOL;\n echo \" install Comp1 Comp2\\tInstall components\" . PHP_EOL;\n echo \" install all\\t\\tInstall all components\" . PHP_EOL;\n echo \" remove Comp1 Comp2\\tRemove components\" . PHP_EOL;\n echo \" remove all\\t\\tRemove all components\" . PHP_EOL;\n echo PHP_EOL;\n break;\n\n // List available components\n case 'list':\n echo PHP_EOL . 'Available Components for Popcorn:';\n echo PHP_EOL . '=================================' . PHP_EOL;\n foreach ($xml['components'] as $comp => $value) {\n $prefix = (file_exists(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . $comp)) ? ' [i] ' : ' ';\n echo $prefix . $comp . PHP_EOL;\n }\n echo PHP_EOL;\n break;\n\n // Build module scaffolding\n case 'build':\n if (!isset($parameters[0])) {\n throw new \\Pop\\Exception('You must pass a config file.');\n }\n if (!file_exists($parameters[0])) {\n throw new \\Pop\\Exception('The config file does not exist.');\n }\n\n $config = include $parameters[0];\n\n foreach ($config as $name => $cfg) {\n echo PHP_EOL . 'Creating folder structure for ' . $name . '...' . PHP_EOL;\n if (!file_exists(__DIR__ . '/../../../../../module')) {\n mkdir(__DIR__ . '/../../../../../module');\n }\n if (!file_exists(__DIR__ . '/../../../../../module/' . $name)) {\n mkdir(__DIR__ . '/../../../../../module/' . $name);\n mkdir(__DIR__ . '/../../../../../module/' . $name . '/data');\n mkdir(__DIR__ . '/../../../../../module/' . $name . '/src');\n mkdir(__DIR__ . '/../../../../../module/' . $name . '/view');\n mkdir(__DIR__ . '/../../../../../module/' . $name . '/src/' . $name);\n chmod(__DIR__ . '/../../../../../module/' . $name . '/data', 0777);\n\n $dir = dirname($parameters[0]);\n if (file_exists($dir . '/view')) {\n echo PHP_EOL . 'Copying view files...';\n $d = new \\Pop\\File\\Dir($dir . '/view', false, false, false);\n foreach ($d->getFiles() as $f) {\n copy($dir . '/view/' . $f, __DIR__ . '/../../../../../module/' . $name . '/view/' . $f);\n }\n }\n }\n\n foreach ($cfg as $key => $value) {\n // Create database file\n if ($key == 'databases') {\n echo PHP_EOL . 'Creating database files...';\n if (!is_array($value)) {\n $value = array($value);\n }\n foreach ($value as $val) {\n if (stripos($val, 'sqlite')) {\n touch(__DIR__ . '/../../../../../module/' . $name . '/data/' . $val);\n chmod(__DIR__ . '/../../../../../module/' . $name . '/data/' . $val, 0777);\n }\n }\n }\n // Create controller classes\n if ($key == 'controllers') {\n echo PHP_EOL . 'Creating controller classes...';\n if (!is_array($value)) {\n $value = array($value);\n }\n mkdir(__DIR__ . '/../../../../../module/' . $name . '/src/' . $name . '/Controller');\n foreach ($value as $val) {\n $class = \"<?php\" . PHP_EOL . PHP_EOL . \"namespace {$name}\\\\Controller;\" . PHP_EOL . PHP_EOL .\n \"class {$val} extends \\\\Pop\\\\Mvc\\\\Controller \" . PHP_EOL . \"{\" . PHP_EOL . PHP_EOL .\n \" public function index()\" . PHP_EOL . \" {\" . PHP_EOL . PHP_EOL . \" }\" . PHP_EOL . PHP_EOL .\n \" public function error()\" . PHP_EOL . \" {\" . PHP_EOL . PHP_EOL . \" }\" . PHP_EOL . PHP_EOL .\n \"}\" . PHP_EOL . PHP_EOL;\n file_put_contents(__DIR__ . '/../../../../../module/' . $name . '/src/' . $name . '/Controller/' . $val . '.php', $class);\n }\n }\n\n // Create table classes\n if ($key == 'tables') {\n echo PHP_EOL . 'Creating table classes...';\n if (!is_array($value)) {\n $value = array($value);\n }\n mkdir(__DIR__ . '/../../../../../module/' . $name . '/src/' . $name . '/Table');\n foreach ($value as $val) {\n $class = \"<?php\" . PHP_EOL . PHP_EOL . \"namespace {$name}\\\\Table;\" . PHP_EOL . PHP_EOL .\n \"class {$val} extends \\\\Pop\\\\Db\\\\Record\" . PHP_EOL . \"{\" . PHP_EOL . PHP_EOL . \"}\" . PHP_EOL . PHP_EOL;\n file_put_contents(__DIR__ . '/../../../../../module/' . $name . '/src/' . $name . '/Table/' . $val . '.php', $class);\n }\n }\n\n // Create model classes\n if ($key == 'models') {\n echo PHP_EOL . 'Creating model classes...';\n if (!is_array($value)) {\n $value = array($value);\n }\n mkdir(__DIR__ . '/../../../../../module/' . $name . '/src/' . $name . '/Model');\n foreach ($value as $val) {\n $class = \"<?php\" . PHP_EOL . PHP_EOL . \"namespace {$name}\\\\Model;\" . PHP_EOL . PHP_EOL .\n \"class {$val}\" . PHP_EOL . \"{\" . PHP_EOL . PHP_EOL . \"}\" . PHP_EOL . PHP_EOL;\n file_put_contents(__DIR__ . '/../../../../../module/' . $name . '/src/' . $name . '/Model/' . $val . '.php', $class);\n }\n }\n\n // Create form classes\n if ($key == 'forms') {\n echo PHP_EOL . 'Creating form classes...';\n if (!is_array($value)) {\n $value = array($value);\n }\n mkdir(__DIR__ . '/../../../../../module/' . $name . '/src/' . $name . '/Form');\n foreach ($value as $val) {\n $class = \"<?php\" . PHP_EOL . PHP_EOL . \"namespace {$name}\\\\Form;\" . PHP_EOL . PHP_EOL .\n \"class {$val} extends \\\\Pop\\\\Form\\\\Form\" . PHP_EOL . \"{\" . PHP_EOL . PHP_EOL .\n \" public function __construct(\\$action = null, \\$method = 'post', array \\$fields = null, \\$indent = null)\" . PHP_EOL .\n \" {\" . PHP_EOL .\n \" \\$this->initFieldsValues = array(\" . PHP_EOL .\n \" 'field' => array(\" . PHP_EOL .\n \" 'type' => 'text',\" . PHP_EOL .\n \" 'label' => 'Field:',\" . PHP_EOL .\n \" 'required' => true,\" . PHP_EOL .\n \" 'attributes' => array('size' => 40)\" . PHP_EOL .\n \" ),\" . PHP_EOL .\n \" 'submit' => array(\" . PHP_EOL .\n \" 'type' => 'submit',\" . PHP_EOL .\n \" 'label' => ' ',\" . PHP_EOL .\n \" 'value' => 'Submit'\" . PHP_EOL .\n \" )\" . PHP_EOL .\n \" );\" . PHP_EOL .\n \" parent::__construct(\\$action, \\$method, \\$fields, \\$indent);\" . PHP_EOL .\n \" }\" . PHP_EOL . PHP_EOL .\n \"}\" . PHP_EOL . PHP_EOL;\n file_put_contents(__DIR__ . '/../../../../../module/' . $name . '/src/' . $name . '/Form/' . $val . '.php', $class);\n }\n }\n }\n echo PHP_EOL . PHP_EOL . 'Structure for ' . $name . ' complete.' . PHP_EOL . PHP_EOL;\n }\n\n break;\n\n // Install components\n case 'install':\n echo PHP_EOL;\n $comps = array();\n $deps = array();\n\n // If 'all', then install all\n if (strtolower($parameters[0]) == 'all') {\n $comps = array_keys($xml['components']);\n // Else, select which components and their dependencies to install\n } else {\n foreach ($parameters as $parameter) {\n $comps[] = $parameter;\n if (count($xml['components'][$parameter]) > 0) {\n foreach ($xml['components'][$parameter] as $param) {\n if (!in_array($param, $comps)) {\n $comps[] = $param;\n }\n }\n }\n }\n }\n\n // Get dependencies\n foreach ($comps as $comp) {\n if (count($xml['components'][$comp]) > 0) {\n foreach ($xml['components'][$comp] as $com) {\n if (!in_array($com, $comps)) {\n $deps[] = $com;\n }\n }\n }\n }\n\n $comps = array_merge($comps, $deps);\n\n // Download the component files\n foreach ($comps as $comp) {\n echo 'Downloading ' . $comp;\n $this->download($comp, $ext);\n echo PHP_EOL;\n }\n\n break;\n\n // Remove components\n case 'remove':\n echo PHP_EOL;\n $comps = array();\n $deps = array();\n $installed = array();\n $skip = array();\n $dir = new \\Pop\\File\\Dir(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR);\n $files = $dir->getFiles();\n\n // Check which components are already installed\n foreach ($files as $file) {\n if (is_dir(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . $file) && !in_array($file, $this->defaults)) {\n $installed[] = $file;\n }\n }\n\n // If 'all', then remove all\n if (strtolower($parameters[0]) == 'all') {\n $comps = array_keys($xml['components']);\n // Else, select which components and their dependencies to remove\n } else {\n foreach ($installed as $parameter) {\n // Get dependencies of installed components\n if (count($xml['components'][$parameter]) > 0) {\n foreach ($xml['components'][$parameter] as $param) {\n if (in_array($param, $installed)) {\n if (!isset($deps[$parameter])) {\n $deps[$parameter] = array($param);\n } else if (!in_array($param, $deps[$parameter])) {\n $deps[$parameter][] = $param;\n }\n }\n if (count($xml['components'][$param]) > 0) {\n foreach ($xml['components'][$param] as $par) {\n if (in_array($par, $installed)) {\n if (!isset($deps[$parameter])) {\n $deps[$parameter] = array($par);\n } else if (!in_array($par, $deps[$parameter])) {\n $deps[$parameter][] = $par;\n }\n }\n }\n }\n }\n if (isset($deps[$parameter])) {\n sort($deps[$parameter]);\n }\n } else {\n $deps[$parameter] = array();\n }\n }\n }\n\n // Sort through the components (and their dependencies)\n // that were flagged for removal\n foreach ($parameters as $parameter) {\n if (!in_array($parameter, $comps)) {\n $comps[] = $parameter;\n }\n foreach ($deps as $key => $value) {\n if (in_array($parameter, $value)) {\n if (isset($skip[$parameter])) {\n $skip[$parameter][] = $key;\n } else {\n $skip[$parameter] = array($key);\n }\n }\n }\n if (isset($deps[$parameter])) {\n foreach ($deps[$parameter] as $param) {\n if (!in_array($param, $comps)) {\n $comps[] = $param;\n }\n foreach ($deps as $key => $value) {\n if (($key != $parameter) && in_array($param, $value)) {\n if (!in_array($param, $deps[$parameter]) || !in_array($key, $deps[$parameter])) {\n if (isset($skip[$param])) {\n $skip[$param][] = $key;\n } else {\n $skip[$param] = array($key);\n }\n }\n }\n }\n }\n }\n }\n\n sort($installed);\n sort($comps);\n\n // Begin to remove the components\n foreach ($comps as $comp) {\n if ($comp != 'all') {\n // If require by other installed components\n if (array_key_exists($comp, $skip)) {\n echo 'Skipping ' . $comp . '. It is required by the following components: ' . implode(', ', $skip[$comp]) . '.';\n // If a default component\n } else if (in_array($comp, $this->defaults)) {\n echo 'Skipping ' . $comp . '. It is a default component.';\n // If component is not installed or does not exist\n } else if (!file_exists(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . $comp)) {\n echo 'Skipping ' . $comp . '. ' . (array_key_exists($comp, $xml['components']) ? 'It is not installed.' : 'It does not exist');\n // Else, remove it\n } else {\n echo 'Removing ' . $comp;\n $dir = new \\Pop\\File\\Dir(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . $comp);\n $dir->emptyDir(null, true);\n }\n echo PHP_EOL;\n }\n }\n\n echo PHP_EOL . 'Complete!' . PHP_EOL;\n\n break;\n }\n } else {\n throw new \\Pop\\Exception('The component URL cannot be read at this time.');\n }\n\n }",
"public function getArguments() {}"
] | [
"0.6317212",
"0.61038584",
"0.59945977",
"0.5982054",
"0.594719",
"0.59366536",
"0.59118754",
"0.58754444",
"0.5802868",
"0.56958175",
"0.5599045",
"0.55985016",
"0.5549587",
"0.5458798",
"0.54408616",
"0.54400605",
"0.5426033",
"0.54172045",
"0.539569",
"0.5374136",
"0.53655255",
"0.53597397",
"0.5355096",
"0.53550893",
"0.5322962",
"0.5305383",
"0.5302843",
"0.52858657",
"0.52780676",
"0.52776766",
"0.527732",
"0.5254698",
"0.524249",
"0.5199259",
"0.51720554",
"0.5170556",
"0.517023",
"0.51562876",
"0.51548654",
"0.5153164",
"0.5151912",
"0.5149066",
"0.514412",
"0.514412",
"0.51416254",
"0.5141109",
"0.5135384",
"0.5103296",
"0.5087304",
"0.507531",
"0.50555456",
"0.5047439",
"0.5026013",
"0.5018345",
"0.50176996",
"0.5014668",
"0.5008891",
"0.49966264",
"0.49876353",
"0.4983032",
"0.49608606",
"0.49566567",
"0.49560857",
"0.49461573",
"0.49400857",
"0.4935208",
"0.49294448",
"0.492686",
"0.49189875",
"0.49148738",
"0.4905412",
"0.49018076",
"0.49006137",
"0.49006137",
"0.48985097",
"0.48930523",
"0.48930523",
"0.48930523",
"0.48876506",
"0.48806724",
"0.48806724",
"0.48806626",
"0.48764953",
"0.48764953",
"0.48764953",
"0.48764953",
"0.48764953",
"0.48764953",
"0.48764953",
"0.48764953",
"0.48751497",
"0.4873433",
"0.48716182",
"0.48686114",
"0.48600778",
"0.4853148",
"0.4851397",
"0.4850106",
"0.4836507",
"0.48317912",
"0.48255584"
] | 0.0 | -1 |
Overwrite method Compacts the ordering sequence of the selected records | function reorder( $parent_id = 0, $where='' )
{
$k = $this->_tbl_key;
if (!in_array( 'ordering', array_keys($this->getProperties() ) ))
{
vmError( get_class( $this ).' does not support ordering');
return false;
}
$query = 'SELECT c.'.$this->_tbl_key.', c.ordering'
. ' FROM '. $this->_tbl . ' c'
. ' LEFT JOIN #__virtuemart_category_categories cx'
. ' ON c.virtuemart_category_id = cx.category_child_id'
. ' WHERE c.ordering >= 0' . ( $where ? ' AND '. $where : '' )
. ' AND cx.category_parent_id = '. $parent_id
. ' ORDER BY c.ordering'.$order2;
$this->_db->setQuery( $query );
if (!($orders = $this->_db->loadObjectList()))
{
vmError($this->_db->getErrorMsg());
return false;
}
// compact the ordering numbers
for ($i=0, $n=count( $orders ); $i < $n; $i++)
{
if ($orders[$i]->ordering >= 0)
{
if ($orders[$i]->ordering != $i+1)
{
$orders[$i]->ordering = $i+1;
$query = 'UPDATE '.$this->_tbl
. ' SET ordering = '. (int) $orders[$i]->ordering
. ' WHERE '. $k .' = '. $this->_db->Quote($orders[$i]->$k)
;
$this->_db->setQuery( $query);
$this->_db->query();
}
}
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function order();",
"protected function prepareOrderByStatement() {}",
"public function generateOrder();",
"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}",
"protected function decksOrderAsc()\n {\n $request = $this->request();\n\n $this->result()\n ->changeRequest('decks_current_condition', $request['decks_order_asc'])\n ->changeRequest('decks_current_order', 'ASC')\n ->setCurrent('Decks_shared');\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\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 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 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}",
"protected function setOrder() {\r\n if( $this->sqlOrderBy ) {\r\n $this->sql .= ' ORDER BY ' . $this->sqlOrderBy;\r\n }\r\n }",
"public function getSortOrder();",
"public function getSortOrder();",
"public function getSortOrder();",
"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}",
"function _order($inc) {\n\t\n\t\t// Check for request forgeries\n\t\tdefined('_JEXEC') or die( 'Invalid Token' );\n\t\n\t\t// Instanz der Tabelle\n\t\t$row = JTable::getInstance( 'turniere', 'TableCLM' );\n\t\t$row->load( $this->id ); // Daten zu dieser ID laden\n\n\t $clmAccess = clm_core::$access; \n\t\tif (($row->tl != clm_core::$access->getJid() AND $clmAccess->access('BE_tournament_edit_detail') !== true) OR $clmAccess->access('BE_tournament_edit_detail') === false) {\n\t\t\t$this->app->enqueueMessage( JText::_('TOURNAMENT_NO_ACCESS'),'warning' );\n\t\t\treturn false;\n\t\t}\n\t\n\t\t$cid = clm_core::$load->request_array_int('cid');\n\t\t$rundenid = $cid[0];\n\t\n\t\t$row =JTable::getInstance( 'turnier_runden', 'TableCLM' );\n\t\tif ( !$row->load( $rundenid ) ) {\n\t\t\t$this->app->enqueueMessage( CLMText::errorText('ROUND', 'NOTEXISTING'),'warning' );\n\t\t\treturn false;\n\t\t}\n\t\t$row->move( $inc, '' );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->app->enqueueMessage( $row->name.\": \".JText::_('ORDERING_CHANGED') );\n\t\t\n\t\treturn true;\n\t\t\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() {\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}",
"function changeOrder() {\n $this->iteratorH = array_reverse($this->iteratorH);\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}",
"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}",
"public function &getOrderBy();",
"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 orderedMove() {\n\t\t$modelName = $this->Controller->modelClass;\n\t\t$this->Controller->{$modelName}->transaction();\n\n\t\tif (!$this->Controller->{$modelName}->Behaviors->attached('Sequence')) {\n\t\t\t$this->Controller->notice(\n\t\t\t\t__d('infinitas', 'A problem occured moving the ordered record.'),\n\t\t\t\tarray(\n\t\t\t\t\t'level' => 'error',\n\t\t\t\t\t'redirect' => true\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t$fields = array_values($this->Controller->{$modelName}->sequenceGroupFields());\n\t\t$fields[] = $this->Controller->{$modelName}->alias . '.' . $this->Controller->{$modelName}->primaryKey;\n\t\t$data = $this->Controller->{$modelName}->find('first', array(\n\t\t\t'fields' => $fields,\n\t\t\t'conditions' => array(\n\t\t\t\t$this->Controller->{$modelName}->alias . '.' . $this->Controller->{$modelName}->primaryKey => $this->Controller->request->data[$modelName][$this->Controller->{$modelName}->primaryKey]\n\t\t\t),\n\t\t\t'callbacks' => false\n\t\t));\n\t\t$data[$modelName]['ordering'] = $this->Controller->request->params['named']['position'];\n\n\t\ttry {\n\t\t\tif ($this->Controller->{$modelName}->save($data, array('validate' => false))) {\n\t\t\t\t$this->Controller->{$modelName}->transaction(true);\n\t\t\t\t$this->Controller->notice(\n\t\t\t\t\t__d('infinitas', 'The record was moved'),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'redirect' => ''\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t} catch(Exception $e) {\n\t\t\t$this->Controller->{$modelName}->transaction(false);\n\t\t\t$this->Controller->notice(\n\t\t\t\t$e->getMessage(),\n\t\t\t\tarray(\n\t\t\t\t\t'level' => 'error',\n\t\t\t\t\t'redirect' => false\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}",
"function getOrdering() {\n return $this->ordering;\n }",
"function getOrder()\n {\n return 1;\n }",
"function getOrder()\n {\n return 1;\n }",
"function getOrder()\n {\n return 1;\n }",
"function getOrder()\n {\n return 1;\n }",
"function getOrder()\n {\n return 4;\n }",
"function getOrder()\n {\n return 4;\n }",
"protected function get_sort_order() {\n return 111;\n }",
"public function getOrder() {\n\n return 1;\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 = @$_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 LoadSortOrder() {\n\t\t$sOrderBy = $this->getSessionOrderBy(); // Get ORDER BY from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($this->getSqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $this->getSqlOrderBy();\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t\t$this->id->setSort(\"DESC\");\n\t\t\t}\n\t\t}\n\t}",
"public function getOrder() {\n return 1;\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->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}",
"public function getSortOrder(): int;",
"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}",
"protected function setOrderAsc(): self\r\n {\r\n $this->getBread()->setOrderAsc();\r\n return $this;\r\n }",
"function getOrder()\n {\n return 3;\n }",
"function getOrder()\n {\n return 0;\n }",
"function getOrder()\n {\n return 0;\n }",
"protected function get_parameter_order()\n {\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\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 refreshOrderBy()\r\n\t{\r\n\t\t$query = $this->model->getQuery();\r\n\t\tunset($query->orders);\r\n\r\n\t\t$this->model->setQuery($query);\r\n\t\treturn $this;\r\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->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 orderRecord()\t{\n\t\tif (($GLOBALS['TSFE']->loginUser && $this->conf['requireLogin']) || ( $this->aCAuth($origArr)&& $this->conf['requireLogin'])||!$this->conf['requireLogin'])\t{\t// Must be logged in OR be authenticated by the aC code in order to reorder\n\t\t\t//on instancie la tce_main\n\t\t\t$tce_main=t3lib_div::makeInstance('t3lib_TCEmain');\n\t\t\t//recup de l'ordre dans lequel on trie\n\t\t\tif ($this->conf['inputvar.']['orderDir.']['dir']=='up') {\n\t\t\t\t$toUp = true;\n\t\t\t}\n\t\t\telse $toUp = false;\n\n\t\t\t//recup de l'uid a modifier\n\t\t\t$rU = $this->conf['inputvar.']['orderDir.']['rU'];\n\n\t\t\t//recup de la colonne de delete si existe et de la colonne de hidden si existe.\n\t\t\t$deletedField = isset($this->conf['TCAN'][$this->theTable]['ctrl']['delete'])?$this->conf['TCAN'][$this->theTable]['ctrl']['delete']:'';\n\t\t\t$hiddenField = isset($this->conf['TCAN'][$this->theTable]['ctrl']['enablecolumns']['disabled'])?$this->conf['TCAN'][$this->theTable]['ctrl']['enablecolumns']['disabled']:'';\n\n\t\t\t// on recupere l'enregistrement suivant dans l'ordre du sorting\n\t\t\t$fields = $this->theTable.'1.'.$this->conf['uidField'].\" as `nextUid`\";\n\t\t\t$tables = $this->theTable.' as '.$this->theTable.'1, '.$this->theTable.' as '.$this->theTable.'2';\n\t\t\t$where = '1';\n\t\t\t$where.= ($deletedField!=''?' and '.$this->theTable.'1.deleted=0 and '.$this->theTable.'2.deleted=0':''); //deleted clause\n\t\t\t$where.= ($hiddenField!=''?' and '.$this->theTable.'1.hidden=0 and '.$this->theTable.'2.hidden=0':''); //hidden clause\n\t\t\t$where.= ' and '.$this->theTable.'1.sorting '.($toUp?'<':'>').' '.$this->theTable.'2.sorting';\n\t\t\t$where.= ' and '.$this->theTable.'2.'.$this->conf['uidField'].'='.$rU;\n\t\t\t$where.= ($this->conf['edit.']['menuLockPid'] && $this->conf['pid'])?' and '.$this->theTable.'1.pid='.$this->conf['pid'].' and '.$this->theTable.'2.pid='.$this->conf['pid']:'';\n\t\t\t$order = $this->theTable.'1.sorting '.($toUp?'DESC':'ASC');\n\t\t\t$limit = ($toUp?'1':'0').',1';\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, $tables, $where, '', $order, $limit);\n\t\t\t//si on trouve un resultat (on est donc pas sur le premier second enregistrement ni sur le dernier)\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {\n\t\t\t\t$occ = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);\n\t\t\t\t//recherche du nouveau sorting\n\t\t\t\t$arrSort = $tce_main->getSortNumber($this->theTable, $rU, '-'.$occ['nextUid']);\n\t\t\t\t//on met a jour\n\t\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery($this->theTable, $this->conf['uidField'].'='.$rU, array('sorting' => $arrSort['sortNumber']));\n\t\t\t} elseif ($toUp) {\n\t\t\t\t//si on cherche a faire monter l'enregistrement et qu'on est pas au milieu de la liste\n\t\t\t\t//on change les limites\n\t\t\t\t$limit = '0,1';\n\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, $tables, $where, '', $order, $limit);\n\t\t\t\t//si on a une line on est sur le second enregistrement\n\t\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($res) >= 1) {\n\t\t\t\t\t//recherche du nouveau sorting\n\t\t\t\t\t$arrSort = $tce_main->getSortNumber($this->theTable, $rU, $this->conf['pid']);\n\t\t\t\t\t//on met a jour\n\t\t\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery($this->theTable, $this->conf['uidField'].'='.$rU, array('sorting' => $arrSort['sortNumber']));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t\t\t$this->error = '###TEMPLATE_NO_PERMISSIONS###';\n\t\t}\n\t}",
"function reorder()\n\t{\n\t\t$ids = $this->params['form']['people'];\n\t\t\n\t\t// Save the new orderings to the database (1st review gets highest number)\n\t\t$i = 0;\n\t\tforeach($ids as $id)\n\t\t{\n\t\t\t$this->Person->id = $id;\n\t\t\t$this->Person->saveField('ordering', $i++);\n\t\t}\n\t\t\n\t\t// Re-render the list of reviews to show that we have succeeded\n\t\t$contact_id = $this->Person->field('contact_id', \"Person.id = '\".$ids[0].\"'\");\n\t\t\n\t\t$this->setAction('listFromContact', $contact_id);\n\t}",
"protected function enforceOrderBy()\n {\n if (empty($this->query->orders) && empty($this->query->unionOrders)) {\n $this->orderBy($this->model->getQualifiedKeyName(), 'asc');\n }\n }",
"public function order(): int;",
"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 orderASC()\n {\n $this->order = 'ASC';\n\n return $this;\n }",
"public function default_order_by()\r\n {\r\n $this->db->order_by('partners.id');\r\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 }",
"public function refreshOrderBy()\n {\n $query = $this->model->getQuery();\n unset($query->orders);\n\n $this->model->setQuery($query);\n return $this;\n }",
"function LoadSortOrder() {\n\t\tglobal $tbl_slide;\n\t\t$sOrderBy = $tbl_slide->getSessionOrderBy(); // Get ORDER BY from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($tbl_slide->SqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $tbl_slide->SqlOrderBy();\n\t\t\t\t$tbl_slide->setSessionOrderBy($sOrderBy);\n\t\t\t\t$tbl_slide->order_by->setSort(\"ASC\");\n\t\t\t}\n\t\t}\n\t}",
"public function getOrder()\n {\n return 4;\n // TODO: Implement getOrder() method.\n }",
"public function getOrder();",
"public function getOrder();",
"public function getOrder();",
"public function getOrder();",
"public function getOrder();",
"public function getOrder();",
"function LoadSortOrder() {\n\t\tglobal $patient_detail;\n\t\t$sOrderBy = $patient_detail->getSessionOrderBy(); // Get order by from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($patient_detail->SqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $patient_detail->SqlOrderBy();\n\t\t\t\t$patient_detail->setSessionOrderBy($sOrderBy);\n\t\t\t}\n\t\t}\n\t}",
"function getOrder()\n {\n return 2;\n }",
"public function getOrder()\n {\n return 4;\n }",
"public function getOrder()\n {\n return 4;\n }",
"public function setPositionOrder()\n {\n $this->getSelect()->order('main_table.position asc')\n ->order('main_table.option_id asc');\n return $this;\n }",
"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 getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }"
] | [
"0.6949786",
"0.6596622",
"0.637659",
"0.63706857",
"0.6369452",
"0.63419497",
"0.63056016",
"0.6280431",
"0.6270463",
"0.6266637",
"0.6257193",
"0.6257193",
"0.6257193",
"0.62192076",
"0.6212788",
"0.6203942",
"0.615839",
"0.6156547",
"0.61521786",
"0.6151954",
"0.61400354",
"0.6138032",
"0.6093616",
"0.6064308",
"0.6050422",
"0.6050422",
"0.6050422",
"0.6050422",
"0.6021933",
"0.6021933",
"0.60203403",
"0.5977016",
"0.5976662",
"0.5975082",
"0.5974003",
"0.59510165",
"0.59504545",
"0.59406435",
"0.59350914",
"0.5931007",
"0.5922184",
"0.5922184",
"0.59174097",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5915846",
"0.5898807",
"0.58969617",
"0.5896072",
"0.58863753",
"0.58860517",
"0.58721596",
"0.5864453",
"0.5838854",
"0.5837393",
"0.5831705",
"0.58280796",
"0.5805675",
"0.579581",
"0.57956654",
"0.57858795",
"0.57858795",
"0.57858795",
"0.57858795",
"0.57858795",
"0.57858795",
"0.578417",
"0.57792145",
"0.57493013",
"0.57493013",
"0.5747657",
"0.5746645",
"0.57418567",
"0.57418567",
"0.57418567",
"0.57418567",
"0.57418567",
"0.57418567"
] | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
/**
* use the facade we created.
* LanguageHelper::getLang();
*/
$arabic_date = $this->ArabicDate();
return view('commonmodule::index', ['date' => $arabic_date]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
use the facade we created. LanguageHelper::getLang(); | public function cat()
{
return view('commonmodule::index');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getLang();",
"public function getLanguage() {}",
"public function lang(): string;",
"static function get()\n\t{\n\t\treturn self::$lang;\n\t}",
"protected static function getLanguageService() {}",
"public function language();",
"public function language();",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"public function getLang(): string {\n return $this->lang;\n }",
"protected function _getLang()\n\t{\n\t\t$lang = new stdClass;\n\t\treturn $lang;\n\t}",
"public static function get() {\n\t\treturn self::$lang;\n\t}",
"protected static function getFacadeAccessor() { return 'language'; }",
"function language($lang)\n\t{\n\t\treturn lava_instance()->lang->language($lang);\n\t}",
"public function getLanguage();",
"public function getLanguage();",
"public function getLanguage();",
"public function getLanguage();",
"public function getLanguage();",
"public function getLanguage();",
"public function get_language()\n {\n }",
"public static function getLang()\n {\n return self::getInstance()->lang;\n }",
"abstract public function get_app_language();",
"public function getLangcode() {\n }",
"public function lang($lang = null);",
"function GetLanguage() : string\n{\n return App::getLocale();\n}",
"protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }",
"protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }",
"protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }",
"public function getFromLanguage(): string;",
"static function getLanguage (){\n return self::$language;\n }",
"static public function getTranslate()\r\n {\r\n return Warecorp_Translate::getTranslate();\r\n }",
"final public function getLang(): string {\n $this->init();\n return $this->language;\n }",
"public static function loadLang() {\n\t\tif (!is_object($GLOBALS['LANG'])) {\n\n\t\t\trequire_once t3lib_extMgm::extPath('lang') . 'lang.php';\n\t\t\t//TODO see pt_tool smarty!\n\t\t\t$GLOBALS['LANG'] = t3lib_div::makeInstance('language');\n\t\t\t$GLOBALS['LANG']->csConvObj = t3lib_div::makeInstance('t3lib_cs');\n\t\t}\n\t\tif (is_object($GLOBALS['TSFE']) && $GLOBALS['TSFE']->config['config']['language']) {\n\t\t\t$LLkey = $GLOBALS['TSFE']->config['config']['language'];\n\t\t\t$GLOBALS['LANG']->init($LLkey);\n\t\t}\n\n\t}",
"function lang($key, $params = NULL)\n\t{\n\t\t$ci = get_instance()->load->helper('mylanguage');\n\t\treturn mylang($key, $params);\n\t}",
"function get_lang ()\r\n {\r\n return $_SESSION[\"lang\"];\r\n }",
"public static function get_translate(){\n return self::$translate;\n }",
"protected function getLanguages() {}",
"public function lang()\n {\n return $this->currlang();\n }",
"static function lang($lang)\n {\n $route = App::router()->getCurrent();\n return self::generate($route, $route->getParameters(), $lang);\n }",
"function getLang() {\n\t\treturn $this->mLang;\n\t}",
"public function getLang()\n {\n return $this->lang;\n }",
"public function getLang()\n {\n return $this->lang;\n }",
"public function getBackOfficeLanguage();",
"private function registerLang()\n\t{\n\t\t$this->app->singleton('glottos.laravel.lang', function($app) {\n\t\t\treturn new Lang($app['glottos']);\n\t\t});\n\t}",
"public static function langPath(){\n return \\Illuminate\\Foundation\\Application::langPath();\n }",
"public function getSystemLanguages() {}",
"public function getSystemLanguages() {}",
"function get_lang($name) {\n global $lang;\n return $lang->get_phrase($name);\n}",
"private static function translator()\n {\n $files = ['Lang', 'Smiley'];\n $folder = static::$root.'Translator'.'/';\n\n self::call($files, $folder);\n\n $files = ['LanguageKeyNotFoundException', 'LanguageNotSupportedException'];\n $folder = static::$root.'Translator/Exceptions'.'/';\n\n self::call($files, $folder);\n }",
"public function getLang()\n {\n return $this->_lang;\n }",
"function lang()\n\t{\n\t\t$args = func_get_args();\n\t\tif (is_array($args) && count($args) == 1 && is_array($args[0]))\n\t\t\t$args = $args[0];\n\t\treturn CmsLanguage::translate($args[0], array_slice($args, 1), $this->get_name(), '', $this->default_language());\n\t}",
"public function getLanguages() {}",
"public function getLanguage($controller);",
"public function settingLanguage() {}",
"function get_lang_locale() {\n\tglobal $lang_code;\n\t$localeMap = array(\n\t\t'ca' => 'ca_ES',\n\t\t'cs' => 'cs_CZ',\n\t\t'cy' => 'cy_GB',\n\t\t'da' => 'da_DK',\n\t\t'de' => 'de_DE',\n\t\t'eu' => 'eu_ES',\n\t\t'en' => 'en_US',\n\t\t'es' => 'es_ES',\n\t\t'fi' => 'fi_FI',\n\t\t'fr' => 'fr_FR',\n\t\t'gl' => 'gl_ES',\n\t\t'hu' => 'hu_HU',\n\t\t'it' => 'it_IT',\n\t\t'ja' => 'ja_JP',\n\t\t'ko' => 'ko_KR',\n\t\t'nb' => 'nb_NO',\n\t\t'nl' => 'nl_NL',\n\t\t'pl' => 'pl_PL',\n\t\t'pt' => 'pt_BR',\n\t\t'ro' => 'ro_RO',\n\t\t'ru' => 'ru_RU',\n\t\t'sk' => 'sk_SK',\n\t\t'sl' => 'sl_SI',\n\t\t'sv' => 'sv_SE',\n\t\t'th' => 'th_TH',\n\t\t'tr' => 'tr_TR',\n\t\t'ku' => 'ku_TR',\n\t\t'zh_CN' => 'zh_CN',\n\t\t'zh_TW' => 'zh_TW',\n\t\t'af' => 'af_ZA',\n\t\t'sq' => 'sq_AL',\n\t\t'hy' => 'hy_AM',\n\t\t'az' => 'az_AZ',\n\t\t'be' => 'be_BY',\n\t\t'bs' => 'bs_BA',\n\t\t'bg' => 'bg_BG',\n\t\t'hr' => 'hr_HR',\n\t\t'eo' => 'eo_EO',\n\t\t'et' => 'et_EE',\n\t\t'fo' => 'fo_FO',\n\t\t'ka' => 'ka_GE',\n\t\t'el' => 'el_GR',\n\t\t'hi' => 'hi_IN',\n\t\t'is' => 'is_IS',\n\t\t'id' => 'id_ID',\n\t\t'ga' => 'ga_IE',\n\t\t'jv' => 'jv_ID',\n\t\t'kk' => 'kk_KZ',\n\t\t'la' => 'la_VA',\n\t\t'lv' => 'lv_LV',\n\t\t'lt' => 'lt_LT',\n\t\t'mk' => 'mk_MK',\n\t\t'mg' => 'mg_MG',\n\t\t'ms' => 'ms_MY',\n\t\t'mt' => 'mt_MT',\n\t\t'mn' => 'mn_MN',\n\t\t'ne' => 'ne_NP',\n\t\t'rm' => 'rm_CH',\n\t\t'sr' => 'sr_RS',\n\t\t'so' => 'so_SO',\n\t\t'sw' => 'sw_KE',\n\t\t'tl' => 'tl_PH',\n\t\t'uk' => 'uk_UA',\n\t\t'uz' => 'uz_UZ',\n\t\t'vi' => 'vi_VN',\n\t\t'zu' => 'zu_ZA',\n\t\t'ar' => 'ar_AR',\n\t\t'he' => 'he_IL',\n\t\t'ur' => 'ur_PK',\n\t\t'fa' => 'fa_IR',\n\t\t'sy' => 'sy_SY',\n\t\t'gn' => 'gn_PY'\n\t);\n\treturn (check_value($localeMap[$lang_code])) ? $localeMap[$lang_code] : 'en_US';\n}",
"public function languages();",
"function GetDefaultLang() : string\n{\n return 'ar';\n}",
"public function language(){\n\t\tdefined('MGK_LANGUAGE')\n\t\t || define('MGK_LANGUAGE', $this->lang );\n\n\t\t$language = MGK_LANGUAGE;\t\n\t\t$file_lang = MGK_APPLICATION_DIRECTORY.'/_language/'.$language.'.json';\n\t\t$this->mgkLang = new Amaguk_lang( $language );\t\t\t\n\t\t$this->mgkLang->read_lang($file_lang);\t\t\t\n\t}",
"function lang() {\r\n\t\tif($this->language === \"french\") {\r\n\t\t\tforeach($this->config['lang_fr'] as $tag_name) {\r\n\t\t\t\t$this->code = preg_replace('/<' . $tag_name . '([^<>]*)>/', '<' . $tag_name . ' lang=\"fr\" xml:lang=\"fr\"$1>', $this->code);\r\n\t\t\t\t$this->code = preg_replace('/<' . $tag_name . ' lang=\"fr\" xml:lang=\"fr\"([^<>]*) lang=\"fr\" xml:lang=\"fr\"([^<>]*)>/', '<' . $tag_name . ' lang=\"fr\" xml:lang=\"fr\"$1$2>', $this->code);\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($this->language === \"english_and_french\") {\r\n\t\t\tpreg_match_all('/<body[^<>]*>(.*?)<\\/body>/is', $this->code, $matches);\r\n\t\t\t$initial_body_code = $body_code = $matches[1][0];\r\n\t\t\t$replace_count = -1;\r\n\t\t\twhile($replace_count != 0) {\r\n\t\t\t\t$body_code = preg_replace('/<(\\w*)([^<>]*)>\\s*([^<>\\/]*[^\\s])\\s*\\/\\s*([^<>\\/]{1,})\\s*</is', '<$1$2><span lang=\"en\" xml:lang=\"en\">$3</span> / <span lang=\"fr\" xml:lang=\"fr\">$4</span><', $body_code, -1, $replace_count);\r\n\t\t\t}\r\n\t\t\t$this->code = str_replace($initial_body_code, $body_code, $this->code);\r\n\t\t}\r\n\t\t$this->logMsgIf(\"lang\", $ct);\r\n\t\treturn true;\r\n\t}",
"public function getLocale() {}",
"public function Lang() {\n $this->langFolder = FILES['LOCALE'].(file_exists(FILES['LOCALE'].((locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']) !== null) ? \n locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']) : \"en_US\").\"/global.lang\") ? locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']) : \"en_US\").\"/\";\n return $this;\n }",
"function lang($message) {\n echo Mvc::getInstance()->getView()->translateViewMessage($message);\n}",
"public function translation()\n {\n $kirby = $this->model->kirby();\n $lang = $this->model->language();\n return $kirby->translation($lang);\n }",
"public function index()\n {\n return Session::get('app.locale');\n }",
"public static function getSystemLanguages() {}",
"public function translated();",
"public function translated();",
"public function getLanguage() : ?string ;",
"public static function getCurrentLang() {\n if (is_null(self::$current)) {\n self::$current = self::getDefaultLang();\n }\n return self::$current;\n }",
"public function translator(): Translator;",
"protected function getLanguageService()\n {\n return $this->services['language'] = new \\phpbb\\language\\language(${($_ = isset($this->services['language.loader']) ? $this->services['language.loader'] : $this->getLanguage_LoaderService()) && false ?: '_'});\n }",
"public function getLanguage() : BaseLang {\n\t\treturn $this->baseLang;\n\t}",
"function __($text)\n{\n $sys = getSysInfo();\n $lang = $sys[\"lang\"];\n //set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'].getPathFromDocRoot().'locales'.FILE_SEPARATOR.$lang);\n if ($lang == \"\") {\n //do nothing\n return $text;\n } else {\n require_once('locales'.FILE_SEPARATOR.$lang.FILE_SEPARATOR.$lang.'.php');\n //$translation = getTranslation($text);\n $translation = call_user_func('getTranslation_'.$lang, $text);\n if ($translation == \"\") {\n return $text;\n //maybe send an error email to admin?\n } else {\n return $translation;\n }\n }\n}",
"function lang($key = '')\r\n{\r\n\t$CI =& get_instance();\r\n\t$line = $CI->lang->line($key);\r\n\t$line = ($line == '') ? $key : $line;\r\n\treturn $line;\r\n}",
"public function getLocale(): string;",
"public function getLocale(): string;",
"public function getLocale(): string;",
"function getLang() {\n\tif (request()->cookie(config('translate.su_cookie_name'))) {\n\t\t$cookie = request()->cookie(config('translate.su_cookie_name'));\n\t} else {\n\t\tif (request()->cookie(config('translate.cookie_name'))) {\n\t\t\t$cookie = request()->cookie(config('translate.cookie_name'));\n\t\t} else {\n\t\t\tif (substr(request()->server('HTTP_ACCEPT_LANGUAGE'), 0, 2)) {\n\t\t\t\t$cookie = substr(request()->server('HTTP_ACCEPT_LANGUAGE'), 0, 2);\n\t\t\t} else {\n\t\t\t\t$cookie = config('translate.default_locale');\n\t\t\t}\n\t\t}\n\t}\n\treturn $cookie;\n}",
"protected function getLang() {\n\t\t$locale = $this->getField()->getLocale();\n\t\tif($this->getField()->getConfig('jslocale')) {\n\t\t\t// Undocumented config property for now, might move to the jQuery view helper\n\t\t\t$lang = $this->getField()->getConfig('jslocale');\n\t\t} else if(array_key_exists($locale, self::$locale_map)) {\n\t\t\t// Specialized mapping for combined lang properties\n\t\t\t$lang = self::$locale_map[$locale];\n\t\t} else {\n\t\t\t// Fall back to default lang (meaning \"en_US\" turns into \"en\")\n\t\t\t$lang = i18n::get_lang_from_locale($locale);\n\t\t}\n\t\t\n\t\treturn $lang;\n\t}",
"function getLocale();",
"public function locale();",
"public function language(){\n return view('specialist.profile.specialist_language', [\n 'navTitle' => 'profile',\n 'sideBarNav' => 'lang'\n ]);\n }",
"public function getMultilingual();",
"public function getCurrentLanguage() {\n return $this->ci->session->userdata(\"language\");\n }"
] | [
"0.79465425",
"0.7724416",
"0.7709876",
"0.7629389",
"0.76208526",
"0.7549183",
"0.7549183",
"0.7487414",
"0.7487414",
"0.7487414",
"0.7487414",
"0.7487414",
"0.7487414",
"0.7487414",
"0.74871606",
"0.74871606",
"0.74871606",
"0.74871606",
"0.74871606",
"0.74871606",
"0.74871606",
"0.74871606",
"0.74871606",
"0.7485653",
"0.7485653",
"0.742223",
"0.74103975",
"0.74041027",
"0.7401775",
"0.7400626",
"0.7397708",
"0.7397708",
"0.7397708",
"0.7397708",
"0.7397708",
"0.7397708",
"0.73537827",
"0.7334394",
"0.7248432",
"0.7234209",
"0.72144806",
"0.72082555",
"0.7191732",
"0.7191732",
"0.7191732",
"0.71772563",
"0.7170743",
"0.7086154",
"0.7039713",
"0.7023726",
"0.69945645",
"0.69742745",
"0.69604003",
"0.6954678",
"0.6950155",
"0.6907415",
"0.6902073",
"0.6892748",
"0.6892748",
"0.6892596",
"0.6879464",
"0.684413",
"0.6839152",
"0.6835777",
"0.6824057",
"0.68240017",
"0.68195534",
"0.6818977",
"0.6816877",
"0.6794639",
"0.6791003",
"0.6753915",
"0.67476285",
"0.674048",
"0.67293066",
"0.672324",
"0.6705987",
"0.668743",
"0.6682693",
"0.66736716",
"0.6670863",
"0.6657005",
"0.6638703",
"0.6638703",
"0.661534",
"0.6601199",
"0.6587156",
"0.6580197",
"0.6579553",
"0.6569357",
"0.6552754",
"0.65501994",
"0.65501994",
"0.65501994",
"0.6545719",
"0.6531745",
"0.6529553",
"0.65262765",
"0.6522147",
"0.6520789",
"0.65161693"
] | 0.0 | -1 |
Set the Localization of the Content. | public function setLocal($lang)
{
Session::put('applocale', $lang);
return redirect()->back();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function set_locale()\n {\n\n $plugin_i18n = new myFOSSIL_Resources_i18n();\n $plugin_i18n->set_domain( $this->get_plugin_name() );\n\n $this->loader->add_action( 'plugins_loaded', $plugin_i18n,\n 'load_plugin_textdomain' );\n\n }",
"public function settingLanguage() {}",
"private function set_locale() {\n\n\t\t$plugin_i18n = new I18n();\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\n\t}",
"private function set_locale() {\n\n\t\t$plugin_i18n = new APS_I18n();\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\n\t}",
"private function set_locale() {\n\n\t\t$plugin_i18n = new Soisy_Pagamento_Rateale_i18n();\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\t}",
"private function set_locale() {\n\n\t\t$plugin_i18n = new Service_Tracker_i18n();\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\n\t}",
"protected function loadLocalization() {}",
"private function set_locale() {\n\n if (function_exists('determine_locale')) {\n $locale = determine_locale();\n } else {\n // @todo Remove when start supporting WP 5.0 or later.\n $locale = is_admin() ? get_user_locale() : get_locale();\n }\n $locale = apply_filters('plugin_locale', $locale, 'careerfy-frame');\n \n unload_textdomain('careerfy-frame');\n load_textdomain('careerfy-frame', WP_LANG_DIR . '/plugins/careerfy-frame-' . $locale . '.mo');\n load_plugin_textdomain('careerfy-frame', false, dirname(dirname(plugin_basename(__FILE__))) . '/languages');\n }",
"protected function setLanguage() {\r\n\t\t$this->language = $GLOBALS['TSFE']->config['config']['language'];\r\n\t}",
"public function localization() {\n\t\t\tload_plugin_textdomain( 'bitlive-custom-codes', false, __DIR__ . '/languages/' );\n\t\t}",
"private function setLocale()\n {\n $plugin_i18n = new I18n();\n $plugin_i18n->setDomain(Plugin_Name::PLUGIN_ID);\n\n add_action('plugins_loaded', [$plugin_i18n, 'loadPluginTextdomain']);\n }",
"private function SetCulture()\n {\n \tif($_SESSION['LANGUAGE'] == \"fr\" )\n \t{\n \t\t$this->lang_name_field = \"subscription_name_fr\";\n\t\t\t$this->lang_desc_field = \"subscription_desc_fr\";\n \t}\n \telse\n \t{\n \t\t$this->lang_name_field = \"subscription_name_en\";\n\t\t\t$this->lang_desc_field = \"subscription_desc_en\";\n \t}\n }",
"private function set_locale()\n {\n $plugin_i18n = new MailChimp_WooCommerce_i18n();\n $this->loader->add_action('init', $plugin_i18n, 'load_plugin_textdomain');\n }",
"protected static function setLanguageKeys() {}",
"public function setTranslation($key, $value, $language);",
"protected function setLang() {\n \n /*\n //setlocale (LC_ALL,\"russian\");\n //setlocale (LC_ALL,\"\");\n $locale = 'ru_RU';\n putenv('LANG='.$locale);\n setlocale(LC_ALL,\"\");\n setlocale(LC_MESSAGES,$locale);\n setlocale(LC_CTYPE,$locale);\n \n //putenv(\"LANG=ru_RU\");\n \n bindtextdomain (\"messages\", XPATH_TEMPLATE_FRONT . DS . 'locale');\n textdomain (\"messages\");\n bind_textdomain_codeset(\"messages\", \"UTF-8\");*/\n \n //setlocale(LC_MESSAGES, $this->_lang . '_' . strtoupper($this->_lang) . '.UTF-8');\n \n putenv(\"LC_MESSAGES=\".$this->_lang . '_' . strtoupper($this->_lang) . '.UTF-8');\n \n bindtextdomain('messages', XPATH_TEMPLATE_FRONT . DS . 'locale' . DS);\n bind_textdomain_codeset('messages', 'UTF-8');\n textdomain('messages');\n }",
"private function setLanguage()\n\t{\n\t\tif (isset($_GET['language']))\n\t\t\t$id_lang = (int)($_GET['language'])>0 ? $_GET['language'] : 0;\n\t\tif (!isset($id_lang))\n\t\t\t$id_lang = ($this->getIdByHAL());\n\t\t$this->lang = $this->xml_file->lang[(int)($id_lang)];\n\t}",
"public function initLocalization() {\n $moFiles = scandir(trailingslashit($this->dir) . 'languages/');\n foreach ($moFiles as $moFile) {\n if (strlen($moFile) > 3 && substr($moFile, -3) == '.mo' && strpos($moFile, get_locale()) > -1) {\n load_textdomain('WP_Visual_Chat', trailingslashit($this->dir) . 'languages/' . $moFile);\n }\n }\n }",
"private function load_localization() {\n $plugin_i18n = new PLUGINNAME_i18n($this->getter()->get_translation_slug);\n add_action('plugins_loaded', array($plugin_i18n, 'load_plugin_textdomain'));\n }",
"public function setText(?AccessPackageLocalizedContent $value): void {\n $this->getBackingStore()->set('text', $value);\n }",
"function setLocale($localename)\r\n\t{\r\n\t\t$this->pathLocale = $localename;\r\n\t\t$f = $this->_getFileName();\r\n\t\t/* load language configuration */\r\n\t\tif (file_exists($f))\r\n\t\t{\r\n\t\t\tglobal $tmp;\r\n\t\t\tinclude($f);\r\n\t\t\tif ($this->varMode == 'names')\r\n\t\t\t{\r\n#\t\t\t\t$this->lang = array_merge($this->lang, ${$this->varName});\r\n\t\t\t\t$this->lang = ${$this->varName};\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function set_translations($domain, $path = '')\n {\n }",
"public function localization_setup() {\n load_plugin_textdomain( 'wc-mailerlite', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n }",
"public function localization_setup() {\n load_plugin_textdomain( 'baseplugin', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n }",
"private function setLanguage() {\n//\t\tYii::app()->language = @Yii::app()->user->getState('lang');\n\t}",
"public function loadTranslations()\n {\n $oTranslation = new Translation($this->sLang, $this->sBundleName);\n $this->aView[\"lang\"] = $this->sLang;\n $this->aView[\"tr\"] = $oTranslation->getTranslations();\n }",
"function setAllTranslationStrings($list) {\n\t\t$this->translationStrings = $list;\n\t}",
"public function settingLocale() {}",
"public function setLocale()\n\t{\n\t\tif ($locale = $this->app->session->get('admin_locale'))\n\t\t{\n\t\t\t$this->app->setLocale($locale);\n\t\t} else {\n \\Session::put('admin_locale', \\Config::get('app.locale'));\n }\n\t}",
"abstract function setContent();",
"public function setContentLocale($locale) {\n $this->request->getSession()->set(self::SESSION_LOCALE_CONTENT, $locale);\n }",
"public function setLocalizations($val)\n {\n $this->_propDict[\"localizations\"] = $val;\n return $this;\n }",
"public function setLanguage(?LocaleInfo $value): void {\n $this->getBackingStore()->set('language', $value);\n }",
"public function setContent($subst)\n\t{\n\t\t$this->vars['content'] = $subst;\n\t}",
"function setHeadLanguage($var)\n\t{\n\t\t$this -> head_language = $var;\n\t}",
"protected function setContent() {}",
"public function load_translation() {\n\t\t\t$locale = apply_filters( 'plugin_locale', determine_locale(), 'sv_core' );\n\t\t\tload_textdomain( 'sv_core', dirname( __FILE__ ) . '/languages/sv_core-'.$locale.'.mo' );\n\t\t}",
"function setTitleTranslated($titleLocalized) {\n\t\t$this->_titleLocalized = $titleLocalized;\n\t}",
"function setLocale($key) {\n\t\t\t$this->locale = $key;\n\t\t}",
"protected function setLocalizeSubview(ModelMeta $meta, $data, $action = null) {\n if (!$this->isLocalized || !$data || !$data->id) {\n return;\n }\n\n $localizedFields = array();\n\n $fields = $meta->getFields();\n foreach ($fields as $fieldName => $field) {\n if (!$field->isLocalized()) {\n continue;\n }\n\n $localizedFields[$fieldName] = $fieldName;\n }\n\n $this->set('localizedFields', $localizedFields);\n\n $form = $this->get('form');\n\n $this->addJavascript(self::SCRIPT_LOCALIZE);\n $this->addInlineJavascript(\"ZiboOrmInitializeLocalizedForm('\" . $form->getId() . \"');\");\n\n $localizeView = new LocalizeView($meta, $data, $action);\n\n $this->setSubView('localize', $localizeView);\n }",
"private function changeLangFileContent() \n {\n $this->read();\n $this->arrayLang[$this->key] = $this->value;\n $this->save();\n }",
"function set_language($locale) {\n\t\t\t$this->i18n_locale = $locale;\n\t\t}",
"function localization() {\n load_plugin_textdomain( 'cynetique-labels', false, dirname( plugin_basename( __FILE__ ) ) . '/language/' );\n}",
"private function set_CI_language()\n\t{\n\t\t$this->CI->config->set_item('language', $this->get_language());\n\t}",
"public function setMultilangContent($fieldName, $isoCode, $content)\n {\n global $langs;\n\n //====================================================================//\n // Create This Translation if empty\n if (!isset($this->object->multilangs[$isoCode])) {\n $this->object->multilangs[$isoCode] = array();\n }\n //====================================================================//\n // Update Contents\n //====================================================================//\n if ($this->object->multilangs[$isoCode][$fieldName] != $content) {\n $this->object->multilangs[$isoCode][$fieldName] = $content;\n $this->needUpdate();\n }\n //====================================================================//\n // Duplicate Contents to Default language if needed\n if (($isoCode == $langs->getDefaultLang()) && property_exists(get_class($this->object), $fieldName)) {\n $this->object->{$fieldName} = $content;\n }\n }",
"private function translations()\n {\n $this['translator'] = $this->share($this->extend('translator', function ($translator) {\n $translator->addLoader('yaml', new TranslationFileLoader());\n\n $translator->addResource('yaml', 'config/locales/pt-br.yml', 'pt-br');\n $translator->addResource('yaml', 'config/locales/en-us.yml', 'en-us');\n $translator->addResource('yaml', 'config/locales/es-es.yml', 'es-es');\n\n return $translator;\n }));\n }",
"public function setLanguage($value)\n {\n $value = strtolower($value);\n if (!isset($this->_models[$value])) {\n $this->_models[$value] = $this->loadTranslation($value);\n }\n $this->_language = $value;\n }",
"private function setLocale() {\n if ($this->_language == 'french')\n setlocale (LC_ALL, 'fr_FR.iso88591', 'fr_FR@euro', 'fr_FR', 'french', 'fra');\n else if ($this->_language == 'english')\n setlocale (LC_ALL, 'en_GB.iso88591', 'en_GB', 'english', 'eng');\n }",
"public function set($domain, $locale, $path)\n {\n }",
"protected function _setLanguage() {\n\t// Get the default user language\n\t$userLanguage = Configure::read('User.defaultLanguage');\n\n\t// Use cookie, session, or params\n\tif ($this->Cookie->read('User.language')) {\n\t $userLanguage = $this->Cookie->read('User.language');\n\t}\n\tif ($this->Session->check('User.language')) {\n\t $userLanguage = $this->Session->read('User.language');\n\t}\n\tif (isset($this->params['language'])) {\n\t $userLanguage = $this->params['language'];\n\t}\n\n\t// Update the session\n\t$this->Session->write('User.language', $userLanguage);\n\t// Update the cookie if changed\n\tif ($this->Cookie->read('User.language') != $userLanguage) {\n\t $this->Cookie->write('User.language', $userLanguage, false, '20 days');\n\t}\n\n\t// Update the global used by CakePHP - don't use a different name!!!\n\tConfigure::write('Config.language', $userLanguage);\n }",
"public function testUpdateTranslationWithLocaleInEntity(): void\n {\n $table = $this->getTableLocator()->get('Articles');\n $table->addBehavior('Translate', ['fields' => ['title', 'body']]);\n $article = $table->find()->first();\n $this->assertSame(1, $article->get('id'));\n $article->set('_locale', 'fra');\n $article->set('title', 'Le titre');\n $table->save($article);\n $this->assertNull($article->get('_i18n'));\n\n $article = $table->find()->first();\n $this->assertSame(1, $article->get('id'));\n $this->assertSame('First Article', $article->get('title'));\n $this->assertSame('First Article Body', $article->get('body'));\n\n $table->setLocale('fra');\n $article = $table->find()->first();\n $this->assertSame(1, $article->get('id'));\n $this->assertSame('Le titre', $article->get('title'));\n $this->assertSame('First Article Body', $article->get('body'));\n }",
"private function _initInternationalization()\n {\n $ER = error_reporting(~ E_NOTICE & ~ E_STRICT);\n if(function_exists('date_default_timezone_set')){\n $timezone = App::config()->project->timezone;\n // Set default timezone, due to increased validation of date settings\n // which cause massive amounts of E_NOTICEs to be generated in PHP 5.2+\n date_default_timezone_set(empty($timezone) ? date_default_timezone_get() : $timezone);\n }\n error_reporting($ER);\n $i18n = new App_I18n();\n $languages = $i18n->getSiteLanguages();\n $default_request_lang = 'en';\n $default_site_locale = 'en_US';\n foreach($languages as $lang){\n if($lang['is_active'] and $lang['is_default'] > 0){\n $default_request_lang = $lang['request_lang'];\n $default_site_locale = $lang['locale'];\n break;\n }\n }\n Zend_Locale::setDefault($default_request_lang);\n $i18n->setLocale(new Zend_Locale($default_request_lang));\n App::setI18N($i18n);\n $this->_language_identificator = $default_request_lang;\n }",
"public function copyContentToLanguageFromNonDefaultLanguage() {}",
"public function copyContentToLanguageFromNonDefaultLanguage() {}",
"public function setup_i18n() {\n\t\tload_plugin_textdomain( 'woocommerce-bundle-rate-shipping', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );\n\t}",
"public function save()\n {\n $this->user->setCulture($this->getValue('language'));\n }",
"public function setLocale($val)\n {\n $this->locale = $val;\n }",
"function inspiry_load_translation_from_child() {\n\t\tload_child_theme_textdomain( 'framework', get_stylesheet_directory() . '/languages' );\n\t}",
"public function setLocale(MvcEvent $e) {\n $translator = $e->getApplication()->getServiceManager()->get('translator');\n $translator->setLocale('ru_RU');\n \n }",
"public function load_textdomain()\n {\n }",
"public function lang() {\n\t\t\tload_plugin_textdomain( 'cherry-site-shortcodes', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );\n\t\t}",
"protected function registerTranslations()\n {\n $this->loadTranslationsFrom($this->packagePath('resources/lang'), 'support');\n }",
"public function set_translations($handle, $domain = 'default', $path = '')\n {\n }",
"public function setContent()\n {\n }",
"public function setLanguage($l)\n {\n $this->setOption('language',$l);\n }",
"public function setLocale()\n {\n $lang = Request::segment(2);\n\n try {\n $this->language->set($lang);\n return Redirect::back();\n } catch (Exception $e) {\n //show error\n }\n }",
"private function _loadLang()\n {\n $_langJs = sprintf(\"CakepressEditor./vendor/summernote/lang/summernote-%s.js\", $this->config('lang'));\n if (!in_array($_langJs, (array)$this->_scripts)) {\n $this->_scripts[] = $_langJs;\n }\n }",
"public function setLanguage($strLanguage) {\n\t\t\t$this->strLanguage = $strLanguage;\n\t\t\t$this->loadReplacements();\n\t\t}",
"public function set($id, string $translation, string $domain = 'messages');",
"function setLocale($args) {\n\t\t$setLocale = isset($args[0]) ? $args[0] : null;\n\t\t\n\t\t$site = &Request::getSite();\n\t\t$journal = &Request::getJournal();\n\t\tif ($journal != null) {\n\t\t\t$journalSupportedLocales = $journal->getSetting('supportedLocales');\n\t\t\tif (!is_array($journalSupportedLocales)) {\n\t\t\t\t$journalSupportedLocales = array();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (Locale::isLocaleValid($setLocale) && (!isset($journalSupportedLocales) || in_array($setLocale, $journalSupportedLocales)) && in_array($setLocale, $site->getSupportedLocales())) {\n\t\t\t$session = &Request::getSession();\n\t\t\t$session->setSessionVar('currentLocale', $setLocale);\n\t\t}\n\t\t\n\t\tif(isset($_SERVER['HTTP_REFERER'])) {\n\t\t\tRequest::redirect($_SERVER['HTTP_REFERER']);\n\t\t}\n\t\t\n\t\t$source = Request::getUserVar('source');\n\t\tif (isset($source) && !empty($source)) {\n\t\t\tRequest::redirect(Request::getProtocol() . '://' . Request::getServerHost() . $source, false);\n\t\t}\n\t\t\n\t\tRequest::redirect('index');\t\t\n\t}",
"public function set(string $id, string $translation, string $domain = 'messages'): void;",
"function farmhouse_localization_setup() {\n\n load_child_theme_textdomain( 'farmhouse-theme', CHILD_DIR . '/languages' );\n\n}",
"public function setCulture($value)\n\t{\n\t\t$this->setViewState('Culture', $value, '');\n\t}",
"public function setCulture($value)\n\t{\n\t\t$this->setViewState('Culture', $value, '');\n\t}",
"function wp_set_script_translations($handle, $domain = 'default', $path = '')\n {\n }",
"public function setContent(string $content = null) : CNabuDataObject\n {\n $this->setValue('nb_catalog_item_lang_content', $content);\n \n return $this;\n }",
"function setLocale($locale);",
"function init() {\n\t\t\tload_plugin_textdomain( $this->text_domain, false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );\n\t\t}",
"protected function registerTranslations()\n {\n $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'kustomer');\n }",
"private function _setLangSelection(MvcEvent $e) {\n $sm = $e->getApplication()->getServiceManager();\n $authService = ServicesUtil::getAuthService($sm);\n if(CheckAuthentication::isAuthorized($authService, \"\")) {\n $userUtil = \\JumpUpUser\\Util\\ServicesUtil::getUserUtil($sm);\n $loggedInUser = $userUtil->getCurrentUser();\n $localStr = $loggedInUser->getLocale();\n if(null !== $localStr) { // perform selection of local file\n $translator = ServicesUtil::getTranslatorService($sm);\n $translator->setLocale($localStr);\n }\n }\n }",
"public function setLocalizedUrls($urls);",
"public function translateConfig(){\r\n\t\t$document = JFactory::getDocument();\r\n\r\n\t\t$viewType\t= $document->getType();\r\n\t\t$viewName\t= JRequest::getCmd( 'view', $this->getName() );\r\n\t\t$viewLayout\t= JRequest::getCmd( 'layout', 'translateconfig' );\r\n\t\t$lang_id = JRequest::getVar( 'lang_id', null, 'request', 'int' );\r\n\t\t\r\n\t\t$this->view = $this->getView(\"languages\");\r\n\r\n\t\t// Set the layout\r\n\t\t$this->view->setLayout($viewLayout);\r\n\r\n\t\t// load the current config parameters from the language\r\n\t\t/*\r\n\t\t$model = $this->getModel('languages');\r\n\t\t$this->view->setModel($model, true);\r\n\t\t$this->view->language = $model->getTable('JFLanguage');\t\t\r\n\t\t$this->view->language->load($lang_id);\r\n\r\n\t\tif (isset($this->view->language) && isset($this->view->language->params) ){\r\n\t\t\t$this->view->translations = new JRegistry( $this->view->language->params);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$this->view->translations = new JRegistry();\r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n\t\t$this->view->translations = new JRegistry();\r\n\t\t$current = JRequest::getVar('current', '', 'request', 'string');\r\n\t\tif($current != null) {\r\n\t\t\t$this->view->translations = new JRegistry($current);\r\n\t\t}\r\n\t\t\r\n\r\n\t\t// Default Text handled 'manually'\r\n\t\t$config = JComponentHelper::getParams( 'com_joomfish' );\r\n\t\t$this->view->defaulttext = $config->getValue(\"defaultText\");\t\t\r\n\t\t$this->view->trans_defaulttext = $this->view->translations->get(\"defaulttext\",\"\");\r\n\t\t\r\n\t\t// Set the config detials for translation in the view\r\n\t\t$elementfolder =JPath::clean( JPATH_ADMINISTRATOR . '/components/com_joomfish/contentelements' );\r\n\t\tinclude($elementfolder.DS.\"language.config.php\");\r\n\t\t$this->view->jf_siteconfig=$jf_siteconfig;\r\n\r\n\t\t// Need to load com_config language strings!\r\n\t\t$lang = JFactory::getLanguage();\r\n\t\t$lang->load( 'com_config' );\r\n\r\n\t\t$jconf = new JConfig();\r\n\t\t$this->view->jconf = $jconf;\r\n\t\t\r\n\t\t$this->view->translateConfig();\r\n\t\t\r\n\t}",
"private function set_lang()\n\t{\n\t\t//print_r($this->CI->uri->rsegment_array());\n\t\t//echo $this->CI->uri->ruri_string();\n\t\t\n\t\t// Set from default config\n\t\t$this->lang = $this->lang_default;\n\t\t\t\t\n\t\t// Set from browser\n\t\tif ($this->detect_browser)\n\t\t{\n\t\t\t$this->lang = $this->detect_browser_lang();\n\t\t}\n\n\t\t// Set from session\n\t\t$this->set_session();\n\t\t\n\t\t// Set from URI\n\t\t$first_segment = $this->CI->uri->segment(1);\n\t\tif (in_array($first_segment, $this->langs))\n\t\t{\n\t\t\t$this->lang = $first_segment;\n\t\t\t$this->set_session($first_segment);\n\t\t}\n\t}",
"public function load_textdomain()\n {\n\n if (null !== $this->get_path()) {\n load_textdomain($this->textdomain, $this->get_path());\n }\n load_plugin_textdomain($this->textdomain, false, Kirki::$path . '/languages');\n\n }",
"public function setLanguage($i) {\n\t\t$this->current_language = $i;\n\t}",
"public function setYiiLang(){\r\n $get_lang = Yii::app()->getRequest()->getParam(Yii::app()->urlManager->languageParam);//check if we have lang in url\r\n if (!in_array($get_lang,array_keys(Yii::app()->params['translatedLanguages'])) &&\r\n isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\r\n $langList = Util::sortByPriority($_SERVER['HTTP_ACCEPT_LANGUAGE']);\r\n foreach ($langList as $lang => $quality) {\r\n foreach (Defaults::$supportedLanguages as $supported) {\r\n if (strcasecmp($supported, $lang) == 0) {\r\n Yii::app()->language = $supported;\r\n break 2;\r\n }\r\n }\r\n }\r\n }\r\n }",
"public function setTranslated($flag)\n {\n $this->translated = $flag;\n }",
"public function initializeLanguages() {}",
"public function SetView (\\MvcCore\\IView $view) {\n\t\tparent::SetView($view);\n\t\treturn $this->SetLangAndLocale(\n\t\t\t$this->lang ?: $this->request->GetLang(), \n\t\t\t$this->locale ?: $this->request->GetLocale()\n\t\t);\n\t}",
"protected function registerTranslations()\n {\n $this->loadTranslationsFrom($this->packagePath('resources/lang'), 'password');\n }",
"private function setupTranslatable()\n {\n $this->app['config']->set('translatable.use_fallback', true);\n $this->app['config']->set('translatable.fallback_locale', setting('default_locale'));\n $this->app['config']->set('translatable.locales', supported_locale_keys());\n\n // Re-register translatable locales helper after overriding config.\n $this->app->singleton('translatable.locales', Locales::class);\n $this->app->singleton(Locales::class);\n }",
"public function Lang() {\n $this->langFolder = FILES['LOCALE'].(file_exists(FILES['LOCALE'].((locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']) !== null) ? \n locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']) : \"en_US\").\"/global.lang\") ? locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']) : \"en_US\").\"/\";\n return $this;\n }",
"protected function enableTranslation() {\n // Enable translation for the current entity type and ensure the change is\n // picked up.\n \\Drupal::service('content_translation.manager')->setEnabled($this->entityTypeId, $this->bundle, TRUE);\n }",
"public function i18n() {\n load_plugin_textdomain( 'elementor-lightx-widgets' );\n }",
"public function init()\r\n {\r\n \theader('content-type: text/html; charset=utf8');\r\n \tdefined('BASE_URL')\t|| define('BASE_URL', Zend_Controller_Front::getInstance()->getBaseUrl());\r\n \t$this->tr = Application_Form_FrmLanguages::getCurrentlanguage();\r\n \t$this->type = 1;\r\n\t}",
"function setup_translation_panel_before() {\n\n\t\t// Get current multilingual language\n\t\t$multilingual = bf_get_current_lang();\n\n\t\t// All languages page\n\t\tif ( $multilingual == 'all' ) {\n\n\t\t\t// Add current language to all languages\n\t\t\tforeach ( bf_get_all_languages() as $lang ) {\n\n\t\t\t\tif ( $lang['id'] == 'en' || $lang == 'all' ) {\n\t\t\t\t\t$_lang = '';\n\t\t\t\t} else {\n\t\t\t\t\t$_lang = '_' . $lang['id'];\n\t\t\t\t}\n\n\t\t\t\tif ( false == get_option( $this->option_panel_id . $_lang . '-current' ) ) {\n\t\t\t\t\t$this->set_current_lang( 'en_US', $lang['id'] );\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn;\n\t\t} elseif ( $multilingual == 'en' || $multilingual == 'none' || $multilingual == false ) {\n\n\t\t\tif ( false == get_option( $this->option_panel_id . '-current' ) ) {\n\t\t\t\t$this->set_current_lang( 'en_US' );\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t$_multilingual = '_' . $multilingual;\n\n\t\t$opt_current = get_option( $this->option_panel_id . $_multilingual . '-current' );\n\n\t\t// if data is saved before\n\t\tif ( $opt_current !== false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Get language all information and locale\n\t\t$language = bf_get_language_data( $multilingual );\n\n\t\t$languages = $this->get_languages();\n\n\t\t// Use pre-translation if available\n\t\tif ( isset( $languages[ $language['locale'] ] ) ) {\n\n\t\t\t$translation_options_data = self::get_language_translation( $language['locale'] );\n\n\t\t\tif ( $translation_options_data['status'] === 'error' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Filter translation data\n\t\t\t *\n\t\t\t * @since 1.0.0\n\t\t\t */\n\t\t\t$data = apply_filters( 'publisher-theme-core/translation/change-translation/data', $translation_options_data['translation'] );\n\n\n\t\t\t// Validate translation file data\n\t\t\tif ( ! isset( $data['panel-id'] ) || empty( $data['panel-id'] ) || ! isset( $data['panel-data'] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\n\t\t\t// Validate translation panel id\n\t\t\tif ( $data['panel-id'] != publisher_translation()->option_panel_id ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\n\t\t\t// Save translation and update current lang\n\t\t\tupdate_option( publisher_translation()->option_panel_id . $_multilingual, $data['panel-data'], ! empty( $_multilingual ) ? 'no' : 'yes' );\n\t\t\tpublisher_translation()->set_current_lang( $language['locale'], $multilingual );\n\n\t\t} else {\n\t\t\t$this->set_current_lang( 'en_US', $multilingual );\n\t\t}\n\n\t}",
"function action_on_translation_set( $translation_set ) {\n\t}",
"public function setContentLanguageHeader(string $header)\n {\n if (Validation::isValidContentLanguage($header)) {\n $this->contentLanguageHeader = $header;\n } else {\n throw new CustomException('Invalid language');\n }\n }",
"public function setLocalizedUrl($url, $default);",
"private function registerTranslations()\n {\n $langPath = $this->getBasePath() . '/resources/lang';\n\n $this->loadTranslationsFrom($langPath, $this->package);\n $this->publishes([\n $langPath => base_path(\"resources/lang/arcanedev/{$this->package}\"),\n ], 'translations');\n }",
"function set_language_path ($path, $override=false)\n {\n static $_path = null;\n\n if ($override)\n {\n parent::set_language_path($path);\n }\n else\n {\n if ($_path === null)\n {\n $_path = self::getPluginPath().'/lib/vendor/geshi/geshi/';\n }\n\n $this->language_path = $_path;\n $this->set_language($this->language);\n }\n }"
] | [
"0.7048407",
"0.67991567",
"0.679656",
"0.665422",
"0.6651303",
"0.66423947",
"0.6556826",
"0.6412163",
"0.63545835",
"0.6337506",
"0.633181",
"0.6294659",
"0.6200269",
"0.6156301",
"0.6111117",
"0.61104214",
"0.610225",
"0.60851747",
"0.6078956",
"0.6067386",
"0.6006405",
"0.5984098",
"0.5979555",
"0.59484404",
"0.5887493",
"0.5880845",
"0.5846497",
"0.5808492",
"0.5797927",
"0.5784919",
"0.57617134",
"0.57413036",
"0.57344216",
"0.5734296",
"0.5728859",
"0.5713364",
"0.5703204",
"0.56937206",
"0.5682168",
"0.56715107",
"0.5658799",
"0.5655133",
"0.5653359",
"0.5649152",
"0.5630283",
"0.56055176",
"0.5602976",
"0.5572468",
"0.5550329",
"0.55402607",
"0.55072695",
"0.548794",
"0.54829186",
"0.5481995",
"0.548038",
"0.54803276",
"0.54567105",
"0.5433522",
"0.5430834",
"0.54160297",
"0.54027325",
"0.5389585",
"0.53878856",
"0.53844696",
"0.538373",
"0.5382543",
"0.53791225",
"0.5378172",
"0.53716815",
"0.5367071",
"0.5366735",
"0.5359792",
"0.5349171",
"0.5349171",
"0.53398794",
"0.5330065",
"0.53300047",
"0.53258026",
"0.5322427",
"0.53110534",
"0.5304376",
"0.52939713",
"0.52919257",
"0.5285399",
"0.52784526",
"0.5277383",
"0.5274196",
"0.5269618",
"0.5266949",
"0.52551395",
"0.5249172",
"0.5236919",
"0.52355283",
"0.52209085",
"0.521725",
"0.5208047",
"0.51958543",
"0.5189709",
"0.5187156",
"0.5185529",
"0.5177901"
] | 0.0 | -1 |
Activate Languages From DB. | public function activateLang(Request $request)
{
$ar_lang = $request->get('arActivate');
$en_lang = $request->get('enActivate');
LanguageHelper::activateLangs($ar_lang, $en_lang);
return redirect()->to('/admin-panel');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function loadLanguages()\n\t{\n\t\tself::$_LANGUAGES = array();\n\t\t$result = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'Language`');\n\t\tforeach ($result AS $row)\n\t\t\tself::$_LANGUAGES[(int)$row['LanguageId']] = $row;\n\t}",
"protected function setupLanguages()\n {\n static $done;\n\n if (!empty($done)) {\n return;\n }\n\n $l = new Languages();\n $l->setName('Danish');\n $l->setLocalName('Dansk');\n $l->setLocale('da_DK');\n $l->setIso2('da');\n $l->setDirection('ltr');\n $l->save();\n\n $done = true;\n }",
"public function initializeLanguages() {}",
"protected static function setLanguageKeys() {}",
"public function settingLanguage() {}",
"public function activate()\n {\n $langs = LanguageHelper::getAllLangs();\n return view('commonmodule::Language', ['langs' => $langs]);\n }",
"public function run()\n { if (DB::table('languages')->count()) {\n return;\n }\n\n $languages = $this->availableLanguages->map(function ($lang, $key) {\n $lang['default'] = $key == 'gb';\n $lang['created_at'] = now();\n $lang['updated_at'] = now();\n\n return $lang;\n });\n\n DB::table('languages')->insert($languages->toArray());\n }",
"function install_languages() {\n $db = DB::getInstance();\n if(!$db->query(file_get_contents(CORE_INSTALLER_FILES_PATH.'/db/languages.sql'))->error()) {\n return true;\n }\n else {\n System::addMessage('error', rt('An error occurred during the installation of the languages supported by core'));\n }\n return false;\n}",
"function _load_languages()\r\n\t{\r\n\t\t// Load the form validation language file\r\n\t\t$this->lang->load('form_validation');\r\n\r\n\t\t// Load the DataMapper language file\r\n\t\t$this->lang->load('datamapper');\r\n\t}",
"public function loadLang(){\n\n if($this->id == -1 || empty($this->databasePath))\n return \"\";\n\n $sqlQuery = 'SELECT L.lang_code as lang FROM books_languages_link BLL, languages L WHERE BLL.lang_code = L.id AND BLL.book = '.$this->id;\n\n $pdo = new SPDO($this->databasePath);\n foreach ($pdo->query($sqlQuery) as $row)\n return $row['lang'];\n \n return \"\";\n }",
"private function initLangs()\n {\n $langs = $this->getLangs();\n if (!$langs) {\n return;\n }\n\n // If the lang is set in query parameters...\n if (array_key_exists(self::LANG_KEY, $this->query)) {\n // ... and it is valid -> change the current language.\n // Yes, we are violating semantics of GET request here, but the operation is idempotent.\n if (in_array($this->query[self::LANG_KEY], $langs)) {\n $this->currentLang = $this->query[self::LANG_KEY];\n setcookie(self::LANG_KEY, $this->currentLang);\n }\n\n // Remove the lang from query parameters and redirect to self...\n unset($this->query[self::LANG_KEY]);\n $url = $this->rawPath;\n if ($this->query) {\n $url .= '?' . http_build_query($this->query);\n }\n header(\"Location: $url\");\n exit;\n }\n\n if (array_key_exists(self::LANG_KEY, $_COOKIE) && in_array($_COOKIE[self::LANG_KEY], $langs)) {\n // If the lang is set in cookies ...\n $this->currentLang = $_COOKIE[self::LANG_KEY];\n } elseif (($httpLang = $this->getLangFromHTTP()) !== null) {\n // Try to get the language from Accept-Language HTTP header...\n $this->currentLang = $httpLang;\n } elseif (in_array('en', $langs)) {\n // English is prefered default...\n $this->currentLang = 'en';\n } else {\n // If everything fails, get first lang of the config...\n $this->currentLang = reset($langs);\n }\n }",
"public function run()\n {\n $language=New Language();\n $language->name='español';\n $language->save();\n\n $language=New Language();\n $language->name='ingles';\n $language->save();\n\n $language=New Language();\n $language->name='tailandes';\n $language->save();\n }",
"private function langSetup()\n {\n /**\n * Set default language\n */\n $this->lang = array_keys($this->langsSupported)[0];\n\n /**\n * Force use default lang\n */\n $this->setLang($this->lang);\n return;\n\n $langFromGetParam = Arr::get($_GET, self::GET_PARAM_NAME);\n $langFromCookies = Arr::get($_COOKIE, self::COOKIE_NAME);\n\n /**\n * Choose language based on user's previous choice\n */\n if ($langFromCookies && $this->valid($langFromCookies)) {\n $this->lang = $langFromCookies;\n } else {\n $this->setLang($this->lang);\n }\n\n /**\n * If lang in GET params then save this value to cookies\n */\n if ($langFromGetParam && $this->valid($langFromGetParam)) {\n $this->setLang($langFromGetParam);\n }\n }",
"public function run()\n {\n DB::table('languages')->delete();\n \n\t\t$lan = array(\n\t\t\tarray('name' => 'Alemán'),\n\t\t\tarray('name' => 'Español'),\n\t\t\tarray('name' => 'Francés'),\n\t\t\tarray('name' => 'Italiano'),\n\t\t\tarray('name' => 'Japonés'),\n\t\t\tarray('name' => 'Mandarín'),\n\t\t\tarray('name' => 'Portugués'),\n\t\t);\n\n\t\tDB::table('languages')->insert($lan);\n\n }",
"public function setYiiLang(){\r\n $get_lang = Yii::app()->getRequest()->getParam(Yii::app()->urlManager->languageParam);//check if we have lang in url\r\n if (!in_array($get_lang,array_keys(Yii::app()->params['translatedLanguages'])) &&\r\n isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\r\n $langList = Util::sortByPriority($_SERVER['HTTP_ACCEPT_LANGUAGE']);\r\n foreach ($langList as $lang => $quality) {\r\n foreach (Defaults::$supportedLanguages as $supported) {\r\n if (strcasecmp($supported, $lang) == 0) {\r\n Yii::app()->language = $supported;\r\n break 2;\r\n }\r\n }\r\n }\r\n }\r\n }",
"public function languageAction() {\n\t\n\t\t//START LANGUAGE WORK\n\t\tEngine_Api::_()->getApi('language', 'sitestore')->languageChanges();\n\t\t//END LANGUAGE WORK\n\t\t$redirect = $this->_getParam('redirect', false);\n\t\tif($redirect == 'install') {\n\t\t\t$this->_redirect('install/manage');\n\t\t} elseif($redirect == 'query') {\n\t\t\t$this->_redirect('install/manage/complete');\n\t\t}\n\t}",
"public function storeLanguagesVarsToDB(): void\n {\n foreach ($this->getDirsWithLanguages() as $lang => $dir) {\n $fs = new Filesystem();\n $files = $fs->files($dir);\n foreach ($files as $fileName) {\n $filePath = $dir . \"/\" . $fileName->getRelativePathname();\n $array = (file_exists($filePath)) ? require($filePath) : [];\n $this->saveLanguageValueToDB(basename($fileName->getRelativePathname(), \".php\"), $lang, [], $array);\n }\n }\n }",
"public function _loadLanguage($code)\n\t{\n $table_p_language\t = $this->prefix.'admin_language';\n //se cambia el campo enable a 0 para todos los lenguajes\n $update=$this->app['dbs']['mysql_silex']->executeQuery(\"Update {$table_p_language} set enable=0\");\n //se estable el lenguaje indicado como default\n $update=$this->app['dbs']['mysql_silex']->update($table_p_language, array('enable' =>1), array('code' => $code)); \n\t}",
"public function languages();",
"private function setLanguage() {\n//\t\tYii::app()->language = @Yii::app()->user->getState('lang');\n\t}",
"public function run()\n {\n if (!empty(DB::table('language')->first())) {\n return;\n }\n\n $languagesJsonFile = __DIR__.'/resources/uis_core_languages.json';\n $languagesData = json_decode($this->files->get($languagesJsonFile));\n $insertLanguages = [];\n $lngIndex = 0;\n foreach ($languagesData as $lngData) {\n $code = isset($lngData->code) ? $lngData->code : '';\n $name = isset($lngData->name_native) ? $lngData->name_native : '';\n $enName = isset($lngData->name_en) ? $lngData->name_en : '';\n $isDefault = isset($lngData->is_default) && $lngData->is_default ? BaseModel::TRUE : BaseModel::FALSE;\n\n $insertLanguages[$lngIndex] = [\n 'code' => $code,\n 'name' => $name,\n 'en_name' => $enName,\n 'sort_order' => $lngIndex * 10,\n 'is_default' => $isDefault,\n 'show_status' => BaseModel::STATUS_ACTIVE,\n ];\n $lngIndex++;\n }\n DB::table('language')->insert($insertLanguages);\n }",
"public function language()\n {\n \tif ( is_english() ){\n\t\t $this->session->engels = false;\n\t } else {\n\t\t $this->session->engels = true;\n }\n\t redirect($this->agent->referrer());\n }",
"public function createLanguagesAction() {\n $em = $this->getDoctrine()->getManager();\n $list = array(\"zh\", \"en\", \"es\", \"hi\", \"bn\", \"pt\", \"ru\", \"fr\", \"ur\", \"ja\", \"de\", \"ko\", \"tr\", \"it\", \"ar\");\n\n foreach ($list as $key => $value) {\n $object = new \\Skaphandrus\\AppBundle\\Entity\\SkLanguage();\n $object->setName($value);\n $em->persist($object);\n }\n $em->flush();\n\n $entities = $em->getRepository('SkaphandrusAppBundle:SkLanguage')->findAll();\n\n return $this->render('SkaphandrusAppBundle:SkBusiness:createLanguage.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"private static function loadLanguage()\n\t{\n\t\t// Load translations\n\t\t$basePath = dirname(__FILE__);\n\t\t$jlang = JFactory::getLanguage();\n\t\t$jlang->load('liveupdate', $basePath, 'en-GB', true); // Load English (British)\n\t\t$jlang->load('liveupdate', $basePath, $jlang->getDefault(), true); // Load the site's default language\n\t\t$jlang->load('liveupdate', $basePath, null, true); // Load the currently selected language\n\t}",
"function getUserLanguages() {\n global $dbAccess;\n $this->db = $dbAccess;\n $data = $this->db->SimpleQuery(\"SELECT * FROM \" . TBL_LANGUAGES_USER . \" WHERE status='1' ORDER BY language_name\");\n\n return $data;\n }",
"function lang_switcher(){\n\tif (function_exists('icl_get_languages')) {\n\t\t$langs = icl_get_languages('skip_missing=0');\n\t\tforeach ($langs as $lang) {\n\t\t\tif ($lang['active'] == 0) {\n\t\t\t\t$flag = preg_replace(' ', '', $lang['country_flag_url']);\n\t\t\t\t$display_lang = ($lang['native_name'] == 'עברית') ? \"עבר\" : ucfirst($lang['native_name']);\n\t\t\t $strlang = mb_substr($display_lang,0,3);\n\t\t\t\techo '<a class=\"lang-switcher lang-switch\" href=\"'. $lang['url'] .'\">'.'<span class=\"dropdown-item d-inline-block\"></span><img src=\"'. $lang['country_flag_url'] . '\"></a>';\n\t\t\t}\n\t\t}\n\t}\n}",
"function lang_list( $language_id = 0 ) {\n\t\t$this->session->set_userdata(array(\"language_id\" => $language_id ));\n\t\t\n\t\tredirect( site_url('admin/language_strings/index/') );\n\t}",
"public function run()\n\t{\n\t\tDB::statement(\"INSERT INTO language (language) VALUES ('Nederlands')\");\n\t\tDB::statement(\"INSERT INTO language (language) VALUES ('Engels')\");\n\t\tDB::statement(\"INSERT INTO language (language) VALUES ('Frans')\");\n\t}",
"public function run()\n { \n DB::table('languages')->delete();\n\n \t$languages= array(\n array('name'=>'Afrikaans'),\n array('name'=>'Albanian'),\n array('name'=>'Amharic'),\n array('name'=>'Arabic'),\n array('name'=>'Armenian'),\n array('name'=>'Azerbaijani'),\n array('name'=>'Basque'),\n array('name'=>'Belarusian'),\n array('name'=>'Bengali'),\n array('name'=>'Bosnian'),\n array('name'=>'Bulgarian'),\n array('name'=>'Catalan'),\n array('name'=>'Cebuano'),\n array('name'=>'Chichewa'),\n array('name'=>'Chinese (Simplified)'),\n array('name'=>'Chinese (Traditional)'),\n array('name'=>'Corsican'),\n array('name'=>'Croatian'),\n array('name'=>'Czech'),\n array('name'=>'Danish'),\n array('name'=>'Dutch'),\n array('name'=>'English'),\n array('name'=>'Esperanto'),\n array('name'=>'Estonian'),\n array('name'=>'Filipino'),\n array('name'=>'Finnish'),\n array('name'=>'French'),\n array('name'=>'Frisian'),\n array('name'=>'Galician'),\n array('name'=>'Georgian'),\n array('name'=>'German'),\n array('name'=>'Greek'),\n array('name'=>'Gujarati'),\n array('name'=>'Haitian Creole'),\n array('name'=>'Hausa'),\n array('name'=>'Hawaiian'),\n array('name'=>'Hebrew'),\n array('name'=>'Hindi'),\n array('name'=>'Hmong'),\n array('name'=>'Hungarian'),\n array('name'=>'Icelandic'),\n array('name'=>'Igbo'),\n array('name'=>'Indonesian'),\n array('name'=>'Irish'),\n array('name'=>'Italian'),\n array('name'=>'Japanese'),\n array('name'=>'Javanese'),\n array('name'=>'Kannada'),\n array('name'=>'Kazakh'),\n array('name'=>'Khmer'),\n array('name'=>'Korean'),\n array('name'=>'Kurdish (Kurmanji)'),\n array('name'=>'Kyrgyz'),\n array('name'=>'Lao'),\n array('name'=>'Latin'),\n array('name'=>'Latvian'),\n array('name'=>'Lithuanian'),\n array('name'=>'Luxembourgish'),\n array('name'=>'Macedonian'),\n array('name'=>'Malagasy'),\n array('name'=>'Malay'),\n array('name'=>'Malayalam'),\n array('name'=>'Maltese'),\n array('name'=>'Maori'),\n array('name'=>'Marathi'),\n array('name'=>'Mongolian'),\n array('name'=>'Myanmar (Burmese)'),\n array('name'=>'Nepali'),\n array('name'=>'Norwegian'),\n array('name'=>'Pashto'),\n array('name'=>'Persian'),\n array('name'=>'Polish'),\n array('name'=>'Portuguese'),\n array('name'=>'Punjabi'),\n array('name'=>'Romanian'),\n array('name'=>'Russian'),\n array('name'=>'Samoan'),\n array('name'=>'Scots Gaelic'),\n array('name'=>'Serbian'),\n array('name'=>'Sesotho'),\n array('name'=>'Shona'),\n array('name'=>'Sindhi'),\n array('name'=>'Sinhala'),\n array('name'=>'Slovak'),\n array('name'=>'Slovenian'),\n array('name'=>'Somali'),\n array('name'=>'Spanish'),\n array('name'=>'Sundanese'),\n array('name'=>'Swahili'),\n array('name'=>'Swedish'),\n array('name'=>'Tajik'),\n array('name'=>'Tamil'),\n array('name'=>'Telugu'),\n array('name'=>'Thai'),\n array('name'=>'Turkish'),\n array('name'=>'Ukrainian'),\n array('name'=>'Urdu'),\n array('name'=>'Uzbek'),\n array('name'=>'Vietnamese'),\n array('name'=>'Welsh'),\n array('name'=>'Xhosa'),\n array('name'=>'Yiddish'),\n array('name'=>'Yoruba'),\n array('name'=>'Zulu')\n );\n\n foreach ($languages as $key => $value) {\n $data=$value;\n $data['id']=$key+1;\n DB::table('languages')->insert($data); \n }\n\n\n }",
"function set_hotel_languages($hotel_id,$languages)\n\t{\n\t //Delete Previously Assigned languages To avoid duplicate assignment of languages \n\t\t$this->db->where('sb_hotel_id',$hotel_id);\n\t\t$this->db->delete('sb_hotel_lang_map');\n\t\t//\n\t\t$i=0;\n\t\t$data=array();\n\t\twhile($i<count($languages))\n\t\t{\n\t\t\t$singleArray=array(\n\t\t\t\t\t\t\t'lang_id'=>$languages[$i],\n\t\t\t\t\t\t\t'sb_hotel_id'=>$hotel_id\n\t\t\t\t\t\t);\n\t\t\tarray_push($data,$singleArray);\n\t\t\t$i++;\n\t\t}\n\t\t$this->db->insert_batch('sb_hotel_lang_map',$data);\n\t\treturn true;\n\t}",
"public function run()\n {\n \\DB::table('languages')->delete();\n\n \\DB::table('languages')->insert([\n 0 => [\n 'id' => 1,\n 'code' => 'de',\n 'name' => 'German',\n 'created_at' => '2017-01-03 13:59:38',\n 'updated_at' => '2017-10-24 11:52:43',\n ],\n 1 => [\n 'id' => 2,\n 'code' => 'en',\n 'name' => 'English',\n 'created_at' => '2017-01-03 13:59:38',\n 'updated_at' => '2017-10-24 15:16:25',\n ],\n 2 => [\n 'id' => 3,\n 'code' => 'es',\n 'name' => 'Spanish',\n 'created_at' => '2017-01-03 13:59:38',\n 'updated_at' => '2017-10-24 15:16:25',\n ],\n 3 => [\n 'id' => 4,\n 'code' => 'fr',\n 'name' => 'French',\n 'created_at' => '2017-01-03 13:59:38',\n 'updated_at' => '2017-10-24 11:52:43',\n ],\n 4 => [\n 'id' => 5,\n 'code' => 'it',\n 'name' => 'Italian',\n 'created_at' => '2017-01-03 13:59:38',\n 'updated_at' => '2017-10-24 11:52:43',\n ],\n 5 => [\n 'id' => 6,\n 'code' => 'pt',\n 'name' => 'Portuguese',\n 'created_at' => '2017-01-03 13:59:38',\n 'updated_at' => '2017-10-24 15:16:25',\n ],\n 6 => [\n 'id' => 7,\n 'code' => 'vi',\n 'name' => 'Vietnamese',\n 'created_at' => '2017-01-03 13:59:38',\n 'updated_at' => '2017-10-24 11:52:44',\n ],\n 7 => [\n 'id' => 8,\n 'code' => 'tr',\n 'name' => 'Turkish',\n 'created_at' => '2017-01-03 13:59:38',\n 'updated_at' => '2017-10-24 11:52:44',\n ],\n 8 => [\n 'id' => 9,\n 'code' => 'ru',\n 'name' => 'Russian',\n 'created_at' => '2017-01-03 13:59:38',\n 'updated_at' => '2017-10-24 11:52:44',\n ],\n 9 => [\n 'id' => 10,\n 'code' => 'ar',\n 'name' => 'Arabic',\n 'created_at' => '2017-01-03 13:59:38',\n 'updated_at' => '2017-10-24 11:52:44',\n ],\n 10 => [\n 'id' => 11,\n 'code' => 'hi',\n 'name' => 'Hindi',\n 'created_at' => '2017-01-03 13:59:38',\n 'updated_at' => '2017-10-24 11:52:44',\n ],\n 11 => [\n 'id' => 12,\n 'code' => 'zh-Hans',\n 'name' => 'Chinese (Simplified)',\n 'created_at' => '2017-01-03 13:59:38',\n 'updated_at' => '2017-10-24 15:16:25',\n ],\n 12 => [\n 'id' => 13,\n 'code' => 'zh-Hant',\n 'name' => 'Chinese (Traditional)',\n 'created_at' => '2017-01-03 13:59:38',\n 'updated_at' => '2017-10-24 15:16:25',\n ],\n 13 => [\n 'id' => 14,\n 'code' => 'ja',\n 'name' => 'Japanese',\n 'created_at' => '2017-01-03 13:59:38',\n 'updated_at' => '2017-10-24 11:52:44',\n ],\n 14 => [\n 'id' => 15,\n 'code' => 'ko',\n 'name' => 'Korean',\n 'created_at' => '2017-01-03 13:59:38',\n 'updated_at' => '2017-10-24 11:52:44',\n ],\n ]);\n }",
"public static function saveLanguagesIntegrity($default_lang = CART_LANGUAGE)\n {\n $avail = db_get_field(\"SELECT COUNT(*) FROM ?:languages WHERE status = 'A'\");\n if (!$avail) {\n $default_lang_exists = db_get_field(\"SELECT COUNT(*) FROM ?:languages WHERE lang_code = ?s\", $default_lang);\n if (!$default_lang_exists) {\n $default_lang = db_get_field(\"SELECT lang_code FROM ?:languages WHERE status = 'H' LIMIT 1\");\n if (!$default_lang) {\n $default_lang = db_get_field(\"SELECT lang_code FROM ?:languages LIMIT 1\");\n }\n }\n db_query(\"UPDATE ?:languages SET status = 'A' WHERE lang_code = ?s\", $default_lang);\n }\n\n $settings_checks = array(\n 'frontend' => 'A',\n 'backend' => array('A', 'H')\n );\n\n $default_langs = array(\n 'frontend' => Registry::get('settings.Appearance.frontend_default_language'),\n 'backend' => Registry::get('settings.Appearance.backend_default_language'),\n );\n $settings_changed = false;\n\n foreach ($settings_checks as $zone => $statuses) {\n $available = db_get_field(\"SELECT COUNT(*) FROM ?:languages WHERE lang_code = ?s AND status IN (?a)\", $default_langs[$zone], $statuses);\n if (!$available) {\n $first_avail_code = db_get_field(\"SELECT lang_code FROM ?:languages WHERE status IN (?a) LIMIT 1\", $statuses);\n Settings::instance()->updateValue($zone . '_default_language', $first_avail_code, 'Appearance');\n $default_langs[$zone] = $first_avail_code;\n $settings_changed = true;\n }\n }\n\n $available_codes = db_get_fields(\"SELECT lang_code FROM ?:languages WHERE status = 'A'\");\n\n if (fn_allowed_for('MULTIVENDOR')) {\n db_query(\"UPDATE ?:companies SET lang_code = ?s WHERE lang_code NOT IN (?a)\", $default_langs['backend'], $available_codes);\n }\n\n db_query(\"UPDATE ?:users SET lang_code = ?s WHERE lang_code NOT IN (?a)\", $default_langs['frontend'], $available_codes);\n db_query(\"UPDATE ?:orders SET lang_code = ?s WHERE lang_code NOT IN (?a)\", $default_langs['frontend'], $available_codes);\n\n if ($settings_changed) {\n fn_set_notification('W', __('warning'), __('warning_default_language_disabled', array(\n '[link]' => fn_url('settings.manage?section_id=Appearance')\n )));\n }\n\n /**\n * Executes after removing usages of deleted and disabled languages.\n *\n * @param string $default_lang Two-letter language code\n * @param bool $settings_changed True if language settings were changed\n */\n fn_set_hook('save_languages_integrity_post', $default_lang, $settings_changed);\n\n return true;\n }",
"private function setLanguage()\n\t{\n\t\tif (isset($_GET['language']))\n\t\t\t$id_lang = (int)($_GET['language'])>0 ? $_GET['language'] : 0;\n\t\tif (!isset($id_lang))\n\t\t\t$id_lang = ($this->getIdByHAL());\n\t\t$this->lang = $this->xml_file->lang[(int)($id_lang)];\n\t}",
"public function run()\n {\n \n\n \\DB::table('user_languages')->delete();\n \n \\DB::table('user_languages')->insert(array (\n 0 => \n array (\n 'id' => 23,\n 'user_id' => 19,\n 'language_id' => 58,\n 'language_level' => 'fluent',\n 'created_at' => '2019-06-18 09:47:00',\n 'updated_at' => '2019-06-18 09:47:00',\n ),\n 1 => \n array (\n 'id' => 24,\n 'user_id' => 19,\n 'language_id' => 59,\n 'language_level' => 'native_or_bilingual',\n 'created_at' => '2019-06-18 09:47:13',\n 'updated_at' => '2019-06-18 09:47:13',\n ),\n 2 => \n array (\n 'id' => 25,\n 'user_id' => 18,\n 'language_id' => 55,\n 'language_level' => 'conversational',\n 'created_at' => '2019-06-19 08:05:32',\n 'updated_at' => '2019-06-19 08:05:32',\n ),\n 3 => \n array (\n 'id' => 26,\n 'user_id' => 18,\n 'language_id' => 59,\n 'language_level' => 'conversational',\n 'created_at' => '2019-06-24 10:40:00',\n 'updated_at' => '2019-06-24 10:40:00',\n ),\n 4 => \n array (\n 'id' => 27,\n 'user_id' => 18,\n 'language_id' => 40,\n 'language_level' => 'conversational',\n 'created_at' => '2019-06-27 13:14:30',\n 'updated_at' => '2019-06-27 13:14:30',\n ),\n ));\n \n \n }",
"function displayLanguages()\n\t{\n\t\t$this->checkDisplayMode(\"setup_languages\");\n\n\t\tif (!$this->setup->getClient()->db_installed)\n\t\t{\n\t\t\t// program should never come to this place\n\t\t\t$message = \"No database found! Please install database first.\";\n\t\t\tilUtil::sendFailure($message);\n\t\t}\n\n\t\tinclude_once(\"./setup/classes/class.ilSetupLanguageTableGUI.php\");\n\t\t$tab = new ilSetupLanguageTableGUI($this->setup->getClient());\n\t\t$this->tpl->setVariable(\"SETUP_CONTENT\", $tab->getHTML());\n\n\t\t$this->tpl->setVariable(\"TXT_SETUP_TITLE\",ucfirst(trim($this->lng->txt(\"setup_languages\"))));\n\t\t$this->tpl->setVariable(\"TXT_INFO\", $this->lng->txt(\"info_text_lang\"));\n\n\t\t$installed_langs = $this->lng->getInstalledLanguages();\n\t\t$lang_count = count($installed_langs);\n\t\tif ($lang_count > 0)\n\t\t{\n\t\t\t$this->setup->getClient()->status[\"lang\"][\"status\"] = true;\n\t\t\t$this->setup->getClient()->status[\"lang\"][\"comment\"] = $lang_count.\" \".$this->lng->txt(\"languages_installed\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->setup->getClient()->status[\"lang\"][\"status\"] = false;\n\t\t\t$this->setup->getClient()->status[\"lang\"][\"comment\"] = $this->lng->txt(\"lang_none_installed\");\n\t\t}\n\n\t\t$this->setButtonPrev(\"lang\");\n\n\t\tif ($lang_count > 0)\n\t\t{\n\t\t\t$this->setButtonNext(\"contact\");\n\t\t}\n\n\t\t$this->checkPanelMode();\n\t}",
"public function actionLanguageChanged() {\n\t\t$action = $_GET['action'];\n\t\tYii::app()->session['lang'] = $_GET['lang'];\n\t\tif (!Yii::app()->user->isGuest){\n\t\t\tYii::app()->user->lang = $_GET['lang'];\n\t\t}\n\t\tself::$trans=new Translations($_GET['lang']);\n\t\t\n\t\t$Session_Profiles_Backup = Yii::app()->session[$this->createBackup];\n\t\tif (isset($Session_Profiles_Backup)){\n\t\t\t$model = $Session_Profiles_Backup;\n\t\t} else {\n\t\t\tif ($action == 'register'){\n\t\t\t\t$model=new Profiles('register');\n\t\t\t} else {\n\t\t\t\t$model=new Profiles();\n\t\t\t}\n\t\t}\n\t\t$model->PRF_LANG = $_GET['lang'];\n\n\t\tYii::app()->session[$this->createBackup] = $model;\n\t\tif (isset($_GET['id'])){\n\t\t\t$this->redirect(array($action, 'id'=>$_GET['id']));\n\t\t} else {\n\t\t\t$this->redirect(array($action));\n\t\t}\n\t}",
"public static function Init()\n\t{\n\t\t$sql = 'SELECT\n\t\t\t\t\tid,\n\t\t\t\t\tlang_name,\n\t\t\t\t\tlang_name_en,\n\t\t\t\t\tabbreviation,\n\t\t\t\t\tlc_time_name,\n\t\t\t\t\tlang_dir,\n\t\t\t\t\ticon_image,\n\t\t\t\t\tpriority_order,\n\t\t\t\t\tused_on,\n\t\t\t\t\tis_default,\n\t\t\t\t\tis_active \n\t\t\t\tFROM '.TABLE_LANGUAGES;\n\t\t$result = database_query($sql, DATA_AND_ROWS, ALL_ROWS);\n\t\tfor($i=0; $i < $result[1]; $i++){\n\t\t\t$abbrev = $result[0][$i]['abbreviation'];\n\t\t\tself::$arrLanguageSettings[$abbrev]['lang_name'] = $result[0][$i]['lang_name'];\n\t\t\tself::$arrLanguageSettings[$abbrev]['lang_name_en'] = $result[0][$i]['lang_name_en'];\n\t\t\tself::$arrLanguageSettings[$abbrev]['abbreviation'] = $result[0][$i]['abbreviation'];\n\t\t\tself::$arrLanguageSettings[$abbrev]['lc_time_name'] = $result[0][$i]['lc_time_name'];\n\t\t\tself::$arrLanguageSettings[$abbrev]['lang_dir'] = $result[0][$i]['lang_dir'];\n\t\t\tself::$arrLanguageSettings[$abbrev]['icon_image'] = $result[0][$i]['icon_image'];\n\t\t\tself::$arrLanguageSettings[$abbrev]['icon_image'] = $result[0][$i]['priority_order'];\n\t\t\tself::$arrLanguageSettings[$abbrev]['used_on'] = $result[0][$i]['used_on'];\n\t\t\tself::$arrLanguageSettings[$abbrev]['is_default'] = $result[0][$i]['is_default'];\n\t\t\tself::$arrLanguageSettings[$abbrev]['is_active'] = $result[0][$i]['is_active'];\n\t\t}\n\t}",
"public function changeBanglaLanguage(){\n Session::put('lang',[\n 'lang_name' => 'bangla'\n ]);\n return back();\n }",
"static function set_word_list_languages($user_id, $list_id, $language1, $language2) {\n global $con;\n\n $sql = \"\n\t\tUPDATE `list`, `share`\n\t\tSET `list`.`language1` = '\".$language1.\"', `list`.`language2` = '\".$language2.\"'\n\t\tWHERE `list`.`id` = \".$list_id.\" AND (`list`.`creator` = \".$user_id.\" OR (`list`.`id` = `share`.`list` AND `share`.`user` = \".$user_id.\" AND `share`.`permissions` = 1));\";\n $query = mysqli_query($con, $sql);\n return 1;\n }",
"public static function loadLang() {\n\t\tif (!is_object($GLOBALS['LANG'])) {\n\n\t\t\trequire_once t3lib_extMgm::extPath('lang') . 'lang.php';\n\t\t\t//TODO see pt_tool smarty!\n\t\t\t$GLOBALS['LANG'] = t3lib_div::makeInstance('language');\n\t\t\t$GLOBALS['LANG']->csConvObj = t3lib_div::makeInstance('t3lib_cs');\n\t\t}\n\t\tif (is_object($GLOBALS['TSFE']) && $GLOBALS['TSFE']->config['config']['language']) {\n\t\t\t$LLkey = $GLOBALS['TSFE']->config['config']['language'];\n\t\t\t$GLOBALS['LANG']->init($LLkey);\n\t\t}\n\n\t}",
"public function chooseLanguage($lang) {\n\t\t$this->_lang = $this->_language[$lang];\n\t}",
"public function showLanguages(){\n\n \t\t\n \t\t$q = \"SELECT * FROM languages\";\n\n \t\t$result = $this->connection->query($q);\n\n \t\treturn $result;\n\n \t}",
"function signup_get_available_languages()\n {\n }",
"function loadLanguage() {\r\n\t\tstatic $loaded ;\r\n\t\tif (!$loaded) {\r\n\t\t\t$lang = & JFactory::getLanguage() ;\r\n\t\t\t$tag = $lang->getTag();\r\n\t\t\tif (!$tag)\r\n\t\t\t\t$tag = 'en-GB' ;\t\t\t\r\n\t\t\t$lang->load('com_osmembership', JPATH_ROOT, $tag);\r\n\t\t\t$loaded = true ;\t\r\n\t\t}\t\t\r\n\t}",
"public function run()\n {\n $languages = [\n [1, 'Français', 'Français', 'fr'],\n ];\n\n foreach ($languages as $l) {\n $language_array = [\n 'id' => $l[0],\n 'name' => $l[1],\n 'lang_name' => $l[2],\n 'short' => $l[3],\n ];\n $language = Language::find($language_array['id']);\n if (!$language) {\n Language::create($language_array);\n } else {\n $language->update($language_array);\n }\n }\n }",
"public function init(): void {\n if (!isset($this->language)) {\n $this->language = $this->selectLang();\n $this->getTranslator()->setLang($this->language);\n }\n /*if ($redirect && $this->urlLang !== $this->language) {\n $this->getPresenter()->forward('this', ['lang' => $this->language]);\n }*/\n }",
"public function run(): void\n {\n // Language array\n $languages = [\n [\n 'title' => 'ქართული',\n 'locale' => 'ge',\n 'status' => true,\n 'default' => true\n ],\n [\n 'title' => 'English',\n 'locale' => 'en',\n 'status' => true,\n 'default' => false\n ],\n [\n 'title' => 'Русский',\n 'locale' => 'ru',\n 'status' => true,\n 'default' => false\n ]\n ];\n\n // Insert Languages\n Language::insert($languages);\n }",
"public static function setupMultilingual()\n {\n $db = JFactory::getDbo();\n $query = $db->getQuery(true);\n $languages = self::getLanguages();\n if (count($languages)) {\n //states table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_states\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_states table\n $prefix = $language->sef;\n if (!in_array('state_name_' . $prefix, $fieldArr)) {\n $fieldName = 'state_name_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_states` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n //cities table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_cities\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_cities table\n $prefix = $language->sef;\n if (!in_array('city_' . $prefix, $fieldArr)) {\n $fieldName = 'city_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_cities` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n\n\t\t\t//cities table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_countries\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_countries table\n $prefix = $language->sef;\n if (!in_array('country_name_' . $prefix, $fieldArr)) {\n $fieldName = 'country_name_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_countries` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n //tags table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_tags\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_emails table\n $prefix = $language->sef;\n //$fields = array_keys($db->getTableColumns('#__osrs_emails'));\n if (!in_array('keyword_' . $prefix, $fieldArr)) {\n $fieldName = 'keyword_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_tags` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n\n //emails table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_emails\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_emails table\n $prefix = $language->sef;\n //$fields = array_keys($db->getTableColumns('#__osrs_emails'));\n if (!in_array('email_title_' . $prefix, $fieldArr)) {\n $fieldName = 'email_title_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_emails` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n\n $fieldName = 'email_content_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_emails` ADD `$fieldName` TEXT NULL;\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n //categories table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_categories\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_categories table\n $prefix = $language->sef;\n if (!in_array('category_name_' . $prefix, $fieldArr)) {\n $fieldName = 'category_name_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_categories` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n\n $fieldName = 'category_alias_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_categories` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n\n $fieldName = 'category_description_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_categories` ADD `$fieldName` TEXT NULL;\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n\n //amenities table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_amenities\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_amenities table\n $prefix = $language->sef;\n if (!in_array('amenities_' . $prefix, $fieldArr)) {\n $fieldName = 'amenities_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_amenities` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n //field group table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_fieldgroups\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_amenities table\n $prefix = $language->sef;\n if (!in_array('group_name_' . $prefix, $fieldArr)) {\n $fieldName = 'group_name_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_fieldgroups` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n //extra field table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_extra_fields\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_amenities table\n $prefix = $language->sef;\n if (!in_array('field_label_' . $prefix, $fieldArr)) {\n $fieldName = 'field_label_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_extra_fields` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n\n $fieldName = 'field_description_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_extra_fields` ADD `$fieldName` TEXT NULL;\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n\n //field group table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_extra_field_options\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_amenities table\n $prefix = $language->sef;\n if (!in_array('field_option_' . $prefix, $fieldArr)) {\n $fieldName = 'field_option_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_extra_field_options` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n //osrs_property_field_value table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_property_field_value\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_amenities table\n $prefix = $language->sef;\n if (!in_array('value_' . $prefix, $fieldArr)) {\n $fieldName = 'value_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_property_field_value` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n //types table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_types\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_amenities table\n $prefix = $language->sef;\n if (!in_array('type_name_' . $prefix, $fieldArr)) {\n $fieldName = 'type_name_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_types` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n\n $fieldName = 'type_alias_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_types` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n\n //properties table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_properties\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_properties table\n $prefix = $language->sef;\n if (!in_array('pro_name_' . $prefix, $fieldArr)) {\n $fieldName = 'pro_name_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_properties` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n\n $fieldName = 'pro_alias_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_properties` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n if (!in_array('address_' . $prefix, $fieldArr)) {\n $fieldName = 'address_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_properties` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n\t\t\t\tif (!in_array('price_text_' . $prefix, $fieldArr)) {\n $fieldName = 'price_text_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_properties` ADD `$fieldName` VARCHAR( 255 );\";\n $db->setQuery($sql);\n $db->execute();\n }\n if (!in_array('pro_small_desc_' . $prefix, $fieldArr)) {\n $fieldName = 'pro_small_desc_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_properties` ADD `$fieldName` TEXT NULL;\";\n $db->setQuery($sql);\n $db->execute();\n\n $fieldName = 'pro_full_desc_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_properties` ADD `$fieldName` TEXT NULL;\";\n $db->setQuery($sql);\n $db->execute();\n }\n if (!in_array('metadesc_' . $prefix, $fieldArr)) {\n $fieldName = 'metadesc_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_properties` ADD `$fieldName` VARCHAR (255) DEFAULT '' NOT NULL;\";\n $db->setQuery($sql);\n $db->execute();\n\n $fieldName = 'metakey_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_properties` ADD `$fieldName` VARCHAR (255) DEFAULT '' NOT NULL;\";\n $db->setQuery($sql);\n $db->execute();\n }\n\t\t\t\tif (!in_array('pro_browser_title_' . $prefix, $fieldArr)) {\n $fieldName = 'pro_browser_title_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_properties` ADD `$fieldName` VARCHAR( 255 ) DEFAULT '' NOT NULL;\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n //types table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_agents\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_amenities table\n $prefix = $language->sef;\n if (!in_array('bio_' . $prefix, $fieldArr)) {\n $fieldName = 'bio_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_agents` ADD `$fieldName` TEXT NULL;\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n\n //companies table\n $db->setQuery(\"SHOW COLUMNS FROM #__osrs_companies\");\n $fields = $db->loadObjectList();\n if (count($fields) > 0) {\n $fieldArr = array();\n for ($i = 0; $i < count($fields); $i++) {\n $field = $fields[$i];\n $fieldname = $field->Field;\n $fieldArr[$i] = $fieldname;\n }\n }\n foreach ($languages as $language) {\n #Process for #__osrs_amenities table\n $prefix = $language->sef;\n if (!in_array('company_description_' . $prefix, $fieldArr)) {\n $fieldName = 'company_description_' . $prefix;\n $sql = \"ALTER TABLE `#__osrs_companies` ADD `$fieldName` TEXT NULL;\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n\n }\n }",
"private function _setLangSelection(MvcEvent $e) {\n $sm = $e->getApplication()->getServiceManager();\n $authService = ServicesUtil::getAuthService($sm);\n if(CheckAuthentication::isAuthorized($authService, \"\")) {\n $userUtil = \\JumpUpUser\\Util\\ServicesUtil::getUserUtil($sm);\n $loggedInUser = $userUtil->getCurrentUser();\n $localStr = $loggedInUser->getLocale();\n if(null !== $localStr) { // perform selection of local file\n $translator = ServicesUtil::getTranslatorService($sm);\n $translator->setLocale($localStr);\n }\n }\n }",
"public function selectLanguage(){\n\t\t\t$query = new Query();\n\n\t\t\t$query->tables = array(\"tbllingua\");\n\t\t\t$query->fields = array(\"id\", \"Lingua\", \"Zona\");\n\n\t\t\tif ($query->Open()){\n\t\t\t\twhile ($row = $query->GetNextRecord(true)){\n\t\t\t\t\t$languages[] = $row;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn $languages;\n\t\t}",
"public function run()\n {\n Lang::create([\n 'key'=>'hire_link',\n 'en'=>'Hire Me Now',\n 'bn'=>'আমাকে ভাড়া করুন',\n 'pt'=>'contrate-me',\n 'hi'=>'मुझे चुनिएँ',\n 'ml'=>'എന്നെ നിയമിക്കൂ',\n 'custom'=>'',\n ]);\n\n Lang::create([\n 'key'=>'i_am',\n 'en'=>'I Am',\n 'bn'=>'আমি',\n 'pt'=>'eu sou',\n 'hi'=>'मैं हूँ',\n 'ml'=>'ഞാൻ',\n 'custom'=>'',\n ]);\n Lang::create([\n 'key'=>'about_me',\n 'en'=>'ABOUT ME',\n 'bn'=>'আমার সম্পর্কে',\n 'pt'=>'SOBRE MIM',\n 'hi'=>'मेरे बारे में',\n 'ml'=>'എന്നെ പറ്റി',\n 'custom'=>'',\n ]);\n \n Lang::create([\n 'key'=>'skill',\n 'en'=>'My Skills.',\n 'bn'=>'আমার স্কিল',\n 'pt'=>'minhas habilidades',\n 'hi'=>'मेरे कौशल',\n 'ml'=>'എന്റെ കഴിവുകൾ.',\n 'custom'=>'',\n ]);\n\n Lang::create([\n 'key'=>'experince',\n 'en'=>'My Experience',\n 'bn'=>'আমার অভিজ্ঞতা',\n 'pt'=>'Minha experiência',\n 'hi'=>'मेरा अनुभव',\n 'ml'=>'എന്റെ അനുഭവം',\n 'custom'=>'',\n ]);\n \n Lang::create([\n 'key'=>'service',\n 'en'=>'My Services',\n 'bn'=>'আমার সেবা',\n 'pt'=>'Meu serviço',\n 'hi'=>'मेरी सेवा',\n 'ml'=>'എന്റെ സേവനം',\n 'custom'=>'',\n ]);\n \n Lang::create([\n 'key'=>'work',\n 'en'=>'My Works',\n 'bn'=>'আমার কাজ',\n 'pt'=>'Meus trabalhos',\n 'hi'=>'मेरा काम',\n 'ml'=>'എന്റെ കൃതികൾ',\n 'custom'=>'',\n ]);\n \n Lang::create([\n 'key'=>'contact',\n 'en'=>'Contact Me',\n 'bn'=>'আমার সাথে যোগাযোগ করুন',\n 'pt'=>'Entre em contato comigo',\n 'hi'=>'मुझसे संपर्क करें',\n 'ml'=>'എന്നെ ബന്ധപ്പെടുക',\n 'custom'=>'',\n ]);\n\n Lang::create([\n 'key'=>'subs_email',\n 'en'=>'Get The latest Update by Email',\n 'bn'=>'ইমেল দ্বারা সর্বশেষ আপডেট পান',\n 'pt'=>'Receba as atualizações mais recentes por email',\n 'hi'=>'ईमेल द्वारा नवीनतम अद्यतन प्राप्त करें',\n 'ml'=>'ഇമെയിൽ വഴി ഏറ്റവും പുതിയ അപ്ഡേറ്റുകൾ നേടുക',\n 'custom'=>'',\n ]);\n\n Lang::create([\n 'key'=>'cv',\n 'en'=>'Download CV',\n 'bn'=>'সিভি ডাউনলোড করুন',\n 'pt'=>'Baixar CV',\n 'hi'=>'डाउनलोड सीवी',\n 'ml'=>'സിവി ഡൗൺലോഡുചെയ്യുക',\n 'custom'=>'',\n ]);\n \n Lang::create([\n 'key'=>'phone',\n 'en'=>'Call Me',\n 'bn'=>'আমাদের কল করুন',\n 'pt'=>'Ligue-nos',\n 'hi'=>'हमें फोन करें',\n 'ml'=>'ഞങ്ങളെ വിളിക്കുക',\n 'custom'=>'',\n ]);\n\n Lang::create([\n 'key'=>'email',\n 'en'=>'Email Us At',\n 'bn'=>'আমাদের ইমেল করুন',\n 'pt'=>'Envie-nos um e-mail para',\n 'hi'=>'हमें ईमेल करें',\n 'ml'=>'ഞങ്ങൾക്ക് ഇമെയിൽ ചെയ്യുക',\n 'custom'=>'',\n ]);\n Lang::create([\n 'key'=>'office',\n 'en'=>'Visit Office',\n 'bn'=>'অফিস দেখুন',\n 'pt'=>'Visite o escritório',\n 'hi'=>'कार्यालय पर जाएँ',\n 'ml'=>'ഓഫീസ് സന്ദർശിക്കുക',\n 'custom'=>'',\n ]);\n\n Lang::create([\n 'key'=>'sendmsg',\n 'en'=>'Send Message',\n 'bn'=>'বার্তা পাঠান',\n 'pt'=>'enviar mensagem',\n 'hi'=>'मेसेज भेजें',\n 'ml'=>'സന്ദേശം അയയ്ക്കുക',\n 'custom'=>'',\n ]);\n\n Lang::create([\n 'key'=>'subscibe',\n 'en'=>'Subscibe',\n 'bn'=>'সাবস্ক্রাইব',\n 'pt'=>'se inscrever',\n 'hi'=>'सदस्यता लेने के',\n 'ml'=>'സബ്സ്ക്രൈബുചെയ്യുക',\n 'custom'=>'',\n ]);\n \n\n }",
"protected function _autoLanguage() {\n\t\t$_detectableLanguages = CakeRequest::acceptLanguage();\n\t\tforeach ($_detectableLanguages as $langKey) {\n\t\t\tif (isset($this->_l10nCatalog[$langKey])) {\n\t\t\t\t$this->_setLanguage($langKey);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (strpos($langKey, '-') !== false) {\n\t\t\t\t$langKey = substr($langKey, 0, 2);\n\t\t\t\tif (isset($this->_l10nCatalog[$langKey])) {\n\t\t\t\t\t$this->_setLanguage($langKey);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"function getSiteLanguages() {\n global $dbAccess;\n $this->db = $dbAccess;\n $data = $this->db->SimpleQuery(\"SELECT * FROM \" . TBL_LANGUAGES . \" WHERE status='1' ORDER BY language_name\");\n\n return $data;\n }",
"public function iN_Languages() {\n\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_langs WHERE lang_status = '1'\") or die(mysqli_error($this->db));\n\t\twhile ($row = mysqli_fetch_array($query, MYSQLI_ASSOC)) {\n\t\t\t$data[] = $row;\n\t\t}\n\t\tif (!empty($data)) {\n\t\t\treturn $data;\n\t\t}\n\t}",
"public function SetActivateAllPortalLanguages($bValue = true)\n {\n $_SESSION['activateAllPortalLanguages'] = $bValue;\n }",
"public function handle(): void\n {\n $locale = Language::query()\n ->where('language_code', config('app.locale'))\n ->firstOrNew();\n if (! $locale->exists) {\n $locale->fill([\n 'name' => config('app.locale'),\n 'iso_name' => config('app.locale'),\n 'language_code' => config('app.locale'),\n ]);\n $locale->save();\n }\n\n $fallback = Language::query()\n ->where('language_code', config('app.fallback_locale'))\n ->firstOrNew();\n if (! $fallback->exists) {\n $fallback->fill([\n 'name' => config('app.fallback_locale'),\n 'iso_name' => config('app.fallback_locale'),\n 'language_code' => config('app.fallback_locale'),\n ]);\n $fallback->save();\n }\n\n $path = resource_path() . '/init-files/languages.json';\n if (! file_exists($path)) {\n return;\n }\n\n $json = json_decode(file_get_contents($path), true);\n\n if ($json['model'] === 'Language') {\n $jsonLanguages = $json['data'];\n\n if ($jsonLanguages) {\n foreach ($jsonLanguages as $jsonLanguage) {\n $jsonLanguage['name'] = __($jsonLanguage['name']);\n\n // Save to database.\n $language = Language::query()\n ->where('language_code', $jsonLanguage['language_code'])\n ->firstOrNew();\n\n if (! $language->exists) {\n $language->fill($jsonLanguage);\n $language->save();\n }\n }\n }\n }\n\n $this->info('Languages initiated!');\n }",
"public function activate() \n {\n global $wpdb;\n\n if ( is_multisite() ) {\n\n $blog_ids = $wpdb->get_col( \"SELECT blog_id FROM $wpdb->blogs\" );\n foreach ( $blog_ids as $blog_id ) {\n switch_to_blog( $blog_id );\n $this->create_table();\n restore_current_blog();\n }\n } else {\n $this->create_table();\n }\n\t}",
"public function loadActiveCountries($iLang = null)\n {\n $sViewName = getViewName('oxcountry', $iLang);\n $sSelect = \"SELECT oxid, oxtitle, oxisoalpha2 FROM {$sViewName} WHERE oxactive = '1' ORDER BY oxorder, oxtitle \";\n $this->selectString($sSelect);\n }",
"protected function getLanguages() {}",
"static function activate()\n\t{\n\t\tif ( JUMPLEAD_VERSION != get_site_option( 'jumplead_version' ) ) {\n\t\t\tglobal $wpdb;\n\n\t\t\t$charset_collate = '';\n\n\t\t\tif ( ! empty($wpdb->charset) ) {\n\t\t\t\t$charset_collate = \"DEFAULT CHARACTER SET {$wpdb->charset}\";\n\t\t\t}\n\n\t\t\tif ( ! empty( $wpdb->collate) ) {\n\t\t\t\t$charset_collate .= \" COLLATE {$wpdb->collate}\";\n\t\t\t}\n\n\t\t\t// Mappings\n\t\t\t$sql = 'CREATE TABLE ' . self::$tableFieldMapping . \" (\n\t\t\t\t`id` int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\t`integration_id` varchar(100) NOT NULL,\n\t\t\t\t`form_id` int NOT NULL,\n\t\t\t\t`automation_id` varchar(100),\n\t\t\t\t`name` varchar(255),\n\t\t\t\t`name_last` varchar(255),\n\t\t\t\t`email` varchar(255),\n\t\t\t\t`company` varchar(255)\n\t\t\t) $charset_collate;\";\n\n\t\t\tdbDelta( $sql );\n\n\t\t\tupdate_option( 'jumplead_version', JUMPLEAD_VERSION );\n\t\t}\n\t}",
"public function actionLanguage()\n\t{\n\t\t$model = CoreSettings::findOne(1);\n if ($model === null) {\n $model = new CoreSettings();\n }\n\t\t$model->scenario = CoreSettings::SCENARIO_LANGUAGE;\n\n if (Yii::$app->request->isPost) {\n $model->load(Yii::$app->request->post());\n // $postData = Yii::$app->request->post();\n // $model->load($postData);\n // $model->order = $postData['order'] ? $postData['order'] : 0;\n\n if ($model->save()) {\n Yii::$app->session->setFlash('success', Yii::t('app', 'Language setting success updated.'));\n return $this->redirect(['language']);\n\n } else {\n if (Yii::$app->request->isAjax) {\n return \\yii\\helpers\\Json::encode(\\app\\components\\widgets\\ActiveForm::validate($model));\n }\n }\n }\n\n\t\t$this->subMenu = $this->module->params['language_submenu'];\n\t\t$this->view->title = Yii::t('app', 'Language Settings');\n\t\t$this->view->description = Yii::t('app', 'The layout of your {app-name} platform includes hundreds of apps of text which are stored in a language pack. {app-name} platform comes with an English pack which is the default when you first install the platform. If you want to change any of these apps on your {app-name} platform, you can edit the pack below. If you want to allow users to pick from multiple languages, you can also create additional packs below. If you have multiple language packs, the pack you\\'ve selected as your \"default\" will be the language that displays if a user has not selected any other language. Note: You can not delete the default language. To edit a language\\'s details, click its name.', ['app-name' => Yii::$app->name]);\n\t\t$this->view->keywords = '';\n\t\treturn $this->render('admin_language', [\n\t\t\t'model' => $model,\n\t\t]);\n\t}",
"protected function checkIfLanguagesExist() {}",
"function set_lcl ($langs)\n\t{\n\t\tglobal $xnyo_parent;\n\t\tif (XNYO_DEBUG) $xnyo_parent->debug('Setting new Language Control List for this page to '.$langs);\n\n\t\t// a string? split it into the array\n\t\tif (!is_array($langs))\n\t\t\t$langs = explode(\",\", preg_replace('/\\s/', '', $langs));\n\n\t\t// current language in the list?\n\t\tif (!in_array($langs, $xnyo_parent->language))\n\t\t{\n\t\t\t$xnyo_parent->trigger_error('User ('.$xnyo_parent->user->username.') not allowed to view page, wrong language: currently <i>'.$xnyo_parent->language.'</i>, required <i>'.join(',', $langs).'</i>', NOTICE);\n\t\t\tif (!empty($xnyo_parent->language_redirect_url))\n\t\t\t\theader('Location: '.$xnyo_parent->language_redirect_url);\n\t\t\texit('Not allowed to view this page. Wrong Language');\n\t\t}\n\t}",
"public function run()\n {\n $languages = [\n [\n 'language'=>'English',\n 'short_code'=>'en',\n 'country'=>'United Kingdom',\n ],\n [\n 'language'=>'Dansih',\n 'short_code'=>'da',\n 'country'=>'Denmark',\n ],\n ];\n\n foreach ($languages as $item) {\n $mLanguage = new Language();\n $mLanguage->language = $item['language'];\n $mLanguage->short_code = $item['short_code'];\n $mLanguage->countries = $item['country'];\n $mLanguage->save();\n }\n }",
"public function run()\n {\n\n DB::table('languages')->insert([\n 'languages' => 'French',\n\n ]);\n DB::table('languages')->insert([\n 'languages' => 'German',\n\n ]);\n DB::table('languages')->insert([\n\n 'languages' => 'Luxembourgish',\n ]);\n DB::table('languages')->insert([\n\n 'languages' => 'English',\n ]);\n }",
"public function SetUpLanguages()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $this->_languages = null;\n \n // Basic error checking.\n if ($this->_my_server instanceof c_comdef_server) {\n $langs = $this->_my_server->GetServerLangs();\n \n if (is_array($langs) && count($langs)) {\n foreach ($langs as $key => $value) {\n $this->_languages[$key] = 0;\n }\n }\n }\n }",
"private function getAllLangs()\n\t{\n\t\t$options = array();\n\t\t$sql = \"SELECT * FROM \" . $this->db->prefix . \"site_languages WHERE is_online = 1\";\n\t\t$result = $this->db->query($sql);\n\t\t$available_languages = array();\n\t\twhile($row = $this->db->fetchToRow($result)){\n\t\t\t$available_languages[] = $row[ 'lang' ];\n\t\t\t$options[ $row[ 'lang' ] ][ 'lang' ] = $row[ 'lang' ];\n\t\t\t$options[ $row[ 'lang' ] ][ 'language' ] = ucfirst($row[ 'language' ]);\n\t\t}\n\t\t$this->language_options = $options;\n\n\t\treturn $available_languages;\n\t}",
"function switchLanguage()\n {\n $language_id = $this->input->post('language_id');\n if (intval($language_id)) {\n switch ($language_id) {\n case 2:\n # English\n $config['language'] = 'english';\n $config['active_language'] = 'english';\n break;\n\n case 1:\n # Indonesian\n $config['language'] = 'indonesian';\n $config['active_language'] = 'indonesian';\n break;\n\n default:\n # default\n $config['language'] = 'indonesian';\n $config['active_language'] = 'indonesian';\n break;\n }\n $this->session->set_userdata('active-language', $config['active_language']);\n $result = array('status' => 'ok', 'language' => $language_id);\n exit(json_encode($result));\n } else {\n return null;\n }\n }",
"public function setAsDefault() {\n\t\t// remove default flag from all languages\n\t\t$sql = \"UPDATE\twcf\".WCF_N.\"_language\n\t\t\tSET\tisDefault = ?\";\n\t\t$statement = WCF::getDB()->prepareStatement($sql);\n\t\t$statement->execute(array(\n\t\t\t0\n\t\t));\n\t\t\n\t\t// set current language as default language\n\t\t$this->update(array(\n\t\t\t'isDefault' => 1\n\t\t));\n\t\t\n\t\t$this->clearCache();\n\t}",
"public function autoselect()\n {\n $site_url = Config::getSiteURL();\n\n $sites = array();\n foreach ($this->all_lang as $lang) {\n $sites[$lang] = $site_url . \"/\" . $lang;\n }\n\n // Get 2 char lang code from the browser\n if ((isset($_SERVER)) && (array_key_exists('HTTP_ACCEPT_LANGUAGE',$_SERVER))) {\n $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);\n } else {\n $lang = $this->default_lang;\n }\n \n\n // Set default language if a '$lang' version of site is not available\n if (!isset($sites[$lang])) {\n $lang = $this->default_lang;\n }\n // Finally redirect to desired location\n header('Location: ' . $sites[$lang]);\n exit;\n }",
"public function changeEnglishLanguage(){\n Session::forget('lang');\n return back();\n }",
"public function actionLanguages() {\n return Lang::getList();\n }",
"public function run()\n {\n $l = [];\n $l[] = ['name' => 'Deutsch', 'short' => 'de'];\n $l[] = ['name' => 'English', 'short' => 'en'];\n $l[] = ['name' => 'français', 'short' => 'fr'];\n $l[] = ['name' => '日本語 (にほんご)', 'short' => 'ja'];\n $l[] = ['name' => 'Multiple Languages', 'short' => 'multi'];\n\n foreach ($l as $langs) {\n DB::table('languages')->insert([\n 'name' => $langs['name'],\n 'short' => $langs['short'],\n ]);\n }\n }",
"private function set_lang()\n\t{\n\t\t//print_r($this->CI->uri->rsegment_array());\n\t\t//echo $this->CI->uri->ruri_string();\n\t\t\n\t\t// Set from default config\n\t\t$this->lang = $this->lang_default;\n\t\t\t\t\n\t\t// Set from browser\n\t\tif ($this->detect_browser)\n\t\t{\n\t\t\t$this->lang = $this->detect_browser_lang();\n\t\t}\n\n\t\t// Set from session\n\t\t$this->set_session();\n\t\t\n\t\t// Set from URI\n\t\t$first_segment = $this->CI->uri->segment(1);\n\t\tif (in_array($first_segment, $this->langs))\n\t\t{\n\t\t\t$this->lang = $first_segment;\n\t\t\t$this->set_session($first_segment);\n\t\t}\n\t}",
"public function activate()\n {\n Cleeng_Core::load('Cleeng_WpClient');\n Cleeng_Client::checkCompatibility();\n $this->migrate_database();\n //$cleengAdmin = Cleeng_Core::load('Cleeng_Admin');\n //$cleengAdmin->message(\"Cleeng for WordPress installed.\");\n }",
"public function getAvailableLanguages() {}",
"function install_translations() {\n $db = DB::getInstance();\n if(!$db->query(file_get_contents(CORE_INSTALLER_FILES_PATH.'/db/translation.sql'))->error()) {\n return true;\n }\n else {\n System::addMessage('error', rt('An error occurred during the installation of your chosen language'));\n }\n return false;\n}",
"public function get_desired_languages();",
"function shGetActiveLanguages()\n{\n\tShlSystem_Log::debug('sh404sef', 'Using deprecated ' . __FUNCTION__ . ', removed as not applicable anymore');\n}",
"public function process_lang_change()\n {\n if (!isset($_POST['lang']) || !$_POST['lang']) {\n wp_send_json_error();\n }\n\n if (!session_id()) {\n session_start();\n }\n\n try {\n // Include Esc functions\n include_once(\\Esc::directory() . '/modules/general.php');\n include_once(\\Esc::directory() . '/includes/connect.php');\n\n if (!isset($_SESSION['esc_store']['selection_id'])) {\n \\EscConnect::getSelection();\n }\n\n $selection = \\EscConnect::init('selections/' . $_SESSION['esc_store']['selection_id'] . '/languages/' . $_POST['lang'])->put();\n\n if (!$selection || isset($selection['errors'])) {\n wp_send_json_error();\n }\n\n $_SESSION['esc_selection'] = $selection;\n\n wp_send_json_success();\n } catch (\\Exception $exp) {\n wp_send_json_error($exp->getMessage());\n }\n }",
"function __construct($parms = null)\n {\n global $debug;\n global $warn;\n global $connection;\n\n if ($debug)\n {\n $warn .= '<p>Language::__construct(' .\n print_r($parms, true) . \")</p>\\n\";\n }\n\n if (is_null($connection))\n {\n throw new Exception('Language::constructor: \" .\n \"No connection to database server');\n }\n\n $needInsert = false;\n $this->table = 'Languages';\n $code = 'en';\n $cc = null;\n\n // validate parameters\n if (is_null($parms) ||\n (is_array($parms) && count($parms) == 0))\n { // create default entry from Cookie\n if (array_key_exists('lang', $_REQUEST))\n $code = strtolower($_REQUEST['lang']);\n $parms = array('code' => $code);\n } // create default entry\n\n // process parameters\n if (is_array($parms))\n { // an array with at least one entry\n if (count($parms) < count(self::$initRow))\n { // search parameters\n $where = '';\n $and = 'WHERE ';\n $sqlParms = array();\n foreach($parms as $key => $value)\n { // loop through parameters\n $fieldLc = strtolower($key);\n if (array_key_exists($fieldLc, self::$translate))\n $fieldLc = self::$translate[$fieldLc];\n switch($fieldLc)\n { // act on key fields\n case 'code639_1':\n { // language code\n if (strlen($value) > 2)\n {\n $code = substr($value, 0, 2);\n if (strlen($value) >= 5 && \n substr($value, 2, 1) == '-')\n $cc = strtoupper(substr($value, 3));\n }\n else\n $code = $value;\n $where .= $and . \"Code639_1=:code\";\n $sqlParms['code'] = $code;\n $and = ' AND ';\n break;\n } // language code\n\n } // act on key fields\n } // loop through parameters\n\n if (strlen($where) == 0)\n {\n $where .= \"WHERE Code639_1=:code\";\n $sqlParms['code'] = $code;\n }\n\n $query = \"SELECT * FROM Languages $where\";\n\n // query the database\n $stmt = $connection->prepare($query);\n $queryText = debugPrepQuery($query, $sqlParms);\n\n if ($stmt->execute($sqlParms))\n { // success\n if ($debug)\n $warn .= \"<p>Language::__construct: \" . __LINE__ . \n \" query='$queryText'</p>\\n\";\n\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $count = count($result);\n if ($count == 1)\n { // existing record\n $dbrow = $result[0];\n $needInsert = false;\n } // existing record\n else\n if ($count == 0)\n { // create a new record\n // set defaults\n $dbrow = self::$initRow;\n $dbrow['code639_1'] = $code;\n $dbrow['name'] = \"Language: '$code'\";\n $needInsert = true;\n } // create new record\n else\n { // error performing query\n $this->msg .= \"Language::__construct: '$queryText' \" .\n \"returns $count records. \";\n } // error performing query\n } // success\n else\n { // error performing query\n $this->msg .=\"Language::__construct: '$queryText' \" .\n print_r($stmt->errorInfo(),true);\n } // error performing query\n } // search parameters\n else\n { // build from existing record\n $dbrow = $parms;\n $needInsert = false;\n } // build from existing record\n } // an array with at least one entry\n else\n { // unsupported parameter type\n throw new Exception(\"Language::__construct: \" .\n \"parameter must be an array: is \" .\n gettype($parms));\n } // unsupported parameter type\n\n\n // invoke constructor of base class\n parent::__construct($dbrow,\n 'Languages');\n $this->needInsert = $needInsert;\n\n if (!is_null($cc))\n {\n $this->extras['cc'] = $cc;\n }\n\n // diagnostic output if debug is set\n $this->dump('Language Record constructed:');\n }",
"public function run()\n {\n $items = [\n [\n \t'title' => 'English',\n 'understanding' => 'C1',\n 'speach' => 'C1',\n 'writing' => 'C1'\n ],\n [\n 'title' => 'German',\n 'understanding' => 'A1',\n 'speach' => 'A1',\n 'writing' => 'A2'\n ]\n ];\n\n foreach($items as $item) \n {\n Language::create($item);\n }\n }",
"public static function init(){\n self::$language = config::getMainIni('language');\n\n $system_lang = array();\n $db = new db();\n $system_language = $db->select(\n 'language',\n 'language',\n config::$vars['coscms_main']['language']\n );\n\n // create system lanugage for all modules\n if (!empty($system_language)){\n foreach($system_language as $key => $val){\n $module_lang = unserialize($val['translation']);\n $system_lang+= $module_lang;\n }\n } \n self::$dict = $system_lang;\n }",
"public function getSystemLanguages() {}",
"function initLanguage() {\n global $_ARRLANG, $basePath, $language;\n\n $language = $this->_getLanguage();\n\n require_once($basePath.DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEPARATOR.$language.'.lang.php');\n }",
"public function getSystemLanguages() {}",
"public function run()\n {\n \n\n \\DB::table('languages')->delete();\n \n \\DB::table('languages')->insert(array (\n 0 => \n array (\n 'id' => 1,\n 'key' => 'customer',\n 'en' => 'Customer ',\n 'km' => 'អតិថិជន',\n 'created_at' => '2017-08-31 01:42:11',\n 'updated_at' => '2017-08-31 01:42:11',\n ),\n 1 => \n array (\n 'id' => 2,\n 'key' => 'purchase',\n 'en' => 'Purchase',\n 'km' => 'ទិញចូល',\n 'created_at' => '2017-08-31 01:42:11',\n 'updated_at' => '2017-08-31 01:42:11',\n ),\n 2 => \n array (\n 'id' => 3,\n 'key' => 'profit',\n 'en' => 'Profit',\n 'km' => 'ចំណេញ',\n 'created_at' => '2017-08-31 01:42:11',\n 'updated_at' => '2017-08-31 01:42:11',\n ),\n 3 => \n array (\n 'id' => 4,\n 'key' => 'list_sale',\n 'en' => 'List Sale',\n 'km' => 'បញ្ជីនៃការលក់',\n 'created_at' => '2017-08-31 01:42:11',\n 'updated_at' => '2017-08-31 01:42:11',\n ),\n 4 => \n array (\n 'id' => 5,\n 'key' => 'today_sale',\n 'en' => 'Today Sale',\n 'km' => 'លក់ថ្ងៃនេះ',\n 'created_at' => '2017-08-31 01:42:11',\n 'updated_at' => '2017-08-31 01:42:11',\n ),\n 5 => \n array (\n 'id' => 6,\n 'key' => 'login',\n 'en' => 'Login ',\n 'km' => 'ចូលគណនី',\n 'created_at' => '2017-08-31 01:42:11',\n 'updated_at' => '2017-08-31 01:42:11',\n ),\n 6 => \n array (\n 'id' => 7,\n 'key' => 'register',\n 'en' => 'Register',\n 'km' => 'ចុះឈ្មោះ',\n 'created_at' => '2017-08-31 01:42:11',\n 'updated_at' => '2017-08-31 01:42:11',\n ),\n 7 => \n array (\n 'id' => 8,\n 'key' => 'pos',\n 'en' => 'POS',\n 'km' => 'ផ្ទាំងលក់',\n 'created_at' => '2017-08-31 01:42:21',\n 'updated_at' => '2017-08-31 01:42:21',\n ),\n 8 => \n array (\n 'id' => 9,\n 'key' => 'open_item',\n 'en' => 'Open Item',\n 'km' => 'បើកស្តុកដើមគ្រា',\n 'created_at' => '2017-08-31 01:42:21',\n 'updated_at' => '2017-08-31 01:42:21',\n ),\n 9 => \n array (\n 'id' => 10,\n 'key' => 'checklist',\n 'en' => 'Checklist',\n 'km' => 'ពិនិត្រទំនិញ',\n 'created_at' => '2017-08-31 01:42:21',\n 'updated_at' => '2017-08-31 01:42:21',\n ),\n 10 => \n array (\n 'id' => 11,\n 'key' => 'dashboard',\n 'en' => 'Dashboard',\n 'km' => 'ផ្ទាំងគ្រប់គ្រង',\n 'created_at' => '2017-08-31 01:42:47',\n 'updated_at' => '2017-08-31 01:42:47',\n ),\n 11 => \n array (\n 'id' => 12,\n 'key' => 'login_status',\n 'en' => 'Login Status',\n 'km' => 'ស្ថានភាពចូល',\n 'created_at' => '2017-08-31 01:42:47',\n 'updated_at' => '2017-08-31 01:42:47',\n ),\n 12 => \n array (\n 'id' => 13,\n 'key' => 'invoice',\n 'en' => 'Invoice',\n 'km' => 'វិក្កយបត្រ',\n 'created_at' => '2017-08-31 01:42:48',\n 'updated_at' => '2017-08-31 01:42:48',\n ),\n 13 => \n array (\n 'id' => 14,\n 'key' => 'report',\n 'en' => 'Report',\n 'km' => 'របាយការណ៍',\n 'created_at' => '2017-08-31 01:42:48',\n 'updated_at' => '2017-08-31 01:42:48',\n ),\n 14 => \n array (\n 'id' => 15,\n 'key' => 'open_stock',\n 'en' => 'Open Stock',\n 'km' => 'បើកស្តុក',\n 'created_at' => '2017-08-31 01:42:48',\n 'updated_at' => '2017-08-31 01:42:48',\n ),\n 15 => \n array (\n 'id' => 16,\n 'key' => 'production',\n 'en' => 'Production',\n 'km' => 'ការផលិតផល',\n 'created_at' => '2017-08-31 01:42:48',\n 'updated_at' => '2017-08-31 01:42:48',\n ),\n 16 => \n array (\n 'id' => 17,\n 'key' => 'check_list',\n 'en' => 'Checklist',\n 'km' => 'ពិនិត្រទំនិញ',\n 'created_at' => '2017-08-31 01:42:48',\n 'updated_at' => '2017-08-31 01:42:48',\n ),\n 17 => \n array (\n 'id' => 18,\n 'key' => 'area_chart',\n 'en' => 'Area Chart',\n 'km' => 'គំនូសតាងផ្ទៃ',\n 'created_at' => '2017-08-31 01:42:48',\n 'updated_at' => '2017-08-31 01:42:48',\n ),\n 18 => \n array (\n 'id' => 19,\n 'key' => 'logout',\n 'en' => 'Logout',\n 'km' => 'ចាកចេញ\n',\n 'created_at' => '2017-08-31 01:42:48',\n 'updated_at' => '2017-08-31 01:42:48',\n ),\n 19 => \n array (\n 'id' => 20,\n 'key' => 'online',\n 'en' => 'Online',\n 'km' => 'Online',\n 'created_at' => '2017-08-31 01:42:48',\n 'updated_at' => '2017-08-31 01:42:48',\n ),\n 20 => \n array (\n 'id' => 21,\n 'key' => 'table_report',\n 'en' => 'Table Report',\n 'km' => 'តារាងរបាយការណ៍',\n 'created_at' => '2017-08-31 01:42:48',\n 'updated_at' => '2017-08-31 01:42:48',\n ),\n 21 => \n array (\n 'id' => 22,\n 'key' => 'product',\n 'en' => 'Product',\n 'km' => 'ផលិតផល',\n 'created_at' => '2017-08-31 01:42:48',\n 'updated_at' => '2017-08-31 01:42:48',\n ),\n 22 => \n array (\n 'id' => 23,\n 'key' => 'product_category',\n 'en' => 'Product Category',\n 'km' => 'ប្រភេទផលិតផល',\n 'created_at' => '2017-08-31 01:42:48',\n 'updated_at' => '2017-08-31 01:42:48',\n ),\n 23 => \n array (\n 'id' => 24,\n 'key' => 'unit',\n 'en' => 'Unit',\n 'km' => 'ឯកតា/ខ្នាត',\n 'created_at' => '2017-08-31 01:42:48',\n 'updated_at' => '2017-08-31 01:42:48',\n ),\n 24 => \n array (\n 'id' => 25,\n 'key' => 'checklist_stock',\n 'en' => 'Checklist Stock',\n 'km' => 'ផ្ទៀងផ្ទាត់ ទំនិញ',\n 'created_at' => '2017-08-31 01:42:48',\n 'updated_at' => '2017-08-31 01:42:48',\n ),\n 25 => \n array (\n 'id' => 26,\n 'key' => 'file_manager',\n 'en' => 'File Manager',\n 'km' => 'គ្រប់គ្រងឯកសារ',\n 'created_at' => '2017-08-31 01:42:48',\n 'updated_at' => '2017-08-31 01:42:48',\n ),\n 26 => \n array (\n 'id' => 27,\n 'key' => 'settings',\n 'en' => 'Settings',\n 'km' => 'ការកំណត់',\n 'created_at' => '2017-08-31 01:42:48',\n 'updated_at' => '2017-08-31 01:42:48',\n ),\n 27 => \n array (\n 'id' => 28,\n 'key' => 'open_items',\n 'en' => 'Open Items',\n 'km' => 'ស្តុកដើមគ្រា',\n 'created_at' => '2017-08-31 01:42:53',\n 'updated_at' => '2017-08-31 01:42:53',\n ),\n 28 => \n array (\n 'id' => 29,\n 'key' => 'open_number',\n 'en' => 'Open Number',\n 'km' => 'លេខសំគាល់',\n 'created_at' => '2017-08-31 01:42:54',\n 'updated_at' => '2017-08-31 01:42:54',\n ),\n 29 => \n array (\n 'id' => 30,\n 'key' => 'open_date',\n 'en' => 'Open Date',\n 'km' => 'កាលបរិច្ឆេទ',\n 'created_at' => '2017-08-31 01:42:54',\n 'updated_at' => '2017-08-31 01:42:54',\n ),\n 30 => \n array (\n 'id' => 31,\n 'key' => 'description',\n 'en' => 'Description',\n 'km' => 'ការពិពណ៌នា',\n 'created_at' => '2017-08-31 01:42:54',\n 'updated_at' => '2017-08-31 01:42:54',\n ),\n 31 => \n array (\n 'id' => 32,\n 'key' => 'user',\n 'en' => 'User',\n 'km' => 'អ្នកប្រើ',\n 'created_at' => '2017-08-31 01:42:54',\n 'updated_at' => '2017-08-31 01:42:54',\n ),\n 32 => \n array (\n 'id' => 33,\n 'key' => 'created_at',\n 'en' => 'Created at',\n 'km' => 'ថ្ងៃបង្កើត',\n 'created_at' => '2017-08-31 01:42:54',\n 'updated_at' => '2017-08-31 01:42:54',\n ),\n 33 => \n array (\n 'id' => 34,\n 'key' => 'item_detail',\n 'en' => 'Item Detail',\n 'km' => 'លំអិតធាតុផ្សុំផលិតផល',\n 'created_at' => '2017-08-31 01:42:57',\n 'updated_at' => '2017-08-31 01:42:57',\n ),\n 34 => \n array (\n 'id' => 35,\n 'key' => 'item_id',\n 'en' => 'Item ID',\n 'km' => 'លេខ',\n 'created_at' => '2017-08-31 01:42:57',\n 'updated_at' => '2017-08-31 01:42:57',\n ),\n 35 => \n array (\n 'id' => 36,\n 'key' => 'code',\n 'en' => 'Code',\n 'km' => 'កូដ',\n 'created_at' => '2017-08-31 01:42:58',\n 'updated_at' => '2017-08-31 01:42:58',\n ),\n 36 => \n array (\n 'id' => 37,\n 'key' => 'title',\n 'en' => 'Name',\n 'km' => 'ឈ្មោះ',\n 'created_at' => '2017-08-31 01:42:58',\n 'updated_at' => '2017-08-31 01:42:58',\n ),\n 37 => \n array (\n 'id' => 38,\n 'key' => 'qty',\n 'en' => 'Qty',\n 'km' => 'ចំនួន',\n 'created_at' => '2017-08-31 01:42:58',\n 'updated_at' => '2017-08-31 01:42:58',\n ),\n 38 => \n array (\n 'id' => 39,\n 'key' => 'cost',\n 'en' => 'Cost',\n 'km' => 'ថ្លៃដើម',\n 'created_at' => '2017-08-31 01:42:58',\n 'updated_at' => '2017-08-31 01:42:58',\n ),\n 39 => \n array (\n 'id' => 40,\n 'key' => 'price',\n 'en' => 'Price',\n 'km' => 'តម្លៃ',\n 'created_at' => '2017-08-31 01:42:58',\n 'updated_at' => '2017-08-31 01:42:58',\n ),\n 40 => \n array (\n 'id' => 41,\n 'key' => 'discount',\n 'en' => 'Discount',\n 'km' => 'បញ្ចុះតម្លៃ',\n 'created_at' => '2017-08-31 01:42:58',\n 'updated_at' => '2017-08-31 01:42:58',\n ),\n 41 => \n array (\n 'id' => 42,\n 'key' => 'note',\n 'en' => 'Note',\n 'km' => 'ចំណាំ',\n 'created_at' => '2017-08-31 01:42:58',\n 'updated_at' => '2017-08-31 01:42:58',\n ),\n 42 => \n array (\n 'id' => 43,\n 'key' => 'purchases',\n 'en' => 'Purchases',\n 'km' => 'ទិញចូល',\n 'created_at' => '2017-08-31 01:43:32',\n 'updated_at' => '2017-08-31 01:43:32',\n ),\n 43 => \n array (\n 'id' => 44,\n 'key' => 'purchase_number',\n 'en' => 'Purchase Number',\n 'km' => 'លេខសំគាល់',\n 'created_at' => '2017-08-31 01:43:32',\n 'updated_at' => '2017-08-31 01:43:32',\n ),\n 44 => \n array (\n 'id' => 45,\n 'key' => 'customer_purchase',\n 'en' => 'Customer Purchase',\n 'km' => 'ឈ្មោះអតិថិជន',\n 'created_at' => '2017-08-31 01:43:32',\n 'updated_at' => '2017-08-31 01:43:32',\n ),\n 45 => \n array (\n 'id' => 46,\n 'key' => 'reference',\n 'en' => 'Reference',\n 'km' => 'សេចក្តីយោង',\n 'created_at' => '2017-08-31 01:43:32',\n 'updated_at' => '2017-08-31 01:43:32',\n ),\n 46 => \n array (\n 'id' => 47,\n 'key' => 'purchase_date',\n 'en' => 'Purchase Date',\n 'km' => 'កាលបរិច្ឆេទ',\n 'created_at' => '2017-08-31 01:43:34',\n 'updated_at' => '2017-08-31 01:43:34',\n ),\n 47 => \n array (\n 'id' => 48,\n 'key' => 'purchase_reference',\n 'en' => 'Purchase Reference',\n 'km' => 'សេចក្តីយោង',\n 'created_at' => '2017-08-31 01:43:34',\n 'updated_at' => '2017-08-31 01:43:34',\n ),\n 48 => \n array (\n 'id' => 49,\n 'key' => 'productions',\n 'en' => 'Productions ',\n 'km' => 'ផលិតកម្ម',\n 'created_at' => '2017-08-31 02:03:11',\n 'updated_at' => '2017-08-31 02:03:11',\n ),\n 49 => \n array (\n 'id' => 50,\n 'key' => 'production_number',\n 'en' => 'Production Number',\n 'km' => 'លេខសំគាល់',\n 'created_at' => '2017-08-31 02:03:11',\n 'updated_at' => '2017-08-31 02:03:11',\n ),\n 50 => \n array (\n 'id' => 51,\n 'key' => 'production_date',\n 'en' => 'Production Date',\n 'km' => 'កាលបរិច្ឆេទ',\n 'created_at' => '2017-08-31 02:03:11',\n 'updated_at' => '2017-08-31 02:03:11',\n ),\n 51 => \n array (\n 'id' => 52,\n 'key' => 'customer_production',\n 'en' => 'Customer Production ',\n 'km' => 'ផលិតកម្មអតិថិជន',\n 'created_at' => '2017-08-31 02:03:11',\n 'updated_at' => '2017-08-31 02:03:11',\n ),\n 52 => \n array (\n 'id' => 53,\n 'key' => 'production_reference',\n 'en' => 'Production Reference',\n 'km' => 'សេចក្តីយោង',\n 'created_at' => '2017-08-31 02:03:13',\n 'updated_at' => '2017-08-31 02:03:13',\n ),\n 53 => \n array (\n 'id' => 54,\n 'key' => 'units',\n 'en' => 'Units',\n 'km' => 'ឯកតា',\n 'created_at' => '2017-08-31 02:04:27',\n 'updated_at' => '2017-08-31 02:04:27',\n ),\n 54 => \n array (\n 'id' => 55,\n 'key' => 'name',\n 'en' => 'Name',\n 'km' => 'ឈ្មោះ',\n 'created_at' => '2017-08-31 02:04:27',\n 'updated_at' => '2017-08-31 02:04:27',\n ),\n 55 => \n array (\n 'id' => 57,\n 'key' => 'list',\n 'en' => 'List',\n 'km' => 'បញ្ជី',\n 'created_at' => '2017-08-31 02:05:08',\n 'updated_at' => '2017-08-31 02:05:08',\n ),\n 56 => \n array (\n 'id' => 58,\n 'key' => 'detail',\n 'en' => 'Detail',\n 'km' => 'លំអិត',\n 'created_at' => '2017-08-31 02:05:08',\n 'updated_at' => '2017-08-31 02:05:08',\n ),\n 57 => \n array (\n 'id' => 59,\n 'key' => 'purchase_item',\n 'en' => 'Purchase Item ',\n 'km' => 'ទំនិញទិញចូល',\n 'created_at' => '2017-08-31 02:05:08',\n 'updated_at' => '2017-08-31 02:05:08',\n ),\n 58 => \n array (\n 'id' => 60,\n 'key' => 'production_item',\n 'en' => 'Prduction Item ',\n 'km' => 'ទំនិញទិញផលិត',\n 'created_at' => '2017-08-31 02:05:08',\n 'updated_at' => '2017-08-31 02:05:08',\n ),\n 59 => \n array (\n 'id' => 61,\n 'key' => 'sale_invoice',\n 'en' => 'Sale Invoice',\n 'km' => 'វិក័យប័ត្រលក់',\n 'created_at' => '2017-08-31 02:05:08',\n 'updated_at' => '2017-08-31 02:05:08',\n ),\n 60 => \n array (\n 'id' => 62,\n 'key' => 'item',\n 'en' => 'Item ',\n 'km' => 'ទំនិញទិញ',\n 'created_at' => '2017-08-31 02:05:32',\n 'updated_at' => '2017-08-31 02:05:32',\n ),\n 61 => \n array (\n 'id' => 63,\n 'key' => 'items',\n 'en' => 'Items ',\n 'km' => 'ទំនិញទិញ',\n 'created_at' => '2017-08-31 02:05:32',\n 'updated_at' => '2017-08-31 02:05:32',\n ),\n 62 => \n array (\n 'id' => 64,\n 'key' => 'category',\n 'en' => 'Category',\n 'km' => 'ប្រភេទ',\n 'created_at' => '2017-08-31 02:05:32',\n 'updated_at' => '2017-08-31 02:05:32',\n ),\n 63 => \n array (\n 'id' => 65,\n 'key' => 'image',\n 'en' => 'Image',\n 'km' => 'រូបភាព',\n 'created_at' => '2017-08-31 02:05:32',\n 'updated_at' => '2017-08-31 02:05:32',\n ),\n 64 => \n array (\n 'id' => 66,\n 'key' => 'item_category',\n 'en' => 'Item Category',\n 'km' => 'ប្រភេទទំនិញទិញ',\n 'created_at' => '2017-08-31 02:05:33',\n 'updated_at' => '2017-08-31 02:05:33',\n ),\n 65 => \n array (\n 'id' => 67,\n 'key' => 'item_categories',\n 'en' => 'Item Categories',\n 'km' => 'ប្រភេទទំនិញទិញ',\n 'created_at' => '2017-08-31 02:05:33',\n 'updated_at' => '2017-08-31 02:05:33',\n ),\n 66 => \n array (\n 'id' => 68,\n 'key' => 'status',\n 'en' => 'Status',\n 'km' => 'ស្ថានភាព',\n 'created_at' => '2017-08-31 02:05:33',\n 'updated_at' => '2017-08-31 02:05:33',\n ),\n 67 => \n array (\n 'id' => 69,\n 'key' => 'parent',\n 'en' => 'Parent',\n 'km' => 'Parent',\n 'created_at' => '2017-08-31 02:05:35',\n 'updated_at' => '2017-08-31 02:05:35',\n ),\n 68 => \n array (\n 'id' => 70,\n 'key' => 'item_code',\n 'en' => 'Item Code',\n 'km' => 'លេខកូដ',\n 'created_at' => '2017-08-31 02:05:37',\n 'updated_at' => '2017-08-31 02:05:37',\n ),\n 69 => \n array (\n 'id' => 71,\n 'key' => 'num_qty',\n 'en' => 'Size',\n 'km' => 'ទំហំ',\n 'created_at' => '2017-08-31 07:04:51',\n 'updated_at' => '2017-08-31 07:04:51',\n ),\n 70 => \n array (\n 'id' => 72,\n 'key' => 'checklists',\n 'en' => 'Checklists',\n 'km' => 'ពិនិត្រទំនិញ',\n 'created_at' => '2017-08-31 07:45:16',\n 'updated_at' => '2017-08-31 07:45:16',\n ),\n 71 => \n array (\n 'id' => 73,\n 'key' => 'checklist_number',\n 'en' => 'Checklist Number',\n 'km' => 'លេខសំគាល់',\n 'created_at' => '2017-08-31 07:45:16',\n 'updated_at' => '2017-08-31 07:45:16',\n ),\n 72 => \n array (\n 'id' => 74,\n 'key' => 'checklist_date',\n 'en' => 'Checklist Date',\n 'km' => 'កាលបរិច្ឆេទ',\n 'created_at' => '2017-08-31 07:45:16',\n 'updated_at' => '2017-08-31 07:45:16',\n ),\n 73 => \n array (\n 'id' => 75,\n 'key' => 'invoices',\n 'en' => 'Invoices',\n 'km' => 'វិក្កយបត្រ',\n 'created_at' => '2017-08-31 07:46:07',\n 'updated_at' => '2017-08-31 07:46:07',\n ),\n 74 => \n array (\n 'id' => 76,\n 'key' => 'invoice_number',\n 'en' => 'Invoice Number',\n 'km' => 'លេខសំគាល់',\n 'created_at' => '2017-08-31 07:46:07',\n 'updated_at' => '2017-08-31 07:46:07',\n ),\n 75 => \n array (\n 'id' => 77,\n 'key' => 'deposit',\n 'en' => 'Deposit',\n 'km' => 'ប្រាក់កក់',\n 'created_at' => '2017-08-31 07:46:07',\n 'updated_at' => '2017-08-31 07:46:07',\n ),\n 76 => \n array (\n 'id' => 78,\n 'key' => 'complete_date',\n 'en' => 'Complete Date',\n 'km' => 'កាលបរិច្ឆេទ កំណត់',\n 'created_at' => '2017-08-31 07:46:07',\n 'updated_at' => '2017-08-31 07:46:07',\n ),\n 77 => \n array (\n 'id' => 79,\n 'key' => 'complete_price',\n 'en' => 'Complete Price',\n 'km' => 'តម្លៃបង្គ្រប់',\n 'created_at' => '2017-08-31 07:46:07',\n 'updated_at' => '2017-08-31 07:46:07',\n ),\n 78 => \n array (\n 'id' => 80,\n 'key' => 'customers',\n 'en' => 'Customers',\n 'km' => 'អតិថិជន',\n 'created_at' => '2017-08-31 07:56:02',\n 'updated_at' => '2017-08-31 07:56:02',\n ),\n 79 => \n array (\n 'id' => 81,\n 'key' => 'gender',\n 'en' => 'Gender',\n 'km' => 'ភេទ',\n 'created_at' => '2017-08-31 07:56:02',\n 'updated_at' => '2017-08-31 07:56:02',\n ),\n 80 => \n array (\n 'id' => 82,\n 'key' => 'phone',\n 'en' => 'Phone',\n 'km' => 'ទូរស័ព្ទលេខ',\n 'created_at' => '2017-08-31 07:56:02',\n 'updated_at' => '2017-08-31 07:56:02',\n ),\n 81 => \n array (\n 'id' => 83,\n 'key' => 'select_report_type',\n 'en' => 'Select Report Type',\n 'km' => 'ប្រភេទរបាយការណ៍',\n 'created_at' => '2017-08-31 08:38:26',\n 'updated_at' => '2017-08-31 08:38:26',\n ),\n 82 => \n array (\n 'id' => 84,\n 'key' => 'reports',\n 'en' => 'Reports',\n 'km' => 'របាយការណ៍',\n 'created_at' => '2017-08-31 08:38:27',\n 'updated_at' => '2017-08-31 08:38:27',\n ),\n 83 => \n array (\n 'id' => 85,\n 'key' => 'invoice_date',\n 'en' => 'Invoice Date',\n 'km' => 'កាលបរិច្ឆេទវិក្កយបត្រ',\n 'created_at' => '2017-08-31 08:38:56',\n 'updated_at' => '2017-08-31 08:38:56',\n ),\n 84 => \n array (\n 'id' => 86,\n 'key' => 'customer_invoice',\n 'en' => 'Customer Invoice',\n 'km' => 'វិក័យប័ត្រអតិថិជន',\n 'created_at' => '2017-08-31 08:38:56',\n 'updated_at' => '2017-08-31 08:38:56',\n ),\n 85 => \n array (\n 'id' => 87,\n 'key' => 'amount',\n 'en' => 'Amount',\n 'km' => 'សរុប',\n 'created_at' => '2017-08-31 14:08:13',\n 'updated_at' => '2017-08-31 14:08:13',\n ),\n 86 => \n array (\n 'id' => 88,\n 'key' => 'first_page_you_see',\n 'en' => 'First page you see',\n 'km' => 'ទំព័រទីមួយដែលអ្នកឃើញ',\n 'created_at' => '2017-09-01 12:18:12',\n 'updated_at' => '2017-09-01 12:18:12',\n ),\n 87 => \n array (\n 'id' => 89,\n 'key' => 'logged_in',\n 'en' => 'Logged in',\n 'km' => 'បានចូល',\n 'created_at' => '2017-09-01 12:18:12',\n 'updated_at' => '2017-09-01 12:18:12',\n ),\n 88 => \n array (\n 'id' => 90,\n 'key' => 'administration',\n 'en' => 'Administration',\n 'km' => 'រដ្ឋបាល\n',\n 'created_at' => '2017-09-01 12:18:13',\n 'updated_at' => '2017-09-01 12:18:13',\n ),\n 89 => \n array (\n 'id' => 91,\n 'key' => 'all',\n 'en' => 'All',\n 'km' => '>',\n 'created_at' => '2017-09-01 12:25:40',\n 'updated_at' => '2017-09-01 12:25:40',\n ),\n 90 => \n array (\n 'id' => 92,\n 'key' => 'in_the_database',\n 'en' => 'In the database',\n 'km' => 'នៅក្នុងមូលដ្ឋានទិន្នន័យ',\n 'created_at' => '2017-09-01 12:25:40',\n 'updated_at' => '2017-09-01 12:25:40',\n ),\n 91 => \n array (\n 'id' => 93,\n 'key' => 'admin',\n 'en' => 'Admin',\n 'km' => 'អ្នកគ្រប់គ្រង',\n 'created_at' => '2017-09-01 12:25:41',\n 'updated_at' => '2017-09-01 12:25:41',\n ),\n 92 => \n array (\n 'id' => 94,\n 'key' => 'add',\n 'en' => 'Add',\n 'km' => 'បន្ថែម',\n 'created_at' => '2017-09-01 12:25:41',\n 'updated_at' => '2017-09-01 12:25:41',\n ),\n 93 => \n array (\n 'id' => 95,\n 'key' => 'actions',\n 'en' => 'Actions',\n 'km' => 'សកម្មភាព',\n 'created_at' => '2017-09-01 12:25:41',\n 'updated_at' => '2017-09-01 12:25:41',\n ),\n 94 => \n array (\n 'id' => 96,\n 'key' => 'emptytable',\n 'en' => 'Empty Table',\n 'km' => 'តារាងទទេ',\n 'created_at' => '2017-09-01 12:25:41',\n 'updated_at' => '2017-09-01 12:25:41',\n ),\n 95 => \n array (\n 'id' => 97,\n 'key' => 'info',\n 'en' => 'Info',\n 'km' => 'ព័ត៌មាន',\n 'created_at' => '2017-09-01 12:25:41',\n 'updated_at' => '2017-09-01 12:25:41',\n ),\n 96 => \n array (\n 'id' => 98,\n 'key' => 'infoempty',\n 'en' => 'Info Empty',\n 'km' => 'មិនមានព័ត៌មាន ',\n 'created_at' => '2017-09-01 12:25:41',\n 'updated_at' => '2017-09-01 12:25:41',\n ),\n 97 => \n array (\n 'id' => 99,\n 'key' => 'infofiltered',\n 'en' => 'Info Filtered',\n 'km' => 'ព័ត៌មាន Filtered',\n 'created_at' => '2017-09-01 12:25:41',\n 'updated_at' => '2017-09-01 12:25:41',\n ),\n 98 => \n array (\n 'id' => 100,\n 'key' => 'infopostfix',\n 'en' => 'Info Postfix',\n 'km' => 'ព័ត៌មាន Postfix',\n 'created_at' => '2017-09-01 12:25:41',\n 'updated_at' => '2017-09-01 12:25:41',\n ),\n 99 => \n array (\n 'id' => 101,\n 'key' => 'thousands',\n 'en' => 'Thousands',\n 'km' => ' ខ្ទង់ពាន់',\n 'created_at' => '2017-09-01 12:25:41',\n 'updated_at' => '2017-09-01 12:25:41',\n ),\n 100 => \n array (\n 'id' => 102,\n 'key' => 'lengthmenu',\n 'en' => 'Length Menu',\n 'km' => 'ម៉ឺនុយប្រវែង',\n 'created_at' => '2017-09-01 12:25:41',\n 'updated_at' => '2017-09-01 12:25:41',\n ),\n 101 => \n array (\n 'id' => 103,\n 'key' => 'loadingrecords',\n 'en' => 'Loading Records',\n 'km' => 'កំពុងផ្ទុកកំណត់ត្រា',\n 'created_at' => '2017-09-01 12:25:42',\n 'updated_at' => '2017-09-01 12:25:42',\n ),\n 102 => \n array (\n 'id' => 104,\n 'key' => 'processing',\n 'en' => 'Processing',\n 'km' => 'កំពុងដំណើរការ',\n 'created_at' => '2017-09-01 12:25:42',\n 'updated_at' => '2017-09-01 12:25:42',\n ),\n 103 => \n array (\n 'id' => 105,\n 'key' => 'search',\n 'en' => 'Search',\n 'km' => 'ស្វែងរក',\n 'created_at' => '2017-09-01 12:25:42',\n 'updated_at' => '2017-09-01 12:25:42',\n ),\n 104 => \n array (\n 'id' => 106,\n 'key' => 'zerorecords',\n 'en' => 'Zero Records',\n 'km' => 'កំណត់ត្រាសូន្យ',\n 'created_at' => '2017-09-01 12:25:42',\n 'updated_at' => '2017-09-01 12:25:42',\n ),\n 105 => \n array (\n 'id' => 107,\n 'key' => 'first',\n 'en' => 'First',\n 'km' => 'ដំបូង',\n 'created_at' => '2017-09-01 12:25:42',\n 'updated_at' => '2017-09-01 12:25:42',\n ),\n 106 => \n array (\n 'id' => 108,\n 'key' => 'last',\n 'en' => 'Last',\n 'km' => 'ចុងក្រោយ',\n 'created_at' => '2017-09-01 12:25:42',\n 'updated_at' => '2017-09-01 12:25:42',\n ),\n 107 => \n array (\n 'id' => 109,\n 'key' => 'next',\n 'en' => 'Next',\n 'km' => 'បន្ទាប់',\n 'created_at' => '2017-09-01 12:25:42',\n 'updated_at' => '2017-09-01 12:25:42',\n ),\n 108 => \n array (\n 'id' => 110,\n 'key' => 'previous',\n 'en' => 'Previous',\n 'km' => 'ពីមុន',\n 'created_at' => '2017-09-01 12:25:42',\n 'updated_at' => '2017-09-01 12:25:42',\n ),\n 109 => \n array (\n 'id' => 111,\n 'key' => 'sortascending',\n 'en' => 'Sort Ascending',\n 'km' => 'តម្រៀបតាមលំដាប់ឡើង',\n 'created_at' => '2017-09-01 12:25:42',\n 'updated_at' => '2017-09-01 12:25:42',\n ),\n 110 => \n array (\n 'id' => 112,\n 'key' => 'sortdescending',\n 'en' => 'Sort Descending',\n 'km' => 'តម្រៀបតាមលំដាប់ចុះក្រោម',\n 'created_at' => '2017-09-01 12:25:42',\n 'updated_at' => '2017-09-01 12:25:42',\n ),\n 111 => \n array (\n 'id' => 113,\n 'key' => 'copy',\n 'en' => 'Copy',\n 'km' => 'ច្បាប់ចម្លង',\n 'created_at' => '2017-09-01 12:25:42',\n 'updated_at' => '2017-09-01 12:25:42',\n ),\n 112 => \n array (\n 'id' => 114,\n 'key' => 'excel',\n 'en' => 'Excel',\n 'km' => 'Excel',\n 'created_at' => '2017-09-01 12:25:42',\n 'updated_at' => '2017-09-01 12:25:42',\n ),\n 113 => \n array (\n 'id' => 115,\n 'key' => 'csv',\n 'en' => 'CSV',\n 'km' => 'CSV',\n 'created_at' => '2017-09-01 12:25:42',\n 'updated_at' => '2017-09-01 12:25:42',\n ),\n 114 => \n array (\n 'id' => 116,\n 'key' => 'pdf',\n 'en' => 'PDF',\n 'km' => 'PDF',\n 'created_at' => '2017-09-01 12:25:42',\n 'updated_at' => '2017-09-01 12:25:42',\n ),\n 115 => \n array (\n 'id' => 117,\n 'key' => 'print',\n 'en' => 'Print',\n 'km' => 'បោះពុម្ព',\n 'created_at' => '2017-09-01 12:25:43',\n 'updated_at' => '2017-09-01 12:25:43',\n ),\n 116 => \n array (\n 'id' => 118,\n 'key' => 'column_visibility',\n 'en' => 'Column Visibility',\n 'km' => 'មើលឃើញជួរឈរ',\n 'created_at' => '2017-09-01 12:25:43',\n 'updated_at' => '2017-09-01 12:25:43',\n ),\n 117 => \n array (\n 'id' => 119,\n 'key' => 'delete_confirm',\n 'en' => 'Delete Confirm',\n 'km' => 'លុបការអះអាង',\n 'created_at' => '2017-09-01 12:25:43',\n 'updated_at' => '2017-09-01 12:25:43',\n ),\n 118 => \n array (\n 'id' => 120,\n 'key' => 'delete_confirmation_title',\n 'en' => 'Delete Confirmation Title',\n 'km' => 'លុបការបញ្ជាក់ចំណងជើង',\n 'created_at' => '2017-09-01 12:25:43',\n 'updated_at' => '2017-09-01 12:25:43',\n ),\n 119 => \n array (\n 'id' => 121,\n 'key' => 'delete_confirmation_message',\n 'en' => 'Delete Confirmation Message',\n 'km' => 'លុបសារបញ្ជាក់',\n 'created_at' => '2017-09-01 12:25:43',\n 'updated_at' => '2017-09-01 12:25:43',\n ),\n 120 => \n array (\n 'id' => 122,\n 'key' => 'delete_confirmation_not_title',\n 'en' => 'Delete Confirmation Not Title',\n 'km' => 'លុបការបញ្ជាក់មិនមានចំណងជើង',\n 'created_at' => '2017-09-01 12:25:43',\n 'updated_at' => '2017-09-01 12:25:43',\n ),\n 121 => \n array (\n 'id' => 123,\n 'key' => 'delete_confirmation_not_message',\n 'en' => 'Delete Confirmation Not Message',\n 'km' => 'លុបការបញ្ជាក់សារមិនពិត',\n 'created_at' => '2017-09-01 12:25:43',\n 'updated_at' => '2017-09-01 12:25:43',\n ),\n 122 => \n array (\n 'id' => 124,\n 'key' => 'delete_confirmation_not_deleted_title',\n 'en' => 'Delete Confirmation Note Deleted Title',\n 'km' => 'លុបសេចក្តីបញ្ជាក់ចំណាំចំណងជើង',\n 'created_at' => '2017-09-01 12:25:43',\n 'updated_at' => '2017-09-01 12:25:43',\n ),\n 123 => \n array (\n 'id' => 125,\n 'key' => 'delete_confirmation_not_deleted_message',\n 'en' => 'Delete Confirmation Not Delete Message',\n 'km' => 'លុបការអះអាងមិនលុបសារ',\n 'created_at' => '2017-09-01 12:25:43',\n 'updated_at' => '2017-09-01 12:25:43',\n ),\n 124 => \n array (\n 'id' => 126,\n 'key' => 'edit',\n 'en' => 'Edit',\n 'km' => 'កែសម្រួល',\n 'created_at' => '2017-09-01 12:25:45',\n 'updated_at' => '2017-09-01 12:25:45',\n ),\n 125 => \n array (\n 'id' => 127,\n 'key' => 'delete',\n 'en' => 'Delete',\n 'km' => 'លុប',\n 'created_at' => '2017-09-01 12:25:45',\n 'updated_at' => '2017-09-01 12:25:45',\n ),\n 126 => \n array (\n 'id' => 128,\n 'key' => 'back_to_all',\n 'en' => 'Back to All',\n 'km' => 'ត្រលប់ទៅទាំងអស់',\n 'created_at' => '2017-09-01 12:28:06',\n 'updated_at' => '2017-09-01 12:28:06',\n ),\n 127 => \n array (\n 'id' => 129,\n 'key' => 'add_a_new',\n 'en' => 'Add a New',\n 'km' => 'បន្ថែមថ្មី',\n 'created_at' => '2017-09-01 12:28:07',\n 'updated_at' => '2017-09-01 12:28:07',\n ),\n 128 => \n array (\n 'id' => 132,\n 'key' => 'sign_in_to_start_your_session',\n 'en' => 'Sign in to start your session',\n 'km' => 'បំពេញនូវអ៊ីមែល និង ពាក្យសម្ងាត់ ដើម្បីចូលទៅកានផ្ទាំងលក់',\n 'created_at' => '2017-09-02 02:16:22',\n 'updated_at' => '2017-09-02 02:16:22',\n ),\n 129 => \n array (\n 'id' => 133,\n 'key' => 'email',\n 'en' => 'Email',\n 'km' => 'អ៊ីមែល',\n 'created_at' => '2017-09-02 02:16:22',\n 'updated_at' => '2017-09-02 02:16:22',\n ),\n 130 => \n array (\n 'id' => 134,\n 'key' => 'password',\n 'en' => 'Password',\n 'km' => 'ពាក្យសម្ងាត់',\n 'created_at' => '2017-09-02 02:16:22',\n 'updated_at' => '2017-09-02 02:16:22',\n ),\n 131 => \n array (\n 'id' => 135,\n 'key' => 'remember_me',\n 'en' => 'Remember Me',\n 'km' => 'ចងចាំខ្ញុំ',\n 'created_at' => '2017-09-02 02:16:22',\n 'updated_at' => '2017-09-02 02:16:22',\n ),\n 132 => \n array (\n 'id' => 136,\n 'key' => 'stock_',\n 'en' => 'Stock',\n 'km' => 'ការគ្រប់គ្រង',\n 'created_at' => '2017-09-02 02:18:38',\n 'updated_at' => '2017-09-02 02:18:38',\n ),\n 133 => \n array (\n 'id' => 137,\n 'key' => 'management_',\n 'en' => 'Management',\n 'km' => 'ស្តុក',\n 'created_at' => '2017-09-02 02:18:38',\n 'updated_at' => '2017-09-02 02:18:38',\n ),\n 134 => \n array (\n 'id' => 138,\n 'key' => 'email_address',\n 'en' => 'Email Address',\n 'km' => 'អាស័យដ្ឋានអ៊ីមែល',\n 'created_at' => '2017-09-02 02:24:44',\n 'updated_at' => '2017-09-02 02:24:44',\n ),\n 135 => \n array (\n 'id' => 139,\n 'key' => 'confirm_password',\n 'en' => 'Confirm Password',\n 'km' => 'បញ្ជាក់ពាក្យសម្ងាត់',\n 'created_at' => '2017-09-02 02:24:44',\n 'updated_at' => '2017-09-02 02:24:44',\n ),\n 136 => \n array (\n 'id' => 140,\n 'key' => 'search_here',\n 'en' => 'Search Here',\n 'km' => 'ស្វែងរកនៅទីនេះ',\n 'created_at' => '2017-09-02 02:30:43',\n 'updated_at' => '2017-09-02 02:30:43',\n ),\n 137 => \n array (\n 'id' => 141,\n 'key' => 'transaction',\n 'en' => 'Transaction',\n 'km' => 'ប្រតិបត្តិការ\n',\n 'created_at' => '2017-09-02 13:32:09',\n 'updated_at' => '2017-09-02 13:32:09',\n ),\n 138 => \n array (\n 'id' => 142,\n 'key' => 'user_manager',\n 'en' => 'User Mananger',\n 'km' => 'គ្រប់គ្រងអ្នកប្រើ',\n 'created_at' => '2017-09-02 13:36:52',\n 'updated_at' => '2017-09-02 13:36:52',\n ),\n 139 => \n array (\n 'id' => 143,\n 'key' => 'choose_file',\n 'en' => 'Choose file',\n 'km' => 'ជ្រើសរើសរូបភាព',\n 'created_at' => '2017-09-11 13:42:06',\n 'updated_at' => '2017-09-11 13:42:06',\n ),\n 140 => \n array (\n 'id' => 144,\n 'key' => 'close',\n 'en' => 'Close',\n 'km' => 'បិទ',\n 'created_at' => '2017-09-13 02:23:37',\n 'updated_at' => '2017-09-13 02:23:37',\n ),\n 141 => \n array (\n 'id' => 145,\n 'key' => 'finalize_sale',\n 'en' => 'Finalize Sale',\n 'km' => 'បញ្ចប់ការលក់',\n 'created_at' => '2017-09-13 02:23:37',\n 'updated_at' => '2017-09-13 02:23:37',\n ),\n 142 => \n array (\n 'id' => 146,\n 'key' => 'date',\n 'en' => 'Date',\n 'km' => 'កាលបរិច្ឆេទ',\n 'created_at' => '2017-09-13 02:23:38',\n 'updated_at' => '2017-09-13 02:23:38',\n ),\n 143 => \n array (\n 'id' => 147,\n 'key' => 'yyyy-mm-dd',\n 'en' => 'yyyy-mm-dd',\n 'km' => 'ឆ្នាំ-ខែ-ថ្ងៃ',\n 'created_at' => '2017-09-13 02:23:38',\n 'updated_at' => '2017-09-13 02:23:38',\n ),\n 144 => \n array (\n 'id' => 149,\n 'key' => 'customer_name',\n 'en' => 'Customer Name',\n 'km' => 'ឈ្មោះអតិថិជន\n',\n 'created_at' => '2017-09-13 02:23:38',\n 'updated_at' => '2017-09-13 02:23:38',\n ),\n 145 => \n array (\n 'id' => 150,\n 'key' => 'total_items',\n 'en' => 'Total Items',\n 'km' => 'ផលិតផលសរុប',\n 'created_at' => '2017-09-13 02:23:38',\n 'updated_at' => '2017-09-13 02:23:38',\n ),\n 146 => \n array (\n 'id' => 151,\n 'key' => 'currency',\n 'en' => 'Currency',\n 'km' => 'រូបិយប័ណ្ណ',\n 'created_at' => '2017-09-13 02:23:38',\n 'updated_at' => '2017-09-13 02:23:38',\n ),\n 147 => \n array (\n 'id' => 152,\n 'key' => 'usd',\n 'en' => 'USD',\n 'km' => 'ដុល្លារ',\n 'created_at' => '2017-09-13 02:23:38',\n 'updated_at' => '2017-09-13 02:23:38',\n ),\n 148 => \n array (\n 'id' => 153,\n 'key' => 'khm',\n 'en' => 'KHM',\n 'km' => 'រៀល',\n 'created_at' => '2017-09-13 02:23:38',\n 'updated_at' => '2017-09-13 02:23:38',\n ),\n 149 => \n array (\n 'id' => 154,\n 'key' => 'total',\n 'en' => 'Total',\n 'km' => 'សរុប',\n 'created_at' => '2017-09-13 02:23:38',\n 'updated_at' => '2017-09-13 02:23:38',\n ),\n 150 => \n array (\n 'id' => 155,\n 'key' => 'total_payable',\n 'en' => 'Total Payable',\n 'km' => 'សរុបលុយបង់',\n 'created_at' => '2017-09-13 02:23:38',\n 'updated_at' => '2017-09-13 02:23:38',\n ),\n 151 => \n array (\n 'id' => 156,\n 'key' => 'paid',\n 'en' => 'Paid',\n 'km' => 'បង់លុយ',\n 'created_at' => '2017-09-13 02:23:38',\n 'updated_at' => '2017-09-13 02:23:38',\n ),\n 152 => \n array (\n 'id' => 157,\n 'key' => 'remaining',\n 'en' => 'Remaining',\n 'km' => 'លុយអាប់',\n 'created_at' => '2017-09-13 02:23:38',\n 'updated_at' => '2017-09-13 02:23:38',\n ),\n 153 => \n array (\n 'id' => 158,\n 'key' => 'change',\n 'en' => 'Change',\n 'km' => 'លុយដូរ',\n 'created_at' => '2017-09-13 02:23:38',\n 'updated_at' => '2017-09-13 02:23:38',\n ),\n 154 => \n array (\n 'id' => 159,\n 'key' => 'payment_note',\n 'en' => 'Payment Note',\n 'km' => 'ការទូទាត់ចំណាំ',\n 'created_at' => '2017-09-13 02:23:38',\n 'updated_at' => '2017-09-13 02:23:38',\n ),\n 155 => \n array (\n 'id' => 160,\n 'key' => 'quick_cash',\n 'en' => 'Quick Cash',\n 'km' => 'សាច់ប្រាក់រហ័ស',\n 'created_at' => '2017-09-13 02:23:38',\n 'updated_at' => '2017-09-13 02:23:38',\n ),\n 156 => \n array (\n 'id' => 161,\n 'key' => 'clear',\n 'en' => 'Clear',\n 'km' => 'លុប',\n 'created_at' => '2017-09-13 02:23:38',\n 'updated_at' => '2017-09-13 02:23:38',\n ),\n 157 => \n array (\n 'id' => 162,\n 'key' => 'save',\n 'en' => 'Save',\n 'km' => 'រក្សាទុក',\n 'created_at' => '2017-09-13 02:23:38',\n 'updated_at' => '2017-09-13 02:23:38',\n ),\n 158 => \n array (\n 'id' => 163,\n 'key' => 'update',\n 'en' => 'Update',\n 'km' => 'កែប្រែ',\n 'created_at' => '2017-09-13 02:23:38',\n 'updated_at' => '2017-09-13 02:23:38',\n ),\n 159 => \n array (\n 'id' => 164,\n 'key' => 'cancel',\n 'en' => 'Cancel',\n 'km' => 'បោះបង់',\n 'created_at' => '2017-09-13 02:23:38',\n 'updated_at' => '2017-09-13 02:23:38',\n ),\n 160 => \n array (\n 'id' => 165,\n 'key' => 'customer_list',\n 'en' => 'Customer List',\n 'km' => 'បញ្ជីអតិថិជន',\n 'created_at' => '2017-09-13 02:23:38',\n 'updated_at' => '2017-09-13 02:23:38',\n ),\n 161 => \n array (\n 'id' => 166,\n 'key' => 'edit_customer',\n 'en' => 'Edit Customer',\n 'km' => 'កែសម្រួលអតិថិជន',\n 'created_at' => '2017-09-13 02:23:38',\n 'updated_at' => '2017-09-13 02:23:38',\n ),\n 162 => \n array (\n 'id' => 167,\n 'key' => 'male',\n 'en' => 'Male',\n 'km' => 'ប្រុស',\n 'created_at' => '2017-09-13 02:23:38',\n 'updated_at' => '2017-09-13 02:23:38',\n ),\n 163 => \n array (\n 'id' => 168,\n 'key' => 'female',\n 'en' => 'Female',\n 'km' => 'ស្រី',\n 'created_at' => '2017-09-13 02:23:38',\n 'updated_at' => '2017-09-13 02:23:38',\n ),\n 164 => \n array (\n 'id' => 169,\n 'key' => 'submit',\n 'en' => 'Submit',\n 'km' => 'បញ្ចូន',\n 'created_at' => '2017-09-13 02:23:38',\n 'updated_at' => '2017-09-13 02:23:38',\n ),\n 165 => \n array (\n 'id' => 170,\n 'key' => 'num.qty',\n 'en' => 'Num.Qty',\n 'km' => 'ចំនួនឯកតា',\n 'created_at' => '2017-09-13 02:43:39',\n 'updated_at' => '2017-09-13 02:43:39',\n ),\n 166 => \n array (\n 'id' => 171,\n 'key' => 'rate',\n 'en' => 'Rate',\n 'km' => 'អត្រាប្តូរប្រាក់',\n 'created_at' => '2017-09-13 03:14:26',\n 'updated_at' => '2017-09-13 03:14:26',\n ),\n 167 => \n array (\n 'id' => 172,\n 'key' => 'print_order',\n 'en' => 'Print Order',\n 'km' => 'ព្រីនការកម្មង់',\n 'created_at' => '2017-09-13 03:14:26',\n 'updated_at' => '2017-09-13 03:14:26',\n ),\n 168 => \n array (\n 'id' => 173,\n 'key' => 'print_bill',\n 'en' => 'Print Bill',\n 'km' => 'ព្រីនវិក្កយបត្រ',\n 'created_at' => '2017-09-13 03:14:26',\n 'updated_at' => '2017-09-13 03:14:26',\n ),\n 169 => \n array (\n 'id' => 174,\n 'key' => 'payment',\n 'en' => 'Payment',\n 'km' => 'ការទូទាត់',\n 'created_at' => '2017-09-13 03:14:26',\n 'updated_at' => '2017-09-13 03:14:26',\n ),\n 170 => \n array (\n 'id' => 175,\n 'key' => 'edit_order_discount',\n 'en' => 'Edit Order Discount',\n 'km' => 'កែប្រែការបញ្ចុះតម្លៃ',\n 'created_at' => '2017-09-13 03:14:26',\n 'updated_at' => '2017-09-13 03:14:26',\n ),\n 171 => \n array (\n 'id' => 176,\n 'key' => 'order_discount',\n 'en' => 'Order Discount($)',\n 'km' => 'បញ្ចុះតម្លៃ ($)',\n 'created_at' => '2017-09-13 03:14:26',\n 'updated_at' => '2017-09-13 03:14:26',\n ),\n 172 => \n array (\n 'id' => 177,\n 'key' => 'invoice_no',\n 'en' => 'Invoice No',\n 'km' => 'លេខវិក័យប័ត្រ\n',\n 'created_at' => '2017-09-13 03:15:27',\n 'updated_at' => '2017-09-13 03:15:27',\n ),\n 173 => \n array (\n 'id' => 178,\n 'key' => 'ok',\n 'en' => 'OK',\n 'km' => 'យល់ព្រម',\n 'created_at' => '2017-09-13 03:21:07',\n 'updated_at' => '2017-09-13 03:21:07',\n ),\n 174 => \n array (\n 'id' => 179,\n 'key' => 'are_you_sure?',\n 'en' => 'Are you sure?',\n 'km' => 'តើអ្នកប្រាកដឬអត់?\n',\n 'created_at' => '2017-09-13 03:23:26',\n 'updated_at' => '2017-09-13 03:23:26',\n ),\n 175 => \n array (\n 'id' => 180,\n 'key' => 'search_product_by_code',\n 'en' => 'Search product by item code',\n 'km' => 'ស្វែងរកផលិតផលតាមលេខកូដ',\n 'created_at' => '2017-09-13 03:24:22',\n 'updated_at' => '2017-09-13 03:24:22',\n ),\n 176 => \n array (\n 'id' => 181,\n 'key' => 'add_customer',\n 'en' => 'Add Customer',\n 'km' => 'បន្ថែមអតិថិជន',\n 'created_at' => '2017-09-13 03:27:24',\n 'updated_at' => '2017-09-13 03:27:24',\n ),\n 177 => \n array (\n 'id' => 182,\n 'key' => 'please_fill_in_the_information_below._the_field_labels_marked_with_*_are_required_input_fields.',\n 'en' => 'Please fill in the information below. The field lavels marked with * are required input fields.',\n 'km' => 'សូមបំពេញព័ត៌មានខាងក្រោម, ឈ្មោះ ដែលសម្គាល់ដោយសញ្ញា * តម្រូវអោយរវាយបញ្ចូល.',\n 'created_at' => '2017-09-13 03:31:01',\n 'updated_at' => '2017-09-13 03:31:01',\n ),\n 178 => \n array (\n 'id' => 183,\n 'key' => 'select_gender',\n 'en' => 'Select Gender',\n 'km' => 'ជ្រើសរើសភេទ',\n 'created_at' => '2017-09-13 03:31:01',\n 'updated_at' => '2017-09-13 03:31:01',\n ),\n 179 => \n array (\n 'id' => 184,\n 'key' => 'search_filter',\n 'en' => 'Search Filter',\n 'km' => 'ស្វែងរក\n',\n 'created_at' => '2017-09-13 03:31:01',\n 'updated_at' => '2017-09-13 03:31:01',\n ),\n 180 => \n array (\n 'id' => 185,\n 'key' => 'exchange_rate',\n 'en' => 'Exchange Rate',\n 'km' => 'អត្រាប្តូរប្រាក់\n',\n 'created_at' => '2017-09-18 02:41:21',\n 'updated_at' => '2017-09-18 02:41:21',\n ),\n 181 => \n array (\n 'id' => 186,\n 'key' => 'history',\n 'en' => 'History',\n 'km' => 'ប្រវត្តិនៃការទិញ',\n 'created_at' => '2017-09-18 02:41:42',\n 'updated_at' => '2017-09-18 02:41:42',\n ),\n 182 => \n array (\n 'id' => 187,\n 'key' => 'customer_information',\n 'en' => 'Customer Information',\n 'km' => 'ព័ត៌មានអតិថិជន',\n 'created_at' => '2017-09-18 02:41:45',\n 'updated_at' => '2017-09-18 02:41:45',\n ),\n 183 => \n array (\n 'id' => 188,\n 'key' => 'customer_record',\n 'en' => 'Customer Record',\n 'km' => 'កំណត់ត្រាអតិថិជន',\n 'created_at' => '2017-09-18 02:41:45',\n 'updated_at' => '2017-09-18 02:41:45',\n ),\n 184 => \n array (\n 'id' => 189,\n 'key' => 'member_date',\n 'en' => 'Member Date',\n 'km' => 'កាលបរិច្ឆេទសមាជិក',\n 'created_at' => '2017-09-18 02:41:45',\n 'updated_at' => '2017-09-18 02:41:45',\n ),\n 185 => \n array (\n 'id' => 190,\n 'key' => 'invoice_history',\n 'en' => 'Invoice History',\n 'km' => 'ប្រវត្តិវិក្កយបត្រ',\n 'created_at' => '2017-09-18 02:41:45',\n 'updated_at' => '2017-09-18 02:41:45',\n ),\n 186 => \n array (\n 'id' => 191,\n 'key' => 'customer_invoice_record',\n 'en' => 'Customer Invoice Record',\n 'km' => 'កំណត់ត្រាវិក្កយបត្រអតិថិជន',\n 'created_at' => '2017-09-18 02:41:45',\n 'updated_at' => '2017-09-18 02:41:45',\n ),\n 187 => \n array (\n 'id' => 192,\n 'key' => 'invoice_due',\n 'en' => 'Invoice Due',\n 'km' => 'ថ្ងៃទី',\n 'created_at' => '2017-09-18 02:41:45',\n 'updated_at' => '2017-09-18 02:41:45',\n ),\n 188 => \n array (\n 'id' => 193,\n 'key' => 'no',\n 'en' => 'No',\n 'km' => 'ល.រ',\n 'created_at' => '2017-09-18 02:41:45',\n 'updated_at' => '2017-09-18 02:41:45',\n ),\n 189 => \n array (\n 'id' => 194,\n 'key' => 'total_discount',\n 'en' => 'Total Discount',\n 'km' => 'បញ្ចុះតម្លៃសរុប',\n 'created_at' => '2017-09-18 02:41:45',\n 'updated_at' => '2017-09-18 02:41:45',\n ),\n 190 => \n array (\n 'id' => 195,\n 'key' => 'grand_total',\n 'en' => 'Grand Total',\n 'km' => 'តំលៃបូកសរុប\n',\n 'created_at' => '2017-09-18 02:41:45',\n 'updated_at' => '2017-09-18 02:41:45',\n ),\n 191 => \n array (\n 'id' => 196,\n 'key' => 'total_paid',\n 'en' => 'Total Paid',\n 'km' => 'ការបង់ប្រាក់សរុប',\n 'created_at' => '2017-09-18 02:41:45',\n 'updated_at' => '2017-09-18 02:41:45',\n ),\n 192 => \n array (\n 'id' => 197,\n 'key' => 'exchange_rates',\n 'en' => 'Exchange Rates',\n 'km' => 'អត្រាប្តូរប្រាក់\n',\n 'created_at' => '2017-09-18 03:01:00',\n 'updated_at' => '2017-09-18 03:01:00',\n ),\n 193 => \n array (\n 'id' => 198,\n 'key' => 'dollar',\n 'en' => 'Dollar',\n 'km' => 'ដុល្លារ',\n 'created_at' => '2017-09-18 03:01:00',\n 'updated_at' => '2017-09-18 03:01:00',\n ),\n 194 => \n array (\n 'id' => 199,\n 'key' => 'riel',\n 'en' => 'Riel',\n 'km' => 'រៀល',\n 'created_at' => '2017-09-18 03:01:00',\n 'updated_at' => '2017-09-18 03:01:00',\n ),\n 195 => \n array (\n 'id' => 200,\n 'key' => 'buyer',\n 'en' => 'Buyer',\n 'km' => 'អ្នកទិញ',\n 'created_at' => '2017-09-22 04:11:54',\n 'updated_at' => '2017-09-22 04:11:54',\n ),\n 196 => \n array (\n 'id' => 201,\n 'key' => 'seller',\n 'en' => 'Seller',\n 'km' => 'អ្នកលក់',\n 'created_at' => '2017-09-22 04:11:54',\n 'updated_at' => '2017-09-22 04:11:54',\n ),\n 197 => \n array (\n 'id' => 203,\n 'key' => 'invoice_list_report',\n 'en' => 'Invoice List Report',\n 'km' => 'បញ្ជីរបាយការណ៍វិក័យប័ត្រ',\n 'created_at' => '2017-09-23 06:36:07',\n 'updated_at' => '2017-09-23 06:36:07',\n ),\n 198 => \n array (\n 'id' => 204,\n 'key' => 'form_date',\n 'en' => 'From Date',\n 'km' => 'ចាប់ពីថ្ងៃទី',\n 'created_at' => '2017-09-23 06:36:07',\n 'updated_at' => '2017-09-23 06:36:07',\n ),\n 199 => \n array (\n 'id' => 205,\n 'key' => 'to_date',\n 'en' => 'To Date',\n 'km' => 'ដល់ថ្ងៃទី',\n 'created_at' => '2017-09-23 06:36:07',\n 'updated_at' => '2017-09-23 06:36:07',\n ),\n 200 => \n array (\n 'id' => 206,\n 'key' => 'tel',\n 'en' => 'Tel',\n 'km' => 'ទូរស័ព្ទលេខ',\n 'created_at' => '2017-09-23 06:36:07',\n 'updated_at' => '2017-09-23 06:36:07',\n ),\n 201 => \n array (\n 'id' => 207,\n 'key' => 'subtotal',\n 'en' => 'Subtotal ',\n 'km' => 'សរុប',\n 'created_at' => '2017-09-23 06:36:07',\n 'updated_at' => '2017-09-23 06:36:07',\n ),\n 202 => \n array (\n 'id' => 208,\n 'key' => 'production_list_report',\n 'en' => 'Production List Report',\n 'km' => 'បញ្ជីរបាយការណ៍ផលិតកម្ម',\n 'created_at' => '2017-09-23 06:38:15',\n 'updated_at' => '2017-09-23 06:38:15',\n ),\n 203 => \n array (\n 'id' => 209,\n 'key' => 'not_record_found',\n 'en' => 'Not Record Found',\n 'km' => 'មិនមានកំណត់ត្រា',\n 'created_at' => '2017-09-23 06:38:15',\n 'updated_at' => '2017-09-23 06:38:15',\n ),\n 204 => \n array (\n 'id' => 210,\n 'key' => 'open_list_report',\n 'en' => 'Open List Report',\n 'km' => 'បញ្ជីរបាយការណ៍បើកស្តុក',\n 'created_at' => '2017-09-23 06:38:20',\n 'updated_at' => '2017-09-23 06:38:20',\n ),\n 205 => \n array (\n 'id' => 211,\n 'key' => 'total_qty',\n 'en' => 'Total Qty',\n 'km' => 'ចំនួនសរុប',\n 'created_at' => '2017-09-23 06:38:20',\n 'updated_at' => '2017-09-23 06:38:20',\n ),\n 206 => \n array (\n 'id' => 212,\n 'key' => 'total_cost',\n 'en' => 'Total Cost',\n 'km' => 'ថ្លៃដើមសរុប',\n 'created_at' => '2017-09-23 06:38:20',\n 'updated_at' => '2017-09-23 06:38:20',\n ),\n 207 => \n array (\n 'id' => 213,\n 'key' => 'checked_by',\n 'en' => 'Checked By',\n 'km' => 'ពិនិត្រដោយ',\n 'created_at' => '2017-09-23 06:38:20',\n 'updated_at' => '2017-09-23 06:38:20',\n ),\n 208 => \n array (\n 'id' => 214,\n 'key' => 'reported_by',\n 'en' => 'Reported By',\n 'km' => 'រៀបចំរបាយការណ័ដោយ',\n 'created_at' => '2017-09-23 06:38:20',\n 'updated_at' => '2017-09-23 06:38:20',\n ),\n 209 => \n array (\n 'id' => 215,\n 'key' => 'between',\n 'en' => 'Between',\n 'km' => 'ចន្លោះ',\n 'created_at' => '2017-09-23 06:45:30',\n 'updated_at' => '2017-09-23 06:45:30',\n ),\n 210 => \n array (\n 'id' => 216,\n 'key' => 'production_history',\n 'en' => 'Production History',\n 'km' => 'ប្រវត្តិផលិតកម្ម',\n 'created_at' => '2017-09-23 06:52:46',\n 'updated_at' => '2017-09-23 06:52:46',\n ),\n 211 => \n array (\n 'id' => 217,\n 'key' => 'customer_production_record',\n 'en' => 'Customer Production Record',\n 'km' => 'កំណត់ត្រាផលិតកម្មអតិថិជន',\n 'created_at' => '2017-09-23 06:52:46',\n 'updated_at' => '2017-09-23 06:52:46',\n ),\n 212 => \n array (\n 'id' => 218,\n 'key' => 'production_due',\n 'en' => 'Production Due',\n 'km' => 'ថ្ងៃទី',\n 'created_at' => '2017-09-23 06:52:46',\n 'updated_at' => '2017-09-23 06:52:46',\n ),\n 213 => \n array (\n 'id' => 219,\n 'key' => 'purchase_history',\n 'en' => 'Purchase History',\n 'km' => 'ប្រវត្តិការទិញចូល',\n 'created_at' => '2017-09-23 06:57:38',\n 'updated_at' => '2017-09-23 06:57:38',\n ),\n 214 => \n array (\n 'id' => 220,\n 'key' => 'customer_purchase_record',\n 'en' => 'Customer Purchase Record',\n 'km' => 'កំណត់ត្រាការទិញចូលពីអតិថិជន',\n 'created_at' => '2017-09-23 06:57:38',\n 'updated_at' => '2017-09-23 06:57:38',\n ),\n 215 => \n array (\n 'id' => 221,\n 'key' => 'purchase_due',\n 'en' => 'Purchase Due',\n 'km' => 'ថ្ងៃទី',\n 'created_at' => '2017-09-23 06:57:38',\n 'updated_at' => '2017-09-23 06:57:38',\n ),\n 216 => \n array (\n 'id' => 222,\n 'key' => 'open_detail_report',\n 'en' => 'Open Detail Report',\n 'km' => 'របាយការណ៍បើកស្តុកលម្អិត',\n 'created_at' => '2017-09-23 07:11:03',\n 'updated_at' => '2017-09-23 07:11:03',\n ),\n 217 => \n array (\n 'id' => 223,\n 'key' => 'open_due',\n 'en' => 'Open Due',\n 'km' => 'ថ្ងៃទី',\n 'created_at' => '2017-09-23 07:11:03',\n 'updated_at' => '2017-09-23 07:11:03',\n ),\n 218 => \n array (\n 'id' => 225,\n 'key' => 'purchase_detail_report',\n 'en' => 'Purchase Detail Report',\n 'km' => 'របាយការណ៍លម្អិតនៃការទិញចូល',\n 'created_at' => '2017-09-23 07:13:12',\n 'updated_at' => '2017-09-23 07:13:12',\n ),\n 219 => \n array (\n 'id' => 227,\n 'key' => 'invoice_print',\n 'en' => 'Invoice Print',\n 'km' => 'ព្រីនវិក្កយបត្រ',\n 'created_at' => '2017-09-25 07:28:08',\n 'updated_at' => '2017-09-25 07:28:08',\n ),\n 220 => \n array (\n 'id' => 228,\n 'key' => 'invoice_detail_report',\n 'en' => 'Invoice Detail Report',\n 'km' => 'របាយការណ៍វិក្កយបត្រលម្អិត',\n 'created_at' => '2017-09-25 08:15:38',\n 'updated_at' => '2017-09-25 08:15:38',\n ),\n 221 => \n array (\n 'id' => 229,\n 'key' => 'sale_today',\n 'en' => 'Sale Today',\n 'km' => 'លក់ថ្ងៃនេះ',\n 'created_at' => '2017-09-25 09:01:13',\n 'updated_at' => '2017-09-25 09:01:13',\n ),\n 222 => \n array (\n 'id' => 230,\n 'key' => 'total_sale_today',\n 'en' => 'Total Sale Today',\n 'km' => 'សរុបការលក់ថ្ងៃនេះ',\n 'created_at' => '2017-09-25 09:01:30',\n 'updated_at' => '2017-09-25 09:01:30',\n ),\n 223 => \n array (\n 'id' => 231,\n 'key' => 'purchase_no',\n 'en' => 'Purchase No',\n 'km' => 'លេខសំគាល់',\n 'created_at' => '2017-09-27 02:47:26',\n 'updated_at' => '2017-09-27 02:47:26',\n ),\n 224 => \n array (\n 'id' => 232,\n 'key' => 'production_no',\n 'en' => 'Production No',\n 'km' => 'លេខសំគាល់',\n 'created_at' => '2017-09-27 07:15:35',\n 'updated_at' => '2017-09-27 07:15:35',\n ),\n 225 => \n array (\n 'id' => 233,\n 'key' => 'production_detail_report',\n 'en' => 'Production Detail Report',\n 'km' => 'របាយការណ៍លម្អិតនៃផលិតកម្ម',\n 'created_at' => '2017-09-27 07:15:41',\n 'updated_at' => '2017-09-27 07:15:41',\n ),\n 226 => \n array (\n 'id' => 235,\n 'key' => 'daily_sales_report',\n 'en' => 'Daily Sales Report ',\n 'km' => 'របាយការណ៍លក់ប្រចាំថ្ងៃ',\n 'created_at' => '2017-09-28 01:59:23',\n 'updated_at' => '2017-09-28 01:59:23',\n ),\n 227 => \n array (\n 'id' => 253,\n 'key' => 'sale_list',\n 'en' => 'Sale List',\n 'km' => 'បញ្ជីលក់',\n 'created_at' => '2017-09-28 08:36:02',\n 'updated_at' => '2017-09-28 08:36:02',\n ),\n 228 => \n array (\n 'id' => 254,\n 'key' => 'sale_detail',\n 'en' => 'Sale Detail',\n 'km' => 'ពត៌មានលំអិតពីការលក់',\n 'created_at' => '2017-09-28 08:36:02',\n 'updated_at' => '2017-09-28 08:36:02',\n ),\n 229 => \n array (\n 'id' => 255,\n 'key' => 'sale_profit',\n 'en' => 'Sale Profit',\n 'km' => 'ប្រាក់ចំណេញ',\n 'created_at' => '2017-09-28 08:36:02',\n 'updated_at' => '2017-09-28 08:36:02',\n ),\n 230 => \n array (\n 'id' => 256,\n 'key' => 'sale_daily',\n 'en' => 'Sale Daily',\n 'km' => 'លក់ប្រចាំថ្ងៃ',\n 'created_at' => '2017-09-28 08:36:02',\n 'updated_at' => '2017-09-28 08:36:02',\n ),\n 231 => \n array (\n 'id' => 257,\n 'key' => 'sale_monthly',\n 'en' => 'Sale Monthly',\n 'km' => 'លក់ប្រចាំខែ',\n 'created_at' => '2017-09-28 08:36:02',\n 'updated_at' => '2017-09-28 08:36:02',\n ),\n 232 => \n array (\n 'id' => 258,\n 'key' => 'sale_discount',\n 'en' => 'Sale Discount',\n 'km' => 'លក់បញ្ចុះតម្លៃ',\n 'created_at' => '2017-09-28 08:36:02',\n 'updated_at' => '2017-09-28 08:36:02',\n ),\n 233 => \n array (\n 'id' => 259,\n 'key' => 'production_list',\n 'en' => 'Production List',\n 'km' => 'បញ្ជីផលិតកម្ម',\n 'created_at' => '2017-09-28 08:36:02',\n 'updated_at' => '2017-09-28 08:36:02',\n ),\n 234 => \n array (\n 'id' => 260,\n 'key' => 'production_detail',\n 'en' => 'Production Detail ',\n 'km' => 'ព័ត៌មានអំពីផលិតកម្ម',\n 'created_at' => '2017-09-28 08:36:02',\n 'updated_at' => '2017-09-28 08:36:02',\n ),\n 235 => \n array (\n 'id' => 261,\n 'key' => 'purchase_list',\n 'en' => 'Purchase List',\n 'km' => 'បញ្ជីទិញ',\n 'created_at' => '2017-09-28 08:36:02',\n 'updated_at' => '2017-09-28 08:36:02',\n ),\n 236 => \n array (\n 'id' => 262,\n 'key' => 'purchase_detail',\n 'en' => 'Purchase Detail ',\n 'km' => 'ព័ត៌មានលម្អិតការទិញ',\n 'created_at' => '2017-09-28 08:36:02',\n 'updated_at' => '2017-09-28 08:36:02',\n ),\n 237 => \n array (\n 'id' => 263,\n 'key' => 'open_list',\n 'en' => 'Open List',\n 'km' => 'បញ្ជីបើកស្តុក',\n 'created_at' => '2017-09-28 08:36:02',\n 'updated_at' => '2017-09-28 08:36:02',\n ),\n 238 => \n array (\n 'id' => 264,\n 'key' => 'open_detail',\n 'en' => 'Open Detail ',\n 'km' => 'ព័ត៌មានលម្អិតការបើកស្តុក',\n 'created_at' => '2017-09-28 08:36:02',\n 'updated_at' => '2017-09-28 08:36:02',\n ),\n 239 => \n array (\n 'id' => 265,\n 'key' => 'open_item_list',\n 'en' => 'Open Item List',\n 'km' => 'បញ្ជីបើកស្តុក',\n 'created_at' => '2017-09-28 08:36:18',\n 'updated_at' => '2017-09-28 08:36:18',\n ),\n 240 => \n array (\n 'id' => 266,\n 'key' => 'sale_report',\n 'en' => 'Sale Report',\n 'km' => 'របាយការណ៍លក់',\n 'created_at' => '2017-09-28 08:36:18',\n 'updated_at' => '2017-09-28 08:36:18',\n ),\n 241 => \n array (\n 'id' => 267,\n 'key' => 'customer_report',\n 'en' => 'Customer Report',\n 'km' => 'របាយការណ៍អតិថិជន',\n 'created_at' => '2017-09-28 08:36:18',\n 'updated_at' => '2017-09-28 08:36:18',\n ),\n 242 => \n array (\n 'id' => 268,\n 'key' => 'production_report',\n 'en' => 'Production Report',\n 'km' => 'របាយការណ៍ផលិតកម្ម',\n 'created_at' => '2017-09-28 08:36:18',\n 'updated_at' => '2017-09-28 08:36:18',\n ),\n 243 => \n array (\n 'id' => 269,\n 'key' => 'purchase_report',\n 'en' => 'Purchase Report',\n 'km' => 'របាយការណ៍ទិញចូល',\n 'created_at' => '2017-09-28 08:36:18',\n 'updated_at' => '2017-09-28 08:36:18',\n ),\n 244 => \n array (\n 'id' => 270,\n 'key' => 'open_report',\n 'en' => 'Open Report',\n 'km' => 'របាយការណ៍បើកស្តុក',\n 'created_at' => '2017-09-28 08:36:18',\n 'updated_at' => '2017-09-28 08:36:18',\n ),\n 245 => \n array (\n 'id' => 271,\n 'key' => 'sale_report_detail',\n 'en' => 'Sale Report Detail ',\n 'km' => 'របាយការណ៍លំអិតពីការលក់',\n 'created_at' => '2017-09-28 08:55:02',\n 'updated_at' => '2017-09-28 08:55:02',\n ),\n 246 => \n array (\n 'id' => 272,\n 'key' => 'total_deposit',\n 'en' => 'Total Deposit',\n 'km' => 'សរុបប្រាក់កក់',\n 'created_at' => '2017-09-28 08:55:02',\n 'updated_at' => '2017-09-28 08:55:02',\n ),\n 247 => \n array (\n 'id' => 273,\n 'key' => 'total_complete_price',\n 'en' => 'Total Complete Price',\n 'km' => 'សរុបប្រាក់បង់បង្គ្រប់',\n 'created_at' => '2017-09-28 08:55:02',\n 'updated_at' => '2017-09-28 08:55:02',\n ),\n 248 => \n array (\n 'id' => 274,\n 'key' => 'total_remaining',\n 'en' => 'Total Remaining ',\n 'km' => 'សរុបប្រាក់អាប់',\n 'created_at' => '2017-09-28 08:55:02',\n 'updated_at' => '2017-09-28 08:55:02',\n ),\n 249 => \n array (\n 'id' => 275,\n 'key' => 'action',\n 'en' => 'Action ',\n 'km' => 'សកម្មភាព',\n 'created_at' => '2017-09-28 10:21:44',\n 'updated_at' => '2017-09-28 10:21:44',\n ),\n 250 => \n array (\n 'id' => 276,\n 'key' => 'total_price',\n 'en' => 'Total Price',\n 'km' => 'តម្លៃសរុប\n',\n 'created_at' => '2017-09-29 01:13:46',\n 'updated_at' => '2017-09-29 01:13:46',\n ),\n 251 => \n array (\n 'id' => 279,\n 'key' => 'open_item_detail',\n 'en' => 'Open Item Detail ',\n 'km' => 'ព័ត៌មានអំពីការបើកស្តុក',\n 'created_at' => '2017-09-29 01:55:38',\n 'updated_at' => '2017-09-29 01:55:38',\n ),\n 252 => \n array (\n 'id' => 282,\n 'key' => 'product_report',\n 'en' => 'Product Report',\n 'km' => 'របាយការណ៍អំពីផលិតផល',\n 'created_at' => '2017-09-30 04:43:35',\n 'updated_at' => '2017-09-30 04:43:35',\n ),\n 253 => \n array (\n 'id' => 283,\n 'key' => 'products_in/out',\n 'en' => 'Products In/Out',\n 'km' => 'ស្តុក ចូល/ចេញ',\n 'created_at' => '2017-09-30 04:43:35',\n 'updated_at' => '2017-09-30 04:43:35',\n ),\n 254 => \n array (\n 'id' => 286,\n 'key' => 'product_in/out_stock',\n 'en' => 'Product In/Out Stock',\n 'km' => 'ស្តុក ចូល/ចេញ',\n 'created_at' => '2017-10-03 02:24:56',\n 'updated_at' => '2017-10-03 02:24:56',\n ),\n 255 => \n array (\n 'id' => 287,\n 'key' => 'begin',\n 'en' => 'Begin',\n 'km' => 'ចាប់ផ្តើមស្តុក',\n 'created_at' => '2017-10-03 02:24:58',\n 'updated_at' => '2017-10-03 02:24:58',\n ),\n 256 => \n array (\n 'id' => 288,\n 'key' => 'total_in',\n 'en' => 'Total In',\n 'km' => 'សរុបស្តុកចូល',\n 'created_at' => '2017-10-03 02:24:58',\n 'updated_at' => '2017-10-03 02:24:58',\n ),\n 257 => \n array (\n 'id' => 289,\n 'key' => 'total_out',\n 'en' => 'Total Out',\n 'km' => 'សរុបស្តុកចេញ',\n 'created_at' => '2017-10-03 02:24:58',\n 'updated_at' => '2017-10-03 02:24:58',\n ),\n 258 => \n array (\n 'id' => 290,\n 'key' => 'balance',\n 'en' => 'Balance',\n 'km' => 'តុល្យភាព',\n 'created_at' => '2017-10-03 02:24:58',\n 'updated_at' => '2017-10-03 02:24:58',\n ),\n 259 => \n array (\n 'id' => 291,\n 'key' => 'profit_report',\n 'en' => 'Profit Report',\n 'km' => 'របាយការណ៍ចំណូល',\n 'created_at' => '2017-10-03 02:32:00',\n 'updated_at' => '2017-10-03 02:32:00',\n ),\n 260 => \n array (\n 'id' => 292,\n 'key' => 'last_item_code',\n 'en' => 'Last Item Code',\n 'km' => 'លេខកូដចុងក្រោយ',\n 'created_at' => '2017-10-08 17:17:48',\n 'updated_at' => '2017-10-08 17:17:48',\n ),\n 261 => \n array (\n 'id' => 293,\n 'key' => 'photo',\n 'en' => 'Photo',\n 'km' => 'រូបភាព',\n 'created_at' => '2017-10-08 17:22:40',\n 'updated_at' => '2017-10-08 17:22:40',\n ),\n 262 => \n array (\n 'id' => 294,\n 'key' => 'role',\n 'en' => 'Role',\n 'km' => 'តូនាទី',\n 'created_at' => '2017-10-08 17:22:40',\n 'updated_at' => '2017-10-08 17:22:40',\n ),\n 263 => \n array (\n 'id' => 295,\n 'key' => 'user_name',\n 'en' => 'Username',\n 'km' => 'ឈ្មោះអ្នកប្រើប្រាស់\n',\n 'created_at' => '2017-10-08 17:22:40',\n 'updated_at' => '2017-10-08 17:22:40',\n ),\n 264 => \n array (\n 'id' => 296,\n 'key' => 'e-mail',\n 'en' => 'E-mail',\n 'km' => 'អ៊ីម៉ែល',\n 'created_at' => '2017-10-08 17:22:40',\n 'updated_at' => '2017-10-08 17:22:40',\n ),\n 265 => \n array (\n 'id' => 297,\n 'key' => 'password_confirm',\n 'en' => 'Password Confirm',\n 'km' => 'បញ្ជាក់ពាក្យសម្ងាត់',\n 'created_at' => '2017-10-08 17:22:40',\n 'updated_at' => '2017-10-08 17:22:40',\n ),\n 266 => \n array (\n 'id' => 298,\n 'key' => 'sale_report_detial',\n 'en' => 'Sale Report Detail',\n 'km' => 'របាយការណ៍លំអិតពីការលក់',\n 'created_at' => '2017-10-08 17:37:30',\n 'updated_at' => '2017-10-08 17:37:30',\n ),\n 267 => \n array (\n 'id' => 299,\n 'key' => 'production_item_list',\n 'en' => 'Production Item List',\n 'km' => 'បញ្ជីផលិតកម្ម',\n 'created_at' => '2017-10-08 17:37:47',\n 'updated_at' => '2017-10-08 17:37:47',\n ),\n 268 => \n array (\n 'id' => 300,\n 'key' => 'production_item_detail',\n 'en' => 'Production Item Detail',\n 'km' => 'ព័ត៌មានអំពីផលិតកម្ម',\n 'created_at' => '2017-10-08 17:37:52',\n 'updated_at' => '2017-10-08 17:37:52',\n ),\n 269 => \n array (\n 'id' => 301,\n 'key' => 'users',\n 'en' => 'Users ',\n 'km' => 'អ្នកប្រើប្រាស់',\n 'created_at' => '2017-10-08 17:52:34',\n 'updated_at' => '2017-10-08 17:52:34',\n ),\n ));\n \n \n }",
"function languages($args, &$request) {\n\t\t$this->validate();\n\t\t$this->setupTemplate(true);\n\n\t\t$site =& $request->getSite();\n\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$templateMgr->assign('localeNames', AppLocale::getAllLocales());\n\t\t$templateMgr->assign('primaryLocale', $site->getPrimaryLocale());\n\t\t$templateMgr->assign('supportedLocales', $site->getSupportedLocales());\n\t\t$localesComplete = array();\n\t\tforeach (AppLocale::getAllLocales() as $key => $name) {\n\t\t\t$localesComplete[$key] = AppLocale::isLocaleComplete($key);\n\t\t}\n\t\t$templateMgr->assign('localesComplete', $localesComplete);\n\n\t\t$templateMgr->assign('installedLocales', $site->getInstalledLocales());\n\t\t$templateMgr->assign('uninstalledLocales', array_diff(array_keys(AppLocale::getAllLocales()), $site->getInstalledLocales()));\n\t\t$templateMgr->assign('helpTopicId', 'site.siteManagement');\n\n\t\timport('classes.i18n.LanguageAction');\n\t\t$languageAction = new LanguageAction();\n\t\tif ($languageAction->isDownloadAvailable()) {\n\t\t\t$templateMgr->assign('downloadAvailable', true);\n\t\t\t$templateMgr->assign('downloadableLocales', $languageAction->getDownloadableLocales());\n\t\t}\n\n\t\t$templateMgr->display('admin/languages.tpl');\n\t}",
"private function addModuleLanguageSwitcher()\n\t{\n\t\t$tableModule = Table::getInstance('Module', 'Joomla\\\\CMS\\\\Table\\\\');\n\n\t\t$moduleData = array(\n\t\t\t'id' => 0,\n\t\t\t'title' => 'Language Switcher',\n\t\t\t'note' => '',\n\t\t\t'content' => '',\n\t\t\t'position' => 'sidebar-right',\n\t\t\t'module' => 'mod_languages',\n\t\t\t'access' => 1,\n\t\t\t'showtitle' => 0,\n\t\t\t'params' =>\n\t\t\t\t'{\"header_text\":\"\",\"footer_text\":\"\",\"dropdown\":\"0\",\"image\":\"1\",\"inline\":\"1\",\"show_active\":\"1\",'\n\t\t\t\t. '\"full_name\":\"1\",\"layout\":\"_:default\",\"moduleclass_sfx\":\"\",\"cache\":\"0\",\"cache_time\":\"900\",\"cachemode\":\"itemid\",'\n\t\t\t\t. '\"module_tag\":\"div\",\"bootstrap_size\":\"0\",\"header_tag\":\"h3\",\"header_class\":\"\",\"style\":\"0\"}',\n\t\t\t'client_id' => 0,\n\t\t\t'language' => '*',\n\t\t\t'published' => 1,\n\t\t\t'rules' => array(),\n\t\t);\n\n\t\t// Bind the data.\n\t\tif (!$tableModule->bind($moduleData))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check the data.\n\t\tif (!$tableModule->check())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Store the data.\n\t\tif (!$tableModule->store())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $this->addModuleInModuleMenu((int) $tableModule->id);\n\t}",
"public function getLanguageList();",
"function language() {\n\t// Flip the language and go back\n\tCakeLog::write('debug', 'language: ' . print_r($this->request->named, true));\n\t$language = $this->request->named['new_language'];\n\n\tif (!empty($language)) {\n\t $referer = Router::normalize($this->referer(null, true));\n\t $urlRoute = Router::parse($referer);\n\t $urlRoute['language'] = $language;\n\t $urlRoute['url'] = array();\n\t $this->log(Router::reverse($urlRoute));\n\t $url = Router::normalize(Router::reverse($urlRoute));\n\t $this->params['language'] = $language;\n\t $this->redirect($url);\n\t} else {\n\t $this->redirect($this->referer());\n\t}\n }",
"public function run()\n {\n\t\t$spanish_id = DB::table('languages')->insertGetId(['name' => 'Español', 'code' => 'ES']);\n\t\t$english_id = DB::table('languages')->insertGetId(['name' => 'Inglés', 'code' => 'EN']);\n\t\t$portuguese_id = DB::table('languages')->insertGetId(['name' => 'Portugués', 'code' => 'PT']);\n }",
"protected function setLanguage() {\r\n\t\t$this->language = $GLOBALS['TSFE']->config['config']['language'];\r\n\t}",
"public function loadLanguage()\n {\n load_plugin_textdomain('rd-events', false, dirname(plugin_basename(RDEVENTS_FILE)) . '/App/languages/');\n }",
"protected function getLanguageSelection() {}",
"function testLanguage()\r\n {\r\n\t\tglobal $webUrl, $SERVER, $DATABASE;\r\n\r\n // Locate the list page of language.\r\n\t\t$this->assertTrue($this->get(\"$webUrl/languages.php\", array(\r\n\t\t\t 'server' => $SERVER,\r\n\t\t\t\t\t\t'database' => $DATABASE,\r\n\t\t\t\t\t\t'subject' => 'database'))\r\n\t\t\t\t\t);\r\n\r\n $this->assertWantedPattern('/sql/');\r\n\r\n return TRUE;\r\n }",
"function load_language($language,$class){\n\t}",
"private function _get_translations_from_db () {\n\n\t\ttry {\n\n\t\t\t$db = Db::init();\n\n\t\t\t$sql = 'SELECT key_word, value\n\t\t\t\t\tFROM arka_web.language\n\t\t\t\t\tWHERE lang = :lang';\n\n\t\t\t$sth = $db->dbh->prepare($sql);\n\n\t\t\t$sth->execute(array(':lang' => $this->lang));\n\n\t\t\t$t = $sth->fetchAll(PDO::FETCH_COLUMN|PDO::FETCH_GROUP);\n\n\t\t\treturn array_map('reset', $t );\n\n\t\t} catch (\\PDOException $e) {\n\n\t\t\techo '<b>Error [' . $e->getLine() . ']: </b>' . $e->getMessage();\n\n\t\t}//end catch\n\n\t}",
"protected function migration_process() {\n\t\t$available_languages = Fusion_Multilingual::get_available_languages();\n\t\tself::$available_languages = ( ! empty( $available_languages ) ) ? $available_languages : [ '' ];\n\n\t\t$this->migrate_options();\n\t}",
"function pnLangLoad()\n{\n\t// See if a language update is required\n $newlang = pnVarCleanFromInput('newlang');\n if (!empty($newlang)) {\n $lang = $newlang;\n pnSessionSetVar('lang', $newlang);\n } else {\n $detectlang = pnConfigGetVar('language_detect');\n $defaultlang = pnConfigGetVar('language');\n\n switch ($detectlang) { \n case 1: // Detect Browser Language\n\t\t $cnvlanguage=cnvlanguagelist();\n $currentlang='';\n \t $langs = preg_split ('/[,;]/',$_SERVER['HTTP_ACCEPT_LANGUAGE']);\n \t foreach ($langs as $lang) {\n \t \t if (isset($cnvlanguage[$lang]) && file_exists('language/' . pnVarPrepForOS($cnvlanguage[$lang]) . '/global.php')) {\n \t \t $currentlang=$cnvlanguage[$lang];\n \t \t break;\n \t \t }\n \t }\n if ($currentlang=='')\n \t $currentlang=$defaultlang;\n \t \t break;\n default:\n $currentlang=$defaultlang; \n }\n $lang = pnSessionGetVar('lang');\n }\n \n // Load global language defines\n\t// these are deprecated and will be moved to the relevant modules\n\t// with .8x\n if (isset ($lang) && file_exists('language/' . pnVarPrepForOS($lang) . '/global.php')) {\n $currentlang = $lang;\n } else {\n $currentlang = pnConfigGetVar('language');\n pnSessionSetVar('lang', $currentlang);\n }\n\t$oscurrentlang = pnVarPrepForOS($currentlang);\n\tif (file_exists('language/' . $oscurrentlang . '/global.php')) {\n\t include 'language/' . $oscurrentlang . '/global.php';\n\t}\n\n\t// load the languge language file\n\tif (file_exists('language/languages.php')) {\n\t\tinclude 'language/languages.php';\n\t}\n\n\t// load the core language file\n\tif (file_exists('language/' . $oscurrentlang . '/core.php')) {\n\t\tinclude 'language/' . $oscurrentlang . '/core.php';\n\t}\n\n\t// V4B RNG\n\tif (file_exists('language/' . $oscurrentlang . '/v4blib.php')) {\n\t\tinclude 'language/' . $oscurrentlang . '/v4blib.php';\n\t}\n\t// V4B RNG\n\n\t// set the correct locale\n\t// note: windows has different requires for the setlocale funciton to other OS's\n\t// See: http://uk.php.net/setlocale\n\tif (stristr(getenv('OS'), 'windows')) {\n\t\t// for windows we either use the _LOCALEWIN define or the existing language code\n\t\tif (defined('_LOCALEWIN')) {\n\t\t\tsetlocale(LC_ALL, _LOCALEWIN);\n\t\t} else {\n\t\t\tsetlocale(LC_ALL, $currentlang);\n\t\t}\n\t} else {\n\t\t// for other OS's we use the _LOCALE define\n\t\tsetlocale(LC_ALL, _LOCALE);\n\t}\n}"
] | [
"0.6871785",
"0.656806",
"0.65488565",
"0.6195094",
"0.617388",
"0.6165846",
"0.6135659",
"0.6128798",
"0.612598",
"0.6101056",
"0.6074891",
"0.6053158",
"0.603088",
"0.6028652",
"0.59692013",
"0.5956118",
"0.59560937",
"0.59263116",
"0.58827335",
"0.5870374",
"0.5822563",
"0.58167875",
"0.58138174",
"0.57897484",
"0.5788965",
"0.5780315",
"0.57721364",
"0.57672083",
"0.57627106",
"0.5760308",
"0.57405514",
"0.5734519",
"0.5733918",
"0.5732457",
"0.572965",
"0.5716109",
"0.57154524",
"0.5712941",
"0.5712908",
"0.5701299",
"0.5667945",
"0.5656817",
"0.5655699",
"0.56424356",
"0.5639661",
"0.5632505",
"0.5612169",
"0.56111693",
"0.56025535",
"0.5600835",
"0.55961716",
"0.5590805",
"0.55906844",
"0.5589098",
"0.5580691",
"0.5578451",
"0.55637777",
"0.55587244",
"0.5555726",
"0.5553178",
"0.55473554",
"0.55466855",
"0.5542282",
"0.5529811",
"0.5523861",
"0.55185497",
"0.5518456",
"0.5508843",
"0.5507894",
"0.55069876",
"0.5503818",
"0.54938847",
"0.54903835",
"0.5485004",
"0.5478839",
"0.54696804",
"0.5468359",
"0.5467648",
"0.54675007",
"0.5443932",
"0.54417056",
"0.5439303",
"0.5438859",
"0.543848",
"0.5437543",
"0.5435342",
"0.54345787",
"0.54247975",
"0.5411146",
"0.54025525",
"0.5402148",
"0.53946203",
"0.5387615",
"0.53849685",
"0.538267",
"0.5379455",
"0.5375944",
"0.53737843",
"0.5372053",
"0.5369902"
] | 0.5956642 | 15 |
Activate Apps From DB. | public function activateApp(Request $request)
{
Apps::where('title', 'service')->update( ['active' => $request->get("service_Activate")]);
Apps::where('title', 'project')->update( ['active' => $request->get("project_Activate")]);
Apps::where('title', 'product')->update( ['active' => $request->get("product_Activate")]);
Apps::where('title', 'blog')->update( ['active' => $request->get("blog_Activate")]);
Apps::where('title', 'video')->update( ['active' => $request->get("video_Activate")]);
Apps::where('title', 'photo')->update( ['active' => $request->get("photo_Activate")]);
Apps::where('title', 'slider')->update( ['active' => $request->get("slider_Activate")]);
Apps::where('title', 'team')->update( ['active' => $request->get("team_Activate")]);
Apps::where('title', 'testimonial')->update(['active' => $request->get("testimonial_Activate")]);
Apps::where('title', 'partner')->update( ['active' => $request->get("partner_Activate")]);
Apps::where('title', 'pages')->update( ['active' => $request->get("pages_Activate")]);
Apps::where('title', 'workhours')->update( ['active' => $request->get("workhours_Activate")]);
Apps::where('title', 'contactus')->update( ['active' => $request->get("contactus_Activate")]);
Apps::where('title', 'bookings')->update( ['active' => $request->get("bookings_Activate")]);
Apps::where('title', 'why_us')->update( ['active' => $request->get("why_us_Activate")]);
return redirect()->to('/admin-panel');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function AppActivate ( $app )\n\t {\n\t\t$this -> ShellInstance -> AppActivate ( $app ) ;\n\t }",
"public function activateApp($teamid, $appid)\n {\n $user = Auth::user(); \n $result = UserActiveApp::processUpdates($user->id, $appid);\n\n return redirect()->route('apps.show', ['teamid' => $teamid]);\n }",
"public function apps($app) {\n \n // Check if the current user is admin and if session exists\n $this->check_session($this->user_role, 0);\n \n // Verify if account is confirmed\n $this->_check_unconfirmed_account();\n \n // Prepare the app\n $app = str_replace('-', '_', $app);\n\n // Verify if the app exists\n if ( is_dir( APPPATH . '/apps/collection/' . $app . '/' ) ) {\n \n if ( $app === 'dashboard' ) {\n \n // Get the user's plan\n $user_plan = get_user_option( 'plan' );\n \n // Verify if user has a plan, if no add default plan\n if ( !$user_plan ) {\n $this->plans->change_plan(1, $this->user_id);\n redirect('user/app/' . $app . '/');\n }\n\n // Get plan end\n $plan_end = get_user_option( 'plan_end', $this->user_id );\n\n $expired = 0;\n\n $expires_soon = 0;\n\n if ( $plan_end ) {\n\n if ( strtotime($plan_end) < time() ) {\n\n $expired = 1;\n $this->plans->delete_user_plan($this->user_id);\n\n } elseif ( strtotime($plan_end) < time() + 432000 ) {\n\n $expires_soon = 1;\n\n }\n\n }\n \n } \n \n // Require the Apps class\n $this->load->file( APPPATH . '/apps/main.php' );\n\n // Call the apps class\n $apps = new MidrubApps\\MidrubApps();\n \n // Call the user controller\n $red = $apps->user_init($app);\n \n } else {\n \n show_404();\n \n }\n \n }",
"private function autodiscoverApps()\n {\n $path = APPSDIR;\n\n if (!is_array($path)) {\n $path = (array) $path;\n }\n\n foreach ($path as $apps_dir) {\n\n if (is_dir($apps_dir)) {\n\n if (($dh = opendir($apps_dir)) !== false) {\n\n while (($name = readdir($dh)) !== false) {\n\n if ($name{0} == '.' || $name == 'Core' || is_file($apps_dir . '/' . $name)) {\n continue;\n }\n\n $app = $this->getAppInstance($name);\n }\n\n closedir($dh);\n }\n }\n }\n }",
"public function start_app_backup() {\n \n // Backups the files to update and save update\n (new MidrubBaseAdminCollectionUpdateHelpers\\Apps)->start_backup();\n \n }",
"public function activate() \n {\n global $wpdb;\n\n if ( is_multisite() ) {\n\n $blog_ids = $wpdb->get_col( \"SELECT blog_id FROM $wpdb->blogs\" );\n foreach ( $blog_ids as $blog_id ) {\n switch_to_blog( $blog_id );\n $this->create_table();\n restore_current_blog();\n }\n } else {\n $this->create_table();\n }\n\t}",
"public function setActiveEntry($appId);",
"public function activate(): void\n {\n if ($this->selectedRowsQuery->count() > 0) {\n Role::whereIn('id', $this->selectedKeys())->update(['is_active' => 1]);\n }\n\n $this->resetSelected();\n }",
"private function initApps()\n {\n\n // Run app specfic functions\n\n /* @var $app \\Core\\Amvc\\App\\Abstractapp */\n foreach ($this->apps as $app) {\n\n // Call additional Init() methods in apps\n if (method_exists($app, 'Init')) {\n $app->Init();\n }\n\n switch ($app->getName()) {\n case 'Core':\n\n $config = $this->config->getStorage('Core');\n\n // Create home url\n $type = $this->user->isGuest() ? 'guest' : 'user';\n $route = $config->get('home.' . $type . '.route');\n $params = parse_ini_string($config->get('home.' . $type . '.params'));\n\n $config->set('url.home', $app->url($route, $params));\n\n break;\n }\n }\n }",
"private static function activate($api, $db)\n {\n try {\n $db->get_table_meta(PERCH_DB_PREFIX . self::DB_TABLE);\n } catch (\\PDOException $e) {\n $Queue = new Queue($api);\n $Queue->attempt_install();\n }\n\n\n }",
"public function activate_user() {\n global $database;\n $sql = \"UPDATE user SET is_active = 1 WHERE id = \";\n $sql .= $database->escape_value($this->id);\n $database->query($sql);\n }",
"public static function on_activate() {\n self::create_tables();\n }",
"public function activate()\n {\n Cleeng_Core::load('Cleeng_WpClient');\n Cleeng_Client::checkCompatibility();\n $this->migrate_database();\n //$cleengAdmin = Cleeng_Core::load('Cleeng_Admin');\n //$cleengAdmin->message(\"Cleeng for WordPress installed.\");\n }",
"protected function enableApplicationsPeriod()\n {\n $settings = app('settings');\n $settings->applications_start_at = Carbon::yesterday();\n $settings->applications_end_at = Carbon::tomorrow();\n $settings->min_team_members = 2;\n $settings->max_team_members = 4;\n $settings->save();\n }",
"public function changeActiveStatus($appName, $active);",
"public static function activate() {\n global $wpdb;\n\n $sql = \"CREATE TABLE \" . self::tableName() . \" (\n ID bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,\n user_login varchar(255) NOT NULL,\n user_id bigint(20) UNSIGNED NOT NULL,\n remote_ip varchar(43),\n user_agent text,\n logged_in_at timestamp NOT NULL,\n UNIQUE KEY ID (ID),\n INDEX (logged_in_at)\n );\";\n\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n dbDelta($sql);\n }",
"public function UsersApps()\n {\n \treturn DB::table('apps')\n ->where('users_id',\\Auth::user()->id)\n ->orderBy('updated_at', 'desc')\n ->get();\n }",
"protected function setUpDatabase($app)\n {\n parent::setUpDatabase($app);\n\n $app[Tenant::class]->create(['tenant_name' => 'testTenant', 'app_code' => 'FOOBAR']);\n $app[Tenant::class]->create(['tenant_name' => 'testTenant2', 'app_code' => 'BARFOO']);\n }",
"public function active_user($db,$data) {\n\n $sql=\"UPDATE user SET activate=true where token='$data'\";\n return $db->ejecutar($sql);\n }",
"static function handle_activate()\n\t{\n\t\tself::handle_multi_site( 'activate' );\n\t}",
"public static function activate() {\n\t\t// We're already on the latest schema version.\n\t\tif ( (int) self::$table_version === (int) get_option( self::SCHEMA_VERSION_KEY ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tself::install_tables();\n\t}",
"public static function activate() {\n\t\t\t\n\t\t\tglobal $wpdb;\n\t\t\t$db_table_name = $wpdb->prefix . 'csms_history_table'; // table name\n\t\t\t$charset_collate = $wpdb->get_charset_collate();\n\t\t\t\n\t\t\t//Check to see if the table exists already, if not, then create it\n\t\t\tif ( $wpdb->get_var( \"show tables like '$db_table_name'\" ) != $db_table_name ) {\n\t\t\t\t$sql = \"CREATE TABLE $db_table_name (\n id int(11) NOT NULL auto_increment,\n user_id varchar(15) NOT NULL,\n post_id varchar(60) NOT NULL,\n date varchar (255)NOT NULL,\n time varchar (255)NOT NULL,\n<<<<<<< HEAD\n current_time_date TIMESTAMP,\n=======\n status varchar(100)NOT NULL,\n>>>>>>> 5a3bcb7608f6ce334109bfb2760bdb2174605eb0\n UNIQUE KEY id (id)\n ) $charset_collate;\";\n\t\t\t\t\n\t\t\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\t\t\tdbDelta( $sql );\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}",
"function myplugin_activate_dbtables( $tables, $datas ) {\n\n\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php'); # this runs the WordPress database table upgrade codex.\n\n\tforeach ($tables as $table_name => $sql) {\n\n\t\t$new_installation = $wpdb->get_var(\"show tables like '$table_name'\") != $table_name; #detects if this is a new installation or simply an update.\n\t\tdbDelta($sql);\n\n\t\tif ($new_installation)\n\t\t{\n\t\t\t$wpdb->query( $datas[$table_name] );\n\t\t}\n\t}\n}",
"public function activate();",
"public function activate();",
"public function activate() {\n\t\t// TODO define activation functionality here\n\t}",
"private function activate(){\r\n \r\n //show the current application 'page'\r\n \r\n switch($_GET['wapi']){\r\n case \"demo\":\r\n \r\n $fileArray=array(\"app\".DS.\"display\".DS.\"demo\".DS.\"demo.php\");\r\n \r\n break;\r\n case \"outbox\":\r\n \r\n $fileArray=array(\"app\".DS.\"display\".DS.\"outbox\".DS.\"outbox.php\");\r\n \r\n break;\r\n case \"manage\":\r\n \r\n $fileArray=array(\"app\".DS.\"display\".DS.\"manage\".DS.\"manage.php\");\r\n \r\n break;\r\n }//switch\r\n \r\n //if fileArray is set, create an AmbaView object\r\n if(isset($fileArray)){\r\n \r\n $model=new \\Amba\\Core\\AmbaModel();\r\n \r\n $controller=new \\Amba\\Core\\AmbaController($model);\r\n \r\n $view=new \\Amba\\Core\\AmbaView($controller,$fileArray);\r\n \r\n $view->load();\r\n \r\n }//if\r\n \r\n }",
"public function run()\n {\n $states = config('app_state');\n foreach ($states as $value) {\n AppState::firstOrCreate(['name' => $value['name']], $value);\n }\n }",
"public function activate(){\r\n\t\t$uid = $_GET[\"uid\"];\r\n\t\t$hash = $_GET[\"hash\"];\r\n\r\n\t\tif(User::activateUser($uid, $hash)){\r\n\t\t\techo \"active\";\r\n\t\t\tUser::loginSystem(User::fromUid($uid));\r\n\t\t}\r\n\t\tPage::redirect(\"/index\");\r\n\t}",
"protected function setUpDatabase($app)\n {\n\n }",
"private function updAppTable(){\n \n $app = App::find($this->id);\n $app->public = (($this->app[\"active\"]) ? 1 : 0);\n $app->security = (($this->app[\"security\"][\"active\"]) ? 1 : 0);\n $app->token = $this->app[\"security\"][\"token\"];\n $app->structure = json_encode($this->json);\n\n $result = $app->save();\n\n return $result;\n }",
"public static function activate() {\n\n }",
"public function IVS_Store_activation(){\n\n\n\t\t\t\t$ivs_store_configuration_table=\"ivs_store_configurations\";\n\n\t\t\t\tif($this->db_connection->get_var(\"SHOW TABLES LIKE '$ivs_store_configuration_table'\") != $ivs_store_configuration_table) {\n\t\t\t\t\t$query=\"CREATE TABLE $ivs_store_configuration_table(\n\t\t\t\t\t\t\tconfiguration_id int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\t\t\t\tclient_id VARCHAR(200),\n\t\t\t\t\t\t\tclient_secret VARCHAR(200)\n\t\t\t\t\t\t)\";\n\t\t\t\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\t\t\t dbDelta( $query );\n\t\t\t\t}\n\n\t\t\t}",
"public function activate_backupset() {\n\n $backupset_id = $this->get_id();\n $query = \"UPDATE backupset set active=1 where id=:id\";\n $params = array(\"id\"=>$backupset_id);\n $result = $this->db->get_query_result($query, $params);\n $return_result = array(\"RESULT\"=>TRUE,\n \"MESSAGE\"=>\"Backupset \".$this->get_name() . \" successfully activated.\");\n\n return $return_result;\n }",
"public function activate_account(){\n $db = \\Config\\Database::connect();\n $m = $db->table('ff_users');\n\n $uri = service('uri');\n $id = $uri->getsegment('2');\n\n $q = ask_db('user_id','ff_users',['random_key'=>\"'$id'\"]);\n\n if(!empty($q)){\n $data = ['is_active' =>'1'];\n\n $m->where('random_key', $id);\n $m->update($data);\n\n $_SESSION['success'] = 'Account is successfully activated';\n } else {\n $_SESSION['error'] = 'There was an error in activating your account, kindly respond to the activation email';\n }\n\n\n\n return redirect('login');\n\n\n }",
"public function activate() {\n\t\t\n\t}",
"public static function on_activation() {\r\n // dbDelta has too many weird things...\r\n require_once(__DIR__ . '/migrations.php');\r\n api_bearer_auth_migrate();\r\n }",
"public function activate(PropelPDO $con = null)\n {\n $this->setIsActive(true);\n $this->save($con);\n }",
"static function activate()\n\t{\n\t\tif ( JUMPLEAD_VERSION != get_site_option( 'jumplead_version' ) ) {\n\t\t\tglobal $wpdb;\n\n\t\t\t$charset_collate = '';\n\n\t\t\tif ( ! empty($wpdb->charset) ) {\n\t\t\t\t$charset_collate = \"DEFAULT CHARACTER SET {$wpdb->charset}\";\n\t\t\t}\n\n\t\t\tif ( ! empty( $wpdb->collate) ) {\n\t\t\t\t$charset_collate .= \" COLLATE {$wpdb->collate}\";\n\t\t\t}\n\n\t\t\t// Mappings\n\t\t\t$sql = 'CREATE TABLE ' . self::$tableFieldMapping . \" (\n\t\t\t\t`id` int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\t`integration_id` varchar(100) NOT NULL,\n\t\t\t\t`form_id` int NOT NULL,\n\t\t\t\t`automation_id` varchar(100),\n\t\t\t\t`name` varchar(255),\n\t\t\t\t`name_last` varchar(255),\n\t\t\t\t`email` varchar(255),\n\t\t\t\t`company` varchar(255)\n\t\t\t) $charset_collate;\";\n\n\t\t\tdbDelta( $sql );\n\n\t\t\tupdate_option( 'jumplead_version', JUMPLEAD_VERSION );\n\t\t}\n\t}",
"public function actionActivate()\n {\n $username = $this->prompt(Console::convertEncoding(Yii::t('app', 'Username')) . ':', [\n 'required' => true\n ]);\n $model = $this->findModel($username);\n $model->status = User::STATUS_ACTIVE;\n $model->removeEmailConfirmToken();\n $this->log($model->save());\n }",
"public function activate()\n {\n $this->op->request('POST', '/api/prom/configs/restore', [\n 'headers' => [\n 'X-Scope-OrgID' => $this->consumerId,\n ]\n ]);\n }",
"function activate() {\n $existing_blogname = $this->ext->get_option( 'livefyre_blogname', false );\n if ( $existing_blogname ) {\n $site_id = $existing_blogname;\n $existing_key = $this->ext->get_option( 'livefyre_secret', false );\n update_option('livefyre_apps-'. 'livefyre_site_id', $site_id );\n $this->ext->delete_option( 'livefyre_blogname' );\n update_option('livefyre_apps-'. 'livefyre_site_key', $existing_key );\n $this->ext->delete_option( 'livefyre_secret' );\n } else {\n $site_id = get_option('livefyre_apps-livefyre_site_id', false );\n }\n \n if ( !get_option('livefyre_apps-livefyre_domain_name', false) ) {\n // Initialize default profile domain i.e. livefyre.com\n $defaultDomainName = get_option('livefyre_apps-livefyre_domain_name', LF_DEFAULT_PROFILE_DOMAIN);\n update_option('livefyre_apps-'. 'livefyre_domain_name', $defaultDomainName );\n } \n if ( !get_option('livefyre_apps-livefyre_auth_delegate_name', false) ) {\n $defaultDelegate = get_option('livefyre_apps-livefyre_auth_delegate_name', '');\n update_option('livefyre_apps-'. 'livefyre_auth_delegate_name', $defaultDelegate );\n } \n if ( !get_option('livefyre_apps-livefyre_domain_key', false) ) {\n $defaultKey = get_option('livefyre_apps-livefyre_domain_key', ''); \n update_option('livefyre_apps-'. 'livefyre_domain_key', $defaultKey );\n }\n \n if ( !$this->ext->get_option( 'livefyre_v3_installed', false ) ) {\n // Set a flag to show the 'hey you just upgraded' (or installed) flash message\n // Set the timestamp so we know which posts use V2 vs V3\n if ( $site_id ) {\n $this->ext->update_option( 'livefyre_v3_installed', current_time('timestamp') );\n $this->ext->update_option( 'livefyre_v3_notify_upgraded', 1 );\n $this->run_backfill( $site_id ); //only run backfill on existing blogs\n } else {\n // !IMPORTANT\n // livefyre_v3_installed == 0 is used elsewhere to determine if this\n // installation was derived from a former V2 installation\n $this->ext->update_option( 'livefyre_v3_installed', 0 );\n $this->ext->update_option( 'livefyre_v3_notify_installed', 1 );\n $this->ext->update_option( 'livefyre_backend_upgrade', 'skipped' );\n }\n }\n }",
"public function run()\n {\n Model::unguard();\n DB::table('activations')->insert([\n [\n 'user_id' => 2,\n 'code' => 'B8To77PhPQUATdpYipQGoQeseQPjG6cD',\n 'completed' => 1,\n 'completed_at'=> '2019-12-19 13:10:33',\n 'created_at' => '2019-12-19 13:10:33',\n 'updated_at' => '2019-12-19 13:10:33'\n ]\n ]);\n }",
"private function getOneUserApp() {\n $this->user_panel->checkAuthAdmin();\n $this->user_app->findOne();\n }",
"public static function activate(){\n }",
"public function run()\n {\n DB::table(\"apps\")->delete();\n\n App::create([\n 'client_id' => 'koala',\n 'name' => 'Koala',\n 'author_id' => 1,\n 'homepage_url' => 'http://121.42.144.117:2111',\n 'logo_url' => 'https://www.prepbootstrap.com/bootstrap-theme/shield/preview/images/team/team04.jpg',\n 'description' => '西邮Linux兴趣小组资源管理平台',\n 'secret' => '$2y$10$8Gz5X7XkQtVzwFU8C9zSQ.FzIH6OZNd5D',\n 'redirect_uri' => 'http://121.42.144.117:2111/connect/adam/callback',\n 'status' => 3,\n 'submit_status' => 3,\n 'scopes' => 'all'\n ]);\n }",
"public function activate() {\n\t\t\t// just in case I want to do anything on activate\n\t\t}",
"function mhm_memberpress_clickbank_db_activate() {\n\tglobal $wpdb;\n\n\n\t$table_name = $wpdb->prefix . \"mhm_memberpress_clickbank_memberpress_products\";\n\tif($wpdb->get_var(\"SHOW TABLES LIKE '$table_name'\") != $table_name) \n\t{\n\t\t\n\t\t$sql = \"CREATE TABLE \" . $table_name . \" (\n\t\t\tid mediumint(9) NOT NULL AUTO_INCREMENT,\n\t\t\tmemberpress_id mediumint(9) NOT NULL,\n\t\t\tproduct_id mediumint(9) NOT NULL,\n\t\t\tprice VARCHAR(30) NOT NULL,\n\t\t\tsku VARCHAR(255),\n\t\t\tcreated_at timestamp,\n\n\t\t\tPRIMARY KEY (id)\n\n\t\t);\";\n\n\t\t$results = $wpdb->query( $sql );\n\n\t\trequire_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n\t\tdbDelta($sql);\n\t}\n\n\n}",
"public static function activate()\n {\n }",
"public function activateAccount($token) {\n $status = [\n 'approval_status' => 1,\n 'privilege' => 1\n ];\n\n $db = \\Config\\Database::connect();\n $builder = $db->table('users');\n\n return $builder->where('approval_token', $token)\n ->update($status);\n }",
"private static function single_activate() {\n\t\t// @TODO: Define activation functionality here\n\t}",
"private static function single_activate() {\n\t\t// @TODO: Define activation functionality here\n\t}",
"public static function _activate()\n\t{\n\t\t$parent_id = self::create_parent();\n\n\t\tif( !$parent_id || is_wp_error($parent_id) || empty($parent_id) )\n\t\t\terror_log('ABNOT@activate: Parent create error!');\n\n\t\telse foreach( self::$tools as $tool => $t )\n\t\t{\n\t\t\t$pid = get_page_by_title($t['title'], 'OBJECT', 'page');\n\n\t\t\tif( !$pid || is_wp_error($pid) )\n\t\t\t\tself::create_page($t['title'], $t['shortcode'], $parent_id);\n\n\t\t\telse wp_update_post(array('ID' => $pid->ID, 'post_status' => 'publish'));\n\t\t}\n\t}",
"public function initApps()\n {\n if (count($this->apps) > 0) {\n throw new AlreadyInitiatedException('The apps are already loaded!');\n }\n\n foreach ($this->appList as $className) {\n $instance = new $className($this);\n $this->apps->append($instance);\n }\n\n // Let the apps configure itself.\n foreach ($this->apps as $app) {\n $app->load();\n }\n\n // Let the apps register it parts.\n foreach ($this->apps as $app) {\n $app->registerRoutes(Router::getInstance());\n }\n }",
"public function run()\n {\n //\n $apps = [\n [\n \"app_code\" => \"HRIS\",\n \"app_title\" => \"HRIS System\",\n \"app_desc\" => \"-\",\n \"parent_id\" => 0,\n \"child_index\" => 0,\n \"uid_create\" => \"[email protected]\",\n \"uid_modify\" => \"\",\n ],\n [\n \"app_code\" => \"HRSETUP\",\n \"app_title\" => \"HRIS Setup\",\n \"app_desc\" => \"-\",\n \"parent_id\" => 1,\n \"child_index\" => 1,\n \"uid_create\" => \"[email protected]\",\n \"uid_modify\" => \"\",\n ],\n [\n \"app_code\" => \"PINFO\",\n \"app_title\" => \"Personnel Information\",\n \"app_desc\" => \"-\",\n \"parent_id\" => 1,\n \"child_index\" => 2,\n \"uid_create\" => \"[email protected]\",\n \"uid_modify\" => \"\",\n ],\n [\n \"app_code\" => \"EMPMOVE\",\n \"app_title\" => \"Employee Movement\",\n \"app_desc\" => \"-\",\n \"parent_id\" => 1,\n \"child_index\" => 3,\n \"uid_create\" => \"[email protected]\",\n \"uid_modify\" => \"\",\n ],\n [\n \"app_code\" => \"HRDASH\",\n \"app_title\" => \"HR Dashboard\",\n \"app_desc\" => \"-\",\n \"parent_id\" => 1,\n \"child_index\" => 4,\n \"uid_create\" => \"[email protected]\",\n \"uid_modify\" => \"\",\n ],\n ];\n\n foreach($apps as $app) {\n App::create($app);\n }\n }",
"public static function activate ()\n\t{\n\t\t// Create or update options\n\t\tself::generate_options ();\n\t}",
"protected static function getConfiguredApps() {}",
"public function activate() {\n\n }",
"public function activate() {\n\n }",
"public function activate() {\n\n }",
"function show_app($id)\n\t {\n\t \t// $prequery = $this->db->query($q);\n\t\t// if($prequery->num_rows() == 0)\n\t\t// {\n\t\t// \t$query=\"update wizard_apps set show_app = 1 where id = $id\";\n\t\t// \techo $this->db->query($query);\n\t\t// } \n\n\t\t\n\t\t$query = $this->db->where('defaultdata', '1')->where('id', $id)->get('wizard_apps');\n\t\tif($query->num_rows() > 0)\n\t\t{\n\t\t\tforeach($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$qu = \"INSERT INTO `wizard_apps` (`app_name`, `app_img`, `show_app`, `defaultdata`) VALUES ('\".$row[\"app_name\"].\"', '\".$row[\"app_img\"].\"', '1', '0')\";\n\t\t\t\techo $this->db->query($qu);\n\t\t\t}\n\t\t}\n\t\t\n\t }",
"public static function activate() {\n global $wpdb;\n\n $charset_collate = $wpdb->get_charset_collate();\n $table_status = $wpdb->prefix . \"woocommerce_xoxzo_status\";\n $table_error = $wpdb->prefix . \"woocommerce_xoxzo_error\";\n\n /* Create the call status table if does not exist\n * */\n if(!self::has_table($table_status)) {\n $sql_status_table_statement = self::sql_status_table($table_status, $charset_collate);\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n dbDelta( $sql_status_table_statement );\n }\n\n if(!self::has_table($table_error)) {\n $sql_error_table_statement = self::sql_error_table($table_error, $charset_collate);\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n dbDelta( $sql_error_table_statement );\n }\n }",
"public function index()\n {\n $user = Auth::user(); \n\n $activeApp = UserActiveApp::where('user_id',$user['id'])->first();\n \n $team = $user->teams->first();\n $teams = $user->teams->toArray();\n \n $teamapps = $team->apps;\n\n $activeAppId = '0';\n if (isset($activeApp->app_id))\n {\n $activeAppId = $activeApp->app_id;\n }\n\n return view('apps.show')\n ->with('user', $user)\n ->with('teams',$teams)\n ->with('teamapps', $teamapps)\n ->with('team', $team)\n ->with('activeappid',$activeAppId);\n }",
"function ms_team_activate() { \n\n ms_setup_team();\n flush_rewrite_rules();\n\n }",
"function getAllApps( $active = 0, $app_id = 0 ){\r\n\t\tif( $active ){\r\n\t\t\t$this->db->where('is_active', 1);\r\n\t\t}\r\n\r\n\t\tif( $app_id ){\r\n\t\t\t$this->db->where('id', $app_id);\r\n\t\t}\r\n\t\t$this->db->order_by('type ASC, order ASC, id ASC');\r\n\t\t$q = $this->db->get('apps');\r\n\t\t$data = array();\r\n\t\tif($q->num_rows()){\r\n\t\t\tforeach( $q->result_array() as $row){\r\n\t\t\t\t$data[$row['id']] = $row;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $data;\r\n\t}",
"public function activate()\n {\n $this->fireModelEvent('activating');\n\n $this->active = true;\n $result = $this->save();\n\n $this->fireModelEvent('activated');\n\n return $result;\n }",
"public function run()\n {\n DB::table('meta_apps')->insert([\n ['role_id' => 3, 'page_id' => 1, 'order' => 1],\n ['role_id' => 2, 'page_id' => 1, 'order' => 1],\n ]);\n }",
"public function createApply()\n {\n Az::debug($this->newName, 'application');\n\n Az::debug($this->newName, 'creating DB & tables');\n $this->createDb();\n $this->fillDb();\n $this->callPageRunCmd();\n\n }",
"public function activate() {\r\n\r\n $this->checkPHPVersion();\r\n $this->checkCoinsDir();\r\n\r\n $this->addOptions();\r\n $this->createOrdersTable();\r\n\r\n API::downloadCoinsIcons();\r\n\r\n CryptoExchange::addRewriteRule();\r\n flush_rewrite_rules();\r\n\r\n }",
"public function run()\n {\n DB::table('providers')->insert([\n \t'name' => 'Samsung Company LTD',\n \t'cuit' => '034576341234',\n \t'is_active' => 1,\n \t'profile_id' => 3,\n \t'company_id' => 1\n ]);\n\n DB::table('providers')->insert([\n \t'name' => 'LG Company LTD',\n \t'cuit' => '034576341234',\n \t'is_active' => 1,\n \t'profile_id' => 4,\n \t'company_id' => 1\n ]);\n }",
"public function run()\n {\n\n DB::table('app_techadmin')->insert([\n 'app_techadmin_id' => '1',\n 'app_id' => '1' \n ]); \n\n DB::table('app_techadmin')->insert([\n 'app_techadmin_id' => '1',\n 'app_id' => '2' \n ]); \n\n DB::table('app_techadmin')->insert([\n 'app_techadmin_id' => '1',\n 'app_id' => '4' \n ]); \n\n DB::table('app_techadmin')->insert([\n 'app_techadmin_id' => '1',\n 'app_id' => '5' \n ]); \n\n DB::table('app_techadmin')->insert([\n 'app_techadmin_id' => '1',\n 'app_id' => '6' \n ]); \n\n DB::table('app_techadmin')->insert([\n 'app_techadmin_id' => '1',\n 'app_id' => '7' \n ]); \n\n DB::table('app_techadmin')->insert([\n 'app_techadmin_id' => '1',\n 'app_id' => '9' \n ]); \n\n DB::table('app_techadmin')->insert([\n 'app_techadmin_id' => '2',\n 'app_id' => '9' \n ]); \n\n DB::table('app_techadmin')->insert([\n 'app_techadmin_id' => '2',\n 'app_id' => '21' \n ]); \n\n DB::table('app_techadmin')->insert([\n 'app_techadmin_id' => '2',\n 'app_id' => '27' \n ]); \n\n DB::table('app_techadmin')->insert([\n 'app_techadmin_id' => '2',\n 'app_id' => '37' \n ]); \n\n DB::table('app_techadmin')->insert([\n 'app_techadmin_id' => '2',\n 'app_id' => '38' \n ]); \n\n DB::table('app_techadmin')->insert([\n 'app_techadmin_id' => '2',\n 'app_id' => '49' \n ]); \n\n DB::table('app_techadmin')->insert([\n 'app_techadmin_id' => '3',\n 'app_id' => '8' \n ]); \n\n DB::table('app_techadmin')->insert([\n 'app_techadmin_id' => '6',\n 'app_id' => '8' \n ]); \n\n DB::table('app_techadmin')->insert([\n 'app_techadmin_id' => '6',\n 'app_id' => '26' \n ]); \n\n DB::table('app_techadmin')->insert([\n 'app_techadmin_id' => '6',\n 'app_id' => '42' \n ]); \n\n DB::table('app_techadmin')->insert([\n 'app_techadmin_id' => '7',\n 'app_id' => '11' \n ]); \n\n DB::table('app_techadmin')->insert([\n 'app_techadmin_id' => '7',\n 'app_id' => '12' \n ]); \n\n DB::table('app_techadmin')->insert([\n 'app_techadmin_id' => '7',\n 'app_id' => '36' \n ]); \n\n }",
"public function activate() {\n global $wp_roles;\n\n if ( class_exists( 'WP_Roles' ) && ! isset( $wp_roles ) ) {\n // @codingStandardsIgnoreLine\n $wp_roles = new \\WP_Roles();\n }\n\n $all_cap = array(\n 'dokan_view_booking_menu',\n 'dokan_add_booking_product',\n 'dokan_edit_booking_product',\n 'dokan_delete_booking_product',\n 'dokan_manage_booking_products',\n 'dokan_manage_booking_calendar',\n 'dokan_manage_bookings',\n 'dokan_manage_booking_resource',\n );\n\n foreach ( $all_cap as $key => $cap ) {\n $wp_roles->add_cap( 'seller', $cap );\n $wp_roles->add_cap( 'administrator', $cap );\n $wp_roles->add_cap( 'shop_manager', $cap );\n }\n\n // flush rewrite rules after plugin is activate\n $this->flush_rewrite_rules();\n }",
"public function getActivate($code){\n $user = Admin::where('activate_code', '=', $code)->where('active', '=', 0);\n\t\tif ($user->count()){\n\t\t\t$user = $user->first();\n\n\t\t\t$user->active = 1;\n\t\t\t$user->activate_code = '';\n\t\t\t\n\t\t\tif ($user->save()){\n\t\t\t return Redirect::secure('9gag-admin/login')->with('global', 'Congrats! We have activated your account');\n }\n \n }\n \n return Redirect::secure('/9gag-admin/login')\n ->with('global', 'we could not activate your account, \n try again late!');\n \n die();\n }",
"public function index()\n\t{\n\t\t$apps = NgAppTable::get();;\n\t\treturn $apps;\n\t}",
"public function activate_extension()\n\t{\n\t\t// fetch default settings\n\t\t$settings = $this->settings();\n\t\t\n\t\t// $value is the settings array ($type, $options, $defaults)\n\t\tforeach($settings as $key => $value)\n\t\t{\n\t\t\t$this->settings[$key] = $value[2];\n\t\t}\n\t\t\n\t\t$hooks = array(\n\t\t\t'sessions_end' => 'sessions_end',\n\t\t);\n\n\t\tforeach ($hooks as $hook => $method)\n\t\t{\n\t\t\t$data = array(\n\t\t\t\t'class'\t\t=> __CLASS__,\n\t\t\t\t'method'\t=> $method,\n\t\t\t\t'hook'\t\t=> $hook,\n\t\t\t\t'settings'\t=> serialize($this->settings),\n\t\t\t\t'version'\t=> $this->version,\n\t\t\t\t'enabled'\t=> 'y'\n\t\t\t);\n\n\t\t\t$this->EE->db->insert('extensions', $data);\t\t\t\n\t\t}\n\t}",
"public function run()\n {\n DB::table('users')->insert([\n 'name' => \"User_admin\",\n 'email' => \"[email protected]\",\n 'password' => bcrypt(\"123456\"),\n 'status' => \"active\",\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n ]);\n\n DB::table('users')->insert([\n 'name' => \"User_client\",\n 'email' => \"[email protected]\",\n 'password' => bcrypt(\"123456\"),\n 'status' => \"active\",\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n ]);\n\n DB::table('users')->insert([\n 'name' => \"User_pm\",\n 'email' => \"[email protected]\",\n 'password' => bcrypt(\"123456\"),\n 'status' => \"active\",\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n ]);\n\n DB::table('users')->insert([\n 'name' => \"User_dev\",\n 'email' => \"[email protected]\",\n 'password' => bcrypt(\"123456\"),\n 'status' => \"active\",\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n ]);\n\n DB::table('users')->insert([\n 'name' => \"User_tl\",\n 'email' => \"[email protected]\",\n 'password' => bcrypt(\"123456\"),\n 'status' => \"active\",\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n ]);\n\n DB::table('users')->insert([\n 'name' => \"super\",\n 'email' => \"[email protected]\",\n 'password' => bcrypt(\"123456\"),\n 'status' => \"active\",\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n ]);\n\n\n }",
"function activity_apps(){\n\n // find out the activities of the current ssp year\n $activity_apps = $this->paginate('ActivityApp', array('ActivityApp.year'=>$this->__current_ssp_year()));\n $this->set(compact('activity_apps'));\n\n $departments = $this->Department->find('list', array('fields'=>array('id', 'abbr'), 'order'=>'abbr asc'));\n $this->set(compact('departments'));\n }",
"public function page_activate_users()\n\t{\n\t\t$id = intval(Http::request('id'));\n\t\tif ($id)\n\t\t{\n\t\t\t User::confirm_account($id);\n\t\t}\n\n\t\tHttp::redirect('index.' . PHPEXT);\n\t}",
"public function activate() {\n $installer = new Contact\\Form\\Installer();\n $installer->run();\n }",
"public function activate()\n {\n $response = $this->response();\n /* le hash de l'email */\n $emailHash = $this->uri->segment(3);\n /* le log d'activation */\n $logID = $this->uri->segment(4);\n if ($this->oauth_web->activate($emailHash, $logID)) {\n redirect();\n // $response[\"status\"] = true;\n }\n // $this->output->set_output(json_encode($response));\n }",
"public function start(Request $request)\n {\n $this->authorize('create', BoardApp::class);\n\n if ($request->user()->board_apps()->where('year', date('Y'))->count() == 0) {\n $request->user()->board_apps()->create();\n }\n\n return redirect()->route('board.app', date('Y'));\n }",
"public function doEnableDb() {\r\n\t\t$this->db = xn(\"db\");\r\n\t\t\r\n\t\t$ret = $this->_mongo->selectDB(\"admin\")->command(array(\r\n\t\t\t\"enablesharding\" => $this->db\r\n\t\t));\r\n\t\t\r\n\t\t$this->ret = $this->_highlight($ret, \"json\");\r\n\t\t\r\n\t\t$this->display();\r\n\t}",
"function monitis_addon_activate() {\n // Create Custom DB Table\n // TODO handle DB failures\n $query = \"CREATE TABLE `mod_monitis_addon` (`id` INT( 1 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,`demo` TEXT NOT NULL )\";\n\t$result = mysql_query($query);\n $query = \"CREATE TABLE `mod_monitis_server` (`id` INT( 1 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,\"\n . \"`ip_addr` TEXT NOT NULL, \"\n . \"`monitored` BOOL, test_id INT, page_id INT, `agent_name` TEXT)\";\n\t$result = mysql_query($query);\n return array('status'=>'success','description'=>'');\n}",
"public function activateAction()\n {\n $process = User::activate($this->route_params['token']);\n\n if($process){\n Flash::addMessage('Account activated successfully','success');\n $this->redirect('/Login/index');\n }else{\n Flash::addMessage('Oops! Can\\'t activate your account. Activation link is too old or wrong.','danger');\n $this->redirect('/register/activation');\n }\n\n\n }",
"public function databaseReload()\n {\n $output = shell_exec('./runauthtests.sh --reload');\n\n codecept_debug($output);\n }",
"static public function tryToActivateAccount() {\r\n\t\tDB::getInstance()->stopAddingAccountID();\r\n\t\t$Account = DB::getInstance()->query('SELECT id FROM `'.PREFIX.'account` WHERE `activation_hash`='.DB::getInstance()->escape($_GET['activate']).' LIMIT 1')->fetch();\r\n\t\tDB::getInstance()->startAddingAccountID();\r\n\r\n\t\tif ($Account) {\r\n\t\t\tDB::getInstance()->update('account', $Account['id'], 'activation_hash', '');\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}",
"public function LoadApps()\r\n {\r\n $appBlock = new AppBlock($this->Core);\r\n echo $appBlock->LoadApps();\r\n }",
"public static function getActiveApp()\n {\n return self::$_activeApp;\n }",
"function LoadApps()\n {\n $view = new View(__DIR__ .\"/View/LoadApps.tpl\", $this->Core);\n\n //Recuperation\n $apps = AppHelper::GetByParameters($this->Core);\n $view->AddElement($apps);\n\n return $view->Render();\n }",
"public function bootstrap($app) {\n\n //Global Settings Stored as params.\n// Yii::$app->cache->flush();\n\n $settings = Yii::$app->cache->get('GLOBAL_SETTINGS');\n\n if (!$settings){\n $settings = $this->db->createCommand(\"SELECT name,value FROM option\")->queryAll();\n Yii::$app->cache->set('GLOBAL_SETTINGS',$settings);\n }\n// $settings = $this->db->cache(function($db)\n// {\n// return $db->createCommand(\"SELECT name,value FROM option\")->queryAll();\n// });\n\n foreach ($settings as $key => $val) {\n Yii::$app->params['settings'][$val['name']] = $val['value'];\n }\n\n // User Information Stored as Params\n if (Yii::$app->user->id)\n {\n $user_options = $this->db->cache(function($db)\n {\n return $db->createCommand(\n \"SELECT \n user.id as user_id, \n user.email as user_email, \n user.username as user_username, \n usermeta.first_name as user_fname, \n usermeta.nickname as user_nickname, \n usermeta.last_name as user_lname,\n usermeta.profile_pic as user_image \n from user LEFT OUTER JOIN usermeta on \n user.id = usermeta.user_id \n where user.id = \".Yii::$app->user->id)->queryOne();\n });\n\n foreach ($user_options as $key=>$val)\n {\n Yii::$app->params['user_details'][$key] = $val;\n }\n }\n }",
"static function activate() {\n\t}",
"public function run()\n {\n \\DB::table('settings')->insert([\n 'key'=>'activeProducts',\n 'value'=>'true',\n 'locale'=>'ar',\n ]);\n }",
"public function bootstrap($app)\n {\n static $already;\n if (!$already) {\n $this->connectUserRegistered();\n $this->connectArticleCreated();\n $already = true;\n }\n }",
"protected function refreshApplication()\n {\n if (!$this->foundation->installed()) {\n return;\n }\n\n $this->call('extension:detect', ['--quiet' => true]);\n\n $extensions = $this->memory->get('extensions.active', []);\n\n try {\n foreach ($extensions as $extension => $config) {\n $options = ['name' => $extension, '--force' => true];\n\n $this->call('extension:refresh', $options);\n $this->call('extension:update', $options);\n }\n\n $this->foundation->make('antares.extension.provider')->writeFreshManifest();\n } catch (PDOException $e) {\n // Skip if application is unable to make connection to the database.\n }\n }",
"function instant_ide_manager_activate() {\n\t\n\tinstant_ide_manager_activate_pre();\n\tinstant_ide_manager_activate_post();\n\t\n}",
"public function activate(){\n # Enable Single Sign-On\n if(in_array(\"login\", $this->features, TRUE)){\n $this->enable_sso();\n }\n }",
"public function run()\n {\n $app = new \\App\\Application();\n $app->status = 'ellection';\n $app->save();\n }",
"function activate($id){\n $data=[\n 'isactive' => '1',\n ];\n $this->db->where('id', $id);\n $this->db->update('users_permissions', $data);\n return $this->db->affected_rows();\n }",
"public function run()\n {\n \n DB::table('app_functionaladmin')->insert([\n 'app_functionaladmin_id' => '25',\n 'app_id' => '1' \n ]); \n \n DB::table('app_functionaladmin')->insert([\n 'app_functionaladmin_id' => '15',\n 'app_id' => '2' \n ]); \n\n DB::table('app_functionaladmin')->insert([\n 'app_functionaladmin_id' => '17',\n 'app_id' => '4' \n ]); \n\n DB::table('app_functionaladmin')->insert([\n 'app_functionaladmin_id' => '18',\n 'app_id' => '4' \n ]); \n\n DB::table('app_functionaladmin')->insert([\n 'app_functionaladmin_id' => '17',\n 'app_id' => '5' \n ]); \n\n DB::table('app_functionaladmin')->insert([\n 'app_functionaladmin_id' => '18',\n 'app_id' => '5' \n ]); \n\n DB::table('app_functionaladmin')->insert([\n 'app_functionaladmin_id' => '17',\n 'app_id' => '6' \n ]); \n\n DB::table('app_functionaladmin')->insert([\n 'app_functionaladmin_id' => '18',\n 'app_id' => '6' \n ]); \n\n DB::table('app_functionaladmin')->insert([\n 'app_functionaladmin_id' => '17',\n 'app_id' => '7' \n ]); \n\n DB::table('app_functionaladmin')->insert([\n 'app_functionaladmin_id' => '18',\n 'app_id' => '7' \n ]); \n\n DB::table('app_functionaladmin')->insert([\n 'app_functionaladmin_id' => '1',\n 'app_id' => '8' \n ]); \n\n DB::table('app_functionaladmin')->insert([\n 'app_functionaladmin_id' => '6',\n 'app_id' => '8' \n ]); \n\n DB::table('app_functionaladmin')->insert([\n 'app_functionaladmin_id' => '15',\n 'app_id' => '9' \n ]); \n\n DB::table('app_functionaladmin')->insert([\n 'app_functionaladmin_id' => '7',\n 'app_id' => '11' \n ]); \n\n DB::table('app_functionaladmin')->insert([\n 'app_functionaladmin_id' => '7',\n 'app_id' => '12' \n ]); \n\n DB::table('app_functionaladmin')->insert([\n 'app_functionaladmin_id' => '20',\n 'app_id' => '21' \n ]); \n\n DB::table('app_functionaladmin')->insert([\n 'app_functionaladmin_id' => '20',\n 'app_id' => '37' \n ]); \n\n DB::table('app_functionaladmin')->insert([\n 'app_functionaladmin_id' => '21',\n 'app_id' => '37' \n ]); \n\n DB::table('app_functionaladmin')->insert([\n 'app_functionaladmin_id' => '20',\n 'app_id' => '38' \n ]); \n\n DB::table('app_functionaladmin')->insert([\n 'app_functionaladmin_id' => '21',\n 'app_id' => '38' \n ]); \n\n }",
"public function activateUser($request)\r\n {\r\n /*\r\n * When registration has done you must activate your account to log in.\r\n * (Application will show you message \"You must confirm account\")\r\n */\r\n\r\n\r\n /*\r\n * In database we want to set field IsActivated to '1'\r\n */\r\n $params = [\r\n 'IsActivated' => '1'\r\n ];\r\n\r\n /*\r\n * Update row in user table where Activativon ==$request['activation']<---\r\n */\r\n $this->primary = 'Activation';\r\n $this->update($request['activation'], $params);\r\n\r\n }"
] | [
"0.66192937",
"0.60342765",
"0.5970644",
"0.5957167",
"0.5907916",
"0.59026814",
"0.58523256",
"0.56782097",
"0.5605068",
"0.55934376",
"0.5564146",
"0.5544416",
"0.55189824",
"0.5514357",
"0.5472157",
"0.54548717",
"0.5451909",
"0.5445915",
"0.5413645",
"0.54125524",
"0.54113793",
"0.5409185",
"0.5397616",
"0.53929484",
"0.53929484",
"0.53926873",
"0.53910595",
"0.5389331",
"0.53697044",
"0.536769",
"0.53625107",
"0.5352696",
"0.534988",
"0.5349838",
"0.53485",
"0.53451735",
"0.534441",
"0.53427035",
"0.5330673",
"0.5319327",
"0.53112704",
"0.5305821",
"0.52944195",
"0.5277938",
"0.5264418",
"0.5263844",
"0.52470934",
"0.5244499",
"0.5225716",
"0.522486",
"0.52102816",
"0.52102816",
"0.52090365",
"0.5204241",
"0.5199313",
"0.5195688",
"0.5189126",
"0.51857275",
"0.51857275",
"0.51857275",
"0.51800674",
"0.51489145",
"0.514706",
"0.5145183",
"0.51450616",
"0.5128908",
"0.5128312",
"0.51282364",
"0.511817",
"0.51159316",
"0.51132786",
"0.5109187",
"0.50837266",
"0.5083722",
"0.50831854",
"0.50699615",
"0.5066844",
"0.5062425",
"0.5053642",
"0.5053179",
"0.50425065",
"0.5024158",
"0.5017423",
"0.50172985",
"0.50142914",
"0.50105476",
"0.5006771",
"0.50059545",
"0.49997538",
"0.4999376",
"0.49924403",
"0.49918684",
"0.49881515",
"0.49768883",
"0.49636808",
"0.49633813",
"0.49583542",
"0.49501652",
"0.49468455",
"0.49443388"
] | 0.7309194 | 0 |
Redirect user to the activation view. | public function activate()
{
$langs = LanguageHelper::getAllLangs();
return view('commonmodule::Language', ['langs' => $langs]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function activateAction()\r\n {\r\n\t\tUser::activate($this->route_params['token']);\r\n\t\t\r\n\t\t$this->user = Auth::getUser();\r\n\r\n $this->redirect('/signup/activated');\r\n }",
"public function activateAction()\n {\n $process = User::activate($this->route_params['token']);\n\n if($process){\n Flash::addMessage('Account activated successfully','success');\n $this->redirect('/Login/index');\n }else{\n Flash::addMessage('Oops! Can\\'t activate your account. Activation link is too old or wrong.','danger');\n $this->redirect('/register/activation');\n }\n\n\n }",
"public function reActivationAction() {\n //get the container object\n $container = $this->container;\n //get the translator object\n $translator = $this->get('translator');\n //get the session object\n $session = $this->getRequest()->getSession();\n //check if we have a logged in user or company\n if (FALSE === $this->get('security.context')->isGranted('ROLE_NOTACTIVE')) {\n $session->getFlashBag()->set('note', $translator->trans('You need to Login first.'));\n return $this->redirect($this->generateUrl('login'));\n }\n\n //check if the user is already active\n if (TRUE === $this->get('security.context')->isGranted('ROLE_USER')) {\n //set a notice flag\n $session->getFlashBag()->set('notice', $translator->trans('Your acount is active.'));\n return $this->redirect($this->generateUrl('user_edit'));\n }\n\n //get the logedin user\n $user = $this->getUser();\n\n //prepare the body of the email\n $body = $this->renderView('ObjectsUserBundle:User:Emails\\activate_email.txt.twig', array('user' => $user));\n //prepare the message object\n $message = \\Swift_Message::newInstance()\n ->setSubject($translator->trans('activate your account'))\n ->setFrom($container->getParameter('mailer_user'))\n ->setTo($user->getEmail())\n ->setBody($body)\n ;\n //send the activation mail to the user\n $this->get('mailer')->send($message);\n //set the success flag in the session\n $session->getFlashBag()->set('success', $this->get('translator')->trans('check your email for your activation link'));\n //redirect the user to portal\n return $this->redirect($this->generateUrl('user_edit'));\n }",
"public function page_activate_users()\n\t{\n\t\t$id = intval(Http::request('id'));\n\t\tif ($id)\n\t\t{\n\t\t\t User::confirm_account($id);\n\t\t}\n\n\t\tHttp::redirect('index.' . PHPEXT);\n\t}",
"function seed_csp4_welcome_screen_do_activation_redirect() {\r\n if ( ! get_transient( '_seed_csp4_welcome_screen_activation_redirect' ) ) {\r\n return;\r\n }\r\n\r\n // Delete the redirect transient\r\n delete_transient( '_seed_csp4_welcome_screen_activation_redirect' );\r\n\r\n // Bail if activating from network, or bulk\r\n if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {\r\n return;\r\n }\r\n\r\n // Redirect to bbPress about page\r\n wp_safe_redirect( add_query_arg( array( 'page' => 'seed_csp4' ), admin_url( 'admin.php' ) ) );\r\n}",
"public function activationAction()\n {\n View::renderBlade('register/activation');\n }",
"public function confirmAction() {\n if (Zend_Auth::getInstance()->hasIdentity())\n $this->_redirect($this->getUrl());\n\n $errors = array();\n\n $action = $this->getRequest()->getParam('a');\n\n switch ($action) {\n case 'email':\n $id = $this->getRequest()->getParam('id');\n $key = $this->getRequest()->getParam('key');\n\n $result = $this->em->getRepository('Champs\\Entity\\User')->activateAccount($id, $key);\n\n if (!$result) {\n $errors['email'] = 'Error activating your account';\n }\n\n break;\n }\n\n $this->view->errors = $errors;\n $this->view->action = $action;\n }",
"function activate()\n {\n $user_id\t\t= $this->uri->segment(3);\n $new_email_key\t= $this->uri->segment(4);\n\n // Activate user\n if ($this->tank_auth->activate_user($user_id, $new_email_key)) {\t\t// success\n $this->tank_auth->logout();\n $this->_show_message($this->lang->line('auth_message_activation_completed').' '.anchor('/auth/login/', 'Login'));\n\n } else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n $this->_show_message($this->lang->line('auth_message_activation_failed'));\n }\n }",
"public function showActivationPage()\n {\n $user = Auth::user();\n $questions = SecurityQuestion::all();\n\n return view('users.activate', compact('user', 'questions'));\n }",
"public function activatedAction()\r\n {\r\n View::renderTemplate('Signup/activated.html');\r\n }",
"function activate()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_email_key\t= $this->uri->segment(4);\n\n\t\t// Activate user\n\t\tif ($this->tank_auth->activate_user($user_id, $new_email_key)) {\t\t// success\n\t\t\t$this->tank_auth->logout();\n\t\t\t//$this->_show_message($this->lang->line('auth_message_activation_completed').' '.anchor('/auth/login/', 'Login'));\n\t\t\t$this->session->set_flashdata('message', $this->lang->line('auth_message_activation_completed'));\n\t\t\t\t\t\tredirect('/auth/login');\n\n\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n\t\t\t$this->session->set_flashdata('message', $this->lang->line('auth_message_activation_failed'));\n\t\t\tredirect('/auth/login');\n\t\t\t//$this->_show_message($this->lang->line('auth_message_activation_failed'));\n\t\t}\n\t}",
"public function dahz_redirect_after_activate() {\n header( 'Location: ' . admin_url( esc_url_raw( 'admin.php?page=dahzframework&activated=true' ) ) );\n }",
"public function activate(){\r\n\t\t$uid = $_GET[\"uid\"];\r\n\t\t$hash = $_GET[\"hash\"];\r\n\r\n\t\tif(User::activateUser($uid, $hash)){\r\n\t\t\techo \"active\";\r\n\t\t\tUser::loginSystem(User::fromUid($uid));\r\n\t\t}\r\n\t\tPage::redirect(\"/index\");\r\n\t}",
"public function actionActivation() {\n\t\t$email = NData::base64UrlDecode($_GET['e']);\n\t\t$activekey = $_GET['activekey'];\n\t\tif ($email&&$activekey) {\n\t\t\t$user = UserModule::userModel()->notsafe()->findByAttributes(array('email'=>$email));\n\t\t\tif(isset($user) && $user->email_verified == 0 && $user->status == 1){\n\t\t\t\t// user is active but has not verified his email\n\t\t\t\t$user->email_verified = 1;\n\t\t\t\t$user->save();\n\t\t\t\t$this->render('message',array('title'=>UserModule::t(\"Email Verfied\"),'content'=>UserModule::t(\"Thank you! We now know you are you!\")));\n\t\t\t} elseif (isset($user) && $user->status==1 && $user->email_verified==1) {\n\t\t\t $this->render('message',array('title'=>UserModule::t(\"User activation\"),'content'=>UserModule::t(\"Your account is active.\")));\n\t\t\t} elseif(isset($user->activekey) && $this->checkActivationKey($user, $activekey)) {\n\t\t\t\t$user->activekey = crypt(microtime());\n\t\t\t\t$user->status = 1;\n\t\t\t\t$user->email_verified = 1;\n\t\t\t\t$user->save();\n\t\t\t $this->render('activation');\n\t\t\t\t$e = new CEvent($this, array('user'=>$user));\n\t\t\t\tUserModule::get()->onActivation($e);\n\t\t\t} else {\n\t\t\t $this->render('message',array('title'=>UserModule::t(\"User activation\"),'content'=>UserModule::t(\"Incorrect activation URL.\")));\n\t\t\t}\n\t\t} else {\n\t\t\t$this->render('message',array('title'=>UserModule::t(\"User activation\"),'content'=>UserModule::t(\"Incorrect activation URL.\")));\n\t\t}\n\t}",
"function activation()\n {\t\n\t\t$data['fal'] = $this->fal_front->activation();\n\t\t$this->load->view($this->_container, $data); \n }",
"public function maybe_redirect_after_activation() {\n\n\t\tif ( ! get_transient( 'croco_ik_redirect' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( wp_doing_ajax() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdelete_transient( 'croco_ik_redirect' );\n\n\t\tif ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $this->is_dashboard_page() ) {\n\t\t\treturn;\n\t\t}\n\n\t\twp_safe_redirect( $this->page_url( $this->get_initial_page() ) );\n\t\tdie();\n\n\t}",
"public function activateAccount()\n {\n // Récupération des variables nécessaires à l'activation\n $email = $_GET['email'];\n $activation_key = $_GET['key'];\n // On active le compte\n $activation = $this->Members->activateAccount($email, $activation_key);\n\n // Préparation de la page\n $page = new Page(array(\n 'title' => 'Inscription réussie',\n 'class_body' => 'signin'\n ));\n // Rendu du contenu\n $variables = compact('activation');\n $content = $this->render('members/signin/validation.php', $variables);\n // Rendu de la page\n echo $page->render($content);\n }",
"function support_dynamo_first_activation() {\n wp_redirect(get_bloginfo('wpurl').'/wp-admin/admin.php?page=dynamo_support_&view=account');\n }",
"public function actionActivate()\n {\n $username = $this->prompt(Console::convertEncoding(Yii::t('app', 'Username')) . ':', [\n 'required' => true\n ]);\n $model = $this->findModel($username);\n $model->status = User::STATUS_ACTIVE;\n $model->removeEmailConfirmToken();\n $this->log($model->save());\n }",
"public function activate($id) {\n $this->authorize('activate', $this->model);\n $this->model->activateUser($id);\n Controller::FlashMessages('The user has been activated', 'success');\n return redirect('/users');\n }",
"public function activate($locator){\n\t\t$activationkey = $this->request->get('id');\n\t\t\n\t\t$model = $this->_load('app')->model('users');\n\t\t$model->activate($activationkey);\n\t\t\n\t\t$this->response->setPartial('maincontent', 'user/activate', array('errmsg' => $model->getErrorMsg(' ')));\n\t\t\n\t}",
"function activate()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_email_key\t= $this->uri->segment(4);\n\n\t\t// Activate user\n\t\tif ($this->tank_auth->activate_user($user_id, $new_email_key))\n\t\t{\n\t\t\t// success\n\t\t\t//Add it into newletter\n\t\t\t$user = $this->database->GetUserById($user_id);\n\t\t\tadd_subscriber($user['email'], $user['username']);\n\t\t\t\n\t\t\t$this->tank_auth->logout();\n\t\t\t$this->_show_message($this->lang->line('auth_message_activation_completed').' '.anchor('/auth/login/', 'Login'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// fail\n\t\t\t$this->_show_message($this->lang->line('auth_message_activation_failed'));\n\t\t}\n\t}",
"protected function activation(Request $request) {\n $activationToken = $request->route('activation_token');\n $userCount = DB::table('users')->where([['verification_token', $activationToken], ['verified', 'false']])->count();\n if($userCount > 0) {\n\n /* Querying the user table by passing Email verification token */\n $user = DB::table('users')->where([['verification_token', $activationToken], ['verified', 'false']])->first();\n\n $returnData['user'] = $user;\n $returnData['activation_token'] = $activationToken;\n\n return view('user_activation',['dataArray' => $returnData]);\n\n } else {\n return redirect('login')->with('error', 'Looks like the activation link is expired or not valid.');\n }\n }",
"public function postActivateAction()\n\t{\n\t\tif ($this->module->activate())\n\t\t\tTools::redirectAdmin($this->context->link->getAdminLink('AdminTranslatools2'));\n\t\telse\n\t\t\t$this->template = 'default.tpl';\n\t}",
"function power_theme_activation_redirect() {\n\n\tglobal $pagenow;\n\n\tif ( 'themes.php' !== $pagenow || ! isset( $_GET['activated'] ) || ! is_admin() ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\treturn;\n\t}\n\n\tif ( version_compare( $GLOBALS['wp_version'], '5.0', '<' ) ) {\n\t\treturn;\n\t}\n\n\tif ( ! power_onboarding_active() ) {\n\t\treturn;\n\t}\n\n\twp_safe_redirect( esc_url( admin_url( 'admin.php?page=power-getting-started' ) ) );\n\texit;\n}",
"private function _signUpPageRequested()\n {\n $this->utility->redirect('signup');\n }",
"private function redirectOnThemeActivation()\n {\n global $pagenow;\n\n // redirect, if...\n if ('themes.php' == $pagenow // on themes overview page\n && isset($_GET['activated']) // theme gets activated\n && ! $this->settings->getProtocol()->getFirstInstalledThemeVersion() // installer did not run before\n ) {\n // time to store the first installed theme version\n $this->settings->getProtocol()->setFirstInstalledThemeVersion();\n wp_redirect(admin_url('index.php?page=' . self::PAGE));\n }\n }",
"public function activate()\n {\n $response = $this->response();\n /* le hash de l'email */\n $emailHash = $this->uri->segment(3);\n /* le log d'activation */\n $logID = $this->uri->segment(4);\n if ($this->oauth_web->activate($emailHash, $logID)) {\n redirect();\n // $response[\"status\"] = true;\n }\n // $this->output->set_output(json_encode($response));\n }",
"function activate ()\n\t{\n\t\tswitch ($this->getAction ())\n\t\t{\n\t\t\tcase 'modifyUser':\n\t\t\t\tif ($this->getUserName () == 'test')\n\t\t\t\t{\n\t\t\t\t\tdie ('not allowed for test user');\n\t\t\t\t}\n\t\t\t\t$checkPasswd = true;\n\t\t\t\t$user = $this->itemFactory->requestToUser ($checkPasswd);\n\t\t\t\t$this->operations->modifyUser ($this->getUserName(), $user);\n\t\t\t\tHeader (\"Location: index.php\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tHeader (\"Location: index.php\");\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function activate($id, $activation_code)\n {\n $user = $this->account()->activate($id, $activation_code);\n \n return redirect($this->redirectTo);\n/*\n return redirect(route('login'))->with('confirmation-success', trans('confirmation::confirmation.success'));\n*/\n }",
"public function activate(Request $request)\n {\n $token = $request->get('q');\n $userId = $request->get('u');\n\n $user = User::findOrFail($userId);\n\n if (! $user->activation()->first()->token === $token) {\n throw new NotFoundHttpException(\"Activation code not found\");\n }\n\n $user->activate();\n $request->session()->flash('activated', '');\n\n return view('auth.login');\n }",
"function activate($username = false, $verification = false)\n\t{\n\t\tif($username && $verification)\n\t\tif($this->auth->activate(urldecode($username), $verification))\n\t\t{\n\t\t\t$this->_render_page('user/activation', array('success' => true));\n\t\t\treturn;\n\t\t}\n\t\t$this->_render_page('user/activation', array('success' => false));\n\t}",
"public function actionActivate($email, $activationKey)\r\n {\r\n if($this->module->activeAfterRegister) // If accounts do not need to be activated.\r\n {\r\n throw new \\yii\\web\\NotFoundHttpException(); // Hide this action.\r\n }\r\n \r\n if(!Yii::$app->user->isGuest) // Only guest can activate accounts.\r\n {\r\n // Redirect instead of throwing a 403, because logged user end up on this page quite often.\r\n $this->redirect($this->module->returnLogoutUrl, 302); // Temporary redirect.\r\n }\r\n \r\n $model= User::find()->where(['email' => $email])->one();\r\n \r\n if($model && (int)$model->status === User::STATUS_ACTIVE) // If the account is already active.\r\n {\r\n throw new \\yii\\web\\ForbiddenHttpException(Yii::t(__CLASS__, 'This account is already active.'));\r\n }\r\n else if($model->activation_key && $model->activation_key == $activationKey) // The activation data checked out.\r\n {\r\n $model->scenario = 'activation';\r\n $model->status = User::STATUS_ACTIVE;\r\n $model->save();\r\n \r\n // Notify the user that activation was sucessful.\r\n return $this->render('message', [\r\n 'model' => $model,\r\n 'message' => Yii::t(__CLASS__, 'Your account is now active. Please log in to start using the service.'),\r\n 'type' => 'success'\r\n ]);\r\n }\r\n else if($model && (int)$model->status !== User::STATUS_ACTIVE && ($model->activation_key == $activationKey)) // The account has been disabled.\r\n {\r\n throw new \\yii\\web\\ForbiddenHttpException(Yii::t(__CLASS__, 'This account is not active.'));\r\n }\r\n \r\n // The activation url was wrong.\r\n throw new \\yii\\web\\ForbiddenHttpException(Yii::t(__CLASS__, 'Incorrect activation URL.'));\r\n }",
"public function redirectAction()\n {\n $model = new KBariotis_NBP_Model_NBP();\n\n $redirectUrl = $model->getRedirectUrl();\n\n if ($redirectUrl)\n $this->_redirectUrl($redirectUrl);\n else\n $this->_redirectUrl(Mage::getUrl('checkout/onepage/failure'));\n }",
"public function redirect_to_welcome() {\n\t\tif ( ! $this->can_redirect() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$url = '';\n\t\tif ( $this->invalid ) {\n\t\t\t$url = 'registration';\n\t\t} elseif ( ! get_option( 'rank_math_wizard_completed' ) ) {\n\t\t\t$url = 'wizard';\n\t\t}\n\n\t\twp_redirect( Helper::get_admin_url( $url ) );\n\t\texit;\n\t}",
"public function activateUser($request)\r\n {\r\n /*\r\n * When registration has done you must activate your account to log in.\r\n * (Application will show you message \"You must confirm account\")\r\n */\r\n\r\n\r\n /*\r\n * In database we want to set field IsActivated to '1'\r\n */\r\n $params = [\r\n 'IsActivated' => '1'\r\n ];\r\n\r\n /*\r\n * Update row in user table where Activativon ==$request['activation']<---\r\n */\r\n $this->primary = 'Activation';\r\n $this->update($request['activation'], $params);\r\n\r\n }",
"public function activate(Request $request){\n $token = $request->get(\"token\", '');\n\n if ($token==\"default\") {\n $content['error'] = \"Please activate your account\";\n }\n elseif (!$this->activationTokenModel->activate($token)) {\n if ($this->activationTokenModel->hasError()) {\n $content['error'] = $this->activationTokenModel->errorToString();\n } else {\n $content['error'] = \"An unknown error prevented us from continue\";\n }\n } else {\n $acc = new AccountModel();\n $acc->redirectToLobby();\n }\n return $this->render($request, $content);\n }",
"public function activate($id)\n {\n $user = User::find($id);\n $user->user_status=\"Active\";\n $user->save();\n return redirect()->route('userdisp');\n }",
"public function activateUser($userid) {\n\t\t$adminModel = $this->loadModel('admin');\n\n\t\t$adminModel->setUserStatus($userid, 2);\n\t\t$adminModel->verifyUserEmail($userid, 1);\n\t\theader('Location: '.URL.'admin/users');\n\t}",
"function hc_gf_maybe_activate_user() {\n\n $template_path = STYLESHEETPATH . '/gf-activate-template/activate.php';\n $is_activate_page = isset( $_GET['page'] ) && $_GET['page'] == 'gf_activation';\n \n if( ! file_exists( $template_path ) || ! $is_activate_page )\n return;\n \n require_once( $template_path );\n \n exit();\n}",
"public function confirm($key)\n {\n try {\n $user = Sentry::findUserByActivationCode($key);\n\n if ($user->attemptActivation($key)) {\n return Redirect::to('login')->withMessage(['success' => Lang::get('flash.account_activated')]);\n }\n } catch (Exception $e) {\n // Nothing here, so just fall through.\n }\n\n return Redirect::to('/')->withMessage(['danger' => Lang::get('flash.invalid_code')]);\n }",
"public function accountAction()\n {\n \tif(!in_array($this->_user->{User::COLUMN_STATUS}, array(User::STATUS_BANNED, User::STATUS_PENDING, User::STATUS_GUEST))){\n \t\t$this->_forward('homepage');\n \t\treturn;\n \t}\n \t$this->view->registerForm = new User_Form_Register();\n \t$this->view->loginForm = new User_Form_Login();\n }",
"function verify()\n {\n $activation = null;\n $param = getParameter();\n if (!empty($param[0])) {\n $activation = $param[0];\n }\n $resultActive = $this->model->khachhang->activeAccount($activation);\n switch ($resultActive) {\n case 1 :\n redirect('user/active_expire');\n break;\n case 2:\n redirect('user/active_success');\n break;\n case 3:\n redirect('user/active_fail');\n break;\n }\n }",
"public function redirectUnconfirmed()\n {\n $securityContext = $this->container->get('security.context');\n $user = $this->checkUser();\n if ($user && !$securityContext->isGranted('ROLE_USER')) {\n return $this->router->generate('confirm_email_warning');\n }\n\n return FALSE;\n }",
"public function againActivate(Request $request)\n {\n $template_html = 'mail.activate_user';\n\n $template_data = [\n 'url_activate' => url('http://localhost/sms_mkt/activated.php?key=' . encrypt($request->email) . '&user=' . $request->username),\n\n ];\n\n $user = new Users();\n $user->email = $request->email;\n\n Mail::send($template_html, $template_data, function ($msg) use ($user) {\n $msg->subject('ยืนยันตัวตน === Activate');\n $msg->to([$user->email]);\n $msg->from('[email protected]', 'ClickNext');\n });\n return $this->responseRequestSuccess('Success!');\n }",
"public function getIndex() {\n\n if ( Auth::check() ) {\n\n $user = Auth::user();\n\n if ( ($user->active == true ) ) {\n return Redirect::intended( '/' );\n }//if ( ($user->active == true ) ) \n elseif ( $user->active == false ) {\n return View::make( 'notactivated' )->with( 'error', 'sorry your account is not activated' );\n }//elseif ( $user->active == false )\n }//if ( Auth::check() )\n return View::make( 'login' );\n }",
"public function actionRedirection()\n {\n $userid = Yii::app()->user->userUuid;\n // $userid = Yii::app()->user->userUuid;\n\n //find default role\n // $find_default_role = AUserRoles::model()->findByAttributes(array('assignedTo'=>$userid));\n $role = $userid;\n //use it to check if user has created a business or not\n\n if(empty($find_default_role->businessUuid))\n {\n\n $this->redirect(array('user/panel&Uid='.$role.'&panel'));\n\n }else{\n\n $this->redirect(array('user/account_identification/'));\n }\n\n $this->render('redirection');\n }",
"public function activate() {\n add_option( 'wpb_js_composer_do_activation_redirect', true );\n }",
"public function actionActivate($id)\n {\n $model = $this->findModel($id);\n $model->reverseActive();\n\n return $this->redirect(['index']);\n }",
"public function confirmationAction()\n {\n Zend_Registry::set('SubCategory', SubCategory::USERUPDATE);\n \t$userId = $this->getRequest()->getParam('userId');\n $activationKey = $this->getRequest()->getParam(self::ACTIVATION_KEY_PARAMNAME);\n\n $user = $this->_getUserFromIdAndKey($userId, $activationKey);\n\n if(!$user){\n // No such user\n Globals::getLogger()->registrationError(\"Account activation: user retrieval failed - userId=$userId, key=$activationKey\", Zend_Log::INFO );\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::ACTIVATION_FAILED));\n }\n\n $user->clearCache();\n $user = $this->_getUserFromIdAndKey($userId, $activationKey);\n\n if($user->{User::COLUMN_STATUS} == User::STATUS_PENDING){\n $user->{User::COLUMN_STATUS} = User::STATUS_MEMBER;\n $user->date = date('Y-m-d H:i:s');\n $id = $user->save();\n if($id !== $userId){\n Globals::getLogger()->registrationError(\"Account activation: user save failed - userId=$userId, key=$activationKey\", Zend_Log::INFO );\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::ACTIVATION_FAILED));\n }\n\n $this->view->success = true;\n $this->view->alreadyDone = false;\n \t$this->_savePendingUserIdentity($userId);\n } else {\n $this->view->success = false;\n $this->view->alreadyDone = true;\n }\n }",
"public function index()\n {\n if(Auth::user()->roles()->first()->slug === 'unverified'){\n return redirect('activate');\n }else{\n if(Auth::user()->isAdmin()){\n return view('pages.admin.home');\n }else{\n if(Auth::user()->UserInfo4()->first()->Activation == 0){\n return redirect('user/password')->with('error','You must change your password first to fully secure your account from recent attacks that we have been through.');\n }\n return view('pages.user.home');\n }\n }\n }",
"private function redirect()\n\t\t{\n\t\t\tif(isUserLoggedIn())\n\t\t\t{\n\t\t\t\theader(\"Location: \" . APPROOT);\n\t\t\t}\n\t\t}",
"public function activate($data)\n {\n $this->view->title = \"Activate | Frindse\";\n $this->view->version = SITE_TEMPLATES_VER;\n $this->view->stylesheet = \"signup\";\n $this->view->javascript = \"Signup\";\n $this->view->header = \"header-logged-out\";\n\n // Now create the view\n $check = $this->db->prepare(\"SELECT * FROM users WHERE email=:email AND user_salt=:code AND activated='0'\");\n $check->execute(array(':email'=>$data['email'], ':code'=>$data['code']));\n\n if($check->rowCount() == 1)\n {\n $fetch = $check->fetch(PDO::FETCH_ASSOC);\n\n // Plus vars\n $this->view->firstname = $fetch['firstname'];\n $this->view->email = $fetch['email'];\n $this->view->code = $fetch['user_salt'];\n\n $this->view->render('signup', 'activate', SITE_TEMPLATES_VER);\n }else{\n Redirect::to('errors', '404');\n }\n }",
"public function executeActivateAccount(sfWebRequest $request)\n {\n $tkn = trim($request->getParameter('tk', ''));\n $usr = AppUserTable::getInstance()->findOneByRecoverToken($tkn);\n\n if ($usr) {\n \tif (!$usr->getEnabled()) {\n\t \t$usr->setRecoverToken(NULL);\n\t \t$usr->setEnabled(1);\n\t \t$usr->save();\n\n\t \tServiceAuthentication::startSessionProcess($usr);\n\t\n\t \t$this->getUser()->setFlash('activate', true);\t\n \t}\n }\n $this->redirect('home/index');\n }",
"public function getActivationUrl()\n\t{\n\t\treturn url('account/activate/'.$this->id.'/'.$this->activation_token);\n\t}",
"public function redirectAction()\n {\n\t\t\n $session = Mage::getSingleton('checkout/session');\n $session->setHdfcStandardQuoteId($session->getQuoteId());\n\t\t$order = $this->getOrder();\n\t\t\n \n if (!$order->getId()) {\n\t\t\n\t\t\t$this->_forward('failurerefresh');\n return;\n }\n\n $order->addStatusToHistory(\n $order->getStatus(),\n Mage::helper('hdfc')->__('Customer was redirected to hdfc')\n );\n $order->save();\n\n $this->getResponse()\n ->setBody($this->getLayout()\n ->createBlock('hdfc/standard_redirect')\n ->setOrder($order)\n ->toHtml());\n\n $session->unsQuoteId();\n }",
"function account_activation($account_act_code='') {\n\n\t\tif( $this->authentication->is_user_logged_in() ) {\n\n\t\t\tredirect('home');\n\t\t}\n\n\t\t$this->mcontents['title']\t\t\t= 'Account Activation';\n\t\t$this->mcontents['page_heading']\t= 'Account Activation';\n\n\t\tif( !$account_act_code ) {\n\n\t\t\tredirect('home');\n\t\t}\n\n\t\t$this->load->model('common_model');\n\t\t$aResult = $this->common_model->isValidToken($account_act_code, 'account_activation');\n\t\t$aTokenStatus = c('token_status');\n\n\t\tif( $aResult['status'] != $aTokenStatus['valid'] ) {\n\n\t\t\t//find the reason why this token is not valid\n\t\t\tif( $aResult['status'] == $aTokenStatus['invalid'] ) {\n\n\t\t\t\tsf('error_message', 'Invalid Link. Please contact out support team');\n\t\t\t} elseif($aResult['status'] == $aTokenStatus['expired']) {\n\n\t\t\t\tsf('error_message', 'This link has expired. Click <a class=\"highlight1\" href=\"'.c('base_url').'user/resend_account_activation/'.$account_act_code.'\">here</a> to get another confirmation email');\n\t\t\t}\n\n\t\t\tredirect('home');\n\n\t\t} else {\n\n\t\t\t//activate the account\n\t\t\tif(true === $this->account_model->activateAccount($aResult['oToken']->user_id)){\n\n\t\t\t\t//delete the token\n\t\t\t\t$this->common_model->deleteToken($aResult['oToken']->id);\n\n\n\t\t\t\tif(!$this->authentication->makeLogin($aResult['oToken']->user_id)){\n\n\t\t\t\t\tsf('error_message', 'You could not be logged in. Please contact out admin');\n\t\t\t\t} else {\n\n\t\t\t\t\t// Send welcome message\n\t\t\t\t\t$this->load->model('maintenance_model');\n\t\t\t\t\t$this->maintenance_model->getSingleSetting('db_welcome_msg');\n\t\t\t\t\t$aWelcomeEmail['receiver_name'] = s('FULL_NAME');\n\t\t\t\t\t$aWelcomeEmail['welcome_text'] \t= $this->maintenance_model->getSingleSetting('db_signup_welcome_msg');\n\n\t\t\t\t\t$aSettings = array(\n\t\t\t\t\t\t'to' \t\t\t\t=> array(s('EMAIL') => s('FULL_NAME')), // email_id => name pairs\n\t\t\t\t\t\t'from_email' \t\t=> c('accounts_email_id'),\n\t\t\t\t\t\t'from_name'\t\t\t=> c('accounts_email_from'),\n\t\t\t\t\t\t'reply_to' \t\t\t=> array(c('accounts_email_id') => c('accounts_email_from')), // email_id => name pairs\n\t\t\t\t\t\t'email_contents' \t=> $aWelcomeEmail, // placeholder keywords to be replaced with this data\n\t\t\t\t\t\t'template_name' \t=> 'welcome', //name of template to be used\n\t\t\t\t\t\t//'preview'\t\t\t=> true\n\t\t\t\t\t);\n\n\t\t\t\t\t$this->load->helper('custom_mail');\n\t\t\t\t\tsendMail_PHPMailer($aSettings);\n\n\t\t\t\t\tsf('success_message', 'Account has been activated. Welcome to '.$this->mcontents['c_website_title']);\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tsf('error_message', 'Could not activate!!');\n\t\t\t}\n\n\n\t\t\tredirect('home');\n\t\t}\n\t}",
"public function activation_link()\n\t {\n\t \t\t$data=$_GET['data'];\n\t \t\t$data=explode('?',$data);\n\t \t\t\n \t\tif( count($data) ==2)\n \t\t{\n \t\t\t$email=base64_decode($data[0]);\n \t\t\t$pass=base64_decode($data[1]);\n \t\t\t$query=$this->ApiModel->userActive($email,$pass);\n \t\t\tif($query== 1)\n \t\t\t{\n \t\t\t\t$data['msg']=\"Your account has been activated\";\n \t\t\t}else{\n \t\t\t\t$data['msg']=\"Your account has been Not activated\";\n \t\t\t}\n \t\t}else{\n \t\t\t$data['msg']=\"Your Link is incorrect\";\n \t\t}\n\n \t\t\t$this->load->view('activation',$data);\n \t\t\t\n\n\t \t\t\n\t }",
"public function redirectAction()\n {\n $this->facebookOAuth->authorize();\n }",
"public function activateUser($token)\n {\n $user = Users::find([\n 'token = :token: AND activated = :activated:',\n 'bind' => [\n 'token' => $token,\n 'activated' => 0,\n ],\n ])->getFirst();\n\n if (! $user) {\n flash()->session()->warning(\n 'We cant find your request, please '.\n 'try again, or contact us.'\n );\n\n return view('errors.404');\n }\n\n $user->setActivated(true);\n\n if ($user->save() === false) {\n foreach ($user->getMessages() as $message) {\n flash()->session()->error($message);\n }\n } else {\n flash()->session()->success(\n 'You have successfully activated your account, '.\n 'you are now allowed to login.'\n );\n }\n\n return redirect()->to(route('showLoginForm'));\n }",
"function auth_redirect() {\n\n\t\tauth_redirect();\n\n\t}",
"public function actionActive() {\n if (!Yii::$app->request->get('hash') && !Yii::$app->request->get('hash') != \"\") {\n throw new NotFoundHttpException(Yii::t('site', 'not user'));\n }\n $id = Yii::$app->request->get('hash');\n $query = User::find()->where(['auth_key' => $id])->one();\n if (!$query) {\n throw new NotFoundHttpException(Yii::t('site', 'not user data'));\n }\n if ($query->status == User::STATUS_BLOCKED) {\n $query->status = User::STATUS_ACTIVE;\n }\n if ($query->active == User::STATUS_BLOCKED) {\n $query->active = User::STATUS_ACTIVE;\n }\n if ($query->save()) {\n Yii::$app->getSession()->setFlash('success', Yii::t('site', 'user activated'));\n return $this->goHome();\n } elseif($query->firstErrors) {\n $errors = $query->firstErrors;\n throw new UserException(reset($errors));\n }\n }",
"function template_redirect() {\r\n\t\tappthemes_auth_redirect_login();\r\n\t}",
"function activate($key)\n {\n // activate account\n $result = $this->user_model->activate_account($key);\n \n switch($result)\n {\n case 0: // If activation key not matched with any account\n $msg = 'No account is related with this activation key, either your account is already activated or key is expired !!!'; \n $type = \"danger\";\n break;\n \n case 1: // Account activated\n $msg = 'Congratulations, your account is activated now. Login here';\n $type = \"success\"; \n break;\n \n case 2: // Activation key expired\n $msg = 'Activation key expired, create new account.';\n $type = \"warning\";\n break; \n \n default:\n break;\n \n }\n\n // set notification message to show on page\n $this->base->set_message($msg, $type); \n \n $this->index();\n\n return true;\n }",
"public function signup()\n {\n if ($this->model->signup())\n $this->redirect(\"home\");\n }",
"protected function redirectTo()\n {\n return AccountServiceProvider::HOME; //route('users.index')\n }",
"protected function success() {\r\n $this->redirect();\r\n }",
"public function redirect();",
"public function redirect();",
"public function redirect();",
"public function confirmed()\n {\n if(!Auth::check()){\n return redirect()->route('auth.registration');\n }\n\n return view('confirm');\n }",
"function activate()\n\t{\n\t\t// Check for request forgeries.\n\t\tJRequest::checkToken() or jexit(JText::_('Invalid_Token'));\n\n\t\t// Get and sanitize the items to delete.\n\t\t$cid = JRequest::getVar('cid', null, 'post', 'array');\n\t\tJArrayHelper::toInteger($cid);\n\n\t\t// Get the model.\n\t\t$model = & $this->getModel('Link', 'RedirectModel');\n\n\t\t$new_url = JRequest::getString('new_url');\n\t\t$comment = JRequest::getString('comment');\n\n\t\t// Attempt to activate the links\n\t\t$result = $model->activate($cid, $new_url, $comment);\n\n\t\t// If there is a problem, set the error message.\n\t\tif (!$result) {\n\t\t\t$this->setMessage($model->getError());\n\t\t}\n\n\t\t// Redirect to the list screen.\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_redirect&view=links', false));\n\t}",
"public function reActivate()\n {\n $response = $this->response();\n $config = [\n ['field' => 'userid', 'label' => '', 'rules' => 'trim|required|integer'],\n ['field' => 'activationemail', 'label' => '', 'rules' => 'trim|required|min_length[4]|max_length[100]|valid_email']\n ];\n $this->form_validation->set_rules($config);\n if ($this->form_validation->run() === false) {\n $response[\"errors\"] = $this->form_validation->error_array();\n $this->output->set_output(json_encode($response));\n return false;\n }\n $userID = $this->input->post('userid');\n $email = $this->input->post('activationemail');\n if ($this->oauth_web->reActivate($userID, $email) === true) {\n $response[\"status\"] = true;\n $response[\"msg\"] = $this->lang->line(\"reActivate_ok\");\n }\n $this->output->set_output(json_encode($response));\n }",
"protected function redirectTo()\n {\n \\Auth::logout();\n Session::flash('alert-danger', 'Please Verify Your Email to Login.');\n return '/login'; \n }",
"public function register(){\n header(\"Location: register.php\");\n }",
"public function activateUser(Request $request)\n {\n $user = Auth::user();\n\n if ($user->activated) {\n return redirect()->back()->withError('Your account is already activated');\n }\n\n $rules = [\n 'name' => 'required',\n 'password' => 'required|confirmed',\n 'security_question_id' => 'required|exists:security_questions,id',\n 'security_question_answer' => 'required'\n ];\n\n $messages = [\n 'security_question_id.required' => 'A security question must be selected.',\n 'security_question_answer.required' => 'Add an answer for security question.'\n ];\n\n $this->validate($request, $rules, $messages);\n\n $user->update([\n 'name' => $request->name,\n 'password' => bcrypt($request->password),\n 'security_question_id' => $request->security_question_id,\n 'security_question_answer' => $request->security_question_answer,\n 'activated' => true\n ]);\n\n return redirect('/');\n }",
"public function activateUser(string $activationCode)\n {\n try {\n $user = app(User::class)->where('activation_code', $activationCode)->first();\n if (!$user || $user->status == 1) {\n return redirect()->back()->with('error', 'The code does not exist for any user in our system.');\n }\n $user->status = 1;\n $user->activation_code = null;\n $user->save();\n auth()->login($user);\n } catch (\\Exception $exception) {\n logger()->error($exception);\n return \"Whoops! something went wrong.\";\n }\n return redirect()->route('user.dashboard');\n }",
"public function redirectAction()\n {\n $this->getResponse()->setBody($this->getLayout()->createBlock('paymentsensegateway/redirect')->toHtml());\n }",
"public function resendActivationEmailSuccess()\n {\n return $this->loadPublicView('user.resend-activation-email-success');\n }",
"public function activate(){\r\n\t\t$id = $this->uri->segment(3);\r\n\t\t$code = $this->uri->segment(4);\r\n\r\n\t\t//fetch requests details\r\n\t\t$request = $this->requests_model->getRequestById($id);\r\n \r\n\r\n\t\t//if code matches\r\n\t\tif($request['code'] == $code){\r\n\t\t\t//update user active status\r\n\t\t\t// $data['activate'] = true;\r\n\t\t\t$query = $this->accounts_model->updateActivate($id);\r\n\r\n\t\t\tif($query){\r\n\r\n\t\t\t\t$row = $this->accounts_model->getCheckUser($request['email']);\r\n\r\n\t\t\t\t$this->session->set_userdata('is_user', $row['type']);\r\n\t\t\t\t$this->session->set_userdata('myName', \t$row['firstname'].\" \".$row['lastname']);\r\n\t\t\t\t$this->session->set_userdata('myEmail', $row['email']);\r\n\t\t\t\t$this->session->set_userdata('myId', \t$row['id']);\r\n\t\t\t\t$this->session->set_userdata('myRole', \t$row['role']);\r\n\r\n\t\t\t\t$this->session->set_flashdata('msg', 'User activated successfully');\r\n\t\t\t\tredirect('main');\r\n\r\n\t\t\t}\r\n\t\t\telse{\r\n\r\n\t\t\t\t$this->session->set_flashdata('error_msg', 'Something went wrong in activating account');\r\n\t\t\t\tredirect('login'); \r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\t\t\t\r\n\t\t\t$this->session->set_flashdata('error_msg', 'Cannot activate account. Code didnt match');\r\n\t\t\tredirect('login'); \r\n\t\t}\r\n \r\n\t}",
"public function requestActivateAccount($tk)\n {\n $data = [\n 'path' => 'email-activate',\n 'token' => $tk\n ];\n \n $res = $this->postExternalRequest($data);\n \n return redirect('/login');\n \n }",
"public function goBackToHome()\n {\n if (Gate::allows('isContractor')) {\n abort(420, 'You Are not Allowed to access this site');\n }\n return view('welcome');\n }",
"public function activate($code)\n {\n if (Auth::check())\n {\n return Redirect::to('/');\n }\n\n\n $user = User::where('code', '=', $code)->where('active', '=', 0);\n\n if ($user->count())\n {\n $user = $user->first();\n\n //update user to active state\n $user->active = 1;\n $user->code = '';\n\n if ($user->save())\n {\n\n return Redirect::route('log')\n ->with('success', 'Your account is activated. Now you can sign in.');\n }\n }\n\n return Redirect::route('log')\n ->with('success', 'WE could not activate your account. Try again later.');\n\n }",
"public function index()\n {\n $this->setup_model->setup();\n header('location: ' . base_url() . 'index.php/user/login');\n }",
"protected function redirectAfterSuccessfulLogin()\n {\n $member = Security::getCurrentUser();\n\n // Absolute redirection URLs may cause spoofing\n $backURL = $this->getBackURL();\n if ($backURL) {\n return $this->redirect($backURL);\n }\n\n // If a default login dest has been set, redirect to that.\n $defaultLoginDest = Security::config()->get('default_login_dest');\n if ($defaultLoginDest) {\n return $this->redirect($defaultLoginDest);\n }\n\n // Redirect the user to the page where they came from\n if ($member) {\n // Welcome message\n $message = _t(\n 'SilverStripe\\\\Security\\\\Member.WELCOMEBACK',\n 'Welcome Back, {firstname}',\n ['firstname' => $member->FirstName]\n );\n Security::singleton()->setSessionMessage($message, ValidationResult::TYPE_GOOD);\n }\n\n // Redirect back\n return $this->redirectBack();\n }",
"public function redirectAction()\n {\n $session = Mage::getSingleton('checkout/session');\n $session->setAlipayPaymentQuoteId($session->getQuoteId());\n\n $order = $this->getOrder();\n\n if (!$order->getId()) {\n $this->norouteAction();\n return;\n }\n\n $order->addStatusToHistory(\n $order->getStatus(),\n Mage::helper('alipay')->__('客户跳转到支付宝网站')\n );\n $order->save();\n\n $this->getResponse()\n ->setBody($this->getLayout()\n ->createBlock('alipay/redirect')\n ->setOrder($order)\n ->toHtml());\n\n $session->unsQuoteId();\n }",
"public function indexAction()\n {\n if (!$this->identity()) {\n return $this->redirect()->toRoute('account/login');\n }\n }",
"public function create(Request $request) {\n return view('auth.user_activate');\n }",
"public function actionLogin()\r\n\t{\r\n\t $this->redirect(array('//user/auth'));\r\n\t}",
"public function admin()\n {\n redirect(admin_url('authentication'));\n }",
"public function getActivate($code){\n $user = Admin::where('activate_code', '=', $code)->where('active', '=', 0);\n\t\tif ($user->count()){\n\t\t\t$user = $user->first();\n\n\t\t\t$user->active = 1;\n\t\t\t$user->activate_code = '';\n\t\t\t\n\t\t\tif ($user->save()){\n\t\t\t return Redirect::secure('9gag-admin/login')->with('global', 'Congrats! We have activated your account');\n }\n \n }\n \n return Redirect::secure('/9gag-admin/login')\n ->with('global', 'we could not activate your account, \n try again late!');\n \n die();\n }",
"public function actionCheckUserMode() {\n $this->redirect(array('blogTaskInboxView'));\n }",
"public function activate($user_id, $email_key) {\n $activated = $this->authm->activate_user_account($user_id, $email_key);\n if($activated === TRUE) {\n $this->login($user_id, 2);\n redirect('/relationship');\n } else {\n if($activated === 1) {\n show_error($this->lang->line('auth_activate_error_1'));\n } else {\n show_error($this->lang->line('auth_activate_error_2'));\n }\n }\n }",
"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 register_action()\n {\n $registration_successful = RegistrationModel::registerNewUser();\n\n if ($registration_successful) {\n Redirect::to('index');\n } else {\n Redirect::to('user/register');\n }\n }",
"public function activateIndex($token)\n {\n $user = $this->user->where('token', $token)->where('active', 0)->first();\n\n if (!$user) {\n //if the invite doesn't exist do something more graceful than this\n return redirect()->route('page');\n }\n\n return view('chuckcms::backend.users._accept', compact('user', 'token'));\n }",
"public function redirect() {\n\n if (isset($_GET['view'])) {\n $view = \"view=\" . $_GET['view'];\n } else {\n $view = \"view=return\";\n }\n\n $return_url = substr(BASE_URL, 0, -12) . 'index.php?' . $view . '&transactionid=' . $_GET['transactionid'];\n header(\"Location: \" . $return_url);\n }",
"public function authDoView(){\n if(!$this->authUser()){\n echo '{\"status\":-1,\"result\":\"/user/login?prePage='.$_SERVER['HTTP_REFERER'].'\"}';\n exit();\n }\n }",
"public function actionActivate($id)\n {\n $model = $this->findModel($id);\n $model->status = $model::STATUS_ACTIVE;\n $model->save();\n\n return $this->redirect(Yii::$app->request->referrer);\n }",
"public static function es_welcome() {\n\n\t\tif ( ! get_transient( '_es_activation_redirect' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Delete the redirect transient\n\t\tdelete_transient( '_es_activation_redirect' );\n\n\t\twp_redirect( admin_url( 'admin.php?page=es-general-information' ) );\n\t\texit;\n\t}",
"public function active($url_name='view'){\n\t\t// Process form\n\t\t\t$link=$this->input->post('link');\n\t\t\t$id=$this->input->post('lesson_id');\n\t\t\t$data=array('approved' => $this->input->post('approved'));\n\t\t//Save to database\n\t\t\t$this->lesson_m->save($data,$id);\n\t\t//Setting up the success message and redirecting the user\n\t\t\t$this->session->set_flashdata('message', $this->lang->line('info_flash_activation'));\n\t\t\tif($url_name == 'order'){redirect($this->data['language'].'/admin/lesson/'.$url_name.$this->input->post('url'));}\n\t\t\tredirect($this->data['language'].'/admin/lesson/'.$url_name.'/'.$link);\t\n\t}"
] | [
"0.78891397",
"0.7651143",
"0.7449781",
"0.74430853",
"0.73230547",
"0.71984476",
"0.7149087",
"0.71339226",
"0.71220887",
"0.71018136",
"0.7053563",
"0.6941354",
"0.68907446",
"0.6887436",
"0.6839503",
"0.68156403",
"0.67702985",
"0.6719226",
"0.67007583",
"0.6697606",
"0.6666105",
"0.6665328",
"0.6659042",
"0.6638776",
"0.6612658",
"0.6572629",
"0.6538733",
"0.6531644",
"0.64627004",
"0.64004165",
"0.6370433",
"0.63555104",
"0.63538224",
"0.6339462",
"0.6338531",
"0.6334625",
"0.63097596",
"0.63059103",
"0.62856543",
"0.627897",
"0.62710625",
"0.625871",
"0.6256438",
"0.62550795",
"0.6246895",
"0.6238318",
"0.62312675",
"0.62208074",
"0.6204382",
"0.61928976",
"0.61818135",
"0.61781156",
"0.6167212",
"0.6134591",
"0.6113286",
"0.6108759",
"0.6105211",
"0.60863143",
"0.60773134",
"0.6075013",
"0.6069724",
"0.6063851",
"0.60627747",
"0.6052725",
"0.60525644",
"0.60305285",
"0.6023834",
"0.60233045",
"0.60233045",
"0.60233045",
"0.6016702",
"0.60109884",
"0.6008911",
"0.6002282",
"0.60006946",
"0.5989546",
"0.5975763",
"0.59749395",
"0.5972091",
"0.5965472",
"0.5961884",
"0.59605366",
"0.5958158",
"0.5957556",
"0.5954312",
"0.5942049",
"0.5939162",
"0.59382564",
"0.5935811",
"0.59345037",
"0.5923924",
"0.59232146",
"0.5923121",
"0.5914218",
"0.5911702",
"0.5907942",
"0.59079117",
"0.590243",
"0.5900384",
"0.58998495",
"0.5897522"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
return view('commonmodule::create');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437"
] | 0.0 | -1 |
Show the specified resource. | public function show()
{
return view('commonmodule::show');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function show($id) {}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function show(Question $question) // the show part requires an id (default)\n {\n //Show function does Route Model Binding, is the simple way of telling that this\n // function provides the id of the question by default\n return new QuestionResource($question);\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n { \n \n }",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show($id)\n {\n // ..\n }",
"public function show(Resena $resena)\n {\n }",
"public function show($id)\n {\n $obj = Obj::where('id',$id)->first();\n \n $this->authorize('view', $obj);\n if($obj)\n return view('appl.'.$this->app.'.'.$this->module.'.show')\n ->with('obj',$obj)->with('app',$this);\n else\n abort(404);\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id)\n {\n \n }",
"public function show($id)\n {\n \n }",
"public function show($id)\n {\n \n }",
"public function show($id)\n {\n \n }",
"public function show($id)\n {\n \n }",
"public function show($id)\n {\n \n }",
"public function show($id)\n {\n \n }",
"public function show($id)\n {\n \n }",
"public function show($id)\n {\n \n }",
"public function show($id)\n {\n \n }",
"public function show($id)\n {\n // Code Goes Here\n }",
"public function show(Show $show)\n {\n $this->authorize('basicView', $show);\n\n if (Auth::user()->can('view', $show)) {\n return $show->with(['hosts', 'invitees'])->first();\n }\n\n return new ShowResource($show);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"public function show($id) {\n\n\t}",
"public function show($id){\n \n }",
"public function show($id) {\n }",
"public function show($id)\n {\n\n }",
"public function show($id) {\n //\n }",
"public function show($id) {\n //\n }",
"public function show($id) {\n //\n }",
"public function show($id) {\r\n //\r\n }",
"public function show($id) {\r\n //\r\n }",
"public function show($id)\n {\n \n }",
"public function show($id)\n {\n \n }",
"public function show($id)\n {\n \n }",
"public function show($id)\n {\n \n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n {\n \n }",
"public function show($id)\n {\n \n }",
"public function show($id)\n {\n \n }",
"public function show($id)\n {\n \n }",
"public function show($id)\n {\n \n }",
"public function show($id)\n {\n \n }",
"public function show($id)\n {\n \n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show($id)\r\r\n {\r\r\n //\r\r\n }",
"public function show($id)\r\r\n {\r\r\n //\r\r\n }",
"public function show($id)\r\n {\r\n \r\n }",
"public function show($id)\n {\n \n \n }",
"public function show($id)\n {\n \n \n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }",
"public function show($id)\n {\n\n }"
] | [
"0.86625683",
"0.8656298",
"0.7061081",
"0.7016237",
"0.69712675",
"0.693585",
"0.6916958",
"0.68928856",
"0.6802355",
"0.66791755",
"0.6661057",
"0.6640048",
"0.66189003",
"0.66071963",
"0.6594754",
"0.65945184",
"0.65812767",
"0.65802205",
"0.6552344",
"0.65498114",
"0.65498114",
"0.65498114",
"0.65498114",
"0.65498114",
"0.65498114",
"0.65498114",
"0.65498114",
"0.65498114",
"0.65498114",
"0.65435684",
"0.65435684",
"0.65435684",
"0.65435684",
"0.65435684",
"0.65435684",
"0.65435684",
"0.65435684",
"0.65435684",
"0.65435684",
"0.6540908",
"0.6536351",
"0.6528191",
"0.6520638",
"0.65174145",
"0.65161794",
"0.65081596",
"0.6507456",
"0.6507456",
"0.6507456",
"0.6506214",
"0.6506214",
"0.65002257",
"0.65002257",
"0.65002257",
"0.65002257",
"0.64964366",
"0.64964366",
"0.6491058",
"0.6491058",
"0.6491058",
"0.6491058",
"0.6489413",
"0.6489413",
"0.64893836",
"0.6488436",
"0.6481886",
"0.6480796",
"0.6480796",
"0.6480326",
"0.6477329",
"0.6475613",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975",
"0.6472975"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit()
{
return view('commonmodule::edit');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
] | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
] | 0.6768301 | 32 |
Update the specified resource in storage. | public function update(Request $request)
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
Get a team by name | public function getTeam($name)
{
if (!is_string($name)) {
throw new InvalidTypeException('Name', 'string', gettype($name));
}
return $this->get(sprintf('teams/%s', $name));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTeam();",
"public function getTeam() {\n return $this->db->getTeamById($this->teamId);\n }",
"public static function getByID($id){\n\t\treturn DB::table('teams')->where('id', $id)->first();\n\t}",
"public function getTeam($id)\n {\n return $this->_getTeam($id);\n }",
"public function team(string $name = '', $id = null) : Team {\n\t\t$t = new Team($name, $id);\n\t\t$this->teams->insert($t);\n\t\t$t->addGroupResults($this);\n\t\treturn $t;\n\t}",
"public function getTeam($num)\n {\n switch ($num) {\n case 0:\n return $this->team1;\n break;\n case 1:\n return $this->team2;\n break;\n default:\n //throw error\n }\n\n return null;\n }",
"function getTeam()\n\t{\n\t\treturn $this->Info['Team'];\n\t}",
"public function getById($id){\n\t\t$url = WEBSERVICE. \"teams/getById/\" . $id;\n\t\t$this->HTTPRequest->setUrl($url);\n\t\t$this->HTTPRequest->setMethod(\"GET\");\n\t\t$arrayResponse = $this->HTTPRequest->sendHTTPRequest();\n\t\treturn $this->arrayToTeam($arrayResponse, true);\n\t}",
"public function getTeam($index = 0)\n\t{\n\t\treturn $this->_teams[$index];\n\t}",
"function get_team_by_team_id_request($teamID){\n // Require SQL Connection\n require_once(__DIR__ . '/mysql-connect.php');\n $conn = mysqli_connection();\n\n $sql = \"SELECT * FROM teams WHERE TeamID='$teamID' LIMIT 1\";\n $result = mysqli_query($conn, $sql);\n\n mysqli_close($conn);\n return $result;\n }",
"public function getTeam()\n {\n return $this->team;\n }",
"public function getTeams();",
"public function get_name() {\n\t\treturn 'team';\n\t}",
"public function getById(int $id):Team\n {\n return Team::findOrFail($id);\n }",
"function woothemes_get_our_team ( $args = '' ) {\n\tglobal $woothemes_our_team;\n\treturn $woothemes_our_team->get_our_team( $args );\n}",
"public function show(Team $team)\n {\n return $team;\n }",
"public function team();",
"public function getTeam($teamId) {\r\n\t\t/* connect to mysql database */\r\n\t\t$teamCriteria = array(array('name'=>\"ID\", 'func'=>\"=\", 'value'=>$teamId));\r\n\t\t$result = $this->select($this->prefix.TEAM_TABLE, NULL, $teamCriteria);\r\n\t\t\r\n\t\tif($result) {\r\n\t\t\t/* receive data of team from result */\r\n\t\t\t$team = new Team();\r\n\t\t\t$team->setId($result[0]['ID']);\r\n\t\t\t$team->setName($result[0]['uliname']);\r\n\t\t\t\r\n\t\t\t/* return team */\r\n\t\t\treturn $team;\r\n\t\t}\r\n\r\n\t\treturn NULL;\r\n\t}",
"public function getTeam()\n {\n return $this->hasOne(Team::className(), ['id' => 'team_id']);\n }",
"public function getTeam()\n {\n return $this->hasOne(Team::className(), ['ID' => 'TeamID']);\n }",
"public function getTeamAt($offset)\n {\n return $this->get(self::_TEAM, $offset);\n }",
"public function getSelfTeam()\n {\n return $this->get(self::_SELF_TEAM);\n }",
"function get_race_team($idTeam)\n{\n $team_race = get_race_team_db($idTeam);\n return $team_race;\n}",
"public function testGetValidTeamByTeamName() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"team\");\n\n\t\t// create a new Team and insert to into mySQL\n\t\t$team = new Team(null, $this->sport->getSportId(), $this->VALID_TEAMAPIID, $this->VALID_TEAMCITY, $this->VALID_TEAMNAME);\n\t\t$team->insert($this->getPDO());\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$results = Team::getTeamByTeamName($this->getPDO(), $team->getTeamName());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"team\"));\n\t\t$this->assertCount(1, $results);\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\Sprots\\\\Team\", $results);\n\n\t\t// grab the result from the array and validate it\n\t\t$pdoTeam = $results[0];\n\t\t$this->assertEquals($pdoTeam->getTeamSportId(), $this->sport->getSportId());\n\t\t$this->assertEquals($pdoTeam->getTeamApiId(), $this->VALID_TEAMAPIID);\n\t\t$this->assertEquals($pdoTeam->getTeamCity(), $this->VALID_TEAMCITY);\n\t\t$this->assertEquals($pdoTeam->getTeamName(), $this->VALID_TEAMNAME);\n\t\t//$this->assertEquals($pdoTeam->getTeamSportId(), $this->VALID_TEAMSPORTID);\n\t}",
"public function get_team($id, $show){\n\t\treturn $this->get_team_mem($id, $show);\n\t}",
"public function getOppoTeam()\n {\n return $this->get(self::_OPPO_TEAM);\n }",
"function get_team_name($team_id) {\n global $db;\n $query = 'SELECT team_id, name AS city, nickname FROM teams\n WHERE team_id = :team_id';\n $statement = $db->prepare($query);\n $statement->bindValue(':team_id', $team_id);\n $statement->execute();\n $team_name = $statement->fetch();\n $statement->closeCursor();\n return $team_name;\n}",
"public function show($id)\n {\n $this->authorize('isAdmin');\n return Ourteam::findOrFail($id);\n\n }",
"public function getTeamNameByID($id){\n $sqlQuery = \"SELECT teamName FROM Teams T\n WHERE T.teamID = :teamID\";\n\n $statement = $this->_dbHandle->prepare($sqlQuery);\n $statement->bindValue(\":teamID\", $id, PDO::PARAM_INT);\n $statement->execute();\n $this->_dbInstance->destruct();\n\n $r = '';\n while ($row = $statement->fetch(PDO::FETCH_ASSOC)){\n $r = $row['teamName'];\n }\n\n return $r;\n }",
"function get_team_info($idTeam)\n{\n $team_info = get_team_info_db($idTeam);\n return $team_info;\n}",
"function getTeamIdByName($teamName){\r\n //$GLOBALS['GLOBALS['link']'] = connect();\r\n $res = mysqli_query($GLOBALS['link'], 'select id from teams where `name`=\"'. $teamName .'\";');\r\n\r\n return fetch_result($res);\r\n}",
"public function getTeam($teamNumber)\n {\n $em = $this->getEntityManager();\n $qb = $em->createQueryBuilder();\n $qb->select('u.tname,u.status');\n $qb->from('Vlreleases\\UserBundle\\Entity\\Team', 'u');\n $qb->where(\"u.id='$teamNumber'\");\n $result = $qb->getQuery()->getResult();\n \n return $result;\n }",
"public function getTeams()\n {\n $em = $this->getEntityManager();\n $query = $em->createQuery(\n 'SELECT p\n FROM Vlreleases\\UserBundle\\Entity\\Team p\n ORDER BY p.tname ASC'\n );\n $result = $query->getResult();\n \n return $result;\n }",
"function get_team_info_db($idTeam)\n{\n require('./model/connect_db.php');\n $sql = \"select t.nameTeam from team t where t.idteam = '%d'\";\n $request = sprintf($sql,$idTeam);\n $result = mysqli_query($link,$request) or die(utf8_encode(\"request error\") . $request);\n $team_info = mysqli_fetch_assoc($result);\n return $team_info;\n}",
"public function getOurTeam()\n {\n $data = HomeController::getPage('our-team');\n return view('our_team')->with(['data' => $data]);\n }",
"public function getTeams() { \r\n $uri = $this->payload->_links->teams->href;\r\n $response = file_get_contents($uri, false, stream_context_create($this->reqPrefs)); \r\n $response = json_decode($response);\r\n \r\n return $response->teams;\r\n }",
"public function getTeamAttribute() {\n return $this->team()->first();\n }",
"public static function fetchTeam($team = null)\n {\n if (is_null($team) || !Config::get('entrust.use_teams')) {\n return null;\n }\n\n return static::getIdFor($team, 'team');\n }",
"public function teams()\n {\n return $this->request('get', '/api/teams');\n }",
"function get_driver_team($idTeam)\n{\n $list_driver = get_driver_team_db($idTeam);\n return $list_driver;\n}",
"function getTeamById($teamId){\r\n //$GLOBALS['link'] = connect();\r\n $res = mysqli_query($GLOBALS['link'], 'select id`, `name`, `score` from teams where `id`='. $teamId .';');\r\n\r\n return fetch_result($res);\r\n}",
"public function show(Team $team)\n {\n //\n }",
"public function show(Team $team)\n {\n //\n }",
"public function show(Team $team)\n {\n //\n }",
"public function show(Team $team)\n {\n //\n }",
"public function show(Team $team)\n {\n //\n }",
"public function show(Team $team)\n {\n //\n }",
"public function team()\n {\n return $this->user();\n }",
"public function createTeam($name)\n {\n return $this->requestWithErrorHandling('post', '/api/owned-teams', [\n 'name' => $name,\n ]);\n }",
"function ermittle_Teamnamen($teamnr)\n{\n $teamname = 'unbekannt';\n //\n $single_team = Team::where('TeamNr', '=', $teamnr)\n ->first();\n //\n if ($single_team) {\n $teamname = $single_team->TeamName;\n }\n //\n return $teamname;\n}",
"function get_team_info($team_id) {\n global $db;\n $query = 'SELECT t.team_id\n , t.name\n , t.nickname\n , t.logo_file_name\n , l.name as league\n , l.abbr as league_abbr\n , s.name as sub_league_name\n , s.abbr as sub_league_abbr\n , d.name as div_name\n FROM teams t INNER JOIN leagues l ON t.league_id = l.league_id\n INNER JOIN sub_leagues s ON t.league_id = s.league_id AND t.sub_league_id = s.sub_league_id\n INNER JOIN divisions d ON t.league_id = d.league_id AND t.sub_league_id = d.sub_league_id\n AND t.division_id = d.division_id\n WHERE t.team_id = :team_id';\n $statement = $db->prepare($query);\n $statement->bindValue('team_id', $team_id);\n $statement->execute();\n $team_info = $statement->fetch();\n $statement->closeCursor();\n return $team_info;\n}",
"public function get_team($id)\n {\n\n $this->db->where('id',$id);\n $query=$this->db->get('team');\n return $query->result_array();\n\n }",
"public function index()\n {\n $team = Team::all();\n return $team;\n }",
"public function getTeamId()\n {\n return $this->get(self::_TEAM_ID);\n }",
"public function team_info() {\n\n $method=\"team.info\";\n $payload = array();\n $team_details = $this->apicall($method, $payload);\n $this->debug(\"team-details.log\", json_encode($team_details));\n return $team_details;\n\n }",
"public function show($team, Request $request){\n\n $team = $this->team->findOrFail($team);\n \n if ($team->id === $request->user()->currentTeam->id) {\n # code...\n return $team;\n }\n\n }",
"public function testTeamsGet()\n {\n $this->get('/api/v1/teams', ['Content-Type' => 'application/json', 'Accept' => 'application/json'])\n ->seeJsonStructure([\n '*' => [\n 'id',\n 'name',\n 'nickname',\n 'acronym',\n 'coach',\n 'location',\n ]\n ]);\n }",
"public function findTeam($team, $relations = []);",
"public function getAll(){\n\t\t$url = WEBSERVICE. \"teams/getAll\";\n\t\t$this->HTTPRequest->setUrl($url);\n\t\t$this->HTTPRequest->setMethod(\"GET\");\n\t\t$arrayResponse = $this->HTTPRequest->sendHTTPRequest();\n\t\treturn $this->arrayToTeam($arrayResponse, false);\n\t}",
"protected function getTeams()\n\t{\n\t\tif(!$this->teams)\n\t\t{\n\t\t\t$this->teams = Team::orderBy('title', 'asc')->get();\n\t\t}\n\t\t\n\t\treturn $this->teams;\n\t}",
"public function getAll()\n {\n return Team::all();\n }",
"public function index($name)\n {\n $Name = implode(' ', splitUpercase($name));\n $user = User::whereName($Name)->first();\n $friends = $user->getAcceptedFriendships();\n $teams = $user->teams;\n return view('teams.myteam')->withFriends($friends)->withTeams($teams);\n }",
"public function get_teams()\r\n\t\t{\r\n\t\t\t$retArr = $this->obj->result;\r\n\r\n\t\t\treturn $retArr;\r\n\t\t}",
"function ermittle_Teamnamen_Spielplan($landnr, $teamspielplannr)\n{\n $teamname = 'unbekannt';\n //\n $single_team = Team::where('TzugLandNr', '=', $landnr)\n ->where('TeamSpielplanNr', '=', $teamspielplannr)\n ->first();\n //\n if ($single_team) {\n $teamname = $single_team->TeamName;\n }\n //\n return $teamname;\n}",
"function get_team_details($team_name, $what_to_get){\n\n\t\t//get details from config file to help us connect to the database\n\t\tinclude(\"../config.php\");\n\n\t\t//varaible to return at the end\n\t\t$result_to_return;\n\n\t\t//get what ever details from what ever team has been chosen\n\t\t$sql = \"SELECT $what_to_get FROM basketball_teams_website WHERE team_name = ? ;\";\n\t\t$stmt = mysqli_stmt_init($conn);\n\n\t\t//if connection has failed output error\n\t\tif(!mysqli_stmt_prepare($stmt, $sql)){\n\t\t\t\n\t\t\techo \"sql Statment failed!\";\n\t\t}\n\t\telse{\n\n\t\t// bind parameter to placeholders\n\t\t\tmysqli_stmt_bind_param($stmt, \"s\", $team_name);\n\n\n\t\t// run parameters inside of database\n\t\t\tmysqli_stmt_execute($stmt);\n\t\t\t$result = mysqli_stmt_get_result($stmt);\n\t\t\t$row = mysqli_fetch_assoc($result);\n\n\t\t\t//assign result to return variable to retrived data\n\t\t\t$result_to_return = $row[$what_to_get];\n\t\t}\n\n\t\t//echo data where ever the function has been called\n\t\techo $result_to_return;\n\t}",
"public function getTeam($player){\n if($player->getTeam() != null){\n $team = $player->getTeam();\n }else {\n $team = $player->getYouthTeams();\n }\n return $team;\n }",
"public function getByName($name) {\n return $this->getBy($name, \"name\");\n }",
"public function findByPlayer($name);",
"static function Get($id) {\n $db = new DB();\n\n $data = [\"id\" => $id];\n\n if ($player = $db->fetch(\"SELECT * FROM PlayerTeam WHERE id = :id\", $data, 'Player')) {\n return $player;\n } else\n return false;\n }",
"public function show(Team $team)\n {\n //\n $teams = DB::table('teams')->get();\n $success['teams'] = $teams; \n return response()->json($success, 200);\n }",
"public function showSpecificTeamAction(Team $team)\n {\n $activeTeamMemberships = $this->getDoctrine()->getRepository(TeamMembership::class)->findActiveTeamMembershipsByTeam($team);\n $inActiveTeamMemberships = $this->getDoctrine()->getRepository(TeamMembership::class)->findInactiveTeamMembershipsByTeam($team);\n usort($activeTeamMemberships, array( $this, 'sortTeamMembershipsByEndDate' ));\n usort($inActiveTeamMemberships, array( $this, 'sortTeamMembershipsByEndDate' ));\n\n $user = $this->getUser();\n $currentUserTeamMembership = $this->getDoctrine()->getRepository(TeamMembership::class)->findActiveTeamMembershipsByUser($user);\n $isUserInTeam = false;\n foreach ($currentUserTeamMembership as $wh) {\n if (in_array($wh, $activeTeamMemberships)) {\n $isUserInTeam = true;\n }\n }\n\n // Return the view with suitable variables\n return $this->render('team_admin/specific_team.html.twig', array(\n 'team' => $team,\n 'activeTeamMemberships' => $activeTeamMemberships,\n 'inActiveTeamMemberships' => $inActiveTeamMemberships,\n 'isUserInTeam' => $isUserInTeam,\n ));\n }",
"public function getTeam() {\n if(!$this->department || !$this->department->team)\n return false;\n\n return $this->department->team;\n }",
"public function getById($id)\n {\n if (!is_numeric($id)) {\n return new Http\\Response(\"Incorrect Team Id\", 400);\n }\n\n $team = null;\n\n // Try and see if the integer exists in our DB\n try {\n $team = Team::findOrFail($id);\n } catch (ModelNotFoundException $e) {\n return new Http\\Response(\"Incorrect Team Id\", 400);\n }\n\n return new Http\\Response($team, 200);\n }",
"public function currentTeam()\n {\n $entityManager = $this->getServiceLocator()->get('Omeka\\EntityManager');\n $identity = $this->getUser();\n //TODO add handeling for user not logged-in !!!this current solution would not work\n if (!$identity){\n $user_id = null;\n return null;\n\n }else{\n\n $user_id = $identity->getId();\n }\n\n //look for their current team\n $team_user = $entityManager->getRepository('Teams\\Entity\\TeamUser')->findOneBy(['user' => $user_id, 'is_current'=>1]);\n if (!$team_user){\n $team_user = $entityManager->getRepository('Teams\\Entity\\TeamUser')->findOneBy(['user' => $user_id]);\n\n if ($team_user){\n\n $team_user->setCurrent('1');\n $entityManager->merge($team_user);\n $entityManager->flush();\n }\n else{\n\n return null;\n }\n\n\n }\n if ($team_user){\n $current_team = $team_user->getTeam();\n $team_id = $current_team->getId();\n }else{\n $current_team = null;\n $team_id = 0;\n }\n return $current_team;\n }",
"public function Team() {\r\n\t\t$this->id = -1;\r\n\t\t$this->name = \"\";\r\n\t}",
"public function getTeams() {\n return $this->teams;\n }",
"public function getTeamList() {\n\t\treturn $this->getData('/team/list');\n\t}",
"public function show($id)\n {\n $team = Team::where('id', '=', $id)->firstOrFail();\n return view('teams.show', compact('team'));\n }",
"public static function get_players($team)\r\n {\r\n $result = db::sql(\"SELECT player_id, first_name, last_name FROM `superrugby_2016_scores_18` WHERE Team = '$team' ORDER BY first_name;\", DB_NAME);\r\n $player_reference = null;\r\n if (mysqli_num_rows($result)){\r\n while(list($player_id, $firstname, $lastname) = mysqli_fetch_array($result)){\r\n $player_reference[] = array('id'=>$player_id, 'firstname'=>$firstname, 'lastname'=>$lastname);\r\n }\r\n }\r\n return $player_reference;\r\n }",
"protected function getFighter($teamId)\n {\n return Team::find($teamId);\n }",
"public function getTeam_id() {\n return $this->getValue('team_id');\n }",
"public function selectLeagueWinner($league, $team);",
"public function show($id)\n {\n $team = Team::find($id);\n return view('teams.show', compact('team'));\n }",
"public function show(Team $team)\n {\n // return $team->user_id;\n }",
"public function team()\n {\n return $this->belongsTo('App\\Models\\Team');\n }",
"public function show(Team $team)\n {\n return new TeamResource($team);\n }",
"public function getTeamName()\n {\n $xpath = new \\DOMXPath($this->getXml());\n return $xpath->query('//OwningTeam/TeamName')->item(0)->nodeValue;\n }",
"public function getTeamsAt($offset)\n {\n return $this->get(self::_TEAMS, $offset);\n }",
"public function team()\n {\n return $this->belongsTo(Team::class, 'team_id', 'id');\n }",
"function get_standing_team($idSeason)\n{\n $table_standing = get_standing_team_db($idSeason);\n return $table_standing;\n}",
"public function show($id)\n {\n $team = Team::findOrFail($id);\n return view('admin.teams.show', compact('team'));\n }",
"function renameteam() {\n $this->auth(COMP_ADM_LEVEL);\n $team_id = $this->uri->segment(3);\n $new_name = urldecode($this->uri->segment(4));\n $data['team'] = $this->m_team->updateName($team_id, $new_name);\n $this->teamedit();\n }",
"public function fetchTeam($teamID){\n $sqlQuery = \"SELECT * FROM Teams WHERE teamID = :teamID\";\n $statement = $this->_dbHandle->prepare($sqlQuery);\n\n $statement->bindValue(':teamID', $teamID, PDO::PARAM_INT);\n\n $statement->execute();\n $this->_dbInstance->destruct();\n\n $dataSet = [];\n while ($dbRow = $statement->fetch(PDO::FETCH_ASSOC)) {\n $dataSet[] = new Team($dbRow);\n }\n return $dataSet;\n }",
"public function getTeamsForProject($projectId) {\n return dibi::fetchAll(\"\n SELECT *\n FROM teams\n WHERE project = %i\", $projectId\n );\n }",
"public function show($id)\n {\n //\n $team = Team::findOrFail($id);\n return view('admin.teams.show', compact('team'));\n }",
"public function getTeamId() {\n return $this->teamId;\n }",
"public function actionTeam_name() {\n if (isset($_POST['search']) != 0) {\n $output = '';\n $teamname = $_POST['search'];\n $department = $_POST['department'];\n $managers = $_POST['managers'];\n $response = array();\n $modules = Yii::$app->db->createCommand(\"SELECT distinct assist_users.id, assist_users.email FROM assist_users JOIN assist_user_meta ON assist_user_meta.uid = assist_users.id WHERE email LIKE '%$teamname%' AND department = '$department' AND assist_user_meta.meta_value = '' AND assist_user_meta.meta_key = 'team' AND assist_users.status = 1 \")->queryAll();\n foreach ($modules as $key => $val) {\n $get_userrole = $this->getUserRole($val['id']); /* get the current user's role */\n\n $userrole = $this->checkUserRole($val['id']); // check the current user is not manager\n if ($userrole != 1) {\n\n $userteam = $this->checkUserTeam($val['id'], $managers); // exclude existing users\n if ($userteam != 1) {\n if (!empty($get_userrole)) {\n if ($get_userrole[0]['meta_value'] != 7) {\n $response[] = array(\"value\" => $val['email']);\n }\n } else {\n $response[] = array(\"value\" => $val['email']);\n }\n }\n }\n }\n $output = json_encode($response);\n return $output;\n } else {\n return $this->redirect(['dv-users/index']);\n }\n }",
"public static function getInstance()\n {\n return Doctrine_Core::getTable('Team');\n }",
"public function createTeam($teamName, $student, $league);",
"public function getMotherTeam()\n {\n return Wrapper\\Team\\Senior::team($this->getMotherTeamId());\n }"
] | [
"0.778894",
"0.69826925",
"0.6979283",
"0.6946591",
"0.6900469",
"0.6855721",
"0.68554854",
"0.6837608",
"0.6782374",
"0.6681516",
"0.6655595",
"0.6634102",
"0.662447",
"0.66222507",
"0.66196036",
"0.6587913",
"0.65724945",
"0.6550653",
"0.65500575",
"0.65219235",
"0.6477591",
"0.64722544",
"0.64715654",
"0.63954234",
"0.6378486",
"0.6340496",
"0.63355535",
"0.6324166",
"0.63229275",
"0.63174754",
"0.62716955",
"0.6255992",
"0.6249137",
"0.6247882",
"0.6226122",
"0.6174528",
"0.6160327",
"0.6144744",
"0.6141849",
"0.61342734",
"0.6127735",
"0.61130834",
"0.61130834",
"0.61130834",
"0.61130834",
"0.61130834",
"0.61130834",
"0.61004055",
"0.6073657",
"0.60726714",
"0.60703796",
"0.6048707",
"0.60399836",
"0.6039728",
"0.6034",
"0.6033044",
"0.6016305",
"0.59875584",
"0.5981248",
"0.5970443",
"0.59471875",
"0.59447205",
"0.5932268",
"0.5928599",
"0.5921035",
"0.59102255",
"0.58943766",
"0.5877288",
"0.5874574",
"0.58721113",
"0.58679676",
"0.58542734",
"0.5835455",
"0.5833269",
"0.58266604",
"0.58012706",
"0.57954466",
"0.5790698",
"0.57881784",
"0.5787633",
"0.57845354",
"0.5759107",
"0.5753854",
"0.57538",
"0.5753131",
"0.5743605",
"0.5740907",
"0.5739975",
"0.57395977",
"0.5739024",
"0.5738439",
"0.5734375",
"0.57251126",
"0.5714813",
"0.5711868",
"0.5704403",
"0.5700068",
"0.5697963",
"0.56893265",
"0.56859034"
] | 0.7587281 | 1 |
Get all active teams | public function getAllTeams($limit = 25, $offset = 0)
{
if (!$this->isValidLimit($limit)) {
throw new InvalidLimitException();
}
if (!$this->isValidOffset($offset)) {
throw new InvalidOffsetException();
}
$params = [
'limit' => intval($limit),
'offset' => intval($offset),
];
return $this->get('teams', $params);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTeams();",
"public function getAll()\n {\n return Team::all();\n }",
"public function getAllActive()\n {\n return Team::enabled()->get();\n }",
"public function teams()\n {\n return $this->request('get', '/api/teams');\n }",
"public function getAll(){\n\t\t$url = WEBSERVICE. \"teams/getAll\";\n\t\t$this->HTTPRequest->setUrl($url);\n\t\t$this->HTTPRequest->setMethod(\"GET\");\n\t\t$arrayResponse = $this->HTTPRequest->sendHTTPRequest();\n\t\treturn $this->arrayToTeam($arrayResponse, false);\n\t}",
"public function getTeams()\n {\n $em = $this->getEntityManager();\n $query = $em->createQuery(\n 'SELECT p\n FROM Vlreleases\\UserBundle\\Entity\\Team p\n ORDER BY p.tname ASC'\n );\n $result = $query->getResult();\n \n return $result;\n }",
"public static function loadAllTeams()\n {\n\n $sql_connection = new mySqlConnection();\n $sql = \"SELECT * FROM team ORDER BY team_name ASC\";\n\n $statement = $sql_connection->connect()->prepare($sql);\n $statement->execute();\n $allTeams = $statement->fetchAll(PDO::FETCH_UNIQUE);\n\n return $allTeams;\n }",
"public function getTeams() {\n return $this->teams;\n }",
"public function getTeams() { \r\n $uri = $this->payload->_links->teams->href;\r\n $response = file_get_contents($uri, false, stream_context_create($this->reqPrefs)); \r\n $response = json_decode($response);\r\n \r\n return $response->teams;\r\n }",
"public function get_teams()\r\n\t\t{\r\n\t\t\t$retArr = $this->obj->result;\r\n\r\n\t\t\treturn $retArr;\r\n\t\t}",
"protected function getTeams()\n\t{\n\t\tif(!$this->teams)\n\t\t{\n\t\t\t$this->teams = Team::orderBy('title', 'asc')->get();\n\t\t}\n\t\t\n\t\treturn $this->teams;\n\t}",
"public function getTeams()\n {\n $teams = array();\n $teamsEm = $this->getRepo()->findAll();\n foreach ($teamsEm as $team) {\n $teams[] = $team;\n }\n \n return $teams;\n }",
"public function getTeamList() {\n if ($this->cached['Team']) return array_values($this->cache['Team']);\n return XPClass::forName('de.uska.db.Team')\n ->getMethod('getPeer')\n ->invoke()\n ->doSelect(new Criteria(\n array('team_id', $this->getTeam_id(), EQUAL)\n ));\n }",
"public function ownedTeams()\n {\n return $this->request('get', '/api/owned-teams');\n }",
"public static function loadAllTeams()\n\t{\n\t\t$tmpDataMgr = createNewDataManager();\n\t\t$sql = self::getQueryTextAndCurYearWeek();\n\t\t$qTeam = $tmpDataMgr->runQuery($sql);\n\t\t$aTeams = array();\n\t\t\n\t\twhile($row = mysql_fetch_assoc($qTeam))\n\t\t{\t\t\n\t\t\t$aTeams[$row[\"id\"]] = new Team($row);\n\t\t}\n\t\t\n\t\treturn $aTeams;\n\t\t\n\t}",
"public function getTeams()\n\t{\n\t\treturn $this->_teams;\n\t}",
"public function getTeams() : Collection\n {\n return $this->teams;\n }",
"public function getTeam();",
"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 }",
"public function getTeamList() {\n\t\treturn $this->getData('/team/list');\n\t}",
"public function fetchAllTeams(){\n $sqlQuery = \"SELECT teamID, teamID, teamName, dateCreated, lastUpdate, isBusy, (select count(userID)\n FROM Users where Users.teamID = Teams.teamID) as'memberCount' \n FROM Teams\";\n $statement = $this->_dbHandle->prepare($sqlQuery);\n $statement->execute();\n\n $dataSet = [];\n while ($dbRow = $statement->fetch(PDO::FETCH_ASSOC)) {\n $dataSet[] = new Team($dbRow);\n\n }\n\n $this->_dbInstance->destruct();\n return $dataSet;\n }",
"public function getAll()\n {\n $teams = Team::all();\n\n return new Http\\Response($teams, 200);\n }",
"public function getAll(){\n return view('/backoffice/teams_read', ['teams' => Team::with('users')->paginate(Config::get('constants.backoffice.NUMBER_OF_DISPLAYED_TEAMS_PER_PAGE'))]);\n }",
"public function index()\n {\n $team = Team::all();\n return $team;\n }",
"function get_all_tournament_teams()\n {\n $this->db->select('TT.tournament_team_id,TT.team_id,T.tournament_name,T1.team_name,P.player_name as captain,P.employee_id,P1.player_name as vice_captain');\n $this->db->join('tournaments as T', 'T.tournament_id = TT.tournament_id');\n $this->db->join('teams as T1' , 'TT.team_id = T1.team_id');\n $this->db->join('players as P' , 'TT.captain = P.player_id ');\n $this->db->join('players as P1' , 'TT.vice_captain = P1.player_id ');\n $this->db->where(array('TT.is_active'=>'T','T.is_active'=>'T')); \n\n return $this->db->get('tournament_teams as TT')->result_array();\n }",
"public function getAllTeamsForUser(Request $request)\n {\n return $this->teams->getAllTeamsForUser($request->user());\n }",
"public function testTeamsGet()\n {\n $this->get('/api/v1/teams', ['Content-Type' => 'application/json', 'Accept' => 'application/json'])\n ->seeJsonStructure([\n '*' => [\n 'id',\n 'name',\n 'nickname',\n 'acronym',\n 'coach',\n 'location',\n ]\n ]);\n }",
"public function index(Request $request){\n\n return $this->repo->getUserTeams($request->user());\n\n }",
"public function index()\n {\n return response(League::withCount('teams')->get());\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}",
"public function teams()\n {\n return $this->hasManyThrough('App\\Models\\Championship\\Team', 'App\\Models\\Championship\\Tournament');\n }",
"public function index() {\n\t\ttry {\n\t\t\t$teams = Team::active()->with(['teamParent', 'leader'])->latest()->get();\n\t\t\t$team_tree = getTeamTree(Team::all());\n\t\t\treturn response()->json(['teams' => $teams, 'team_tree' => $team_tree]);\n\t\t} catch (\\Exception $e) {\n\t\t\t\\Log::info($e);\n\t\t\treturn response()->json(['status' => 'error', 'message' => 'Get teams failed!']);\n\t\t}\n\t}",
"function teams(){\n\t\t$this->autoRender = false;\n\t\t$this->response->type('json');\n\t\ttry {\n\t\t\t$teams = $this->Team->find('all');\n\t\t}catch (Exception $e){\n\t\t\techo $this->dbError;\n\t\t}\n\t\tif (!empty($teams)){\n\t\t\techo json_encode($teams);\n\t\t}else{\n\t\t\techo $this->noResult;\n\t\t}\n\t}",
"public function sycTeams(){\n //Get all team\n $url = \"http://db.basketball.nl/db/json/team.pl?clb_ID=81\";\n\n //Get json file for api\n\n //TODO set to api\n $teams = file_get_contents($url);\n $teams = json_decode($teams);\n\n\n //TODO filter if there is dubbel comp_id\n\n //TODO create team categorys for menu\n foreach ($teams->teams as $team){\n\n //Create new team entity\n $teamEntities = $this->Teams->newEntity();\n $teamEntities->name = $team->naam;\n\n //Create slug\n $teamEntities->slug = strtolower(Text::slug(trim($team->naam)));\n $teamEntities->nbb_id = $team->id;\n $teamEntities->comp_id = $team->comp_id;\n\n //Save team\n $this->Teams->save($teamEntities);\n }\n\n }",
"private function loadAllTeams()\n\t{\n\t\t$this->aTeams = Team::loadAllTeams();\n\t}",
"public function sportTeams()\n { \n\n $finalTeams = array();\n $technicalTeams = DB::table('teams')->where('domain', '=', 'SPORT')->get();\n $user_id = Auth::user()->id;\n foreach ($technicalTeams as $team) {\n if($team->id != $user_id)\n array_push($finalTeams, $team);\n }\n \n return view('technicalTeams')->with('sportTeams',$finalTeams);\n }",
"public function index()\n {\n $teams = Team::all();\n return TeamResource::collection($teams);\n }",
"public function actionListmyteam() {\n return array('status' => 0, 'status_msg' => 'ok');\n }",
"public function getTeamMembers(){\n // body\n $team = new Team();\n $data = $team->getAllTeamByGroup();\n\n // return response.\n return response()->json($data);\n }",
"public function allTeamNames() {\n return $this->allTeams()->pluck('name')->toArray();\n }",
"public function get_teams()\n\t\t{\n\t\t\t$retArr = null;\n\n\t\t\t// Scaffolding Code For Array:\n\t\t\t$objs = $this->obj->find_all();\n\t\t\tforeach($objs as $obj)\n\t\t\t{\n\t\t\t\t$retArr[] = $obj->getBasics();\n\t\t\t}\n\n\t\t\treturn $retArr;\n\t\t}",
"public function teams()\n {\n return $this->hasMany('Fantasee\\Team');\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 getTeamsForProject($projectId) {\n return dibi::fetchAll(\"\n SELECT *\n FROM teams\n WHERE project = %i\", $projectId\n );\n }",
"public function teamMembers()\n {\n return $this->request('get', '/api/teams/'.Helpers::config('team').'/members');\n }",
"public function teams()\n {\n return $this->belongsToMany('p4\\Team')->withPivot('status')->withTimestamps();\n }",
"public function getAllTeamsAdmin() {\n\t\t$url = WEBSERVICE. \"teams/getAllTeamsAdmin\";\n\t\t$this->HTTPRequest->setUrl($url);\n\t\t$this->HTTPRequest->setMethod(\"GET\");\n\t\t$arrayResponse = $this->HTTPRequest->sendHTTPRequest();\n\t\treturn $arrayResponse;\n\t}",
"public function indexAction(){\n $user = $this->getUser();\n\n if($user->getRole()->getRole() === 'ROLE_EMPLOYEE'){\n $teams = $user->getTeams();\n }else if($user->getRole()->getRole() === 'ROLE_MANAGER'){\n $teams = $user->getManagedTeams();\n }else if($user->getRole()->getRole() === 'ROLE_ADMIN'){\n $em = $this->getDoctrine()->getManager();\n $teams = $em->getRepository('UserBundle:Team')->findAll();\n }else{\n $teams = null;\n }\n\n return $this->render('UserBundle:Team:table.html.twig', [\n 'teams' => $teams,\n ]);\n }",
"public function index()\n {\n $teams = DB::table('team_user')\n ->where('user_id', Auth::user()->id)\n ->get();\n \n return TeamUserResource::collection($teams, 200); \n }",
"public function testActiveTeamResponse()\n {\n $client = new DebugClient($_SERVER['FANTASY_DATA_API_KEY'], Subscription::KEY_DEVELOPER);\n\n /** @var \\GuzzleHttp\\Command\\Model $result */\n $result = $client->Teams([]);\n\n $response = $client->mHistory->getLastResponse();\n\n $this->assertEquals('200', $response->getStatusCode());\n\n /** we expect 32 teams for 2014 */\n $this->assertCount( 32, $result );\n\n $check_team_keys = function ( $pTeam )\n {\n /** we expect 19 stats (woah!) */\n $this->assertCount( 19, $pTeam );\n\n $cloned_array = $pTeam;\n\n /** this function helps us assure that we're not missing any keys in the Enum list */\n $process_key = function ( $pKey ) use ( $pTeam, &$cloned_array )\n {\n $this->assertArrayHasKey( $pKey, $pTeam );\n unset( $cloned_array[$pKey] );\n\n if ( Teams\\Property::KEY_STADIUM_DETAILS == $pKey )\n {\n $pStadium = $pTeam[$pKey];\n\n /** we expect 7 keys */\n $this->assertCount( 7, $pStadium );\n\n $cloned_stadium = $pStadium;\n\n $process_stadium = function ( $pStadiumKey ) use ( $pStadium, &$cloned_stadium )\n {\n $this->assertArrayHasKey( $pStadiumKey, $pStadium );\n unset( $cloned_stadium[$pStadiumKey] );\n };\n\n /** test all the stadium keys */\n $process_stadium( Stadium\\Property::KEY_CAPACITY );\n $process_stadium( Stadium\\Property::KEY_CITY );\n $process_stadium( Stadium\\Property::KEY_COUNTRY );\n $process_stadium( Stadium\\Property::KEY_NAME );\n $process_stadium( Stadium\\Property::KEY_PLAYING_SURFACE );\n $process_stadium( Stadium\\Property::KEY_STADIUM_ID );\n $process_stadium( Stadium\\Property::KEY_STATE );\n }\n };\n\n /** test all the keys */\n $process_key( Teams\\Property::KEY_CITY );\n $process_key( Teams\\Property::KEY_CONFERENCE );\n $process_key( Teams\\Property::KEY_DIVISION );\n $process_key( Teams\\Property::KEY_FULL_NAME );\n $process_key( Teams\\Property::KEY_KEY );\n $process_key( Teams\\Property::KEY_NAME );\n $process_key( Teams\\Property::KEY_STADIUM_DETAILS );\n $process_key( Teams\\Property::KEY_STADIUM_ID );\n\n /** 06/07/2014 Update */\n $process_key( Teams\\Property::KEY_AVERAGE_DRAFT_POSITION );\n $process_key( Teams\\Property::KEY_AVERAGE_DRAFT_POSITION_PPR );\n $process_key( Teams\\Property::KEY_BYE_WEEK );\n $process_key( Teams\\Property::KEY_DEFENSIVE_COORDINATOR );\n $process_key( Teams\\Property::KEY_DEFENSIVE_SCHEME );\n $process_key( Teams\\Property::KEY_HEAD_COACH );\n $process_key( Teams\\Property::KEY_OFFENSIVE_COORDINATOR );\n $process_key( Teams\\Property::KEY_OFFENSIVE_SCHEME );\n $process_key( Teams\\Property::KEY_SPECIAL_TEAMS_COACH );\n $process_key( Teams\\Property::KEY_TEAM_ID );\n\n /** ?? */\n $process_key( Teams\\Property::KEY_PLAYER_ID );\n\n $this->assertEmpty( $cloned_array );\n };\n\n $stats = $result->toArray();\n\n array_walk( $stats, $check_team_keys );\n }",
"function getAllTeamsMatching($terms){\n\t\treturn $this->avalanche->getAllTeamsMatching($terms);\n\t}",
"public function teams()\n {\n return $this->belongsToMany('Skunenieki\\System\\Models\\Team');\n }",
"public function teams()\n {\n return $this -> belongsToMany( 'App\\Models\\Team', 'album_team' );\n }",
"function team_list()\n {\n }",
"public function team();",
"protected function getFighters()\n {\n return $this->championship->teams;\n }",
"public function teams()\n {\n return $this->belongsToMany('App\\Team')->withPivot('isCaptain');\n }",
"public function teams()\n {\n return $this->belongsToMany('App\\Team', 'competitions_teams', 'competitionId', 'teamId');\n }",
"public function teams()\n {\n return $this->belongsToMany('Litepie\\Team\\Models\\Team')\n ->withPivot([\n 'id', 'role',\n ]);\n }",
"public function getTeamIterator() {\n if ($this->cached['Team']) return new HashmapIterator($this->cache['Team']);\n return XPClass::forName('de.uska.db.Team')\n ->getMethod('getPeer')\n ->invoke()\n ->iteratorFor(new Criteria(\n array('team_id', $this->getTeam_id(), EQUAL)\n ));\n }",
"public function getTeam()\n {\n $admins = User::whereHas('role', function($query) {\n $query->where('name', '=', 'Sub Admin');\n });\n\n return Datatables::of($admins)\n ->editColumn('id', function($admin) {\n return '<a href=\"' . url('admin/team/' . $admin->id . '/edit') . '\">' . $admin->id . '</a>';\n })\n ->addColumn('status', function($admin) {\n return $admin->archived ? '<span style=\"color: red;\">Inactive</span>' : '<span style=\"color: green;\">Active</span>';\n })\n ->addColumn('action', function($admin) {\n return $admin->archived ? '<a href=\"' . url('admin/team/' . $admin->id . '/activate') . '\"><i class=\"fa fa-check\" aria-hidden=\"true\" style=\"color: green;\"></i></a>' :\n '<a href=\"' . url('admin/team/' . $admin->id . '/deactivate') . '\"><i class=\"fa fa-times\" aria-hidden=\"true\" style=\"color: red;\"></i></a>';\n })\n ->make(true);\n }",
"public function index()\n {\n $teams = Team::all();\n \n return view('teams.index', compact('teams'));\n }",
"public function get_teams($round_ids = null, $competition_ids = null)\n\t\t{\n\t\t\t$output = file_get_contents($this->api_url.\"/teams?api_key=\".$this->api_key);\n\t\t\treturn json_decode($output);\n\t\t}",
"public function index()\n {\n Gate::authorize('teams');\n\n $teams = Team::paginate();\n return view('admin.teams.index',[\n 'teams' => $teams,\n ]);\n }",
"public function index()\n {\n $teams = Team::orderBy('id','asc')->get();\n\n return view('player.teams.index', [\n 'teams' => $teams,\n ]);\n }",
"public function index()\n {\n $this->groups = Team::all();\n return view('admin.teams.index', $this->data);\n }",
"public function index()\n {\n return response()->json(TeamManagement::all());\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 teams($contest_id = null) {\n $this->auth(COMP_ADM_LEVEL);\n if($contest_id == null){\n $contest_id = $this->uri->segment(3);\n }\n $data['competition_data'] = $this->m_key->getTeamDataByContestId($contest_id);\n $data['teams'] = $this->m_team->getAllByContestId($contest_id);\n $this->load->view('admin/company_admin/v_teams', $data);\n }",
"public function getDropboxTeams() {\n return @$this->attributes['dropbox_teams'];\n }",
"public function index()\n\t{\n $teams = Team::all();\n return view('teams.index', compact('teams'));\n\t}",
"public function getTeam() {\n return $this->db->getTeamById($this->teamId);\n }",
"public function competition_team_get()\n\t{\n\n\t\tif($_SERVER['REQUEST_METHOD'] != \"GET\")\n\t\t{\n\t\t $this->response('Not Acceptable',406);\n\t\t}\n\t\t$comp_team_list_arr=array();\n\n\t\t$this->load->model('Table_model');\n\t\t$comp_team_list_arr=$this->Table_model->GetCompetitionTeam();\n\t\tif(count($comp_team_list_arr)>0)\n\t\t{\n\t\t\t$this->response(array('status'=>'success','competition_team'=>$comp_team_list_arr), 200);\n\t\t}\n\t\telse\n\t\t\t$this->response(array('status'=>'failed','message'=>'No records in database'),200);\n\t\n\t\n\t}",
"public function index()\n {\n $teams = Team::latest()->paginate(20);\n return view('system.teams.index',compact(['teams']));\n }",
"public function get_seasonteams()\n\t\t{\n\t\t\t// Scaffolding Code For Array:\n\t\t\t$objs = $this->obj->execute();\n\t\t//\tprint_r($objs);\n\t\t\tforeach($objs as $obj)\n\t\t\t{\n\t\t//\t\tprint_r($obj);\n\t\t\t\t$team = ORM::factory('Sportorg_Team',$obj['team_id']);\n\n\t\t\t\t$retArr[] = $team->getBasics();\n\t\t\t}\n\n\t\t\treturn $retArr;\n\t\t}",
"public function team()\n\t{\n\t\treturn $this->oneToMany(__NAMESPACE__ . '\\\\Owner', 'projectid');\n\t}",
"public function getSwimmersByTeam($team = null, $active = null)\n {\n if ($team != null) { //set default\n $team = config('swimtimes.team', '371');\n }\n\n if ($active != null) {\n $active = config('swimtimes.active', 'false');\n }\n\n $this->api->setPath('swim/list/team?team=' . $team . '&active=' . $active);\n return $this->api->getData();\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}",
"public function getTeamsCount()\n {\n return $this->count(self::_TEAMS);\n }",
"public function listAll()\n {\n $tournament = Tournaments::get();\n return response()->json($tournament, 200);\n }",
"public function index()\n {\n $teams = team::all();\n \n\n return view('/teamindex', compact('teams'));\n }",
"public function index()\n {\n //\n\n $teams = Team::all();\n\n return view('admin.teams.index', compact('teams'));\n }",
"public function index()\n {\n $teams = Team::all();\n return view('teams.index', ['teams' => $teams]);\n }",
"public function getAllActive() {}",
"function get_all_tournament_players()\n {\n $this->db->select('tournament_players_id,team_name,player_name,employee_id,company');\n $this->db->join('tournament_teams as TT', 'TT.tournament_team_id = TP.tournament_team_id');\n $this->db->join('tournaments as T', 'T.tournament_id = TT.tournament_id AND T.is_active = \"T\"');\n $this->db->join('players as P' , 'TP.player_id = P.player_id ');\n $this->db->join('teams as T1' , 'TT.team_id = T1.team_id');\n \n return $this->db->get_where('tournament_players as TP',array('TP.is_deleted'=>0))->result_array();\n }",
"public function index()\n {\n $teams = Team::all();\n return view('admin.team.index',compact('teams'));\n }",
"public function teams()\n {\n return $this->belongsToMany(\\App\\Models\\Team\\Team::class, 'teams_matches', 'match_id', 'team_id')->withPivot(['goals']);\n }",
"public function index()\n {\n $teams = \\App\\Team::all();\n return view('team.index', compact('teams'));\n }",
"public function index(){\n $nbrPag = 20;\n $teams = Team::orderBy('league_id')->whereHas('players', function($query){\n $query->where('activity', '=', 1);\n })->has('players', '>', 0)->paginate($nbrPag);\n\n if(!Input::get('page')){\n $page = 0;\n } else {\n $page = Input::get('page') * $nbrPag - $nbrPag;\n }\n return view('admin.players.index', compact('teams', 'page'));\n }",
"public function index()\n {\n return view('pages.teams.teams');\n }",
"public function index()\n {\n //\n $teams =Team::paginate(2);\n return view('team/lists')->withTeams($teams);\n }",
"public function getOurTeam()\n {\n $data = HomeController::getPage('our-team');\n return view('our_team')->with(['data' => $data]);\n }",
"public function index()\n {\n return view('teams.index', ['teams' => HelpdeskTeam::all()]);\n }",
"public function getPlayersByTeam(){\n $team = Input::get('id');\n if(Request::ajax()) {\n // Select players where team = get_id and pivot_team_id = get_id and pivot_activity=1\n $teams = Team::with(['players' => function($query) use ($team){\n $query->wherePivot('team_id' , '=' , $team)\n ->wherePivot('activity', '=', 1);\n }])->where('id', '=', $team)->get();\n return view('admin.partials.playersAjax', compact('teams'));\n }\n }",
"public function teams_view()\n {\n $user = \\Auth::user();\n $is_referee = \\App\\Referee::where('user_id', $user->id)->first();\n $is_admin = \\App\\Admin::where('user_id', $user->id)->first();\n\n $venue = false;\n $teams = false;\n \n if($is_referee)\n {\n $venue = \\App\\Venue::find($is_referee->venue_id);\n } else if($is_admin) {\n $venue = \\App\\Venue::find($is_admin->venue_id);\n }\n\n if($venue and $is_admin)\n {\n $teams = \\App\\Team::where('venue_id', $is_admin->venue_id)->orderBy('name')->paginate(15);\n } else if($venue and $is_referee) {\n $teams = \\App\\Team::where('venue_id', $is_referee->venue_id)->orderBy('name')->paginate(15);\n } else {\n return abort(404);\n }\n\n return view('admin_users.teams_view', ['teams' => $teams]);\n }",
"public function getTeamRoles()\n {\n $roles = [];\n\n foreach (Spark::roles() as $key => $value) {\n $roles[] = ['value' => $key, 'text' => $value];\n }\n\n return response()->json($roles);\n }",
"public function getAll() { \r\n return $this->makeRequest('get', \"/games/top\");\r\n }",
"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}",
"private static function setUpTeams()\n {\n $teams = [\n new Team('team1'),\n new Team('team2'),\n new Team('team3'),\n new Team('team4'),\n new Team('team5'),\n new Team('team6'),\n ];\n\n foreach ($teams as $team) {\n $team->setPlayingFormation('regular');\n\n for ($i = 0; $i < $team::MAX_GOAL_KEEPERS; $i++) {\n $team->addPlayer(self::setUpPlayer(Player::POSITION_GOAL_KEEPER));\n }\n\n for ($i = 0; $i < $team::MAX_DEFENDERS; $i++) {\n $team->addPlayer(self::setUpPlayer(Player::POSITION_DEFENDER));\n }\n\n for ($i = 0; $i < $team::MAX_MID_FIELDERS; $i++) {\n $team->addPlayer(self::setUpPlayer(Player::POSITION_MID_FIELDER));\n }\n\n for ($i = 0; $i < $team::MAX_STRIKERS; $i++) {\n $team->addPlayer(self::setUpPlayer(Player::POSITION_STRIKER));\n }\n }\n\n return $teams;\n }",
"public function testGetAllTeamsWithSuccess()\n {\n $this->classUnderTestConstructorArgs['teamRepository']->shouldReceive('getTeams')->andReturn($this->teams);\n\n $actual = $this->mockedTeamService->getAllTeams();\n $expected = $this->teams;\n $this->assertEquals($actual, $expected);\n }",
"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}"
] | [
"0.8126422",
"0.80921715",
"0.80690163",
"0.78078437",
"0.7777228",
"0.7580821",
"0.75313735",
"0.7504203",
"0.75040525",
"0.75033045",
"0.74476576",
"0.73166925",
"0.7269366",
"0.72227854",
"0.7219081",
"0.71843076",
"0.71345973",
"0.7093068",
"0.7080585",
"0.70080274",
"0.7000269",
"0.69962",
"0.6920708",
"0.6893115",
"0.6815128",
"0.6800695",
"0.67795205",
"0.6757911",
"0.67487776",
"0.6743172",
"0.66537917",
"0.6627398",
"0.6597677",
"0.6592318",
"0.65846545",
"0.65791863",
"0.657841",
"0.65458906",
"0.6533371",
"0.652291",
"0.65112394",
"0.64984286",
"0.6489693",
"0.6483211",
"0.64761287",
"0.6448832",
"0.6442945",
"0.6440068",
"0.6417211",
"0.6416596",
"0.6367602",
"0.6359316",
"0.6346076",
"0.63429636",
"0.6297283",
"0.6278217",
"0.625935",
"0.62563545",
"0.6253974",
"0.62484306",
"0.6246297",
"0.6208228",
"0.6202949",
"0.620272",
"0.6200678",
"0.6195709",
"0.61917806",
"0.6183919",
"0.6182703",
"0.61314106",
"0.6123746",
"0.6120851",
"0.610759",
"0.6102325",
"0.6097001",
"0.60946876",
"0.6090539",
"0.60897416",
"0.6064164",
"0.605692",
"0.6043788",
"0.6043026",
"0.60383326",
"0.6033315",
"0.60323125",
"0.6024459",
"0.60230565",
"0.60195035",
"0.6014584",
"0.60013145",
"0.5998633",
"0.5984666",
"0.5982259",
"0.5972756",
"0.5965265",
"0.5956922",
"0.5948896",
"0.5947438",
"0.5936615",
"0.5934677",
"0.5931071"
] | 0.0 | -1 |
put your code here constructor | function __construct() {
require_once 'common.php';
try{
$options = array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8');
$this->_db = new PDO('mysql:host='.$host.';dbname='.$database, $user, $password, array(PDO::ATTR_PERSISTENT => true));
$this->_db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch(PDOException $ex) {
die("Failed to connect to the database: ");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct()\n\t\t{\n\t\t\t# code...\n\t\t}",
"function __construct(){\n\t\t// nowt much...\n\t}",
"public function __construct()\n\t\t{\n\t\t\t\n\t\t}",
"public function __construct()\n\t\t{\n\t\t\t//\n\t\t}",
"function __construct() {\n\t\t\n\t//TODO - Insert your code here\n\t}",
"public function __construct()\n\t{\n\t\t// nothing to do\t\n\t}",
"public function __construct()\n\t\t{\t\t\t\n\t\t}",
"function __construct()\r\n\t\t{\r\n\t\t\t\r\n\t\t}",
"function __construct()\n\t{\n\t\t# code...\n\t}",
"protected function __construct()\r\n\t{\r\n\t}",
"private function __construct()\r\r\n {\r\r\n // TODO - Insert your code here\r\r\n }",
"protected function __construct()\n\t{\n\t\t// Nothing here\n\t}",
"public function __construct()\r\n\t\t{\r\n\t\t}",
"public function __construct() { \n\t\t\n\n\t\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}",
"public function __construct()\n\t{\n\t\t//\n\t}",
"private function __construct()\r\n\t{\r\n\t\r\n\t}",
"private function __construct()\r\r\n\t{\r\r\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}",
"function __construct()\n\t{\n\t\t\n\t\t\n\t}",
"function __construct (){\n\t\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t// ben duoi nay se la cac logic cua __construct lop con ma chung ta can dinh nghia - xu ly\n\t}",
"public function __construct(){\n\t\t//\n\t}",
"public function __construct(){\n\t\t//\n\t}",
"function _construct() {\n \t\n\t\t\n\t}",
"public function __construct()\n\t{\n\t\t// Nothing here\n\t}",
"private function __construct() { \n\t\t\n\n\t}",
"private function __construct(){\n\t\t }",
"private function __construct() {\r\n\t\t\r\n\t}",
"private function __construct()\r\n\t{\r\n\t}",
"public function __construct()\r\n\t{\r\n\t}",
"public function __construct()\r\n\t{\r\n\t}",
"public function __construct()\r\n\t{\r\n\t}",
"public function __construct()\r\n\t{\r\n\t}",
"public function __construct()\r\n\t{\r\n\t}",
"function __construct() ;",
"protected function __construct()\r\n\t\t{\r\n\t\t}",
"public function __construct() {\r\n\t\t//\r\n\t}",
"function __construct() {\n\t\t\t\n\t\t}",
"final private function __construct(){\r\r\n\t}",
"public function __construct() {\n\t\t# ...\n\t}",
"public function __construct()\n\t{\n\t\n\t}",
"public function __construct()\n\t{\n\t\n\t}",
"public function __construct()\n\t{\n\t}",
"public function __construct() {\r\n\t\t\r\n\t}",
"private function __construct () \n\t{\n\t}",
"public function __construct() {\n\t\tparent::__construct();\n\t\t// Other code to run when object is instantiated\n\t}",
"private function __construct() {\r\n\t\r\n\t}",
"private function __construct()\n\t{\n\n\t}",
"public function __construct() {\n \t\t \t\n\t\t}",
"public function __construct()\n\t{\n \n\t}",
"private function __construct(){\n \t\n }",
"private function __construct()\n\t{\n\t\t\n\t}",
"public function _construct()\n\t{\n\n\t}",
"public function __construct() {\r\n\r\n\t\t}",
"function __construct() {\n\t\t\t\n\t\t\t/* Do nothing here */\n\t\t\t\n\t\t}",
"function __construct()\n\t{\n \n\t}",
"function __construct()\r\n\t{\r\n\t\t\r\n\t}",
"function __construct()\r\n\t{\t\t//Yeah bro! Freaking PhP yo..\r\n\t}",
"public function __construct() {\n\t\t// Nothing to do.\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\n\t\t}",
"function __construct() {\n\n\t\t}",
"protected function __construct() {\r\r\n // contain shared code in its constructor\r\r\n parent::__construct();\t\r\r\n\t}",
"function __construct()\r\n\t{\r\n\t}",
"public function __construct()\n\t{}",
"public function __construct()\n\t{\n\n\t}",
"public function __construct()\n\t{\n\n\t}",
"public function __construct()\n\t{\n\n\t}",
"public function __construct(){\n\t\t\tparent::__construct(); \n\t\t}",
"protected function __construct() {\n\t\t\n\t}",
"protected function __construct() {\n\t\t\n\t}",
"private function __construct() \n {\n\t\t\n }",
"private function __construct()\n\t{\n\t}",
"private function __construct()\n\t{\n\t}",
"private function __construct()\n\t{\n\t}"
] | [
"0.813941",
"0.79847896",
"0.79780304",
"0.7974748",
"0.79710597",
"0.79539406",
"0.7876008",
"0.7867498",
"0.78619045",
"0.7854988",
"0.7850288",
"0.7839539",
"0.78349173",
"0.7828115",
"0.7826647",
"0.7826647",
"0.7826647",
"0.7826647",
"0.7826647",
"0.7826647",
"0.7826647",
"0.7826647",
"0.7826647",
"0.7826647",
"0.7826647",
"0.7826647",
"0.7826647",
"0.7826647",
"0.7826647",
"0.78177446",
"0.7809644",
"0.7803629",
"0.7803629",
"0.7803629",
"0.7803629",
"0.77920204",
"0.7785012",
"0.7779305",
"0.7771106",
"0.7771106",
"0.7759018",
"0.775758",
"0.7755143",
"0.7752524",
"0.7743087",
"0.7742407",
"0.7740855",
"0.7740855",
"0.7740855",
"0.7740855",
"0.7740855",
"0.7739876",
"0.7734625",
"0.7731788",
"0.77315176",
"0.7730569",
"0.77155197",
"0.77098966",
"0.77098966",
"0.77053547",
"0.7704212",
"0.76963407",
"0.76840544",
"0.7680477",
"0.7680194",
"0.7678223",
"0.76726264",
"0.76702964",
"0.76692694",
"0.7669181",
"0.76683766",
"0.7667124",
"0.76650655",
"0.7664474",
"0.76640457",
"0.7660772",
"0.76588625",
"0.76588625",
"0.76588625",
"0.76588625",
"0.76588625",
"0.76588625",
"0.76588625",
"0.76588625",
"0.76588625",
"0.76588625",
"0.7648498",
"0.764675",
"0.76462406",
"0.76378185",
"0.76377213",
"0.7635124",
"0.7635124",
"0.7635124",
"0.7629609",
"0.7619349",
"0.7619349",
"0.7617473",
"0.7616845",
"0.7616845",
"0.7616845"
] | 0.0 | -1 |
Adding new user to mysql database returns user details | public function storeUser($email, $password, $user_type, $first_name, $last_name, $address, $city, $state, $zip, $card_num) {
$hash = $this->hashSSHA($password);
$encrypted_password = $hash["encrypted"]; // encrypted password
$salt = $hash["salt"]; // salt
$hash = $this->hashSSHA($card_num);
$encrypted_card = $hash["encrypted"]; // encrypted password
$card_salt = $hash["salt"]; // salt
$query = "
INSERT INTO users (
email,
password,
salt,
user_type,
first_name,
last_name,
address,
city,
state,
zip,
encrypted_card,
card_salt
) VALUES (
:email,
:password,
:salt,
:user_type,
:first_name,
:last_name,
:address,
:city,
:state,
:zip,
:encrypted_card,
:card_salt
)
";
try
{
$stmt = $this->_db->prepare($query);
$stmt->bindValue(':email',$email);
$stmt->bindValue(':password',$encrypted_password);
$stmt->bindValue(':salt',$salt);
$stmt->bindValue(':user_type',$user_type);
$stmt->bindValue(':first_name',$first_name);
$stmt->bindValue(':last_name',$last_name);
$stmt->bindValue(':address',$address);
$stmt->bindValue(':city',$city);
$stmt->bindValue(':state',$state);
$stmt->bindValue(':zip',$zip);
$stmt->bindValue(':encrypted_card',$encrypted_card);
$stmt->bindValue(':card_salt',$card_salt);
$stmt->execute();
}
catch(PDOException $ex)
{
$h = $ex->getMessage ();
die($h);
}
$query = "
SELECT * from users WHERE email = :email;
";
try
{
$stmt = $this->_db->prepare($query);
$stmt->bindValue(':email',$email);
$stmt->execute();
$result = $stmt->fetch();
return $result;
}
catch(PDOException $ex)
{
$h = $ex->getMessage ();
die($h);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addUser() {\n $db = new ClassDB();\n $db->connect();\n\n $result = $db->getConnection()->prepare('INSERT INTO users (user_email,\n user_password,\n user_first_name,\n user_last_name) \n VALUES (:email,\n :pass,\n :firstName,\n :lastName)');\n\n $result->bindParam(':email', $this->user_email); \n $result->bindParam(':pass', $this->user_password); \n $result->bindParam(':firstName', $this->user_first_name);\n $result->bindParam(':lastName', $this->user_last_name);\n \n $result->execute();\n $db->disconnect();\n }",
"public function newUser() {\n $this->checkValidUser();\n\n $this->db->sql = 'INSERT INTO '.$this->db->dbTbl['users'].' (username, salt, hash) VALUES (:username, :salt, :hash)';\n\n $salt = $this->getNewSalt();\n\n $res = $this->db->execute(array(\n ':username' => $this->getData('username'),\n ':salt' => $salt,\n ':hash' => md5($salt . $this->getData('password'))\n ));\n\n if($res === false) {\n $this->output = array(\n 'success' => false,\n 'key' => 'xxT5r'\n );\n } else {\n $this->output = array(\n 'success' => true,\n 'key' => 'dU4r5'\n );\n }\n\n $this->renderOutput();\n }",
"public static function addUser()\n {\n // ADD NEW DATA TO A TABLE\n // MAKE SURE TO SEND USERS TO THE /users page when a user is added\n }",
"function add_user ($User_name, $User_password, $User_email, $user_type)\n\t{\n\t\tglobal $conn;\n\n $sql_i = \"INSERT INTO login_db(user_name, user_password, user_email, user_type) VALUES \" .\n \"('$User_name', '$User_password', '$User_email', '$user_type')\";\n\n run_update($sql_i);\n\t}",
"function addUser()\n{\n $username = Slim::getInstance()->request()->post('username');\n $password = Slim::getInstance()->request()->post('password');\n\n $sql = \"SELECT username FROM users WHERE username=:username\";\n\n try\n {\n $db = getConnection();\n\n $stmt = $db->prepare($sql);\n $stmt->bindParam(\"username\", $username);\n $stmt->execute();\n $db = null;\n $username_test = $stmt->fetchObject();\n\n if($username_test) {\n echo \"error_username\";\n return;\n }\n }\n catch(PDOException $e) \n {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \n }\n\n\n $sql = \"INSERT INTO users (username, password) VALUES (:username, :password)\";\n\n try\n {\n $db = getConnection();\n\n $stmt = $db->prepare($sql);\n $stmt->bindParam(\"username\", $username);\n $stmt->bindParam(\"password\", $password);\n\n $stmt->execute();\n $db = null;\n\n }\n catch(PDOException $e) \n {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \n }\n}",
"public function addUser(){\n\n\t\ttry {\n\n\t\t\t$username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);\n\t\t\t$password = $_POST['password'];\n\n\t\t\t$password = hash('sha256', $password);\n\n\n\t\t\trequire CONTROLLER_DIR . '/dbConnecterController.php';\n\n\t\t\t$result = $db->query('SELECT * FROM users WHERE username=\"'.$username.'\"');\n\n\t\t\tif ($username && $password) {\n\n\t\t\t\t$row = $result->fetchColumn();\n\t\t\t\tif($row == 0){\n\t\t\t\t\t$statement = $db->query(\"INSERT INTO users (username,password) VALUES ('$username', '$password')\" );\n\t\t\t\t\t$db = null;\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tdie(\"Username already taken, pick something else! <br><a href='/userlist'> Go back to user list\");\n\t\t\t\t}\t\n\t\t\t}\n\n\t\t} catch (PDOException $e) {\n\t\t\tprint \"Error!: \" . $e->getMessage() . \"<br/>\";\n\t\t\tdie();\n\t\t}\n\t}",
"public function add() {\n\t\t$user = $this->User->read(null, $this->Auth->user('id'));\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->User->create();\n\t\t\t$this->request->data['User']['password'] = AuthComponent::password($this->request->data['User']['password']);\n\t\t\tif ($this->User->save($this->request->data)) {\n\t\t\t\t$this->Session->setFlash(__('The user has been saved'));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('The user could not be saved. Please, try again.'));\n\t\t\t}\n\t\t} else {\n\t\t\t$mintURL = $this->Configuration->findByName('Mint URL');\r\n\t\t\t$queryURL = $mintURL['Configuration']['value'];\r\n\t\t\t$lookupSupported = isset($queryURL) && \"\" <> $queryURL;\r\n\t\t\t$this->set('lookupSupported', $lookupSupported);\n\t\t\t$this->set('userType', $user['User']['type']);\n\t\t}\n\t}",
"public function addUser(){}",
"function registerUser()\n {\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'title', 1 => 'first_name', 2 => 'last_name', 3 => 'contacttelephone', 4 => 'contactemail', 5 => 'password', 6 => 'username', 7 => 'dob', 8 => 'house', 9 => 'street', 10 => 'town', 11 => 'county', 12 => 'pcode', 13 => 'optout', 14 => 'newsletter', 15 => 'auth_level');\n $fieldvals = array(0 => $this->Title, 1 => $this->FirstName, 2 => $this->LastName, 3 => $this->ContactTelephone, 4 => $this->ContactEmail, 5 => $this->Password, 6 => $this->Username, 7 => $this->DOB, 8 => $this->House, 9 => $this->Street, 10 => $this->Town, 11 => $this->County, 12 => $this->PCode, 13 => $this->Optout, 14 => $this->NewsletterSubscriber, 15 => $this->AuthLevel);\n $rs = $DBA->insertQuery(DBUSERTABLE, $fields, $fieldvals);\n if ($rs == 1)\n {\n $this->RegistrationSuccess = 1;\n }\n if (isset($this->PCode))\n {\n $this->geoLocate();\n }\n unset($DBA, $rs, $fields, $fieldvals);\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'id');\n $idfields = array(0 => 'username');\n $idvals = array(0 => $this->Username);\n $rs = $DBA->selectQuery(DBUSERTABLE, $fields, $idfields, $idvals);\n if (!isset($rs[2]))\n {\n while ($res = mysql_fetch_array($rs[0]))\n {\n $this->setUserVar('ID', $res['id']);\n }\n }\n unset($DBA, $rs, $fields, $idfields, $idvals);\n }",
"public function add_user() {\n try {\n //Retrieve user details.\n if (filter_has_var(INPUT_POST, 'username') && filter_has_var(INPUT_POST, 'password') && filter_has_var(INPUT_POST, 'firstname') && filter_has_var(INPUT_POST, 'lastname')) {\n $firstname = trim(filter_input(INPUT_POST, 'firstname', FILTER_SANITIZE_STRING));\n $lastname = trim(filter_input(INPUT_POST, 'lastname', FILTER_SANITIZE_STRING));\n $username = trim(filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING));\n $password = trim(filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING));\n }\n\n if ($firstname == \"\" || $lastname == \"\" || $username == \"\" || $password == \"\") {\n throw new DataMissingException(\"Please fill in all fields.\");\n }\n //Hash password.\n $hashed_password = password_hash($password, PASSWORD_DEFAULT);\n\n //Add user details to database.\n $sql = \"INSERT INTO \" . $this->tblUser . \" VALUES (NULL, 2, '$firstname', '$lastname', '$username', '$hashed_password')\";\n\n\n //Execute the insert query.\n $query = $this->dbConnection->query($sql);\n\n //If the query failed, return false. \n if (!$query) {\n throw new DatabaseException(\"There was an error adding the user.\");\n }\n //Return true if successful.\n return true;\n } catch (DataMissingException $e) {\n return $e->getMessage();\n } catch (DatabaseException $e) {\n return $e->getMessage();\n } catch (Exception $e) {\n return $e->getMessage();\n }\n }",
"public function add_user_get(){\r\n if (!$this->pronet_model->add_user('Fname Lname', '7711223344553', '[email protected]', '31111225', '1990-01-01','134091830-2')) {\r\n $response = $this->pronet_model->get_response();\r\n $this->response([\r\n 'status' => FALSE,\r\n 'message' => $response['ResponseMessage'],\r\n 'response_code' => $response['ResponseCode']\r\n ], REST_Controller::HTTP_BAD_REQUEST);\r\n } else {\r\n $response = $this->pronet_model->get_response();\r\n $this->response([\r\n 'status' => TRUE,\r\n 'message' => $response['ResponseMessage'],\r\n 'response_code' => $response['ResponseCode']\r\n ], REST_Controller::HTTP_OK);\r\n }\r\n }",
"function add_user ($username,$password)\n {\n\t\t$insert_query = \"insert into users set username='$username',password = '$password'\";\n return $this->query ($insert_query);\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}",
"function registerUser()\n {\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'title', 1 => 'first_name', 2 => 'last_name', 3 => 'contacttelephone', 4 => 'contactemail', 5 => 'password', 6 => 'username', 7 => 'dob', 8 => 'house', 9 => 'street', 10 => 'town', 11 => 'county', 12 => 'pcode', 13 => 'optout', 14 => 'newsletter', 15 => 'auth_level', 16 => 'store_owner');\n $fieldvals = array(0 => $this->Title, 1 => $this->FirstName, 2 => $this->LastName, 3 => $this->ContactTelephone, 4 => $this->ContactEmail, 5 => $this->Password, 6 => $this->Username, 7 => $this->DOB, 8 => $this->House, 9 => $this->Street, 10 => $this->Town, 11 => $this->County, 12 => $this->PCode, 13 => $this->Optout, 14 => $this->NewsletterSubscriber, 15 => $this->AuthLevel, 16 => 1);\n $rs = $DBA->insertQuery(DBUSERTABLE, $fields, $fieldvals);\n if ($rs == 1)\n {\n $this->RegistrationSuccess = 1;\n }\n if (isset($this->PCode))\n {\n $this->geoLocate();\n }\n }",
"function insertNewUser() {\n\ttry {\n\t\t// Open DB connection\n\t\t$DBH = openDBConnection();\n\t\t$DBH->beginTransaction();\n\t\t\n\t\t// Prepare salt and hash\n\t\t$salt = makeSalt();\n\t\t$hash = computeHash($_REQUEST['newPW2'], $salt);\t\t\n\t\t\n\t\t// Insert user info into DB\n\t\t$stmt = $DBH->prepare(\"insert into Users values (?, ?, ?)\");\n\t\t$stmt->bindValue(1, $_REQUEST['newLogin']);\n\t\t$stmt->bindValue(2, $hash);\n\t\t$stmt->bindValue(3, $_REQUEST['newName']);\n\t\t$stmt->execute();\n\t\t\n\t\t// Make this new user a client\n\t\t$stmt2 = $DBH->prepare(\"insert into Roles values (?, ?)\");\n\t\t$stmt2->bindValue(1, \"client\");\n\t\t$stmt2->bindValue(2, $_REQUEST['newLogin']);\n\t\t$stmt2->execute();\n\t\t\n\t\t$DBH->commit();\n\t\treturn true;\n\t}\n\tcatch (PDOException $e) {\n\t\t$DBH->rollBack();\n\t\treturn false;\n\t}\n}",
"function addUser(){\n\t$request = Slim::getInstance()->request();\n\t$evaluation = $request->getBody();\n\t$user = array(\"user_id\"=>\"\", \"user_name\"=>\"\", \"user_image\"=>\"\", \"user_twitterhandle\"=>\"\", \"user_facebookid\"=>\"\", \"user_active\"=>\"\");\n\t\n\t// construct data object\n\tforeach (explode('&', $evaluation) as $chunk) {\n\t $param = explode(\"=\", $chunk);\n\n\t if ($param) {\n\t \t$user[$param[0]] = $param[1];\n\t }\n\t}\n\n\t// check if the user exists\n\t$sql = \"SELECT * FROM mercury_users WHERE user_name = :user_name\";\n\ttry {\n\t\t$db = getConnection();\n\t\t$stmt = $db->prepare($sql); \n\t\t$stmt->bindParam(\"user_name\", $user[\"user_name\"]);\n\t\t$stmt->execute();\n\t\t$matchingEvaluation = $stmt->fetchObject(); \n\n\t\tif($matchingEvaluation){\n\n\t\t}else{\n\t\t\t$sql = \"INSERT INTO mercury_users (user_name, user_image, user_twitterhandle, user_facebookid) VALUES (:user_name, :user_image, :user_twitterhandle, :user_facebookid)\";\n\t\t\ttry {\n\t\t\t\t$db = getConnection();\n\t\t\t\t$stmt = $db->prepare($sql); \n\t\t\t\t$stmt->bindParam(\"user_name\", $user[\"user_name\"]);\n\t\t\t\t$stmt->bindParam(\"user_image\", $user[\"user_image\"]);\n\t\t\t\t$stmt->bindParam(\"user_twitterhandle\", $user[\"user_twitterhandle\"]);\n\t\t\t\t$stmt->bindParam(\"user_facebookid\", $user[\"user_facebookid\"]);\n\t\t\t\t$stmt->execute();\n\t\t\t\t$user[\"user_id\"] = $db->lastInsertId();\n\t\t\t\t$db = null;\n\t\t\t\techo json_encode($user); \n\t\t\t} catch(PDOException $e) {\n\t\t\t\terror_log($e->getMessage(), 3, '/var/tmp/php.log');\n\t\t\t\techo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \n\t\t\t}\n\t\t}\n\t}catch(PDOException $e) {\n\t\terror_log($e->getMessage(), 3, '/var/tmp/php.log');\n\t\techo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \n\t}\n}",
"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 }",
"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}",
"function addUser($dbConn, $username, $password, $email){\n // Add user to USERS table.\n $dbQuery = \"INSERT INTO USERS(Username, First_name, Last_name, Email, Status, About, Date_joined, Password)\"\n .\"VALUES('\".$username.\"', '', '', '\".$email.\"', 'active', '', CURDATE(), '\".$password.\"')\";\n \n mysqli_query($dbConn, $dbQuery);\n\n $userId = mysqli_insert_id($dbConn); // ID of the latest created user.\n \n // Add user role for newly created user into USER_ROLES table.\n $dbQuery = \"INSERT INTO USER_ROLES(User_Id, Role_Id)\"\n .\"VALUES(\".$userId.\", 1)\";\n \n mysqli_query($dbConn, $dbQuery);\n \n // Add default avatar for newly created user into IMAGES table.\n $avatar = file('images/default_avatar.png'); // Default avatar for new users.\n $dbQuery = \"INSERT INTO IMAGES(Description, Image, User_Id) \"\n .\"VALUES('test', '\".$avatar.\"', \".$userId.\")\";\n \n mysqli_query($dbConn, $dbQuery);\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 }",
"public function addUser(){\n\t}",
"public function addUserToDatabase($user) {\n $name = $user->getName();\n $password = $user->getHashedPassword();\n $sql = \"INSERT INTO users (name, password) VALUES (:name, :password)\";\n $insertToDb = $this->connection->prepare($sql);\n $insertToDb->bindParam(':name', $name);\n $insertToDb->bindParam(':password', $password);\n $insertToDb->execute();\n $this->registerStatus = true;\n }",
"function addnewuser() {\n \t\t\t$this->set('GetUserQ', $this->Users->GetUsers(0));\n \t\t\t$this->set('GetLevelsQ', $this->AccessLevels->index());\n \t\t}",
"public function addUser()\n {\n $categoryList = $this->itemModel->getCategories();\n\n //Check that register button exists and was clicked\n if (isset($_POST[\"user_submit\"])) { \n\n //Insert new row in Account and setting the User's name in database using values inputted in the HTML form\n $username = $_POST['username']; \n\n $newly_registered_account_id = $this->accountModel->registerAccount($username,$_POST[\"password\"],$_POST[\"sfsu_id\"]);\n\n $this->userModel->setUser($newly_registered_account_id,$_POST[\"firstname\"], \n $_POST[\"lastname\"],$_POST[\"country\"],$_POST[\"state\"],\n $_POST[\"address\"],$_POST[\"city\"],$_POST[\"zipcode\"],$_POST[\"phoneNumber\"]);\n\n } else {\n echo '<script language=\"javascript\">';\n echo 'alert(\"accounts.php registerUser bad.\")';\n echo '</script>';\n }\n\n header('location: ' . URL . 'home/index');\n }",
"public function saveNewUser() {\n\t\t$db = $this->getDatabaseConnection();\n\n\t\t// Prepare the SQL\n\t\t$sql =\"INSERT INTO users (email, password, first_name, last_name, username)\n\t\t\t\tVALUES (:email, :password, :first_name, :last_name, :username)\";\n\n\t\t$statement = $db->prepare($sql);\n\n\t\t// Bind the form data to the SQL query\n\t\t$statement->bindValue(':email', $_POST['email']);\n\t\t$statement->bindValue(':password', $_POST['password']);\n\t\t$statement->bindValue(':first_name', $_POST['first_name']);\n\t\t$statement->bindValue(':last_name', $_POST['last_name']);\n\t\t$statement->bindValue(':username', $_POST['username']);\n\n\t\t// Run the query\n\t\t$result = $statement->execute();\n\n\t\t//Confirm tht it worked\n\t\tif( $result == true) {\n\t\t\t// Yay!\n\n\t\t\t$_SESSION['user_id'] = $db->lastInsertID();\n\t\t\t$_SESSION['privilege'] = 'user';\n\t\t\t$_SESSION['first_name'] = $_POST['first_name'];\n\t\t\t$_SESSION['last_name'] = $_POST['last_name'];\n\t\t\t$_SESSION['username'] = $_POST['username'];\n\t\t\t$_SESSION['email'] = $_POST['email'];\n\n\t\t\theader('Location: index.php?page=account');\n\t\t} else {\n\t\t\t// Uh oh...\n\t\t}\n\n\t\t//If it did, log the user in and redirect to their \n\t\t// new account page\n\t}",
"function register_user($new) {\n \n $this->db->insert('users', $new);\n }",
"public function registerUser()\n {\n $sql = \"INSERT INTO user (username, password, email, firstname, lastname, address, date_of_birth, id_role)\n VALUES (\\\"\" . $this->getUsername().\"\\\", \\\"\" . $this->getPassword().\"\\\", \\\"\" . $this->getEmail().\"\\\",\\\"\" . $this->getFirstname().\"\\\", \\\"\" . $this->getLastname().\"\\\", \\\"\" . $this->getAddress().\"\\\", \\\"\" . $this->getDateOfBirth().\"\\\", \\\"\" . $this->getIdRole().\"\\\")\";\n $result = mysqli_query($this->_connection, $sql);\n if (!$result) {\n print \"Error: \" . $result . \"<br>\" . mysqli_error($this->_connection);\n } else {\n print \"erfolg\";\n\n }\n }",
"function add_user($name, $email, $plain_password) {\n $conn = connect();\n\n // unique id for new user\n $id = uniqid();\n\n // get current time \n $reg = date(\"F Y h:i:s A\");\n \n // hash password\n $pass = password_hash($plain_password.$email, PASSWORD_DEFAULT);\n\n try {\n // proceed transaction\n $conn->beginTransaction();\n \n $conn->exec(\"INSERT INTO user (id_user, name, email, password, registration) VALUES ('$id', '$name', '$email', '$pass', '$reg')\");\n\n // commit the transaction\n $conn->commit();\n\n echo \"New records created successfully\";\n \n } catch(PDOException $e) {\n // roll back the transaction if something failed\n $conn->rollback();\n echo \"Error: \" . $e->getMessage();\n }\n\n $conn = null;\n}",
"public function createUser();",
"public function createUser();",
"public function createUser();",
"public function createUser();",
"public function insert() {\n\t\t$this->insert_user();\n\t}",
"public function registerUser()\n\t\t{\n\t\t\ttry{\n\t\t\t\t\n\t\t\t\t$client = OrientDb::connection();\n\t\t\t\t$insert = $client->command('SELECT createUser({username: \"' . $this->email . '\", email : \"' . $this->email . '\", password: \"' . $this->password . '\", nameFirst:\"' . $this->name . '\", nameLast: \"' . $this->lastname . '\", authData : null, phone: \"' . $this->phone . '\"})');\n\t\t\t\t$response = $insert->getOData();\n\t\t\t\treturn $response;\n\n\t\t\t}catch(PhpOrientException $e){\n\t\t\t\t\n\t\t\t\treturn $e;\n\n\t\t\t}\n\t\t}",
"public function Add( )\n {\n\t\t\t$password = \"\";\n\t\t\tif( $this->password!=\"\" )\n\t\t\t{\n\t\t\t\t$password = md5($this->password);\n\t\t\t}\n\t\t\t\n $dataArray = array( \"email\"=>$this->email,\n\t\t\t\t\t\t \"username\"=>$this->username,\n \"firstname\"=>$this->firstname,\n \"lastname\"=>$this->lastname,\n \"password\"=>$password,\n \"gender\"=>$this->gender,\n \"yearOfBirth\"=>$this->yearOfBirth,\n \"phone\"=>$this->phone,\n \"mobile\"=>$this->mobile,\n \"addressLine1\"=>$this->addressLine1,\n \"addressLine2\"=>$this->addressLine2,\n \"addressCity\"=>$this->addressCity,\n \"addressState\"=>$this->addressState,\n \"addressCountry\"=>$this->addressCountry,\n \"addressZipCode\"=>$this->addressZipCode,\n \"photo\"=>$this->photo,\n \"interests\"=>$this->interests,\n\t\t\t\t\t\t\t\t\"newsletters\"=>intval($this->newsletters),\n \"recordStatus\" =>$this->recordStatus,\n \"lastLoginTime\"=>$this->lastLoginTime,\n \"accountType\"=>$this->accountType,\n \"isAdmin\"=>$this->isAdmin,\n\t\t\t\t\t\t\t\t\"isDataAdmin\" => $this->isDataAdmin,\n \"facebookDetails\" =>$this->facebookDetails,\n \"twitterDetails\" =>$this->twitterDetails,\n \"favoriteApps\"=>$this->favoriteApps,\n \"openidDetails\" =>$this->openidDetails, \n \"ownedApps\"=>$this->ownedApps,\t\t\t\t\t\t\t\t\n \"registeredDate\"=>$this->registeredDate,\n \"privileges\"=>$this->privileges\t\t\t\t\t\t\t\n );\n \n $response = ServiceAPIUtils::CallAPIService( $dataArray,\"/User/Add/123\", \"json\" );\n \n return $response;\n }",
"function createUser()\n{\n $userCheck = UsersQuery::create()->findOneByUsername($_POST['username']);\n if ($userCheck == \"\") {\n // next add user to db\n $user = new Users();\n $user->setUsername($_POST['username']);\n $user->setPassword($_POST['password']);\n $user->setName($_POST['name']);\n $user->setEmail($_POST['email']);\n $user->setStatus(\"active\");\n $user->setPicture(\"none\");\n $user->setCreated(time());\n $user->setModified(time());\n\n $user->save();\n\n if ($user != null) {\n echo \"user added successfully\";\n }\n } else {\n echo \"user already registered\";\n }\n}",
"function addNewUser($username, $password, $userid){\r\n $time = time();\r\n /* If admin sign up, give admin user level */\r\n if(strcasecmp($username, ADMIN_NAME) == 0){\r\n $ulevel = ADMIN_LEVEL;\r\n }else{\r\n $ulevel = USER_LEVEL;\r\n }\r\n $query = \"INSERT INTO \".TBL_USERS.\" SET username = :username, password = :password, userid = :userid, userlevel = '$ulevel', timestamp = '$time', hash = '0', advanced_mode = '0', shipping_address = NULL\";\r\n $stmt = $this->connection->prepare($query);\r\n return $stmt->execute(array(':username' => $username, ':password' => $password, ':userid' => $userid));\r\n }",
"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}",
"function admin_add_user()\n{\n global $app;\n\n $user_data = $app->request()->post();\n $app->getLog()->debug('admin_add_user: ' . var_export($user_data, true));\n try {\n $user = $app->bbs->addUser($user_data['username'], $user_data['password']);\n } catch (Exception $e) {\n $app->getLog()->error('admin_add_user: error for adding user ' . var_export($user_data, true));\n $app->getLog()->error('admin_add_user: exception ' . $e->getMessage());\n $user = null;\n }\n $resp = $app->response();\n if (isset($user) && !is_null($user)) {\n $resp->status(200);\n $msg = getMessageString('admin_modified');\n $answer = json_encode(['user' => $user->getProperties(), 'msg' => $msg]);\n $resp->header('Content-type', 'application/json');\n } else {\n $resp->status(500);\n $resp->header('Content-type', 'text/plain');\n $answer = getMessageString('admin_modify_error');\n }\n $resp->header('Content-Length', strlen($answer));\n $resp->body($answer);\n}",
"function addUser($user)\n{\n // Initial connection\n $mysqli = createConnection();\n\n // Query\n $result = $mysqli->query(\"INSERT INTO `user` (`email`, `password`, `first_name`, `last_name`, `phone`, `age`, `is_student`, `is_employed`) VALUES ('\" . $user['email'] . \"', '\" . $user['pswd'] . \"', '\" . $user['firstname'] . \"', '\" . $user['lastname'] . \"', '\" . $user['phone'] . \"', '\" . $user['age'] . \"', '\" . $user['std_status'] . \"', '\" . $user['emp_status'] . \"')\");\n\n mysqli_close($mysqli);\n}",
"public function add() {\n if ($this->User->isLoggedIn() && $this->User->isAdmin()) {\n $flash = null;\n if (isset($_POST['email'])&&isset($_POST['password'])) {\n if ($this->User->insert(\n $_POST['email'],\n $_POST['password']\n )) {\n $flash = \"User {$_POST['email']} added.\";\n }\n }\n return array(\n 'flash' => $flash,\n 'title' => 'Add user'\n );\n } else {\n header(\"Location: \".app::site_url(array('users','login')));\n exit(0);\n }\n }",
"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}",
"function addUser ($user) {\n\n $conn = \\Database\\Connection::connect();\n\n try {\n $sql = \"INSERT INTO user (_user_FirstName, _user_Email, _user_Password) VALUES (?, ?, ?)\";\n $query = $conn->prepare($sql);\n $query->execute(array($user->_user_FirstName, $user->_user_Email, $user->_user_Password));\n }\n catch(\\PDOException $e)\n {\n echo $sql . \"<br>\" . $e->getMessage();\n }\n\n \\Database\\Connection::disconnect();\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}",
"function addNewUser($division, $department, $name, $mobile, $email, $empid, $city, $whrereincity, $zone, $username, $password){\r\n $time = time();\r\n /* If admin sign up, give admin user level */\r\n if(strcasecmp($username, ADMIN_NAME) == 0){\r\n $ulevel = ADMIN_LEVEL;\r\n }else{\r\n $ulevel = USER_LEVEL;\r\n }\r\n $active = false;\r\n\t if($active == \"true\"){\r\n\t $active = 1;\r\n\t }else if($active == \"false\"){\r\n\t $active = 0;\r\n\t }\r\n\t \r\n $q = \"INSERT INTO \".TBL_USERS.\" VALUES ('','$division', '$department', '$name', '$mobile', '$email', '$empid', '$city', '$whrereincity', '$zone', '$username', '$password', '0', '$ulevel', '$time', '0')\";\r\n\t return mysql_query($q, $this->connection); \r\n }",
"public function add()\n {\n $storedPassword = password_hash($_POST['password'], PASSWORD_DEFAULT);\n\n $data = [];\n $data['username'] = $_POST[\"username\"];\n $data['password'] = $storedPassword;\n $data['email'] = $_POST['email'];\n $data['profile_picture'] = $_FILES['profile']['tmp_name'];\n $data['mime'] = $_FILES['profile']['type'];\n $data['phone_num'] = $_POST['phone-number'];\n\n if ($this->model('User')->addNewUser($data) > 0) {\n $this->redirect(BASE_URL . \"/home/index/{$data['username']}\");\n }\n }",
"function insertNewUser($username, $hashedPassword) {\n $dbConn = getConnection();\n $dbConn->query(\"INSERT INTO users\n (username, hashedPassword)\n VALUES\n ('$username', '$hashedPassword')\");\n $results = $dbConn->query(\"SELECT id FROM users WHERE username = '$username'\");\n return ($results->fetch())['id'];\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 }",
"function registerNewUser($userFirstName, $userLastName, $userName, $email, $userPassword)\n {\n \t# Open and validate the Database connection\n \t$conn = connect();\n\n if ($conn != null)\n {\n \t$sql = \"INSERT INTO Users(fName, lName, username, email, passwrd) VALUES ('$userFirstName', '$userLastName', '$userName', '$email', '$userPassword')\";\t\t\n\t\t\tif (mysqli_query($conn, $sql)) \n\t \t{\n\t \t\t# User registered correctly\n\t \t\t$conn->close();\n\t\t\t return array(\"status\" => \"COMPLETE\");\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\t# Something went wrong when inserting the user\n\t\t\t\t$conn->close();\n\t\t\t\treturn array(\"status\" => \"ERROR\");\n\t\t\t}\n }\n else\n {\n \t# Connection to Database was not successful\n \t$conn->close();\n \treturn array(\"status\" => \"ERROR\");\n }\n }",
"private function create()\n {\n return $this->db->putUser($this->getDefaultAttributes());\n }",
"function addUser($user_name, $display_name,$fullname,$roll,$yearjoin,$yearend,$dept,$section,$alumni, $title, $password, $email, $active, $activation_token){\n try {\n global $db_table_prefix;\n\n $db = pdoConnect();\n\n $query = \"INSERT INTO \".$db_table_prefix.\"users (\n user_name,\n display_name,\n password,\n email,\n activation_token,\n last_activation_request,\n lost_password_request,\n lost_password_timestamp,\n active,\n title,\n sign_up_stamp,\n last_sign_in_stamp\n )\n VALUES (\n :user_name,\n :display_name,\n :password,\n :email,\n :activation_token,\n '\".time().\"',\n '0',\n '\".time().\"',\n :active,\n :title,\n '\".time().\"',\n '0'\n )\";\n\n $sqlVars = array(\n ':user_name' => $user_name,\n ':display_name' => $display_name,\n ':title' => $title,\n ':password' => $password,\n ':email' => $email,\n ':active' => $active,\n ':activation_token' => $activation_token\n );\n\n $stmt = $db->prepare($query);\n\n if (!$stmt->execute($sqlVars)){\n // Error: column does not exist\n return false;\n }\n\n $inserted_id = $db->lastInsertId();\n\t\t\t\t$stmt = null;\n\t\t\t\t$query2 = \"INSERT INTO \".$db_table_prefix.\"user_details\n\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t:user_id,\n\t\t\t\t\t\t:full_name,\n\t\t\t\t\t\t:rollno,\n\t\t\t\t\t\t:dept,\n\t\t\t\t\t\t:section,\n\t\t\t\t\t\t:yj,\n\t\t\t\t\t\t:ye,\n\t\t\t\t\t\t:alumni,\n\t\t\t\t\t\t'0',\n\t\t\t\t\t\t'0'\n\t\t\t\t\t\t)\";\n\n\t\t\t\t$sqlVars2 = array(\n\t\t\t\t\t\t':user_id' => $inserted_id,\n\t\t\t\t\t\t':full_name' => $fullname,\n\t\t\t\t\t\t':rollno' => $roll,\n\t\t\t\t\t\t':dept' => $dept,\n\t\t\t\t\t\t':section'=>$section,\n\t\t\t\t\t\t':yj' => $yearjoin,\n\t\t\t\t\t\t':ye' => $yearend,\n\t\t\t\t\t\t':alumni' => $alumni\n\t\t\t\t);\n\n\t\t\t\t$stmt2 = $db->prepare($query2);\n\n\t\t\t\tif (!$stmt2->execute($sqlVars2)){\n\t\t\t\t\t\t// Error: column does not exist\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\n $stmt2 = null;\n\t\t\t\tif($alumni==1){\n\t\t\t\t\tdbAddUserToGroups($inserted_id,5);\n\t\t\t\t}\n\t\t\t\tautoSubscribe($inserted_id);\n return $inserted_id;\n\n } catch (PDOException $e) {\n addAlert(\"danger\", \"Oops, looks like our database encountered an error.\");\n error_log(\"Error in \" . $e->getFile() . \" on line \" . $e->getLine() . \": \" . $e->getMessage());\n return false;\n } catch (ErrorException $e) {\n addAlert(\"danger\", \"Oops, looks like our server might have goofed. If you're an admin, please check the PHP error logs.\");\n return false;\n }\n}",
"function master_add_user($conn, $user_id, $user_firstname, $user_lastname, $user_email, $user_password, $user_picture){\n //encrypt email\n $user_email = encrypt_user_email($user_email);\n //encrypt password\n $user_password = encrypt_user_password($user_password);\n\n if($this->user->add_user($conn, $user_id, $user_firstname, $user_lastname, $user_email, $user_password,\n upload_user_profile_picture()) == true){\n // alert user not added\n //add user details to session\n }\n else{\n //alert user not added\n //allow user to try or ask if pass is forgotten\n }\n }",
"function addNewUser($conn, $username, $hashed_pass, $useremail){\n $insert_new_user = \"INSERT INTO user_details (user_name, user_password, user_email)\n VALUES ('$username', '$hashed_pass', '$useremail')\";\n if (mysqli_query($conn, $insert_new_user)) {\n //Redirecting to the login page\n header('Location: ../index.php');\n } else {\n echo \"Error: \" . $insert_new_user . \"<br>\" . mysqli_error($conn);\n }\n }",
"public function create() {\n\t\t$db = Database::getInstance();\n\t\t$stmt = $db->prepare(\"INSERT INTO users (id, mail, name, password, role, state) VALUES (?, ?, ?, ?, ?, ?)\");\n\t\t$stmt->execute(array($this->id, $this->mail, $this->name, $this->password, $this->role, $this->state));\n\t}",
"function addUser(){\n\t$conn = db_connect();\n\n\tif(isset($_GET['id']) && (int)$_GET['id'] > 0){#proper data must be on querystring\n\t\t$myID = (int)$_GET['id']; #Convert to integer, will equate to zero if fails\n\t}\n \n\tif(isset($_POST['firstname'])){$firstName=$_POST['firstname'];}else{$firstName = '';}\n if(isset($_POST['lastName'])){$lastName=$_POST['lastName'];}else{$lastName = '';}\n if(isset($_POST['userPhone'])){$userPhone=$_POST['userPhone'];}else{$firstName = '';}\n if(isset($_POST['userEmail'])){$userEmail=$_POST['userEmail'];}else{$lastName = '';}\n if(isset($_POST['type'])){$type=$_POST['type'];}else{$type = '';}\n \n if(strlen($firstName) >=3)#check if users last name is smaller than 3 characters\n { \n $userName = substr($firstName,0,3) . substr($lastName,0,2);\n }else{#if first name is shorter use as is for username\n $userName = $firstName . substr($lastName,0,2);\n }\n $userName = strtolower($userName); #format users name to site standards\n $userPW = $userName; #default pw is userName\n \n\t$sql = \"INSERT INTO users(FirstName,LastName,PhoneNumber,EmailAddress,TypeId,UserName,UserPassword) VALUES('%s','%s','%s','%s',%d,'%s','%s')\";\n\t$sql = sprintf($sql,$firstName,$lastName,$userPhone,$userEmail,$type,$userName,$userPW);\n\t$result = mysqli_query($conn,$sql); \n\n\tif ($result)\n\t{#successful update!\n\t\t$newURL = 'list.php';\n\t}else{\n\t\t$newURL = 'add.php';\n\t}\n\theader('Location: '.$newURL);\n\tdie();\n}",
"protected function add_new_user($name, $email, $avatar, $bio, $password, $sexe) {\r\n\r\n $activation_key = '';\r\n\r\n // Generate Email Activation Key\r\n for ($i = 0; $i < 6; $i++) {\r\n $activation_key = $activation_key . rand(0, 9);\r\n }\r\n\r\n // Connect To DB\r\n $connection = DB::connect();\r\n // Insert New User Data Into Users Table\r\n $stmt = \"INSERT INTO users\r\n (`name`, `email`, `avatar`, `bio`, `password`, `sexe`, `theme`, `account_type`, `activation_key`)\r\n VALUES\r\n ('$name', '$email', '$avatar', '$bio', '$password', '$sexe', 'light', 'user', '$activation_key')\";\r\n\r\n if ($connection->query($stmt) === false) {\r\n echo '<script>alert(\"لا نستطيع إضافة مستخدم جديد الآن، يمكنك الإتصال بفريق الدعم أو المحاولة لاحقا\")</script>';\r\n return;\r\n }\r\n\r\n // Get User ID\r\n $stmt = \"SELECT id FROM users WHERE `email` = '$email'\";\r\n $result = $connection->query($stmt);\r\n\r\n // Create New Session User Variable\r\n $_SESSION['user_id'] = $result->fetch_assoc()['id'];\r\n\r\n // Redirect To Profile Page\r\n $profile_url = DB::MAIN_URL . 'profile.php';\r\n header('location: ' . $profile_url);\r\n\r\n }",
"function add_newuser($user) {\n global $DB;\n $DB->insert_record('report_user_statistics', $user, false);\n}",
"function new_user ($new_user) {\r\n // if (!check_admin()) return false;\r\n if (!is_array($new_user)) {\r\n throw new Exception(\"input is not an array!\");\r\n }\r\n\r\n $conn = db_connect();\r\n $query = \"insert into users values ('', '\".trim($new_user['user_name']).\"', sha1('\".$new_user['user_passwd'].\"'), \r\n '\".$new_user['role_id'].\"', '\".trim($new_user['user_mail']).\"')\";\r\n $result = $conn->query(\"set names utf8\");\r\n $result = $conn->query($query);\r\n if (!$result) {\r\n throw new Exception(\"Could not connect to the db!\");\r\n } else {\r\n return true;\r\n }\r\n }",
"public function createUserAction() {\n $this->authService->createUser();\n die();\n }",
"function addSignupUser($user) {\n\t$ret = false;\n\t// print_r($user);\n\t$sql = \"INSERT INTO customer (name, phone, position, company, shop) values (\".\n\t\t\"'$user->name', '$user->phone', '$user->position', '$user->company', '$user->shop')\";\n\tmysql_query($sql);\n\tif(mysql_insert_id()) {\n\t\t$ret = true;\n\t}\n\treturn $ret;\n}",
"public function addUser($input) {\n $sql = \"INSERT INTO \n usertable (username, password, type, email, firstname, lastname) \n VALUES (:username, :password, :type, :email, :firstname, :lastname)\";\n\n $stmt = $this->db_connect->prepare($sql);\n $stmt->bindParam(':username', $input->getUserName(), PDO::PARAM_STR);\n $stmt->bindParam(':password', $input->getUserPassword(), PDO::PARAM_STR);\n $stmt->bindParam(':type', $input->getUserType(), PDO::PARAM_STR);\n $stmt->bindParam(':email', $input->getUserEmail(), PDO::PARAM_STR);\n $stmt->bindParam(':firstname', $input->getFirstname(), PDO::PARAM_STR);\n $stmt->bindParam(':lastname', $input->getLastname(), PDO::PARAM_STR);\n\n $stmt->execute();\n// echo 'User Registered.';\n\n $username = $input->getUserName();\n $sql = \"SELECT * FROM usertable WHERE username = '$username'\";\n foreach (parent::$this->db_connect->query($sql) as $row) {\n $custController = new profile_controller();\n $custController->newProfile($row['userid']);\n }\n }",
"function addUser ($username, $prenom, $nom, $hashMdp, $role, $statut)\n{\n $db = connect();\n\n $query = $db->prepare('INSERT INTO users (username, prenom, nom, password, role, statut) VALUES (?, ?, ?, ?, ?, ?)');\n $query->execute(array($username, $prenom, $nom, $hashMdp, $role, $statut));\n $query->closeCursor();\n}",
"public function insert()\n { if (!is_null($this->id))\n trigger_error(\"User::insert(): Attempt to insert a User object that already has its ID property set (to $this->id).\", E_USER_ERROR); \n // Insert the User\n $conn = new PDO(DB_DSN, DB_USER, DB_PASS);\n $sql = \"INSERT INTO users ( user_name, user_password_hash, user_email, orcid, orcid_code, orcid_access_token ) VALUES ( :user_name , :user_password_hash , :user_email, :orcid, :orcid_code, :orcid_access_token)\";\n $st = $conn->prepare($sql);\n $st->bindValue(\":user_name\", $this->userName, PDO::PARAM_STR);\n\t$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->execute();\n $this->id = $conn->lastInsertId();\n $conn = null;\n return $this->id;\n }",
"function insertUser() {\r\n// Inserts login/pass to database (pass encrypted)\r\n\tglobal $login;\r\n\tglobal $pass;\r\n\t\r\n\trequire_once('../includes/phpUserClass/access.class.php');\r\n\t$user = new flexibleAccess();\r\n\t\r\n\t$avail = $user->checkAvail($login);\r\n\r\n\tif (!$user->checkAvail($login)) {\t// checkAvail returns true if UserLogin is available\r\n\t\techo \"User name already exists\";\r\n\t\treturn;\r\n\t}\r\n\telse {\r\n\t\t$data = array(\r\n\t\t\t'UserLogin' => $login,\r\n\t\t\t'UserPass' => $pass,\r\n\t\t\t'UserActive' => 1\t\t// Should eventually use email activation...\r\n\t\t);\r\n\r\n\t $userID = $user->insertUser($data);//The method returns the userID of the new user or 0 if the user is not added\r\n\t \r\n\t echo \"User registered with ID: $userID\";\r\n\t}\r\n\t\r\n\t\r\n}",
"public function register() {\n\t\t\n\t\t// DB connection\n\t\t$db = Database::getInstance();\n \t$mysqli = $db->getConnection();\n\t\t\n $data = (\"INSERT INTO user (username,password,first_name,\n last_name,dob,address,postcode,email)\n VALUES ('{$this->_username}',\n '{$this->_sha1}',\n '{$this->_first_name}',\n '{$this->_last_name}',\n '{$this->_dob}',\n '{$this->_address}',\n '{$this->_postcode}',\n '{$this->_email}')\");\n\t\t\t\t\t\t \n\t\t\t$result = $mysqli->query($data);\n if ( $mysqli->affected_rows < 1)\n // checks if data has been succesfully inputed\n $this->_errors[] = 'could not process form';\n }",
"public function addAction() {\n $form = new Admin_Form_CreateAdminUser();\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->_request->getPost())) {\n $values = $form->getValues();\n $adminMapper = new Application_Model_Table_AdminUsers();\n $userFound = $adminMapper->fetchByUsername($values['username']);\n if(!$userFound){\n $values['is_active'] = 1;\n $values['is_admin'] = 1;\n $adminUser = $adminMapper->createRow($values);\n $adminUser->hashPassword($values['new_password']);\n $adminUser->save();\n $this->_helper->FlashMessenger->addMessage('The user has been created' , 'successful');\n $this->_helper->redirector->goToRouteAndExit(array(), 'admin-users', true);\n } else {\n $this->view->messages['error'] = \"This username already exists\";\n }\n }\n }\n $this->view->form = $form;\n }",
"public function store()\n {\n // Save post data in $user var\n $user = $_POST;\n \n // Create a password, set created_by ID and set the date of creation\n $user['password'] = password_hash('Gorilla1!', PASSWORD_DEFAULT);\n $user['created_by'] = Helper::getUserIdFromSession();\n $user['created'] = date('Y-m-d H:i:s');\n\n // Save the record to the database\n UserModel::load()->store($user);\n }",
"public function add($params) {\n try {\n \t$baseType = (int)1;\n // Create a new user and attempt to save it to the database:\n $user = new User();\n $res = $user->setUsername(strtolower($_POST['username']))\n ->setPassword($_POST['password'])\n ->setEmail($_POST['email'])\n ->setType($baseType)\n ->setFirstname($_POST['firstname'])\n ->setLastname($_POST['lastname'])\n ->setPrivacy($_POST['privacy2'])\n ->commit($this->getDBConn());\n\n error_log(\"Added user \". $user->getUserId());\n\n require \"config.php\";\n if ($res) {\n // display success message and redirect to new user's page\n $this->addFlashMessage('Created new user: ' . $user->getUsername(), self::FLASH_LEVEL_SUCCESS);\n $this->redirect(\"/users/login\");\n } else {\n $this->addFlashMessage('Unknown error adding user. Please try again: ', self::FLASH_LEVEL_SERVER_ERR);\n }\n } catch (\\PDOException $dbErr) {\n $this->addFlashMessage('Database error on adding user:<br>'.$dbErr->getMessage(), self::FLASH_LEVEL_SERVER_ERR);\n }\n\n // Some sort of error on adding user; return to form\n $this->redirect(\"/users/new\");\n }",
"function addUser()\n\t{\n\t\t$uid = mysql_real_escape_string($_POST[\"uid\"]);\n\t\t$pwd = $_POST[\"pwd1\"];\n\t\t$email = mysql_real_escape_string($_POST[\"email\"]);\n\t\t$fname = mysql_real_escape_string($_POST[\"fname\"]);\n\t\t$minit = mysql_real_escape_string($_POST[\"minit\"]);\n\t\t$lname = mysql_real_escape_string($_POST[\"lname\"]);\n\n\t\t$salt = mt_rand();\n\t\t$salt = (string) $salt;\n\n\t\t$pwd = md5(md5($pwd) . $salt);\n\n\t\t//echo $pwd;\n\n\t\t$query = \"\n\t\t\tINSERT INTO user (uid, salt, pwd, f_name, l_name, m_init, email)\n\t\t\tVALUES ('$uid', $salt, '$pwd', '$fname', '$lname', '$minit', '$email');\";\n\n\t\t$result = mysql_query($query) or die(\"db access error\" . mysql_error());\n\n\t\treturn $result;\n\t}",
"public function insertUser($db, $username, $email, $password_salt, $password_hash, $firstname, $middlename, $lastname, $location_id, $role_id)\n {\n\n $query = \"INSERT INTO users (username, email, passwordsalt, passwordhash, firstname, middlename, lastname, locationid, roleid) \n VALUES (:uname, :email, :psalt, :phash, :fname, :mname, :lname, :locid, :roleid)\";\n $pdostmt2 = $db->prepare($query);\n $pdostmt2->bindValue(\":uname\", $username);\n $pdostmt2->bindValue(\":email\", $email);\n $pdostmt2->bindValue(\":psalt\", $password_salt);\n $pdostmt2->bindValue(\":phash\", $password_hash);\n $pdostmt2->bindValue(\":fname\", $firstname);\n $pdostmt2->bindValue(\":mname\", $middlename);\n $pdostmt2->bindValue(\":lname\", $lastname );\n $pdostmt2->bindValue(\":locid\", $location_id);\n $pdostmt2->bindValue(\":roleid\", $role_id);\n /*$result = */$pdostmt2->execute();\n $pdostmt2->closeCursor();\n //return $result;\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}",
"public function addUser($username, $password_hash, $first_name, $last_name, $email){\n $color = \"#\".dechex(rand(128,255)) . dechex(rand(128,255)) . dechex(rand(128,255)); //generates a random color for them\n $query = \"INSERT INTO user VALUES (DEFAULT, '$first_name', '$last_name', '$username', '$password_hash', '$email', 0, DEFAULT, DEFAULT, DEFAULT, '$color')\";\n $db = Db::instance();\n $db->execute($query);\n }",
"public function add_user($data){\n return $this->db->insert('user', $data);\n }",
"function post_new_user(){\n\t\tglobal $conn;\n\t\t$data \t\t= json_decode(file_get_contents('php://input'));\n\t\t$username \t= htmlspecialchars($data->username);\n\t\t$email \t\t= htmlspecialchars($data->email);\n\t\t$password \t= htmlspecialchars($data->password);\n\t\t\n\t\t$password_hash = password_hash($password, PASSWORD_DEFAULT);\n\t\t\n\t\t//check if username is already taken\n\t\t\n\t\tif($sql = $conn->prepare(\"SELECT * FROM members where member_name = ?\")){\n\t\t\t\t\t\n\t\t\t$sql->bind_param('s', $username);\n\t\t\t$sql->execute();\n\t\t\t$result = get_result_fill($sql);\n\t\t\t$username_count = count(array_shift($result));\n\n\t\t\tif($username_count > 0 )\n\t\t\t{\n\t\t\t\t//we already have that user name taken. \n\t\t\t\techo \"taken\";\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tif($sql = $conn->prepare(\"INSERT INTO members (member_id, member_name, member_email, member_password) VALUES (null, ?, ?, ?)\")){\n\t\t\t\t\t$sql->bind_param('sss', $username, $email, $password_hash);\n\t\t\t\t\tif($sql->execute()){\n\t\t\t\t\t\t//create a new table for this user and copy and paste the default suggestions\n\t\t\t\t\t\tcreate_new_member_table($username);\n\t\t\t\t\t\techo create_jwt($username);\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo \"Error\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\techo \"fail\";\n\t\t}\n\n\t\t\n\t\t\n\t}",
"function create_user()\n{\n\t// Check to see if the account is admin\n\t$account_type = account_type();\n\t\n\tif ( $account_type == 0 )\n\t{\n\t\t// Connect to the database\n\t\t$link = dbConnect();\n\t\t\n\t\t$query = mysql_query( \"SELECT first_name, last_name FROM BCD_User WHERE username = '\" . $_SESSION[ 'username' ] . \"'\" );\n\t\t\n\t\t// Close the database\n\t\tdbClose( $link );\n\t}\n}",
"function addToDatabase() {\n\t\tif ($this->id != null && $this->id != 0) return false;\n\n\t\t$db = getDb();\n\n\t\t$add_query = \"INSERT INTO user_table \n\t\t(user_name, \n\t\t user_password,\t\n\t\t isAdmin,\t\n\t\t user_first_name,\n\t\t user_last_name) \n\t\tVALUES \n\t\t('$this->username', \n\t\t '$this->password',\t\n\t\t '$this->isAdmin',\t\n\t\t '$this->firstName',\t\n\t\t '$this->lastName');\";\n\n\t\t$result = mysqli_query($db, $add_query);\n\n\t\tmysqli_close($db);\n\n\t\tif (!$result) return false;\n\n\t\treturn true;\n\n\t}",
"public function save()\n {\n if ($this->id)\n {\n $query = sprintf('UPDATE USERS SET USERNAME = \"%s\", ' .\n 'PASSWORD = \"%s\", EMAIL_ADDR = \"%s\", FIRST_NAME = \"%s\", LAST_NAME = \"%s\", IS_ACTIVE = %d ' .\n 'WHERE USER_ID = %d',\n mysql_real_escape_string($this->username, $GLOBALS['DB']),\n mysql_real_escape_string($this->password, $GLOBALS['DB']),\n mysql_real_escape_string($this->emailAddr, $GLOBALS['DB']),\n mysql_real_escape_string($this->firstName, $GLOBALS['DB']),\n mysql_real_escape_string($this->lastName, $GLOBALS['DB']),\n $this->isActive,\n $this->id);\n mysql_query($query, $GLOBALS['DB']);\n }\n else\n {\n $query = sprintf('INSERT INTO USERS (USERNAME, PASSWORD, ' .\n 'EMAIL_ADDR, FIRST_NAME, LAST_NAME, IS_ACTIVE) VALUES (\"%s\", \"%s\", \"%s\", \"%s\", \"%s\", %d)',\n mysql_real_escape_string($this->username, $GLOBALS['DB']),\n mysql_real_escape_string($this->password, $GLOBALS['DB']),\n mysql_real_escape_string($this->emailAddr, $GLOBALS['DB']),\n mysql_real_escape_string($this->firstName, $GLOBALS['DB']),\n mysql_real_escape_string($this->lastName, $GLOBALS['DB']),\n $this->isActive);\n mysql_query($query, $GLOBALS['DB']);\n\n $this->id = mysql_insert_id($GLOBALS['DB']);\n }\n }",
"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 add_user($data=array())\n {\n if ($data)\n {\n // secure password\n $salt = hash('sha512', uniqid(mt_rand(1, mt_getrandmax()), TRUE));\n $password = hash('sha512', $data['password'] . $salt);\n\n $sql = \"\n INSERT INTO {$this->_db} (\n username,\n password,\n salt,\n first_name,\n last_name,\n email,\n language,\n is_admin,\n status,\n deleted,\n created,\n updated\n ) VALUES (\n \" . $this->db->escape($data['username']) . \",\n \" . $this->db->escape($password) . \",\n \" . $this->db->escape($salt) . \",\n \" . $this->db->escape($data['first_name']) . \",\n \" . $this->db->escape($data['last_name']) . \",\n \" . $this->db->escape($data['email']) . \",\n \" . $this->db->escape($this->config->item('language')) . \",\n \" . $this->db->escape($data['is_admin']) . \",\n \" . $this->db->escape($data['status']) . \",\n '0',\n '\" . date('Y-m-d H:i:s') . \"',\n '\" . date('Y-m-d H:i:s') . \"'\n )\n \";\n\n $this->db->query($sql);\n\n if ($id = $this->db->insert_id())\n {\n return $id;\n }\n }\n\n return FALSE;\n }",
"function addNewUser($memberName, $memberPassword, $firstName, $lastName, $userEmail, $phoneNumber, $customerId, $myqueueId,\r\n \t\t\t\t\t $securityQuestion, $securityAnswer, $membershipPlan )\r\n {\r\n $time = time();\r\n /* If admin sign up, give admin user level */\r\n if(strcasecmp($memberName, ADMIN_NAME) == 0){\r\n $ulevel = ADMIN_LEVEL;\r\n }else{\r\n $ulevel = USER_LEVEL;\r\n }\r\n $q = \"INSERT INTO \".TBL_USERS.\" VALUES (NULL, '$memberName', '$memberPassword', '$firstName', '$lastName', '$userEmail',\r\n 'Approved', '$phoneNumber', '', '$customerId', '$myqueueId', '$securityQuestion', '$securityAnswer', '$membershipPlan',\r\n $time, '', 0, $ulevel)\";\r\n return mysql_query($q, $this->connection);\r\n }",
"function insertAdminUser() {\n // Insert Admin info;\n $userController = new UserController;\n $this->db->exec(\n \"INSERT INTO users (username, password) VALUES (?, ?)\",\n [\n 1 => $this->formValues['adminUsername'],\n 2 => $userController->cryptPassword($this->formValues['adminPassword_1']),\n ]\n );\n }",
"function insert_user($db, $email, $password, $display_name)\n{\n\t/* Hash the password */\n\t$password = md5($password);\n\n\t/* Create the query */\n\t$sql = 'INSERT INTO users (email, password, display_name) VALUES (:email, :password, :display_name)';\n\n\t/* Execute the query */\n\t$st = $db->prepare($sql);\n\t$st->execute(array(':email' =>$email, ':password'=> $password, ':display_name'=> $display_name));\n}",
"public static function addUser($userData) {\n $db = DB::getInstance();\n $columns = \"admin, date_created, first_name, last_name, lump, password, username\";\n $placeholders = \":admin, :date_created, :first_name, :last_name, :lump, :password, :username\";\n $sorted = $userData;\n uksort($sorted, function ($val1, $val2) {\n return strncmp($val1, $val2, 2);\n });\n $mssg = \"\";\n\n // Insert form data into database\n try {\n $statement = $db->prepare(\"INSERT INTO `users` ($columns) VALUES ($placeholders)\");\n $statement->execute($sorted);\n // Grab the id of the newly inserted record and pass it back to client\n $mssg = $db->lastInsertId();\n }\n catch (Exception $e) {\n $db->rollBack();\n $mssg = $e->getMessage();\n }\n return $mssg;\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}",
"public function register($username, $password, $email, $firstName, $lastName, $role)\r\n {\r\n $passwordHash = password_hash($password, PASSWORD_BCRYPT);\r\n //$query = $this->addUser($username, $firstName, $lastName, $email, $password, $role);\r\n $values = array(\r\n 1=> array(\r\n 'marker' => ':username',\r\n 'var' => $username,\r\n 'type' => PDO::PARAM_STR\r\n ),\r\n 2=> array(\r\n 'marker' => ':password',\r\n 'var' => $passwordHash,\r\n 'type' => PDO::PARAM_STR\r\n ),\r\n 3=> array(\r\n 'marker' => ':email',\r\n 'var' => $email,\r\n 'type' => PDO::PARAM_STR\r\n ),\r\n 4=> array(\r\n 'marker' => ':firstName',\r\n 'var' => $firstName,\r\n 'type' => PDO::PARAM_STR\r\n ),\r\n 5=> array(\r\n 'marker' => ':lastName',\r\n 'var' => $lastName,\r\n 'type' => PDO::PARAM_STR\r\n ),\r\n 6=> array(\r\n 'marker' => ':role',\r\n 'var' => $role,\r\n 'type' => PDO::PARAM_STR\r\n )\r\n );\r\n\r\n $results = $this->queryPrepareExecute(\"INSERT INTO t_user (useUsername, usePassword, useEmail, useFirstName, UseLastName, useRole) VALUES (:username, :password, :email, :firstName, :lastName, :role)\", $values);\r\n\r\n $results = $this->unsetData($results);\r\n //$insertUser = \"INSERT INTO t_user (useUsername, usePassword, useEmail, useFirstName, UseLastName, useRole) VALUES ('\" . $username . \"' , '\" . $passwordHash . \"' , '\" . $email . \"' , '\" . $firstName . \"' , '\" . $lastName . \"' , '\" . $role . \"')\";\r\n }",
"function addNewUser($logintype,$username,$email, $fname,$lname,$gender,$password,$location,$profileimageurl, $que, $ans){\r\n\t $username = mysql_real_escape_string($username);\r\n\t $email = mysql_real_escape_string($email);\r\n\t $fname = mysql_real_escape_string($fname);\r\n\t $lname = mysql_real_escape_string($lname);\r\n\t $gender = mysql_real_escape_string($gender);\r\n\t $hometown = mysql_real_escape_string($hometown);\r\n\t $location = mysql_real_escape_string($location);\r\n\t $que = mysql_real_escape_string($que);\r\n\t $ans = mysql_real_escape_string($ans);\r\n\t if ($password!=null){$password = md5(mysql_real_escape_string($password));}else{$password = md5(time());}\r\n\t $profileimageurl = mysql_real_escape_string($profileimageurl);\r\n $q = \"INSERT INTO users (`uid` ,`logintype`,`username` ,`email` ,`fname`,`lname`,`gender`,`password`,`currentlocation`,`profileimageurl`, `que`, `ans` ) VALUES ( NULL, '\".$logintype.\"', '\".$username.\"', '\".$email.\"', '\".$fname.\"', '\".$lname.\"' ,'\".$gender.\"' ,'\".$password.\"' ,'\".$location.\"' , '\".$profileimageurl.\"' ,'\".$que.\"' ,'\".$ans.\"')\";\r\n if ($email!=null){$this->sendEmail($email,\"Registration\",\"Welcome to Summarize!\\n\\rUsername: \".$username.\"\\n\\r Password:\".$password);}\r\n\t return mysql_query($q, $this->connection);\r\n }",
"public function add_new_user($user_name,$name,$password)\n\t{\n\t\t///TODO\n\t\t//DB::insert('insert into users (name,password,device_id) values (?, ?,?)', [$user_name, $password,1]);\n\t\t$query=DB::insert('insert into users (name,password,device_id) values (?, ?,?)', [$user_name, $password,1]);\n\n\n\t}",
"function adduser($data)\n {\n $mysqli = $this->conn;\n\n if (empty($table))\n $table = $this->table;\n\n /* Prepared statement, stage 1: prepare */\n if (!($stmt = $mysqli->prepare(\"INSERT INTO User (\n\t\t\n\t\t\troleID,\n \tcoordinatorID,\t \n\t\t\tfirstName, \n\t\t\tlastName, \n\t\t\tphoneNumber, \n\t\t\tuserName, \n\t\t\temail, \n\t\t\tpassword, \n \tactiveUser) \n\t\t\t\n\t\t\tVALUES (?,?,?,?,?,?,?,SHA1(?),?)\"))\n ) {\n\n echo \"Prepare failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\n }\n // Creates array of firstName & lastName\n $userNameArray = array($data['firstName'], $data['lastName']);\n // Combines firstName & lastName and adds a . in the middle\n $userName = implode(\".\", $userNameArray);\n //$userName is created as firstName.lastName\n\n // Creates array for phone number using areaCode, phoneBegin, phoneEnd\n $phoneNumberArray = array($data['areaCode'], $data['phoneBegin'], $data['phoneEnd']);\n // Combines areaCode, phoneBegin, and phoneEnd and adds hyphens inbetween to produce a phone number\n $phoneNumber = implode(\"-\", $phoneNumberArray);\n\n // Sets user to active; or yes\n $activeUser = 1;\n\n\n /* Prepared statement, stage 2: bind and execute */\n if (!($stmt->bind_param(\"isssssssi\",\n\n $data['roleID'],\n implode(',', $data['coordinatorID']),\n $data['firstName'],\n $data['lastName'],\n $phoneNumber,\n $userName,\n $data['email'],\n $data['password'],\n $activeUser\n ))\n ) {\n echo \"Binding parameters failed: (\" . $stmt->errno . \") \" . $stmt->error;\n }\n if (!$stmt->execute()) {\n echo \"Execute failed: (\" . $stmt->errno . \") \" . $stmt->error;\n }\n }",
"private static function create()\n {\n getDb()->putUser(1, self::getDefaultAttributes());\n }",
"function registerUser($data){\n\t\t\tprint($this->db->insert('users', $data));\n\t\t}",
"function addUserToDatabase($user, $post)\n {\n $connect = new Config();\n $text = new TextFunctions();\n $validateF = new ValidateFunctions();\n $newDate = '0000-00-00 00:00:00';\n $curDate = date(\"Y-m-d H:i:s\");\n $email = $validateF->sanitize($post['user_email']);\n $pass = $text->password_encryption($validateF->sanitize($post['user_password']));\n $curDate = date(\"Y-m-d H:i:s\");\n $sql = 'INSERT INTO user_db(user_info, user_email, user_password ,join_date,last_login) VALUES (:info,:email,:password,:cur_date,:last_login)';\n $query = $connect->connectPDO()->prepare($sql);\n $query->bindParam(':info', $user, \\PDO::PARAM_STR, 200);\n $query->bindParam(':email', $email, \\PDO::PARAM_STR);\n $query->bindParam(':password', $pass, \\PDO::PARAM_STR);\n $query->bindParam(':cur_date', $curDate, \\PDO::PARAM_STR);\n $query->bindParam(':last_login', $newDate, \\PDO::PARAM_STR);\n $query->execute();\n }",
"public function save()\n {\n if ($this->uid)\n {\n $query = sprintf('UPDATE %sUSER SET USERNAME = \"%s\", ' .\n 'PASSWORD = \"%s\", EMAIL_ADDR = \"%s\", IS_ACTIVE = %d ' .\n 'WHERE USER_ID = %d',\n DB_TBL_PREFIX,\n mysql_real_escape_string($this->username, $GLOBALS['DB']),\n mysql_real_escape_string($this->password, $GLOBALS['DB']),\n mysql_real_escape_string($this->emailAddr, $GLOBALS['DB']),\n $this->isActive,\n $this->userId);\n mysql_query($query, $GLOBALS['DB']);\n }\n else\n {\n $query = sprintf('INSERT INTO %sUSER (USERNAME, PASSWORD, ' .\n 'EMAIL_ADDR, IS_ACTIVE) VALUES (\"%s\", \"%s\", \"%s\", %d)',\n DB_TBL_PREFIX,\n mysql_real_escape_string($this->username, $GLOBALS['DB']),\n mysql_real_escape_string($this->password, $GLOBALS['DB']),\n mysql_real_escape_string($this->emailAddr, $GLOBALS['DB']),\n $this->isActive);\n mysql_query($query, $GLOBALS['DB']);\n\n $this->uid = mysql_insert_id($GLOBALS['DB']);\n }\n }",
"static function addUser(){\n\n $controller = new UserController();\n $validation = $controller->signupValid();\n\n if($validation === \"OK\"){\n $base = new ConnexionDb;\n\n $base->query(\"INSERT INTO user(username, firstname, email, pass, valid)\n VALUES (:username, :firstname, :email, :pass, 1)\",\n array(\n array('username',$_POST['username'],\\PDO::PARAM_STR),\n array('firstname',$_POST['firstname'],\\PDO::PARAM_STR),\n array('email',$_POST['email'],\\PDO::PARAM_STR),\n array('pass',$_POST['pass'],\\PDO::PARAM_STR)\n )\n );\n // $userM = new User($_POST);\n\n }else{\n echo 'erreur d\\'inscription';\n }\n }",
"function create_user($name, $email, $pass, $type, $sex, $dob)\n\t{\n\t\t$con = dbConnect(\"localhost\", \"root\", \"\", \"jobportal\");\n\t\tif($con)\n\t\t{\n\t\t\t//Insertion into User Master\n\t\t\tmysqli_query($con, \"INSERT INTO user_master(uName, uEmail, uPass,\n\t\t\tuType, uSex, uDob) VALUES ('$name', '$email', '$pass', '$type', '$sex', '$dob')\");\n\t\t\t\n\t\t\t//Last ID generated\n\t\t\t$uId = mysqli_insert_id($con);\n\t\t\treturn $uId;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t}",
"function createUser($name, $password)\n{\n global $db;\n $query = getAllUsers(); //Query for getting all users from the database\n $existingUsers = db_select($db, $query); //Array of all the users in the database\n //check if username ($name) already exists in the database\n foreach ($existingUsers as $value) {\n if ($value['username'] == $name) {\n //username already taken\n return false;\n }\n }\n $hashedPassword = password_hash($password, PASSWORD_DEFAULT); //hashed password to store in database\n $queryAddUser = addUser($name, $hashedPassword); //Query for adding a new user to the database\n db_query($db, $queryAddUser); //Add the user to the database\n //Create a new session with the newly created user (login user)\n $_SESSION['userId'] = $name;\n return true;\n}",
"public function add($data)\r\n {\r\n // Adds a user into the database.\r\n global $db;\r\n // Get what we need.\r\n $stamp = time();\r\n if (isset($_SERVER['REMOTE_ADDR'])) {\r\n $user_ip = $_SERVER['REMOTE_ADDR'];\r\n } else {\r\n $user_ip = false;\r\n }\r\n if (!isset($data['admin'])) {\r\n $admin = false;\r\n } else {\r\n $admin = $data['admin'];\r\n }\r\n $name = $data['name'];\r\n $username = $data['username'];\r\n $email = $data['email'];\r\n $password = $data['password'];\r\n $key = md5($email . $stamp . rand(0, 999));\r\n\r\n // Play with our food.\r\n $salted = $this->salt($password);\r\n // We only want letters and numbers.\r\n $username = preg_replace(\"/[^A-Za-z0-9 ]/\", '', $username);\r\n\r\n // Scrub up and clean up.\r\n $sql = array();\r\n $sql['name'] = $name;\r\n $sql['username'] = $username;\r\n $sql['email'] = $email;\r\n $sql['password'] = $salted;\r\n $sql['regstamp'] = $stamp;\r\n $sql['regip'] = $user_ip;\r\n $sql['verified'] = false;\r\n $sql['verifykey'] = $key;\r\n\r\n $users_uname = db::get_array(\"users\", array(\"username\" => $username));\r\n $users_email = db::get_array(\"users\", array(\"email\" => $email));\r\n $users = (count($users_uname) + count($users_email));\r\n\r\n if ($users > 0) {\r\n if (count($users_uname) > 0) {\r\n return array(\"res\" => false, \"msg\" => \"A user with that Username already exists!\");\r\n } else {\r\n return array(\"res\" => false, \"msg\" => \"A user with that E-Mail already exists!\");\r\n }\r\n } else {\r\n // Insert the data.\r\n db::insert(\"users\", $sql);\r\n do_email($email, $username, \"Email Validation\", \"To begin using your SmallURL account, you need your email verifying. <br /> Please visit <a href='http://account.smallurl.in/verify/{$key}'> http://account.smallurl.in/verify/{$key} </a> to validate your account.\");\r\n\t\t\treturn array(\"res\" => true, \"msg\" => \"Registered!\");\r\n }\r\n }",
"private function addUser()\n {\n $this->online->addUser($this->user, $this->place, $this->loginTime);\n }",
"private function saveUser(){\n\n if( ! $this->checkEmail() ){\n $password = password_hash($this->_userPassword, PASSWORD_DEFAULT);\n $request = $this->_connexion->prepare(\"INSERT INTO Users (user_name, user_email, user_password) VALUES (?, ?, ?)\");\n $request->execute(array($this->_userName, $this->_userEmail, $password));\n\n return $response = json_encode([\n 'status' => 'ok',\n 'message' => 'successfuly add'\n ]);\n }\n else{\n return $response = json_encode([\n 'status' => 'failed',\n 'message' => 'this email allready exist'\n ]);\n }\n\n }",
"function _add_user()\n {\n if (!$this->has_arg('PROJECTID'))\n $this->_error('No project id specified');\n if (!$this->has_arg('PERSONID'))\n $this->_error('No user specified');\n\n $proj = $this->db->pq(\"SELECT p.projectid FROM project p WHERE p.personid LIKE :1 AND p.projectid=:2\", array($this->user->personId, $this->arg('PROJECTID')));\n\n if (!sizeof($proj))\n $this->_error('No such project');\n $proj = $proj[0];\n\n $person = $this->db->pq(\"SELECT CONCAT(CONCAT(givenname, ' '), familyname) as fullname FROM person WHERE personid=:1\", array($this->arg('PERSONID')));\n if (!sizeof($person))\n $this->_error('No such person');\n $person = $person[0];\n\n $this->db->pq(\"INSERT INTO project_has_person (projectid, personid) VALUES (:1, :2)\", array($this->arg('PROJECTID'), $this->arg('PERSONID')));\n\n $this->_output(array('FULLNAME' => $person['FULLNAME']));\n }",
"function createUser() {\n $data = array(\n 'userName' => $this->input->post('username'),\n 'email' => $this->input->post('email'),\n 'status' => 0,\n 'roleID' => 5,\n 'password' => md5($this->input->post('password').SALT),\n );\n $this->db->insert('user', $data);\n }",
"function mysql_adduser($username, $password, $level, $email = \"\", $realname = \"\", $can_modify_passwd='1', $description = \"\")\n{\n if (!mysql_auth_user_exists($username))\n {\n $encrypted = crypt($password,'$1$' . strgen(8).'$');\n return dbInsert(array('username' => $username, 'password' => $encrypted, 'level' => $level, 'email' => $email, 'realname' => $realname, 'can_modify_passwd' => $can_modify_passwd, 'descr' => $description), 'users');\n } else {\n return FALSE;\n }\n}"
] | [
"0.7510196",
"0.7269391",
"0.72638273",
"0.7187511",
"0.7178913",
"0.7162",
"0.71190375",
"0.7094702",
"0.70945364",
"0.7086928",
"0.7043314",
"0.70315826",
"0.70292604",
"0.70147496",
"0.70080346",
"0.69805396",
"0.6930872",
"0.6910384",
"0.6900169",
"0.6897729",
"0.68830323",
"0.68803024",
"0.6877964",
"0.6872814",
"0.6870511",
"0.68644387",
"0.68490773",
"0.68472064",
"0.6833042",
"0.6833042",
"0.6833042",
"0.6833042",
"0.6831494",
"0.68267775",
"0.6817371",
"0.6813549",
"0.680463",
"0.6793221",
"0.6784413",
"0.67807233",
"0.67780066",
"0.67679477",
"0.67672974",
"0.67632085",
"0.6763154",
"0.6759105",
"0.67558223",
"0.6744136",
"0.6742488",
"0.6737381",
"0.67336965",
"0.6723261",
"0.6718686",
"0.6717275",
"0.6710648",
"0.6689762",
"0.66877043",
"0.6684264",
"0.668109",
"0.6678609",
"0.6677715",
"0.66745895",
"0.6671695",
"0.6669342",
"0.6663607",
"0.6657111",
"0.6654455",
"0.6650945",
"0.66455495",
"0.66449606",
"0.66441965",
"0.66422755",
"0.6641881",
"0.662109",
"0.66155696",
"0.66153723",
"0.66123384",
"0.6610794",
"0.66094613",
"0.66063166",
"0.6605412",
"0.6605276",
"0.6602993",
"0.66020787",
"0.6596257",
"0.6589869",
"0.6586309",
"0.65859354",
"0.6581665",
"0.6570155",
"0.6569963",
"0.65688413",
"0.6568742",
"0.6568647",
"0.65665877",
"0.6561651",
"0.6557478",
"0.65472287",
"0.65434104",
"0.6543166",
"0.6542092"
] | 0.0 | -1 |
Check user is existed or not | public function isUserExisted($email) {
$query = "
SELECT * from users WHERE email = :email;
";
try
{
$stmt = $this->_db->prepare($query);
$stmt->bindValue(':email',$email);
$stmt->execute();
$result = $stmt->fetch();
}
catch(PDOException $ex)
{
$h = $ex->getMessage ();
die($h);
}
if (!(empty($result))) {
// user existed
return true;
} else {
// user not existed
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userExists( $user_name ) { return true;}",
"private function checkUserExistence() {\n\t\t\t\t$query = \"select count(email) as count from register where email='$this->email'\";\n\t\t\t\t$resource = returnQueryResult($query);\n\t\t\t\t$result = mysql_fetch_assoc($resource);\n\t\t\t\tif($result['count'] > 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}",
"public function userExists() {\n\t\t\n\t\t// DB connection\n\t\t$db = Database::getInstance();\n \t$mysqli = $db->getConnection(); \n\t\t\n //inserts username and password in to users table\n $data =(\"SELECT user_id FROM user WHERE username ='{$this->_username}'\");\n\t\t$result = $mysqli->query($data);\n return(mysqli_num_rows($result) > 0) ? 1 : 0;\n }",
"public function user_exists() {\n\t\t$user = $this->search(\"(uid=\".$this->user.\")\");\n\t\treturn $user !== false;\n\t}",
"public function hasUser();",
"function randomUser_exists()\t{\n\t\treturn $this->recordNumber(self::RNDUSERSC_NAME) > 0;\n\t}",
"public function check_user()\n {\n $res = $this->CustomModel->checkUser(\n $this->input->get('index_no')\n );\n\n if (!$res) {\n echo 'not exists';\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}",
"function checkUserIdBL() {\n\t $isExisting = false;\n\t // If the user exists\n\t if ( checkUserIdDAL($_POST['userId']) )\n\t {\n\t\t $isExisting = true;\n\t }\n\t return $isExisting;\n }",
"function chkExist($user){\n\tglobal $dbLink;\n\t\n\t$sqlChkExist = \"SELECT uid FROM users WHERE uid='$user'\";\n\t\n\t$dbLink->query($sqlChkExist);\n\t$rows = $dbLink->affected_rows;\n\t\n\tif($rows == 1){\n\t\t$ok==0;\n\t}\n\telse{\n\t\t\t\t\t\t\t$_SESSION['error_message'] = \"The user does not exist\";\n\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\tdie();\n\t}\n}",
"public function userExists(){\r\n\t\t$bool = false ;\r\n\t\t$pseudo = addslashes($this -> getPseudo()) ;\r\n\t\t$r = execute(\"select count(User_pseudo) as nb from UserTab where User_pseudo='\".$pseudo.\"'\");\t\r\n\t\twhile($l = mysql_fetch_assoc($r)){\r\n\t\t\tif($l['nb'] > 0)\r\n\t\t\t\t$bool = true ;\r\n\t\t}\t\t\r\n\t\r\n\t\treturn $bool ;\r\n\t }",
"private function valUserExisting(){\n if($this->_personDB->getActive()){\n if($this->logIn()){\n $this->addUserHttpSession();\n $this->_response = 'ok';\n }\n }else{\n $this->_response = '104';\n }\n }",
"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 userExists( $username ) {\n return true;\n }",
"public function check_insta_user() {\n \n }",
"function user_exist($uname)\n {\n $this->removeOldTemps();\n \n $res = $this->query(\"SELECT * FROM `{$this->userTable}` WHERE `{$this->tbFields1['email']}` = '\".$uname.\"'\");\n $res2 = $this->query(\"SELECT * FROM `{$this->userTempTable}` WHERE `{$this->tbTmpFields['email']}` = '\".$uname.\"'\"); \n \n if((!$res && !$res2) || (mysql_num_rows($res) == 0 && mysql_num_rows($res2) == 0)){ // no records \n return false;\n }\n return true; \n }",
"public function any_user_exists(){\n $select_query = \"SELECT `id`, `staff_id`, `unit`, `password`, `cpassword` FROM `register_user` \";\n //check if user exists \n $run_select_query = $this->conn->query($select_query);\n if($run_select_query){\n //check if user exists \n if(mysqli_num_rows($run_select_query) > 0){\n //check if \n return true;\n }else{\n return false;\n }\n }\n }",
"function user_exists()\n\t{\t\n\t\tif((empty($_SESSION['username'])))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn true;\n\t\t}\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}",
"function exists ($name)\r\n {\r\n # create encoded_key_string\r\n $encoded_key_string = parent::_encode_key_string(USER_NAME_FIELD_NAME.\"='\".$name.\"'\");\r\n\r\n $record = parent::select_record($encoded_key_string);\r\n if (count($record) > 0)\r\n {\r\n $this->_log->debug(\"user already exists (name=\".$name.\")\");\r\n\r\n return TRUE;\r\n }\r\n else if (strlen($this->get_error_message_str()) == 0)\r\n {\r\n $this->_log->debug(\"user does not exist (name=\".$name.\")\");\r\n\r\n return FALSE;\r\n }\r\n else\r\n return FALSE;\r\n }",
"private function doesUserExists($name,$log=false){\n\t\treturn ($this->_link->countFieldsLCASE('users',array('name'=>strtolower($name)),$log)>0);\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}",
"function doesUserExist($user) {\r\n global $dbaseUserData, $leagueID, $dbase;\r\n\r\n\r\n $query = \"SELECT username from $dbaseUserData where lid='$leagueID' and username=\\\"$user\\\"\";\r\n $result = $dbase->query($query);\r\n\r\n if ($result == FALSE) {\r\n ErrorNotify(\"Query Failed : $query\");\r\n CloseConnection($link);\r\n return TRUE;\r\n }\r\n \r\n // If we get >0 rows, the username already exists.\r\n $numrows = mysql_num_rows($result);\r\n\r\n if ($numrows == 0) {\r\n return FALSE;\r\n }\r\n\r\n return TRUE;\r\n}",
"function userExists()\n\t{\n\t\t$uid = mysql_real_escape_string($_POST[\"uid\"]);\n\n\t\t$query = \"\n\t\t\tSELECT *\n\t\t\tFROM user\n\t\t\tWHERE uid='$uid';\";\n\n\t\t$result = mysql_query($query) or die(\"db access error\" . mysql_error());\n\n\t\t$exists = (mysql_numrows($result) == 1) ? true : false;\n\n\t\treturn $exists;\n\t}",
"public function userExist( $data = [] ) {\n\t\tif( $this->where(\"username\", $data[\"user\"])->exist() ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function user_exists() {\r\n\t\tif ($this->user_id) {\r\n\t\t\t$sql = \"SELECT user_id FROM `users` WHERE user_id = '$this->user_id'\";\r\n\t\t\t$result = $this->dbc->query($sql)\r\n\t\t\tor die ($this->dbc->error);\r\n\t\t\treturn ($result->num_rows == 1);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new UnexpectedValueException('UnexpectedValueException occured on method call user_exists because the user id is invalid');\r\n\t\t}\r\n\t}",
"function exists($user_query){\n\t\t\n\t\t//CALL MEMBER FUNCTION QUERY OF THE CURRENT OBJECT\n\t\t$result = $this->query(\"Select username from users where username='\".$user_query.\"'\");\n\t\t\n\t\t//COUNT RESULTS FROM QUERY\n\t\t$count = mysqli_num_rows($result);\n\n\t\t//IF COUNT HAS COUNTED ONE OR MORE RESULTS, RETURN FALSE BECAUSE EMAIL/USER IS ALREADY REGISTERED!\n\t\tif($count>0){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private function doesUserExists($id,$log=false){\n\t\treturn (\n\t\t\tNewDao::getInstance()\n\t\t\t->countFields('users',array('id'=>$id),$log)>0\n\t\t);\n\t}",
"function userExists(){\n\t\t//assume user is not in system\n\t\t$exists = false;\n\t\ttry{//try to est connection to db \n\t\t\t$user_db = new SQLite3('users.db');\n\t\t}catch(Exception $ex){ //if cannot catch exception \n\t\t\techo $ex->getMessage(); \n\t\t}\n\t\t//query for all usernames\n\t\t$statement = 'SELECT Username FROM users;';\n\t\t$run = $user_db->query($statement); \n\n\t\tif($run){//if not error in query \n\t\t\twhile($row = $run->fetchArray()){//while there are still rows to parse\n\t\t\t\tif(trim($row['Username']) === trim($_POST['name'])){//if provided user name matches one in db\n\t\t\t\t\t//user exists\n\t\t\t\t\t$exists = true;\n\t\t\t\t\t//break out of loop\n\t\t\t\t\tbreak;\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\t//close connection to db\n\t\t$user_db->close(); \n\t\treturn $exists;\n\t}",
"public function existNameUser($user){\t\t\n\t\t$query = \"SELECT idUser FROM final_usuario WHERE nick='\".$user.\"'\";\n\t\treturn mysqli_num_rows($this->con->action($query))> 0? True: False;\n\t}",
"function verify_username_availability($userName){\n $exists = false;\n if(get_user($userName)){\n $exists = true;\n }\n return $exists;\n}",
"function is_user_exists($cellphone,$password)\n {\n\n $query=$this->db->query(\"SELECT * FROM xl_account WHERE cellphone='{$cellphone}' AND password='{$password}' AND register_user=1\");\n\n if ($query->num_rows()>0) {\n #if exist return true\n return TRUE;\n }\n\n return FALSE; \n }",
"public function userExists($login){\n $usr = $this->userInfo($login);\n if($usr == null) { // uzivatel neni v DB\n return false;\n }\n else {\n return true;\n }\n }",
"function getUserExistsOrNot() \n{\n\t$username = $_POST['username'];\t\n\t$query = \"SELECT id FROM users WHERE username='\".$username.\"'\";\n\t$result = mysql_query($query) or die(\"Failed to fetch data: \".mysql_error());\n\t\n\tif(!mysql_num_rows($result)) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\t\n}",
"function check_user($user)\n\t\t{\n\n\t\t}",
"public function getUserExiste(){\n return $this->userExist;\n }",
"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}",
"function checkUserExists($username){\n\treturn false;\n}",
"function isUserExist($con,$androidId,$username,$email){\n\t$sql = \"SELECT * FROM `access`,`owner` WHERE owner.email = access.email AND owner.android_id = '\".$androidId.\"' AND owner.email='\".$email.\"' AND access.username='\".$username.\"' AND access.enable = 'Y'\";\n\n\t$result = mysqli_query($con,$sql);\n\t$value = @mysqli_num_rows($result);\n\n\tif ($value){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}",
"function userExists($email) {\r\n\t\t\tif ($this->getUser($email) != false)\r\n\t\t\t\treturn true;\r\n\t\t\treturn false;\r\n\t\t}",
"function userIdExists($id) {\n\t$db = DB::getInstance();\n\t$query = $db->query(\"SELECT * FROM users WHERE id = ?\",array($id));\n\t$num_returns = $query->count();\n\tif ($num_returns > 0){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}",
"public function userExists($userId) {\n\t\t$sql = \"select userName from user where userName = ? LIMIT 1\";\n\t\t$result = $this->executeQuery($sql, array($userId));\n\t\treturn count($result) == 1; \n\t}",
"private function Check_If_User_Exists($query){\r\n\r\n // Send query into server\r\n $this->_db->get_Row($query);\r\n\r\n // Return result of query\r\n // True - if find\r\n // False - in dont\r\n return ($this->_db->count() > 0 ) ? true : false;\r\n }",
"public function _userntexists($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}",
"public function check()\n {\n if($this->user_provider->retrieveById($this->user_provider->getAuthIdentifier()))\n return true;\n\n return false;\n }",
"private function existe_usuario()\n\t{\n\t\t$data = $this->request->getRawInput();\n\t\t$ruc = $data['nick']; \n\t\t$usu = new Admin_model();\n\t\t$usuarioObject = $usu->where(\"nick\", $ruc) \n\t\t->first();\n\t\treturn !is_null($usuarioObject);\n\t\t \n\t}",
"public function userExists()\r\n {\r\n $sql = \"SELECT COUNT(*) FROM (SELECT * FROM doctors WHERE email = :email) AS subquery\";\r\n\r\n $query = $this->db_connection->prepare($sql);\r\n $query->bindValue(':email', $this->email);\r\n $query->execute();\r\n\r\n while($result_row = $query->fetch() ){\r\n if($result_row[0] == 1) return true;\r\n else return false;\r\n }\r\n\r\n return false; \r\n }",
"private function checkUser()\n {\n $session = $this->di->get(\"session\");\n\n if (!$session->get(\"activeUser\") && !$session->get(\"username\")) {\n return $this->di->response->redirect(\"user/login\");\n }\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}",
"function dbUserExists($unm)\n{\n\t$result = false;\n\t$sql = \"SELECT username FROM _account WHERE username = '$unm'\";\n\ttry {\n\t\t$stmt = Database :: prepare ( $sql );\n\t\t$stmt->execute();\n\t\t$count = $stmt -> rowCount();\n\t\tif ($count > 0) {\n\t\t\t$result = true; //Username already taken\n\t\t}\n\t\t$stmt->closeCursor ( ) ;\n\t}\n\tcatch(PDOException $e)\n\t{\n\t\techo $e->getMessage();\n\t}\n\treturn $result;\n}",
"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}",
"public function existUser($user,$pwd){\n\t\t$query = \"SELECT idUser FROM final_usuario WHERE nick='\".$user.\"' and \n\t\tpassword='\".$pwd.\"'\";\n\t\treturn mysqli_num_rows($this->con->action($query))> 0? True: False; \n\t}",
"protected function creatingNewUser() {\n return ($this->request_exists('user_choice') && $this->request('user_choice') == 'new' );\n }",
"function userExists($uid)\r\n {\r\n return $this->UD->userExists($uid);\r\n }",
"public function check_user_exist($con,$username) {\n $query = \"SELECT * FROM user WHERE username = '$username'\";\n $result = mysqli_query($con, $query);\n $count = mysqli_num_rows($result);\n if ($count > 0) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n }",
"public function user_exists($staff_id){\n $select_query = \"SELECT `id`, `staff_id`, `unit`, `password`, `cpassword` FROM `register_user` WHERE `staff_id` = '$staff_id'\";\n //check if user exists \n $run_select_query = $this->conn->query($select_query);\n if($run_select_query){\n //check if user already exists \n if(mysqli_num_rows($run_select_query) == 0){\n //check if \n return false;\n }else{\n return true;\n }\n }\n }",
"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 existUser($params)\r\n {\r\n if (!empty($this->getAll($params))) {\r\n return True;\r\n } else {\r\n return False;\r\n }\r\n }",
"public function checkUser(){\n \n $user = $this->request->data[\"user\"];\n \n $result = $this->User->find(\"first\",array(\n 'conditions' => array(\n 'user' => $user\n )\n ));\n \n $result = array_filter($result);\n \n echo !empty($result) ? true : false;\n \n $this->autoRender = false;\n \n \n }",
"public function user_exists($staff_id){\n $select_query = \"SELECT `id`, `staff_id`, `unit`, `password`, `cpassword` FROM `register_user` WHERE `staff_id` = '$staff_id'\";\n //check if user exists \n $run_select_query = $this->conn->query($select_query);\n if($run_select_query){\n //check if user exists \n if(mysqli_num_rows($run_select_query) > 0){\n //check if \n return true;\n// trecho \"hgello\";\n }else{\n return false;\n }\n }\n }",
"private function userExist(){\n $result = $this->facebookModel->project(array(\"User_id\" => true, \"Current_city\" => true, \"_id\" => false))->get()->count();\n return $result;\n }",
"function _user_exists($username)\n {\n $this->where('username', $username);\n $user = $this->get('users');\n //return true/false\n if ($user)\n {\n return true;\n } else {\n return false;\n }\n }",
"function checkIfUserExists($conn,$data)\n {\n $sql = \"SELECT * FROM tbl_users \n WHERE email='\".$data['email'].\"' AND username='\".$data['username'].\"'\";\n $result = $conn->query($sql);\n return ($result->num_rows>0 ? true : false);\n }",
"function isInvitedUserExist($invited_user)\n {\n $sql=\"SELECT id from user WHERE id = $invited_user\";\n $query = $this->db->query($sql);\n if($query->num_rows()>0)\n { return true;\n }\n else{\n return false;\n }\n }",
"private function existeUsuario()\n {\n $con = Conexion::getInstance();\n $sql = \"SELECT user \n FROM usuarios\n WHERE user = '{$this->usuario}' AND estado = 1 AND idUsuario != {$this->Id}\";\n\n $result = mysqli_query($con, $sql);\n\n if($result->num_rows >= 1 && $result != false)\n {\n return false;\n }\n\n return true;\n }",
"public function create(User $user)\n {\n return $user->id > 0;\n }",
"function checkExistingUser($conn, $useremail){\n $check_existing = \"SELECT user_id FROM user_details WHERE user_email = '$useremail'\";\n $check_existing_result = mysqli_query($conn, $check_existing);\n if(mysqli_num_rows($check_existing_result) != 0){\n return TRUE;\n } else{\n return FALSE;\n // header('Refresh: 1000, url = ../html/sitelist.php');\n }\n }",
"public function checkUser()\n {\n $response = $this->di->get(\"response\");\n $user = $this->di->get(\"user\");\n\n if (!$user->isLoggedIn()) {\n $response->redirect(\"login\");\n }\n }",
"public function user_not_exists($staff_id){\n $select_query = \"SELECT `id`, `staff_id`, `unit`, `password`, `cpassword` FROM `register_user` WHERE `staff_id` = '$staff_id'\";\n //check if user exists \n $run_select_query = $this->conn->query($select_query);\n if($run_select_query){\n //check if user already exists \n if(mysqli_num_rows($run_select_query) == 0){\n //check if \n return true;\n }else{\n return false;\n }\n }\n }",
"public function isUserExisting($username){\n\t\t$sqlQuery = \"SELECT count(*) as isExisting \";\n\n\t\t$sqlQuery .= \"FROM user_table \";\n\n\t\t$sqlQuery .= \"WHERE user_name='$username' \";\t\t\n\t\t//Calls the method from the DAOFactory and passes in the query to be execute, and the result is stored\n\t\t$result = $this->getDbManager()->executeSelectQuery($sqlQuery);\n\t\t\n\t\tif ($result[0][\"isExisting\"] == 1) return (true);\n\n\t\telse return (false);\n\t}",
"function username_exist($user){\n\t\t$db = new mysql();\n\t\t$query = \"SELECT*FROM user WHERE username='$user'\";\n\t\t$x = $db->numofrows($query);\n\t\tif($x > 0){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}",
"function exists($userName)\n{\n\treturn (bool)$this->getUser($userName);\n}",
"function userExist($user){\n\t\tglobal $db;\n\t\t$sql= \"SELECT username from users where username = '\". $user .\"'\";\n\t\t$result =$db->query($sql);\n\t\n\t\tif($result->num_rows>0)\n\t\t\treturn 'This username already exists.';\n\t\telse if($user ==\"\")\n\t\t\treturn 'Please enter a username.';\n\t\telse\n\t\t\treturn '';\n\t}",
"function existsUser($user){\n $users = array();\n $table = $this->getTableConstant();\n $query_selectUser = \"SELECT * FROM $table WHERE user=?\";\n $statement = $this->connection->prepare($query_selectUser);\n $statement->bind_param('s', $user);\n $statement->execute();\n $result = $statement->get_result();\n while($result->fetch_assoc()){\n return true;\n }\n return false;\n }",
"public function existeUser($acc){\n\t\tUtilidades::_log(\"existeUser($acc)\");\n\t\t$db=DB::conectar();\n\t\t$select=$db->prepare('SELECT * FROM user WHERE account=:account');\n\t\t$select->bindValue('account',$acc);\n\t\t$select->execute();\n\t\t$registro=$select->fetch();\n\t\tif(null != registro['id']){\n\t\t\t$usado=False;\n\t\t}else{\n\t\t\t$usado=True;\n\t\t}\t\n\t\treturn $usado;\n\t}",
"public function user_check($userId)\n {\n $sql1 = \"SELECT userId FROM users WHERE userId ='\".$userId.\"'\";\n $record = $this->db->query($sql1);\n if ($record->num_rows()>0) {\n return true;\n } \n }",
"function userExists($username) {\r\n\t\treturn username_exists($username);\r\n\t}",
"public function validUser();",
"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 User_Exists($UserIDorUsername)\n\t{\n\t\t$UserID=$this->GetUserID($UserIDorUsername);\n\t\t$R=j::SQL(\"SELECT XU.ID FROM jfp_xuser AS XU JOIN jf_users AS U ON (U.ID=XU.ID) WHERE XU.ID=?\",$UserID);\n\t\tif ($R) return true;\n\t\telse \n\t\t{\n\t\t\tif (j::$Session->UserExists($UserIDorUsername)) return 2;\n\t\t\treturn false;\n\t\t}\n\t}",
"public function userExists($user) {\n $user = $this->connection->escape_string($user);\n\n $result = $this->query(\"SELECT user FROM Users U where U.user='$user'\");\n\n return ($result->num_rows > 0);\n }",
"function userExists($username, $name, $email) {\n $dbo =& JFactory::getDBO();\n $query = 'SELECT id FROM #__users ' .\n 'WHERE username = ' . $dbo->quote($username) . ' ' .\n 'AND name = ' . $dbo->quote($name) . ' ' .\n 'AND email = ' . $dbo->quote($email);\n \n $dbo->setQuery($query);\n // Checking subscription existence\n if ($user_info = $dbo->loadObjectList()) {\n if (! empty ($user_info)) {\n $user = $user_info[0];\n return $user->id;\n }\n }\n return false;\n }",
"function userExists($uid)\n\t{\n\t\t$check = $this->DB->database_select('users', 'uid', array('uid' => $uid));\n\t\treturn ($check == 0) ? false : true;\n\t}",
"function isUserExisted($email) {\n $result = mysql_query(\"SELECT email from users WHERE email = '$email'\",$first);\n $no_of_rows = mysql_num_rows($result);\n if ($no_of_rows > 0) {\n // user existed \n return true;\n } else {\n // user not existed\n return false;\n }\n }",
"function userExist($username)\n{\n\n global $connection;\n global $errors;\n\n $sql = \"SELECT * FROM tbl_users WHERE username = '$username'\";\n $result = mysqli_query($connection, $sql);\n $row = mysqli_fetch_all($result);\n mysqli_free_result($result);\n\n if (count($row) > 0) {\n\n $errors[] = \"This username has been taken before.\";\n return false;\n }\n return true;\n}",
"public function hasUser()\n {\n return $this->getUser() !== null;\n }",
"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 chkUserDuplicate() {\n $this->load->model('register_model');\n $user_name = $this->input->post('user_name');\n $table_to_pass = 'mst_users';\n $fields_to_pass = array('user_id', 'user_name');\n $condition_to_pass = array(\"user_name\" => $user_name);\n $arr_login_data = $this->register_model->getUserInformation($table_to_pass, $fields_to_pass, $condition_to_pass, $order_by_to_pass = '', $limit_to_pass = '', $debug_to_pass = 0);\n if (count($arr_login_data)) {\n echo 'false';\n } else {\n echo 'true';\n }\n }",
"public static function check()\n {\n return !is_null(static::user());\n }",
"public function isExists(Request $request){\n $mode = $this->isEmail($request->phn_or_email);\n $user = null;\n $flashmail=$request->phn_or_email;\n if($mode){\n $user = User::where('email', $request->phn_or_email)->first();\n }else{\n $user = User::where('phone', $request->phn_or_email)->first();\n }\n if($user){\n $data['flag'] = 6;\n Session::flash ( 'email', $flashmail );\n return redirect('login-user')->with(['msg2' =>'You already have an account, Please login using ' . $request->phn_or_email,'phn_or_email' => $request->phn_or_email]);\n }else{\n return redirect('registration')->with('msg', 'You dont have an account, Please register.');\n }\n }",
"private function notExist() : void\n {\n if(!$this->user)\n {\n (new Session())->set('user','error','Désolé une erreur est survenue');\n header('Location:' . self::REDIRECT_HOME);\n die();\n }\n }",
"public function check()\n {\n $user = $this->user();\n return !empty($user);\n }",
"public function userExist(User $user):bool\n {\n // SQL request\n $sql = \" SELECT COUNT(*) AS user FROM user WHERE email = :email\";\n\n // Preparing the sql query\n $requete = $this->DB->prepare($sql);\n\n // Associates a value with the email parameter\n $requete->bindValue(':email', $user->getEmail(), \\PDO::PARAM_STR);\n\n // Execute the sql query\n $requete->execute();\n\n // Retrieves information\n $reponse = $requete->fetch();\n\n // If there is a record, we return true\n if ($reponse['user'] == 1) {\n return true;\n }\n // else\n return false;\n }",
"public function user_exists($staff_id){\n $select_query = \"SELECT `id`, `staff_id`, `unit`, `password`, `cpassword` FROM `register_user` WHERE `staff_id` = '$staff_id'\";\n //check if user exists \n $run_select_query = $this->conn->query($select_query);\n if($run_select_query){\n //check if user exists \n if(mysqli_num_rows($run_select_query) > 0){\n //check if \n return true;\n }else{\n return false;\n }\n }\n }",
"function name_exists($name){\n\t\t\t\n\t\t\t//var_dump($name);\n\t\t\tglobal $wpdb;\n\t\t\t$table = $wpdb->prefix.'users' ;\n\t\t\t$user_id = $wpdb->get_var( \"SELECT ID FROM $table WHERE user_login='$name'\" ) ;\n\t\t\t\n\t\t\t//return ($user_id) ? false: true ;\n\t\t\treturn $user_id ;\n\t\t}",
"public function checkUserExist($account){\n $query = \"select * from members where account=\\\"$account\\\"\";\n $result = $this->dbh->query($query);\n if($result->rowCount() > 0){\n return true;\n }\n return false;\n }",
"public function isusernameexist($user_id=0)\n {\n //session_check();\n $user_name = $this->input->get('username', TRUE);\n if($this->users_model->isusernameexist($user_name, $user_id))\n echo 'false';\n else\n echo 'true'; \n }",
"function checkUserByUserName($user_name){\n\t\t$rec\t= $this->query(\"SELECT `id` from `users` where `user_name` = '$user_name' \");\t\t\n\t\tif($rec && mysql_num_rows($rec)>0){\t\t\n\t\t\t//if user with the user_name got found\n\t\t\treturn true;\n\t\t}else{\n\t\t\t//if user with the user_name got not found\n\t\t\treturn false;\n\t\t}\n\t}",
"function is_username_exists($user_name){\n\t\t\t\n\t\t\t$select_data = \"*\"; \n\t\t\t\n\t\t\t$where_data = array(\t// ----------------Array for check data exist ot not\n\t\t\t\t'username' => $user_name\n\t\t\t);\n\t\t\t\n\t\t\t$table = \"userdetails\"; //------------ Select table\n\t\t\t$result = $this->get_table_where( $select_data, $where_data, $table );\n\t\t\t\n\t\t\tif( count($result) > 0 ){ // check if user exist or not\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\treturn false;\n\t }",
"function DB_check_if_user_exist($usersPass, $usersEmail){\n\n $connection = DB_get_connection();\n $usersPass = md5($usersPass);\n $query = \"SELECT * FROM `users` WHERE Email='$usersEmail' AND password='$usersPass'\";\n $result = mysqli_query($connection, $query);\n if(mysqli_num_rows($result) === 1)\n return true;\n else return false;\n\n}",
"public static function user_exists($lookup)\n {\n if (Token::verify($lookup)) {\n $query = Database::generate_query(\"user_lookup_id\", [$lookup]);\n // Else assume a display name\n } else {\n $query = Database::generate_query(\"user_lookup_name\", [$lookup]);\n }\n\n $result = $query->execute();\n $count = $result->count();\n $result->close();\n\n return $count >= 1;\n }"
] | [
"0.80854905",
"0.803215",
"0.7927345",
"0.77850366",
"0.77830017",
"0.7682984",
"0.7667868",
"0.7657921",
"0.76283",
"0.7572905",
"0.75677484",
"0.75569826",
"0.74755573",
"0.74418736",
"0.74362034",
"0.74211556",
"0.74114007",
"0.74001193",
"0.73748577",
"0.7370407",
"0.73610395",
"0.73329777",
"0.73179615",
"0.7298692",
"0.7282948",
"0.72806036",
"0.72791517",
"0.72470593",
"0.7229952",
"0.7216038",
"0.7207789",
"0.7196775",
"0.7194308",
"0.7181741",
"0.71782184",
"0.7171488",
"0.71529883",
"0.71423",
"0.7132045",
"0.7117681",
"0.71059585",
"0.7104753",
"0.7099087",
"0.70981973",
"0.70905757",
"0.70856524",
"0.7077433",
"0.70696616",
"0.7064716",
"0.7064241",
"0.7060085",
"0.7051643",
"0.7050054",
"0.70499027",
"0.7046127",
"0.7035629",
"0.7034662",
"0.7031788",
"0.7021715",
"0.7011878",
"0.7011802",
"0.70103085",
"0.70082384",
"0.6999138",
"0.69948083",
"0.6990778",
"0.69890654",
"0.6985829",
"0.69723487",
"0.69710934",
"0.6967675",
"0.69670624",
"0.6964799",
"0.69620615",
"0.6951437",
"0.69474375",
"0.6945593",
"0.6937054",
"0.6936385",
"0.6935688",
"0.6933973",
"0.6932849",
"0.69315106",
"0.6929773",
"0.6925785",
"0.6924045",
"0.69093776",
"0.6909062",
"0.6907086",
"0.6904186",
"0.6902935",
"0.69013",
"0.68845206",
"0.68824774",
"0.68757683",
"0.6872532",
"0.687179",
"0.6861908",
"0.68610597",
"0.68576217",
"0.6849792"
] | 0.0 | -1 |
Verifies user by email and password | public function getUserByEmailAndPassword($email, $password) {
$query = "
SELECT * from users WHERE email = :email;
";
try
{
$stmt = $this->_db->prepare($query);
$stmt->bindValue(':email',$email);
$stmt->execute();
$result = $stmt->fetch();
}
catch(PDOException $ex)
{
$h = $ex->getMessage ();
die($h);
}
if(!(empty($result))){
$salt = $result['salt'];
$encrypted_password = $result['password'];
$hash = $this->checkhashSSHA($salt, $password);
if ($encrypted_password == $hash) {
// user authentication details are correct
return $result;
}
} else {
// user not found
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function verifyAction()\n {\n $email = Request::post('email', Filter::FILTER_EMAIL, false);\n\n if (!$email || !Validator_Email::validate($email)) {\n Response::jsonError($this->moduleLang->get('email_invalid'));\n }\n\n $model = Model::factory('User');\n\n $userIds = $model->getList(\n ['limit' => 1],\n [\n 'email' => $email,\n 'enabled'=> true\n ],\n ['id']\n );\n\n if (count($userIds) == 0) {\n Response::jsonError($this->moduleLang->get('email_user_unknown'));\n }\n\n $userId = $userIds[0]['id'];\n\n $user = Db_Object::factory('User', $userId);\n $authCode = Utils::hash(uniqid(time(),true));\n\n $confDate = new DateTime('now');\n $confDate = $confDate->add(new DateInterval('P1D'))->format('Y-m-d H:i:s');\n\n try{\n $user->setValues(array(\n 'confirmation_code' => $authCode,\n 'confirmation_expiried' => $confDate\n ));\n if(!$user->save())\n throw new Exception('Cannot update user info');\n }catch (Exception $e){\n Response::jsonError($this->_lang->get('CANT_EXEC'));\n }\n\n $this->sendEmail($user);\n\n Response::jsonSuccess(array(\n 'msg' => $this->moduleLang->get('pwd_success')\n ));\n }",
"public function checkCredentials(string $email, string $password):bool;",
"public function isValidLogin($email, $password);",
"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 }",
"function verifyUser ($username, $hash) {\r\n //TO-DO\r\n\r\n //if credentials match return true\r\n\r\n //else return false\r\n\r\n //dummy CODE\r\n return true;\r\n}",
"function verifyemail() {\n\t$a = array(\n\t 'status' => 'system-error'\n\t);\n\n\t// raw inputs\n\t$taint_si = isset($_POST['si']) ? $_POST['si'] : 0;\n\t$taint_tic = isset($_POST['tic']) ? $_POST['tic'] : 0;\n\t$taint_pword = isset($_POST['pword']) ? $_POST['pword'] : 0;\n\n\t// validate inputs\n\t$si = validateToken($taint_si);\n\t$tic = validateTic($taint_tic);\n\t$pword = validatePword($taint_pword);\n\n\t// validate parameter set\n\tif (!$si || !$tic || !$pword) {\n\t\tLog::write(LOG_WARNING, 'attempt with invalid parameter set');\n\t\treturn $a;\n\t}\n\n\t// get db connection\n\t$conn = getConnection();\n\tif (!$conn) {\n\t\treturn $a;\n\t}\n\n\t// read token and user table\n\t$result = getUserByToken($conn, $si);\n\tif (!$result) {\n\t\treturn $a;\n\t}\n\n\t// get fields\n\t$row = pg_fetch_array($result, 0, PGSQL_ASSOC);\n\t$userid = $row['id'];\n\t$hashpassword = $row['hashpassword'];\n\t$auth = $row['auth'];\n\t$hashtic = $row['hashtic'];\n\t$oldemail = $row['email'];\n\n\t// verify user authentication state\n\tif (!isUserEmailPending($auth)) {\n\t \tLog::write(LOG_NOTICE, 'attempt to verify email on user not auth=email-pending');\n\t\treturn $a;\n\t}\n\n\t// verify the password\n\t$boo = verifyPassword($pword, $hashpassword);\n\tif (!$boo) {\n\t\tLog::write(LOG_NOTICE, 'attempt with invalid password');\n\t\treturn $a;\n\t}\n\n\t// verify the tic from the email\n\t$boo = verifyTic($tic, $hashtic);\n\tif (!$boo) {\n\t\tLog::write(LOG_NOTICE, 'attempt with invalid tic');\n\t\treturn $a;\n\t}\n\n\t// update user record\n\t$auth = DB::$auth_verified;\n\t$name = 'verify-email';\n\t$sql = \"update accounts.user set email=newemail, newemail='', auth=$1, hashtic=null, tmhashtic=null where id = $2\";\n\t$params = array($auth, $userid);\n\t$result = execSql($conn, $name, $sql, $params, true);\n\tif (!$result) {\n\t\treturn false;\n\t}\n\n\t// send security notice\n\t$boo = sendAuthenticationEmail($oldemail, 'changedemail', '');\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['auth'] = $auth;\n\treturn $a;\n}",
"public function testIsValidLogIn_InCorrectPassword_ReturnsErrorMessage()\n {\n $user = new User();\n\n $user -> email = \"[email protected]\";\n $user -> password = \"secret\";\n\n $this->browse(function ($browser) use ($user) {\n $browser->visit('/login')\n ->pause(1000)\n ->type('@login-email-input', $user->email)\n ->type('@login-password-input', 'test')\n ->click('@login-button')\n ->assertSee('These credentials do not match our records.');\n });\n }",
"public function hashed_password_verification() {\n\n $criteria = array(\"email\" => $this->ci->input->post(\"email\"));\n\n // retrieve user profile by username criteria.\n $user_profile = $this->ci->generic_model->retrieve_one(\"admin_user\", $criteria);\n\n if (!$user_profile) { // if user profile can't be retrieved by username.\n return FALSE;\n }\n\n // password stored inside db.\n $real_password = $user_profile['password'];\n $hashed_input_password = $this->ci->input->post(\"password\");\n\n\n // compare the input and user password.\n if ($hashed_input_password == $real_password) {\n $passed = TRUE;\n } else {\n $passed = FALSE;\n $this->ci->form_validation->set_message(\"hashed_password_verification\", \"Invalid email or password.\");\n }\n\n return $passed;\n }",
"private function verifyAccount()\n {\n $check = $this->db->query('SELECT users.password, users.id FROM users WHERE username = ?', $this->username)->fetchArray();\n //Check of de user in de database staat.\n if (isset($check['password'])) {\n //Check of de password matched\n if (password_verify($this->password, $check['password'])) {\n echo \"AUTH verify complete\";\n $this->setLoggedinUser($check['id']);\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }",
"function is_password_valid ($password, $user_data) {\n // the one in the user records.\n $is_valid = $password == $user_data['password'];\n return $is_valid;\n}",
"function confirmUser($email, $password){\r\n\t\t$email = mysql_real_escape_string($email);\r\n\t\t$password = mysql_real_escape_string($password);\r\n /* Add slashes if necessary (for query) */\r\n if(!get_magic_quotes_gpc()) {\r\n\t $email = addslashes($email);\r\n }\r\n /* Verify that user is in database */\r\n $q = \"SELECT * FROM users WHERE email = '$email'\";\r\n $result = mysql_query($q, $this->connection);\r\n if(!$result || (mysql_numrows($result) < 1)){\r\n return 1; //Indicates username failure\r\n }\r\n\r\n /* Retrieve password from result, strip slashes */\r\n $dbarray = mysql_fetch_array($result);\r\n $dbarray['password'] = stripslashes($dbarray['password']);\r\n $password = stripslashes($password);\r\n /* Validate that password is correct */\r\n if($password == $dbarray['password']){\r\n return 0; //Success! Username and password confirmed\r\n }\r\n else{\r\n return 2; //Indicates password failure\r\n }\r\n }",
"function validateLogin($email, $password)\n\t{\n\n\t\t$connection = new Connection;\n\t\t$query = \"select email,password from user where email = '$email' and password = '$password'\";\n\t\t$result = $connection->runQuery($query, $connection->connection());\n\t\treturn $result;\n\t}",
"public function password_verification() {\n\n $criteria = array(\"email\" => $this->ci->input->post(\"email\"));\n\n $passed = $this->verify_password($criteria, $this->ci->input->post(\"password\")); // variable to mark the user is allowed to pass or not.\n\n if (!$passed) {\n $this->ci->form_validation->set_message(\"password_verification\", \"Invalid email or password.\");\n }\n\n return $passed;\n }",
"public static function validateUser($email, $password)\n {\n $conn = new MySqlConnect();\n $isValid = FALSE;\n $dbHash = null;\n $userId = null;\n $name = null;\n $userType = null;\n\n // hash the submitted password to to verify against the value in the db\n $hash = Users::encodePassword($password);\n\n //$email = $conn -> sqlCleanup($email);\n // query the db for the value comparison\n $result = $conn -> executeQueryResult(\"SELECT userId, password, fName, lName, userType FROM users WHERE emailAddress = '{$email}'\");\n\n // get a row count to verify only 1 row is returned\n $count = mysql_num_rows($result);\n if ($count == 1)\n {\n var_dump($result);\n // use mysql_fetch_array($result, MYSQL_ASSOC) to access the result object\n while ($row = mysql_fetch_array($result, MYSQL_ASSOC))\n {\n // access the password value in the db\n $userId = trim($row['userId']);\n $dbHash = trim($row['password']);\n $userType = trim($row['userType']);\n $name = \"{$row['fName']} {$row['lName']}\";\n }\n\n // compare the input password hash with the db hash, and set as valid if\n // they match\n if ($hash == $dbHash)\n {\n $isValid = TRUE;\n session_start();\n // register the userId, name, and userType in the $_SESSION\n $_SESSION['userId'] = $userId;\n $_SESSION['name'] = $name;\n $_SESSION['userType'] = $userType;\n $_SESSION['email'] = $email;\n $_SESSION['timeout'] = time();\n // clear any tempPassKey record that may or may not exist in the user\n // record that that has been validated\n Users::clearTempPassKey($userId);\n }\n }\n $conn -> freeConnection();\n return $isValid;\n }",
"public function verify($password): bool;",
"public function verify(string $email, string $password) : bool{\r\n\r\n\r\n\t\t$sth = $this->db->prepare('SELECT password FROM users WHERE email = :email');\r\n $sth->bindParam(':email', $email);\r\n\r\n if (false === $sth->execute()) {\r\n return false;\r\n }\r\n\r\n $result = $sth->fetch(PDO::FETCH_ASSOC);\r\n\r\n if (false === $result || empty($result)) {\r\n return false;\r\n }\r\n return password_verify($password, $result['password']);\r\n\t\t\t\t\r\n\t}",
"function validateUserCredential($userEmail, $password){\n\n\t\tglobal $conn;\n\n\t\t$md5Password = md5($password);\n\n\t\t$query = \"SELECT COUNT(*) AS Valid FROM User WHERE email='\" . $userEmail . \"' AND password='\" . $md5Password . \"'\";\n\n\t\t$result = $conn->query($query);\n\n\t\tif($result->num_rows != 1){\n\t\t\techo \"Error selecting \" . $userEmail . \" details\";\n\t\t}else{\n\t\t\t$assocResult = $result->fetch_assoc();\n\t\t\treturn $assocResult['Valid'];\n\t\t}\n\n\t}",
"function verifyAdmin(){\n\n $email = $_POST[\"input_email\"];\n $pass = $_POST[\"input_pass\"];\n\n if (isset($email)) {\n $userFromDB = $this->model->getAdministrador($email);\n if (isset($userFromDB) && $userFromDB) {\n if (password_verify($pass, $userFromDB->password)) {\n session_start();\n $_SESSION[\"EMAIL\"] = $userFromDB->email; \n header(\"Location:\" . BASE_URL . \"home\");\n }else {\n $this->view->showLogin(\"contraseña incorrecta\");\n }\n }else {\n $this->view->showLogin(\"el usuario no existe\");\n }\n }\n }",
"function verify_login($email, $password)\n{\n\t// 1 => good to go\n\t// -1 => account not found or verification bad\n\t$pw_verify = db_query('SELECT AES_DECRYPT(password, \"%s\") AS secret FROM users WHERE email=\"%s\" AND verified=\"1\" LIMIT 1', $_POST['password'], $_POST['email']);\n\tif (count($pw_verify) == 0)\n\t\treturn -1;\n\telse if ($pw_verify[0]['secret'] !== BLOWFISH_SECRET)\n\t\treturn 0;\n\telse\n\t\treturn 1;\n}",
"public function verify($password, $securePass);",
"function valid_credentials($email, $password){\n\n\t$pass = sha1($password);\n\n\t$link = mysqli_connect(\"localhost\", \"root\", \"\", \"formstack1\");\n \n $sql = \"SELECT * from `users` where `email_address` = \n '{$email}' AND `pass_word` = '{$pass}' \";\n \n $result = mysqli_query($link, $sql);\n \n\treturn (mysqli_result($result, 0) == '1') ? true : false;\n\n}",
"function checkLoginDetails($email, $password) {\r\n\t\t\t$sql = \"SELECT * FROM `users` WHERE UPPER(email)=UPPER('%s') AND password='%s'\";\r\n\t\t\t$result = $this->query($sql, $email, sha1($password));\r\n\t\t\tif (mysql_num_rows($result) == 0)\r\n\t\t\t\treturn false;\r\n\t\t\treturn true;\r\n\t\t}",
"public function verify_user() {\n try {\n //Retrieve user name and password from the form in the login form.\n if (filter_has_var(INPUT_POST, 'username') && filter_has_var(INPUT_POST, 'password')) {\n $username = trim(filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING));\n $password = trim(filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING));\n }\n\n if ($username == \"\" || $password == \"\") {\n throw new DataMissingException(\"Please fill in all fields.\");\n }\n\n\n //Get username and password from database.\n $sql = \"SELECT * FROM \" . $this->tblUser . \" WHERE username = '$username'\";\n\n\n $query = $this->dbConnection->query($sql);\n\n //If the query failed, return false. \n if (!$query) {\n throw new DatabaseException(\"There was an error verifying the user.\");\n }\n if ($query->num_rows == 0) {\n throw new InvalidAccountException(\"An account does not exist with that username or password.\");\n }\n\n //Create new user object.\n if ($query->num_rows == 1) {\n $obj = $query->fetch_object();\n\n $user = new User(stripslashes($obj->user_type), stripslashes($obj->firstname), stripslashes($obj->lastname), stripslashes($obj->username), stripslashes($obj->password));\n //set the id for the user.\n $user->setId($obj->id);\n }\n\n //Get user's username, password, firstname, and user type.\n $username_db = $user->getUsername();\n $password_db = $user->getPassword();\n $name = $user->getFirstname();\n $user_type = $user->getUser_type();\n $user_id = $user->getId();\n\n //Set to true if username and password are the pre-created admin/guest account.\n if (($username_db == \"admin\" && $password == \"password\") || ($username_db == \"guest\" && $password == \"password\")) {\n $verify_password = true;\n } else {\n $verify_password = password_verify($password, $password_db);\n }\n\n if ($username != $username_db || !$verify_password) {\n throw new InvalidAccountException(\"An invalid username or password was entered.\");\n }\n\n //If username and password match those in database, return true. Set session with user's first name and their user type.\n if ($username == $username_db && $verify_password) {\n //See if session exists already, if not start one.\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n $_SESSION['user_type'] = $user_type;\n $_SESSION['name'] = $name;\n $_SESSION['user_id'] = $user_id;\n return true;\n }\n } catch (DataMissingException $e) {\n return $e->getMessage();\n } catch (DatabaseException $e) {\n return $e->getMessage();\n } catch (InvalidAccountException $e) {\n return $e->getMessage();\n } catch (Exception $e) {\n return $e->getMessage();\n }\n }",
"public function login_check($email, $password) {\n\n $query = $this -> conn -> prepare('SELECT * FROM users WHERE email = :email');\n $query -> execute(array(':email' => $email));\n $data = $query -> fetchObject();\n $salt = $data -> salt;\n $db_user_password = $data -> user_password;\n\n if ($this -> verify_hash_pass($password.$salt,$db_user_password) ) {\n\n\n $user[\"name\"] = $data -> name;\n $user[\"email\"] = $data -> email;\n $user[\"unique_id\"] = $data -> unique_id;\n return $user;\n\n } else {\n\n return false;\n }\n\n }",
"public function verifyAccount(){\n\t\t$sql = \"SELECT UID, UName, email from user WHERE ver_code = :ver AND SHA1(email) = :email AND verified = 0\";\n\n\n\t\tif($stmt = $this->_db->prepare($sql)){\n\t\t\t$stmt->bindParam(':ver', $_GET['v'], PDO::PARAM_STR);\n\t\t\t$stmt ->bindParam(':email', $_GET['e'], PDO::PARAM_STR);\n\t\t\t$stmt->execute();\n\n\n\t\t\t$row = $stmt->fetch();\n\n\t\t\tif(isset($row['email'])){\n\t\t\t\t$_SESSION['UID'] = $row['UID'];\n $_SESSION['UNAME'] = $row['UName'];\n\t\t\t\t$_SESSION['LoggedIn'] = 1;\n\t\t\t\t$_SESSION['ISADMIN'] = 0;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn array(4, \"<h2>Verification error. This account has already been verified.</h2>\");\n\t\t\t}\n\t\t\t$stmt->closeCursor();\n\n\t\t\treturn array(0, null);\n\t\t}\n\t\telse{\n\t\t\treturn array(2, \"Database error\");\n\t\t}\n\t}",
"public function loginValidate($email, $password)\n {\n\n $pdo = DB::connect();\n $stmt = $pdo->prepare(\"SELECT password FROM users WHERE email = :email\");\n $stmt->bindParam(':email', $email);\n $stmt->execute();\n $result = $stmt->fetch();\n if (password_verify($password, $result['password'])) {\n return true;\n } else {\n return false;\n }\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 verifyLogin($userEmail=NULL,$userPassword=NULL)\n\t{\n\t\t$where = array(\n\t\t\t'userEmail' => $userEmail,\n\t\t\t'userPassword' => md5($userPassword),\n\t\t);\n\t\t$this->db->where($where);\n\t\t$result = $this->db->get('users')->result();\n\t\t// echo '<pre>'; print_r($result); exit();\n\t\treturn $result;\n\t}",
"public function postVerify()\n\t{\n\t\tif (!$this->userService->verify(Input::all()))\n\t\t{\n\t\t\tif ($this->userService->message())\n\t\t\t{\n\t\t\t\tAlert::error($this->userService->message())->flash();\n\t\t\t}\n\n\t\t\treturn Redirect::back()->withErrors($this->userService->errors())->withInput();\n\t\t}\n\n\t\tSession::flash('email', Input::get('email'));\n\n\t\tAlert::success('Your account has been verified!')->flash();\n\t\treturn Redirect::route('auth-login');\n\t}",
"public function validate_user($email, $password) {\n\t\t$mysql = New Mysql();\n\t\t$is_member = $mysql->get_member_by_email($email);\n\t\t\n\t\t//Check if a member\n\t\tif( !empty($is_member) ){\n\t\t\t\n\t\t\tif ( $this->checkbrute( $mysql->get_user_id($is_member), 8, 2 * 60 * 60 ) ){\n\t\t\t\t//if there were 8 failed attempts\n\t\t\t\theader(\"location: \". SITE_URL . \"/blocked\");\n\t\t\t\texit();\n\t\t\t\treturn \"Ваш личный кабинет зблокирован\";\n\t\t\t} elseif ( $this->checkbrute( $mysql->get_user_id($is_member), 2, 30 * 60 ) ){\n\t\t\t\t//if there were 3 faild attempts\n\t\t\t\theader(\"location: \" . SITE_URL . \"/login_captcha\"); \n\t\t\t\texit();\n\t\t\t} else {\n\t\t\t\t//if there is no captcha\n\t\t\t\treturn $this->check_password_create_session($is_member, $password, $mysql);\n\t\t\t}\n\t\t} else {\n\t\t\t//if not a member\n\t\t\t$now = time();\n\t\t\techo $ip;\n\t\t\tif( $mysql->login_attempt($mysql->get_user_id($is_member), $now) ){\n\t\t\t\treturn \"Неверный email или пароль\";\n\t\t\t}\t\n\t\t}\n\t\n\t}",
"public function verify()\n {\n $userName = $_POST['usuario'];\n $password = $_POST['password'];\n if(!empty($userName) && !empty($password)){\n $user = $this->model->getUser($userName);\n if((!empty($user)) && password_verify($password, $user[0]['password'])) {\n session_start();\n $_SESSION['usuario'] = $user[0]['nombre'];\n $_SESSION['LAST_ACTIVITY'] = time();\n $_SESSION['superAdmin']=$user[0]['superAdmin'];\n header('Location: '.HOME);\n die();\n // $this->controllerProduct->comparativa();\n }\n else{\n echo(\"User pass error\");\n }\n }\n }",
"public function verify($password, $hash);",
"function check_password($email, $password)\n {\n // 1. Connect to the database.\n $link = connect();\n\n // 2. Protect variables to avoid any SQL injection\n $email = mysqli_real_escape_string($link, $email);\n\n // 3. Generate a query and return the result.\n $result = mysqli_query($link, \"\n SELECT id, password, salt\n FROM tbl_users\n WHERE email = '{$email}'\n \");\n\n // 4. Disconnect from the database.\n disconnect($link);\n\n // 5. If no record exists, we can stop here.\n if (!$record = mysqli_fetch_assoc($result))\n {\n return FALSE;\n }\n\n // 6. We can check that the password matches what is on record.\n $password = $record['salt'].$password;\n if (!password_verify($password, $record['password']))\n {\n return FALSE;\n }\n\n // 7. all is fine\n return $record['id'];\n }",
"public function loginIsValid( $email, $password ) {\r\n \r\n $password = sha1($password);\r\n $db = $this->getDB();\r\n if ( NULL != $db ) {\r\n $stmt = $db->prepare('select * from users where email = :emailValue and password = :passwordValue limit 1');\r\n $stmt->bindParam(':emailValue', $email, PDO::PARAM_STR);\r\n $stmt->bindParam(':passwordValue', $password, PDO::PARAM_STR);\r\n $stmt->execute();\r\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\r\n \r\n if ( is_array($result) && count($result) ) return true;\r\n }\r\n return false;\r\n }",
"public function verifyEmailAction()\n {\n $userId = $this->params()->fromRoute('userId', null);\n $token = $this->params()->fromRoute('token', null);\n\n if ($userId === null || $token === null) {\n return $this->notFoundAction();\n }\n\n $user = $this->getUserMapper()->findById($userId);\n\n if (!$user) {\n return $this->notFoundAction();\n }\n\n if ($this->userRegistrationService->verifyEmail($user, $token)) {\n // email verified\n return $this->redirectToPostVerificationRoute();\n }\n\n // email not verified, probably invalid token\n $vm = new ViewModel();\n $vm->setTemplate('ht-user-registration/user-registration/verify-email-error.phtml');\n\n return $vm;\n\n }",
"public function verifyAccount() {\n\n\t\t//Get Value of UserId from URL\n\t\t$UID = $this->MyJamiaDecrypt($this->input->get('UID'));\n\t\t//Get value of rtext from URL\n\t\t$RText = $this->input->get('rtext');\n\n\t\t$this->load->model('UserModel','UM');\n\n\t\t$data['VerificationResult'] = $this->UM->VerifyEMailAccount($UID, $RText);\n\t\t$data['UID'] = $UID;\n\n\t\t$data['message'] = 'Please set your password';\n\t\t$data['messageType'] = 'I';\n\t\t// \t$VerificationResult == 1 \t=> Passed verification\n\t\t//\t$VerificationResult == -1 \t=>\tAccount already created\n\t\t//\t$VerificationResult == 0 \t=>\tVerification failed\n\n\t\t$this->load->view('/public/SetAccountPassword',$data);\n\t}",
"static function check_login_data($email, $password) {\n global $con;\n\n // generate password hash by password and salt stored in the user table\n $password_hash = sha1(self::get_salt_by_email($email) . $password);\n unset($password); // delete password variable after useage\n \n // check how many table entries fit the email and password\n // password hash comparison with \"LIKE BINARY\" to make sure both are exactly equal\n $sql = \"SELECT COUNT(`id`) AS 'count' FROM `user` WHERE `email` LIKE '\".$email.\"' AND `password` LIKE BINARY '\".$password_hash.\"' AND `active` = 1;\";\n $query = mysqli_query($con, $sql);\n $count = mysqli_fetch_object($query)->count;\n if ($count == 0) { \n $sql = \"SELECT COUNT(`id`) AS 'count' FROM `user` WHERE `email` LIKE '\".$email.\"' AND `active` = 1;\";\n $query = mysqli_query($con, $sql);\n $count = mysqli_fetch_object($query)->count;\n if ($count == 0) {\n return 3;\n }\n return 0;\n } else { // an entry which fits email and password exists\n // check if the user has already confirmed their email address\n $sql = \"SELECT COUNT(`id`) AS 'count' FROM `user` WHERE `email` LIKE '\".$email.\"' AND `password` LIKE BINARY '\".$password_hash.\"' AND `active` = 1 AND `email_confirmed` = 0;\";\n $query = mysqli_query($con, $sql);\n $count = mysqli_fetch_object($query)->count;\n if ($count == 1) { // email has not been confirmed\n return 2;\n } else { // email has been confirmed\n return 1;\n }\n }\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 }",
"public function testEmailValidation() {\n $this->visit('http://londonce.lan/login')\n ->submitForm('Login', ['log' => 'dfdfdfd', 'password' => '11'])\n ->see('Your Username or Password has not been recognised. Please try again.');\n }",
"public function test_requires_email_password() {\n\n $this->json('POST', '/api/login')\n ->assertStatus(422);\n }",
"public function CheckEmail($email, $userId);",
"function checkLogin($db, $email, $password){\n\n\t\t// Prepare a query.\n\t\t$salt_query = $db->prepare(\"SELECT salt FROM user WHERE Email = :email\");\n\t\t$params = array(\":email\" => htmlspecialchars($email));\n\t\t$salt_query->execute($params);\n\t\n\t\t// See if anything was returned. Display an error if anything is.\n\t\tif($salt = $salt_query->fetch()){\n\t\t\n\t\t\t// Generate a hash to compare to what's in the database.\n\t\t\t$hash = hash('sha256', $salt[0] . htmlspecialchars($_POST['password']));\n\t\t\t\n\t\t\t// Compare the generated hash to the one in the database.\n\t\t\t$login_query = $db->prepare(\"\n\t\t\t\tSELECT Username FROM user\n\t\t\t\tWHERE\n\t\t\t\t\tEmail = :email\n\t\t\t\tAND\n\t\t\t\t\thash = :hash\n\t\t\t\");\n\t\t\t\n\t\t\t$params = array(\":email\" => htmlspecialchars($email),\n\t\t\t\t\t\t\t\":hash\" => $hash);\n\t\t\t\n\t\t\t// Retrieve the username.\n\t\t\t$login_query->execute($params);\n\t\t\tif($username = $login_query->fetch()){\n\t\t\t\treturn $username;\n\t\t\t}\n\t\t\t// Incorrect password.\n\t\t\telse{\n\t\t\t\t$returnInfo[\":code\"] = 1;\n\t\t\t\t$returnInfo[\":data\"] = \"Password is incorrect.\";\n\t\t\t\tdie(json_encode($returnInfo));\n\t\t\t}\n\t\t}\n\t\t// User doesn't exist.\n\t\telse{\n\t\t\t$returnInfo[\":code\"] = 1;\n\t\t\t$returnInfo[\":data\"] = \"There is no user associated with that email.\";\n\t\t\tdie(json_encode($returnInfo));\n\t\t}\n\t}",
"public function testAuthenticateEmailUser ()\n {\n $result = $this->storage->authenticateUser($this->email1, $this->signature1, $this->stringToSign1);\n $this->assertEquals($this->email1, $result['email_address']);\n }",
"public function validateUser() {\n try {\n $st = $this->con->prepare('SELECT * FROM '.DB_USER_TBL.' WHERE user=?;');\n $st->bindParam(1, $this->username);\n $st->execute();\n \n if($st->rowCount() > 0) {\n $result = $st->fetch(PDO::FETCH_ASSOC);\n \n if( md5($this->password.$result['salt']) == ($result['hash']) ){\n $_SESSION['user_auth'] = true;\n return true;\n \n } else {\n //echo 'Password is incorrect';\n throw new Exception($this->alerts->PASSWORD_WRONG);\n } \n }else{\n //echo 'Username does not exist';\n throw new Exception($this->alerts->USER_DOESNT_EXIST);\n }\n } catch(PDOException $ex) {\n $this->logs->output($ex->getMessage(), $this->alerts->DB_USER_ERROR);\n }\n }",
"public function verify(){\n \tif(is_null($this->session->userdata('username')) && is_null($this->session->userdata('password'))){\n\t\t\tredirect(base_url());\n\t\t}\n\t\telse{\n\t\t\tif($this->admin_model->verify_user($this->session->userdata('username'),$this->session->userdata('password'))==false){\n\t\t\t\tredirect(base_url());\n\t\t\t}\n\t\t}\n }",
"public function verifyPassword (string $hash, string $password): bool;",
"public function validatePassword(User $user, $password);",
"function isEmailAndPasswordRegistered ($email,$password) {\n $connect = $GLOBALS['connect'];\n $password = md5 ($password);\n $queryCheck = \"SELECT * FROM user WHERE email = '$email' AND password = '$password'\";\n \n $mysqlQueryCheck = mysqli_query ($connect,$queryCheck);\n \n if (mysqli_affected_rows ($connect)){\n \n // Save to database\n \n return true;\n \n }\n else {\n \n echo false;\n \n }\n}",
"public function check_user($email,$password)\n\t{\n\t\t$query=\"SELECT * FROM users \n\t\t\t\tWHERE users.email=? \n\t\t\t\tAND users.password=?\";\n\t\t$values=array($email,md5($password));\n\t\t$check=$this->db->query($query,$values)->row_array();\n\t\tif(empty($check))\n\t\t{\n\t\t\t//*no user has been found. ok to create//\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"public function login(string $email, string $password);",
"public function checkUserPassword()\n\t{\n\t\tself::authenticate();\n\n\t\t$uname = FormUtil::getPassedValue('user', null);\n\t\t$pass = FormUtil::getPassedValue('up', null);\n\n\t\tif($uname == null) {\n\t\t\treturn self::retError('ERROR: No user name passed!');\n\t\t}\n\t\tif($pass == null) {\n\t\t\treturn self::retError('ERROR: No up 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\tif(FormUtil::getPassedValue('viaauthcode', null, 'POST') != null) {\n\t\t\t\t\t\t$authcode = unserialize(UserUtil::getVar('owncloud_authcode', $user['uid']));\n\t\t\t\t\t\tif($authcode['usebefore'] >= new DateTime('NOW') &&\n\t\t\t\t\t\t\t$authcode['authcode'] == $pass) {\n\t\t\t\t\t\t\t\t$return = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$return = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$authenticationMethod = array(\n\t\t\t\t\t\t\t'modname' => 'Users' ///TODO\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (ModUtil::getVar(Users_Constant::MODNAME, Users_Constant::MODVAR_LOGIN_METHOD, Users_Constant::DEFAULT_LOGIN_METHOD) == Users_Constant::LOGIN_METHOD_EMAIL) {\n\t\t\t\t\t\t\t$authenticationMethod['method'] = 'email';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$authenticationMethod['method'] = 'uname';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$authenticationInfo = array(\n\t\t\t\t\t\t\t'login_id' => $uname,\n\t\t\t\t\t\t\t'pass' => $pass\n\t\t\t\t\t\t);\n\t\t\t\t\t\t//try to login (also for the right output)\n\t\t\t\t\t\tif(UserUtil::loginUsing($authenticationMethod, $authenticationInfo, false, null, true) == true) {\n\t\t\t\t\t\t\t$return = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$return = false;\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} else {\n\t\t\t$return = false;\n\t\t}\n\t\treturn self::ret($return);\n\t}",
"public static function authorizeUser($email)\n {\n $isCommit = FALSE;\n $conn = new MySqlConnect();\n $ts = $conn -> getCurrentTs();\n\n $updateSql = \"UPDATE Users\";\n $updateSql .= \" SET isValidated = 'YES'\";\n $updateSql .= \" WHERE emailAddress = '{$email}'\";\n\n // update existing user record in the database\n $isCommit = $conn -> executeQuery($updateSql);\n $conn -> freeConnection();\n\n return $isCommit;\n }",
"function confirmUser($userEmail, $password, $remember){\n\t\n\t//First check if:\n\t//1) Cookies were set and valid\n\t//2) And if password field unchanged (contains only asterisks eg. '***')\n\t//return 1 for success to log user in\n\tif (checkCookie($remember)==1 && preg_match('/^\\**$/', $password)){\n\t\treturn 1;\n\t}\n\t//else continue as normal if:\n\t//1) cookies not set or invalid\n\t//2) user changed value in password field\n\t\n\t//Create prepared mysqli statement to prevent hacking by injection\n\tglobal $mysqli;\n\t\n\tif ($stmt = $mysqli->prepare(\"SELECT `Password`,`Enabled` FROM `Patient` WHERE `Email` = ?\")) {\n\t\t$stmt->bind_param('s', $userEmail);\t// Bind our param as string\n\t\t$stmt->execute();\t\t\t\t\t// Execute the prepared Statement\n\t\t$stmt->bind_result($dbPassword, $userEnabled); \t//Bind result\n\t\t$stmt->fetch();\t\n\t\t\n\t\tif (empty($dbPassword)){\n \t\treturn 3; //Username failure\n\t\t}\n\t\telse{\t\t\t\n\t\t\tif ($userEnabled == '0')\n\t\t\treturn 4; //User not enabled\n\t\t\telse if( validate_password($password, $dbPassword))\n\t\t\treturn 1; //Success! Username and password confirmed\n\t\t\telse\n\t\t\treturn 2; //Password failure\t\n\t\t}\n\t\t$stmt->close();\t// Close the statement\n\t}\n\telse{\n\t\t\t//echo \"error \" .$mysqli->error;\n\t\t\treturn 0; //Database call error\n\t}\n}",
"public function validUser();",
"public function verify(){\n\t\t// getting the username and code from url\n\t\t$code=$_GET['c'];\n\t\t$user=$_GET['u'];\n\t\t// load the regmod model\n\t\t$this->load->model('regmod');\n\t\t// calling the function Vemail that check the valodation code with the username\n\t\t$flag=$this->regmod->Vemail($user,$code);\n\t\t// checking the Vemail the respond\n\t\tif($flag)\n\t\t\t{$data['res']= \"You have successfully verified your email. You may login to Hungry.lk with your username and password\";}\n\t\telse\n\t\t\t{$data['res']= \"Opps An error occurred in our system, try again later\";}\n\t\t$this->load->view(\"register_status_view\",$data);\n\t}",
"function check_user_existance($data, $mail, $passwd = null) {\n if ($data === false)\n return false;\n\tforeach ($data as $user) {\n\t\tif ($user['user'] === $mail) {\n\t\t\tif ($passwd !== null) {\n\t\t\t\tif (password_verify($passwd, $user['passwd']) == true) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}",
"public function verifyUser($token)\n {\n $verifyUser = VerifyUser::where('token', $token)->first();\n if (isset($verifyUser)) {\n $user = $verifyUser->user;\n if (!$user->isVerified) {\n $verifyUser->user->isVerified = 1;\n $verifyUser->user->save();\n $status = \"Your e-mail is verified. You can now login.\";\n } else {\n $status = \"Your e-mail is already verified. You can now login.\";\n }\n } else {\n return redirect('/message')->with('warning', \"Sorry your email cannot be identified.\");\n }\n\n return redirect('/message')->with('status', $status);\n }",
"public function check_verify_get($email){\n\t\tif(!empty($email)){\n\t\t\t$q = $this->db->where('email',$email)->where('verified',1)->get('users')->result();\n\t\t\tif(count($q)>0){\n\t\t\t\t$this->response(['Verified.'], REST_Controller::HTTP_OK);\n\t\t\t}else{\n\t\t\t\t$this->response(['Not Verified.'], '500');\n\t\t\t}\n\t\t}else{\n\t\t\t$this->response(['Too few arguments'], '500');\n\t\t}\n\t}",
"public function check($information) {\n $user = Users::findFirstByEmail($information['email']);\n if ($user == false) {\n //$this->registerUserThrottling(0);\n throw new PhalconException('Wrong email/password combination');\n }\n\n // Check the password\n if (!$this->security->checkHash($information['password'], $user->password)) {\n //$this->registerUserThrottling($user->id);\n throw new PhalconException('Wrong email/password combination');\n }\n\n // Check if the user was flagged\n //$this->checkUserFlags($user);\n\n // Register the successful login\n //$this->saveSuccessLogin($user);\n\n // Check if the remember me was selected\n /*if (isset($information['remember'])) {\n $this->createRememberEnvironment($user);\n }*/\n\n $this->session->set('auth-identity', [\n 'id' => $user->id,\n 'name' => $user->name,\n 'permission' => $user->permission\n ]);\n }",
"public function ValidateUser($email, $password)\n\t {\n\t\t$encPassword=ViewHelper::Encrypt($email,$password);\n\t\t$sql = \"SELECT userid,role FROM user \"\n\t\t\t\t. \" WHERE password = '\" . $encPassword . \"'\"\n\t\t\t\t. \" AND email = '\" . $email . \"'\"\n\t\t\t\t. \" AND islocked='0'\"\n\t\t\t\t. \" AND isactive='1'\";\n\t\t\t\t//print_r($sql);\n \n\t\ttry\n\t\t{\n\t\t\t$result= parent::query($sql);\n\t\t\t//returns a multidimensional array \n\t\t\t//so take the count from first position\n\t\t\t//\tif ($result[0]['count']>0) // for Sqlite\n\t\t\t//print_r($result[0]->userid);\n\t\t\tif (empty($result))\n\t\t\t{ $retVal='0';}\t\t\t\n\t\t\telse if (strlen($result[0]['userid']) >0){\n\t\t\t\t$retVal['userid']= $result[0]['userid'];\n\t\t\t\t$retVal['role']=$result[0]['role'];\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$retVal= '0';\n\t\t\t}\n\t\t}catch(AppException $e)\n\t\t{\n\t\t\t$retVal='0';\n\t\t\techo $e->getMessage();\n\t\t}\n\t\t\t\t\n\t\treturn $retVal;\n\n }",
"public function getUserByEmailAndPassword($email, $password) {\r\n $result = mysql_query(\"SELECT * FROM users WHERE email = '$email'\") or die(mysql_error());\r\n // check for result \r\n $no_of_rows = mysql_num_rows($result);\r\n if ($no_of_rows > 0) {\r\n $result = mysql_fetch_array($result);\r\n $salt = $result['salt'];\r\n $encrypted_password = $result['encrypted_password'];\r\n $hash = $this->checkhashSSHA($salt, $password);\r\n // check for password equality\r\n if ($encrypted_password == $hash) {\r\n // user authentication details are correct\r\n return $result;\r\n }\r\n } else {\r\n // user not found\r\n return false;\r\n }\r\n }",
"public function checkSignIn($email , $pass){\r\n $user_select = $this->selectUser($email);\r\n $hased_password = $user_select['hased_password'];\r\n\r\n /* * this function >>> password_verify($pass , $hased_password) will return boolean value\r\n * if the return (value = true or 1) that is mean that the passwords are matches\r\n * if the return (value = false or 0) that is mean that the passwords are not matches */\r\n $check_password = password_verify($pass , $hased_password); \r\n\r\n if($user_select && $check_password){\r\n $session = new Session; // create object from Session Class\r\n $session->setSessionItem('name',$user_select['name']);\r\n $session->setSessionItem('id', $user_select['id']);\r\n header(\"location:index.php\");\r\n } else {\r\n echo \" <div class='container'>\r\n <p class='alert alert-danger'>Sorry the user email or password is wrong</p>\r\n </div>\";\r\n }\r\n }",
"public function verify(){\n\t\t$email = $this->input->get('email');\n\t\t$token = $this->input->get('token');\n\n\t\t$user = $this->db->get_where('user',['email' =>$email])->row_array();\n\n\t\tif ($user) {\n\t\t\t$user_token = $this->db->get_where('user_token',['token' => $token])->row_array();\n\t\t\tif ($user_token) {\n\t\t\t\t\n\t\t\t\t$this->db->set('is_active',1);\n\t\t\t\t$this->db->where('email', $email);\n\t\t\t\t$this->db->update('user');\n\t\t\t\t$this->db->delete('user_token',['email'=>$email]);\n\n\t\t\t\t// kalo token nya gak ada\n\t\t\t\t$this->session->set_flashdata('message','<div class=\"alert alert-success\" role=\"alert\">'.$user['email'].' Success Activated!</div>');\n\t\t\t\tredirect('auth');\n\n\t\t\t}else{\n\t\t\t\t// kalo token nya gak ada\n\t\t\t\t$this->session->set_flashdata('message','<div class=\"alert alert-danger\" role=\"alert\">Wrong Token</div>');\n\t\t\t\tredirect('auth');\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\t$this->session->set_flashdata('message','<div class=\"alert alert-danger\" role=\"alert\">Account activation failed! Wrong email</div>');\n\t\t\tredirect('auth');\n\t\t}\n\t}",
"public function validation($data)\n {\n \t$this->load->library('encrypt');\n\t\t$user = $this->db->select('email, password, status_register')->where('email', $data['email'])->get('ec_client')->result_array();\n if (count($user) > 0) {\n\t\t\t\t$password_decode = $this->encrypt->decode($user[0]['password']);\n\t\t\t\t\tif ($password_decode == $data['password']) {\n\t\t\t\t\t\tif ($user[0]['status_register'] == 0) {\n return 2;\n }\n return 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn 0; # Usuario o clave de acceso incorrectos\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn 0; # Usuario o clave de acceso incorrectos\n\t\t\t}\n }",
"function verifyUser($email,$pwd){\r\n\t\t$conn = new mysqli('localhost','northoft_labtech','lab7007','northoft_petlabs') or die(\"This is an error connecting\".mysql_error());\r\n\t\t\r\n\t\t$sql = \"select salt,pwd,hospital_id, fname,lname,client_id,employee from client WHERE email = ? AND isActive = '1'\";\r\n\t\t\r\n\t\tif($stmt = $conn->prepare($sql)){\r\n\t\t\t\r\n\t\t\t$stmt->bind_param('s', $email);\r\n\t\t\t$stmt->bind_result($salt,$storedPwd,$hospital_id,$fname, $lname,$client_id,$employee);\r\n\t\t\t$stmt->execute();\r\n\t\t\t$stmt->fetch();\r\n\t\t\t\r\n\t\t\tif (sha1($pwd.$salt)==$storedPwd){\r\n\t\t\t\r\n\t\t\t\t$_SESSION['clientID'] = $client_id;\r\n\t\t\t\t$_SESSION['hospitalID'] =$hospital_id;\r\n\t\t\t\t$_SESSION['client_fn'] = $fname;\r\n\t\t\t\t$_SESSION['client_ln']=$lname;\r\n\t\t\t\t$_SESSION['employee']=$employee;\t\r\n\t\t\t\t$_SESSION['email'] = $email;\r\n\t\t\t\t$_SESSION['start']=time();\t\r\n\t\t\t\treturn true;\r\n\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t}",
"function verifyUser($email, $hash){\n\t$conn = connectViaMysql();\n\t$email = mysqli_real_escape_string($conn,$email);\n\t$loginInfo = mysqli_real_escape_string($conn,$hash);\n\n\t$temp = $loginInfo;\n\techo \" <br><br><p>temp = : \". $temp . \"</p>\";\n\t$success = false;\n\ttry{\n\n\t\t$checkQuery = \"SELECT hash FROM users WHERE email='\".$email.\"' AND hash='\".$loginInfo.\"' AND active='0'\";\n\t\t$search = mysqli_query($conn, $checkQuery) or die(mysqli_error($conn)); \n\t\t$match = mysqli_num_rows($search);\n\n\t\tif($match > 0){\n\t\t\t// We have a match, activate the account\n\t\t\t$success = true;\t\n\t\t}else{\n\t\t\t$success = \"Invalid approach, please use the link that has been send to your email.\";// No match -> invalid url or account has already been activated.\n\t\t}\n\t}\n catch(PDOException $e){\n echo 'Error: ' . $e->getMessage();\n }\n\tmysqli_close($conn);\n\treturn $success;\n}",
"function email_and_password_exists($db, $email, $password)\n{\n\t$password = md5($password);\n\t$sql = \"SELECT * FROM users where email=:email and password=:password\";\n\t$st = $db->prepare($sql);\n\t$st->execute(array(':email'=>$email, ':password'=>$password));\n\t$us = $st->fetchAll();\n\treturn (count($us) >= 1);\n}",
"public function verify_login($email){\n\t\t//a query to get all login information base on email\n\t\t$sql = \"SELECT * FROM ulogin WHERE customer_email ='$email'\";\n\n\t\t//execute the query\n\t\treturn $this->query($sql);\n\t}",
"public function authenticate()\n\t{\n\t\tif ($this->hasErrors())\n return; // There are errors already\n\t\t\n $identity = $this->getIdentity();\n if ($identity->ok)\n return; // Authenticate successfully\n \n if (!YII_DEBUG) {\n $this->addError('password','Incorrect email or password.');\n\n } else {\n switch ($identity->errorCode) {\n case UserIdentity::ERROR_USERNAME_INVALID:\n $this->addError('email', 'Invalid email.');\n break;\n\n case UserIdentity::ERROR_PASSWORD_INVALID:\n $this->addError('email', 'Invalid password.');\n break;\n\n default:\n $this->addError('password', 'Unknown UserIdenitity error.');\n break;\n }\n }\n\t}",
"public function testLoginSubmissionRightEmailAndWrongPassword()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/login')\n ->type('txt-email', '[email protected]')\n ->type('txt-password', 'wrongpassword123')\n ->press('Sign in')\n ->assertSee('Invalid credentials entered.');\n });\n }",
"public function passwordCheck($field, $value, $parameters){\n\t\tif(!Auth::validate(array('email' => Input::get('email'), 'password' => Input::get('password')))) {\n\t\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}",
"function validateUser($username, $password) {\r\n $sql = $this->db->prepare(\"SELECT password FROM USER WHERE email=:user_name\");\r\n if($sql->execute(array('user_name' => $username))) {\r\n $row = $sql->fetch(PDO::FETCH_ASSOC);\r\n if(password_verify($password, $row['password']))\r\n return $username;\r\n }\r\n return false;\r\n }",
"function Verify($data, $dontSave = false)\n {\n if (!isset($data['Password']) || !isset($data['Name']))\n return false;\n \n \n $name = $data['Name'];\n $user = User::Schema()->ByName($name);\n if ($user)\n {\n $password = $data['Password'];\n $pwHash = hash('sha256', $password . $user->GetPasswordSalt());\n if ($pwHash == $user->GetPassword())\n {\n if (!$dontSave)\n {\n $this->user = $user;\n $_SESSION[self::$sessionParam] = $this->user->GetID();\n }\n return true;\n }\n }\n return false;\n }",
"public function authenticate()\n {\n /* authenticate if the login credentials are correct */\n $db = Sweia::getInstance()->getDB();\n $args = array(\n \":email\" => $this->getEmail(),\n \":password\" => $this->password\n );\n $sql = \"SELECT email,uid FROM \" . SystemTables::DB_TBL_USER . \" WHERE email = ':email' AND password = ':password' AND status != 4 LIMIT 1\";\n $res = $db->query($sql, $args);\n if ($res && $db->resultNumRows($res) == 1)\n {\n $data = $db->fetchObject($res);\n $this->uid = 1;\n return true;\n }\n\n return false;\n }",
"public static function check_credentials($email_or_username, $password)\n {\n\n\n $password = Security::encrypt($password);\n\n $email_or_username = e($email_or_username);\n\n\n $sql = \"SELECT\n id, user_type\n FROM\n users\n WHERE\n password = '{$password}'\n AND(\n email = '{$email_or_username}'\n OR\n username = '{$email_or_username}')\n AND\n deleted = 0\n LIMIT\n 1\";\n\n\n return DB::query($sql);\n\n\n }",
"function isEnteredCorrectPassword($email, $password, $db) {\r\n\t$customerResult = $db->findCustomer($email);\r\n\tif ($customerResult->getRowCount() < 1) {\r\n\t\tdie (\"Couldn't find customer when checking password.\");\r\n\t} else if ($customerResult->getRowCount() > 1) {\r\n\t\tdie(\"More than one customer when checking password\");\r\n\t} else {\r\n\t\t$customer = $customerResult->getFirstRow();\r\n\t\t$correctPassword=$customer['password'];\r\n\t\tif ($correctPassword === $password) {\r\n\t\t\t$factory = new CustomerFactory($db);\r\n\t\t\t$customerObject = $factory->getCustomer($email);\r\n\t\t\t$_SESSION['customer'] = $customerObject;\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\tdie(\"Wrong password entered!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n}",
"function validateAndSend($user_email){\n\t\t\t$userPassword = $this->manage_content->getValue_email('owner_info','password','owner_email',$user_email);\n\t\t\tif(isset($userPassword[0]['password']))\n\t\t\t{\t\n\t\t\t\t$message = \"Your password for the account is\".$userPassword[0]['password'];\n\t\t\t\t$mailsent = $this->mail_function->sendMail($user_email,$message,$user_email);\n\t\t\t\treturn $mailsent;\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn \"Invalid user.\";\n\t\t\t}\n\n\t\t}",
"private function testUser($email) {\r\n\t\t$verifiedEmails = Configure::read('Shop.email');\r\n\t\tif(in_array($email, $verifiedEmails)) {\r\n\t\t\t$this->Session->write('admin', 1);\r\n\t\t\t$this->BsRedirect('Logged in');\r\n\t\t} else {\r\n\t\t\tdie('Not a valid email address');\r\n\t\t}\r\n }",
"function validate_cred($email_local = null, $password_local = null){\n global $email;\n global $pwd;\n if ($email_local != null && $password_local != null){\n \n }\n else{\n $email_local = isset($_REQUEST[$email]) ? $_REQUEST[$email] : null;\n $password_local = isset($_REQUEST[$pwd]) ? $_REQUEST[$pwd] : null;\n \n }\n\n if ($email_local != null && $password_local != null){\n $conn = open_db_connection('localhost', ['new_user','Redbirdp1'], 'login');\n if ($conn ->connect_errno){\n echo('connection failed: ' . $conn->connect_error);\n }\n $statement = new Statement();\n // $statement->select([\"*\"])->from()->table(\"members\")->where(\"username\")->equals($email_local);\n $statement->select([\"*\"])->from()->table(\"members\");\n //echo $statement->get_statement();\n $result = query_db($conn, $statement);\n \n if ($result != null)\n {\n if ($result->num_rows > 0) {\n // output data of each row\n $flag = false;\n while($row = $result->fetch_row()) {\n //echo \"<br>\". $row;\n //echo \"<br>\" . $email_local . \" \" . $password_local;\n //echo \"<br>\" . $row[0];\n //echo \"<br>\" . $row[1];\n if ($row[0] == $email_local && $row[1] == $password_local){\n $flag = true;\n break;\n }\n }\n if ($flag){\n return true;\n }\n else{\n return false;\n }\n } else {\n echo \"0 results\";\n }\n return true;\n }\n echo '<br>Authentificaiton failed not a valid user';\n return true;\n }\n\n return false;\n\n}",
"function authenticate($sEmail, $sPwd)\r\n {\r\n // Create query\r\n $sSQL = \"SELECT 1 FROM \".users.\" WHERE \".email.\"=\".sFix($sEmail).\" AND \".pwd.\"=\".sFix($sPwd);\r\n $selection = mysql_query($sSQL);\r\n if($row = mysql_fetch_array($selection))\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }",
"static function validate($param = [], $options = [])\n\t{\n\n\t\t//default fields is email and password, but may be overridden via options array\n\t\t$password = isset($options['password']) ? $options['password'] : 'password';\n\n\t\t$check_array = [];\n\t\t$check_sql = \"1\";\n\t\tforeach ($param as $key => $item) {\n\t\t\tif ($key != $password) {\n\t\t\t\t$check_array[\":$key\"] = $item;\n\t\t\t\t$check_sql .= \" AND $key = :$key \";\n\t\t\t}\n\t\t}\n\n\t\t$user = DB::findOne('users', $check_sql, $check_array);\n\n\t\tif ($user && password_verify($param[$password], $user->$password)) {\n\t\t\tif($user->group > 0) {\n\t\t\t\t$user['rights'] = self::loadRights((int)$user->group);\n\t\t\t}\n\t\t\tself::$user = $user;\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"function verify_email()\n\t{\n\t\tlog_message('debug', 'Account/verify_email');\n\t\t$data = filter_forwarded_data($this);\n\t\t$data['msg'] = get_session_msg($this);\n\t\tlog_message('debug', 'Account/verify_email:: [1] post='.json_encode($_POST));\n\t\t# skip this step if the user has already verified their email address\n\t\tif($this->native_session->get('__email_verified') && $this->native_session->get('__email_verified') == 'Y'){\n\t\t\tredirect(base_url().'account/login');\n\t\t}\n\n\t\t# otherwise continue here\n\t\tif(!empty($_POST['emailaddress'])){\n\t\t\t$response = $this->_api->post('account/resend_link', array(\n\t\t\t\t'emailAddress'=>$this->native_session->get('__email_address'),\n\t\t\t\t'baseLink'=>base_url()\n\t\t\t));\n\n\t\t\t$data['msg'] = (!empty($response['result']) && $response['result']=='SUCCESS')?'The verification link has been resent':'ERROR: The verification link could not be resent';\n\t\t}\n\n\t\t$data = load_page_labels('sign_up',$data);\n\t\t$this->load->view('account/verify_email', $data);\n\t}",
"function isPassCorrect($request){\n $name = $request[\"name\"];\n $pass = $request[\"pass\"];\n global $dbName, $dbPass;\n $mysqli = mysqli_connect(\"localhost\", $dbName, $dbPass, \"[Redacted]\") \n or die(mysql_error());\n $query = mysqli_query($mysqli, \"SELECT hash FROM Users WHERE name='$name' \");\n \n if (mysqli_num_rows($query) > 0) {\n if(password_verify($pass,mysqli_fetch_assoc($query)[\"hash\"])){\n return [True, \"$name\"];\n }else {\n return [False, \"Doesn't match\"];\n }\n } else {\n return [False, \"No user\"];\n }\n}",
"public function testAuthenticateUserEmailFalse ()\n {\n try {\n $this->storage->authenticateUser('milan@magudia', $this->signature1, $this->stringToSign1);\n } catch (InvalidArgumentException $e) {\n $this->assertEquals('$email address is not valid', $e->getMessage());\n return;\n }\n $this->fail('An expected exception has not been raised.');\n }",
"public function password_verifies() {\n\t\treturn AuthComponent::password($this->data[$this->alias]['old_password']) === $this->data[$this->alias]['password'];\n\t}",
"public function verify();",
"public function isValidUser($email, $passwd) {\n\t\t$stmt = $this->db->prepare(\"SELECT count(email) FROM users where email=? and passwd=?\");\n\t\t$stmt->execute(array($email, $passwd));\n\n\t\tif ($stmt->fetchColumn() > 0) {\n\t\t\treturn true;\n\t\t}\n\t}",
"public function testGetValidUserByEmail(): void {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"user\");\n\t\t$userId = generateUuidV4();\n\n\t\t$user = new User($userId, $this->VALID_ACTIVATION, $this->VALID_USEREMAIL, $this->VALID_HASH, $this->VALID_USERNAME);\n\t\t$user->insert($this->getPDO());\n\t\t// Grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoUser = User::getUserByUserEmail($this->getPDO(), $user->getUserEmail());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"user\"));\n\t\t$this->assertEquals($pdoUser->getUserId(), $userId);\n\t\t$this->assertEquals($pdoUser->getUserActivationToken(), $this->VALID_ACTIVATION);\n\n\t\t$this->assertEquals($pdoUser->getUserEmail(), $this->VALID_USEREMAIL);\n\t\t$this->assertEquals($pdoUser->getUserHash(), $this->VALID_HASH);\n\t\t$this->assertEquals($pdoUser->getUserName(), $this->VALID_USERNAME);\n\t}",
"function login() {\n\n // Validate user input\n $this->s_email = testInput($this->s_email);\n $this->s_password = testInput($this->s_password);\n\n // Fetch data from db with given email\n $result = $this->conn->query(\"SELECT * FROM $this->tableName WHERE s_email LIKE '$this->s_email'\");\n\n // Check that student exists in database\n if ($result->rowCount() === 1) {\n\n // Fetch user record from result\n $user = $result->fetch();\n\n // Check password match\n if (password_verify($this->s_password, $user[\"s_password\"])) {\n return true;\n }\n // Passwords do not match\n else {\n return false;\n }\n }\n // User with given email not in database\n else {\n return false;\n }\n }",
"static function password_expired_email() {\n $model = \\Auth::$model;\n $user = $model::requested();\n\n if (!$user->nil()) {\n if ($user->validate()) {\n\n password_expired_email($user) ?\n flash(\"Enviamos um e-mail para <small><b>$user->email</b></small> com as instruções para você criar uma nova senha.\") :\n flash('Não foi possível lhe enviar o e-mail. Por favor, tente novamente mais tarde.', 'error');\n\n go('/');\n } else {\n flash('Verifique os dados do formulário.', 'error');\n }\n }\n\n globals('user', $user);\n }",
"public static function checkUser($email, $password)\n\t{\n\t\tif (!$email || !$password) return Common::formatMsg(-1, '用户名或密码为空.');\n\t\t$userInfo = self::getUserByEmail($email);\n\t\tif (!$userInfo) return Common::formatMsg(-1, '用户不存在.');\n\t\t$password = self::_password($password, $userInfo['hash']);\n\t\tif ($password != $userInfo['password']) return Common::formatMsg(-1, '当前密码不正确.');\n\t\tif ($userInfo['is_lock']) return Common::formatMsg(-1, '当前用户被锁定.');\n\t\treturn Common::formatMsg(0, '成功.', $userInfo);\n\t}",
"static function confirm_account_email() {\n $model = \\Auth::$model;\n $user = $model::requested();\n\n if (!$user->nil()) {\n if ($user->validate()) {\n $code = confirm_account_email($user->email);\n\n if ($code === -1) {\n flash('Sua conta já está confirmada, basta acessá-la.', 'warning');\n } else if ($code == true)\n flash(\"Enviamos um e-mail para <small><b>$user->email</b></small> com as instruções para você confirmar sua conta.\");\n else\n flash('Não foi possível lhe enviar o e-mail. Por favor, tente novamente mais tarde.', 'error');\n\n go('/');\n } else {\n flash('Verifique os dados do formulário.', 'error');\n }\n }\n\n globals('user', $user);\n }",
"function validate_login(array $filtered_input, array &$form): bool\n{\n if (App::$db->getRowWhere('users', [\n 'email' => $filtered_input['email'],\n 'password' => $filtered_input['password']\n ])) {\n return true;\n }\n\n $form['error'] = 'Unable to login: please check your password';\n\n return false;\n}",
"public function verifyPassword($attribute,$params)\n {\n if(!$this->hasErrors())\n {\n if(User::model()->exists('username = :username AND password = :password',array(':username'=>$this->username,':password'=>$this->password)))\n $this->addError('password','Incorrect password');\n }\n }",
"public function getUserByEmailAndPassword($email, $password) {\n\t\n\t\n $result = mysql_query(\"SELECT * FROM users2 WHERE email = '$email'\") or die(mysql_error());\n // check for result\n $no_of_rows = mysql_num_rows($result);\n if ($no_of_rows > 0) {\n $result = mysql_fetch_array($result);\n // check for password equality\n if ($password == $password) {\n // user authentication details are correct\n return $result;\n }\n } else {\n // user not found\n return false;\n }\n }",
"public function canLogin()\n {\n $email = $this->getEmail();\n $password = $this->getPassword();\n $conn = Db::getInstance();\n $statement = $conn->prepare(\"SELECT * FROM users WHERE email = :email\");\n $statement->bindValue(\":email\", $email);\n $statement->execute();\n $user = $statement->fetch();\n $hash = $user[\"password\"];\n\n if (!$user) {\n return false;\n }\n\n // use password_verify() to verify your user\n // this function should return true or false and nothing else\n if (password_verify($password, $hash)) {\n return true;\n } else {\n return false;\n }\n }",
"public function testLoginSubmissionWrongEmailAndPassword()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/login')\n ->type('txt-email', '[email protected]')\n ->type('txt-password', 'wrongpassword123')\n ->press('Sign in')\n ->assertSee('Invalid credentials entered.');\n });\n }",
"public function checkCredentials(string $email, string $password): void\n {\n // Find user record with given email\n try {\n $user = $this->userRepository->getFirst(['email' => $email]);\n } catch(ModelNotFoundException $e) {\n throw new InvalidEmailOrPasswordException();\n }\n\n $this->checkPassword($user, $password);\n $this->checkAccountVerified($user);\n $this->checkBlockThresholdExceeded($user);\n $this->resetLoginFailCount($user);\n $this->rehashPassword($user, $password);\n }",
"protected function _validateAccount() {\n\t\tif(!check($this->_username)) return;\n\t\tif(!check($this->_password)) return;\n\t\t$data = array(\n\t\t\t'username' => $this->_username,\n\t\t\t'password' => $this->_password\n\t\t);\n\t\tif($this->_md5Enabled) {\n\t\t\t$query = \"SELECT * FROM \"._TBL_MI_.\" WHERE \"._CLMN_USERNM_.\" = :username AND \"._CLMN_PASSWD_.\" = [dbo].[fn_md5](:password, :username)\";\n\t\t} else {\n\t\t\t$query = \"SELECT * FROM \"._TBL_MI_.\" WHERE \"._CLMN_USERNM_.\" = :username AND \"._CLMN_PASSWD_.\" = :password\";\n\t\t}\n\t\t\n\t\t$result = $this->db->queryFetchSingle($query, $data);\n\t\tif(!is_array($result)) return;\n\t\t\n\t\treturn true;\n\t}",
"public function authenticate() {\n if ($this->email == null || $this->password == null) {\n return new Result(Result::FAILURE);\n }\n $UserMapper = $this->getServiceLocator()->get(\"Profond\\Mapper\\User\");\n $UserMapper->setServiceLocator($this->getServiceLocator());\n $User = $UserMapper->getOneUserByEmail($this->email);\n if ($User != null) {\n if ($this->password == $User->getPassword()) {\n return new Result(Result::SUCCESS, $User);\n } else {\n return new Result(Result::FAILURE_CREDENTIAL_INVALID, null);\n }\n } else {\n return new result(Result::FAILURE_IDENTITY_NOT_FOUND, null);\n }\n }"
] | [
"0.7814631",
"0.76163906",
"0.735944",
"0.7170459",
"0.7162064",
"0.7014756",
"0.70012903",
"0.69483626",
"0.6899576",
"0.68399197",
"0.6817929",
"0.67955005",
"0.6782092",
"0.67759854",
"0.67719537",
"0.6723582",
"0.6704876",
"0.66968316",
"0.6692527",
"0.66865396",
"0.66845274",
"0.6618882",
"0.66050684",
"0.6601169",
"0.6585747",
"0.65754765",
"0.65684694",
"0.6567144",
"0.6565189",
"0.65315294",
"0.6521242",
"0.6519028",
"0.6517993",
"0.65092814",
"0.6506592",
"0.6493354",
"0.6491496",
"0.64863795",
"0.6460151",
"0.64478225",
"0.6436857",
"0.642414",
"0.64192444",
"0.6413238",
"0.6393893",
"0.63914526",
"0.63898116",
"0.6381533",
"0.63772464",
"0.6363375",
"0.6362515",
"0.6352263",
"0.63508224",
"0.6332666",
"0.6321388",
"0.63186014",
"0.631061",
"0.6307724",
"0.62996626",
"0.62980473",
"0.62979233",
"0.62954557",
"0.6293409",
"0.62828743",
"0.6279745",
"0.6279611",
"0.62783974",
"0.62722087",
"0.62691516",
"0.62654305",
"0.6262353",
"0.6260265",
"0.6259666",
"0.62587184",
"0.6255165",
"0.62417567",
"0.6236423",
"0.6235028",
"0.623091",
"0.6227219",
"0.6224583",
"0.62177193",
"0.6213159",
"0.62124217",
"0.62043864",
"0.61938566",
"0.61878914",
"0.6183688",
"0.61773837",
"0.6174804",
"0.6164755",
"0.6162106",
"0.61471456",
"0.6143508",
"0.6137856",
"0.6135676",
"0.6134193",
"0.6129986",
"0.6127691",
"0.6126244"
] | 0.61944145 | 85 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.