Current Path : /web/htdocs/www.entinoprofit.org/home/admin/
Upload File :
Current File : /web/htdocs/www.entinoprofit.org/home/admin/view_code.php

<?php


$html = '';

include_once("include/config.php");
include_once("include/auth.lib.php");

list($status, $user) = auth_get_status();

if ($_POST['e-postmain'] && $_POST['e-postmain'] == 'Crea codice RIVS') {


$html .='<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><title></title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><meta name="viewport" content="width=320, target-densitydpi=device-dpi"><style type="text/css">

@media only screen and (max-width: 660px) { 
table[class=w0], td[class=w0] { width: 0 !important; }
table[class=w10], td[class=w10], img[class=w10] { width:10px !important; }
table[class=w15], td[class=w15], img[class=w15] { width:5px !important; }
table[class=w30], td[class=w30], img[class=w30] { width:10px !important; }
table[class=w60], td[class=w60], img[class=w60] { width:10px !important; }
table[class=w125], td[class=w125], img[class=w125] { width:80px !important; }
table[class=w130], td[class=w130], img[class=w130] { width:55px !important; }
table[class=w140], td[class=w140], img[class=w140] { width:90px !important; }
table[class=w160], td[class=w160], img[class=w160] { width:180px !important; }
table[class=w170], td[class=w170], img[class=w170] { width:100px !important; }
table[class=w180], td[class=w180], img[class=w180] { width:80px !important; }
table[class=w195], td[class=w195], img[class=w195] { width:80px !important; }
table[class=w220], td[class=w220], img[class=w220] { width:80px !important; }
table[class=w240], td[class=w240], img[class=w240] { width:180px !important; }
table[class=w255], td[class=w255], img[class=w255] { width:185px !important; }
table[class=w275], td[class=w275], img[class=w275] { width:135px !important; }
table[class=w280], td[class=w280], img[class=w280] { width:135px !important; }
table[class=w300], td[class=w300], img[class=w300] { width:140px !important; }
table[class=w325], td[class=w325], img[class=w325] { width:95px !important; }
table[class=w360], td[class=w360], img[class=w360] { width:140px !important; }
table[class=w410], td[class=w410], img[class=w410] { width:180px !important; }
table[class=w470], td[class=w470], img[class=w470] { width:200px !important; }
table[class=w580], td[class=w580], img[class=w580] { width:280px !important; }
table[class=w640], td[class=w640], img[class=w640] { width:300px !important; }
table[class*=hide], td[class*=hide], img[class*=hide], p[class*=hide], span[class*=hide] { display:none !important; }
table[class=h0], td[class=h0] { height: 0 !important; }
p[class=footer-content-left] { text-align: center !important; }
#headline p { font-size: 30px !important; }
.article-content, #left-sidebar{ -webkit-text-size-adjust: 90% !important; -ms-text-size-adjust: 90% !important; }
.header-content, .footer-content-left {-webkit-text-size-adjust: 80% !important; -ms-text-size-adjust: 80% !important;}
img { height: auto; line-height: 100%;}
div.cornice {
  width: 80px;
  height: 80px;
  margin:5px;
  overflow: hidden; 
}
.cornice img {
  width: 100%;
  height: auto;  
}
 } 
#outlook a { padding: 0; }	
body { width: 100% !important; }
.ReadMsgBody { width: 100%; }
.ExternalClass { width: 100%; display:block !important; } 
body { background-color: #ececec; margin: 0; padding: 0; }
hr.style-six { border: 0;height: 0;border-top: 2px solid rgba(0, 0, 0, 0.1);border-bottom: 2px solid rgba(255, 255, 255, 0.3);}
img { outline: none; text-decoration: none; display: block;}
br, strong br, b br, em br, i br { line-height:100%; }
h1, h2, h3, h4, h5, h6 { line-height: 100% !important; -webkit-font-smoothing: antialiased; }
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { color: blue !important; }
h1 a:active, h2 a:active,  h3 a:active, h4 a:active, h5 a:active, h6 a:active {	color: red !important; }

h1 a:visited, h2 a:visited,  h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited { color: purple !important; }

table td, table tr { border-collapse: collapse; }
.yshortcuts, .yshortcuts a, .yshortcuts a:link,.yshortcuts a:visited, .yshortcuts a:hover, .yshortcuts a span {
color: black; text-decoration: none !important; border-bottom: none !important; background: none !important;
}	

code {
  white-space: normal;
  word-break: break-all;
}
#background-table { background-color: #ececec; }
/* Webkit Elements */
#top-bar { border-radius:6px 6px 0px 0px; -moz-border-radius: 6px 6px 0px 0px; -webkit-border-radius:6px 6px 0px 0px; -webkit-font-smoothing: antialiased; background-color: #333333; color: #faffff; }
#top-bar a { font-weight: bold; color: #faffff; text-decoration: none;}
#footer { border-radius:0px 0px 6px 6px; -moz-border-radius: 0px 0px 6px 6px; -webkit-border-radius:0px 0px 6px 6px; -webkit-font-smoothing: antialiased; }
body, td { font-family: \'Helvetica Neue\', Arial, Helvetica, Geneva, sans-serif; }
.header-content, .footer-content-left, .footer-content-right { -webkit-text-size-adjust: none; -ms-text-size-adjust: none; }
.header-content { font-size: 12px; color: #d5e9e7; }
.header-content a { font-weight: bold; color: #faffff; text-decoration: none; }
#headline p { color: #72a6a6; font-family: \'Helvetica Neue\', Arial, Helvetica, Geneva, sans-serif; font-size: 36px; text-align: center; margin-top:0px; margin-bottom:30px; }
#headline p a { color: #72a6a6; text-decoration: none; }
.article-title { font-size: 18px; line-height:24px; color: #284391; font-weight:bold; margin-top:0px; margin-bottom:18px; font-family: \'Helvetica Neue\', Arial, Helvetica, Geneva, sans-serif; }
.article-title a { color: #284391; text-decoration: none; }
.article-title.with-meta {margin-bottom: 0;}
.article-meta { font-size: 13px; line-height: 20px; color: #ccc; font-weight: bold; margin-top: 0;}
.article-content { font-size: 13px; line-height: 18px; color: #444444; margin-top: 0px; margin-bottom: 18px; font-family: \'Helvetica Neue\', Arial, Helvetica, Geneva, sans-serif; }
.article-content a { color: #e6203b; font-weight:bold; text-decoration:none; }
.article-content img { max-width: 100% }
.article-content ol, .article-content ul { margin-top:0px; margin-bottom:18px; margin-left:19px; padding:0; }
.article-content li { font-size: 13px; line-height: 18px; color: #444444; }
.article-content li a { color: #e6203b; text-decoration:underline; }
.article-content p {margin-bottom: 15px;}
.footer-content-left { font-size: 12px; line-height: 15px; color: #72a6a6; margin-top: 0px; margin-bottom: 15px; }
.footer-content-left a { color: #ffffff; font-weight: bold; text-decoration: none; }
.footer-content-right { font-size: 11px; line-height: 16px; color: #72a6a6; margin-top: 0px; margin-bottom: 15px; }
.footer-content-right a { color: #ffffff; font-weight: bold; text-decoration: none; }
#footer { background-color: #333333; color: #faffff; }
#footer a { color: #faffff; text-decoration: none; font-weight: bold; }
#permission-reminder { white-space: normal; }
#street-address { color: #d5e9e7; white-space: normal; }
div.cornice {
  width: 80px;
  height: 80px;
  margin:5px;
  overflow: hidden; 
}
.cornice img {
  width: 100%;
  height: auto;  
}
</style>
</head><body>

<table id="background-table" border="0" cellpadding="0" cellspacing="0" width="100%">
	<tbody><tr>
		<td align="center" bgcolor="#ececec">
        	<table class="w640" style="margin:0 10px;" border="0" cellpadding="0" cellspacing="0" width="640">
            	<tbody><tr><td class="w640" height="20" width="640"></td></tr>
                
            	<tr>
                	<td class="w640" width="640">
                        <table id="top-bar" class="w640" bgcolor="#d5e9e7" border="0" cellpadding="0" cellspacing="0" width="640">
    <tbody><tr>
        <td class="w15" width="15"></td>
        <td class="w325" align="left" valign="middle" width="350">
            <table class="w325" border="0" cellpadding="0" cellspacing="0" width="350">
                <tbody><tr><td class="w325" height="8" width="350"></td></tr>
            </tbody></table>
            <div class="header-content">Newsletter del '.strtoupper(strftime("%d %B %Y",time())).'</div>
            <table class="w325" border="0" cellpadding="0" cellspacing="0" width="350">
                <tbody><tr><td class="w325" height="8" width="350"></td></tr>
            </tbody></table>
        </td>
        <td class="w30" width="30"></td>
        <td class="w255" align="right" valign="middle" width="255">
            <table class="w255" border="0" cellpadding="0" cellspacing="0" width="255">
                <tbody><tr><td class="w255" height="8" width="255"></td></tr>
            </tbody></table>
            <table border="0" cellpadding="0" cellspacing="0">
    <tbody><tr>
        
        <td valign="middle"><fblike likeurl="https://www.facebook.com/acsi.veneto.padova"><img src="https://img.createsend1.com/img/templatebuilder/like-glyph.png" alt="Facebook icon"="" border="0" height="14" width="8"></fblike></td>
        <td width="3"></td>
        <td valign="middle"><div class="header-content"><a href="http://www.facebook.com/registrorivs">Facebook</a></div></td>  
        
        <td class="w10" width="10"></td>
 
    </tr>
</tbody></table>
            <table class="w255" border="0" cellpadding="0" cellspacing="0" width="255">
                <tbody><tr><td class="w255" height="8" width="255"></td></tr>
            </tbody></table>
        </td>
        <td class="w15" width="15"></td>
    </tr>
</tbody></table>
                        
                    </td>
                </tr>
                <tr>
                <td id="header" class="w640" align="center" bgcolor="#d5e9e7" width="640">
    
    <div style="text-align: center" align="center">
        <a href="http://www.entinoprofit.org">
<img id="customHeaderImage" label="Header Image" editable="true" src="http://www.entinoprofit.org/admin/newsletter/template/rivs/images/header.jpg" class="w640" style="display: inline" align="top" border="0" width="640">
        </a>
    </div>
    
    
</td>
                </tr>
				

                
                <tr>
				
				
				<td class="w640" bgcolor="#ffffff" height="30" width="640"></td></tr>
				
                     
 <tr id="simple-content-row"><td class="w640" bgcolor="#ffffff" width="640">
    <table class="w640" border="0" cellpadding="0" cellspacing="0" width="640">
        <tbody><tr>
            <td class="w30" width="30"></td>
            <td class="w580" width="580">
                <repeater>';  
	if($_POST['testo'] != '') {
	$html.= '<layout label="Text with left-aligned image">
                        <table class="w580" border="0" cellpadding="0" cellspacing="0" width="580">
                            <tbody><tr>
                                <td class="w580" width="580">
                                    <div class="article-content" align="left"><multiline label="Description">
									'.$_POST['testo'].'
									</multiline>
                                    </div>
                                </td>
                            </tr>
                            <tr><td class="w580" height="20" width="580"><hr class="style-six"></td></tr>
                        </tbody></table>
                    </layout>';
	}
	while(list($key, $val) = each($_POST["sendML"])) 
			
	{ 
		if($val == 'send')
		$deleteIds[] = $key;
		
		$query = "SELECT id,titolo,testo,date,acsi,rivs FROM news WHERE id = '$key'";
		$result = mysql_query($query) or die (mysql_error());
		$array = mysql_fetch_array($result,MYSQL_BOTH);
		
		$html .= '<layout label="Text with left-aligned image">
                        <table class="w580" border="0" cellpadding="0" cellspacing="0" width="580">
                            <tbody><tr>
                                <td class="w580" width="580">
                                    <p class="article-title" align="left"><singleline label="Title">'.$array['titolo'].'</singleline></p>';
						   
		$html .= '<table align="left" border="0" cellpadding="0" cellspacing="0">
                                        <tbody><tr>
                                            <td><div class="cornice">';
											
		$html .= set_image(stripslashes($array['testo']));
											
											
		$html .= '</div></td>
                                            <td class="w30" width="15"></td>
                                        </tr>
                                        <tr><td></td><td class="w30" height="5" width="15"></td></tr>
                                    </tbody></table>';									

		$html .='<div class="article-content" align="left"><multiline label="Description">';
		
		$html .= cutHtmlText(stripslashes($array['testo']),200,'...',false, false, true);
		
		if($array['acsi'] == 1) {
		
		$html.='<p><a href="http://www.entinoprofit.org/news.php?id='.$array['id'].'">&raquo; Leggi Tutto: '.$array['titolo'].'</a></p>';
		
		
		} elseif ($array['rivs'] == 1) {
		
		
		$html.='<p><a href="http://www.rivs.it/news.php?id='.$array['id'].'">&raquo; Leggi Tutto: '.$array['titolo'].'</a></p>';

		}
		
		
		$html.='</multiline>
                                    </div>
                                </td>
                            </tr>
                            <tr><td class="w580" height="20" width="580"><hr class="style-six"></td></tr>
                        </tbody></table>
                    </layout>';
		
		
}


$html .= '</repeater>
            </td>
            <td class="w30" width="30"></td>
        </tr>
    </tbody></table>
</td></tr>
                <tr><td class="w640" bgcolor="#ffffff" height="15" width="640"></td></tr>
                
                <tr>
                <td class="w640" width="640">
    <table id="footer" class="w640" bgcolor="#2739b0" border="0" cellpadding="0" cellspacing="0" width="640">
        <tbody><tr><td class="w30" width="30"></td><td class="w580 h0" height="30" width="360"></td><td class="w0" width="60"></td><td class="w0" width="160"></td><td class="w30" width="30"></td></tr>
        <tr>
            <td class="w30" width="30"></td>
            <td class="w580" valign="top" width="60">
            <span class="hide"><p id="permission-reminder" class="footer-content-left" align="left"></p></span>
            <p class="footer-content-left" align="left"><preferences lang="it-IT">&nbsp;</p>
            </td>
            <td class="hide w0" width="60"></td>
            <td class="hide w0" valign="top" width="460">
            <p id="street-address" class="footer-content-right" align="right">
			<span>RIVS Registro Italiano Veicoli Storici</span><br>
<span>Galleria Ognissanti 26, 35129 PADOVA</span><br>
<span>Tel. 049-7801907 Fax 049.7927413<br>WhatsApp 340.3708143<br>e-mail: segreteria@rivs.it </span><br>

</p>
            </td>
            <td class="w30" width="30"></td>
        </tr>
        <tr><td class="w30" width="30"></td><td class="w580 h0" height="15" width="360"></td><td class="w0" width="60"></td><td class="w0" width="160"></td><td class="w30" width="30"></td></tr>
    </tbody></table>
</td>
                </tr>
                <tr><td class="w640" height="60" width="640"></td></tr>
            </tbody></table>
        </td>
	</tr>
</tbody></table></body></html>';


//$html.= '<p style="font-size:75%;color: gray;margin-bottom:0;">Informativa ai sensi della Legge n. 675 del 31/12/96. In relazione al D. Lgs 196/2003 riguardante la "Tutela delle persone e di altri soggetti rispetto al trattamento dei dati personali" La informiamo che questa e-mail, inviata in CCN (copia nascosta), non contiene pubblicità né promozione di tipo commerciale ed è stata inviata a scopo informativo a una mailing list i cui indirizzi sono stati da noi ricevuti tramite adesioni e/o reperiti navigando in rete, da e-mail o altre fonti che li hanno resi pubblici. Garantiamo che tali dati vengono solo da noi utilizzati con la massima riservatezza esclusivamente per l\'invio gratuito di informazioni riguardanti attività associative. Questo messagg io non può essere considerato SPAM, poiché include la possibilità di essere rimosso da ulteriori invii di posta elettronica. Se ciò La disturba o questo invio è stato ricevuto doppio, ne chiediamo scusa. È sua facoltà richiedere la rettifica e la cancellazione degli stessi dati. Si prega di comunicarlo a associazioni@entinoprofit.org con una e-mail con oggetto CANCELLAMI oppure DOPPIO (se utilizzate più account, specificate l\'indirizzo o gli indirizzi esatti da rimuovere). In mancanza di una Sua esplicita comunicazione in merito riteniamo che Lei gradisca ricevere le nostre informazioni e ci sentiamo autorizzati a continuare gli invii. La presente e-mail può essere frutto di una digitazione sbagliata o di un invio da parte di un virus annidato nel pc e, di conseguenza, attrib uita erroneamente all\'IP di provenienza. Se ciò dovesse accadere, siete pregati di darcene immediatamente comunicazione, al fine di poter individuare la fonte ed eliminare il conseguente disagio dovuto all\'eventuale ripetersi dell\'evento. Grazie.</p>';



$html .= '';
	


} elseif ($_POST['e-postmain'] && $_POST['e-postmain'] == 'Crea codice ACSI') {


$html .='<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><title></title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><meta name="viewport" content="width=320, target-densitydpi=device-dpi"><style type="text/css">

@media only screen and (max-width: 660px) { 
table[class=w0], td[class=w0] { width: 0 !important; }
table[class=w10], td[class=w10], img[class=w10] { width:10px !important; }
table[class=w15], td[class=w15], img[class=w15] { width:5px !important; }
table[class=w30], td[class=w30], img[class=w30] { width:10px !important; }
table[class=w60], td[class=w60], img[class=w60] { width:10px !important; }
table[class=w125], td[class=w125], img[class=w125] { width:80px !important; }
table[class=w130], td[class=w130], img[class=w130] { width:55px !important; }
table[class=w140], td[class=w140], img[class=w140] { width:90px !important; }
table[class=w160], td[class=w160], img[class=w160] { width:180px !important; }
table[class=w170], td[class=w170], img[class=w170] { width:100px !important; }
table[class=w180], td[class=w180], img[class=w180] { width:80px !important; }
table[class=w195], td[class=w195], img[class=w195] { width:80px !important; }
table[class=w220], td[class=w220], img[class=w220] { width:80px !important; }
table[class=w240], td[class=w240], img[class=w240] { width:180px !important; }
table[class=w255], td[class=w255], img[class=w255] { width:185px !important; }
table[class=w275], td[class=w275], img[class=w275] { width:135px !important; }
table[class=w280], td[class=w280], img[class=w280] { width:135px !important; }
table[class=w300], td[class=w300], img[class=w300] { width:140px !important; }
table[class=w325], td[class=w325], img[class=w325] { width:95px !important; }
table[class=w360], td[class=w360], img[class=w360] { width:140px !important; }
table[class=w410], td[class=w410], img[class=w410] { width:180px !important; }
table[class=w470], td[class=w470], img[class=w470] { width:200px !important; }
table[class=w580], td[class=w580], img[class=w580] { width:280px !important; }
table[class=w640], td[class=w640], img[class=w640] { width:300px !important; }
table[class*=hide], td[class*=hide], img[class*=hide], p[class*=hide], span[class*=hide] { display:none !important; }
table[class=h0], td[class=h0] { height: 0 !important; }
p[class=footer-content-left] { text-align: center !important; }
#headline p { font-size: 30px !important; }
.article-content, #left-sidebar{ -webkit-text-size-adjust: 90% !important; -ms-text-size-adjust: 90% !important; }
.header-content, .footer-content-left {-webkit-text-size-adjust: 80% !important; -ms-text-size-adjust: 80% !important;}
img { height: auto; line-height: 100%;}
div.cornice {
  width: 80px;
  height: 80px;
  margin:5px;
  overflow: hidden; 
}
.cornice img {
  width: 100%;
  height: auto;  
}
 } 
#outlook a { padding: 0; }	
body { width: 100% !important; }
.ReadMsgBody { width: 100%; }
.ExternalClass { width: 100%; display:block !important; } 
body { background-color: #ececec; margin: 0; padding: 0; }
hr.style-six { border: 0;height: 0;border-top: 2px solid rgba(0, 0, 0, 0.1);border-bottom: 2px solid rgba(255, 255, 255, 0.3);}
img { outline: none; text-decoration: none; display: block;}
br, strong br, b br, em br, i br { line-height:100%; }
h1, h2, h3, h4, h5, h6 { line-height: 100% !important; -webkit-font-smoothing: antialiased; }
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { color: blue !important; }
h1 a:active, h2 a:active,  h3 a:active, h4 a:active, h5 a:active, h6 a:active {	color: red !important; }

h1 a:visited, h2 a:visited,  h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited { color: purple !important; }

table td, table tr { border-collapse: collapse; }
.yshortcuts, .yshortcuts a, .yshortcuts a:link,.yshortcuts a:visited, .yshortcuts a:hover, .yshortcuts a span {
color: black; text-decoration: none !important; border-bottom: none !important; background: none !important;
}	

code {
  white-space: normal;
  word-break: break-all;
}
#background-table { background-color: #ececec; }
/* Webkit Elements */
#top-bar { border-radius:6px 6px 0px 0px; -moz-border-radius: 6px 6px 0px 0px; -webkit-border-radius:6px 6px 0px 0px; -webkit-font-smoothing: antialiased; background-color: #284391; color: #b6cccc; }
#top-bar a { font-weight: bold; color: #faffff; text-decoration: none;}
#footer { border-radius:0px 0px 6px 6px; -moz-border-radius: 0px 0px 6px 6px; -webkit-border-radius:0px 0px 6px 6px; -webkit-font-smoothing: antialiased; }
body, td { font-family: \'Helvetica Neue\', Arial, Helvetica, Geneva, sans-serif; }
.header-content, .footer-content-left, .footer-content-right { -webkit-text-size-adjust: none; -ms-text-size-adjust: none; }
.header-content { font-size: 12px; color: #d5e9e7; }
.header-content a { font-weight: bold; color: #faffff; text-decoration: none; }
#headline p { color: #72a6a6; font-family: \'Helvetica Neue\', Arial, Helvetica, Geneva, sans-serif; font-size: 36px; text-align: center; margin-top:0px; margin-bottom:30px; }
#headline p a { color: #72a6a6; text-decoration: none; }
.article-title { font-size: 18px; line-height:24px; color: #284391; font-weight:bold; margin-top:0px; margin-bottom:18px; font-family: \'Helvetica Neue\', Arial, Helvetica, Geneva, sans-serif; }
.article-title a { color: #284391; text-decoration: none; }
.article-title.with-meta {margin-bottom: 0;}
.article-meta { font-size: 13px; line-height: 20px; color: #ccc; font-weight: bold; margin-top: 0;}
.article-content { font-size: 13px; line-height: 18px; color: #444444; margin-top: 0px; margin-bottom: 18px; font-family: \'Helvetica Neue\', Arial, Helvetica, Geneva, sans-serif; }
.article-content a { color: #e6203b; font-weight:bold; text-decoration:none; }
.article-content img { max-width: 100% }
.article-content ol, .article-content ul { margin-top:0px; margin-bottom:18px; margin-left:19px; padding:0; }
.article-content li { font-size: 13px; line-height: 18px; color: #444444; }
.article-content li a { color: #e6203b; text-decoration:underline; }
.article-content p {margin-bottom: 15px;}
.footer-content-left { font-size: 12px; line-height: 15px; color: #72a6a6; margin-top: 0px; margin-bottom: 15px; }
.footer-content-left a { color: #ffffff; font-weight: bold; text-decoration: none; }
.footer-content-right { font-size: 11px; line-height: 16px; color: #72a6a6; margin-top: 0px; margin-bottom: 15px; }
.footer-content-right a { color: #ffffff; font-weight: bold; text-decoration: none; }
#footer { background-color: #2739b0; color: #72a6a6; }
#footer a { color: #ffffff; text-decoration: none; font-weight: bold; }
#permission-reminder { white-space: normal; }
#street-address { color: #d5e9e7; white-space: normal; }
div.cornice {
  width: 80px;
  height: 80px;
  margin:5px;
  overflow: hidden; 
}
.cornice img {
  width: 100%;
  height: auto;  
}
</style>
</head><body>

<table id="background-table" border="0" cellpadding="0" cellspacing="0" width="100%">
	<tbody><tr>
		<td align="center" bgcolor="#ececec">
        	<table class="w640" style="margin:0 10px;" border="0" cellpadding="0" cellspacing="0" width="640">
            	<tbody><tr><td class="w640" height="20" width="640"></td></tr>
                
            	<tr>
                	<td class="w640" width="640">
                        <table id="top-bar" class="w640" bgcolor="#d5e9e7" border="0" cellpadding="0" cellspacing="0" width="640">
    <tbody><tr>
        <td class="w15" width="15"></td>
        <td class="w325" align="left" valign="middle" width="350">
            <table class="w325" border="0" cellpadding="0" cellspacing="0" width="350">
                <tbody><tr><td class="w325" height="8" width="350"></td></tr>
            </tbody></table>
            <div class="header-content">Newsletter del '.strtoupper(strftime("%d %B %Y",time())).'</div>
            <table class="w325" border="0" cellpadding="0" cellspacing="0" width="350">
                <tbody><tr><td class="w325" height="8" width="350"></td></tr>
            </tbody></table>
        </td>
        <td class="w30" width="30"></td>
        <td class="w255" align="right" valign="middle" width="255">
            <table class="w255" border="0" cellpadding="0" cellspacing="0" width="255">
                <tbody><tr><td class="w255" height="8" width="255"></td></tr>
            </tbody></table>
            <table border="0" cellpadding="0" cellspacing="0">
    <tbody><tr>
        
        <td valign="middle"><fblike likeurl="https://www.facebook.com/acsipadova"><img src="https://img.createsend1.com/img/templatebuilder/like-glyph.png" alt="Facebook icon"="" border="0" height="14" width="8"></fblike></td>
        <td width="3"></td>
        <td valign="middle"><div class="header-content"><a href="https://www.facebook.com/acsipadova">Facebook</a></div></td>
        
        
        <td class="w10" width="10"></td>
       
        <td width="3"></td>
  
        
    </tr>
</tbody></table>
            <table class="w255" border="0" cellpadding="0" cellspacing="0" width="255">
                <tbody><tr><td class="w255" height="8" width="255"></td></tr>
            </tbody></table>
        </td>
        <td class="w15" width="15"></td>
    </tr>
</tbody></table>
                        
                    </td>
                </tr>
                <tr>
                <td id="header" class="w640" align="center" bgcolor="#d5e9e7" width="640">
    
    <div style="text-align: center" align="center">
        <a href="http://www.entinoprofit.org">
<img id="customHeaderImage" label="Header Image" editable="true" src="http://www.entinoprofit.org/admin/newsletter/template/acsi/images/header.jpg" class="w640" style="display: inline" align="top" border="0" width="640">
        </a>
    </div>
    
    
</td>
                </tr>
                
                <tr><td class="w640" bgcolor="#ffffff" height="30" width="640"></td></tr>
                     
 <tr id="simple-content-row"><td class="w640" bgcolor="#ffffff" width="640">
    <table class="w640" border="0" cellpadding="0" cellspacing="0" width="640">
        <tbody><tr>
            <td class="w30" width="30"></td>
            <td class="w580" width="580">
                <repeater>';  
	
	if($_POST['testo'] != '') {
	$html.= '<layout label="Text with left-aligned image">
                        <table class="w580" border="0" cellpadding="0" cellspacing="0" width="580">
                            <tbody><tr>
                                <td class="w580" width="580">
                                    <div class="article-content" align="left"><multiline label="Description">
									'.$_POST['testo'].'
									</multiline>
                                    </div>
                                </td>
                            </tr>
                            <tr><td class="w580" height="20" width="580"><hr class="style-six"></td></tr>
                        </tbody></table>
                    </layout>';
	}
						 	 
	while(list($key, $val) = each($_POST["sendML"])) 
			
	{ 
		if($val == 'send')
		$deleteIds[] = $key;
		
		$query = "SELECT id,titolo,testo,date,acsi,rivs FROM news WHERE id = '$key'";
		$result = mysql_query($query) or die (mysql_error());
		$array = mysql_fetch_array($result,MYSQL_BOTH);
		
		$html .= '<layout label="Text with left-aligned image">
                        <table class="w580" border="0" cellpadding="0" cellspacing="0" width="580">
                            <tbody><tr>
                                <td class="w580" width="580">
                                    <p class="article-title" align="left"><singleline label="Title">'.$array['titolo'].'</singleline></p>';
						   
		$html .= '<table align="left" border="0" cellpadding="0" cellspacing="0">
                                        <tbody><tr>
                                            <td><div class="cornice">';
											
		$html .= set_image(stripslashes($array['testo']));
											
											
		$html .= '</div></td>
                                            <td class="w30" width="15"></td>
                                        </tr>
                                        <tr><td></td><td class="w30" height="5" width="15"></td></tr>
                                    </tbody></table>';									

		$html .='<div class="article-content" align="left"><multiline label="Description">';
		
		$html .= cutHtmlText(stripslashes($array['testo']),200,'...',false, false, true);
		
		if($array['acsi'] == 1) {
		
		$html.='<p><a href="http://www.entinoprofit.org/news.php?id='.$array['id'].'">&raquo; Leggi Tutto: '.$array['titolo'].'</a></p>';
		
		
		} elseif ($array['rivs'] == 1) {
		
		
		$html.='<p><a href="http://www.rivs.it/news.php?id='.$array['id'].'">&raquo; Leggi Tutto: '.$array['titolo'].'</a></p>';

		}
		
		
		$html.='</multiline>
                                    </div>
                                </td>
                            </tr>
                            <tr><td class="w580" height="20" width="580"><hr class="style-six"></td></tr>
                        </tbody></table>
                    </layout>';
		
		
}


$html .= '</repeater>
            </td>
            <td class="w30" width="30"></td>
        </tr>
    </tbody></table>
</td></tr>
                <tr><td class="w640" bgcolor="#ffffff" height="15" width="640"></td></tr>
                
                <tr>
                <td class="w640" width="640">
    <table id="footer" class="w640" bgcolor="#2739b0" border="0" cellpadding="0" cellspacing="0" width="640">
        <tbody><tr><td class="w30" width="30"></td><td class="w580 h0" height="30" width="360"></td><td class="w0" width="60"></td><td class="w0" width="160"></td><td class="w30" width="30"></td></tr>
        <tr>
            <td class="w30" width="30"></td>
            <td class="w580" valign="top" width="60">
            <span class="hide"><p id="permission-reminder" class="footer-content-left" align="left"></p></span>
            <p class="footer-content-left" align="left"><preferences lang="it-IT">&nbsp;</p>
            </td>
            <td class="hide w0" width="60"></td>
            <td class="hide w0" valign="top" width="460">
            <p id="street-address" class="footer-content-right" align="right">
			<span>ACSI Associazione Centri Sportivi Italiani</span><br>
<span>Comitato Regionale Veneto<br>Galleria Ognissanti 26, 35129 PADOVA</span><br>
<span>Tel. 049-7801907 Fax 049.7927413<br>WhatsApp 340.3708143<br> e-mail: segreteria@acsipadova.it </span><br>

</p>
            </td>
            <td class="w30" width="30"></td>
        </tr>
        <tr><td class="w30" width="30"></td><td class="w580 h0" height="15" width="360"></td><td class="w0" width="60"></td><td class="w0" width="160"></td><td class="w30" width="30"></td></tr>
    </tbody></table>
</td>
                </tr>
                <tr><td class="w640" height="60" width="640"></td></tr>
            </tbody></table>
        </td>
	</tr>
</tbody></table></body></html>';
				

}



echo '<form id="form1" name="form1" method="post" action=""><textarea name="textarea" cols="150" rows="100">';

echo $html;

echo '</textarea></form>';


echo '<div style="text-align:center;"><h2>ANTEPRIMA</h2></div>';

echo $html;