/**
  * Lista valores.
  * 
  * @param int $contexto
  * @param int $espacialidade
  * @param int $indicador
  * @param int $ano
  * @return \ValorIndicador
  */
 public function get($contexto, $espacialidade, $id, $indicador, $ano)
 {
     $_sql = $this->getSql($contexto, $espacialidade, $id, $indicador, $ano);
     $this->bd->execSql($_sql);
     while ($row = $this->bd->proximo()) {
         $valor_indicador = new ValorIndicador();
         $valor_indicador->setId($row->id);
         $valor_indicador->setValor($row->valor);
         // adiciona novos valores
         $this->result_set->add($valor_indicador);
     }
     return $this->result_set;
 }
Esempio n. 2
0
 public static function getInstance()
 {
     if (!self::$_instance instanceof self) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Esempio n. 3
0
 /**
  * Crea una única instancia de la clase Bd
  * 
  * Método que verifica si existe una instancia de esta clase, si existe
  * retorna esa instancia caso contrario crea una instancia
  * @return Bd Instancia de la clase Bd
  */
 public static function getIntancia()
 {
     if (!self::$_instancia) {
         self::$_instancia = new self();
     }
     return self::$_instancia;
 }
 /**
  * Formata SQL legenda.
  * 
  * @param int|string $indicador
  * @param int|string $espacialidade
  * @return string
  */
 public function carrega($indicador, $espacialidade)
 {
     $ind = Bd::escape($indicador);
     $esp = VerificadorEspacialidade::getEspacialidade($espacialidade);
     $maior_melhor = null;
     $sql = "SELECT\n                cg.id AS cg_id, \n                c.id AS c_id, \n                c.nome AS nome,                \n                v.maiormelhor AS maior_melhor,\n                CAST(c.maximo AS varchar) AS max,\n                CAST(c.minimo AS varchar) AS min,\n                c.cor_preenchimento AS cor_preenchimento\n            FROM\n                classe_grupo AS cg, classe AS c, variavel AS v\n            WHERE\n                c.fk_classe_grupo=cg.id AND\n                v.id=cg.fk_variavel AND\n                cg.fk_variavel={$ind} AND\n                cg.espacialidade={$esp}\n            ORDER BY\n                c_id DESC";
     $this->bd->execSql($sql);
     $legenda = new LegendaPadrao();
     while ($row = $this->bd->proximo()) {
         $faixa = new FaixaLegenda();
         $faixa->setId($row->c_id);
         $faixa->setNome($row->nome);
         $faixa->setCor($row->cor_preenchimento);
         $faixa->setMax($row->max);
         $faixa->setMin($row->min);
         $legenda->addFaixa($faixa);
         // seta ordem das ASC ou DESC da legenda
         if ($maior_melhor == null) {
             $maior_melhor = $row->maior_melhor;
             $legenda->setOrdem($maior_melhor);
         }
     }
     //        die($sql);
     return $legenda;
 }
Esempio n. 5
0
 public function maj()
 {
     $bd = new Bd("site_stage");
     $co = $bd->connexion();
     switch ($this->fonction) {
         case "etudiant":
             $resultat = mysqli_query($co, "SELECT nom,prenom FROM etudiant WHERE login='******' AND mdp='{$this->mdp}'");
             break;
         case "enseignant":
             $resultat = mysqli_query($co, "SELECT nom,prenom FROM enseignant WHERE login='******' AND mdp='{$this->mdp}'");
             break;
         case "tuteur":
             $resultat = mysqli_query($co, "SELECT nom,prenom FROM tuteur_entreprise WHERE login='******' AND mdp='{$this->mdp}'");
             break;
     }
     $row = mysqli_fetch_row($resultat);
     $this->nom = $row[0];
     $this->prenom = $row[1];
 }
Esempio n. 6
0
 public function agregar()
 {
     $db = Bd::getInstance();
     $sql = $db->ejecutar("INSERT INTO alumnos \n                                VALUES ('','{$this->nombre}',\n                                      '{$this->apellido}',\n                                      '{$this->correo}',\n                                      '{$this->numero}',\n                                      '{$this->institucion}',\n                                      '{$this->pass}',\n                                      '1',\n                                      'A')");
     // mysql_query($sql);
     // echo $sql;
     // echo mysql_error();
     // exit();
     if ($sql) {
         echo " <script type='text/javascript'>\n                    alert('El registro ha sido guardado correctamente');\n                    window.location='../servicio/login.php';\n                    </script> ";
     } else {
         echo " <script type='text/javascript'>\n                    alert('Error al Guardar los datos');\n                    window.location='../index.php';\n                    </script> ";
     }
 }
Esempio n. 7
0
 public function loginA()
 {
     $db = Bd::getInstance();
     $consulta = $db->ejecutar("SELECT * FROM administrador\n                                      WHERE correo='{$this->user}' AND pass='******';");
     $dato = $db->recorrer($consulta);
     // $sql = $bd->ejecutar("SELECT * FROM privilegios
     //  WHERE id_Privilegio='$dato[privilegio]';");
     // $pri = $bd->recorrer($sql);
     if (strtolower($dato['correo']) == strtolower($this->user) and $dato['pass'] == $this->passw) {
         session_start();
         $_SESSION['user'] = $dato['nombre'];
         $_SESSION['privilegio'] = $dato['privilegio'];
         // $_SESSION['privi'] = $pri['id_Privilegio'];
         $_SESSION["autentificado"] = "SI";
         header('location: accesoadmi.php');
     } else {
         header('location:../paneladmi.php');
     }
 }
Esempio n. 8
0
				<input class="na" type="text" name="nombre" size="25" maxlength="20" placeholder= "Nombre Completo" required style=""><br><br>
								
				<label id="ema">APELLIDO:</label> <br>
				<input class="na"  type="text" name="apellido" size="23" maxlength="20" required placeholder= "Apellidos"  style=""><br><br>
							
				<label id="ema">E-MAIL:</label> <br>
				<input class="na" type="email" name="email" size="20"  placeholder= "*****@*****.**" required style=""><br><br>

				<label id="ema">NÙMERO TELEFÒNICO:</label><br>
				<input class="na"  type="text" name="nt" size="20" maxlength="20" placeholder= "Numero Celular" required style=""><br><br>

				<label id="ema">INSTITUCIÒN:</label> <br>
				<select class="na" name="institucion" id="">
					<option value="0">Elige Opción</option>
					<?php 
$bd = Bd::getInstance();
$sql = $bd->ejecutar("SELECT id_Institucion,nombre FROM institucion");
while ($row = mysql_fetch_array($sql)) {
    echo "<option value=" . $row['id_Institucion'] . ">";
    echo $row['nombre'];
    echo "</option>";
}
?>
				</select><br><br>

				<label id="ema">CONTRASEÑA:</label> <br>
				<input class="na"  type="text" name="contrasena" size="20" maxlength="20" placeholder= "Contraseña" required style=""><br>

				<!-- <a class="registrar" href="sesion.php">REGISTRAR</a> <br><br><br> -->
				<input type="hidden" name="registro" value="1">
				<input  class="registrar" type="submit" value="REGISTRAR"><br><br>
// Les encarts
// =====================================================================================================================================================
$Infos['Encart'][2][] = "./Texte/Encart/AvantagesInscription.txt";
$Infos['Encart'][2][] = "./Texte/Encart/News.txt";
// =====================================================================================================================================================
// Informations générales sur la page
// =====================================================================================================================================================
$Infos['Page']['Titre'] = "Deconnexion de l'utilisateur";
// =====================================================================================================================================================
// Inclusion de la vue partielle pour l'affichage du contenu principal de la page
// =====================================================================================================================================================
require_once fGetVue(__FILE__);
require_once './Modele/class.Bd.inc.php';
require_once './Vue/class.vue.Utilisateur.inc.php';
// =====================================================================================================================================================
// Préparation des données à fournir à la vue : Le tableau $Vue
// =====================================================================================================================================================
$Vue['DureeConnexion'] = Bd::GetDureeConnexion($_SESSION['Login']);
$Vue['Sexe'] = $_SESSION['Sexe'];
$Vue['DeconnexionAuto'] = false;
session_unset();
// =====================================================================================================================================================
// Informations concernant la partie centrale de la page + appel de la vue partielle afin de gérer son affichage
// =====================================================================================================================================================
$Infos['Page']['ContenuAvecEncarts'] = VueUtilisateur::GetXhtmlDeconnexion($Vue);
$_SESSION['Infos'] = $Infos;
// =====================================================================================================================================================
// Création d'une page en lui passant en paramètre le tableau $Infos. Si ce n'est pas fait, une page "standard" sera créée par défaut dans le contrôleur principal
// =====================================================================================================================================================
header("Location: ./Redirection.php?Page=Utilisateur&Action=Deconnexion");
//$Page = new PageAvecEncartsDroite($Infos);
    }
    $Vue['DateCreationCompte'] = $ResultatAuthentification['DateCreationUser'];
    $Vue['DateDerniereConnexion'] = $ResultatAuthentification['DateDerniereConnexionUser'];
    $Vue['HeureDerniereConnexion'] = $ResultatAuthentification['HeureDerniereConnexionUser'];
    $Vue['NbEchecConnexion'] = $ResultatAuthentification['NbEchecConnexionUser'];
    $Vue['NbTotalConnexion'] = $ResultatAuthentification['NbTotalConnexionUser'];
    Bd::SetDateHeureDerniereConnexion($Login);
    Bd::SetNbEchecConnexion($Login, "reinitialiser");
    Bd::SetNbTotalConnexion($Login);
    $_SESSION['Login'] = $Login;
    $_SESSION['NomPrenom'] = $ResultatAuthentification['NomUser'] . " " . $ResultatAuthentification['PrenomUser'];
    $_SESSION['Type'] = $ResultatAuthentification['LibelleTypeUser'];
    $_SESSION['Sexe'] = $ResultatAuthentification['SexeUser'];
    $GrainDeSel = "";
    while (strlen($GrainDeSel) < 20) {
        $GrainDeSel = $GrainDeSel . substr('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', ceil(rand(1, 62)), 1);
    }
    Bd::SetGrainDeSelUser($Login, $GrainDeSel);
} else {
    $Vue['ResultAuthentification'] = false;
    Bd::SetNbEchecConnexion($Login, "incrementer");
}
// =====================================================================================================================================================
// Informations concernant la partie centrale de la page + appel de la vue partielle afin de gérer son affichage
// =====================================================================================================================================================
$Infos['Page']['ContenuAvecEncarts'] = VueUtilisateur::GetXhtmlAuthentification($Vue);
$_SESSION['Infos'] = $Infos;
// =====================================================================================================================================================
// Création d'une page en lui passant en paramètre le tableau $Infos. Si ce n'est pas fait, une page "standard" sera créée par défaut dans le contrôleur principal
// =====================================================================================================================================================
header("Location: ./Redirection.php?Page=Utilisateur&Action=Authentification");
Esempio n. 11
0
<?php

