Пример #1
0
<?php
include("../inc/init.php");

$imap = new CImap("cyber-consult.ch", "*****@*****.**", "n8bk0QaE");
$imap->connect();
CFunction::print_r($imap->download_file($_GET['message_number'], $_GET['filename']));
?>
Пример #2
0
	break;
	
case 4 : // Relever
	break;
	
case 44 : // Relever
	if(!empty($_POST['passe'])) $passe = $_POST['passe'];
	if(!empty($_POST['nb_traitement'])) $nb_traitement = $_POST['nb_traitement'];

	if($nb_traitement > MAIL_MAX_RECEPT) {
		$msginfo = $nb_traitement . " : Nombre de traitement erron&eacute; : veullez indiquer un nombre inf&eacute;rieur à " . MAIL_MAX_RECEPT;
		$a = 4;
		break;
	}
	
	$imap = new CImap(CTableConfiguration::get_value_by_element('POP_SERVER'), CTableUser::get_email_admin(), $passe);
	if($imap->connect()) {
		$nb_msg = $imap->get_nb_msg_recent();
	} else  {
		$msginfo = "Connexion impossible. Veuillez v&eacute;rifier le mot de passe saisi ou le nom du Serveur POP dans le menu Configuration. Si tout est correct, veillez renouveler votre demande ult&eacute;rieurement, le serveur POP peut être momentan&eacute;ment interrompu.";
		$a = 4;
	}
	break;
	
case 5 : // Envoyer 1
	if(!empty($_GET['id'])) $id = $_GET['id'];
	$obj  			= new CTableEmail(array('id'=>$id));
	$email   		= $obj->select_row();
	$expediteur   	= $email['expediteur'];
	$destinataire   = $email['destinataire'];
	$nom   			= $email['nom'];
Пример #3
0
<?php
include("../inc/init.php");

if(!empty($_GET['message_number'])) $message_number = $_GET['message_number'];
if(!empty($_GET['passe'])) 			$passe 			= $_GET['passe'];

$imap = new CImap(CTableConfiguration::get_value_by_element('POP_SERVER'), CTableUser::get_email_admin(), $passe);
if(@$imap->connect()) {
	$info 	  = @$imap->get_info($message_number);
	$email_id = $imap->load($message_number);
	echo "Sauvegarde du message " . $message_number;
?>
<script type="text/javascript">
$('first').insert({after:'<tr><td><a href="show_reception.php?id=<?php echo $email_id ?>" target="popup" onclick="popup(this.href, this.target, 800, 600);"><?php echo $email_id ?></a></td><td><?php echo CTableGroupe::get_href($info['from']) ?></td><td><?php echo utf8_encode($info['subject']) ?></td><td><?php echo CDate::date_switch(CDate::formate_date($info['date'])) ?></td><td align="center" class="info etat <?php echo 'etat_0'?>"><div class="bulle"><img src="../img/publish_x.png" alt="Non lu" /> Non lu<br /><a href="reception.php?a=2&id=<?php echo $email_id ?>&etat=1"><img src="../img/publish_g.png" alt="Lu" /> Lu</a><br /><a href="reception.php?a=2&id=<?php echo $email_id ?>&etat=2"><img src="../img/publish_u.png" alt="Archivé" /> Archiv&eacute;</a></div></td></tr>'});
</script>
<?php
} else  {
	echo "Echec de chargement du message " . $message_number;
}
?>

<a href="show_reception.php?id=<?php echo stripslashes($email['id']) ?>" target="popup" onclick="popup(this.href, this.target, '800', '600');"> <?php echo $email['id'] ?> </a>
Пример #4
0
#message {
	border:1px dashed gray;
	padding : 5px;
}
</style>
</head>

<body>
<p>
<label>De </label> : <?php echo $cible['expediteur'] ?>
</p>
<p>
<label>A </label> : <?php echo $cible['destinataire'] ?>
</p>
<p>
<label>Sujet </label> : <?php echo utf8_encode($cible['nom']) ?>
</p>
<p>
<label>Pj </label> : 
<?php 
$imap = new CImap("cyber-consult.ch", "*****@*****.**", "n8bk0QaE");
$imap->connect();
echo $imap->show_downloading($imap->get_message_number($cible['imap']));
?>
</p>
<div id="message">
<?php echo utf8_encode($cible['text']) ?>
</div>
</body>
</html>