Esempio n. 1
0
<?php

include_once '../includes/libreria/fun_debugger.php';
include_once '../includes/configure_bd.php';
include_once '../includes/libreria/fun_bd.php';
$__BD = new funBD();
$__BD->conectaBD();
// $ordenSQL = "select max(hora) from transportersql where hora <> 'NULL'";
// $hora = $__BD->db_valor($ordenSQL);
// $ordenSQL = "select tabla, lineas from transportersql where hora = '$hora'";
$codigo = '';
$ordenSQL = "select * from modificadossql";
$result = $__BD->db_query($ordenSQL);
$now = date("H:i:s");
while ($row = $__BD->db_fetch_assoc($result)) {
    $tabla = $row['tabla'];
    $campoClave = $row['campoclave'];
    $valorClave = $row['valorclave'];
    $valores = $row['valores'];
    $ordenSQL = "select {$campoClave} from {$tabla} where {$campoClave} = '{$valorClave}'";
    $existe = $__BD->db_valor($ordenSQL);
    if (!$existe) {
        $ordenSQL = "insert into {$tabla} ({$campoClave}) values ('{$valorClave}')";
        $__BD->db_query($ordenSQL);
    }
    $ordenSQL = "update {$tabla} set {$valores} where {$campoClave} = '{$valorClave}'";
    //  	echo $ordenSQL;
    $ok = $__BD->db_query($ordenSQL);
    if ($ok) {
        $ordenSQL = "delete from modificadossql where id=" . $row["id"];
        $__BD->db_query($ordenSQL);
/*** begin our session ***/
session_name('eStoreQ');
session_start();
if (isset($_SESSION['user_id'])) {
    echo '<script type="text/javascript">
			<!--
			window.location = "im_index.php"
			//-->
			</script>';
    $message = '<a href="im_index.php">Acceso</a>';
} elseif (ctype_alnum($_POST['img_password']) != true) {
    $error = "Password incorrecto";
} else {
    include_once '../includes/configure_bd.php';
    include_once '../includes/libreria/fun_bd.php';
    $__BD = new funBD();
    $__BD->conectaBD();
    $ordenSQL = "select managerpass from opcionestv";
    $managerpass = $__BD->db_valor($ordenSQL);
    if (!$managerpass) {
        $error = 'Password incorrecto';
    } else {
        if ($managerpass == sha1($_POST['img_password'])) {
            $_SESSION['user_id'] = sha1(time());
            echo '<script type="text/javascript">
						<!--
 						window.location = "im_index.php"
						//-->
						</script>';
            $message = '<a href="im_index.php">Acceso</a>';
        } else {
Esempio n. 3
0
 function comprobarBD($tipo)
 {
     $__BD = new funBD();
     $__BD->conectaBD();
     $diagnosis = true;
     $tablas = array("clientes_codcliente_seq");
     if ($tipo == "mysql") {
         $tablas = array("clientes_seq", "dirclientes_seq", "pedidoscli_seq", "lineaspedidoscli_seq");
     }
     foreach ($tablas as $tabla) {
         $ordenSQL = "select * from " . $tabla;
         $result = $__BD->db_query($ordenSQL) or $diagnosis = false;
         if (!$diagnosis) {
             return false;
         }
     }
     set_time_limit(30);
     return $diagnosis;
 }
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
/*** begin the session ***/
session_name('eStoreQ');
session_start();
if (!isset($_SESSION['user_id'])) {
    include_once 'im_login.php';
    exit;
}
include_once '../includes/configure_bd.php';
include_once '../includes/libreria/fun_bd.php';
$__BD = new funBD();
$__BD->conectaBD();
include_once 'includes/im_class.upload.php';
include_once 'includes/im_xajax_upload.php';
$numFam = 0;
if (isset($_GET["numFam"])) {
    $numFam = $_GET["numFam"];
}
$referencia = '';
if (isset($_GET["ref"])) {
    $referencia = $_GET["ref"];
}
$ordenSQL = "select piximages, charset from opcionestv";
$result = $__BD->db_query($ordenSQL);
$opciones = $__BD->db_fetch_array($result);
$dimThum = $opciones["piximages"];