date_default_timezone_set("America/Caracas");
// Archivo de variables de configuracion
require_once '../config/config.php';
$obj_config = new ConfigVars();
// Archivo de mensajes
require_once '.' . $obj_config->GetVar('ruta_config') . 'mensajes.php';
// Clase Generica
require '.' . $obj_config->GetVar('ruta_libreria') . 'Generica.php';
$obj_generico = new Generica();
// Conexion a la bases de datos
require '.' . $obj_config->GetVar('ruta_libreria') . 'Bd.php';
$obj_conexion = new Bd();
if (!$obj_conexion->ConnectDataBase($obj_config->GetVar('host'), $obj_config->GetVar('data_base'), $obj_config->GetVar('usuario_db'), $obj_config->GetVar('clave_db'))) {
    echo "sin_conexion_bd";
}
// Modelo asignado
require '.' . $obj_config->GetVar('ruta_modelo') . 'Ventas.php';
$obj_modelo = new Ventas($obj_conexion);
session_start();
$resultTT = $obj_modelo->GetAstralesTicketTransaccional();
if ($obj_conexion->GetNumberRows($resultTT) > 0) {
    //echo "Ok", $obj_conexion->GetNumberRows($resultTT);
    echo "Ok";
} else {
    //echo "NotOk", $obj_conexion->GetNumberRows($resultTT);
    echo "NotOk";
}
Esempio n. 12
0
    $Nom = $rsa->decrypt(base64_decode($_POST['NomCache']));
    $Date = $rsa->decrypt(base64_decode($_POST['DateCache']));
    $Sexe = $rsa->decrypt(base64_decode($_POST['SexeCache']));
    $Adresse = $rsa->decrypt(base64_decode($_POST['AdresseCache']));
    $Cp = $rsa->decrypt(base64_decode($_POST['CPCache']));
    $Ville = $rsa->decrypt(base64_decode($_POST['VilleCache']));
    $Tel = $rsa->decrypt(base64_decode($_POST['TelCache']));
    $Portable = $rsa->decrypt(base64_decode($_POST['PortableCache']));
    $Mail = $rsa->decrypt(base64_decode($_POST['MailCache']));
    $Passwd = $rsa->decrypt(base64_decode($_POST['PwdCache']));
    $LoginUser = Bd::GetLoginUser($Login);
    $PortableUser = Bd::GetPortableUser($Portable);
    $MailUser = Bd::GetMailUser($Mail);
    if ($LoginUser || $PortableUser || $MailUser) {
        Bd::InscriptionUser($Login, $Prenom, $Nom, $Date, $Sexe, $Adresse, $Cp, $Ville, $Tel, $Portable, $Mail, $Passwd);
        $Vue['Contenu'] = "Votre inscription a bien été prise en compte. Vous êtes le " . Bd::GetNbUser() . "ème utilisateur inscrit.";
        $Vue['FormInscription'] = "";
    } else {
        $Vue['Contenu'] = "Le nom d'utilisateur existe déjà, veuillez en saisir un autre";
        $Vue['FormInscription'] = fGetLireFichier(DIR_FORMULAIRE . "Form.Inscription.inc.php");
    }
}
// =====================================================================================================================================================
// Informations concernant la partie centrale de la page + appel de la vue partielle afin de gérer son affichage
// =====================================================================================================================================================
$Infos['Page']['ContenuAvecEncarts'] = VueUtilisateur::GetXhtmlInscription($Vue);
$_SESSION['Infos'] = $Infos;
// =====================================================================================================================================================
// Création d'une page en lui passant en paramètre le tableau $Infos. Si ce n'est pas fait, une page "standard" sera créée par défaut dans le contrôleur principal
// =====================================================================================================================================================
header("Location: Redirection.php?Page=Utilisateur&Action=Inscription");
Esempio n. 13
0
<?php

