Viewing file: autorizar-consulta-veterinarias.php (9.31 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<? $pagina_actual="administrar-novedades"; $categoria_actual="novedades"; require_once("includes/config.php"); require_once("includes/funciones.php");
if (isset($_POST["id"])){ extract($_POST, EXTR_SKIP);
$result=$mysqli->query(" UPDATE consulta_veterinarias SET estado='autorizado' WHERE id='$id' ");
$result=$mysqli->query(" SELECT id, titulo, detalle, fecha FROM consulta_veterinarias WHERE id='$id' "); $pregunta = mysqli_fetch_assoc($result);
$veterinarias_destacadas=$mysqli->query(" SELECT id, id_ciudad, nombre, detalle, foto_veterinario, logo, direccion, telefono, email, facebook, twitter, google, web, youtube, detalle_completo, lat, lng, inicio, destacada FROM veterinaria WHERE destacada='si' "); while ($veterinaria = mysqli_fetch_assoc($veterinarias_destacadas)){ require('../PHPMailer-master/PHPMailerAutoload.php');
// título $titulo = 'Responder publicacion en puntodemascotas.com';
// mensaje cabecera $mensaje = ' <!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> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Punto de Mascotas</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> </head> <body style="margin: 0; padding: 0;"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td style="padding: 10px 0 30px 0;"> <table align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="border: 1px solid #cccccc; border-collapse: collapse;"> <tr> <td align="center" bgcolor="#1ba6a9" style="padding: 20px 0 20px 0; color: #153643; font-size: 28px; font-weight: bold; font-family: Arial, sans-serif;"> <img src="http://puntodemascotas.com/imgs/logo-color.png" alt="Punto de Mascotas" width="226" height="85" style="display: block;" /> </td> </tr> <tr> <td bgcolor="#ffffff" style="padding: 40px 30px 40px 30px;"> '; //mensaje centro $mensaje .= ' <!-- MENSAJE 3 --> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td style="padding: 0px 0 10px 0; color: #1a888b; font-family: Arial, sans-serif; font-size: 18px;"> <b>Estimada '.$veterinaria["nombre"].'!</b> </td> </tr> <tr> <td style="padding: 0px 0 10px 0; color: #153643; font-family: Arial, sans-serif; font-size: 12px; line-height: 20px;"> Aumente su visualización en nuestro portal, responda primero a ésta pregunta! </td> </tr> <tr> <td style="padding: 0px 0 10px 0; color: #153643; font-family: Arial, sans-serif; font-size: 12px; line-height: 20px; border-bottom: 1px solid #D0D0D0;"> <b>NUEVA PREGUNTA</b><br /> <b>Fecha: </b>'.ver_fecha_mysql_lindo($pregunta["fecha"]).'<br /> <b>Pregunta: </b>'.$pregunta["titulo"].'<br /> <b>Detalle: </b>'.$pregunta["detalle"].'<br /> </td> </tr> <tr> <td style="padding: 10px 0 10px 0; color: #153643; font-family: Arial, sans-serif; font-size: 12px; line-height: 20px;"> <a href="http://puntodemascotas.com/responder-pregunta.php?id_veterinaria='.$veterinaria["id"].'&id_pregunta='.$pregunta["id"].'" style="padding: 10px ;color: #ffffff; background-color:#1a888b; text-decoration:none; float:left;"><font color="#ffffff">RESPONDER PREGUNTA</font></a> </td> </tr> <tr> <td style="padding: 0px 0 10px 0; color: #153643; font-family: Arial, sans-serif; font-size: 12px; line-height: 20px;"> Si el botón no lo lleva a una página de confirmación, copie y pegue el siguiente enlace en una ventana de su explorador </td> </tr> <tr> <td style="padding: 10px 0 10px 0; color: #153643; font-family: Arial, sans-serif; font-size: 12px; line-height: 20px;"> <a href="#" style="text-decoration:none; float:left;"><font color="#1a888b">http://puntodemascotas.com/responder-pregunta.php?id_veterinaria='.$veterinaria["id"].'&id_pregunta='.$pregunta["id"].'</font></a> </td> </tr> <tr> <td style="padding: 0px 0 10px 0; color: #153643; font-family: Arial, sans-serif; font-size: 12px; line-height: 20px;"> Gracias por utilizar nuestros servicios </td> </tr> <tr> <td style="padding: 0px 0 10px 0; color: #153643; font-family: Arial, sans-serif; font-size: 12px; line-height: 20px;"> Saludos!<br /><b>El equipo de Punto de Mascotas</b> </td> </tr> </table> <!-- FIN MENSAJE 3 --> '; //mensaje pie $mensaje .= ' </td> </tr> <tr> <td bgcolor="#1A4C50" style="padding: 30px 30px 30px 30px;"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td style="color: #ffffff; font-family: Arial, sans-serif; font-size: 14px;" width="75%"> © 2015 Punto de Mascotas<br/> <a href="www.puntodemascotas.com.ar" style="color: #ffffff;"><font color="#ffffff">www.puntodemascota.com.ar</font></a> - Todos los Derechos Reservados </td> <td align="right" width="25%"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td style="font-family: Arial, sans-serif; font-size: 12px; font-weight: bold;"> <a href="http://www.twitter.com/" style="color: #ffffff;"> <img src="http://puntodemascotas.com/mail/tw.gif" alt="Twitter" width="38" height="38" style="display: block;" border="0" /> </a> </td> <td style="font-size: 0; line-height: 0;" width="20"> </td> <td style="font-family: Arial, sans-serif; font-size: 12px; font-weight: bold;"> <a href="http://www.twitter.com/" style="color: #ffffff;"> <img src="http://puntodemascotas.com/mail/fb.gif" alt="Facebook" width="38" height="38" style="display: block;" border="0" /> </a> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table>
</body> </html> ';
$php_email = new PHPMailer(); /* autentificacion */ $mail->IsSMTP(); //$mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only $mail->Host = "mail.puntodemascotas.com"; $mail->Port = 587; //$mail->SMTPSecure = 'tls'; $mail->SMTPAuth = true; $mail->Username = "notificaciones@puntodemascotas.com"; $mail->Password = "NOT.102.pun"; /* Fin autentificacion */
$php_email->From = "notificaciones@puntodemascotas.com"; $php_email->FromName = "Punto de Mascotas"; $php_email->Subject = $titulo; $php_email->Body = utf8_decode($mensaje); $php_email->AddAddress( $veterinaria["email"] ); $php_email->IsHTML(true);
$php_email->Send();
} //fin veterinarias destacadas
header('Location: administrar-consultas-pendientes.php?exito=si'); }
if (isset($_GET["id"])){ $id=cadena_segura($_GET["id"],11); $result=$mysqli->query(" SELECT id, titulo FROM consulta_veterinarias WHERE id='$id' "); $item = mysqli_fetch_assoc($result); ?> <div class="modal-content"> <form method="post" action="autorizar-consulta-veterinarias.php"> <input type="hidden" name="id" value="<?=$id?>"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title"></h4> </div> <div class="modal-body"> <div class="form-group"> <label>Título</label> <input class="form-control" name="titulo" value="<?=utf8_encode($item["titulo"])?>" disabled="disabled"> </div> </div> <div class="modal-footer"> <a href="#" class="btn btn-white" data-dismiss="modal">Cerrar</a> <input type="submit" class="btn btn-primary" value="Autorizar"> </div> </form> </div><!-- /.modal-content --> <? }?>
|