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

<?php
session_start(); 
session_destroy();

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

function img2path($string) {
	$string = str_replace("/admin/", "", $string);

	return $string;
} 


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

include_once("PHPMailer/class.phpmailer.php");

$sBasePath = "/admin/fckeditor/";

$email = '';

	if (isset($_POST['e-sendmain']))
	{
	
	
		while(list($key, $val) = each($_POST["send"])) 
			
			{ 

			$email .= $key.';';
		
			} 
		
	}	


?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Inserimento news Entinoprofit.org - Rivs.it - Aesnazionale.it</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK href="style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/javascript"> 
<!-- 
var num=1; 
function add_me() 
{ 
    if(document.createElement && document.getElementById && document.getElementsByTagName) 
    { 
        var oTr=document.createElement("TR"); 
        var oTd1=document.createElement("TD"); 
		oTd1.setAttribute("align", "left");
        var oTd2=document.createElement("TD");
		oTd2.setAttribute("align", "left"); 
		var oText=document.createTextNode("Allegato "+num) 
        var oField=document.createElement("INPUT");
		 
		oField.setAttribute("name","allegato"+num); 
		oField.setAttribute("type","file");


        oTd1.appendChild(oText); 
        oTd2.appendChild(oField); 
        
        oTr.appendChild(oTd1); 
        oTr.appendChild(oTd2); 
         

        document.getElementById('mytable').getElementsByTagName('tbody')[0].appendChild(oTr); 
        document.mail.quantita.value = num;
        num++ 
    } 
} 

function delete_me() 
{ 
    if(document.removeChild && document.getElementById && document.getElementsByTagName) 
    { 
        if(num>1) 
        { 
            var tb=document.getElementById('mytable').getElementsByTagName('TBODY')[0]; 
            var lastTr=tb.getElementsByTagName('TR')[(tb.getElementsByTagName('TR').length)-1] 
            document.mail.quantita.value = (num-2);
            tb.removeChild(lastTr); 
            num-- 
			
        } 
    } 
} 
//--> 
</script> 
<script src="ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="ckfinder/ckfinder.js"></script>
</head>
<body>
<div id="testata">
<table width="760" border="0" cellpadding="0" cellspacing="0" align="center">
  <!--DWLayoutTable-->
  <tr>
    <td height="105" colspan="2" valign="top"><img src="images/testata.jpg" width="760" height="105" border="0"></td>
  </tr>
<tr><td height="37" colspan="2" valign="center" background="images/navbar.gif"> 
<div align="center" class="titolo"><b>Pannello di invio email di massa</b></div>
</td> 
</tr>
</table>
</div>

<?php 

switch($status){
case AUTH_LOGGED:

include("menu.php"); 
?>
<div id="main">
<div id="news">

<div class="alert">Tramite questo pannello &egrave; possibile inviare email di massa. <br>
  Per inviare una email inserire il titolo, selezionare la mailing list di destinazione, il testo  ed eventuali allegati.<br>
  I campi contrassegnati con l'asterisco sono obbligatori.</div>

<form name="mail" action="sendMailSelected.php" TARGET="_blank" method="post" class="cssform" enctype="multipart/form-data">
<table class="cusco" width="760" border="0" cellpadding="0" cellspacing="0" align="center" id="mytable">
<tbody>
  <tr>
  <td class="cusco" width="25%" class="text3">Mittente</td>
  <td class="cusco" colspan="4"><input name="mittente" type="text" id="mittente" >
  *</td>
</tr>
  <tr>
  <td class="cusco" width="25%" class="text3">Email mittente</td>
  <td class="cusco" colspan="4"><input name="emailmitt" type="text" id="emailmitt" >
  *</td>
</tr>
  <tr>
  <td class="cusco" width="25%" class="text3">Titolo del messaggio</td>
  <td class="cusco" colspan="4"><input name="titolo" type="text" id="titolo" >
  *</td>
</tr>
  <tr>
  <td class="cusco" width="25%" class="text3">Destinatari</td>
  <td class="cusco" colspan="4"><textarea name="sendmail" cols="45" rows="5" wrap="physical" id="sendmail"><?php echo $email; ?></textarea>
  *</td>
</tr
></tbody>

<tr><td class="cusco">&nbsp;</td>
<td class="cusco" ><input name="quantita" type="hidden" class="locked" id="quantita" value="0" size="3" readonly>

        <input name="button" type="button" class="button" onClick="add_me()" value="Aggiungi Allegato">
        
        <input name="button2" type="button" class="button" onClick="delete_me()" value="Rimuovi Allegato">
        

</td></tr>
<tr><td class="cusco" colspan="5" height="20"></td></tr>
<tr>
<td colspan="5">
 <textarea id="mail" name="mail" rows="10" cols="40"></textarea>

<script>
    // Replace the <textarea id="editor1"> with a CKEditor
                // instance, using default configuration.
     CKEDITOR.replace( 'mail', {
  	//appena inserisci i valori "filebrowser..." compaiono automaticamente i vari tasti "Carica"
filebrowserBrowseUrl : 'ckfinder/ckfinder.html',
filebrowserImageBrowseUrl : 'ckfinder/ckfinder.html?Type=Images',
filebrowserFlashBrowseUrl : 'ckfinder/ckfinder.html?Type=Flash',
filebrowserUploadUrl : 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
filebrowserImageUploadUrl : 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
filebrowserFlashUploadUrl : 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash'
});

</script>
</td> </tr> 
</table>

<table width="760px" align="center">
	  <!--DWLayoutTable-->
	<tr height="50"><td width="100%" height="30"> <div align="center">
		<input type="submit" value="Invia Email" style= "BORDER-RIGHT: gray 1px solid; BORDER-TOP: gray 1px solid; MARGIN: 2px 0px; BORDER-LEFT: gray 1px solid; BORDER-BOTTOM: gray 1px solid;">
			
	  </div></td></tr>
</table>
</form>
</div></div>


<?php
break;
case AUTH_NOT_LOGGED:


?>

<table width="760" border="0" cellpadding="0" cellspacing="0" align="center">
      <tr>
          <td >Login Club </td>
      </tr>
      <tr>
          <td >
        
		  <form action="login.php<?=$link?>" method="post">
			 <table cellspacing="2">
			   <!--DWLayoutTable-->
				<tr>
					<td >Username :</td>
					<td ><input name="uname" type="text" size="10"></td>
	  </tr>
				<tr>
					<td class="text1">Password :</td>
					<td><input name="passw" type="password" size="10"></td>
				</tr>
				<tr>
					<td colspan="2">
					  <input type="submit" name="action" value="entra">
				  </td>
				</tr>
				<tr><td height="21" colspan="2" valign="top" ><!--DWLayoutEmptyCell-->&nbsp;</td>
			    </tr>
			</table>
			
          </form>
		  
</table>

<?php 
break; }
?>
</div></div>

</body>
</html>