require_once "../logica/Bd.php";
$datos["nick"] = "helena";
$datos["clave"] = "alu";
$nick = "helena";
$clave = "alu";
/*Bd::insertar($datos);*/
/*Bd::eliminar($datos);*/
/*Bd::modificar($datos);*/
if (Bd::comprobar($nick, $clave)) {
    echo "Estoy dentro";
} else {
    echo "Incorrecto";
}
$lista = Bd::obtener($nick);
echo $lista["clave"];
echo $lista["nick"];
?>


// Null
// =====================================================================================================================================================
// Les encarts
// =====================================================================================================================================================
$Infos['Encart'][2][] = "./Texte/Encart/AvantagesInscription.txt";
$Infos['Encart'][2][] = "./Texte/Encart/News.txt";
// =====================================================================================================================================================
// Informations générales sur la page
// =====================================================================================================================================================
$Infos['Page']['Titre'] = "Suppression du compte";
// =====================================================================================================================================================
// Inclusion de la vue partielle pour l'affichage du contenu principal de la page
// =====================================================================================================================================================
require_once fGetVue(__FILE__);
require_once './Modele/class.Bd.inc.php';
require_once './Vue/class.vue.Utilisateur.inc.php';
// =====================================================================================================================================================
// Préparation des données à fournir à la vue : Le tableau $Vue
// =====================================================================================================================================================
$Vue['Confirmation'] = isset($_REQUEST['Mode']);
$Vue['DureeConnexion'] = Bd::GetDureeConnexion($_SESSION['Login']);
if (isset($_REQUEST['Mode'])) {
    Bd::SuppressionCompteUser($_SESSION["Login"]);
    session_unset();
}
// =====================================================================================================================================================
// Informations concernant la partie centrale de la page + appel de la vue partielle afin de gérer son affichage
// =====================================================================================================================================================
$Infos['Page']['ContenuAvecEncarts'] = VueUtilisateur::GetXhtmlSuppressionCompte($Vue);
$_SESSION['Infos'] = $Infos;
header("Location: ./Redirection.php");
Esempio n. 15
0
<?php

