Ejemplo n.º 1
0
                    // 0 = No enviado.
                    $sql = "update ENTRADA set flg_edicodeco='0' where flg_edicodeco='2' and id_naviera='{$idNav}' ";
                    $db->query($sql);
                    $flgFtpOK = 0;
                } else {
                    $sql = "update ENTRADA set flg_edicodeco='1' where flg_edicodeco='2' and id_naviera='{$idNav}' ";
                    $db->query($sql);
                    $flgFtpOK = 1;
                }
            }
            if (!empty($fileEDIS)) {
                if (sentToHSFTP($fileEDIS) == 0) {
                    // si existe error en el envio de FTP, debe regresar el valor a cero.
                    $sql = "update SALIDA set flg_edicodeco='0' where flg_edicodeco='2' and id_naviera='{$idNav}' ";
                    $db->query($sql);
                    $flgFtpOK = 0;
                } else {
                    // Si es exitoso el envio, entonces marcar a 1 el flg_edicodeco.
                    $sql = "update SALIDA set flg_edicodeco='1' where flg_edicodeco='2' and id_naviera='{$idNav}' ";
                    $db->query($sql);
                    $flgFtpOK = 1;
                }
            }
            if ($flgFtpOK == 1) {
                sendMail($fileEDIE, $fileEDIS, 'Hamburg Sud');
            } elseif ($flgFtpOK == 0) {
                sendMailError("Hamburg Sud", "FTP Fallo la conexion");
            }
        }
    }
}
Ejemplo n.º 2
0
         }
         if (!empty($fileEDIS)) {
             if (sentToMscFTP($fileEDIS) == 0) {
                 $sql = "update SALIDA set flg_edicodeco='0' where flg_edicodeco='2' and id_naviera='1' ";
                 $db->query($sql);
                 $flgFtpOK = 0;
             } else {
                 $sql = "update SALIDA set flg_edicodeco='1' where flg_edicodeco='2' and id_naviera='1' ";
                 $db->query($sql);
                 $flgFtpOK = 1;
             }
         }
         if ($flgFtpOK == 1) {
             sendMail($fileEDIE, $fileEDIS, 'Mediterranean Shipping Company Mexico');
         } elseif ($flgFtpOK == 0) {
             sendMailError("MSC", "FTP Fallo la conexion");
         }
     }
 }
 if ($idNav == '333') {
     // NAVIERA : HS
     $codPatio = "MTYTM";
     $codPatioName = "MOPSA";
     $senderID = "MTYTM";
     unset($arrValidIdEnt);
     unset($arrValidIdSal);
     unset($fileEDIE);
     unset($fileEDIS);
     $arrValidIdEnt = arrValido('ENTRADA', $idNav);
     if (count($arrValidIdEnt) > 0) {
         // -----------------------------------------------
Ejemplo n.º 3
0
function myErrorHandler($errno, $errstr, $errfile, $errline)
{
    if (ini_get("display_errors") != 1 && ini_get("display_errors") != 'on') {
        return true;
    }
    $texto_error = "";
    $texto_error .= "";
    $exit = false;
    switch ($errno) {
        /**
         * ******* E_USER_WARNING *****
         */
        case E_USER_ERROR:
            $texto_error = "<b>ERROR</b> [{$errno}] {$errstr}<br />\n";
            $texto_error .= "  Fatal error on line {$errline} in file {$errfile}";
            $texto_error .= ", PHP " . PHP_VERSION . " (" . PHP_OS . ")<br />\n";
            $texto_error .= "Aborting...<br />\n";
            $exit = true;
            break;
        case 256:
            $texto_error = "<b>ERROR</b> [{$errno}] {$errstr}<br />\n";
            $texto_error .= "  Fatal error on line {$errline} in file {$errfile}";
            $texto_error .= ", PHP " . PHP_VERSION . " (" . PHP_OS . ")<br />\n";
            $texto_error .= "Aborting...<br />\n";
            $exit = true;
            break;
            /**
             * ******* E_USER_WARNING *****
             */
        /**
         * ******* E_USER_WARNING *****
         */
        case E_USER_WARNING:
            $texto_error .= "<b>WARNING</b> [{$errno}] {$errstr}<br />\n";
            $texto_error .= "on line " . $errline . " in file " . $errfile . "<br />\n";
            break;
        case 2:
            $texto_error = "<b>ERROR</b> [{$errno}] {$errstr}<br />\n";
            $texto_error .= "  Fatal error on line {$errline} in file {$errfile}";
            $texto_error .= ", PHP " . PHP_VERSION . " (" . PHP_OS . ")<br />\n";
            $texto_error .= "Aborting...<br />\n";
            $exit = true;
            break;
            /**
             * ******* E_USER_WARNING *****
             */
        /**
         * ******* E_USER_WARNING *****
         */
        case E_NOTICE:
            $texto_error .= "<b>NOTICE</b> [{$errno}] {$errstr}<br />\n";
            $texto_error .= "on line " . $errline . " in file " . $errfile . "<br />\n";
            break;
        case E_USER_NOTICE:
            $texto_error .= "<b>NOTICE</b> [{$errno}] {$errstr}<br />\n";
            $texto_error .= "on line " . $errline . " in file " . $errfile . "<br />\n";
            break;
        case 1024:
            $texto_error .= "<b>NOTICE</b> [{$errno}] {$errstr}<br />\n";
            $texto_error .= "on line " . $errline . " in file " . $errfile . "<br />\n";
            break;
            /**
             * ******* DEFAULT *****
             */
        /**
         * ******* DEFAULT *****
         */
        default:
            $texto_error .= "Unknown error type: [{$errno}] {$errstr}<br />\n";
            $texto_error .= "on line " . $errline . " in file " . $errfile . "<br />\n";
            $exit = true;
            break;
    }
    if (IS_DEV) {
        if (!((SHOW_SYSTEM_ERRORS == 30711 || SHOW_SYSTEM_ERRORS == 32759 || SHOW_SYSTEM_ERRORS == -9) && $errno == 8)) {
            echo $texto_error;
        }
    } else {
        if (!((SHOW_SYSTEM_ERRORS == 30711 || SHOW_SYSTEM_ERRORS == 32759 || SHOW_SYSTEM_ERRORS == -9) && $errno == 8)) {
            sendMailError($texto_error, DOMAIN);
        }
        if ($exit === true) {
            exit(1);
        }
    }
    return true;
}