/var/www/vhosts/sivana.com.br/httpdocs/newsletter.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<?php

require_once("_private/conectar.php");


$id $_REQUEST["op"];


$mat mysql_query("SELECT * from news_assoc where idnews_assoc='$id'") or die ("Erro ao selecionar");
$total mysql_num_rows($mat);


if (
$total ){
    
$cont =1;
    
$linha mysql_fetch_array($mat);
    
$idnews base64_encode($linha['idnews_assoc']);
    
$imagem $linha['promocao'];
    
$texto1 $linha['texto'];
    
$assunto $linha['titulo'];
    
$not1 $linha['noticia1'];
    
$not2 $linha['noticia2'];
    
$not3 $linha['noticia3'];
mysql_free_result($mat);
    
$nots="";
    if ((
$not1<>'') and ($not1<>NULL)){
    
$sel_n =  mysql_query("SELECT idartigo,titulo,intro, imagem FROM artigo where idartigo='".$not1."' limit 0,1") or die ("Erro ao selecionar usuarios - Cod(1)");
    
$tot_n mysql_num_rows($sel_n);
    if (
$tot_n){
        
$i_n1 mysql_result($sel_n,0,3);
        if (
$i_n1<>''){
        
$in1 "<td style='width:180px'><a href='http://www.sivana.com.br/noticia/$not1' border='0'><img src='http://www.sivana.com.br/userfiles/image/".$i_n1."' width='180'></a></td>";
        }else{
        
$in1 ="";
        }
        
$titulo1=mysql_result($sel_n,0,1);
        
$chamada1=mysql_result($sel_n,0,2);
        
$nots.="<tr><td style='border-bottom:1px solid #E9E9E9'>
        <table border='0' cellspacing='2'>
        <tr>
        
$in1
        <td><font face='Arial, Helvetica, sans-serif' size='3' color='#155391'><a href='http://www.sivana.com.br/noticia/
$not1'>$titulo1</a></font><br><font face='Arial, Helvetica, sans-serif' size='2' color='#333333'>$chamada1</font>
        </td>
        </table>
        </td></tr>"
;
    }
    }

    if ((
$not2<>'') and ($not2<>NULL)){
    
$sel_n =  mysql_query("SELECT idartigo,titulo,intro, imagem FROM artigo where idartigo='".$not2."' limit 0,1") or die ("Erro ao selecionar usuarios - Cod(1)");
    
$tot_n mysql_num_rows($sel_n);
    if (
$tot_n){
        
$i_n2 mysql_result($sel_n,0,3);
        if (
$i_n2<>''){
        
$in2 "<td style='width:180px'><a href='http://www.sivana.com.br/noticia/$not2' border='0'><img src='http://www.sivana.com.br/userfiles/image/".$i_n2."' width='180'></a></td>";
        }else{
        
$in2 ="";
        }
        
$titulo2=mysql_result($sel_n,0,1);
        
$chamada2=mysql_result($sel_n,0,2);
        
$nots.="<tr><td style='border-bottom:1px solid #E9E9E9'>
        <table border='0' cellspacing='2'>
        <tr>
        
$in2
        <td><font face='Arial, Helvetica, sans-serif' size='3' color='#155391'><a href='http://www.sivana.com.br/noticia/
$not2' >$titulo2</a></font>
        </td>
        </table>
        </td></tr>"
;
    }
    }
    
    if ((
$not3<>'') and ($not3<>NULL)){
    
$sel_n =  mysql_query("SELECT idartigo,titulo,intro, imagem FROM artigo where idartigo='".$not3."' limit 0,1") or die ("Erro ao selecionar usuarios - Cod(1)");
    
$tot_n mysql_num_rows($sel_n);
    if (
$tot_n){
        
$i_n3 mysql_result($sel_n,0,3);
        if (
$i_n3<>''){
        
$in3 "<td style='width:180px'><a href='http://www.sivana.com.br/noticia/$not3' border='0'><img src='http://www.sivana.com.br/userfiles/image/".$i_n3."' width='180'></a></td>";
        }else{
        
$in3 ="";
        }
        
$titulo3=mysql_result($sel_n,0,1);
        
$chamada3=mysql_result($sel_n,0,2);
        
$nots.="<tr><td style='border-bottom:1px solid #E9E9E9'>
        <table border='0' cellspacing='2'>
        <tr>
        
$in3
        <td><font face='Arial, Helvetica, sans-serif' size='3' color='#155391'><a href='http://www.sivana.com.br/noticia/
$not3' >$titulo3</a></font>
        </td>
        </table>
        </td></tr>"
;
    }
    }


        
        
        if (
$imagem <> ""){
        
$imagem2 ='http://www.sivana.com.br/images/logo_sivana2.jpg';
        
$i_anexo ="<tr>
            <td colspan='2' align='center'><img src='http://www.sivana.com.br/news/
$imagem'></td>
            </tr>"
;    
        }else{
        
$imagem2 ='http://www.sivana.com.br/images/logo_sivana.jpg';    
        
$i_anexo "";
        }
        

//Agora basta imprimir na tela...
        
$body 
        <html>
        <head>
        <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
        </head>
        <body link='#155391' vlink='#333333' alink='#333333' style='background-color:#fff; margin:0px; padding:0px' spellcheck='false'>
        <table cellspacing='0' cellpadding='0' border='0' width='545' bgcolor='#F1F1F1' align='center'>
        <tr>
        <td style='padding:20px'>
        
        <table width='100%' border='0' cellspacing='6' cellpadding='0' bgcolor='#FFFFFF'>
              <tr>
            <td colspan='2' align='center' bgcolor='#FFFFFF'><a href='http://www.sivana.com.br'><img src=
$imagem2></a></td>
            </tr>
            
$i_anexo
            
$nots
            <tr><td bgcolor='#FFFFFF'><font face='Arial, Helvetica, sans-serif' size='2' color='#333333'>
$texto1</font></td></tr>
            
                <tr>
                <td></td>
                </tr>
                </table>
                <table bgcolor='#165491' border='0' cellspacing='5' cellpadding='5' width='100%' >
                <tr>
                <td>
                <font color='#FFFFFF' face='Arial, Helvetica, sans-serif'><strong><font size='2'>SIVANA </font></strong><font size='2'> - <a href='http://www.sivana.com.br' style='color:#FFFFFF'>www.sivana.com.br</a></font></font>
                </td>
                </tr>
                </table>
                
                
                <table bgcolor='#FFFFFF' border='0' cellspacing='5' cellpadding='5' width='100%' >
                <tr><td>
                <table width='225' border='0' cellspacing='0' cellpadding='0' align='right'>
                    <tr>
                      <td><span style='font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #155391;'>Siga nos nas redes sociais:</span></td>
                      <td><table width='70' border='0' cellspacing='0' cellpadding='0'>
                        <tr>
                          <td width='35'><a href='https://www.facebook.com/sivana.sivana.543?ref=ts&fref=ts'><img src='http://www.sivana.com.br/images/icon-face.jpg' width='34' height='33' border='0'></a></td>
                        </tr>
                      </table></td>
                    </tr>
                  </table>
                 </td></tr></table>
                <br>
                
                
         
            
        
       </td></tr></table>            
        </body>
        </html>

        "
;                      //HTML Body
        //$mail->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
        //$mail->WordWrap   = 50; // set word wrap
        
        
echo $body;; 
        
        

}




?>