date_default_timezone_set("America/Caracas");
// Archivo de variables de configuracion
require_once '../config/config.php';
$obj_config = new ConfigVars();
// Archivo de mensajes
require_once '.' . $obj_config->GetVar('ruta_config') . 'mensajes.php';
// Clase Generica
require '.' . $obj_config->GetVar('ruta_libreria') . 'Generica.php';
$obj_generico = new Generica();
// Conexion a la bases de datos
require '.' . $obj_config->GetVar('ruta_libreria') . 'Bd.php';
$obj_conexion = new Bd();
if (!$obj_conexion->ConnectDataBase($obj_config->GetVar('host'), $obj_config->GetVar('data_base'), $obj_config->GetVar('usuario_db'), $obj_config->GetVar('clave_db'))) {
    echo "sin_conexion_bd";
}
// Modelo asignado
require '.' . $obj_config->GetVar('ruta_modelo') . 'Ventas.php';
$obj_modelo = new Ventas($obj_conexion);
session_start();
// Listado de Jugadas...
if ($result = $obj_modelo->GetDatosTicketTransaccional()) {
    $total = 0;
    while ($row = $obj_conexion->GetArrayInfo($result)) {
        // acumula y suma el total a la variable
        $total += $row['monto'];
    }
    echo $total;
}
<!--Si l'utilisateur accède a la page alors qu'il n'est pas connecté, on le redirige -->
<?php 
include "../../modeles/membre.php";
session_start();
if (!isset($_SESSION['membre'])) {
    echo "pas de membre";
    header('Location: ../../index.html');
} else {
    $membre = $_SESSION['membre'];
    $bd = new Bd("site_stage");
    $co = $bd->connexion();
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head> 
    <title>Gestion des stages - Accueil</title>
    <link href="../../style.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="../../js/buttons.css"/>
    <link rel="stylesheet" type="text/css" href="../../js/animate.css"/>
    <link rel="stylesheet" href="../../js/font-awesome/css/font-awesome.min.css"/>
	<script src="../../js/jquery-1.11.1.min.js" type="text/javascript"></script>
	<style type="text/css">
		.tab  {border-collapse:collapse;border-spacing:0;}
		.tab td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}
		.tab th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal; background-color:#26ade4;}
	</style>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  </head>
  
