Exemple #1
0
<?php

session_start();
session_name("ssphcm");
require_once "../config.php";
require_once "../class/lib_funciones.php";
idleLogin($_SESSION['timestamp'], IDLE_TIMES);
$response = array('error' => false, 'success' => false, 'mensaje' => '', 'data_object' => array(), 'autorize' => false);
if (!isset($_SESSION['timestamp'], $_SESSION['autorizado'], $_SESSION['id_usuario'])) {
    try {
        if (isset($_POST['login'], $_POST['clave']) && !empty($_POST['login']) && !empty($_POST['clave'])) {
            $objConex = new Conexionbd();
            $sql = "SELECT cod_user, password FROM usuario WHERE login=?";
            if ($stmt = $objConex->prepare($sql)) {
                $stmt->bind_param('s', $_POST['login']);
                $stmt->execute();
                $result = $stmt->get_result();
                $response['success'] = true;
                $response['mensaje'] = "Opps, nombre de usuario no existe";
                if ($result->num_rows == 1) {
                    $rows = $result->fetch_object();
                    if ($rows->password != md5(sha1(trim($_POST['clave'])))) {
                        $response['mensaje'] = "Opps, la clave que indico es incorrecta";
                    } else {
                        $response['mensaje'] = "";
                        $response['autorize'] = $_SESSION['autorizado'] = true;
                        $_SESSION['id_usuario'] = $rows->cod_user;
                        $_SESSION['timestamp'] = time();
                    }
                }
                $stmt->close();
Exemple #2
0
        $this->SetFont('Arial', 'B', 10);
        $this->Cell(0, 4, 'CONTRATO DE AFILIACION PARA LA PRESTACION DE SERVICIOS DE SALUD', 0, 1, 'C');
    }
    public function Footer()
    {
        $this->SetY(-8);
        $this->SetFont('Arial', 'I', 7);
        $this->Cell(0, 4, 'SOFTHCM -FUNDAMUTUAL' . $this->PageNo() . '/{nb}', 0, 1, 'R');
        $this->Cell(0, 4, 'EL PRESENTE CONTRATO TIENE VIGENCIA DESDE EL 01-01-2013 HASTA EL 31-12-2013', 0, 0, 'C');
    }
}
if (isset($_GET['codigo']) && !empty($_GET['codigo'])) {
    try {
        require_once "../config.php";
        require_once "../class/lib_funciones.php";
        $objConnex = new Conexionbd();
        $objFamiliar = new Familiar();
        $sql = call_user_func(array($objFamiliar, "contrato"));
        $stmt = $objConnex->stmt_init();
        if ($stmt->prepare($sql)) {
            $stmt->bind_param('i', $_GET['codigo']);
            $stmt->execute();
            $result = $stmt->get_result();
            if ($result->num_rows == 1) {
                $date = new DateTime();
                $rows = $result->fetch_object();
                $pdf = new Contrato("P", "mm", "Letter");
                $pdf->setAuthor('SSPHCM - Oficinas en Linea Falcon C.A.');
                $pdf->setTitle('CONTRATO DE POLIZA HCM - SSPHCM');
                $pdf->AliasNbPages();
                $pdf->AddPage();
Exemple #3
0
session_start();
session_name("ssphcm");
//error_reporting(E_ALL);
//ini_set('display_errors',1);
if (isset($_SESSION['timestamp'], $_SESSION['autorizado'], $_SESSION['id_usuario'])) {
    try {
        require_once "../config.php";
        require_once "../class/lib_funciones.php";
        idleLogin($_SESSION['timestamp'], IDLE_TIMES);
        if (isset($_SESSION['timestamp'])) {
            $response_json = array('redirect' => 'false', 'error' => 'false', 'success' => false, 'mensaje' => '', 'obj_form' => false, 'url_redirect' => 'false', 'json_response' => '');
            $metodos = array("datagrid", "funcion", "profesion", "planes", "datosplan", "estados", "listmunicipios", "listparroquias", "nominas", "direccionsuperior", "secretaria", "coordinacion", "division", "direccion", "oficina", "departamento", "cargo", "puesto", "datosnomina", "primatitular", "primafamiliar", "nexo", "validar", "calcularprimas", "buscar", "consultar", "guardar", "validarcedula");
            if (isset($_GET['evento']) && in_array($_GET['evento'], $metodos)) {
                if ($_GET['evento'] != "funcion") {
                    $objConnex = new Conexionbd();
                }
                switch ($_GET['evento']) {
                    case "validarcedula":
                        $validaton_json = array('isvalid' => true, 'msj' => "");
                        if (isset($_POST['codtit'], $_POST['codpla']) && !empty($_POST['cedfam']) && !empty($_POST['codpla'])) {
                            $stmt = $objConnex->stmt_init();
                            $cedula = $_GET['codigo'] == "titular" ? $_POST['cedtit'] : $_POST['cedfam'];
                            $sql = "SELECT codigo, codpla FROM socio WHERE cedtit=? AND codigo!=?";
                            if ($stmt->prepare($sql)) {
                                $stmt->bind_param('si', $cedula, $_POST['codtit']);
                                $stmt->execute();
                                $result = $stmt->get_result();
                                if ($result->num_rows == 1) {
                                    $plantit = $result->fetch_object();
                                    if ($_GET['codigo'] == "titular") {
Exemple #4
0
session_start();
session_name("ssphcm");
//error_reporting(E_ALL); ini_set('display_errors',1);
$_SESSION['autorizado'] = $_SESSION['id_usuario'] = $_SESSION['timestamp'] = time();
if (isset($_SESSION['autorizado'], $_SESSION['id_usuario'])) {
    try {
        require_once "../config.php";
        require_once "../class/lib_funciones.php";
        idleLogin($_SESSION['timestamp'], IDLE_TIMES);
        if (isset($_SESSION['timestamp'])) {
            $response_json = array('redirect' => 'false', 'error' => 'false', 'success' => false, 'mensaje' => '', 'obj_form' => false, 'url_redirect' => 'false', 'json_response' => '');
            $metodos = array("consultar");
            if (isset($_GET['evento']) && in_array($_GET['evento'], $metodos)) {
                $objUsuario = new Usuario();
                $objConex = new Conexionbd();
                $stmt = $objConex->stmt_init();
                $active_commit = FALSE;
                $objConex->autocommit($active_commit);
                switch ($_GET['evento']) {
                    case 'consultar':
                        if (isset($_POST['cod_user'], $_POST['cedusu']) && !empty($_POST['cedusu'])) {
                            $sql = call_user_func(array($objUsuario, "consultarCedula"));
                            if ($stmt->prepare($sql)) {
                                $stmt->bind_param('s', $_POST['cedusu']);
                                $stmt->execute();
                                $result = $stmt->get_result();
                                if ($result->num_rows == 0) {
                                } elseif ($result->num_rows == 1) {
                                } else {
                                }