![]() Server : LiteSpeed System : Linux premium84.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : claqxcrl ( 523) PHP Version : 8.1.32 Disable Function : NONE Directory : /home/claqxcrl/www/ondjoweb/admin/ |
<?php session_start(); include('includes/config.php'); error_reporting(0); ################# FILIPE MEIA INICIA NAMESAPCE PHPMAILER######################### ################################################################################# // Import PHPMailer classes into the global namespace // These must be at the top of your script, not inside a function use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\SMTP; use PHPMailer\PHPMailer\Exception; // Load Composer's autoloader require 'mail/vendor/autoload.php'; #################FIM FILIPE MEIA TERMINA NAMESAPCE PHPMAILER######################## ################################################################################### if(strlen($_SESSION['login'])==0) { header('location:index.php'); } else{ $dateAtive = date('d-m-Y'); // Code for Forever deletionparmdel if($_GET['action']=='del' && $_GET['rid']) { $id=intval($_GET['rid']); $query=mysqli_query($con,"delete from carro_anunciado where id='$id'"); $delmsg="Dado eliminado permanentemente"; } if($_GET['action']=='ative' && $_GET['rid']) { $id=intval($_GET['rid']); $query=mysqli_query($con,"update carro_anunciado set estado='ativo', dataAtivacao='$dateAtive' where id='$id'"); $ativemsg="Dado foi ativado"; } ?> <!DOCTYPE html> <html lang="pt"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title> OndjoWEB| CMS</title> <link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <link href="assets/css/core.css" rel="stylesheet" type="text/css" /> <link href="assets/css/components.css" rel="stylesheet" type="text/css" /> <link href="assets/css/icons.css" rel="stylesheet" type="text/css" /> <link href="assets/css/pages.css" rel="stylesheet" type="text/css" /> <link href="assets/css/menu.css" rel="stylesheet" type="text/css" /> <link href="assets/css/responsive.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" href="../plugins/switchery/switchery.min.css"> <script src="assets/js/modernizr.min.js"></script> </head> <body class="fixed-left"> <!-- Begin page --> <div id="wrapper"> <!-- Top Bar Start --> <?php include('includes/topheader.php');?> <!-- ========== Left Sidebar Start ========== --> <?php include('includes/leftsidebar.php');?> <!-- Left Sidebar End --> <!-- ============================================================== --> <!-- Start right Content here --> <!-- ============================================================== --> <div class="content-page"> <!-- Start content --> <div class="content"> <div class="container"> <div class="row"> <div class="col-xs-12"> <div class="page-title-box"> <h4 class="page-title">Anúncios ativos</h4> <ol class="breadcrumb p-0 m-0"> <li> <a href="#">Anúncios </a> </li> </ol> <div class="clearfix"></div> </div> </div> </div> <!-- end row --> <div class="row"> <div class="col-sm-6"> <?php if($msg){ ?> <div class="alert alert-success" role="alert"> <strong>Sucesso! </strong> <?php echo htmlentities($msg);?> </div> <?php } ?> <?php if($ativemsg){ ?> <div class="alert alert-success" role="alert"> <strong>Boas! </strong> <?php echo htmlentities($ativemsg);?></div> <?php #Pega os campos via URL# ######################## $idAnuncio=$_GET['rid']; $idUser=$_GET['uI']; $marca=$_GET['mA']; $modelo=$_GET['mO']; $anoFab=$_GET['aF']; $velocidade=$_GET['vE']; $quilometros=$_GET['qU']; $combustivel=$_GET['cOM']; $cor=$_GET['cO']; $preco=$_GET['pR']; $foto=$_GET['imG']; $duracaoAnun=$_GET['dUR']; $contato=$_GET['eM']; $ano=date('Y'); ################# FILIPE MEIA INICIA CLASSE PHPMAILER############################ ################################################################################# // Instantiation and passing `true` enables exceptions $mail = new PHPMailer(true); try { //Server settings //$mail->SMTPDebug = SMTP::DEBUG_SERVER; // Enable verbose debug output $mail->isSMTP(); // Send using SMTP $mail->Host = 'smtp.gmail.com'; // Set the SMTP server to send through $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = 'ondjomail@gmail.com'; // SMTP username $mail->Password = '#Ondjo375%!'; // SMTP password $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged $mail->Port = 587; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above #Configuracao da mensagem //Recipients $mail->setFrom('admin@buedecarro.com', 'Admin BuedeCarro'); // Set the sender of the message. $mail->addAddress('higinoarmando@gmail.com', 'BuedeCarro Sr. Higino Armando'); $mail->addAddress($contato, 'Anunciante:'.$idUser.''); $mail->AddReplyTo($contato, 'Anunciante:'.$idUser.''); $mail->AddReplyTo('higinoarmando@gmail.com', 'BuedeCarro Sr. Higino Armando'); $mail->AddBCC('filipemeia@ondjobytes.ao', 'Filipe Meia - OndjoBYTES'); $mail->AddBCC('admin@ondjobytes.ao', 'Admin - OndjoBYTES'); // Attachments //$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments //$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name // Content $mail->isHTML(true); // Set email format to HTML $mail->Subject = 'BuedeCarro | Ativação do anúncio ('.$idAnuncio.') '; $mail->Body = ' <div style="color:#333;font-family:Nunito, Arial, Helvetica Neue, Helvetica, sans-serif;line-height:1.2;padding-top:10px;padding-right:10px;padding-bottom:10px;padding-left:10px;"> <div style="line-height: 1.2; font-size: 12px; color: #b11a4f; font-family: Nunito, Arial, Helvetica Neue, Helvetica, sans-serif; mso-line-height-alt: 14px;"> <p style="font-size: 14px; line-height: 1.2; word-break: break-word; text-align: center; mso-line-height-alt: 17px; margin: 0;">Olá <strong>'.$contato.'</strong>,</p> </div> </div> <!--[if mso]></td></tr></table><![endif]--> <!--[if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 10px; padding-left: 10px; padding-top: 10px; padding-bottom: 10px; font-family: Tahoma, Verdana, sans-serif"><![endif]--> <div style="color:#333;font-family:"Roboto", Tahoma, Verdana, Segoe, sans-serif;line-height:1.2;padding-top:10px;padding-right:10px;padding-bottom:10px;padding-left:10px;"> <div style="line-height: 1.2; font-size: 12px; font-family: "Roboto", Tahoma, Verdana, Segoe, sans-serif; color: #333; mso-line-height-alt: 14px;"> <p style="font-size: 26px; line-height: 1.2; word-break: break-word; text-align: center; font-family: Roboto, Tahoma, Verdana, Segoe, sans-serif; mso-line-height-alt: 31px; margin: 0;"><span style="font-size: 26px; color: #e6178f;"><strong><span style=""> <span style="color: #b11a4f;">SEU ANÚNCIO FOI ATIVADO COM SUCESSO! </span></span></strong></span></p> </div> </div> <div style="color:#333;font-family:"Roboto", Tahoma, Verdana, Segoe, sans-serif;line-height:1.2;padding-top:20px;padding-right:10px;padding-bottom:10px;padding-left:10px;"> <div style="line-height: 1.2; font-size: 12px; font-family: "Roboto", Tahoma, Verdana, Segoe, sans-serif; color: #333; mso-line-height-alt: 14px;"> <p style="font-size: 30px; line-height: 1.2; word-break: break-word; text-align: center; font-family: Roboto, Tahoma, Verdana, Segoe, sans-serif; mso-line-height-alt: 36px; margin: 0;"><span style="font-size: 30px;"><strong>Ficamos gratos por anunciar conosco!</strong></span></p> </div> </div> <div style="color:#555555;font-family:Nunito, Arial, Helvetica Neue, Helvetica, sans-serif;line-height:1.5;padding-top:10px;padding-right:25px;padding-bottom:20px;padding-left:25px;"> <div style="line-height: 1.5; font-size: 12px; color: #555555; font-family: Nunito, Arial, Helvetica Neue, Helvetica, sans-serif; mso-line-height-alt: 18px;"> <p style="font-size: 16px; line-height: 1.5; word-break: break-word; text-align: center; mso-line-height-alt: 24px; margin: 0;"><span style="color: #333; font-size: 16px;">Este é um email de notificação para informa-lo que seu anúncio com o ID (<strong>'.$idAnuncio.'</strong>), foi ativado com sucesso. Este será visível por <strong>'.$duracaoAnun.'</strong> dias, contando desde a data da sua ativação.</span></p> </div> </div> <div style="color:#ffffff;font-family:Nunito, Arial, Helvetica Neue, Helvetica, sans-serif;line-height:1.5;padding-top:0px;padding-right:25px;padding-bottom:25px;padding-left:25px;"> <div style="line-height: 1.5; font-size: 12px; color: #ffffff; font-family: Nunito, Arial, Helvetica Neue, Helvetica, sans-serif; mso-line-height-alt: 18px;"> <p style="font-size: 16px; line-height: 1.5; word-break: break-word; text-align: center; mso-line-height-alt: 24px; margin: 0;"><span style="color: #e03add; font-size: 16px;"><strong>DADOS DO ANÚNCIO:</strong></span></p> <p style="font-size: 16px; line-height: 1.5; word-break: break-word; text-align: center; mso-line-height-alt: 24px; margin: 0;"><span style="color: #6720b0; font-size: 16px;"><strong>Marca:</strong> '.$marca.'</span></p> <p style="font-size: 16px; line-height: 1.5; word-break: break-word; text-align: center; mso-line-height-alt: 24px; margin: 0;"><span style="color: #6720b0; font-size: 16px;"><strong>Modelo:</strong> '.$modelo.'</span></p> <p style="font-size: 16px; line-height: 1.5; word-break: break-word; text-align: center; mso-line-height-alt: 24px; margin: 0;"><span style="color: #6720b0; font-size: 16px;"><strong>Preço:</strong> '.$preco.' Kz</span></p> <p style="font-size: 16px; line-height: 1.5; word-break: break-word; text-align: center; mso-line-height-alt: 24px; margin: 0;"><span style="color: #6720b0; font-size: 16px;"><strong>Id do anúncio:</strong> '.$idAnuncio.'</span></p> </div> </div> <div align="center" class="img-container center autowidth" style="padding-right: 0px;padding-left: 0px;"> <!--[if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr style="line-height:0px"><td style="padding-right: 0px;padding-left: 0px;" align="center"><![endif]--><img align="center" alt="Alternate text" border="0" class="center autowidth" src="http://buedecarro.com/assets/img/SVG/buedecarro-logo-FINAL.svg" style="text-decoration: none; -ms-interpolation-mode: bicubic; height: auto; border: 0; width: 100%; max-width: 300px; display: block;" title="Alternate text" width="300"/> <!--[if mso]></td></tr></table><![endif]--> </div> <div style="color:#555555;font-family:Nunito, Arial, Helvetica Neue, Helvetica, sans-serif;line-height:1.5;padding-top:5px;padding-right:25px;padding-bottom:25px;padding-left:25px;"> <div style="line-height: 1.5; font-size: 12px; color: #555555; font-family: Nunito, Arial, Helvetica Neue, Helvetica, sans-serif; mso-line-height-alt: 18px;"> <p style="font-size: 14px; line-height: 1.5; word-break: break-word; text-align: center; mso-line-height-alt: 21px; margin: 0;"><a href="http://buedecarro.com/index.php?pg=sobre" rel="noopener" style="text-decoration: underline; color: #0068A5;" target="_blank">Sobre nós</a> | <a href="http://buedecarro.com/index.php?pg=contactos" rel="noopener" style="text-decoration: underline; color: #0068A5;" target="_blank">Contatos </a>|</p> <p style="font-size: 14px; line-height: 1.5; word-break: break-word; text-align: center; mso-line-height-alt: 21px; margin: 0;">'.$ano.' - BuedeCarro, todos direitos</p> </div> </div> <div style="color:#555555;font-family:Nunito, Arial, Helvetica Neue, Helvetica, sans-serif;line-height:1.5;padding-top:5px;padding-right:25px;padding-bottom:25px;padding-left:25px;"> <div style="line-height: 1.5; font-size: 12px; color: #555555; font-family: Nunito, Arial, Helvetica Neue, Helvetica, sans-serif; mso-line-height-alt: 18px;"> <p style="font-size: 14px; line-height: 1.5; word-break: break-word; text-align: center; mso-line-height-alt: 21px; margin: 0;">Sistema de Email por: <a href="https://ondjobytes.ao" rel="noopener" style="text-decoration: underline; color: #0068A5;" target="_blank" title="OndjoBYTES | Informática e Serviços">OndjoBYTES</a></p> </div> </div> '; $mail->AltBody = ' Ola '.$contato.' Este é um email de notificação para informa-lo que seu anúncio com o ID ('.$idAnuncio.'), foi ativado com sucesso. Este será visível por '.$duracaoAnun.' dias, contando desde a data da sua ativação. '; $mail->send(); echo "Notificação enviada com sucesso!"; } catch (Exception $e) { echo "Erro no envio da Notificação: {$mail->ErrorInfo}"; } ################# FILIPE MEIA TERMINA CLASSE PHPMAILER############################ ################################################################################# } ?> <?php if($delmsg){ ?> <div class="alert alert-danger" role="alert"> <strong>Oh pá! </strong> <?php echo htmlentities($delmsg);?></div> <?php } ?> </div> <div class="row"> <div class="col-md-12"> <div class="demo-box m-t-20"> <div class="table-responsive"> <table class="table m-0 table-colored-bordered table-bordered-warning"> <thead> <tr> <th> Id</th> <th>Marca</th> <th>Modelo</th> <th>Acção</th> </tr> </thead> <tbody> <?php $query=mysqli_query($con,"Select * from carro_anunciado where estado='pendente' order by marca asc"); $cnt=1; while($row=mysqli_fetch_array($query)) { ?> <tr> <td><?php echo htmlentities($row['id']);?></td> <td><?php echo htmlentities($row['marca']);?></td> <td><?php echo htmlentities($row['modelo']);?></td> <td> <a title="Ativar anuncio" href="manage-anuncio-p.php?rid=<?php echo htmlentities($row['id']);?>&action=ative&uI=<?php echo htmlentities($row['userId']);?>&mA=<?php echo htmlentities($row['marca']);?>&mO=<?php echo htmlentities($row['modelo']);?>&aF=<?php echo htmlentities($row['anofabrico']);?>&vE=<?php echo htmlentities($row['velocidade']);?>&qU=<?php echo htmlentities($row['quilometros']);?>&cOM=<?php echo htmlentities($row['combustivel']);?>&cO=<?php echo htmlentities($row['cor']);?>&pR=<?php echo htmlentities($row['preco']);?>&imG=<?php echo htmlentities($row['imgCarro']);?>&dUR=<?php echo htmlentities($row['duracaoDias']);?>&eM=<?php echo htmlentities($row['contactoEmail']);?>"> <i class="fa fa-thumbs-up" style="color: green"></i></a> <a title="Eliminar" href="manage-anuncio-p.php?rid=<?php echo htmlentities($row['id']);?>&action=del"> <i class="fa fa-trash-o" style="color: red"></i></a> </td> </tr> <?php $cnt++; } ?> </tbody> </table> </div> </div> </div> </div> <!--- end row --> </div> <!-- container --> </div> <!-- content --> <?php include('includes/footer.php');?> </div> </div> <!-- END wrapper --> <script> var resizefunc = []; </script> <!-- jQuery --> <script src="assets/js/jquery.min.js"></script> <script src="assets/js/bootstrap.min.js"></script> <script src="assets/js/detect.js"></script> <script src="assets/js/fastclick.js"></script> <script src="assets/js/jquery.blockUI.js"></script> <script src="assets/js/waves.js"></script> <script src="assets/js/jquery.slimscroll.js"></script> <script src="assets/js/jquery.scrollTo.min.js"></script> <script src="../plugins/switchery/switchery.min.js"></script> <!-- App js --> <script src="assets/js/jquery.core.js"></script> <script src="assets/js/jquery.app.js"></script> </body> </html> <?php } ?>