$rsa = new Crypt_RSA();
$PrivateKey = Bd::GetRsaPrivateKey(CRYPT_NUMRSAKEY);
$rsa->setEncryptionMode(CRYPT_RSA_ENCRYPTION_PKCS1);
$rsa->loadkey($PrivateKey);
$Vue['Message'] = "Veuillez cliquer sur le bouton Valider après avoir saisi les informations du formulaire (* : champs obligatoires)";
$Vue['Message2'] = "";
$Vue['Authentification2'] = false;
$Vue['FormModifierMotDePasseUser'] = fGetLireFichier(DIR_FORMULAIRE . "Form.ModifierMotDePasseUser.inc.php");
if (isset($_POST['AncienMotDePasse'])) {
    $AncienMotDePasse = $rsa->decrypt(base64_decode($_POST['AncienMotDePasse']));
    $NouveauMotDePasse = $rsa->decrypt(base64_decode($_POST['NouveauMotDePasse']));
    $LoginUser = $_SESSION['Login'];
    $Vue['Authentification2'] = Bd::GetMotDePasseCorrect($LoginUser, $AncienMotDePasse);
    if ($Vue['Authentification2']) {
        $GrainDeSel = "";
        while (strlen($GrainDeSel) < 20) {
            $GrainDeSel = $GrainDeSel . substr('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', ceil(rand(1, 62)), 1);
        }
        Bd::SetGrainDeSelUser($LoginUser, $GrainDeSelUser);
        Bd::SetMotDePasseUser($LoginUser, $NouveauMotDePasse);
        $Vue['Message2'] = "Modification du mot de passe reussie !";
    } else {
        $Vue['Message2'] = "Ancien mot de passe incorrect";
    }
}
// =====================================================================================================================================================
// Informations concernant la partie centrale de la page + appel de la vue partielle afin de gérer son affichage
// =====================================================================================================================================================
$Infos['Page']['ContenuAvecEncarts'] = VueUtilisateur::GetXhtmlModificationMotDePasse($Vue);
$_SESSION['Infos'] = $Infos;
$Page = new PageAvecEncartsDroite($Infos);
 /**
  * Escape ID ou um array de IDs.
  * 
  * @param integer|array $id
  * @return integer|array
  */
 protected function escapeId($id)
 {
     // id pode ser um array ou ser valor único
     if (!is_array($id)) {
         $id = Bd::escape($id);
     } else {
         foreach ($id as $k => $v) {
             $id[$k] = Bd::escape($v);
         }
     }
     return $id;
 }
Esempio n. 19
0
    /* DATOS DEL TRAMITE */

    $tramite = new Tramite();
    $tramite->descripcion = "Prueba de Tramite";
    $tramite->save();

    $detalleTramite = new DetalleTramite();
    $detalleTramite = $detalleTramite->crear($_POST["boleta_prenumerada"]);
    $detalleTramite->Tramite = $tramite;
    $detalleTramite->Usuario_id = $_SESSION["usuario"]["id"];
    $detalleTramite->save();


    $datoTramite = new DatoTramite();
    $datoTramite->fecha = Bd::FechaAMysql(trim($_POST["fecha_tramite"]));
    $datoTramite->id_oficina_seccional = $_POST["id_oficina_seccional"];
    $datoTramite->oficina_seccion = $_POST["oficina_seccion"];
    $datoTramite->Ente = $ente;
    $datoTramite->DetalleTramite = $detalleTramite;
    $datoTramite->save();

    $carrera = new Carrera();
    $carrera = $carrera->Descripcion(strtoupper($_POST["carrera"]));
    $carrera->save();

    $educacional = new Educacional();
    $educacional = $educacional->ente_id($ente->id);
    $educacional->Carrera = $carrera;
    $educacional->mas_nivel_educacional = strtoupper($_POST["mas_nivel_educacional"]);
    $educacional->profesion = strtoupper($_POST["profesion"]);
// =====================================================================================================================================================
//Onglet
if (!isset($_REQUEST['Onglet'])) {
    $Url['Onglet'] = 'FilmsParAnnee';
} elseif (!is_string($_REQUEST['Onglet'])) {
    $Url['Onglet'] = 'FilmsParAnnee';
} else {
    $Url['Onglet'] = $_REQUEST['Onglet'];
}
// =====================================================================================================================================================
// Préparation des données à fournir à la vue : Le tableau $Vue
// =====================================================================================================================================================
$nbFilm = Bd::GetNbfilms();
$nbGenre = Bd::GetNbGenres();
$nbFilmAnnee = Bd::GetNbFilmsParAnnee();
$nbFilmGenre = Bd::GetNbFilmsParGenre();
$lesStatsAnnee = new Collection();
$lesStatsGenre = new Collection();
foreach ($nbFilmAnnee as $tuple) {
    $Stat = new Statistique($tuple['Annee'], $tuple['NbFilm']);
    $lesStatsAnnee->Add($Stat);
}
foreach ($nbFilmGenre as $tuple) {
    $Stat = new Statistique($tuple['LibelleGenre'], $tuple['NbFilm']);
    $lesStatsGenre->Add($Stat);
}
$Vue['NbFilms'] = $nbFilm;
$Vue['NbGenre'] = $nbGenre;
$Vue['Onglet'] = $Url['Onglet'];
$Vue['StatsAnnee'] = $lesStatsAnnee;
$Vue['StatsGenre'] = $lesStatsGenre;
Esempio n. 21
0
	  <param name="printer" value="zebra">
   </applet>
  -->
  
