public static function getInstance($servidor = '172.20.42.95', $usuario = 'root', $clave = 'MNd3s4rr0ll0%', $bd = 'face_suite') { if (is_null(self::$_singleton)) { self::$_singleton = new DataBaseRemota($servidor, $usuario, $clave, $bd); } return self::$_singleton; }
function __construct($path) { $this->ruta = $path; include_once "class.dbremota.php"; include_once "class.db.php"; include_once $this->ruta . "inc/clases/class.leercfdi.php"; $this->conexion = DataBaseRemota::getInstance(); $this->conexion_local = DataBase::getInstance(); }
$mail->Subject = 'NOTIFICACION'; // $mail->Body = 'Testing some Mailgun awesomness'; $mail->msgHTML($plantilla, dirname(__FILE__)); if (!$mail->send()) { echo 'Message could not be sent. <br/>'; echo 'Mailer Error: ' . $mail->ErrorInfo . '<br/><br/>'; } else { echo 'Message has been sent <br/><br/>'; } $fecha = date('Y-m-d h:i:s'); $d['id'] = $registro->ID_FACTURA_TIMBRADA; $d['referencia'] = 'NOTIFICACION DE RECIBO DE HONORARIOS AUTOMATICO ' . $registro_local->sRazonSocial; $d['extra'] = $rfc; if ($historial->guardar($d)) { $qry = "UPDATE factura_timbrada SET MAIL_ENVIADO = 1 , MAIL_ENVIADO_FECHA = '{$fecha}' WHERE ID_FACTURA_TIMBRADA = '" . $registro->ID_FACTURA_TIMBRADA . "'"; $csrx = DataBaseRemota::getInstance(); $csrx->setQuery($qry); $csrx->execute(); } // break; } } else { echo "No se obtuvieron registros"; } function encontrar($campo, $valor, $lista) { $este = false; foreach ($lista as $valor_registro) { foreach ($valor_registro as $c => $v) { if ($c == $campo && $v == $valor) { $este = true;