<?php 
// Archivo de variables de configuracion
require_once '../config/config.php';
$obj_config = new ConfigVars();
// Archivo de mensajes
require_once '.' . $obj_config->GetVar('ruta_config') . 'mensajes.php';
// Clase Generica
require '.' . $obj_config->GetVar('ruta_libreria') . 'Generica.php';
$obj_generico = new Generica();
// Conexion a la bases de datos
require '.' . $obj_config->GetVar('ruta_libreria') . 'Bd.php';
$obj_conexion = new Bd();
if (!$obj_conexion->ConnectDataBase($obj_config->GetVar('host'), $obj_config->GetVar('data_base'), $obj_config->GetVar('usuario_db'), $obj_config->GetVar('clave_db'))) {
    echo "sin_conexion_bd";
}
// Modelo asignado
require '.' . $obj_config->GetVar('ruta_modelo') . 'Ventas.php';
$obj_modelo = new Ventas($obj_conexion);
session_start();
//$id_taquilla=2;
// Obtenemos los datos de la taquilla
$id_taquilla = $obj_modelo->GetIdTaquilla();
// Generacion del Id del Ticket
$id_ticket = $obj_modelo->GeneraIDTicket();
// Generacion del serial del ticket
$serial = "";
$serial = $obj_modelo->GeneraSerialTicket();
Esempio n. 22
0
 /**
  * Constructor
  */
 private function __construct()
 {
     $this->bd = Bd::getIntancia();
 }
Esempio n. 23
0
        'nro_calle' => $domicilioAnteriorArray["nro_calle"],
        'piso' => $domicilioAnteriorArray['piso'],
        'depto' => $domicilioAnteriorArray['depto'],
        'cod_postal' => $domicilioAnteriorArray['cod_postal'],
        'tel_prefijo' => str_replace(array("(", ")"), "", $telefono[0]),
        'tel_numero' => $telefono[1]
    );
}
$q = Doctrine_Query::create()
                ->select("dato.*, detalle.*")
                ->from("DatoTramite dato, dato.DetalleTramite detalle")
                ->where("detalle.boleta_prenumerada = ?", $_SESSION["datosTramite"]["boleta"]);

$tramite = $q->execute()->get(0)->toArray();

$fechatramite = explode("/", Bd::FechaMysqlaFecha($tramite["fecha"]));

$tramite["fecha_dia"] = $fechatramite[0];
$tramite["fecha_mes"] = $fechatramite[1];
$tramite["fecha_anio"] = $fechatramite[2];

$q = Doctrine_Query::create()
                ->select("e.*, c.*")
                ->from("Educacional e, e.Carrera c")
                ->where("e.Ente.id = ?", $enteTabla["id"]);

$educacionalTabla = $q->execute()->get(0)->toArray();

if ($educacionalTabla["lee_escribe"] == 1)
    $educacionalTabla["lee_escribe"] = "Si";
else
Esempio n. 24
0
    </script>
<?
}

if ($_SESSION["datosTramite"]["tipo"] == "crearTramite") {
?>
    <script type="text/javascript">
        ente = {
            'dni'                   : '<?= $ente["dni"] ?>',
            'dni2'                  : '<?= $ente["dni2"] ?>',
            'apellido'              : '<?= $ente["apellido"] ?>',
            'nombre'                : '<?= $ente["nombre"] ?>',
            'veterano'              : '<?= $ente["veterano"] ? 1 : 0 ?>',
            'sexo_id'               : '<?= $tablaEnte->Sexo->get("id") ?>',
            'fecha_nacimiento'      : '<?= Bd::FechaMysqlaFecha($ente["fecha_nacimiento"]) ?>',
            'pais_id'               : '<?= $tablaEnte->Pais->get("id") ?>',
            'provincia_nacimiento'  : '<?= $tablaEnte->provincia_nacimiento->get("descripcion") ?>',
            'localidad_nacimiento'  : '<?= $tablaEnte->localidad_nacimiento->get("descripcion") ?>',
            'partido_nacimiento'    : '<?= $tablaEnte->partido_nacimiento->get("descripcion") ?>',
            'id_estado_civil'       : '<?= $tablaEnte->EstadoCivil->get("id") ?>',
            'provincia_anterior'             : '<?= $domicilio->Provincia->get("descripcion") ?>',
            'partido_depto_anterior'         : '<?= $domicilio->PartidoDepto->get("descripcion") ?>',
            'localidad_anterior'             : '<?= $domicilio->Localidad->get("descripcion") ?>',
            'barrio_anterior'                : '<?= $domicilio->get("barrio") ?>',
            'calle_anterior'                 : '<?= $domicilio->Calle->get("descripcion") ?>',
            'nro_calle_anterior'             : '<?= $domicilio->get("nro_calle") ?>',
            'piso_anterior'                  : '<?= $domicilio->get("piso") ?>',
            'depto_anterior'                 : '<?= $domicilio->get("depto") ?>',
            'cod_postal_anterior'            : '<?= $domicilio->get("cod_postal") ?>',
            'telefono_anterior'              : '<?= $domicilio->get("telefono") ?>',
    foreach ($dossier as $film) {
        if (pathinfo($film, PATHINFO_EXTENSION) == "jpg") {
            $Vue['PhotosFilm'][] = DIR_FILM_PHOTOS . $Vue['LeFilm']['TitreFilm'] . "/" . $film;
        }
    }
} else {
    $Vue['PhotosFilm'] = false;
}
// =====================================================================================================================================================
// Préparation des données pour la navigation : le tableau $Navigation
// =====================================================================================================================================================
$Navigation['NumPage'] = $Url['NumPage'];
$Navigation['NbPages'] = $nbPage;
$Navigation['NbFilms'] = $nbFilm;
$Navigation['Onglet'] = $Url['Onglet'];
$Navigation['PositionFilm'] = Bd::GetPositionFilm($Url['NumFilm']);
// =====================================================================================================================================================
// Bandeau haut
// =====================================================================================================================================================
$Infos['BandeauHaut']['Titre'] = $Vue['LeFilm']['TitreFilm'];
// =====================================================================================================================================================
// Informations générales sur la page
// =====================================================================================================================================================
$Infos['Page']['Titre'] = "Informations détaillées concernant le film : " . $Vue['LeFilm']['TitreFilm'];
// =====================================================================================================================================================
// Informations concernant la partie centrale de la page + appel de la vue partielle afin de gérer son affichage
// =====================================================================================================================================================
$Infos['Page']['ContenuAvecEncarts'] = $Infos['Page']['ContenuAvecEncarts'] = VueFilm::GetXhtmlAfficheFilm($Vue) . VueFilm::GetXhtmlFilms($Vue);
// =====================================================================================================================================================
// Création d'une page en lui passant en paramètre le tableau $Infos. Si ce n'est pas fait, une page "standard" sera créée par défaut dans le contrôleur principal
// =====================================================================================================================================================
} elseif (!is_numeric($_REQUEST['NumPage'])) {
    $Url['NumPage'] = 1;
} elseif ($_REQUEST['NumPage'] < 1) {
    $Url['NumPage'] = 1;
} elseif ($_REQUEST['NumPage'] > $nbPage) {
    $Url['NumPage'] = $nbPage;
} else {
    $Url['NumPage'] = $_REQUEST['NumPage'];
}
$InfoNav['NumPage'] = $Url['NumPage'];
$InfoNav['NbPages'] = $nbPage;
$BarreNavigation = new Navigation("Film", "AfficherLaListe", $InfoNav);
// =====================================================================================================================================================
// Préparation des données à fournir à la vue : Le tableau $Vue
// =====================================================================================================================================================
$listeFilms = Bd::GetListeFilms(($Url['NumPage'] - 1) * NAV_NB_LIGNE_PAGE, NAV_NB_LIGNE_PAGE);
$Vue['NbFilms'] = $nbFilm;
$Vue['ListeFilms'] = $listeFilms;
$Vue['NumPage'] = $Url['NumPage'];
$Vue['NbPages'] = $nbPage;
$Vue['NumPremierFilm'] = $Url['NumPage'] * NAV_NB_LIGNE_PAGE - (NAV_NB_LIGNE_PAGE - 1);
if ($Vue['NumPage'] * NAV_NB_LIGNE_PAGE <= $Vue['NbFilms']) {
    $Vue['NumDernierFilm'] = $Vue['NumPage'] * NAV_NB_LIGNE_PAGE;
} else {
    $Vue['NumDernierFilm'] = $Vue['NbFilms'];
}
// =====================================================================================================================================================
// Informations concernant la partie centrale de la page + appel de la vue partielle afin de gérer son affichage
// =====================================================================================================================================================
$Infos['Page']['ContenuSansEncarts'] = "Le tableau ci-dessous présente tous les films de notre cinémathèque (" . $nbFilm . " actuellement). Ils sont triés selon l'ordre alphabétique. En survolant le titre d'un film, le réalisateur correspondant s'affiche dans une note. Il suffit alors de cliquer sur une ligne du tableau afin de visualiser la page présentant les informations détaillées du film correspondant.";
$Infos['Page']['ContenuAvecEncarts'] = VueFilm::GetXhtmlListeFilms($Vue) . VueFilm::GetXhtmlNavigationListeFilms($BarreNavigation->GetXhtmlBoutons(), $BarreNavigation->GetXhtmlNumeros());
Esempio n. 27
0
<?php

// Archivo de variables de configuracion
require_once '../config/config.php';
$obj_config = new ConfigVars();
// Archivo de mensajes
require_once '.' . $obj_config->GetVar('ruta_config') . 'mensajes.php';
// Clase Generica
require '.' . $obj_config->GetVar('ruta_libreria') . 'Generica.php';
$obj_generico = new Generica();
// Conexion a la bases de datos
require '.' . $obj_config->GetVar('ruta_libreria') . 'Bd.php';
$obj_conexion = new Bd();
if (!$obj_conexion->ConnectDataBase($obj_config->GetVar('host'), $obj_config->GetVar('data_base'), $obj_config->GetVar('usuario_db'), $obj_config->GetVar('clave_db'))) {
    echo "sin_conexion_bd";
}
// Modelo asignado
require '.' . $obj_config->GetVar('ruta_modelo') . 'LoginAcceso.php';
$obj_modelo = new LoginAcceso($obj_conexion);
session_start();
$id_usuario = $_SESSION['id_usuario'];
$id_usuario = $_SESSION['id_taquilla'];
if ($obj_modelo->UpdateTimePing($id_usuario, $id_taquilla)) {
}
 /**
  * Retorna array de indicadores.
  * 
  * @return array
  */
 private function _getIndicadoresArray()
 {
     $sql = sprintf("SELECT var.id AS id, var.sigla AS sigla, lg.nomecurto AS nomecurto, lg.nomelongo AS nomelongo " . "FROM variavel var INNER JOIN lang_var lg on var.id = lg.fk_variavel " . "WHERE lg.lang = '%s' " . "ORDER BY var.ordem ASC", Bd::escape($this->user_lang));
     $this->bd->execSql($sql);
     $result = array();
     while ($row = $this->bd->proximo()) {
         $obj = new Variavel($row->id, $row->sigla, $row->nomecurto, $row->nomelongo);
         $result[] = $obj;
     }
     return $result;
 }
Esempio n. 29
0
<?php

date_default_timezone_set("America/Caracas");
// Archivo de variables de configuracion
require_once '../config/config.php';
$obj_config = new ConfigVars();
// Archivo de mensajes
require_once '.' . $obj_config->GetVar('ruta_config') . 'mensajes.php';
// Clase Generica
require '.' . $obj_config->GetVar('ruta_libreria') . 'Generica.php';
$obj_generico = new Generica();
// Conexion a la bases de datos
require '.' . $obj_config->GetVar('ruta_libreria') . 'Bd.php';
$obj_conexion = new Bd();
if (!$obj_conexion->ConnectDataBase($obj_config->GetVar('host'), $obj_config->GetVar('data_base'), $obj_config->GetVar('usuario_db'), $obj_config->GetVar('clave_db'))) {
    echo "sin_conexion_bd";
}
// Modelo asignado
require '.' . $obj_config->GetVar('ruta_modelo') . 'Ventas.php';
$obj_modelo = new Ventas($obj_conexion);
session_start();
// Obtenemos los datos de la taquilla
$taquilla = $obj_modelo->GetIdTaquilla();
$id_insert_taquilla = $obj_modelo->GetUltimoIdInsert($taquilla) + 1;
// Inicio del proceso
$resultTT = $obj_modelo->GetDatosTicketTransaccional();
if ($obj_conexion->GetNumberRows($resultTT) > 0) {
    $catidad_apuestas = $obj_conexion->GetNumberRows($resultTT);
    $txt_monto = $_GET['monto'];
    $monto_prorrateado = round($txt_monto / $catidad_apuestas, 2, PHP_ROUND_HALF_EVEN);
    // echo $monto_prorrateado;
// Préparation des données à fournir à la vue : Le tableau $Vue
// =====================================================================================================================================================
$rsa = new Crypt_RSA();
$PrivateKey = Bd::GetRsaPrivateKey(CRYPT_NUMRSAKEY);
$rsa->setEncryptionMode(CRYPT_RSA_ENCRYPTION_PKCS1);
$rsa->loadkey($PrivateKey);
$InformationsUser = Bd::GetInformationsUser($_SESSION['Login']);
$_SESSION['Nom'] = $InformationsUser['NomUser'];
$_SESSION['Prenom'] = $InformationsUser['PrenomUser'];
$_SESSION['DateNaiss'] = $InformationsUser['DateNaissanceUser'];
$_SESSION['Sexe'] = $InformationsUser['SexeUser'];
$_SESSION['Adresse'] = $InformationsUser['AdresseUser'];
$_SESSION['CP'] = $InformationsUser['CPUser'];
$_SESSION['Ville'] = $InformationsUser['VilleUser'];
$_SESSION['TelFixe'] = $InformationsUser['TelFixeUser'];
$_SESSION['TelPort'] = $InformationsUser['TelPortableUser'];
$_SESSION['Mail'] = $InformationsUser['MailUser'];
if (!isset($_POST['envoi'])) {
    $Vue['Contenu'] = "Veuillez cliquer sur le bouton \"Valider\" après avoir saisi les informations du formulaire (* : champs obligatoires)";
    $Vue['FormModifierInfos'] = fGetLireFichier(DIR_FORMULAIRE . "Form.ModifierInformations.inc.php");
} else {
    Bd::SetUpdateUser($_SESSION['Login'], $rsa->decrypt(base64_decode($_POST['NomCache'])), $rsa->decrypt(base64_decode($_POST['PrenomCache'])), $rsa->decrypt(base64_decode($_POST['DateNaissCache'])), $rsa->decrypt(base64_decode($_POST['SexeCache'])), $rsa->decrypt(base64_decode($_POST['AdresseCache'])), $rsa->decrypt(base64_decode($_POST['CPCache'])), $rsa->decrypt(base64_decode($_POST['VilleCache'])), $rsa->decrypt(base64_decode($_POST['TelFixeCache'])), $rsa->decrypt(base64_decode($_POST['TelPortCache'])), $rsa->decrypt(base64_decode($_POST['MailCache'])));
    $Vue['Contenu'] = "Informations modifiée avec succés";
    $Vue['FormModifierInfos'] = "";
}
// =====================================================================================================================================================
// Informations concernant la partie centrale de la page + appel de la vue partielle afin de gérer son affichage
// =====================================================================================================================================================
$Infos['Page']['ContenuAvecEncarts'] = VueUtilisateur::GetXhtmlModificationInformations($Vue);
$_SESSION['Infos'] = $Infos;
$Page = new PageAvecEncartsDroite($Infos);